X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=experiments%2Fspclient%2Fmkws.js;h=3eb49314ef48bce9c291c56fcfec99488ee9da24;hb=6984baaeb6b56dbdcefe67490581dd18d4a6ce91;hp=1ad38750d900f1286671de4e8368c3137e5c83d4;hpb=2ff7d728829b536e2379dd6f9dc4fce701acda89;p=mkws-moved-to-github.git diff --git a/experiments/spclient/mkws.js b/experiments/spclient/mkws.js index 1ad3875..3eb4931 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" }; @@ -394,8 +394,6 @@ function mkws_html_all(data) { config[k] = data[k]; } - mkws_html_switch(config); - // For some reason, doing this programmatically results in // document.search.query being undefined, hence the raw HTML. $("#mkwsSearch").html('\ @@ -426,11 +424,8 @@ function mkws_html_all(data) { \ '); - $("#mkwsTargets").html('\ -
\ - No information available yet.\ -
'); - $("#mkwsTargets").css("display", "none"); + mkws_html_switch(config); + mkws_service_proxy_auth(config.service_proxy_auth); domReady(); } @@ -448,7 +443,13 @@ function mkws_html_switch(config) { text: "Targets" })); - if (!config.mkws_switch) { + $("#mkwsTargets").html('\ +
\ + No information available yet.\ +
'); + $("#mkwsTargets").css("display", "none"); + + if (!config.switch) { $("#mkwsSwitch").css("display", "none"); } } @@ -497,7 +498,7 @@ function mkws_service_proxy_auth(auth_url) { if (!auth_url) auth_url = "/service-proxy-auth"; - var jqxhr = jQuery.get(auth_url); + var jqxhr = jQuery.get(auth_url) .fail(function() { alert("service proxy authentication failed, give up!"); }) @@ -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(); });