Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/DataModel') (more/less context) (ignore whitespace changes)
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,72 +1,69 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.DataModel'); | 26 | Clipperz.Base.module('Clipperz.PM.DataModel'); |
30 | 27 | ||
31 | Clipperz.PM.DataModel.DirectLogin = function(args) { | 28 | Clipperz.PM.DataModel.DirectLogin = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | 30 | ||
34 | Clipperz.PM.DataModel.DirectLogin.superclass.constructor.apply(this, arguments); | 31 | Clipperz.PM.DataModel.DirectLogin.superclass.constructor.apply(this, arguments); |
35 | 32 | ||
36 | this._reference =args.reference | 33 | this._reference =args.reference |
37 | ||Clipperz.PM.Crypto.randomKey(); | 34 | ||Clipperz.PM.Crypto.randomKey(); |
38 | this._record =args.record | 35 | this._record =args.record |
39 | ||Clipperz.Base.exception.raise('MandatoryParameter'); | 36 | ||Clipperz.Base.exception.raise('MandatoryParameter'); |
40 | 37 | ||
41 | this._retrieveIndexDataFunction = args.retrieveIndexDataFunction | 38 | this._retrieveIndexDataFunction = args.retrieveIndexDataFunction |
42 | ||this.record().retrieveDirectLoginIndexDataFunction() | 39 | ||this.record().retrieveDirectLoginIndexDataFunction() |
43 | ||Clipperz.Base.exception.raise('MandatoryParameter'); | 40 | ||Clipperz.Base.exception.raise('MandatoryParameter'); |
44 | this._setIndexDataFunction = args.setIndexDataFunction | 41 | this._setIndexDataFunction = args.setIndexDataFunction |
45 | ||this.record().setDirectLoginIndexDataFunction() | 42 | ||this.record().setDirectLoginIndexDataFunction() |
46 | ||Clipperz.Base.exception.raise('MandatoryParameter'); | 43 | ||Clipperz.Base.exception.raise('MandatoryParameter'); |
47 | this._removeIndexDataFunction =args.removeIndexDataFunction | 44 | this._removeIndexDataFunction =args.removeIndexDataFunction |
48 | ||this.record().removeDirectLoginIndexDataFunction() | 45 | ||this.record().removeDirectLoginIndexDataFunction() |
49 | ||Clipperz.Base.exception.raise('MandatoryParameter'); | 46 | ||Clipperz.Base.exception.raise('MandatoryParameter'); |
50 | 47 | ||
51 | this._inputs = null; | 48 | this._inputs = null; |
52 | this._bindings = null; | 49 | this._bindings = null; |
53 | this._formValues = null; | 50 | this._formValues = null; |
54 | 51 | ||
55 | // this._inputsDeferredLock = new MochiKit.Async.DeferredLock(); | 52 | // this._inputsDeferredLock = new MochiKit.Async.DeferredLock(); |
56 | // this._bindingsDeferredLock = new MochiKit.Async.DeferredLock(); | 53 | // this._bindingsDeferredLock = new MochiKit.Async.DeferredLock(); |
57 | // this._formValuesDeferredLock = new MochiKit.Async.DeferredLock(); | 54 | // this._formValuesDeferredLock = new MochiKit.Async.DeferredLock(); |
58 | 55 | ||
59 | this._transientState = null; | 56 | this._transientState = null; |
60 | 57 | ||
61 | this._isBrandNew = MochiKit.Base.isUndefinedOrNull(args.reference); | 58 | this._isBrandNew = MochiKit.Base.isUndefinedOrNull(args.reference); |
62 | 59 | ||
63 | this.record().addDirectLogin(this); | 60 | this.record().addDirectLogin(this); |
64 | 61 | ||
65 | return this; | 62 | return this; |
66 | } | 63 | } |
67 | 64 | ||
68 | Clipperz.Base.extend(Clipperz.PM.DataModel.DirectLogin, Object, { | 65 | Clipperz.Base.extend(Clipperz.PM.DataModel.DirectLogin, Object, { |
69 | 66 | ||
70 | 'toString': function() { | 67 | 'toString': function() { |
71 | return "DirectLogin (" + this.reference() + ")"; | 68 | return "DirectLogin (" + this.reference() + ")"; |
72 | }, | 69 | }, |
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,72 +1,69 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } | 28 | if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } |
32 | 29 | ||
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.DataModel.DirectLoginBinding = function(aDirectLogin, args) { | 33 | Clipperz.PM.DataModel.DirectLoginBinding = function(aDirectLogin, args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | this._directLogin = aDirectLogin|| Clipperz.Base.exception.raise('MandatoryParameter'); | 36 | this._directLogin = aDirectLogin|| Clipperz.Base.exception.raise('MandatoryParameter'); |
40 | 37 | ||
41 | this._key = args.key|| Clipperz.Base.exception.raise('MandatoryParameter'); | 38 | this._key = args.key|| Clipperz.Base.exception.raise('MandatoryParameter'); |
42 | this._fieldKey = args.field || /* this.directLogin().fieldWithName(args.fieldName).reference() || */null; | 39 | this._fieldKey = args.field || /* this.directLogin().fieldWithName(args.fieldName).reference() || */null; |
43 | 40 | ||
44 | return this; | 41 | return this; |
45 | } | 42 | } |
46 | 43 | ||
47 | Clipperz.PM.DataModel.DirectLoginBinding.prototype = MochiKit.Base.update(null, { | 44 | Clipperz.PM.DataModel.DirectLoginBinding.prototype = MochiKit.Base.update(null, { |
48 | 45 | ||
49 | 'toString': function() { | 46 | 'toString': function() { |
50 | return "DirectLoginBinding (" + this.key() + ", " + this.fieldKey() + ")"; | 47 | return "DirectLoginBinding (" + this.key() + ", " + this.fieldKey() + ")"; |
51 | }, | 48 | }, |
52 | 49 | ||
53 | //------------------------------------------------------------------------- | 50 | //------------------------------------------------------------------------- |
54 | 51 | ||
55 | 'directLogin': function () { | 52 | 'directLogin': function () { |
56 | return this._directLogin; | 53 | return this._directLogin; |
57 | }, | 54 | }, |
58 | 55 | ||
59 | //------------------------------------------------------------------------- | 56 | //------------------------------------------------------------------------- |
60 | 57 | ||
61 | 'key': function() { | 58 | 'key': function() { |
62 | return this._key; | 59 | return this._key; |
63 | }, | 60 | }, |
64 | 61 | ||
65 | //------------------------------------------------------------------------- | 62 | //------------------------------------------------------------------------- |
66 | 63 | ||
67 | 'fieldKey': function() { | 64 | 'fieldKey': function() { |
68 | return this._fieldKey; | 65 | return this._fieldKey; |
69 | }, | 66 | }, |
70 | 67 | ||
71 | 'setFieldKey': function(aValue) { | 68 | 'setFieldKey': function(aValue) { |
72 | this._fieldKey = aValue; | 69 | this._fieldKey = aValue; |
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,72 +1,69 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } | 28 | if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } |
32 | 29 | ||
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.DataModel.DirectLoginFormValue = function(aDirectLogin, args) { | 33 | Clipperz.PM.DataModel.DirectLoginFormValue = function(aDirectLogin, args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | this._directLogin = aDirectLogin|| Clipperz.Base.exception.raise('MandatoryParameter'); | 36 | this._directLogin = aDirectLogin|| Clipperz.Base.exception.raise('MandatoryParameter'); |
40 | 37 | ||
41 | this._key = args.key || Clipperz.Base.exception.raise('MandatoryParameter'); | 38 | this._key = args.key || Clipperz.Base.exception.raise('MandatoryParameter'); |
42 | this._fieldOptions = args.fieldOptions|| Clipperz.Base.exception.raise('MandatoryParameter'); | 39 | this._fieldOptions = args.fieldOptions|| Clipperz.Base.exception.raise('MandatoryParameter'); |
43 | this._value = args.value || null; | 40 | this._value = args.value || null; |
44 | 41 | ||
45 | return this; | 42 | return this; |
46 | } | 43 | } |
47 | 44 | ||
48 | Clipperz.PM.DataModel.DirectLoginFormValue.prototype = MochiKit.Base.update(null, { | 45 | Clipperz.PM.DataModel.DirectLoginFormValue.prototype = MochiKit.Base.update(null, { |
49 | 46 | ||
50 | 'toString': function() { | 47 | 'toString': function() { |
51 | return "DirectLoginFormValue (" + this.key() + ", " + this.value() + ")"; | 48 | return "DirectLoginFormValue (" + this.key() + ", " + this.value() + ")"; |
52 | }, | 49 | }, |
53 | 50 | ||
54 | //------------------------------------------------------------------------- | 51 | //------------------------------------------------------------------------- |
55 | 52 | ||
56 | 'directLogin': function () { | 53 | 'directLogin': function () { |
57 | return this._directLogin; | 54 | return this._directLogin; |
58 | }, | 55 | }, |
59 | 56 | ||
60 | //------------------------------------------------------------------------- | 57 | //------------------------------------------------------------------------- |
61 | 58 | ||
62 | 'key': function() { | 59 | 'key': function() { |
63 | return this._key; | 60 | return this._key; |
64 | }, | 61 | }, |
65 | 62 | ||
66 | //------------------------------------------------------------------------- | 63 | //------------------------------------------------------------------------- |
67 | 64 | ||
68 | 'fieldOptions': function() { | 65 | 'fieldOptions': function() { |
69 | return this._fieldOptions; | 66 | return this._fieldOptions; |
70 | }, | 67 | }, |
71 | 68 | ||
72 | //------------------------------------------------------------------------- | 69 | //------------------------------------------------------------------------- |
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,72 +1,69 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } | 28 | if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } |
32 | 29 | ||
33 | //############################################################################# | 30 | //############################################################################# |
34 | 31 | ||
35 | Clipperz.PM.DataModel.DirectLoginInput = function(args) { | 32 | Clipperz.PM.DataModel.DirectLoginInput = function(args) { |
36 | this._args = args; | 33 | this._args = args; |
37 | 34 | ||
38 | return this; | 35 | return this; |
39 | } | 36 | } |
40 | 37 | ||
41 | Clipperz.PM.DataModel.DirectLoginInput.prototype = MochiKit.Base.update(null, { | 38 | Clipperz.PM.DataModel.DirectLoginInput.prototype = MochiKit.Base.update(null, { |
42 | 39 | ||
43 | 'args': function() { | 40 | 'args': function() { |
44 | return this._args; | 41 | return this._args; |
45 | }, | 42 | }, |
46 | 43 | ||
47 | //------------------------------------------------------------------------- | 44 | //------------------------------------------------------------------------- |
48 | 45 | ||
49 | 'name': function() { | 46 | 'name': function() { |
50 | return this.args()['name']; | 47 | return this.args()['name']; |
51 | }, | 48 | }, |
52 | 49 | ||
53 | //------------------------------------------------------------------------- | 50 | //------------------------------------------------------------------------- |
54 | 51 | ||
55 | 'type': function() { | 52 | 'type': function() { |
56 | var result; | 53 | var result; |
57 | 54 | ||
58 | result = this.args()['type']; | 55 | result = this.args()['type']; |
59 | 56 | ||
60 | if (result != null) { | 57 | if (result != null) { |
61 | result = result.toLowerCase(); | 58 | result = result.toLowerCase(); |
62 | } | 59 | } |
63 | return result; | 60 | return result; |
64 | }, | 61 | }, |
65 | 62 | ||
66 | //------------------------------------------------------------------------- | 63 | //------------------------------------------------------------------------- |
67 | 64 | ||
68 | 'options': function() { | 65 | 'options': function() { |
69 | return this.args()['options']; | 66 | return this.args()['options']; |
70 | }, | 67 | }, |
71 | 68 | ||
72 | //------------------------------------------------------------------------- | 69 | //------------------------------------------------------------------------- |
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,72 +1,69 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | try { if (typeof(Clipperz.KeyValueObjectStore) == 'undefined') { throw ""; }} catch (e) { | 26 | try { if (typeof(Clipperz.KeyValueObjectStore) == 'undefined') { throw ""; }} catch (e) { |
30 | throw "Clipperz.PM.DataModel.EncryptedRemoteObject depends on Clipperz.KeyValueObjectStore!"; | 27 | throw "Clipperz.PM.DataModel.EncryptedRemoteObject depends on Clipperz.KeyValueObjectStore!"; |
31 | } | 28 | } |
32 | 29 | ||
33 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
34 | if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } | 31 | if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } |
35 | 32 | ||
36 | Clipperz.PM.DataModel.EncryptedRemoteObject = function(args) { | 33 | Clipperz.PM.DataModel.EncryptedRemoteObject = function(args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | this._name = args.name || null; | 36 | this._name = args.name || null; |
40 | this._reference = args.reference || Clipperz.PM.Crypto.randomKey(); | 37 | this._reference = args.reference || Clipperz.PM.Crypto.randomKey(); |
41 | this._isBrandNew = ((args.reference == null) && (args.remoteData == null)); | 38 | this._isBrandNew = ((args.reference == null) && (args.remoteData == null)); |
42 | 39 | ||
43 | if ((this._isBrandNew == false) && (args['retrieveKeyFunction'] == null)) { | 40 | if ((this._isBrandNew == false) && (args['retrieveKeyFunction'] == null)) { |
44 | Clipperz.Base.exception.raise('MandatoryParameter'); | 41 | Clipperz.Base.exception.raise('MandatoryParameter'); |
45 | } else { | 42 | } else { |
46 | this._retrieveKeyFunction = args['retrieveKeyFunction']; | 43 | this._retrieveKeyFunction = args['retrieveKeyFunction']; |
47 | } | 44 | } |
48 | 45 | ||
49 | this._retrieveRemoteDataFunction = args.retrieveRemoteDataFunction|| null; | 46 | this._retrieveRemoteDataFunction = args.retrieveRemoteDataFunction|| null; |
50 | this._remoteData = args.remoteData || null; | 47 | this._remoteData = args.remoteData || null; |
51 | // this._remoteData = args.remoteData ? Clipperz.Base.deepClone(args.remoteData) : null; | 48 | // this._remoteData = args.remoteData ? Clipperz.Base.deepClone(args.remoteData) : null; |
52 | if ((!this._isBrandNew) && ((this._retrieveRemoteDataFunction == null) && (this._remoteData == null))) { | 49 | if ((!this._isBrandNew) && ((this._retrieveRemoteDataFunction == null) && (this._remoteData == null))) { |
53 | Clipperz.Base.exception.raise('MandatoryParameter'); | 50 | Clipperz.Base.exception.raise('MandatoryParameter'); |
54 | } | 51 | } |
55 | 52 | ||
56 | 53 | ||
57 | this._encryptedDataKeypath = args.encryptedDataKeypath || 'data'; //Clipperz.Base.exception.raise('MandatoryParameter'); | 54 | this._encryptedDataKeypath = args.encryptedDataKeypath || 'data'; //Clipperz.Base.exception.raise('MandatoryParameter'); |
58 | this._encryptedVersionKeypath = args.encryptedVersionKeypath || 'version';//Clipperz.Base.exception.raise('MandatoryParameter'); | 55 | this._encryptedVersionKeypath = args.encryptedVersionKeypath || 'version';//Clipperz.Base.exception.raise('MandatoryParameter'); |
59 | 56 | ||
60 | 57 | ||
61 | this._transientState = null; | 58 | this._transientState = null; |
62 | this._deferredLocks = {}; | 59 | this._deferredLocks = {}; |
63 | 60 | ||
64 | if (this._isBrandNew == true) { | 61 | if (this._isBrandNew == true) { |
65 | this._objectDataStore = new Clipperz.KeyValueObjectStore(/*{'name':'EncryptedRemoteObject.objectDataStore [1]'}*/); | 62 | this._objectDataStore = new Clipperz.KeyValueObjectStore(/*{'name':'EncryptedRemoteObject.objectDataStore [1]'}*/); |
66 | } else { | 63 | } else { |
67 | this._objectDataStore = null; | 64 | this._objectDataStore = null; |
68 | } | 65 | } |
69 | 66 | ||
70 | return this; | 67 | return this; |
71 | } | 68 | } |
72 | 69 | ||
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,72 +1,69 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } | 28 | if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } |
32 | 29 | ||
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.DataModel.OneTimePassword = function(args) { | 33 | Clipperz.PM.DataModel.OneTimePassword = function(args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | //this._user = args['user']; | 36 | //this._user = args['user']; |
40 | this._reference = args['reference']|| Clipperz.PM.Crypto.randomKey(); | 37 | this._reference = args['reference']|| Clipperz.PM.Crypto.randomKey(); |
41 | this._password = args['password']; | 38 | this._password = args['password']; |
42 | this._passwordValue = Clipperz.PM.DataModel.OneTimePassword.normalizedOneTimePassword(args['password']); | 39 | this._passwordValue = Clipperz.PM.DataModel.OneTimePassword.normalizedOneTimePassword(args['password']); |
43 | this._creationDate = args['created'] ? Clipperz.PM.Date.parseDateWithUTCFormat(args['created']) : new Date(); | 40 | this._creationDate = args['created'] ? Clipperz.PM.Date.parseDateWithUTCFormat(args['created']) : new Date(); |
44 | this._usageDate = args['used'] ? Clipperz.PM.Date.parseDateWithUTCFormat(args['used']) : null; | 41 | this._usageDate = args['used'] ? Clipperz.PM.Date.parseDateWithUTCFormat(args['used']) : null; |
45 | 42 | ||
46 | this._status = args['status'] || 'ACTIVE'; //'REQUESTED', 'USED', 'DISABLED' | 43 | this._status = args['status'] || 'ACTIVE'; //'REQUESTED', 'USED', 'DISABLED' |
47 | this._connectionInfo= null; | 44 | this._connectionInfo= null; |
48 | 45 | ||
49 | this._key = null; | 46 | this._key = null; |
50 | this._keyChecksum= null; | 47 | this._keyChecksum= null; |
51 | 48 | ||
52 | return this; | 49 | return this; |
53 | } | 50 | } |
54 | 51 | ||
55 | Clipperz.PM.DataModel.OneTimePassword.prototype = MochiKit.Base.update(null, { | 52 | Clipperz.PM.DataModel.OneTimePassword.prototype = MochiKit.Base.update(null, { |
56 | 53 | ||
57 | 'toString': function() { | 54 | 'toString': function() { |
58 | return "Clipperz.PM.DataModel.OneTimePassword"; | 55 | return "Clipperz.PM.DataModel.OneTimePassword"; |
59 | }, | 56 | }, |
60 | /* | 57 | /* |
61 | //------------------------------------------------------------------------- | 58 | //------------------------------------------------------------------------- |
62 | 59 | ||
63 | 'user': function() { | 60 | 'user': function() { |
64 | return this._user; | 61 | return this._user; |
65 | }, | 62 | }, |
66 | 63 | ||
67 | //------------------------------------------------------------------------- | 64 | //------------------------------------------------------------------------- |
68 | 65 | ||
69 | 'password': function() { | 66 | 'password': function() { |
70 | return this._password; | 67 | return this._password; |
71 | }, | 68 | }, |
72 | 69 | ||
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,72 +1,69 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | try { if (typeof(Clipperz.PM.DataModel.Record.Version) == 'undefined') { throw ""; }} catch (e) { | 26 | try { if (typeof(Clipperz.PM.DataModel.Record.Version) == 'undefined') { throw ""; }} catch (e) { |
30 | throw "Clipperz.PM.DataModel.Record.Version.Field depends on Clipperz.PM.DataModel.Record.Version!"; | 27 | throw "Clipperz.PM.DataModel.Record.Version.Field depends on Clipperz.PM.DataModel.Record.Version!"; |
31 | } | 28 | } |
32 | 29 | ||
33 | Clipperz.PM.DataModel.Record.Version.Field = function(args) { | 30 | Clipperz.PM.DataModel.Record.Version.Field = function(args) { |
34 | Clipperz.PM.DataModel.Record.Version.Field.superclass.constructor.apply(this, arguments); | 31 | Clipperz.PM.DataModel.Record.Version.Field.superclass.constructor.apply(this, arguments); |
35 | 32 | ||
36 | this._recordVersion = args.recordVersion|| Clipperz.Base.exception.raise('MandatoryParameter'); | 33 | this._recordVersion = args.recordVersion|| Clipperz.Base.exception.raise('MandatoryParameter'); |
37 | this._reference = args.reference || Clipperz.PM.Crypto.randomKey(); | 34 | this._reference = args.reference || Clipperz.PM.Crypto.randomKey(); |
38 | 35 | ||
39 | return this; | 36 | return this; |
40 | } | 37 | } |
41 | 38 | ||
42 | 39 | ||
43 | Clipperz.Base.extend(Clipperz.PM.DataModel.Record.Version.Field, Object, { | 40 | Clipperz.Base.extend(Clipperz.PM.DataModel.Record.Version.Field, Object, { |
44 | 41 | ||
45 | 'toString': function() { | 42 | 'toString': function() { |
46 | return "Record.Version.Field (" + this.reference() + ")"; | 43 | return "Record.Version.Field (" + this.reference() + ")"; |
47 | }, | 44 | }, |
48 | 45 | ||
49 | //------------------------------------------------------------------------- | 46 | //------------------------------------------------------------------------- |
50 | 47 | ||
51 | 'recordVersion': function () { | 48 | 'recordVersion': function () { |
52 | return this._recordVersion; | 49 | return this._recordVersion; |
53 | }, | 50 | }, |
54 | 51 | ||
55 | //------------------------------------------------------------------------- | 52 | //------------------------------------------------------------------------- |
56 | 53 | ||
57 | 'reference': function () { | 54 | 'reference': function () { |
58 | return this._reference; | 55 | return this._reference; |
59 | }, | 56 | }, |
60 | 57 | ||
61 | //------------------------------------------------------------------------- | 58 | //------------------------------------------------------------------------- |
62 | 59 | ||
63 | 'getItem': function (aKey) { | 60 | 'getItem': function (aKey) { |
64 | return Clipperz.Async.callbacks("Clipperz.PM.DataModel.Record.Version.Field.getItem", [ | 61 | return Clipperz.Async.callbacks("Clipperz.PM.DataModel.Record.Version.Field.getItem", [ |
65 | MochiKit.Base.method(this, 'recordVersion'), | 62 | MochiKit.Base.method(this, 'recordVersion'), |
66 | MochiKit.Base.methodcaller('getValue', 'fields' + '.' + this.reference() + '.' + aKey) | 63 | MochiKit.Base.methodcaller('getValue', 'fields' + '.' + this.reference() + '.' + aKey) |
67 | ], {trace:false}); | 64 | ], {trace:false}); |
68 | }, | 65 | }, |
69 | 66 | ||
70 | 'setItem': function (aKey, aValue) { | 67 | 'setItem': function (aKey, aValue) { |
71 | return Clipperz.Async.callbacks("Clipperz.PM.DataModel.Record.Version.Field.getItem", [ | 68 | return Clipperz.Async.callbacks("Clipperz.PM.DataModel.Record.Version.Field.getItem", [ |
72 | MochiKit.Base.method(this, 'recordVersion'), | 69 | MochiKit.Base.method(this, 'recordVersion'), |
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,72 +1,69 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | try { if (typeof(Clipperz.PM.DataModel.Record) == 'undefined') { throw ""; }} catch (e) { | 26 | try { if (typeof(Clipperz.PM.DataModel.Record) == 'undefined') { throw ""; }} catch (e) { |
30 | throw "Clipperz.PM.DataModel.Record.Version depends on Clipperz.PM.DataModel.Record!"; | 27 | throw "Clipperz.PM.DataModel.Record.Version depends on Clipperz.PM.DataModel.Record!"; |
31 | } | 28 | } |
32 | 29 | ||
33 | Clipperz.PM.DataModel.Record.Version = function(args) { | 30 | Clipperz.PM.DataModel.Record.Version = function(args) { |
34 | //console.log(">>> Record.new"); | 31 | //console.log(">>> Record.new"); |
35 | Clipperz.PM.DataModel.Record.Version.superclass.constructor.apply(this, arguments); | 32 | Clipperz.PM.DataModel.Record.Version.superclass.constructor.apply(this, arguments); |
36 | 33 | ||
37 | this._getVersionFunction = args.getVersion|| Clipperz.Base.exception.raise('MandatoryParameter'); | 34 | this._getVersionFunction = args.getVersion|| Clipperz.Base.exception.raise('MandatoryParameter'); |
38 | this._fields = null; | 35 | this._fields = null; |
39 | 36 | ||
40 | return this; | 37 | return this; |
41 | } | 38 | } |
42 | 39 | ||
43 | 40 | ||
44 | Clipperz.Base.extend(Clipperz.PM.DataModel.Record.Version, Clipperz.PM.DataModel.EncryptedRemoteObject, { | 41 | Clipperz.Base.extend(Clipperz.PM.DataModel.Record.Version, Clipperz.PM.DataModel.EncryptedRemoteObject, { |
45 | 42 | ||
46 | 'toString': function() { | 43 | 'toString': function() { |
47 | return "Record.Version (" + this.reference() + ")"; | 44 | return "Record.Version (" + this.reference() + ")"; |
48 | }, | 45 | }, |
49 | 46 | ||
50 | //------------------------------------------------------------------------- | 47 | //------------------------------------------------------------------------- |
51 | 48 | ||
52 | 'reference': function () { | 49 | 'reference': function () { |
53 | return this._reference; | 50 | return this._reference; |
54 | }, | 51 | }, |
55 | 52 | ||
56 | //------------------------------------------------------------------------- | 53 | //------------------------------------------------------------------------- |
57 | /* | 54 | /* |
58 | 'hasPendingChanges': function () { | 55 | 'hasPendingChanges': function () { |
59 | var deferredResult; | 56 | var deferredResult; |
60 | 57 | ||
61 | deferredResult = new Clipperz.Async.Deferred("Clipperz.PM.DataModel.Record.Version.hasPendingChanges", {trace:false}); | 58 | deferredResult = new Clipperz.Async.Deferred("Clipperz.PM.DataModel.Record.Version.hasPendingChanges", {trace:false}); |
62 | deferredResult.addCallback(MochiKit.Base.bind(Clipperz.PM.DataModel.Record.Version.superclass.hasPendingChanges, this)); | 59 | deferredResult.addCallback(MochiKit.Base.bind(Clipperz.PM.DataModel.Record.Version.superclass.hasPendingChanges, this)); |
63 | deferredResult.callback(); | 60 | deferredResult.callback(); |
64 | 61 | ||
65 | return deferredResult; | 62 | return deferredResult; |
66 | }, | 63 | }, |
67 | */ | 64 | */ |
68 | //------------------------------------------------------------------------- | 65 | //------------------------------------------------------------------------- |
69 | 66 | ||
70 | 67 | ||
71 | 'hasPendingChangesWhenBrandNew': function () { | 68 | 'hasPendingChangesWhenBrandNew': function () { |
72 | var deferredResult; | 69 | var deferredResult; |
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,72 +1,69 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } | 28 | if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } |
32 | 29 | ||
33 | 30 | ||
34 | Clipperz.PM.DataModel.Record = function(args) { | 31 | Clipperz.PM.DataModel.Record = function(args) { |
35 | //console.log(">>> new Clipperz.PM.DataModel.Record", args); | 32 | //console.log(">>> new Clipperz.PM.DataModel.Record", args); |
36 | Clipperz.PM.DataModel.Record.superclass.constructor.apply(this, arguments); | 33 | Clipperz.PM.DataModel.Record.superclass.constructor.apply(this, arguments); |
37 | 34 | ||
38 | this._updateDate = (args.updateDate ? Clipperz.PM.Date.parse(args.updateDate) : Clipperz.Base.exception.raise('MandatoryParameter')); | 35 | this._updateDate = (args.updateDate ? Clipperz.PM.Date.parse(args.updateDate) : Clipperz.Base.exception.raise('MandatoryParameter')); |
39 | 36 | ||
40 | this._retrieveIndexDataFunction = args.retrieveIndexDataFunction|| Clipperz.Base.exception.raise('MandatoryParameter'); | 37 | this._retrieveIndexDataFunction = args.retrieveIndexDataFunction|| Clipperz.Base.exception.raise('MandatoryParameter'); |
41 | this._updateIndexDataFunction = args.updateIndexDataFunction || Clipperz.Base.exception.raise('MandatoryParameter'); | 38 | this._updateIndexDataFunction = args.updateIndexDataFunction || Clipperz.Base.exception.raise('MandatoryParameter'); |
42 | 39 | ||
43 | this._retrieveDirectLoginIndexDataFunction = args.retrieveDirectLoginIndexDataFunction|| null; | 40 | this._retrieveDirectLoginIndexDataFunction = args.retrieveDirectLoginIndexDataFunction|| null; |
44 | this._setDirectLoginIndexDataFunction = args.setDirectLoginIndexDataFunction || null; | 41 | this._setDirectLoginIndexDataFunction = args.setDirectLoginIndexDataFunction || null; |
45 | this._removeDirectLoginIndexDataFunction = args.removeDirectLoginIndexDataFunction|| null; | 42 | this._removeDirectLoginIndexDataFunction = args.removeDirectLoginIndexDataFunction|| null; |
46 | 43 | ||
47 | this._createNewDirectLoginFunction = args.createNewDirectLoginFunction || null; | 44 | this._createNewDirectLoginFunction = args.createNewDirectLoginFunction || null; |
48 | 45 | ||
49 | this._directLogins = {}; | 46 | this._directLogins = {}; |
50 | 47 | ||
51 | this._versions = {}; | 48 | this._versions = {}; |
52 | 49 | ||
53 | this._currentRecordVersion = null; | 50 | this._currentRecordVersion = null; |
54 | if (this.isBrandNew()) { | 51 | if (this.isBrandNew()) { |
55 | var newVersion; | 52 | var newVersion; |
56 | 53 | ||
57 | this.setNotes(''); | 54 | this.setNotes(''); |
58 | newVersion = new Clipperz.PM.DataModel.Record.Version({ | 55 | newVersion = new Clipperz.PM.DataModel.Record.Version({ |
59 | 'retrieveKeyFunction':MochiKit.Base.method(this, 'getVersionKey'), | 56 | 'retrieveKeyFunction':MochiKit.Base.method(this, 'getVersionKey'), |
60 | 'getVersion': MochiKit.Base.method(this, 'getVersion') | 57 | 'getVersion': MochiKit.Base.method(this, 'getVersion') |
61 | 58 | ||
62 | }); | 59 | }); |
63 | this._versions[newVersion.reference()] = newVersion; | 60 | this._versions[newVersion.reference()] = newVersion; |
64 | this._currentVersionReference = newVersion.reference(); | 61 | this._currentVersionReference = newVersion.reference(); |
65 | // this.setLabel(''); | 62 | // this.setLabel(''); |
66 | } | 63 | } |
67 | 64 | ||
68 | //console.log("<<< new Clipperz.PM.DataModel.Record", args); | 65 | //console.log("<<< new Clipperz.PM.DataModel.Record", args); |
69 | 66 | ||
70 | return this; | 67 | return this; |
71 | } | 68 | } |
72 | 69 | ||
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,72 +1,69 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | try { if (typeof(Clipperz.PM.DataModel.User) == 'undefined') { throw ""; }} catch (e) { | 26 | try { if (typeof(Clipperz.PM.DataModel.User) == 'undefined') { throw ""; }} catch (e) { |
30 | throw "Clipperz.PM.DataModel.User.Header.Legacy depends on Clipperz.PM.DataModel.User!"; | 27 | throw "Clipperz.PM.DataModel.User.Header.Legacy depends on Clipperz.PM.DataModel.User!"; |
31 | } | 28 | } |
32 | 29 | ||
33 | if (typeof(Clipperz.PM.DataModel.User.Header) == 'undefined') { Clipperz.PM.DataModel.User.Header = {}; } | 30 | if (typeof(Clipperz.PM.DataModel.User.Header) == 'undefined') { Clipperz.PM.DataModel.User.Header = {}; } |
34 | 31 | ||
35 | Clipperz.PM.DataModel.User.Header.Legacy = function(args) { | 32 | Clipperz.PM.DataModel.User.Header.Legacy = function(args) { |
36 | //args = args || {}; | 33 | //args = args || {}; |
37 | Clipperz.PM.DataModel.User.Header.Legacy.superclass.constructor.apply(this, arguments); | 34 | Clipperz.PM.DataModel.User.Header.Legacy.superclass.constructor.apply(this, arguments); |
38 | 35 | ||
39 | this._retrieveRecordDetailFunction = args.retrieveRecordDetailFunction|| Clipperz.Base.exception.raise('MandatoryParameter'); | 36 | this._retrieveRecordDetailFunction = args.retrieveRecordDetailFunction|| Clipperz.Base.exception.raise('MandatoryParameter'); |
40 | this._records = null; | 37 | this._records = null; |
41 | //this._directLogins = null; | 38 | //this._directLogins = null; |
42 | 39 | ||
43 | return this; | 40 | return this; |
44 | } | 41 | } |
45 | 42 | ||
46 | 43 | ||
47 | Clipperz.Base.extend(Clipperz.PM.DataModel.User.Header.Legacy, Clipperz.PM.DataModel.EncryptedRemoteObject, { | 44 | Clipperz.Base.extend(Clipperz.PM.DataModel.User.Header.Legacy, Clipperz.PM.DataModel.EncryptedRemoteObject, { |
48 | 45 | ||
49 | 'toString': function() { | 46 | 'toString': function() { |
50 | return "Clipperz.PM.DataModel.User.Header.Legacy"; | 47 | return "Clipperz.PM.DataModel.User.Header.Legacy"; |
51 | }, | 48 | }, |
52 | 49 | ||
53 | //------------------------------------------------------------------------- | 50 | //------------------------------------------------------------------------- |
54 | 51 | ||
55 | 'retrieveRecordDetailFunction': function () { | 52 | 'retrieveRecordDetailFunction': function () { |
56 | return this._retrieveRecordDetailFunction; | 53 | return this._retrieveRecordDetailFunction; |
57 | }, | 54 | }, |
58 | 55 | ||
59 | //------------------------------------------------------------------------- | 56 | //------------------------------------------------------------------------- |
60 | 57 | ||
61 | 'getRecordKey': function (aRecordReference) { | 58 | 'getRecordKey': function (aRecordReference) { |
62 | var deferredResult; | 59 | var deferredResult; |
63 | 60 | ||
64 | deferredResult = new Clipperz.Async.Deferred("User.Header.Legacy.getRecordKey", {trace:false}); | 61 | deferredResult = new Clipperz.Async.Deferred("User.Header.Legacy.getRecordKey", {trace:false}); |
65 | deferredResult.addMethod(this, 'getRecordIndexData'); | 62 | deferredResult.addMethod(this, 'getRecordIndexData'); |
66 | deferredResult.addCallback(MochiKit.Base.itemgetter('key')) | 63 | deferredResult.addCallback(MochiKit.Base.itemgetter('key')) |
67 | deferredResult.callback(); | 64 | deferredResult.callback(); |
68 | 65 | ||
69 | return deferredResult; | 66 | return deferredResult; |
70 | }, | 67 | }, |
71 | 68 | ||
72 | //========================================================================= | 69 | //========================================================================= |
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,72 +1,69 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | try { if (typeof(Clipperz.PM.DataModel.User) == 'undefined') { throw ""; }} catch (e) { | 26 | try { if (typeof(Clipperz.PM.DataModel.User) == 'undefined') { throw ""; }} catch (e) { |
30 | throw "Clipperz.PM.DataModel.User.Header.OneTimePasswords depends on Clipperz.PM.DataModel.User!"; | 27 | throw "Clipperz.PM.DataModel.User.Header.OneTimePasswords depends on Clipperz.PM.DataModel.User!"; |
31 | } | 28 | } |
32 | if (typeof(Clipperz.PM.DataModel.User.Header) == 'undefined') { Clipperz.PM.DataModel.User.Header = {}; } | 29 | if (typeof(Clipperz.PM.DataModel.User.Header) == 'undefined') { Clipperz.PM.DataModel.User.Header = {}; } |
33 | 30 | ||
34 | //----------------------------------------------------------------------------- | 31 | //----------------------------------------------------------------------------- |
35 | 32 | ||
36 | Clipperz.PM.DataModel.User.Header.OneTimePasswords = function(args) { | 33 | Clipperz.PM.DataModel.User.Header.OneTimePasswords = function(args) { |
37 | Clipperz.PM.DataModel.User.Header.OneTimePasswords.superclass.constructor.apply(this, arguments); | 34 | Clipperz.PM.DataModel.User.Header.OneTimePasswords.superclass.constructor.apply(this, arguments); |
38 | 35 | ||
39 | this._oneTimePasswords = null; | 36 | this._oneTimePasswords = null; |
40 | 37 | ||
41 | return this; | 38 | return this; |
42 | } | 39 | } |
43 | 40 | ||
44 | //----------------------------------------------------------------------------- | 41 | //----------------------------------------------------------------------------- |
45 | 42 | ||
46 | Clipperz.Base.extend(Clipperz.PM.DataModel.User.Header.OneTimePasswords, Clipperz.PM.DataModel.EncryptedRemoteObject, { | 43 | Clipperz.Base.extend(Clipperz.PM.DataModel.User.Header.OneTimePasswords, Clipperz.PM.DataModel.EncryptedRemoteObject, { |
47 | 44 | ||
48 | 'toString': function() { | 45 | 'toString': function() { |
49 | return "Clipperz.PM.DataModel.User.Header.OneTimePasswords"; | 46 | return "Clipperz.PM.DataModel.User.Header.OneTimePasswords"; |
50 | }, | 47 | }, |
51 | 48 | ||
52 | //------------------------------------------------------------------------- | 49 | //------------------------------------------------------------------------- |
53 | /* | 50 | /* |
54 | 'packData': function (someData) { //++ | 51 | 'packData': function (someData) { //++ |
55 | var result; | 52 | var result; |
56 | 53 | ||
57 | console.log(">>> OneTimePasswords.packData", someData); | 54 | console.log(">>> OneTimePasswords.packData", someData); |
58 | result = Clipperz.PM.DataModel.User.Header.OneTimePasswords.superclass.packData.apply(this, arguments); | 55 | result = Clipperz.PM.DataModel.User.Header.OneTimePasswords.superclass.packData.apply(this, arguments); |
59 | console.log("<<< OneTimePasswords.packData"); | 56 | console.log("<<< OneTimePasswords.packData"); |
60 | 57 | ||
61 | return result; | 58 | return result; |
62 | }, | 59 | }, |
63 | */ | 60 | */ |
64 | //------------------------------------------------------------------------- | 61 | //------------------------------------------------------------------------- |
65 | /* | 62 | /* |
66 | 'packRemoteData': function (someData) { | 63 | 'packRemoteData': function (someData) { |
67 | var result; | 64 | var result; |
68 | 65 | ||
69 | console.log(">>> OneTimePasswords.packRemoteData", someData); | 66 | console.log(">>> OneTimePasswords.packRemoteData", someData); |
70 | result = Clipperz.PM.DataModel.User.Header.OneTimePasswords.superclass.packRemoteData.apply(this, arguments); | 67 | result = Clipperz.PM.DataModel.User.Header.OneTimePasswords.superclass.packRemoteData.apply(this, arguments); |
71 | console.log("<<< OneTimePasswords.packRemoteData"); | 68 | console.log("<<< OneTimePasswords.packRemoteData"); |
72 | 69 | ||
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 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | try { if (typeof(Clipperz.PM.DataModel.User) == 'undefined') { throw ""; }} catch (e) { | 26 | try { if (typeof(Clipperz.PM.DataModel.User) == 'undefined') { throw ""; }} catch (e) { |
30 | throw "Clipperz.PM.DataModel.User.Header.Preferences depends on Clipperz.PM.DataModel.User!"; | 27 | throw "Clipperz.PM.DataModel.User.Header.Preferences depends on Clipperz.PM.DataModel.User!"; |
31 | } | 28 | } |
32 | 29 | ||
33 | if (typeof(Clipperz.PM.DataModel.User.Header) == 'undefined') { Clipperz.PM.DataModel.User.Header = {}; } | 30 | if (typeof(Clipperz.PM.DataModel.User.Header) == 'undefined') { Clipperz.PM.DataModel.User.Header = {}; } |
34 | 31 | ||
35 | Clipperz.PM.DataModel.User.Header.Preferences = function(args) { | 32 | Clipperz.PM.DataModel.User.Header.Preferences = function(args) { |
36 | Clipperz.PM.DataModel.User.Header.Preferences.superclass.constructor.apply(this, arguments); | 33 | Clipperz.PM.DataModel.User.Header.Preferences.superclass.constructor.apply(this, arguments); |
37 | 34 | ||
38 | return this; | 35 | return this; |
39 | } | 36 | } |
40 | 37 | ||
41 | 38 | ||
42 | Clipperz.Base.extend(Clipperz.PM.DataModel.User.Header.Preferences, Clipperz.PM.DataModel.EncryptedRemoteObject, { | 39 | Clipperz.Base.extend(Clipperz.PM.DataModel.User.Header.Preferences, Clipperz.PM.DataModel.EncryptedRemoteObject, { |
43 | 40 | ||
44 | 'toString': function() { | 41 | 'toString': function() { |
45 | return "Clipperz.PM.DataModel.User.Header.Preferences"; | 42 | return "Clipperz.PM.DataModel.User.Header.Preferences"; |
46 | }, | 43 | }, |
47 | 44 | ||
48 | //------------------------------------------------------------------------- | 45 | //------------------------------------------------------------------------- |
49 | //========================================================================= | 46 | //========================================================================= |
50 | __syntaxFix__: "syntax fix" | 47 | __syntaxFix__: "syntax fix" |
51 | }); | 48 | }); |
52 | 49 | ||
53 | 50 | ||
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,72 +1,69 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | try { if (typeof(Clipperz.PM.DataModel.User) == 'undefined') { throw ""; }} catch (e) { | 26 | try { if (typeof(Clipperz.PM.DataModel.User) == 'undefined') { throw ""; }} catch (e) { |
30 | throw "Clipperz.PM.DataModel.User.Header.RecordIndex depends on Clipperz.PM.DataModel.User!"; | 27 | throw "Clipperz.PM.DataModel.User.Header.RecordIndex depends on Clipperz.PM.DataModel.User!"; |
31 | } | 28 | } |
32 | 29 | ||
33 | if (typeof(Clipperz.PM.DataModel.User.Header) == 'undefined') { Clipperz.PM.DataModel.User.Header = {}; } | 30 | if (typeof(Clipperz.PM.DataModel.User.Header) == 'undefined') { Clipperz.PM.DataModel.User.Header = {}; } |
34 | 31 | ||
35 | Clipperz.PM.DataModel.User.Header.RecordIndex = function(args) { | 32 | Clipperz.PM.DataModel.User.Header.RecordIndex = function(args) { |
36 | Clipperz.PM.DataModel.User.Header.RecordIndex.superclass.constructor.apply(this, arguments); | 33 | Clipperz.PM.DataModel.User.Header.RecordIndex.superclass.constructor.apply(this, arguments); |
37 | 34 | ||
38 | //console.log("NEW Clipperz.PM.DataModel.User.Header.RecordIndex", args); | 35 | //console.log("NEW Clipperz.PM.DataModel.User.Header.RecordIndex", args); |
39 | this._recordsData = new Clipperz.PM.DataModel.EncryptedRemoteObject({ | 36 | this._recordsData = new Clipperz.PM.DataModel.EncryptedRemoteObject({ |
40 | 'name':'recordsData', | 37 | 'name':'recordsData', |
41 | 'retrieveKeyFunction': args.retrieveKeyFunction, | 38 | 'retrieveKeyFunction': args.retrieveKeyFunction, |
42 | 'remoteData': { | 39 | 'remoteData': { |
43 | 'data': args.recordsData['data'], | 40 | 'data': args.recordsData['data'], |
44 | 'version': args.encryptedDataVersion, | 41 | 'version': args.encryptedDataVersion, |
45 | 'recordsStats': args.recordsStats | 42 | 'recordsStats': args.recordsStats |
46 | }//, | 43 | }//, |
47 | // 'encryptedDataKeypath': 'data', | 44 | // 'encryptedDataKeypath': 'data', |
48 | // 'encryptedVersionKeypath': 'version' | 45 | // 'encryptedVersionKeypath': 'version' |
49 | }); | 46 | }); |
50 | 47 | ||
51 | this._directLoginsData = new Clipperz.PM.DataModel.EncryptedRemoteObject({ | 48 | this._directLoginsData = new Clipperz.PM.DataModel.EncryptedRemoteObject({ |
52 | 'name':'directLoginsData', | 49 | 'name':'directLoginsData', |
53 | 'retrieveKeyFunction': args.retrieveKeyFunction, | 50 | 'retrieveKeyFunction': args.retrieveKeyFunction, |
54 | 'remoteData': { | 51 | 'remoteData': { |
55 | 'data': args.directLoginsData['data'], | 52 | 'data': args.directLoginsData['data'], |
56 | 'version': args.encryptedDataVersion | 53 | 'version': args.encryptedDataVersion |
57 | }//, | 54 | }//, |
58 | // 'encryptedDataKeypath': 'data', | 55 | // 'encryptedDataKeypath': 'data', |
59 | // 'encryptedVersionKeypath': 'version' | 56 | // 'encryptedVersionKeypath': 'version' |
60 | }); | 57 | }); |
61 | 58 | ||
62 | this._lock = new MochiKit.Async.DeferredLock(); | 59 | this._lock = new MochiKit.Async.DeferredLock(); |
63 | this._transientState = null; | 60 | this._transientState = null; |
64 | 61 | ||
65 | this._retrieveRecordDetailFunction = args.retrieveRecordDetailFunction|| Clipperz.Base.exception.raise('MandatoryParameter'); | 62 | this._retrieveRecordDetailFunction = args.retrieveRecordDetailFunction|| Clipperz.Base.exception.raise('MandatoryParameter'); |
66 | this._recordsIndex = args.recordsData['index'] || Clipperz.Base.exception.raise('MandatoryParameter'); | 63 | this._recordsIndex = args.recordsData['index'] || Clipperz.Base.exception.raise('MandatoryParameter'); |
67 | this._directLoginsIndex = args.directLoginsData['index']|| Clipperz.Base.exception.raise('MandatoryParameter'); | 64 | this._directLoginsIndex = args.directLoginsData['index']|| Clipperz.Base.exception.raise('MandatoryParameter'); |
68 | 65 | ||
69 | this._records = null; | 66 | this._records = null; |
70 | 67 | ||
71 | return this; | 68 | return this; |
72 | } | 69 | } |
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,72 +1,69 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } | 28 | if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } |
32 | 29 | ||
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.DataModel.User = function (args) { | 33 | Clipperz.PM.DataModel.User = function (args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | Clipperz.PM.DataModel.User.superclass.constructor.apply(this, arguments); | 36 | Clipperz.PM.DataModel.User.superclass.constructor.apply(this, arguments); |
40 | 37 | ||
41 | this._username = args.username || null; | 38 | this._username = args.username || null; |
42 | this._getPassphraseFunction = args.getPassphraseFunction || null; | 39 | this._getPassphraseFunction = args.getPassphraseFunction || null; |
43 | 40 | ||
44 | this._data = null; | 41 | this._data = null; |
45 | 42 | ||
46 | this._connection = null; | 43 | this._connection = null; |
47 | this._connectionVersion = 'current'; | 44 | this._connectionVersion = 'current'; |
48 | 45 | ||
49 | this._serverData = null; | 46 | this._serverData = null; |
50 | this._serverLockValue = null; | 47 | this._serverLockValue = null; |
51 | this._transientState = null; | 48 | this._transientState = null; |
52 | 49 | ||
53 | this._deferredLocks = { | 50 | this._deferredLocks = { |
54 | 'passphrase': new MochiKit.Async.DeferredLock(), | 51 | 'passphrase': new MochiKit.Async.DeferredLock(), |
55 | 'serverData': new MochiKit.Async.DeferredLock(), | 52 | 'serverData': new MochiKit.Async.DeferredLock(), |
56 | // 'recordsIndex': new MochiKit.Async.DeferredLock(), | 53 | // 'recordsIndex': new MochiKit.Async.DeferredLock(), |
57 | // 'directLoginsIndex':new MochiKit.Async.DeferredLock() | 54 | // 'directLoginsIndex':new MochiKit.Async.DeferredLock() |
58 | // 'preferences': new MochiKit.Async.DeferredLock() | 55 | // 'preferences': new MochiKit.Async.DeferredLock() |
59 | // 'oneTimePasswords': new MochiKit.Async.DeferredLock() | 56 | // 'oneTimePasswords': new MochiKit.Async.DeferredLock() |
60 | '__syntaxFix__': 'syntax fix' | 57 | '__syntaxFix__': 'syntax fix' |
61 | }; | 58 | }; |
62 | 59 | ||
63 | return this; | 60 | return this; |
64 | } | 61 | } |
65 | 62 | ||
66 | Clipperz.Base.extend(Clipperz.PM.DataModel.User, Object, { | 63 | Clipperz.Base.extend(Clipperz.PM.DataModel.User, Object, { |
67 | 64 | ||
68 | 'toString': function () { | 65 | 'toString': function () { |
69 | return "Clipperz.PM.DataModel.User - " + this.username(); | 66 | return "Clipperz.PM.DataModel.User - " + this.username(); |
70 | }, | 67 | }, |
71 | 68 | ||
72 | //------------------------------------------------------------------------- | 69 | //------------------------------------------------------------------------- |