X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fmkws-widget.js;h=3def9e36dd7263912d01bac52e50e99c86dacdf6;hb=404fc88a82967955076b37bd8f749789cc64363e;hp=b67603900e0923e9bf555c3bfb06c87db6cddb55;hpb=e9bf513397bb71afc80260e2c5da7856f47420c6;p=mkws-moved-to-github.git diff --git a/src/mkws-widget.js b/src/mkws-widget.js index b676039..3def9e3 100644 --- a/src/mkws-widget.js +++ b/src/mkws-widget.js @@ -132,10 +132,15 @@ widget.autosearch = function(widget) { alert("This page has a MasterKey widget that needs a query specified by the '" + name + "' variable"); } } - } - if (query) { + // Stash this for subsequent inspection + widget.team.config().query = 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;