[Mapbender-commits] r3504 - branches/2.5/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Jan 29 09:42:55 EST 2009


Author: christoph
Date: 2009-01-29 09:42:55 -0500 (Thu, 29 Jan 2009)
New Revision: 3504

Modified:
   branches/2.5/http/javascripts/mod_digitize_tab.php
Log:
http://trac.osgeo.org/mapbender/ticket/356

Modified: branches/2.5/http/javascripts/mod_digitize_tab.php
===================================================================
--- branches/2.5/http/javascripts/mod_digitize_tab.php	2009-01-29 14:38:17 UTC (rev 3503)
+++ branches/2.5/http/javascripts/mod_digitize_tab.php	2009-01-29 14:42:55 UTC (rev 3504)
@@ -948,7 +948,7 @@
 				listOfGeom += "\t\t</td>\n\t\t<td>\n";
 					
 				// button: remove geometry from database
-				if (isValidWfsConfIndex(wfsConf, d.get(i).wfs_conf)) {
+				if (d.get(i).e.getElementValueByName('fid')) { 
 					listOfGeom += "\t\t\t<img src = '"+buttonDig_imgdir+buttonDig_removeDb_src+"' title='"+msgObj.buttonDig_removeDb_title+"' onclick=\"var deltrans = confirm('"+msgObj.messageConfirmDeleteGeomFromDb+"');if (deltrans) dbGeom('delete', "+i+")\">\n";
 				}
 				listOfGeom += "\t\t</td>\n\t\t<td style = 'color:blue;font-size:12px'>\n";
@@ -1393,7 +1393,12 @@
 			for (var i=0; i<myform.length; i++){
 				if (myform.elements[i].id == "fid") {
 					fid = myform.elements[i].value;
-					d.get(m).e.setElement('fid', fid);
+					if (fid == "false") {
+						fid = false;					
+					}
+					else {
+						d.get(m).e.setElement('fid', fid);
+					}
 				}
 				else if (myform.elements[i].type == 'text' ){
 					if (myform.elements[i].id) {
@@ -1429,22 +1434,23 @@
 }
 
 function wfsSubWrite(m, type, status, response, fid) {
-	if (type == 'save' && fid) {
-		d.get(m).e.setElement("fid", fid);
-	}
-	if (type == 'delete') {
-		parent.mb_disableThisButton(mod_digitizeEvent);
-		d.del(m);
-	}
-	parent.mb_execWfsWriteSubFunctions();
-	executeDigitizeSubFunctions();
-	
 	if (status == "success" && response == "success") {
+		if (type == 'save' && fid) {
+			d.get(m).e.setElement("fid", fid);
+		}
+		if (type == 'delete') {
+			parent.mb_disableThisButton(mod_digitizeEvent);
+			d.del(m);
+		}
+
 		var wfsWriteMessage = msgObj.messageSuccessWfsWrite;
 	}
 	else {
 		var wfsWriteMessage = msgObj.messageErrorWfsWrite;
 	} 
+	parent.mb_execWfsWriteSubFunctions();
+	executeDigitizeSubFunctions();
+	
 
 	if (typeof(wfsWindow) != 'undefined' && !wfsWindow.closed) {
 		wfsWindow.alert(wfsWriteMessage);



More information about the Mapbender_commits mailing list