}
}
- // protocol independend link for pazpar2: "//mkws/sp" -> "https://mkws/sp"
+ // protocol independent link for pazpar2: "//mkws/sp" -> "https://mkws/sp"
if (mkws_config.pazpar2_url.match(/^\/\//)) {
mkws_config.pazpar2_url = document.location.protocol + mkws_config.pazpar2_url;
- debug("adjust protocol independend links: " + mkws_config.pazpar2_url);
+ debug("adjust protocol independent links: " + mkws_config.pazpar2_url);
}
debug("Create main pz2 object");
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.
* 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) {
alert("No MKWS team specified for mkwsRecords element with classes '" + classes + "'");
} else if (mkws.teams[tname]) {
log("MKWS team '" + tname + "' already exists, skipping");
+ } else if (tname === "AUTO") {
+ // ### For now: later, this will be how the backwards-compatibility is done
+ log("Skipping MKWS team '" + tname + "'");
} else {
mkws.teams[tname] = _make_mkws_team(j, tname);
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);