X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=experiments%2Fspclient%2Fmkws.js;h=7e87e96cd288aed1bf5a06b805cd394e991321f0;hb=37b40bc80ae5106c8b6fa2c921e1ad2cb1a837d5;hp=d8f43e348d30ed890213bcd70f31d16a9f200956;hpb=85ba8bcf822fec42845a0f3bd2f0daed087930e8;p=mkws-moved-to-github.git diff --git a/experiments/spclient/mkws.js b/experiments/spclient/mkws.js index d8f43e3..7e87e96 100644 --- a/experiments/spclient/mkws.js +++ b/experiments/spclient/mkws.js @@ -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) { '); $("#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"); } } @@ -493,8 +494,11 @@ function mkws_html_perpage(config) { * The username/password is configured in the apache config file * for the site. */ -function mkws_service_proxy_auth() { - var jqxhr = jQuery.get("/service-proxy-auth") +function mkws_service_proxy_auth(auth_url) { + if (!auth_url) + auth_url = "/service-proxy-auth"; + + var jqxhr = jQuery.get(auth_url) .fail(function() { alert("service proxy authentication failed, give up!"); }) @@ -511,5 +515,5 @@ function mkws_service_proxy_auth() { }); } +/* magic */ $(document).ready(function() { mkws_html_all(mkws_config) }); -$(document).ready(function() { mkws_service_proxy_auth(); });