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

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

Issue 2799653003: MD Bookmarks: Implement 'Sort by Title' menu button (Closed)
Patch Set: Created 3 years, 8 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-toolbar', 6 is: 'bookmarks-toolbar',
7 7
8 behaviors: [ 8 behaviors: [
9 bookmarks.StoreClient, 9 bookmarks.StoreClient,
10 ], 10 ],
(...skipping 27 matching lines...) Expand all
38 * @param {Event} e 38 * @param {Event} e
39 * @private 39 * @private
40 */ 40 */
41 onMenuButtonOpenTap_: function(e) { 41 onMenuButtonOpenTap_: function(e) {
42 var menu = /** @type {!CrActionMenuElement} */ (this.$.dropdown); 42 var menu = /** @type {!CrActionMenuElement} */ (this.$.dropdown);
43 menu.showAt(/** @type {!Element} */ (e.target)); 43 menu.showAt(/** @type {!Element} */ (e.target));
44 }, 44 },
45 45
46 /** @private */ 46 /** @private */
47 onSortTap_: function() { 47 onSortTap_: function() {
48 chrome.bookmarkManagerPrivate.sortChildren(
49 assert(this.getState().selectedFolder));
48 this.closeDropdownMenu_(); 50 this.closeDropdownMenu_();
49 }, 51 },
50 52
51 /** @private */ 53 /** @private */
52 onAddBookmarkTap_: function() { 54 onAddBookmarkTap_: function() {
53 var dialog = 55 var dialog =
54 /** @type {BookmarksEditDialogElement} */ (this.$.addDialog.get()); 56 /** @type {BookmarksEditDialogElement} */ (this.$.addDialog.get());
55 dialog.showAddDialog(false, assert(this.getState().selectedFolder)); 57 dialog.showAddDialog(false, assert(this.getState().selectedFolder));
56 this.closeDropdownMenu_(); 58 this.closeDropdownMenu_();
57 }, 59 },
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 }, 103 },
102 104
103 /** 105 /**
104 * @return {boolean} 106 * @return {boolean}
105 * @private 107 * @private
106 */ 108 */
107 hasSearchTerm_: function() { 109 hasSearchTerm_: function() {
108 return !!this.searchTerm_; 110 return !!this.searchTerm_;
109 }, 111 },
110 }); 112 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_bookmarks/toolbar.html ('k') | chrome/test/data/webui/md_bookmarks/reducers_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698