X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fsystem%2Fjs%2Fsystem.modules.es6.js;fp=web%2Fcore%2Fmodules%2Fsystem%2Fjs%2Fsystem.modules.es6.js;h=5cbfe64b149ce65513190c94e975edfbb3b01b99;hp=9472d3b2ee1d7b3e7f49f16268c2135719d7e71c;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/modules/system/js/system.modules.es6.js b/web/core/modules/system/js/system.modules.es6.js index 9472d3b2e..5cbfe64b1 100644 --- a/web/core/modules/system/js/system.modules.es6.js +++ b/web/core/modules/system/js/system.modules.es6.js @@ -3,7 +3,7 @@ * Module page behaviors. */ -(function ($, Drupal, debounce) { +(function($, Drupal, debounce) { /** * Filters the module list table by a text input search string. * @@ -38,7 +38,9 @@ function showModuleRow(index, row) { const $row = $(row); - const $sources = $row.find('.table-filter-text-source, .module-name, .module-description'); + const $sources = $row.find( + '.table-filter-text-source, .module-name, .module-description', + ); const textMatch = $sources.text().search(re) !== -1; $row.closest('tr').toggle(textMatch); } @@ -53,25 +55,26 @@ // Note that we first open all
to be able to use ':visible'. // Mark the
elements that were closed before filtering, so // they can be reclosed when filtering is removed. - $details.not('[open]').attr('data-drupal-system-state', 'forced-open'); + $details + .not('[open]') + .attr('data-drupal-system-state', 'forced-open'); // Hide the package
if they don't have any visible rows. // Note that we first show() all
to be able to use ':visible'. $details.attr('open', true).each(hidePackageDetails); Drupal.announce( - Drupal.t( - '!modules modules are available in the modified list.', - { '!modules': $rowsAndDetails.find('tbody tr:visible').length }, - ), + Drupal.t('!modules modules are available in the modified list.', { + '!modules': $rowsAndDetails.find('tbody tr:visible').length, + }), ); - } - else if (searching) { + } else if (searching) { searching = false; $rowsAndDetails.show(); // Return
elements that had been closed before filtering // to a closed state. - $details.filter('[data-drupal-system-state="forced-open"]') + $details + .filter('[data-drupal-system-state="forced-open"]') .removeAttr('data-drupal-system-state') .attr('open', false); } @@ -96,4 +99,4 @@ } }, }; -}(jQuery, Drupal, Drupal.debounce)); +})(jQuery, Drupal, Drupal.debounce);