[Mapbender-commits] r4555 - trunk/mapbender/http/html
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri Aug 28 08:49:13 EDT 2009
Author: christoph
Date: 2009-08-28 08:49:13 -0400 (Fri, 28 Aug 2009)
New Revision: 4555
Modified:
trunk/mapbender/http/html/mod_treefolderPlain.php
Log:
workaround: handle type confusion
Modified: trunk/mapbender/http/html/mod_treefolderPlain.php
===================================================================
--- trunk/mapbender/http/html/mod_treefolderPlain.php 2009-08-28 12:48:22 UTC (rev 4554)
+++ trunk/mapbender/http/html/mod_treefolderPlain.php 2009-08-28 12:49:13 UTC (rev 4555)
@@ -242,7 +242,7 @@
for(var iii=1; iii< mb_mapObj[i].wms[ii].objLayer.length; iii++){
if(! mb_mapObj[i].wms[ii].objLayer[iii].has_childs){
path = arrNodes[0][0]+"|wms_"+ mb_mapObj[i].wms[ii].wms_id+"|"+ mb_mapObj[i].wms[ii].objLayer[iii].layer_id;
- checkNode(path, 0, mb_mapObj[i].wms[ii].objLayer[iii].gui_layer_visible=='1', false);
+ checkNode(path, 0, mb_mapObj[i].wms[ii].objLayer[iii].gui_layer_visible==='1'||mb_mapObj[i].wms[ii].objLayer[iii].gui_layer_visible===1, false);
if(ficheckbox == 'true')
checkNode(path, 1, mb_mapObj[i].wms[ii].objLayer[iii].gui_layer_querylayer=='1', false);
}
@@ -323,7 +323,7 @@
if(state[wms]!=-1){
for(var i=1;i< mb_mapObj[ind].wms[wms].objLayer.length;i++){
- if( mb_mapObj[ind].wms[wms].objLayer[i].gui_layer_visible==1){
+ if(mb_mapObj[ind].wms[wms].objLayer[i].gui_layer_visible===1||mb_mapObj[ind].wms[wms].objLayer[i].gui_layer_visible==="1"){
state[wms]=1;
if(showstatus=='true')
setNodeImage(img);
@@ -370,7 +370,7 @@
var ind = getMapObjIndexByName(mapObj);
for(var i=0; i< mb_mapObj[ind].wms.length; i++){
if( mb_mapObj[ind].wms[i].wms_id == wms_id){
- mb_mapObj[ind].wms[i].handleLayer(layername, type, status);
+ mb_mapObj[ind].wms[i].handleLayer(layername, type, status);
break;
}
}
@@ -494,7 +494,7 @@
}
var visibleWMS=0;
for(var i=0;i< mb_mapObj[j].wms.length;i++)
- if( mb_mapObj[j].wms[i].gui_wms_visible=='1'|| mb_mapObj[j].wms[i].gui_wms_visible==1)
+ if( mb_mapObj[j].wms[i].gui_wms_visible==='1'|| mb_mapObj[j].wms[i].gui_wms_visible===1)
visibleWMS++;
if(visibleWMS<=1){
alert ("<?php echo _mb('Last WMS can not be removed.');?>");
@@ -572,7 +572,7 @@
for(var i=0; i< mb_mapObj.length; i++){
if( mb_mapObj[i].elementName == mod_treeGDE_map){
for(var ii=0; ii< mb_mapObj[i].wms.length; ii++){
- if( mb_mapObj[i].wms[ii].gui_wms_visible == '1' || mb_mapObj[i].wms[ii].gui_wms_visible == 1){
+ if( mb_mapObj[i].wms[ii].gui_wms_visible === '1' || mb_mapObj[i].wms[ii].gui_wms_visible === 1){
for(var iii=0; iii< mb_mapObj[i].wms[ii].objLayer.length; iii++){
var temp = mb_mapObj[i].wms[ii].objLayer[iii];
if( mb_mapObj[i].wms[ii].objLayer[iii].layer_parent == ""){
@@ -640,8 +640,9 @@
controls.push('<input type="checkbox" title="' + msgObj.tooltipLayerVisible + '" ');
if(temp.layer_name=="")
controls.push('style="display:none;" ');
- if(temp.gui_layer_visible=='1')
+ if(temp.gui_layer_visible==='1' ||temp.gui_layer_visible===1){
controls.push('checked ');
+ }
if(temp.gui_layer_selectable!='1')
controls.push('disabled ');
controls.push("onclick=\"handleSelectedLayer('"+mod_treeGDE_map+"','"+ mb_mapObj[i].wms[ii].wms_id+"','"+temp.layer_name+"','visible',this.checked?1:0);");
@@ -679,7 +680,7 @@
for(var i=0; i< mb_mapObj.length; i++){
if( mb_mapObj[i].elementName == mod_treeGDE_map){
for(var ii=0; ii< mb_mapObj[i].wms.length; ii++){
- if( mb_mapObj[i].wms[ii].gui_wms_visible == '1' || mb_mapObj[i].wms[ii].gui_wms_visible == 1){
+ if( mb_mapObj[i].wms[ii].gui_wms_visible === '1' || mb_mapObj[i].wms[ii].gui_wms_visible === 1){
for(var iii=0; iii< mb_mapObj[i].wms[ii].objLayer.length; iii++){
var temp = mb_mapObj[i].wms[ii].objLayer[iii];
if( mb_mapObj[i].wms[ii].objLayer[iii].layer_parent == ""){
More information about the Mapbender_commits
mailing list