From: Mike Taylor Date: Tue, 13 Oct 2015 21:17:46 +0000 (+0100) Subject: Proper (non-hacky) fix for SUP-807. X-Git-Url: http://git.indexdata.com/?p=mkws-moved-to-github.git;a=commitdiff_plain;h=415e01780988505b92e5584b1ff5e8443ce48039;hp=457c4b4f3f63b80e41b69faee8fed19993d63c59 Proper (non-hacky) fix for SUP-807. team.newSearch now rightly looks in the widget for configuration, not in the team. This means that configuration items set directly in the widget itself (such as the "target" setting in the Wikipedia and Reference Universe widgets) are now found, whereas previously only settings that had been established at the team level or higher -- such as the targetfilter categories of us.openrepo.net -- were found. --- diff --git a/src/mkws-team.js b/src/mkws-team.js index 7126abd..8c81a1a 100644 --- a/src/mkws-team.js +++ b/src/mkws-team.js @@ -297,13 +297,13 @@ mkws.makeTeam = function($, teamName) { } { - if (!sortOrder) sortOrder = that.config.sort; - if (!maxrecs) maxrecs = that.config.maxrecs; - if (!perpage) perpage = that.config.perpage; - if (!limit) limit = that.config.limit; - if (!targets) targets = that.config.targets; - if (!torusquery) torusquery = that.config.targetfilter; - var target = that.config.target; + if (!sortOrder) sortOrder = widget.config.sort; + if (!maxrecs) maxrecs = widget.config.maxrecs; + if (!perpage) perpage = widget.config.perpage; + if (!limit) limit = widget.config.limit; + if (!targets) targets = widget.config.targets; + if (!torusquery) torusquery = widget.config.targetfilter; + var target = widget.config.target; if (target) torusquery = 'udb=="' + target + '"'; var s = "running search: '" + query + "'";