trash functionality for collections and searches (#3307)
When a collection or a saved search is deleted, it appears in trash among other trashed items. From there, it can be restored or permanently deleted. Items of trashed collections are not affected my the trashing/permanent deletion of a collection and need to be deleted separately like before. Subcollections of a trashed collection do not appear in the trash and are restored or permanently deleted with the top-most trashed parent.
This commit is contained in:
parent
f4d428cb16
commit
a532cfb475
15 changed files with 636 additions and 189 deletions
|
@ -661,6 +661,13 @@ describe("Zotero.Search", function() {
|
|||
await search.saveTx();
|
||||
assert.isFalse(search.deleted);
|
||||
});
|
||||
it("should permanently delete", async function () {
|
||||
var search = await createDataObject('search');
|
||||
assert.isFalse(search.deleted);
|
||||
await search.eraseTx();
|
||||
search = await Zotero.Searches.getAsync(search.id);
|
||||
assert.isFalse(search);
|
||||
});
|
||||
});
|
||||
|
||||
describe("#toJSON()", function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue