[Mapbender-commits] r5796 - trunk/mapbender/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Mar 17 05:15:34 EDT 2010


Author: verenadiewald
Date: 2010-03-17 05:15:33 -0400 (Wed, 17 Mar 2010)
New Revision: 5796

Modified:
   trunk/mapbender/http/php/mod_wfs.php
Log:
integrated wmc wfs conf handling

Modified: trunk/mapbender/http/php/mod_wfs.php
===================================================================
--- trunk/mapbender/http/php/mod_wfs.php	2010-03-16 20:50:30 UTC (rev 5795)
+++ trunk/mapbender/http/php/mod_wfs.php	2010-03-17 09:15:33 UTC (rev 5796)
@@ -26,6 +26,9 @@
 <title>mod_wfs</title>
 <script language='JavaScript' type='text/javascript'>
 var wfs_conf = new Array();
+var id = "<?php echo $_GET["id"];?>";
+var reloaded = "<?php echo $_GET["reloaded"];?>";
+var idIsEmpty = "<?php echo $_GET["idIsEmpty"];?>";
 /*
 function register(){
 	var isReg = false;
@@ -39,13 +42,37 @@
 	}
 }
 */
+
+var mapbenderInit = function () {
+	if (id === "") {
+		if (reloaded === "") {
+			try {
+				parent.Mapbender.modules.loadwmc.events.loaded.register(function (obj) {
+					// http://hosting.wheregroup.com/vattenfall_b/php/mod_wfs.php?e_id_css=wfs_conf&e_id=wfs_conf&e_target=&PHPSESSID=f6150b2e8ab19af11be6033a792dd039&guiID=WebGIS-W&elementID=wfs_conf
+		
+					document.location.href = "../php/mod_wfs.php?e_id_css=wfs_conf" + 
+						"&e_id=wfs_conf&elementID=wfs_conf&reloaded=1&" + 
+						"guiID=<?php echo Mapbender::session()->get("mb_user_gui");?>&" +
+						parent.Mapbender.sessionName + "=" + parent.Mapbender.sessionId;
+				});
+			}
+			catch (exc) {
+				new parent.Mapbender.Notice(exc);
+			}
+		}
+		fetchInf();
+	}
+};
+
 function register() {
-	var functionStatement = window.name+".fetchInf()";
-	
-	if(!parent.eventInit.isRegistered(functionStatement)){
-		parent.mb_registerInitFunctions(functionStatement);
+	if (parent.Mapbender.events.init.done === true) {
+		mapbenderInit();
 	}
+	else {
+		parent.Mapbender.events.init.register(mapbenderInit);
+	}
 }
+
 function fetchInf(){
 	var wfs = new Array();
 	var l;
@@ -58,7 +85,10 @@
 			}
 		}	
 	}	
-	document.location.href = "../php/mod_wfs.php?id=" + wfs.join(",");
+	
+	if (idIsEmpty === "") {
+		document.location.href = "../php/mod_wfs.php?id=" + wfs.join(",") + "&idIsEmpty=1";
+	}	
 }
 function get_wfs_conf(){
 	return wfs_conf;



More information about the Mapbender_commits mailing list