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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Feb 4 04:25:54 EST 2009


Author: verenadiewald
Date: 2009-02-04 04:25:52 -0500 (Wed, 04 Feb 2009)
New Revision: 3513

Modified:
   branches/2.5/http/javascripts/mod_digitize_tab.php
Log:
check for whitespaces in formElementHtml for select boxes

Modified: branches/2.5/http/javascripts/mod_digitize_tab.php
===================================================================
--- branches/2.5/http/javascripts/mod_digitize_tab.php	2009-02-03 15:52:15 UTC (rev 3512)
+++ branches/2.5/http/javascripts/mod_digitize_tab.php	2009-02-04 09:25:52 UTC (rev 3513)
@@ -1305,12 +1305,11 @@
 							while (formElementHtml.match(/\\/)) {
 								formElementHtml = formElementHtml.replace(/\\/, "");
 							} 
-//							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);
+							var patternStringForReplace = "option value = '"+elementValue+"'";
+							formElementHtml = formElementHtml.replace(pattern, patternStringForReplace+" selected");
 							str += formElementHtml;
 					}
 					str += "\t\t\t</td>\n\t\t</tr>\n";



More information about the Mapbender_commits mailing list