[Mapbender-commits] r2901 - in branches/nimix_dev/http: html javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Sep 1 09:23:09 EDT 2008


Author: nimix
Date: 2008-09-01 09:23:08 -0400 (Mon, 01 Sep 2008)
New Revision: 2901

Modified:
   branches/nimix_dev/http/html/mod_treefolder2.php
   branches/nimix_dev/http/javascripts/wms.js
Log:
fix FI selection

Modified: branches/nimix_dev/http/html/mod_treefolder2.php
===================================================================
--- branches/nimix_dev/http/html/mod_treefolder2.php	2008-09-01 08:53:14 UTC (rev 2900)
+++ branches/nimix_dev/http/html/mod_treefolder2.php	2008-09-01 13:23:08 UTC (rev 2901)
@@ -470,6 +470,7 @@
 	var layername = parent.mb_mapObj[ind].wms[parent.getWMSIndexById(mod_treeGDE_map,t[t.length-1])].objLayer[0].layer_name;
 	var bChk = IsChecked(path, 0);	
 	handleSelectedLayer(mod_treeGDE_map,t[t.length-1],layername,"visible",bChk?"1":"0");
+	handleSelectedLayer(mod_treeGDE_map,t[t.length-1],layername,"querylayer",bChk?"1":"0");
 	lock_check=true;
 	checkChildren(path, 0, bChk);
 	if(ficheckbox)checkChildren(path, 1, bChk);
@@ -563,7 +564,7 @@
 									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);handleSelection('"+parentObj+parentLayer+"|"+temp.layer_id+"');updateParent('"+parentObj+parentLayer+"');"+((ficheckbox == 'false')?"handleSelectedLayer('"+mod_treeGDE_map+"','"+parent.mb_mapObj[i].wms[ii].wms_id+"','"+temp.layer_name+"','querylayer',this.checked?1:0)":"")+"\" />";
+									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");

Modified: branches/nimix_dev/http/javascripts/wms.js
===================================================================
--- branches/nimix_dev/http/javascripts/wms.js	2008-09-01 08:53:14 UTC (rev 2900)
+++ branches/nimix_dev/http/javascripts/wms.js	2008-09-01 13:23:08 UTC (rev 2901)
@@ -499,7 +499,7 @@
 		if(type == "visible") {
 			this.objLayer[j].gui_layer_visible = parseInt(value, 10);
 		}
-		else if(type=="querylayer") {
+		else if(type=="querylayer" && this.objLayer[j].gui_layer_queryable) {
 			this.objLayer[j].gui_layer_querylayer = parseInt(value, 10);
 		}
 	}
@@ -512,7 +512,7 @@
 			if(type == "visible") {
 				this.objLayer[j].gui_layer_visible = state;
 			}
-			else if(type=="querylayer") {
+			else if(type=="querylayer" && this.objLayer[j].gui_layer_queryable) {
 				this.objLayer[j].gui_layer_querylayer = state;
 			}
 		}



More information about the Mapbender_commits mailing list