changeset 1:47f3c44eff7d

Version mit integrierter Suche ?ber XML-Volltexte
author dwinter
date Wed, 26 Jan 2011 14:42:10 +0100
parents d075d7f70506
children ab6c05b4d8dd
files WebContent/found.js
diffstat 1 files changed, 16 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/WebContent/found.js	Wed Nov 03 12:25:18 2010 +0100
+++ b/WebContent/found.js	Wed Jan 26 14:42:10 2011 +0100
@@ -38,11 +38,7 @@
     
     var langs = $(object).find('div.ticketLang a');	
 	//var langs = getLanguages();
-    //console.log("showResult_langs:"+langs[0]);
-    //console.log("showResult_langs_la:"+$(langs[0]).text());
-    //console.log("showResult_langs:"+langs[1]);
-    //console.log("showResult_langs_la:"+$(langs[1]).text());
-  
+   
     var langsLen=langs.length;
 
     for ( var i=0;  i<langsLen; ++i ){ // now fill it with the languages
@@ -73,7 +69,8 @@
 		//	//console.log("all_lang:"+lang);
 		//	$('#show_next_'+lang).html(createNavString(lang));
 		//});
-		$('#all_'+lang).load(server + url + '/' + lang+'/resultInfo resultInfo', function() {
+		
+		$('#all_'+lang.replace(":","\\:")).load(server + url + '/' + lang+'/resultInfo resultInfo', function() {
 			var lang=$(this).find("lang").text();
 		
 			all[lang]=$(this).find("hits").text();
@@ -84,7 +81,7 @@
 			$('#show_next_'+lang).html(createNavString(lang));
 		});
 		
-		$('#language_results_'+lang).load(
+		$('#language_results_'+lang.replace(":","\\:")).load(
 		    server + url + '/' + lang+'?from='+from[lang]+'&to='+to[lang],
 		    function() {
 			//console.log('after results');
@@ -127,17 +124,16 @@
 					
 				    }
 				}
-				
-				$('#' + newId).load(
-				    server + url + '/' + lang
-					+ '/' + ref,
+				var urlStr =  server + url + '/' + lang+ '/' + ref;
+				newId = newId.replace(/(:|\.)/g,'\\$1'); // quote dots in ids
+				$('#' + newId).load(urlStr,
 				    showPages);
 			    });
 		    });
 	    } else {
 		//console.log('second');
 		
-		$('#language_results_'+lang+' tr.documentHit').each(
+		$('#language_results_'+lang.replace(":","\\:")+' tr.documentHit').each(
 		    function(index) {
 			//var lang = $(this).find('div.resultLang').text();
 			var newId = $(this).attr('id') + '_content';
@@ -158,9 +154,12 @@
 			    }
 			}
 			
-			//console.log('yyy:'+url + '/' + lang + '/' + ref);
-			$('#' + newId).load(
-			    server + url + '/' + lang + '/' + ref,
+			
+			var urlstring = server+url + '/' + lang + '/' + ref;
+			//var ele= $(this).find('#' + newId);
+			
+			newId = newId.replace(/(:|\.)/g,'\\$1'); // quote dots in ids
+			$('#' + newId).load(urlstring,
 			    showPages);
 		    });
 	    } // end else langNew
@@ -196,8 +195,8 @@
 	for ( var i=0;  i<pagesLen; ++i ){
 	    $(this).parent().addClass('foundPages');
 	    var ref = $(pages[i]).find('a').attr('href');
-	    //console.log('ref:'+ref);
-	    $(pages[i]).load(server+ref+'/digilib', function(){
+	   
+	    $(pages[i]).load(server+ref+'/generic', function(){
 		//console.log("showpage");
 		//console.log($(this).parent());
 		//console.log(this);