зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
06a0f62389
Коммит
efa9bd2bd3
|
@ -1887,8 +1887,10 @@ PlacesRemoveFolderTransaction.prototype = {
|
||||||
},
|
},
|
||||||
|
|
||||||
doTransaction: function PRFT_doTransaction() {
|
doTransaction: function PRFT_doTransaction() {
|
||||||
var title = this.bookmarks.getItemTitle(this._id);
|
this._title = this.bookmarks.getItemTitle(this._id);
|
||||||
this.LOG("Remove Folder: " + title);
|
this._annotations = this.utils.getAnnotationsForItem(this._id);
|
||||||
|
|
||||||
|
this.LOG("Remove Folder: " + this._title);
|
||||||
|
|
||||||
this._saveFolderContents();
|
this._saveFolderContents();
|
||||||
|
|
||||||
|
@ -1903,8 +1905,11 @@ PlacesRemoveFolderTransaction.prototype = {
|
||||||
undoTransaction: function PRFT_undoTransaction() {
|
undoTransaction: function PRFT_undoTransaction() {
|
||||||
this._removeTxn.undoTransaction();
|
this._removeTxn.undoTransaction();
|
||||||
|
|
||||||
var title = this.bookmarks.getItemTitle(this._id);
|
this.LOG("UNRemove Folder: " + this._title);
|
||||||
this.LOG("UNRemove Folder: " + 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.
|
// Create children forwards to preserve parent-child relationships.
|
||||||
for (var i = 0; i < this._transactions.length; ++i)
|
for (var i = 0; i < this._transactions.length; ++i)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче