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
commit 29f2ed84dd
5 changed files with 9 additions and 3 deletions

View file

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

View file

@ -31,3 +31,4 @@ Copyright:
statement from all source files in the program, then also delete it here. 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, { Ext.deluge.add.UrlWindow = Ext.extend(Ext.deluge.add.Window, {
constructor: function(config) { constructor: function(config) {
config = Ext.apply({ config = Ext.apply({

View file

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

File diff suppressed because one or more lines are too long