X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=experiments%2Fspclient%2Fmkws.js;h=317027cec725a6e05a53c68abf1ffb0041691108;hb=3bf6bcb8ee9b923acc06fff0e02f9b5e8978e56b;hp=daf222dd370547f6f7d8185c502a9b638eaeadec;hpb=782e286df221e36e3e98050984beafe3c68b7fd5;p=mkws-moved-to-github.git
diff --git a/experiments/spclient/mkws.js b/experiments/spclient/mkws.js
index daf222d..317027c 100644
--- a/experiments/spclient/mkws.js
+++ b/experiments/spclient/mkws.js
@@ -437,7 +437,7 @@ function mkws_html_all(data) {
sort_default: "relevance",
perpage_default: 20,
query_width: 50,
- switch: true, /* show/hide Records|Targets menu */
+ switch_menu: true, /* show/hide Records|Targets menu */
debug: 0, /* debug level for development: 0..2 */
dummy: "dummy"
@@ -463,7 +463,7 @@ function mkws_html_all(data) {
// document.search.query being undefined, hence the raw HTML.
debug("HTML search form");
$("#mkwsSearch").html('\
-
');
@@ -477,7 +477,7 @@ function mkws_html_all(data) {
\
\
| \
\
- \
- ');
+ ');
mkws_html_switch(config);
if (mkws_config.use_service_proxy)
@@ -506,7 +505,7 @@ function mkws_set_lang(mkws_config) {
mkws_config.lang = lang;
}
- debug("Locale language: " + mkws_config.lang);
+ debug("Locale language: " + (mkws_config.lang ? mkws_config.lang : "none"));
return mkws_config.lang;
}
@@ -532,8 +531,8 @@ function mkws_html_switch(config) {
');
$("#mkwsTargets").css("display", "none");
- if (!config.switch) {
- debug("disable switch");
+ if (!config.switch_menu) {
+ debug("disable switch menu");
$("#mkwsSwitch").css("display", "none");
}
}
@@ -657,11 +656,18 @@ jQuery.extend({
function debug(string) {
if (!mkws_debug)
return;
-
+
+ var console; // IE8 quirks
if (!console) { /* ARGH!!! */
return;
}
-
+
+ // you need to disable use strict at the top of the file!!!
+ if (mkws_debug >= 3) {
+ console.log(arguments.callee.caller);
+ } else if (mkws_debug >= 2) {
+ console.log(">>> called from function " + arguments.callee.caller.name + ' <<<');
+ }
console.log(string);
}