From e7a59689a9f67bd5745cc1fd455b654d4fb2b578 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Tue, 4 Mar 2014 12:20:47 +0000 Subject: [PATCH] Move more global code (protocol-independent link adjusting) out of the team. --- tools/htdocs/mkws.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index b5e9908..163da6a 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -232,12 +232,6 @@ function team($, teamName) { m_perpage = parseInt(mkws_config.perpage_default); } - // 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 independent links: " + mkws_config.pazpar2_url); - } - debug("Create main pz2 object"); // create a parameters array and pass it to the pz2's constructor // then register the form submit event with the pz2.search function @@ -1432,6 +1426,12 @@ function team($, teamName) { $(document).ready(function() { mkws.resizePage() }); } + // 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 independent links: " + mkws_config.pazpar2_url); + } + // Backwards compatibility: set new magic class names on any // elements that have the old magic IDs. var ids = [ "Switch", "Lang", "Search", "Pager", "Navi", -- 1.7.10.4