mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-12 20:44:50 +00:00
fix setting the root node
This commit is contained in:
parent
f5eddafea9
commit
75b69b1f11
@ -45,7 +45,9 @@ Deluge.details.FilesTab = Ext.extend(Ext.ux.tree.TreeGrid, {
|
||||
header: _('Size'),
|
||||
width: 150,
|
||||
dataIndex: 'size',
|
||||
tpl: new Ext.XTemplate('{size:this.fsize}', {fsize: fsize})
|
||||
tpl: new Ext.XTemplate('{size:this.fsize}', {
|
||||
fsize: function(v) { return fsize(v); }
|
||||
})
|
||||
}, {
|
||||
xtype: 'tgrendercolumn',
|
||||
header: _('Progress'),
|
||||
@ -73,12 +75,13 @@ Deluge.details.FilesTab = Ext.extend(Ext.ux.tree.TreeGrid, {
|
||||
})
|
||||
}],
|
||||
|
||||
root: new Ext.tree.TreeNode({
|
||||
text: 'Files'
|
||||
}),
|
||||
|
||||
selModel: new Ext.tree.MultiSelectionModel(),
|
||||
|
||||
initComponent: function() {
|
||||
Deluge.details.FilesTab.superclass.initComponent.call(this);
|
||||
this.setRootNode(new Ext.tree.TreeNode({text: 'Files'}));
|
||||
},
|
||||
|
||||
clear: function() {
|
||||
var root = this.getRootNode();
|
||||
if (!root.hasChildNodes()) return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user