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

Unified Diff: chrome/browser/resources/md_history/history_card_manager.html

Issue 1643693003: MD History: Implement search functionality. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@patch_to_be_uploaded
Patch Set: Hide cards that haven't been rerendered from previous chrome.send(). Created 4 years, 11 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
Index: chrome/browser/resources/md_history/history_card_manager.html
diff --git a/chrome/browser/resources/md_history/history_card_manager.html b/chrome/browser/resources/md_history/history_card_manager.html
index 7108a87abc6593da7befccbd5ac3cc9501c978e2..6045498b08d832cf226f3ef41a60ff83cd9ca1e8 100644
--- a/chrome/browser/resources/md_history/history_card_manager.html
+++ b/chrome/browser/resources/md_history/history_card_manager.html
@@ -40,15 +40,31 @@
paper-item:hover {
background: #eaeaea;
}
+
+ #no-results {
+ flex: 1;
+ align-items: center;
+ color: #b4b4b4;
+ display: flex;
+ font-size: 123.1%;
+ font-weight: 500;
+ justify-content: center;
+ }
</style>
- <iron-list items="{{historyDataByDay_}}" as="historyDay" id="infinite-list"
- on-scroll="scrollHandler_">
- <template>
- <history-card history-date="{{historyDay.date}}"
- history-items="{{historyDay.historyItems}}">
- </history-card>
- </template>
- </iron-list>
+ <template is="dom-if" if="{{noResults_(historyDataByDay_.length, loading)}}">
tsergeant 2016/02/02 02:57:36 These dom-ifs complicate the template a fair bit.
hsampson 2016/02/03 02:37:58 Done.
+ <div id="no-results">{{noResultsMessage}}</div>
+ </template>
+ <template is="dom-if" if="{{!noResults_(historyDataByDay_.length, loading)}}">
+ <iron-list items="{{historyDataByDay_}}" as="historyDay" id="infinite-list"
+ on-scroll="scrollHandler_">
+ <template>
+ <history-card history-date="{{historyDay.date}}"
+ search-term="[[searchTerm]]"
+ history-items="{{historyDay.historyItems}}">
+ </history-card>
+ </template>
+ </iron-list>
+ </template>
<paper-menu id="overflow-menu">
<paper-item i18n-content="moreFromSite" on-tap="onMoreFromSiteTap_">
</paper-item>

Powered by Google App Engine
This is Rietveld 408576698