[Mapbender-commits] r7756 - branches/metador/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Apr 7 03:35:35 EDT 2011
Author: apour
Date: 2011-04-07 00:35:35 -0700 (Thu, 07 Apr 2011)
New Revision: 7756
Modified:
branches/metador/http/javascripts/jq_validate.js
Log:
bugfix - validator dont have messages_en.js
Modified: branches/metador/http/javascripts/jq_validate.js
===================================================================
--- branches/metador/http/javascripts/jq_validate.js 2011-04-07 07:16:54 UTC (rev 7755)
+++ branches/metador/http/javascripts/jq_validate.js 2011-04-07 07:35:35 UTC (rev 7756)
@@ -6,15 +6,18 @@
// use english as fallback
jQuery.extend(jQuery.validator.messages, originalMessages);
- // overwrite existing message with localized
- $.ajaxSetup.async = false;
- var url = "../extensions/jquery-validate/localization/" +
- "messages_" + Mapbender.locale.substr(0, 2) + ".js";
- $.get(url , function (js) {
- if (js) {
- eval(js);
- }
- });
+ // WE DONT HAVE messages_en.js
+ if(Mapbender.locale.substr(0, 2) != "en") {
+ // overwrite existing message with localized
+ $.ajaxSetup.async = false;
+ var url = "../extensions/jquery-validate/localization/" + "messages_" + Mapbender.locale.substr(0, 2) + ".js";
+ $.get(url , function (js) {
+ if (js) {
+ eval(js);
+ }
+ });
+ }
+
$.ajaxSetup.async = true;
});
More information about the Mapbender_commits
mailing list