Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix datetimepicker's files handling #980

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions core/constant_inc.php
Expand Up @@ -619,7 +619,9 @@

# Moment & DateTimePicker
define( 'MOMENT_VERSION', '2.15.2' );
define( 'MOMENT_HASH', 'sha256-K+AZsAFjiBd4piqBmFzaxDsiQiHfREubm1ExNGW1JIA=' );
define( 'DATETIME_PICKER_VERSION', '4.17.43' );
define( 'DATETIME_PICKER_HASH', 'sha256-I8vGZkA2jL0PptxyJBvewDVqNXcgIhcgeqi+GD/aw34=' );

# Chart JS
define( 'CHARTJS_VERSION', '2.1.6' );
Expand Down
1 change: 1 addition & 0 deletions core/http_api.php
Expand Up @@ -230,6 +230,7 @@ function http_security_headers() {

http_csp_add( 'script-src', 'ajax.googleapis.com' );
http_csp_add( 'script-src', 'maxcdn.bootstrapcdn.com' );
http_csp_add( 'script-src', 'cdnjs.cloudflare.com' );

http_csp_add( 'img-src', 'ajax.googleapis.com' );

Expand Down
10 changes: 5 additions & 5 deletions core/layout_api.php
Expand Up @@ -268,7 +268,7 @@ function layout_head_css() {
html_css_link( 'open-sans.css' );

# datetimepicker
html_css_link( 'bootstrap-datetimepicker.min.css' );
html_css_link( 'bootstrap-datetimepicker-' . DATETIME_PICKER_VERSION . '.min.css' );
}

# page specific plugin styles
Expand Down Expand Up @@ -318,15 +318,15 @@ function layout_body_javascript() {
html_javascript_cdn_link( 'https://maxcdn.bootstrapcdn.com/bootstrap/' . BOOTSTRAP_VERSION . '/js/bootstrap.min.js', BOOTSTRAP_HASH );

# moment & datetimepicker
html_javascript_cdn_link( 'https://cdnjs.cloudflare.com/ajax/libs/moment.js/' . MOMENT_VERSION . '/moment-with-locales.min.js' );
html_javascript_cdn_link( 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/' . DATETIME_PICKER_VERSION . '/js/bootstrap-datetimepicker.min.js' );
html_javascript_cdn_link( 'https://cdnjs.cloudflare.com/ajax/libs/moment.js/' . MOMENT_VERSION . '/moment-with-locales.min.js', MOMENT_HASH );
html_javascript_cdn_link( 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/' . DATETIME_PICKER_VERSION . '/js/bootstrap-datetimepicker.min.js', DATETIME_PICKER_HASH );
} else {
# bootstrap
html_javascript_link( 'bootstrap-' . BOOTSTRAP_VERSION . '.min.js' );

# moment & datetimepicker
html_javascript_link( 'moment-with-locales.min.js' );
html_javascript_link( 'bootstrap-datetimepicker.min.js' );
html_javascript_link( 'moment-with-locales-' . MOMENT_VERSION . '.min.js' );
html_javascript_link( 'bootstrap-datetimepicker-' . DATETIME_PICKER_VERSION . '.min.js' );
}

# theme scripts
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.