use inline if/else to set the value of auto managed and also run through gettext

This commit is contained in:
Damien Churchill 2009-06-01 20:13:05 +00:00
parent e71c562612
commit 87355e0490
2 changed files with 5 additions and 5 deletions

View File

@ -45,6 +45,7 @@ Ext.deluge.details.StatusTab = Ext.extend(Ext.Panel, {
this.status = this.add({
cls: 'x-deluge-status',
id: 'deluge-details-status',
border: false,
listeners: {
'render': {
@ -62,11 +63,11 @@ Ext.deluge.details.StatusTab = Ext.extend(Ext.Panel, {
},
clear: function() {
if (!this.fields) return;
this.progressBar.updateProgress(0, ' ');
for (var k in this.fields) {
this.fields[k].innerHTML = '';
}
this.disable();
},
update: function(torrentId) {
@ -103,10 +104,9 @@ Ext.deluge.details.StatusTab = Ext.extend(Ext.Panel, {
active_time: ftime(status.active_time),
seeding_time: ftime(status.seeding_time),
seed_rank: status.seed_rank,
auto_managed: 'False',
time_added: fdate(status.time_added)
}
if (status.is_auto_managed) {data.auto_managed = 'True'}
data.auto_managed = _((status.is_auto_managed) ? 'True' : 'False');
for (var field in this.fields) {
this.fields[field].innerHTML = data[field];

File diff suppressed because one or more lines are too long