X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fmkws-widget.js;h=d1c76b48d36cf6b3787296c85ac7930108d96a61;hb=261a90e3a7ca89560b502b474b0a062f9febf6c6;hp=534e4b365ff84c9834aace1df2b488846aa29cc6;hpb=082245055cc0cae23ee2ae08c5a5a8a32a1a1c89;p=mkws-moved-to-github.git diff --git a/src/mkws-widget.js b/src/mkws-widget.js index 534e4b3..d1c76b4 100644 --- a/src/mkws-widget.js +++ b/src/mkws-widget.js @@ -132,10 +132,12 @@ widget.autosearch = function(widget) { alert("This page has a MasterKey widget that needs a query specified by the '" + name + "' variable"); } } - } - widget.team.queue("ready").subscribe(function() { - if (query) { + widget.team.queue("ready").subscribe(function() { + // Postpone testing for the configuration items: these are not + // yet set for Record subclass widgets that fill them in in the + // subclass, as widget.autosearch is called in the superclass, + // before the subclass fiddles with the configuration. var sortOrder = widget.config.sort; var maxrecs = widget.config.maxrecs; var perpage = widget.config.perpage; @@ -155,8 +157,8 @@ widget.autosearch = function(widget) { widget.log(s); widget.team.newSearch(query, sortOrder, maxrecs, perpage, limit, targets, targetfilter); - } - }); + }); + } };