OLD | NEW |
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 behaviors: [ | 8 behaviors: [ |
9 bookmarks.StoreClient, | 9 bookmarks.StoreClient, |
10 ], | 10 ], |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 }, | 53 }, |
54 | 54 |
55 /** | 55 /** |
56 * @private | 56 * @private |
57 * @return {string} | 57 * @return {string} |
58 */ | 58 */ |
59 getFolderIcon_: function() { | 59 getFolderIcon_: function() { |
60 return this.isSelectedFolder_ ? 'bookmarks:folder-open' : 'cr:folder'; | 60 return this.isSelectedFolder_ ? 'bookmarks:folder-open' : 'cr:folder'; |
61 }, | 61 }, |
62 | 62 |
63 /** | |
64 * @private | |
65 * @return {string} | |
66 */ | |
67 getArrowIcon_: function() { | |
68 return this.isClosed_ ? 'cr:arrow-drop-down' : 'cr:arrow-drop-up'; | |
69 }, | |
70 | |
71 /** @private */ | 63 /** @private */ |
72 selectFolder_: function() { | 64 selectFolder_: function() { |
73 this.dispatch(bookmarks.actions.selectFolder(this.item_.id)); | 65 this.dispatch(bookmarks.actions.selectFolder(this.item_.id)); |
74 }, | 66 }, |
75 | 67 |
76 /** | 68 /** |
77 * Occurs when the drop down arrow is tapped. | 69 * Occurs when the drop down arrow is tapped. |
78 * @private | 70 * @private |
79 */ | 71 */ |
80 toggleFolder_: function() { | 72 toggleFolder_: function() { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 | 111 |
120 /** | 112 /** |
121 * @param {string} itemId | 113 * @param {string} itemId |
122 * @private | 114 * @private |
123 * @return {boolean} | 115 * @return {boolean} |
124 */ | 116 */ |
125 isFolder_: function(itemId) { | 117 isFolder_: function(itemId) { |
126 return !this.getState().nodes[itemId].url; | 118 return !this.getState().nodes[itemId].url; |
127 } | 119 } |
128 }); | 120 }); |
OLD | NEW |