Bug 25133: (follow-up) Move changes to timepicker.inc

Witht the changes in calendar.inc there can be a js error where the timepicker is not
included. Moving the changes to timepicker.inc should resolve this

Note: in previous patches the amnames/pmnames were removed. It is possible they had
no effect because they were declared in two files, so I have left them in timepicker.inc

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Nick Clemens 2020-05-04 11:33:11 +00:00 committed by Martin Renvoize
parent 164b8127e7
commit a6985d167e
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F
2 changed files with 1 additions and 4 deletions

View file

@ -123,10 +123,6 @@ jQuery(function($){
showMonthAfterYear: false, showMonthAfterYear: false,
yearSuffix: ''}; yearSuffix: ''};
$.datepicker.setDefaults($.datepicker.regional['']); $.datepicker.setDefaults($.datepicker.regional['']);
$.timepicker.regional[''] = {
timeFormat: "[% IF Koha.Preference('TimeFormat') == '12hr' %]hh:mm TT[% ELSE %]HH:mm[% END %]",
};
$.timepicker.setDefaults($.timepicker.regional['']);
}); });
/* jQuery Validator plugin custom method /* jQuery Validator plugin custom method

View file

@ -3,6 +3,7 @@
/* Localization of the timepicker plugin */ /* Localization of the timepicker plugin */
jQuery(function($){ jQuery(function($){
$.timepicker.regional[''] = { $.timepicker.regional[''] = {
timeFormat: "[% IF Koha.Preference('TimeFormat') == '12hr' %]hh:mm TT[% ELSE %]HH:mm[% END %]",
currentText: _("Now"), currentText: _("Now"),
closeText: _("Done"), closeText: _("Done"),
amNames: [_("AM"), _("A")], amNames: [_("AM"), _("A")],