mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
allow custom templates to be specified for filters
This commit is contained in:
parent
5b0ce6b3d8
commit
3a12a50f3e
1 changed files with 6 additions and 2 deletions
|
@ -52,8 +52,8 @@ Deluge.FilterPanel = Ext.extend(Ext.Panel, {
|
||||||
});
|
});
|
||||||
this.setTitle(_(title));
|
this.setTitle(_(title));
|
||||||
|
|
||||||
if (this.filterType == 'tracker_host') {
|
if (Deluge.FilterPanel.templates[this.filterType]) {
|
||||||
var tpl = '<div class="x-deluge-filter" style="background-image: url(' + deluge.config.base + 'tracker/{filter});">{filter} ({count})</div>';
|
var tpl = Deluge.FilterPanel.templates[this.filterType];
|
||||||
} else {
|
} else {
|
||||||
var tpl = '<div class="x-deluge-filter x-deluge-{filter:lowercase}">{filter} ({count})</div>';
|
var tpl = '<div class="x-deluge-filter x-deluge-{filter:lowercase}">{filter} ({count})</div>';
|
||||||
}
|
}
|
||||||
|
@ -103,3 +103,7 @@ Deluge.FilterPanel = Ext.extend(Ext.Panel, {
|
||||||
return this.list.getStore();
|
return this.list.getStore();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Deluge.FilterPanel.templates = {
|
||||||
|
'tracker_host': '<div class="x-deluge-filter" style="background-image: url(' + deluge.config.base + 'tracker/{filter});">{filter} ({count})</div>'
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue