disable the files and options tabs until a torrent has been selected
This commit is contained in:
parent
2ecb233b5b
commit
b47f6badd7
|
@ -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() {
|
||||
|
|
|
@ -31,3 +31,4 @@ Copyright:
|
|||
statement from all source files in the program, then also delete it here.
|
||||
|
||||
*/
|
||||
Ext.namespace('Ext.deluge.add');
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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
Loading…
Reference in New Issue