From dedc44b6fcebbecfc7d6e484e84cd3dcb8aabfe4 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Fri, 24 Jan 2014 13:10:17 +0000 Subject: [PATCH] authenticate_session() and run_auto_searches() are now local to their function rather than global members of mkws. Use console.log() rather than debug() in run_auto_searches() (For some reason, debug() works in authenticate_session()!) --- tools/htdocs/mkws.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index 597e55b..9f98f32 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -1339,12 +1339,12 @@ function _mkws_jquery_plugin ($) { }); if (mkws_config.use_service_proxy) { - mkws.authenticate_session(mkws_config.service_proxy_auth, - mkws_config.service_proxy_auth_domain, - mkws_config.pazpar2_url); + authenticate_session(mkws_config.service_proxy_auth, + mkws_config.service_proxy_auth_domain, + mkws_config.pazpar2_url); } else { // raw pp2 - mkws.run_auto_searches(); + run_auto_searches(); } }); @@ -1399,7 +1399,7 @@ function _mkws_jquery_plugin ($) { * The username/password is configured in the apache config file * for the site. */ - mkws.authenticate_session = function(auth_url, auth_domain, pp2_url) { + function authenticate_session(auth_url, auth_domain, pp2_url) { debug("Run service proxy auth URL: " + auth_url); if (!auth_domain) { @@ -1425,13 +1425,13 @@ function _mkws_jquery_plugin ($) { debug("Service proxy auth successfully done"); mkws.authenticated = true; - mkws.run_auto_searches(); + run_auto_searches(); }); } - mkws.run_auto_searches = function() { - debug("running auto searches"); + function run_auto_searches() { + console.log("running auto searches"); $('[id^="mkwsRecords"]').each(function () { var node = $(this); @@ -1450,7 +1450,7 @@ function _mkws_jquery_plugin ($) { if (windowid) s += " [windowid '" + windowid + "']"; if (sort) s += " sorted by '" + sort + "'"; if (targets) s += " in targets '" + targets + "'"; - debug(s); + console.log(s); newSearch(query, sort, targets, windowid); } }); -- 1.7.10.4