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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Jan 24 09:08:17 EST 2007


Author: christoph
Date: 2007-01-24 09:08:17 -0500 (Wed, 24 Jan 2007)
New Revision: 1037

Modified:
   trunk/mapbender/http/javascripts/mod_digitize_tab.php
Log:
removed  f_edit, f_form_element and f_mandatory temporarily
fixed bug: fid got lost during update/save

Modified: trunk/mapbender/http/javascripts/mod_digitize_tab.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_digitize_tab.php	2007-01-24 14:07:18 UTC (rev 1036)
+++ trunk/mapbender/http/javascripts/mod_digitize_tab.php	2007-01-24 14:08:17 UTC (rev 1037)
@@ -672,7 +672,8 @@
 					wfsElementName = c['f_label']; 
 				}
 				
-				if (parseInt(c['f_geom']) != 1 && parseInt(c['f_edit']) == 1) {
+//				if (parseInt(c['f_geom']) != 1 && parseInt(c['f_edit']) == 1) {
+				if (parseInt(c['f_geom']) != 1) {
 					str += "\t\t<tr>\n";
 					str += "\t\t\t<td>\n\t\t\t\t" + wfsElementName + "\n\t\t\t</td>\n";
 					str += "\t\t\t<td colspan = 2>\n";
@@ -689,12 +690,17 @@
 						str += "\t\t\t\t<input name='" + wfsElementName + "' type='text' size=20 value = '" + elementValue + "'>\n";
 					}
 					else {
+/*
+//						alert(elementValue);
 						var formElementHtml = c['f_form_element_html']; 
+//						alert(formElementHtml);
 						// preselect the correct entry of the box
-						var patternString = "option value='"+elementValue+"'";
+						var patternString = "option value=\\\'"+elementValue+"\\\'";
 						var pattern = new RegExp(patternString);
 						formElementHtml = formElementHtml.replace(pattern, patternString+" selected");
+//						alert(formElementHtml);
 						str += formElementHtml;
+*/
 					}
 					str += "\t\t\t</td>\n";
 					str += "\t\t</tr>\n";
@@ -709,7 +715,6 @@
 					str += "\t\t\t<td><input type='button' name='saveButton' value='Save' onclick=\"if (window.opener.formCorrect(document.getElementById('wfs_conf'))){window.opener.dbGeom('save', "+selMember+")}else{alert('Bitte treffen Sie eine Auswahl.');};\" /></td>\n";
 				}
 				else colspan++;
-
 				if (parseInt(memberIndex) != -1 && fid) {
 					if (geom) {
 						str += "\t\t\t<td><input type='button' name='updateButton' value='Update' onclick=\"if (window.opener.formCorrect(document.getElementById('wfs_conf'))){window.opener.dbGeom('update', "+selMember+")}else{alert('Bitte treffen Sie eine Auswahl.');};\"/></td>\n";
@@ -737,6 +742,7 @@
 function formCorrect(form) {
 	isCorrect = true;
 	isCorrect = isCorrect && validBoxEntrySelected(form);
+	return isCorrect;
 }
 
 function validBoxEntrySelected(form){
@@ -837,6 +843,7 @@
 			for (var i=0; i<myform.length; i++){
 				if (myform.elements[i].name == "fid") {
 					fid = myform.elements[i].value;
+					d.get(m).e.setElement('fid', fid);
 				}
 				else if (myform.elements[i].type == 'text' ){
 					d.get(m).e.setElement(myform.elements[i].name, myform.elements[i].value);



More information about the Mapbender_commits mailing list