[TASK] Stop animation if click again 24/47324/2
authorMarkus Sommer <markussom@posteo.de>
Fri, 18 Mar 2016 07:54:34 +0000 (08:54 +0100)
committerFrank Naegler <frank.naegler@typo3.org>
Fri, 18 Mar 2016 16:29:04 +0000 (17:29 +0100)
Stop the toggle animation an the module headline
first before a new animation is started

Resolves: #75179
Releases: master, 7.6
Change-Id: I1dc683ba7740a0a939d699e6d3c01b154583a00a
Reviewed-on: https://review.typo3.org/47324
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/backend/Resources/Public/JavaScript/modulemenu.js

index fe16962..c01a76c 100644 (file)
@@ -65,13 +65,13 @@ TYPO3.ModuleMenu.App = {
                        if ($group.hasClass('expanded')) {
                                me.addCollapsedMainMenuItem($group.attr('id'));
                                $group.addClass('collapsed').removeClass('expanded');
-                               $groupContainer.slideUp().promise().done(function() {
+                               $groupContainer.stop().slideUp().promise().done(function() {
                                        TYPO3.Backend.doLayout();
                                });
                        } else {
                                me.removeCollapseMainMenuItem($group.attr('id'));
                                $group.addClass('expanded').removeClass('collapsed');
-                               $groupContainer.slideDown().promise().done(function() {
+                               $groupContainer.stop().slideDown().promise().done(function() {
                                        TYPO3.Backend.doLayout();
                                });
                        }