| 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 018b9c6d6114c0a618318ee5477fce73d9a6634b..5d16af2d6a3883135262bbe9193dcf7b73b23c02 100644
|
| --- a/chrome/browser/resources/md_bookmarks/list.js
|
| +++ b/chrome/browser/resources/md_bookmarks/list.js
|
| @@ -30,12 +30,10 @@ Polymer({
|
| menu.showAt(/** @type {!Element} */ (e.detail.target));
|
| },
|
|
|
| - // TODO(jiaxi): change these dummy click event handlers later.
|
| /** @private */
|
| onEditTap_: function() {
|
| this.closeDropdownMenu_();
|
| - if (this.menuItem_.url)
|
| - this.$.editBookmark.showModal();
|
| + this.$.editBookmark.showModal();
|
| },
|
|
|
| /** @private */
|
| @@ -63,10 +61,11 @@ Polymer({
|
|
|
| /** @private */
|
| onSaveEditTap_: function() {
|
| - chrome.bookmarks.update(this.menuItem_.id, {
|
| - 'title': this.menuItem_.title,
|
| - 'url': this.menuItem_.url,
|
| - });
|
| + 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();
|
| },
|
|
|
| @@ -83,6 +82,18 @@ Polymer({
|
| },
|
|
|
| /** @private */
|
| + getEditActionLabel_: function() {
|
| + var label = this.menuItem_.url ? 'menuEdit' : 'menuRename';
|
| + return loadTimeData.getString(label);
|
| + },
|
| +
|
| + /** @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);
|
|
|