[Mapbender-commits] r1716 - in trunk/mapbender/http: html javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Oct 8 04:39:33 EDT 2007


Author: nimix
Date: 2007-10-08 04:39:32 -0400 (Mon, 08 Oct 2007)
New Revision: 1716

Modified:
   trunk/mapbender/http/html/mod_treefolder2.php
   trunk/mapbender/http/javascripts/jsTree.js
Log:
http://trac.osgeo.org/mapbender/ticket/109

Modified: trunk/mapbender/http/html/mod_treefolder2.php
===================================================================
--- trunk/mapbender/http/html/mod_treefolder2.php	2007-10-08 08:29:43 UTC (rev 1715)
+++ trunk/mapbender/http/html/mod_treefolder2.php	2007-10-08 08:39:32 UTC (rev 1716)
@@ -509,7 +509,9 @@
 					if(parent.mb_mapObj[i].wms[ii].gui_wms_visible == '1' || parent.mb_mapObj[i].wms[ii].gui_wms_visible == 1){
 						for(var iii=0; iii<parent.mb_mapObj[i].wms[ii].objLayer.length; iii++){          
 							var temp = parent.mb_mapObj[i].wms[ii].objLayer[iii];     
-							if(parent.mb_mapObj[i].wms[ii].objLayer[iii].layer_parent == ""){  
+							if(parent.mb_mapObj[i].wms[ii].objLayer[iii].layer_parent == ""){ 
+								if(!temp.gui_layer_selectable == '1' && !temp.gui_layer_queryable == '1')
+									continue;				
 								var c_menu="[";
 								if(reverse=="true"){
 									if(menu.indexOf("wms_down")!=-1 && ii!=parent.mb_mapObj[i].wms.length-1)c_menu+="menu_move_up,";

Modified: trunk/mapbender/http/javascripts/jsTree.js
===================================================================
--- trunk/mapbender/http/javascripts/jsTree.js	2007-10-08 08:29:43 UTC (rev 1715)
+++ trunk/mapbender/http/javascripts/jsTree.js	2007-10-08 08:39:32 UTC (rev 1716)
@@ -139,9 +139,9 @@
 				if(p == parts.length - 1){
 					return tr
 				}else{
-					if(!childExists(tr) || !isExpanded(tr))
-						tr.firstChild.firstChild.onclick()
-						tBody = tBody.childNodes[c + 1].childNodes[1].firstChild.firstChild
+					if(!childExists(tr))
+						return null;
+					tBody = tBody.childNodes[c + 1].childNodes[1].firstChild.firstChild
 
 					if(!tBody)
 						return null
@@ -274,7 +274,7 @@
 		path = arrPath.join(jst_delimiter[0])
 	}
 	
-	if(path == ""){
+	if(path.split(jst_delimiter[0]).length<=1){
 		renderTree()
 	}else{
 	
@@ -380,7 +380,7 @@
 	var nd = getDomNode(path);
 
 	if(!nd)return -1;
-	if(!childExists(nd))nd.firstChild.firstChild.onclick();
+	if(!childExists(nd))return -1;
 	var tBody = nd.nextSibling.childNodes[1].firstChild.firstChild;
 	if(!tBody)return -1;
 	for(var i = 0;i < tBody.childNodes.length; i++){



More information about the Mapbender_commits mailing list