[TASK] Move typo3/js/extjs/* files to EXT:backend 97/37997/2
authorBenjamin Mack <benni@typo3.org>
Sun, 22 Mar 2015 14:22:37 +0000 (15:22 +0100)
committerBenjamin Mack <benni@typo3.org>
Sun, 22 Mar 2015 17:38:15 +0000 (18:38 +0100)
In order to get the typo3/ directory cleaner, all files
related to extjs are moved to EXT:backend in
the appropriate place.

Resolves: #65894
Releases: master
Change-Id: Ib116309a6efb07b4a3bfb3bfb5cad1fe38b87529
Reviewed-on: http://review.typo3.org/37997
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
Tested-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
Reviewed-by: Benjamin Mack <benni@typo3.org>
Tested-by: Benjamin Mack <benni@typo3.org>
40 files changed:
typo3/js/extjs/backendcontentiframe.js [deleted file]
typo3/js/extjs/components/pagetree/javascript/Ext.ux.state.TreePanel.js [deleted file]
typo3/js/extjs/components/pagetree/javascript/actions.js [deleted file]
typo3/js/extjs/components/pagetree/javascript/app.js [deleted file]
typo3/js/extjs/components/pagetree/javascript/contextmenu.js [deleted file]
typo3/js/extjs/components/pagetree/javascript/deletiondropzone.js [deleted file]
typo3/js/extjs/components/pagetree/javascript/filteringtree.js [deleted file]
typo3/js/extjs/components/pagetree/javascript/loadorder.txt [deleted file]
typo3/js/extjs/components/pagetree/javascript/nodeui.js [deleted file]
typo3/js/extjs/components/pagetree/javascript/toppanel.js [deleted file]
typo3/js/extjs/components/pagetree/javascript/tree.js [deleted file]
typo3/js/extjs/components/pagetree/javascript/treeeditor.js [deleted file]
typo3/js/extjs/debugPanel.js [deleted file]
typo3/js/extjs/ux/Ext.app.SearchField.js [deleted file]
typo3/js/extjs/ux/Ext.grid.RowExpander.js [deleted file]
typo3/js/extjs/ux/Ext.ux.FitToParent.js [deleted file]
typo3/js/extjs/ux/ext.ux.tabclosemenu.js [deleted file]
typo3/js/extjs/viewport.js [deleted file]
typo3/js/extjs/viewportConfiguration.js [deleted file]
typo3/sysext/backend/Classes/Controller/BackendController.php
typo3/sysext/backend/Resources/Public/JavaScript/extjs/backendcontentiframe.js [new file with mode: 0644]
typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/Ext.ux.state.TreePanel.js [new file with mode: 0644]
typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/actions.js [new file with mode: 0644]
typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/app.js [new file with mode: 0644]
typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/contextmenu.js [new file with mode: 0644]
typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/deletiondropzone.js [new file with mode: 0644]
typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/filteringtree.js [new file with mode: 0644]
typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/loadorder.txt [new file with mode: 0644]
typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/nodeui.js [new file with mode: 0644]
typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/toppanel.js [new file with mode: 0644]
typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/tree.js [new file with mode: 0644]
typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/treeeditor.js [new file with mode: 0644]
typo3/sysext/backend/Resources/Public/JavaScript/extjs/debugPanel.js [new file with mode: 0644]
typo3/sysext/backend/Resources/Public/JavaScript/extjs/ux/Ext.app.SearchField.js [new file with mode: 0644]
typo3/sysext/backend/Resources/Public/JavaScript/extjs/ux/Ext.grid.RowExpander.js [new file with mode: 0644]
typo3/sysext/backend/Resources/Public/JavaScript/extjs/ux/Ext.ux.FitToParent.js [new file with mode: 0755]
typo3/sysext/backend/Resources/Public/JavaScript/extjs/ux/ext.ux.tabclosemenu.js [new file with mode: 0644]
typo3/sysext/backend/Resources/Public/JavaScript/extjs/viewport.js [new file with mode: 0644]
typo3/sysext/backend/Resources/Public/JavaScript/extjs/viewportConfiguration.js [new file with mode: 0644]
typo3/sysext/workspaces/Classes/Controller/ReviewController.php

diff --git a/typo3/js/extjs/backendcontentiframe.js b/typo3/js/extjs/backendcontentiframe.js
deleted file mode 100644 (file)
index a2557e6..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-Ext.ns('TYPO3');
-
-TYPO3.backendContentIframePanel = Ext.extend(TYPO3.iframePanel ,{
-       setUrl: function(source) {
-               var card;
-               var wrapper;
-               wrapper = Ext.getCmp('typo3-contentContainerWrapper');
-               this.url = source;
-               if(wrapper) {
-                       card = Ext.getCmp('typo3-card-' + TYPO3.ModuleMenu.App.loadedModule);
-                       if((card != undefined) && (source.search('extjspaneldummy.html') > -1)) {
-                               wrapper.getLayout().setActiveItem('typo3-card-' + TYPO3.ModuleMenu.App.loadedModule);
-                               if (typeof wrapper.getComponent(('typo3-card-' + TYPO3.ModuleMenu.App.loadedModule)).setUrl === 'function') {
-                                       wrapper.getComponent(('typo3-card-' + TYPO3.ModuleMenu.App.loadedModule)).setUrl(source);
-                               }
-                       } else {
-                               wrapper.getLayout().setActiveItem(this.id);
-                               this.body.dom.src = source;
-                               this.startLoader();
-                       }
-               }
-       },
-
-       getUrl: function () {
-               var wrapper;
-               var card;
-               wrapper = Ext.getCmp('typo3-contentContainerWrapper');
-
-               if(wrapper) {
-                       card = wrapper.getLayout().activeItem;
-                       if(card.id == this.id) {
-                               return this.body.dom.src;
-                       } else if(typeof card.getUrl == 'function') {
-                               return card.getUrl();
-                       } else {
-                               return this.url;
-                       }
-               }
-       }
-});
-Ext.reg('backendContentIframePanel', TYPO3.backendContentIframePanel);
\ No newline at end of file
diff --git a/typo3/js/extjs/components/pagetree/javascript/Ext.ux.state.TreePanel.js b/typo3/js/extjs/components/pagetree/javascript/Ext.ux.state.TreePanel.js
deleted file mode 100644 (file)
index 3d744c2..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-Ext.ns('Ext.ux.state');
-
-// dummy constructor
-Ext.ux.state.TreePanel = function() {};
-
-/**
- * State Provider for a tree panel
- */
-Ext.override(Ext.ux.state.TreePanel, {
-       /**
-        * Initializes the plugin
-        * @param {Ext.tree.TreePanel} tree
-        * @private
-        */
-       init:function(tree) {
-               tree.lastSelectedNode = null;
-               tree.isRestoringState = false;
-               tree.stateHash = {};
-
-               // install event handlers on TreePanel
-               tree.on({
-                       // add path of expanded node to stateHash
-                       beforeexpandnode:function(node) {
-                               if (this.isRestoringState) {
-                                       return;
-                               }
-
-                               var saveID = (node.id === 'root' ? node.id : node.id.substr(1));
-                               this.stateHash[saveID] = 1;
-                       },
-
-                       // delete path and all subpaths of collapsed node from stateHash
-                       beforecollapsenode:function(node) {
-                               if (this.isRestoringState) {
-                                       return;
-                               }
-
-                               var deleteID = (node.id === 'root' ? node.id : node.id.substr(1));
-                               delete this.stateHash[deleteID];
-                       },
-
-                       beforeclick: function(node) {
-                               if (this.isRestoringState) {
-                                       return;
-                               }
-                               this.stateHash['lastSelectedNode'] = node.id;
-                       }
-               });
-
-                       // update state on node expand or collapse
-               tree.stateEvents = tree.stateEvents || [];
-               tree.stateEvents.push('expandnode', 'collapsenode', 'click');
-
-               // add state related props to the tree
-               Ext.apply(tree, {
-                       // keeps expanded nodes paths keyed by node.ids
-                       stateHash:{},
-
-                       restoreState: function() {
-                               this.isRestoringState = true;
-                                       // get last selected node
-                               for (var pageID in this.stateHash) {
-                                       var pageNode = this.getNodeById((pageID !== 'root' ? 'p' : '') + pageID);
-                                       if (pageNode) {
-                                               pageNode.on({
-                                                       expand: {
-                                                               single:true,
-                                                               scope:this,
-                                                               fn: this.restoreState
-                                                       }
-                                               });
-                                               if (pageNode.expanded === false && pageNode.rendered == true) {
-                                                       pageNode.expand();
-                                               }
-                                       }
-                               }
-
-                               if (this.stateHash['lastSelectedNode']) {
-                                       var node = this.getNodeById(this.stateHash['lastSelectedNode']);
-                                       if (node) {
-                                               var contentId = TYPO3.Backend.ContentContainer.getIdFromUrl() ||
-                                                       String(fsMod.recentIds['web']) || '-1';
-
-                                               var hasContentFrameValidPageId = (contentId !== '-1' && contentId !== '0');
-                                               var isCurrentSelectedNode = (
-                                                       String(node.attributes.nodeData.id) === contentId ||
-                                                       contentId.indexOf('pages' + String(node.attributes.nodeData.id)) !== -1
-                                               );
-
-                                               if (isCurrentSelectedNode) {
-                                                       this.selectPath(node.getPath());
-                                               }
-
-                                               var isSingleClickPossible = (this.app.isVisible() && this.commandProvider && this.commandProvider.singleClick);
-                                               if (!hasContentFrameValidPageId && !isCurrentSelectedNode && isSingleClickPossible) {
-                                                       this.selectPath(node.getPath());
-                                                       this.commandProvider.singleClick(node, this);
-                                               }
-                                       }
-                               }
-
-                               this.isRestoringState = false;
-                       },
-
-                       // apply state on tree initialization
-                       applyState:function(state) {
-                               if(state) {
-                                       Ext.apply(this, state);
-
-                                       // it is too early to expand paths here
-                                       // so do it once on root load
-                                       this.root.on({
-                                               load: {
-                                                       single:true,
-                                                       scope:this,
-                                                       fn: this.restoreState
-                                               }
-                                       });
-                               }
-                       },
-
-                       // returns stateHash for save by state manager
-                       getState:function() {
-                               return {stateHash:this.stateHash};
-                       }
-               });
-       }
-});
diff --git a/typo3/js/extjs/components/pagetree/javascript/actions.js b/typo3/js/extjs/components/pagetree/javascript/actions.js
deleted file mode 100644 (file)
index 3e49a9f..0000000
+++ /dev/null
@@ -1,778 +0,0 @@
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-Ext.namespace('TYPO3.Components.PageTree');
-
-/**
- * @class TYPO3.Components.PageTree.Actions
- *
- * Actions dedicated for the page tree
- *
- * @namespace TYPO3.Components.PageTree
- * @author Stefan Galinski <stefan.galinski@gmail.com>
- */
-TYPO3.Components.PageTree.Actions = {
-
-       /**
-        * Evaluates a response from an ext direct call and shows a flash message
-        * if it was an exceptional result
-        *
-        * @param {Object} response
-        * @return {Boolean}
-        */
-       evaluateResponse: function(response) {
-               if (response.success === false) {
-                       top.TYPO3.Flashmessage.display(top.TYPO3.Severity.error, 'Exception', response.message);
-                       return false;
-               }
-
-               return true;
-       },
-
-       /**
-        * Releases the cut and copy mode from the context menu
-        *
-        * @param {TYPO3.Components.PageTree.Tree} tree
-        * @return {void}
-        */
-       releaseCutAndCopyModes: function(tree) {
-               tree.t3ContextInfo.inCutMode = false;
-               tree.t3ContextInfo.inCopyMode = false;
-
-               if (tree.t3ContextNode) {
-                       tree.t3ContextNode.attributes.nodeData.t3InCutMode = false;
-                       tree.t3ContextNode.attributes.nodeData.t3InCopyMode = false;
-                       tree.t3ContextNode = null;
-               }
-       },
-
-       /**
-        * Updates an existing node with the given alternative. The new tree node
-        * is returned afterwards.
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @param {Boolean} isExpanded
-        * @param {Object} updatedNode
-        * @param {Function} callback
-        * @return {Ext.tree.TreeNode}
-        */
-       updateNode: function(node, isExpanded, updatedNode, callback) {
-               if (!updatedNode) {
-                       return null;
-               }
-
-               updatedNode.uiProvider = node.ownerTree.uiProvider;
-               var newTreeNode = new Ext.tree.TreeNode(updatedNode);
-
-               var refreshCallback = this.restoreNodeStateAfterRefresh;
-               if (callback) {
-                       refreshCallback = refreshCallback.createSequence(callback);
-               }
-
-               node.parentNode.replaceChild(newTreeNode, node);
-               newTreeNode.ownerTree.refreshNode(newTreeNode, refreshCallback);
-
-               return newTreeNode;
-       },
-
-       /**
-        * Restores the node state
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @param {Boolean} isExpanded
-        * @return {void}
-        */
-       restoreNodeStateAfterRefresh: function(node, isExpanded) {
-               node.parentNode.expand(false, false);
-               if (isExpanded) {
-                       node.expand(false, false);
-               } else {
-                       node.collapse(false, false);
-               }
-       },
-
-       /**
-        * Shows deletion confirmation window
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @param {TYPO3.Components.PageTree.Tree} tree
-        * @param {Function} callback
-        * @param {Boolean} recursiveDelete
-        * @return {void}
-        */
-       confirmDelete: function(node, tree, callback, recursiveDelete) {
-               callback = callback || null;
-
-               var title = TYPO3.Components.PageTree.LLL.deleteDialogTitle,
-                       message = TYPO3.Components.PageTree.LLL.deleteDialogMessage;
-               if (recursiveDelete) {
-                       message = TYPO3.Components.PageTree.LLL.recursiveDeleteDialogMessage;
-               }
-
-               Ext.Msg.show({
-                       title: title,
-                       msg: message,
-                       buttons: Ext.Msg.YESNO,
-                       fn: function (answer) {
-                               if (answer === 'yes') {
-                                       TYPO3.Components.PageTree.Actions.deleteNode(node, tree, callback);
-                                       return true;
-                               }
-                               return false;
-                       },
-                       animEl: 'elId'
-               });
-       },
-
-       /**
-        * Deletes a node directly
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @param {TYPO3.Components.PageTree.Tree} tree
-        * @param {Function} callback
-        * @return {void}
-        */
-       deleteNode: function(node, tree, callback) {
-               TYPO3.Components.PageTree.Commands.deleteNode(
-                       node.attributes.nodeData,
-                       function(response) {
-                               var succeeded = this.evaluateResponse(response);
-                               if (Ext.isFunction(callback)) {
-                                       callback(node, tree, succeeded);
-                               }
-
-                               if (succeeded) {
-                                               // the node may not be removed in workspace mode
-                                       if (top.TYPO3.configuration.inWorkspace && response.id) {
-                                               this.updateNode(node, node.isExpanded(), response);
-                                       } else {
-                                               node.remove();
-                                       }
-                               }
-                       },
-                       this
-               );
-       },
-
-       /**
-        * Removes a node either directly or first shows deletion popup
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @param {TYPO3.Components.PageTree.Tree} tree
-        * @return {void}
-        */
-       removeNode: function(node, tree) {
-               if (TYPO3.Components.PageTree.Configuration.displayDeleteConfirmation) {
-                       this.confirmDelete(node);
-               } else {
-                       this.deleteNode(node, tree);
-               }
-       },
-
-       /**
-        * Restores a given node and moves it to the given destination inside the tree. Use this
-        * method if you want to add it as the first child of the destination.
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @param {TYPO3.Components.PageTree.Tree} tree
-        * @param {Ext.tree.TreeNode} destination
-        * @return {void}
-        */
-       restoreNodeToFirstChildOfDestination: function(node, tree, destination) {
-               TYPO3.Components.PageTree.Commands.restoreNode(
-                       node.attributes.nodeData,
-                       destination.attributes.nodeData.id,
-                       function(updatedNode) {
-                               if (this.evaluateResponse(updatedNode)) {
-                                       var newTreeNode = new Ext.tree.TreeNode(
-                                               Ext.apply(node.attributes, updatedNode)
-                                       );
-                                       destination.insertBefore(newTreeNode, destination.firstChild);
-                               }
-                       },
-                       this
-               );
-       },
-
-       /**
-        * Restores a given node and moves it to the given destination inside the tree. Use this
-        * method if you want to add the node after the destination node.
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @param {TYPO3.Components.PageTree.Tree} tree
-        * @param {Ext.tree.TreeNode} destination
-        * @return {void}
-        */
-       restoreNodeAfterDestination: function(node, tree, destination) {
-               TYPO3.Components.PageTree.Commands.restoreNode(
-                       node.attributes.nodeData,
-                       -destination.attributes.nodeData.id,
-                       function(updatedNode) {
-                               if (this.evaluateResponse(updatedNode)) {
-                                       var newTreeNode = new Ext.tree.TreeNode(
-                                               Ext.apply(node.attributes, updatedNode)
-                                       );
-                                       destination.parentNode.insertBefore(newTreeNode, destination.nextSibling);
-                               }
-                       },
-                       this
-               );
-       },
-
-       /**
-        * Collapses a whole tree branch
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @return {void}
-        */
-       collapseBranch: function(node) {
-               node.collapse(true);
-       },
-
-       /**
-        * Expands a whole tree branch
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @return {void}
-        */
-       expandBranch: function(node) {
-               node.expand(true);
-       },
-
-       /**
-        * Opens a popup windows for previewing the given node/page
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @return {void}
-        */
-       viewPage: function(node) {
-               var frontendWindow = window.open('', 'newTYPO3frontendWindow');
-               TYPO3.Components.PageTree.Commands.getViewLink(
-                       node.attributes.nodeData,
-                       function(result) {
-                               frontendWindow.location = result;
-                               frontendWindow.focus();
-                       }
-               );
-       },
-
-       /**
-        * Creates a temporary tree mount point
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @param {TYPO3.Components.PageTree.Tree} tree
-        * @return {void}
-        */
-       mountAsTreeRoot: function(node, tree) {
-               TYPO3.Components.PageTree.Commands.setTemporaryMountPoint(
-                       node.attributes.nodeData,
-                       function(response) {
-                               if (TYPO3.Components.PageTree.Configuration.temporaryMountPoint) {
-                                       TYPO3.Backend.NavigationContainer.PageTree.removeIndicator(
-                                               TYPO3.Backend.NavigationContainer.PageTree.temporaryMountPointInfoIndicator
-                                       );
-                               }
-
-                               TYPO3.Components.PageTree.Configuration.temporaryMountPoint = response;
-                               TYPO3.Backend.NavigationContainer.PageTree.addTemporaryMountPointIndicator();
-
-                               var selectedNode = TYPO3.Backend.NavigationContainer.PageTree.getSelected();
-                               tree.stateId = 'Pagetree' + TYPO3.Components.PageTree.Configuration.temporaryMountPoint;
-                               tree.refreshTree(function() {
-                                       var nodeIsSelected = false;
-                                       if (selectedNode) {
-                                               nodeIsSelected = TYPO3.Backend.NavigationContainer.PageTree.select(
-                                                       selectedNode.attributes.nodeData.id
-                                               );
-                                       }
-
-                                       var node = (nodeIsSelected ? TYPO3.Backend.NavigationContainer.PageTree.getSelected() : null);
-                                       if (node) {
-                                               this.singleClick(node, tree);
-                                       } else {
-                                               this.singleClick(tree.getRootNode().firstChild, tree);
-                                       }
-                               }, this);
-                       },
-                       this
-               );
-       },
-
-       /**
-        * Opens the edit page properties dialog
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @return {void}
-        */
-       editPageProperties: function(node) {
-               node.select();
-               var returnUrl = TYPO3.Backend.ContentContainer.src;
-               if (returnUrl.indexOf('returnUrl') !== -1) {
-                       returnUrl = TYPO3.Utility.getParameterFromUrl(returnUrl, 'returnUrl');
-               } else {
-                       returnUrl = encodeURIComponent(returnUrl);
-               }
-
-               TYPO3.Backend.ContentContainer.setUrl(
-                       'alt_doc.php?edit[pages][' + node.attributes.nodeData.id + ']=edit&returnUrl=' + returnUrl
-               );
-       },
-
-       /**
-        * Opens the new page wizard
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @return {void}
-        */
-       newPageWizard: function(node) {
-               node.select();
-               TYPO3.Backend.ContentContainer.setUrl(
-                       TYPO3.settings.NewRecord.moduleUrl + '&id=' + node.attributes.nodeData.id + '&pagesOnly=1'
-               );
-       },
-
-       /**
-        * Opens the info popup
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @return {void}
-        */
-       openInfoPopUp: function(node) {
-               launchView('pages', node.attributes.nodeData.id);
-       },
-
-       /**
-        * Opens the history popup
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @return {void}
-        */
-       openHistoryPopUp: function(node) {
-               node.select();
-               TYPO3.Backend.ContentContainer.setUrl(
-                       TYPO3.settings.RecordHistory.moduleUrl + '&element=pages:' + node.attributes.nodeData.id
-               );
-       },
-
-       /**
-        * Opens the export .t3d file dialog
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @return {void}
-        */
-       exportT3d: function(node) {
-               node.select();
-               TYPO3.Backend.ContentContainer.setUrl(
-                       TYPO3.settings.ImportExport.moduleUrl +
-                       '&tx_impexp[action]=export&' +
-                       'id=0&tx_impexp[pagetree][id]=' + node.attributes.nodeData.id +
-                       '&tx_impexp[pagetree][levels]=0' +
-                       '&tx_impexp[pagetree][tables][]=_ALL'
-               );
-       },
-
-       /**
-        * Opens the import .t3d file dialog
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @return {void}
-        */
-       importT3d: function(node) {
-               node.select();
-               TYPO3.Backend.ContentContainer.setUrl(
-                       TYPO3.settings.ImportExport.moduleUrl +
-                       '&id=' + node.attributes.nodeData.id +
-                       '&table=pages&tx_impexp[action]=import'
-               );
-       },
-
-       /**
-        * Enables the cut mode of a node
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @param {TYPO3.Components.PageTree.Tree} tree
-        * @return {void}
-        */
-       enableCutMode: function(node, tree) {
-               this.disableCopyMode(node, tree);
-               node.attributes.nodeData.t3InCutMode = true;
-               tree.t3ContextInfo.inCutMode = true;
-               tree.t3ContextNode = node;
-       },
-
-       /**
-        * Disables the cut mode of a node
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @param {TYPO3.Components.PageTree.Tree} tree
-        * @return {void}
-        */
-       disableCutMode: function(node, tree) {
-               this.releaseCutAndCopyModes(tree);
-               node.attributes.nodeData.t3InCutMode = false;
-       },
-
-       /**
-        * Enables the copy mode of a node
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @param {TYPO3.Components.PageTree.Tree} tree
-        * @return {void}
-        */
-       enableCopyMode: function(node, tree) {
-               this.disableCutMode(node, tree);
-               node.attributes.nodeData.t3InCopyMode = true;
-               tree.t3ContextInfo.inCopyMode = true;
-               tree.t3ContextNode = node;
-       },
-
-       /**
-        * Disables the copy mode of a node
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @param {TYPO3.Components.PageTree.Tree} tree
-        * @return {void}
-        */
-       disableCopyMode: function(node, tree) {
-               this.releaseCutAndCopyModes(tree);
-               node.attributes.nodeData.t3InCopyMode = false;
-       },
-
-       /**
-        * Pastes the cut/copy context node into the given node
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @param {TYPO3.Components.PageTree.Tree} tree
-        * @return {void}
-        */
-       pasteIntoNode: function(node, tree) {
-               if (!tree.t3ContextNode) {
-                       return;
-               }
-
-               if (tree.t3ContextInfo.inCopyMode) {
-                                // This is hard stuff to do. So increase the timeout for the AJAX request
-                       Ext.Ajax.timeout = 3600000;
-
-                       var newNode = tree.t3ContextNode = new Ext.tree.TreeNode(tree.t3ContextNode.attributes);
-                       newNode.id = 'fakeNode';
-                       node.insertBefore(newNode, node.childNodes[0]);
-                       node.attributes.nodeData.t3InCopyMode = false;
-                       this.copyNodeToFirstChildOfDestination(newNode, tree);
-
-               } else if (tree.t3ContextInfo.inCutMode) {
-                       if (node.getPath().indexOf(tree.t3ContextNode.id) !== -1) {
-                               return;
-                       }
-
-                       node.appendChild(tree.t3ContextNode);
-                       node.attributes.nodeData.t3InCutMode = false;
-                       this.moveNodeToFirstChildOfDestination(node, tree);
-               }
-       },
-
-       /**
-        * Pastes a cut/copy context node after the given node
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @param {TYPO3.Components.PageTree.Tree} tree
-        * @return {void}
-        */
-       pasteAfterNode: function(node, tree) {
-               if (!tree.t3ContextNode) {
-                       return;
-               }
-
-               if (tree.t3ContextInfo.inCopyMode) {
-                               // This is hard stuff to do. So increase the timeout for the AJAX request
-                       Ext.Ajax.timeout = 3600000;
-
-                       var newNode = tree.t3ContextNode = new Ext.tree.TreeNode(tree.t3ContextNode.attributes);
-                       newNode.id = 'fakeNode';
-                       node.parentNode.insertBefore(newNode, node.nextSibling);
-                       node.attributes.nodeData.t3InCopyMode = false;
-                       this.copyNodeAfterDestination(newNode, tree);
-
-               } else if (tree.t3ContextInfo.inCutMode) {
-                       if (node.getPath().indexOf(tree.t3ContextNode.id) !== -1) {
-                               return;
-                       }
-
-                       node.parentNode.insertBefore(tree.t3ContextNode, node.nextSibling);
-                       node.attributes.nodeData.t3InCutMode = false;
-                       this.moveNodeAfterDestination(node, tree);
-               }
-       },
-
-       /**
-        * Moves the current tree context node after the given node
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @param {TYPO3.Components.PageTree.Tree} tree
-        * @return {void}
-        */
-       moveNodeAfterDestination: function(node, tree) {
-               TYPO3.Components.PageTree.Commands.moveNodeAfterDestination(
-                       tree.t3ContextNode.attributes.nodeData,
-                       node.attributes.nodeData.id,
-                       function(response) {
-                               if (this.evaluateResponse(response) && tree.t3ContextNode) {
-                                       this.updateNode(tree.t3ContextNode, tree.t3ContextNode.isExpanded(), response);
-                               }
-                               this.releaseCutAndCopyModes(tree);
-                       },
-                       this
-               );
-       },
-
-       /**
-        * Moves the current tree context node as the first child of the given node
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @param {TYPO3.Components.PageTree.Tree} tree
-        * @return {void}
-        */
-       moveNodeToFirstChildOfDestination: function(node, tree) {
-               TYPO3.Components.PageTree.Commands.moveNodeToFirstChildOfDestination(
-                       tree.t3ContextNode.attributes.nodeData,
-                       node.attributes.nodeData.id,
-                       function(response) {
-                               if (this.evaluateResponse(response) && tree.t3ContextNode) {
-                                       this.updateNode(tree.t3ContextNode, tree.t3ContextNode.isExpanded(), response);
-                               }
-                               this.releaseCutAndCopyModes(tree);
-                       },
-                       this
-               );
-       },
-
-       /**
-        * Inserts a new node after the given node
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @param {TYPO3.Components.PageTree.Tree} tree
-        * @return {void}
-        */
-       insertNodeAfterDestination: function(node, tree) {
-               TYPO3.Components.PageTree.Commands.insertNodeAfterDestination(
-                       tree.t3ContextNode.attributes.nodeData,
-                       node.previousSibling.attributes.nodeData.id,
-                       tree.t3ContextInfo.serverNodeType,
-                       function(response) {
-                               if (this.evaluateResponse(response)) {
-                                       this.updateNode(node, node.isExpanded(), response, function(node) {
-                                               tree.triggerEdit(node);
-                                       });
-                               }
-                               this.releaseCutAndCopyModes(tree);
-                       },
-                       this
-               );
-       },
-
-       /**
-        * Inserts a new node as the first child of the given node
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @param {TYPO3.Components.PageTree.Tree} tree
-        * @return {void}
-        */
-       insertNodeToFirstChildOfDestination: function(node, tree) {
-               TYPO3.Components.PageTree.Commands.insertNodeToFirstChildOfDestination(
-                       tree.t3ContextNode.attributes.nodeData,
-                       tree.t3ContextInfo.serverNodeType,
-                       function(response) {
-                               if (this.evaluateResponse(response)) {
-                                       this.updateNode(node, true, response, function(node) {
-                                               tree.triggerEdit(node);
-                                       });
-                               }
-                               this.releaseCutAndCopyModes(tree);
-                       },
-                       this
-               );
-       },
-
-       /**
-        * Copies the current tree context node after the given node
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @param {TYPO3.Components.PageTree.Tree} tree
-        * @return {void}
-        */
-       copyNodeAfterDestination: function(node, tree) {
-               TYPO3.Components.PageTree.Commands.copyNodeAfterDestination(
-                       tree.t3ContextNode.attributes.nodeData,
-                       node.previousSibling.attributes.nodeData.id,
-                       function(response) {
-                               if (this.evaluateResponse(response)) {
-                                       this.updateNode(node, true, response, function(node) {
-                                               tree.triggerEdit(node);
-                                       });
-                               }
-                               this.releaseCutAndCopyModes(tree);
-                       },
-                       this
-               );
-       },
-
-       /**
-        * Copies the current tree context node as the first child of the given node
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @param {TYPO3.Components.PageTree.Tree} tree
-        * @return {void}
-        */
-       copyNodeToFirstChildOfDestination: function(node, tree) {
-               TYPO3.Components.PageTree.Commands.copyNodeToFirstChildOfDestination(
-                       tree.t3ContextNode.attributes.nodeData,
-                       node.parentNode.attributes.nodeData.id,
-                       function(response) {
-                               if (this.evaluateResponse(response)) {
-                                       this.updateNode(node, true, response, function(node) {
-                                               tree.triggerEdit(node);
-                                       });
-                               }
-                               this.releaseCutAndCopyModes(tree);
-                       },
-                       this
-               );
-       },
-
-       /**
-        * Visibilizes a page
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @return {void}
-        */
-       enablePage: function(node) {
-               TYPO3.Components.PageTree.Commands.visiblyNode(
-                       node.attributes.nodeData,
-                       function(response) {
-                               if (this.evaluateResponse(response)) {
-                                       this.updateNode(node, node.isExpanded(), response);
-                               }
-                       },
-                       this
-               );
-       },
-
-       /**
-        * Disables a page
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @return {void}
-        */
-       disablePage: function(node) {
-               TYPO3.Components.PageTree.Commands.disableNode(
-                       node.attributes.nodeData,
-                       function(response) {
-                               if (this.evaluateResponse(response)) {
-                                       this.updateNode(node, node.isExpanded(), response);
-                               }
-                       },
-                       this
-               );
-       },
-
-       /**
-        * Reloads the content frame with the current module and node id
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @param {TYPO3.Components.PageTree.Tree} tree
-        * @return {void}
-        */
-       singleClick: function(node, tree) {
-               tree.currentSelectedNode = node;
-
-               var separator = '?';
-               if (currentSubScript.indexOf('?') !== -1) {
-                       separator = '&';
-               }
-
-               node.select();
-               if (tree.stateHash) {
-                       tree.stateHash.lastSelectedNode = node.id;
-               } else {
-                       TYPO3.Components.PageTree.Commands.addRootlineOfNodeToStateHash(
-                               TYPO3.Backend.NavigationContainer.PageTree.mainTree.stateId,
-                               node.attributes.nodeData.id, function(stateHash) {
-                                       TYPO3.Backend.NavigationContainer.PageTree.mainTree.stateHash = stateHash;
-                                       TYPO3.Backend.NavigationContainer.PageTree.mainTree.refreshTree();
-                               }
-                       );
-               }
-
-               fsMod.recentIds['web'] = node.attributes.nodeData.id;
-
-               TYPO3.Backend.ContentContainer.setUrl(
-                       TS.PATH_typo3 + currentSubScript + separator + 'id=' + node.attributes.nodeData.id
-               );
-       },
-
-       /**
-        * Opens a configured url inside the content frame
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @param {TYPO3.Components.PageTree.Tree} tree
-        * @param {Object} contextItem
-        * @return {void}
-        */
-       openCustomUrlInContentFrame: function(node, tree, contextItem) {
-               if (!contextItem.customAttributes || !contextItem.customAttributes.contentUrl) {
-                       return;
-               }
-
-               node.select();
-               TYPO3.Backend.ContentContainer.setUrl(
-                       contextItem.customAttributes.contentUrl.replace('###ID###', node.attributes.nodeData.id)
-               );
-       },
-
-       /**
-        * Updates the title of a node
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @param {String} newText
-        * @param {String} oldText
-        * @param {TYPO3.Components.PageTree.TreeEditor} treeEditor
-        * @return {void}
-        */
-       saveTitle: function(node, newText, oldText, treeEditor) {
-               if (newText === oldText || newText == '') {
-                       treeEditor.updateNodeText(
-                               node,
-                               node.editNode.attributes.nodeData.editableText,
-                               Ext.util.Format.htmlEncode(oldText)
-                       );
-                       return;
-               }
-
-               TYPO3.Components.PageTree.Commands.updateLabel(
-                       node.editNode.attributes.nodeData,
-                       newText,
-                       function(response) {
-                               if (this.evaluateResponse(response)) {
-                                       treeEditor.updateNodeText(node, response.editableText, response.updatedText);
-                               } else {
-                                       treeEditor.updateNodeText(
-                                               node,
-                                               node.editNode.attributes.nodeData.editableText,
-                                               Ext.util.Format.htmlEncode(oldText)
-                                       );
-                               }
-                               this.singleClick(node.editNode, node.editNode.ownerTree);
-                       },
-                       this
-               );
-       }
-};
diff --git a/typo3/js/extjs/components/pagetree/javascript/app.js b/typo3/js/extjs/components/pagetree/javascript/app.js
deleted file mode 100644 (file)
index 3640a68..0000000
+++ /dev/null
@@ -1,389 +0,0 @@
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-Ext.namespace('TYPO3.Components.PageTree');
-
-/**
- * @class TYPO3.Components.PageTree.App
- *
- * Page tree main application that controls setups the components
- *
- * @namespace TYPO3.Components.PageTree
- * @extends Ext.Panel
- * @author Stefan Galinski <stefan.galinski@gmail.com>
- */
-TYPO3.Components.PageTree.App = Ext.extend(Ext.Panel, {
-       /**
-        * Panel id
-        *
-        * @type {String}
-        */
-       id: 'typo3-pagetree',
-
-       /**
-        * Border
-        *
-        * @type {Boolean}
-        */
-       border: false,
-
-       /**
-        * Layout Type
-        *
-        * @type {String}
-        */
-       layout:'fit',
-
-       /**
-        * Active tree
-        *
-        * @type {TYPO3.Components.PageTree.Tree}
-        */
-       activeTree: null,
-
-       /**
-        * Main pagetree
-        *
-        * @type {TYPO3.Components.PageTree.Tree}
-        */
-       mainTree: null,
-
-       /**
-        * Initializes the application
-        *
-        * Set's the necessary language labels, configuration options and sprite icons by an
-        * external call and initializes the needed components.
-        *
-        * @return {void}
-        */
-       initComponent: function() {
-               TYPO3.Components.PageTree.DataProvider.loadResources(function(response) {
-                       TYPO3.Components.PageTree.LLL = response['LLL'];
-                       TYPO3.Components.PageTree.Configuration = response['Configuration'];
-                       TYPO3.Components.PageTree.Sprites = response['Sprites'];
-
-                       this.mainTree = this.activeTree = new TYPO3.Components.PageTree.Tree({
-                               id: this.id + '-tree',
-                               deletionDropZoneId: this.id + '-deletionDropZone',
-                               ddGroup: this.id,
-                               stateful: true,
-                               stateId: 'Pagetree' + TYPO3.Components.PageTree.Configuration.temporaryMountPoint,
-                               stateEvents: [],
-                               autoScroll: true,
-                               autoHeight: false,
-                               plugins: new Ext.ux.state.TreePanel(),
-                               commandProvider: TYPO3.Components.PageTree.Actions,
-                               contextMenuProvider: TYPO3.Components.PageTree.ContextMenuDataProvider,
-                               treeDataProvider: TYPO3.Components.PageTree.DataProvider,
-                               app: this,
-                               listeners: {
-                                       resize: {
-                                               fn: function() {
-                                                       var treeContainer = Ext.getCmp(this.id + '-treeContainer');
-                                                       Ext.getCmp(this.id + '-filteringTree').setSize(treeContainer.getSize());
-                                                       treeContainer.doLayout();
-                                               },
-                                               scope: this,
-                                               buffer: 250
-                                       }
-                               }
-                       });
-
-                       var filteringTree = new TYPO3.Components.PageTree.FilteringTree({
-                               id: this.id + '-filteringTree',
-                               deletionDropZoneId: this.id + '-deletionDropZone',
-                               ddGroup: this.id,
-                               autoScroll: true,
-                               autoHeight: false,
-                               commandProvider: TYPO3.Components.PageTree.Actions,
-                               contextMenuProvider: TYPO3.Components.PageTree.ContextMenuDataProvider,
-                               treeDataProvider: TYPO3.Components.PageTree.DataProvider,
-                               app: this
-                       }).hide();
-
-                       var topPanel = new TYPO3.Components.PageTree.TopPanel({
-                               dataProvider: TYPO3.Components.PageTree.DataProvider,
-                               filteringTree: filteringTree,
-                               ddGroup: this.id,
-                               tree: this.mainTree,
-                               app: this
-                       });
-
-                       var deletionDropZone = new TYPO3.Components.PageTree.DeletionDropZone({
-                               id: this.id + '-deletionDropZone',
-                               commandProvider: TYPO3.Components.PageTree.Actions,
-                               ddGroup: this.id,
-                               app: this,
-                               region: 'south',
-                               height: 35
-                       });
-
-                       var topPanelItems = new Ext.Panel({
-                               id: this.id + '-topPanelItems',
-                               border: false,
-                               region: 'north',
-                               height: 49,
-                               items: [
-                                       topPanel, {
-                                               border: false,
-                                               id: this.id + '-indicatorBar'
-                                       }
-                               ]
-                       });
-
-                       this.add({
-                               layout: 'border',
-                               items: [
-                                       topPanelItems,
-                                       {
-                                               border: false,
-                                               id: this.id + '-treeContainer',
-                                               region: 'center',
-                                               layout: 'fit',
-                                               items: [this.mainTree, filteringTree]
-                                       },
-                                       deletionDropZone
-                               ]
-                       });
-
-                       if (TYPO3.Components.PageTree.Configuration.temporaryMountPoint) {
-                               topPanelItems.on('afterrender', function() {
-                                       this.addTemporaryMountPointIndicator();
-                               }, this);
-                       }
-
-                       if (TYPO3.Components.PageTree.Configuration.indicator !== '') {
-                               this.addIndicatorItems();
-                       }
-                       this.doLayout();
-
-                       this.ownerCt.on('resize', function() {
-                               this.doLayout();
-                       });
-               }, this);
-
-               TYPO3.Components.PageTree.App.superclass.initComponent.apply(this, arguments);
-       },
-
-       /**
-        * Adds the default indicator items
-        *
-        * @return {void}
-        */
-       addIndicatorItems: function() {
-               this.addIndicator({
-                       border: false,
-                       id: this.id + '-indicatorBar-indicatorTitle',
-                       cls: this.id + '-indicatorBar-item',
-                       html: TYPO3.Components.PageTree.Configuration.indicator
-               });
-       },
-
-       /**
-        * Adds the temporary mount point indicator item
-        *
-        * @return {void}
-        */
-       addTemporaryMountPointIndicator: function() {
-               this.temporaryMountPointInfoIndicator = this.addIndicator({
-                       border: false,
-                       id: this.id + '-indicatorBar-temporaryMountPoint',
-                       cls: this.id + '-indicatorBar-item',
-
-                       listeners: {
-                               afterrender: {
-                                       fn: function() {
-                                               var element = Ext.fly(this.id + '-indicatorBar-temporaryMountPoint-clear');
-                                               element.on('click', function() {
-                                                       TYPO3.BackendUserSettings.ExtDirect.unsetKey(
-                                                               'pageTree_temporaryMountPoint',
-                                                               function() {
-                                                                       TYPO3.Components.PageTree.Configuration.temporaryMountPoint = null;
-                                                                       this.removeIndicator(this.temporaryMountPointInfoIndicator);
-                                                                       this.getTree().refreshTree();
-                                                                       this.getTree().stateId = 'Pagetree';
-                                                               },
-                                                               this
-                                                       );
-                                               }, this);
-                                       },
-                                       scope: this
-                               }
-                       },
-
-                       html: '<p>' +
-                                       '<span id="' + this.id + '-indicatorBar-temporaryMountPoint-info' + '" ' +
-                                               'class="' + this.id + '-indicatorBar-item-leftIcon ' +
-                                                       TYPO3.Components.PageTree.Sprites.Info + '">&nbsp;' +
-                                       '</span>' +
-                                       '<span id="' + this.id + '-indicatorBar-temporaryMountPoint-clear' + '" ' +
-                                               'class="' + this.id + '-indicatorBar-item-rightIcon ' + '">X' +
-                                       '</span>' +
-                                       TYPO3.Components.PageTree.LLL.temporaryMountPointIndicatorInfo + '<br />' +
-                                               TYPO3.Components.PageTree.Configuration.temporaryMountPoint +
-                               '</p>'
-               });
-       },
-
-       /**
-        * Adds an indicator item
-        *
-        * @param {Object} component
-        * @return {void}
-        */
-       addIndicator: function(component) {
-               if (component.listeners && component.listeners.afterrender) {
-                       component.listeners.afterrender.fn = component.listeners.afterrender.fn.createSequence(
-                               this.afterTopPanelItemAdded, this
-                       );
-               } else {
-                       if (component.listeners) {
-                               component.listeners = {}
-                       }
-
-                       component.listeners.afterrender = {
-                               scope: this,
-                               fn: this.afterTopPanelItemAdded
-                       }
-               }
-
-               var indicator = Ext.getCmp(this.id + '-indicatorBar').add(component);
-               this.doLayout();
-
-               return indicator;
-       },
-
-       /**
-        * Recalculates the top panel items height after an indicator was added
-        *
-        * @param {Ext.Component} component
-        * @return {void}
-        */
-       afterTopPanelItemAdded: function(component) {
-               var topPanelItems = Ext.getCmp(this.id + '-topPanelItems');
-               topPanelItems.setHeight(topPanelItems.getHeight() + component.getHeight() + 3);
-               this.doLayout();
-       },
-
-       /**
-        * Removes an indicator item from the indicator bar
-        *
-        * @param {Ext.Component} component
-        * @return {void}
-        */
-       removeIndicator: function(component) {
-               var topPanelItems = Ext.getCmp(this.id + '-topPanelItems');
-               topPanelItems.setHeight(topPanelItems.getHeight() - component.getHeight() - 3);
-               Ext.getCmp(this.id + '-indicatorBar').remove(component);
-               this.doLayout();
-       },
-
-       /**
-        * Compatibility method that calls refreshTree()
-        *
-        * @return {void}
-        */
-       refresh: function() {
-               this.refreshTree();
-       },
-
-       /**
-        * Another compatibility method that calls refreshTree()
-        *
-        * @return {void}
-        */
-       refresh_nav: function() {
-               this.refreshTree();
-       },
-
-       /**
-        * Refreshes the tree and selects the node defined by fsMod.recentIds['web']
-        *
-        * @return {void}
-        */
-       refreshTree: function() {
-               if (!isNaN(fsMod.recentIds['web']) && fsMod.recentIds['web'] !== '') {
-                       this.select(fsMod.recentIds['web'], true);
-               }
-
-               TYPO3.Components.PageTree.DataProvider.getIndicators(function(response) {
-                       var indicators = Ext.getCmp(this.id + '-indicatorBar-indicatorTitle');
-                       if (indicators) {
-                               this.removeIndicator(indicators);
-                       }
-
-                       if (response._COUNT > 0) {
-                               TYPO3.Components.PageTree.Configuration.indicator = response.html;
-                               this.addIndicatorItems();
-                       }
-               }, this);
-
-               this.activeTree.refreshTree();
-       },
-
-       /**
-        * Returns the current active tree
-        *
-        * @return {TYPO3.Components.PageTree.Tree}
-        */
-       getTree: function() {
-               return this.activeTree;
-       },
-
-       /**
-        * Selects a node defined by the page id. If the second parameter is set, we
-        * store the new location into the state hash.
-        *
-        * @param {int} pageId
-        * @return {Boolean}
-        */
-       select: function(pageId) {
-               TYPO3.Components.PageTree.Commands.addRootlineOfNodeToStateHash(
-                       TYPO3.Backend.NavigationContainer.PageTree.mainTree.stateId,
-                       pageId, function(stateHash) {
-                               TYPO3.Backend.NavigationContainer.PageTree.mainTree.stateHash = stateHash;
-                               TYPO3.Backend.NavigationContainer.PageTree.mainTree.refreshTree();
-                       }
-               );
-
-               return true;
-       },
-
-       /**
-        * Returns the currently selected node
-        *
-        * @return {Ext.tree.TreeNode}
-        */
-       getSelected: function() {
-               var node = this.getTree().getSelectionModel().getSelectedNode();
-               return node ? node : null;
-       }
-});
-
-/**
- * Callback method for the module menu
- *
- * @return {TYPO3.Components.PageTree.App}
- */
-TYPO3.ModuleMenu.App.registerNavigationComponent('typo3-pagetree', function() {
-       TYPO3.Backend.NavigationContainer.PageTree = new TYPO3.Components.PageTree.App();
-
-               // compatibility code
-    top.nav = TYPO3.Backend.NavigationContainer.PageTree;
-    top.nav_frame = TYPO3.Backend.NavigationContainer.PageTree;
-    top.content.nav_frame = TYPO3.Backend.NavigationContainer.PageTree;
-
-       return TYPO3.Backend.NavigationContainer.PageTree;
-});
-
-// XTYPE Registration
-Ext.reg('TYPO3.Components.PageTree.App', TYPO3.Components.PageTree.App);
diff --git a/typo3/js/extjs/components/pagetree/javascript/contextmenu.js b/typo3/js/extjs/components/pagetree/javascript/contextmenu.js
deleted file mode 100644 (file)
index 9e0ff58..0000000
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-Ext.namespace('TYPO3.Components.PageTree');
-
-/**
- * @class TYPO3.Components.PageTree.ContextMenu
- *
- * Context menu implementation
- *
- * @namespace TYPO3.Components.PageTree
- * @extends Ext.menu.Menu
- * @author Stefan Galinski <stefan.galinski@gmail.com>
- */
-TYPO3.Components.PageTree.ContextMenu = Ext.extend(Ext.menu.Menu, {
-       /**
-        * Context menu node
-        *
-        * @cfg {Ext.tree.TreeNode}
-        */
-       node: null,
-
-       /**
-        * Page Tree
-        *
-        * @cfg {TYPO3.Components.PageTree.Tree}
-        */
-       pageTree: null,
-
-       /**
-        * Component Id
-        *
-        * @type {String}
-        */
-       id: 'typo3-pagetree-contextmenu',
-
-       /**
-        * Parent clicks should be ignored
-        *
-        * @type {Boolean}
-        */
-       ignoreParentClicks: true,
-
-       /**
-        * Listeners
-        *
-        * The itemclick event triggers the configured single click action
-        */
-       listeners: {
-               itemclick: {
-                       fn: function (item) {
-                               if (this.pageTree.commandProvider[item.callbackAction]) {
-                                       if (item.parentMenu.pageTree.stateHash) {
-                                               fsMod.recentIds['web'] = item.parentMenu.node.attributes.nodeData.id;
-                                               item.parentMenu.pageTree.stateHash['lastSelectedNode'] = item.parentMenu.node.id;
-                                       }
-
-                                       this.pageTree.commandProvider[item.callbackAction](
-                                               item.parentMenu.node,
-                                               item.parentMenu.pageTree,
-                                               item
-                                       );
-                               }
-                       }
-               }
-       },
-
-       /**
-        * Fills the menu with the actions
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @param {TYPO3.Components.PageTree.Tree} pageTree
-        * @param {Object} contextMenuConfiguration
-        * @return {void}
-        */
-       fill: function(node, pageTree, contextMenuConfiguration) {
-               this.node = node;
-               this.pageTree = pageTree;
-
-               var components = this.preProcessContextMenuConfiguration(contextMenuConfiguration);
-               if (components.length) {
-                       for (var component in components) {
-                               if (components[component] === '-') {
-                                       this.addSeparator();
-                               } else if (typeof components[component] === 'object') {
-                                       this.addItem(components[component]);
-                               }
-                       }
-               }
-       },
-
-       /**
-        * Parses the context menu actions array recursively and generates the
-        * components for the context menu including separators/dividers and sub menus
-        *
-        * @param {Object} contextMenuConfiguration
-        * @param {int} level
-        * @return {Object}
-        */
-       preProcessContextMenuConfiguration: function(contextMenuConfiguration, level) {
-               level = level || 0;
-               if (level > 5) {
-                       return [];
-               }
-
-               var components = [];
-               var index = 0;
-
-               var modulesInsideGroup = false;
-               var subMenus = 0;
-               for (var singleAction in contextMenuConfiguration) {
-                       if (contextMenuConfiguration[singleAction]['type'] === 'submenu') {
-                               var subMenuComponents = this.preProcessContextMenuConfiguration(
-                                       contextMenuConfiguration[singleAction]['childActions'],
-                                       level + 1
-                               );
-
-                               if (subMenuComponents.length) {
-                                       var subMenu = new TYPO3.Components.PageTree.ContextMenu({
-                                               id: this.id + '-sub' + ++subMenus,
-                                               items: subMenuComponents,
-                                               node: this.node,
-                                               pageTree: this.pageTree
-                                       });
-
-                                       components[index++] = {
-                                               text: contextMenuConfiguration[singleAction]['label'],
-                                               cls: 'contextMenu-subMenu',
-                                               menu: subMenu,
-                                               icon: contextMenuConfiguration[singleAction]['icon'],
-                                               iconCls: contextMenuConfiguration[singleAction]['class']
-                                       };
-                               }
-                       } else if (contextMenuConfiguration[singleAction]['type'] === 'divider') {
-                               if (modulesInsideGroup) {
-                                       components[index++] = '-';
-                                       modulesInsideGroup = false;
-                               }
-                       } else {
-                               modulesInsideGroup = true;
-
-                               if (typeof contextMenuConfiguration[singleAction] === 'object') {
-                                       var component = {
-                                               'text': contextMenuConfiguration[singleAction]['label'],
-                                               'icon': contextMenuConfiguration[singleAction]['icon'],
-                                               'iconCls': contextMenuConfiguration[singleAction]['class'],
-                                               'callbackAction': contextMenuConfiguration[singleAction]['callbackAction'],
-                                               'customAttributes': contextMenuConfiguration[singleAction]['customAttributes']
-                                       };
-                                       component.itemTpl = Ext.menu.Item.prototype.itemTpl = new Ext.XTemplate(
-                                               '<a id="{id}" class="{cls}" hidefocus="true" unselectable="on" href="{href}">',
-                                                       '<span class="{hrefTarget}">',
-                                                               '<span class="x-menu-item-icon" unselectable="on"><span class="{iconCls}"></span></span>',
-                                                       '</span>',
-                                                       '<span class="x-menu-item-text">{text}</span>',
-                                               '</a>'
-                                       );
-
-                                       components[index++] = component;
-                               }
-                       }
-               }
-
-                       // remove divider if it's the last item of the context menu
-               if (components[components.length - 1] === '-') {
-                       components[components.length - 1] = '';
-               }
-
-               return components;
-       }
-});
-
-// XTYPE Registration
-Ext.reg('TYPO3.Components.PageTree.ContextMenu', TYPO3.Components.PageTree.ContextMenu);
diff --git a/typo3/js/extjs/components/pagetree/javascript/deletiondropzone.js b/typo3/js/extjs/components/pagetree/javascript/deletiondropzone.js
deleted file mode 100644 (file)
index 967a036..0000000
+++ /dev/null
@@ -1,309 +0,0 @@
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-Ext.namespace('TYPO3.Components.PageTree');
-
-/**
- * @class TYPO3.Components.PageTree.DeletionDropZone
- *
- * Deletion Drop Zone
- *
- * @namespace TYPO3.Components.PageTree
- * @extends Ext.Panel
- * @author Stefan Galinski <stefan.galinski@gmail.com>
- */
-TYPO3.Components.PageTree.DeletionDropZone = Ext.extend(Ext.Panel, {
-       /**
-        * Border
-        *
-        * @type {Boolean}
-        */
-       border: true,
-
-       /**
-        * Hide the drop zone initially
-        *
-        * @type {Boolean}
-        */
-       hidden: true,
-
-       /**
-        * Command Provider
-        *
-        * @cfg {Object}
-        */
-       commandProvider: null,
-
-       /**
-        * Drag and Drop Group
-        *
-        * @cfg {String}
-        */
-       ddGroup: '',
-
-       /**
-        * Main Application
-        *
-        * @cfg {TYPO3.Components.PageTree.App}
-        */
-       app: null,
-
-       /**
-        * Removed node had a previous sibling
-        *
-        * @type {Boolean}
-        */
-       isPreviousSibling: false,
-
-       /**
-        * Removed node
-        *
-        * @type {Ext.tree.TreeNode}
-        */
-       previousNode: null,
-
-       /**
-        * Click Handler for the recovery text
-        *
-        * @type {Function}
-        */
-       textClickHandler: null,
-
-       /**
-        * Amount of drops (used to prevent early hiding of the box)
-        *
-        * @type {int}
-        */
-       amountOfDrops: 0,
-
-       /**
-        * Listeners
-        *
-        * The "afterrender" event creates the drop zone
-        */
-       listeners: {
-               afterrender: {
-                       fn: function() {
-                               this.createDropZone();
-
-                               this.getEl().on('mouseout', function(e) {
-                                       if (!e.within(this.getEl(), true)) {
-                                               this.removeClass(this.id + '-activateProxyOver');
-                                               if (!this.app.activeTree.shouldCopyNode) {
-                                                       this.app.activeTree.copyHint.show();
-                                               }
-                                       }
-                               }, this);
-                       }
-               },
-
-               beforehide: {
-                       fn: function() {
-                               if (this.textClickHandler) {
-                                       return false;
-                               }
-                       }
-               }
-       },
-
-       /**
-        * Initializes the component
-        *
-        * @return {void}
-        */
-       initComponent: function() {
-               this.html = '<p><span id="' + this.id + '-icon" class="' +
-                       TYPO3.Components.PageTree.Sprites.TrashCan +
-                       '">&nbsp;</span><span id="' + this.id + '-text">' +
-                       TYPO3.Components.PageTree.LLL.dropToRemove + '</span></p>';
-
-               TYPO3.Components.PageTree.DeletionDropZone.superclass.initComponent.apply(this, arguments);
-       },
-
-
-       /**
-        * Creates the drop zone and it's functionality
-        *
-        * @return {void}
-        */
-       createDropZone: function() {
-               (new Ext.dd.DropZone(this.getEl(), {
-                       ddGroup: this.ddGroup,
-
-                       notifyOver: function(ddProxy, e) {
-                               ddProxy.setDragElPos(e.xy[0], e.xy[1] - 60);
-                               return this.id + '-proxyOver';
-                       }.createDelegate(this),
-
-                       notifyEnter: function() {
-                               this.addClass(this.id + '-activateProxyOver');
-                               if (!this.app.activeTree.shouldCopyNode) {
-                                       this.app.activeTree.copyHint.hide();
-                               }
-
-                               return this.id + '-proxyOver';
-                       }.createDelegate(this),
-
-                       notifyDrop: function(ddProxy, e, n) {
-                               var node = n.node;
-                               if (!node) {
-                                       return;
-                               }
-
-                               var tree = node.ownerTree;
-                               var nodeHasChildNodes = (node.hasChildNodes() || node.isExpandable());
-
-                               var callback = null;
-                               if (!top.TYPO3.configuration.inWorkspace && !nodeHasChildNodes) {
-                                       callback = this.setRecoverState.createDelegate(this);
-                               }
-
-                               if (nodeHasChildNodes) {
-                                       node.ownerTree.commandProvider.confirmDelete(node, tree, callback, true);
-                               } else {
-                                       node.ownerTree.commandProvider.deleteNode(node, tree, callback);
-                               }
-                       }.createDelegate(this)
-               }));
-       },
-
-       /**
-        * Sets the drop zone into the recovery state
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @param {TYPO3.Components.PageTree.Tree} tree
-        * @param {Boolean} succeeded
-        * @return {void}
-        */
-       setRecoverState: function(node, tree, succeeded) {
-               if (!succeeded) {
-                       this.toOriginState();
-                       return;
-               }
-
-               this.show();
-               this.setHeight(50);
-               this.updateIcon(TYPO3.Components.PageTree.Sprites.TrashCanRestore);
-               this.updateText(
-                       node.text + '<br />' +
-                       '<span class="' + this.id + '-restore">' +
-                               '<span class="' + this.id + '-restoreText">' +
-                               TYPO3.Components.PageTree.LLL.dropZoneElementRemoved +
-                               '</span>' +
-                       '</span>',
-                       false
-               );
-               this.app.doLayout();
-
-               ++this.amountOfDrops;
-               (function() {
-                       if (!--this.amountOfDrops) {
-                               this.toOriginState();
-                       }
-               }).defer(10000, this);
-
-               this.textClickHandler = this.restoreNode.createDelegate(this, [node, tree]);
-               Ext.get(this.id + '-text').on('click', this.textClickHandler);
-
-               this.isPreviousSibling = false;
-               this.previousNode = node.parentNode;
-               if (node.previousSibling) {
-                       this.previousNode = node.previousSibling;
-                       this.isPreviousSibling = true;
-               }
-       },
-
-       /**
-        * Updates the drop zone text label
-        *
-        * @param {String} text
-        * @param {Boolean} animate
-        * @return {void}
-        */
-       updateText: function(text, animate) {
-               animate = animate || false;
-
-               var elementText = Ext.get(this.id + '-text');
-               if (animate) {
-                       elementText.animate({opacity: {to: 0}}, 1, function(elementText) {
-                               elementText.update(text);
-                               elementText.setStyle('opacity', 1);
-                       });
-               } else {
-                       elementText.update(text);
-               }
-       },
-
-       /**
-        * Updates the drop zone icon with another sprite icon
-        *
-        * @param {String} classes
-        * @return {void}
-        */
-       updateIcon: function(classes) {
-               Ext.get(this.id + '-icon').set({
-                       'class': classes
-               });
-       },
-
-       /**
-        * Resets the drop zone to the initial state
-        *
-        * @param {Boolean} hide
-        * @return {void}
-        */
-       toOriginState: function(hide) {
-               if (hide !== false) {
-                       hide = true;
-               }
-
-               Ext.get(this.id + '-text').un('click', this.textClickHandler);
-               this.previousNode = this.textClickHandler = null;
-               this.isPreviousSibling = false;
-
-               if (hide && !this.app.activeTree.dragZone.dragging) {
-                       this.hide();
-               }
-
-               this.setHeight(35);
-               this.updateText(TYPO3.Components.PageTree.LLL.dropToRemove, false);
-               this.updateIcon(TYPO3.Components.PageTree.Sprites.TrashCan);
-               this.app.doLayout();
-       },
-
-       /**
-        * Restores the last removed node
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @param {TYPO3.Components.PageTree.Tree} tree
-        * @return {void}
-        */
-       restoreNode: function(node, tree) {
-               if (this.isPreviousSibling) {
-                       this.commandProvider.restoreNodeAfterDestination(node, tree, this.previousNode);
-               } else {
-                       this.commandProvider.restoreNodeToFirstChildOfDestination(node, tree, this.previousNode);
-               }
-               this.setHeight(35);
-               this.updateText(TYPO3.Components.PageTree.LLL.dropZoneElementRestored);
-               this.app.doLayout();
-
-               (function() {
-                       if (this.textClickHandler) {
-                               this.toOriginState();
-                       }
-               }).defer(3000, this);
-       }
-});
-
-// XTYPE Registration
-Ext.reg('TYPO3.Components.PageTree.DeletionDropZone', TYPO3.Components.PageTree.DeletionDropZone);
diff --git a/typo3/js/extjs/components/pagetree/javascript/filteringtree.js b/typo3/js/extjs/components/pagetree/javascript/filteringtree.js
deleted file mode 100644 (file)
index 6ab9d07..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-Ext.namespace('TYPO3.Components.PageTree');
-
-/**
- * @class TYPO3.Components.PageTree.FilteringTree
- *
- * Filtering Tree
- *
- * @namespace TYPO3.Components.PageTree
- * @extends TYPO3.Components.PageTree.Tree
- * @author Stefan Galinski <stefan.galinski@gmail.com>
- */
-TYPO3.Components.PageTree.FilteringTree = Ext.extend(TYPO3.Components.PageTree.Tree, {
-       /**
-        * Search word
-        *
-        * @type {String}
-        */
-       searchWord: '',
-
-       /**
-        * Tree loader implementation for the filtering tree
-        *
-        * @return {void}
-        */
-       addTreeLoader: function() {
-               this.loader = new Ext.tree.TreeLoader({
-                       directFn: this.treeDataProvider.getFilteredTree,
-                       paramOrder: 'nodeId,attributes,searchWord',
-                       nodeParameter: 'nodeId',
-                       baseAttrs: {
-                               uiProvider: this.uiProvider
-                       },
-
-                       listeners: {
-                               beforeload: function(treeLoader, node) {
-                                       if (!node.ownerTree.searchWord || node.ownerTree.searchWord === '') {
-                                               return false;
-                                       }
-
-                                       treeLoader.baseParams.nodeId = node.id;
-                                       treeLoader.baseParams.searchWord = node.ownerTree.searchWord;
-                                       treeLoader.baseParams.attributes = node.attributes.nodeData;
-                               }
-                       }
-               });
-       }
-});
-
-// XTYPE Registration
-Ext.reg('TYPO3.Components.PageTree.FilteringTree', TYPO3.Components.PageTree.FilteringTree);
diff --git a/typo3/js/extjs/components/pagetree/javascript/loadorder.txt b/typo3/js/extjs/components/pagetree/javascript/loadorder.txt
deleted file mode 100644 (file)
index a649b22..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-treeeditor.js
-tree.js
-filteringtree.js
-nodeui.js
-deletiondropzone.js
-toppanel.js
-contextmenu.js
-actions.js
-Ext.ux.state.TreePanel.js
-app.js
diff --git a/typo3/js/extjs/components/pagetree/javascript/nodeui.js b/typo3/js/extjs/components/pagetree/javascript/nodeui.js
deleted file mode 100644 (file)
index bbc7be4..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-Ext.namespace('TYPO3.Components.PageTree');
-
-/**
- * @class TYPO3.Components.PageTree.DeletionDropZone
- *
- * Tree Node User Interface that can handle sprite icons and more
- *
- * @namespace TYPO3.Components.PageTree
- * @extends Ext.tree.TreeNodeUI
- * @author Stefan Galinski <stefan.galinski@gmail.com>
- */
-TYPO3.Components.PageTree.PageTreeNodeUI = Ext.extend(Ext.tree.TreeNodeUI, {
-       /**
-        * Adds the sprite icon and adds an event to open the context menu on a single click at the icon node
-        *
-        * @param {Ext.tree.TreeNode} n
-        * @param {Object} a
-        * @param {Ext.tree.TreeNode} targetNode
-        * @param {Boolean} bulkRender
-        * @return {void}
-        */
-       renderElements : function(n, a, targetNode, bulkRender) {
-               // add some indent caching, this helps performance when rendering a large tree
-        this.indentMarkup = n.parentNode ? n.parentNode.ui.getChildIndent() : '';
-
-        var cb = Ext.isBoolean(a.checked),
-            nel,
-            href = this.getHref(a.href),
-                       nodeStyles = '',
-                       rootline = '';
-
-                       // TYPO3 modification to show the readable rootline above the user mounts
-               if (a.readableRootline !== '') {
-                       rootline = '<li class="x-tree-node-readableRootline">' + a.readableRootline + '</li>';
-               }
-
-               if (a.nodeData.backgroundColor) {
-                       nodeStyles = 'style="background-color: ' + a.nodeData.backgroundColor + '"';
-               }
-
-               var buf = [rootline,'<li class="x-tree-node" ' + nodeStyles + '><div ext:tree-node-id="',n.id,'" class="x-tree-node-el x-tree-node-leaf x-unselectable ', a.cls,'" unselectable="on">',
-            '<span class="x-tree-node-indent">',this.indentMarkup,"</span>",
-            '<img alt="" src="', this.emptyIcon, '" class="x-tree-ec-icon x-tree-elbow" />',
-//            '<img alt="" src="', a.icon || this.emptyIcon, '" class="x-tree-node-icon',(a.icon ? " x-tree-node-inline-icon" : ""),(a.iconCls ? " "+a.iconCls : ""),'" unselectable="on" />',
-                       a.spriteIconCode, // TYPO3: add sprite icon code
-            cb ? ('<input class="x-tree-node-cb" type="checkbox" ' + (a.checked ? 'checked="checked" />' : '/>')) : '',
-            '<a hidefocus="on" class="x-tree-node-anchor" href="',href,'" tabIndex="1" ',
-             a.hrefTarget ? ' target="'+a.hrefTarget+'"' : "", '><span unselectable="on">',n.text,"</span></a></div>",
-            '<ul class="x-tree-node-ct" style="display:none;"></ul>',
-            "</li>"].join('');
-
-        if(bulkRender !== true && n.nextSibling && (nel = n.nextSibling.ui.getEl())){
-            this.wrap = Ext.DomHelper.insertHtml("beforeBegin", nel, buf);
-        }else{
-            this.wrap = Ext.DomHelper.insertHtml("beforeEnd", targetNode, buf);
-        }
-
-        this.elNode = this.wrap.childNodes[0];
-        this.ctNode = this.wrap.childNodes[1];
-        var cs = this.elNode.childNodes;
-        this.indentNode = cs[0];
-        this.ecNode = cs[1];
-//        this.iconNode = cs[2];
-               this.iconNode = (cs[2].firstChild.tagName === 'SPAN' ? cs[2].firstChild : cs[2]); // TYPO3: get possible overlay icon
-        var index = 3; // TYPO3: index 4?
-        if(cb){
-            this.checkbox = cs[3];
-            // fix for IE6
-            this.checkbox.defaultChecked = this.checkbox.checked;
-            index++;
-        }
-        this.anchor = cs[index];
-        this.textNode = cs[index].firstChild;
-
-                       // TYPO3: call the context menu on a single click (Beware of drag&drop!)
-               if (!TYPO3.Components.PageTree.Configuration.disableIconLinkToContextmenu
-                       || TYPO3.Components.PageTree.Configuration.disableIconLinkToContextmenu === '0'
-               ) {
-                       Ext.fly(this.iconNode).on('click', function(event) {
-                               this.getOwnerTree().fireEvent('contextmenu', this, event);
-                               event.stopEvent();
-                       }, n);
-               }
-       },
-
-       /**
-        * Adds a quick tip to the sprite icon
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @param {Object} tip
-        * @param {String} title
-        * @return {void}
-        */
-       onTipChange : function(node, tip, title) {
-               TYPO3.Components.PageTree.PageTreeNodeUI.superclass.onTipChange.apply(this, arguments);
-
-       if(this.rendered){
-               var hasTitle = Ext.isDefined(title);
-               if(this.iconNode.setAttributeNS){
-                       this.iconNode.setAttributeNS("ext", "qtip", tip);
-               if(hasTitle){
-                       this.iconNode.setAttributeNS("ext", "qtitle", title);
-               }
-               }else{
-                       this.iconNode.setAttribute("ext:qtip", tip);
-               if(hasTitle){
-                       this.iconNode.setAttribute("ext:qtitle", title);
-               }
-       }
-       }
-       },
-
-       /**
-        * Returns the drag and drop handles
-        *
-        * @return {Object}
-        */
-       getDDHandles: function() {
-               var ddHandles = [this.iconNode, this.textNode, this.elNode];
-               var handlesIndex = ddHandles.length;
-
-               var textNode = Ext.get(this.textNode);
-               for (var i = 0; i < textNode.dom.childNodes.length; ++i) {
-                       if (textNode.dom.childNodes[i].nodeName === 'SPAN') {
-                               ddHandles[handlesIndex++] = textNode.dom.childNodes[i];
-                       }
-               }
-
-               return ddHandles;
-       },
-
-       /**
-        * Only set the onOver class if we are not in dragging mode
-        *
-        * @return {void}
-        */
-       onOver: function() {
-               if (!this.node.ownerTree.dontSetOverClass) {
-                       TYPO3.Components.PageTree.PageTreeNodeUI.superclass.onOver.apply(this, arguments);
-               }
-       }
-});
-
-// XTYPE Registration
-Ext.reg('TYPO3.Components.PageTree.PageTreeNodeUI', TYPO3.Components.PageTree.PageTreeNodeUI);
\ No newline at end of file
diff --git a/typo3/js/extjs/components/pagetree/javascript/toppanel.js b/typo3/js/extjs/components/pagetree/javascript/toppanel.js
deleted file mode 100644 (file)
index aa7d768..0000000
+++ /dev/null
@@ -1,472 +0,0 @@
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-Ext.namespace('TYPO3.Components.PageTree');
-
-/**
- * @class TYPO3.Components.PageTree.TopPanel
- *
- * Top Panel
- *
- * @namespace TYPO3.Components.PageTree
- * @extends Ext.Panel
- * @author Stefan Galinski <stefan.galinski@gmail.com>
- */
-TYPO3.Components.PageTree.TopPanel = Ext.extend(Ext.Panel, {
-       /**
-        * Component Id
-        *
-        * @type {String}
-        */
-       id: 'typo3-pagetree-topPanel',
-
-       /**
-        * Border
-        *
-        * @type {Boolean}
-        */
-       border: false,
-
-       /**
-        * Toolbar Object
-        *
-        * @type {Ext.Toolbar}
-        */
-       tbar: new Ext.Toolbar(),
-
-       /**
-        * Currently Clicked Toolbar Button
-        *
-        * @type {Ext.Button}
-        */
-       currentlyClickedButton: null,
-
-       /**
-        * Currently Shown Panel
-        *
-        * @type {Ext.Component}
-        */
-       currentlyShownPanel: null,
-
-       /**
-        * Filtering Indicator Item
-        *
-        * @type {Ext.Panel}
-        */
-       filteringIndicator: null,
-
-       /**
-        * Drag and Drop Group
-        *
-        * @cfg {String}
-        */
-       ddGroup: '',
-
-       /**
-        * Data Provider
-        *
-        * @cfg {Object}
-        */
-       dataProvider: null,
-
-       /**
-        * Filtering Tree
-        *
-        * @cfg {TYPO3.Components.PageTree.FilteringTree}
-        */
-       filteringTree: null,
-
-       /**
-        * Page Tree
-        *
-        * @cfg {TYPO3.Components.PageTree.Tree}
-        */
-       tree: null,
-
-       /**
-        * Application Panel
-        *
-        * @cfg {TYPO3.Components.PageTree.App}
-        */
-       app: null,
-
-       /**
-        * Initializes the component
-        *
-        * @return {void}
-        */
-       initComponent: function() {
-               this.currentlyShownPanel = new Ext.Panel({
-                       id: this.id + '-defaultPanel',
-                       cls: this.id + '-item'
-               });
-               this.items = [this.currentlyShownPanel];
-
-               TYPO3.Components.PageTree.TopPanel.superclass.initComponent.apply(this, arguments);
-
-               this.addDragDropNodeInsertionFeature();
-
-               if (!TYPO3.Components.PageTree.Configuration.hideFilter
-                       || TYPO3.Components.PageTree.Configuration.hideFilter === '0'
-               ) {
-                       this.addFilterFeature();
-               }
-
-               this.getTopToolbar().addItem({xtype: 'tbfill'});
-               this.addRefreshTreeFeature();
-       },
-
-       /**
-        * Returns a custom button template to fix some nasty webkit issues
-        * by removing some useless wrapping html code
-        *
-        * @return {void}
-        */
-       getButtonTemplate: function() {
-               return new Ext.Template(
-                       '<div id="{4}" class="x-btn {3}"><button type="{0}"">&nbsp;</button></div>'
-               );
-       },
-
-       /**
-        * Adds a button to the components toolbar with a related component
-        *
-        * @param {Object} button
-        * @param {Object} connectedWidget
-        * @return {void}
-        */
-       addButton: function(button, connectedWidget) {
-               button.template = this.getButtonTemplate();
-               if (!button.hasListener('click')) {
-                       button.on('click', this.topbarButtonCallback);
-               }
-
-               if (connectedWidget) {
-                       connectedWidget.hidden = true;
-                       button.connectedWidget = connectedWidget;
-                       this.add(connectedWidget);
-               }
-
-               this.getTopToolbar().addItem(button);
-               this.doLayout();
-       },
-
-       /**
-        * Usual button callback method that triggers the assigned component of the
-        * clicked toolbar button
-        *
-        * @return {void}
-        */
-       topbarButtonCallback: function() {
-               var topPanel = this.ownerCt.ownerCt;
-
-               topPanel.currentlyShownPanel.hide();
-               if (topPanel.currentlyClickedButton) {
-                       topPanel.currentlyClickedButton.toggle(false);
-               }
-
-               if (topPanel.currentlyClickedButton === this) {
-                       topPanel.currentlyClickedButton = null;
-                       topPanel.currentlyShownPanel = topPanel.get(topPanel.id + '-defaultPanel');
-               } else {
-                       this.toggle(true);
-                       topPanel.currentlyClickedButton = this;
-                       topPanel.currentlyShownPanel = this.connectedWidget;
-               }
-
-               topPanel.currentlyShownPanel.show();
-       },
-
-       /**
-        * Loads the filtering tree nodes with the given search word
-        *
-        * @param {Ext.form.TextField} textField
-        * @return {void}
-        */
-       createFilterTree: function(textField) {
-               var searchWord = textField.getValue();
-               var isNumber = TYPO3.Utility.isNumber(searchWord);
-               var hasMinLength = (searchWord.length > 2 || searchWord.length <= 0);
-               if ((!hasMinLength && !isNumber) || searchWord === this.filteringTree.searchWord) {
-                       return;
-               }
-
-               this.filteringTree.searchWord = searchWord;
-               if (this.filteringTree.searchWord === '') {
-                       this.app.activeTree = this.tree;
-
-                       textField.setHideTrigger(true);
-                       this.filteringTree.hide();
-                       this.tree.show().refreshTree(function() {
-                               textField.focus(false, 500);
-                       }, this);
-
-                       if (this.filteringIndicator) {
-                               this.app.removeIndicator(this.filteringIndicator);
-                               this.filteringIndicator = null;
-                       }
-               } else {
-                       var selectedNode = this.app.getSelected();
-                       this.app.activeTree = this.filteringTree;
-
-                       if (!this.filteringIndicator) {
-                               this.filteringIndicator = this.app.addIndicator(
-                                       this.createIndicatorItem(textField)
-                               );
-                       }
-
-                       textField.setHideTrigger(false);
-                       this.tree.hide();
-                       this.app.ownerCt.getEl().mask('', 'x-mask-loading-message');
-                       this.app.ownerCt.getEl().addClass('t3-mask-loading');
-                       this.filteringTree.show().refreshTree(function() {
-                               if (selectedNode) {
-                                       this.app.select(selectedNode.attributes.nodeData.id, false);
-                               }
-                               textField.focus();
-                               this.app.ownerCt.getEl().unmask();
-                       }, this);
-               }
-
-               this.doLayout();
-       },
-
-       /**
-        * Adds an indicator item to the page tree application for the filtering feature
-        *
-        * @param {Ext.form.TextField} textField
-        * @return {void}
-        */
-       createIndicatorItem: function(textField) {
-               return {
-                       border: false,
-                       id: this.app.id + '-indicatorBar-filter',
-                       cls: this.app.id + '-indicatorBar-item',
-                       html: '<p>' +
-                                       '<span id="' + this.app.id + '-indicatorBar-filter-info' + '" ' +
-                                               'class="' + this.app.id + '-indicatorBar-item-leftIcon ' +
-                                                       TYPO3.Components.PageTree.Sprites.Info + '">&nbsp;' +
-                                       '</span>' +
-                                       '<span id="' + this.app.id + '-indicatorBar-filter-clear' + '" ' +
-                                               'class="' + this.app.id + '-indicatorBar-item-rightIcon ' + '">X' +
-                                       '</span>' +
-                                       TYPO3.Components.PageTree.LLL.activeFilterMode +
-                               '</p>',
-                       filteringTree: this.filteringTree,
-
-                       listeners: {
-                               afterrender: {
-                                       scope: this,
-                                       fn: function() {
-                                               var element = Ext.fly(this.app.id + '-indicatorBar-filter-clear');
-                                               element.on('click', function() {
-                                                       textField.setValue('');
-                                                       this.createFilterTree(textField);
-                                               }, this);
-                                       }
-                               }
-                       }
-               };
-       },
-
-       /**
-        * Adds the necessary functionality and components for the filtering feature
-        *
-        * @return {void}
-        */
-       addFilterFeature: function() {
-               var topPanelButton = new Ext.Button({
-                       id: this.id + '-button-filter',
-                       cls: this.id + '-button',
-                       iconCls: TYPO3.Components.PageTree.Sprites.Filter,
-                       tooltip: TYPO3.Components.PageTree.LLL.buttonFilter
-               });
-
-               var textField = new Ext.form.TriggerField({
-                       id: this.id + '-filter',
-                       enableKeyEvents: true,
-                       triggerClass: TYPO3.Components.PageTree.Sprites.InputClear,
-                       value: TYPO3.Components.PageTree.LLL.searchTermInfo,
-
-                       listeners: {
-                               blur: {
-                                       scope: this,
-                                       fn:function(textField) {
-                                               if (textField.getValue() === '') {
-                                                       textField.setValue(TYPO3.Components.PageTree.LLL.searchTermInfo);
-                                                       textField.addClass(this.id + '-filter-defaultText');
-                                               }
-                                       }
-                               },
-
-                               focus: {
-                                       scope: this,
-                                       fn: function(textField) {
-                                               if (textField.getValue() === TYPO3.Components.PageTree.LLL.searchTermInfo) {
-                                                       textField.setValue('');
-                                                       textField.removeClass(this.id + '-filter-defaultText');
-                                               }
-                                       }
-                               },
-
-                               keydown: {
-                                       fn: this.createFilterTree,
-                                       scope: this,
-                                       buffer: 1000
-                               }
-                       }
-               });
-
-               textField.setHideTrigger(true);
-               textField.onTriggerClick = function() {
-                       textField.setValue('');
-                       this.createFilterTree(textField);
-               }.createDelegate(this);
-
-               var topPanelWidget = new Ext.Panel({
-                       border: false,
-                       id: this.id + '-filterWrap',
-                       cls: this.id + '-item',
-                       items: [textField],
-
-                       listeners: {
-                               show: {
-                                       scope: this,
-                                       fn: function(panel) {
-                                               panel.get(this.id + '-filter').focus();
-                                       }
-                               }
-                       }
-               });
-
-               this.addButton(topPanelButton, topPanelWidget);
-       },
-
-       /**
-        * Creates the entries for the new node drag zone toolbar
-        *
-        * @return {void}
-        */
-       createNewNodeToolbar: function() {
-               this.dragZone = new Ext.dd.DragZone(this.getEl(), {
-                       ddGroup: this.ownerCt.ddGroup,
-                       topPanel: this.ownerCt,
-
-                       endDrag: function() {
-                               this.topPanel.app.activeTree.dontSetOverClass = false;
-                       },
-
-                       getDragData: function(event) {
-                               this.proxyElement = document.createElement('div');
-
-                               var node = Ext.getCmp(event.getTarget('.x-btn').id);
-                               node.shouldCreateNewNode = true;
-
-                               return {
-                                       ddel: this.proxyElement,
-                                       item: node
-                               }
-                       },
-
-                       onInitDrag: function() {
-                               this.topPanel.app.activeTree.dontSetOverClass = true;
-                               var clickedButton = this.dragData.item;
-                               var cls = clickedButton.initialConfig.iconCls;
-
-                               this.proxyElement.shadow = false;
-                               this.proxyElement.innerHTML = '<div class="x-dd-drag-ghost-pagetree">' +
-                                       '<span class="x-dd-drag-ghost-pagetree-icon ' + cls + '">&nbsp;</span>' +
-                                       '<span class="x-dd-drag-ghost-pagetree-text">'  + clickedButton.title + '</span>' +
-                               '</div>';
-
-                               this.proxy.update(this.proxyElement);
-                       }
-               });
-
-                       // listens on the escape key to stop the dragging
-               (new Ext.KeyMap(document, {
-                       key: Ext.EventObject.ESC,
-                       scope: this,
-                       buffer: 250,
-                       fn: function(event) {
-                               if (this.dragZone.dragging) {
-                                       Ext.dd.DragDropMgr.stopDrag(event);
-                                       this.dragZone.onInvalidDrop(event);
-                               }
-                       }
-               }, 'keydown'));
-       },
-
-       /**
-        * Creates the necessary components for new node drag and drop feature
-        *
-        * @return {void}
-        */
-       addDragDropNodeInsertionFeature: function() {
-               var newNodeToolbar = new Ext.Toolbar({
-                       border: false,
-                       id: this.id + '-item-newNode',
-                       cls: this.id + '-item',
-
-                       listeners: {
-                               render: {
-                                       fn: this.createNewNodeToolbar
-                               }
-                       }
-               });
-
-               this.dataProvider.getNodeTypes(function(response) {
-                       for (var i = 0; i < response.length; ++i) {
-                               response[i].template = this.getButtonTemplate();
-                               newNodeToolbar.addItem(response[i]);
-                       }
-                       newNodeToolbar.doLayout();
-               }, this);
-
-               var topPanelButton = new Ext.Button({
-                       id: this.id + '-button-newNode',
-                       cls: this.id + '-button',
-                       iconCls: TYPO3.Components.PageTree.Sprites.NewNode,
-                       tooltip: TYPO3.Components.PageTree.LLL.buttonNewNode
-               });
-
-               this.addButton(topPanelButton, newNodeToolbar);
-       },
-
-       /**
-        * Adds a button to the toolbar for the refreshing feature
-        *
-        * @return {void}
-        */
-       addRefreshTreeFeature: function() {
-               var topPanelButton = new Ext.Button({
-                       id: this.id + '-button-refresh',
-                       cls: this.id + '-button',
-                       iconCls: TYPO3.Components.PageTree.Sprites.Refresh,
-                       tooltip: TYPO3.Components.PageTree.LLL.buttonRefresh,
-
-                       listeners: {
-                               click: {
-                                       scope: this,
-                                       fn: function() {
-                                               this.app.activeTree.refreshTree();
-                                       }
-                               }
-                       }
-               });
-
-               this.addButton(topPanelButton);
-       }
-});
-
-// XTYPE Registration
-Ext.reg('TYPO3.Components.PageTree.TopPanel', TYPO3.Components.PageTree.TopPanel);
diff --git a/typo3/js/extjs/components/pagetree/javascript/tree.js b/typo3/js/extjs/components/pagetree/javascript/tree.js
deleted file mode 100644 (file)
index f6f111a..0000000
+++ /dev/null
@@ -1,610 +0,0 @@
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-Ext.namespace('TYPO3.Components.PageTree');
-
-/**
- * @class TYPO3.Components.PageTree.Tree
- *
- * Generic Tree Panel
- *
- * @namespace TYPO3.Components.PageTree
- * @extends Ext.tree.TreePanel
- * @author Stefan Galinski <stefan.galinski@gmail.com>
- */
-TYPO3.Components.PageTree.Tree = Ext.extend(Ext.tree.TreePanel, {
-       /**
-        * Border
-        *
-        * @type {Boolean}
-        */
-       border: false,
-
-       /**
-        * Indicates if the root node is visible
-        *
-        * @type {Boolean}
-        */
-       rootVisible: false,
-
-       /**
-        * Tree Editor Instance (Inline Edit)
-        *
-        * @type {TYPO3.Components.PageTree.TreeEditor}
-        */
-       treeEditor: null,
-
-       /**
-        * Currently Selected Node
-        *
-        * @type {Ext.tree.TreeNode}
-        */
-       currentSelectedNode: null,
-
-       /**
-        * Enable the drag and drop feature
-        *
-        * @cfg {Boolean}
-        */
-       enableDD: true,
-
-       /**
-        * Drag and Drop Group
-        *
-        * @cfg {String}
-        */
-       ddGroup: '',
-
-       /**
-        * Indicates if the label should be editable
-        *
-        * @cfg {Boolean}
-        */
-       labelEdit: true,
-
-       /**
-        * User Interface Provider
-        *
-        * @cfg {Ext.tree.TreeNodeUI}
-        */
-       uiProvider: null,
-
-       /**
-        * Data Provider
-        *
-        * @cfg {Object}
-        */
-       treeDataProvider: null,
-
-       /**
-        * Command Provider
-        *
-        * @cfg {Object}
-        */
-       commandProvider : null,
-
-       /**
-        * Context menu provider
-        *
-        * @cfg {Object}
-        */
-       contextMenuProvider: null,
-
-       /**
-        * Id of the deletion drop zone if any
-        *
-        * @cfg {String}
-        */
-       deletionDropZoneId: '',
-
-       /**
-        * Main applicaton
-        *
-        * @cfg {TYPO3.Components.PageTree.App}
-        */
-       app: null,
-
-       /**
-        * Root Node Configuration
-        *
-        * @type {Object}
-        */
-       rootNodeConfig: {
-               id: 'root',
-               expanded: true,
-               nodeData: {
-                       id: 'root'
-               }
-       },
-
-       /**
-        * Indicator if the control key is pressed
-        *
-        * @type {Boolean}
-        */
-       isControlPressed: false,
-
-       /**
-        * Context Node
-        *
-        * @type {Ext.tree.TreeNode}
-        */
-       t3ContextNode: null,
-
-       /**
-        * Context Information
-        *
-        * @type {Object}
-        */
-       t3ContextInfo: {
-               inCopyMode: false,
-               inCutMode: false
-       },
-
-       /**
-        * Registered clicks for the double click feature
-        *
-        * @type {int}
-        */
-       clicksRegistered: 0,
-
-       /**
-        * Indicator if the control key was pressed
-        *
-        * @type {Boolean}
-        */
-       controlKeyPressed: false,
-
-       /**
-        * Listeners
-        *
-        * Event handlers that handle click events and synchronizes the label edit,
-        * double click and single click events in a useful way.
-        */
-       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)
-               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() {
-                               return false;
-                       }
-               },
-
-                       // prevents label edit on a selected node
-               beforeclick: {
-                       fn: function(node, event) {
-                               if (!this.clicksRegistered && this.getSelectionModel().isSelected(node)) {
-                                       node.fireEvent('click', node, event);
-                                       ++this.clicksRegistered;
-                                       return false;
-                               }
-                               ++this.clicksRegistered;
-                       }
-               }
-       },
-
-       /**
-        * Initializes the component
-        *
-        * @return {void}
-        */
-       initComponent: function() {
-               if (!this.uiProvider) {
-                       this.uiProvider = TYPO3.Components.PageTree.PageTreeNodeUI;
-               }
-               Ext.dd.DragDropMgr.useCache = false;
-               this.root = new Ext.tree.AsyncTreeNode(this.rootNodeConfig);
-               this.addTreeLoader();
-
-               if (this.labelEdit) {
-                       this.enableInlineEditor();
-               }
-
-               if (this.enableDD) {
-                       this.dragConfig = {ddGroup: this.ddGroup};
-                       this.enableDragAndDrop();
-               }
-
-               if (this.contextMenuProvider) {
-                       this.enableContextMenu();
-               }
-
-               TYPO3.Components.PageTree.Tree.superclass.initComponent.apply(this, arguments);
-       },
-
-       /**
-        * Refreshes the tree
-        *
-        * @param {Function} callback
-        * @param {Object} scope
-        * return {void}
-        */
-       refreshTree: function(callback, scope) {
-                       // remove readable rootline elements while refreshing
-               if (!this.inRefreshingMode) {
-                       var rootlineElements = Ext.select('.x-tree-node-readableRootline');
-                       if (rootlineElements) {
-                               rootlineElements.each(function(element) {
-                                       element.remove();
-                               });
-                       }
-               }
-
-               this.refreshNode(this.root, callback, scope);
-       },
-
-       /**
-        * Refreshes a given node
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @param {Function} callback
-        * @param {Object} scope
-        * return {void}
-        */
-       refreshNode: function(node, callback, scope) {
-               if (this.inRefreshingMode) {
-                       return;
-               }
-
-               scope = scope || node;
-               this.inRefreshingMode = true;
-               var loadCallback = function(node) {
-                       node.ownerTree.inRefreshingMode = false;
-                       if (node.ownerTree.restoreState) {
-                               node.ownerTree.restoreState(node.getPath());
-                       }
-               };
-
-               if (callback) {
-                       loadCallback = callback.createSequence(loadCallback);
-               }
-
-               this.getLoader().load(node, loadCallback, scope);
-       },
-
-       /**
-        * Adds a tree loader implementation that uses the directFn feature
-        *
-        * return {void}
-        */
-       addTreeLoader: function() {
-               this.loader = new Ext.tree.TreeLoader({
-                       directFn: this.treeDataProvider.getNextTreeLevel,
-                       paramOrder: 'nodeId,attributes',
-                       nodeParameter: 'nodeId',
-                       baseAttrs: {
-                               uiProvider: this.uiProvider
-                       },
-
-                               // an id can never be zero in ExtJS, but this is needed
-                               // for the root line feature or it will never be working!
-                       createNode: function(attr) {
-                               if (attr.id == 0) {
-                                       attr.id = 'siteRootNode';
-                               }
-
-                               return Ext.tree.TreeLoader.prototype.createNode.call(this, attr);
-                       },
-
-                       listeners: {
-                               beforeload: function(treeLoader, node) {
-                                       treeLoader.baseParams.nodeId = node.id;
-                                       treeLoader.baseParams.attributes = node.attributes.nodeData;
-                               }
-                       }
-               });
-       },
-
-       /**
-        * Enables the context menu feature
-        *
-        * return {void}
-        */
-       enableContextMenu: function() {
-               this.contextMenu = new TYPO3.Components.PageTree.ContextMenu();
-
-               this.on('contextmenu', function(node, event) {
-                       this.openContextMenu(node, event);
-               });
-       },
-
-       /**
-        * Open a context menu for the given node
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @param {Ext.EventObject} event
-        * return {void}
-        */
-       openContextMenu: function(node, event) {
-               var attributes = Ext.apply(node.attributes.nodeData, {
-                       t3ContextInfo: node.ownerTree.t3ContextInfo
-               });
-
-               this.contextMenuProvider.getActionsForNodeArray(
-                       attributes,
-                       function(configuration) {
-                               this.contextMenu.removeAll();
-                               this.contextMenu.fill(node, this, configuration);
-                               if (this.contextMenu.items.length) {
-                                       this.contextMenu.showAt(event.getXY());
-
-                               }
-                       },
-                       this
-               );
-       },
-
-       /**
-        * Initialize the inline editor for the given tree.
-        *
-        * @return {void}
-        */
-       enableInlineEditor: function() {
-               this.treeEditor = new TYPO3.Components.PageTree.TreeEditor(this);
-       },
-
-       /**
-        * Triggers the editing of the node if the tree editor is available
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @return {void}
-        */
-       triggerEdit: function(node) {
-               if (this.treeEditor) {
-                       this.treeEditor.triggerEdit(node);
-               }
-       },
-
-       /**
-        * Enables the drag and drop feature
-        *
-        * return {void}
-        */
-       enableDragAndDrop: function() {
-                       // init proxy element
-               this.on('startdrag', this.initDd, this);
-               this.on('enddrag', this.stopDd, this);
-               this.on('nodedragover', this.nodeDragOver, this);
-
-                       // node is moved
-               this.on('movenode', this.moveNode, this);
-
-                       // new node is created/copied
-               this.on('beforenodedrop', this.beforeDropNode, this);
-               this.on('nodedrop', this.dropNode, this);
-
-                       // listens on the ctrl key to toggle the copy mode
-               (new Ext.KeyMap(document, {
-                       key: Ext.EventObject.CONTROL,
-                       scope: this,
-                       buffer: 250,
-                       fn: function() {
-                               if (!this.controlKeyPressed && this.dragZone.dragging && this.copyHint) {
-                                       if (this.shouldCopyNode) {
-                                               this.copyHint.show();
-                                       } else {
-                                               this.copyHint.hide();
-                                       }
-
-                                       this.shouldCopyNode = !this.shouldCopyNode;
-                                       this.dragZone.proxy.el.toggleClass('typo3-pagetree-copy');
-                               }
-                               this.controlKeyPressed = true;
-                       }
-               }, 'keydown'));
-
-               (new Ext.KeyMap(document, {
-                       key: Ext.EventObject.CONTROL,
-                       scope: this,
-                       fn: function() {
-                               this.controlKeyPressed = false;
-                       }
-               }, 'keyup'));
-
-                       // listens on the escape key to stop the dragging
-               (new Ext.KeyMap(document, {
-                       key: Ext.EventObject.ESC,
-                       scope: this,
-                       buffer: 250,
-                       fn: function(event) {
-                               if (this.dragZone.dragging) {
-                                       Ext.dd.DragDropMgr.stopDrag(event);
-                                       this.dragZone.onInvalidDrop(event);
-                               }
-                       }
-               }, 'keydown'));
-       },
-
-       /**
-        * Disables the deletion drop zone if configured
-        *
-        * @return {void}
-        */
-       stopDd: function() {
-               if (this.deletionDropZoneId) {
-                       Ext.getCmp(this.deletionDropZoneId).hide();
-                       this.app.doLayout();
-               }
-       },
-
-       /**
-        * Enables the deletion drop zone if configured. Also it creates the
-        * shown dd proxy element.
-        *
-        * @param {TYPO3.Components.PageTree.Tree} treePanel
-        * @param {Ext.tree.TreeNode} node
-        * @return {void}
-        */
-       initDd: function(treePanel, node) {
-               var nodeHasChildNodes = (node.hasChildNodes() || node.isExpandable());
-               if (this.deletionDropZoneId &&
-                       (!nodeHasChildNodes ||
-                       (nodeHasChildNodes && TYPO3.Components.PageTree.Configuration.canDeleteRecursivly)
-               )) {
-                       Ext.getCmp(this.deletionDropZoneId).show();
-                       this.app.doLayout();
-               }
-               this.initDDProxyElement();
-       },
-
-       /**
-        * Adds the copy hint to the proxy element
-        *
-        * @return {void}
-        */
-       initDDProxyElement: function() {
-               this.shouldCopyNode = false;
-               this.copyHint = new Ext.Element(document.createElement('div')).addClass(this.id + '-copy');
-               this.copyHint.dom.appendChild(document.createTextNode(TYPO3.Components.PageTree.LLL.copyHint));
-               this.copyHint.setVisibilityMode(Ext.Element.DISPLAY);
-               this.dragZone.proxy.el.shadow = false;
-               this.dragZone.proxy.ghost.dom.appendChild(this.copyHint.dom);
-       },
-
-       /**
-        * Cancels the drop possibility for the position above and below a mount page
-        *
-        * @param {Object} event
-        * @return {void}
-        */
-       nodeDragOver: function(event) {
-               var isMountPage = (event.target.attributes.realId == 0 || event.target.attributes.nodeData.isMountPoint);
-               return !((event.point === 'above' || event.point === 'below') && isMountPage);
-       },
-
-       /**
-        * Creates a Fake Node
-        *
-        * This must be done to prevent the calling of the moveNode event.
-        *
-        * @param {object} dragElement
-        */
-       beforeDropNode: function(dragElement) {
-               if (dragElement.data && dragElement.data.item && dragElement.data.item.shouldCreateNewNode) {
-                       this.t3ContextInfo.serverNodeType = dragElement.data.item.nodeType;
-                       dragElement.dropNode = new Ext.tree.TreeNode({
-                               text: TYPO3.Components.PageTree.LLL.fakeNodeHint,
-                               leaf: true,
-                               isInsertedNode: true
-                       });
-
-                               // fix incorrect cancel value
-                       dragElement.cancel = false;
-
-               } else if (this.shouldCopyNode) {
-                       dragElement.dropNode.ui.onOut();
-                       var attributes = dragElement.dropNode.attributes;
-                       attributes.isCopiedNode = true;
-                       attributes.id = 'fakeNode';
-                       dragElement.dropNode = new Ext.tree.TreeNode(attributes);
-               }
-
-               return true;
-       },
-
-       /**
-        * Differentiate between the copy and insert event
-        *
-        * @param {Ext.tree.TreeDropZone} dragElement
-        * return {void}
-        */
-       dropNode: function(dragElement) {
-               this.controlKeyPressed = false;
-               if (dragElement.dropNode.attributes.isInsertedNode) {
-                       dragElement.dropNode.attributes.isInsertedNode = false;
-                       this.insertNode(dragElement.dropNode);
-               } else if (dragElement.dropNode.attributes.isCopiedNode) {
-                       dragElement.dropNode.attributes.isCopiedNode = false;
-                       this.copyNode(dragElement.dropNode)
-               }
-       },
-
-       /**
-        * Moves a node
-        *
-        * @param {TYPO3.Components.PageTree.Tree} tree
-        * @param {Ext.tree.TreeNode} movedNode
-        * @param {Ext.tree.TreeNode} oldParent
-        * @param {Ext.tree.TreeNode} newParent
-        * @param {int} position
-        * return {void}
-        */
-       moveNode: function(tree, movedNode, oldParent, newParent, position) {
-               this.controlKeyPressed = false;
-               tree.t3ContextNode = movedNode;
-
-               if (position === 0) {
-                       this.commandProvider.moveNodeToFirstChildOfDestination(newParent, tree);
-               } else {
-                       var previousSiblingNode = newParent.childNodes[position - 1];
-                       this.commandProvider.moveNodeAfterDestination(previousSiblingNode, tree);
-               }
-       },
-
-       /**
-        * Inserts a node
-        *
-        * @param {Ext.tree.TreeNode} movedNode
-        * return {void}
-        */
-       insertNode: function(movedNode) {
-               this.t3ContextNode = movedNode.parentNode;
-
-               movedNode.disable();
-               if (movedNode.previousSibling) {
-                       this.commandProvider.insertNodeAfterDestination(movedNode, this);
-               } else {
-                       this.commandProvider.insertNodeToFirstChildOfDestination(movedNode, this);
-               }
-       },
-
-       /**
-        * Copies a node
-        *
-        * @param {Ext.tree.TreeNode} movedNode
-        * return {void}
-        */
-       copyNode: function(movedNode) {
-               this.t3ContextNode = movedNode;
-
-               movedNode.disable();
-
-                       // This is hard stuff to do. So increase the timeout for the AJAX request
-               Ext.Ajax.timeout = 3600000;
-
-               if (movedNode.previousSibling) {
-                       this.commandProvider.copyNodeAfterDestination(movedNode, this);
-               } else {
-                       this.commandProvider.copyNodeToFirstChildOfDestination(movedNode, this);
-               }
-       }
-});
-
-// XTYPE Registration
-Ext.reg('TYPO3.Components.PageTree.Tree', TYPO3.Components.PageTree.Tree);
diff --git a/typo3/js/extjs/components/pagetree/javascript/treeeditor.js b/typo3/js/extjs/components/pagetree/javascript/treeeditor.js
deleted file mode 100644 (file)
index 92f9811..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-Ext.namespace('TYPO3.Components.PageTree');
-
-/**
- * @class TYPO3.Components.PageTree.TreeEditor
- *
- * Custom Tree Editor implementation to enable different source fields for the
- * editable label.
- *
- * @namespace TYPO3.Components.PageTree
- * @extends Ext.tree.TreeEditor
- * @author Stefan Galinski <stefan.galinski@gmail.com>
- */
-TYPO3.Components.PageTree.TreeEditor = Ext.extend(Ext.tree.TreeEditor, {
-       /**
-        * Don't send any save events if the value wasn't changed
-        *
-        * @type {Boolean}
-        */
-       ignoreNoChange: false,
-
-       /**
-        * Edit delay
-        *
-        * @type {int}
-        */
-       editDelay: 250,
-
-       /**
-        * Indicates if an underlying shadow should be shown
-        *
-        * @type {Boolean}
-        */
-       shadow: false,
-
-       /**
-        * Listeners
-        *
-        * Handles the synchronization between the edited label and the shown label.
-        */
-       listeners: {
-               beforecomplete: function(node) {
-                       this.updatedValue = this.getValue();
-                       if (this.updatedValue === '') {
-                               this.cancelEdit();
-                               return false;
-                       }
-                       this.setValue(this.editNode.attributes.prefix + Ext.util.Format.htmlEncode(this.updatedValue) + this.editNode.attributes.suffix);
-               },
-
-               complete: {
-                       fn: function(node, newValue, oldValue) {
-                               if (newValue === oldValue) {
-                                       this.fireEvent('canceledit', this);
-                                       return false;
-                               }
-
-                               this.editNode.getOwnerTree().commandProvider.saveTitle(node, this.updatedValue, oldValue, this);
-                       }
-               },
-
-               startEdit: {
-                       fn: function(element, value) {
-                               this.field.selectText();
-                       }
-               },
-
-               canceledit: function() {
-                       var tree = this.editNode.getOwnerTree();
-                       if (tree.currentSelectedNode) {
-                               tree.currentSelectedNode.select();
-                       }
-               }
-       },
-
-       /**
-        * Updates the edit node
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @param {String} editableText
-        * @param {String} updatedNode
-        * @return {void}
-        */
-       updateNodeText: function(node, editableText, updatedNode) {
-               this.editNode.setText(this.editNode.attributes.prefix + updatedNode + this.editNode.attributes.suffix);
-               this.editNode.attributes.editableText = editableText;
-       },
-
-       /**
-        * Overridden method to set another editable text than the node text attribute
-        *
-        * @param {Ext.tree.TreeNode} node
-        * @return {Boolean}
-        */
-       triggerEdit: function(node) {
-               this.completeEdit();
-               if (node.attributes.editable !== false) {
-                       this.editNode = node;
-                       if (this.tree.autoScroll) {
-                               Ext.fly(node.ui.getEl()).scrollIntoView(this.tree.body);
-                       }
-
-                       var value = node.text || '';
-                       if (!Ext.isGecko && Ext.isEmpty(node.text)) {
-                               node.setText(' ');
-                       }
-
-                               // TYPO3 MODIFICATION to use another attribute
-                       value = node.attributes.editableText;
-
-                       this.autoEditTimer = this.startEdit.defer(this.editDelay, this, [node.ui.textNode, value]);
-                       return false;
-               }
-       }
-});
-
-// XTYPE Registration
-Ext.reg('TYPO3.Components.PageTree.TreeEditor', TYPO3.Components.PageTree.TreeEditor);
diff --git a/typo3/js/extjs/debugPanel.js b/typo3/js/extjs/debugPanel.js
deleted file mode 100644 (file)
index 2098eaf..0000000
+++ /dev/null
@@ -1,606 +0,0 @@
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-Ext.ns('TYPO3');
-
-/**
- * Debug panel based upon the widget tab panel
- *
- * If you want to add a new tab, you can use the addTab or addTabWidget methods. The first one
- * creates the widget itself. If you need the latter one, you must create the widget yourself.
- *
- * The drag&drop functionality introduced a new attribute for the widget that should be added
- * as a tab. It's called "draggableTab" and needs to be set to true, if you want activated
- * drag&drop for the new tab.
- *
- * Additional Features:
- * - Drag&Drop
- * - Close tabs with a simple wheel/middle click
- * - utilization of the tabCloseMenu context menu (several closing options)
- * - Grouping of tabs (Only one nested level allowed!)
- *
- * @author Stefan Galinski <stefan.galinski@gmail.com>
- */
-TYPO3.DebugPanel = Ext.extend(Ext.TabPanel, {
-       /**
-        * Tab Groups
-        *
-        * @var Ext.util.MixedCollection
-        */
-       tabGroups: new Ext.util.MixedCollection(),
-
-       /**
-        * Indicator if the debug panel is wrapped inside a debug panel
-        * @see addTabWidget()
-        *
-        * @var boolean
-        */
-       isTabChildren: false,
-
-       /**
-        * Initializes the widget and merges our defaults with the user-defined ones. The
-        * user-defined settings are preferred.
-        *
-        * @return void
-        */
-       initComponent: function(config) {
-               config = config || {};
-               Ext.apply(this, config, {
-                               // activate general tab navigation with mouse wheel support
-                       enableTabScroll: true,
-                       defaults: {
-                               autoScroll: true
-                       },
-
-                               // add the context menu actions
-                       plugins: new Ext.ux.TabCloseMenu({
-                               closeTabText: TYPO3.LLL.core.tabs_close,
-                               closeOtherTabsText: TYPO3.LLL.core.tabs_closeOther,
-                               closeAllTabsText: TYPO3.LLL.core.tabs_closeAll,
-                               customMenuEntries: [
-                                       '-',
-                                       {
-                                               itemId: 'openInBrowserWindow',
-                                               text: TYPO3.LLL.core.tabs_openInBrowserWindow,
-                                               scope: this,
-                                               handler: function() {
-                                                       var tab = this.plugins.active;
-                                                       var group = '', content = '';
-
-                                                       if (tab.ownerCt.ownerCt instanceof Ext.TabPanel) {
-                                                               group = tab.ownerCt.title;
-                                                               content = tab.body.dom.innerHTML;
-                                                       } else {
-                                                               group = tab.title;
-                                                               tab.items.each(function(item) {
-                                                                       content += item.body.dom.innerHTML;
-                                                               });
-                                                       }
-
-                                                       this.openBrowserWindow(
-                                                               tab.title,
-                                                               content,
-                                                               group
-                                                       );
-                                               }
-                                       }
-                               ]
-                       })
-               });
-
-
-               TYPO3.DebugPanel.superclass.initComponent.call(this);
-       },
-
-       /**
-        * Create a drop arrow indicator for the tab drag&drop feature while rendering
-        * the component
-        *
-        * @return void
-        */
-       onRender: function() {
-               this.arrow = Ext.DomHelper.append(
-                       Ext.getBody(),
-                       '<div class="typo3-debugPanel-dragDropArrowDown">&nbsp;</div>',
-                       true
-               );
-               this.arrow.hide();
-
-               TYPO3.DebugPanel.superclass.onRender.apply(this, arguments);
-       },
-
-       /**
-        * Collapse event
-        *
-        * @return void
-        */
-       onCollapse: function() {
-               TYPO3.DebugPanel.superclass.onCollapse.apply(this, arguments);
-       },
-
-       /**
-        * Expand event
-        *
-        * @return void
-        */
-       onExpand: function() {
-               TYPO3.DebugPanel.superclass.onExpand.apply(this, arguments);
-       },
-
-       /**
-        * Cleanup
-        *
-        * @return void
-        */
-       onDestroy: function() {
-               Ext.destroy(this.arrow);
-               TYPO3.DebugPanel.superclass.onDestroy.call(this);
-       },
-
-       /**
-        * Adds a new tab inside a new debug console tab or inside a new browser window if the
-        * debugInWindow configuration variable is set.
-        *
-        * If you need more possibilites, you should use the addTabWidget method.
-        *
-        * @see addTabWidget()
-        * @param tabContent String content of the new tab
-        * @param header String tab header
-        * @param group String tab group
-        * @param position Integer position of the new tab
-        * @return void
-        */
-       addTab: function(tabContent, header, group, position) {
-               if (TYPO3.configuration.debugInWindow) {
-                       this.openBrowserWindow(header, tabContent, group);
-               } else {
-                       var tabWidget = new Ext.Panel({
-                               title: header,
-                               html: tabContent,
-                               border: false,
-                               autoScroll: true,
-                               closable: true,
-                               draggableTab: true
-                       });
-
-                       this.addTabWidget(tabWidget, group, position);
-               }
-       },
-
-       /**
-        * Adds a new tab to the widget
-        *
-        * You can inject any Ext component, but you need to create it yourself. If you just
-        * want to add some text into a new tab, you should use the addTab function.
-        *
-        * @see addTab()
-        * @param tabWidget Component the component that should be added as a new tab
-        * @param group String tab group
-        * @param position Integer position of the new tab
-        * @return void
-        */
-       addTabWidget: function(tabWidget, group, position) {
-               if (this.hidden) {
-                       this.show();
-               } else if (this.collapsed) {
-                       this.expand();
-               }
-
-                       // Move the widget into a tab group?
-               var tabGroup = this;
-               if (typeof group !== 'undefined' && group !== '' && !this.isTabChildren) {
-                       if (this.tabGroups.indexOfKey(group) === -1) {
-                               tabGroup = new TYPO3.DebugPanel({
-                                       border: false,
-                                       title: group,
-                                       autoScroll: true,
-                                       closable: true,
-                                       isTabChildren: true,
-                                       tabParent: this,
-                                       draggableTab: true
-                               });
-                               this.addTabWidget(tabGroup);
-
-                               this.tabGroups.add(group, tabGroup);
-                       } else {
-                               tabGroup = this.tabGroups.key(group);
-                       }
-               }
-
-                       // recalculate position if necessary
-               if (typeof position === 'undefined') {
-                       position = tabGroup.items.getCount();
-               }
-
-                       // hide the debug panel if the last element is closed
-               tabWidget.on('destroy', function(element) {
-                       if (this.isTabChildren) {
-                               if (!this.items.getCount()) {
-                                       this.tabParent.remove(this.tabParent.tabGroups.key(this.title));
-                               }
-                       } else {
-                               if (!this.items.getCount()) {
-                                       this.hide();
-                                       this.ownerCt.doLayout();
-                               }
-                               this.tabGroups.removeKey(element.title);
-                       }
-               }, tabGroup);
-
-                       // add drag&drop and the wheel click functionality
-               tabWidget.on('afterlayout', function(element) {
-                       Ext.get(this.id + '__' + element.id).on('mousedown', function(event) {
-                               if (!Ext.isIE7) {
-                                       if ((Ext.isIE && event.button === 1) ||
-                                               (!Ext.isIE && event.browserEvent.button === 1)
-                                       ) {
-                                               event.stopEvent();
-                                               this.remove(tabWidget);
-                                               return false;
-                                       }
-                               }
-                               return true;
-                       }, this);
-
-                       if (tabWidget.draggableTab) {
-                               this.initDragAndDropForTab(tabWidget);
-                       }
-               }, tabGroup);
-
-                       // add the widget as a new tab
-               tabGroup.insert(position, tabWidget).show();
-               tabGroup.ownerCt.doLayout();
-       },
-
-       /**
-        * Extends the tab item with drag&drop functionality.
-        *
-        * @param item Component the tab widget
-        * @return void
-        */
-       initDragAndDropForTab: function(item) {
-               item.tabDragZone = new Ext.dd.DragZone(this.id + '__' + item.id, {
-                       ddGroup: this.id,
-
-                       /**
-                        * Reintroduces the simple click event on a tab element.
-                        *
-                        * @return void
-                        */
-                       b4MouseDown : function() {
-                               item.show();
-                               Ext.dd.DragZone.superclass.b4MouseDown.apply(this, arguments);
-                       },
-
-                       /**
-                        * On receipt of a mousedown event, see if it is within a draggable element.
-                        * Return a drag data object if so. The data object can contain arbitrary application
-                        * data, but it should also contain a DOM element in the ddel property to provide
-                        * a proxy to drag.
-                        *
-                        * @param event Ext.EventObject
-                        * @return drag data
-                        */
-                       getDragData: function(event) {
-                               var sourceElement = event.getTarget(item.itemSelector, 10);
-                               if (sourceElement) {
-                                       var dragComponent = sourceElement.cloneNode(true);
-                                       dragComponent.id = Ext.id();
-                                       item.dragData = {
-                                               ddel: dragComponent,
-                                               sourceEl: sourceElement,
-                                               repairXY: Ext.fly(sourceElement).getXY()
-                                       };
-                                       return item.dragData;
-                               }
-
-                               return false;
-                       },
-
-                       /**
-                        * Provide coordinates for the proxy to slide back to on failed drag.
-                        * This is the original XY coordinates of the draggable element.
-                        *
-                        * @return x,y coordinations of the original component position
-                        */
-                       getRepairXY: function() {
-                               return this.dragData.repairXY;
-                       }
-               });
-
-               item.tabDropZone = new Ext.dd.DropZone(this.id + '__' + item.id, {
-                       debugPanel: this,
-                       ddGroup: this.id,
-
-                       /**
-                        * If the mouse is over a tab element, return that node. This is
-                        * provided as the "target" parameter in all "onNodeXXXX" node event
-                        * handling functions
-                        *
-                        * @param event Ext.EventObject
-                        * @return the tab element or boolean false
-                        */
-                       getTargetFromEvent: function(event) {
-                               var tabElement = Ext.get(event.getTarget()).findParentNode('li');
-                               if (tabElement !== null) {
-                                       return tabElement;
-                               }
-
-                               return false;
-                       },
-
-                       /**
-                        * On entry into a target node, highlight that node.
-                        *
-                        * @param target string id of the target element
-                        * @return void
-                        */
-                       onNodeEnter : function(target) {
-                               Ext.get(target).addClass('typo3-debugPanel-dragDropOver');
-                       },
-
-                       /**
-                        * On exit from a target node, unhighlight that node.
-                        *
-                        * @param target string id of the target element
-                        * @return void
-                        */
-                       onNodeOut : function(target) {
-                               Ext.get(target).removeClass('typo3-debugPanel-dragDropOver');
-                               this.debugPanel.arrow.hide();
-                       },
-
-                       /**
-                        * While over a target node, return the default drop allowed class which
-                        * places a "tick" icon into the drag proxy. Also the arrow position is
-                        * recalculated.
-                        *
-                        * @param target string id of the target element
-                        * @param proxy Ext.dd.DDProxy proxy element
-                        * @param event Ext.EventObject
-                        * @return default dropAllowed class or a boolean false
-                        */
-                       onNodeOver : function(target, proxy, event) {
-                                       // set arrow position
-                               var element = Ext.get(target);
-                               var left = 0;
-                               var tabLeft = element.getX();
-                               var tabMiddle = tabLeft + element.dom.clientWidth / 2;
-                               var tabRight = tabLeft + element.dom.clientWidth;
-                               if (event.getPageX() <= tabMiddle) {
-                                       left = tabLeft;
-                               } else {
-                                       left = tabRight;
-                               }
-                               this.debugPanel.arrow.setTop(this.el.getY() - 8).setLeft(left - 9).show();
-
-                                       // drop allowed?
-                               if (proxy.handleElId !== target.id) {
-                                       return Ext.dd.DropZone.prototype.dropAllowed;
-                               }
-
-                               return false;
-                       },
-
-                       /**
-                        * On node drop we move the dragged tab element at the position of
-                        * the dropped element.
-                        *
-                        * @param target string id of the target element
-                        * @param proxy Ext.dd.DDProxy proxy element
-                        * @param event Ext.EventObject
-                        * @return true or false
-                        */
-                       onNodeDrop : function(target, proxy, event) {
-                               if (proxy.handleElId === target.id) {
-                                       return false;
-                               }
-
-                               var dropPanelId = target.id.substring(this.debugPanel.id.length + 2);
-                               var dragPanelId = proxy.handleElId.substring(this.debugPanel.id.length + 2);
-
-                               var dropPanelPosition = this.debugPanel.items.indexOfKey(dropPanelId);
-                               var dragPanelPosition = this.debugPanel.items.indexOfKey(dragPanelId);
-
-                               if (dropPanelPosition !== undefined &&
-                                       dropPanelPosition !== -1 &&
-                                       dropPanelPosition <= this.debugPanel.items.getCount()
-                               ) {
-                                               // calculate arrow position to decide if the elements needs
-                                               // to be inserted on the right or left
-                                       var element = Ext.get(target);
-                                       var tabMiddle = element.getX() + element.dom.clientWidth / 2;
-                                       if (dragPanelPosition > dropPanelPosition) {
-                                               if (event.getPageX() > tabMiddle) {
-                                                       dropPanelPosition += 1;
-                                               }
-                                       } else {
-                                               if (event.getPageX() <= tabMiddle) {
-                                                       dropPanelPosition -= 1;
-                                               }
-                                       }
-
-                                       var dropEl = this.debugPanel.remove(dragPanelId, false);
-                                       this.debugPanel.addTabWidget(dropEl, '', dropPanelPosition);
-                               }
-
-                               this.debugPanel.arrow.hide();
-                               return true;
-                       }
-               });
-       },
-
-       /**
-        * Opens debug output in a new browser window
-        *
-        * @param title string
-        * @param content string
-        * @param group string
-        * @return void
-        */
-       openBrowserWindow: function(title, content, group) {
-               var newWindow = window.open('', 'TYPO3DebugWindow_' + group,
-                       'width=600,height=400,menubar=0,toolbar=1,status=0,scrollbars=1,resizable=1'
-               );
-               if (newWindow.document.body.innerHTML) {
-                       Ext.DomHelper.insertHtml('beforeEnd', newWindow.document.body, '<hr>' + content);
-               } else {
-                       newWindow.document.writeln(
-                               '<html><head><title>Debug: ' + title + '(' + group + ')</title></head>'
-                               + '<body bgcolor=white onLoad="self.focus()">'
-                               + content
-                               + '</body></html>'
-                       );
-               }
-               newWindow.document.close()
-       },
-
-       /**
-        * Wrapper for console.log
-        *
-        * @return void
-        */
-       log: function() {
-               if (arguments.length) {
-                       for (var i = 0; i < arguments.length; i++) {
-                               this.debug(arguments[i], 'Log', 'Javascript Console');
-                       }
-               }
-       },
-
-       /**
-        * Wrapper for console.info
-        *
-        * @return void
-        */
-       info: function() {
-               if (arguments.length) {
-                       for (var i = 0; i < arguments.length; i++) {
-                               this.debug(arguments[i], 'Info', 'Javascript Console');
-                       }
-               }
-       },
-
-       /**
-        * Wrapper for console.warn
-        *
-        * @return void
-        */
-       warn: function() {
-               if (arguments.length) {
-                       for (var i = 0; i < arguments.length; i++) {
-                               this.debug(arguments[i], 'Warning', 'Javascript Console');
-                       }
-               }
-       },
-
-       /**
-        * Wrapper for console.error
-        *
-        * @return void
-        */
-       error: function() {
-               if (arguments.length) {
-                       for (var i = 0; i < arguments.length; i++) {
-                               this.debug(arguments[i], 'Error', 'Javascript Console');
-                       }
-               }
-       },
-
-       /**
-        * Debug output from javascript
-        *
-        * @param out mixed debug output
-        * @param header string
-        * @param group string
-        */
-       debug: function(out, header, group) {
-               var output = this.printObject(out);
-               this.addTab(output, header, group);
-       },
-
-       /**
-        * Converts any string/array/object to a string for printing purposes
-        *
-        * @param object object
-        * @param level integer recursion level counter (max. 3 levels)
-        * @param prefix string internal use!
-        * @return string
-        */
-       printObject: function(object, level, prefix) {
-               var result = '';
-
-               prefix = prefix || '';
-               level = level || 0;
-               if (level >= 3) {
-                       return result;
-               }
-
-               var levelPadding = '';
-               for(var j = 0; j < level + 1; ++j) {
-                       levelPadding += '    ';
-               }
-
-               if (typeof(object) === 'object') {
-                               // Array / Objects
-                       for (var item in object) {
-                               var value = object[item];
-
-                               if (typeof(value) === 'object') {
-                                       result += levelPadding + '"' + prefix + item + '" ...' + "\n";
-                                       result += this.printObject(value, level + 1, prefix + item + '.');
-                               } else {
-                                       result += levelPadding + '"' + prefix + item +
-                                               '" => "' + value + '"' + "\n";
-                               }
-                       }
-               } else {
-                               // Strings/Chars/Numbers etc.
-                       result = '[' + typeof(object) + '] ' + object;
-               }
-
-               return '<pre>' + result + '</pre>';
-       },
-
-       /**
-        * Debug attached events of a given element (e.g. an Ext.Panel component)
-        *
-        * Note: This functionality should be used with an activated debug console like firebug!
-        *
-        * @param element object to fetch events from
-        * @return void
-        */
-       debugEvents: function(element) {
-               if (element) {
-                               // debug events of element
-                       Ext.util.Observable.capture(element, function() {
-                               console.log(
-                                       'event "' + arguments[0] + '" was fired with the following arguments: '
-                               );
-
-                               for (var i = 1; i < arguments.length; ++i) {
-                                       console.log('        [' + i + '] ', arguments[i]);
-                               }
-                       });
-               } else {
-                               // debug all events
-                       Ext.util.Observable.prototype.fireEvent =
-                               Ext.util.Observable.prototype.fireEvent.createInterceptor(function() {
-                                       console.log(arguments);
-                                       return true;
-                               });
-               }
-       }
-});
-
-Ext.reg('typo3DebugPanel', TYPO3.DebugPanel);
diff --git a/typo3/js/extjs/ux/Ext.app.SearchField.js b/typo3/js/extjs/ux/Ext.app.SearchField.js
deleted file mode 100644 (file)
index 03784b2..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Ext JS Library 2.2.1
- * Copyright(c) 2006-2009, Ext JS, LLC.
- * licensing@extjs.com
- *
- * http://extjs.com/license
- */
-
-Ext.app.SearchField = Ext.extend(Ext.form.TwinTriggerField, {
-       initComponent : function() {
-               Ext.app.SearchField.superclass.initComponent.call(this);
-               this.on('specialkey', function(f, e) {
-                       if (e.getKey() == e.ENTER) {
-                               this.onTrigger2Click();
-                       }
-               }, this);
-       },
-
-       validationEvent: false,
-       validateOnBlur: false,
-       trigger1Class: 'x-form-clear-trigger',
-       trigger2Class: 'x-form-search-trigger',
-       hideTrigger1: true,
-       width: 180,
-       hasSearch : false,
-       paramName : 'filterTxt',
-
-       onTrigger1Click : function() {
-               if (this.hasSearch) {
-                       this.el.dom.value = '';
-                       var o = {start: 0};
-                       this.store.baseParams = this.store.baseParams || {};
-                       this.store.baseParams[this.paramName] = '';
-                       this.store.reload({params:o});
-                       this.triggers[0].hide();
-                       this.hasSearch = false;
-               }
-       },
-
-       onTrigger2Click : function() {
-               var v = this.getRawValue();
-               if (v.length < 1) {
-                       this.onTrigger1Click();
-                       return;
-               }
-               var o = {start: 0};
-               this.store.baseParams = this.store.baseParams || {};
-               this.store.baseParams[this.paramName] = v;
-               this.store.reload({params:o});
-               this.hasSearch = true;
-               this.triggers[0].show();
-       }
-});
\ No newline at end of file
diff --git a/typo3/js/extjs/ux/Ext.grid.RowExpander.js b/typo3/js/extjs/ux/Ext.grid.RowExpander.js
deleted file mode 100644 (file)
index ebbf2a6..0000000
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Ext JS Library 2.0
- * Copyright(c) 2006-2007, Ext JS, LLC.
- * licensing@extjs.com
- *
- * http://extjs.com/license
- *
- * MODIFIED: SGB [12.12.07]
- * Added support for a new config option, remoteDataMethod,
- * including getter and setter functions, and minor mods
- * to the beforeExpand and expandRow functions
- */
-
-Ext.grid.RowExpander = function(config) {
-       Ext.apply(this, config);
-       Ext.grid.RowExpander.superclass.constructor.call(this);
-
-       if (this.tpl) {
-               if (typeof this.tpl == 'string') {
-                       this.tpl = new Ext.Template(this.tpl);
-               }
-               this.tpl.compile();
-       }
-
-       this.state = {};
-       this.bodyContent = {};
-
-       this.addEvents({
-               beforeexpand : true,
-               expand: true,
-               beforecollapse: true,
-               collapse: true
-       });
-};
-
-Ext.extend(Ext.grid.RowExpander, Ext.util.Observable, {
-       header: "",
-       width: 20,
-       sortable: false,
-       fixed:true,
-       dataIndex: '',
-       id: 'expander',
-       lazyRender : true,
-       enableCaching: true,
-
-       getRowClass : function(record, rowIndex, p, ds) {
-               p.cols = p.cols-1;
-               var content = this.bodyContent[record.id];
-               if (!content && !this.lazyRender) {
-                       content = this.getBodyContent(record, rowIndex);
-               }
-               if (content) {
-                       p.body = content;
-               }
-               return this.state[record.id] ? 'x-grid3-row-expanded' : 'x-grid3-row-collapsed';
-       },
-
-       init : function(grid) {
-               this.grid = grid;
-
-               var view = grid.getView();
-               view.getRowClass = this.getRowClass.createDelegate(this);
-
-               view.enableRowBody = true;
-
-               grid.on('render', function() {
-                       view.mainBody.on('mousedown', this.onMouseDown, this);
-               }, this);
-
-               grid.store.on('load', this.onStoreLoaded, this);
-               grid.on("beforestaterestore", this.applyState, this);
-               grid.on("beforestatesave", this.saveState, this);
-       },
-
-       /** @private */
-       onStoreLoaded: function(store, records, options) {
-               var index = -1;
-               for(var key in this.state){
-                       if (this.state[key] === true) {
-                               index = store.indexOfId(key);
-                               if (index > -1) {
-                                       this.expandRow(index);
-                               }
-                       }
-               }
-       },
-
-       /** @private */
-       applyState: function(grid, state){
-               this.suspendStateStore = true;
-               if(state.expander) {
-                       this.state = state.expander;
-               }
-               this.suspendStateStore = false;
-       },
-
-       /** @private */
-       saveState: function(grid, state){
-               return state.expander = this.state;
-       },
-
-       getBodyContent : function(record, index) {
-               if (!this.enableCaching) {
-                       return this.tpl.apply(record.data);
-               }
-               var content = this.bodyContent[record.id];
-               if (!content) {
-                       content = this.tpl.apply(record.data);
-                       this.bodyContent[record.id] = content;
-               }
-               return content;
-       },
-       // Setter and Getter methods for the remoteDataMethod property
-       setRemoteDataMethod : function (fn) {
-               this.remoteDataMethod = fn;
-       },
-
-       getRemoteDataMethod : function (record, index) {
-               if (!this.remoteDataMethod) {
-                       return;
-               }
-                       return this.remoteDataMethod.call(this,record,index);
-       },
-
-       onMouseDown : function(e, t) {
-               if (t.className == 'x-grid3-row-expander') {
-                       e.stopEvent();
-                       var row = e.getTarget('.x-grid3-row');
-                       this.toggleRow(row);
-               }
-       },
-
-       renderer : function(v, p, record) {
-               p.cellAttr = 'rowspan="2"';
-               return '<div class="x-grid3-row-expander">&#160;</div>';
-       },
-
-       beforeExpand : function(record, body, rowIndex) {
-               if (this.fireEvent('beforexpand', this, record, body, rowIndex) !== false) {
-                       // If remoteDataMethod is defined then we'll need a div, with a unique ID,
-                       //  to place the content
-                       if (this.remoteDataMethod) {
-                               this.tpl = new Ext.Template("<div id=\"remData" + rowIndex + "\" class=\"rem-data-expand\"><\div>");
-                       }
-                       if (this.tpl && this.lazyRender) {
-                               body.innerHTML = this.getBodyContent(record, rowIndex);
-                       }
-
-                       return true;
-               }else{
-                       return false;
-               }
-       },
-
-       toggleRow : function(row) {
-               if (typeof row == 'number') {
-                       row = this.grid.view.getRow(row);
-               }
-               this[Ext.fly(row).hasClass('x-grid3-row-collapsed') ? 'expandRow' : 'collapseRow'](row);
-               this.grid.saveState();
-       },
-
-       expandRow : function(row) {
-               if (typeof row == 'number') {
-                       row = this.grid.view.getRow(row);
-               }
-               var record = this.grid.store.getAt(row.rowIndex);
-               var body = Ext.DomQuery.selectNode('tr:nth(2) div.x-grid3-row-body', row);
-               if (this.beforeExpand(record, body, row.rowIndex)) {
-                       this.state[record.id] = true;
-                       Ext.fly(row).replaceClass('x-grid3-row-collapsed', 'x-grid3-row-expanded');
-                       this.grid.saveState();
-                       if (this.fireEvent('expand', this, record, body, row.rowIndex) !== false) {
-                               //  If the expand event is successful then get the remoteDataMethod
-                               this.getRemoteDataMethod(record,row.rowIndex);
-                       }
-               }
-       },
-
-       collapseRow : function(row) {
-               if (typeof row == 'number') {
-                       row = this.grid.view.getRow(row);
-               }
-               var record = this.grid.store.getAt(row.rowIndex);
-               var body = Ext.fly(row).child('tr:nth(1) div.x-grid3-row-body', true);
-               if (this.fireEvent('beforcollapse', this, record, body, row.rowIndex) !== false) {
-                       this.state[record.id] = false;
-                       Ext.fly(row).replaceClass('x-grid3-row-expanded', 'x-grid3-row-collapsed');
-                       this.grid.saveState();
-                       this.fireEvent('collapse', this, record, body, row.rowIndex);
-               }
-       }
-});
diff --git a/typo3/js/extjs/ux/Ext.ux.FitToParent.js b/typo3/js/extjs/ux/Ext.ux.FitToParent.js
deleted file mode 100755 (executable)
index 8d7d401..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/* plugin for resize of grid in single container */
-Ext.namespace('Ext.ux.plugins');
-
-Ext.ux.plugins.FitToParent = Ext.extend(Object, {
-       constructor : function(parent) {
-               this.parent = parent;
-       },
-       init : function(c) {
-               c.on('render', function(c) {
-                       c.fitToElement = Ext.get(this.parent
-                                       || c.getPositionEl().dom.parentNode);
-                       if (!c.doLayout) {
-                               this.fitSizeToParent();
-                               Ext.EventManager.onWindowResize(this.fitSizeToParent, this);
-                       }
-               }, this, {
-                       single : true
-               });
-               if (c.doLayout) {
-                       c.monitorResize = true;
-                       c.doLayout = c.doLayout.createInterceptor(this.fitSizeToParent);
-               }
-       },
-
-       fitSizeToParent : function() {
-                       // Uses the dimension of the current viewport, but removes the document header
-                       // initial is the height of the TYPO3 Topbar which is 45px. If Topbar is not rendered, set the height as default
-               var documentHeaderHeight = 45 || top.TYPO3.Backend.Topbar.getHeight();
-               var documentHeader = Ext.get('typo3-docheader');
-
-               if (Ext.isObject(documentHeader)) {
-                       documentHeaderHeight -= documentHeader.getHeight() + 26;
-               }
-
-               if (this.heightOffset && Ext.isNumber(this.heightOffset)) {
-                       documentHeaderHeight -= parseInt(this.heightOffset, 10);
-               }
-
-               this.fitToElement.setHeight(
-                       Ext.lib.Dom.getViewportHeight() - this.fitToElement.getTop() + documentHeaderHeight
-               );
-
-               var pos = this.getPosition(true), size = this.fitToElement.getViewSize();
-               this.setSize(size.width - pos[0], size.height - pos[1]);
-
-       }
-});
diff --git a/typo3/js/extjs/ux/ext.ux.tabclosemenu.js b/typo3/js/extjs/ux/ext.ux.tabclosemenu.js
deleted file mode 100644 (file)
index 3893368..0000000
+++ /dev/null
@@ -1,163 +0,0 @@
-/*!
- * Ext JS Library 3.2.1
- * Copyright(c) 2006-2010 Ext JS, Inc.
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
-/**
- * @class Ext.ux.TabCloseMenu
- * @extends Object 
- * Plugin (ptype = 'tabclosemenu') for adding a close context menu to tabs. Note that the menu respects
- * the closable configuration on the tab. As such, commands like remove others and remove all will not
- * remove items that are not closable.
- * 
- * @constructor
- * @param {Object} config The configuration options
- * @ptype tabclosemenu
- */
-Ext.ux.TabCloseMenu = Ext.extend(Object, {
-    /**
-     * @cfg {String} closeTabText
-     * The text for closing the current tab. Defaults to <tt>'Close Tab'</tt>.
-     */
-    closeTabText: 'Close Tab',
-
-    /**
-     * @cfg {String} closeOtherTabsText
-     * The text for closing all tabs except the current one. Defaults to <tt>'Close Other Tabs'</tt>.
-     */
-    closeOtherTabsText: 'Close Other Tabs',
-    
-    /**
-     * @cfg {Boolean} showCloseAll
-     * Indicates whether to show the 'Close All' option. Defaults to <tt>true</tt>. 
-     */
-    showCloseAll: true,
-
-    /**
-     * @cfg {String} closeAllTabsText
-     * <p>The text for closing all tabs. Defaults to <tt>'Close All Tabs'</tt>.
-     */
-    closeAllTabsText: 'Close All Tabs',
-    
-    /**
-        * @cfg {Array} custom menu entries
-        */
-       customMenuEntries: [],
-
-    
-    constructor : function(config){
-        Ext.apply(this, config || {});
-    },
-
-    //public
-    init : function(tabs){
-        this.tabs = tabs;
-        tabs.on({
-            scope: this,
-            contextmenu: this.onContextMenu,
-            destroy: this.destroy
-        });
-    },
-    
-    destroy : function(){
-        Ext.destroy(this.menu);
-        delete this.menu;
-        delete this.tabs;
-        delete this.active;    
-    },
-
-    // private
-    onContextMenu : function(tabs, item, e){
-        this.active = item;
-        var m = this.createMenu(),
-            disableAll = true,
-            disableOthers = true,
-            closeAll = m.getComponent('closeall');
-        
-        m.getComponent('close').setDisabled(!item.closable);
-        tabs.items.each(function(){
-            if(this.closable){
-                disableAll = false;
-                if(this != item){
-                    disableOthers = false;
-                    return false;
-                }
-            }
-                       return true;
-        });
-        m.getComponent('closeothers').setDisabled(disableOthers);
-        if(closeAll){
-            closeAll.setDisabled(disableAll);
-        }
-        
-        e.stopEvent();
-        m.showAt(e.getPoint());
-    },
-    
-    createMenu : function(){
-        if(!this.menu){
-            var items = [{
-                itemId: 'close',
-                text: this.closeTabText,
-                scope: this,
-                handler: this.onClose
-            }];
-            if(this.showCloseAll){
-                items.push('-');
-            }
-            items.push({
-                itemId: 'closeothers',
-                text: this.closeOtherTabsText,
-                scope: this,
-                handler: this.onCloseOthers
-            });
-            if(this.showCloseAll){
-                items.push({
-                    itemId: 'closeall',
-                    text: this.closeAllTabsText,
-                    scope: this,
-                    handler: this.onCloseAll
-                });
-            }
-            if (this.customMenuEntries.length) {
-               this.customMenuEntries.each(function(item) {
-                       items.push(item);
-               });
-            }
-            
-            this.menu = new Ext.menu.Menu({
-                items: items
-            });
-        }
-        return this.menu;
-    },
-    
-    onClose : function(){
-        this.tabs.remove(this.active);
-    },
-    
-    onCloseOthers : function(){
-        this.doClose(true);
-    },
-    
-    onCloseAll : function(){
-        this.doClose(false);
-    },
-    
-    doClose : function(excludeActive){
-        var items = [];
-        this.tabs.items.each(function(item){
-            if(item.closable){
-                if(!excludeActive || item != this.active){
-                    items.push(item);
-                }    
-            }
-        }, this);
-        Ext.each(items, function(item){
-            this.tabs.remove(item);
-        }, this);
-    }
-});
-
-Ext.preg('tabclosemenu', Ext.ux.TabCloseMenu);
diff --git a/typo3/js/extjs/viewport.js b/typo3/js/extjs/viewport.js
deleted file mode 100644 (file)
index 3cdbda3..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-Ext.ns('TYPO3');
-
-       // override splitregion to fit the splitbars in our design
-Ext.override(Ext.layout.BorderLayout.SplitRegion, {
-       render : function(ct, p) {
-               Ext.layout.BorderLayout.SplitRegion.superclass.render.call(this, ct, p);
-
-               var ps = this.position;
-
-               this.splitEl = ct.createChild({
-                       cls: "x-layout-split x-layout-split-" + ps, html: " ",
-                       id: this.panel.id + '-xsplit'
-               });
-
-               if (this.enableChildSplit) {
-                       this.splitChildEl = this.splitEl.createChild({
-                               cls: 'x-layout-mini-wrapper'
-                       });
-
-               }
-               if (this.collapseMode == 'mini') {
-                       this.miniSplitEl = this.splitEl.createChild({
-                               cls: "x-layout-mini x-layout-mini-" + ps, html: " "
-                       });
-                       this.miniSplitEl.addClassOnOver('x-layout-mini-over');
-                       this.miniSplitEl.on('click', this.onCollapseClick, this, {stopEvent:true});
-               }
-
-               var s = this.splitSettings[ps];
-
-               if (this.enableChildSplit) {
-                       this.split = new Ext.SplitBar(this.splitChildEl.dom, p.el, s.orientation);
-               } else {
-                       this.split = new Ext.SplitBar(this.splitEl.dom, p.el, s.orientation);
-               }
-               this.split.tickSize = this.tickSize;
-               this.split.placement = s.placement;
-               this.split.getMaximumSize = this[s.maxFn].createDelegate(this);
-               this.split.minSize = this.minSize || this[s.minProp];
-               this.split.on("beforeapply", this.onSplitMove, this);
-               this.split.useShim = this.useShim === true;
-               this.maxSize = this.maxSize || this[s.maxProp];
-
-               if (p.hidden) {
-                       this.splitEl.hide();
-               }
-
-               if (this.useSplitTips) {
-                       this.splitEl.dom.title = this.collapsible ? this.collapsibleSplitTip : this.splitTip;
-               }
-               if (this.collapsible) {
-                       this.splitEl.on("dblclick", this.onCollapseClick, this);
-               }
-       }
-});
-/**
- * Extends the viewport with some functionality for TYPO3.
- *
- * @author Stefan Galinski <stefan.galinski@gmail.com>
- */
-TYPO3.Viewport = Ext.extend(Ext.Viewport, {
-       /**
-        * Contains the navigation widgets in a simple array and identified by an unique idea
-        *
-        * @see registerNavigationWidget()
-        * @var object
-        */
-       navigationWidgetContainer: {},
-
-       /**
-        * Contains the meta informations of the navigation widgets
-        *
-        * @see registerNavigationWidget()
-        * @var object
-        */
-       navigationWidgetMetaData: {},
-
-       /**
-        * The topbar area
-        *
-        * @var Ext.Panel
-        */
-       Topbar: null,
-
-       /**
-        * The content area
-        *
-        * @var Ext.Panel
-        */
-       ContentContainer: null,
-
-       /**
-        * The navigation frame area
-        *
-        * @var Ext.Panel
-        */
-       NavigationContainer: null,
-
-       /**
-        * Dummy panel, shown when no NavigationContainer is in use
-        *
-        * @var Ext.Panel
-        */
-       NavigationDummy: null,
-
-       /**
-        * The iframe navigation component
-        *
-        * @var TYPO3.iframePanel
-        */
-       NavigationIframe: null,
-
-       /**
-        * The module menu area
-        *
-        * @var Ext.Panel
-        */
-       ModuleMenuContainer: null,
-
-       /**
-        * The debug console
-        *
-        * @var Ext.TabPanel
-        */
-       DebugConsole: null,
-
-       /**
-        * Initializes the ExtJS viewport with the given configuration.
-        *
-        * @return void
-        */
-       initComponent: function() {
-               // adjust the module menu and the height of the topbar
-               this.initialConfig.items[0].height = TYPO3.configuration.topBarHeight;
-
-               var moduleMenu = this.initialConfig.items[1];
-               moduleMenu.width = TYPO3.configuration.moduleMenuWidth;
-
-               // call parent constructor
-               TYPO3.Viewport.superclass.initComponent.apply(this, arguments);
-
-               this.ContentContainer = Ext.getCmp('typo3-contentContainer');
-               this.NavigationContainer = Ext.getCmp('typo3-navigationContainer');
-               this.NavigationDummy = Ext.getCmp('typo3-navigationDummy');
-               this.NavigationIframe = Ext.getCmp('typo3-navigationIframe');
-               this.Topbar = Ext.getCmp('typo3-topbar');
-               this.ModuleMenuContainer = Ext.getCmp('typo3-module-menu');
-               this.DebugConsole = Ext.getCmp('typo3-debug-console');
-
-       }
-});
-
-Ext.reg('typo3Viewport', TYPO3.Viewport);
diff --git a/typo3/js/extjs/viewportConfiguration.js b/typo3/js/extjs/viewportConfiguration.js
deleted file mode 100644 (file)
index ab98890..0000000
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-Ext.ns('TYPO3');
-
-/**
- * The Cards Configuration for the BE Module Cards
- *
- * New items need to be appended here
- * cards id needs to be prepended with typo3-card- the rest of the id is the
- * be module name as passed it is normally in TYPO3
- * Cards shouldn't be simple iframes for performance reasons
- *
- * @author Kay Strobach    <typo3@kay-strobach.de>
- */
-
-TYPO3.Viewport.ContentCards = {
-               // Add a card to either the config or if already rendered to the wrapper
-       addContentCard: function(name,config) {
-               config.id = 'typo3-card-' + name;
-               if (Ext.ready) {
-                       Ext.getCmp('typo3-contentContainerWrapper').add(config);
-               } else {
-                       this.cards.push(config);
-               }
-       },
-       cards: [
-                       // add the old card to be compatible
-               {
-                       id: 'typo3-contentContainer',
-                       border: false,
-                       xtype: 'backendContentIframePanel',
-                       name: 'content'
-               }
-       ]
-};
-
-/**
- * The backend viewport configuration
- *
- * @author Stefan Galinski <stefan.galinski@gmail.com>
- */
-TYPO3.Viewport.configuration = {
-       layout: 'border',
-       id: 'typo3-viewport',
-       renderTo: Ext.getBody(),
-       border: false,
-       items: [
-               {
-                       layout: 'absolute',
-                       region: 'north',
-                       id: 'typo3-topbar',
-                       height: 42,
-                       contentEl: 'typo3-top-container',
-                       border: false
-               },
-               {
-                       layout: 'fit',
-                       region: 'west',
-                       id: 'typo3-module-menu',
-                       contentEl: 'typo3-menu',
-                       collapsible: false,
-                       collapseMode: null,
-                       floatable: true,
-                       minWidth: 50,
-                       maxWidth: 400,
-                       hideCollapseTool: true,
-                       split: true,
-                       useSplitTips: true,
-                       splitTip: top.TYPO3.LLL.viewPort.tooltipModuleMenuSplit,
-                       enableChildSplit: true,
-                       border: false,
-                       autoScroll: true,
-                       listeners: {
-                               resize: function(cmp, adjWidth, adjHeight, rawWidth, rawHeight) {
-                                       var containerWidth = adjWidth,
-                                               moduleMenuWidth = document.getElementById('typo3-menu').clientWidth,
-                                               moduleMenuMinWidth = 100,
-                                               moduleMenuSnappedWidth = 46,
-                                               moduleMenuSnappingClass = 'typo3-module-menu-snapped',
-                                               forceSnapMode = (containerWidth <= moduleMenuMinWidth);
-                                       if (forceSnapMode){
-                                               cmp.addClass(moduleMenuSnappingClass);
-                                               snappedWidth =  moduleMenuSnappedWidth + containerWidth - moduleMenuWidth;
-                                               cmp.setWidth(snappedWidth);
-                                               if(snappedWidth !== containerWidth && TYPO3.Backend){
-                                                       TYPO3.Backend.syncSize();
-                                               }
-                                       } else{
-                                               this.removeClass(moduleMenuSnappingClass);
-                                       }
-                               }
-                       }
-               },
-               {
-                       region: 'center',
-                       layout: 'border',
-                       border: false,
-                       items: [
-                               {
-                                       region: 'west',
-                                       layout: 'fit',
-                                       id: 'typo3-navigationContainer',
-                                       width: 300,
-                                       minWidth: 20,
-                                       floatable: true,
-                                       animCollapse: false,
-                                       split: true,
-                                       enableChildSplit: true,
-                                       collapsible: true,
-                                       collapseMode: 'mini',
-                                       useSplitTips: true,
-                                       collapsibleSplitTip: top.TYPO3.LLL.viewPort.tooltipNavigationContainerSplitDrag,
-                                       hideCollapseTool: true,
-                                       hidden: true,
-                                       border: false,
-                                       name: 'navigation',
-                                       autoScroll: true,
-                                       items: [
-                                               {
-                                                       id: 'typo3-navigationIframe',
-                                                       border: false,
-                                                       hidden: true,
-                                                       xtype: 'iframePanel',
-                                                       name: 'navigation'
-                                               }
-                                       ]
-                               },
-                               {
-                                       region: 'center',
-                                       layout: 'border',
-                                       items: [
-                                               {
-                                                       id: 'typo3-navigationDummy',
-                                                       region: 'west',
-                                                       layout: 'fit',
-                                                       border: false,
-                                                       hidden: true,
-                                                       floatable: true,
-                                                       xtime: 'iframePanel',
-                                                       width: 5
-                                               },
-                                               {
-                                                       id: 'typo3-contentContainerWrapper',
-                                                       border: false,
-                                                       layout: 'fit',
-                                                       name: 'content',
-                                                       region: 'center',
-                                                       xtype: 'panel',
-                                                       layout: 'card',
-                                                       activeItem: 0,
-                                                       items: TYPO3.Viewport.ContentCards.cards
-                                               }
-                                       ]
-                               },
-                               {
-                                       region: 'south',
-                                       xtype: 'typo3DebugPanel',
-                                       collapsible: true,
-                                       collapseMode: 'mini',
-                                       collapsed: true,
-                                       hideCollapseTool: true,
-                                       animCollapse: false,
-                                       split: true,
-                                       useSplitTips: true,
-                                       collapsibleSplitTip: top.TYPO3.LLL.viewPort.tooltipDebugPanelSplitDrag,
-                                       autoScroll: true,
-                                       hidden: true,
-                                       height: 200,
-                                       id: 'typo3-debug-console',
-                                       border: false
-                               }
-                       ]
-               }
-       ]
-};
index 618bb50..168d418 100644 (file)
@@ -117,14 +117,14 @@ class BackendController {
                        'md5' => 'sysext/backend/Resources/Public/JavaScript/md5.js',
                        'modulemenu' => 'sysext/backend/Resources/Public/JavaScript/modulemenu.js',
                        'evalfield' => 'sysext/backend/Resources/Public/JavaScript/jsfunc.evalfield.js',
-                       'tabclosemenu' => 'js/extjs/ux/ext.ux.tabclosemenu.js',
+                       'tabclosemenu' => 'sysext/backend/Resources/Public/JavaScript/extjs/ux/ext.ux.tabclosemenu.js',
                        'notifications' => 'sysext/backend/Resources/Public/JavaScript/notifications.js',
                        'backend' => 'sysext/backend/Resources/Public/JavaScript/backend.js',
-                       'debugPanel' => 'js/extjs/debugPanel.js',
-                       'viewport' => 'js/extjs/viewport.js',
+                       'debugPanel' => 'sysext/backend/Resources/Public/JavaScript/extjs/debugPanel.js',
+                       'viewport' => 'sysext/backend/Resources/Public/JavaScript/extjs/viewport.js',
                        'iframepanel' => 'sysext/backend/Resources/Public/JavaScript/iframepanel.js',
-                       'backendcontentiframe' => 'js/extjs/backendcontentiframe.js',
-                       'viewportConfiguration' => 'js/extjs/viewportConfiguration.js',
+                       'backendcontentiframe' => 'sysext/backend/Resources/Public/JavaScript/extjs/backendcontentiframe.js',
+                       'viewportConfiguration' => 'sysext/backend/Resources/Public/JavaScript/extjs/viewportConfiguration.js',
                        'util' => 'sysext/backend/Resources/Public/JavaScript/util.js'
                );
                if (!$this->debug) {
@@ -278,7 +278,7 @@ class BackendController {
                        $component = strtolower(substr($info['componentId'], strrpos($info['componentId'], '-') + 1));
                        $componentDirectory = 'components/' . $component . '/';
                        if ($info['isCoreComponent']) {
-                               $absoluteComponentPath = PATH_site . 'typo3/js/extjs/' . $componentDirectory;
+                               $absoluteComponentPath = PATH_site . 'typo3/sysext/backend/Resources/Public/JavaScript/extjs/' . $componentDirectory;
                                $relativeComponentPath = '../' . str_replace(PATH_site, '', $absoluteComponentPath);
                        } else {
                                $absoluteComponentPath = ExtensionManagementUtility::extPath($info['extKey']) . $componentDirectory;
diff --git a/typo3/sysext/backend/Resources/Public/JavaScript/extjs/backendcontentiframe.js b/typo3/sysext/backend/Resources/Public/JavaScript/extjs/backendcontentiframe.js
new file mode 100644 (file)
index 0000000..a2557e6
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+Ext.ns('TYPO3');
+
+TYPO3.backendContentIframePanel = Ext.extend(TYPO3.iframePanel ,{
+       setUrl: function(source) {
+               var card;
+               var wrapper;
+               wrapper = Ext.getCmp('typo3-contentContainerWrapper');
+               this.url = source;
+               if(wrapper) {
+                       card = Ext.getCmp('typo3-card-' + TYPO3.ModuleMenu.App.loadedModule);
+                       if((card != undefined) && (source.search('extjspaneldummy.html') > -1)) {
+                               wrapper.getLayout().setActiveItem('typo3-card-' + TYPO3.ModuleMenu.App.loadedModule);
+                               if (typeof wrapper.getComponent(('typo3-card-' + TYPO3.ModuleMenu.App.loadedModule)).setUrl === 'function') {
+                                       wrapper.getComponent(('typo3-card-' + TYPO3.ModuleMenu.App.loadedModule)).setUrl(source);
+                               }
+                       } else {
+                               wrapper.getLayout().setActiveItem(this.id);
+                               this.body.dom.src = source;
+                               this.startLoader();
+                       }
+               }
+       },
+
+       getUrl: function () {
+               var wrapper;
+               var card;
+               wrapper = Ext.getCmp('typo3-contentContainerWrapper');
+
+               if(wrapper) {
+                       card = wrapper.getLayout().activeItem;
+                       if(card.id == this.id) {
+                               return this.body.dom.src;
+                       } else if(typeof card.getUrl == 'function') {
+                               return card.getUrl();
+                       } else {
+                               return this.url;
+                       }
+               }
+       }
+});
+Ext.reg('backendContentIframePanel', TYPO3.backendContentIframePanel);
\ No newline at end of file
diff --git a/typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/Ext.ux.state.TreePanel.js b/typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/Ext.ux.state.TreePanel.js
new file mode 100644 (file)
index 0000000..3d744c2
--- /dev/null
@@ -0,0 +1,140 @@
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+Ext.ns('Ext.ux.state');
+
+// dummy constructor
+Ext.ux.state.TreePanel = function() {};
+
+/**
+ * State Provider for a tree panel
+ */
+Ext.override(Ext.ux.state.TreePanel, {
+       /**
+        * Initializes the plugin
+        * @param {Ext.tree.TreePanel} tree
+        * @private
+        */
+       init:function(tree) {
+               tree.lastSelectedNode = null;
+               tree.isRestoringState = false;
+               tree.stateHash = {};
+
+               // install event handlers on TreePanel
+               tree.on({
+                       // add path of expanded node to stateHash
+                       beforeexpandnode:function(node) {
+                               if (this.isRestoringState) {
+                                       return;
+                               }
+
+                               var saveID = (node.id === 'root' ? node.id : node.id.substr(1));
+                               this.stateHash[saveID] = 1;
+                       },
+
+                       // delete path and all subpaths of collapsed node from stateHash
+                       beforecollapsenode:function(node) {
+                               if (this.isRestoringState) {
+                                       return;
+                               }
+
+                               var deleteID = (node.id === 'root' ? node.id : node.id.substr(1));
+                               delete this.stateHash[deleteID];
+                       },
+
+                       beforeclick: function(node) {
+                               if (this.isRestoringState) {
+                                       return;
+                               }
+                               this.stateHash['lastSelectedNode'] = node.id;
+                       }
+               });
+
+                       // update state on node expand or collapse
+               tree.stateEvents = tree.stateEvents || [];
+               tree.stateEvents.push('expandnode', 'collapsenode', 'click');
+
+               // add state related props to the tree
+               Ext.apply(tree, {
+                       // keeps expanded nodes paths keyed by node.ids
+                       stateHash:{},
+
+                       restoreState: function() {
+                               this.isRestoringState = true;
+                                       // get last selected node
+                               for (var pageID in this.stateHash) {
+                                       var pageNode = this.getNodeById((pageID !== 'root' ? 'p' : '') + pageID);
+                                       if (pageNode) {
+                                               pageNode.on({
+                                                       expand: {
+                                                               single:true,
+                                                               scope:this,
+                                                               fn: this.restoreState
+                                                       }
+                                               });
+                                               if (pageNode.expanded === false && pageNode.rendered == true) {
+                                                       pageNode.expand();
+                                               }
+                                       }
+                               }
+
+                               if (this.stateHash['lastSelectedNode']) {
+                                       var node = this.getNodeById(this.stateHash['lastSelectedNode']);
+                                       if (node) {
+                                               var contentId = TYPO3.Backend.ContentContainer.getIdFromUrl() ||
+                                                       String(fsMod.recentIds['web']) || '-1';
+
+                                               var hasContentFrameValidPageId = (contentId !== '-1' && contentId !== '0');
+                                               var isCurrentSelectedNode = (
+                                                       String(node.attributes.nodeData.id) === contentId ||
+                                                       contentId.indexOf('pages' + String(node.attributes.nodeData.id)) !== -1
+                                               );
+
+                                               if (isCurrentSelectedNode) {
+                                                       this.selectPath(node.getPath());
+                                               }
+
+                                               var isSingleClickPossible = (this.app.isVisible() && this.commandProvider && this.commandProvider.singleClick);
+                                               if (!hasContentFrameValidPageId && !isCurrentSelectedNode && isSingleClickPossible) {
+                                                       this.selectPath(node.getPath());
+                                                       this.commandProvider.singleClick(node, this);
+                                               }
+                                       }
+                               }
+
+                               this.isRestoringState = false;
+                       },
+
+                       // apply state on tree initialization
+                       applyState:function(state) {
+                               if(state) {
+                                       Ext.apply(this, state);
+
+                                       // it is too early to expand paths here
+                                       // so do it once on root load
+                                       this.root.on({
+                                               load: {
+                                                       single:true,
+                                                       scope:this,
+                                                       fn: this.restoreState
+                                               }
+                                       });
+                               }
+                       },
+
+                       // returns stateHash for save by state manager
+                       getState:function() {
+                               return {stateHash:this.stateHash};
+                       }
+               });
+       }
+});
diff --git a/typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/actions.js b/typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/actions.js
new file mode 100644 (file)
index 0000000..3e49a9f
--- /dev/null
@@ -0,0 +1,778 @@
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+Ext.namespace('TYPO3.Components.PageTree');
+
+/**
+ * @class TYPO3.Components.PageTree.Actions
+ *
+ * Actions dedicated for the page tree
+ *
+ * @namespace TYPO3.Components.PageTree
+ * @author Stefan Galinski <stefan.galinski@gmail.com>
+ */
+TYPO3.Components.PageTree.Actions = {
+
+       /**
+        * Evaluates a response from an ext direct call and shows a flash message
+        * if it was an exceptional result
+        *
+        * @param {Object} response
+        * @return {Boolean}
+        */
+       evaluateResponse: function(response) {
+               if (response.success === false) {
+                       top.TYPO3.Flashmessage.display(top.TYPO3.Severity.error, 'Exception', response.message);
+                       return false;
+               }
+
+               return true;
+       },
+
+       /**
+        * Releases the cut and copy mode from the context menu
+        *
+        * @param {TYPO3.Components.PageTree.Tree} tree
+        * @return {void}
+        */
+       releaseCutAndCopyModes: function(tree) {
+               tree.t3ContextInfo.inCutMode = false;
+               tree.t3ContextInfo.inCopyMode = false;
+
+               if (tree.t3ContextNode) {
+                       tree.t3ContextNode.attributes.nodeData.t3InCutMode = false;
+                       tree.t3ContextNode.attributes.nodeData.t3InCopyMode = false;
+                       tree.t3ContextNode = null;
+               }
+       },
+
+       /**
+        * Updates an existing node with the given alternative. The new tree node
+        * is returned afterwards.
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @param {Boolean} isExpanded
+        * @param {Object} updatedNode
+        * @param {Function} callback
+        * @return {Ext.tree.TreeNode}
+        */
+       updateNode: function(node, isExpanded, updatedNode, callback) {
+               if (!updatedNode) {
+                       return null;
+               }
+
+               updatedNode.uiProvider = node.ownerTree.uiProvider;
+               var newTreeNode = new Ext.tree.TreeNode(updatedNode);
+
+               var refreshCallback = this.restoreNodeStateAfterRefresh;
+               if (callback) {
+                       refreshCallback = refreshCallback.createSequence(callback);
+               }
+
+               node.parentNode.replaceChild(newTreeNode, node);
+               newTreeNode.ownerTree.refreshNode(newTreeNode, refreshCallback);
+
+               return newTreeNode;
+       },
+
+       /**
+        * Restores the node state
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @param {Boolean} isExpanded
+        * @return {void}
+        */
+       restoreNodeStateAfterRefresh: function(node, isExpanded) {
+               node.parentNode.expand(false, false);
+               if (isExpanded) {
+                       node.expand(false, false);
+               } else {
+                       node.collapse(false, false);
+               }
+       },
+
+       /**
+        * Shows deletion confirmation window
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @param {TYPO3.Components.PageTree.Tree} tree
+        * @param {Function} callback
+        * @param {Boolean} recursiveDelete
+        * @return {void}
+        */
+       confirmDelete: function(node, tree, callback, recursiveDelete) {
+               callback = callback || null;
+
+               var title = TYPO3.Components.PageTree.LLL.deleteDialogTitle,
+                       message = TYPO3.Components.PageTree.LLL.deleteDialogMessage;
+               if (recursiveDelete) {
+                       message = TYPO3.Components.PageTree.LLL.recursiveDeleteDialogMessage;
+               }
+
+               Ext.Msg.show({
+                       title: title,
+                       msg: message,
+                       buttons: Ext.Msg.YESNO,
+                       fn: function (answer) {
+                               if (answer === 'yes') {
+                                       TYPO3.Components.PageTree.Actions.deleteNode(node, tree, callback);
+                                       return true;
+                               }
+                               return false;
+                       },
+                       animEl: 'elId'
+               });
+       },
+
+       /**
+        * Deletes a node directly
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @param {TYPO3.Components.PageTree.Tree} tree
+        * @param {Function} callback
+        * @return {void}
+        */
+       deleteNode: function(node, tree, callback) {
+               TYPO3.Components.PageTree.Commands.deleteNode(
+                       node.attributes.nodeData,
+                       function(response) {
+                               var succeeded = this.evaluateResponse(response);
+                               if (Ext.isFunction(callback)) {
+                                       callback(node, tree, succeeded);
+                               }
+
+                               if (succeeded) {
+                                               // the node may not be removed in workspace mode
+                                       if (top.TYPO3.configuration.inWorkspace && response.id) {
+                                               this.updateNode(node, node.isExpanded(), response);
+                                       } else {
+                                               node.remove();
+                                       }
+                               }
+                       },
+                       this
+               );
+       },
+
+       /**
+        * Removes a node either directly or first shows deletion popup
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @param {TYPO3.Components.PageTree.Tree} tree
+        * @return {void}
+        */
+       removeNode: function(node, tree) {
+               if (TYPO3.Components.PageTree.Configuration.displayDeleteConfirmation) {
+                       this.confirmDelete(node);
+               } else {
+                       this.deleteNode(node, tree);
+               }
+       },
+
+       /**
+        * Restores a given node and moves it to the given destination inside the tree. Use this
+        * method if you want to add it as the first child of the destination.
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @param {TYPO3.Components.PageTree.Tree} tree
+        * @param {Ext.tree.TreeNode} destination
+        * @return {void}
+        */
+       restoreNodeToFirstChildOfDestination: function(node, tree, destination) {
+               TYPO3.Components.PageTree.Commands.restoreNode(
+                       node.attributes.nodeData,
+                       destination.attributes.nodeData.id,
+                       function(updatedNode) {
+                               if (this.evaluateResponse(updatedNode)) {
+                                       var newTreeNode = new Ext.tree.TreeNode(
+                                               Ext.apply(node.attributes, updatedNode)
+                                       );
+                                       destination.insertBefore(newTreeNode, destination.firstChild);
+                               }
+                       },
+                       this
+               );
+       },
+
+       /**
+        * Restores a given node and moves it to the given destination inside the tree. Use this
+        * method if you want to add the node after the destination node.
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @param {TYPO3.Components.PageTree.Tree} tree
+        * @param {Ext.tree.TreeNode} destination
+        * @return {void}
+        */
+       restoreNodeAfterDestination: function(node, tree, destination) {
+               TYPO3.Components.PageTree.Commands.restoreNode(
+                       node.attributes.nodeData,
+                       -destination.attributes.nodeData.id,
+                       function(updatedNode) {
+                               if (this.evaluateResponse(updatedNode)) {
+                                       var newTreeNode = new Ext.tree.TreeNode(
+                                               Ext.apply(node.attributes, updatedNode)
+                                       );
+                                       destination.parentNode.insertBefore(newTreeNode, destination.nextSibling);
+                               }
+                       },
+                       this
+               );
+       },
+
+       /**
+        * Collapses a whole tree branch
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @return {void}
+        */
+       collapseBranch: function(node) {
+               node.collapse(true);
+       },
+
+       /**
+        * Expands a whole tree branch
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @return {void}
+        */
+       expandBranch: function(node) {
+               node.expand(true);
+       },
+
+       /**
+        * Opens a popup windows for previewing the given node/page
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @return {void}
+        */
+       viewPage: function(node) {
+               var frontendWindow = window.open('', 'newTYPO3frontendWindow');
+               TYPO3.Components.PageTree.Commands.getViewLink(
+                       node.attributes.nodeData,
+                       function(result) {
+                               frontendWindow.location = result;
+                               frontendWindow.focus();
+                       }
+               );
+       },
+
+       /**
+        * Creates a temporary tree mount point
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @param {TYPO3.Components.PageTree.Tree} tree
+        * @return {void}
+        */
+       mountAsTreeRoot: function(node, tree) {
+               TYPO3.Components.PageTree.Commands.setTemporaryMountPoint(
+                       node.attributes.nodeData,
+                       function(response) {
+                               if (TYPO3.Components.PageTree.Configuration.temporaryMountPoint) {
+                                       TYPO3.Backend.NavigationContainer.PageTree.removeIndicator(
+                                               TYPO3.Backend.NavigationContainer.PageTree.temporaryMountPointInfoIndicator
+                                       );
+                               }
+
+                               TYPO3.Components.PageTree.Configuration.temporaryMountPoint = response;
+                               TYPO3.Backend.NavigationContainer.PageTree.addTemporaryMountPointIndicator();
+
+                               var selectedNode = TYPO3.Backend.NavigationContainer.PageTree.getSelected();
+                               tree.stateId = 'Pagetree' + TYPO3.Components.PageTree.Configuration.temporaryMountPoint;
+                               tree.refreshTree(function() {
+                                       var nodeIsSelected = false;
+                                       if (selectedNode) {
+                                               nodeIsSelected = TYPO3.Backend.NavigationContainer.PageTree.select(
+                                                       selectedNode.attributes.nodeData.id
+                                               );
+                                       }
+
+                                       var node = (nodeIsSelected ? TYPO3.Backend.NavigationContainer.PageTree.getSelected() : null);
+                                       if (node) {
+                                               this.singleClick(node, tree);
+                                       } else {
+                                               this.singleClick(tree.getRootNode().firstChild, tree);
+                                       }
+                               }, this);
+                       },
+                       this
+               );
+       },
+
+       /**
+        * Opens the edit page properties dialog
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @return {void}
+        */
+       editPageProperties: function(node) {
+               node.select();
+               var returnUrl = TYPO3.Backend.ContentContainer.src;
+               if (returnUrl.indexOf('returnUrl') !== -1) {
+                       returnUrl = TYPO3.Utility.getParameterFromUrl(returnUrl, 'returnUrl');
+               } else {
+                       returnUrl = encodeURIComponent(returnUrl);
+               }
+
+               TYPO3.Backend.ContentContainer.setUrl(
+                       'alt_doc.php?edit[pages][' + node.attributes.nodeData.id + ']=edit&returnUrl=' + returnUrl
+               );
+       },
+
+       /**
+        * Opens the new page wizard
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @return {void}
+        */
+       newPageWizard: function(node) {
+               node.select();
+               TYPO3.Backend.ContentContainer.setUrl(
+                       TYPO3.settings.NewRecord.moduleUrl + '&id=' + node.attributes.nodeData.id + '&pagesOnly=1'
+               );
+       },
+
+       /**
+        * Opens the info popup
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @return {void}
+        */
+       openInfoPopUp: function(node) {
+               launchView('pages', node.attributes.nodeData.id);
+       },
+
+       /**
+        * Opens the history popup
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @return {void}
+        */
+       openHistoryPopUp: function(node) {
+               node.select();
+               TYPO3.Backend.ContentContainer.setUrl(
+                       TYPO3.settings.RecordHistory.moduleUrl + '&element=pages:' + node.attributes.nodeData.id
+               );
+       },
+
+       /**
+        * Opens the export .t3d file dialog
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @return {void}
+        */
+       exportT3d: function(node) {
+               node.select();
+               TYPO3.Backend.ContentContainer.setUrl(
+                       TYPO3.settings.ImportExport.moduleUrl +
+                       '&tx_impexp[action]=export&' +
+                       'id=0&tx_impexp[pagetree][id]=' + node.attributes.nodeData.id +
+                       '&tx_impexp[pagetree][levels]=0' +
+                       '&tx_impexp[pagetree][tables][]=_ALL'
+               );
+       },
+
+       /**
+        * Opens the import .t3d file dialog
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @return {void}
+        */
+       importT3d: function(node) {
+               node.select();
+               TYPO3.Backend.ContentContainer.setUrl(
+                       TYPO3.settings.ImportExport.moduleUrl +
+                       '&id=' + node.attributes.nodeData.id +
+                       '&table=pages&tx_impexp[action]=import'
+               );
+       },
+
+       /**
+        * Enables the cut mode of a node
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @param {TYPO3.Components.PageTree.Tree} tree
+        * @return {void}
+        */
+       enableCutMode: function(node, tree) {
+               this.disableCopyMode(node, tree);
+               node.attributes.nodeData.t3InCutMode = true;
+               tree.t3ContextInfo.inCutMode = true;
+               tree.t3ContextNode = node;
+       },
+
+       /**
+        * Disables the cut mode of a node
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @param {TYPO3.Components.PageTree.Tree} tree
+        * @return {void}
+        */
+       disableCutMode: function(node, tree) {
+               this.releaseCutAndCopyModes(tree);
+               node.attributes.nodeData.t3InCutMode = false;
+       },
+
+       /**
+        * Enables the copy mode of a node
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @param {TYPO3.Components.PageTree.Tree} tree
+        * @return {void}
+        */
+       enableCopyMode: function(node, tree) {
+               this.disableCutMode(node, tree);
+               node.attributes.nodeData.t3InCopyMode = true;
+               tree.t3ContextInfo.inCopyMode = true;
+               tree.t3ContextNode = node;
+       },
+
+       /**
+        * Disables the copy mode of a node
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @param {TYPO3.Components.PageTree.Tree} tree
+        * @return {void}
+        */
+       disableCopyMode: function(node, tree) {
+               this.releaseCutAndCopyModes(tree);
+               node.attributes.nodeData.t3InCopyMode = false;
+       },
+
+       /**
+        * Pastes the cut/copy context node into the given node
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @param {TYPO3.Components.PageTree.Tree} tree
+        * @return {void}
+        */
+       pasteIntoNode: function(node, tree) {
+               if (!tree.t3ContextNode) {
+                       return;
+               }
+
+               if (tree.t3ContextInfo.inCopyMode) {
+                                // This is hard stuff to do. So increase the timeout for the AJAX request
+                       Ext.Ajax.timeout = 3600000;
+
+                       var newNode = tree.t3ContextNode = new Ext.tree.TreeNode(tree.t3ContextNode.attributes);
+                       newNode.id = 'fakeNode';
+                       node.insertBefore(newNode, node.childNodes[0]);
+                       node.attributes.nodeData.t3InCopyMode = false;
+                       this.copyNodeToFirstChildOfDestination(newNode, tree);
+
+               } else if (tree.t3ContextInfo.inCutMode) {
+                       if (node.getPath().indexOf(tree.t3ContextNode.id) !== -1) {
+                               return;
+                       }
+
+                       node.appendChild(tree.t3ContextNode);
+                       node.attributes.nodeData.t3InCutMode = false;
+                       this.moveNodeToFirstChildOfDestination(node, tree);
+               }
+       },
+
+       /**
+        * Pastes a cut/copy context node after the given node
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @param {TYPO3.Components.PageTree.Tree} tree
+        * @return {void}
+        */
+       pasteAfterNode: function(node, tree) {
+               if (!tree.t3ContextNode) {
+                       return;
+               }
+
+               if (tree.t3ContextInfo.inCopyMode) {
+                               // This is hard stuff to do. So increase the timeout for the AJAX request
+                       Ext.Ajax.timeout = 3600000;
+
+                       var newNode = tree.t3ContextNode = new Ext.tree.TreeNode(tree.t3ContextNode.attributes);
+                       newNode.id = 'fakeNode';
+                       node.parentNode.insertBefore(newNode, node.nextSibling);
+                       node.attributes.nodeData.t3InCopyMode = false;
+                       this.copyNodeAfterDestination(newNode, tree);
+
+               } else if (tree.t3ContextInfo.inCutMode) {
+                       if (node.getPath().indexOf(tree.t3ContextNode.id) !== -1) {
+                               return;
+                       }
+
+                       node.parentNode.insertBefore(tree.t3ContextNode, node.nextSibling);
+                       node.attributes.nodeData.t3InCutMode = false;
+                       this.moveNodeAfterDestination(node, tree);
+               }
+       },
+
+       /**
+        * Moves the current tree context node after the given node
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @param {TYPO3.Components.PageTree.Tree} tree
+        * @return {void}
+        */
+       moveNodeAfterDestination: function(node, tree) {
+               TYPO3.Components.PageTree.Commands.moveNodeAfterDestination(
+                       tree.t3ContextNode.attributes.nodeData,
+                       node.attributes.nodeData.id,
+                       function(response) {
+                               if (this.evaluateResponse(response) && tree.t3ContextNode) {
+                                       this.updateNode(tree.t3ContextNode, tree.t3ContextNode.isExpanded(), response);
+                               }
+                               this.releaseCutAndCopyModes(tree);
+                       },
+                       this
+               );
+       },
+
+       /**
+        * Moves the current tree context node as the first child of the given node
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @param {TYPO3.Components.PageTree.Tree} tree
+        * @return {void}
+        */
+       moveNodeToFirstChildOfDestination: function(node, tree) {
+               TYPO3.Components.PageTree.Commands.moveNodeToFirstChildOfDestination(
+                       tree.t3ContextNode.attributes.nodeData,
+                       node.attributes.nodeData.id,
+                       function(response) {
+                               if (this.evaluateResponse(response) && tree.t3ContextNode) {
+                                       this.updateNode(tree.t3ContextNode, tree.t3ContextNode.isExpanded(), response);
+                               }
+                               this.releaseCutAndCopyModes(tree);
+                       },
+                       this
+               );
+       },
+
+       /**
+        * Inserts a new node after the given node
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @param {TYPO3.Components.PageTree.Tree} tree
+        * @return {void}
+        */
+       insertNodeAfterDestination: function(node, tree) {
+               TYPO3.Components.PageTree.Commands.insertNodeAfterDestination(
+                       tree.t3ContextNode.attributes.nodeData,
+                       node.previousSibling.attributes.nodeData.id,
+                       tree.t3ContextInfo.serverNodeType,
+                       function(response) {
+                               if (this.evaluateResponse(response)) {
+                                       this.updateNode(node, node.isExpanded(), response, function(node) {
+                                               tree.triggerEdit(node);
+                                       });
+                               }
+                               this.releaseCutAndCopyModes(tree);
+                       },
+                       this
+               );
+       },
+
+       /**
+        * Inserts a new node as the first child of the given node
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @param {TYPO3.Components.PageTree.Tree} tree
+        * @return {void}
+        */
+       insertNodeToFirstChildOfDestination: function(node, tree) {
+               TYPO3.Components.PageTree.Commands.insertNodeToFirstChildOfDestination(
+                       tree.t3ContextNode.attributes.nodeData,
+                       tree.t3ContextInfo.serverNodeType,
+                       function(response) {
+                               if (this.evaluateResponse(response)) {
+                                       this.updateNode(node, true, response, function(node) {
+                                               tree.triggerEdit(node);
+                                       });
+                               }
+                               this.releaseCutAndCopyModes(tree);
+                       },
+                       this
+               );
+       },
+
+       /**
+        * Copies the current tree context node after the given node
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @param {TYPO3.Components.PageTree.Tree} tree
+        * @return {void}
+        */
+       copyNodeAfterDestination: function(node, tree) {
+               TYPO3.Components.PageTree.Commands.copyNodeAfterDestination(
+                       tree.t3ContextNode.attributes.nodeData,
+                       node.previousSibling.attributes.nodeData.id,
+                       function(response) {
+                               if (this.evaluateResponse(response)) {
+                                       this.updateNode(node, true, response, function(node) {
+                                               tree.triggerEdit(node);
+                                       });
+                               }
+                               this.releaseCutAndCopyModes(tree);
+                       },
+                       this
+               );
+       },
+
+       /**
+        * Copies the current tree context node as the first child of the given node
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @param {TYPO3.Components.PageTree.Tree} tree
+        * @return {void}
+        */
+       copyNodeToFirstChildOfDestination: function(node, tree) {
+               TYPO3.Components.PageTree.Commands.copyNodeToFirstChildOfDestination(
+                       tree.t3ContextNode.attributes.nodeData,
+                       node.parentNode.attributes.nodeData.id,
+                       function(response) {
+                               if (this.evaluateResponse(response)) {
+                                       this.updateNode(node, true, response, function(node) {
+                                               tree.triggerEdit(node);
+                                       });
+                               }
+                               this.releaseCutAndCopyModes(tree);
+                       },
+                       this
+               );
+       },
+
+       /**
+        * Visibilizes a page
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @return {void}
+        */
+       enablePage: function(node) {
+               TYPO3.Components.PageTree.Commands.visiblyNode(
+                       node.attributes.nodeData,
+                       function(response) {
+                               if (this.evaluateResponse(response)) {
+                                       this.updateNode(node, node.isExpanded(), response);
+                               }
+                       },
+                       this
+               );
+       },
+
+       /**
+        * Disables a page
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @return {void}
+        */
+       disablePage: function(node) {
+               TYPO3.Components.PageTree.Commands.disableNode(
+                       node.attributes.nodeData,
+                       function(response) {
+                               if (this.evaluateResponse(response)) {
+                                       this.updateNode(node, node.isExpanded(), response);
+                               }
+                       },
+                       this
+               );
+       },
+
+       /**
+        * Reloads the content frame with the current module and node id
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @param {TYPO3.Components.PageTree.Tree} tree
+        * @return {void}
+        */
+       singleClick: function(node, tree) {
+               tree.currentSelectedNode = node;
+
+               var separator = '?';
+               if (currentSubScript.indexOf('?') !== -1) {
+                       separator = '&';
+               }
+
+               node.select();
+               if (tree.stateHash) {
+                       tree.stateHash.lastSelectedNode = node.id;
+               } else {
+                       TYPO3.Components.PageTree.Commands.addRootlineOfNodeToStateHash(
+                               TYPO3.Backend.NavigationContainer.PageTree.mainTree.stateId,
+                               node.attributes.nodeData.id, function(stateHash) {
+                                       TYPO3.Backend.NavigationContainer.PageTree.mainTree.stateHash = stateHash;
+                                       TYPO3.Backend.NavigationContainer.PageTree.mainTree.refreshTree();
+                               }
+                       );
+               }
+
+               fsMod.recentIds['web'] = node.attributes.nodeData.id;
+
+               TYPO3.Backend.ContentContainer.setUrl(
+                       TS.PATH_typo3 + currentSubScript + separator + 'id=' + node.attributes.nodeData.id
+               );
+       },
+
+       /**
+        * Opens a configured url inside the content frame
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @param {TYPO3.Components.PageTree.Tree} tree
+        * @param {Object} contextItem
+        * @return {void}
+        */
+       openCustomUrlInContentFrame: function(node, tree, contextItem) {
+               if (!contextItem.customAttributes || !contextItem.customAttributes.contentUrl) {
+                       return;
+               }
+
+               node.select();
+               TYPO3.Backend.ContentContainer.setUrl(
+                       contextItem.customAttributes.contentUrl.replace('###ID###', node.attributes.nodeData.id)
+               );
+       },
+
+       /**
+        * Updates the title of a node
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @param {String} newText
+        * @param {String} oldText
+        * @param {TYPO3.Components.PageTree.TreeEditor} treeEditor
+        * @return {void}
+        */
+       saveTitle: function(node, newText, oldText, treeEditor) {
+               if (newText === oldText || newText == '') {
+                       treeEditor.updateNodeText(
+                               node,
+                               node.editNode.attributes.nodeData.editableText,
+                               Ext.util.Format.htmlEncode(oldText)
+                       );
+                       return;
+               }
+
+               TYPO3.Components.PageTree.Commands.updateLabel(
+                       node.editNode.attributes.nodeData,
+                       newText,
+                       function(response) {
+                               if (this.evaluateResponse(response)) {
+                                       treeEditor.updateNodeText(node, response.editableText, response.updatedText);
+                               } else {
+                                       treeEditor.updateNodeText(
+                                               node,
+                                               node.editNode.attributes.nodeData.editableText,
+                                               Ext.util.Format.htmlEncode(oldText)
+                                       );
+                               }
+                               this.singleClick(node.editNode, node.editNode.ownerTree);
+                       },
+                       this
+               );
+       }
+};
diff --git a/typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/app.js b/typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/app.js
new file mode 100644 (file)
index 0000000..3640a68
--- /dev/null
@@ -0,0 +1,389 @@
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+Ext.namespace('TYPO3.Components.PageTree');
+
+/**
+ * @class TYPO3.Components.PageTree.App
+ *
+ * Page tree main application that controls setups the components
+ *
+ * @namespace TYPO3.Components.PageTree
+ * @extends Ext.Panel
+ * @author Stefan Galinski <stefan.galinski@gmail.com>
+ */
+TYPO3.Components.PageTree.App = Ext.extend(Ext.Panel, {
+       /**
+        * Panel id
+        *
+        * @type {String}
+        */
+       id: 'typo3-pagetree',
+
+       /**
+        * Border
+        *
+        * @type {Boolean}
+        */
+       border: false,
+
+       /**
+        * Layout Type
+        *
+        * @type {String}
+        */
+       layout:'fit',
+
+       /**
+        * Active tree
+        *
+        * @type {TYPO3.Components.PageTree.Tree}
+        */
+       activeTree: null,
+
+       /**
+        * Main pagetree
+        *
+        * @type {TYPO3.Components.PageTree.Tree}
+        */
+       mainTree: null,
+
+       /**
+        * Initializes the application
+        *
+        * Set's the necessary language labels, configuration options and sprite icons by an
+        * external call and initializes the needed components.
+        *
+        * @return {void}
+        */
+       initComponent: function() {
+               TYPO3.Components.PageTree.DataProvider.loadResources(function(response) {
+                       TYPO3.Components.PageTree.LLL = response['LLL'];
+                       TYPO3.Components.PageTree.Configuration = response['Configuration'];
+                       TYPO3.Components.PageTree.Sprites = response['Sprites'];
+
+                       this.mainTree = this.activeTree = new TYPO3.Components.PageTree.Tree({
+                               id: this.id + '-tree',
+                               deletionDropZoneId: this.id + '-deletionDropZone',
+                               ddGroup: this.id,
+                               stateful: true,
+                               stateId: 'Pagetree' + TYPO3.Components.PageTree.Configuration.temporaryMountPoint,
+                               stateEvents: [],
+                               autoScroll: true,
+                               autoHeight: false,
+                               plugins: new Ext.ux.state.TreePanel(),
+                               commandProvider: TYPO3.Components.PageTree.Actions,
+                               contextMenuProvider: TYPO3.Components.PageTree.ContextMenuDataProvider,
+                               treeDataProvider: TYPO3.Components.PageTree.DataProvider,
+                               app: this,
+                               listeners: {
+                                       resize: {
+                                               fn: function() {
+                                                       var treeContainer = Ext.getCmp(this.id + '-treeContainer');
+                                                       Ext.getCmp(this.id + '-filteringTree').setSize(treeContainer.getSize());
+                                                       treeContainer.doLayout();
+                                               },
+                                               scope: this,
+                                               buffer: 250
+                                       }
+                               }
+                       });
+
+                       var filteringTree = new TYPO3.Components.PageTree.FilteringTree({
+                               id: this.id + '-filteringTree',
+                               deletionDropZoneId: this.id + '-deletionDropZone',
+                               ddGroup: this.id,
+                               autoScroll: true,
+                               autoHeight: false,
+                               commandProvider: TYPO3.Components.PageTree.Actions,
+                               contextMenuProvider: TYPO3.Components.PageTree.ContextMenuDataProvider,
+                               treeDataProvider: TYPO3.Components.PageTree.DataProvider,
+                               app: this
+                       }).hide();
+
+                       var topPanel = new TYPO3.Components.PageTree.TopPanel({
+                               dataProvider: TYPO3.Components.PageTree.DataProvider,
+                               filteringTree: filteringTree,
+                               ddGroup: this.id,
+                               tree: this.mainTree,
+                               app: this
+                       });
+
+                       var deletionDropZone = new TYPO3.Components.PageTree.DeletionDropZone({
+                               id: this.id + '-deletionDropZone',
+                               commandProvider: TYPO3.Components.PageTree.Actions,
+                               ddGroup: this.id,
+                               app: this,
+                               region: 'south',
+                               height: 35
+                       });
+
+                       var topPanelItems = new Ext.Panel({
+                               id: this.id + '-topPanelItems',
+                               border: false,
+                               region: 'north',
+                               height: 49,
+                               items: [
+                                       topPanel, {
+                                               border: false,
+                                               id: this.id + '-indicatorBar'
+                                       }
+                               ]
+                       });
+
+                       this.add({
+                               layout: 'border',
+                               items: [
+                                       topPanelItems,
+                                       {
+                                               border: false,
+                                               id: this.id + '-treeContainer',
+                                               region: 'center',
+                                               layout: 'fit',
+                                               items: [this.mainTree, filteringTree]
+                                       },
+                                       deletionDropZone
+                               ]
+                       });
+
+                       if (TYPO3.Components.PageTree.Configuration.temporaryMountPoint) {
+                               topPanelItems.on('afterrender', function() {
+                                       this.addTemporaryMountPointIndicator();
+                               }, this);
+                       }
+
+                       if (TYPO3.Components.PageTree.Configuration.indicator !== '') {
+                               this.addIndicatorItems();
+                       }
+                       this.doLayout();
+
+                       this.ownerCt.on('resize', function() {
+                               this.doLayout();
+                       });
+               }, this);
+
+               TYPO3.Components.PageTree.App.superclass.initComponent.apply(this, arguments);
+       },
+
+       /**
+        * Adds the default indicator items
+        *
+        * @return {void}
+        */
+       addIndicatorItems: function() {
+               this.addIndicator({
+                       border: false,
+                       id: this.id + '-indicatorBar-indicatorTitle',
+                       cls: this.id + '-indicatorBar-item',
+                       html: TYPO3.Components.PageTree.Configuration.indicator
+               });
+       },
+
+       /**
+        * Adds the temporary mount point indicator item
+        *
+        * @return {void}
+        */
+       addTemporaryMountPointIndicator: function() {
+               this.temporaryMountPointInfoIndicator = this.addIndicator({
+                       border: false,
+                       id: this.id + '-indicatorBar-temporaryMountPoint',
+                       cls: this.id + '-indicatorBar-item',
+
+                       listeners: {
+                               afterrender: {
+                                       fn: function() {
+                                               var element = Ext.fly(this.id + '-indicatorBar-temporaryMountPoint-clear');
+                                               element.on('click', function() {
+                                                       TYPO3.BackendUserSettings.ExtDirect.unsetKey(
+                                                               'pageTree_temporaryMountPoint',
+                                                               function() {
+                                                                       TYPO3.Components.PageTree.Configuration.temporaryMountPoint = null;
+                                                                       this.removeIndicator(this.temporaryMountPointInfoIndicator);
+                                                                       this.getTree().refreshTree();
+                                                                       this.getTree().stateId = 'Pagetree';
+                                                               },
+                                                               this
+                                                       );
+                                               }, this);
+                                       },
+                                       scope: this
+                               }
+                       },
+
+                       html: '<p>' +
+                                       '<span id="' + this.id + '-indicatorBar-temporaryMountPoint-info' + '" ' +
+                                               'class="' + this.id + '-indicatorBar-item-leftIcon ' +
+                                                       TYPO3.Components.PageTree.Sprites.Info + '">&nbsp;' +
+                                       '</span>' +
+                                       '<span id="' + this.id + '-indicatorBar-temporaryMountPoint-clear' + '" ' +
+                                               'class="' + this.id + '-indicatorBar-item-rightIcon ' + '">X' +
+                                       '</span>' +
+                                       TYPO3.Components.PageTree.LLL.temporaryMountPointIndicatorInfo + '<br />' +
+                                               TYPO3.Components.PageTree.Configuration.temporaryMountPoint +
+                               '</p>'
+               });
+       },
+
+       /**
+        * Adds an indicator item
+        *
+        * @param {Object} component
+        * @return {void}
+        */
+       addIndicator: function(component) {
+               if (component.listeners && component.listeners.afterrender) {
+                       component.listeners.afterrender.fn = component.listeners.afterrender.fn.createSequence(
+                               this.afterTopPanelItemAdded, this
+                       );
+               } else {
+                       if (component.listeners) {
+                               component.listeners = {}
+                       }
+
+                       component.listeners.afterrender = {
+                               scope: this,
+                               fn: this.afterTopPanelItemAdded
+                       }
+               }
+
+               var indicator = Ext.getCmp(this.id + '-indicatorBar').add(component);
+               this.doLayout();
+
+               return indicator;
+       },
+
+       /**
+        * Recalculates the top panel items height after an indicator was added
+        *
+        * @param {Ext.Component} component
+        * @return {void}
+        */
+       afterTopPanelItemAdded: function(component) {
+               var topPanelItems = Ext.getCmp(this.id + '-topPanelItems');
+               topPanelItems.setHeight(topPanelItems.getHeight() + component.getHeight() + 3);
+               this.doLayout();
+       },
+
+       /**
+        * Removes an indicator item from the indicator bar
+        *
+        * @param {Ext.Component} component
+        * @return {void}
+        */
+       removeIndicator: function(component) {
+               var topPanelItems = Ext.getCmp(this.id + '-topPanelItems');
+               topPanelItems.setHeight(topPanelItems.getHeight() - component.getHeight() - 3);
+               Ext.getCmp(this.id + '-indicatorBar').remove(component);
+               this.doLayout();
+       },
+
+       /**
+        * Compatibility method that calls refreshTree()
+        *
+        * @return {void}
+        */
+       refresh: function() {
+               this.refreshTree();
+       },
+
+       /**
+        * Another compatibility method that calls refreshTree()
+        *
+        * @return {void}
+        */
+       refresh_nav: function() {
+               this.refreshTree();
+       },
+
+       /**
+        * Refreshes the tree and selects the node defined by fsMod.recentIds['web']
+        *
+        * @return {void}
+        */
+       refreshTree: function() {
+               if (!isNaN(fsMod.recentIds['web']) && fsMod.recentIds['web'] !== '') {
+                       this.select(fsMod.recentIds['web'], true);
+               }
+
+               TYPO3.Components.PageTree.DataProvider.getIndicators(function(response) {
+                       var indicators = Ext.getCmp(this.id + '-indicatorBar-indicatorTitle');
+                       if (indicators) {
+                               this.removeIndicator(indicators);
+                       }
+
+                       if (response._COUNT > 0) {
+                               TYPO3.Components.PageTree.Configuration.indicator = response.html;
+                               this.addIndicatorItems();
+                       }
+               }, this);
+
+               this.activeTree.refreshTree();
+       },
+
+       /**
+        * Returns the current active tree
+        *
+        * @return {TYPO3.Components.PageTree.Tree}
+        */
+       getTree: function() {
+               return this.activeTree;
+       },
+
+       /**
+        * Selects a node defined by the page id. If the second parameter is set, we
+        * store the new location into the state hash.
+        *
+        * @param {int} pageId
+        * @return {Boolean}
+        */
+       select: function(pageId) {
+               TYPO3.Components.PageTree.Commands.addRootlineOfNodeToStateHash(
+                       TYPO3.Backend.NavigationContainer.PageTree.mainTree.stateId,
+                       pageId, function(stateHash) {
+                               TYPO3.Backend.NavigationContainer.PageTree.mainTree.stateHash = stateHash;
+                               TYPO3.Backend.NavigationContainer.PageTree.mainTree.refreshTree();
+                       }
+               );
+
+               return true;
+       },
+
+       /**
+        * Returns the currently selected node
+        *
+        * @return {Ext.tree.TreeNode}
+        */
+       getSelected: function() {
+               var node = this.getTree().getSelectionModel().getSelectedNode();
+               return node ? node : null;
+       }
+});
+
+/**
+ * Callback method for the module menu
+ *
+ * @return {TYPO3.Components.PageTree.App}
+ */
+TYPO3.ModuleMenu.App.registerNavigationComponent('typo3-pagetree', function() {
+       TYPO3.Backend.NavigationContainer.PageTree = new TYPO3.Components.PageTree.App();
+
+               // compatibility code
+    top.nav = TYPO3.Backend.NavigationContainer.PageTree;
+    top.nav_frame = TYPO3.Backend.NavigationContainer.PageTree;
+    top.content.nav_frame = TYPO3.Backend.NavigationContainer.PageTree;
+
+       return TYPO3.Backend.NavigationContainer.PageTree;
+});
+
+// XTYPE Registration
+Ext.reg('TYPO3.Components.PageTree.App', TYPO3.Components.PageTree.App);
diff --git a/typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/contextmenu.js b/typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/contextmenu.js
new file mode 100644 (file)
index 0000000..9e0ff58
--- /dev/null
@@ -0,0 +1,183 @@
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+Ext.namespace('TYPO3.Components.PageTree');
+
+/**
+ * @class TYPO3.Components.PageTree.ContextMenu
+ *
+ * Context menu implementation
+ *
+ * @namespace TYPO3.Components.PageTree
+ * @extends Ext.menu.Menu
+ * @author Stefan Galinski <stefan.galinski@gmail.com>
+ */
+TYPO3.Components.PageTree.ContextMenu = Ext.extend(Ext.menu.Menu, {
+       /**
+        * Context menu node
+        *
+        * @cfg {Ext.tree.TreeNode}
+        */
+       node: null,
+
+       /**
+        * Page Tree
+        *
+        * @cfg {TYPO3.Components.PageTree.Tree}
+        */
+       pageTree: null,
+
+       /**
+        * Component Id
+        *
+        * @type {String}
+        */
+       id: 'typo3-pagetree-contextmenu',
+
+       /**
+        * Parent clicks should be ignored
+        *
+        * @type {Boolean}
+        */
+       ignoreParentClicks: true,
+
+       /**
+        * Listeners
+        *
+        * The itemclick event triggers the configured single click action
+        */
+       listeners: {
+               itemclick: {
+                       fn: function (item) {
+                               if (this.pageTree.commandProvider[item.callbackAction]) {
+                                       if (item.parentMenu.pageTree.stateHash) {
+                                               fsMod.recentIds['web'] = item.parentMenu.node.attributes.nodeData.id;
+                                               item.parentMenu.pageTree.stateHash['lastSelectedNode'] = item.parentMenu.node.id;
+                                       }
+
+                                       this.pageTree.commandProvider[item.callbackAction](
+                                               item.parentMenu.node,
+                                               item.parentMenu.pageTree,
+                                               item
+                                       );
+                               }
+                       }
+               }
+       },
+
+       /**
+        * Fills the menu with the actions
+        *
+        * @param {Ext.tree.TreeNode} node
+        * @param {TYPO3.Components.PageTree.Tree} pageTree
+        * @param {Object} contextMenuConfiguration
+        * @return {void}
+        */
+       fill: function(node, pageTree, contextMenuConfiguration) {
+               this.node = node;
+               this.pageTree = pageTree;
+
+               var components = this.preProcessContextMenuConfiguration(contextMenuConfiguration);
+               if (components.length) {
+                       for (var component in components) {
+                               if (components[component] === '-') {
+                                       this.addSeparator();
+                               } else if (typeof components[component] === 'object') {
+                                       this.addItem(components[component]);
+                               }
+                       }
+               }
+       },
+
+       /**
+        * Parses the context menu actions array recursively and generates the
+        * components for the context menu including separators/dividers and sub menus
+        *
+        * @param {Object} contextMenuConfiguration
+        * @param {int} level
+        * @return {Object}
+        */
+       preProcessContextMenuConfiguration: function(contextMenuConfiguration, level) {
+               level = level || 0;
+               if (level > 5) {
+                       return [];
+               }
+
+               var components = [];
+               var index = 0;
+
+               var modulesInsideGroup = false;
+               var subMenus = 0;
+               for (var singleAction in contextMenuConfiguration) {
+                       if (contextMenuConfiguration[singleAction]['type'] === 'submenu') {
+                               var subMenuComponents = this.preProcessContextMenuConfiguration(
+                                       contextMenuConfiguration[singleAction]['childActions'],
+                                       level + 1
+                               );
+
+                               if (subMenuComponents.length) {
+                                       var subMenu = new TYPO3.Components.PageTree.ContextMenu({
+                                               id: this.id + '-sub' + ++subMenus,
+                                               items: subMenuComponents,
+                                               node: this.node,
+                                               pageTree: this.pageTree
+                                       });
+
+                                       components[index++] = {
+                                               text: contextMenuConfiguration[singleAction]['label'],
+                                               cls: 'contextMenu-subMenu',
+                                               menu: subMenu,
+                                               icon: contextMenuConfiguration[singleAction]['icon'],
+                                               iconCls: contextMenuConfiguration[singleAction]['class']
+                                       };
+                               }
+                       } else if (contextMenuConfiguration[singleAction]['type'] === 'divider') {
+                               if (modulesInsideGroup) {
+                                       components[index++] = '-';
+                                       modulesInsideGroup = false;
+                               }
+                       } else {
+                               modulesInsideGroup = true;
+
+                               if (typeof contextMenuConfiguration[singleAction] === 'object') {
+                                       var component = {
+                                               'text': contextMenuConfiguration[singleAction]['label'],
+                                               'icon': contextMenuConfiguration[singleAction]['icon'],
+                                               'iconCls': contextMenuConfiguration[singleAction]['class'],
+                                               'callbackAction': contextMenuConfiguration[singleAction]['callbackAction'],
+                                               'customAttributes': contextMenuConfiguration[singleAction]['customAttributes']
+                                       };
+                                       component.itemTpl = Ext.menu.Item.prototype.itemTpl = new Ext.XTemplate(
+                                               '<a id="{id}" class="{cls}" hidefocus="true" unselectable="on" href="{href}">',
+                                                       '<span class="{hrefTarget}">',
+                                                               '<span class="x-menu-item-icon" unselectable="on"><span class="{iconCls}"></span></span>',
+                                                       '</span>',
+                                                       '<span class="x-menu-item-text">{text}</span>',
+                                               '</a>'
+                                       );
+
+                                       components[index++] = component;
+                               }
+                       }
+               }
+
+                       // remove divider if it's the last item of the context menu
+               if (components[components.length - 1] === '-') {
+                       components[components.length - 1] = '';
+               }
+
+               return components;
+       }
+});
+
+// XTYPE Registration
+Ext.reg('TYPO3.Components.PageTree.ContextMenu', TYPO3.Components.PageTree.ContextMenu);
diff --git a/typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/deletiondropzone.js b/typo3/sysext/backend/Resources/Public/JavaScript/extjs/components/pagetree/javascript/deletiondropzone.js
new file mode 100644 (file)
index 0000000..967a036
--- /dev/null
@@ -0,0 +1,309 @@
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+Ext.namespace('TYPO3.Components.PageTree');
+
+/**
+ * @class TYPO3.Components.PageTree.DeletionDropZone
+ *
+ * Deletion Drop Zone
+ *
+ * @namespace TYPO3.Components.PageTree
+ * @extends Ext.Panel
+ * @author Stefan Galinski <stefan.galinski@gmail.com>
+ */
+TYPO3.Components.PageTree.DeletionDropZone = Ext.extend(Ext.Panel, {
+       /**
+        * Border
+        *
+        * @type {Boolean}
+        */
+       border: true,
+
+       /**
+        * Hide the drop zone initially
+        *
+        * @type {Boolean}
+        */
+       hidden: true,
+
+       /**
+        * Command Provider
+        *
+        * @cfg {Object}
+        */
+       commandProvider: null,
+
+       /**
+        * Drag and Drop Group
+        *
+        * @cfg {String}
+        */
+       ddGroup: '',
+
+       /**
+        * Main Application
+        *
+        * @cfg {TYPO3.Components.PageTree.App}
+        */
+       app: null,
+
+       /**
+        * Removed node had a previous sibling
+        *
+        * @type {Boolean}
+        */
+       isPreviousSibling: false,
+
+       /**
+        * Removed node
+        *
+        * @type {Ext.tree.TreeNode}
+        */
+       previousNode: null,
+
+       /**
+        * Click Handler for the recovery text
+        *
+        * @type {Function}
+        */
+       textClickHandler: null,
+
+       /**
+        * Amount of drops (used to prevent early hiding of the box)
+        *
+        * @type {int}
+        */
+       amountOfDrops: 0,
+
+       /**
+        * Listeners
+        *
+        * The "afterrender" event creates the drop zone
+        */
+       listeners: {
+               afterrender: {
+