From dd9a409b3a80cbe56daabfc79d36e23afe0eff1b Mon Sep 17 00:00:00 2001 From: Luc Donnet Date: Wed, 29 Oct 2014 12:36:13 +0100 Subject: Fix timepicker use when no HTML5 possible Refs #0029395 --- .../plugins/bootstrap_timepicker_activation.coffee | 23 +++++++++------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'app/assets/javascripts/plugins') diff --git a/app/assets/javascripts/plugins/bootstrap_timepicker_activation.coffee b/app/assets/javascripts/plugins/bootstrap_timepicker_activation.coffee index 9945022bc..1c40ebdb5 100644 --- a/app/assets/javascripts/plugins/bootstrap_timepicker_activation.coffee +++ b/app/assets/javascripts/plugins/bootstrap_timepicker_activation.coffee @@ -1,16 +1,11 @@ jQuery -> if(!(Modernizr.inputtypes && Modernizr.inputtypes.time)) - $('.timepicker_basic').timepicker( - template: false, - showInputs: false, - minuteStep: 1, - showMeridian: false, - ) - $('.timepicker_seconds').timepicker( - template: false, - showInputs: false, - minuteStep: 1, - secondStep: 1, - showMeridian: false, - showSeconds: true - ) \ No newline at end of file + $('.timepicker_basic').datetimepicker({ + pickDate: false, + language: $(".dropdown.languages > a > img").attr("data-locale") || 'en', + }) + $('.timepicker_seconds').datetimepicker({ + pickDate: false, + language: $(".dropdown.languages > a > img").attr("data-locale") || 'en', + useSeconds: true, + }) \ No newline at end of file -- cgit v1.2.3