Move invocation of run_auto_searches() from when DOM is ready to when
authorMike Taylor <mike@indexdata.com>
Thu, 5 Dec 2013 11:48:02 +0000 (11:48 +0000)
committerMike Taylor <mike@indexdata.com>
Thu, 5 Dec 2013 11:48:36 +0000 (11:48 +0000)
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()

tools/htdocs/mkws.js

index 62fed9a..ff67799 100644 (file)
@@ -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);