projects
/
mkws-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Generate category limits correctly -- thanks to NE!
[mkws-moved-to-github.git]
/
src
/
mkws-team.js
diff --git
a/src/mkws-team.js
b/src/mkws-team.js
index
8d33d9e
..
08f67b3
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 + ")");
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;
};
if (m_query) triggerSearch();
return false;
};
@@
-270,10
+272,12
@@
function team($, teamName) {
var pp2filter = m_filterSet.pp2filter();
var pp2limit = m_filterSet.pp2limit(limit);
var pp2catLimit = m_filterSet.pp2catLimit();
var pp2filter = m_filterSet.pp2filter();
var pp2limit = m_filterSet.pp2limit(limit);
var pp2catLimit = m_filterSet.pp2catLimit();
+ if (pp2catLimit) {
+ pp2filter = pp2filter ? pp2filter + "," + pp2catLimit : pp2catLimit;
+ }
var params = {};
if (pp2limit) params.limit = pp2limit;
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)
if (maxrecs) params.maxrecs = maxrecs;
if (torusquery) {
if (!mkws.config.use_service_proxy)