Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 Polymer({ | |
| 6 is: 'bookmarks-list', | |
|
tsergeant
2017/01/04 03:44:12
Blank line after this.
jiaxi
2017/01/04 04:12:33
Done.
| |
| 7 properties: { | |
| 8 /** @type {BookmarkTreeNode} */ | |
| 9 selectedNode: Object, | |
| 10 }, | |
| 11 | |
| 12 listeners: { | |
| 13 'toggle-menu': 'onToggleMenu_' | |
| 14 }, | |
| 15 | |
| 16 /** | |
| 17 * @param {Event} e | |
| 18 * @private | |
| 19 */ | |
| 20 onToggleMenu_: function(e) { | |
| 21 var menu = /** @type {!CrActionMenuElement} */ ( | |
| 22 this.$.dropdown); | |
| 23 menu.showAt(/** @type {!Element} */ (e.detail.target)); | |
| 24 }, | |
| 25 | |
| 26 // TODO(jiaxi): change these dummy click event handlers later. | |
| 27 /** @private */ | |
| 28 onEditTap_: function() { | |
| 29 this.closeDropdownMenu_(); | |
| 30 }, | |
| 31 | |
| 32 /** @private */ | |
| 33 onCopyURLTap_: function() { | |
| 34 this.closeDropdownMenu_(); | |
| 35 }, | |
| 36 | |
| 37 /** @private */ | |
| 38 onDeleteTap_: function() { | |
| 39 this.closeDropdownMenu_(); | |
| 40 }, | |
| 41 | |
| 42 /** @private */ | |
| 43 closeDropdownMenu_: function() { | |
| 44 var menu = /** @type {!CrActionMenuElement} */ ( | |
| 45 this.$.dropdown); | |
| 46 menu.close(); | |
| 47 } | |
| 48 }); | |
| OLD | NEW |