Commit 8e63416c authored by Kevin Ditscheid's avatar Kevin Ditscheid
Browse files

[TASK] Remove legacy code

parent ffe1869c
......@@ -111,32 +111,15 @@ define([
top.content.nav_frame.refresh_nav();
}
},
goTo: function(module, id, path) {
if (TYPO3.version < 9000000) {
var tree = top.Ext.getCmp('typo3-pagetree');
if (tree) {
tree.activeTree.selectPath(path);
} else if(top.nav) {
top.nav.invokePageId(id, function(path) {
var callback = top.Ext.createDelegate(top.nav.mainTree.selectPath, top.nav.mainTree);
callback.apply(this, arguments);
var node = top.nav.getSelected();
if (node) {
top.TYPO3.Components.PageTree.Actions.singleClick(node, top.TYPO3.Components.PageTree.Tree);
}
});
}
parent.TYPO3.ModuleMenu.App.showModule(module, 'id=' + id);
} else {
var pageTreeNodes = Viewport.NavigationContainer.PageTree.instance.nodes;
for (var nodeIndex in pageTreeNodes) {
if (pageTreeNodes.hasOwnProperty(nodeIndex) && pageTreeNodes[nodeIndex].identifier === parseInt(id)) {
Viewport.NavigationContainer.PageTree.selectNode(pageTreeNodes[nodeIndex]);
break;
}
goTo: function(module, id) {
var pageTreeNodes = Viewport.NavigationContainer.PageTree.instance.nodes;
for (var nodeIndex in pageTreeNodes) {
if (pageTreeNodes.hasOwnProperty(nodeIndex) && pageTreeNodes[nodeIndex].identifier === parseInt(id)) {
Viewport.NavigationContainer.PageTree.selectNode(pageTreeNodes[nodeIndex]);
break;
}
ModuleMenu.App.showModule(module, 'id=' + id);
}
ModuleMenu.App.showModule(module, 'id=' + id);
}
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment