From 5263bf0a91b2e3b54e07deb3d3ebeabd37de123a Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Fri, 19 Apr 2013 13:01:43 +0200 Subject: [PATCH] nicer display for empty results --- plugins/hazelnut/hazelnut.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.43.0