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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Feb 23 06:12:06 EST 2010


Author: kmq
Date: 2010-02-23 06:11:42 -0500 (Tue, 23 Feb 2010)
New Revision: 5598

Modified:
   trunk/mapbender/http/javascripts/mod_ResultList.js
Log:
only make rows i resultList selectable when there are Buttons that could use that selection

Modified: trunk/mapbender/http/javascripts/mod_ResultList.js
===================================================================
--- trunk/mapbender/http/javascripts/mod_ResultList.js	2010-02-23 09:57:38 UTC (rev 5597)
+++ trunk/mapbender/http/javascripts/mod_ResultList.js	2010-02-23 11:11:42 UTC (rev 5598)
@@ -44,6 +44,7 @@
 options.resultHighlightLineWidth  = options.resultHighlightLineWidth || 2;
 options.resultListTitle  = options.resultListTitle || "ResultList";
 
+
 var ResultGeometryList = function(){
 	//store a callback for the function to call when a row is clicke
 	var row_callback = function(){};
@@ -196,6 +197,9 @@
 			(function() {
 			var row = rowNodes[rowNodeIndex];
 			$(".wfsFproperty", row).click(function(){
+
+// make thhis call a callback...
+//////////////////////
 				// go up to the row, which has the "modelindex" set
 				var modelIndex = $(row).data("modelindex");
 				var feature = me.model.getFeature(modelIndex);
@@ -260,6 +264,7 @@
 				resultHighlight.paint();
 				
 			return false;
+///////////////////////////////
 			})		
 
 
@@ -285,16 +290,18 @@
 				resultHighlight.paint();
 			});
 		
-			// make rows selectable
-			$(row).click((function(){
-				if($(this).hasClass('row_selected')){
-					$(this).removeClass('row_selected');
-				}
-				else{
-					$(this).addClass('row_selected');
-				}
-				return true;
-			}));
+			// make rows selectable only when there are Global Buttons that could actually do womething with that selection
+			if($('#'+options.id+"buttonrow").length >  0){
+				$(row).click((function(){
+					if($(this).hasClass('row_selected')){
+						$(this).removeClass('row_selected');
+					}
+					else{
+						$(this).addClass('row_selected');
+					}
+					return true;
+				}));
+			}
 
 			// set style of cursor to pointer for the result table
 			$(".wfsFproperty", row).css("cursor","pointer");



More information about the Mapbender_commits mailing list