Chromium Code Reviews| 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 | 73 |
| 74 /** | 74 /** |
| 75 * Occurs when the drop down arrow is tapped. | 75 * Occurs when the drop down arrow is tapped. |
| 76 * @private | 76 * @private |
| 77 * @param {!Event} e | 77 * @param {!Event} e |
| 78 */ | 78 */ |
| 79 toggleFolder_: function(e) { | 79 toggleFolder_: function(e) { |
| 80 this.dispatch( | 80 this.dispatch( |
| 81 bookmarks.actions.changeFolderOpen(this.item_.id, this.isClosed_)); | 81 bookmarks.actions.changeFolderOpen(this.item_.id, this.isClosed_)); |
| 82 window.localStorage[LOCAL_STORAGE_CLOSED_FOLDERS_KEY] = | |
|
tsergeant
2017/03/29 04:43:24
I'm a bit torn about where this should live. On on
calamity
2017/03/30 03:16:04
Yeah, basically because this is where it changes.
| |
| 83 JSON.stringify(this.getState().closedFolders); | |
| 82 e.stopPropagation(); | 84 e.stopPropagation(); |
| 83 }, | 85 }, |
| 84 | 86 |
| 85 /** | 87 /** |
| 86 * @private | 88 * @private |
| 87 * @param {string} itemId | 89 * @param {string} itemId |
| 88 * @param {string} selectedFolder | 90 * @param {string} selectedFolder |
| 89 * @return {boolean} | 91 * @return {boolean} |
| 90 */ | 92 */ |
| 91 computeIsSelected_: function(itemId, selectedFolder) { | 93 computeIsSelected_: function(itemId, selectedFolder) { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 123 }, | 125 }, |
| 124 | 126 |
| 125 /** | 127 /** |
| 126 * @private | 128 * @private |
| 127 * @return {boolean} | 129 * @return {boolean} |
| 128 */ | 130 */ |
| 129 isRootFolder_: function() { | 131 isRootFolder_: function() { |
| 130 return this.depth == 0; | 132 return this.depth == 0; |
| 131 }, | 133 }, |
| 132 }); | 134 }); |
| OLD | NEW |