[Mapbender-commits] r8343 - trunk/mapbender/http/html

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu May 10 06:09:39 EDT 2012


Author: verenadiewald
Date: 2012-05-10 03:09:39 -0700 (Thu, 10 May 2012)
New Revision: 8343

Modified:
   trunk/mapbender/http/html/mod_treefolderPlain.php
Log:
http://trac.osgeo.org/mapbender/ticket/809 -> some changes to avoid the script delay while loading gui

Modified: trunk/mapbender/http/html/mod_treefolderPlain.php
===================================================================
--- trunk/mapbender/http/html/mod_treefolderPlain.php	2012-05-07 09:54:47 UTC (rev 8342)
+++ trunk/mapbender/http/html/mod_treefolderPlain.php	2012-05-10 10:09:39 UTC (rev 8343)
@@ -223,17 +223,24 @@
 //parent.eventMapRequestFailed.register(function(t){imgerror(t)});
 
 eventAfterLoadWMS.register(reloadTree);
+eventAfterLoadWMS.register(registerInitMapCheck);
 Mapbender.events.init.register(function () {
 	$("#" + mod_treeGDE_map).mapbender().events.afterMoveWms.register(reloadTree);
 });
 eventInit.register(loadTree);
 if(showstatus=='true'||alerterror=='true'){
-	eventAfterMapRequest.register(init_mapcheck);
-	init_mapcheck();
+	//eventAfterMapRequest.register(init_mapcheck);
+	//init_mapcheck();
 }
 eventAfterMapRequest.register(updateScale);
 eventAfterMapRequest.register(updateCheckState);
 
+function registerInitMapCheck() {
+	if(showstatus=='true'||alerterror=='true'){
+		console.log("Registrierung init_mapcheck an eventAfterMapRequest");
+		eventAfterMapRequest.register(init_mapcheck);
+	}
+}
 
 if (enlargetreewidth) {
     eventAfterInit.register(function(){
@@ -394,7 +401,7 @@
 	arrNodes = eval(arrNodesStr)
 	initArray();
 	if(showstatus=='true'||alerterror=='true')
-		init_mapcheck();
+		//init_mapcheck();
 	renderTree();
 	if(window.opera)
 		setTimeout('initWmsCheckboxen();updateScale();',100);



More information about the Mapbender_commits mailing list