diff --git a/core/modules/block_place/js/block_place.es6.js b/core/modules/block_place/js/block_place.es6.js index 73f1e77555..650741d531 100644 --- a/core/modules/block_place/js/block_place.es6.js +++ b/core/modules/block_place/js/block_place.es6.js @@ -2,11 +2,8 @@ * @file * Block Place behaviors. */ - -(function ($, window, Drupal, drupalSettings) { - +(($, window, Drupal, drupalSettings) => { 'use strict'; - Drupal.blockPlace = { isBlockPlaceMode: () => { const queryString = decodeURI(window.location.search); @@ -15,10 +12,10 @@ }; 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, @@ -34,8 +31,7 @@ // 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); diff --git a/core/modules/block_place/js/block_place.js b/core/modules/block_place/js/block_place.js index b1ac5ee6c3..2f86d3d456 100644 --- a/core/modules/block_place/js/block_place.js +++ b/core/modules/block_place/js/block_place.js @@ -6,7 +6,6 @@ **/ (function ($, window, Drupal, drupalSettings) { - 'use strict'; Drupal.blockPlace = {