From: Mike Taylor Date: Thu, 5 Dec 2013 11:48:02 +0000 (+0000) Subject: Move invocation of run_auto_searches() from when DOM is ready to when X-Git-Tag: 0.9.1~133 X-Git-Url: http://jsfdemo.indexdata.com/?a=commitdiff_plain;ds=inline;h=e13d1c98503253299678207b2068bd45d55d597b;hp=7eb3ec5aa9b558216fc06205a4085d875f554a7c;p=mkws-moved-to-github.git Move invocation of run_auto_searches() from when DOM is ready to when service-proxy authentication has completed. As a result, that search now includes the relevant JSESSIONID, and consequently works consistently and deliberately rather than intermittently and accidentally. Fixes bug MKWS-69 ("Allow results area to auto-populate itself with results of a canned search") Remove extreme debugging output for my_onshow() --- diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index 62fed9a..ff67799 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -261,7 +261,6 @@ function my_onshow(data) { // navi var results = document.getElementById("mkwsRecords"); - debug("my_onshow(" + JSON.stringify(data) + ")"); var html = []; for (var i = 0; i < data.hits.length; i++) { @@ -1016,6 +1015,7 @@ function mkws_service_proxy_auth(auth_url, auth_domain) { debug("Service proxy auth successfully done"); mkws.authenticated = true; + run_auto_searches(); }); } @@ -1253,8 +1253,6 @@ $(document).ready(function() { mkws_config.error = e.message; // alert(e.message); } - - run_auto_searches(); }); })(jQuery);