summaryrefslogtreecommitdiffstats
path: root/deluge/ui/web/js/deluge-all-debug.js
diff options
context:
space:
mode:
Diffstat (limited to 'deluge/ui/web/js/deluge-all-debug.js')
-rw-r--r--deluge/ui/web/js/deluge-all-debug.js33
1 files changed, 23 insertions, 10 deletions
diff --git a/deluge/ui/web/js/deluge-all-debug.js b/deluge/ui/web/js/deluge-all-debug.js
index 0b6914284..8cf3cc54b 100644
--- a/deluge/ui/web/js/deluge-all-debug.js
+++ b/deluge/ui/web/js/deluge-all-debug.js
@@ -1281,7 +1281,7 @@ Deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, {
})();
/*!
* Deluge.details.StatusTab.js
- *
+ *
* Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
@@ -1319,19 +1319,19 @@ Ext.ns('Deluge.details');
Deluge.details.StatusTab = Ext.extend(Ext.Panel, {
title: _('Status'),
autoScroll: true,
-
+
onRender: function(ct, position) {
Deluge.details.StatusTab.superclass.onRender.call(this, ct, position);
-
+
this.progressBar = this.add({
xtype: 'progress',
cls: 'x-deluge-status-progressbar'
});
-
+
this.status = this.add({
cls: 'x-deluge-status',
id: 'deluge-details-status',
-
+
border: false,
width: 1000,
listeners: {
@@ -1348,14 +1348,14 @@ Deluge.details.StatusTab = Ext.extend(Ext.Panel, {
}
});
},
-
+
clear: function() {
this.progressBar.updateProgress(0, ' ');
for (var k in this.fields) {
this.fields[k].innerHTML = '';
}
},
-
+
update: function(torrentId) {
if (!this.fields) this.getFields();
deluge.client.web.get_torrent_status(torrentId, Deluge.Keys.Status, {
@@ -1363,14 +1363,14 @@ Deluge.details.StatusTab = Ext.extend(Ext.Panel, {
scope: this
});
},
-
+
onPanelUpdate: function(el, response) {
this.fields = {};
Ext.each(Ext.query('dd', this.status.body.dom), function(field) {
this.fields[field.className] = field;
}, this);
},
-
+
onRequestComplete: function(status) {
seeders = status.total_seeds > -1 ? status.num_seeds + ' (' + status.total_seeds + ')' : status.num_seeds
peers = status.total_peers > -1 ? status.num_peers + ' (' + status.total_peers + ')' : status.num_peers
@@ -1394,9 +1394,22 @@ Deluge.details.StatusTab = Ext.extend(Ext.Panel, {
}
data.auto_managed = _((status.is_auto_managed) ? 'True' : 'False');
+ var translate_tracker_status = {
+ 'Error' : _('Error'),
+ 'Warning' : _('Warning'),
+ 'Announce OK' : _('Announce OK'),
+ 'Announce Sent' : _('Announce Sent')
+ };
+ for (var key in translate_tracker_status) {
+ if (data.tracker_status.indexOf(key) != -1) {
+ data.tracker_status = data.tracker_status.replace(key, translate_tracker_status[key]);
+ break;
+ }
+ }
+
data.downloaded += ' (' + ((status.total_payload_download) ? fsize(status.total_payload_download) : '0.0 KiB') + ')';
data.uploaded += ' (' + ((status.total_payload_upload) ? fsize(status.total_payload_upload): '0.0 KiB') + ')';
-
+
for (var field in this.fields) {
this.fields[field].innerHTML = data[field];
}