[Mapbender-commits] r2911 - branches/nimix_dev/http/html
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Sep 4 04:32:04 EDT 2008
Author: nimix
Date: 2008-09-04 04:32:04 -0400 (Thu, 04 Sep 2008)
New Revision: 2911
Modified:
branches/nimix_dev/http/html/mod_treefolder2.php
Log:
refractor long line
Modified: branches/nimix_dev/http/html/mod_treefolder2.php
===================================================================
--- branches/nimix_dev/http/html/mod_treefolder2.php 2008-09-04 08:26:08 UTC (rev 2910)
+++ branches/nimix_dev/http/html/mod_treefolder2.php 2008-09-04 08:32:04 UTC (rev 2911)
@@ -564,10 +564,32 @@
if(menu.indexOf("hide")!=-1)c_menu+="menu_hide";
c_menu+="]";
- controls='<input type="checkbox" title="' + msgObj.tooltipLayerVisible + '"'+(temp.layer_name==""?'style="display:none;" ':"")+((temp.gui_layer_visible=='1')?'checked ':'')+(temp.gui_layer_selectable!='1'?'disabled ':'')+"onclick=\"handleSelectedLayer('"+mod_treeGDE_map+"','"+parent.mb_mapObj[i].wms[ii].wms_id+"','"+temp.layer_name+"','visible',this.checked?1:0);"+((ficheckbox == 'false')?"handleSelectedLayer('"+mod_treeGDE_map+"','"+parent.mb_mapObj[i].wms[ii].wms_id+"','"+temp.layer_name+"','querylayer',this.checked?1:0);":"")+"handleSelection('"+parentObj+parentLayer+"|"+temp.layer_id+"');updateParent('"+parentObj+parentLayer+"');\" />";
- if(ficheckbox == 'true')controls+='<input type="checkbox" title="' + msgObj.tooltipLayerQuerylayer + '" '+(temp.gui_layer_querylayer=='1'?'checked ':'')+(temp.gui_layer_queryable!='1'?'disabled ':'')+"onclick=\"handleSelectedLayer('"+mod_treeGDE_map+"','"+parent.mb_mapObj[i].wms[ii].wms_id+"','"+temp.layer_name+"','querylayer',this.checked?1:0);checkChildren('"+parentObj+parentLayer+"|"+temp.layer_id+"', 1, this.checked?1:0)\" />";
- if(wmsbuttons == 'true'&&metadatalink == 'true')controls+='<a href="'+'javascript:openwindow(\''+ defaultMetadataUrl + '&id='+temp.layer_uid+'\');'+'"><img src="'+imagedir+'/info.png" /></a>';
- addNode(parentObj + parentLayer, [temp.layer_id,[temp.layer_title,((metadatalink=='true'&&wmsbuttons != 'true')?('javascript:openwindow(\"'+ defaultMetadataUrl + '&id='+temp.layer_uid+'\");'):"javascript:select("+i+","+ii+","+iii+");"),,((c_menu!='[]'&&temp.layer_name!="")?'menu.png':null),temp.layer_title,eval(c_menu),controls,[i,ii,iii]]],false,false,reverse=="true");
+ controls = [];
+ controls.push('<input type="checkbox" title="' + msgObj.tooltipLayerVisible + '" ');
+ if(temp.layer_name=="")
+ controls.push('style="display:none;" ');
+ if(temp.gui_layer_visible=='1')
+ controls.push('checked ');
+ if(temp.gui_layer_selectable!='1')
+ controls.push('disabled ');
+ controls.push("onclick=\"handleSelectedLayer('"+mod_treeGDE_map+"','"+parent.mb_mapObj[i].wms[ii].wms_id+"','"+temp.layer_name+"','visible',this.checked?1:0);");
+ if(ficheckbox == 'false')
+ controls.push("handleSelectedLayer('"+mod_treeGDE_map+"','"+parent.mb_mapObj[i].wms[ii].wms_id+"','"+temp.layer_name+"','querylayer',this.checked?1:0);");
+ controls.push("handleSelection('"+parentObj+parentLayer+"|"+temp.layer_id+"', 0);");
+ controls.push("updateParent('"+parentObj+parentLayer+"');\" />");
+ if(ficheckbox == 'true'){
+ controls.push('<input type="checkbox" title="' + msgObj.tooltipLayerQuerylayer + '" ');
+ if(temp.gui_layer_querylayer=='1')
+ controls.push('checked ');
+ if(temp.gui_layer_queryable!='1')
+ controls.push('disabled ');
+ controls.push("onclick=\"handleSelectedLayer('"+mod_treeGDE_map+"','"+parent.mb_mapObj[i].wms[ii].wms_id+"','"+temp.layer_name+"','querylayer',this.checked?1:0);");
+ controls.push("handleSelection('"+parentObj+parentLayer+"|"+temp.layer_id+"', 1);\" />");
+ }
+ if(wmsbuttons == 'true'&&metadatalink == 'true'){
+ controls.push('<a href="javascript:openwindow(\''+ defaultMetadataUrl + '&id='+temp.layer_uid+'\');"><img src="'+imagedir+'/info.png" /></a>');
+ }
+ addNode(parentObj + parentLayer, [temp.layer_id,[temp.layer_title,((metadatalink=='true'&&wmsbuttons != 'true')?('javascript:openwindow(\"'+ defaultMetadataUrl + '&id='+temp.layer_uid+'\");'):"javascript:select("+i+","+ii+","+iii+");"),,((c_menu!='[]'&&temp.layer_name!="")?'menu.png':null),temp.layer_title,eval(c_menu),controls.join(""),[i,ii,iii]]],false,false,reverse=="true");
}
}
}
More information about the Mapbender_commits
mailing list