From 1ac684b43f90ab7eac82c33dcacc5227783b613e Mon Sep 17 00:00:00 2001 From: dblugeon Date: Sun, 5 May 2013 17:34:37 +0200 Subject: [PATCH] Fix proposition for issue #221 Adding a p element to inform user that his search return no results --- WebKit/css/default.css | 5 +++++ WebKit/scripts/controller/Search.js | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/WebKit/css/default.css b/WebKit/css/default.css index eb29391..ff8bbfd 100644 --- a/WebKit/css/default.css +++ b/WebKit/css/default.css @@ -441,4 +441,9 @@ form.search input { width: 100%; padding: 10px; font-size: 1.2em; +} + +p.noresult { + padding : 10px; + text-align : center; } \ No newline at end of file diff --git a/WebKit/scripts/controller/Search.js b/WebKit/scripts/controller/Search.js index 55b7d57..51ce153 100644 --- a/WebKit/scripts/controller/Search.js +++ b/WebKit/scripts/controller/Search.js @@ -116,6 +116,11 @@ function(HostApp, Core, Paths, URI) { _this.body.appendChild(new_node); } } + } else { + var noresult = document.createElement("p"); + noresult.className = "noresult"; + noresult.textContent = "No Results"; + _this.body.appendChild(noresult); } }, null, false);