From 561b8b91ccf55d612c9ff1276494d78f198d46ac Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Thu, 3 Apr 2014 16:49:26 +0100 Subject: [PATCH] Extract and use maxrecs setting in auto-searching. --- src/mkws-widgets.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mkws-widgets.js b/src/mkws-widgets.js index 1c37ab7..435f378 100644 --- a/src/mkws-widgets.js +++ b/src/mkws-widgets.js @@ -82,19 +82,21 @@ widget.maybeAutosearch = function(widget) { widget.team.queue("ready").subscribe(function() { var sortOrder = widget.config.sort; + var maxrecs = widget.config.maxrecs; var perpage = widget.config.perpage; var limit = widget.config.limit; var targets = widget.config.targets; var targetfilter = widget.config.targetfilter; var s = "running auto search: '" + query + "'"; if (sortOrder) s += " sorted by '" + sortOrder + "'"; + if (maxrecs) s += " restricted to " + maxrecs + " records"; if (perpage) s += " with " + perpage + " per page"; if (limit) s += " limited by '" + limit + "'"; if (targets) s += " in targets '" + targets + "'"; if (targetfilter) s += " constrained by targetfilter '" + targetfilter + "'"; widget.log(s); - widget.team.newSearch(query, sortOrder, perpage, limit, targets, targetfilter); + widget.team.newSearch(query, sortOrder, maxrecs, perpage, limit, targets, targetfilter); }); } }; -- 1.7.10.4