[BUGFIX] Add jquery.clearable to backend page tree filter 72/60172/2
authorWolfgang Klinger <wolfgang@wazum.com>
Mon, 11 Mar 2019 19:19:39 +0000 (20:19 +0100)
committerSusanne Moog <susanne.moog@typo3.org>
Wed, 13 Mar 2019 17:27:26 +0000 (18:27 +0100)
Resolves: #87888
Releases: master, 9.5
Change-Id: Ie21c58f7d7e14285ec4b841324340841cde8cbec
Reviewed-on: https://review.typo3.org/c/60172
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Joerg Kummer <typo3@enobe.de>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Joerg Kummer <typo3@enobe.de>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
typo3/sysext/backend/Resources/Public/JavaScript/PageTree/PageTreeToolbar.js

index 0439742..99aefa1 100644 (file)
@@ -19,7 +19,8 @@ define(['jquery',
     'd3',
     'TYPO3/CMS/Backend/PageTree/PageTreeDragDrop',
     'TYPO3/CMS/Backend/Tooltip',
-    'TYPO3/CMS/Backend/SvgTree'
+    'TYPO3/CMS/Backend/SvgTree',
+    'TYPO3/CMS/Backend/jquery.clearable'
   ],
   function($, Icons, d3, PageTreeDragDrop) {
     'use strict';
@@ -166,6 +167,11 @@ define(['jquery',
 
           $toolbar.find('[data-tree-submenu]').not($submenu).removeClass('active');
           $submenu.addClass('active');
+          $submenu.find('input').clearable({
+            onClear: function(){
+              $submenu.find('input').trigger('input');
+            }
+          });
           $submenu.find('input').focus();
         });
       });