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

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

Issue 2813503002: MD Bookmarks: Prevent navigating to invalid folders (Closed)
Patch Set: handleAction -> dispatch Created 3 years, 7 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 behaviors: [ 8 behaviors: [
9 bookmarks.StoreClient, 9 bookmarks.StoreClient,
10 ], 10 ],
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_bookmarks/dnd_manager.js ('k') | chrome/browser/resources/md_bookmarks/item.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698