From: Thierry Parmentelat Date: Fri, 19 Apr 2013 11:01:43 +0000 (+0200) Subject: nicer display for empty results X-Git-Tag: myslice-0.2-1~146 X-Git-Url: http://git.onelab.eu/?p=unfold.git;a=commitdiff_plain;h=5263bf0a91b2e3b54e07deb3d3ebeabd37de123a nicer display for empty results --- diff --git a/plugins/hazelnut/hazelnut.js b/plugins/hazelnut/hazelnut.js index 192ab054..e32e50d3 100644 --- a/plugins/hazelnut/hazelnut.js +++ b/plugins/hazelnut/hazelnut.js @@ -271,7 +271,10 @@ if (rows.length==0) { if (debug) messages.debug("Empty result on hazelnut " + domid); - this.table.html(unfold.warning("Empty result")); + var placeholder=$(this.table).find("td.dataTables_empty"); + console.log("placeholder "+placeholder); + if (placeholder.length==1) placeholder.html(unfold.warning("Empty result")); + else this.table.html(unfold.warning("Empty result")); return; } else if (typeof(rows[0].error) != 'undefined') { // we now should have another means to report errors that this inline/embedded hack