[Mapbender-commits] r6409 - branches/2.6/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Jun 23 04:17:56 EDT 2010


Author: christoph
Date: 2010-06-23 08:17:56 +0000 (Wed, 23 Jun 2010)
New Revision: 6409

Modified:
   branches/2.6/http/javascripts/mod_digitize_tab.php
Log:
http://trac.osgeo.org/mapbender/ticket/647

Modified: branches/2.6/http/javascripts/mod_digitize_tab.php
===================================================================
--- branches/2.6/http/javascripts/mod_digitize_tab.php	2010-06-22 15:08:18 UTC (rev 6408)
+++ branches/2.6/http/javascripts/mod_digitize_tab.php	2010-06-23 08:17:56 UTC (rev 6409)
@@ -2099,7 +2099,17 @@
 				else if (myform.elements[i].type == 'text' ){
 					if (myform.elements[i].id) {
 						var elementId = String(myform.elements[i].id).replace(/mb_digitize_form_/, "");
-						d.get(m).e.setElement(elementId, myform.elements[i].value);
+						
+						var $dataTypeNode =  $(myform.elements[i]).prev("input");
+						// if featuretype element is numeric, do not send empty fields
+						if ($dataTypeNode.size() === 1 && -1 !== $.inArray($dataTypeNode.attr("value"), ["int", "double", "float"])) {
+							if (myform.elements[i].value !== "") {
+								d.get(m).e.setElement(elementId, myform.elements[i].value);
+							}
+						}
+						else {
+							d.get(m).e.setElement(elementId, myform.elements[i].value);
+						}
 					}
 					else {
 						errorMessage = msgObj.messageErrorFormEvaluation;



More information about the Mapbender_commits mailing list