| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 /** | 72 /** |
| 73 * @private | 73 * @private |
| 74 * @return {string} | 74 * @return {string} |
| 75 */ | 75 */ |
| 76 getFolderIcon_: function() { | 76 getFolderIcon_: function() { |
| 77 return this.isSelectedFolder_ ? 'bookmarks:folder-open' : 'cr:folder'; | 77 return this.isSelectedFolder_ ? 'bookmarks:folder-open' : 'cr:folder'; |
| 78 }, | 78 }, |
| 79 | 79 |
| 80 /** @private */ | 80 /** @private */ |
| 81 selectFolder_: function() { | 81 selectFolder_: function() { |
| 82 this.dispatch(bookmarks.actions.selectFolder(this.item_.id)); | 82 this.dispatch( |
| 83 bookmarks.actions.selectFolder(this.item_.id, this.getState().nodes)); |
| 83 }, | 84 }, |
| 84 | 85 |
| 85 /** | 86 /** |
| 86 * Occurs when the drop down arrow is tapped. | 87 * Occurs when the drop down arrow is tapped. |
| 87 * @private | 88 * @private |
| 88 * @param {!Event} e | 89 * @param {!Event} e |
| 89 */ | 90 */ |
| 90 toggleFolder_: function(e) { | 91 toggleFolder_: function(e) { |
| 91 this.dispatch( | 92 this.dispatch( |
| 92 bookmarks.actions.changeFolderOpen(this.item_.id, this.isClosed_)); | 93 bookmarks.actions.changeFolderOpen(this.item_.id, this.isClosed_)); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 }, | 135 }, |
| 135 | 136 |
| 136 /** | 137 /** |
| 137 * @private | 138 * @private |
| 138 * @return {boolean} | 139 * @return {boolean} |
| 139 */ | 140 */ |
| 140 isRootFolder_: function() { | 141 isRootFolder_: function() { |
| 141 return this.itemId == ROOT_NODE_ID; | 142 return this.itemId == ROOT_NODE_ID; |
| 142 }, | 143 }, |
| 143 }); | 144 }); |
| OLD | NEW |