From: Mike Taylor Date: Tue, 6 Oct 2015 14:41:38 +0000 (+0100) Subject: Part of ACREP-80: new 'widget' parameter to team.newSearch X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=a4bc69c1158498afe0c0f0eab4d2a136526b8695;p=mkws-moved-to-github.git Part of ACREP-80: new 'widget' parameter to team.newSearch --- 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); }); } };