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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Jul 26 10:04:12 EDT 2010


Author: verenadiewald
Date: 2010-07-26 14:04:12 +0000 (Mon, 26 Jul 2010)
New Revision: 6641

Modified:
   trunk/mapbender/http/javascripts/mod_digitize_tab.php
Log:
new var dataCheck for mb_checkDigitizeDataDialog

Modified: trunk/mapbender/http/javascripts/mod_digitize_tab.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_digitize_tab.php	2010-07-26 13:56:48 UTC (rev 6640)
+++ trunk/mapbender/http/javascripts/mod_digitize_tab.php	2010-07-26 14:04:12 UTC (rev 6641)
@@ -289,6 +289,8 @@
 
 	parent.Mapbender.modules[mod_digitize_elName].cancelAjaxRequest = false;
 	parent.Mapbender.modules[mod_digitize_elName].cancelAjaxRequestMessage = "An error occured.";
+
+	parent.Mapbender.modules[mod_digitize_elName].dataCheck = false;
 };
 
 
@@ -2787,8 +2789,10 @@
 		if (type === "insert" || type === "update") {
 			var module = parent.Mapbender.modules[mod_digitize_elName]; 
 			module.events.beforeUpdateOrInsert.trigger({
+				wfsConf: myconf,
 				geometryIndex: m,
-				feature: d.get(m)
+				feature: d.get(m),
+				'method' : type
 			});
 			if (type === "insert") {
 				module.events.beforeInsert.trigger({
@@ -2802,6 +2806,12 @@
 					feature: d.get(m)
 				});
 			}
+
+			// can be set to true from outside to stop save action
+			// default is false, so nothing happens here
+			if (module.dataCheck) {
+				return;
+			}
 			
 			if (module.cancelAjaxRequest) {
 				alert(module.cancelAjaxRequestMessage);



More information about the Mapbender_commits mailing list