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-toolbar', | 6 is: 'bookmarks-toolbar', |
7 | 7 |
8 behaviors: [ | 8 behaviors: [ |
9 bookmarks.StoreClient, | 9 bookmarks.StoreClient, |
10 ], | 10 ], |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 */ | 60 */ |
61 onMenuButtonOpenTap_: function(e) { | 61 onMenuButtonOpenTap_: function(e) { |
62 var menu = /** @type {!CrActionMenuElement} */ (this.$.dropdown); | 62 var menu = /** @type {!CrActionMenuElement} */ (this.$.dropdown); |
63 menu.showAt(/** @type {!Element} */ (e.target)); | 63 menu.showAt(/** @type {!Element} */ (e.target)); |
64 }, | 64 }, |
65 | 65 |
66 /** @private */ | 66 /** @private */ |
67 onSortTap_: function() { | 67 onSortTap_: function() { |
68 chrome.bookmarkManagerPrivate.sortChildren( | 68 chrome.bookmarkManagerPrivate.sortChildren( |
69 assert(this.getState().selectedFolder)); | 69 assert(this.getState().selectedFolder)); |
| 70 bookmarks.ToastManager.getInstance().show( |
| 71 loadTimeData.getString('toastFolderSorted'), true); |
70 this.closeDropdownMenu_(); | 72 this.closeDropdownMenu_(); |
71 }, | 73 }, |
72 | 74 |
73 /** @private */ | 75 /** @private */ |
74 onAddBookmarkTap_: function() { | 76 onAddBookmarkTap_: function() { |
75 var dialog = | 77 var dialog = |
76 /** @type {BookmarksEditDialogElement} */ (this.$.addDialog.get()); | 78 /** @type {BookmarksEditDialogElement} */ (this.$.addDialog.get()); |
77 dialog.showAddDialog(false, assert(this.getState().selectedFolder)); | 79 dialog.showAddDialog(false, assert(this.getState().selectedFolder)); |
78 this.closeDropdownMenu_(); | 80 this.closeDropdownMenu_(); |
79 }, | 81 }, |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 }, | 156 }, |
155 | 157 |
156 /** | 158 /** |
157 * @return {string} | 159 * @return {string} |
158 * @private | 160 * @private |
159 */ | 161 */ |
160 getItemsSelectedString_: function() { | 162 getItemsSelectedString_: function() { |
161 return loadTimeData.getStringF('itemsSelected', this.selectedCount_); | 163 return loadTimeData.getStringF('itemsSelected', this.selectedCount_); |
162 }, | 164 }, |
163 }); | 165 }); |
OLD | NEW |