remove the disable in the options tab
disable all tabs when there is no torrent selected and enable them when there is
This commit is contained in:
parent
323d8133b0
commit
11351e1544
|
@ -31,6 +31,7 @@ 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.deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, {
|
Ext.deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, {
|
||||||
|
|
||||||
constructor: function(config) {
|
constructor: function(config) {
|
||||||
|
@ -291,8 +292,6 @@ Ext.deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, {
|
||||||
border: false,
|
border: false,
|
||||||
width: 100,
|
width: 100,
|
||||||
});
|
});
|
||||||
|
|
||||||
this.disable();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onRender: function(ct, position) {
|
onRender: function(ct, position) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Script: deluge-details.js
|
Script: Deluge.Details.js
|
||||||
Contains all objects and functions related to the lower details panel and
|
Contains all objects and functions related to the lower details panel and
|
||||||
it's containing tabs.
|
it's containing tabs.
|
||||||
|
|
||||||
|
@ -20,17 +20,16 @@ Copyright:
|
||||||
The Free Software Foundation, Inc.,
|
The Free Software Foundation, Inc.,
|
||||||
51 Franklin Street, Fifth Floor
|
51 Franklin Street, Fifth Floor
|
||||||
Boston, MA 02110-1301, USA.
|
Boston, MA 02110-1301, USA.
|
||||||
#
|
|
||||||
# In addition, as a special exception, the copyright holders give
|
In addition, as a special exception, the copyright holders give
|
||||||
# permission to link the code of portions of this program with the OpenSSL
|
permission to link the code of portions of this program with the OpenSSL
|
||||||
# library.
|
library.
|
||||||
# You must obey the GNU General Public License in all respects for all of
|
You must obey the GNU General Public License in all respects for all of
|
||||||
# the code used other than OpenSSL. If you modify file(s) with this
|
the code used other than OpenSSL. If you modify file(s) with this
|
||||||
# exception, you may extend this exception to your version of the file(s),
|
exception, you may extend this exception to your version of the file(s),
|
||||||
# but you are not obligated to do so. If you do not wish to do so, delete
|
but you are not obligated to do so. If you do not wish to do so, delete
|
||||||
# this exception statement from your version. If you delete this exception
|
this exception statement from your version. If you delete this exception
|
||||||
# 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.
|
||||||
#
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
@ -56,9 +55,19 @@ Copyright:
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
update: function(tab) {
|
update: function(tab) {
|
||||||
var torrent = Deluge.Torrents.getSelected();
|
var torrent = Deluge.Torrents.getSelected();
|
||||||
if (!torrent) return;
|
if (!torrent) {
|
||||||
|
this.items.each(function(tab) {
|
||||||
|
tab.disable();
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.items.each(function(tab) {
|
||||||
|
tab.enable();
|
||||||
|
});
|
||||||
|
|
||||||
tab = tab || this.getActiveTab();
|
tab = tab || this.getActiveTab();
|
||||||
if (tab.update) tab.update(torrent.id);
|
if (tab.update) tab.update(torrent.id);
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue