details: /erp/devel/pi/rev/fe902e8d37f1
changeset: 9120:fe902e8d37f1
user: Asier Lostalé <asier.lostale <at> openbravo.com>
date: Tue Dec 14 13:25:28 2010 +0100
summary: fixed bug 14881: Calendar always appear in english
diffstat:
src-wad/src/org/openbravo/wad/controls/WADDate.java | 6 +---
src-wad/src/org/openbravo/wad/controls/WADDateTime.java | 6 +---
web/js/jscalendar/lang/calendar-lang.js | 25 +++++++++++++++++
3 files changed, 27 insertions(+), 10 deletions(-)
diffs (62 lines):
diff -r a9c5acbbec74 -r fe902e8d37f1
src-wad/src/org/openbravo/wad/controls/WADDate.java
--- a/src-wad/src/org/openbravo/wad/controls/WADDate.java Tue Dec 14
12:41:46 2010 +0100
+++ b/src-wad/src/org/openbravo/wad/controls/WADDate.java Tue Dec 14
13:25:28 2010 +0100
@@ -46,11 +46,7 @@
private void generateJSCode() {
addImport("DateTextBox", "../../../../../web/js/default/DateTextBox.js");
addImport("calendar", "../../../../../web/js/jscalendar/calendar.js");
- if (!getData("AD_Language").equals(""))
- addImport("calendarLang",
"../../../../../web/js/jscalendar/lang/calendar-"
- + getData("AD_Language").substring(0, 2) + ".js");
- else
- addImport("calendarLang",
"../../../../../web/js/jscalendar/lang/calendar-en.js");
+ addImport("calendarLang",
"../../../../../web/js/jscalendar/lang/calendar-lang.js");
generateValidation();
setCalloutJS();
}
diff -r a9c5acbbec74 -r fe902e8d37f1
src-wad/src/org/openbravo/wad/controls/WADDateTime.java
--- a/src-wad/src/org/openbravo/wad/controls/WADDateTime.java Tue Dec 14
12:41:46 2010 +0100
+++ b/src-wad/src/org/openbravo/wad/controls/WADDateTime.java Tue Dec 14
13:25:28 2010 +0100
@@ -46,11 +46,7 @@
private void generateJSCode() {
addImport("DateTextBox", "../../../../../web/js/default/DateTextBox.js");
addImport("calendar", "../../../../../web/js/jscalendar/calendar.js");
- if (!getData("AD_Language").equals(""))
- addImport("calendarLang",
"../../../../../web/js/jscalendar/lang/calendar-"
- + getData("AD_Language").substring(0, 2) + ".js");
- else
- addImport("calendarLang",
"../../../../../web/js/jscalendar/lang/calendar-en.js");
+ addImport("calendarLang",
"../../../../../web/js/jscalendar/lang/calendar-lang.js");
generateValidation();
setCalloutJS();
}
diff -r a9c5acbbec74 -r fe902e8d37f1 web/js/jscalendar/lang/calendar-lang.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/web/js/jscalendar/lang/calendar-lang.js Tue Dec 14 13:25:28 2010 +0100
@@ -0,0 +1,25 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo Public License
+ * Version 1.1 (the "License"), being the Mozilla Public License
+ * Version 1.1 with a permitted attribution clause; you may not use this
+ * file except in compliance with the License. You may obtain a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License is distributed on an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2010 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s): ______________________________________.
+ ************************************************************************
+*/
+
+
+// Import calendar based on the language in use.
+// Note this works only for the calendars included within jscalendar/lang
directory
+
+var lang = defaultLang.substring(0,2);
+document.write('<s'+'cript
src="../../web/js/jscalendar/lang/calendar-'+lang+'.js"
type="text/javascript"><\/scrip'+'t>');
\ No newline at end of file
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits