From 3a12a50f3ec37893ba66b6c8727fdc288afedae9 Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Sun, 25 Apr 2010 16:04:02 +0100 Subject: [PATCH] allow custom templates to be specified for filters --- deluge/ui/web/js/deluge-all/FilterPanel.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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})
' +}