From de3d243861673eca38299a8e60e0a8108bfa5449 Mon Sep 17 00:00:00 2001 From: Albert Graef <aggraef@gmail.com> Date: Fri, 21 Oct 2016 23:56:44 +0200 Subject: [PATCH] Get rid of dummy 'no description' lines when there is no description. --- pd/nw/dialog_search.html | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pd/nw/dialog_search.html b/pd/nw/dialog_search.html index c8df742e3..e543d6d55 100644 --- a/pd/nw/dialog_search.html +++ b/pd/nw/dialog_search.html @@ -233,9 +233,11 @@ function display_toc() { a.title = doc.id; header = document.createElement("h3"); header.appendChild(a); - text_node = document.createTextNode(doc.description?doc.description:"no description"); div.appendChild(header); - div.appendChild(text_node); + if (doc.description) { + text_node = document.createTextNode(doc.description); + div.appendChild(text_node); + } } else { // make a session title header = document.createElement("h2"); @@ -545,9 +547,11 @@ function display_doc(doc) { a.title = doc.id; header = document.createElement("h3"); header.appendChild(a); - text_node = document.createTextNode(doc.description?doc.description:"no description"); div.appendChild(header); - div.appendChild(text_node); + if (doc.description) { + text_node = document.createTextNode(doc.description); + div.appendChild(text_node); + } results_elem.appendChild(div); } -- GitLab