diff --git a/core/misc/ajax.es6.js b/core/misc/ajax.es6.js index 3ff1a6b311..a4fefe424e 100644 --- a/core/misc/ajax.es6.js +++ b/core/misc/ajax.es6.js @@ -910,13 +910,13 @@ /** * Provide a wrapper for the AJAX progress bar element. * - * @param {jQuery} element + * @param {jQuery} $element * Progress bar element. * @return {string} * The HTML markup for the progress bar. */ - Drupal.theme.ajaxProgressBar = element => - $('
').append(element); + Drupal.theme.ajaxProgressBar = $element => + $('
').append($element); /** * Sets the progress bar progress indicator. diff --git a/core/misc/ajax.js b/core/misc/ajax.js index 6261a8bd0b..030ccffbfe 100644 --- a/core/misc/ajax.js +++ b/core/misc/ajax.js @@ -641,4 +641,4 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr } } }; -})(jQuery, window, Drupal, drupalSettings); +})(jQuery, window, Drupal, drupalSettings); \ No newline at end of file diff --git a/core/themes/stable/js/ajax.es6.js b/core/themes/stable/js/ajax.es6.js index e69de29bb2..e33ce5e230 100644 --- a/core/themes/stable/js/ajax.es6.js +++ b/core/themes/stable/js/ajax.es6.js @@ -0,0 +1,17 @@ +/** + * @file + * Provides backwards compatibility layer for Ajax related markup. + */ + +((Drupal) => { + /** + * Override the default ajaxProgressBar for backwards compatibility. + * + * @param {jQuery} $element + * Progress bar element. + * @return {string} + * The HTML markup for the progress bar. + */ + Drupal.theme.ajaxProgressBar = $element => + $element.addClass('ajax-progress ajax-progress-bar'); +})(Drupal); diff --git a/core/themes/stable/stable.info.yml b/core/themes/stable/stable.info.yml index ea26e95227..e5f3d29dbc 100644 --- a/core/themes/stable/stable.info.yml +++ b/core/themes/stable/stable.info.yml @@ -298,3 +298,7 @@ libraries-override: theme: css/views_ui.admin.theme.css: css/views_ui/views_ui.admin.theme.css css/views_ui.contextual.css: css/views_ui/views_ui.contextual.css + +libraries-extend: + core/drupal.ajax: + - stable/drupal.ajax diff --git a/core/themes/stable/stable.libraries.yml b/core/themes/stable/stable.libraries.yml index e69de29bb2..7c13cc6e04 100644 --- a/core/themes/stable/stable.libraries.yml +++ b/core/themes/stable/stable.libraries.yml @@ -0,0 +1,4 @@ +drupal.ajax: + version: VERSION + js: + js/ajax.js: {}