From 793e1209572891f9d4d7bb600f0ac83ac90a9296 Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Thu, 2 Apr 2009 18:22:08 +0000 Subject: [PATCH] change it so the tracker error filter doesn't have an icon --- deluge/ui/web/js/deluge-bars.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/deluge/ui/web/js/deluge-bars.js b/deluge/ui/web/js/deluge-bars.js index cf93c4d27..8e3909620 100644 --- a/deluge/ui/web/js/deluge-bars.js +++ b/deluge/ui/web/js/deluge-bars.js @@ -349,13 +349,21 @@ Deluge.SideBar = { renderer: function(value, p, r) { var lname = value.toLowerCase().replace('.', '_'); - var image = ''; + var image = ''; if (r.store.id == 'tracker_host') { if (value != 'Error') { image = String.format('url(/tracker/{0})', value); + } else { + lname = null; } } - return String.format('
{0} ({1})
', value, r.data['count'], lname, image); + if (image) { + return String.format('
{0} ({1})
', value, r.data['count'], image); + } else if (lname) { + return String.format('
{0} ({1})
', value, r.data['count'], lname); + } else { + return String.format('
{0} ({1})
', value, r.data['count']); + } }, getFilters: function() {