[Mapbender-commits] r2719 - branches/2.5/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri Jul 25 04:34:48 EDT 2008
Author: christoph
Date: 2008-07-25 04:34:48 -0400 (Fri, 25 Jul 2008)
New Revision: 2719
Modified:
branches/2.5/http/javascripts/mod_setBackground.php
Log:
refactoring
Modified: branches/2.5/http/javascripts/mod_setBackground.php
===================================================================
--- branches/2.5/http/javascripts/mod_setBackground.php 2008-07-25 06:54:48 UTC (rev 2718)
+++ branches/2.5/http/javascripts/mod_setBackground.php 2008-07-25 08:34:48 UTC (rev 2719)
@@ -30,20 +30,18 @@
mb_registerInitFunctions("mod_setBackground_init()");
var mod_setBackground_active = false;
function mod_setBackground_init(){
- var ind = document.setBackground.mod_setBackground_list.options[0].value;
+ var setBackgroundSelectBox = document.setBackground.mod_setBackground_list;
+ var ind = setBackgroundSelectBox.options[0].value;
var cnt = 0;
var selInd;
- document.setBackground.mod_setBackground_list.options[document.setBackground.mod_setBackground_list.length - 1] = null;
+ setBackgroundSelectBox.options[setBackgroundSelectBox.length - 1] = null;
for(var i=0; i<wms.length; i++){
if(wms[i].gui_wms_visible == '0'){
- var title = decodeURIComponent(wms[i].wms_title);
- while (title.search(/\+/) != -1) {
- title = title.replace("\+", " ");
- }
+ var title = wms[i].wms_title;
var newO = new Option(title, i, false,false);
- document.setBackground.mod_setBackground_list.options[document.setBackground.mod_setBackground_list.length] = newO;
+ setBackgroundSelectBox.options[setBackgroundSelectBox.length] = newO;
if (ind == i) {
selInd = cnt;
}
@@ -52,7 +50,7 @@
}
if (cnt >0){
wms[ind].gui_wms_visible = 2;
- document.setBackground.mod_setBackground_list.selectedIndex = selInd;
+ setBackgroundSelectBox.selectedIndex = selInd;
}
mod_setBackground_active = ind;
}
More information about the Mapbender_commits
mailing list