[Mapbender-commits] r7647 - trunk/mapbender/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Feb 25 03:56:36 EST 2011


Author: kmq
Date: 2011-02-25 00:56:35 -0800 (Fri, 25 Feb 2011)
New Revision: 7647

Modified:
   trunk/mapbender/http/javascripts/mod_ResultList.js
Log:
Resultlist respects elementvar display_popup

Modified: trunk/mapbender/http/javascripts/mod_ResultList.js
===================================================================
--- trunk/mapbender/http/javascripts/mod_ResultList.js	2011-02-24 16:30:53 UTC (rev 7646)
+++ trunk/mapbender/http/javascripts/mod_ResultList.js	2011-02-25 08:56:35 UTC (rev 7647)
@@ -47,7 +47,8 @@
  */
 
 //check element vars
-var display_popup = display_popup || true;
+//var display_popup = display_popup || true;
+options.display_popup = options.display_popup !== undefined ? options.display_popup :true;
 options.resultListTitle  = options.resultListTitle || "ResultList";
 options.resultListHeight	= options.resultListHeight || 250;
 options.resultListWidth 	= options.resultListWidth || 400;
@@ -172,7 +173,7 @@
 	this.show = function(){
 		$('#'+options.id).addClass("resultList");
 			
-		if(display_popup) {
+		if(options.display_popup) {
 			$('#'+options.id).dialog("open");
 		} 
 		else {
@@ -224,7 +225,7 @@
 	};
 
 	this.hide = function(){
-		if(display_popup){
+		if(options.display_popup){
 			$('#'+options.id).dialog("close");
 		}
 		else{
@@ -232,11 +233,12 @@
 		}
 	};
 
-	if(display_popup){
+	if(options.display_popup){
 		$('#'+options.id).dialog({autoOpen: false , width:options.resultListWidth, draggable: true, title: options.resultListTitle, position: options.position});
 	}
-	else{
-		$('#'+options.id).css("display","none");
+	else {
+		$(".ui-searchContainer-result").replaceWith($('#'+options.id));
+		$("#"+options.id).addClass("ui-searchContainer-result").hide();
 	}
 	
 };



More information about the Mapbender_commits mailing list