Team-name defaults to AUTO.
[mkws-moved-to-github.git] / tools / htdocs / mkws.js
index e61878d..7b10f2f 100644 (file)
@@ -1313,9 +1313,10 @@ function _mkws_jquery_plugin ($) {
                    tname = cname.replace(/^mkwsTeam_/, '');
                }
            }
-           if (!tname) {
-               alert("No MKWS team specified for mkwsRecords element with classes '" + classes + "'");
-           } else if (mkws.teams[tname]) {
+           if (!tname)
+               tname = "AUTO";
+
+           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
@@ -1341,8 +1342,8 @@ function _mkws_jquery_plugin ($) {
        /* default mkws config */
        var config_default = {
            use_service_proxy: true,
-           pazpar2_url: "http://mkws.indexdata.com/service-proxy/",
-           service_proxy_auth: "http://mkws.indexdata.com/service-proxy-auth",
+           pazpar2_url: "//mkws.indexdata.com/service-proxy/",
+           service_proxy_auth: "//mkws.indexdata.com/service-proxy-auth",
            lang: "",
            sort_options: [["relevance"], ["title:1", "title"], ["date:0", "newest"], ["date:1", "oldest"]],
            perpage_options: [10, 20, 30, 50],