X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fmkws-widget.js;h=d0a40cae5e4dbb01bee15e5f812a1fa4d2e4efd6;hb=a6d4199088ca42d19ac7236f6ca576caad2e4a7e;hp=70bd0d02929ff901629ee4d1f6b339e1f5fb9903;hpb=eb12bf4cf9d0c08f74ebe3b2311cced1f55c6edd;p=mkws-moved-to-github.git diff --git a/src/mkws-widget.js b/src/mkws-widget.js index 70bd0d0..d0a40ca 100644 --- a/src/mkws-widget.js +++ b/src/mkws-widget.js @@ -132,9 +132,7 @@ widget.autosearch = function(widget) { alert("This page has a MasterKey widget that needs a query specified by the '" + name + "' variable"); } } - } - if (query) { var sortOrder = widget.config.sort; var maxrecs = widget.config.maxrecs; var perpage = widget.config.perpage; @@ -143,6 +141,10 @@ widget.autosearch = function(widget) { var targetfilter = widget.config.targetfilter; widget.team.queue("ready").subscribe(function() { + // Postpone testing for the target configuration item: this is + // not set at compile-time for Record subclass widgets that set + // it in the subclass, as widget.autosearch is called in the + // superclass, before the subclass fiddles with the configuration. var target = widget.config.target; if (target) targetfilter = 'udb=="' + target + '"';