[fusion-commits] r2174 - sandbox/jxlib-3.0/widgets
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Mon May 31 11:31:39 EDT 2010
Author: madair
Date: 2010-05-31 11:31:39 -0400 (Mon, 31 May 2010)
New Revision: 2174
Modified:
sandbox/jxlib-3.0/widgets/SelectAttribute.js
Log:
fix cross-browser errors in creating the select drop downs #iloveIE
Modified: sandbox/jxlib-3.0/widgets/SelectAttribute.js
===================================================================
--- sandbox/jxlib-3.0/widgets/SelectAttribute.js 2010-05-28 17:45:04 UTC (rev 2173)
+++ sandbox/jxlib-3.0/widgets/SelectAttribute.js 2010-05-31 15:31:39 UTC (rev 2174)
@@ -69,11 +69,11 @@
//this.layerList.empty();
this.layerList.innerHTML = '';
var map = this.getMap().aMaps[0];
- this.layerList.add(new Option('--select--',''),0);
+ this.layerList.options[this.layerList.options.length] = new Option('--select--','');
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),0);
+ this.layerList.options[this.layerList.options.length] = new Option(layer.legendLabel,layer.layerName);
}
}
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]),i);
+ this.propsList.options[this.propsList.options.length] = new Option(attrs[i],props[i]);
}
}
},
@@ -142,13 +142,13 @@
this.operatorList = document.createElement('select');
this.operatorList.className = 'operatorSelector';
- 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.operatorList.options[this.operatorList.options.length] = new Option("=","eq",true);
+ this.operatorList.options[this.operatorList.options.length] = new Option("like","like");
+ this.operatorList.options[this.operatorList.options.length] = new Option(">","gt");
+ this.operatorList.options[this.operatorList.options.length] = new Option("<","lt");
+ this.operatorList.options[this.operatorList.options.length] = new Option("<=","le");
+ this.operatorList.options[this.operatorList.options.length] = new Option(">=","ge");
+ this.operatorList.options[this.operatorList.options.length] = new Option("!=","ne");
this.attrRow.appendChild(this.operatorList);
this.attrValue = document.createElement('input');
More information about the fusion-commits
mailing list