From 4e66fa95cf0b1ffa13ffb3c9bc710850593c14eb Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Wed, 2 Apr 2014 13:30:46 +0100 Subject: [PATCH] newSearch() and triggerSearch() now accept new torusquery paremeter. --- src/mkws-team.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/mkws-team.js b/src/mkws-team.js index 828b049..4e48f1e 100644 --- a/src/mkws-team.js +++ b/src/mkws-team.js @@ -249,7 +249,7 @@ function team($, teamName) { that.resetPage = resetPage; - function newSearch(query, sortOrder, perpage, targets) { + function newSearch(query, sortOrder, perpage, targets, torusquery) { log("newSearch: " + query); if (m_config.use_service_proxy && !mkws.authenticated) { @@ -258,14 +258,14 @@ function team($, teamName) { } m_filters = [] - triggerSearch(query, sortOrder, perpage, targets); + triggerSearch(query, sortOrder, perpage, targets, torusquery); switchView('records'); // In case it's configured to start off as hidden m_submitted = true; } that.newSearch = newSearch; - function triggerSearch(query, sortOrder, perpage, targets) { + function triggerSearch(query, sortOrder, perpage, targets, torusquery) { resetPage(); queue("navi").publish(); @@ -308,6 +308,11 @@ function team($, teamName) { if (pp2limit) { params.limit = pp2limit; } + if (torusquery) { + if (!mkws.config.use_service_proxy) + alert("can't narrow search by torusquery when Service Proxy is not in use"); + params.torusquery = torusquery; + } log("triggerSearch(" + m_query + "): filters = " + $.toJSON(m_filters) + ", " + "pp2filter = " + pp2filter + ", params = " + $.toJSON(params)); -- 1.7.10.4