diff options
author | Marc Schumann <wurblzap@gmail.com> | 2012-05-18 14:09:05 +0200 |
---|---|---|
committer | Marc Schumann <wurblzap@gmail.com> | 2012-05-18 14:09:05 +0200 |
commit | 7298d3241bea1272ba316c437007d9c07c4ed8b4 (patch) | |
tree | 9fffa7925ed8e6d20869c495d0a3b95c490db48b /js | |
parent | d3a92bd63e702f066685ea03dec649c08e0ff6b2 (diff) | |
download | bugzilla-7298d3241bea1272ba316c437007d9c07c4ed8b4.tar.gz bugzilla-7298d3241bea1272ba316c437007d9c07c4ed8b4.tar.xz |
The calendar widget is not localizable.
r/a=LpSolit
https://bugzilla.mozilla.org/show_bug.cgi?id=581365
Diffstat (limited to 'js')
-rw-r--r-- | js/field.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/js/field.js b/js/field.js index 0824e2714..4150f8ce4 100644 --- a/js/field.js +++ b/js/field.js @@ -83,9 +83,17 @@ function _errorFor(field, name) { YAHOO.util.Dom.addClass(field, 'validation_error_field'); } -function createCalendar(name) { +/* This function is never to be called directly, but only indirectly + * using template/en/default/global/calendar.js.tmpl, so that localization + * works. For the same reason, if you modify this function's parameter list, + * you need to modify the documentation in said template as well. */ +function createCalendar(name, start_weekday, months_long, weekdays_short) { var cal = new YAHOO.widget.Calendar('calendar_' + name, - 'con_calendar_' + name); + 'con_calendar_' + name, + { START_WEEKDAY: start_weekday, + MONTHS_LONG: months_long, + WEEKDAYS_SHORT: weekdays_short + }); YAHOO.bugzilla['calendar_' + name] = cal; var field = document.getElementById(name); cal.selectEvent.subscribe(setFieldFromCalendar, field, false); |