1
0
mirror of http://git.whoc.org.uk/git/password-manager.git synced 2025-12-19 12:57:02 +01:00

Added Export feature

This commit is contained in:
Dario Chiappetta
2015-04-20 18:18:22 +02:00
parent 7ad8e42d9c
commit b812ea4efb
8 changed files with 455 additions and 1 deletions

View File

@@ -63,6 +63,7 @@ Clipperz.PM.UI.MainController = function() {
this.registerForNotificationCenterEvents([
'doLogin', 'registerNewUser', 'showRegistrationForm', 'goBack',
'changePassphrase', 'deleteAccount',
'export',
'toggleSelectionPanel', 'toggleSettingsPanel',
'matchMediaQuery', 'unmatchMediaQuery',
'selectAllCards', 'selectRecentCards', 'search', 'tagSelected', 'selectUntaggedCards',
@@ -499,6 +500,9 @@ console.log("THE BROWSER IS OFFLINE");
deferredResult = new Clipperz.Async.Deferred('MainController.updateSelectedCard', {trace:false});
deferredResult.addMethod(this.user(), 'getRecord', someInfo['reference']);
// deferredResult.addMethod(this, function(d) {console.log(d); return d;});
deferredResult.addMethod(this, 'collectRecordInfo');
deferredResult.addMethod(this, 'setPageProperties', 'mainPage', 'selectedCard');
@@ -1234,6 +1238,12 @@ console.log("THE BROWSER IS OFFLINE");
this.updateSelectedCard({'reference':aRecordReference}, false, true);
},
//----------------------------------------------------------------------------
export_handler: function(exportType) {
return Clipperz.PM.UI.ExportController.exportJSON( this.recordsInfo(), exportType );
},
//----------------------------------------------------------------------------
changePassphrase_handler: function(newPassphrase) {