[Mapbender-commits] r5762 - trunk/mapbender/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Sun Mar 14 11:04:42 EDT 2010


Author: verenadiewald
Date: 2010-03-14 11:04:42 -0400 (Sun, 14 Mar 2010)
New Revision: 5762

Modified:
   trunk/mapbender/http/javascripts/mod_wfs_gazetteer_client.php
Log:
removed old popup stuff

Modified: trunk/mapbender/http/javascripts/mod_wfs_gazetteer_client.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_wfs_gazetteer_client.php	2010-03-14 15:04:00 UTC (rev 5761)
+++ trunk/mapbender/http/javascripts/mod_wfs_gazetteer_client.php	2010-03-14 15:04:42 UTC (rev 5762)
@@ -56,10 +56,6 @@
  * > 'geometry.js,requestGeometryConstructor.js,popup.js,../extensions/wz_jsgraphics.js',
  * > 'mapframe1,overview','','http://www.mapbender.org/GazetteerWFS');
  * >
- * > INSERT INTO gui_element_vars (fkey_gui_id, fkey_e_id, var_name, 
- * > var_value, context, var_type) VALUES('<appId>', 'gazetteerWFS', 
- * > 'maxHighlightedPoints', '500', 'max number of points to highlight',
- * > 'var');
  * >
  * > INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, 
  * > var_value, context, var_type) VALUES ('<appId>', 'gazetteerWFS', 
@@ -89,7 +85,6 @@
  * http://www.mapbender.org/User:Verena_Diewald
  * 
  * Parameters:
- * maxHighlightedPoints	- max number of points to highlight
  * wfsConfIdString - comma seperated list of WFS conf ids
  * wfs_spatial_request_conf_filename - location and name of the WFS 
  * 			configuration file for spatialRequest
@@ -114,20 +109,6 @@
 	echo "var e_id_css = '" . $e_id_css . "';";
 ?>
 
-// Element var maxHighlightedPoints
-try{
-	if (maxHighlightedPoints){
-		maxHighlightedPoints = Number(maxHighlightedPoints);
-
-		if (isNaN(maxHighlightedPoints)) {
-//			var e = new parent.Mb_warning("mod_wfs_gazetteer_client.php: Element var maxHighlightedPoints must be a number.");
-		}
-	}
-}
-catch(e){
-	maxHighlightedPoints = 0;
-//	var e = new parent.Mb_warning("mod_wfs_gazetteer_client.php: Element var maxHighlightedPoints is not set, see 'edit element vars'.");
-}
 // Element var showResultInPopup
 try {if(showResultInPopup){}}catch(e) {showResultInPopup = 1;}
 
@@ -588,7 +569,6 @@
 		var currentNode = document.getElementById(currentId);
 		removeChildNodes(currentNode);
 	}
-
 }
 
 function reapplyWFSConfObject(json,status)
@@ -711,12 +691,11 @@
 		selectNode.onchange = function() {
 			global_selectedWfsConfId = this.value;
 			initializeOnLoad = 0;
-	     	if(typeof(resultGeometryPopup)!="undefined"){
-		 		resultGeometryPopup.destroy();
-		 	}
-		 	if(typeof(wfsPopup)!="undefined"){
-		 		wfsPopup.destroy();
-		 	}
+
+			//close old dialogs 
+			parent.$('.resultList').dialog('close');
+			parent.$('.infoPopup').dialog('close');
+
 	    	appendStyles();
 			appendWfsForm();
 			parent.Mapbender.modules.gazetteerWFS.events.onWfsConfSelect.trigger({
@@ -725,7 +704,7 @@
 		};
 	}
 	else{
-	   selectNode.setAttribute("onchange", "if(typeof(resultGeometryPopup)!='undefined'){resultGeometryPopup.destroy();}if(typeof(wfsPopup)!='undefined'){wfsPopup.destroy();};global_selectedWfsConfId = this.value;initializeOnLoad=0;appendStyles();appendWfsForm();parent.Mapbender.modules.gazetteerWFS.events.onWfsConfSelect.trigger({wfsConfId: global_selectedWfsConfId});");
+	   selectNode.setAttribute("onchange", "parent.$('.resultList').dialog('close');parent.$('.infoPopup').dialog('close');global_selectedWfsConfId = this.value;initializeOnLoad=0;appendStyles();appendWfsForm();parent.Mapbender.modules.gazetteerWFS.events.onWfsConfSelect.trigger({wfsConfId: global_selectedWfsConfId});");
 	}
 	var isSelected = false;
 	for (var wfsConfId in global_wfsConfObj) {
@@ -891,14 +870,9 @@
  		document.getElementById("spatialResHint").innerHTML = "";
  	}
 		
-	//remove result popup
-	if(typeof(resultGeometryPopup)!="undefined"){
- 		resultGeometryPopup.destroy();
- 	}
- 	//remove detail popup
- 	if(typeof(wfsPopup)!="undefined"){
- 		wfsPopup.destroy();
- 	}
+	//close old dialogs 
+	parent.$('.resultList').dialog('close');
+	parent.$('.infoPopup').dialog('close');
 	
  	if(document.getElementById('spatialResHint')){
  		document.getElementById("spatialResHint").innerHTML = "";
@@ -963,14 +937,10 @@
 	if(geomArray.count()>0){
  		geomArray.empty();
  	}
- 	if(typeof(resultGeometryPopup)!="undefined"){
- 		resultGeometryPopup.destroy();
- 	}
- 	if(typeof(wfsPopup)!="undefined"){
- 		wfsPopup.destroy();
- 	}
-	global_resultHighlight = new parent.Highlight(targetArray, "wfs_gazetteer_highlight", {"position":"absolute", "top":"0px", "left":"0px", "z-index":generalHighlightZIndex}, generalHighlightLineWidth);
-
+	//close old dialogs 
+	parent.$('.resultList').dialog('close');
+	parent.$('.infoPopup').dialog('close');
+	
 	var filterParameterCount = getNumberOfFilterParameters();
 	
 	if(filterParameterCount == 0 && spatialRequestGeom == null && initializeOnLoad != 1){



More information about the Mapbender_commits mailing list