refactor
authorWolfram Schneider <wosch@indexdata.dk>
Thu, 20 Jun 2013 13:39:04 +0000 (13:39 +0000)
committerWolfram Schneider <wosch@indexdata.dk>
Thu, 20 Jun 2013 13:39:04 +0000 (13:39 +0000)
experiments/spclient/index.html
experiments/spclient/mkws.js

index a9fd8da..65e72c1 100644 (file)
@@ -9,7 +9,7 @@
     <link rel="stylesheet" href="mkwsStyle.css" />
     <script type="text/javascript">
        var mkws_config = { 
-               switch: false, 
+               switch: true, 
                sort_default: "relevance",
                perpage_default: 20
         }; 
index 7e87e96..3eb4931 100644 (file)
@@ -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,13 +424,9 @@ function mkws_html_all(data) {
       </table>\
     </div>');
 
-    $("#mkwsTargets").html('\
-      <div id="bytarget">\
-       No information available yet.\
-      </div>');
-    $("#mkwsTargets").css("display", "none");
-
+    mkws_html_switch(config);
     mkws_service_proxy_auth(config.service_proxy_auth);
+
     domReady();
 }
 
@@ -449,6 +443,12 @@ function mkws_html_switch(config) {
        text: "Targets"
     }));
 
+    $("#mkwsTargets").html('\
+      <div id="bytarget">\
+       No information available yet.\
+      </div>');
+    $("#mkwsTargets").css("display", "none");
+
     if (!config.switch) {
         $("#mkwsSwitch").css("display", "none");
     }