[Mapbender-commits] r8416 - branches/2.7/http/html

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Jul 5 07:18:17 PDT 2012


Author: astrid_emde
Date: 2012-07-05 07:18:17 -0700 (Thu, 05 Jul 2012)
New Revision: 8416

Modified:
   branches/2.7/http/html/mod_treefolderPlain.php
Log:
merged with version from trunk - new element vars

localizeTree
enlargetreewidth
enlargetreewidthopacity 

Modified: branches/2.7/http/html/mod_treefolderPlain.php
===================================================================
--- branches/2.7/http/html/mod_treefolderPlain.php	2012-07-05 14:16:54 UTC (rev 8415)
+++ branches/2.7/http/html/mod_treefolderPlain.php	2012-07-05 14:18:17 UTC (rev 8416)
@@ -108,6 +108,7 @@
 var lock=false;
 var lock_update=false;
 var lock_check=false;
+var lock_maprequest = false; //global var to prohibit multiple saving states as wmc to session when loading wmc 
 var selectedMap=-1;
 var selectedWMS=-1;
 var selectedLayer=-1;
@@ -187,6 +188,7 @@
 if (typeof(openfolder) === 'undefined')openfolder = 'false';
 if (typeof(handlesublayer) === 'undefined')handlesublayer = 'false';
 if (typeof(enlargetreewidth) === 'undefined') enlargetreewidth = 'false';
+if (typeof(enlargetreewidthopacity) === 'undefined') enlargetreewidthopacity = 'false';
 if (typeof(menu) === 'undefined')menu = '';
 if (typeof(redirectToMetadataUrl) !== 'undefined' && redirectToMetadataUrl == "false") {
 	redirectToMetadataUrl = false;
@@ -221,18 +223,25 @@
 //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(){
 
@@ -242,6 +251,13 @@
                 'width': initialWidth + enlargetreewidth,
                 'zIndex': '300'
             });
+		if (enlargetreewidthopacity) {
+			$(this).css({
+				'-moz-opacity': '0.8',
+				'opacity': '0.8',
+				'filter': 'alpha(opacity=80)'
+            		});
+		}
             $(this).mousewheel();
         });
         $('#treeGDE').bind("mouseleave", function(){
@@ -249,10 +265,17 @@
                 'width': initialWidth,
                 'zIndex': '3'
             });
+		if (enlargetreewidthopacity) {
+			$(this).css({
+				'-moz-opacity': '1',
+				'opacity': '1',
+				'filter': 'alpha(opacity=100)'
+            		});
+		}
         });
     });
 }
-*/
+
 if(wmsbuttons != "true")
 	jst_highlight = false;
 
@@ -378,7 +401,7 @@
 	arrNodes = eval(arrNodesStr)
 	initArray();
 	if(showstatus=='true'||alerterror=='true')
-		init_mapcheck();
+		//init_mapcheck();
 	renderTree();
 	if(window.opera)
 		setTimeout('initWmsCheckboxen();updateScale();',100);
@@ -655,7 +678,9 @@
 	if(confirm('<?php echo _mb("Are you sure you want to remove");?>' + ' "'+ mb_mapObj[j].wms[k].objLayer[l].layer_currentTitle+'"?')){
   		 mb_mapObjremoveWMS(j,k);
 		 mb_mapObj[j].zoom(true, 1.0);
+		 lock_maprequest = true; //done to prohibit save wmc for each wms
 		 mb_execloadWmsSubFunctions();
+		 lock_maprequest = false;
 	}
 }
 
@@ -699,7 +724,9 @@
 		l.gui_layer_querylayer = bChk ? 1 : 0;
 
 		mb_restateLayers(mod_treeGDE_map,wms_id);
-		setSingleMapRequest(mod_treeGDE_map,wms_id);
+		if (!lock_maprequest) {
+			setSingleMapRequest(mod_treeGDE_map,wms_id);
+		}		
 		return;
 	}
 	mb_mapObj[ind].wms[wms].handleLayer(layername,"visible",bChk?"1":"0");
@@ -715,8 +742,10 @@
 	}
 	if(reset_lock)
 	{
-		 mb_restateLayers(mod_treeGDE_map,wms_id);
-		 setSingleMapRequest(mod_treeGDE_map,wms_id);
+		mb_restateLayers(mod_treeGDE_map,wms_id);
+		if (!lock_maprequest) {
+			setSingleMapRequest(mod_treeGDE_map,wms_id);
+		}
 		lock_check=false;
 	}
 }



More information about the Mapbender_commits mailing list