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

Side by Side Diff: chrome/browser/resources/md_bookmarks/list.js

Issue 2639893006: [MD Bookmarks] Add lines between items and no search results message. (Closed)
Patch Set: Switch to evaluate last item with :last-of-type Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 Polymer({ 5 Polymer({
6 is: 'bookmarks-list', 6 is: 'bookmarks-list',
7 7
8 properties: { 8 properties: {
9 /** @type {BookmarkTreeNode} */ 9 /** @type {BookmarkTreeNode} */
10 menuItem_: Object, 10 menuItem_: Object,
11 11
12 /** @type {Array<BookmarkTreeNode>} */ 12 /** @type {Array<BookmarkTreeNode>} */
13 displayedList: Array, 13 displayedList: Array,
14
15 searchTerm: {
tsergeant 2017/01/20 02:48:27 Does it work if you use the short form: searchTer
16 type: String,
17 value: '',
18 },
14 }, 19 },
15 20
16 listeners: { 21 listeners: {
17 'open-item-menu': 'onOpenItemMenu_', 22 'open-item-menu': 'onOpenItemMenu_',
18 }, 23 },
19 24
20 /** 25 /**
21 * @param {Event} e 26 * @param {Event} e
22 * @private 27 * @private
23 */ 28 */
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 }, 79 },
75 80
76 /** @private */ 81 /** @private */
77 closeDropdownMenu_: function() { 82 closeDropdownMenu_: function() {
78 var menu = /** @type {!CrActionMenuElement} */ ( 83 var menu = /** @type {!CrActionMenuElement} */ (
79 this.$.dropdown); 84 this.$.dropdown);
80 menu.close(); 85 menu.close();
81 }, 86 },
82 87
83 /** @private */ 88 /** @private */
84 isListEmpty_: function() { 89 emptyListMessage_: function() {
90 var emptyListMessage = this.searchTerm ? 'noSearchResults' : 'emptyList';
91 return loadTimeData.getString(emptyListMessage);
92 },
93
94 /** @private */
95 isEmptyList_: function() {
85 return this.displayedList.length == 0; 96 return this.displayedList.length == 0;
86 } 97 },
87 }); 98 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698