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

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

Issue 2617943002: [MD Bookmarks] Edit Bookmarks. (Closed)
Patch Set: test 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 59dda20d68f07da700f3bf358efb446b33aa2f1a..f1c3b6b639770686a39ac795432f9dc7d1dd7b80 100644
--- a/chrome/browser/resources/md_bookmarks/list.js
+++ b/chrome/browser/resources/md_bookmarks/list.js
@@ -32,6 +32,8 @@ Polymer({
/** @private */
onEditTap_: function() {
this.closeDropdownMenu_();
+ if (this.menuItem_.url)
+ this.$.editBookmark.showModal();
},
/** @private */
@@ -58,6 +60,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);
« no previous file with comments | « chrome/browser/resources/md_bookmarks/list.html ('k') | chrome/browser/resources/md_bookmarks/shared_style.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698