add a fuller layout to the add torrent window

This commit is contained in:
Damien Churchill 2009-02-25 16:41:13 +00:00
parent bb4a5f4404
commit 7459210753
1 changed files with 70 additions and 5 deletions

View File

@ -27,17 +27,82 @@ Deluge.Add = {
} }
} }
Deluge.Add.Store = new Ext.data.SimpleStore({
fields: [
{name: 'torrent', mapping: 1}
],
id: 0
});
Deluge.Add.Grid = new Ext.grid.GridPanel({
store: Deluge.Add.Store,
region: 'center',
columns: [
{id: 'torrent', width: 150, sortable: true, renderer: Deluge.Formatters.plain, dataIndex: 'torrent'}
],
stripeRows: true,
selModel: new Ext.grid.RowSelectionModel({
singleSelect: true,
listeners: {'rowselect': Deluge.Connections.onSelect}
}),
hideHeaders: true,
autoExpandColumn: 'torrent',
deferredRender: false,
autoScroll: true,
margins: '5 5 5 5',
bbar: new Ext.Toolbar({
items: [
{
id: 'file',
cls: 'x-btn-text-icon',
text: _('File'),
icon: '/icons/16/add.png'
}, {
id: 'url',
cls: 'x-btn-text-icon',
text: _('Url'),
icon: '/icons/16/remove.png'
}, {
id: 'infohash',
cls: 'x-btn-text-icon',
text: _('Info Hash'),
icon: '/icons/16/error.png'
}, '->', {
id: 'remove',
cls: 'x-btn-text-icon',
text: _('Remove'),
icon: '/icons/16/remove.png'
}
]
})
});
Deluge.Add.Options = new Ext.TabPanel({
region: 'south',
margins: '5 5 5 5',
activeTab: 0,
height: 200,
items: [{
id: 'files',
title: _('Files')
},{
id: 'options',
title: _('Options')
}]
});
Deluge.Add.Window = new Ext.Window({ Deluge.Add.Window = new Ext.Window({
layout: 'fit', layout: 'border',
width: 300, width: 400,
height: 150, height: 450,
bodyStyle: 'padding: 10px 5px;',
buttonAlign: 'right', buttonAlign: 'right',
closeAction: 'hide', closeAction: 'hide',
closable: true, closable: true,
plain: true, plain: true,
title: _('Add Torrent'), title: _('Add Torrents'),
iconCls: 'x-deluge-add-window-icon', iconCls: 'x-deluge-add-window-icon',
items: [], items: [Deluge.Add.Grid, Deluge.Add.Options],
buttons: [{ buttons: [{
text: _('Cancel') text: _('Cancel')
}, { }, {