[BUGFIX] WorkspaceMenu still depends on prototype 11/34211/2
authorBenjamin Mack <benni@typo3.org>
Sat, 15 Nov 2014 15:45:26 +0000 (16:45 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Sat, 15 Nov 2014 16:04:51 +0000 (17:04 +0100)
A small regression was found when switching
from prototype to jQuery.
The String.startWith method which was
added by prototype.js does not exist anymore.

This does not allow to reload module+pagetree
anymore.

Releases: master
Resolves: #62989
Change-Id: I74fdfc8b648f2bf7912ff4ea58b0a158836e3d9e
Reviewed-on: http://review.typo3.org/34211
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/workspaces/Resources/Public/JavaScript/Toolbar/WorkspacesMenu.js

index 9c21c5b..c1e445d 100644 (file)
@@ -70,14 +70,16 @@ define('TYPO3/CMS/Workspaces/Toolbar/WorkspacesMenu', ['jquery'], function($) {
                                        fsMod.recentIds['web'] = response.pageId;
                                        var url = TYPO3.Backend.ContentContainer.getUrl();
                                        url += (url.indexOf('?') == -1 ? '?' : '&') + '&id=' + response.pageId;
+                                       TYPO3.Backend.NavigationContainer.PageTree.refreshTree();
                                        TYPO3.Backend.ContentContainer.setUrl(url);
 
                                // when in web module reload, otherwise send the user to the web module
-                               } else if (currentModuleLoaded.startsWith('web_')) {
+                               } else if (currentModuleLoaded.indexOf('web_') === 0) {
                                        TYPO3.Backend.NavigationContainer.PageTree.refreshTree();
                                        TYPO3.ModuleMenu.App.reloadFrames();
 
                                } else if (TYPO3.configuration.pageModule) {
+                                       TYPO3.Backend.NavigationContainer.PageTree.refreshTree();
                                        TYPO3.ModuleMenu.App.showModule(TYPO3.configuration.pageModule);
                                }