From a4bc69c1158498afe0c0f0eab4d2a136526b8695 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Tue, 6 Oct 2015 15:41:38 +0100 Subject: [PATCH] Part of ACREP-80: new 'widget' parameter to team.newSearch --- src/mkws-team.js | 2 +- src/mkws-widget-main.js | 2 +- src/mkws-widget.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mkws-team.js b/src/mkws-team.js index c26d2c3..3d48385 100644 --- a/src/mkws-team.js +++ b/src/mkws-team.js @@ -288,7 +288,7 @@ mkws.makeTeam = function($, teamName) { that.resetPage = resetPage; - function newSearch(query, sortOrder, maxrecs, perpage, limit, targets, torusquery) { + function newSearch(widget, query, sortOrder, maxrecs, perpage, limit, targets, torusquery) { that.info("newSearch: " + query); if (config.use_service_proxy && !mkws.authenticated) { diff --git a/src/mkws-widget-main.js b/src/mkws-widget-main.js index b218a95..2d47617 100644 --- a/src/mkws-widget-main.js +++ b/src/mkws-widget-main.js @@ -288,7 +288,7 @@ mkws.registerWidgetType('search-form', function() { var team = this.team; this.node.submit(function() { var val = team.widget('query').value(); - team.newSearch(val); + team.newSearch(this, val); return false; }); }); diff --git a/src/mkws-widget.js b/src/mkws-widget.js index 4cace29..cb5708a 100644 --- a/src/mkws-widget.js +++ b/src/mkws-widget.js @@ -131,7 +131,7 @@ mkws.makeWidget = function($, team, type, node) { if (targetfilter) s += " constrained by targetfilter '" + targetfilter + "'"; that.info(s); - that.team.newSearch(query, sortOrder, maxrecs, perpage, limit, targets, targetfilter); + that.team.newSearch(that, query, sortOrder, maxrecs, perpage, limit, targets, targetfilter); }); } }; -- 1.7.10.4