X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fblock%2Fjs%2Fblock.admin.es6.js;h=780ea12e2e70c9e3f07eccbfe86959f46a54f1f5;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hp=ee4ec0844d0bbe0e1085792988e958d003d169ca;hpb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;p=yaffs-website diff --git a/web/core/modules/block/js/block.admin.es6.js b/web/core/modules/block/js/block.admin.es6.js index ee4ec0844..780ea12e2 100644 --- a/web/core/modules/block/js/block.admin.es6.js +++ b/web/core/modules/block/js/block.admin.es6.js @@ -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); }); }