Revert "[TASK] Massive performance improvement for page tree" 54/40154/2
authorFrank Nägler <frank.naegler@typo3.org>
Wed, 10 Jun 2015 18:30:05 +0000 (20:30 +0200)
committerFrank Nägler <frank.naegler@typo3.org>
Wed, 10 Jun 2015 18:40:21 +0000 (20:40 +0200)
This patch needs to be reverted, because of a regression with
the page tree and the double click behavior.

Releases: master
Resolves: #66912
Resolves: #67322
Reverts: #63591

This reverts commit a89d3765663c0ed05c8435ad767f106fa9d60bf8.

Change-Id: I35b9d80f25fa1f2f3951bf70bbbe9e02dafdc28d
Reviewed-on: http://review.typo3.org/40154
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Frank Nägler <frank.naegler@typo3.org>
Tested-by: Frank Nägler <frank.naegler@typo3.org>
typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/tree.js
typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/treeeditor.js

index 22824bf..f6f111a 100644 (file)
@@ -173,23 +173,25 @@ TYPO3.Components.PageTree.Tree = Ext.extend(Ext.tree.TreePanel, {
        listeners: {
                        // single click handler that only triggers after a delay to let the double click event
                        // a possibility to be executed (needed for label edit)
-               dblclick: {
-                       fn: function(node, event) {
-                               this.triggerEdit(node);
-                       }
-               },
-
                click: {
                        fn: function(node, event) {
+                               if (this.clicksRegistered === 2) {
+                                       this.clicksRegistered = 0;
+                                       event.stopEvent();
+                                       return false;
+                               }
+
+                               this.clicksRegistered = 0;
                                if (this.commandProvider.singleClick) {
                                        this.commandProvider.singleClick(node, this);
                                }
-                       }
+                       },
+                       delay: 400
                },
 
                        // prevent the expanding / collapsing on double click
                beforedblclick: {
-                       fn: function(node, event) {
+                       fn: function() {
                                return false;
                        }
                },
index 9b13f04..92f9811 100644 (file)
@@ -35,7 +35,7 @@ TYPO3.Components.PageTree.TreeEditor = Ext.extend(Ext.tree.TreeEditor, {
         *
         * @type {int}
         */
-       editDelay: 0,
+       editDelay: 250,
 
        /**
         * Indicates if an underlying shadow should be shown