Add debugging
[mkws-moved-to-github.git] / tools / htdocs / mkws.js
index 3676a51..56c0b15 100644 (file)
@@ -389,6 +389,7 @@ function loadSelect ()
 // limit the query after clicking the facet
 mkws.limitQuery = function (field, value)
 {
+    debug("limitQuery(field=" + field + ", value=" + value + ")");
     document.mkwsSearchForm.mkwsQuery.value += ' and ' + field + '="' + value + '"';
     onFormSubmitEventHandler();
 }
@@ -396,6 +397,7 @@ mkws.limitQuery = function (field, value)
 // limit by target functions
 mkws.limitTarget  = function (id, name)
 {
+    debug("limitTarget(id=" + id + ", name=" + name + ")");
     var navi = document.getElementById('mkwsNavi');
     navi.innerHTML =
         'Source: <a class="crossout" href="#" onclick="mkws.delimitTarget();return false;">'
@@ -675,7 +677,8 @@ function mkws_html_all() {
     mkws_html_switch();
 
     if (mkws_config.use_service_proxy)
-       mkws_service_proxy_auth(mkws_config.service_proxy_auth);
+         mkws_service_proxy_auth(mkws_config.service_proxy_auth, 
+          mkws_config.service_proxy_auth_domain);
 
     if (mkws_config.responsive_design_width) {
        // Responsive web design - change layout on the fly based on
@@ -768,13 +771,13 @@ function mkws_html_perpage() {
  * The username/password is configured in the apache config file
  * for the site.
  */
-function mkws_service_proxy_auth(auth_url) {
+function mkws_service_proxy_auth(auth_url, auth_domain) {
     debug("Run service proxy auth URL: " + auth_url);
 
     var request = new pzHttpRequest(auth_url, function(err) {
-       alert("HTTP call for authentication failed: " + err)
-       return;
-    });
+         alert("HTTP call for authentication failed: " + err)
+         return;
+    }, auth_domain);
 
     request.get(null, function(data) {
        if (!$.isXMLDoc(data)) {