[BUGFIX] Re-introduce `top.TYPO3.Backend.NavigationContainer.PageTree` 01/50201/4
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Wed, 12 Oct 2016 21:30:10 +0000 (23:30 +0200)
committerFrank Naegler <frank.naegler@typo3.org>
Thu, 13 Oct 2016 07:51:41 +0000 (09:51 +0200)
This patch re-adds the `top.TYPO3.Backend.NavigationContainer.PageTree`
object that is required to execute the `updatePageTree` signal
successfully. With this patch, the page tree gets updated again after
saving anything that triggers the signal.

Resolves: #78228
Related: #52877
Releases: master
Change-Id: I07c661dec68bb9b51470c8edbf3ac6643ab96cd9
Reviewed-on: https://review.typo3.org/50201
Tested-by: TYPO3com <no-reply@typo3.com>
Tested-by: Riccardo De Contardi <erredeco@gmail.com>
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/backend/Resources/Public/JavaScript/Viewport.js

index c49a94c..6a6551d 100644 (file)
@@ -35,7 +35,7 @@ define(
                        doLayout: function () {
                                TYPO3.Backend.NavigationContainer.cleanup();
                                TYPO3.Backend.NavigationContainer.calculateScrollbar();
-                               if (Ext.getCmp('typo3-pagetree') !== undefined) {
+                               if (typeof Ext.getCmp('typo3-pagetree') !== 'undefined') {
                                        Ext.getCmp('typo3-pagetree').doLayout();
                                }
                        },
@@ -53,6 +53,13 @@ define(
                                }
                        },
                        NavigationContainer: {
+                               PageTree: {
+                                       refreshTree: function() {
+                                               if (typeof Ext.getCmp('typo3-pagetree') !== 'undefined') {
+                                                       Ext.getCmp('typo3-pagetree').activeTree.refreshTree();
+                                               }
+                                       }
+                               },
                                toggle: function () {
                                        $('.t3js-scaffold').toggleClass('scaffold-content-navigation-expanded')
                                },