Reorder
authorMike Taylor <mike@indexdata.com>
Thu, 27 Mar 2014 16:28:27 +0000 (16:28 +0000)
committerMike Taylor <mike@indexdata.com>
Thu, 27 Mar 2014 16:28:27 +0000 (16:28 +0000)
src/mkws-core.js

index c1cb1e4..ba20871 100644 (file)
@@ -326,6 +326,12 @@ mkws.pagerNext = function(tname) {
            mkws_config.query_width = 50;
        }
 
+       // 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;
+           log("adjust protocol independent links: " + mkws_config.pazpar2_url);
+       }
+
        if (mkws_config.responsive_design_width) {
            // Responsive web design - change layout on the fly based on
            // current screen width. Required for mobile devices.
@@ -334,12 +340,6 @@ mkws.pagerNext = function(tname) {
            $(document).ready(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;
-           log("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",