diff --git a/core/modules/views_ui/js/views-admin.es6.js b/core/modules/views_ui/js/views-admin.es6.js index 1078209..f72495a 100644 --- a/core/modules/views_ui/js/views-admin.es6.js +++ b/core/modules/views_ui/js/views-admin.es6.js @@ -518,6 +518,7 @@ const group = this.$controlGroup.val(); // Search through the search texts in the form for matching text. + var activeViews = 0; this.options.forEach((option) => { function hasWord(word) { return option.searchText.indexOf(word) !== -1; @@ -534,10 +535,15 @@ } option.$div.toggle(found); + activeViews += found; }); // Adapt dialog to content size. $(event.target).trigger('dialogContentResize'); + + Drupal.announce( + Drupal.formatPlural(activeViews, '1 option is available in the modified list.', '@count options are available in the modified list.') + ); }, }); diff --git a/core/modules/views_ui/js/views-admin.js b/core/modules/views_ui/js/views-admin.js index 18d5e8b..acb86c7 100644 --- a/core/modules/views_ui/js/views-admin.js +++ b/core/modules/views_ui/js/views-admin.js @@ -268,7 +268,6 @@ var group = this.$controlGroup.val(); - // Search through the search texts in the form for matching text. var activeViews = 0; this.options.forEach(function (option) { function hasWord(word) { @@ -290,10 +289,7 @@ $(event.target).trigger('dialogContentResize'); - Drupal.announce( - Drupal.formatPlural(activeViews, '1 option is available in the modified list.', '@count options are available in the modified list.') - ); - + Drupal.announce(Drupal.formatPlural(activeViews, '1 option is available in the modified list.', '@count options are available in the modified list.')); } });