fix for bug #387952: Folder annotations should be kept intact for delete / undo transactions

patch=Christine Yen <cyen@mozilla.com>
r=sspitzer
This commit is contained in:
sspitzer%mozilla.org 2007-07-14 04:17:51 +00:00
Родитель 06a0f62389
Коммит efa9bd2bd3
1 изменённых файлов: 9 добавлений и 4 удалений

Просмотреть файл

@ -1887,8 +1887,10 @@ PlacesRemoveFolderTransaction.prototype = {
},
doTransaction: function PRFT_doTransaction() {
var title = this.bookmarks.getItemTitle(this._id);
this.LOG("Remove Folder: " + title);
this._title = this.bookmarks.getItemTitle(this._id);
this._annotations = this.utils.getAnnotationsForItem(this._id);
this.LOG("Remove Folder: " + this._title);
this._saveFolderContents();
@ -1903,8 +1905,11 @@ PlacesRemoveFolderTransaction.prototype = {
undoTransaction: function PRFT_undoTransaction() {
this._removeTxn.undoTransaction();
var title = this.bookmarks.getItemTitle(this._id);
this.LOG("UNRemove Folder: " + title);
this.LOG("UNRemove Folder: " + this._title);
// Repopulate annotations
if (this._annotations && this._annotations.length > 0)
this.utils.setAnnotationsForItem(this._id, this._annotations);
// Create children forwards to preserve parent-child relationships.
for (var i = 0; i < this._transactions.length; ++i)