summaryrefslogtreecommitdiff
path: root/frontend/gamma/js/Clipperz/PM/DataModel/EncryptedRemoteObject.js
Side-by-side diff
Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/DataModel/EncryptedRemoteObject.js') (more/less context) (ignore whitespace changes)
-rw-r--r--frontend/gamma/js/Clipperz/PM/DataModel/EncryptedRemoteObject.js26
1 files changed, 10 insertions, 16 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/EncryptedRemoteObject.js b/frontend/gamma/js/Clipperz/PM/DataModel/EncryptedRemoteObject.js
index cdeec8b..1aa7a52 100644
--- a/frontend/gamma/js/Clipperz/PM/DataModel/EncryptedRemoteObject.js
+++ b/frontend/gamma/js/Clipperz/PM/DataModel/EncryptedRemoteObject.js
@@ -1,38 +1,36 @@
/*
-Copyright 2008-2011 Clipperz Srl
+Copyright 2008-2013 Clipperz Srl
-This file is part of Clipperz Community Edition.
-Clipperz Community Edition is an online password manager.
+This file is part of Clipperz, the online password manager.
For further information about its features and functionalities please
refer to http://www.clipperz.com.
-* Clipperz Community Edition is free software: you can redistribute
- it and/or modify it under the terms of the GNU Affero General Public
- License as published by the Free Software Foundation, either version
- 3 of the License, or (at your option) any later version.
+* Clipperz is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
-* Clipperz Community Edition is distributed in the hope that it will
- be useful, but WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+* Clipperz is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
* You should have received a copy of the GNU Affero General Public
- License along with Clipperz Community Edition. If not, see
- <http://www.gnu.org/licenses/>.
+ License along with Clipperz. If not, see http://www.gnu.org/licenses/.
*/
try { if (typeof(Clipperz.KeyValueObjectStore) == 'undefined') { throw ""; }} catch (e) {
throw "Clipperz.PM.DataModel.EncryptedRemoteObject depends on Clipperz.KeyValueObjectStore!";
}
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
Clipperz.PM.DataModel.EncryptedRemoteObject = function(args) {
args = args || {};
this._name = args.name || null;
this._reference = args.reference || Clipperz.PM.Crypto.randomKey();
this._isBrandNew = ((args.reference == null) && (args.remoteData == null));
@@ -398,36 +396,32 @@ Clipperz.PM.DataModel.EncryptedRemoteObject.prototype = MochiKit.Base.update(nul
// deferredResult = MochiKit.Async.succeed(true);
deferredResult = this.hasPendingChangesWhenBrandNew();
} else if (this.hasInitiatedObjectDataStore()) {
deferredResult = new Clipperz.Async.Deferred("EncryptedRemoteObject.hasPendingChanges", {trace:false});
deferredResult.collectResults({
'decryptedData': [
MochiKit.Base.method(this, 'getDecryptedData'),
Clipperz.Base.serializeJSON
],
'objectData': [
MochiKit.Base.method(this, '_getObjectDataStore'),
MochiKit.Base.methodcaller('values'),
Clipperz.Base.serializeJSON
]
});
deferredResult.addCallback(function (someValues) {
-//if (someValues['decryptedData'] != someValues['objectData']) {
-// console.log("ORIGINAL DATA", '[[[' + someValues['decryptedData'] + ']]]');
-// console.log("CURRENT DATA", '>>>' + someValues['objectData'] + '<<<');
-//}
return (someValues['decryptedData'] != someValues['objectData']);
});
deferredResult.callback();
} else {
deferredResult = MochiKit.Async.succeed(false);
}
return deferredResult;
},
'hasPendingChangesWhenBrandNew': function () {
return MochiKit.Async.succeed(true);
},
//-------------------------------------------------------------------------