From 60a5c2fa4c2f7155f97163a6a59a9382f62c0036 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Tue, 1 Apr 2014 16:12:10 +0100 Subject: [PATCH] newSearch and triggerSearch accept a perpage argument. --- src/mkws-team.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mkws-team.js b/src/mkws-team.js index 6b2c081..2ae79bd 100644 --- a/src/mkws-team.js +++ b/src/mkws-team.js @@ -255,7 +255,7 @@ function team($, teamName) { that.resetPage = resetPage; - function newSearch(query, sortOrder, targets) + function newSearch(query, sortOrder, perpage, targets) { log("newSearch: " + query); @@ -265,14 +265,14 @@ function team($, teamName) { } m_filters = [] - triggerSearch(query, sortOrder, targets); + triggerSearch(query, sortOrder, perpage, targets); switchView('records'); // In case it's configured to start off as hidden m_submitted = true; } that.newSearch = newSearch; - function triggerSearch(query, sortOrder, targets) + function triggerSearch(query, sortOrder, perpage, targets) { resetPage(); queue("navi").publish(); @@ -287,6 +287,9 @@ function team($, teamName) { if (sortOrder) { m_sortOrder = sortOrder; } + if (perpage) { + m_perpage = perpage; + } if (targets) { m_filters.push({ id: targets, name: targets }); } -- 1.7.10.4