diff --git a/core/modules/block_place/js/block_place.es6.js b/core/modules/block_place/js/block_place.es6.js index 73f1e77555..3509161aaa 100644 --- a/core/modules/block_place/js/block_place.es6.js +++ b/core/modules/block_place/js/block_place.es6.js @@ -11,31 +11,30 @@ isBlockPlaceMode: () => { const queryString = decodeURI(window.location.search); return (/block-place=1/i.test(queryString) || /block-place-region-sort=/i.test(queryString)); - } + }, }; Drupal.behaviors.blockPlace = { - attach: function (context, settings) { + attach(context, settings) { // If drupalSettings.block_place is set open open dialog. if (drupalSettings.hasOwnProperty('block_place') && drupalSettings.block_place.hasOwnProperty('dialog_url')) { - $(window).once('block_sort').each(function () { + $(window).once('block_sort').each(() => { const blockSort = Drupal.ajax({ dialog: {}, dialogType: drupalSettings.block_place.dialog_type, selector: '.ckeditor-dialog-loading-link', url: drupalSettings.block_place.dialog_url, - progress: { type: 'throbber' } + progress: { type: 'throbber' }, }); blockSort.execute(); }); } - } + }, }; // Make sure contextual links work with Ajax. // Remove in https://www.drupal.org/node/2764931. - $(document).once('contextual-ajax').on('drupalContextualLinkAdded', function (event, data) { + $(document).once('contextual-ajax').on('drupalContextualLinkAdded', (event, data) => { Drupal.attachBehaviors(data.$el[0]); }); - -})(jQuery, window, Drupal, drupalSettings); +}(jQuery, window, Drupal, drupalSettings));