From 6a8b6776618229ff0cae8b19288124daf9239463 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Thu, 24 Apr 2014 12:41:48 +0100 Subject: [PATCH] Incorporate category limit into searches. Instead of making a new filterSet on a new search, delete all non-category filters from the old one. --- src/mkws-team.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mkws-team.js b/src/mkws-team.js index 5a2563b..8d33d9e 100644 --- a/src/mkws-team.js +++ b/src/mkws-team.js @@ -249,7 +249,7 @@ function team($, teamName) { return; } - m_filterSet = filterSet(that); + m_filterSet.removeMatching(function(f) { return f.type !== 'category' }); triggerSearch(query, sortOrder, maxrecs, perpage, limit, targets, torusquery); switchView('records'); // In case it's configured to start off as hidden m_submitted = true; @@ -269,9 +269,11 @@ function team($, teamName) { var pp2filter = m_filterSet.pp2filter(); var pp2limit = m_filterSet.pp2limit(limit); + var pp2catLimit = m_filterSet.pp2catLimit(); var params = {}; if (pp2limit) params.limit = pp2limit; + if (pp2catLimit) params.categoryfilter = pp2catLimit; if (maxrecs) params.maxrecs = maxrecs; if (torusquery) { if (!mkws.config.use_service_proxy) -- 1.7.10.4