diff core/modules/block/js/block.admin.es6.js @ 14:1fec387a4317

Update Drupal core to 8.5.2 via Composer
author Chris Cannam
date Mon, 23 Apr 2018 09:46:53 +0100
parents 4c8ae668cc8c
children 129ea1e6d783
line wrap: on
line diff
--- a/core/modules/block/js/block.admin.es6.js	Mon Apr 23 09:33:26 2018 +0100
+++ b/core/modules/block/js/block.admin.es6.js	Mon Apr 23 09:46:53 2018 +0100
@@ -24,7 +24,7 @@
     attach(context, settings) {
       const $input = $('input.block-filter-text').once('block-filter-text');
       const $table = $($input.attr('data-element'));
-      let $filter_rows;
+      let $filterRows;
 
       /**
        * Filters the block list.
@@ -52,24 +52,24 @@
 
         // Filter if the length of the query is at least 2 characters.
         if (query.length >= 2) {
-          $filter_rows.each(toggleBlockEntry);
+          $filterRows.each(toggleBlockEntry);
           Drupal.announce(
             Drupal.formatPlural(
               $table.find('tr:visible').length - 1,
               '1 block is available in the modified list.',
-              '@count blocks are available in the modified list.'
-            )
+              '@count blocks are available in the modified list.',
+            ),
           );
         }
         else {
-          $filter_rows.each(function (index) {
+          $filterRows.each(function (index) {
             $(this).parent().parent().show();
           });
         }
       }
 
       if ($table.length) {
-        $filter_rows = $table.find('div.block-filter-text-source');
+        $filterRows = $table.find('div.block-filter-text-source');
         $input.on('keyup', debounce(filterBlockList, 200));
       }
     },
@@ -91,7 +91,7 @@
           // Just scrolling the document.body will not work in Firefox. The html
           // element is needed as well.
           $('html, body').animate({
-            scrollTop: $('.js-block-placed').offset().top - $container.offset().top + $container.scrollTop(),
+            scrollTop: ($('.js-block-placed').offset().top - $container.offset().top) + $container.scrollTop(),
           }, 500);
         });
       }