From 8ad2b96c6179a9886f0f3b710749d68e6f3c6bd6 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Fri, 24 Jan 2014 09:14:15 +0000 Subject: [PATCH] The mkws_service_proxy_auth() method was private to the team object, but that's nosense as it has to be called only once even when there are multiple teams. So it's now changed to be a member of the global object, mkws.service_proxy_auth(), and is invoked only after all teams have been created. --- tools/htdocs/mkws.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index 90da742..c00252d 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -973,15 +973,6 @@ function _make_mkws_team($, teamName) { mkws_html_switch(); - if (mkws_config.use_service_proxy) { - mkws_service_proxy_auth(mkws_config.service_proxy_auth, - mkws_config.service_proxy_auth_domain, - mkws_config.pazpar2_url); - } else { - // raw pp2 - run_auto_searches(); - } - if (mkws_config.responsive_design_width) { // Responsive web design - change layout on the fly based on // current screen width. Required for mobile devices. @@ -1118,7 +1109,7 @@ function _make_mkws_team($, teamName) { * The username/password is configured in the apache config file * for the site. */ - function mkws_service_proxy_auth(auth_url, auth_domain, pp2_url) { + mkws.service_proxy_auth = function(auth_url, auth_domain, pp2_url) { debug("Run service proxy auth URL: " + auth_url); if (!auth_domain) { @@ -1449,5 +1440,14 @@ function _mkws_jquery_plugin ($) { log("Made MKWS team '" + tname + "'"); } }); + + if (mkws_config.use_service_proxy) { + mkws.service_proxy_auth(mkws_config.service_proxy_auth, + mkws_config.service_proxy_auth_domain, + mkws_config.pazpar2_url); + } else { + // raw pp2 + run_auto_searches(); + } }); })(jQuery); -- 1.7.10.4