1
0
mirror of http://git.whoc.org.uk/git/password-manager.git synced 2025-10-25 17:47:34 +02:00

Added the option to "restore" and archived card

This commit is contained in:
Giulio Cesare Solaroli
2014-10-12 10:56:27 +02:00
parent c1041f75ca
commit a891853d32
3 changed files with 15 additions and 8 deletions

View File

@@ -250,8 +250,15 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.Encrypt
], {trace:false});
},
'archive': function () {
return this.addTag(Clipperz.PM.DataModel.Record.archivedTag);
'toggleArchive': function () {
return Clipperz.Async.callbacks("Record.toggleArchive", [
MochiKit.Base.method(this, 'isArchived'),
Clipperz.Async.deferredIf("Record is archived", [
MochiKit.Base.method(this, 'removeTag', Clipperz.PM.DataModel.Record.archivedTag)
], [
MochiKit.Base.method(this, 'addTag', Clipperz.PM.DataModel.Record.archivedTag)
]),
], {trace:false});
},
'isArchived': function () {