X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=experiments%2Fspclient%2Fmkws.js;h=317027cec725a6e05a53c68abf1ffb0041691108;hb=3bf6bcb8ee9b923acc06fff0e02f9b5e8978e56b;hp=70672962456d1a6adefb7e242a8cb72a8c0e9cd0;hpb=87ef8000ce7bd19a81bb2844ee5613cba0dac8b6;p=mkws-moved-to-github.git diff --git a/experiments/spclient/mkws.js b/experiments/spclient/mkws.js index 7067296..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) { \ \
\ -
\ + \ ' + M('Sort by') + mkws_html_sort(config) + '\ ' + M('and show') + ' ' + mkws_html_perpage(config) + '\ ' + M('per page') + '.\ @@ -488,8 +488,7 @@ function mkws_html_all(data) {
\ \ \ - \ -
'); + '); mkws_html_switch(config); if (mkws_config.use_service_proxy) @@ -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); }