[BUGFIX] Fix clearing of temporary page tree mount 98/44598/3
authorMarkus Klein <markus.klein@typo3.org>
Sat, 7 Nov 2015 11:46:40 +0000 (12:46 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Sat, 7 Nov 2015 12:30:37 +0000 (13:30 +0100)
The JS function that should be called after canceling the temp tree
mount was no longer evaluated.
Thus, only the persistence knew about the canceling, but the UI did not
respect that and stayed the same.

Resolves: #71393
Releases: master
Change-Id: I5663e1fadf67582e6d60101457f9b6e9ebdefe97
Reviewed-on: https://review.typo3.org/44598
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/app.js

index f877171..dd6d3d6 100644 (file)
@@ -206,16 +206,15 @@ TYPO3.Components.PageTree.App = Ext.extend(Ext.Panel, {
                                afterrender: {
                                        fn: function() {
                                                var element = Ext.fly(this.id + '-indicatorBar-temporaryMountPoint-clear');
+                                               var me = this;
                                                element.on('click', function() {
-                                                       top.TYPO3.Storage.Persistent.unset(
-                                                               'pageTree_temporaryMountPoint',
+                                                       top.TYPO3.Storage.Persistent.unset('pageTree_temporaryMountPoint').done(
                                                                function() {
                                                                        TYPO3.Components.PageTree.Configuration.temporaryMountPoint = null;
-                                                                       this.removeIndicator(this.temporaryMountPointInfoIndicator);
-                                                                       this.getTree().refreshTree();
-                                                                       this.getTree().stateId = 'Pagetree';
-                                                               },
-                                                               this
+                                                                       me.removeIndicator(me.temporaryMountPointInfoIndicator);
+                                                                       me.getTree().refreshTree();
+                                                                       me.getTree().stateId = 'Pagetree';
+                                                               }
                                                        );
                                                }, this);
                                        },