[BUGFIX] Make Live Search JS only work inside its scope 97/41697/2
authorBenjamin Mack <benni@typo3.org>
Sun, 19 Jul 2015 08:49:31 +0000 (10:49 +0200)
committerAndreas Wolf <andreas.wolf@typo3.org>
Sun, 19 Jul 2015 08:58:02 +0000 (10:58 +0200)
When clearing for example the caches inside the top bar,
the live search events are fired as well and reloading all the frames.

This is due to wrong JavaScript selectors for events inside
the Live Search. The patch adapts the event selectors accordingly.

Resolves: #68362
Releases: master
Change-Id: Ic5422714cacd8762a8f0339b5bf1c24b62508959
Reviewed-on: http://review.typo3.org/41697
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Andreas Wolf <andreas.wolf@typo3.org>
Tested-by: Andreas Wolf <andreas.wolf@typo3.org>
typo3/sysext/backend/Resources/Public/JavaScript/LiveSearch.js

index 78f1bef..9144c77 100644 (file)
@@ -84,11 +84,11 @@ define('TYPO3/CMS/Backend/LiveSearch', ['jquery', 'jquery/autocomplete'], functi
                });
 
                // set up the events
-               $(document).on('click', '.t3js-live-search-show-all', function(evt) {
+               $(containerSelector).on('click', '.t3js-live-search-show-all', function(evt) {
                        evt.preventDefault();
                        TYPO3.ModuleMenu.App.showModule('web_list', 'id=0&search_levels=4&search_field=' + $(searchFieldSelector).val());
                });
-               $(document).on('click', '.dropdown-list-link', function(evt) {
+               $(containerSelector).on('click', '.dropdown-list-link', function(evt) {
                        evt.preventDefault();
                        jump($(this).data('target'), 'web_list', 'web', $(this).data('pageid'));
                });