[fusion-commits] r2171 - sandbox/jxlib-3.0/widgets

svn_fusion at osgeo.org svn_fusion at osgeo.org
Fri May 28 11:49:59 EDT 2010


Author: madair
Date: 2010-05-28 11:49:44 -0400 (Fri, 28 May 2010)
New Revision: 2171

Modified:
   sandbox/jxlib-3.0/widgets/SelectAttribute.js
Log:
fix error with IE 7 add options to a Select

Modified: sandbox/jxlib-3.0/widgets/SelectAttribute.js
===================================================================
--- sandbox/jxlib-3.0/widgets/SelectAttribute.js	2010-05-28 14:48:54 UTC (rev 2170)
+++ sandbox/jxlib-3.0/widgets/SelectAttribute.js	2010-05-28 15:49:44 UTC (rev 2171)
@@ -69,11 +69,11 @@
         //this.layerList.empty();
         this.layerList.innerHTML = '';
         var map = this.getMap().aMaps[0]; 
-        this.layerList.add(new Option('--select--',''),null);
+        this.layerList.add(new Option('--select--',''),0);
         for (var i=0; i<map.aLayers.length; ++i) {
             var layer = map.aLayers[i];
             if (layer.selectable) {
-              this.layerList.add(new Option(layer.legendLabel,layer.layerName),null);
+              this.layerList.add(new Option(layer.legendLabel,layer.layerName),0);
             }
         }
         this.layerList.onchange = OpenLayers.Function.bind(this.activateLayer, this);
@@ -108,7 +108,7 @@
         var attrs = this.attrs[layer].propertyvalues;
         var props = this.attrs[layer].propertynames;
         for (var i=0; i<attrs.length; ++i) {
-            this.propsList.add(new Option(attrs[i],props[i]),null);
+            this.propsList.add(new Option(attrs[i],props[i]),i);
         }
       }
     },
@@ -142,13 +142,13 @@
           
           this.operatorList = document.createElement('select');
           this.operatorList.className = 'operatorSelector';
-          this.operatorList.add(new Option("=","eq",true),null);
-          this.operatorList.add(new Option("like","like"),null);
-          this.operatorList.add(new Option(">","gt"),null);
-          this.operatorList.add(new Option("<","lt"),null);
-          this.operatorList.add(new Option("<=","le"),null);
-          this.operatorList.add(new Option(">=","ge"),null);
-          this.operatorList.add(new Option("!=","ne"),null);
+          this.operatorList.add(new Option("=","eq",true),0);
+          this.operatorList.add(new Option("like","like"),0);
+          this.operatorList.add(new Option(">","gt"),0);
+          this.operatorList.add(new Option("<","lt"),0);
+          this.operatorList.add(new Option("<=","le"),0);
+          this.operatorList.add(new Option(">=","ge"),0);
+          this.operatorList.add(new Option("!=","ne"),0);
           this.attrRow.appendChild(this.operatorList);
           
           this.attrValue = document.createElement('input');



More information about the fusion-commits mailing list