From 3cb046c34cbb6fe2ddb7a475849c495342cb0256 Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Tue, 14 Oct 2008 00:37:51 +0000 Subject: [PATCH] only set the background-image once --- deluge/ui/webui/templates/ajax/static/js/deluge-bars.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deluge/ui/webui/templates/ajax/static/js/deluge-bars.js b/deluge/ui/webui/templates/ajax/static/js/deluge-bars.js index 47a63afe8..69833f9c9 100644 --- a/deluge/ui/webui/templates/ajax/static/js/deluge-bars.js +++ b/deluge/ui/webui/templates/ajax/static/js/deluge-bars.js @@ -262,12 +262,12 @@ Deluge.Widgets.LabelSection = new Class({ el = new Element('li').addClass(lname); el.store('filterName', name) el.addEvent('click', this.bound.clicked); + if (this.name == 'tracker_host') { + var icon = 'url(http://' + name + '/favicon.ico)'; + el.setStyle('background-image', icon); + }; this.list.grab(el); } - if (this.name == 'tracker_host') { - var icon = 'url(http://' + name + '/favicon.ico)'; - el.setStyle('background-image', icon); - }; el.set('text', name + ' (' + count +')'); }, this);