diff options
author | dubroy@chromium.org <dubroy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-07 17:20:34 +0000 |
---|---|---|
committer | dubroy@chromium.org <dubroy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-07 17:20:34 +0000 |
commit | ef62f59def69e470390a6e15ae874f398a9f3186 (patch) | |
tree | fcadff14d812023735b7e601aa947fec8f608138 | |
parent | af9f8e3bec47e0adf640d0c852cdf708d8d7ed27 (diff) | |
download | chromium_src-ef62f59def69e470390a6e15ae874f398a9f3186.zip chromium_src-ef62f59def69e470390a6e15ae874f398a9f3186.tar.gz chromium_src-ef62f59def69e470390a6e15ae874f398a9f3186.tar.bz2 |
There was no indication that there were no results found when doing a search in History (chrome://chrome/history/).
The message used is "No search results found."
Contributed by tom.cassiotis@gmail.com.
BUG=35762
TEST=Manual
TBR=estade@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10536055
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141025 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | chrome/browser/resources/history/history.js | 14 |
2 files changed, 11 insertions, 4 deletions
@@ -185,3 +185,4 @@ Yongsheng Zhu <yongsheng.zhu@intel.com> Shouqun Liu <shouqun.liu@intel.com> Jake Helfert <jake@helfert.us> Hongbo Min <hongbo.min@intel.com> +Anastasios Cassiotis <tom.cassiotis@gmail.com> diff --git a/chrome/browser/resources/history/history.js b/chrome/browser/resources/history/history.js index 96225d7..85f5d4bf 100644 --- a/chrome/browser/resources/history/history.js +++ b/chrome/browser/resources/history/history.js @@ -658,10 +658,16 @@ HistoryView.prototype.displayResults_ = function() { } var searchResults = createElementWithClassName('ol', 'search-results'); - for (var i = 0, visit; visit = results[i]; i++) { - if (!visit.isRendered) { - searchResults.appendChild(visit.getResultDOM(true)); - this.setVisitRendered_(visit); + if (results.length == 0) { + var noResults = document.createElement('div'); + noResults.textContent = loadTimeData.getString('noresults'); + searchResults.appendChild(noResults); + } else { + for (var i = 0, visit; visit = results[i]; i++) { + if (!visit.isRendered) { + searchResults.appendChild(visit.getResultDOM(true)); + this.setVisitRendered_(visit); + } } } this.resultDiv_.appendChild(searchResults); |