[fusion-commits] r2384 - trunk/widgets

svn_fusion at osgeo.org svn_fusion at osgeo.org
Wed May 25 13:36:06 EDT 2011


Author: madair
Date: 2011-05-25 10:36:06 -0700 (Wed, 25 May 2011)
New Revision: 2384

Modified:
   trunk/widgets/LayerManager.js
Log:
hide the layerinfo icon if there is no layer info URL

Modified: trunk/widgets/LayerManager.js
===================================================================
--- trunk/widgets/LayerManager.js	2011-05-20 10:22:41 UTC (rev 2383)
+++ trunk/widgets/LayerManager.js	2011-05-25 17:36:06 UTC (rev 2384)
@@ -208,6 +208,12 @@
     var icons = listItem.domObj.getElements('img');
     var infoIcon = icons[2];
     var delIcon = icons[1];
+    
+    var layerInfo = layer.oMap.getLayerInfoUrl(layer.layerName);
+    if (!layerInfo) {
+        infoIcon.style.display = "none";
+    }
+
     OpenLayers.Event.observe(infoIcon, 'click', OpenLayers.Function.bind(this.showLayerInfo, this, layer));
     OpenLayers.Event.observe(delIcon, 'click', OpenLayers.Function.bind(this.deleteLayer, this, layer));
     OpenLayers.Event.observe(listItem.domObj.getElement('input'), 'click', OpenLayers.Function.bind(this.visChanged, this, layer));



More information about the fusion-commits mailing list