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

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

Issue 2742583003: MD Bookmarks: Extract bookmark editing into a <bookmark-edit-dialog> element (Closed)
Patch Set: Rename event handlers Created 3 years, 9 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 296620b786780922963bb95d2308d5634465bba8..0edfcbbc4ccf63afd8e4dc4a61ca7153185ec045 100644
--- a/chrome/browser/resources/md_bookmarks/list.js
+++ b/chrome/browser/resources/md_bookmarks/list.js
@@ -55,7 +55,8 @@ Polymer({
/** @private */
onEditTap_: function() {
this.closeDropdownMenu_();
- this.$.editBookmark.showModal();
+ /** @type {BookmarksEditDialogElement} */ (this.$.editDialog.get())
+ .showEditDialog(this.menuItem_);
},
/** @private */
@@ -82,21 +83,6 @@ Polymer({
},
/** @private */
- onSaveEditTap_: function() {
- var edit = {'title': this.menuItem_.title};
- if (this.menuItem_.url)
- edit['url'] = this.menuItem_.url;
-
- chrome.bookmarks.update(this.menuItem_.id, edit);
- this.$.editBookmark.close();
- },
-
- /** @private */
- onCancelEditTap_: function() {
- this.$.editBookmark.cancel();
- },
-
- /** @private */
closeDropdownMenu_: function() {
var menu = /** @type {!CrActionMenuElement} */ (
this.$.dropdown);
@@ -110,12 +96,6 @@ Polymer({
},
/** @private */
- getEditorTitle_: function() {
- var title = this.menuItem_.url ? 'editBookmarkTitle' : 'renameFolderTitle';
- return loadTimeData.getString(title);
- },
-
- /** @private */
emptyListMessage_: function() {
var emptyListMessage = this.searchTerm_ ? 'noSearchResults' : 'emptyList';
return loadTimeData.getString(emptyListMessage);
« no previous file with comments | « chrome/browser/resources/md_bookmarks/list.html ('k') | chrome/browser/ui/webui/md_bookmarks/md_bookmarks_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698