use the "checked" config option to add the checkbox to the tree

disable animation
remove the enabled column
This commit is contained in:
Damien Churchill 2009-03-30 21:45:40 +00:00
parent cea7d5bc5b
commit 63c67b6925
1 changed files with 4 additions and 11 deletions

View File

@ -57,17 +57,12 @@ Deluge.Add = {
walk(item, child); walk(item, child);
parent.appendChild(child); parent.appendChild(child);
} else { } else {
if (item[1]) {
var checkbox = '<input type="checkbox" checked="checked" />';
} else {
var checkbox = '<input type="checkbox" />';
}
var test = item[1];
parent.appendChild(new Ext.tree.TreeNode({ parent.appendChild(new Ext.tree.TreeNode({
enabled: checkbox,
filename: file, filename: file,
size: fsize(item[0]), size: fsize(item[0]),
leaf: true, leaf: true,
checked: item[1],
iconCls: 'x-deluge-add-file',
uiProvider: Ext.tree.ColumnNodeUI uiProvider: Ext.tree.ColumnNodeUI
})); }));
} }
@ -97,11 +92,9 @@ Deluge.Add.Files = new Ext.tree.ColumnTree({
autoScroll: true, autoScroll: true,
height: 170, height: 170,
border: false, border: false,
animate: false,
columns: [{ columns: [{
width: 70,
dataIndex: 'enabled'
},{
header: _('Filename'), header: _('Filename'),
width: 200, width: 200,
dataIndex: 'filename' dataIndex: 'filename'
@ -111,7 +104,7 @@ Deluge.Add.Files = new Ext.tree.ColumnTree({
dataIndex: 'size' dataIndex: 'size'
}], }],
root: new Ext.tree.TreeNode({ root: new Ext.tree.AsyncTreeNode({
text: 'Files' text: 'Files'
}) })
}) })