[Mapbender-commits] r5483 - branches/2.6/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Feb 4 06:52:15 EST 2010
Author: astrid_emde
Date: 2010-02-04 06:52:11 -0500 (Thu, 04 Feb 2010)
New Revision: 5483
Modified:
branches/2.6/http/javascripts/mod_digitize_tab.php
Log:
The field entries of selected features are not displayed correctly when you use selectboxes (the selected entry is not selected)
http://trac.osgeo.org/mapbender/ticket/591
Modified: branches/2.6/http/javascripts/mod_digitize_tab.php
===================================================================
--- branches/2.6/http/javascripts/mod_digitize_tab.php 2010-02-04 09:44:08 UTC (rev 5482)
+++ branches/2.6/http/javascripts/mod_digitize_tab.php 2010-02-04 11:52:11 UTC (rev 5483)
@@ -1694,18 +1694,18 @@
else {
while (formElementHtml.match(/\\/)) {
formElementHtml = formElementHtml.replace(/\\/, "");
+
}
+ formElementHtml = formElementHtml.replace(/</g,'<');
+ formElementHtml = formElementHtml.replace(/>/g,'>');
+ formElementHtml = formElementHtml.replace(/'/g,'\'');
str += "\t\t\t\t<input id = 'datatype_" + elementName + "' name='datatype' type='hidden' value = '" + elementType + "'>\n";
str += "\t\t\t\t<input id = 'mandatory_" + elementName + "' name='mandatory' type='hidden' value = '" + isMandatory + "'>\n";
// preselect the correct entry of the box
- var patternString = "option value( )*=( )*'"+elementValue+"'";
+ var patternString = "option( )+value( )*=( )*('|\")"+elementValue+"('|\")";
var pattern = new RegExp(patternString);
var patternStringForReplace = "option value = '"+elementValue+"'";
formElementHtml = formElementHtml.replace(pattern, patternStringForReplace+" selected");
- formElementHtml = formElementHtml.replace(/</g,'<');
- formElementHtml = formElementHtml.replace(/>/g,'>');
- formElementHtml = formElementHtml.replace(/'/g,'\'');
-
str += formElementHtml;
}
str += "\t\t\t</td>\n\t\t</tr>\n";
More information about the Mapbender_commits
mailing list