diff options
| author | Luc Donnet | 2014-10-29 12:36:13 +0100 |
|---|---|---|
| committer | Luc Donnet | 2014-10-29 12:36:13 +0100 |
| commit | dd9a409b3a80cbe56daabfc79d36e23afe0eff1b (patch) | |
| tree | ad3503a57d59b9ee2e77938cc1973a30d2041742 /app/assets/javascripts | |
| parent | 98445231394822dc0576b9b10a6d39c00bae71fb (diff) | |
| download | chouette-core-dd9a409b3a80cbe56daabfc79d36e23afe0eff1b.tar.bz2 | |
Fix timepicker use when no HTML5 possible Refs #0029395
Diffstat (limited to 'app/assets/javascripts')
| -rw-r--r-- | app/assets/javascripts/application.js | 4 | ||||
| -rw-r--r-- | app/assets/javascripts/plugins/bootstrap_timepicker_activation.coffee | 23 |
2 files changed, 12 insertions, 15 deletions
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index ed6e05c4c..01142c849 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -13,7 +13,9 @@ //= require morris //= require bootstrap-sass-official //= require typeahead.js -//= require bootstrap-timepicker +//= require moment +//= require moment/locale/fr +//= require eonasdan-bootstrap-datetimepicker //= require tagmanager //= require_directory ./plugins //= require_directory . 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 |
