Commit Graph

23 Commits

Author SHA1 Message Date
Jean-Baptiste Bellet
fb0d922d73 Remove datetimepicker directive + default values 2022-10-08 16:36:26 +02:00
Thierry Jet
5ebee9cd5f Translation stuff ready for Close button. Add close: key scoped spree.admin.date_picker in en.yml 2021-10-26 19:38:49 +02:00
Thierry Jet
47e9692226 Add a close button to datepicker. Close the popover when clicked. Not yet using translation 2021-10-26 14:36:16 +02:00
Thierry Jet
c45e120ff8 Add a close button to datetimepicker. Close the popover when clicked. Not yet using translation 2021-10-26 14:33:02 +02:00
Jean-Baptiste Bellet
f39cc49cd2 Create a base_locale attribute onto I18n object
- if "fr": return "fr"
 - if "fr_FR": return "fr"
2021-07-23 14:14:20 +02:00
Jean-Baptiste Bellet
2a504f7359 Add a flatpickr plugin to attach 'id' attribute to input element
- As we use `altInput`, the original input is hidden. This plugin forward the `id` attribute of the original input to the input created on-the-fly and used by end user.
2021-02-19 14:59:13 +01:00
Jean-Baptiste Bellet
c9cf989b27 Introduce altInput for flatpickr date(time)picker
- altInput is used to display the date to the end user: this field must be i18nized
 - dateFormat is the date format used through the front and the backend
2021-02-19 11:16:43 +01:00
Jean-Baptiste Bellet
6dbaf1f7f3 specify date and datetime format 2021-02-08 22:09:06 +01:00
Jean-Baptiste Bellet
11d62eb331 add translation for "today" and "now" buttons
and remove useless translations
2021-02-08 22:09:06 +01:00
Jean-Baptiste Bellet
84b402675a force onChange events to fire
And so the "You have unsaved changes" bar appears
2021-02-08 22:09:06 +01:00
Jean-Baptiste Bellet
079008d99b introduce "Now" button
Throught the plugin: https://github.com/jcsmorais/shortcut-buttons-flatpickr
import js library via yarn
2021-02-08 22:09:06 +01:00
Jean-Baptiste Bellet
e06ea6ccd3 remove unused options
as we use flatpickr, we don't need these options
2021-02-08 22:09:06 +01:00
Jean-Baptiste Bellet
4f7f8b559a localize flatpickr date format
Flatpickr can format date. Use a localized dateFormat.
2021-02-08 22:09:06 +01:00
Jean-Baptiste Bellet
6cf172abc9 add flatpickr to order cycle and .datetimepicker
Add your new date(time)picker on both order cycle and elements with class `.datetimepicker`
set the right options to datetimepicker
2021-02-08 22:09:06 +01:00
andresgutgon
d1331ac78a Fix datetime picker translations on Order cycles screen
So the thing is we initialize jQuery plugin on `admin/util.js.erb` but
then we override those defaults on order_cycles.js.erb.coffe. Now both
plugin initializations use the same defaults. Also added 3 missing
translations for `Done`, `Now` and `Time` copies on that timepicker popover
2020-09-06 13:43:35 +02:00
luisramos0
c1e6344b18 Merge spree js function and override 2020-02-04 14:46:57 +00:00
François Turbelin
ab86332949 Tune up config and style 2019-02-25 22:22:27 +01:00
Matt-Yorkley
f28471e456 Fixed datepicker button intermittent failure 2018-02-07 17:48:16 +11:00
Rohan Mitchell
f33df883a0 Fix link_to_remove_fields - does not immediately delete the field 2016-11-04 09:39:17 +11:00
Rob Harrington
a810fc88ac Dedicated new enterprise form 2014-12-19 14:05:24 +11:00
Will Marshall
0ac9bfd898 Moving our fix for the broken Spree function into our own JS 2013-11-29 14:24:56 +11:00
Rohan Mitchell
ac66bf4871 Add client-side validation to order cycle form 2012-11-29 10:40:19 +11:00
Rohan Mitchell
64d4e405dd Add datetimepicker for order cycle opening and closing times 2012-11-29 10:25:33 +11:00