NodeTreePanel.js (tine20-2020.08.3) | : | NodeTreePanel.js (tine20-2020.08.4) | ||
---|---|---|---|---|
skipping to change at line 25 | skipping to change at line 25 | |||
* @namespace Tine.Filemanager | * @namespace Tine.Filemanager | |||
* @class Tine.Filemanager.NodeTreePanel | * @class Tine.Filemanager.NodeTreePanel | |||
* @extends Tine.widgets.container.TreePanel | * @extends Tine.widgets.container.TreePanel | |||
* | * | |||
* @author Martin Jatho <m.jatho@metaways.de> | * @author Martin Jatho <m.jatho@metaways.de> | |||
*/ | */ | |||
Tine.Filemanager.NodeTreePanel = Ext.extend(Tine.widgets.container.TreePanel, { | Tine.Filemanager.NodeTreePanel = Ext.extend(Tine.widgets.container.TreePanel, { | |||
filterMode : 'filterToolbar', | filterMode : 'filterToolbar', | |||
recordClass : Tine.Filemanager.Model.Node, | ||||
allowMultiSelection : false, | allowMultiSelection : false, | |||
ddGroup: 'fileDDGroup', | ddGroup: 'fileDDGroup', | |||
enableDD: true, | enableDD: true, | |||
dataSafeAreaName: 'Tinebase.datasafe', | dataSafeAreaName: 'Tinebase.datasafe', | |||
dataSafeEnabled: false, | dataSafeEnabled: false, | |||
hasGrid: true, | hasGrid: true, | |||
initComponent: function() { | initComponent: function() { | |||
this.recordClass= Tine.Filemanager.Model.Node; | ||||
this.on('nodedragover', this.onNodeDragOver, this); | this.on('nodedragover', this.onNodeDragOver, this); | |||
if (! this.app) { | if (! this.app) { | |||
this.app = Tine.Tinebase.appMgr.get(this.recordClass.getMeta('appNam e')); | this.app = Tine.Tinebase.appMgr.get(this.recordClass.getMeta('appNam e')); | |||
} | } | |||
if (this.readOnly) { | if (this.readOnly) { | |||
this.enableDD = false; | this.enableDD = false; | |||
} | } | |||
skipping to change at line 249 | skipping to change at line 248 | |||
/** | /** | |||
* files/folder got dropped on node | * files/folder got dropped on node | |||
* | * | |||
* @param {Object} dropEvent | * @param {Object} dropEvent | |||
* @private | * @private | |||
*/ | */ | |||
onBeforeNodeDrop: function(dropEvent) { | onBeforeNodeDrop: function(dropEvent) { | |||
var nodes = dropEvent.data.nodes, | var nodes = dropEvent.data.nodes, | |||
target = dropEvent.target; | target = dropEvent.target; | |||
Tine[this.appName].fileRecordBackend.copyNodes(nodes, target, !(dropEven t.rawEvent.ctrlKey || dropEvent.rawEvent.altKey)); | Tine[this.appName].nodeBackend.copyNodes(nodes, target, !(dropEvent.rawE vent.ctrlKey || dropEvent.rawEvent.altKey)); | |||
dropEvent.dropStatus = true; | dropEvent.dropStatus = true; | |||
return true; | return true; | |||
}, | }, | |||
/** | /** | |||
* load everything from server | * load everything from server | |||
* @returns {Object} root node definition | * @returns {Object} root node definition | |||
*/ | */ | |||
getRoot: function() { | getRoot: function() { | |||
skipping to change at line 611 | skipping to change at line 610 | |||
if (0 === uploadKeyArray.length) { | if (0 === uploadKeyArray.length) { | |||
return; | return; | |||
} | } | |||
var params = { | var params = { | |||
filenames: filePathsArray, | filenames: filePathsArray, | |||
type: "file", | type: "file", | |||
tempFileIds: [], | tempFileIds: [], | |||
forceOverwrite: false | forceOverwrite: false | |||
}; | }; | |||
Tine.Filemanager.fileRecordBackend.createNodes(params, uploadKeyArray, a ddToGridStore); | Tine.Filemanager.nodeBackend.createNodes(params, uploadKeyArray, addToGr idStore); | |||
}, | }, | |||
/** | /** | |||
* returns true if node can accept contents | * returns true if node can accept contents | |||
* | * | |||
* @param nodeAttributes | * @param nodeAttributes | |||
* @returns boolean | * @returns boolean | |||
*/ | */ | |||
nodeAcceptsContents: function(nodeAttributes) { | nodeAcceptsContents: function(nodeAttributes) { | |||
return !! nodeAttributes; | return !! nodeAttributes; | |||
End of changes. 4 change blocks. | ||||
4 lines changed or deleted | 3 lines changed or added |