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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 112 |
121 /** | 113 /** |
122 * @param {string} itemId | 114 * @param {string} itemId |
123 * @private | 115 * @private |
124 * @return {boolean} | 116 * @return {boolean} |
125 */ | 117 */ |
126 isFolder_: function(itemId) { | 118 isFolder_: function(itemId) { |
127 return !this.getState().nodes[itemId].url; | 119 return !this.getState().nodes[itemId].url; |
128 } | 120 } |
129 }); | 121 }); |
OLD | NEW |