projects
/
mkws-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a8b677
)
Remove any old category filters when setting a new one.
author
Mike Taylor
<mike@indexdata.com>
Thu, 24 Apr 2014 11:45:11 +0000
(12:45 +0100)
committer
Mike Taylor
<mike@indexdata.com>
Thu, 24 Apr 2014 11:45:11 +0000
(12:45 +0100)
The special empty category-id means not to use a filter at all.
src/mkws-team.js
patch
|
blob
|
history
diff --git
a/src/mkws-team.js
b/src/mkws-team.js
index
8d33d9e
..
b02b441
100644
(file)
--- a/
src/mkws-team.js
+++ b/
src/mkws-team.js
@@
-185,7
+185,9
@@
function team($, teamName) {
that.limitCategory = function(id) {
log("limitCategory(id=" + id + ")");
- m_filterSet.add(categoryFilter(id));
+ // Only one category filter at a time
+ m_filterSet.removeMatching(function(f) { return f.type === 'category' });
+ if (id !== '') m_filterSet.add(categoryFilter(id));
if (m_query) triggerSearch();
return false;
};