Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/DataModel/User.Header.RecordIndex.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/gamma/js/Clipperz/PM/DataModel/User.Header.RecordIndex.js | 15 |
1 files changed, 6 insertions, 9 deletions
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,88 +1,85 @@ | |||
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 | } |
73 | 70 | ||
74 | 71 | ||
75 | Clipperz.Base.extend(Clipperz.PM.DataModel.User.Header.RecordIndex, Object, { | 72 | Clipperz.Base.extend(Clipperz.PM.DataModel.User.Header.RecordIndex, Object, { |
76 | 73 | ||
77 | 'toString': function() { | 74 | 'toString': function() { |
78 | return "Clipperz.PM.DataModel.User.Header.RecordIndex"; | 75 | return "Clipperz.PM.DataModel.User.Header.RecordIndex"; |
79 | }, | 76 | }, |
80 | 77 | ||
81 | //------------------------------------------------------------------------- | 78 | //------------------------------------------------------------------------- |
82 | 79 | ||
83 | 'retrieveRecordDetailFunction': function () { | 80 | 'retrieveRecordDetailFunction': function () { |
84 | return this._retrieveRecordDetailFunction; | 81 | return this._retrieveRecordDetailFunction; |
85 | }, | 82 | }, |
86 | 83 | ||
87 | //------------------------------------------------------------------------- | 84 | //------------------------------------------------------------------------- |
88 | 85 | ||