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

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

Issue 2799593003: [MD Bookmarks] Allow dragging onto empty bookmark lists. (Closed)
Patch Set: rebase 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-list', 6 is: 'bookmarks-list',
7 7
8 behaviors: [ 8 behaviors: [
9 bookmarks.StoreClient, 9 bookmarks.StoreClient,
10 ], 10 ],
(...skipping 24 matching lines...) Expand all
35 attached: function() { 35 attached: function() {
36 this.watch('displayedList_', function(state) { 36 this.watch('displayedList_', function(state) {
37 return bookmarks.util.getDisplayedList(state); 37 return bookmarks.util.getDisplayedList(state);
38 }); 38 });
39 this.watch('searchTerm_', function(state) { 39 this.watch('searchTerm_', function(state) {
40 return state.search.term; 40 return state.search.term;
41 }); 41 });
42 this.updateFromStore(); 42 this.updateFromStore();
43 }, 43 },
44 44
45 getDropTarget: function() {
46 return this.$.message;
47 },
48
45 /** 49 /**
46 * @param {Event} e 50 * @param {Event} e
47 * @private 51 * @private
48 */ 52 */
49 onOpenItemMenu_: function(e) { 53 onOpenItemMenu_: function(e) {
50 this.menuItem_ = e.detail.item; 54 this.menuItem_ = e.detail.item;
51 var menu = /** @type {!CrActionMenuElement} */ ( 55 var menu = /** @type {!CrActionMenuElement} */ (
52 this.$.dropdown); 56 this.$.dropdown);
53 menu.showAt(/** @type {!Element} */ (e.detail.target)); 57 menu.showAt(/** @type {!Element} */ (e.detail.target));
54 }, 58 },
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 /** @private */ 109 /** @private */
106 isEmptyList_: function() { 110 isEmptyList_: function() {
107 return this.displayedList_.length == 0; 111 return this.displayedList_.length == 0;
108 }, 112 },
109 113
110 /** @private */ 114 /** @private */
111 deselectItems_: function() { 115 deselectItems_: function() {
112 this.dispatch(bookmarks.actions.deselectItems()); 116 this.dispatch(bookmarks.actions.deselectItems());
113 }, 117 },
114 }); 118 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_bookmarks/list.html ('k') | chrome/test/data/webui/md_bookmarks/dnd_manager_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698