From f1a3747154ae806819f2fdde90939bdf78444e3e Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Tue, 13 Oct 2015 21:55:56 +0100 Subject: [PATCH] Add nasty hack in auto-executing widgets. Sets torusquery if target is present, and explicitly passes it into team.newSearch. This shouldn't be necessary because team.newSearch looks for the target config item anyway, but for some reason that doesn't work. Fixes SUP-807, but not in a satisfactory way. --- src/mkws-widget.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mkws-widget.js b/src/mkws-widget.js index 566f604..45b0b40 100644 --- a/src/mkws-widget.js +++ b/src/mkws-widget.js @@ -114,7 +114,10 @@ mkws.makeWidget = function($, team, type, node) { // them in in the subclass, as widget.autosearch is called in // the superclass, before the subclass fiddles with the // configuration. - that.team.newSearch(that, query); + var torusquery = undefined; + var target = that.config.target; + if (target) torusquery = 'udb=="' + target + '"'; + that.team.newSearch(that, query, undefined, undefined, undefined, undefined, undefined, torusquery); }); } }; -- 1.7.10.4