disable the files and options tabs until a torrent has been selected

This commit is contained in:
Damien Churchill 2009-12-10 17:45:40 +00:00
parent 2ecb233b5b
commit b47f6badd7
5 changed files with 11 additions and 5 deletions

View File

@ -32,6 +32,7 @@ Copyright:
*/
Ext.namespace('Ext.deluge.add');
Ext.deluge.add.FileWindow = Ext.extend(Ext.deluge.add.Window, {
constructor: function(config) {
config = Ext.apply({
@ -46,7 +47,7 @@ Ext.deluge.add.FileWindow = Ext.extend(Ext.deluge.add.Window, {
title: _('Add from File'),
iconCls: 'x-deluge-add-file'
}, config);
Ext.deluge.add.UrlWindow.superclass.constructor.call(this, config);
Ext.deluge.add.FileWindow.superclass.constructor.call(this, config);
},
initComponent: function() {
@ -103,4 +104,4 @@ Ext.deluge.add.FileWindow = Ext.extend(Ext.deluge.add.Window, {
});
}
}
});
});

View File

@ -30,4 +30,5 @@ Copyright:
this exception statement from your version. If you delete this exception
statement from all source files in the program, then also delete it here.
*/
*/
Ext.namespace('Ext.deluge.add');

View File

@ -32,6 +32,7 @@ Copyright:
*/
Ext.namespace('Ext.deluge.add');
Ext.deluge.add.UrlWindow = Ext.extend(Ext.deluge.add.Window, {
constructor: function(config) {
config = Ext.apply({

View File

@ -57,6 +57,7 @@ Ext.deluge.add.OptionsPanel = Ext.extend(Ext.TabPanel, {
height: 170,
border: false,
animate: false,
disabled: true,
columns: [{
header: _('Filename'),
@ -85,7 +86,7 @@ Ext.deluge.add.OptionsPanel = Ext.extend(Ext.TabPanel, {
bodyStyle: 'padding: 5px;',
border: false,
height: 170,
//disabled: true
disabled: true
});
var fieldset = this.form.add({
@ -500,6 +501,8 @@ Ext.deluge.add.AddWindow = Ext.extend(Ext.deluge.add.Window, {
onSelect: function(selModel, rowIndex, record) {
this.optionsPanel.setTorrent(record.get('info_hash'));
this.optionsPanel.files.setDisabled(false);
this.optionsPanel.form.setDisabled(false);
},
onShow: function() {

File diff suppressed because one or more lines are too long