mkws_switch -> switch
[mkws-moved-to-github.git] / experiments / spclient / mkws.js
index cb1a459..7e87e96 100644 (file)
@@ -384,7 +384,7 @@ function mkws_html_all(data) {
        sort_default: "relevance",
        perpage_default: 20,
        query_width: 50,
-       mkws_switch: true, /* show/hide Records|Targets menu */
+       switch: true, /* show/hide Records|Targets menu */
 
        dummy: "dummy"
     };
@@ -432,6 +432,7 @@ function mkws_html_all(data) {
       </div>');
     $("#mkwsTargets").css("display", "none");
 
+    mkws_service_proxy_auth(config.service_proxy_auth);
     domReady();
 }
 
@@ -448,7 +449,7 @@ function mkws_html_switch(config) {
        text: "Targets"
     }));
 
-    if (!config.mkws_switch) {
+    if (!config.switch) {
         $("#mkwsSwitch").css("display", "none");
     }
 }
@@ -514,5 +515,5 @@ function mkws_service_proxy_auth(auth_url) {
        });
 }
 
+/* magic */
 $(document).ready(function() { mkws_html_all(mkws_config) });
-$(document).ready(function() { mkws_service_proxy_auth(); });