diff options
author | silverwind <me@silverwind.io> | 2020-03-17 20:08:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-17 15:08:15 -0400 |
commit | 85fb33a65ffa9d5f0c073a01fcb5a7ef1b7311a4 (patch) | |
tree | 336f0d1af2a5ab1180d84f23c1ca58351d69222c /web_src/js/features | |
parent | 43c09134a972dc421aa06fb303697671c828cf67 (diff) | |
download | gitea-85fb33a65ffa9d5f0c073a01fcb5a7ef1b7311a4.tar.gz gitea-85fb33a65ffa9d5f0c073a01fcb5a7ef1b7311a4.zip |
move jquery-datetimepicker to npm/webpack (#10713)
- update to latest version and move to npm
- adapt for api changes and css class rename
- add specificity to arc-green rules as dependency css now loads later
- use imports-loader to make it load correctly
- fix some wrong paths in librejs
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'web_src/js/features')
-rw-r--r-- | web_src/js/features/datetimepicker.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/web_src/js/features/datetimepicker.js b/web_src/js/features/datetimepicker.js new file mode 100644 index 0000000000..fb9a75a57a --- /dev/null +++ b/web_src/js/features/datetimepicker.js @@ -0,0 +1,8 @@ +export default async function initDateTimePicker(locale) { + await Promise.all([ + import(/* webpackChunkName: "datetimepicker" */'jquery-datetimepicker'), + import(/* webpackChunkName: "datetimepicker" */'jquery-datetimepicker/build/jquery.datetimepicker.min.css'), + ]); + + $.datetimepicker.setLocale(locale); +} |