[Mapbender-commits] r5878 - in trunk/mapbender/http: javascripts plugins

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Apr 9 09:49:14 EDT 2010


Author: verenadiewald
Date: 2010-04-09 09:49:11 -0400 (Fri, 09 Apr 2010)
New Revision: 5878

Modified:
   trunk/mapbender/http/javascripts/mod_ResultList.js
   trunk/mapbender/http/plugins/mb_resultList_DetailPopup.js
Log:
enable adding detailPopupButtons to detailPopup

Modified: trunk/mapbender/http/javascripts/mod_ResultList.js
===================================================================
--- trunk/mapbender/http/javascripts/mod_ResultList.js	2010-04-09 12:54:16 UTC (rev 5877)
+++ trunk/mapbender/http/javascripts/mod_ResultList.js	2010-04-09 13:49:11 UTC (rev 5878)
@@ -57,7 +57,7 @@
 var ResultGeometryList = function(){
 	//store a callback for the function to call when a row is clicke
 	var row_callback = function(){};
-	var popupButtons = [];
+	this.popupButtons = [];
 	var me = this;
 
 	me.options = options;
@@ -126,7 +126,7 @@
 	 * buttondef: {Object} an object with two properties: "title" and  "callback", a function that gets the  feature that corresponds to the popup as it's argument
   */
 	this.addPopupButton = function(buttondef){
-		popupButtons.push(buttondef);
+		this.popupButtons.push(buttondef);
 	};
 	
 	/*

Modified: trunk/mapbender/http/plugins/mb_resultList_DetailPopup.js
===================================================================
--- trunk/mapbender/http/plugins/mb_resultList_DetailPopup.js	2010-04-09 12:54:16 UTC (rev 5877)
+++ trunk/mapbender/http/plugins/mb_resultList_DetailPopup.js	2010-04-09 13:49:11 UTC (rev 5878)
@@ -74,6 +74,7 @@
 			infoPopup.append(infoPopupHtml);
 			
 			buttonList = $("<ul></ul>").css("list-style-type","none");
+			
 			for (var c in me.popupButtons){
 				var callback = function() {
 					var  args =  { 
@@ -83,7 +84,7 @@
 					};
 					me.popupButtons[c].callback.call(this,args);
 				};
-				var button = $("<li><button type='button' class='ui-state-default ui-corner-all'>"+popupButtons[c].title+"</button></li>").click(callback);
+				var button = $("<li><button type='button' class='ui-state-default ui-corner-all'>"+me.popupButtons[c].title+"</button></li>").click(callback);
 				button.css("display","inline");
 				buttonList.append(button);
 			}



More information about the Mapbender_commits mailing list