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

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

Issue 2802723003: MD Bookmarks: Remove 'enter' handler from Add/Edit dialog (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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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-edit-dialog', 6 is: 'bookmarks-edit-dialog',
7 7
8 behaviors: [
9 Polymer.IronA11yKeysBehavior,
10 ],
11
12 properties: { 8 properties: {
13 /** @private */ 9 /** @private */
14 isFolder_: Boolean, 10 isFolder_: Boolean,
15 11
16 /** @private */ 12 /** @private */
17 isEdit_: Boolean, 13 isEdit_: Boolean,
18 14
19 /** 15 /**
20 * Item that is being edited, or null when adding. 16 * Item that is being edited, or null when adding.
21 * @private {?BookmarkNode} 17 * @private {?BookmarkNode}
22 */ 18 */
23 editItem_: Object, 19 editItem_: Object,
24 20
25 /** 21 /**
26 * Parent node for the item being added, or null when editing. 22 * Parent node for the item being added, or null when editing.
27 * @private {?string} 23 * @private {?string}
28 */ 24 */
29 parentId_: String, 25 parentId_: String,
30 26
31 /** @private */ 27 /** @private */
32 titleValue_: String, 28 titleValue_: String,
33 29
34 /** @private */ 30 /** @private */
35 urlValue_: String, 31 urlValue_: String,
36 }, 32 },
37 33
38 keyBindings: {
39 'enter': 'onSaveButtonTap_',
40 },
41
42 /** 34 /**
43 * Show the dialog to add a new folder (if |isFolder|) or item, which will be 35 * Show the dialog to add a new folder (if |isFolder|) or item, which will be
44 * inserted into the tree as a child of |parentId|. 36 * inserted into the tree as a child of |parentId|.
45 * @param {boolean} isFolder 37 * @param {boolean} isFolder
46 * @param {string} parentId 38 * @param {string} parentId
47 */ 39 */
48 showAddDialog: function(isFolder, parentId) { 40 showAddDialog: function(isFolder, parentId) {
49 this.reset_(); 41 this.reset_();
50 this.isEdit_ = false; 42 this.isEdit_ = false;
51 this.isFolder_ = isFolder; 43 this.isFolder_ = isFolder;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 chrome.bookmarks.create(edit); 130 chrome.bookmarks.create(edit);
139 } 131 }
140 this.$.dialog.close(); 132 this.$.dialog.close();
141 }, 133 },
142 134
143 /** @private */ 135 /** @private */
144 onCancelButtonTap_: function() { 136 onCancelButtonTap_: function() {
145 this.$.dialog.cancel(); 137 this.$.dialog.cancel();
146 }, 138 },
147 }); 139 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_bookmarks/edit_dialog.html ('k') | chrome/test/data/webui/md_bookmarks/edit_dialog_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698