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

Unified Diff: chrome/browser/resources/md_bookmarks/list.js

Issue 2617943002: [MD Bookmarks] Edit Bookmarks. (Closed)
Patch Set: style fix Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/md_bookmarks/list.js
diff --git a/chrome/browser/resources/md_bookmarks/list.js b/chrome/browser/resources/md_bookmarks/list.js
index ea6cb45539e6daf35c7259a9195f658457b086b7..b207ff1091b4b47f12dbd986a51f981f0fd00b40 100644
--- a/chrome/browser/resources/md_bookmarks/list.js
+++ b/chrome/browser/resources/md_bookmarks/list.js
@@ -32,6 +32,7 @@ Polymer({
/** @private */
onEditTap_: function() {
tsergeant 2017/01/09 00:21:04 I think you should probably assert or if-guard to
jiaxi 2017/01/09 02:17:46 Done.
this.closeDropdownMenu_();
+ this.$.editBookmark.showModal();
},
/** @private */
@@ -58,6 +59,20 @@ Polymer({
},
/** @private */
+ onSaveEditTap_: function() {
+ chrome.bookmarks.update(this.menuItem_.id, {
+ 'title': this.menuItem_.title,
+ 'url': this.menuItem_.url,
+ });
+ this.$.editBookmark.close();
+ },
+
+ /** @private */
+ onCancelEditTap_: function() {
+ this.$.editBookmark.cancel();
+ },
+
+ /** @private */
closeDropdownMenu_: function() {
var menu = /** @type {!CrActionMenuElement} */ (
this.$.dropdown);

Powered by Google App Engine
This is Rietveld 408576698