From 95819c79e5ba2afd9dc93cbaef4821edfd0120d3 Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Fri, 6 May 2011 22:22:29 +0100 Subject: [PATCH] Fix #1268, Torrent errors not displayed in webui --- deluge/ui/web/js/deluge-all/Keys.js | 2 +- deluge/ui/web/js/deluge-all/details/DetailsTab.js | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/deluge/ui/web/js/deluge-all/Keys.js b/deluge/ui/web/js/deluge-all/Keys.js index 2600e704f..cb74db3dd 100644 --- a/deluge/ui/web/js/deluge-all/Keys.js +++ b/deluge/ui/web/js/deluge-all/Keys.js @@ -86,7 +86,7 @@ Deluge.Keys = { * Keys used in the details tab of the statistics panel. */ Details: [ - 'name', 'save_path', 'total_size', 'num_files', 'tracker_status', + 'name', 'save_path', 'total_size', 'num_files', 'message', 'tracker', 'comment' ], diff --git a/deluge/ui/web/js/deluge-all/details/DetailsTab.js b/deluge/ui/web/js/deluge-all/details/DetailsTab.js index 9a3fce56f..0c04421e2 100644 --- a/deluge/ui/web/js/deluge-all/details/DetailsTab.js +++ b/deluge/ui/web/js/deluge-all/details/DetailsTab.js @@ -52,7 +52,7 @@ Deluge.details.DetailsTab = Ext.extend(Ext.Panel, { this.addItem('status', _('Status')); this.addItem('tracker', _('Tracker')); }, - + onRender: function(ct, position) { Deluge.details.DetailsTab.superclass.onRender.call(this, ct, position); this.body.setStyle('padding', '10px'); @@ -76,7 +76,7 @@ Deluge.details.DetailsTab = Ext.extend(Ext.Panel, { Ext.DomHelper.append(this.dl, {tag: 'dt', cls: id, html: label + ':'}); this.fields[id] = Ext.DomHelper.append(this.dl, {tag: 'dd', cls: id, html: ''}, true); }, - + clear: function() { if (!this.fields) return; for (var k in this.fields) { @@ -84,7 +84,7 @@ Deluge.details.DetailsTab = Ext.extend(Ext.Panel, { } this.oldData = {} }, - + update: function(torrentId) { deluge.client.web.get_torrent_status(torrentId, Deluge.Keys.Details, { success: this.onRequestComplete, @@ -92,7 +92,7 @@ Deluge.details.DetailsTab = Ext.extend(Ext.Panel, { torrentId: torrentId }); }, - + onRequestComplete: function(torrent, request, response, options) { var data = { torrent_name: torrent.name, @@ -100,11 +100,11 @@ Deluge.details.DetailsTab = Ext.extend(Ext.Panel, { path: torrent.save_path, size: fsize(torrent.total_size), files: torrent.num_files, - status: torrent.tracker_status, + status: torrent.message, tracker: torrent.tracker, comment: torrent.comment }; - + for (var field in this.fields) { if (!Ext.isDefined(data[field])) continue; // this is a field we aren't responsible for. if (data[field] == this.oldData[field]) continue;