[Mapbender-commits] r5412 - branches/2.6/http/html
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Jan 25 04:33:56 EST 2010
Author: christoph
Date: 2010-01-25 04:33:56 -0500 (Mon, 25 Jan 2010)
New Revision: 5412
Modified:
branches/2.6/http/html/mod_treefolderPlain.php
Log:
Modified: branches/2.6/http/html/mod_treefolderPlain.php
===================================================================
--- branches/2.6/http/html/mod_treefolderPlain.php 2010-01-25 09:33:12 UTC (rev 5411)
+++ branches/2.6/http/html/mod_treefolderPlain.php 2010-01-25 09:33:56 UTC (rev 5412)
@@ -36,6 +36,7 @@
msgObj.tooltipRemoveWms = '<?php echo addslashes(_mb("Removes the selected WMS"));?>';
msgObj.tooltipMoveSelectionUp = '<?php echo addslashes(_mb("Moves the selection up"));?>';
msgObj.tooltipMoveSelectionDown = '<?php echo addslashes(_mb("Moves the selection down"));?>';
+msgObj.tooltipMetadata = '<?php echo addslashes(_mb("Show metadata"));?>';
var jst_container = "document.getElementById('treeContainer')";
var jst_image_folder = imagedir;
@@ -254,7 +255,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);
}
@@ -332,7 +333,7 @@
if( mb_mapObj[ind].wms[wms].mapURL == false || mb_mapObj[ind].getDomElement().ownerDocument.getElementById(map).complete){
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);
@@ -374,12 +375,12 @@
}
}
-function handleSelectedLayer(mapObj,wms_id,layername,type,status){
+function local_handleSelectedLayer(mapObj,wms_id,layername,type,status){
if(lock_update||lock_check)return;
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;
}
}
@@ -503,7 +504,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 addslashes(_mb('Last WMS can not be removed.'));?>");
@@ -526,6 +527,10 @@
if(state==0 && showstatus=='true' && path.split(jst_delimiter[0]).length == 2){
setTimeout('setNodeImage("'+path+'", "error_folder.png");', 100);
}
+ else{
+ setTimeout('setNodeImage("'+path+'", "closed_folder.png");', 100);
+ }
+
if(reset_lock)
lock_update=false;
}
@@ -544,8 +549,12 @@
lock_check=true;
checkChildren(path, 0, bChk);
if(ficheckbox)checkChildren(path, 1, bChk);
- if(bChk==false && showstatus=='true')
+ if(bChk==false && showstatus=='true'){
setTimeout('setNodeImage("'+path+'", "error_folder.png");', 100);
+ }
+ else{
+ setTimeout('setNodeImage("'+path+'", "closed_folder.png");', 100);
+ }
if(reset_lock)
{
mb_restateLayers(mod_treeGDE_map,wms_id);
@@ -581,12 +590,14 @@
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 == ""){
- if(!temp.gui_layer_selectable == '1' && !temp.gui_layer_queryable == '1')
+ if(temp.gui_layer_selectable !== '1' && temp.gui_layer_queryable !== '1'
+ && temp.gui_layer_selectable !== 1 && temp.gui_layer_queryable !== 1) {
continue;
+ }
parentNode = arrNodes[0][0];
if(eval("categories.wms_"+ mb_mapObj[i].wms[ii].wms_id) !== undefined)
@@ -611,7 +622,7 @@
c_menu+="]";
controls=null;
if(switchwms=='true')controls='<INPUT type="checkbox" title="' + msgObj.tooltipHandleWms + '" onclick="handleSelectedWMS(\''+parentNode+'|wms_'+ mb_mapObj[i].wms[ii].wms_id+'\');" />';
- if(wmsbuttons == 'true'&&metadatalink == 'true')controls+='<a href="'+'javascript:openwindow(\''+ defaultMetadataUrl + '&id='+temp.layer_uid+'\');'+'"><img src="'+imagedir+'/info.png" /></a>';
+ if(wmsbuttons == 'true'&&metadatalink == 'true')controls+='<a href="'+'javascript:openwindow(\''+ defaultMetadataUrl + '&id='+temp.layer_uid+'\');'+'"><img alt="'+msgObj.tooltipMetadata+'" title="'+msgObj.tooltipMetadata+'" src="'+imagedir+'/info.png" /></a>';
addNode(parentNode,["wms_"+ mb_mapObj[i].wms[ii].wms_id,[temp.layer_title,((metadatalink=='true'&&wmsbuttons != 'true')?('javascript:openwindow(\"'+ defaultMetadataUrl + '&id='+temp.layer_uid+'\");'):"javascript:select("+i+","+ii+","+iii+");"),,,temp.layer_title,eval(c_menu),controls,[i,ii,iii]]],false,false,reverse=="true");
parentObj = parentNode+"|wms_"+ mb_mapObj[i].wms[ii].wms_id;
}
@@ -628,7 +639,8 @@
}
parentLayer = "|" + mb_mapObj[i].wms[ii].objLayer[j].layer_id + parentLayer;
}
- if(temp.gui_layer_selectable == '1' || temp.gui_layer_queryable == '1'){
+ if(temp.gui_layer_selectable === '1' || temp.gui_layer_selectable === 1
+ || temp.gui_layer_queryable === '1' || temp.gui_layer_queryable === 1){
var c_menu="[";
if(reverse=="true"){
if(menu.indexOf("layer_down")!=-1 && iii!= mb_mapObj[i].wms[ii].objLayer.length-1)c_menu+="menu_move_up,";
@@ -649,26 +661,27 @@
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')
+ }
+ if(temp.gui_layer_selectable!=='1' && 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);");
+ controls.push("onclick=\"local_handleSelectedLayer('"+mod_treeGDE_map+"','"+ mb_mapObj[i].wms[ii].wms_id+"','"+temp.layer_name+"','visible',this.checked?1:0);");
if(ficheckbox == 'false')
- controls.push("handleSelectedLayer('"+mod_treeGDE_map+"','"+ mb_mapObj[i].wms[ii].wms_id+"','"+temp.layer_name+"','querylayer',this.checked?1:0);");
+ controls.push("local_handleSelectedLayer('"+mod_treeGDE_map+"','"+ 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')
+ if(temp.gui_layer_queryable !== '1' && temp.gui_layer_queryable !== 1)
controls.push('disabled ');
- controls.push("onclick=\"handleSelectedLayer('"+mod_treeGDE_map+"','"+ mb_mapObj[i].wms[ii].wms_id+"','"+temp.layer_name+"','querylayer',this.checked?1:0);");
+ controls.push("onclick=\"local_handleSelectedLayer('"+mod_treeGDE_map+"','"+ 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>');
+ controls.push('<a href="javascript:openwindow(\''+ defaultMetadataUrl + '&id='+temp.layer_uid+'\');"><img alt="'+msgObj.tooltipMetadata+'" title="'+msgObj.tooltipMetadata+'" 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");
}
@@ -688,7 +701,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