change it so the tracker error filter doesn't have an icon

This commit is contained in:
Damien Churchill 2009-04-02 18:22:08 +00:00
parent 03dac27147
commit 793e120957
1 changed files with 10 additions and 2 deletions

View File

@ -353,9 +353,17 @@ Deluge.SideBar = {
if (r.store.id == 'tracker_host') { if (r.store.id == 'tracker_host') {
if (value != 'Error') { if (value != 'Error') {
image = String.format('url(/tracker/{0})', value); image = String.format('url(/tracker/{0})', value);
} else {
lname = null;
} }
} }
return String.format('<div class="x-deluge-filter x-deluge-{2}" style="background-image: {3};">{0} ({1})</div>', value, r.data['count'], lname, image); if (image) {
return String.format('<div class="x-deluge-filter" style="background-image: {2};">{0} ({1})</div>', value, r.data['count'], image);
} else if (lname) {
return String.format('<div class="x-deluge-filter x-deluge-{2}">{0} ({1})</div>', value, r.data['count'], lname);
} else {
return String.format('<div class="x-deluge-filter">{0} ({1})</div>', value, r.data['count']);
}
}, },
getFilters: function() { getFilters: function() {