Feature #25127 ยป 17702_v1.diff
t3lib/js/extjs/components/pagetree/javascript/tree.js (Arbeitskopie) | ||
---|---|---|
rootVisible: false,
|
||
/**
|
||
* Tree Editor Instance (Inline Edit)
|
||
*
|
||
* @type {TYPO3.Components.PageTree.TreeEditor}
|
||
*/
|
||
treeEditor: null,
|
||
/**
|
||
* Enable the drag and drop feature
|
||
*
|
||
* @cfg {Boolean}
|
||
... | ... | |
* @return {void}
|
||
*/
|
||
enableInlineEditor: function() {
|
||
(new TYPO3.Components.PageTree.TreeEditor(this));
|
||
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}
|
||
... | ... | |
* Enables the deletion drop zone if configured. Also it creates the
|
||
* shown dd proxy element.
|
||
*
|
||
* @param {TYPO3.Components.PageTree.Tree} treePane
|
||
* @param {TYPO3.Components.PageTree.Tree} treePanel
|
||
* @param {Ext.tree.TreeNode} node
|
||
* @return {void}
|
||
*/
|
t3lib/js/extjs/components/pagetree/javascript/actions.js (Arbeitskopie) | ||
---|---|---|
* @param {Ext.tree.TreeNode} node
|
||
* @param {Boolean} isExpanded
|
||
* @param {Object} updatedNode
|
||
* @param {Function} callback
|
||
* @return {Ext.tree.TreeNode}
|
||
*/
|
||
updateNode: function(node, isExpanded, updatedNode) {
|
||
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, function() {
|
||
newTreeNode.parentNode.expand(false, false);
|
||
if (isExpanded) {
|
||
newTreeNode.expand(false, false);
|
||
} else {
|
||
newTreeNode.collapse(false, false);
|
||
}
|
||
});
|
||
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
|
||
... | ... | |
tree.t3ContextInfo.serverNodeType,
|
||
function(response) {
|
||
if (this.evaluateResponse(response)) {
|
||
this.updateNode(node, node.isExpanded(), response);
|
||
this.updateNode(node, node.isExpanded(), response, function(node) {
|
||
tree.triggerEdit(node);
|
||
});
|
||
}
|
||
this.releaseCutAndCopyModes(tree);
|
||
},
|
||
... | ... | |
tree.t3ContextInfo.serverNodeType,
|
||
function(response) {
|
||
if (this.evaluateResponse(response)) {
|
||
node = this.updateNode(node, true, response);
|
||
this.updateNode(node, true, response, function(node) {
|
||
tree.triggerEdit(node);
|
||
});
|
||
}
|
||
this.releaseCutAndCopyModes(tree);
|
||
},
|
||
... | ... | |
node.previousSibling.attributes.nodeData.id,
|
||
function(response) {
|
||
if (this.evaluateResponse(response)) {
|
||
this.updateNode(node, true, response);
|
||
this.updateNode(node, true, response, function(node) {
|
||
tree.triggerEdit(node);
|
||
});
|
||
}
|
||
this.releaseCutAndCopyModes(tree);
|
||
},
|
||
... | ... | |
node.parentNode.attributes.nodeData.id,
|
||
function(response) {
|
||
if (this.evaluateResponse(response)) {
|
||
this.updateNode(node, true, response);
|
||
this.updateNode(node, true, response, function(node) {
|
||
tree.triggerEdit(node);
|
||
});
|
||
}
|
||
this.releaseCutAndCopyModes(tree);
|
||
},
|