X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fmkws-team.js;h=4c59becdcdef59b31a6d62430b9bb3fba69d53dc;hb=9186abcca4ee19b73053093c6ba90abc252ff5f9;hp=2e2485462ca3ae5574abb3a385e801ef556bda85;hpb=b3ad811d9b8569c4bc5a05c9150aa77a89dc27aa;p=mkws-moved-to-github.git diff --git a/src/mkws-team.js b/src/mkws-team.js index 2e24854..4c59bec 100644 --- a/src/mkws-team.js +++ b/src/mkws-team.js @@ -185,15 +185,15 @@ function team($, teamName) { that.limitCategory = function(id) { log("limitCategory(id=" + id + ")"); - // ### Add a filter - // ### triggerSearch() if there's a query + m_filterSet.add(categoryFilter(id)); + if (m_query) triggerSearch(); return false; }; that.delimitTarget = function(id) { log("delimitTarget(id=" + id + ")"); - m_filterSet.removeMatching(function(f) { return f.id }); + m_filterSet.removeMatching(function(f) { return f.type === 'target' }); triggerSearch(); return false; }; @@ -201,7 +201,8 @@ function team($, teamName) { that.delimitQuery = function(field, value) { log("delimitQuery(field=" + field + ", value=" + value + ")"); - m_filterSet.removeMatching(function(f) { return f.field && field == f.field && value == f.value }); + m_filterSet.removeMatching(function(f) { return f.type == 'field' && + field == f.field && value == f.value }); triggerSearch(); return false; };