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

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

Issue 2639453002: [MD Bookmarks] Add Select for Bookmarks. (Closed)
Patch Set: restructure Created 3 years, 10 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-folder-node', 6 is: 'bookmarks-folder-node',
7 7
8 properties: { 8 properties: {
9 /** @type {BookmarkTreeNode} */ 9 /** @type {BookmarkTreeNode} */
10 item: Object, 10 item: Object,
11 11
12 isSelected: { 12 isSelectedFolder: {
13 type: Boolean, 13 type: Boolean,
14 value: false, 14 value: false,
15 reflectToAttribute: true, 15 reflectToAttribute: true,
16 }, 16 },
17 }, 17 },
18 18
19 /** 19 /**
20 * @private 20 * @private
21 * @return {string} 21 * @return {string}
22 */ 22 */
23 getFolderIcon_: function() { 23 getFolderIcon_: function() {
24 return this.isSelected ? 'bookmarks:folder-open' : 'cr:folder'; 24 return this.isSelectedFolder ? 'bookmarks:folder-open' : 'cr:folder';
25 }, 25 },
26 26
27 /** 27 /**
28 * @private 28 * @private
29 * @return {string} 29 * @return {string}
30 */ 30 */
31 getArrowIcon_: function() { 31 getArrowIcon_: function() {
32 return this.item.isOpen ? 'cr:arrow-drop-up' : 'cr:arrow-drop-down'; 32 return this.item.isOpen ? 'cr:arrow-drop-up' : 'cr:arrow-drop-down';
33 }, 33 },
34 34
(...skipping 17 matching lines...) Expand all
52 * @private 52 * @private
53 * @return {boolean} 53 * @return {boolean}
54 */ 54 */
55 hasChildFolder_: function() { 55 hasChildFolder_: function() {
56 for (var i = 0; i < this.item.children.length; i++) { 56 for (var i = 0; i < this.item.children.length; i++) {
57 if (!this.item.children[i].url) 57 if (!this.item.children[i].url)
58 return true; 58 return true;
59 } 59 }
60 return false; 60 return false;
61 }, 61 },
62
63 /**
64 * @private
tsergeant 2017/01/30 06:39:47 Add an @param annotation
jiaxi 2017/01/31 00:37:42 Done.
65 * @return {boolean}
66 */
67 isFolder_: function(item) {
68 return !item.url;
69 }
62 }); 70 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698