diff --git a/deluge/ui/web/js/deluge-all/FilterPanel.js b/deluge/ui/web/js/deluge-all/FilterPanel.js index 8e1d06b5b..dd7422313 100644 --- a/deluge/ui/web/js/deluge-all/FilterPanel.js +++ b/deluge/ui/web/js/deluge-all/FilterPanel.js @@ -52,8 +52,8 @@ Deluge.FilterPanel = Ext.extend(Ext.Panel, { }); this.setTitle(_(title)); - if (this.filterType == 'tracker_host') { - var tpl = '
{filter} ({count})
'; + if (Deluge.FilterPanel.templates[this.filterType]) { + var tpl = Deluge.FilterPanel.templates[this.filterType]; } else { var tpl = '
{filter} ({count})
'; } @@ -103,3 +103,7 @@ Deluge.FilterPanel = Ext.extend(Ext.Panel, { return this.list.getStore(); } }); + +Deluge.FilterPanel.templates = { + 'tracker_host': '
{filter} ({count})
' +}