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() {

View File

@ -31,3 +31,4 @@ Copyright:
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