From 34c91448cdfa31183dd135490be0e29a5570ea24 Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Wed, 25 Feb 2009 17:07:41 +0000 Subject: [PATCH] add the columntreeview to the files tab --- deluge/ui/web/js/deluge-add.js | 35 +++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/deluge/ui/web/js/deluge-add.js b/deluge/ui/web/js/deluge-add.js index df85c980c..93a404d0e 100644 --- a/deluge/ui/web/js/deluge-add.js +++ b/deluge/ui/web/js/deluge-add.js @@ -27,6 +27,38 @@ Deluge.Add = { } } +Deluge.Add.Files = new Ext.tree.ColumnTree({ + id: 'files', + layout: 'fit', + rootVisible: false, + autoScroll: true, + height: 200, + border: false, + + columns: [{ + width: 40, + dataIndex: 'enabled' + },{ + header: _('Filename'), + width: 250, + dataIndex: 'filename' + },{ + header: _('Size'), + width: 80, + dataIndex: 'size' + }], + + loader: new Deluge.FilesTreeLoader({ + uiProviders: { + 'col': Ext.tree.ColumnNodeUI + } + }), + + root: new Ext.tree.AsyncTreeNode({ + text:'Tasks' + }) +}) + Deluge.Add.Store = new Ext.data.SimpleStore({ fields: [ {name: 'torrent', mapping: 1} @@ -84,7 +116,8 @@ Deluge.Add.Options = new Ext.TabPanel({ height: 200, items: [{ id: 'files', - title: _('Files') + title: _('Files'), + items: [Deluge.Add.Files] },{ id: 'options', title: _('Options')