Merged new PageTree (version for TYPO3 4.5 Beta 3) - deleted unneeded files
authorSteffen Kamper <info@sk-typo3.de>
Wed, 22 Dec 2010 01:31:48 +0000 (01:31 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Wed, 22 Dec 2010 01:31:48 +0000 (01:31 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9877 709f56b5-9817-0410-a4d7-c38de5d9e867

typo3/sysext/pagetree/components/pagetree/javascript/Ext.ux.plugins.TreePanelStateful.js [deleted file]
typo3/sysext/pagetree/components/pagetree/javascript/featurepanel.js [deleted file]
typo3/sysext/pagetree/components/pagetree/javascript/overrides.js [deleted file]
typo3/sysext/pagetree/components/pagetree/javascript/pagetree.js [deleted file]

diff --git a/typo3/sysext/pagetree/components/pagetree/javascript/Ext.ux.plugins.TreePanelStateful.js b/typo3/sysext/pagetree/components/pagetree/javascript/Ext.ux.plugins.TreePanelStateful.js
deleted file mode 100644 (file)
index cd30afc..0000000
+++ /dev/null
@@ -1,314 +0,0 @@
-/******************************************************************
- * @class Ext.ux.plugins.TreePanelStateful
- * @extends Ext.util.Observable
-
- * @constructor
- * var treePanel = new Ext.ux.TreePanel({
- ...add TreePanel options
- plugins:new Ext.ux.plugins.TreePanelStateful()
- });
- *****************************************************************/
-Ext.namespace('Ext.ux.plugins');
-
-Ext.ux.plugins.TreePanelStateful = function(config) {
-       Ext.apply(this, config);
-};
-
-Ext.extend(Ext.ux.plugins.TreePanelStateful, Ext.util.Observable, {
-       treePanel: null,
-       init: function(treePanel) {
-               this.treePanel = treePanel;
-               Ext.apply(treePanel, {
-                       // internal variables
-                       taskId: '',
-                       ignoreCookie: false,
-                       startQueryClicked: false,
-                       nodeAttrs: {},
-                       oldParentNodeAttrs: {},
-                       newParentNodeAttrs: {},
-
-                       //CookieProvider - hold state of TreePanel
-                       cp: null,
-
-                       //TreePanel state - simple array
-                       state: null,
-
-                       //stateful option set to true
-                       stateful: true,
-
-                       //Last selected node
-                       lastSelectedNode: null,
-
-                       //Function which saves TreePanel state
-                       saveState : function(newState) {
-                               this.state = newState;
-                               this.cp.set('TreePanelStateful_' + treePanel.taskId, this.state);
-                       },
-
-                       //Function which restores TreePanel state
-                       restoreState : function(defaultPath) {
-                               if (!treePanel.ignoreCookie) {
-                                       var stateToRestore = this.state;
-
-                                       if (this.state.length == 0) {
-                                               var newState = new Array(defaultPath);
-                                               this.saveState(newState);
-                                               this.expandPath(defaultPath);
-                                               return;
-                                       }
-
-                                       for (var i = 0; i < stateToRestore.length; ++i) {
-                                               // activate all path strings from the state
-                                               try {
-                                                       var path = stateToRestore[i];
-                                                       this.expandPath(path);
-                                               }
-                                               catch(e) {
-                                                       // ignore invalid path, seems to be remove in the datamodel
-                                                       // TODO fix state at this point
-                                               }
-                                       }
-                               }
-                       },
-
-                       /***** Events which cause TreePanel to remember its state
-                        * click, expandnode, collapsenode, load, textchange,
-                        * remove, render
-                        ********************************************************/
-                       stateEvents: [{
-                               click: {
-                                       fn: function(node) {
-                                               this.cp.set('LastSelectedNodePath_' + treePanel.taskId, node.getPath());
-                                               this.cp.set('LastSelectedNodeId_' + treePanel.taskId, node.id);
-                                       }
-                               },
-                               expandnode: {
-                                       fn: function(node) {
-                                               var currentPath = node.getPath();
-                                               var newState = new Array();
-
-                                               for (var i = 0; i < this.state.length; ++i) {
-                                                       var path = this.state[i];
-
-                                                       if (currentPath.indexOf(path) == -1) {
-                                                               // this path does not already exist
-                                                               newState.push(path);
-                                                       }
-                                               }
-
-                                               // now ad the new path
-                                               newState.push(currentPath);
-                                               this.saveState(newState);
-                                       }
-                               },
-                               collapsenode: {
-                                       fn: function(node) {
-                                               var parentNode;
-                                               if (node.id == this.root.id) {
-                                                       return;
-                                               }
-
-                                               var closedPath = node.getPath();
-                                               var newState = new Array();
-
-                                               for (var i = 0; i < this.state.length; ++i) {
-                                                       var path = this.state[i];
-                                                       if (path.indexOf(closedPath) == -1) {
-                                                               // this path is not a subpath of the closed path
-                                                               newState.push(path);
-                                                       }
-                                                       else {
-                                                               if (path == closedPath) {
-                                                                       parentNode = node.parentNode;
-
-                                                                       if (parentNode.id != this.root.id) {
-                                                                               newState.push(parentNode.getPath());
-                                                                       }
-                                                               }
-                                                       }
-                                               }
-
-                                               if (newState.length == 0) {
-                                                       parentNode = node.parentNode;
-                                                       newState.push((parentNode == null ? this.pathSeparator : parentNode.getPath()));
-                                               }
-
-                                               this.saveState(newState);
-                                       }
-                               },
-                               load: {
-                                       fn: function(node) {
-                                               var lastSelectedNodePath = this.cp.get('LastSelectedNodePath_' + treePanel.taskId);
-                                               var lastSelectedNodeId = this.cp.get('LastSelectedNodeId_' + treePanel.taskId);
-
-                                               var rootNode = this.getRootNode();
-                                               if (node.id == rootNode.id == lastSelectedNodeId) {
-                                                       this.selectPath(lastSelectedNodePath);
-                                                       node.fireEvent('click', node);
-                                                       return;
-                                               }
-
-                                               if (node.id == lastSelectedNodeId) {
-                                                       node.fireEvent('click', node);
-                                               } else {
-                                                       var childNode = node.findChild('id', lastSelectedNodeId);
-
-                                                       if (childNode && childNode.isLeaf()) {
-                                                               childNode.ensureVisible();
-                                                               this.selectPath(lastSelectedNodePath);
-                                                               childNode.fireEvent('click', childNode);
-                                                       }
-                                                       else if (childNode && !childNode.isLeaf()) {
-                                                               this.selectPath(lastSelectedNodePath);
-                                                               childNode.fireEvent('click', childNode);
-                                                       }
-                                               }
-                                       }
-                               },
-                               textchange: {
-                                       fn: function(node, text, oldText) {
-                                               var lastSelectedNodePath = this.cp.get('LastSelectedNodePath_' + treePanel.taskId);
-                                               if (lastSelectedNodePath) {
-                                                       return;
-                                               }
-                                               
-                                               var newSelectedNodePath = lastSelectedNodePath.replace(oldText, text);
-
-                                               this.cp.set('LastSelectedNodePath_' + treePanel.taskId, newSelectedNodePath);
-
-                                               this.expandPath(node.getPath());
-                                               this.selectPath(node.getPath());
-                                       }
-                               },
-                               remove: {
-                                       fn: function(tree, parentNode, node) {
-                                               var lastSelectedNodeId = this.cp.get('LastSelectedNodeId_' + treePanel.taskId);
-                                               if (!tree.movingNode) {
-                                                       if (node.id == lastSelectedNodeId) {
-                                                               this.cp.set('LastSelectedNodePath_' + treePanel.taskId, parentNode.getPath());
-                                                               this.cp.set('LastSelectedNodeId_' + treePanel.taskId, parentNode.id);
-                                                       }
-
-                                                       this.cp.set('DeletedNodeParent_' + treePanel.taskId + '_' + node.id, parentNode.id);
-                                                       this.cp.set('DeletedNode_' + treePanel.taskId + '_' + node.id, node.id);
-
-                                                       if (tree.deleteWithChildren)
-                                                               this.cp.set('DeletedNodeWithChildren_' + treePanel.taskId + '_' + node.id, "true");
-
-                                                       tree.deleteWithChildren = false;
-                                               }
-                                       }
-                               },
-                               movenode: {
-                                       fn: function(tree, node, oldParent, newParent) {
-                                               var lastSelectedNodeId = this.cp.get('LastSelectedNodeId_' + treePanel.taskId);
-                                               if (node.id == lastSelectedNodeId) {
-                                                       this.cp.set('LastSelectedNodePath_' + treePanel.taskId, newParent.getPath());
-                                                       this.cp.set('LastSelectedNodeId_' + treePanel.taskId, newParent.id);
-                                               }
-
-                                               this.cp.set('MovedNodeOldParent_' + treePanel.taskId + '_' + node.id, oldParent.id);
-                                               this.cp.set('MovedNodeNewParent_' + treePanel.taskId + '_' + node.id, newParent.id);
-                                               this.cp.set('MovedNode_' + treePanel.taskId + '_' + node.id, node.id);
-                                       }
-                               }
-                       }]
-               });
-
-               if (!treePanel.stateful) {
-                       treePanel.stateful = true;
-               }
-
-               if (!treePanel.cp) {
-                       treePanel.cp = new Ext.state.CookieProvider({expires: null});
-               }
-
-               if (!treePanel.lastSelectedNode) {
-                       var cookieLastSelectedNode = treePanel.cp.get('LastSelectedNodeId_' + treePanel.taskId);
-
-                       if (!cookieLastSelectedNode) {
-                               treePanel.lastSelectedNode = treePanel.root;
-                       }
-                       else {
-                               treePanel.lastSelectedNode = cookieLastSelectedNode;
-                       }
-               }
-
-               if (!treePanel.state) {
-                       var cookieState = treePanel.cp.get('TreePanelStateful_' + treePanel.taskId);
-
-                       if (!cookieState) {
-                               treePanel.state = new Array();
-                       }
-                       else {
-                               treePanel.state = cookieState;
-                       }
-               }
-
-               treePanel.restoreState(treePanel.root.getPath());
-       },
-       updateState: function(treePanel, parentNode, node) {
-               if (!treePanel.ignoreCookie && !treePanel.startQueryClicked) {
-                       /*
-                        * Check for deleted nodes.
-                        */
-                       var deletedNode = treePanel.getNodeById(treePanel.cp.get('DeletedNode_' + this.treePanel.taskId + '_' + node.id));
-
-                       if (deletedNode != undefined) {
-                               var deleteWithChildren = treePanel.cp.get('DeletedNodeWithChildren_' + this.treePanel.taskId + '_' + node.id);
-
-                               if (deleteWithChildren === "true")
-                                       treePanel.deleteWithChildren = true;
-
-                               deletedNode.remove();
-
-                               if (!parentNode.hasChildNodes())
-                                       parentNode.expand();
-                       }
-                       else {
-                               /*
-                                * Check for moved nodes.
-                                */
-                               treePanel.movingNode = true;
-
-                               var movedNode = treePanel.getNodeById(treePanel.cp.get('MovedNode_' + treePanel.taskId + '_' + node.id));
-
-                               if (movedNode != undefined) {
-                                       var oldParentNode = treePanel.getNodeById(treePanel.cp.get('MovedNodeOldParent_' + treePanel.taskId + '_' + node.id));
-                                       var newParentNode = treePanel.getNodeById(treePanel.cp.get('MovedNodeNewParent_' + treePanel.taskId + '_' + node.id));
-
-                                       if (oldParentNode != undefined && newParentNode != undefined) {
-                                               oldParentNode.removeChild(node);
-                                               newParentNode.appendChild(node);
-                                               newParentNode.lastChild = node;
-
-                                               if (treePanel.nodeAttrs.indexOf(node.attributes.id) === -1) {
-                                                       treePanel.nodeAttrs.push(node.id);
-                                                       treePanel.oldParentNodeAttrs.push(oldParentNode.id);
-                                                       treePanel.newParentNodeAttrs.push(newParentNode.id);
-                                               }
-                                               else {
-                                                       treePanel.nodeAttrs[treePanel.nodeAttrs.indexOf(node.attributes.id)] = node.id;
-                                                       treePanel.oldParentNodeAttrs[treePanel.nodeAttrs.indexOf(node.attributes.id)] = oldParentNode.id;
-                                                       treePanel.newParentNodeAttrs[treePanel.nodeAttrs.indexOf(node.attributes.id)] = newParentNode.id;
-                                               }
-                                               treePanel.gridModified = true;
-                                       }
-                               }
-
-                               treePanel.movingNode = false;
-                       }
-               }
-               else {
-                       treePanel.cp.clear('TreePanelStateful_' + treePanel.taskId);
-                       treePanel.cp.clear('LastSelectedNodePath_' + treePanel.taskId);
-                       treePanel.cp.clear('LastSelectedNodeId_' + treePanel.taskId);
-                       treePanel.cp.clear('DeletedNodeParent_' + treePanel.taskId + '_' + node.id);
-                       treePanel.cp.clear('DeletedNode_' + treePanel.taskId + '_' + node.id);
-                       treePanel.cp.clear('DeletedNodeWithChildren_' + treePanel.taskId + '_' + node.id);
-                       treePanel.cp.clear('MovedNodeOldParent_' + treePanel.taskId + '_' + node.id);
-                       treePanel.cp.clear('MovedNodeNewParent_' + treePanel.taskId + '_' + node.id);
-                       treePanel.cp.clear('MovedNode_' + treePanel.taskId + '_' + node.id);
-               }
-       }
-});
\ No newline at end of file
diff --git a/typo3/sysext/pagetree/components/pagetree/javascript/featurepanel.js b/typo3/sysext/pagetree/components/pagetree/javascript/featurepanel.js
deleted file mode 100644 (file)
index abb702e..0000000
+++ /dev/null
@@ -1,234 +0,0 @@
-Ext.namespace('TYPO3.Components.PageTree');
-
-TYPO3.Components.PageTree.FeaturePanel = Ext.extend(Ext.Panel, {
-       id: 'topPanel',
-       border: false,
-       height: 60,
-
-       currentlyClickedButton: null,
-       currentlyShownPanel: null,
-
-       tbar: new Ext.Toolbar(),
-
-       pageTree: null,
-       filterTree: null,
-
-       initComponent: function() {
-               this.filterTree = this.addFilterFeature();
-               this.addDragDropNodeInsertionFeature();
-               this.addRefreshTreeFeature();
-               this.addLanguageSelection();
-
-               TYPO3.Components.PageTree.FeaturePanel.superclass.initComponent.apply(this, arguments);
-       },
-
-       // This is the callback method which toggles the sub-menu if you click
-       // on a top-bar item.
-       topbarButtonCallback: function() {
-               if (this.ownerCt.ownerCt.currentlyClickedButton === null) {
-                       // first click, nothing selected yet
-                       this.toggle(true);
-                       this.connectedWidget.show();
-
-                       this.ownerCt.ownerCt.currentlyClickedButton = this;
-                       this.ownerCt.ownerCt.currentlyShownPanel = this.connectedWidget;
-               } else {
-                       if (this.ownerCt.ownerCt.currentlyClickedButton === this) {
-                               // second click onto currently clicked button
-                               this.ownerCt.ownerCt.currentlyClickedButton.toggle(false);
-                               this.ownerCt.ownerCt.currentlyShownPanel.hide();
-                               this.ownerCt.ownerCt.currentlyClickedButton = null;
-                               this.ownerCt.ownerCt.currentlyShownPanel = null;
-                       } else {
-                               // toggling a view
-                               this.ownerCt.ownerCt.currentlyClickedButton.toggle(false);
-                               this.ownerCt.ownerCt.currentlyShownPanel.hide();
-
-                               this.toggle(true);
-                               this.connectedWidget.show();
-                               this.ownerCt.ownerCt.currentlyClickedButton = this;
-                               this.ownerCt.ownerCt.currentlyShownPanel = this.connectedWidget;
-                       }
-               }
-       },
-
-       addWidget: function(button, connectedWidget) {
-               button.connectedWidget = connectedWidget;
-               if (!button.hasListener('click')) {
-                       button.addListener('click', this.topbarButtonCallback);
-               }
-
-               this.getTopToolbar().addItem(button);
-               this.add(connectedWidget);
-               this.doLayout();
-       },
-
-       /**
-        * Add the "Filter" feature to the top panel and the panel.
-        */
-       addFilterFeature: function() {
-               // Callback method displaying the results
-               var filterCallback = function(textField) {
-                       var filterString = textField.getValue();
-                       if (filterString != '') {
-                               this.pageTree.dataProvider.getFilteredTree(filterString, function(results) {
-                                       this.filterTree.setRootNode({
-                                               id: 'root',
-                                               children: results
-                                       });
-                                       this.pageTree.tree.hide();
-                                       this.filterTree.expandAll();
-                                       this.filterTree.show();
-                                       this.doLayout();
-                               }.createDelegate(this));
-                       } else {
-                               this.filterTree.hide();
-                               this.pageTree.tree.show();
-                               this.doLayout();
-                       }
-               };
-
-               this.pageTree.dataProvider.getSpriteIconClasses('actions-system-tree-search-open', function(result) {
-                       // Top Panel
-                       var topPanelButton = new Ext.Button({
-                               //text: 'filter',
-                               cls: 'topPanel-button ' + result
-                       });
-
-                       var topPanelWidget = new Ext.Panel({
-                               border: false,
-                               hidden: true,
-                               cls: 'typo3-pagetree-topbar-item',
-                               items: [
-                                       new Ext.form.TextField({
-                                               id: 'typo3-pagetree-topPanel-filter',
-                                               enableKeyEvents: true,
-                                               listeners: {
-                                                       keypress: {
-                                                               fn: filterCallback,
-                                                               scope: this,
-                                                               buffer: 250
-                                                       }
-                                               }
-                                       })
-                               ]
-                       });
-                       this.addWidget(topPanelButton, topPanelWidget);
-               }, this);
-
-               // Tree initialization
-               return new Ext.tree.TreePanel({
-                       anchor: '100% 100%',
-                       border: false,
-                       autoScroll: true,
-                       animate: false,
-                       id: 'typo3-pagetree-filterTree',
-                       rootVisible: false,
-                       hidden:true,
-                       root: {
-                               id: 'root',
-                               text: 'Root',
-                               expanded: true
-                       }
-               });
-       },
-
-       /**
-        * Add drag and drop node insertion.
-        * @internal
-        */
-       addDragDropNodeInsertionFeature: function() {
-               // Initialization of the "new node" toolbar, via a dataProvider.
-               var newNodeToolbar = new Ext.Toolbar({
-                       border: false,
-                       id: 'typo3-pagetree-topbar-new',
-                       cls: 'typo3-pagetree-topbar-item',
-                       hidden: true,
-                       anchor: '100% 100%',
-                       autoWidth: true,
-                       listeners: {
-                               render: function() {
-                                       new Ext.dd.DragZone(newNodeToolbar.getEl(), {
-                                               ddGroup: 'TreeDD',
-                                               getDragData: function(e) {
-                                                       var clickedButton = Ext.ComponentMgr.get(e.getTarget('.x-btn').id);
-                                                       clickedButton.shouldCreateNewNode = true;
-
-                                                       this.ddel = document.createElement('div');
-                                                       return {ddel: this.ddel, item: clickedButton}
-                                               },
-                                               onInitDrag: function() {
-                                                       var clickedButton = this.dragData.item;
-                                                       this.ddel.innerHTML = '<span class="' + clickedButton.initialConfig.cls + '"></span>' + clickedButton.title;
-                                                       this.ddel.style.width = '150px';
-                                                       this.proxy.update(this.ddel);
-                                               }
-                                       });
-                               }
-                       }
-               });
-
-               // Load data from server
-               if (this.pageTree.dataProvider.getNodeTypes) {
-                       // Only call the server if the server implements getNodeTypes();
-                       this.pageTree.dataProvider.getNodeTypes(function(response) {
-                               var length = response.length;
-                               var item = null;
-                               for (var i = 0; i < length; ++i) {
-                                       item = new Ext.Toolbar.Button(response[i]);
-                                       newNodeToolbar.addItem(item);
-                               }
-                               newNodeToolbar.doLayout();
-                       });
-               }
-
-               this.pageTree.dataProvider.getSpriteIconClasses('actions-page-new', function(result) {
-                       var topPanelButton = new Ext.Button({
-                               cls: 'topPanel-button ' + result
-                       });
-
-                       this.addWidget(topPanelButton, newNodeToolbar);
-               }, this);
-       },
-
-       /**
-        * Adds a language selection menu to the top bar
-        * @internal
-        */
-       addLanguageSelection: function() {
-               // Initialization of the "new node" toolbar, via a dataProvider.
-               (new Ext.Toolbar({
-                       border: false,
-                       id: this.id + '-topbar-languageSelection',
-                       cls: this.id + '-topbar-item',
-                       hidden: true,
-                       anchor: '100% 100%',
-                       autoWidth: true
-               }));
-
-
-       },
-
-       /**
-        * Add the "Refresh Tree" feature to the top panel
-        */
-       addRefreshTreeFeature: function() {
-               this.pageTree.dataProvider.getSpriteIconClasses('actions-system-refresh', function(result) {
-                       // Top Panel
-                       var topPanelButton = new Ext.Button({
-                               cls: 'topPanel-button ' + result,
-                               listeners: {
-                                       scope: this.pageTree.tree,
-                                       'click': {
-                                               fn: this.pageTree.tree.refreshTree
-                                       }
-                               }
-                       });
-
-                       this.getTopToolbar().addItem(topPanelButton);
-               }, this);
-       }
-});
-
-// XTYPE Registration
-Ext.reg('TYPO3.Components.PageTree.FeaturePanel', TYPO3.Components.PageTree.FeaturePanel);
\ No newline at end of file
diff --git a/typo3/sysext/pagetree/components/pagetree/javascript/overrides.js b/typo3/sysext/pagetree/components/pagetree/javascript/overrides.js
deleted file mode 100644 (file)
index 06b43f0..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 TYPO3 Tree Team <http://forge.typo3.org/projects/typo3v4-extjstrees>
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-*
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*  A copy is found in the textfile GPL.txt and important notices to the license
-*  from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-
-/**
- * Override TreeNodeUI
- */
-
-Ext.namespace('TYPO3.Components.PageTree');
-
-TYPO3.Components.PageTree.PageTreeUI = Ext.extend(Ext.tree.TreeNodeUI, {
-       // private
-       // This method is taken from ExtJS sources. Modifications are marked with // START TYPO3-MODIFICATION
-       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 = typeof a.checked === 'boolean';
-               var href = a.href ? a.href : Ext.isGecko ? "" : "#";
-               var buf = ['<li class="x-tree-node"><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 src="', this.emptyIcon, '" class="x-tree-ec-icon x-tree-elbow" />',
-                       // START TYPO3-MODIFICATION
-                       a.spriteIconCode,
-                       '<span class="prefixText">', a.prefixText, '</span>',
-                       // END TYPO3-MODIFICATION
-                       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('');
-
-               var nel;
-               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];
-               // START TYPO3-MODIFICATION
-               Ext.fly(this.iconNode).on('click', function(event) {
-                       this.getOwnerTree().openContextMenu(this, event); // calling the context-menu event doesn't work!'
-                       event.stopEvent();
-               }, n);
-               // Index from 3 to 4 incremented!
-               var index = 4;
-               // STOP TYPO3-MODIFICATION
-               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;
-       }
-});
\ No newline at end of file
diff --git a/typo3/sysext/pagetree/components/pagetree/javascript/pagetree.js b/typo3/sysext/pagetree/components/pagetree/javascript/pagetree.js
deleted file mode 100644 (file)
index 7027fa6..0000000
+++ /dev/null
@@ -1,247 +0,0 @@
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 TYPO3 Tree Team <http://forge.typo3.org/projects/typo3v4-extjstrees>
-*  All rights reserved
-*
-*  This script is part of the TYPO3 project. The TYPO3 project is
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-*
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*  A copy is found in the textfile GPL.txt and important notices to the license
-*  from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-
-/**
- * TYPO3 Page Tree Application
- */
-
-Ext.namespace('TYPO3.Components.PageTree');
-
-TYPO3.Components.PageTree.App = Ext.extend(Ext.Panel, {
-       id: 'typo3-pagetree',
-       border: false,
-
-       tree: null,
-       topPanel: null,
-
-       dataProvider: null,
-       commandProvider : null,
-       contextMenuDataProvider: null,
-
-       contextMenuConfiguration: null,
-
-       isControlPressed: false,
-
-       initComponent: function() {
-               this.dataProvider = TYPO3.Components.PageTree.DataProvider;
-               this.commandProvider = TYPO3.Components.PageTree.Actions;
-               this.contextMenuDataProvider = TYPO3.Components.PageTree.ContextMenuDataProvider;
-
-               this.tree = new TYPO3.Components.PageTree.Tree({
-                       pageTree: this,
-                       plugins: new Ext.ux.plugins.TreePanelStateful()
-               });
-
-               this.topPanel = new TYPO3.Components.PageTree.FeaturePanel({
-                       pageTree: this
-               });
-
-               this.deletionDropZone = new TYPO3.Components.PageTree.DeletionDropZone({
-                       pageTree: this
-               });
-
-               this.addInlineEditorFeature(this.tree);
-               this.addNodeCopyPasteFeature(this.tree);
-
-               this.items = [
-                       this.topPanel, {
-                               border: false,
-                               id: 'typo3-pagetree-treeContainer',
-                               items: [
-                                       this.tree,
-                                       this.topPanel.filterTree
-                               ]
-                       },
-                       this.deletionDropZone
-               ];
-
-               TYPO3.Components.PageTree.App.superclass.initComponent.apply(this, arguments);
-       },
-
-       /**
-        * Initialize the inline editor for the given tree.
-        *
-        * @param tree The Ext.tree.TreePanel where the Inline Editor should be added.
-        * @internal
-        */
-       addInlineEditorFeature: function(tree) {
-               var treeEditor = new Ext.tree.TreeEditor(
-                       tree, {
-                               ignoreNoChange: true,
-                               editDelay: 250,
-                               shadow: false
-                       }
-               );
-
-       treeEditor.on({
-                       beforestartedit: {
-                               scope: this,
-                               fn: function(treeEditor) {
-                                       // @todo treeEditor.editNode.attributes.label should be used as editable label
-                               }
-                       },
-
-                       complete: {
-                               scope: this,
-                               fn: this.commandProvider.saveTitle
-                       }
-       });
-       },
-
-       addNodeCopyPasteFeature: function(tree) {
-               // When dragging starts, we need to add the explanation to the tool-tip
-               tree.addListener('startdrag', function(tree) {
-                       var explanationNode = document.createElement('div');
-                       Ext.fly(explanationNode).addClass('copyHelp');
-                       explanationNode.appendChild(document.createTextNode('Press Ctrl to copy.'));
-
-                       tree.explanationTooltip = explanationNode;
-                       tree.dragZone.proxy.ghost.dom.appendChild(explanationNode);
-                       this.deletionDropZone.setHeight(30);
-                       this.doLayout();
-               }, this);
-
-               // SECTION: move
-               // When a node has been moved via drag and drop, this is called.
-               // This event is ONLY called on move, NOT on copy, insert or delete.
-               tree.addListener('movenode', function(tree, movedNode, oldParent, newParent, position) {
-                       if (position == 0) {
-                               this.commandProvider.moveNodeToFirstChildOfDestination(movedNode, newParent.id);
-                       } else {
-                               var previousSibling = newParent.childNodes[position - 1];
-                               this.commandProvider.moveNodeAfterDestination(movedNode, previousSibling.id);
-                       }
-               }, this);
-
-               // SECTION: copy / create
-               // The following two event handlers deal with the node copying.
-               // The first one is called because we need to copy the node, and replace it by a dummy,
-               // and the second one disables the node, does the ajax request and un-hides the node again.
-               tree.addListener('beforenodedrop', function(de) {
-                       /*this.deletionDropZone.setHeight(0);
-                        this.doLayout();*/
-
-                       if (de.data && de.data.item && de.data.item.shouldCreateNewNode) {
-                               // Insertion - part 1
-                               var nodeType = de.data.item.nodeType;
-                               de.dropNode = new Ext.tree.TreeNode({
-                                       text: 'New...',
-                                       leaf: true
-                               });
-                               de.cancel = false; // Somehow, "cancel" is currently set to "true" - but do not know why.
-                               de.dropNode.uiProvider = TYPO3.Components.PageTree.PageTreeUI;
-                               de.dropNode.isInsertedNode = true;
-                               de.dropNode.serverNodeType = nodeType;
-                       } else {
-                               if (this.isControlPressed) {
-                                       // Copying - part 1
-                                       de.dropNode = new Ext.tree.TreeNode(de.dropNode.attributes);
-                                       de.dropNode.uiProvider = TYPO3.Components.PageTree.PageTreeUI;
-                                       de.dropNode.isCopiedNode = true;
-                               }
-                       }
-                       return true;
-               }, this);
-
-               tree.addListener('nodedrop', function(de) {
-                       // This callback method replaces the current node with the
-                       // one transmitted from the server.
-                       var callback = function(updatedNodeFromServer) {
-                               // We need to make sure that the UI Provider is correctly set, so that the rendering works for the new node.
-                               updatedNodeFromServer.uiProvider = TYPO3.Components.PageTree.PageTreeUI;
-                               var newTreeNode = new Ext.tree.TreeNode(updatedNodeFromServer);
-                               this.parentNode.replaceChild(newTreeNode, this);
-                       };
-
-                       if (de.dropNode.isInsertedNode) {
-                               // Insertion: - part 2
-                               de.dropNode.disable();
-                               if (de.dropNode.previousSibling) {
-                                       // We have previous sibling, so we want to add the record AFTER the previous sibling
-                                       this.commandProvider.insertNodeAfterDestination(de.dropNode, callback);
-                               } else {
-                                       if (de.dropNode.parentNode) {
-                                               // We do not have a previous sibling, but a parent node. Thus, we add the node as the first child
-                                               // of the parent.
-                                               this.commandProvider.insertNodeToFirstChildOfDestination(de.dropNode, callback);
-                                       } else {
-                                               // Should not happen!
-                                       }
-                               }
-                       } else {
-                               if (de.dropNode.isCopiedNode) {
-                                       // Copying - part 2
-                                       de.dropNode.disable();
-                                       if (de.dropNode.previousSibling) {
-                                               // We have previous sibling, so we want to add the record AFTER the previous sibling
-                                               this.commandProvider.copyNodeAfterDestination(de.dropNode, callback);
-                                       } else {
-                                               if (de.dropNode.parentNode) {
-                                                       // We do not have a previous sibling, but a parent node. Thus, we add the node as the first child
-                                                       // of the parent.
-                                                       this.commandProvider.copyNodeToFirstChildOfDestination(de.dropNode, callback);
-                                               } else {
-                                                       // Should not happen!
-                                               }
-                                       }
-                               }
-                       }
-               }, this);
-
-               // SECTION: Key Handlers        
-               (new Ext.KeyMap(document, {
-                       key: Ext.EventObject.CONTROL,
-                       fn: function() {
-                               this.isControlPressed = true;
-                               var copyHelpDiv = Ext.fly(tree.explanationTooltip);
-                               if (copyHelpDiv) {
-                                       copyHelpDiv.setVisibilityMode(Ext.Element.DISPLAY);
-                                       copyHelpDiv.hide();
-                               }
-                       },
-                       scope: this
-               }, 'keydown'));
-
-               (new Ext.KeyMap(document, {
-                       key: Ext.EventObject.CONTROL,
-                       fn: function() {
-                               this.isControlPressed = false;
-                               var copyHelpDiv = Ext.fly(tree.explanationTooltip);
-                               if (copyHelpDiv) {
-                                       copyHelpDiv.show();
-                               }
-                       },
-                       scope: this
-               }, 'keyup'));
-       }
-});
-
-TYPO3.ModuleMenu.App.registerNavigationComponent('typo3-pagetree', function() {
-       return new TYPO3.Components.PageTree.App();
-});
-
-// XTYPE Registration
-Ext.reg('TYPO3.Components.PageTree.App', TYPO3.Components.PageTree.App);
\ No newline at end of file