summaryrefslogtreecommitdiff
path: root/frontend/gamma/js/Clipperz/PM/DataModel
Side-by-side diff
Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/DataModel') (more/less context) (ignore whitespace changes)
-rw-r--r--frontend/gamma/js/Clipperz/PM/DataModel/DirectLogin.js15
-rw-r--r--frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginBinding.js15
-rw-r--r--frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginFormValue.js15
-rw-r--r--frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginInput.js15
-rw-r--r--frontend/gamma/js/Clipperz/PM/DataModel/EncryptedRemoteObject.js15
-rw-r--r--frontend/gamma/js/Clipperz/PM/DataModel/OneTimePassword.js15
-rw-r--r--frontend/gamma/js/Clipperz/PM/DataModel/Record.Version.Field.js15
-rw-r--r--frontend/gamma/js/Clipperz/PM/DataModel/Record.Version.js15
-rw-r--r--frontend/gamma/js/Clipperz/PM/DataModel/Record.js15
-rw-r--r--frontend/gamma/js/Clipperz/PM/DataModel/User.Header.Legacy.js15
-rw-r--r--frontend/gamma/js/Clipperz/PM/DataModel/User.Header.OneTimePasswords.js15
-rw-r--r--frontend/gamma/js/Clipperz/PM/DataModel/User.Header.Preferences.js15
-rw-r--r--frontend/gamma/js/Clipperz/PM/DataModel/User.Header.RecordIndex.js15
-rw-r--r--frontend/gamma/js/Clipperz/PM/DataModel/User.js15
14 files changed, 84 insertions, 126 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/DirectLogin.js b/frontend/gamma/js/Clipperz/PM/DataModel/DirectLogin.js
index 1d38509..8f8696d 100644
--- a/frontend/gamma/js/Clipperz/PM/DataModel/DirectLogin.js
+++ b/frontend/gamma/js/Clipperz/PM/DataModel/DirectLogin.js
@@ -1,120 +1,117 @@
/*
Copyright 2008-2011 Clipperz Srl
-This file is part of Clipperz's Javascript Crypto Library.
-Javascript Crypto Library provides web developers with an extensive
-and efficient set of cryptographic functions. The library aims to
-obtain maximum execution speed while preserving modularity and
-reusability.
+This file is part of Clipperz Community Edition.
+Clipperz Community Edition is an online password manager.
For further information about its features and functionalities please
-refer to http://www.clipperz.com
+refer to http://www.clipperz.com.
-* Javascript Crypto Library is free software: you can redistribute
+* 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.
-* Javascript Crypto Library is distributed in the hope that it will
+* 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.
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 Javascript Crypto Library. If not, see
+ License along with Clipperz Community Edition. If not, see
<http://www.gnu.org/licenses/>.
*/
Clipperz.Base.module('Clipperz.PM.DataModel');
Clipperz.PM.DataModel.DirectLogin = function(args) {
args = args || {};
Clipperz.PM.DataModel.DirectLogin.superclass.constructor.apply(this, arguments);
this._reference = args.reference
|| Clipperz.PM.Crypto.randomKey();
this._record = args.record
|| Clipperz.Base.exception.raise('MandatoryParameter');
this._retrieveIndexDataFunction = args.retrieveIndexDataFunction
|| this.record().retrieveDirectLoginIndexDataFunction()
|| Clipperz.Base.exception.raise('MandatoryParameter');
this._setIndexDataFunction = args.setIndexDataFunction
|| this.record().setDirectLoginIndexDataFunction()
|| Clipperz.Base.exception.raise('MandatoryParameter');
this._removeIndexDataFunction = args.removeIndexDataFunction
|| this.record().removeDirectLoginIndexDataFunction()
|| Clipperz.Base.exception.raise('MandatoryParameter');
this._inputs = null;
this._bindings = null;
this._formValues = null;
// this._inputsDeferredLock = new MochiKit.Async.DeferredLock();
// this._bindingsDeferredLock = new MochiKit.Async.DeferredLock();
// this._formValuesDeferredLock = new MochiKit.Async.DeferredLock();
this._transientState = null;
this._isBrandNew = MochiKit.Base.isUndefinedOrNull(args.reference);
this.record().addDirectLogin(this);
return this;
}
Clipperz.Base.extend(Clipperz.PM.DataModel.DirectLogin, Object, {
'toString': function() {
return "DirectLogin (" + this.reference() + ")";
},
//=========================================================================
'reference': function () {
return this._reference;
},
//-------------------------------------------------------------------------
'record': function () {
return this._record;
},
//=========================================================================
'isBrandNew': function () {
return this._isBrandNew;
},
//=========================================================================
'removeIndexDataFunction': function () {
return this._removeIndexDataFunction;
},
'remove': function () {
return Clipperz.Async.callbacks("DirectLogin.remove", [
MochiKit.Base.partial(this.removeIndexDataFunction(), this.reference()),
MochiKit.Base.method(this.record(), 'removeDirectLogin', this)
], {trace:false});
},
//=========================================================================
/*
'inputsDeferredLock': function () {
return this._inputsDeferredLock;
},
'bindingsDeferredLock': function () {
return this._bindingsDeferredLock;
},
'formValuesDeferredLock': function () {
return this._formValuesDeferredLock;
},
*/
//=========================================================================
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginBinding.js b/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginBinding.js
index fd55c63..4377853 100644
--- a/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginBinding.js
+++ b/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginBinding.js
@@ -1,120 +1,117 @@
/*
Copyright 2008-2011 Clipperz Srl
-This file is part of Clipperz's Javascript Crypto Library.
-Javascript Crypto Library provides web developers with an extensive
-and efficient set of cryptographic functions. The library aims to
-obtain maximum execution speed while preserving modularity and
-reusability.
+This file is part of Clipperz Community Edition.
+Clipperz Community Edition is an online password manager.
For further information about its features and functionalities please
-refer to http://www.clipperz.com
+refer to http://www.clipperz.com.
-* Javascript Crypto Library is free software: you can redistribute
+* 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.
-* Javascript Crypto Library is distributed in the hope that it will
+* 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.
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 Javascript Crypto Library. If not, see
+ License along with Clipperz Community Edition. If not, see
<http://www.gnu.org/licenses/>.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
//#############################################################################
Clipperz.PM.DataModel.DirectLoginBinding = function(aDirectLogin, args) {
args = args || {};
this._directLogin = aDirectLogin|| Clipperz.Base.exception.raise('MandatoryParameter');
this._key = args.key || Clipperz.Base.exception.raise('MandatoryParameter');
this._fieldKey = args.field || /* this.directLogin().fieldWithName(args.fieldName).reference() || */ null;
return this;
}
Clipperz.PM.DataModel.DirectLoginBinding.prototype = MochiKit.Base.update(null, {
'toString': function() {
return "DirectLoginBinding (" + this.key() + ", " + this.fieldKey() + ")";
},
//-------------------------------------------------------------------------
'directLogin': function () {
return this._directLogin;
},
//-------------------------------------------------------------------------
'key': function() {
return this._key;
},
//-------------------------------------------------------------------------
'fieldKey': function() {
return this._fieldKey;
},
'setFieldKey': function(aValue) {
this._fieldKey = aValue;
return this.directLogin().setValue('bindingData' + '.' + this.key(), aValue);
},
// 'fieldName': function() {
// return this._fieldName;
// },
//-------------------------------------------------------------------------
'field': function() {
var deferredResult;
if (this.fieldKey() != null) {
deferredResult = Clipperz.Async.callbacks("DirectLoginBinding.field [1]", [
MochiKit.Base.method(this.directLogin().record(), 'fields'),
MochiKit.Base.itemgetter(this.fieldKey())
], {trace:false});
// } else if (this.fieldName() != null) {
// WTF = TODO;
// result = this.directLogin().record().fieldWithName(this.fieldName());
//
// this.setFieldKey(result.key());
} else {
deferredResult = MochiKit.Async.succeed(null);
}
return deferredResult;
},
'setField': function (aField) {
this.setFieldKey(aField.reference());
},
//-------------------------------------------------------------------------
/*
'fieldValue': function () {
return Clipperz.Async.callbacks("DirectLoginBinding.fieldValue", [
MochiKit.Base.method('field'),
MochiKit.Base.methodcaller('value')
], {trace:false});
},
*/
//-------------------------------------------------------------------------
'serializedData': function() {
return this.fieldKey();
},
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginFormValue.js b/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginFormValue.js
index 939ab4b..a461197 100644
--- a/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginFormValue.js
+++ b/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginFormValue.js
@@ -1,107 +1,104 @@
/*
Copyright 2008-2011 Clipperz Srl
-This file is part of Clipperz's Javascript Crypto Library.
-Javascript Crypto Library provides web developers with an extensive
-and efficient set of cryptographic functions. The library aims to
-obtain maximum execution speed while preserving modularity and
-reusability.
+This file is part of Clipperz Community Edition.
+Clipperz Community Edition is an online password manager.
For further information about its features and functionalities please
-refer to http://www.clipperz.com
+refer to http://www.clipperz.com.
-* Javascript Crypto Library is free software: you can redistribute
+* 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.
-* Javascript Crypto Library is distributed in the hope that it will
+* 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.
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 Javascript Crypto Library. If not, see
+ License along with Clipperz Community Edition. If not, see
<http://www.gnu.org/licenses/>.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
//#############################################################################
Clipperz.PM.DataModel.DirectLoginFormValue = function(aDirectLogin, args) {
args = args || {};
this._directLogin = aDirectLogin|| Clipperz.Base.exception.raise('MandatoryParameter');
this._key = args.key || Clipperz.Base.exception.raise('MandatoryParameter');
this._fieldOptions = args.fieldOptions || Clipperz.Base.exception.raise('MandatoryParameter');
this._value = args.value || null;
return this;
}
Clipperz.PM.DataModel.DirectLoginFormValue.prototype = MochiKit.Base.update(null, {
'toString': function() {
return "DirectLoginFormValue (" + this.key() + ", " + this.value() + ")";
},
//-------------------------------------------------------------------------
'directLogin': function () {
return this._directLogin;
},
//-------------------------------------------------------------------------
'key': function() {
return this._key;
},
//-------------------------------------------------------------------------
'fieldOptions': function() {
return this._fieldOptions;
},
//-------------------------------------------------------------------------
'type': function () {
return this.fieldOptions()['type'];
},
//-------------------------------------------------------------------------
'value': function() {
var result;
result = this._value;
// if ((result == null) && (this.type() == 'checkbox')) {
// result = false;
// };
return result;
},
'setValue': function (aValue) {
//console.log("DirectLoginFormValue.setValue", aValue);
this._value = aValue;
return this.directLogin().setValue('formValues' + '.' + this.key(), aValue);
},
//-------------------------------------------------------------------------
/*
'serializedData': function() {
return this.value();
},
*/
//-------------------------------------------------------------------------
__syntaxFix__: "syntax fix"
});
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginInput.js b/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginInput.js
index 673d5ee..8188389 100644
--- a/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginInput.js
+++ b/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginInput.js
@@ -1,120 +1,117 @@
/*
Copyright 2008-2011 Clipperz Srl
-This file is part of Clipperz's Javascript Crypto Library.
-Javascript Crypto Library provides web developers with an extensive
-and efficient set of cryptographic functions. The library aims to
-obtain maximum execution speed while preserving modularity and
-reusability.
+This file is part of Clipperz Community Edition.
+Clipperz Community Edition is an online password manager.
For further information about its features and functionalities please
-refer to http://www.clipperz.com
+refer to http://www.clipperz.com.
-* Javascript Crypto Library is free software: you can redistribute
+* 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.
-* Javascript Crypto Library is distributed in the hope that it will
+* 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.
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 Javascript Crypto Library. If not, see
+ License along with Clipperz Community Edition. If not, see
<http://www.gnu.org/licenses/>.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
//#############################################################################
Clipperz.PM.DataModel.DirectLoginInput = function(args) {
this._args = args;
return this;
}
Clipperz.PM.DataModel.DirectLoginInput.prototype = MochiKit.Base.update(null, {
'args': function() {
return this._args;
},
//-------------------------------------------------------------------------
'name': function() {
return this.args()['name'];
},
//-------------------------------------------------------------------------
'type': function() {
var result;
result = this.args()['type'];
if (result != null) {
result = result.toLowerCase();
}
return result;
},
//-------------------------------------------------------------------------
'options': function() {
return this.args()['options'];
},
//-------------------------------------------------------------------------
'value': function() {
return this.args()['value'];
},
//-------------------------------------------------------------------------
/*
'formConfiguration': function(someFormValues, someBindings, someFields) {
var result;
//console.log("### DirectLoginInput.formConfiguration", someFields);
if (this.shouldSetValue()) {
switch (this.type()) {
case 'select':
var currentValue;
var options;
// currentValue = this.directLogin()._configuration['formValues'][this.name()];
currentValue = someFormValues[this.name()];
options = this.args()['options'];
result = MochiKit.DOM.SELECT({name:this.name()},
MochiKit.Base.map(function(anOption) {
var options;
options = {value:anOption['value']};
if (currentValue == anOption['value']) {
options.selected = true;
}
return MochiKit.DOM.OPTION(options, anOption['label'])
}, options)
)
break;
case 'checkbox':
var options;
options = {type:'checkbox', name: this.name()};
// if (this.directLogin()._configuration['formValues'][this.name()] == true) {
if (someFormValues[this.name()] == true) {
options['checked'] = true;
};
result = MochiKit.DOM.INPUT(options, null);
break;
case 'radio':
var currentName;
var currentValue;
var options;
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/EncryptedRemoteObject.js b/frontend/gamma/js/Clipperz/PM/DataModel/EncryptedRemoteObject.js
index 3408b08..cdeec8b 100644
--- a/frontend/gamma/js/Clipperz/PM/DataModel/EncryptedRemoteObject.js
+++ b/frontend/gamma/js/Clipperz/PM/DataModel/EncryptedRemoteObject.js
@@ -1,120 +1,117 @@
/*
Copyright 2008-2011 Clipperz Srl
-This file is part of Clipperz's Javascript Crypto Library.
-Javascript Crypto Library provides web developers with an extensive
-and efficient set of cryptographic functions. The library aims to
-obtain maximum execution speed while preserving modularity and
-reusability.
+This file is part of Clipperz Community Edition.
+Clipperz Community Edition is an online password manager.
For further information about its features and functionalities please
-refer to http://www.clipperz.com
+refer to http://www.clipperz.com.
-* Javascript Crypto Library is free software: you can redistribute
+* 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.
-* Javascript Crypto Library is distributed in the hope that it will
+* 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.
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 Javascript Crypto Library. If not, see
+ License along with Clipperz Community Edition. 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));
if ((this._isBrandNew == false) && (args['retrieveKeyFunction'] == null)) {
Clipperz.Base.exception.raise('MandatoryParameter');
} else {
this._retrieveKeyFunction = args['retrieveKeyFunction'];
}
this._retrieveRemoteDataFunction = args.retrieveRemoteDataFunction || null;
this._remoteData = args.remoteData || null;
// this._remoteData = args.remoteData ? Clipperz.Base.deepClone(args.remoteData) : null;
if ((!this._isBrandNew) && ((this._retrieveRemoteDataFunction == null) && (this._remoteData == null))) {
Clipperz.Base.exception.raise('MandatoryParameter');
}
this._encryptedDataKeypath = args.encryptedDataKeypath || 'data'; //Clipperz.Base.exception.raise('MandatoryParameter');
this._encryptedVersionKeypath = args.encryptedVersionKeypath || 'version'; //Clipperz.Base.exception.raise('MandatoryParameter');
this._transientState = null;
this._deferredLocks = {};
if (this._isBrandNew == true) {
this._objectDataStore = new Clipperz.KeyValueObjectStore(/*{'name':'EncryptedRemoteObject.objectDataStore [1]'}*/);
} else {
this._objectDataStore = null;
}
return this;
}
//
// Basic data workflow
// =======================
//
// getRemoteData
// unpackRemoteData
// getDecryptData [encryptedDataKeypath, encryptedVersionKeypath]
// unpackData
//
//
// ?? packData
// ?? encryptDataWithKey
// ?? packRemoteData [encryptedDataKeypath (?), encryptedVersionKeypath (?)]
//
Clipperz.PM.DataModel.EncryptedRemoteObject.prototype = MochiKit.Base.update(null, {
'toString': function () {
return "Clipperz.PM.DataModel.EncryptedRemoteObject" + (this.name() != null ? " - " + this.name() : "");
},
//-------------------------------------------------------------------------
'name': function () {
return this._name;
},
//-------------------------------------------------------------------------
'reference': function () {
return this._reference;
},
'setReference': function (aValue) {
this._reference = aValue;
return this._reference;
},
//-------------------------------------------------------------------------
'transientState': function () {
if (this._transientState == null) {
this._transientState = new Clipperz.KeyValueObjectStore(/*{'name':'EncryptedRemoteObject.transientState [2]'}*/);
}
return this._transientState;
},
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/OneTimePassword.js b/frontend/gamma/js/Clipperz/PM/DataModel/OneTimePassword.js
index 9f1c197..834e21b 100644
--- a/frontend/gamma/js/Clipperz/PM/DataModel/OneTimePassword.js
+++ b/frontend/gamma/js/Clipperz/PM/DataModel/OneTimePassword.js
@@ -1,120 +1,117 @@
/*
Copyright 2008-2011 Clipperz Srl
-This file is part of Clipperz's Javascript Crypto Library.
-Javascript Crypto Library provides web developers with an extensive
-and efficient set of cryptographic functions. The library aims to
-obtain maximum execution speed while preserving modularity and
-reusability.
+This file is part of Clipperz Community Edition.
+Clipperz Community Edition is an online password manager.
For further information about its features and functionalities please
-refer to http://www.clipperz.com
+refer to http://www.clipperz.com.
-* Javascript Crypto Library is free software: you can redistribute
+* 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.
-* Javascript Crypto Library is distributed in the hope that it will
+* 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.
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 Javascript Crypto Library. If not, see
+ License along with Clipperz Community Edition. If not, see
<http://www.gnu.org/licenses/>.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
//#############################################################################
Clipperz.PM.DataModel.OneTimePassword = function(args) {
args = args || {};
// this._user = args['user'];
this._reference = args['reference'] || Clipperz.PM.Crypto.randomKey();
this._password = args['password'];
this._passwordValue = Clipperz.PM.DataModel.OneTimePassword.normalizedOneTimePassword(args['password']);
this._creationDate = args['created'] ? Clipperz.PM.Date.parseDateWithUTCFormat(args['created']) : new Date();
this._usageDate = args['used'] ? Clipperz.PM.Date.parseDateWithUTCFormat(args['used']) : null;
this._status = args['status'] || 'ACTIVE'; // 'REQUESTED', 'USED', 'DISABLED'
this._connectionInfo= null;
this._key = null;
this._keyChecksum = null;
return this;
}
Clipperz.PM.DataModel.OneTimePassword.prototype = MochiKit.Base.update(null, {
'toString': function() {
return "Clipperz.PM.DataModel.OneTimePassword";
},
/*
//-------------------------------------------------------------------------
'user': function() {
return this._user;
},
//-------------------------------------------------------------------------
'password': function() {
return this._password;
},
//-------------------------------------------------------------------------
'passwordValue': function() {
return this._passwordValue;
},
//-------------------------------------------------------------------------
'creationDate': function() {
return this._creationDate;
},
//-------------------------------------------------------------------------
'reference': function() {
return this._reference;
},
//-------------------------------------------------------------------------
'key': function() {
if (this._key == null) {
this._key = Clipperz.PM.DataModel.OneTimePassword.computeKeyWithUsernameAndPassword(this.user().username(), this.passwordValue());
}
return this._key;
},
//-------------------------------------------------------------------------
'keyChecksum': function() {
if (this._keyChecksum == null) {
this._keyChecksum = Clipperz.PM.DataModel.OneTimePassword.computeKeyChecksumWithUsernameAndPassword(this.user().username(), this.passwordValue());
}
return this._keyChecksum;
},
*/
//-------------------------------------------------------------------------
'status': function() {
return this._status;
},
'setStatus': function(aValue) {
this._status = aValue;
},
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/Record.Version.Field.js b/frontend/gamma/js/Clipperz/PM/DataModel/Record.Version.Field.js
index 147aa7d..f51bbc2 100644
--- a/frontend/gamma/js/Clipperz/PM/DataModel/Record.Version.Field.js
+++ b/frontend/gamma/js/Clipperz/PM/DataModel/Record.Version.Field.js
@@ -1,120 +1,117 @@
/*
Copyright 2008-2011 Clipperz Srl
-This file is part of Clipperz's Javascript Crypto Library.
-Javascript Crypto Library provides web developers with an extensive
-and efficient set of cryptographic functions. The library aims to
-obtain maximum execution speed while preserving modularity and
-reusability.
+This file is part of Clipperz Community Edition.
+Clipperz Community Edition is an online password manager.
For further information about its features and functionalities please
-refer to http://www.clipperz.com
+refer to http://www.clipperz.com.
-* Javascript Crypto Library is free software: you can redistribute
+* 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.
-* Javascript Crypto Library is distributed in the hope that it will
+* 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.
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 Javascript Crypto Library. If not, see
+ License along with Clipperz Community Edition. If not, see
<http://www.gnu.org/licenses/>.
*/
try { if (typeof(Clipperz.PM.DataModel.Record.Version) == 'undefined') { throw ""; }} catch (e) {
throw "Clipperz.PM.DataModel.Record.Version.Field depends on Clipperz.PM.DataModel.Record.Version!";
}
Clipperz.PM.DataModel.Record.Version.Field = function(args) {
Clipperz.PM.DataModel.Record.Version.Field.superclass.constructor.apply(this, arguments);
this._recordVersion = args.recordVersion || Clipperz.Base.exception.raise('MandatoryParameter');
this._reference = args.reference || Clipperz.PM.Crypto.randomKey();
return this;
}
Clipperz.Base.extend(Clipperz.PM.DataModel.Record.Version.Field, Object, {
'toString': function() {
return "Record.Version.Field (" + this.reference() + ")";
},
//-------------------------------------------------------------------------
'recordVersion': function () {
return this._recordVersion;
},
//-------------------------------------------------------------------------
'reference': function () {
return this._reference;
},
//-------------------------------------------------------------------------
'getItem': function (aKey) {
return Clipperz.Async.callbacks("Clipperz.PM.DataModel.Record.Version.Field.getItem", [
MochiKit.Base.method(this, 'recordVersion'),
MochiKit.Base.methodcaller('getValue', 'fields' + '.' + this.reference() + '.' + aKey)
], {trace:false});
},
'setItem': function (aKey, aValue) {
return Clipperz.Async.callbacks("Clipperz.PM.DataModel.Record.Version.Field.getItem", [
MochiKit.Base.method(this, 'recordVersion'),
MochiKit.Base.methodcaller('setValue', 'fields' + '.' + this.reference() + '.' + aKey, aValue)
], {trace:false});
},
//-------------------------------------------------------------------------
'label': function () {
return this.getItem('label');
},
'setLabel': function (aValue) {
return this.setItem('label', aValue);
},
//-------------------------------------------------------------------------
'value': function () {
return this.getItem('value');
},
'setValue': function (aValue) {
return this.setItem('value', aValue);
},
//-------------------------------------------------------------------------
'actionType': function () {
return Clipperz.Async.callbacks("Clipperz.PM.DataModel.Record.Version.Field.actionType", [
Clipperz.Async.collectResults("Clipperz.PM.DataModel.Record.Version.Field.actionType [collect results]", {
'isHidden': MochiKit.Base.method(this, 'isHidden'),
'value': MochiKit.Base.method(this, 'value')
}, {trace:false}),
function (someValues) {
var result; // 'NONE', 'URL', 'EMAIL', 'PASSWORD'
result = 'NONE';
if (someValues['isHidden']) {
result = 'PASSWORD';
} else if (Clipperz.Base.isUrl(someValues['value'])) {
result = 'URL'
} else if (Clipperz.Base.isEmail(someValues['value'])) {
result = 'EMAIL'
};
return result;
}
], {trace:false});
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/Record.Version.js b/frontend/gamma/js/Clipperz/PM/DataModel/Record.Version.js
index 6e50f8e..dd35fc9 100644
--- a/frontend/gamma/js/Clipperz/PM/DataModel/Record.Version.js
+++ b/frontend/gamma/js/Clipperz/PM/DataModel/Record.Version.js
@@ -1,120 +1,117 @@
/*
Copyright 2008-2011 Clipperz Srl
-This file is part of Clipperz's Javascript Crypto Library.
-Javascript Crypto Library provides web developers with an extensive
-and efficient set of cryptographic functions. The library aims to
-obtain maximum execution speed while preserving modularity and
-reusability.
+This file is part of Clipperz Community Edition.
+Clipperz Community Edition is an online password manager.
For further information about its features and functionalities please
-refer to http://www.clipperz.com
+refer to http://www.clipperz.com.
-* Javascript Crypto Library is free software: you can redistribute
+* 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.
-* Javascript Crypto Library is distributed in the hope that it will
+* 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.
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 Javascript Crypto Library. If not, see
+ License along with Clipperz Community Edition. If not, see
<http://www.gnu.org/licenses/>.
*/
try { if (typeof(Clipperz.PM.DataModel.Record) == 'undefined') { throw ""; }} catch (e) {
throw "Clipperz.PM.DataModel.Record.Version depends on Clipperz.PM.DataModel.Record!";
}
Clipperz.PM.DataModel.Record.Version = function(args) {
//console.log(">>> Record.new");
Clipperz.PM.DataModel.Record.Version.superclass.constructor.apply(this, arguments);
this._getVersionFunction = args.getVersion || Clipperz.Base.exception.raise('MandatoryParameter');
this._fields = null;
return this;
}
Clipperz.Base.extend(Clipperz.PM.DataModel.Record.Version, Clipperz.PM.DataModel.EncryptedRemoteObject, {
'toString': function() {
return "Record.Version (" + this.reference() + ")";
},
//-------------------------------------------------------------------------
'reference': function () {
return this._reference;
},
//-------------------------------------------------------------------------
/*
'hasPendingChanges': function () {
var deferredResult;
deferredResult = new Clipperz.Async.Deferred("Clipperz.PM.DataModel.Record.Version.hasPendingChanges", {trace:false});
deferredResult.addCallback(MochiKit.Base.bind(Clipperz.PM.DataModel.Record.Version.superclass.hasPendingChanges, this));
deferredResult.callback();
return deferredResult;
},
*/
//-------------------------------------------------------------------------
'hasPendingChangesWhenBrandNew': function () {
var deferredResult;
deferredResult = new Clipperz.Async.Deferred("Clipperz.PM.DataModel.Record.Version.hasPendingChangesWhenBrandNew", {trace:false});
deferredResult.addMethod(this, 'fields');
deferredResult.addCallback(MochiKit.Base.values);
deferredResult.addCallback(MochiKit.Base.map, MochiKit.Base.methodcaller('isEmpty'))
deferredResult.addCallback(Clipperz.Async.collectAll);
deferredResult.addCallback(function(someValues) {
return MochiKit.Iter.every(someValues, MochiKit.Base.operator.identity);
});
deferredResult.addCallback(MochiKit.Base.operator.lognot)
deferredResult.callback();
return deferredResult;
},
//=========================================================================
'commitTransientState': function () {
var deferredResult;
deferredResult = new Clipperz.Async.Deferred("Clipperz.PM.DataModel.Record.Version.commitTransientState", {trace:false});
deferredResult.addCallback(MochiKit.Base.bind(Clipperz.PM.DataModel.Record.Version.superclass.commitTransientState, this));
deferredResult.callback();
return deferredResult;
},
//=========================================================================
'unpackData': function (someData) { // ++
var result;
//console.log("Record.Version - UNPACK DATA", this, someData);
result = someData;
if ((someData['fields'] != null) && (someData['fields'] instanceof Array)) {
var fields;
var i,c;
fields = someData['fields'];
delete someData['fields'];
someData['fields'] = {};
c = fields.length;
for (i=0; i<c; i++) {
someData['fields'][i] = fields[i];
}
}
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/Record.js b/frontend/gamma/js/Clipperz/PM/DataModel/Record.js
index 85dd06b..b816f80 100644
--- a/frontend/gamma/js/Clipperz/PM/DataModel/Record.js
+++ b/frontend/gamma/js/Clipperz/PM/DataModel/Record.js
@@ -1,120 +1,117 @@
/*
Copyright 2008-2011 Clipperz Srl
-This file is part of Clipperz's Javascript Crypto Library.
-Javascript Crypto Library provides web developers with an extensive
-and efficient set of cryptographic functions. The library aims to
-obtain maximum execution speed while preserving modularity and
-reusability.
+This file is part of Clipperz Community Edition.
+Clipperz Community Edition is an online password manager.
For further information about its features and functionalities please
-refer to http://www.clipperz.com
+refer to http://www.clipperz.com.
-* Javascript Crypto Library is free software: you can redistribute
+* 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.
-* Javascript Crypto Library is distributed in the hope that it will
+* 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.
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 Javascript Crypto Library. If not, see
+ License along with Clipperz Community Edition. If not, see
<http://www.gnu.org/licenses/>.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
Clipperz.PM.DataModel.Record = function(args) {
//console.log(">>> new Clipperz.PM.DataModel.Record", args);
Clipperz.PM.DataModel.Record.superclass.constructor.apply(this, arguments);
this._updateDate = (args.updateDate ? Clipperz.PM.Date.parse(args.updateDate) : Clipperz.Base.exception.raise('MandatoryParameter'));
this._retrieveIndexDataFunction = args.retrieveIndexDataFunction || Clipperz.Base.exception.raise('MandatoryParameter');
this._updateIndexDataFunction = args.updateIndexDataFunction || Clipperz.Base.exception.raise('MandatoryParameter');
this._retrieveDirectLoginIndexDataFunction = args.retrieveDirectLoginIndexDataFunction || null;
this._setDirectLoginIndexDataFunction = args.setDirectLoginIndexDataFunction || null;
this._removeDirectLoginIndexDataFunction = args.removeDirectLoginIndexDataFunction || null;
this._createNewDirectLoginFunction = args.createNewDirectLoginFunction || null;
this._directLogins = {};
this._versions = {};
this._currentRecordVersion = null;
if (this.isBrandNew()) {
var newVersion;
this.setNotes('');
newVersion = new Clipperz.PM.DataModel.Record.Version({
'retrieveKeyFunction': MochiKit.Base.method(this, 'getVersionKey'),
'getVersion': MochiKit.Base.method(this, 'getVersion')
});
this._versions[newVersion.reference()] = newVersion;
this._currentVersionReference = newVersion.reference();
// this.setLabel('');
}
//console.log("<<< new Clipperz.PM.DataModel.Record", args);
return this;
}
Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.EncryptedRemoteObject, {
'toString': function() {
return "Record (" + this.reference() + ")";
},
//-------------------------------------------------------------------------
'reference': function () {
return this._reference;
},
//=========================================================================
'getIndexData': function () {
return this._retrieveIndexDataFunction(this.reference());
},
//.........................................................................
'getIndexDataForKey': function (aKey) {
return Clipperz.Async.callbacks("Record.getIndexDataForKey", [
MochiKit.Base.method(this, 'getIndexData'),
MochiKit.Base.itemgetter(aKey)
], {trace:false});
},
//-------------------------------------------------------------------------
'setIndexDataForKey': function (aKey, aValue) {
// return this._updateIndexDataFunction(this.reference(), aKey, aValue);
var deferredResult;
deferredResult = new Clipperz.Async.Deferred("Record.setIndexDataForKey", {trace:false});
deferredResult.addMethod(this, 'getIndexDataForKey', aKey);
deferredResult.addCallback(MochiKit.Base.bind(function (aCurrentValue) {
var result;
var originalValue;
originalValue = this.transientState().getValue('originalValues.indexData.' + aKey);
if (originalValue == null) {
originalValue = this.transientState().setValue('originalValues.indexData.' + aKey, aCurrentValue);
}
if (aCurrentValue != aValue) {
if (originalValue != aValue) {
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.Legacy.js b/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.Legacy.js
index e675525..d6202ff 100644
--- a/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.Legacy.js
+++ b/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.Legacy.js
@@ -1,120 +1,117 @@
/*
Copyright 2008-2011 Clipperz Srl
-This file is part of Clipperz's Javascript Crypto Library.
-Javascript Crypto Library provides web developers with an extensive
-and efficient set of cryptographic functions. The library aims to
-obtain maximum execution speed while preserving modularity and
-reusability.
+This file is part of Clipperz Community Edition.
+Clipperz Community Edition is an online password manager.
For further information about its features and functionalities please
-refer to http://www.clipperz.com
+refer to http://www.clipperz.com.
-* Javascript Crypto Library is free software: you can redistribute
+* 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.
-* Javascript Crypto Library is distributed in the hope that it will
+* 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.
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 Javascript Crypto Library. If not, see
+ License along with Clipperz Community Edition. If not, see
<http://www.gnu.org/licenses/>.
*/
try { if (typeof(Clipperz.PM.DataModel.User) == 'undefined') { throw ""; }} catch (e) {
throw "Clipperz.PM.DataModel.User.Header.Legacy depends on Clipperz.PM.DataModel.User!";
}
if (typeof(Clipperz.PM.DataModel.User.Header) == 'undefined') { Clipperz.PM.DataModel.User.Header = {}; }
Clipperz.PM.DataModel.User.Header.Legacy = function(args) {
// args = args || {};
Clipperz.PM.DataModel.User.Header.Legacy.superclass.constructor.apply(this, arguments);
this._retrieveRecordDetailFunction = args.retrieveRecordDetailFunction || Clipperz.Base.exception.raise('MandatoryParameter');
this._records = null;
// this._directLogins = null;
return this;
}
Clipperz.Base.extend(Clipperz.PM.DataModel.User.Header.Legacy, Clipperz.PM.DataModel.EncryptedRemoteObject, {
'toString': function() {
return "Clipperz.PM.DataModel.User.Header.Legacy";
},
//-------------------------------------------------------------------------
'retrieveRecordDetailFunction': function () {
return this._retrieveRecordDetailFunction;
},
//-------------------------------------------------------------------------
'getRecordKey': function (aRecordReference) {
var deferredResult;
deferredResult = new Clipperz.Async.Deferred("User.Header.Legacy.getRecordKey", {trace:false});
deferredResult.addMethod(this, 'getRecordIndexData');
deferredResult.addCallback(MochiKit.Base.itemgetter('key'))
deferredResult.callback();
return deferredResult;
},
//=========================================================================
'getRecordIndexData': function (aRecordReference) {
return this.getValue('records.' + aRecordReference);
},
'updateRecordIndexData': function (aRecordReference, aKey, aValue) {
return this.setValue('records.' + aRecordReference + "." + aKey, aValue);
},
//-------------------------------------------------------------------------
'getDirectLoginIndexData': function (aDirectLoginReference) {
return this.getValue('directLogins.' + aDirectLoginReference);
},
'setDirectLoginIndexData': function (aDirectLoginReference, aKey, aValue) {
return this.setValue('directLogins.' + aDirectLoginReference + '.' + aKey, aValue);
},
'removeDirectLoginIndexData': function (aDirectLoginReference) {
return this.removeValue('directLogins.' + aDirectLoginReference);
},
//=========================================================================
'records': function () {
var deferredResult;
var deferredLock;
deferredLock = this.getDeferredLockForKey('records');
deferredResult = new Clipperz.Async.Deferred("User.Header.Legacy.records", {trace:false});
deferredResult.acquireLock(deferredLock);
deferredResult.addCallback(MochiKit.Base.bind(function () {
var innerDeferredResult;
if (this._records == null) {
innerDeferredResult = new Clipperz.Async.Deferred("User.Header.Legacy.records <inner deferred>", {trace:false});
innerDeferredResult.collectResults({
'header': [
// MochiKit.Base.method(this, 'getObjectDataStore'),
// MochiKit.Base.methodcaller('values')
MochiKit.Base.method(this, 'values')
],
'recordsStats': [
MochiKit.Base.method(this, 'getRemoteData'),
MochiKit.Base.itemgetter('recordsStats')
]
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.OneTimePasswords.js b/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.OneTimePasswords.js
index 0ee8599..3528db6 100644
--- a/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.OneTimePasswords.js
+++ b/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.OneTimePasswords.js
@@ -1,120 +1,117 @@
/*
Copyright 2008-2011 Clipperz Srl
-This file is part of Clipperz's Javascript Crypto Library.
-Javascript Crypto Library provides web developers with an extensive
-and efficient set of cryptographic functions. The library aims to
-obtain maximum execution speed while preserving modularity and
-reusability.
+This file is part of Clipperz Community Edition.
+Clipperz Community Edition is an online password manager.
For further information about its features and functionalities please
-refer to http://www.clipperz.com
+refer to http://www.clipperz.com.
-* Javascript Crypto Library is free software: you can redistribute
+* 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.
-* Javascript Crypto Library is distributed in the hope that it will
+* 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.
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 Javascript Crypto Library. If not, see
+ License along with Clipperz Community Edition. If not, see
<http://www.gnu.org/licenses/>.
*/
try { if (typeof(Clipperz.PM.DataModel.User) == 'undefined') { throw ""; }} catch (e) {
throw "Clipperz.PM.DataModel.User.Header.OneTimePasswords depends on Clipperz.PM.DataModel.User!";
}
if (typeof(Clipperz.PM.DataModel.User.Header) == 'undefined') { Clipperz.PM.DataModel.User.Header = {}; }
//-----------------------------------------------------------------------------
Clipperz.PM.DataModel.User.Header.OneTimePasswords = function(args) {
Clipperz.PM.DataModel.User.Header.OneTimePasswords.superclass.constructor.apply(this, arguments);
this._oneTimePasswords = null;
return this;
}
//-----------------------------------------------------------------------------
Clipperz.Base.extend(Clipperz.PM.DataModel.User.Header.OneTimePasswords, Clipperz.PM.DataModel.EncryptedRemoteObject, {
'toString': function() {
return "Clipperz.PM.DataModel.User.Header.OneTimePasswords";
},
//-------------------------------------------------------------------------
/*
'packData': function (someData) { // ++
var result;
console.log(">>> OneTimePasswords.packData", someData);
result = Clipperz.PM.DataModel.User.Header.OneTimePasswords.superclass.packData.apply(this, arguments);
console.log("<<< OneTimePasswords.packData");
return result;
},
*/
//-------------------------------------------------------------------------
/*
'packRemoteData': function (someData) {
var result;
console.log(">>> OneTimePasswords.packRemoteData", someData);
result = Clipperz.PM.DataModel.User.Header.OneTimePasswords.superclass.packRemoteData.apply(this, arguments);
console.log("<<< OneTimePasswords.packRemoteData");
return result;
},
*/
//-------------------------------------------------------------------------
/*
'prepareRemoteDataWithKey': function (aKey) {
var result;
console.log(">>> OneTimePasswords.prepareRemoteDataWithKey");
result = Clipperz.PM.DataModel.User.Header.OneTimePasswords.superclass.prepareRemoteDataWithKey.apply(this, arguments);
console.log("<<< OneTimePasswords.prepareRemoteDataWithKey");
return result;
},
*/
//=========================================================================
'oneTimePasswords': function () {
var deferredResult;
deferredResult = new Clipperz.Async.Deferred("User.Header.OneTimePasswords.oneTimePasswords", {trace:false});
if (this._oneTimePasswords == null) {
deferredResult.addMethod(this, 'values')
deferredResult.addCallback(MochiKit.Base.bind(function (someData) {
var otpKey;
this._oneTimePasswords = {};
for (otpKey in someData) {
var otp;
var otpParameters;
otpParameters = Clipperz.Base.deepClone(someData[otpKey]);
otpParameters['reference'] = otpKey;
otp = new Clipperz.PM.DataModel.OneTimePassword(otpParameters);
this._oneTimePasswords[otpKey] = otp;
}
return this._oneTimePasswords;
}, this));
deferredResult.callback();
} else {
deferredResult = MochiKit.Async.succeed(this._oneTimePasswords);
}
return deferredResult;
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.Preferences.js b/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.Preferences.js
index 91b981e..b164889 100644
--- a/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.Preferences.js
+++ b/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.Preferences.js
@@ -1,53 +1,50 @@
/*
Copyright 2008-2011 Clipperz Srl
-This file is part of Clipperz's Javascript Crypto Library.
-Javascript Crypto Library provides web developers with an extensive
-and efficient set of cryptographic functions. The library aims to
-obtain maximum execution speed while preserving modularity and
-reusability.
+This file is part of Clipperz Community Edition.
+Clipperz Community Edition is an online password manager.
For further information about its features and functionalities please
-refer to http://www.clipperz.com
+refer to http://www.clipperz.com.
-* Javascript Crypto Library is free software: you can redistribute
+* 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.
-* Javascript Crypto Library is distributed in the hope that it will
+* 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.
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 Javascript Crypto Library. If not, see
+ License along with Clipperz Community Edition. If not, see
<http://www.gnu.org/licenses/>.
*/
try { if (typeof(Clipperz.PM.DataModel.User) == 'undefined') { throw ""; }} catch (e) {
throw "Clipperz.PM.DataModel.User.Header.Preferences depends on Clipperz.PM.DataModel.User!";
}
if (typeof(Clipperz.PM.DataModel.User.Header) == 'undefined') { Clipperz.PM.DataModel.User.Header = {}; }
Clipperz.PM.DataModel.User.Header.Preferences = function(args) {
Clipperz.PM.DataModel.User.Header.Preferences.superclass.constructor.apply(this, arguments);
return this;
}
Clipperz.Base.extend(Clipperz.PM.DataModel.User.Header.Preferences, Clipperz.PM.DataModel.EncryptedRemoteObject, {
'toString': function() {
return "Clipperz.PM.DataModel.User.Header.Preferences";
},
//-------------------------------------------------------------------------
//=========================================================================
__syntaxFix__: "syntax fix"
});
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.RecordIndex.js b/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.RecordIndex.js
index 6ba58a8..f77ea80 100644
--- a/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.RecordIndex.js
+++ b/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.RecordIndex.js
@@ -1,120 +1,117 @@
/*
Copyright 2008-2011 Clipperz Srl
-This file is part of Clipperz's Javascript Crypto Library.
-Javascript Crypto Library provides web developers with an extensive
-and efficient set of cryptographic functions. The library aims to
-obtain maximum execution speed while preserving modularity and
-reusability.
+This file is part of Clipperz Community Edition.
+Clipperz Community Edition is an online password manager.
For further information about its features and functionalities please
-refer to http://www.clipperz.com
+refer to http://www.clipperz.com.
-* Javascript Crypto Library is free software: you can redistribute
+* 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.
-* Javascript Crypto Library is distributed in the hope that it will
+* 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.
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 Javascript Crypto Library. If not, see
+ License along with Clipperz Community Edition. If not, see
<http://www.gnu.org/licenses/>.
*/
try { if (typeof(Clipperz.PM.DataModel.User) == 'undefined') { throw ""; }} catch (e) {
throw "Clipperz.PM.DataModel.User.Header.RecordIndex depends on Clipperz.PM.DataModel.User!";
}
if (typeof(Clipperz.PM.DataModel.User.Header) == 'undefined') { Clipperz.PM.DataModel.User.Header = {}; }
Clipperz.PM.DataModel.User.Header.RecordIndex = function(args) {
Clipperz.PM.DataModel.User.Header.RecordIndex.superclass.constructor.apply(this, arguments);
//console.log("NEW Clipperz.PM.DataModel.User.Header.RecordIndex", args);
this._recordsData = new Clipperz.PM.DataModel.EncryptedRemoteObject({
'name': 'recordsData',
'retrieveKeyFunction': args.retrieveKeyFunction,
'remoteData': {
'data': args.recordsData['data'],
'version': args.encryptedDataVersion,
'recordsStats': args.recordsStats
}//,
// 'encryptedDataKeypath': 'data',
// 'encryptedVersionKeypath': 'version'
});
this._directLoginsData = new Clipperz.PM.DataModel.EncryptedRemoteObject({
'name': 'directLoginsData',
'retrieveKeyFunction': args.retrieveKeyFunction,
'remoteData': {
'data': args.directLoginsData['data'],
'version': args.encryptedDataVersion
}//,
// 'encryptedDataKeypath': 'data',
// 'encryptedVersionKeypath': 'version'
});
this._lock = new MochiKit.Async.DeferredLock();
this._transientState = null;
this._retrieveRecordDetailFunction = args.retrieveRecordDetailFunction || Clipperz.Base.exception.raise('MandatoryParameter');
this._recordsIndex = args.recordsData['index'] || Clipperz.Base.exception.raise('MandatoryParameter');
this._directLoginsIndex = args.directLoginsData['index'] || Clipperz.Base.exception.raise('MandatoryParameter');
this._records = null;
return this;
}
Clipperz.Base.extend(Clipperz.PM.DataModel.User.Header.RecordIndex, Object, {
'toString': function() {
return "Clipperz.PM.DataModel.User.Header.RecordIndex";
},
//-------------------------------------------------------------------------
'retrieveRecordDetailFunction': function () {
return this._retrieveRecordDetailFunction;
},
//-------------------------------------------------------------------------
'recordsIndex': function () {
return this._recordsIndex;
},
'recordsData': function () {
return this._recordsData;
},
//-------------------------------------------------------------------------
'directLoginsIndex': function () {
return this._directLoginsIndex;
},
'directLoginsData': function () {
return this._directLoginsData;
},
//-------------------------------------------------------------------------
'lock': function () {
return this._lock;
},
//-------------------------------------------------------------------------
'transientState': function () {
if (this._transientState == null) {
this._transientState = new Clipperz.KeyValueObjectStore(/*{'name':'User.Header.RecordIndex.transientState [1]'}*/);
}
return this._transientState;
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/User.js b/frontend/gamma/js/Clipperz/PM/DataModel/User.js
index e8afa97..72d4006 100644
--- a/frontend/gamma/js/Clipperz/PM/DataModel/User.js
+++ b/frontend/gamma/js/Clipperz/PM/DataModel/User.js
@@ -1,120 +1,117 @@
/*
Copyright 2008-2011 Clipperz Srl
-This file is part of Clipperz's Javascript Crypto Library.
-Javascript Crypto Library provides web developers with an extensive
-and efficient set of cryptographic functions. The library aims to
-obtain maximum execution speed while preserving modularity and
-reusability.
+This file is part of Clipperz Community Edition.
+Clipperz Community Edition is an online password manager.
For further information about its features and functionalities please
-refer to http://www.clipperz.com
+refer to http://www.clipperz.com.
-* Javascript Crypto Library is free software: you can redistribute
+* 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.
-* Javascript Crypto Library is distributed in the hope that it will
+* 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.
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 Javascript Crypto Library. If not, see
+ License along with Clipperz Community Edition. If not, see
<http://www.gnu.org/licenses/>.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
//#############################################################################
Clipperz.PM.DataModel.User = function (args) {
args = args || {};
Clipperz.PM.DataModel.User.superclass.constructor.apply(this, arguments);
this._username = args.username || null;
this._getPassphraseFunction = args.getPassphraseFunction || null;
this._data = null;
this._connection = null;
this._connectionVersion = 'current';
this._serverData = null;
this._serverLockValue = null;
this._transientState = null;
this._deferredLocks = {
'passphrase': new MochiKit.Async.DeferredLock(),
'serverData': new MochiKit.Async.DeferredLock(),
// 'recordsIndex': new MochiKit.Async.DeferredLock(),
// 'directLoginsIndex': new MochiKit.Async.DeferredLock()
// 'preferences': new MochiKit.Async.DeferredLock()
// 'oneTimePasswords': new MochiKit.Async.DeferredLock()
'__syntaxFix__': 'syntax fix'
};
return this;
}
Clipperz.Base.extend(Clipperz.PM.DataModel.User, Object, {
'toString': function () {
return "Clipperz.PM.DataModel.User - " + this.username();
},
//-------------------------------------------------------------------------
'username': function () {
return this._username;
},
'setUsername': function (aValue) {
this._username = aValue;
},
//-------------------------------------------------------------------------
'displayName': function() {
return "" + this.username() + "";
},
//-------------------------------------------------------------------------
'data': function () {
if (this._data == null) {
this._data = new Clipperz.KeyValueObjectStore(/*{'name':'User.data [1]'}*/);
};
return this._data;
},
//-------------------------------------------------------------------------
'serverLockValue': function () {
return this._serverLockValue;
},
'setServerLockValue': function (aValue) {
this._serverLockValue = aValue;
},
//-------------------------------------------------------------------------
'transientState': function () {
if (this._transientState == null) {
this._transientState = {}
}
return this._transientState;
},
'resetTransientState': function (isCommitting) {
this._transientState = null;
},