diff --git a/deluge/ui/web/css/deluge.css b/deluge/ui/web/css/deluge.css
index c4be6b4a2..9d3b60642 100644
--- a/deluge/ui/web/css/deluge.css
+++ b/deluge/ui/web/css/deluge.css
@@ -236,8 +236,8 @@ dl.singleline dd {
line-height: 16px;
}
-#sidebar .x-grid3-row-selected td {
- font-weight: Bold;
+#sidebar .x-list-selected em {
+ font-weight: bold;
}
/* MessageBox icon styles */
diff --git a/deluge/ui/web/js/deluge-all/FilterPanel.js b/deluge/ui/web/js/deluge-all/FilterPanel.js
index 38685664a..8e1d06b5b 100644
--- a/deluge/ui/web/js/deluge-all/FilterPanel.js
+++ b/deluge/ui/web/js/deluge-all/FilterPanel.js
@@ -53,9 +53,9 @@ Deluge.FilterPanel = Ext.extend(Ext.Panel, {
this.setTitle(_(title));
if (this.filterType == 'tracker_host') {
- var tpl = '
{filter}
';
+ var tpl = '{filter} ({count})
';
} else {
- var tpl = '{filter}
';
+ var tpl = '{filter} ({count})
';
}
this.list = this.add({
@@ -71,33 +71,22 @@ Deluge.FilterPanel = Ext.extend(Ext.Panel, {
id: 'filter',
sortable: false,
tpl: tpl,
- renderer: function(v, p, r) {
- var lc = v.toLowerCase().replace('.', '_'),
- icon = '';
-
- if (r.store.id == 'tracker_host' && v != 'Error') {
- icon = String.format('url({0}tracker/{1}', deluge.config.base, v);
- }
-
- var filter = '';
- arg = icon;
- } else if (lc) {
- filter += ' x-deluge-{2}">';
- arg = lc;
- } else {
- filter += '">';
- }
- return String.format(filter + '{0} ({1})
', value, r.data['count'], arg);
- },
dataIndex: 'filter'
}]
});
this.relayEvents(this.list, ['selectionchange']);
+ this.list.afterMethod('bindStore', this.doBindStore, this);
},
+ // private
+ doBindStore: function() {
+ this.list.select(0);
+ },
+
+ /**
+ * Return the currently selected filter
+ * @returns {String} the current filter
+ */
getFilter: function() {
if (!this.list.getSelectionCount()) return;
@@ -106,6 +95,10 @@ Deluge.FilterPanel = Ext.extend(Ext.Panel, {
return filter.id;
},
+ /**
+ * Return the Store for the ListView of the FilterPanel
+ * @returns {Ext.data.Store} the ListView store
+ */
getStore: function() {
return this.list.getStore();
}