From dd71fc65287d51413b5c683fa9a71caaf9441fab Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Wed, 10 Jul 2013 12:54:02 +0000 Subject: [PATCH] delayed debug message for jquery plugin --- tools/htdocs/mkws.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) 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) }); -- 1.7.10.4