Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2872)

Unified Diff: chrome/browser/resources/md_history/history.js

Issue 1864023002: MD History: Add spinners when new data is loading or searching (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change loading spinner Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/md_history/history_list.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/md_history/history.js
diff --git a/chrome/browser/resources/md_history/history.js b/chrome/browser/resources/md_history/history.js
index 333b022871182f31a97f2cd1864ee990bc0c0eb8..7478fb12c208cbeed42bf2412abfc8dcf463754a 100644
--- a/chrome/browser/resources/md_history/history.js
+++ b/chrome/browser/resources/md_history/history.js
@@ -66,6 +66,7 @@ window.addEventListener('delete-selected', function() {
window.addEventListener('search-changed', function(e) {
$('toolbar').setSearchTerm(e.detail.search);
/** @type {HistoryListElement} */($('history-list')).setLoading();
+ /** @type {HistoryToolbarElement} */($('toolbar')).searching = true;
chrome.send('queryHistory', [e.detail.search, 0, 0, 0, RESULTS_PER_PAGE]);
});
@@ -90,6 +91,7 @@ function historyResult(info, results) {
waitForUpgrade(listElem).then(function() {
var list = /** @type {HistoryListElement} */(listElem);
list.addNewResults(results, info.term);
+ /** @type {HistoryToolbarElement} */$('toolbar').searching = false;
if (info.finished)
list.disableResultLoading();
// TODO(tsergeant): Showing everything as soon as the list is ready is not
« no previous file with comments | « no previous file | chrome/browser/resources/md_history/history_list.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698