[Mapbender-commits] r2584 - branches/2.5/http/html

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Sun Jul 6 14:27:58 EDT 2008


Author: nimix
Date: 2008-07-06 14:27:58 -0400 (Sun, 06 Jul 2008)
New Revision: 2584

Modified:
   branches/2.5/http/html/mod_treefolder2.php
Log:
http://trac.osgeo.org/mapbender/ticket/219

Modified: branches/2.5/http/html/mod_treefolder2.php
===================================================================
--- branches/2.5/http/html/mod_treefolder2.php	2008-07-04 08:08:51 UTC (rev 2583)
+++ branches/2.5/http/html/mod_treefolder2.php	2008-07-06 18:27:58 UTC (rev 2584)
@@ -117,13 +117,13 @@
 //var menu_layer_switch = ['menu_zoom', ['Zjjj ', 'javascript:var sd = "{@strData}";eval(eval(sd.substr(0, sd.length-6))[1][1]);openwindow(defaultMetadataUrl + "&id="+parent.mb_mapObj[selectedMap].wms[selectedWMS].objLayer[selectedLayer].layer_uid);',,'info.png']];
 //var menu_info_switch = ['menu_zoom', ['Zmn ', 'javascript:var sd = "{@strData}";eval(eval(sd.substr(0, sd.length-6))[1][1]);openwindow(defaultMetadataUrl + "&id="+parent.mb_mapObj[selectedMap].wms[selectedWMS].objLayer[selectedLayer].layer_uid);',,'info.png']];
 
-parent.mb_registerloadWmsSubFunctions("window.frames['treeGDE'].reloadTree();");
-parent.mb_registerInitFunctions("window.frames['treeGDE'].loadTree();");
-if(showstatus=='true'||alerterror=='true'){
-	parent.mb_registerSubFunctions("window.frames['treeGDE'].init_mapcheck();");
+parent.eventAfterLoadWMS.register(reloadTree);
+parent.eventInit.register(loadTree);
+if(showstatus=='true'||alerterror=='true'){
+	parent.eventAfterMapRequest.register(init_mapcheck);
 	init_mapcheck();
 }
-parent.mb_registerSubFunctions("window.frames['treeGDE'].updateScale();");
+parent.eventAfterMapRequest.register(updateScale);
 if(wmsbuttons != "true")
 	jst_highlight = false;
 
@@ -470,17 +470,18 @@
 	}
 }
 
-function handleSelection(path){
+function handleSelection(path, box){
 	if(lock_update)return;
 	var reset_lock=!lock_check;
 	lock_check=true;
-	var bChk = IsChecked(path, 0);
+	var bChk = IsChecked(path, box);	
 //	enableCheckbox(path, 0, true);
-	checkChildren(path, 0, bChk);
+	checkChildren(path, box, bChk);
 	if(reset_lock){
 		var t = path.split("|");
 		lock_check=false;
 		parent.mb_restateLayers(mod_treeGDE_map,t[1]);
+		if(box==0)
 		parent.setSingleMapRequest(mod_treeGDE_map,t[1]);
 	}
 }
@@ -549,8 +550,8 @@
 									if(menu.indexOf("hide")!=-1)c_menu+="menu_hide";
 									c_menu+="]";
 
-							controls='<input type="checkbox" '+((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)":"")+"\" />";
-									if(ficheckbox == 'true')controls+='<input type="checkbox" '+(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)\" />";
+									controls='<input type="checkbox" '+(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+"', 0);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)":"")+"\" />";
+									if(ficheckbox == 'true')controls+='<input type="checkbox" '+(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);handleSelection('"+parentObj+parentLayer+"|"+temp.layer_id+"', 1)\" />";
 									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");
 								}



More information about the Mapbender_commits mailing list