[FOLLOWUP][TASK] Replace ExtDirect State for module menu with jQuery 29/51229/2
authorWouter Wolters <typo3@wouterwolters.nl>
Mon, 9 Jan 2017 21:53:36 +0000 (22:53 +0100)
committerAndreas Fernandez <typo3@scripting-base.de>
Tue, 10 Jan 2017 09:00:49 +0000 (10:00 +0100)
Type mismatch leads to always closing module menu.

Resolves: #79211
Releases: master
Change-Id: Ib733853fa036c5fdb4e0d56086fddfc315c775e9
Reviewed-on: https://review.typo3.org/51229
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/backend/Resources/Public/JavaScript/ModuleMenu.js

index fe55879..5da493b 100644 (file)
@@ -128,9 +128,9 @@ require(
                                var expandedClass = 'scaffold-modulemenu-expanded';
 
                                if (typeof collapse === 'undefined') {
-                                       collapse = $mainContainer.hasClass(expandedClass);
+                                       collapse = $mainContainer.hasClass(expandedClass) ? 'true' : '';
                                }
-                               if (collapse) {
+                               if (collapse === 'true') {
                                        $mainContainer.removeClass(expandedClass);
                                } else {
                                        $mainContainer.addClass(expandedClass);