From: Wolfram Schneider Date: Wed, 10 Jul 2013 12:54:02 +0000 (+0000) Subject: delayed debug message for jquery plugin X-Git-Tag: 0.9.1~292 X-Git-Url: http://git.indexdata.com/?p=mkws-moved-to-github.git;a=commitdiff_plain;h=dd71fc65287d51413b5c683fa9a71caaf9441fab delayed debug message for jquery plugin --- diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index 47db28d..bcb3435 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -834,6 +834,10 @@ jQuery.extend({ return nvpair; }, + debug2: function(string) { // delayed debug + setTimeout(function() { debug(string); }, 500); + }, + // service-proxy or pazpar2 pazpar2: function(config) { @@ -894,12 +898,12 @@ jQuery.extend({ \ '; - if (config && config.layout == 'table') { - debug("jquery plugin layout: table"); - document.write(table); - } else { - debug("jquery plugin layout: div"); + if (config && config.layout == 'div') { + this.debug2("jquery plugin layout: div"); document.write(div); + } else { + this.debug2("jquery plugin layout: table"); + document.write(table); } } @@ -922,5 +926,6 @@ function debug(string) { console.log(string); } + /* magic */ $(document).ready(function() { mkws_html_all(mkws_config) });