Fixes to release developer preview of the /delta version
/delta needs an updated backend to support its payment options. /beta and /gamma have been updated to be compatible with the new backend.
This commit is contained in:
@@ -327,7 +327,7 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.User, Object, {
|
||||
var oneTimePasswords;
|
||||
|
||||
// this.setServerLockValue(someServerData['lock']);
|
||||
|
||||
console.log("USER.unpackServerData", someServerData);
|
||||
headerVersion = this.headerFormatVersion(someServerData['header']);
|
||||
|
||||
switch (headerVersion) {
|
||||
@@ -410,7 +410,9 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.User, Object, {
|
||||
'recordsIndex': recordsIndex,
|
||||
'preferences': preferences,
|
||||
'oneTimePasswords': oneTimePasswords
|
||||
}
|
||||
},
|
||||
// 'accountInfo': new Clipperz.PM.DataModel.User.AccountInfo(someServerData['accountInfo']),
|
||||
'offlineCopyNeeded': someServerData['offlineCopyNeeded']
|
||||
};
|
||||
|
||||
this._serverData = unpackedData;
|
||||
@@ -449,6 +451,11 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.User, Object, {
|
||||
return deferredResult;
|
||||
},
|
||||
|
||||
'resetAllData': function () {
|
||||
this.deleteAllCleanTextData();
|
||||
this._serverData = null;
|
||||
},
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
'connectionVersion': function() {
|
||||
@@ -492,6 +499,13 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.User, Object, {
|
||||
], {trace:false})
|
||||
},
|
||||
|
||||
'getCurrentAccountInfo': function () {
|
||||
return Clipperz.Async.callbacks("User.getHeaderIndex", [
|
||||
MochiKit.Base.method(this, 'getServerData'),
|
||||
MochiKit.Base.itemgetter('accountInfo')
|
||||
], {trace:false})
|
||||
},
|
||||
|
||||
//=========================================================================
|
||||
|
||||
'getRecords': function () {
|
||||
@@ -779,6 +793,20 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.User, Object, {
|
||||
return deferredResult;
|
||||
},
|
||||
|
||||
'deleteAccount': function() {
|
||||
var deferredResult;
|
||||
|
||||
//MochiKit.Logging.logDebug(">>> user.deleteAccountAction - " + this);
|
||||
this.deleteAllCleanTextData();
|
||||
deferredResult = new Clipperz.Async.Deferred("User.deleteAccount", {trace:false});
|
||||
deferredResult.addCallback(MochiKit.Base.method(this.connection(), 'message'), 'deleteUser');
|
||||
// deferredResult.addCallback(MochiKit.Base.method(this, 'resetAllLocalData'));
|
||||
deferredResult.callback();
|
||||
//MochiKit.Logging.logDebug("<<< user.deleteAccountAction - " + this);
|
||||
|
||||
return deferredResult;
|
||||
},
|
||||
|
||||
//=========================================================================
|
||||
__syntaxFix__: "syntax fix"
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user