summaryrefslogtreecommitdiff
path: root/frontend/beta/js/Clipperz
authorGiulio Cesare Solaroli <giulio.cesare@clipperz.com>2011-10-06 00:36:10 (UTC)
committer Giulio Cesare Solaroli <giulio.cesare@clipperz.com>2011-10-06 00:36:10 (UTC)
commit6ba274c79e60e417132b260bd0117c5a68121387 (patch) (unidiff)
tree57c1f95d0fbf9b80312c5c6b6f4a4f951e31c770 /frontend/beta/js/Clipperz
parent13ebf1b1987a1566d081ff1ba89b4dca197b7d2e (diff)
downloadclipperz-6ba274c79e60e417132b260bd0117c5a68121387.zip
clipperz-6ba274c79e60e417132b260bd0117c5a68121387.tar.gz
clipperz-6ba274c79e60e417132b260bd0117c5a68121387.tar.bz2
Fixed the copyright headers
Diffstat (limited to 'frontend/beta/js/Clipperz') (more/less context) (ignore whitespace changes)
-rw-r--r--frontend/beta/js/Clipperz/Base.js15
-rw-r--r--frontend/beta/js/Clipperz/ByteArray.js15
-rw-r--r--frontend/beta/js/Clipperz/CSVProcessor.js15
-rw-r--r--frontend/beta/js/Clipperz/Crypto/AES.js15
-rw-r--r--frontend/beta/js/Clipperz/Crypto/Base.js15
-rw-r--r--frontend/beta/js/Clipperz/Crypto/BigInt.js15
-rw-r--r--frontend/beta/js/Clipperz/Crypto/BigInt_scoped.js15
-rw-r--r--frontend/beta/js/Clipperz/Crypto/ECC.js15
-rw-r--r--frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Curve.js15
-rw-r--r--frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js15
-rw-r--r--frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Point.js15
-rw-r--r--frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Value.js15
-rw-r--r--frontend/beta/js/Clipperz/Crypto/PRNG.js15
-rw-r--r--frontend/beta/js/Clipperz/Crypto/RSA.js15
-rw-r--r--frontend/beta/js/Clipperz/Crypto/SHA.js15
-rw-r--r--frontend/beta/js/Clipperz/Crypto/SRP.js15
-rw-r--r--frontend/beta/js/Clipperz/DOM.js15
-rw-r--r--frontend/beta/js/Clipperz/Date.js15
-rw-r--r--frontend/beta/js/Clipperz/KeePassExportProcessor.js15
-rw-r--r--frontend/beta/js/Clipperz/NotificationCenter.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/BookmarkletProcessor.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/BaseComponent.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Compact/CompactHeader.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Compact/CompactInterface.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Compact/LoginForm.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/CSVImportComponent.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/ClipperzImportComponent.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/ExcelImportComponent.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/KeePassImportComponent.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/PasswordPlusImportComponent.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/RoboFormImportComponent.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/MessageBox.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/OTP/MainComponent.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Panels/BasePanel.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Panels/ContactsPanel.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Panels/DataPanel.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Panels/LoginPanel.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Panels/LogoutPanel.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Panels/ToolsPanel.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/PasswordEntropyDisplay.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/PasswordGenerator.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Printing/Footer.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Printing/Header.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Printing/Record.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/TabPanel/TabPanelController.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/TextFormField.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Connection.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Crypto.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/DataModel/DirectLogin.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/DataModel/DirectLoginBinding.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/DataModel/DirectLoginInput.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/DataModel/DirectLoginReference.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/DataModel/Header.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/DataModel/OneTimePassword.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/DataModel/OneTimePasswordManager.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/DataModel/Record.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/DataModel/RecordField.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/DataModel/RecordVersion.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/DataModel/Statistics.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/DataModel/User.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/DataModel/UserPreferences.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Date.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Main.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Proxy.js15
-rwxr-xr-xfrontend/beta/js/Clipperz/PM/Proxy/Proxy.JSON.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.js15
-rwxr-xr-xfrontend/beta/js/Clipperz/PM/Proxy/Proxy.PHP.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Proxy/Proxy.Test.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings/MessagePanelConfigurations.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings/Strings_de-DE.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings/Strings_el-GR.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings/Strings_en-CA.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings/Strings_en-GB.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings/Strings_en-US.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings/Strings_es-ES.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings/Strings_fr-FR.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings/Strings_he-IL.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings/Strings_it-IT.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings/Strings_ja-JP.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings/Strings_pt-BR.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings/Strings_pt-PT.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings/Strings_ru-RU.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings/Strings_zh-CN.js15
-rw-r--r--frontend/beta/js/Clipperz/PM/Toll.js15
-rw-r--r--frontend/beta/js/Clipperz/Profile.js15
-rw-r--r--frontend/beta/js/Clipperz/Set.js15
-rw-r--r--frontend/beta/js/Clipperz/Signal.js15
-rw-r--r--frontend/beta/js/Clipperz/Style.js15
-rw-r--r--frontend/beta/js/Clipperz/YUI/Collapser.js15
-rw-r--r--frontend/beta/js/Clipperz/YUI/DomHelper.js15
-rw-r--r--frontend/beta/js/Clipperz/YUI/DomQuery.js15
-rw-r--r--frontend/beta/js/Clipperz/YUI/Drawer.js15
-rw-r--r--frontend/beta/js/Clipperz/YUI/IBLayoutManager.js15
-rw-r--r--frontend/beta/js/Clipperz/YUI/IBLayoutRegion.js15
-rw-r--r--frontend/beta/js/Clipperz/YUI/MessageBox.js15
123 files changed, 738 insertions, 1107 deletions
diff --git a/frontend/beta/js/Clipperz/Base.js b/frontend/beta/js/Clipperz/Base.js
index 5bd972b..1c0504b 100644
--- a/frontend/beta/js/Clipperz/Base.js
+++ b/frontend/beta/js/Clipperz/Base.js
@@ -1,308 +1,305 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.Base) == 'undefined') { Clipperz.Base = {}; } 27if (typeof(Clipperz.Base) == 'undefined') { Clipperz.Base = {}; }
31 28
32Clipperz.Base.VERSION = "0.1"; 29Clipperz.Base.VERSION = "0.1";
33Clipperz.Base.NAME = "Clipperz.Base"; 30Clipperz.Base.NAME = "Clipperz.Base";
34 31
35MochiKit.Base.update(Clipperz.Base, { 32MochiKit.Base.update(Clipperz.Base, {
36 33
37 //------------------------------------------------------------------------- 34 //-------------------------------------------------------------------------
38 35
39 '__repr__': function () { 36 '__repr__': function () {
40 return "[" + this.NAME + " " + this.VERSION + "]"; 37 return "[" + this.NAME + " " + this.VERSION + "]";
41 }, 38 },
42 39
43 //------------------------------------------------------------------------- 40 //-------------------------------------------------------------------------
44 41
45 'toString': function () { 42 'toString': function () {
46 return this.__repr__(); 43 return this.__repr__();
47 }, 44 },
48 45
49 //------------------------------------------------------------------------- 46 //-------------------------------------------------------------------------
50 47
51 'trim': function (aValue) { 48 'trim': function (aValue) {
52 return aValue.replace(/^\s+|\s+$/g, ""); 49 return aValue.replace(/^\s+|\s+$/g, "");
53 }, 50 },
54 51
55 //------------------------------------------------------------------------- 52 //-------------------------------------------------------------------------
56 53
57 'stringToByteArray': function (aValue) { 54 'stringToByteArray': function (aValue) {
58 varresult; 55 varresult;
59 var i, c; 56 var i, c;
60 57
61 result = []; 58 result = [];
62 59
63 c = aValue.length; 60 c = aValue.length;
64 for (i=0; i<c; i++) { 61 for (i=0; i<c; i++) {
65 result[i] = aValue.charCodeAt(i); 62 result[i] = aValue.charCodeAt(i);
66 } 63 }
67 64
68 return result; 65 return result;
69 }, 66 },
70 67
71 //......................................................................... 68 //.........................................................................
72 69
73 'byteArrayToString': function (anArrayOfBytes) { 70 'byteArrayToString': function (anArrayOfBytes) {
74 varresult; 71 varresult;
75 var i, c; 72 var i, c;
76 73
77 result = ""; 74 result = "";
78 75
79 c = anArrayOfBytes.length; 76 c = anArrayOfBytes.length;
80 for (i=0; i<c; i++) { 77 for (i=0; i<c; i++) {
81 result += String.fromCharCode(anArrayOfBytes[i]); 78 result += String.fromCharCode(anArrayOfBytes[i]);
82 } 79 }
83 80
84 return result; 81 return result;
85 }, 82 },
86 83
87 //------------------------------------------------------------------------- 84 //-------------------------------------------------------------------------
88 85
89 'getValueForKeyInFormContent': function (aFormContent, aKey) { 86 'getValueForKeyInFormContent': function (aFormContent, aKey) {
90 return aFormContent[1][MochiKit.Base.find(aFormContent[0], aKey)]; 87 return aFormContent[1][MochiKit.Base.find(aFormContent[0], aKey)];
91 }, 88 },
92 89
93 //------------------------------------------------------------------------- 90 //-------------------------------------------------------------------------
94 91
95 'indexOfObjectInArray': function(anObject, anArray) { 92 'indexOfObjectInArray': function(anObject, anArray) {
96 varresult; 93 varresult;
97 vari, c; 94 vari, c;
98 95
99 result = -1; 96 result = -1;
100 97
101 c = anArray.length; 98 c = anArray.length;
102 for (i=0; ((i<c) && (result < 0)); i++) { 99 for (i=0; ((i<c) && (result < 0)); i++) {
103 if (anArray[i] === anObject) { 100 if (anArray[i] === anObject) {
104 result = i; 101 result = i;
105 } 102 }
106 } 103 }
107 104
108 return result; 105 return result;
109 }, 106 },
110 107
111 'removeObjectAtIndexFromArray': function(anIndex, anArray) { 108 'removeObjectAtIndexFromArray': function(anIndex, anArray) {
112 anArray.splice(anIndex, 1); 109 anArray.splice(anIndex, 1);
113 }, 110 },
114 111
115 'removeObjectFromArray': function(anObject, anArray) { 112 'removeObjectFromArray': function(anObject, anArray) {
116 varobjectIndex; 113 varobjectIndex;
117 114
118 objectIndex = Clipperz.Base.indexOfObjectInArray(anObject, anArray); 115 objectIndex = Clipperz.Base.indexOfObjectInArray(anObject, anArray);
119 if (objectIndex > -1) { 116 if (objectIndex > -1) {
120 Clipperz.Base.removeObjectAtIndexFromArray(objectIndex, anArray); 117 Clipperz.Base.removeObjectAtIndexFromArray(objectIndex, anArray);
121 } else { 118 } else {
122 // jslog.error("Trying to remove an object not present in the array"); 119 // jslog.error("Trying to remove an object not present in the array");
123 //TODO: raise an exception 120 //TODO: raise an exception
124 } 121 }
125 }, 122 },
126 123
127 'removeFromArray': function(anArray, anObject) { 124 'removeFromArray': function(anArray, anObject) {
128 return Clipperz.Base.removeObjectFromArray(anObject, anArray); 125 return Clipperz.Base.removeObjectFromArray(anObject, anArray);
129 }, 126 },
130 127
131 //------------------------------------------------------------------------- 128 //-------------------------------------------------------------------------
132 129
133 'splitStringAtFixedTokenSize': function(aString, aTokenSize) { 130 'splitStringAtFixedTokenSize': function(aString, aTokenSize) {
134 var result; 131 var result;
135 varstringToProcess; 132 varstringToProcess;
136 133
137 stringToProcess = aString; 134 stringToProcess = aString;
138 result = []; 135 result = [];
139 if (stringToProcess != null) { 136 if (stringToProcess != null) {
140 while (stringToProcess.length > aTokenSize) { 137 while (stringToProcess.length > aTokenSize) {
141 result.push(stringToProcess.substring(0, aTokenSize)); 138 result.push(stringToProcess.substring(0, aTokenSize));
142 stringToProcess = stringToProcess.substring(aTokenSize); 139 stringToProcess = stringToProcess.substring(aTokenSize);
143 } 140 }
144 141
145 result.push(stringToProcess); 142 result.push(stringToProcess);
146 } 143 }
147 144
148 return result; 145 return result;
149 }, 146 },
150 147
151 //------------------------------------------------------------------------- 148 //-------------------------------------------------------------------------
152 149
153 'objectType': function(anObject) { 150 'objectType': function(anObject) {
154 var result; 151 var result;
155 152
156 if (anObject == null) { 153 if (anObject == null) {
157 result = null; 154 result = null;
158 } else { 155 } else {
159 result = typeof(anObject); 156 result = typeof(anObject);
160 157
161 if (result == "object") { 158 if (result == "object") {
162 if (anObject instanceof Array) { 159 if (anObject instanceof Array) {
163 result = 'array' 160 result = 'array'
164 } else if (anObject.constructor == Boolean) { 161 } else if (anObject.constructor == Boolean) {
165 result = 'boolean' 162 result = 'boolean'
166 } else if (anObject instanceof Date) { 163 } else if (anObject instanceof Date) {
167 result = 'date' 164 result = 'date'
168 } else if (anObject instanceof Error) { 165 } else if (anObject instanceof Error) {
169 result = 'error' 166 result = 'error'
170 } else if (anObject instanceof Function) { 167 } else if (anObject instanceof Function) {
171 result = 'function' 168 result = 'function'
172 } else if (anObject.constructor == Number) { 169 } else if (anObject.constructor == Number) {
173 result = 'number' 170 result = 'number'
174 } else if (anObject.constructor == String) { 171 } else if (anObject.constructor == String) {
175 result = 'string' 172 result = 'string'
176 } else if (anObject instanceof Object) { 173 } else if (anObject instanceof Object) {
177 result = 'object' 174 result = 'object'
178 } else { 175 } else {
179 throw Clipperz.Base.exception.UnknownType; 176 throw Clipperz.Base.exception.UnknownType;
180 } 177 }
181 } 178 }
182 } 179 }
183 180
184 return result; 181 return result;
185 }, 182 },
186 183
187 //------------------------------------------------------------------------- 184 //-------------------------------------------------------------------------
188 185
189 'escapeHTML': function(aValue) { 186 'escapeHTML': function(aValue) {
190 var result; 187 var result;
191 188
192 result = aValue; 189 result = aValue;
193 result = result.replace(/</g, "&lt;"); 190 result = result.replace(/</g, "&lt;");
194 result = result.replace(/>/g, "&gt;"); 191 result = result.replace(/>/g, "&gt;");
195 192
196 return result; 193 return result;
197 }, 194 },
198 195
199 //------------------------------------------------------------------------- 196 //-------------------------------------------------------------------------
200 197
201 'deepClone': function(anObject) { 198 'deepClone': function(anObject) {
202 var result; 199 var result;
203 200
204 result = Clipperz.Base.evalJSON(Clipperz.Base.serializeJSON(anObject)); 201 result = Clipperz.Base.evalJSON(Clipperz.Base.serializeJSON(anObject));
205 202
206 return result; 203 return result;
207 }, 204 },
208 205
209 //------------------------------------------------------------------------- 206 //-------------------------------------------------------------------------
210 207
211 'evalJSON': function(aString) { 208 'evalJSON': function(aString) {
212/* 209/*
213 var result; 210 var result;
214 211
215 //check for XSS injection 212 //check for XSS injection
216 if (/<script>/.test(aString)) { 213 if (/<script>/.test(aString)) {
217 throw "error"; 214 throw "error";
218 } 215 }
219 216
220 if (/<iframe>/.test(aString)) { 217 if (/<iframe>/.test(aString)) {
221 throw "error"; 218 throw "error";
222 } 219 }
223 220
224 result = MochiKit.Base.evalJSON(aString); 221 result = MochiKit.Base.evalJSON(aString);
225 222
226 return result; 223 return result;
227*/ 224*/
228 225
229 // return MochiKit.Base.evalJSON(aString); 226 // return MochiKit.Base.evalJSON(aString);
230 return JSON2.parse(aString); 227 return JSON2.parse(aString);
231 }, 228 },
232 229
233 'serializeJSON': function(anObject) { 230 'serializeJSON': function(anObject) {
234 // return MochiKit.Base.serializeJSON(anObject); 231 // return MochiKit.Base.serializeJSON(anObject);
235 return JSON2.stringify(anObject); 232 return JSON2.stringify(anObject);
236 }, 233 },
237 234
238 //------------------------------------------------------------------------- 235 //-------------------------------------------------------------------------
239 236
240 'sanitizeString': function(aValue) { 237 'sanitizeString': function(aValue) {
241 var result; 238 var result;
242 239
243 if (Clipperz.Base.objectType(aValue) == 'string') { 240 if (Clipperz.Base.objectType(aValue) == 'string') {
244 result = aValue; 241 result = aValue;
245 result = result.replace(/</img,"&lt;"); 242 result = result.replace(/</img,"&lt;");
246 result = result.replace(/>/img,"&gt;"); 243 result = result.replace(/>/img,"&gt;");
247 } else { 244 } else {
248 result = aValue; 245 result = aValue;
249 } 246 }
250 247
251 return result; 248 return result;
252 }, 249 },
253 250
254 //------------------------------------------------------------------------- 251 //-------------------------------------------------------------------------
255 252
256 'exception': { 253 'exception': {
257 'AbstractMethod': new MochiKit.Base.NamedError("Clipperz.Base.exception.AbstractMethod"), 254 'AbstractMethod': new MochiKit.Base.NamedError("Clipperz.Base.exception.AbstractMethod"),
258 'UnknownType': new MochiKit.Base.NamedError("Clipperz.Base.exception.UnknownType"), 255 'UnknownType': new MochiKit.Base.NamedError("Clipperz.Base.exception.UnknownType"),
259 'VulnerabilityIssue':new MochiKit.Base.NamedError("Clipperz.Base.exception.VulnerabilityIssue") 256 'VulnerabilityIssue':new MochiKit.Base.NamedError("Clipperz.Base.exception.VulnerabilityIssue")
260 }, 257 },
261 258
262 //------------------------------------------------------------------------- 259 //-------------------------------------------------------------------------
263 __syntaxFix__: "syntax fix" 260 __syntaxFix__: "syntax fix"
264 261
265}); 262});
266 263
267 264
268 265
269MochiKit.Base.registerComparator('Object dummy comparator', 266MochiKit.Base.registerComparator('Object dummy comparator',
270 function(a, b) { 267 function(a, b) {
271 return ((a.constructor == Object) && (b.constructor == Object)); 268 return ((a.constructor == Object) && (b.constructor == Object));
272 }, 269 },
273 function(a, b) { 270 function(a, b) {
274 var result; 271 var result;
275 var aKeys; 272 var aKeys;
276 var bKeys; 273 var bKeys;
277 274
278//MochiKit.Logging.logDebug(">>> comparator"); 275//MochiKit.Logging.logDebug(">>> comparator");
279//MochiKit.Logging.logDebug("- a: " + Clipperz.Base.serializeJSON(a)); 276//MochiKit.Logging.logDebug("- a: " + Clipperz.Base.serializeJSON(a));
280//MochiKit.Logging.logDebug("- b: " + Clipperz.Base.serializeJSON(a)); 277//MochiKit.Logging.logDebug("- b: " + Clipperz.Base.serializeJSON(a));
281 aKeys = MochiKit.Base.keys(a).sort(); 278 aKeys = MochiKit.Base.keys(a).sort();
282 bKeys = MochiKit.Base.keys(b).sort(); 279 bKeys = MochiKit.Base.keys(b).sort();
283 280
284 result = MochiKit.Base.compare(aKeys, bKeys); 281 result = MochiKit.Base.compare(aKeys, bKeys);
285//if (result != 0) { 282//if (result != 0) {
286 //MochiKit.Logging.logDebug("- comparator 'keys':"); 283 //MochiKit.Logging.logDebug("- comparator 'keys':");
287 //MochiKit.Logging.logDebug("- comparator aKeys: " + Clipperz.Base.serializeJSON(aKeys)); 284 //MochiKit.Logging.logDebug("- comparator aKeys: " + Clipperz.Base.serializeJSON(aKeys));
288 //MochiKit.Logging.logDebug("- comparator bKeys: " + Clipperz.Base.serializeJSON(bKeys)); 285 //MochiKit.Logging.logDebug("- comparator bKeys: " + Clipperz.Base.serializeJSON(bKeys));
289//} 286//}
290 if (result == 0) { 287 if (result == 0) {
291 vari, c; 288 vari, c;
292 289
293 c = aKeys.length; 290 c = aKeys.length;
294 for (i=0; (i<c) && (result == 0); i++) { 291 for (i=0; (i<c) && (result == 0); i++) {
295 result = MochiKit.Base.compare(a[aKeys[i]], b[bKeys[i]]); 292 result = MochiKit.Base.compare(a[aKeys[i]], b[bKeys[i]]);
296//if (result != 0) { 293//if (result != 0) {
297 //MochiKit.Logging.logDebug("- comparator 'values':"); 294 //MochiKit.Logging.logDebug("- comparator 'values':");
298 //MochiKit.Logging.logDebug("- comparator a[aKeys[i]]: " + Clipperz.Base.serializeJSON(a[aKeys[i]])); 295 //MochiKit.Logging.logDebug("- comparator a[aKeys[i]]: " + Clipperz.Base.serializeJSON(a[aKeys[i]]));
299 //MochiKit.Logging.logDebug("- comparator b[bKeys[i]]: " + Clipperz.Base.serializeJSON(b[bKeys[i]])); 296 //MochiKit.Logging.logDebug("- comparator b[bKeys[i]]: " + Clipperz.Base.serializeJSON(b[bKeys[i]]));
300//} 297//}
301 } 298 }
302 } 299 }
303 300
304//MochiKit.Logging.logDebug("<<< comparator - result: " + result); 301//MochiKit.Logging.logDebug("<<< comparator - result: " + result);
305 return result; 302 return result;
306 }, 303 },
307 true 304 true
308); 305);
diff --git a/frontend/beta/js/Clipperz/ByteArray.js b/frontend/beta/js/Clipperz/ByteArray.js
index 2275087..a69aa43 100644
--- a/frontend/beta/js/Clipperz/ByteArray.js
+++ b/frontend/beta/js/Clipperz/ByteArray.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30 27
31//============================================================================= 28//=============================================================================
32 29
33Clipperz.ByteArray_abstract = function(args) { 30Clipperz.ByteArray_abstract = function(args) {
34 return this; 31 return this;
35} 32}
36 33
37Clipperz.ByteArray_abstract.prototype = MochiKit.Base.update(null, { 34Clipperz.ByteArray_abstract.prototype = MochiKit.Base.update(null, {
38 35
39 //------------------------------------------------------------------------- 36 //-------------------------------------------------------------------------
40 37
41 'toString': function() { 38 'toString': function() {
42 return "Clipperz.ByteArray_abstract"; 39 return "Clipperz.ByteArray_abstract";
43 }, 40 },
44 41
45 //------------------------------------------------------------------------- 42 //-------------------------------------------------------------------------
46 43
47 'equals': function(aValue) { 44 'equals': function(aValue) {
48 return (this.compare(aValue) == 0); 45 return (this.compare(aValue) == 0);
49 }, 46 },
50 47
51 //------------------------------------------------------------------------- 48 //-------------------------------------------------------------------------
52 49
53 'compare': function(aValue) { 50 'compare': function(aValue) {
54 var result; 51 var result;
55 var i; 52 var i;
56 53
57 result = MochiKit.Base.compare(this.length(), aValue.length()); 54 result = MochiKit.Base.compare(this.length(), aValue.length());
58 i = this.length(); 55 i = this.length();
59 56
60 while ((result == 0) && (i>0)) { 57 while ((result == 0) && (i>0)) {
61 i--; 58 i--;
62 result = MochiKit.Base.compare(this.byteAtIndex(i), aValue.byteAtIndex(i)); 59 result = MochiKit.Base.compare(this.byteAtIndex(i), aValue.byteAtIndex(i));
63 } 60 }
64 61
65 return result; 62 return result;
66 }, 63 },
67 64
68 //------------------------------------------------------------------------- 65 //-------------------------------------------------------------------------
69 66
70 'clone': function() { 67 'clone': function() {
71 throw Clipperz.Base.exception.AbstractMethod; 68 throw Clipperz.Base.exception.AbstractMethod;
72 }, 69 },
73 70
74 //------------------------------------------------------------------------- 71 //-------------------------------------------------------------------------
75 72
76 'newInstance': function() { 73 'newInstance': function() {
77 throw Clipperz.Base.exception.AbstractMethod; 74 throw Clipperz.Base.exception.AbstractMethod;
78 }, 75 },
79 76
80 //------------------------------------------------------------------------- 77 //-------------------------------------------------------------------------
81 78
82 'reset': function() { 79 'reset': function() {
83 throw Clipperz.Base.exception.AbstractMethod; 80 throw Clipperz.Base.exception.AbstractMethod;
84 }, 81 },
85 82
86 //------------------------------------------------------------------------- 83 //-------------------------------------------------------------------------
87 84
88 'length': function() { 85 'length': function() {
89 throw Clipperz.Base.exception.AbstractMethod; 86 throw Clipperz.Base.exception.AbstractMethod;
90 }, 87 },
91 88
92 //------------------------------------------------------------------------- 89 //-------------------------------------------------------------------------
93 90
94 'checkValue': function(aValue) { 91 'checkValue': function(aValue) {
95 if ((aValue & 0xff) != aValue) { 92 if ((aValue & 0xff) != aValue) {
96 MochiKit.Logging.logError("Clipperz.ByteArray.appendByte: the provided value (0x" + aValue.toString(16) + ") is not a byte value."); 93 MochiKit.Logging.logError("Clipperz.ByteArray.appendByte: the provided value (0x" + aValue.toString(16) + ") is not a byte value.");
97 throw Clipperz.ByteArray.exception.InvalidValue; 94 throw Clipperz.ByteArray.exception.InvalidValue;
98 } 95 }
99 }, 96 },
100 97
101 //------------------------------------------------------------------------- 98 //-------------------------------------------------------------------------
102 99
103 'xorMergeWithBlock': function(aBlock, anAllignment, paddingMode) { 100 'xorMergeWithBlock': function(aBlock, anAllignment, paddingMode) {
104 var result; 101 var result;
105 var a, b; 102 var a, b;
106 var aLength; 103 var aLength;
107 var bLength; 104 var bLength;
108 var i, c; 105 var i, c;
109 106
110 if (this.length() > aBlock.length()) { 107 if (this.length() > aBlock.length()) {
111 a = this; 108 a = this;
112 b = aBlock; 109 b = aBlock;
113 } else { 110 } else {
114 a = aBlock; 111 a = aBlock;
115 b = this; 112 b = this;
116 } 113 }
117 114
118 aLength = a.length(); 115 aLength = a.length();
119 bLength = b.length(); 116 bLength = b.length();
120 117
121 if (aLength != bLength) { 118 if (aLength != bLength) {
122 if (paddingMode == 'truncate') { 119 if (paddingMode == 'truncate') {
123 if (anAllignment == 'left') { 120 if (anAllignment == 'left') {
124 a = a.split(0, bLength); 121 a = a.split(0, bLength);
125 } else { 122 } else {
126 a = a.split(aLength - bLength); 123 a = a.split(aLength - bLength);
127 } 124 }
128 } else { 125 } else {
129 var ii, cc; 126 var ii, cc;
130 var padding; 127 var padding;
131 128
132 // padding = new Clipperz.ByteArray(); 129 // padding = new Clipperz.ByteArray();
133 padding = this.newInstance(); 130 padding = this.newInstance();
134 cc = aLength - bLength; 131 cc = aLength - bLength;
135 for (ii=0; ii<cc; ii++) { 132 for (ii=0; ii<cc; ii++) {
136 padding.appendByte(0); 133 padding.appendByte(0);
137 } 134 }
138 135
139 if (anAllignment == 'left') { 136 if (anAllignment == 'left') {
140 b = b.appendBlock(padding); 137 b = b.appendBlock(padding);
141 } else { 138 } else {
142 b = padding.appendBlock(b); 139 b = padding.appendBlock(b);
143 } 140 }
144 } 141 }
145 } 142 }
146 143
147 144
148 // result = new Clipperz.ByteArray(); 145 // result = new Clipperz.ByteArray();
149 result = this.newInstance(); 146 result = this.newInstance();
150 c = a.length(); 147 c = a.length();
151 for (i=0; i<c; i++) { 148 for (i=0; i<c; i++) {
152 result.appendByte(a.byteAtIndex(i) ^ b.byteAtIndex(i)); 149 result.appendByte(a.byteAtIndex(i) ^ b.byteAtIndex(i));
153 } 150 }
154 151
155 return result; 152 return result;
156 }, 153 },
157 154
158 //------------------------------------------------------------------------- 155 //-------------------------------------------------------------------------
159/* 156/*
160 'shiftLeft': function(aNumberOfBitsToShift) { 157 'shiftLeft': function(aNumberOfBitsToShift) {
161 var result; 158 var result;
162 159
163 result = this.clone(); //??????????? 160 result = this.clone(); //???????????
164 161
165 return result; 162 return result;
166 }, 163 },
167 */ 164 */
168 //------------------------------------------------------------------------- 165 //-------------------------------------------------------------------------
169 166
170 'appendBlock': function(aBlock) { 167 'appendBlock': function(aBlock) {
171 throw Clipperz.Base.exception.AbstractMethod; 168 throw Clipperz.Base.exception.AbstractMethod;
172 }, 169 },
173 170
174 //------------------------------------------------------------------------- 171 //-------------------------------------------------------------------------
175 172
176 'appendByte': function(aValue) { 173 'appendByte': function(aValue) {
177 throw Clipperz.Base.exception.AbstractMethod; 174 throw Clipperz.Base.exception.AbstractMethod;
178 }, 175 },
179 176
180 'appendBytes': function(args) { 177 'appendBytes': function(args) {
181 varvalues; 178 varvalues;
182 vari,c; 179 vari,c;
183 180
184 if (args.constructor == Array) { 181 if (args.constructor == Array) {
185 values = args; 182 values = args;
186 } else { 183 } else {
187 values = arguments; 184 values = arguments;
188 } 185 }
189 186
190 c = values.length; 187 c = values.length;
191 for (i=0; i<c; i++) { 188 for (i=0; i<c; i++) {
192 this.appendByte(values[i]); 189 this.appendByte(values[i]);
193 } 190 }
194 191
195 return this; 192 return this;
196 }, 193 },
197 194
198 //------------------------------------------------------------------------- 195 //-------------------------------------------------------------------------
199 196
200 'appendWord': function(aValue, isLittleEndian) { 197 'appendWord': function(aValue, isLittleEndian) {
201 var result; 198 var result;
202 var processAsLittleEndian; 199 var processAsLittleEndian;
203 200
204 processAsLittleEndian = isLittleEndian === true ? true : false; 201 processAsLittleEndian = isLittleEndian === true ? true : false;
205 202
206 if (processAsLittleEndian) { 203 if (processAsLittleEndian) {
207 result = this.appendBytes( (aValue) & 0xff, (aValue >> 8) & 0xff, (aValue >> 16) & 0xff, (aValue >> 24) & 0xff ); //little endian 204 result = this.appendBytes( (aValue) & 0xff, (aValue >> 8) & 0xff, (aValue >> 16) & 0xff, (aValue >> 24) & 0xff ); //little endian
208 } else { 205 } else {
209 result = this.appendBytes( (aValue >> 24) & 0xff, (aValue >> 16) & 0xff, (aValue >> 8) & 0xff, (aValue) & 0xff ); //big endian - DEFAULT 206 result = this.appendBytes( (aValue >> 24) & 0xff, (aValue >> 16) & 0xff, (aValue >> 8) & 0xff, (aValue) & 0xff ); //big endian - DEFAULT
210 } 207 }
211 208
212 return result; 209 return result;
213 }, 210 },
214 211
215 'appendWords': function(args) { 212 'appendWords': function(args) {
216 varvalues; 213 varvalues;
217 vari,c; 214 vari,c;
218 215
219 if (args.constructor == Array) { 216 if (args.constructor == Array) {
220 values = args; 217 values = args;
221 } else { 218 } else {
222 values = arguments; 219 values = arguments;
223 } 220 }
224 221
225 c = values.length; 222 c = values.length;
226 for (i=0; i<c; i++) { 223 for (i=0; i<c; i++) {
227 this.appendWord(values[i], false); 224 this.appendWord(values[i], false);
228 } 225 }
229 226
230 return this; 227 return this;
231 }, 228 },
232 229
233 //------------------------------------------------------------------------- 230 //-------------------------------------------------------------------------
234 231
235 'appendBigEndianWords': function(args) { 232 'appendBigEndianWords': function(args) {
236 varvalues; 233 varvalues;
237 vari,c; 234 vari,c;
238 235
239 if (args.constructor == Array) { 236 if (args.constructor == Array) {
240 values = args; 237 values = args;
241 } else { 238 } else {
242 values = arguments; 239 values = arguments;
243 } 240 }
244 241
245 c = values.length; 242 c = values.length;
246 for (i=0; i<c; i++) { 243 for (i=0; i<c; i++) {
247 this.appendWord(values[i], true); 244 this.appendWord(values[i], true);
248 } 245 }
249 246
250 return this; 247 return this;
251 }, 248 },
252 249
253 //------------------------------------------------------------------------- 250 //-------------------------------------------------------------------------
254 251
255 'byteAtIndex': function(anIndex) { 252 'byteAtIndex': function(anIndex) {
256 throw Clipperz.Base.exception.AbstractMethod; 253 throw Clipperz.Base.exception.AbstractMethod;
257 }, 254 },
258 255
259 'setByteAtIndex': function(aValue, anIndex) { 256 'setByteAtIndex': function(aValue, anIndex) {
260 throw Clipperz.Base.exception.AbstractMethod; 257 throw Clipperz.Base.exception.AbstractMethod;
261 }, 258 },
262 259
263 //------------------------------------------------------------------------- 260 //-------------------------------------------------------------------------
264 261
265 'bitAtIndex': function(aBitPosition) { 262 'bitAtIndex': function(aBitPosition) {
266 var result; 263 var result;
267 varbytePosition; 264 varbytePosition;
268 var bitPositionInSelectedByte; 265 var bitPositionInSelectedByte;
269 var selectedByte; 266 var selectedByte;
270 var selectedByteMask; 267 var selectedByteMask;
271 268
272 bytePosition = this.length() - Math.ceil((aBitPosition + 1)/ 8); 269 bytePosition = this.length() - Math.ceil((aBitPosition + 1)/ 8);
273 bitPositionInSelectedByte = aBitPosition % 8; 270 bitPositionInSelectedByte = aBitPosition % 8;
274 selectedByte = this.byteAtIndex(bytePosition); 271 selectedByte = this.byteAtIndex(bytePosition);
275 272
276 if (bitPositionInSelectedByte > 0) { 273 if (bitPositionInSelectedByte > 0) {
277 selectedByteMask = (1 << bitPositionInSelectedByte); 274 selectedByteMask = (1 << bitPositionInSelectedByte);
278 } else { 275 } else {
279 selectedByteMask = 1; 276 selectedByteMask = 1;
280 } 277 }
281 result = selectedByte & selectedByteMask ? 1 : 0; 278 result = selectedByte & selectedByteMask ? 1 : 0;
282//console.log("aBitPosition: " + aBitPosition + ", length: " + this.length() + ", bytePosition: " + bytePosition + ", bitPositionInSelectedByte: " + bitPositionInSelectedByte + ", selectedByteMask: " + selectedByteMask); 279//console.log("aBitPosition: " + aBitPosition + ", length: " + this.length() + ", bytePosition: " + bytePosition + ", bitPositionInSelectedByte: " + bitPositionInSelectedByte + ", selectedByteMask: " + selectedByteMask);
283 280
284 return result; 281 return result;
285 }, 282 },
286 283
287 //------------------------------------------------------------------------- 284 //-------------------------------------------------------------------------
288 285
289 'bitBlockAtIndexWithSize': function(aBitPosition, aSize) { 286 'bitBlockAtIndexWithSize': function(aBitPosition, aSize) {
290 var result; 287 var result;
291 var bitValue; 288 var bitValue;
292 var i,c; 289 var i,c;
293 290
294 result = 0; 291 result = 0;
295 c = aSize; 292 c = aSize;
296 for (i=0; i<c; i++) { 293 for (i=0; i<c; i++) {
297 bitValue = this.bitAtIndex(aBitPosition + i); 294 bitValue = this.bitAtIndex(aBitPosition + i);
298 result = result | bitValue << i; 295 result = result | bitValue << i;
299 } 296 }
300 297
301 return result; 298 return result;
302 }, 299 },
303 300
304 //------------------------------------------------------------------------- 301 //-------------------------------------------------------------------------
305 302
306 'asString': function() { 303 'asString': function() {
307 varresult; 304 varresult;
308 varlength; 305 varlength;
309 vari; 306 vari;
310 307
311//var startTime = new Date(); 308//var startTime = new Date();
312 309
313 //# result = ""; 310 //# result = "";
314 result = []; 311 result = [];
315 312
316 i = 0; 313 i = 0;
317 length = this.length(); 314 length = this.length();
318 315
319 while (i < length) { 316 while (i < length) {
320 varcurrentCharacter; 317 varcurrentCharacter;
321 varcurrentByte; 318 varcurrentByte;
322 varunicode; 319 varunicode;
323 320
324 currentByte = this.byteAtIndex(i); 321 currentByte = this.byteAtIndex(i);
325 322
326 if ((currentByte & 0x80) == 0x00 ) { //0xxxxxxx 323 if ((currentByte & 0x80) == 0x00 ) { //0xxxxxxx
327 unicode = currentByte; 324 unicode = currentByte;
328 currentCharacter = String.fromCharCode(unicode); 325 currentCharacter = String.fromCharCode(unicode);
329 } else if ((currentByte & 0xe0) == 0xc0 ) { //110xxxxx 10xxxxxx 326 } else if ((currentByte & 0xe0) == 0xc0 ) { //110xxxxx 10xxxxxx
330 unicode = (currentByte & 0x1f) << 6; 327 unicode = (currentByte & 0x1f) << 6;
331 i++; currentByte = this.byteAtIndex(i); 328 i++; currentByte = this.byteAtIndex(i);
332 unicode = unicode | (currentByte & 0x3f); 329 unicode = unicode | (currentByte & 0x3f);
333 330
334 currentCharacter = String.fromCharCode(unicode); 331 currentCharacter = String.fromCharCode(unicode);
335 } else if ((currentByte & 0xf0) == 0xe0 ) { //1110xxxx 10xxxxxx 10xxxxxx 332 } else if ((currentByte & 0xf0) == 0xe0 ) { //1110xxxx 10xxxxxx 10xxxxxx
336 unicode = (currentByte & 0x0f) << (6+6); 333 unicode = (currentByte & 0x0f) << (6+6);
337 i++; currentByte = this.byteAtIndex(i); 334 i++; currentByte = this.byteAtIndex(i);
338 unicode = unicode | ((currentByte & 0x3f) << 6); 335 unicode = unicode | ((currentByte & 0x3f) << 6);
339 i++; currentByte = this.byteAtIndex(i); 336 i++; currentByte = this.byteAtIndex(i);
340 unicode = unicode | (currentByte & 0x3f); 337 unicode = unicode | (currentByte & 0x3f);
341 338
342 currentCharacter = String.fromCharCode(unicode); 339 currentCharacter = String.fromCharCode(unicode);
343 } else { //11110xxx 10xxxxxx 10xxxxxx 10xxxxxx 340 } else { //11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
344 unicode = (currentByte & 0x07) << (6+6+6); 341 unicode = (currentByte & 0x07) << (6+6+6);
345 i++; currentByte = this.byteAtIndex(i); 342 i++; currentByte = this.byteAtIndex(i);
346 unicode = unicode | ((currentByte & 0x3f) << (6+6)); 343 unicode = unicode | ((currentByte & 0x3f) << (6+6));
347 i++; currentByte = this.byteAtIndex(i); 344 i++; currentByte = this.byteAtIndex(i);
348 unicode = unicode | ((currentByte & 0x3f) << 6); 345 unicode = unicode | ((currentByte & 0x3f) << 6);
349 i++; currentByte = this.byteAtIndex(i); 346 i++; currentByte = this.byteAtIndex(i);
350 unicode = unicode | (currentByte & 0x3f); 347 unicode = unicode | (currentByte & 0x3f);
351 348
352 currentCharacter = String.fromCharCode(unicode); 349 currentCharacter = String.fromCharCode(unicode);
353 } 350 }
354 351
355 // result += currentCharacter; 352 // result += currentCharacter;
356 result.push(currentCharacter); 353 result.push(currentCharacter);
357 i++; 354 i++;
358 } 355 }
359 356
360//MochiKit.Logging.logDebug("[" + (new Date() - startTime) + "] ByteArray.asString"); 357//MochiKit.Logging.logDebug("[" + (new Date() - startTime) + "] ByteArray.asString");
361 358
362 // return result; 359 // return result;
363 return result.join(""); 360 return result.join("");
364 }, 361 },
365 362
366 //------------------------------------------------------------------------- 363 //-------------------------------------------------------------------------
367 364
368 'toHexString': function() { 365 'toHexString': function() {
369 throw Clipperz.Base.exception.AbstractMethod; 366 throw Clipperz.Base.exception.AbstractMethod;
370 }, 367 },
371 368
372 //------------------------------------------------------------------------- 369 //-------------------------------------------------------------------------
373 370
374 'base64map': "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", 371 'base64map': "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
375 'base64mapIndex': "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(''), 372 'base64mapIndex': "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(''),
376 //'base64mapInvertedIndex': { 373 //'base64mapInvertedIndex': {
377 // 'A': 0, 'B': 1, 'C': 2, 'D': 3, 'E': 4, 'F': 5, 'G': 6, 'H': 7, 'I': 8, 'J': 9, 374 // 'A': 0, 'B': 1, 'C': 2, 'D': 3, 'E': 4, 'F': 5, 'G': 6, 'H': 7, 'I': 8, 'J': 9,
378 // 'K': 10, 'L': 11, 'M': 12, 'N': 13, 'O': 14, 'P': 15, 'Q': 16, 'R': 17, 'S': 18, 'T': 19, 375 // 'K': 10, 'L': 11, 'M': 12, 'N': 13, 'O': 14, 'P': 15, 'Q': 16, 'R': 17, 'S': 18, 'T': 19,
379 // 'U': 20, 'V': 21, 'W': 22, 'X': 23, 'Y': 24, 'Z': 25, 'a': 26, 'b': 27, 'c': 28, 'd': 29, 376 // 'U': 20, 'V': 21, 'W': 22, 'X': 23, 'Y': 24, 'Z': 25, 'a': 26, 'b': 27, 'c': 28, 'd': 29,
380 // 'e': 30, 'f': 31, 'g': 32, 'h': 33, 'i': 34, 'j': 35, 'k': 36, 'l': 37, 'm': 38, 'n': 39, 377 // 'e': 30, 'f': 31, 'g': 32, 'h': 33, 'i': 34, 'j': 35, 'k': 36, 'l': 37, 'm': 38, 'n': 39,
381 // 'o': 40, 'p': 41, 'q': 42, 'r': 43, 's': 44, 't': 45, 'u': 46, 'v': 47, 'w': 48, 'x': 49, 378 // 'o': 40, 'p': 41, 'q': 42, 'r': 43, 's': 44, 't': 45, 'u': 46, 'v': 47, 'w': 48, 'x': 49,
382 // 'y': 50, 'z': 51, '0': 52, '1': 53, '2': 54, '3': 55, '4': 56, '5': 57, '6': 58, '7': 59, 379 // 'y': 50, 'z': 51, '0': 52, '1': 53, '2': 54, '3': 55, '4': 56, '5': 57, '6': 58, '7': 59,
383 // '8': 60, '9': 61, '+': 62, '/': 63, 380 // '8': 60, '9': 61, '+': 62, '/': 63,
384 // "=": -1}, 381 // "=": -1},
385 382
386 //------------------------------------------------------------------------- 383 //-------------------------------------------------------------------------
387 384
388 'appendBase64String': function(aValue) { 385 'appendBase64String': function(aValue) {
389 var i; 386 var i;
390 var length; 387 var length;
391 388
392 length = aValue.length; 389 length = aValue.length;
393 390
394 if ((length % 4) != 0) { 391 if ((length % 4) != 0) {
395 MochiKit.Logging.logError("the value passed to the 'ByteArray.setBase64Value' is not correct"); 392 MochiKit.Logging.logError("the value passed to the 'ByteArray.setBase64Value' is not correct");
396 throw Clipperz.ByteArray.exception.InvalidValue; 393 throw Clipperz.ByteArray.exception.InvalidValue;
397 } 394 }
398 395
399 i = 0; 396 i = 0;
400 while (i<length) { 397 while (i<length) {
401 var value1, value2, value3, value4; 398 var value1, value2, value3, value4;
402 var byte1, byte2, byte3; 399 var byte1, byte2, byte3;
403 400
404 value1 = this.base64map.indexOf(aValue.charAt(i)); 401 value1 = this.base64map.indexOf(aValue.charAt(i));
405 value2 = this.base64map.indexOf(aValue.charAt(i+1)); 402 value2 = this.base64map.indexOf(aValue.charAt(i+1));
406 value3 = this.base64map.indexOf(aValue.charAt(i+2)); 403 value3 = this.base64map.indexOf(aValue.charAt(i+2));
407 value4 = this.base64map.indexOf(aValue.charAt(i+3)); 404 value4 = this.base64map.indexOf(aValue.charAt(i+3));
408 405
diff --git a/frontend/beta/js/Clipperz/CSVProcessor.js b/frontend/beta/js/Clipperz/CSVProcessor.js
index 164b02e..ec94206 100644
--- a/frontend/beta/js/Clipperz/CSVProcessor.js
+++ b/frontend/beta/js/Clipperz/CSVProcessor.js
@@ -1,348 +1,345 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30 27
31 28
32Clipperz.CSVProcessor = function(args) { 29Clipperz.CSVProcessor = function(args) {
33 args = args || {}; 30 args = args || {};
34 31
35 // this._status = undefined; 32 // this._status = undefined;
36 // this._error_input= undefined; 33 // this._error_input= undefined;
37 // this._string = undefined; 34 // this._string = undefined;
38 // this._fields = undefined; 35 // this._fields = undefined;
39 36
40 this._quoteChar = args['quoteChar'] ||"\042"; 37 this._quoteChar = args['quoteChar'] ||"\042";
41 this._eol = args['eol'] ||""; 38 this._eol = args['eol'] ||"";
42 this._escapeChar = args['escapeChar'] ||"\042"; 39 this._escapeChar = args['escapeChar'] ||"\042";
43 this._separatorChar = args['separatorChar'] ||","; 40 this._separatorChar = args['separatorChar'] ||",";
44 this._binary = args['binary'] ||false; 41 this._binary = args['binary'] ||false;
45 this._alwaysQuote = args['alwaysQuote'] ||false; 42 this._alwaysQuote = args['alwaysQuote'] ||false;
46 43
47 return this; 44 return this;
48} 45}
49 46
50//============================================================================= 47//=============================================================================
51 48
52Clipperz.CSVProcessor.prototype = MochiKit.Base.update(null, { 49Clipperz.CSVProcessor.prototype = MochiKit.Base.update(null, {
53 50
54 //------------------------------------------------------------------------- 51 //-------------------------------------------------------------------------
55 52
56 'quoteChar': function() { 53 'quoteChar': function() {
57 return this._quoteChar; 54 return this._quoteChar;
58 }, 55 },
59 56
60 //------------------------------------------------------------------------- 57 //-------------------------------------------------------------------------
61 58
62 'eol': function() { 59 'eol': function() {
63 return this._eol; 60 return this._eol;
64 }, 61 },
65 62
66 //------------------------------------------------------------------------- 63 //-------------------------------------------------------------------------
67 64
68 'escapeChar': function() { 65 'escapeChar': function() {
69 return this._escapeChar; 66 return this._escapeChar;
70 }, 67 },
71 68
72 //------------------------------------------------------------------------- 69 //-------------------------------------------------------------------------
73 70
74 'separatorChar': function() { 71 'separatorChar': function() {
75 return this._separatorChar; 72 return this._separatorChar;
76 }, 73 },
77 74
78 'setSeparatorChar': function(aValue) { 75 'setSeparatorChar': function(aValue) {
79 this._separatorChar = aValue; 76 this._separatorChar = aValue;
80 }, 77 },
81 78
82 //------------------------------------------------------------------------- 79 //-------------------------------------------------------------------------
83 80
84 'binary': function() { 81 'binary': function() {
85 return this._binary; 82 return this._binary;
86 }, 83 },
87 84
88 //------------------------------------------------------------------------- 85 //-------------------------------------------------------------------------
89 86
90 'alwaysQuote': function() { 87 'alwaysQuote': function() {
91 return this._alwaysQuote; 88 return this._alwaysQuote;
92 }, 89 },
93 90
94 //------------------------------------------------------------------------- 91 //-------------------------------------------------------------------------
95/* 92/*
96 'parse': function(aValue) { 93 'parse': function(aValue) {
97 var result; 94 var result;
98 var lines; 95 var lines;
99 var parameter; 96 var parameter;
100 97
101//MochiKit.Logging.logDebug(">>> CSVProcessor.parse"); 98//MochiKit.Logging.logDebug(">>> CSVProcessor.parse");
102 result = []; 99 result = [];
103 100
104 lines = aValue.replace(/\r?\n/g, "\n").replace(/^\n* /g, "").replace(/\n$/g, "");; 101 lines = aValue.replace(/\r?\n/g, "\n").replace(/^\n* /g, "").replace(/\n$/g, "");;
105 parameter = { 102 parameter = {
106 line: lines 103 line: lines
107 } 104 }
108 105
109 do { 106 do {
110 var fields; 107 var fields;
111 108
112 fields = this.parseLine(parameter); 109 fields = this.parseLine(parameter);
113 110
114 if (fields != null) { 111 if (fields != null) {
115 result.push(fields); 112 result.push(fields);
116 } 113 }
117 114
118 parameter.line = parameter.line.replace(/^\n* /g, "").replace(/\n$/g, ""); 115 parameter.line = parameter.line.replace(/^\n* /g, "").replace(/\n$/g, "");
119 116
120//MochiKit.Logging.logDebug("line: '" + parameter.line + "'"); 117//MochiKit.Logging.logDebug("line: '" + parameter.line + "'");
121 } while (parameter.line != ""); 118 } while (parameter.line != "");
122//MochiKit.Logging.logDebug("--- CSVProcessor.parse - result: " + Clipperz.Base.serializeJSON(result)); 119//MochiKit.Logging.logDebug("--- CSVProcessor.parse - result: " + Clipperz.Base.serializeJSON(result));
123//MochiKit.Logging.logDebug("<<< CSVProcessor.parse"); 120//MochiKit.Logging.logDebug("<<< CSVProcessor.parse");
124 121
125 return result; 122 return result;
126 }, 123 },
127*/ 124*/
128 //------------------------------------------------------------------------- 125 //-------------------------------------------------------------------------
129 126
130 'deferredParse_core': function(aContext) { 127 'deferredParse_core': function(aContext) {
131 var deferredResult; 128 var deferredResult;
132 129
133 if (aContext.line == "") { 130 if (aContext.line == "") {
134 deferredResult = MochiKit.Async.succeed(aContext.result); 131 deferredResult = MochiKit.Async.succeed(aContext.result);
135 } else { 132 } else {
136 var fields; 133 var fields;
137 134
138 fields = this.parseLine(aContext); 135 fields = this.parseLine(aContext);
139 if (fields != null) { 136 if (fields != null) {
140 aContext.result.push(fields); 137 aContext.result.push(fields);
141 } 138 }
142 139
143 aContext.line = aContext.line.replace(/^\n*/g, "").replace(/\n$/g, ""); 140 aContext.line = aContext.line.replace(/^\n*/g, "").replace(/\n$/g, "");
144 141
145 deferredResult = new MochiKit.Async.Deferred(); 142 deferredResult = new MochiKit.Async.Deferred();
146 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'importProcessorProgressUpdate', {status:'processing', size:aContext.size, progress:(aContext.size - aContext.line.length)}); 143 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'importProcessorProgressUpdate', {status:'processing', size:aContext.size, progress:(aContext.size - aContext.line.length)});
147 deferredResult.addCallback(MochiKit.Async.wait, 0.2); 144 deferredResult.addCallback(MochiKit.Async.wait, 0.2);
148 deferredResult.addCallback(MochiKit.Base.method(this, 'deferredParse_core')) 145 deferredResult.addCallback(MochiKit.Base.method(this, 'deferredParse_core'))
149 deferredResult.callback(aContext); 146 deferredResult.callback(aContext);
150 } 147 }
151 148
152 return deferredResult; 149 return deferredResult;
153 }, 150 },
154 151
155 //......................................................................... 152 //.........................................................................
156 153
157 'deferredParse': function(aValue) { 154 'deferredParse': function(aValue) {
158 var deferredResult; 155 var deferredResult;
159 var lines; 156 var lines;
160 var context; 157 var context;
161 158
162 lines = aValue.replace(/\r?\n/g, "\n").replace(/^\n*/g, "").replace(/\n$/g, ""); 159 lines = aValue.replace(/\r?\n/g, "\n").replace(/^\n*/g, "").replace(/\n$/g, "");
163 160
164 context = { 161 context = {
165 line: lines, 162 line: lines,
166 size: lines.length, 163 size: lines.length,
167 result: [] 164 result: []
168 } 165 }
169 166
170 deferredResult = new MochiKit.Async.Deferred(); 167 deferredResult = new MochiKit.Async.Deferred();
171 deferredResult.addCallback(MochiKit.Base.method(this, 'deferredParse_core')); 168 deferredResult.addCallback(MochiKit.Base.method(this, 'deferredParse_core'));
172 deferredResult.callback(context); 169 deferredResult.callback(context);
173 170
174 return deferredResult; 171 return deferredResult;
175 }, 172 },
176 173
177 //------------------------------------------------------------------------- 174 //-------------------------------------------------------------------------
178 175
179 'parseLine': function(aParameter) { 176 'parseLine': function(aParameter) {
180 var result; 177 var result;
181 var palatable; 178 var palatable;
182 var line; 179 var line;
183 var processedField; 180 var processedField;
184 181
185 result = []; 182 result = [];
186 183
187 do { 184 do {
188 processedField = this.parseField(aParameter); 185 processedField = this.parseField(aParameter);
189 if (processedField != null) { 186 if (processedField != null) {
190 result.push(processedField) 187 result.push(processedField)
191 }; 188 };
192 } while (processedField != null); 189 } while (processedField != null);
193 190
194 return result; 191 return result;
195 }, 192 },
196 193
197 //------------------------------------------------------------------------- 194 //-------------------------------------------------------------------------
198 195
199 'parseField': function(aParameter) { 196 'parseField': function(aParameter) {
200 var result; 197 var result;
201 198
202 var inQuotes; 199 var inQuotes;
203 var validRegExp; 200 var validRegExp;
204 var singleQuoteBeginRegexp; 201 var singleQuoteBeginRegexp;
205 var escapedQuoteBeginRegexp; 202 var escapedQuoteBeginRegexp;
206 var singleQuoteCommaEndRegexp; 203 var singleQuoteCommaEndRegexp;
207 var singleQuoteNewLineEndRegexp; 204 var singleQuoteNewLineEndRegexp;
208 var commaBeginRegexp; 205 var commaBeginRegexp;
209 var newlineRegexp; 206 var newlineRegexp;
210 207
211 208
212 singleQuoteBeginRegexp = new RegExp("^" + '\\' + this.quoteChar()); 209 singleQuoteBeginRegexp = new RegExp("^" + '\\' + this.quoteChar());
213 escapedQuoteBeginRegexp = new RegExp("^" + '\\' + this.escapeChar() + '\\' + this.quoteChar()); 210 escapedQuoteBeginRegexp = new RegExp("^" + '\\' + this.escapeChar() + '\\' + this.quoteChar());
214 singleQuoteCommaEndRegexp= new RegExp("^" + '\\' + this.quoteChar() + '\\' + this.separatorChar()); 211 singleQuoteCommaEndRegexp= new RegExp("^" + '\\' + this.quoteChar() + '\\' + this.separatorChar());
215 singleQuoteNewLineEndRegexp= new RegExp("^" + '\\' + this.quoteChar() + "\n"); 212 singleQuoteNewLineEndRegexp= new RegExp("^" + '\\' + this.quoteChar() + "\n");
216 commaBeginRegexp = new RegExp("^" + '\\' + this.separatorChar()); 213 commaBeginRegexp = new RegExp("^" + '\\' + this.separatorChar());
217 newlineRegexp = new RegExp("^\n"); 214 newlineRegexp = new RegExp("^\n");
218 215
219 inQuotes = false; 216 inQuotes = false;
220 217
221//MochiKit.Logging.logDebug("#################################### '" + aParameter.line + "'"); 218//MochiKit.Logging.logDebug("#################################### '" + aParameter.line + "'");
222 if (aParameter.line == "") { 219 if (aParameter.line == "") {
223 if (aParameter.isThereAnEmptyFinalField == true) { 220 if (aParameter.isThereAnEmptyFinalField == true) {
224 aParameter.isThereAnEmptyFinalField = false; 221 aParameter.isThereAnEmptyFinalField = false;
225 result = ""; 222 result = "";
226 } else { 223 } else {
227 result = null; 224 result = null;
228 } 225 }
229 } else { 226 } else {
230 if (this.binary()) { 227 if (this.binary()) {
231 validRegexp = /^./; 228 validRegexp = /^./;
232 // validRegexp = /^[^\\]/; 229 // validRegexp = /^[^\\]/;
233 } else { 230 } else {
234 validRegexp = /^[\t\040-\176]/; 231 validRegexp = /^[\t\040-\176]/;
235 } 232 }
236 233
237 try { 234 try {
238 var done; 235 var done;
239 236
240 done = false; 237 done = false;
241 result = ""; 238 result = "";
242 239
243 while (!done) { 240 while (!done) {
244 if (aParameter.line.length < 1) { 241 if (aParameter.line.length < 1) {
245//MochiKit.Logging.logDebug("---> 1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 242//MochiKit.Logging.logDebug("---> 1: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
246 if (inQuotes == true) { 243 if (inQuotes == true) {
247//MochiKit.Logging.logDebug("---> 1.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 244//MochiKit.Logging.logDebug("---> 1.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
248 throw new Error("CSV Parsing error; end of string, missing closing double-quote..."); 245 throw new Error("CSV Parsing error; end of string, missing closing double-quote...");
249 } else { 246 } else {
250//MochiKit.Logging.logDebug("---> 1.2: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 247//MochiKit.Logging.logDebug("---> 1.2: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
251 done = true; 248 done = true;
252 } 249 }
253 } else if (escapedQuoteBeginRegexp.test(aParameter.line)) { 250 } else if (escapedQuoteBeginRegexp.test(aParameter.line)) {
254//MochiKit.Logging.logDebug("---> 2.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 251//MochiKit.Logging.logDebug("---> 2.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
255 result += this.quoteChar(); 252 result += this.quoteChar();
256 aParameter.line = aParameter.line.substr(2, aParameter.line.length - 1); 253 aParameter.line = aParameter.line.substr(2, aParameter.line.length - 1);
257//MochiKit.Logging.logDebug("<--- 2.2: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 254//MochiKit.Logging.logDebug("<--- 2.2: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
258 } else if (singleQuoteBeginRegexp.test(aParameter.line)) { 255 } else if (singleQuoteBeginRegexp.test(aParameter.line)) {
259//MochiKit.Logging.logDebug("---> 3: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 256//MochiKit.Logging.logDebug("---> 3: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
260 if (inQuotes == true) { 257 if (inQuotes == true) {
261 if (aParameter.line.length == 1) { 258 if (aParameter.line.length == 1) {
262//MochiKit.Logging.logDebug("---> 3.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 259//MochiKit.Logging.logDebug("---> 3.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
263 aParameter.line = ''; 260 aParameter.line = '';
264 done = true; 261 done = true;
265 } else if (singleQuoteCommaEndRegexp.test(aParameter.line)) { 262 } else if (singleQuoteCommaEndRegexp.test(aParameter.line)) {
266//MochiKit.Logging.logDebug("---> 3.3: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 263//MochiKit.Logging.logDebug("---> 3.3: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
267 aParameter.line = aParameter.line.substr(2, aParameter.line.length - 1); 264 aParameter.line = aParameter.line.substr(2, aParameter.line.length - 1);
268 done = true; 265 done = true;
269//MochiKit.Logging.logDebug("<--- 3.3: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 266//MochiKit.Logging.logDebug("<--- 3.3: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
270 } else if (singleQuoteNewLineEndRegexp.test(aParameter.line)) { 267 } else if (singleQuoteNewLineEndRegexp.test(aParameter.line)) {
271 aParameter.line = aParameter.line.substr(1, aParameter.line.length - 1); 268 aParameter.line = aParameter.line.substr(1, aParameter.line.length - 1);
272 done = true; 269 done = true;
273 } else { 270 } else {
274 throw new Error("CSV Parsing error; double-quote, followed by undesirable character (bad character sequence)... " + aParameter.line); 271 throw new Error("CSV Parsing error; double-quote, followed by undesirable character (bad character sequence)... " + aParameter.line);
275 } 272 }
276 } else { 273 } else {
277//MochiKit.Logging.logDebug("---> 4: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 274//MochiKit.Logging.logDebug("---> 4: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
278 if (result == "") { 275 if (result == "") {
279//MochiKit.Logging.logDebug("---> 4.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 276//MochiKit.Logging.logDebug("---> 4.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
280 inQuotes = true; 277 inQuotes = true;
281 aParameter.line = aParameter.line.substr(1, aParameter.line.length - 1); 278 aParameter.line = aParameter.line.substr(1, aParameter.line.length - 1);
282//MochiKit.Logging.logDebug("<--- 4.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 279//MochiKit.Logging.logDebug("<--- 4.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
283 } else { 280 } else {
284 throw new Error("CSV Parsing error; double-quote, outside of double-quotes (bad character sequence)..."); 281 throw new Error("CSV Parsing error; double-quote, outside of double-quotes (bad character sequence)...");
285 } 282 }
286 } 283 }
287 } else if (commaBeginRegexp.test(aParameter.line)) { 284 } else if (commaBeginRegexp.test(aParameter.line)) {
288//MochiKit.Logging.logDebug("---> 5: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 285//MochiKit.Logging.logDebug("---> 5: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
289 if (inQuotes) { 286 if (inQuotes) {
290//MochiKit.Logging.logDebug("---> 5.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 287//MochiKit.Logging.logDebug("---> 5.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
291 result += aParameter.line.substr(0 ,1); 288 result += aParameter.line.substr(0 ,1);
292 aParameter.line = aParameter.line.substr(1, aParameter.line.length - 1); 289 aParameter.line = aParameter.line.substr(1, aParameter.line.length - 1);
293//MochiKit.Logging.logDebug("<--- 5.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 290//MochiKit.Logging.logDebug("<--- 5.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
294 } else { 291 } else {
295//MochiKit.Logging.logDebug("---> 5.2: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 292//MochiKit.Logging.logDebug("---> 5.2: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
296 aParameter.line = aParameter.line.substr(1, aParameter.line.length - 1); 293 aParameter.line = aParameter.line.substr(1, aParameter.line.length - 1);
297 if (newlineRegexp.test(aParameter.line) || aParameter.line == "") { 294 if (newlineRegexp.test(aParameter.line) || aParameter.line == "") {
298//MochiKit.Logging.logDebug("######"); 295//MochiKit.Logging.logDebug("######");
299 aParameter.isThereAnEmptyFinalField = true; 296 aParameter.isThereAnEmptyFinalField = true;
300 }; 297 };
301 done = true; 298 done = true;
302//MochiKit.Logging.logDebug("<--- 5.2: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 299//MochiKit.Logging.logDebug("<--- 5.2: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
303 } 300 }
304 } else if (validRegexp.test(aParameter.line)) { 301 } else if (validRegexp.test(aParameter.line)) {
305//MochiKit.Logging.logDebug("---> 6: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 302//MochiKit.Logging.logDebug("---> 6: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
306 result += aParameter.line.substr(0, 1); 303 result += aParameter.line.substr(0, 1);
307 aParameter.line = aParameter.line.substr(1, aParameter.line.length - 1); 304 aParameter.line = aParameter.line.substr(1, aParameter.line.length - 1);
308//MochiKit.Logging.logDebug("<--- 6: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 305//MochiKit.Logging.logDebug("<--- 6: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
309 } else if (newlineRegexp.test(aParameter.line)) { 306 } else if (newlineRegexp.test(aParameter.line)) {
310 if (inQuotes == true) { 307 if (inQuotes == true) {
311 result += aParameter.line.substr(0 ,1); 308 result += aParameter.line.substr(0 ,1);
312 aParameter.line = aParameter.line.substr(1, aParameter.line.length - 1); 309 aParameter.line = aParameter.line.substr(1, aParameter.line.length - 1);
313 } else { 310 } else {
314 if (result == "") { 311 if (result == "") {
315 if (aParameter.isThereAnEmptyFinalField == true) { 312 if (aParameter.isThereAnEmptyFinalField == true) {
316 aParameter.isThereAnEmptyFinalField = false; 313 aParameter.isThereAnEmptyFinalField = false;
317 } else { 314 } else {
318 result = null; 315 result = null;
319 } 316 }
320 } 317 }
321 318
322 done = true; 319 done = true;
323 } 320 }
324 } else { 321 } else {
325 throw new Error("CSV Parsing error; an undesirable character... '" + aParameter.line.substr(0,1) + "'"); 322 throw new Error("CSV Parsing error; an undesirable character... '" + aParameter.line.substr(0,1) + "'");
326 } 323 }
327 } 324 }
328 } catch(exception) { 325 } catch(exception) {
329 MochiKit.Logging.logError(exception.message); 326 MochiKit.Logging.logError(exception.message);
330 // result = null; 327 // result = null;
331 throw exception; 328 throw exception;
332 } 329 }
333 } 330 }
334 331
335//if (result != null) { 332//if (result != null) {
336 //MochiKit.Logging.logDebug("<=== result: '" + result.replace(/\n/g, "\\n") + "'"); 333 //MochiKit.Logging.logDebug("<=== result: '" + result.replace(/\n/g, "\\n") + "'");
337//} else { 334//} else {
338 //MochiKit.Logging.logDebug("<=== result: NULL"); 335 //MochiKit.Logging.logDebug("<=== result: NULL");
339//} 336//}
340 337
341 return result; 338 return result;
342 }, 339 },
343 340
344 //------------------------------------------------------------------------- 341 //-------------------------------------------------------------------------
345 __syntaxFix__: "syntax fix" 342 __syntaxFix__: "syntax fix"
346}); 343});
347 344
348 345
diff --git a/frontend/beta/js/Clipperz/Crypto/AES.js b/frontend/beta/js/Clipperz/Crypto/AES.js
index a60df5c..7ddda3e 100644
--- a/frontend/beta/js/Clipperz/Crypto/AES.js
+++ b/frontend/beta/js/Clipperz/Crypto/AES.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { 26try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) {
30 throw "Clipperz.Crypto.AES depends on Clipperz.ByteArray!"; 27 throw "Clipperz.Crypto.AES depends on Clipperz.ByteArray!";
31} 28}
32 29
33 //Dependency commented to avoid a circular reference 30 //Dependency commented to avoid a circular reference
34//try { if (typeof(Clipperz.Crypto.PRNG) == 'undefined') { throw ""; }} catch (e) { 31//try { if (typeof(Clipperz.Crypto.PRNG) == 'undefined') { throw ""; }} catch (e) {
35 //throw "Clipperz.Crypto.AES depends on Clipperz.Crypto.PRNG!"; 32 //throw "Clipperz.Crypto.AES depends on Clipperz.Crypto.PRNG!";
36//} 33//}
37 34
38if (typeof(Clipperz.Crypto.AES) == 'undefined') { Clipperz.Crypto.AES = {}; } 35if (typeof(Clipperz.Crypto.AES) == 'undefined') { Clipperz.Crypto.AES = {}; }
39 36
40//############################################################################# 37//#############################################################################
41 38
42Clipperz.Crypto.AES.DeferredExecutionContext = function(args) { 39Clipperz.Crypto.AES.DeferredExecutionContext = function(args) {
43 args = args || {}; 40 args = args || {};
44 41
45 this._key = args.key; 42 this._key = args.key;
46 this._message = args.message; 43 this._message = args.message;
47 this._result = args.message.clone(); 44 this._result = args.message.clone();
48 this._nonce = args.nonce; 45 this._nonce = args.nonce;
49 this._messageLength = this._message.length(); 46 this._messageLength = this._message.length();
50 47
51 this._messageArray = this._message.arrayValues(); 48 this._messageArray = this._message.arrayValues();
52 this._resultArray = this._result.arrayValues(); 49 this._resultArray = this._result.arrayValues();
53 this._nonceArray = this._nonce.arrayValues(); 50 this._nonceArray = this._nonce.arrayValues();
54 51
55 this._executionStep = 0; 52 this._executionStep = 0;
56 53
57 return this; 54 return this;
58} 55}
59 56
60Clipperz.Crypto.AES.DeferredExecutionContext.prototype = MochiKit.Base.update(null, { 57Clipperz.Crypto.AES.DeferredExecutionContext.prototype = MochiKit.Base.update(null, {
61 58
62 'key': function() { 59 'key': function() {
63 return this._key; 60 return this._key;
64 }, 61 },
65 62
66 'message': function() { 63 'message': function() {
67 return this._message; 64 return this._message;
68 }, 65 },
69 66
70 'messageLength': function() { 67 'messageLength': function() {
71 return this._messageLength; 68 return this._messageLength;
72 }, 69 },
73 70
74 'result': function() { 71 'result': function() {
75 return new Clipperz.ByteArray(this.resultArray()); 72 return new Clipperz.ByteArray(this.resultArray());
76 }, 73 },
77 74
78 'nonce': function() { 75 'nonce': function() {
79 return this._nonce; 76 return this._nonce;
80 }, 77 },
81 78
82 'messageArray': function() { 79 'messageArray': function() {
83 return this._messageArray; 80 return this._messageArray;
84 }, 81 },
85 82
86 'resultArray': function() { 83 'resultArray': function() {
87 return this._resultArray; 84 return this._resultArray;
88 }, 85 },
89 86
90 'nonceArray': function() { 87 'nonceArray': function() {
91 return this._nonceArray; 88 return this._nonceArray;
92 }, 89 },
93 90
94 'elaborationChunkSize': function() { 91 'elaborationChunkSize': function() {
95 return Clipperz.Crypto.AES.DeferredExecution.chunkSize; 92 return Clipperz.Crypto.AES.DeferredExecution.chunkSize;
96 }, 93 },
97 94
98 'executionStep': function() { 95 'executionStep': function() {
99 return this._executionStep; 96 return this._executionStep;
100 }, 97 },
101 98
102 'setExecutionStep': function(aValue) { 99 'setExecutionStep': function(aValue) {
103 this._executionStep = aValue; 100 this._executionStep = aValue;
104 }, 101 },
105 102
106 'pause': function(aValue) { 103 'pause': function(aValue) {
107 return MochiKit.Async.wait(Clipperz.Crypto.AES.DeferredExecution.pauseTime, aValue); 104 return MochiKit.Async.wait(Clipperz.Crypto.AES.DeferredExecution.pauseTime, aValue);
108 }, 105 },
109 106
110 //----------------------------------------------------------------------------- 107 //-----------------------------------------------------------------------------
111 __syntaxFix__: "syntax fix" 108 __syntaxFix__: "syntax fix"
112 109
113}); 110});
114 111
115//############################################################################# 112//#############################################################################
116 113
117Clipperz.Crypto.AES.Key = function(args) { 114Clipperz.Crypto.AES.Key = function(args) {
118 args = args || {}; 115 args = args || {};
119 116
120 this._key = args.key; 117 this._key = args.key;
121 this._keySize = args.keySize || this.key().length(); 118 this._keySize = args.keySize || this.key().length();
122 119
123 if (this.keySize() == 128/8) { 120 if (this.keySize() == 128/8) {
124 this._b = 176; 121 this._b = 176;
125 this._numberOfRounds = 10; 122 this._numberOfRounds = 10;
126 } else if (this.keySize() == 256/8) { 123 } else if (this.keySize() == 256/8) {
127 this._b = 240; 124 this._b = 240;
128 this._numberOfRounds = 14; 125 this._numberOfRounds = 14;
129 } else { 126 } else {
130 MochiKit.Logging.logError("AES unsupported key size: " + (this.keySize() * 8) + " bits"); 127 MochiKit.Logging.logError("AES unsupported key size: " + (this.keySize() * 8) + " bits");
131 throw Clipperz.Crypto.AES.exception.UnsupportedKeySize; 128 throw Clipperz.Crypto.AES.exception.UnsupportedKeySize;
132 } 129 }
133 130
134 this._stretchedKey = null; 131 this._stretchedKey = null;
135 132
136 return this; 133 return this;
137} 134}
138 135
139Clipperz.Crypto.AES.Key.prototype = MochiKit.Base.update(null, { 136Clipperz.Crypto.AES.Key.prototype = MochiKit.Base.update(null, {
140 137
141 'asString': function() { 138 'asString': function() {
142 return "Clipperz.Crypto.AES.Key (" + this.key().toHexString() + ")"; 139 return "Clipperz.Crypto.AES.Key (" + this.key().toHexString() + ")";
143 }, 140 },
144 141
145 //----------------------------------------------------------------------------- 142 //-----------------------------------------------------------------------------
146 143
147 'key': function() { 144 'key': function() {
148 return this._key; 145 return this._key;
149 }, 146 },
150 147
151 'keySize': function() { 148 'keySize': function() {
152 return this._keySize; 149 return this._keySize;
153 }, 150 },
154 151
155 'b': function() { 152 'b': function() {
156 return this._b; 153 return this._b;
157 }, 154 },
158 155
159 'numberOfRounds': function() { 156 'numberOfRounds': function() {
160 return this._numberOfRounds; 157 return this._numberOfRounds;
161 }, 158 },
162 //========================================================================= 159 //=========================================================================
163 160
164 'keyScheduleCore': function(aWord, aRoundConstantsIndex) { 161 'keyScheduleCore': function(aWord, aRoundConstantsIndex) {
165 varresult; 162 varresult;
166 var sbox; 163 var sbox;
167 164
168 sbox = Clipperz.Crypto.AES.sbox(); 165 sbox = Clipperz.Crypto.AES.sbox();
169 166
170 result = [sbox[aWord[1]] ^ Clipperz.Crypto.AES.roundConstants()[aRoundConstantsIndex], 167 result = [sbox[aWord[1]] ^ Clipperz.Crypto.AES.roundConstants()[aRoundConstantsIndex],
171 sbox[aWord[2]], 168 sbox[aWord[2]],
172 sbox[aWord[3]], 169 sbox[aWord[3]],
173 sbox[aWord[0]]]; 170 sbox[aWord[0]]];
174 171
175 return result; 172 return result;
176 }, 173 },
177 174
178 //----------------------------------------------------------------------------- 175 //-----------------------------------------------------------------------------
179 176
180 'xorWithPreviousStretchValues': function(aKey, aWord, aPreviousWordIndex) { 177 'xorWithPreviousStretchValues': function(aKey, aWord, aPreviousWordIndex) {
181 varresult; 178 varresult;
182 var i,c; 179 var i,c;
183 180
184 result = []; 181 result = [];
185 c = 4; 182 c = 4;
186 for (i=0; i<c; i++) { 183 for (i=0; i<c; i++) {
187 result[i] = aWord[i] ^ aKey.byteAtIndex(aPreviousWordIndex + i); 184 result[i] = aWord[i] ^ aKey.byteAtIndex(aPreviousWordIndex + i);
188 } 185 }
189 186
190 return result; 187 return result;
191 }, 188 },
192 189
193 //----------------------------------------------------------------------------- 190 //-----------------------------------------------------------------------------
194 191
195 'sboxShakeup': function(aWord) { 192 'sboxShakeup': function(aWord) {
196 var result; 193 var result;
197 var sbox; 194 var sbox;
198 var i,c; 195 var i,c;
199 196
200 result = []; 197 result = [];
201 sbox = Clipperz.Crypto.AES.sbox(); 198 sbox = Clipperz.Crypto.AES.sbox();
202 c =4; 199 c =4;
203 for (i=0; i<c; i++) { 200 for (i=0; i<c; i++) {
204 result[i] = sbox[aWord[i]]; 201 result[i] = sbox[aWord[i]];
205 } 202 }
206 203
207 return result; 204 return result;
208 }, 205 },
209 206
210 //----------------------------------------------------------------------------- 207 //-----------------------------------------------------------------------------
211 208
212 'stretchKey': function(aKey) { 209 'stretchKey': function(aKey) {
213 varcurrentWord; 210 varcurrentWord;
214 varkeyLength; 211 varkeyLength;
215 varpreviousStretchIndex; 212 varpreviousStretchIndex;
216 var i,c; 213 var i,c;
217 214
218 keyLength = aKey.length(); 215 keyLength = aKey.length();
219 previousStretchIndex = keyLength - this.keySize(); 216 previousStretchIndex = keyLength - this.keySize();
220 217
221 currentWord = [aKey.byteAtIndex(keyLength - 4), 218 currentWord = [aKey.byteAtIndex(keyLength - 4),
222 aKey.byteAtIndex(keyLength - 3), 219 aKey.byteAtIndex(keyLength - 3),
223 aKey.byteAtIndex(keyLength - 2), 220 aKey.byteAtIndex(keyLength - 2),
224 aKey.byteAtIndex(keyLength - 1)]; 221 aKey.byteAtIndex(keyLength - 1)];
225 currentWord = this.keyScheduleCore(currentWord, keyLength / this.keySize()); 222 currentWord = this.keyScheduleCore(currentWord, keyLength / this.keySize());
226 223
227 if (this.keySize() == 256/8) { 224 if (this.keySize() == 256/8) {
228 c = 8; 225 c = 8;
229 } else if (this.keySize() == 128/8){ 226 } else if (this.keySize() == 128/8){
230 c = 4; 227 c = 4;
231 } 228 }
232 229
233 for (i=0; i<c; i++) { 230 for (i=0; i<c; i++) {
234 if (i == 4) { 231 if (i == 4) {
235 //fifth streatch word 232 //fifth streatch word
236 currentWord = this.sboxShakeup(currentWord); 233 currentWord = this.sboxShakeup(currentWord);
237 } 234 }
238 235
239 currentWord = this.xorWithPreviousStretchValues(aKey, currentWord, previousStretchIndex + (i*4)); 236 currentWord = this.xorWithPreviousStretchValues(aKey, currentWord, previousStretchIndex + (i*4));
240 aKey.appendBytes(currentWord); 237 aKey.appendBytes(currentWord);
241 } 238 }
242 239
243 return aKey; 240 return aKey;
244 }, 241 },
245 242
246 //----------------------------------------------------------------------------- 243 //-----------------------------------------------------------------------------
247 244
248 'stretchedKey': function() { 245 'stretchedKey': function() {
249 if (this._stretchedKey == null) { 246 if (this._stretchedKey == null) {
250 var stretchedKey; 247 var stretchedKey;
251 248
252 stretchedKey = this.key().clone(); 249 stretchedKey = this.key().clone();
253 250
254 while (stretchedKey.length() < this.keySize()) { 251 while (stretchedKey.length() < this.keySize()) {
255 stretchedKey.appendByte(0); 252 stretchedKey.appendByte(0);
256 } 253 }
257 254
258 while (stretchedKey.length() < this.b()) { 255 while (stretchedKey.length() < this.b()) {
259 stretchedKey = this.stretchKey(stretchedKey); 256 stretchedKey = this.stretchKey(stretchedKey);
260 } 257 }
261 258
262 this._stretchedKey = stretchedKey.split(0, this.b()); 259 this._stretchedKey = stretchedKey.split(0, this.b());
263 } 260 }
264 261
265 return this._stretchedKey; 262 return this._stretchedKey;
266 }, 263 },
267 264
268 //========================================================================= 265 //=========================================================================
269 __syntaxFix__: "syntax fix" 266 __syntaxFix__: "syntax fix"
270}); 267});
271 268
272//############################################################################# 269//#############################################################################
273 270
274Clipperz.Crypto.AES.State = function(args) { 271Clipperz.Crypto.AES.State = function(args) {
275 args = args || {}; 272 args = args || {};
276 273
277 this._data = args.block; 274 this._data = args.block;
278 this._key = args.key; 275 this._key = args.key;
279 276
280 return this; 277 return this;
281} 278}
282 279
283Clipperz.Crypto.AES.State.prototype = MochiKit.Base.update(null, { 280Clipperz.Crypto.AES.State.prototype = MochiKit.Base.update(null, {
284 281
285 'key': function() { 282 'key': function() {
286 return this._key; 283 return this._key;
287 }, 284 },
288 285
289 //----------------------------------------------------------------------------- 286 //-----------------------------------------------------------------------------
290 287
291 'data': function() { 288 'data': function() {
292 return this._data; 289 return this._data;
293 }, 290 },
294 291
295 'setData': function(aValue) { 292 'setData': function(aValue) {
296 this._data = aValue; 293 this._data = aValue;
297 }, 294 },
298 295
299 //========================================================================= 296 //=========================================================================
300 297
301 'addRoundKey': function(aRoundNumber) { 298 'addRoundKey': function(aRoundNumber) {
302 //each byte of the state is combined with the round key; each round key is derived from the cipher key using a key schedule. 299 //each byte of the state is combined with the round key; each round key is derived from the cipher key using a key schedule.
303 vardata; 300 vardata;
304 varstretchedKey; 301 varstretchedKey;
305 varfirstStretchedKeyIndex; 302 varfirstStretchedKeyIndex;
306 var i,c; 303 var i,c;
307 304
308 data = this.data(); 305 data = this.data();
309 stretchedKey = this.key().stretchedKey(); 306 stretchedKey = this.key().stretchedKey();
310 firstStretchedKeyIndex = aRoundNumber * (128/8); 307 firstStretchedKeyIndex = aRoundNumber * (128/8);
311 c = 128/8; 308 c = 128/8;
312 for (i=0; i<c; i++) { 309 for (i=0; i<c; i++) {
313 data[i] = data[i] ^ stretchedKey.byteAtIndex(firstStretchedKeyIndex + i); 310 data[i] = data[i] ^ stretchedKey.byteAtIndex(firstStretchedKeyIndex + i);
314 } 311 }
315 }, 312 },
316 313
317 //----------------------------------------------------------------------------- 314 //-----------------------------------------------------------------------------
318 315
319 'subBytes': function() { 316 'subBytes': function() {
320 // a non-linear substitution step where each byte is replaced with another according to a lookup table. 317 // a non-linear substitution step where each byte is replaced with another according to a lookup table.
321 var i,c; 318 var i,c;
322 vardata; 319 vardata;
323 var sbox; 320 var sbox;
324 321
325 data = this.data(); 322 data = this.data();
326 sbox = Clipperz.Crypto.AES.sbox(); 323 sbox = Clipperz.Crypto.AES.sbox();
327 324
328 c = 16; 325 c = 16;
329 for (i=0; i<c; i++) { 326 for (i=0; i<c; i++) {
330 data[i] = sbox[data[i]]; 327 data[i] = sbox[data[i]];
331 } 328 }
332 }, 329 },
333 330
334 //----------------------------------------------------------------------------- 331 //-----------------------------------------------------------------------------
335 332
336 'shiftRows': function() { 333 'shiftRows': function() {
337 //a transposition step where each row of the state is shifted cyclically a certain number of steps. 334 //a transposition step where each row of the state is shifted cyclically a certain number of steps.
338 varnewValue; 335 varnewValue;
339 vardata; 336 vardata;
340 varshiftMapping; 337 varshiftMapping;
341 vari,c; 338 vari,c;
342 339
343 newValue = new Array(16); 340 newValue = new Array(16);
344 data = this.data(); 341 data = this.data();
345 shiftMapping = Clipperz.Crypto.AES.shiftRowMapping(); 342 shiftMapping = Clipperz.Crypto.AES.shiftRowMapping();
346 // [0, 5, 10, 15, 4, 9, 14, 3, 8, 13, 2, 7, 12, 1, 6, 11]; 343 // [0, 5, 10, 15, 4, 9, 14, 3, 8, 13, 2, 7, 12, 1, 6, 11];
347 c = 16; 344 c = 16;
348 for (i=0; i<c; i++) { 345 for (i=0; i<c; i++) {
349 newValue[i] = data[shiftMapping[i]]; 346 newValue[i] = data[shiftMapping[i]];
350 } 347 }
351 for (i=0; i<c; i++) { 348 for (i=0; i<c; i++) {
352 data[i] = newValue[i]; 349 data[i] = newValue[i];
353 } 350 }
354 }, 351 },
355 352
356 //----------------------------------------------------------------------------- 353 //-----------------------------------------------------------------------------
357/* 354/*
358 'mixColumnsWithValues': function(someValues) { 355 'mixColumnsWithValues': function(someValues) {
359 varresult; 356 varresult;
360 vara; 357 vara;
361 var i,c; 358 var i,c;
362 359
363 c = 4; 360 c = 4;
364 result = []; 361 result = [];
365 a = []; 362 a = [];
366 for (i=0; i<c; i++) { 363 for (i=0; i<c; i++) {
367 a[i] = []; 364 a[i] = [];
368 a[i][1] = someValues[i] 365 a[i][1] = someValues[i]
369 if ((a[i][1] & 0x80) == 0x80) { 366 if ((a[i][1] & 0x80) == 0x80) {
370 a[i][2] = (a[i][1] << 1) ^ 0x11b; 367 a[i][2] = (a[i][1] << 1) ^ 0x11b;
371 } else { 368 } else {
372 a[i][2] = a[i][1] << 1; 369 a[i][2] = a[i][1] << 1;
373 } 370 }
374 371
375 a[i][3] = a[i][2] ^ a[i][1]; 372 a[i][3] = a[i][2] ^ a[i][1];
376 } 373 }
377 374
378 for (i=0; i<c; i++) { 375 for (i=0; i<c; i++) {
379 varx; 376 varx;
380 377
381 x = Clipperz.Crypto.AES.mixColumnsMatrix()[i]; 378 x = Clipperz.Crypto.AES.mixColumnsMatrix()[i];
382 result[i] = a[0][x[0]] ^ a[1][x[1]] ^ a[2][x[2]] ^ a[3][x[3]]; 379 result[i] = a[0][x[0]] ^ a[1][x[1]] ^ a[2][x[2]] ^ a[3][x[3]];
383 } 380 }
384 381
385 return result; 382 return result;
386 }, 383 },
387 384
388 'mixColumns': function() { 385 'mixColumns': function() {
389 //a mixing operation which operates on the columns of the state, combining the four bytes in each column using a linear transformation. 386 //a mixing operation which operates on the columns of the state, combining the four bytes in each column using a linear transformation.
390 var data; 387 var data;
391 var i, c; 388 var i, c;
392 389
393 data = this.data(); 390 data = this.data();
394 c = 4; 391 c = 4;
395 for(i=0; i<c; i++) { 392 for(i=0; i<c; i++) {
396 varblockIndex; 393 varblockIndex;
397 var mixedValues; 394 var mixedValues;
398 395
399 blockIndex = i * 4; 396 blockIndex = i * 4;
400 mixedValues = this.mixColumnsWithValues([data[blockIndex + 0], 397 mixedValues = this.mixColumnsWithValues([data[blockIndex + 0],
401 data[blockIndex + 1], 398 data[blockIndex + 1],
402 data[blockIndex + 2], 399 data[blockIndex + 2],
403 data[blockIndex + 3]]); 400 data[blockIndex + 3]]);
404 data[blockIndex + 0] = mixedValues[0]; 401 data[blockIndex + 0] = mixedValues[0];
405 data[blockIndex + 1] = mixedValues[1]; 402 data[blockIndex + 1] = mixedValues[1];
406 data[blockIndex + 2] = mixedValues[2]; 403 data[blockIndex + 2] = mixedValues[2];
407 data[blockIndex + 3] = mixedValues[3]; 404 data[blockIndex + 3] = mixedValues[3];
408 } 405 }
diff --git a/frontend/beta/js/Clipperz/Crypto/Base.js b/frontend/beta/js/Clipperz/Crypto/Base.js
index b69dcc8..d3a8e36 100644
--- a/frontend/beta/js/Clipperz/Crypto/Base.js
+++ b/frontend/beta/js/Clipperz/Crypto/Base.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29try { if (typeof(Clipperz.Base) == 'undefined') { throw ""; }} catch (e) { 26try { if (typeof(Clipperz.Base) == 'undefined') { throw ""; }} catch (e) {
30 throw "Clipperz.Crypto.Base depends on Clipperz.Base!"; 27 throw "Clipperz.Crypto.Base depends on Clipperz.Base!";
31} 28}
32 29
33if (typeof(Clipperz.Crypto) == 'undefined') { Clipperz.Crypto = {}; } 30if (typeof(Clipperz.Crypto) == 'undefined') { Clipperz.Crypto = {}; }
34if (typeof(Clipperz.Crypto.Base) == 'undefined') { Clipperz.Crypto.Base = {}; } 31if (typeof(Clipperz.Crypto.Base) == 'undefined') { Clipperz.Crypto.Base = {}; }
35 32
36Clipperz.Crypto.Base.VERSION = "0.1"; 33Clipperz.Crypto.Base.VERSION = "0.1";
37Clipperz.Crypto.Base.NAME = "Clipperz.Crypto.Base"; 34Clipperz.Crypto.Base.NAME = "Clipperz.Crypto.Base";
38 35
39//############################################################################# 36//#############################################################################
40 //Downloaded on March 30, 2006 from http://anmar.eu.org/projects/jssha2/files/jssha2-0.3.zip (jsSha2/sha256.js) 37 //Downloaded on March 30, 2006 from http://anmar.eu.org/projects/jssha2/files/jssha2-0.3.zip (jsSha2/sha256.js)
41//############################################################################# 38//#############################################################################
42 39
43/* A JavaScript implementation of the Secure Hash Algorithm, SHA-256 40/* A JavaScript implementation of the Secure Hash Algorithm, SHA-256
44 * Version 0.3 Copyright Angel Marin 2003-2004 - http://anmar.eu.org/ 41 * Version 0.3 Copyright Angel Marin 2003-2004 - http://anmar.eu.org/
45 * Distributed under the BSD License 42 * Distributed under the BSD License
46 * Some bits taken from Paul Johnston's SHA-1 implementation 43 * Some bits taken from Paul Johnston's SHA-1 implementation
47 */ 44 */
48var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */ 45var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */
49function safe_add (x, y) { 46function safe_add (x, y) {
50 var lsw = (x & 0xFFFF) + (y & 0xFFFF); 47 var lsw = (x & 0xFFFF) + (y & 0xFFFF);
51 var msw = (x >> 16) + (y >> 16) + (lsw >> 16); 48 var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
52 return (msw << 16) | (lsw & 0xFFFF); 49 return (msw << 16) | (lsw & 0xFFFF);
53} 50}
54function S (X, n) {return ( X >>> n ) | (X << (32 - n));} 51function S (X, n) {return ( X >>> n ) | (X << (32 - n));}
55function R (X, n) {return ( X >>> n );} 52function R (X, n) {return ( X >>> n );}
56function Ch(x, y, z) {return ((x & y) ^ ((~x) & z));} 53function Ch(x, y, z) {return ((x & y) ^ ((~x) & z));}
57function Maj(x, y, z) {return ((x & y) ^ (x & z) ^ (y & z));} 54function Maj(x, y, z) {return ((x & y) ^ (x & z) ^ (y & z));}
58function Sigma0256(x) {return (S(x, 2) ^ S(x, 13) ^ S(x, 22));} 55function Sigma0256(x) {return (S(x, 2) ^ S(x, 13) ^ S(x, 22));}
59function Sigma1256(x) {return (S(x, 6) ^ S(x, 11) ^ S(x, 25));} 56function Sigma1256(x) {return (S(x, 6) ^ S(x, 11) ^ S(x, 25));}
60function Gamma0256(x) {return (S(x, 7) ^ S(x, 18) ^ R(x, 3));} 57function Gamma0256(x) {return (S(x, 7) ^ S(x, 18) ^ R(x, 3));}
61function Gamma1256(x) {return (S(x, 17) ^ S(x, 19) ^ R(x, 10));} 58function Gamma1256(x) {return (S(x, 17) ^ S(x, 19) ^ R(x, 10));}
62function core_sha256 (m, l) { 59function core_sha256 (m, l) {
63 var K = new Array(0x428A2F98,0x71374491,0xB5C0FBCF,0xE9B5DBA5,0x3956C25B,0x59F111F1,0x923F82A4,0xAB1C5ED5,0xD807AA98,0x12835B01,0x243185BE,0x550C7DC3,0x72BE5D74,0x80DEB1FE,0x9BDC06A7,0xC19BF174,0xE49B69C1,0xEFBE4786,0xFC19DC6,0x240CA1CC,0x2DE92C6F,0x4A7484AA,0x5CB0A9DC,0x76F988DA,0x983E5152,0xA831C66D,0xB00327C8,0xBF597FC7,0xC6E00BF3,0xD5A79147,0x6CA6351,0x14292967,0x27B70A85,0x2E1B2138,0x4D2C6DFC,0x53380D13,0x650A7354,0x766A0ABB,0x81C2C92E,0x92722C85,0xA2BFE8A1,0xA81A664B,0xC24B8B70,0xC76C51A3,0xD192E819,0xD6990624,0xF40E3585,0x106AA070,0x19A4C116,0x1E376C08,0x2748774C,0x34B0BCB5,0x391C0CB3,0x4ED8AA4A,0x5B9CCA4F,0x682E6FF3,0x748F82EE,0x78A5636F,0x84C87814,0x8CC70208,0x90BEFFFA,0xA4506CEB,0xBEF9A3F7,0xC67178F2); 60 var K = new Array(0x428A2F98,0x71374491,0xB5C0FBCF,0xE9B5DBA5,0x3956C25B,0x59F111F1,0x923F82A4,0xAB1C5ED5,0xD807AA98,0x12835B01,0x243185BE,0x550C7DC3,0x72BE5D74,0x80DEB1FE,0x9BDC06A7,0xC19BF174,0xE49B69C1,0xEFBE4786,0xFC19DC6,0x240CA1CC,0x2DE92C6F,0x4A7484AA,0x5CB0A9DC,0x76F988DA,0x983E5152,0xA831C66D,0xB00327C8,0xBF597FC7,0xC6E00BF3,0xD5A79147,0x6CA6351,0x14292967,0x27B70A85,0x2E1B2138,0x4D2C6DFC,0x53380D13,0x650A7354,0x766A0ABB,0x81C2C92E,0x92722C85,0xA2BFE8A1,0xA81A664B,0xC24B8B70,0xC76C51A3,0xD192E819,0xD6990624,0xF40E3585,0x106AA070,0x19A4C116,0x1E376C08,0x2748774C,0x34B0BCB5,0x391C0CB3,0x4ED8AA4A,0x5B9CCA4F,0x682E6FF3,0x748F82EE,0x78A5636F,0x84C87814,0x8CC70208,0x90BEFFFA,0xA4506CEB,0xBEF9A3F7,0xC67178F2);
64 var HASH = new Array(0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19); 61 var HASH = new Array(0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19);
65 var W = new Array(64); 62 var W = new Array(64);
66 var a, b, c, d, e, f, g, h, i, j; 63 var a, b, c, d, e, f, g, h, i, j;
67 var T1, T2; 64 var T1, T2;
68 /* append padding */ 65 /* append padding */
69 m[l >> 5] |= 0x80 << (24 - l % 32); 66 m[l >> 5] |= 0x80 << (24 - l % 32);
70 m[((l + 64 >> 9) << 4) + 15] = l; 67 m[((l + 64 >> 9) << 4) + 15] = l;
71 for ( var i = 0; i<m.length; i+=16 ) { 68 for ( var i = 0; i<m.length; i+=16 ) {
72 a = HASH[0]; b = HASH[1]; c = HASH[2]; d = HASH[3]; e = HASH[4]; f = HASH[5]; g = HASH[6]; h = HASH[7]; 69 a = HASH[0]; b = HASH[1]; c = HASH[2]; d = HASH[3]; e = HASH[4]; f = HASH[5]; g = HASH[6]; h = HASH[7];
73 for ( var j = 0; j<64; j++) { 70 for ( var j = 0; j<64; j++) {
74 if (j < 16) W[j] = m[j + i]; 71 if (j < 16) W[j] = m[j + i];
75 else W[j] = safe_add(safe_add(safe_add(Gamma1256(W[j - 2]), W[j - 7]), Gamma0256(W[j - 15])), W[j - 16]); 72 else W[j] = safe_add(safe_add(safe_add(Gamma1256(W[j - 2]), W[j - 7]), Gamma0256(W[j - 15])), W[j - 16]);
76 T1 = safe_add(safe_add(safe_add(safe_add(h, Sigma1256(e)), Ch(e, f, g)), K[j]), W[j]); 73 T1 = safe_add(safe_add(safe_add(safe_add(h, Sigma1256(e)), Ch(e, f, g)), K[j]), W[j]);
77 T2 = safe_add(Sigma0256(a), Maj(a, b, c)); 74 T2 = safe_add(Sigma0256(a), Maj(a, b, c));
78 h = g; g = f; f = e; e = safe_add(d, T1); d = c; c = b; b = a; a = safe_add(T1, T2); 75 h = g; g = f; f = e; e = safe_add(d, T1); d = c; c = b; b = a; a = safe_add(T1, T2);
79 } 76 }
80 HASH[0] = safe_add(a, HASH[0]); HASH[1] = safe_add(b, HASH[1]); HASH[2] = safe_add(c, HASH[2]); HASH[3] = safe_add(d, HASH[3]); HASH[4] = safe_add(e, HASH[4]); HASH[5] = safe_add(f, HASH[5]); HASH[6] = safe_add(g, HASH[6]); HASH[7] = safe_add(h, HASH[7]); 77 HASH[0] = safe_add(a, HASH[0]); HASH[1] = safe_add(b, HASH[1]); HASH[2] = safe_add(c, HASH[2]); HASH[3] = safe_add(d, HASH[3]); HASH[4] = safe_add(e, HASH[4]); HASH[5] = safe_add(f, HASH[5]); HASH[6] = safe_add(g, HASH[6]); HASH[7] = safe_add(h, HASH[7]);
81 } 78 }
82 return HASH; 79 return HASH;
83} 80}
84function str2binb (str) { 81function str2binb (str) {
85 var bin = Array(); 82 var bin = Array();
86 var mask = (1 << chrsz) - 1; 83 var mask = (1 << chrsz) - 1;
87 for(var i = 0; i < str.length * chrsz; i += chrsz) 84 for(var i = 0; i < str.length * chrsz; i += chrsz)
88 bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (24 - i%32); 85 bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (24 - i%32);
89 return bin; 86 return bin;
90} 87}
91function binb2hex (binarray) { 88function binb2hex (binarray) {
92 var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */ 89 var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */
93 var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; 90 var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
94 var str = ""; 91 var str = "";
95 for (var i = 0; i < binarray.length * 4; i++) { 92 for (var i = 0; i < binarray.length * 4; i++) {
96 str += hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8+4)) & 0xF) + hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8 )) & 0xF); 93 str += hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8+4)) & 0xF) + hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8 )) & 0xF);
97 } 94 }
98 return str; 95 return str;
99} 96}
100function hex_sha256(s){return binb2hex(core_sha256(str2binb(s),s.length * chrsz));} 97function hex_sha256(s){return binb2hex(core_sha256(str2binb(s),s.length * chrsz));}
101 98
102 99
103 100
104//############################################################################# 101//#############################################################################
105 //Downloaded on March 30, 2006 from http://www.fourmilab.ch/javascrypt/javascrypt.zip (entropy.js) 102 //Downloaded on March 30, 2006 from http://www.fourmilab.ch/javascrypt/javascrypt.zip (entropy.js)
106//############################################################################# 103//#############################################################################
107 104
108 // Entropy collection utilities 105 // Entropy collection utilities
109 106
110 /*Start by declaring static storage and initialise 107 /*Start by declaring static storage and initialise
111 the entropy vector from the time we come through 108 the entropy vector from the time we come through
112 here. */ 109 here. */
113 110
114 var entropyData = new Array(); // Collected entropy data 111 var entropyData = new Array(); // Collected entropy data
115 var edlen = 0; // Keyboard array data length 112 var edlen = 0; // Keyboard array data length
116 113
117 addEntropyTime(); // Start entropy collection with page load time 114 addEntropyTime(); // Start entropy collection with page load time
118 ce(); // Roll milliseconds into initial entropy 115 ce(); // Roll milliseconds into initial entropy
119 116
120 //Add a byte to the entropy vector 117 //Add a byte to the entropy vector
121 118
122 function addEntropyByte(b) { 119 function addEntropyByte(b) {
123 entropyData[edlen++] = b; 120 entropyData[edlen++] = b;
124 } 121 }
125 122
126 /*Capture entropy. When the user presses a key or performs 123 /*Capture entropy. When the user presses a key or performs
127 various other events for which we can request 124 various other events for which we can request
128 notification, add the time in 255ths of a second to the 125 notification, add the time in 255ths of a second to the
129 entropyData array. The name of the function is short 126 entropyData array. The name of the function is short
130 so it doesn't bloat the form object declarations in 127 so it doesn't bloat the form object declarations in
131 which it appears in various "onXXX" events. */ 128 which it appears in various "onXXX" events. */
132 129
133 function ce() { 130 function ce() {
134 addEntropyByte(Math.floor((((new Date).getMilliseconds()) * 255) / 999)); 131 addEntropyByte(Math.floor((((new Date).getMilliseconds()) * 255) / 999));
135 } 132 }
136 133
137 //Add a 32 bit quantity to the entropy vector 134 //Add a 32 bit quantity to the entropy vector
138 135
139 function addEntropy32(w) { 136 function addEntropy32(w) {
140 var i; 137 var i;
141 138
142 for (i = 0; i < 4; i++) { 139 for (i = 0; i < 4; i++) {
143 addEntropyByte(w & 0xFF); 140 addEntropyByte(w & 0xFF);
144 w >>= 8; 141 w >>= 8;
145 } 142 }
146 } 143 }
147 144
148 /*Add the current time and date (milliseconds since the epoch, 145 /*Add the current time and date (milliseconds since the epoch,
149 truncated to 32 bits) to the entropy vector. */ 146 truncated to 32 bits) to the entropy vector. */
150 147
151 function addEntropyTime() { 148 function addEntropyTime() {
152 addEntropy32((new Date()).getTime()); 149 addEntropy32((new Date()).getTime());
153 } 150 }
154 151
155 /* Start collection of entropy from mouse movements. The 152 /* Start collection of entropy from mouse movements. The
156 argument specifies the number of entropy items to be 153 argument specifies the number of entropy items to be
157 obtained from mouse motion, after which mouse motion 154 obtained from mouse motion, after which mouse motion
158 will be ignored. Note that you can re-enable mouse 155 will be ignored. Note that you can re-enable mouse
159 motion collection at any time if not already underway. */ 156 motion collection at any time if not already underway. */
160 157
161 var mouseMotionCollect = 0; 158 var mouseMotionCollect = 0;
162 var oldMoveHandler; // For saving and restoring mouse move handler in IE4 159 var oldMoveHandler; // For saving and restoring mouse move handler in IE4
163 160
164 function mouseMotionEntropy(maxsamp) { 161 function mouseMotionEntropy(maxsamp) {
165 if (mouseMotionCollect <= 0) { 162 if (mouseMotionCollect <= 0) {
166 mouseMotionCollect = maxsamp; 163 mouseMotionCollect = maxsamp;
167 if ((document.implementation.hasFeature("Events", "2.0")) && 164 if ((document.implementation.hasFeature("Events", "2.0")) &&
168 document.addEventListener) { 165 document.addEventListener) {
169 // Browser supports Document Object Model (DOM) 2 events 166 // Browser supports Document Object Model (DOM) 2 events
170 document.addEventListener("mousemove", mouseMoveEntropy, false); 167 document.addEventListener("mousemove", mouseMoveEntropy, false);
171 } else { 168 } else {
172 if (document.attachEvent) { 169 if (document.attachEvent) {
173 // Internet Explorer 5 and above event model 170 // Internet Explorer 5 and above event model
174 document.attachEvent("onmousemove", mouseMoveEntropy); 171 document.attachEvent("onmousemove", mouseMoveEntropy);
175 } else { 172 } else {
176 //Internet Explorer 4 event model 173 //Internet Explorer 4 event model
177 oldMoveHandler = document.onmousemove; 174 oldMoveHandler = document.onmousemove;
178 document.onmousemove = mouseMoveEntropy; 175 document.onmousemove = mouseMoveEntropy;
179 } 176 }
180 } 177 }
181//dump("Mouse enable", mouseMotionCollect); 178//dump("Mouse enable", mouseMotionCollect);
182 } 179 }
183 } 180 }
184 181
185 /*Collect entropy from mouse motion events. Note that 182 /*Collect entropy from mouse motion events. Note that
186 this is craftily coded to work with either DOM2 or Internet 183 this is craftily coded to work with either DOM2 or Internet
187 Explorer style events. Note that we don't use every successive 184 Explorer style events. Note that we don't use every successive
188 mouse movement event. Instead, we XOR the three bytes collected 185 mouse movement event. Instead, we XOR the three bytes collected
189 from the mouse and use that to determine how many subsequent 186 from the mouse and use that to determine how many subsequent
190 mouse movements we ignore before capturing the next one. */ 187 mouse movements we ignore before capturing the next one. */
191 188
192 var mouseEntropyTime = 0; // Delay counter for mouse entropy collection 189 var mouseEntropyTime = 0; // Delay counter for mouse entropy collection
193 190
194 function mouseMoveEntropy(e) { 191 function mouseMoveEntropy(e) {
195 if (!e) { 192 if (!e) {
196 e = window.event; // Internet Explorer event model 193 e = window.event; // Internet Explorer event model
197 } 194 }
198 if (mouseMotionCollect > 0) { 195 if (mouseMotionCollect > 0) {
199 if (mouseEntropyTime-- <= 0) { 196 if (mouseEntropyTime-- <= 0) {
200 addEntropyByte(e.screenX & 0xFF); 197 addEntropyByte(e.screenX & 0xFF);
201 addEntropyByte(e.screenY & 0xFF); 198 addEntropyByte(e.screenY & 0xFF);
202 ce(); 199 ce();
203 mouseMotionCollect--; 200 mouseMotionCollect--;
204 mouseEntropyTime = (entropyData[edlen - 3] ^ entropyData[edlen - 2] ^ 201 mouseEntropyTime = (entropyData[edlen - 3] ^ entropyData[edlen - 2] ^
205 entropyData[edlen - 1]) % 19; 202 entropyData[edlen - 1]) % 19;
206//dump("Mouse Move", byteArrayToHex(entropyData.slice(-3))); 203//dump("Mouse Move", byteArrayToHex(entropyData.slice(-3)));
207 } 204 }
208 if (mouseMotionCollect <= 0) { 205 if (mouseMotionCollect <= 0) {
209 if (document.removeEventListener) { 206 if (document.removeEventListener) {
210 document.removeEventListener("mousemove", mouseMoveEntropy, false); 207 document.removeEventListener("mousemove", mouseMoveEntropy, false);
211 } else if (document.detachEvent) { 208 } else if (document.detachEvent) {
212 document.detachEvent("onmousemove", mouseMoveEntropy); 209 document.detachEvent("onmousemove", mouseMoveEntropy);
213 } else { 210 } else {
214 document.onmousemove = oldMoveHandler; 211 document.onmousemove = oldMoveHandler;
215 } 212 }
216//dump("Spung!", 0); 213//dump("Spung!", 0);
217 } 214 }
218 } 215 }
219 } 216 }
220 217
221 /*Compute a 32 byte key value from the entropy vector. 218 /*Compute a 32 byte key value from the entropy vector.
222 We compute the value by taking the MD5 sum of the even 219 We compute the value by taking the MD5 sum of the even
223 and odd bytes respectively of the entropy vector, then 220 and odd bytes respectively of the entropy vector, then
224 concatenating the two MD5 sums. */ 221 concatenating the two MD5 sums. */
225 222
226 function keyFromEntropy() { 223 function keyFromEntropy() {
227 var i, k = new Array(32); 224 var i, k = new Array(32);
228 225
229 if (edlen == 0) { 226 if (edlen == 0) {
230 alert("Blooie! Entropy vector void at call to keyFromEntropy."); 227 alert("Blooie! Entropy vector void at call to keyFromEntropy.");
231 } 228 }
232//dump("Entropy bytes", edlen); 229//dump("Entropy bytes", edlen);
233 230
234 md5_init(); 231 md5_init();
235 for (i = 0; i < edlen; i += 2) { 232 for (i = 0; i < edlen; i += 2) {
236 md5_update(entropyData[i]); 233 md5_update(entropyData[i]);
237 } 234 }
238 md5_finish(); 235 md5_finish();
239 for (i = 0; i < 16; i++) { 236 for (i = 0; i < 16; i++) {
240 k[i] = digestBits[i]; 237 k[i] = digestBits[i];
241 } 238 }
242 239
243 md5_init(); 240 md5_init();
244 for (i = 1; i < edlen; i += 2) { 241 for (i = 1; i < edlen; i += 2) {
245 md5_update(entropyData[i]); 242 md5_update(entropyData[i]);
246 } 243 }
247 md5_finish(); 244 md5_finish();
248 for (i = 0; i < 16; i++) { 245 for (i = 0; i < 16; i++) {
249 k[i + 16] = digestBits[i]; 246 k[i + 16] = digestBits[i];
250 } 247 }
251 248
252//dump("keyFromEntropy", byteArrayToHex(k)); 249//dump("keyFromEntropy", byteArrayToHex(k));
253 return k; 250 return k;
254 } 251 }
255 252
256//############################################################################# 253//#############################################################################
257 //Downloaded on March 30, 2006 from http://www.fourmilab.ch/javascrypt/javascrypt.zip (aesprng.js) 254 //Downloaded on March 30, 2006 from http://www.fourmilab.ch/javascrypt/javascrypt.zip (aesprng.js)
258//############################################################################# 255//#############################################################################
259 256
260 257
261 // AES based pseudorandom number generator 258 // AES based pseudorandom number generator
262 259
263 /* Constructor. Called with an array of 32 byte (0-255) values 260 /* Constructor. Called with an array of 32 byte (0-255) values
264 containing the initial seed. */ 261 containing the initial seed. */
265 262
266 function AESprng(seed) { 263 function AESprng(seed) {
267 this.key = new Array(); 264 this.key = new Array();
268 this.key = seed; 265 this.key = seed;
269 this.itext = hexToByteArray("9F489613248148F9C27945C6AE62EECA3E3367BB14064E4E6DC67A9F28AB3BD1"); 266 this.itext = hexToByteArray("9F489613248148F9C27945C6AE62EECA3E3367BB14064E4E6DC67A9F28AB3BD1");
270 this.nbytes = 0; // Bytes left in buffer 267 this.nbytes = 0; // Bytes left in buffer
271 268
272 this.next = AESprng_next; 269 this.next = AESprng_next;
273 this.nextbits = AESprng_nextbits; 270 this.nextbits = AESprng_nextbits;
274 this.nextInt = AESprng_nextInt; 271 this.nextInt = AESprng_nextInt;
275 this.round = AESprng_round; 272 this.round = AESprng_round;
276 273
277 /* Encrypt the initial text with the seed key 274 /* Encrypt the initial text with the seed key
278 three times, feeding the output of the encryption 275 three times, feeding the output of the encryption
279 back into the key for the next round. */ 276 back into the key for the next round. */
280 277
281 bsb = blockSizeInBits; 278 bsb = blockSizeInBits;
282 blockSizeInBits = 256; 279 blockSizeInBits = 256;
283 var i, ct; 280 var i, ct;
284 for (i = 0; i < 3; i++) { 281 for (i = 0; i < 3; i++) {
285 this.key = rijndaelEncrypt(this.itext, this.key, "ECB"); 282 this.key = rijndaelEncrypt(this.itext, this.key, "ECB");
286 } 283 }
287 284
288 /* Now make between one and four additional 285 /* Now make between one and four additional
289 key-feedback rounds, with the number determined 286 key-feedback rounds, with the number determined
290 by bits from the result of the first three 287 by bits from the result of the first three
291 rounds. */ 288 rounds. */
292 289
293 var n = 1 + (this.key[3] & 2) + (this.key[9] & 1); 290 var n = 1 + (this.key[3] & 2) + (this.key[9] & 1);
294 for (i = 0; i < n; i++) { 291 for (i = 0; i < n; i++) {
295 this.key = rijndaelEncrypt(this.itext, this.key, "ECB"); 292 this.key = rijndaelEncrypt(this.itext, this.key, "ECB");
296 } 293 }
297 blockSizeInBits = bsb; 294 blockSizeInBits = bsb;
298 } 295 }
299 296
300 function AESprng_round() { 297 function AESprng_round() {
301 bsb = blockSizeInBits; 298 bsb = blockSizeInBits;
302 blockSizeInBits = 256; 299 blockSizeInBits = 256;
303 this.key = rijndaelEncrypt(this.itext, this.key, "ECB"); 300 this.key = rijndaelEncrypt(this.itext, this.key, "ECB");
304 this.nbytes = 32; 301 this.nbytes = 32;
305 blockSizeInBits = bsb; 302 blockSizeInBits = bsb;
306 } 303 }
307 304
308 //Return next byte from the generator 305 //Return next byte from the generator
309 306
310 function AESprng_next() { 307 function AESprng_next() {
311 if (this.nbytes <= 0) { 308 if (this.nbytes <= 0) {
312 this.round(); 309 this.round();
313 } 310 }
314 return(this.key[--this.nbytes]); 311 return(this.key[--this.nbytes]);
315 } 312 }
316 313
317 //Return n bit integer value (up to maximum integer size) 314 //Return n bit integer value (up to maximum integer size)
318 315
319 function AESprng_nextbits(n) { 316 function AESprng_nextbits(n) {
320 var i, w = 0, nbytes = Math.floor((n + 7) / 8); 317 var i, w = 0, nbytes = Math.floor((n + 7) / 8);
321 318
322 for (i = 0; i < nbytes; i++) { 319 for (i = 0; i < nbytes; i++) {
323 w = (w << 8) | this.next(); 320 w = (w << 8) | this.next();
324 } 321 }
325 return w & ((1 << n) - 1); 322 return w & ((1 << n) - 1);
326 } 323 }
327 324
328 // Return integer between 0 and n inclusive 325 // Return integer between 0 and n inclusive
329 326
330 function AESprng_nextInt(n) { 327 function AESprng_nextInt(n) {
331 var p = 1, nb = 0; 328 var p = 1, nb = 0;
332 329
333 // Determine smallest p, 2^p > n 330 // Determine smallest p, 2^p > n
334 // nb = log_2 p 331 // nb = log_2 p
335 332
336 while (n >= p) { 333 while (n >= p) {
337 p <<= 1; 334 p <<= 1;
338 nb++; 335 nb++;
339 } 336 }
340 p--; 337 p--;
341 338
342 /* Generate values from 0 through n by first generating 339 /* Generate values from 0 through n by first generating
343 values v from 0 to (2^p)-1, then discarding any results v > n. 340 values v from 0 to (2^p)-1, then discarding any results v > n.
344 For the rationale behind this (and why taking 341 For the rationale behind this (and why taking
345 values mod (n + 1) is biased toward smaller values, see 342 values mod (n + 1) is biased toward smaller values, see
346 Ferguson and Schneier, "Practical Cryptography", 343 Ferguson and Schneier, "Practical Cryptography",
347 ISBN 0-471-22357-3, section 10.8). */ 344 ISBN 0-471-22357-3, section 10.8). */
348 345
349 while (true) { 346 while (true) {
350 var v = this.nextbits(nb) & p; 347 var v = this.nextbits(nb) & p;
351 348
352 if (v <= n) { 349 if (v <= n) {
353 return v; 350 return v;
354 } 351 }
355 } 352 }
356 } 353 }
357 354
358//############################################################################# 355//#############################################################################
359 //Downloaded on March 30, 2006 from http://www.fourmilab.ch/javascrypt/javascrypt.zip (md5.js) 356 //Downloaded on March 30, 2006 from http://www.fourmilab.ch/javascrypt/javascrypt.zip (md5.js)
360//############################################################################# 357//#############################################################################
361 358
362/* 359/*
363 * md5.jvs 1.0b 27/06/96 360 * md5.jvs 1.0b 27/06/96
364 * 361 *
365 * Javascript implementation of the RSA Data Security, Inc. MD5 362 * Javascript implementation of the RSA Data Security, Inc. MD5
366 * Message-Digest Algorithm. 363 * Message-Digest Algorithm.
367 * 364 *
368 * Copyright (c) 1996 Henri Torgemane. All Rights Reserved. 365 * Copyright (c) 1996 Henri Torgemane. All Rights Reserved.
369 * 366 *
370 * Permission to use, copy, modify, and distribute this software 367 * Permission to use, copy, modify, and distribute this software
371 * and its documentation for any purposes and without 368 * and its documentation for any purposes and without
372 * fee is hereby granted provided that this copyright notice 369 * fee is hereby granted provided that this copyright notice
373 * appears in all copies. 370 * appears in all copies.
374 * 371 *
375 * Of course, this soft is provided "as is" without express or implied 372 * Of course, this soft is provided "as is" without express or implied
376 * warranty of any kind. 373 * warranty of any kind.
377 374
378 This version contains some trivial reformatting modifications 375 This version contains some trivial reformatting modifications
379 by John Walker. 376 by John Walker.
380 377
381 */ 378 */
382 379
383function array(n) { 380function array(n) {
384 for (i = 0; i < n; i++) { 381 for (i = 0; i < n; i++) {
385 this[i] = 0; 382 this[i] = 0;
386 } 383 }
387 this.length = n; 384 this.length = n;
388} 385}
389 386
390/* Some basic logical functions had to be rewritten because of a bug in 387/* Some basic logical functions had to be rewritten because of a bug in
391 * Javascript.. Just try to compute 0xffffffff >> 4 with it.. 388 * Javascript.. Just try to compute 0xffffffff >> 4 with it..
392 * Of course, these functions are slower than the original would be, but 389 * Of course, these functions are slower than the original would be, but
393 * at least, they work! 390 * at least, they work!
394 */ 391 */
395 392
396function integer(n) { 393function integer(n) {
397 return n % (0xffffffff + 1); 394 return n % (0xffffffff + 1);
398} 395}
399 396
400function shr(a, b) { 397function shr(a, b) {
401 a = integer(a); 398 a = integer(a);
402 b = integer(b); 399 b = integer(b);
403 if (a - 0x80000000 >= 0) { 400 if (a - 0x80000000 >= 0) {
404 a = a % 0x80000000; 401 a = a % 0x80000000;
405 a >>= b; 402 a >>= b;
406 a += 0x40000000 >> (b - 1); 403 a += 0x40000000 >> (b - 1);
407 } else { 404 } else {
408 a >>= b; 405 a >>= b;
diff --git a/frontend/beta/js/Clipperz/Crypto/BigInt.js b/frontend/beta/js/Clipperz/Crypto/BigInt.js
index d4d05d2..41483a3 100644
--- a/frontend/beta/js/Clipperz/Crypto/BigInt.js
+++ b/frontend/beta/js/Clipperz/Crypto/BigInt.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.Crypto) == 'undefined') { Clipperz.Crypto = {}; } 27if (typeof(Clipperz.Crypto) == 'undefined') { Clipperz.Crypto = {}; }
31 28
32//############################################################################# 29//#############################################################################
33 //Downloaded on March 05, 2007 from http://www.leemon.com/crypto/BigInt.js 30 //Downloaded on March 05, 2007 from http://www.leemon.com/crypto/BigInt.js
34//############################################################################# 31//#############################################################################
35 32
36 33
37//////////////////////////////////////////////////////////////////////////////////////// 34////////////////////////////////////////////////////////////////////////////////////////
38// Big Integer Library v. 5.0 35// Big Integer Library v. 5.0
39// Created 2000, last modified 2006 36// Created 2000, last modified 2006
40// Leemon Baird 37// Leemon Baird
41// www.leemon.com 38// www.leemon.com
42// 39//
43// This file is public domain. You can use it for any purpose without restriction. 40// This file is public domain. You can use it for any purpose without restriction.
44// I do not guarantee that it is correct, so use it at your own risk. If you use 41// I do not guarantee that it is correct, so use it at your own risk. If you use
45// it for something interesting, I'd appreciate hearing about it. If you find 42// it for something interesting, I'd appreciate hearing about it. If you find
46// any bugs or make any improvements, I'd appreciate hearing about those too. 43// any bugs or make any improvements, I'd appreciate hearing about those too.
47// It would also be nice if my name and address were left in the comments. 44// It would also be nice if my name and address were left in the comments.
48// But none of that is required. 45// But none of that is required.
49// 46//
50// This code defines a bigInt library for arbitrary-precision integers. 47// This code defines a bigInt library for arbitrary-precision integers.
51// A bigInt is an array of integers storing the value in chunks of bpe bits, 48// A bigInt is an array of integers storing the value in chunks of bpe bits,
52// little endian (buff[0] is the least significant word). 49// little endian (buff[0] is the least significant word).
53// Negative bigInts are stored two's complement. 50// Negative bigInts are stored two's complement.
54// Some functions assume their parameters have at least one leading zero element. 51// Some functions assume their parameters have at least one leading zero element.
55// Functions with an underscore at the end of the name have unpredictable behavior in case of overflow, 52// Functions with an underscore at the end of the name have unpredictable behavior in case of overflow,
56// so the caller must make sure overflow won't happen. 53// so the caller must make sure overflow won't happen.
57// For each function where a parameter is modified, that same 54// For each function where a parameter is modified, that same
58// variable must not be used as another argument too. 55// variable must not be used as another argument too.
59// So, you cannot square x by doing multMod_(x,x,n). 56// So, you cannot square x by doing multMod_(x,x,n).
60// You must use squareMod_(x,n) instead, or do y=dup(x); multMod_(x,y,n). 57// You must use squareMod_(x,n) instead, or do y=dup(x); multMod_(x,y,n).
61// 58//
62// These functions are designed to avoid frequent dynamic memory allocation in the inner loop. 59// These functions are designed to avoid frequent dynamic memory allocation in the inner loop.
63// For most functions, if it needs a BigInt as a local variable it will actually use 60// For most functions, if it needs a BigInt as a local variable it will actually use
64// a global, and will only allocate to it when it's not the right size. This ensures 61// a global, and will only allocate to it when it's not the right size. This ensures
65// that when a function is called repeatedly with same-sized parameters, it only allocates 62// that when a function is called repeatedly with same-sized parameters, it only allocates
66// memory on the first call. 63// memory on the first call.
67// 64//
68// Note that for cryptographic purposes, the calls to Math.random() must 65// Note that for cryptographic purposes, the calls to Math.random() must
69// be replaced with calls to a better pseudorandom number generator. 66// be replaced with calls to a better pseudorandom number generator.
70// 67//
71// In the following, "bigInt" means a bigInt with at least one leading zero element, 68// In the following, "bigInt" means a bigInt with at least one leading zero element,
72// and "integer" means a nonnegative integer less than radix. In some cases, integer 69// and "integer" means a nonnegative integer less than radix. In some cases, integer
73// can be negative. Negative bigInts are 2s complement. 70// can be negative. Negative bigInts are 2s complement.
74// 71//
75// The following functions do not modify their inputs, but dynamically allocate memory every time they are called: 72// The following functions do not modify their inputs, but dynamically allocate memory every time they are called:
76// 73//
77// function bigInt2str(x,base) //convert a bigInt into a string in a given base, from base 2 up to base 95 74// function bigInt2str(x,base) //convert a bigInt into a string in a given base, from base 2 up to base 95
78// function dup(x) //returns a copy of bigInt x 75// function dup(x) //returns a copy of bigInt x
79// function findPrimes(n) //return array of all primes less than integer n 76// function findPrimes(n) //return array of all primes less than integer n
80// function int2bigInt(t,n,m) //convert integer t to a bigInt with at least n bits and m array elements 77// function int2bigInt(t,n,m) //convert integer t to a bigInt with at least n bits and m array elements
81// function int2bigInt(s,b,n,m) //convert string s in base b to a bigInt with at least n bits and m array elements 78// function int2bigInt(s,b,n,m) //convert string s in base b to a bigInt with at least n bits and m array elements
82// function trim(x,k) //return a copy of x with exactly k leading zero elements 79// function trim(x,k) //return a copy of x with exactly k leading zero elements
83// 80//
84// The following functions do not modify their inputs, so there is never a problem with the result being too big: 81// The following functions do not modify their inputs, so there is never a problem with the result being too big:
85// 82//
86// function bitSize(x) //returns how many bits long the bigInt x is, not counting leading zeros 83// function bitSize(x) //returns how many bits long the bigInt x is, not counting leading zeros
87// function equals(x,y) //is the bigInt x equal to the bigint y? 84// function equals(x,y) //is the bigInt x equal to the bigint y?
88// function equalsInt(x,y) //is bigint x equal to integer y? 85// function equalsInt(x,y) //is bigint x equal to integer y?
89// function greater(x,y) //is x>y? (x and y are nonnegative bigInts) 86// function greater(x,y) //is x>y? (x and y are nonnegative bigInts)
90// function greaterShift(x,y,shift)//is (x <<(shift*bpe)) > y? 87// function greaterShift(x,y,shift)//is (x <<(shift*bpe)) > y?
91// function isZero(x) //is the bigInt x equal to zero? 88// function isZero(x) //is the bigInt x equal to zero?
92// function millerRabin(x,b) //does one round of Miller-Rabin base integer b say that bigInt x is possibly prime (as opposed to definitely composite)? 89// function millerRabin(x,b) //does one round of Miller-Rabin base integer b say that bigInt x is possibly prime (as opposed to definitely composite)?
93// function modInt(x,n) //return x mod n for bigInt x and integer n. 90// function modInt(x,n) //return x mod n for bigInt x and integer n.
94// function negative(x) //is bigInt x negative? 91// function negative(x) //is bigInt x negative?
95// 92//
96// The following functions do not modify their inputs, but allocate memory and call functions with underscores 93// The following functions do not modify their inputs, but allocate memory and call functions with underscores
97// 94//
98// function add(x,y) //return (x+y) for bigInts x and y. 95// function add(x,y) //return (x+y) for bigInts x and y.
99// function addInt(x,n) //return (x+n) where x is a bigInt and n is an integer. 96// function addInt(x,n) //return (x+n) where x is a bigInt and n is an integer.
100// function expand(x,n) //return a copy of x with at least n elements, adding leading zeros if needed 97// function expand(x,n) //return a copy of x with at least n elements, adding leading zeros if needed
101// function inverseMod(x,n) //return (x**(-1) mod n) for bigInts x and n. If no inverse exists, it returns null 98// function inverseMod(x,n) //return (x**(-1) mod n) for bigInts x and n. If no inverse exists, it returns null
102// function mod(x,n) //return a new bigInt equal to (x mod n) for bigInts x and n. 99// function mod(x,n) //return a new bigInt equal to (x mod n) for bigInts x and n.
103// function mult(x,y) //return x*y for bigInts x and y. This is faster when y<x. 100// function mult(x,y) //return x*y for bigInts x and y. This is faster when y<x.
104// function multMod(x,y,n) //return (x*y mod n) for bigInts x,y,n. For greater speed, let y<x. 101// function multMod(x,y,n) //return (x*y mod n) for bigInts x,y,n. For greater speed, let y<x.
105// function powMod(x,y,n) //return (x**y mod n) where x,y,n are bigInts and ** is exponentiation. 0**0=1. Faster for odd n. 102// function powMod(x,y,n) //return (x**y mod n) where x,y,n are bigInts and ** is exponentiation. 0**0=1. Faster for odd n.
106// function randTruePrime(k) //return a new, random, k-bit, true prime using Maurer's algorithm. 103// function randTruePrime(k) //return a new, random, k-bit, true prime using Maurer's algorithm.
107// function sub(x,y) //return (x-y) for bigInts x and y. Negative answers will be 2s complement 104// function sub(x,y) //return (x-y) for bigInts x and y. Negative answers will be 2s complement
108// 105//
109// The following functions write a bigInt result to one of the parameters, but 106// The following functions write a bigInt result to one of the parameters, but
110// the result is never bigger than the original, so there can't be overflow problems: 107// the result is never bigger than the original, so there can't be overflow problems:
111// 108//
112// function divInt_(x,n) //do x=floor(x/n) for bigInt x and integer n, and return the remainder 109// function divInt_(x,n) //do x=floor(x/n) for bigInt x and integer n, and return the remainder
113// function GCD_(x,y) //set x to the greatest common divisor of bigInts x and y, (y is destroyed). 110// function GCD_(x,y) //set x to the greatest common divisor of bigInts x and y, (y is destroyed).
114// function halve_(x) //do x=floor(|x|/2)*sgn(x) for bigInt x in 2's complement 111// function halve_(x) //do x=floor(|x|/2)*sgn(x) for bigInt x in 2's complement
115// function mod_(x,n) //do x=x mod n for bigInts x and n. 112// function mod_(x,n) //do x=x mod n for bigInts x and n.
116// function rightShift_(x,n) //right shift bigInt x by n bits. 0 <= n < bpe. 113// function rightShift_(x,n) //right shift bigInt x by n bits. 0 <= n < bpe.
117// 114//
118// The following functions write a bigInt result to one of the parameters. The caller is responsible for 115// The following functions write a bigInt result to one of the parameters. The caller is responsible for
119// ensuring it is large enough to hold the result. 116// ensuring it is large enough to hold the result.
120// 117//
121// function addInt_(x,n) //do x=x+n where x is a bigInt and n is an integer 118// function addInt_(x,n) //do x=x+n where x is a bigInt and n is an integer
122// function add_(x,y) //do x=x+y for bigInts x and y 119// function add_(x,y) //do x=x+y for bigInts x and y
123// function addShift_(x,y,ys) //do x=x+(y<<(ys*bpe)) 120// function addShift_(x,y,ys) //do x=x+(y<<(ys*bpe))
124// function copy_(x,y) //do x=y on bigInts x and y 121// function copy_(x,y) //do x=y on bigInts x and y
125// function copyInt_(x,n) //do x=n on bigInt x and integer n 122// function copyInt_(x,n) //do x=n on bigInt x and integer n
126// function carry_(x) //do carries and borrows so each element of the bigInt x fits in bpe bits. 123// function carry_(x) //do carries and borrows so each element of the bigInt x fits in bpe bits.
127// function divide_(x,y,q,r) //divide_ x by y giving quotient q and remainder r 124// function divide_(x,y,q,r) //divide_ x by y giving quotient q and remainder r
128// function eGCD_(x,y,d,a,b) //sets a,b,d to positive big integers such that d = GCD_(x,y) = a*x-b*y 125// function eGCD_(x,y,d,a,b) //sets a,b,d to positive big integers such that d = GCD_(x,y) = a*x-b*y
129// function inverseMod_(x,n) //do x=x**(-1) mod n, for bigInts x and n. Returns 1 (0) if inverse does (doesn't) exist 126// function inverseMod_(x,n) //do x=x**(-1) mod n, for bigInts x and n. Returns 1 (0) if inverse does (doesn't) exist
130// function inverseModInt_(x,n) //return x**(-1) mod n, for integers x and n. Return 0 if there is no inverse 127// function inverseModInt_(x,n) //return x**(-1) mod n, for integers x and n. Return 0 if there is no inverse
131// function leftShift_(x,n) //left shift bigInt x by n bits. n<bpe. 128// function leftShift_(x,n) //left shift bigInt x by n bits. n<bpe.
132// function linComb_(x,y,a,b) //do x=a*x+b*y for bigInts x and y and integers a and b 129// function linComb_(x,y,a,b) //do x=a*x+b*y for bigInts x and y and integers a and b
133// function linCombShift_(x,y,b,ys) //do x=x+b*(y<<(ys*bpe)) for bigInts x and y, and integers b and ys 130// function linCombShift_(x,y,b,ys) //do x=x+b*(y<<(ys*bpe)) for bigInts x and y, and integers b and ys
134// function mont_(x,y,n,np) //Montgomery multiplication (see comments where the function is defined) 131// function mont_(x,y,n,np) //Montgomery multiplication (see comments where the function is defined)
135// function mult_(x,y) //do x=x*y for bigInts x and y. 132// function mult_(x,y) //do x=x*y for bigInts x and y.
136// function multInt_(x,n) //do x=x*n where x is a bigInt and n is an integer. 133// function multInt_(x,n) //do x=x*n where x is a bigInt and n is an integer.
137// function multMod_(x,y,n) //do x=x*y mod n for bigInts x,y,n. 134// function multMod_(x,y,n) //do x=x*y mod n for bigInts x,y,n.
138// function powMod_(x,y,n) //do x=x**y mod n, where x,y,n are bigInts (n is odd) and ** is exponentiation. 0**0=1. 135// function powMod_(x,y,n) //do x=x**y mod n, where x,y,n are bigInts (n is odd) and ** is exponentiation. 0**0=1.
139// function randBigInt_(b,n,s) //do b = an n-bit random BigInt. if s=1, then nth bit (most significant bit) is set to 1. n>=1. 136// function randBigInt_(b,n,s) //do b = an n-bit random BigInt. if s=1, then nth bit (most significant bit) is set to 1. n>=1.
140// function randTruePrime_(ans,k) //do ans = a random k-bit true random prime (not just probable prime) with 1 in the msb. 137// function randTruePrime_(ans,k) //do ans = a random k-bit true random prime (not just probable prime) with 1 in the msb.
141// function squareMod_(x,n) //do x=x*x mod n for bigInts x,n 138// function squareMod_(x,n) //do x=x*x mod n for bigInts x,n
142// function sub_(x,y) //do x=x-y for bigInts x and y. Negative answers will be 2s complement. 139// function sub_(x,y) //do x=x-y for bigInts x and y. Negative answers will be 2s complement.
143// function subShift_(x,y,ys) //do x=x-(y<<(ys*bpe)). Negative answers will be 2s complement. 140// function subShift_(x,y,ys) //do x=x-(y<<(ys*bpe)). Negative answers will be 2s complement.
144// 141//
145// The following functions are based on algorithms from the _Handbook of Applied Cryptography_ 142// The following functions are based on algorithms from the _Handbook of Applied Cryptography_
146// powMod_() = algorithm 14.94, Montgomery exponentiation 143// powMod_() = algorithm 14.94, Montgomery exponentiation
147// eGCD_,inverseMod_() = algorithm 14.61, Binary extended GCD_ 144// eGCD_,inverseMod_() = algorithm 14.61, Binary extended GCD_
148// GCD_() = algorothm 14.57, Lehmer's algorithm 145// GCD_() = algorothm 14.57, Lehmer's algorithm
149// mont_() = algorithm 14.36, Montgomery multiplication 146// mont_() = algorithm 14.36, Montgomery multiplication
150// divide_() = algorithm 14.20 Multiple-precision division 147// divide_() = algorithm 14.20 Multiple-precision division
151// squareMod_() = algorithm 14.16 Multiple-precision squaring 148// squareMod_() = algorithm 14.16 Multiple-precision squaring
152// randTruePrime_() = algorithm 4.62, Maurer's algorithm 149// randTruePrime_() = algorithm 4.62, Maurer's algorithm
153// millerRabin() = algorithm 4.24, Miller-Rabin algorithm 150// millerRabin() = algorithm 4.24, Miller-Rabin algorithm
154// 151//
155// Profiling shows: 152// Profiling shows:
156// randTruePrime_() spends: 153// randTruePrime_() spends:
157// 10% of its time in calls to powMod_() 154// 10% of its time in calls to powMod_()
158// 85% of its time in calls to millerRabin() 155// 85% of its time in calls to millerRabin()
159// millerRabin() spends: 156// millerRabin() spends:
160// 99% of its time in calls to powMod_() (always with a base of 2) 157// 99% of its time in calls to powMod_() (always with a base of 2)
161// powMod_() spends: 158// powMod_() spends:
162// 94% of its time in calls to mont_() (almost always with x==y) 159// 94% of its time in calls to mont_() (almost always with x==y)
163// 160//
164// This suggests there are several ways to speed up this library slightly: 161// This suggests there are several ways to speed up this library slightly:
165// - convert powMod_ to use a Montgomery form of k-ary window (or maybe a Montgomery form of sliding window) 162// - convert powMod_ to use a Montgomery form of k-ary window (or maybe a Montgomery form of sliding window)
166// -- this should especially focus on being fast when raising 2 to a power mod n 163// -- this should especially focus on being fast when raising 2 to a power mod n
167// - convert randTruePrime_() to use a minimum r of 1/3 instead of 1/2 with the appropriate change to the test 164// - convert randTruePrime_() to use a minimum r of 1/3 instead of 1/2 with the appropriate change to the test
168// - tune the parameters in randTruePrime_(), including c, m, and recLimit 165// - tune the parameters in randTruePrime_(), including c, m, and recLimit
169// - speed up the single loop in mont_() that takes 95% of the runtime, perhaps by reducing checking 166// - speed up the single loop in mont_() that takes 95% of the runtime, perhaps by reducing checking
170// within the loop when all the parameters are the same length. 167// within the loop when all the parameters are the same length.
171// 168//
172// There are several ideas that look like they wouldn't help much at all: 169// There are several ideas that look like they wouldn't help much at all:
173// - replacing trial division in randTruePrime_() with a sieve (that speeds up something taking almost no time anyway) 170// - replacing trial division in randTruePrime_() with a sieve (that speeds up something taking almost no time anyway)
174// - increase bpe from 15 to 30 (that would help if we had a 32*32->64 multiplier, but not with JavaScript's 32*32->32) 171// - increase bpe from 15 to 30 (that would help if we had a 32*32->64 multiplier, but not with JavaScript's 32*32->32)
175// - speeding up mont_(x,y,n,np) when x==y by doing a non-modular, non-Montgomery square 172// - speeding up mont_(x,y,n,np) when x==y by doing a non-modular, non-Montgomery square
176// followed by a Montgomery reduction. The intermediate answer will be twice as long as x, so that 173// followed by a Montgomery reduction. The intermediate answer will be twice as long as x, so that
177// method would be slower. This is unfortunate because the code currently spends almost all of its time 174// method would be slower. This is unfortunate because the code currently spends almost all of its time
178// doing mont_(x,x,...), both for randTruePrime_() and powMod_(). A faster method for Montgomery squaring 175// doing mont_(x,x,...), both for randTruePrime_() and powMod_(). A faster method for Montgomery squaring
179// would have a large impact on the speed of randTruePrime_() and powMod_(). HAC has a couple of poorly-worded 176// would have a large impact on the speed of randTruePrime_() and powMod_(). HAC has a couple of poorly-worded
180// sentences that seem to imply it's faster to do a non-modular square followed by a single 177// sentences that seem to imply it's faster to do a non-modular square followed by a single
181// Montgomery reduction, but that's obviously wrong. 178// Montgomery reduction, but that's obviously wrong.
182//////////////////////////////////////////////////////////////////////////////////////// 179////////////////////////////////////////////////////////////////////////////////////////
183 180
184//globals 181//globals
185bpe=0; //bits stored per array element 182bpe=0; //bits stored per array element
186mask=0; //AND this with an array element to chop it down to bpe bits 183mask=0; //AND this with an array element to chop it down to bpe bits
187radix=mask+1; //equals 2^bpe. A single 1 bit to the left of the last bit of mask. 184radix=mask+1; //equals 2^bpe. A single 1 bit to the left of the last bit of mask.
188 185
189//the digits for converting to different bases 186//the digits for converting to different bases
190digitsStr='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_=!@#$%^&*()[]{}|;:,.<>/?`~ \\\'\"+-'; 187digitsStr='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_=!@#$%^&*()[]{}|;:,.<>/?`~ \\\'\"+-';
191 188
192//initialize the global variables 189//initialize the global variables
193for (bpe=0; (1<<(bpe+1)) > (1<<bpe); bpe++); //bpe=number of bits in the mantissa on this platform 190for (bpe=0; (1<<(bpe+1)) > (1<<bpe); bpe++); //bpe=number of bits in the mantissa on this platform
194bpe>>=1; //bpe=number of bits in one element of the array representing the bigInt 191bpe>>=1; //bpe=number of bits in one element of the array representing the bigInt
195mask=(1<<bpe)-1; //AND the mask with an integer to get its bpe least significant bits 192mask=(1<<bpe)-1; //AND the mask with an integer to get its bpe least significant bits
196radix=mask+1; //2^bpe. a single 1 bit to the left of the first bit of mask 193radix=mask+1; //2^bpe. a single 1 bit to the left of the first bit of mask
197one=int2bigInt(1,1,1); //constant used in powMod_() 194one=int2bigInt(1,1,1); //constant used in powMod_()
198 195
199//the following global variables are scratchpad memory to 196//the following global variables are scratchpad memory to
200//reduce dynamic memory allocation in the inner loop 197//reduce dynamic memory allocation in the inner loop
201t=new Array(0); 198t=new Array(0);
202ss=t; //used in mult_() 199ss=t; //used in mult_()
203s0=t; //used in multMod_(), squareMod_() 200s0=t; //used in multMod_(), squareMod_()
204s1=t; //used in powMod_(), multMod_(), squareMod_() 201s1=t; //used in powMod_(), multMod_(), squareMod_()
205s2=t; //used in powMod_(), multMod_() 202s2=t; //used in powMod_(), multMod_()
206s3=t; //used in powMod_() 203s3=t; //used in powMod_()
207s4=t; s5=t; //used in mod_() 204s4=t; s5=t; //used in mod_()
208s6=t; //used in bigInt2str() 205s6=t; //used in bigInt2str()
209s7=t; //used in powMod_() 206s7=t; //used in powMod_()
210T=t; //used in GCD_() 207T=t; //used in GCD_()
211sa=t; //used in mont_() 208sa=t; //used in mont_()
212mr_x1=t; mr_r=t; mr_a=t; //used in millerRabin() 209mr_x1=t; mr_r=t; mr_a=t; //used in millerRabin()
213eg_v=t; eg_u=t; eg_A=t; eg_B=t; eg_C=t; eg_D=t; //used in eGCD_(), inverseMod_() 210eg_v=t; eg_u=t; eg_A=t; eg_B=t; eg_C=t; eg_D=t; //used in eGCD_(), inverseMod_()
214md_q1=t; md_q2=t; md_q3=t; md_r=t; md_r1=t; md_r2=t; md_tt=t; //used in mod_() 211md_q1=t; md_q2=t; md_q3=t; md_r=t; md_r1=t; md_r2=t; md_tt=t; //used in mod_()
215 212
216primes=t; pows=t; s_i=t; s_i2=t; s_R=t; s_rm=t; s_q=t; s_n1=t; 213primes=t; pows=t; s_i=t; s_i2=t; s_R=t; s_rm=t; s_q=t; s_n1=t;
217 s_a=t; s_r2=t; s_n=t; s_b=t; s_d=t; s_x1=t; s_x2=t, s_aa=t; //used in randTruePrime_() 214 s_a=t; s_r2=t; s_n=t; s_b=t; s_d=t; s_x1=t; s_x2=t, s_aa=t; //used in randTruePrime_()
218 215
219//////////////////////////////////////////////////////////////////////////////////////// 216////////////////////////////////////////////////////////////////////////////////////////
220 217
221//return array of all primes less than integer n 218//return array of all primes less than integer n
222function findPrimes(n) { 219function findPrimes(n) {
223 var i,s,p,ans; 220 var i,s,p,ans;
224 s=new Array(n); 221 s=new Array(n);
225 for (i=0;i<n;i++) 222 for (i=0;i<n;i++)
226 s[i]=0; 223 s[i]=0;
227 s[0]=2; 224 s[0]=2;
228 p=0; //first p elements of s are primes, the rest are a sieve 225 p=0; //first p elements of s are primes, the rest are a sieve
229 for(;s[p]<n;) { //s[p] is the pth prime 226 for(;s[p]<n;) { //s[p] is the pth prime
230 for(i=s[p]*s[p]; i<n; i+=s[p]) //mark multiples of s[p] 227 for(i=s[p]*s[p]; i<n; i+=s[p]) //mark multiples of s[p]
231 s[i]=1; 228 s[i]=1;
232 p++; 229 p++;
233 s[p]=s[p-1]+1; 230 s[p]=s[p-1]+1;
234 for(; s[p]<n && s[s[p]]; s[p]++); //find next prime (where s[p]==0) 231 for(; s[p]<n && s[s[p]]; s[p]++); //find next prime (where s[p]==0)
235 } 232 }
236 ans=new Array(p); 233 ans=new Array(p);
237 for(i=0;i<p;i++) 234 for(i=0;i<p;i++)
238 ans[i]=s[i]; 235 ans[i]=s[i];
239 return ans; 236 return ans;
240} 237}
241 238
242//does a single round of Miller-Rabin base b consider x to be a possible prime? 239//does a single round of Miller-Rabin base b consider x to be a possible prime?
243//x is a bigInt, and b is an integer 240//x is a bigInt, and b is an integer
244function millerRabin(x,b) { 241function millerRabin(x,b) {
245 var i,j,k,s; 242 var i,j,k,s;
246 243
247 if (mr_x1.length!=x.length) { 244 if (mr_x1.length!=x.length) {
248 mr_x1=dup(x); 245 mr_x1=dup(x);
249 mr_r=dup(x); 246 mr_r=dup(x);
250 mr_a=dup(x); 247 mr_a=dup(x);
251 } 248 }
252 249
253 copyInt_(mr_a,b); 250 copyInt_(mr_a,b);
254 copy_(mr_r,x); 251 copy_(mr_r,x);
255 copy_(mr_x1,x); 252 copy_(mr_x1,x);
256 253
257 addInt_(mr_r,-1); 254 addInt_(mr_r,-1);
258 addInt_(mr_x1,-1); 255 addInt_(mr_x1,-1);
259 256
260 //s=the highest power of two that divides mr_r 257 //s=the highest power of two that divides mr_r
261 k=0; 258 k=0;
262 for (i=0;i<mr_r.length;i++) 259 for (i=0;i<mr_r.length;i++)
263 for (j=1;j<mask;j<<=1) 260 for (j=1;j<mask;j<<=1)
264 if (x[i] & j) { 261 if (x[i] & j) {
265 s=(k<mr_r.length+bpe ? k : 0); 262 s=(k<mr_r.length+bpe ? k : 0);
266 i=mr_r.length; 263 i=mr_r.length;
267 j=mask; 264 j=mask;
268 } else 265 } else
269 k++; 266 k++;
270 267
271 if (s) 268 if (s)
272 rightShift_(mr_r,s); 269 rightShift_(mr_r,s);
273 270
274 powMod_(mr_a,mr_r,x); 271 powMod_(mr_a,mr_r,x);
275 272
276 if (!equalsInt(mr_a,1) && !equals(mr_a,mr_x1)) { 273 if (!equalsInt(mr_a,1) && !equals(mr_a,mr_x1)) {
277 j=1; 274 j=1;
278 while (j<=s-1 && !equals(mr_a,mr_x1)) { 275 while (j<=s-1 && !equals(mr_a,mr_x1)) {
279 squareMod_(mr_a,x); 276 squareMod_(mr_a,x);
280 if (equalsInt(mr_a,1)) { 277 if (equalsInt(mr_a,1)) {
281 return 0; 278 return 0;
282 } 279 }
283 j++; 280 j++;
284 } 281 }
285 if (!equals(mr_a,mr_x1)) { 282 if (!equals(mr_a,mr_x1)) {
286 return 0; 283 return 0;
287 } 284 }
288 } 285 }
289 return 1; 286 return 1;
290} 287}
291 288
292//returns how many bits long the bigInt is, not counting leading zeros. 289//returns how many bits long the bigInt is, not counting leading zeros.
293function bitSize(x) { 290function bitSize(x) {
294 var j,z,w; 291 var j,z,w;
295 for (j=x.length-1; (x[j]==0) && (j>0); j--); 292 for (j=x.length-1; (x[j]==0) && (j>0); j--);
296 for (z=0,w=x[j]; w; (w>>=1),z++); 293 for (z=0,w=x[j]; w; (w>>=1),z++);
297 z+=bpe*j; 294 z+=bpe*j;
298 return z; 295 return z;
299} 296}
300 297
301//return a copy of x with at least n elements, adding leading zeros if needed 298//return a copy of x with at least n elements, adding leading zeros if needed
302function expand(x,n) { 299function expand(x,n) {
303 var ans=int2bigInt(0,(x.length>n ? x.length : n)*bpe,0); 300 var ans=int2bigInt(0,(x.length>n ? x.length : n)*bpe,0);
304 copy_(ans,x); 301 copy_(ans,x);
305 return ans; 302 return ans;
306} 303}
307 304
308//return a k-bit true random prime using Maurer's algorithm. 305//return a k-bit true random prime using Maurer's algorithm.
309function randTruePrime(k) { 306function randTruePrime(k) {
310 var ans=int2bigInt(0,k,0); 307 var ans=int2bigInt(0,k,0);
311 randTruePrime_(ans,k); 308 randTruePrime_(ans,k);
312 return trim(ans,1); 309 return trim(ans,1);
313} 310}
314 311
315//return a new bigInt equal to (x mod n) for bigInts x and n. 312//return a new bigInt equal to (x mod n) for bigInts x and n.
316function mod(x,n) { 313function mod(x,n) {
317 var ans=dup(x); 314 var ans=dup(x);
318 mod_(ans,n); 315 mod_(ans,n);
319 return trim(ans,1); 316 return trim(ans,1);
320} 317}
321 318
322//return (x+n) where x is a bigInt and n is an integer. 319//return (x+n) where x is a bigInt and n is an integer.
323function addInt(x,n) { 320function addInt(x,n) {
324 var ans=expand(x,x.length+1); 321 var ans=expand(x,x.length+1);
325 addInt_(ans,n); 322 addInt_(ans,n);
326 return trim(ans,1); 323 return trim(ans,1);
327} 324}
328 325
329//return x*y for bigInts x and y. This is faster when y<x. 326//return x*y for bigInts x and y. This is faster when y<x.
330function mult(x,y) { 327function mult(x,y) {
331 var ans=expand(x,x.length+y.length); 328 var ans=expand(x,x.length+y.length);
332 mult_(ans,y); 329 mult_(ans,y);
333 return trim(ans,1); 330 return trim(ans,1);
334} 331}
335 332
336//return (x**y mod n) where x,y,n are bigInts and ** is exponentiation. 0**0=1. Faster for odd n. 333//return (x**y mod n) where x,y,n are bigInts and ** is exponentiation. 0**0=1. Faster for odd n.
337function powMod(x,y,n) { 334function powMod(x,y,n) {
338 var ans=expand(x,n.length); 335 var ans=expand(x,n.length);
339 powMod_(ans,trim(y,2),trim(n,2),0); //this should work without the trim, but doesn't 336 powMod_(ans,trim(y,2),trim(n,2),0); //this should work without the trim, but doesn't
340 return trim(ans,1); 337 return trim(ans,1);
341} 338}
342 339
343//return (x-y) for bigInts x and y. Negative answers will be 2s complement 340//return (x-y) for bigInts x and y. Negative answers will be 2s complement
344function sub(x,y) { 341function sub(x,y) {
345 var ans=expand(x,(x.length>y.length ? x.length+1 : y.length+1)); 342 var ans=expand(x,(x.length>y.length ? x.length+1 : y.length+1));
346 sub_(ans,y); 343 sub_(ans,y);
347 return trim(ans,1); 344 return trim(ans,1);
348} 345}
349 346
350//return (x+y) for bigInts x and y. 347//return (x+y) for bigInts x and y.
351function add(x,y) { 348function add(x,y) {
352 var ans=expand(x,(x.length>y.length ? x.length+1 : y.length+1)); 349 var ans=expand(x,(x.length>y.length ? x.length+1 : y.length+1));
353 add_(ans,y); 350 add_(ans,y);
354 return trim(ans,1); 351 return trim(ans,1);
355} 352}
356 353
357//return (x**(-1) mod n) for bigInts x and n. If no inverse exists, it returns null 354//return (x**(-1) mod n) for bigInts x and n. If no inverse exists, it returns null
358function inverseMod(x,n) { 355function inverseMod(x,n) {
359 var ans=expand(x,n.length); 356 var ans=expand(x,n.length);
360 var s; 357 var s;
361 s=inverseMod_(ans,n); 358 s=inverseMod_(ans,n);
362 return s ? trim(ans,1) : null; 359 return s ? trim(ans,1) : null;
363} 360}
364 361
365//return (x*y mod n) for bigInts x,y,n. For greater speed, let y<x. 362//return (x*y mod n) for bigInts x,y,n. For greater speed, let y<x.
366function multMod(x,y,n) { 363function multMod(x,y,n) {
367 var ans=expand(x,n.length); 364 var ans=expand(x,n.length);
368 multMod_(ans,y,n); 365 multMod_(ans,y,n);
369 return trim(ans,1); 366 return trim(ans,1);
370} 367}
371 368
372//generate a k-bit true random prime using Maurer's algorithm, 369//generate a k-bit true random prime using Maurer's algorithm,
373//and put it into ans. The bigInt ans must be large enough to hold it. 370//and put it into ans. The bigInt ans must be large enough to hold it.
374function randTruePrime_(ans,k) { 371function randTruePrime_(ans,k) {
375 var c,m,pm,dd,j,r,B,divisible,z,zz,recSize; 372 var c,m,pm,dd,j,r,B,divisible,z,zz,recSize;
376 373
377 if (primes.length==0) 374 if (primes.length==0)
378 primes=findPrimes(30000); //check for divisibility by primes <=30000 375 primes=findPrimes(30000); //check for divisibility by primes <=30000
379 376
380 if (pows.length==0) { 377 if (pows.length==0) {
381 pows=new Array(512); 378 pows=new Array(512);
382 for (j=0;j<512;j++) { 379 for (j=0;j<512;j++) {
383 pows[j]=Math.pow(2,j/511.-1.); 380 pows[j]=Math.pow(2,j/511.-1.);
384 } 381 }
385 } 382 }
386 383
387 //c and m should be tuned for a particular machine and value of k, to maximize speed 384 //c and m should be tuned for a particular machine and value of k, to maximize speed
388 //this was: c=primes[primes.length-1]/k/k; //check using all the small primes. (c=0.1 in HAC) 385 //this was: c=primes[primes.length-1]/k/k; //check using all the small primes. (c=0.1 in HAC)
389 c=0.1; 386 c=0.1;
390 m=20; //generate this k-bit number by first recursively generating a number that has between k/2 and k-m bits 387 m=20; //generate this k-bit number by first recursively generating a number that has between k/2 and k-m bits
391 recLimit=20; /*must be at least 2 (was 29)*/ //stop recursion when k <=recLimit 388 recLimit=20; /*must be at least 2 (was 29)*/ //stop recursion when k <=recLimit
392 389
393 if (s_i2.length!=ans.length) { 390 if (s_i2.length!=ans.length) {
394 s_i2=dup(ans); 391 s_i2=dup(ans);
395 s_R =dup(ans); 392 s_R =dup(ans);
396 s_n1=dup(ans); 393 s_n1=dup(ans);
397 s_r2=dup(ans); 394 s_r2=dup(ans);
398 s_d =dup(ans); 395 s_d =dup(ans);
399 s_x1=dup(ans); 396 s_x1=dup(ans);
400 s_x2=dup(ans); 397 s_x2=dup(ans);
401 s_b =dup(ans); 398 s_b =dup(ans);
402 s_n =dup(ans); 399 s_n =dup(ans);
403 s_i =dup(ans); 400 s_i =dup(ans);
404 s_rm=dup(ans); 401 s_rm=dup(ans);
405 s_q =dup(ans); 402 s_q =dup(ans);
406 s_a =dup(ans); 403 s_a =dup(ans);
407 s_aa=dup(ans); 404 s_aa=dup(ans);
408 } 405 }
diff --git a/frontend/beta/js/Clipperz/Crypto/BigInt_scoped.js b/frontend/beta/js/Clipperz/Crypto/BigInt_scoped.js
index e91e823..f91c7e9 100644
--- a/frontend/beta/js/Clipperz/Crypto/BigInt_scoped.js
+++ b/frontend/beta/js/Clipperz/Crypto/BigInt_scoped.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.Crypto) == 'undefined') { Clipperz.Crypto = {}; } 27if (typeof(Clipperz.Crypto) == 'undefined') { Clipperz.Crypto = {}; }
31 28
32if (typeof(Leemon) == 'undefined') { Leemon = {}; } 29if (typeof(Leemon) == 'undefined') { Leemon = {}; }
33if (typeof(Baird.Crypto) == 'undefined') { Baird.Crypto = {}; } 30if (typeof(Baird.Crypto) == 'undefined') { Baird.Crypto = {}; }
34if (typeof(Baird.Crypto.BigInt) == 'undefined') { Baird.Crypto.BigInt = {}; } 31if (typeof(Baird.Crypto.BigInt) == 'undefined') { Baird.Crypto.BigInt = {}; }
35 32
36 33
37//############################################################################# 34//#############################################################################
38 //Downloaded on March 05, 2007 from http://www.leemon.com/crypto/BigInt.js 35 //Downloaded on March 05, 2007 from http://www.leemon.com/crypto/BigInt.js
39//############################################################################# 36//#############################################################################
40 37
41//////////////////////////////////////////////////////////////////////////////////////// 38////////////////////////////////////////////////////////////////////////////////////////
42// Big Integer Library v. 5.0 39// Big Integer Library v. 5.0
43// Created 2000, last modified 2006 40// Created 2000, last modified 2006
44// Leemon Baird 41// Leemon Baird
45// www.leemon.com 42// www.leemon.com
46// 43//
47// This file is public domain. You can use it for any purpose without restriction. 44// This file is public domain. You can use it for any purpose without restriction.
48// I do not guarantee that it is correct, so use it at your own risk. If you use 45// I do not guarantee that it is correct, so use it at your own risk. If you use
49// it for something interesting, I'd appreciate hearing about it. If you find 46// it for something interesting, I'd appreciate hearing about it. If you find
50// any bugs or make any improvements, I'd appreciate hearing about those too. 47// any bugs or make any improvements, I'd appreciate hearing about those too.
51// It would also be nice if my name and address were left in the comments. 48// It would also be nice if my name and address were left in the comments.
52// But none of that is required. 49// But none of that is required.
53// 50//
54// This code defines a bigInt library for arbitrary-precision integers. 51// This code defines a bigInt library for arbitrary-precision integers.
55// A bigInt is an array of integers storing the value in chunks of bpe bits, 52// A bigInt is an array of integers storing the value in chunks of bpe bits,
56// little endian (buff[0] is the least significant word). 53// little endian (buff[0] is the least significant word).
57// Negative bigInts are stored two's complement. 54// Negative bigInts are stored two's complement.
58// Some functions assume their parameters have at least one leading zero element. 55// Some functions assume their parameters have at least one leading zero element.
59// Functions with an underscore at the end of the name have unpredictable behavior in case of overflow, 56// Functions with an underscore at the end of the name have unpredictable behavior in case of overflow,
60// so the caller must make sure overflow won't happen. 57// so the caller must make sure overflow won't happen.
61// For each function where a parameter is modified, that same 58// For each function where a parameter is modified, that same
62// variable must not be used as another argument too. 59// variable must not be used as another argument too.
63// So, you cannot square x by doing multMod_(x,x,n). 60// So, you cannot square x by doing multMod_(x,x,n).
64// You must use squareMod_(x,n) instead, or do y=dup(x); multMod_(x,y,n). 61// You must use squareMod_(x,n) instead, or do y=dup(x); multMod_(x,y,n).
65// 62//
66// These functions are designed to avoid frequent dynamic memory allocation in the inner loop. 63// These functions are designed to avoid frequent dynamic memory allocation in the inner loop.
67// For most functions, if it needs a BigInt as a local variable it will actually use 64// For most functions, if it needs a BigInt as a local variable it will actually use
68// a global, and will only allocate to it when it's not the right size. This ensures 65// a global, and will only allocate to it when it's not the right size. This ensures
69// that when a function is called repeatedly with same-sized parameters, it only allocates 66// that when a function is called repeatedly with same-sized parameters, it only allocates
70// memory on the first call. 67// memory on the first call.
71// 68//
72// Note that for cryptographic purposes, the calls to Math.random() must 69// Note that for cryptographic purposes, the calls to Math.random() must
73// be replaced with calls to a better pseudorandom number generator. 70// be replaced with calls to a better pseudorandom number generator.
74// 71//
75// In the following, "bigInt" means a bigInt with at least one leading zero element, 72// In the following, "bigInt" means a bigInt with at least one leading zero element,
76// and "integer" means a nonnegative integer less than radix. In some cases, integer 73// and "integer" means a nonnegative integer less than radix. In some cases, integer
77// can be negative. Negative bigInts are 2s complement. 74// can be negative. Negative bigInts are 2s complement.
78// 75//
79// The following functions do not modify their inputs, but dynamically allocate memory every time they are called: 76// The following functions do not modify their inputs, but dynamically allocate memory every time they are called:
80// 77//
81// function bigInt2str(x,base) //convert a bigInt into a string in a given base, from base 2 up to base 95 78// function bigInt2str(x,base) //convert a bigInt into a string in a given base, from base 2 up to base 95
82// function dup(x) //returns a copy of bigInt x 79// function dup(x) //returns a copy of bigInt x
83// function findPrimes(n) //return array of all primes less than integer n 80// function findPrimes(n) //return array of all primes less than integer n
84// function int2bigInt(t,n,m) //convert integer t to a bigInt with at least n bits and m array elements 81// function int2bigInt(t,n,m) //convert integer t to a bigInt with at least n bits and m array elements
85// function str2bigInt(s,b,n,m) //convert string s in base b to a bigInt with at least n bits and m array elements 82// function str2bigInt(s,b,n,m) //convert string s in base b to a bigInt with at least n bits and m array elements
86// function trim(x,k) //return a copy of x with exactly k leading zero elements 83// function trim(x,k) //return a copy of x with exactly k leading zero elements
87// 84//
88// The following functions do not modify their inputs, so there is never a problem with the result being too big: 85// The following functions do not modify their inputs, so there is never a problem with the result being too big:
89// 86//
90// function bitSize(x) //returns how many bits long the bigInt x is, not counting leading zeros 87// function bitSize(x) //returns how many bits long the bigInt x is, not counting leading zeros
91// function equals(x,y) //is the bigInt x equal to the bigint y? 88// function equals(x,y) //is the bigInt x equal to the bigint y?
92// function equalsInt(x,y) //is bigint x equal to integer y? 89// function equalsInt(x,y) //is bigint x equal to integer y?
93// function greater(x,y) //is x>y? (x and y are nonnegative bigInts) 90// function greater(x,y) //is x>y? (x and y are nonnegative bigInts)
94// function greaterShift(x,y,shift)//is (x <<(shift*bpe)) > y? 91// function greaterShift(x,y,shift)//is (x <<(shift*bpe)) > y?
95// function isZero(x) //is the bigInt x equal to zero? 92// function isZero(x) //is the bigInt x equal to zero?
96// function millerRabin(x,b) //does one round of Miller-Rabin base integer b say that bigInt x is possibly prime (as opposed to definitely composite)? 93// function millerRabin(x,b) //does one round of Miller-Rabin base integer b say that bigInt x is possibly prime (as opposed to definitely composite)?
97// function modInt(x,n) //return x mod n for bigInt x and integer n. 94// function modInt(x,n) //return x mod n for bigInt x and integer n.
98// function negative(x) //is bigInt x negative? 95// function negative(x) //is bigInt x negative?
99// 96//
100// The following functions do not modify their inputs, but allocate memory and call functions with underscores 97// The following functions do not modify their inputs, but allocate memory and call functions with underscores
101// 98//
102// function add(x,y) //return (x+y) for bigInts x and y. 99// function add(x,y) //return (x+y) for bigInts x and y.
103// function addInt(x,n) //return (x+n) where x is a bigInt and n is an integer. 100// function addInt(x,n) //return (x+n) where x is a bigInt and n is an integer.
104// function expand(x,n) //return a copy of x with at least n elements, adding leading zeros if needed 101// function expand(x,n) //return a copy of x with at least n elements, adding leading zeros if needed
105// function inverseMod(x,n) //return (x**(-1) mod n) for bigInts x and n. If no inverse exists, it returns null 102// function inverseMod(x,n) //return (x**(-1) mod n) for bigInts x and n. If no inverse exists, it returns null
106// function mod(x,n) //return a new bigInt equal to (x mod n) for bigInts x and n. 103// function mod(x,n) //return a new bigInt equal to (x mod n) for bigInts x and n.
107// function mult(x,y) //return x*y for bigInts x and y. This is faster when y<x. 104// function mult(x,y) //return x*y for bigInts x and y. This is faster when y<x.
108// function multMod(x,y,n) //return (x*y mod n) for bigInts x,y,n. For greater speed, let y<x. 105// function multMod(x,y,n) //return (x*y mod n) for bigInts x,y,n. For greater speed, let y<x.
109// function powMod(x,y,n) //return (x**y mod n) where x,y,n are bigInts and ** is exponentiation. 0**0=1. Faster for odd n. 106// function powMod(x,y,n) //return (x**y mod n) where x,y,n are bigInts and ** is exponentiation. 0**0=1. Faster for odd n.
110// function randTruePrime(k) //return a new, random, k-bit, true prime using Maurer's algorithm. 107// function randTruePrime(k) //return a new, random, k-bit, true prime using Maurer's algorithm.
111// function sub(x,y) //return (x-y) for bigInts x and y. Negative answers will be 2s complement 108// function sub(x,y) //return (x-y) for bigInts x and y. Negative answers will be 2s complement
112// 109//
113// The following functions write a bigInt result to one of the parameters, but 110// The following functions write a bigInt result to one of the parameters, but
114// the result is never bigger than the original, so there can't be overflow problems: 111// the result is never bigger than the original, so there can't be overflow problems:
115// 112//
116// function divInt_(x,n) //do x=floor(x/n) for bigInt x and integer n, and return the remainder 113// function divInt_(x,n) //do x=floor(x/n) for bigInt x and integer n, and return the remainder
117// function GCD_(x,y) //set x to the greatest common divisor of bigInts x and y, (y is destroyed). 114// function GCD_(x,y) //set x to the greatest common divisor of bigInts x and y, (y is destroyed).
118// function halve_(x) //do x=floor(|x|/2)*sgn(x) for bigInt x in 2's complement 115// function halve_(x) //do x=floor(|x|/2)*sgn(x) for bigInt x in 2's complement
119// function mod_(x,n) //do x=x mod n for bigInts x and n. 116// function mod_(x,n) //do x=x mod n for bigInts x and n.
120// function rightShift_(x,n) //right shift bigInt x by n bits. 0 <= n < bpe. 117// function rightShift_(x,n) //right shift bigInt x by n bits. 0 <= n < bpe.
121// 118//
122// The following functions write a bigInt result to one of the parameters. The caller is responsible for 119// The following functions write a bigInt result to one of the parameters. The caller is responsible for
123// ensuring it is large enough to hold the result. 120// ensuring it is large enough to hold the result.
124// 121//
125// function addInt_(x,n) //do x=x+n where x is a bigInt and n is an integer 122// function addInt_(x,n) //do x=x+n where x is a bigInt and n is an integer
126// function add_(x,y) //do x=x+y for bigInts x and y 123// function add_(x,y) //do x=x+y for bigInts x and y
127// function addShift_(x,y,ys) //do x=x+(y<<(ys*bpe)) 124// function addShift_(x,y,ys) //do x=x+(y<<(ys*bpe))
128// function copy_(x,y) //do x=y on bigInts x and y 125// function copy_(x,y) //do x=y on bigInts x and y
129// function copyInt_(x,n) //do x=n on bigInt x and integer n 126// function copyInt_(x,n) //do x=n on bigInt x and integer n
130// function carry_(x) //do carries and borrows so each element of the bigInt x fits in bpe bits. 127// function carry_(x) //do carries and borrows so each element of the bigInt x fits in bpe bits.
131// function divide_(x,y,q,r) //divide_ x by y giving quotient q and remainder r 128// function divide_(x,y,q,r) //divide_ x by y giving quotient q and remainder r
132// function eGCD_(x,y,d,a,b) //sets a,b,d to positive big integers such that d = GCD_(x,y) = a*x-b*y 129// function eGCD_(x,y,d,a,b) //sets a,b,d to positive big integers such that d = GCD_(x,y) = a*x-b*y
133// function inverseMod_(x,n) //do x=x**(-1) mod n, for bigInts x and n. Returns 1 (0) if inverse does (doesn't) exist 130// function inverseMod_(x,n) //do x=x**(-1) mod n, for bigInts x and n. Returns 1 (0) if inverse does (doesn't) exist
134// function inverseModInt_(x,n) //return x**(-1) mod n, for integers x and n. Return 0 if there is no inverse 131// function inverseModInt_(x,n) //return x**(-1) mod n, for integers x and n. Return 0 if there is no inverse
135// function leftShift_(x,n) //left shift bigInt x by n bits. n<bpe. 132// function leftShift_(x,n) //left shift bigInt x by n bits. n<bpe.
136// function linComb_(x,y,a,b) //do x=a*x+b*y for bigInts x and y and integers a and b 133// function linComb_(x,y,a,b) //do x=a*x+b*y for bigInts x and y and integers a and b
137// function linCombShift_(x,y,b,ys) //do x=x+b*(y<<(ys*bpe)) for bigInts x and y, and integers b and ys 134// function linCombShift_(x,y,b,ys) //do x=x+b*(y<<(ys*bpe)) for bigInts x and y, and integers b and ys
138// function mont_(x,y,n,np) //Montgomery multiplication (see comments where the function is defined) 135// function mont_(x,y,n,np) //Montgomery multiplication (see comments where the function is defined)
139// function mult_(x,y) //do x=x*y for bigInts x and y. 136// function mult_(x,y) //do x=x*y for bigInts x and y.
140// function multInt_(x,n) //do x=x*n where x is a bigInt and n is an integer. 137// function multInt_(x,n) //do x=x*n where x is a bigInt and n is an integer.
141// function multMod_(x,y,n) //do x=x*y mod n for bigInts x,y,n. 138// function multMod_(x,y,n) //do x=x*y mod n for bigInts x,y,n.
142// function powMod_(x,y,n) //do x=x**y mod n, where x,y,n are bigInts (n is odd) and ** is exponentiation. 0**0=1. 139// function powMod_(x,y,n) //do x=x**y mod n, where x,y,n are bigInts (n is odd) and ** is exponentiation. 0**0=1.
143// function randBigInt_(b,n,s) //do b = an n-bit random BigInt. if s=1, then nth bit (most significant bit) is set to 1. n>=1. 140// function randBigInt_(b,n,s) //do b = an n-bit random BigInt. if s=1, then nth bit (most significant bit) is set to 1. n>=1.
144// function randTruePrime_(ans,k) //do ans = a random k-bit true random prime (not just probable prime) with 1 in the msb. 141// function randTruePrime_(ans,k) //do ans = a random k-bit true random prime (not just probable prime) with 1 in the msb.
145// function squareMod_(x,n) //do x=x*x mod n for bigInts x,n 142// function squareMod_(x,n) //do x=x*x mod n for bigInts x,n
146// function sub_(x,y) //do x=x-y for bigInts x and y. Negative answers will be 2s complement. 143// function sub_(x,y) //do x=x-y for bigInts x and y. Negative answers will be 2s complement.
147// function subShift_(x,y,ys) //do x=x-(y<<(ys*bpe)). Negative answers will be 2s complement. 144// function subShift_(x,y,ys) //do x=x-(y<<(ys*bpe)). Negative answers will be 2s complement.
148// 145//
149// The following functions are based on algorithms from the _Handbook of Applied Cryptography_ 146// The following functions are based on algorithms from the _Handbook of Applied Cryptography_
150// powMod_() = algorithm 14.94, Montgomery exponentiation 147// powMod_() = algorithm 14.94, Montgomery exponentiation
151// eGCD_,inverseMod_() = algorithm 14.61, Binary extended GCD_ 148// eGCD_,inverseMod_() = algorithm 14.61, Binary extended GCD_
152// GCD_() = algorothm 14.57, Lehmer's algorithm 149// GCD_() = algorothm 14.57, Lehmer's algorithm
153// mont_() = algorithm 14.36, Montgomery multiplication 150// mont_() = algorithm 14.36, Montgomery multiplication
154// divide_() = algorithm 14.20 Multiple-precision division 151// divide_() = algorithm 14.20 Multiple-precision division
155// squareMod_() = algorithm 14.16 Multiple-precision squaring 152// squareMod_() = algorithm 14.16 Multiple-precision squaring
156// randTruePrime_() = algorithm 4.62, Maurer's algorithm 153// randTruePrime_() = algorithm 4.62, Maurer's algorithm
157// millerRabin() = algorithm 4.24, Miller-Rabin algorithm 154// millerRabin() = algorithm 4.24, Miller-Rabin algorithm
158// 155//
159// Profiling shows: 156// Profiling shows:
160// randTruePrime_() spends: 157// randTruePrime_() spends:
161// 10% of its time in calls to powMod_() 158// 10% of its time in calls to powMod_()
162// 85% of its time in calls to millerRabin() 159// 85% of its time in calls to millerRabin()
163// millerRabin() spends: 160// millerRabin() spends:
164// 99% of its time in calls to powMod_() (always with a base of 2) 161// 99% of its time in calls to powMod_() (always with a base of 2)
165// powMod_() spends: 162// powMod_() spends:
166// 94% of its time in calls to mont_() (almost always with x==y) 163// 94% of its time in calls to mont_() (almost always with x==y)
167// 164//
168// This suggests there are several ways to speed up this library slightly: 165// This suggests there are several ways to speed up this library slightly:
169// - convert powMod_ to use a Montgomery form of k-ary window (or maybe a Montgomery form of sliding window) 166// - convert powMod_ to use a Montgomery form of k-ary window (or maybe a Montgomery form of sliding window)
170// -- this should especially focus on being fast when raising 2 to a power mod n 167// -- this should especially focus on being fast when raising 2 to a power mod n
171// - convert randTruePrime_() to use a minimum r of 1/3 instead of 1/2 with the appropriate change to the test 168// - convert randTruePrime_() to use a minimum r of 1/3 instead of 1/2 with the appropriate change to the test
172// - tune the parameters in randTruePrime_(), including c, m, and recLimit 169// - tune the parameters in randTruePrime_(), including c, m, and recLimit
173// - speed up the single loop in mont_() that takes 95% of the runtime, perhaps by reducing checking 170// - speed up the single loop in mont_() that takes 95% of the runtime, perhaps by reducing checking
174// within the loop when all the parameters are the same length. 171// within the loop when all the parameters are the same length.
175// 172//
176// There are several ideas that look like they wouldn't help much at all: 173// There are several ideas that look like they wouldn't help much at all:
177// - replacing trial division in randTruePrime_() with a sieve (that speeds up something taking almost no time anyway) 174// - replacing trial division in randTruePrime_() with a sieve (that speeds up something taking almost no time anyway)
178// - increase bpe from 15 to 30 (that would help if we had a 32*32->64 multiplier, but not with JavaScript's 32*32->32) 175// - increase bpe from 15 to 30 (that would help if we had a 32*32->64 multiplier, but not with JavaScript's 32*32->32)
179// - speeding up mont_(x,y,n,np) when x==y by doing a non-modular, non-Montgomery square 176// - speeding up mont_(x,y,n,np) when x==y by doing a non-modular, non-Montgomery square
180// followed by a Montgomery reduction. The intermediate answer will be twice as long as x, so that 177// followed by a Montgomery reduction. The intermediate answer will be twice as long as x, so that
181// method would be slower. This is unfortunate because the code currently spends almost all of its time 178// method would be slower. This is unfortunate because the code currently spends almost all of its time
182// doing mont_(x,x,...), both for randTruePrime_() and powMod_(). A faster method for Montgomery squaring 179// doing mont_(x,x,...), both for randTruePrime_() and powMod_(). A faster method for Montgomery squaring
183// would have a large impact on the speed of randTruePrime_() and powMod_(). HAC has a couple of poorly-worded 180// would have a large impact on the speed of randTruePrime_() and powMod_(). HAC has a couple of poorly-worded
184// sentences that seem to imply it's faster to do a non-modular square followed by a single 181// sentences that seem to imply it's faster to do a non-modular square followed by a single
185// Montgomery reduction, but that's obviously wrong. 182// Montgomery reduction, but that's obviously wrong.
186//////////////////////////////////////////////////////////////////////////////////////// 183////////////////////////////////////////////////////////////////////////////////////////
187 184
188// 185//
189 //The whole library has been moved into the Baird.Crypto.BigInt scope by Giulio Cesare Solaroli <giulio.cesare@clipperz.com> 186 //The whole library has been moved into the Baird.Crypto.BigInt scope by Giulio Cesare Solaroli <giulio.cesare@clipperz.com>
190// 187//
191Baird.Crypto.BigInt.VERSION = "5.0"; 188Baird.Crypto.BigInt.VERSION = "5.0";
192Baird.Crypto.BigInt.NAME = "Baird.Crypto.BigInt"; 189Baird.Crypto.BigInt.NAME = "Baird.Crypto.BigInt";
193 190
194MochiKit.Base.update(Baird.Crypto.BigInt, { 191MochiKit.Base.update(Baird.Crypto.BigInt, {
195 //globals 192 //globals
196 'bpe': 0, //bits stored per array element 193 'bpe': 0, //bits stored per array element
197 'mask': 0, //AND this with an array element to chop it down to bpe bits 194 'mask': 0, //AND this with an array element to chop it down to bpe bits
198 'radix': Baird.Crypto.BigInt.mask + 1,//equals 2^bpe. A single 1 bit to the left of the last bit of mask. 195 'radix': Baird.Crypto.BigInt.mask + 1,//equals 2^bpe. A single 1 bit to the left of the last bit of mask.
199 196
200 //the digits for converting to different bases 197 //the digits for converting to different bases
201 'digitsStr': '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_=!@#$%^&*()[]{}|;:,.<>/?`~ \\\'\"+-', 198 'digitsStr': '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_=!@#$%^&*()[]{}|;:,.<>/?`~ \\\'\"+-',
202 199
203//initialize the global variables 200//initialize the global variables
204for (bpe=0; (1<<(bpe+1)) > (1<<bpe); bpe++); //bpe=number of bits in the mantissa on this platform 201for (bpe=0; (1<<(bpe+1)) > (1<<bpe); bpe++); //bpe=number of bits in the mantissa on this platform
205bpe>>=1; //bpe=number of bits in one element of the array representing the bigInt 202bpe>>=1; //bpe=number of bits in one element of the array representing the bigInt
206mask=(1<<bpe)-1; //AND the mask with an integer to get its bpe least significant bits 203mask=(1<<bpe)-1; //AND the mask with an integer to get its bpe least significant bits
207radix=mask+1; //2^bpe. a single 1 bit to the left of the first bit of mask 204radix=mask+1; //2^bpe. a single 1 bit to the left of the first bit of mask
208one=int2bigInt(1,1,1); //constant used in powMod_() 205one=int2bigInt(1,1,1); //constant used in powMod_()
209 206
210//the following global variables are scratchpad memory to 207//the following global variables are scratchpad memory to
211//reduce dynamic memory allocation in the inner loop 208//reduce dynamic memory allocation in the inner loop
212t=new Array(0); 209t=new Array(0);
213ss=t; //used in mult_() 210ss=t; //used in mult_()
214s0=t; //used in multMod_(), squareMod_() 211s0=t; //used in multMod_(), squareMod_()
215s1=t; //used in powMod_(), multMod_(), squareMod_() 212s1=t; //used in powMod_(), multMod_(), squareMod_()
216s2=t; //used in powMod_(), multMod_() 213s2=t; //used in powMod_(), multMod_()
217s3=t; //used in powMod_() 214s3=t; //used in powMod_()
218s4=t; s5=t; //used in mod_() 215s4=t; s5=t; //used in mod_()
219s6=t; //used in bigInt2str() 216s6=t; //used in bigInt2str()
220s7=t; //used in powMod_() 217s7=t; //used in powMod_()
221T=t; //used in GCD_() 218T=t; //used in GCD_()
222sa=t; //used in mont_() 219sa=t; //used in mont_()
223mr_x1=t; mr_r=t; mr_a=t; //used in millerRabin() 220mr_x1=t; mr_r=t; mr_a=t; //used in millerRabin()
224eg_v=t; eg_u=t; eg_A=t; eg_B=t; eg_C=t; eg_D=t; //used in eGCD_(), inverseMod_() 221eg_v=t; eg_u=t; eg_A=t; eg_B=t; eg_C=t; eg_D=t; //used in eGCD_(), inverseMod_()
225md_q1=t; md_q2=t; md_q3=t; md_r=t; md_r1=t; md_r2=t; md_tt=t; //used in mod_() 222md_q1=t; md_q2=t; md_q3=t; md_r=t; md_r1=t; md_r2=t; md_tt=t; //used in mod_()
226 223
227primes=t; pows=t; s_i=t; s_i2=t; s_R=t; s_rm=t; s_q=t; s_n1=t; 224primes=t; pows=t; s_i=t; s_i2=t; s_R=t; s_rm=t; s_q=t; s_n1=t;
228 s_a=t; s_r2=t; s_n=t; s_b=t; s_d=t; s_x1=t; s_x2=t, s_aa=t; //used in randTruePrime_() 225 s_a=t; s_r2=t; s_n=t; s_b=t; s_d=t; s_x1=t; s_x2=t, s_aa=t; //used in randTruePrime_()
229 226
230//////////////////////////////////////////////////////////////////////////////////////// 227////////////////////////////////////////////////////////////////////////////////////////
231 228
232 //return array of all primes less than integer n 229 //return array of all primes less than integer n
233 'findPrimes': function(n) { 230 'findPrimes': function(n) {
234 var i,s,p,ans; 231 var i,s,p,ans;
235 s=new Array(n); 232 s=new Array(n);
236 for (i=0;i<n;i++) 233 for (i=0;i<n;i++)
237 s[i]=0; 234 s[i]=0;
238 s[0]=2; 235 s[0]=2;
239 p=0; //first p elements of s are primes, the rest are a sieve 236 p=0; //first p elements of s are primes, the rest are a sieve
240 for(;s[p]<n;) { //s[p] is the pth prime 237 for(;s[p]<n;) { //s[p] is the pth prime
241 for(i=s[p]*s[p]; i<n; i+=s[p]) //mark multiples of s[p] 238 for(i=s[p]*s[p]; i<n; i+=s[p]) //mark multiples of s[p]
242 s[i]=1; 239 s[i]=1;
243 p++; 240 p++;
244 s[p]=s[p-1]+1; 241 s[p]=s[p-1]+1;
245 for(; s[p]<n && s[s[p]]; s[p]++); //find next prime (where s[p]==0) 242 for(; s[p]<n && s[s[p]]; s[p]++); //find next prime (where s[p]==0)
246 } 243 }
247 ans=new Array(p); 244 ans=new Array(p);
248 for(i=0;i<p;i++) 245 for(i=0;i<p;i++)
249 ans[i]=s[i]; 246 ans[i]=s[i];
250 return ans; 247 return ans;
251 }, 248 },
252 249
253 //does a single round of Miller-Rabin base b consider x to be a possible prime? 250 //does a single round of Miller-Rabin base b consider x to be a possible prime?
254 //x is a bigInt, and b is an integer 251 //x is a bigInt, and b is an integer
255 'millerRabin': function(x,b) { 252 'millerRabin': function(x,b) {
256 var i,j,k,s; 253 var i,j,k,s;
257 254
258 if (mr_x1.length!=x.length) { 255 if (mr_x1.length!=x.length) {
259 mr_x1=dup(x); 256 mr_x1=dup(x);
260 mr_r=dup(x); 257 mr_r=dup(x);
261 mr_a=dup(x); 258 mr_a=dup(x);
262 } 259 }
263 260
264 copyInt_(mr_a,b); 261 copyInt_(mr_a,b);
265 copy_(mr_r,x); 262 copy_(mr_r,x);
266 copy_(mr_x1,x); 263 copy_(mr_x1,x);
267 264
268 addInt_(mr_r,-1); 265 addInt_(mr_r,-1);
269 addInt_(mr_x1,-1); 266 addInt_(mr_x1,-1);
270 267
271 //s=the highest power of two that divides mr_r 268 //s=the highest power of two that divides mr_r
272 k=0; 269 k=0;
273 for (i=0;i<mr_r.length;i++) 270 for (i=0;i<mr_r.length;i++)
274 for (j=1;j<mask;j<<=1) 271 for (j=1;j<mask;j<<=1)
275 if (x[i] & j) { 272 if (x[i] & j) {
276 s=(k<mr_r.length+bpe ? k : 0); 273 s=(k<mr_r.length+bpe ? k : 0);
277 i=mr_r.length; 274 i=mr_r.length;
278 j=mask; 275 j=mask;
279 } else 276 } else
280 k++; 277 k++;
281 278
282 if (s) 279 if (s)
283 rightShift_(mr_r,s); 280 rightShift_(mr_r,s);
284 281
285 powMod_(mr_a,mr_r,x); 282 powMod_(mr_a,mr_r,x);
286 283
287 if (!equalsInt(mr_a,1) && !equals(mr_a,mr_x1)) { 284 if (!equalsInt(mr_a,1) && !equals(mr_a,mr_x1)) {
288 j=1; 285 j=1;
289 while (j<=s-1 && !equals(mr_a,mr_x1)) { 286 while (j<=s-1 && !equals(mr_a,mr_x1)) {
290 squareMod_(mr_a,x); 287 squareMod_(mr_a,x);
291 if (equalsInt(mr_a,1)) { 288 if (equalsInt(mr_a,1)) {
292 return 0; 289 return 0;
293 } 290 }
294 j++; 291 j++;
295 } 292 }
296 if (!equals(mr_a,mr_x1)) { 293 if (!equals(mr_a,mr_x1)) {
297 return 0; 294 return 0;
298 } 295 }
299 } 296 }
300 297
301 return 1; 298 return 1;
302 }, 299 },
303 300
304 //returns how many bits long the bigInt is, not counting leading zeros. 301 //returns how many bits long the bigInt is, not counting leading zeros.
305 'bitSize': function(x) { 302 'bitSize': function(x) {
306 var j,z,w; 303 var j,z,w;
307 for (j=x.length-1; (x[j]==0) && (j>0); j--); 304 for (j=x.length-1; (x[j]==0) && (j>0); j--);
308 for (z=0,w=x[j]; w; (w>>=1),z++); 305 for (z=0,w=x[j]; w; (w>>=1),z++);
309 z+=bpe*j; 306 z+=bpe*j;
310 return z; 307 return z;
311 }, 308 },
312 309
313 //return a copy of x with at least n elements, adding leading zeros if needed 310 //return a copy of x with at least n elements, adding leading zeros if needed
314 'expand': function(x,n) { 311 'expand': function(x,n) {
315 var ans=int2bigInt(0,(x.length>n ? x.length : n)*bpe,0); 312 var ans=int2bigInt(0,(x.length>n ? x.length : n)*bpe,0);
316 copy_(ans,x); 313 copy_(ans,x);
317 return ans; 314 return ans;
318 }, 315 },
319 316
320 //return a k-bit true random prime using Maurer's algorithm. 317 //return a k-bit true random prime using Maurer's algorithm.
321 'randTruePrime': function(k) { 318 'randTruePrime': function(k) {
322 var ans=int2bigInt(0,k,0); 319 var ans=int2bigInt(0,k,0);
323 randTruePrime_(ans,k); 320 randTruePrime_(ans,k);
324 return trim(ans,1); 321 return trim(ans,1);
325 }, 322 },
326 323
327 //return a new bigInt equal to (x mod n) for bigInts x and n. 324 //return a new bigInt equal to (x mod n) for bigInts x and n.
328 'mod': function(x,n) { 325 'mod': function(x,n) {
329 var ans=dup(x); 326 var ans=dup(x);
330 mod_(ans,n); 327 mod_(ans,n);
331 return trim(ans,1); 328 return trim(ans,1);
332 }, 329 },
333 330
334 //return (x+n) where x is a bigInt and n is an integer. 331 //return (x+n) where x is a bigInt and n is an integer.
335 'addInt': function(x,n) { 332 'addInt': function(x,n) {
336 var ans=expand(x,x.length+1); 333 var ans=expand(x,x.length+1);
337 addInt_(ans,n); 334 addInt_(ans,n);
338 return trim(ans,1); 335 return trim(ans,1);
339 }, 336 },
340 337
341 //return x*y for bigInts x and y. This is faster when y<x. 338 //return x*y for bigInts x and y. This is faster when y<x.
342 'mult': function(x,y) { 339 'mult': function(x,y) {
343 var ans=expand(x,x.length+y.length); 340 var ans=expand(x,x.length+y.length);
344 mult_(ans,y); 341 mult_(ans,y);
345 return trim(ans,1); 342 return trim(ans,1);
346 }, 343 },
347 344
348 //return (x**y mod n) where x,y,n are bigInts and ** is exponentiation. 0**0=1. Faster for odd n. 345 //return (x**y mod n) where x,y,n are bigInts and ** is exponentiation. 0**0=1. Faster for odd n.
349 'powMod': function(x,y,n) { 346 'powMod': function(x,y,n) {
350 var ans=expand(x,n.length); 347 var ans=expand(x,n.length);
351 powMod_(ans,trim(y,2),trim(n,2),0); //this should work without the trim, but doesn't 348 powMod_(ans,trim(y,2),trim(n,2),0); //this should work without the trim, but doesn't
352 return trim(ans,1); 349 return trim(ans,1);
353 }, 350 },
354 351
355 //return (x-y) for bigInts x and y. Negative answers will be 2s complement 352 //return (x-y) for bigInts x and y. Negative answers will be 2s complement
356 'sub': function(x,y) { 353 'sub': function(x,y) {
357 var ans=expand(x,(x.length>y.length ? x.length+1 : y.length+1)); 354 var ans=expand(x,(x.length>y.length ? x.length+1 : y.length+1));
358 sub_(ans,y); 355 sub_(ans,y);
359 return trim(ans,1); 356 return trim(ans,1);
360 }, 357 },
361 358
362 //return (x+y) for bigInts x and y. 359 //return (x+y) for bigInts x and y.
363 'add': function(x,y) { 360 'add': function(x,y) {
364 var ans=expand(x,(x.length>y.length ? x.length+1 : y.length+1)); 361 var ans=expand(x,(x.length>y.length ? x.length+1 : y.length+1));
365 add_(ans,y); 362 add_(ans,y);
366 return trim(ans,1); 363 return trim(ans,1);
367 }, 364 },
368 365
369 //return (x**(-1) mod n) for bigInts x and n. If no inverse exists, it returns null 366 //return (x**(-1) mod n) for bigInts x and n. If no inverse exists, it returns null
370 'inverseMod': function(x,n) { 367 'inverseMod': function(x,n) {
371 var ans=expand(x,n.length); 368 var ans=expand(x,n.length);
372 var s; 369 var s;
373 s=inverseMod_(ans,n); 370 s=inverseMod_(ans,n);
374 return s ? trim(ans,1) : null; 371 return s ? trim(ans,1) : null;
375 }, 372 },
376 373
377 //return (x*y mod n) for bigInts x,y,n. For greater speed, let y<x. 374 //return (x*y mod n) for bigInts x,y,n. For greater speed, let y<x.
378 'multMod': function(x,y,n) { 375 'multMod': function(x,y,n) {
379 var ans=expand(x,n.length); 376 var ans=expand(x,n.length);
380 multMod_(ans,y,n); 377 multMod_(ans,y,n);
381 return trim(ans,1); 378 return trim(ans,1);
382 }, 379 },
383 380
384 //generate a k-bit true random prime using Maurer's algorithm, 381 //generate a k-bit true random prime using Maurer's algorithm,
385 //and put it into ans. The bigInt ans must be large enough to hold it. 382 //and put it into ans. The bigInt ans must be large enough to hold it.
386 'randTruePrime_': function(ans,k) { 383 'randTruePrime_': function(ans,k) {
387 var c,m,pm,dd,j,r,B,divisible,z,zz,recSize; 384 var c,m,pm,dd,j,r,B,divisible,z,zz,recSize;
388 385
389 if (primes.length==0) 386 if (primes.length==0)
390 primes=findPrimes(30000); //check for divisibility by primes <=30000 387 primes=findPrimes(30000); //check for divisibility by primes <=30000
391 388
392 if (pows.length==0) { 389 if (pows.length==0) {
393 pows=new Array(512); 390 pows=new Array(512);
394 for (j=0;j<512;j++) { 391 for (j=0;j<512;j++) {
395 pows[j]=Math.pow(2,j/511.-1.); 392 pows[j]=Math.pow(2,j/511.-1.);
396 } 393 }
397 } 394 }
398 395
399 //c and m should be tuned for a particular machine and value of k, to maximize speed 396 //c and m should be tuned for a particular machine and value of k, to maximize speed
400 //this was: c=primes[primes.length-1]/k/k; //check using all the small primes. (c=0.1 in HAC) 397 //this was: c=primes[primes.length-1]/k/k; //check using all the small primes. (c=0.1 in HAC)
401 c=0.1; 398 c=0.1;
402 m=20; //generate this k-bit number by first recursively generating a number that has between k/2 and k-m bits 399 m=20; //generate this k-bit number by first recursively generating a number that has between k/2 and k-m bits
403 recLimit=20; /*must be at least 2 (was 29)*/ //stop recursion when k <=recLimit 400 recLimit=20; /*must be at least 2 (was 29)*/ //stop recursion when k <=recLimit
404 401
405 if (s_i2.length!=ans.length) { 402 if (s_i2.length!=ans.length) {
406 s_i2=dup(ans); 403 s_i2=dup(ans);
407 s_R =dup(ans); 404 s_R =dup(ans);
408 s_n1=dup(ans); 405 s_n1=dup(ans);
diff --git a/frontend/beta/js/Clipperz/Crypto/ECC.js b/frontend/beta/js/Clipperz/Crypto/ECC.js
index c3dcec3..bdfd9be 100644
--- a/frontend/beta/js/Clipperz/Crypto/ECC.js
+++ b/frontend/beta/js/Clipperz/Crypto/ECC.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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/* 26/*
30try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { 27try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) {
31 throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!"; 28 throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!";
32} 29}
33 30
34if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; } 31if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; }
35 32
36 33
37//############################################################################# 34//#############################################################################
38 35
39Clipperz.Crypto.ECC.BinaryField = {}; 36Clipperz.Crypto.ECC.BinaryField = {};
40 37
41//############################################################################# 38//#############################################################################
42 39
43Clipperz.Crypto.ECC.BinaryField.AbstractValue = function(aValue, aBase) { 40Clipperz.Crypto.ECC.BinaryField.AbstractValue = function(aValue, aBase) {
44 return this; 41 return this;
45} 42}
46 43
47Clipperz.Crypto.ECC.BinaryField.AbstractValue.prototype = MochiKit.Base.update(null, { 44Clipperz.Crypto.ECC.BinaryField.AbstractValue.prototype = MochiKit.Base.update(null, {
48 45
49 'asString': function(aBase) { 46 'asString': function(aBase) {
50 throw Clipperz.Base.exception.AbstractMethod; 47 throw Clipperz.Base.exception.AbstractMethod;
51 }, 48 },
52 49
53 'isZero': function() { 50 'isZero': function() {
54 throw Clipperz.Base.exception.AbstractMethod; 51 throw Clipperz.Base.exception.AbstractMethod;
55 }, 52 },
56 53
57 'shiftLeft': function(aNumberOfBitsToShift) { 54 'shiftLeft': function(aNumberOfBitsToShift) {
58 throw Clipperz.Base.exception.AbstractMethod; 55 throw Clipperz.Base.exception.AbstractMethod;
59 }, 56 },
60 57
61 'bitSize': function() { 58 'bitSize': function() {
62 throw Clipperz.Base.exception.AbstractMethod; 59 throw Clipperz.Base.exception.AbstractMethod;
63 }, 60 },
64 61
65 'isBitSet': function(aBitPosition) { 62 'isBitSet': function(aBitPosition) {
66 throw Clipperz.Base.exception.AbstractMethod; 63 throw Clipperz.Base.exception.AbstractMethod;
67 }, 64 },
68 65
69 'xor': function(aValue) { 66 'xor': function(aValue) {
70 throw Clipperz.Base.exception.AbstractMethod; 67 throw Clipperz.Base.exception.AbstractMethod;
71 }, 68 },
72 69
73 'compare': function(aValue) { 70 'compare': function(aValue) {
74 throw Clipperz.Base.exception.AbstractMethod; 71 throw Clipperz.Base.exception.AbstractMethod;
75 }, 72 },
76 73
77 //----------------------------------------------------------------------------- 74 //-----------------------------------------------------------------------------
78 __syntaxFix__: "syntax fix" 75 __syntaxFix__: "syntax fix"
79}); 76});
80 77
81//***************************************************************************** 78//*****************************************************************************
82/ * 79/ *
83Clipperz.Crypto.ECC.BinaryField.BigIntValue = function(aValue, aBase) { 80Clipperz.Crypto.ECC.BinaryField.BigIntValue = function(aValue, aBase) {
84 this._value = new Clipperz.Crypto.BigInt(aValue, aBase); 81 this._value = new Clipperz.Crypto.BigInt(aValue, aBase);
85 return this; 82 return this;
86} 83}
87 84
88Clipperz.Crypto.ECC.BinaryField.BigIntValue.prototype = MochiKit.Base.update(new Clipperz.Crypto.ECC.BinaryField.AbstractValue(), { 85Clipperz.Crypto.ECC.BinaryField.BigIntValue.prototype = MochiKit.Base.update(new Clipperz.Crypto.ECC.BinaryField.AbstractValue(), {
89 86
90 'value': function() { 87 'value': function() {
91 return this._value; 88 return this._value;
92 }, 89 },
93 90
94 //----------------------------------------------------------------------------- 91 //-----------------------------------------------------------------------------
95 92
96 'isZero': function() { 93 'isZero': function() {
97 return (this.value().compare(Clipperz.Crypto.ECC.BinaryField.BigIntValue.O) == 0); 94 return (this.value().compare(Clipperz.Crypto.ECC.BinaryField.BigIntValue.O) == 0);
98 }, 95 },
99 96
100 //----------------------------------------------------------------------------- 97 //-----------------------------------------------------------------------------
101 98
102 'asString': function(aBase) { 99 'asString': function(aBase) {
103 return this.value().asString(aBase); 100 return this.value().asString(aBase);
104 }, 101 },
105 102
106 //----------------------------------------------------------------------------- 103 //-----------------------------------------------------------------------------
107 104
108 'shiftLeft': function(aNumberOfBitsToShift) { 105 'shiftLeft': function(aNumberOfBitsToShift) {
109 return new Clipperz.Crypto.ECC.BinaryField.BigIntValue(this.value().shiftLeft(aNumberOfBitsToShift)); 106 return new Clipperz.Crypto.ECC.BinaryField.BigIntValue(this.value().shiftLeft(aNumberOfBitsToShift));
110 }, 107 },
111 108
112 //----------------------------------------------------------------------------- 109 //-----------------------------------------------------------------------------
113 110
114 'bitSize': function() { 111 'bitSize': function() {
115 return this.value().bitSize(); 112 return this.value().bitSize();
116 }, 113 },
117 114
118 //----------------------------------------------------------------------------- 115 //-----------------------------------------------------------------------------
119 116
120 'isBitSet': function(aBitPosition) { 117 'isBitSet': function(aBitPosition) {
121 return this.value().isBitSet(aBitPosition); 118 return this.value().isBitSet(aBitPosition);
122 }, 119 },
123 120
124 //----------------------------------------------------------------------------- 121 //-----------------------------------------------------------------------------
125 122
126 'xor': function(aValue) { 123 'xor': function(aValue) {
127 return new Clipperz.Crypto.ECC.BinaryField.BigIntValue(this.value().xor(aValue.value())); 124 return new Clipperz.Crypto.ECC.BinaryField.BigIntValue(this.value().xor(aValue.value()));
128 }, 125 },
129 126
130 //----------------------------------------------------------------------------- 127 //-----------------------------------------------------------------------------
131 128
132 'compare': function(aValue) { 129 'compare': function(aValue) {
133 return this.value().compare(aValue.value()); 130 return this.value().compare(aValue.value());
134 }, 131 },
135 132
136 //----------------------------------------------------------------------------- 133 //-----------------------------------------------------------------------------
137 __syntaxFix__: "syntax fix" 134 __syntaxFix__: "syntax fix"
138}); 135});
139 136
140Clipperz.Crypto.ECC.BinaryField.BigIntValue.O = new Clipperz.Crypto.BigInt(0); 137Clipperz.Crypto.ECC.BinaryField.BigIntValue.O = new Clipperz.Crypto.BigInt(0);
141Clipperz.Crypto.ECC.BinaryField.BigIntValue.I = new Clipperz.Crypto.BigInt(1); 138Clipperz.Crypto.ECC.BinaryField.BigIntValue.I = new Clipperz.Crypto.BigInt(1);
142* / 139* /
143//***************************************************************************** 140//*****************************************************************************
144 141
145Clipperz.Crypto.ECC.BinaryField.WordArrayValue = function(aValue, aBase) { 142Clipperz.Crypto.ECC.BinaryField.WordArrayValue = function(aValue, aBase) {
146 if (aValue.constructor == String) { 143 if (aValue.constructor == String) {
147 varvalue; 144 varvalue;
148 varstringLength; 145 varstringLength;
149 var numberOfWords; 146 var numberOfWords;
150 vari,c; 147 vari,c;
151 148
152 if (aBase != 16) { 149 if (aBase != 16) {
153 throw Clipperz.Crypto.ECC.BinaryField.WordArrayValue.exception.UnsupportedBase; 150 throw Clipperz.Crypto.ECC.BinaryField.WordArrayValue.exception.UnsupportedBase;
154 } 151 }
155 152
156 value = aValue.replace(/ /g, ''); 153 value = aValue.replace(/ /g, '');
157 stringLength = value.length; 154 stringLength = value.length;
158 numberOfWords = Math.ceil(stringLength / 8); 155 numberOfWords = Math.ceil(stringLength / 8);
159 this._value = new Array(numberOfWords); 156 this._value = new Array(numberOfWords);
160 157
161 c = numberOfWords; 158 c = numberOfWords;
162 for (i=0; i<c; i++) { 159 for (i=0; i<c; i++) {
163 varword; 160 varword;
164 161
165 if (i < (c-1)) { 162 if (i < (c-1)) {
166 word = parseInt(value.substr(stringLength-((i+1)*8), 8), 16); 163 word = parseInt(value.substr(stringLength-((i+1)*8), 8), 16);
167 } else { 164 } else {
168 word = parseInt(value.substr(0, stringLength-(i*8)), 16); 165 word = parseInt(value.substr(0, stringLength-(i*8)), 16);
169 } 166 }
170 167
171 this._value[i] = word; 168 this._value[i] = word;
172 } 169 }
173 } else if (aValue.constructor == Array) { 170 } else if (aValue.constructor == Array) {
174 var itemsToCopy; 171 var itemsToCopy;
175 172
176 itemsToCopy = aValue.length; 173 itemsToCopy = aValue.length;
177 while (aValue[itemsToCopy - 1] == 0) { 174 while (aValue[itemsToCopy - 1] == 0) {
178 itemsToCopy --; 175 itemsToCopy --;
179 } 176 }
180 177
181 this._value = aValue.slice(0, itemsToCopy); 178 this._value = aValue.slice(0, itemsToCopy);
182 } else if (aValue.constructor == Number) { 179 } else if (aValue.constructor == Number) {
183 this._value = [aValue]; 180 this._value = [aValue];
184 } else { 181 } else {
185 // throw Clipperz.Crypto.ECC.BinaryField.WordArrayValue.exception.UnsupportedConstructorValueType; 182 // throw Clipperz.Crypto.ECC.BinaryField.WordArrayValue.exception.UnsupportedConstructorValueType;
186 } 183 }
187 184
188 return this; 185 return this;
189} 186}
190 187
191Clipperz.Crypto.ECC.BinaryField.WordArrayValue.prototype = MochiKit.Base.update(new Clipperz.Crypto.ECC.BinaryField.AbstractValue(), { 188Clipperz.Crypto.ECC.BinaryField.WordArrayValue.prototype = MochiKit.Base.update(new Clipperz.Crypto.ECC.BinaryField.AbstractValue(), {
192 189
193 'value': function() { 190 'value': function() {
194 return this._value; 191 return this._value;
195 }, 192 },
196 193
197 //----------------------------------------------------------------------------- 194 //-----------------------------------------------------------------------------
198 195
199 'wordSize': function() { 196 'wordSize': function() {
200 return this._value.length 197 return this._value.length
201 }, 198 },
202 199
203 //----------------------------------------------------------------------------- 200 //-----------------------------------------------------------------------------
204 201
205 'clone': function() { 202 'clone': function() {
206 return new Clipperz.Crypto.ECC.BinaryField.WordArrayValue(this._value.slice(0)); 203 return new Clipperz.Crypto.ECC.BinaryField.WordArrayValue(this._value.slice(0));
207 }, 204 },
208 205
209 //----------------------------------------------------------------------------- 206 //-----------------------------------------------------------------------------
210 207
211 'isZero': function() { 208 'isZero': function() {
212 return (this.compare(Clipperz.Crypto.ECC.BinaryField.WordArrayValue.O) == 0); 209 return (this.compare(Clipperz.Crypto.ECC.BinaryField.WordArrayValue.O) == 0);
213 }, 210 },
214 211
215 //----------------------------------------------------------------------------- 212 //-----------------------------------------------------------------------------
216 213
217 'asString': function(aBase) { 214 'asString': function(aBase) {
218 varresult; 215 varresult;
219 var i,c; 216 var i,c;
220 217
221 if (aBase != 16) { 218 if (aBase != 16) {
222 throw Clipperz.Crypto.ECC.BinaryField.WordArrayValue.exception.UnsupportedBase; 219 throw Clipperz.Crypto.ECC.BinaryField.WordArrayValue.exception.UnsupportedBase;
223 } 220 }
224 221
225 result = ""; 222 result = "";
226 c = this.wordSize(); 223 c = this.wordSize();
227 for (i=0; i<c; i++) { 224 for (i=0; i<c; i++) {
228 varwordAsString; 225 varwordAsString;
229 226
230 // wordAsString = ("00000000" + this.value()[i].toString(16)); 227 // wordAsString = ("00000000" + this.value()[i].toString(16));
231 wordAsString = ("00000000" + this._value[i].toString(16)); 228 wordAsString = ("00000000" + this._value[i].toString(16));
232 wordAsString = wordAsString.substring(wordAsString.length - 8); 229 wordAsString = wordAsString.substring(wordAsString.length - 8);
233 result = wordAsString + result; 230 result = wordAsString + result;
234 } 231 }
235 232
236 result = result.replace(/^(00)* SPACEs THAT SHOULD BE REMOVED TO FIX THIS REGEX /, ""); 233 result = result.replace(/^(00)* SPACEs THAT SHOULD BE REMOVED TO FIX THIS REGEX /, "");
237 234
238 if (result == "") { 235 if (result == "") {
239 result = "0"; 236 result = "0";
240 } 237 }
241 238
242 return result; 239 return result;
243 }, 240 },
244 241
245 //----------------------------------------------------------------------------- 242 //-----------------------------------------------------------------------------
246 243
247 'shiftLeft': function(aNumberOfBitsToShift) { 244 'shiftLeft': function(aNumberOfBitsToShift) {
248 return new Clipperz.Crypto.ECC.BinaryField.WordArrayValue(Clipperz.Crypto.ECC.BinaryField.WordArrayValue.shiftLeft(this._value, aNumberOfBitsToShift)); 245 return new Clipperz.Crypto.ECC.BinaryField.WordArrayValue(Clipperz.Crypto.ECC.BinaryField.WordArrayValue.shiftLeft(this._value, aNumberOfBitsToShift));
249 }, 246 },
250 247
251 //----------------------------------------------------------------------------- 248 //-----------------------------------------------------------------------------
252 249
253 'bitSize': function() { 250 'bitSize': function() {
254 return Clipperz.Crypto.ECC.BinaryField.WordArrayValue.bitSize(this._value); 251 return Clipperz.Crypto.ECC.BinaryField.WordArrayValue.bitSize(this._value);
255 }, 252 },
256 253
257 //----------------------------------------------------------------------------- 254 //-----------------------------------------------------------------------------
258 255
259 'isBitSet': function(aBitPosition) { 256 'isBitSet': function(aBitPosition) {
260 return Clipperz.Crypto.ECC.BinaryField.WordArrayValue.isBitSet(this._value, aBitPosition); 257 return Clipperz.Crypto.ECC.BinaryField.WordArrayValue.isBitSet(this._value, aBitPosition);
261 }, 258 },
262 259
263 //----------------------------------------------------------------------------- 260 //-----------------------------------------------------------------------------
264 261
265 'xor': function(aValue) { 262 'xor': function(aValue) {
266 return new Clipperz.Crypto.ECC.BinaryField.WordArrayValue(Clipperz.Crypto.ECC.BinaryField.WordArrayValue.xor(this._value, aValue._value)); 263 return new Clipperz.Crypto.ECC.BinaryField.WordArrayValue(Clipperz.Crypto.ECC.BinaryField.WordArrayValue.xor(this._value, aValue._value));
267 }, 264 },
268 265
269 //----------------------------------------------------------------------------- 266 //-----------------------------------------------------------------------------
270 267
271 'compare': function(aValue) { 268 'compare': function(aValue) {
272 return Clipperz.Crypto.ECC.BinaryField.WordArrayValue.compare(this._value, aValue._value); 269 return Clipperz.Crypto.ECC.BinaryField.WordArrayValue.compare(this._value, aValue._value);
273 }, 270 },
274 271
275 //----------------------------------------------------------------------------- 272 //-----------------------------------------------------------------------------
276 __syntaxFix__: "syntax fix" 273 __syntaxFix__: "syntax fix"
277}); 274});
278 275
279Clipperz.Crypto.ECC.BinaryField.WordArrayValue.O = new Clipperz.Crypto.ECC.BinaryField.WordArrayValue('0', 16); 276Clipperz.Crypto.ECC.BinaryField.WordArrayValue.O = new Clipperz.Crypto.ECC.BinaryField.WordArrayValue('0', 16);
280Clipperz.Crypto.ECC.BinaryField.WordArrayValue.I = new Clipperz.Crypto.ECC.BinaryField.WordArrayValue('1', 16); 277Clipperz.Crypto.ECC.BinaryField.WordArrayValue.I = new Clipperz.Crypto.ECC.BinaryField.WordArrayValue('1', 16);
281 278
282Clipperz.Crypto.ECC.BinaryField.WordArrayValue.xor = function(a, b) { 279Clipperz.Crypto.ECC.BinaryField.WordArrayValue.xor = function(a, b) {
283 var result; 280 var result;
284 var resultSize; 281 var resultSize;
285 var i,c; 282 var i,c;
286 283
287 resultSize = Math.max(a.length, b.length); 284 resultSize = Math.max(a.length, b.length);
288 285
289 result = new Array(resultSize); 286 result = new Array(resultSize);
290 c = resultSize; 287 c = resultSize;
291 for (i=0; i<c; i++) { 288 for (i=0; i<c; i++) {
292 // resultValue[i] = (((this.value()[i] || 0) ^ (aValue.value()[i] || 0)) >>> 0); 289 // resultValue[i] = (((this.value()[i] || 0) ^ (aValue.value()[i] || 0)) >>> 0);
293 result[i] = (((a[i] || 0) ^ (b[i] || 0)) >>> 0); 290 result[i] = (((a[i] || 0) ^ (b[i] || 0)) >>> 0);
294 } 291 }
295 292
296 return result; 293 return result;
297}; 294};
298 295
299Clipperz.Crypto.ECC.BinaryField.WordArrayValue.shiftLeft = function(aWordArray, aNumberOfBitsToShift) { 296Clipperz.Crypto.ECC.BinaryField.WordArrayValue.shiftLeft = function(aWordArray, aNumberOfBitsToShift) {
300 var numberOfWordsToShift; 297 var numberOfWordsToShift;
301 varnumberOfBitsToShift; 298 varnumberOfBitsToShift;
302 var result; 299 var result;
303 varoverflowValue; 300 varoverflowValue;
304 vari,c; 301 vari,c;
305 302
306 numberOfWordsToShift = Math.floor(aNumberOfBitsToShift / 32); 303 numberOfWordsToShift = Math.floor(aNumberOfBitsToShift / 32);
307 numberOfBitsToShift = aNumberOfBitsToShift % 32; 304 numberOfBitsToShift = aNumberOfBitsToShift % 32;
308 305
309 result = new Array(aWordArray.length + numberOfWordsToShift); 306 result = new Array(aWordArray.length + numberOfWordsToShift);
310 307
311 c = numberOfWordsToShift; 308 c = numberOfWordsToShift;
312 for (i=0; i<c; i++) { 309 for (i=0; i<c; i++) {
313 result[i] = 0; 310 result[i] = 0;
314 } 311 }
315 312
316 overflowValue = 0; 313 overflowValue = 0;
317 nextOverflowValue = 0; 314 nextOverflowValue = 0;
318 315
319 c = aWordArray.length; 316 c = aWordArray.length;
320 for (i=0; i<c; i++) { 317 for (i=0; i<c; i++) {
321 varvalue; 318 varvalue;
322 varresultWord; 319 varresultWord;
323 320
324 // value = this.value()[i]; 321 // value = this.value()[i];
325 value = aWordArray[i]; 322 value = aWordArray[i];
326 323
327 if (numberOfBitsToShift > 0) { 324 if (numberOfBitsToShift > 0) {
328 var nextOverflowValue; 325 var nextOverflowValue;
329 326
330 nextOverflowValue = (value >>> (32 - numberOfBitsToShift)); 327 nextOverflowValue = (value >>> (32 - numberOfBitsToShift));
331 value = value & (0xffffffff >>> numberOfBitsToShift); 328 value = value & (0xffffffff >>> numberOfBitsToShift);
332 resultWord = (((value << numberOfBitsToShift) | overflowValue) >>> 0); 329 resultWord = (((value << numberOfBitsToShift) | overflowValue) >>> 0);
333 } else { 330 } else {
334 resultWord = value; 331 resultWord = value;
335 } 332 }
336 333
337 result[i+numberOfWordsToShift] = resultWord; 334 result[i+numberOfWordsToShift] = resultWord;
338 overflowValue = nextOverflowValue; 335 overflowValue = nextOverflowValue;
339 } 336 }
340 337
341 if (overflowValue != 0) { 338 if (overflowValue != 0) {
342 result[aWordArray.length + numberOfWordsToShift] = overflowValue; 339 result[aWordArray.length + numberOfWordsToShift] = overflowValue;
343 } 340 }
344 341
345 return result; 342 return result;
346}; 343};
347 344
348Clipperz.Crypto.ECC.BinaryField.WordArrayValue.bitSize = function(aWordArray) { 345Clipperz.Crypto.ECC.BinaryField.WordArrayValue.bitSize = function(aWordArray) {
349 varresult; 346 varresult;
350 varnotNullElements; 347 varnotNullElements;
351 var mostValuableWord; 348 var mostValuableWord;
352 var matchingBitsInMostImportantWord; 349 var matchingBitsInMostImportantWord;
353 var mask; 350 var mask;
354 var i,c; 351 var i,c;
355 352
356 notNullElements = aWordArray.length; 353 notNullElements = aWordArray.length;
357 354
358 if ((aWordArray.length == 1) && (aWordArray[0] == 0)) { 355 if ((aWordArray.length == 1) && (aWordArray[0] == 0)) {
359 result = 0; 356 result = 0;
360 } else { 357 } else {
361 while((aWordArray[notNullElements - 1] == 0) && (notNullElements > 0)) { 358 while((aWordArray[notNullElements - 1] == 0) && (notNullElements > 0)) {
362 notNullElements --; 359 notNullElements --;
363 } 360 }
364 361
365 result = (notNullElements - 1) * 32; 362 result = (notNullElements - 1) * 32;
366 mostValuableWord = aWordArray[notNullElements - 1]; 363 mostValuableWord = aWordArray[notNullElements - 1];
367 364
368 matchingBits = 32; 365 matchingBits = 32;
369 mask = 0x80000000; 366 mask = 0x80000000;
370 367
371 while ((matchingBits > 0) && ((mostValuableWord & mask) == 0)) { 368 while ((matchingBits > 0) && ((mostValuableWord & mask) == 0)) {
372 matchingBits --; 369 matchingBits --;
373 mask >>>= 1; 370 mask >>>= 1;
374 } 371 }
375 372
376 result += matchingBits; 373 result += matchingBits;
377 } 374 }
378 375
379 return result; 376 return result;
380}; 377};
381 378
382Clipperz.Crypto.ECC.BinaryField.WordArrayValue.isBitSet = function(aWordArray, aBitPosition) { 379Clipperz.Crypto.ECC.BinaryField.WordArrayValue.isBitSet = function(aWordArray, aBitPosition) {
383 var result; 380 var result;
384 varbyteIndex; 381 varbyteIndex;
385 var bitIndexInSelectedByte; 382 var bitIndexInSelectedByte;
386 383
387 byteIndex = Math.floor(aBitPosition / 32); 384 byteIndex = Math.floor(aBitPosition / 32);
388 bitIndexInSelectedByte = aBitPosition % 32; 385 bitIndexInSelectedByte = aBitPosition % 32;
389 386
390 if (byteIndex <= aWordArray.length) { 387 if (byteIndex <= aWordArray.length) {
391 result = ((aWordArray[byteIndex] & (1 << bitIndexInSelectedByte)) != 0); 388 result = ((aWordArray[byteIndex] & (1 << bitIndexInSelectedByte)) != 0);
392 } else { 389 } else {
393 result = false; 390 result = false;
394 } 391 }
395 392
396 return result; 393 return result;
397}; 394};
398 395
399Clipperz.Crypto.ECC.BinaryField.WordArrayValue.compare = function(a,b) { 396Clipperz.Crypto.ECC.BinaryField.WordArrayValue.compare = function(a,b) {
400 varresult; 397 varresult;
401 var i,c; 398 var i,c;
402 399
403 result = MochiKit.Base.compare(a.length, b.length); 400 result = MochiKit.Base.compare(a.length, b.length);
404 401
405 c = a.length; 402 c = a.length;
406 for (i=0; (i<c) && (result==0); i++) { 403 for (i=0; (i<c) && (result==0); i++) {
407//console.log("compare[" + c + " - " + i + " - 1] " + this.value()[c-i-1] + ", " + aValue.value()[c-i-1]); 404//console.log("compare[" + c + " - " + i + " - 1] " + this.value()[c-i-1] + ", " + aValue.value()[c-i-1]);
408 // result = MochiKit.Base.compare(this.value()[c-i-1], aValue.value()[c-i-1]); 405 // result = MochiKit.Base.compare(this.value()[c-i-1], aValue.value()[c-i-1]);
diff --git a/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Curve.js b/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Curve.js
index 042ca6c..01127c3 100644
--- a/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Curve.js
+++ b/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Curve.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { 26try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) {
30 throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!"; 27 throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!";
31} 28}
32if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; } 29if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; }
33if (typeof(Clipperz.Crypto.ECC.BinaryField) == 'undefined') { Clipperz.Crypto.ECC.BinaryField = {}; } 30if (typeof(Clipperz.Crypto.ECC.BinaryField) == 'undefined') { Clipperz.Crypto.ECC.BinaryField = {}; }
34 31
35Clipperz.Crypto.ECC.BinaryField.Curve = function(args) { 32Clipperz.Crypto.ECC.BinaryField.Curve = function(args) {
36 args = args || {}; 33 args = args || {};
37 34
38 this._modulus = args.modulus; 35 this._modulus = args.modulus;
39 36
40 this._a = args.a; 37 this._a = args.a;
41 this._b = args.b; 38 this._b = args.b;
42 this._G = args.G; 39 this._G = args.G;
43 this._r = args.r; 40 this._r = args.r;
44 this._h = args.h; 41 this._h = args.h;
45 42
46 this._finiteField = null; 43 this._finiteField = null;
47 44
48 return this; 45 return this;
49} 46}
50 47
51Clipperz.Crypto.ECC.BinaryField.Curve.prototype = MochiKit.Base.update(null, { 48Clipperz.Crypto.ECC.BinaryField.Curve.prototype = MochiKit.Base.update(null, {
52 49
53 'asString': function() { 50 'asString': function() {
54 return "Clipperz.Crypto.ECC.BinaryField.Curve"; 51 return "Clipperz.Crypto.ECC.BinaryField.Curve";
55 }, 52 },
56 53
57 //----------------------------------------------------------------------------- 54 //-----------------------------------------------------------------------------
58 55
59 'modulus': function() { 56 'modulus': function() {
60 return this._modulus; 57 return this._modulus;
61 }, 58 },
62 59
63 'a': function() { 60 'a': function() {
64 return this._a; 61 return this._a;
65 }, 62 },
66 63
67 'b': function() { 64 'b': function() {
68 return this._b; 65 return this._b;
69 }, 66 },
70 67
71 'G': function() { 68 'G': function() {
72 return this._G; 69 return this._G;
73 }, 70 },
74 71
75 'r': function() { 72 'r': function() {
76 return this._r; 73 return this._r;
77 }, 74 },
78 75
79 'h': function() { 76 'h': function() {
80 return this._h; 77 return this._h;
81 }, 78 },
82 79
83 //----------------------------------------------------------------------------- 80 //-----------------------------------------------------------------------------
84 81
85 'finiteField': function() { 82 'finiteField': function() {
86 if (this._finiteField == null) { 83 if (this._finiteField == null) {
87 this._finiteField = new Clipperz.Crypto.ECC.BinaryField.FiniteField({modulus:this.modulus()}) 84 this._finiteField = new Clipperz.Crypto.ECC.BinaryField.FiniteField({modulus:this.modulus()})
88 } 85 }
89 86
90 return this._finiteField; 87 return this._finiteField;
91 }, 88 },
92 89
93 //----------------------------------------------------------------------------- 90 //-----------------------------------------------------------------------------
94 91
95 'negate': function(aPointA) { 92 'negate': function(aPointA) {
96 var result; 93 var result;
97 94
98 result = new Clipperz.Crypto.ECC.Point({x:aPointA.x(), y:this.finiteField().add(aPointA.y(), aPointA.x())}) 95 result = new Clipperz.Crypto.ECC.Point({x:aPointA.x(), y:this.finiteField().add(aPointA.y(), aPointA.x())})
99 96
100 return result; 97 return result;
101 }, 98 },
102 99
103 //----------------------------------------------------------------------------- 100 //-----------------------------------------------------------------------------
104 101
105 'add': function(aPointA, aPointB) { 102 'add': function(aPointA, aPointB) {
106 var result; 103 var result;
107 104
108//console.log(">>> ECC.BinaryField.Curve.add"); 105//console.log(">>> ECC.BinaryField.Curve.add");
109 if (aPointA.isZero()) { 106 if (aPointA.isZero()) {
110//console.log("--- pointA == zero"); 107//console.log("--- pointA == zero");
111 result = aPointB; 108 result = aPointB;
112 } else if (aPointB.isZero()) { 109 } else if (aPointB.isZero()) {
113//console.log("--- pointB == zero"); 110//console.log("--- pointB == zero");
114 result = aPointA; 111 result = aPointA;
115 } else if ((aPointA.x().compare(aPointB.x()) == 0) && ((aPointA.y().compare(aPointB.y()) != 0) || aPointB.x().isZero())) { 112 } else if ((aPointA.x().compare(aPointB.x()) == 0) && ((aPointA.y().compare(aPointB.y()) != 0) || aPointB.x().isZero())) {
116//console.log("compare A.x - B.x: ", aPointA.x().compare(aPointB.x())); 113//console.log("compare A.x - B.x: ", aPointA.x().compare(aPointB.x()));
117//console.log("compare A.y - B.y: ", (aPointA.y().compare(aPointB.y()) != 0)); 114//console.log("compare A.y - B.y: ", (aPointA.y().compare(aPointB.y()) != 0));
118//console.log("compare B.x.isZero(): ", aPointB.x().isZero()); 115//console.log("compare B.x.isZero(): ", aPointB.x().isZero());
119 116
120//console.log("--- result = zero"); 117//console.log("--- result = zero");
121 result = new Clipperz.Crypto.ECC.BinaryField.Point({x:Clipperz.Crypto.ECC.BinaryField.Value.O, y:Clipperz.Crypto.ECC.BinaryField.Value.O}); 118 result = new Clipperz.Crypto.ECC.BinaryField.Point({x:Clipperz.Crypto.ECC.BinaryField.Value.O, y:Clipperz.Crypto.ECC.BinaryField.Value.O});
122 } else { 119 } else {
123//console.log("--- result = ELSE"); 120//console.log("--- result = ELSE");
124 varf2m; 121 varf2m;
125 var x, y; 122 var x, y;
126 var lambda; 123 var lambda;
127 var aX, aY, bX, bY; 124 var aX, aY, bX, bY;
128 125
129 aX = aPointA.x()._value; 126 aX = aPointA.x()._value;
130 aY = aPointA.y()._value; 127 aY = aPointA.y()._value;
131 bX = aPointB.x()._value; 128 bX = aPointB.x()._value;
132 bY = aPointB.y()._value; 129 bY = aPointB.y()._value;
133 130
134 f2m = this.finiteField(); 131 f2m = this.finiteField();
135 132
136 if (aPointA.x().compare(aPointB.x()) != 0) { 133 if (aPointA.x().compare(aPointB.x()) != 0) {
137//console.log(" a.x != b.x"); 134//console.log(" a.x != b.x");
138 lambda =f2m._fastMultiply( 135 lambda =f2m._fastMultiply(
139 f2m._add(aY, bY), 136 f2m._add(aY, bY),
140 f2m._inverse(f2m._add(aX, bX)) 137 f2m._inverse(f2m._add(aX, bX))
141 ); 138 );
142 x = f2m._add(this.a()._value, f2m._square(lambda)); 139 x = f2m._add(this.a()._value, f2m._square(lambda));
143 f2m._overwriteAdd(x, lambda); 140 f2m._overwriteAdd(x, lambda);
144 f2m._overwriteAdd(x, aX); 141 f2m._overwriteAdd(x, aX);
145 f2m._overwriteAdd(x, bX); 142 f2m._overwriteAdd(x, bX);
146 } else { 143 } else {
147//console.log(" a.x == b.x"); 144//console.log(" a.x == b.x");
148 lambda = f2m._add(bX, f2m._fastMultiply(bY, f2m._inverse(bX))); 145 lambda = f2m._add(bX, f2m._fastMultiply(bY, f2m._inverse(bX)));
149//console.log(" lambda: " + lambda.asString(16)); 146//console.log(" lambda: " + lambda.asString(16));
150 x = f2m._add(this.a()._value, f2m._square(lambda)); 147 x = f2m._add(this.a()._value, f2m._square(lambda));
151//console.log(" x (step 1): " + x.asString(16)); 148//console.log(" x (step 1): " + x.asString(16));
152 f2m._overwriteAdd(x, lambda); 149 f2m._overwriteAdd(x, lambda);
153//console.log(" x (step 2): " + x.asString(16)); 150//console.log(" x (step 2): " + x.asString(16));
154 } 151 }
155 152
156 y = f2m._fastMultiply(f2m._add(bX, x), lambda); 153 y = f2m._fastMultiply(f2m._add(bX, x), lambda);
157//console.log(" y (step 1): " + y.asString(16)); 154//console.log(" y (step 1): " + y.asString(16));
158 f2m._overwriteAdd(y, x); 155 f2m._overwriteAdd(y, x);
159//console.log(" y (step 2): " + y.asString(16)); 156//console.log(" y (step 2): " + y.asString(16));
160 f2m._overwriteAdd(y, bY); 157 f2m._overwriteAdd(y, bY);
161//console.log(" y (step 3): " + y.asString(16)); 158//console.log(" y (step 3): " + y.asString(16));
162 159
163 result = new Clipperz.Crypto.ECC.BinaryField.Point({x:new Clipperz.Crypto.ECC.BinaryField.Value(x), y:new Clipperz.Crypto.ECC.BinaryField.Value(y)}) 160 result = new Clipperz.Crypto.ECC.BinaryField.Point({x:new Clipperz.Crypto.ECC.BinaryField.Value(x), y:new Clipperz.Crypto.ECC.BinaryField.Value(y)})
164 } 161 }
165//console.log("<<< ECC.BinaryField.Curve.add"); 162//console.log("<<< ECC.BinaryField.Curve.add");
166 163
167 return result; 164 return result;
168 }, 165 },
169 166
170 //----------------------------------------------------------------------------- 167 //-----------------------------------------------------------------------------
171 168
172 'overwriteAdd': function(aPointA, aPointB) { 169 'overwriteAdd': function(aPointA, aPointB) {
173 if (aPointA.isZero()) { 170 if (aPointA.isZero()) {
174 // result = aPointB; 171 // result = aPointB;
175 aPointA._x._value = aPointB._x._value; 172 aPointA._x._value = aPointB._x._value;
176 aPointA._y._value = aPointB._y._value; 173 aPointA._y._value = aPointB._y._value;
177 } else if (aPointB.isZero()) { 174 } else if (aPointB.isZero()) {
178 // result = aPointA; 175 // result = aPointA;
179 } else if ((aPointA.x().compare(aPointB.x()) == 0) && ((aPointA.y().compare(aPointB.y()) != 0) || aPointB.x().isZero())) { 176 } else if ((aPointA.x().compare(aPointB.x()) == 0) && ((aPointA.y().compare(aPointB.y()) != 0) || aPointB.x().isZero())) {
180 // result = new Clipperz.Crypto.ECC.BinaryField.Point({x:Clipperz.Crypto.ECC.BinaryField.Value.O, y:Clipperz.Crypto.ECC.BinaryField.Value.O}); 177 // result = new Clipperz.Crypto.ECC.BinaryField.Point({x:Clipperz.Crypto.ECC.BinaryField.Value.O, y:Clipperz.Crypto.ECC.BinaryField.Value.O});
181 aPointA._x = Clipperz.Crypto.ECC.BinaryField.Value.O; 178 aPointA._x = Clipperz.Crypto.ECC.BinaryField.Value.O;
182 aPointA._y = Clipperz.Crypto.ECC.BinaryField.Value.O; 179 aPointA._y = Clipperz.Crypto.ECC.BinaryField.Value.O;
183 } else { 180 } else {
184 varf2m; 181 varf2m;
185 var x, y; 182 var x, y;
186 var lambda; 183 var lambda;
187 var aX, aY, bX, bY; 184 var aX, aY, bX, bY;
188 185
189 aX = aPointA.x()._value; 186 aX = aPointA.x()._value;
190 aY = aPointA.y()._value; 187 aY = aPointA.y()._value;
191 bX = aPointB.x()._value; 188 bX = aPointB.x()._value;
192 bY = aPointB.y()._value; 189 bY = aPointB.y()._value;
193 190
194 f2m = this.finiteField(); 191 f2m = this.finiteField();
195 192
196 if (aPointA.x().compare(aPointB.x()) != 0) { 193 if (aPointA.x().compare(aPointB.x()) != 0) {
197//console.log(" a.x != b.x"); 194//console.log(" a.x != b.x");
198 lambda =f2m._fastMultiply( 195 lambda =f2m._fastMultiply(
199 f2m._add(aY, bY), 196 f2m._add(aY, bY),
200 f2m._inverse(f2m._add(aX, bX)) 197 f2m._inverse(f2m._add(aX, bX))
201 ); 198 );
202 x = f2m._add(this.a()._value, f2m._square(lambda)); 199 x = f2m._add(this.a()._value, f2m._square(lambda));
203 f2m._overwriteAdd(x, lambda); 200 f2m._overwriteAdd(x, lambda);
204 f2m._overwriteAdd(x, aX); 201 f2m._overwriteAdd(x, aX);
205 f2m._overwriteAdd(x, bX); 202 f2m._overwriteAdd(x, bX);
206 } else { 203 } else {
207//console.log(" a.x == b.x"); 204//console.log(" a.x == b.x");
208 lambda = f2m._add(bX, f2m._fastMultiply(bY, f2m._inverse(bX))); 205 lambda = f2m._add(bX, f2m._fastMultiply(bY, f2m._inverse(bX)));
209//console.log(" lambda: " + lambda.asString(16)); 206//console.log(" lambda: " + lambda.asString(16));
210 x = f2m._add(this.a()._value, f2m._square(lambda)); 207 x = f2m._add(this.a()._value, f2m._square(lambda));
211//console.log(" x (step 1): " + x.asString(16)); 208//console.log(" x (step 1): " + x.asString(16));
212 f2m._overwriteAdd(x, lambda); 209 f2m._overwriteAdd(x, lambda);
213//console.log(" x (step 2): " + x.asString(16)); 210//console.log(" x (step 2): " + x.asString(16));
214 } 211 }
215 212
216 y = f2m._fastMultiply(f2m._add(bX, x), lambda); 213 y = f2m._fastMultiply(f2m._add(bX, x), lambda);
217//console.log(" y (step 1): " + y.asString(16)); 214//console.log(" y (step 1): " + y.asString(16));
218 f2m._overwriteAdd(y, x); 215 f2m._overwriteAdd(y, x);
219//console.log(" y (step 2): " + y.asString(16)); 216//console.log(" y (step 2): " + y.asString(16));
220 f2m._overwriteAdd(y, bY); 217 f2m._overwriteAdd(y, bY);
221//console.log(" y (step 3): " + y.asString(16)); 218//console.log(" y (step 3): " + y.asString(16));
222 219
223 // result = new Clipperz.Crypto.ECC.BinaryField.Point({x:new Clipperz.Crypto.ECC.BinaryField.Value(x), y:new Clipperz.Crypto.ECC.BinaryField.Value(y)}) 220 // result = new Clipperz.Crypto.ECC.BinaryField.Point({x:new Clipperz.Crypto.ECC.BinaryField.Value(x), y:new Clipperz.Crypto.ECC.BinaryField.Value(y)})
224 aPointA._x._value = x; 221 aPointA._x._value = x;
225 aPointA._y._value = y; 222 aPointA._y._value = y;
226 223
227 } 224 }
228//console.log("<<< ECC.BinaryField.Curve.add"); 225//console.log("<<< ECC.BinaryField.Curve.add");
229 226
230 return result; 227 return result;
231 }, 228 },
232 229
233 //----------------------------------------------------------------------------- 230 //-----------------------------------------------------------------------------
234 231
235 'multiply': function(aValue, aPoint) { 232 'multiply': function(aValue, aPoint) {
236 var result; 233 var result;
237 234
238//console.profile(); 235//console.profile();
239 result = new Clipperz.Crypto.ECC.BinaryField.Point({x:Clipperz.Crypto.ECC.BinaryField.Value.O, y:Clipperz.Crypto.ECC.BinaryField.Value.O}); 236 result = new Clipperz.Crypto.ECC.BinaryField.Point({x:Clipperz.Crypto.ECC.BinaryField.Value.O, y:Clipperz.Crypto.ECC.BinaryField.Value.O});
240 237
241 if (aValue.isZero() == false) { 238 if (aValue.isZero() == false) {
242 var k, Q; 239 var k, Q;
243 var i; 240 var i;
244 var countIndex; countIndex = 0; 241 var countIndex; countIndex = 0;
245 242
246 if (aValue.compare(Clipperz.Crypto.ECC.BinaryField.Value.O) > 0) { 243 if (aValue.compare(Clipperz.Crypto.ECC.BinaryField.Value.O) > 0) {
247 k = aValue; 244 k = aValue;
248 Q = aPoint; 245 Q = aPoint;
249 } else { 246 } else {
250MochiKit.Logging.logError("The Clipperz.Crypto.ECC.BinaryFields.Value does not work with negative values!!!!"); 247MochiKit.Logging.logError("The Clipperz.Crypto.ECC.BinaryFields.Value does not work with negative values!!!!");
251 k = aValue.negate(); 248 k = aValue.negate();
252 Q = this.negate(aPoint); 249 Q = this.negate(aPoint);
253 } 250 }
254 251
255//console.log("k: " + k.toString(16)); 252//console.log("k: " + k.toString(16));
256//console.log("k.bitSize: " + k.bitSize()); 253//console.log("k.bitSize: " + k.bitSize());
257 for (i=k.bitSize()-1; i>=0; i--) { 254 for (i=k.bitSize()-1; i>=0; i--) {
258 result = this.add(result, result); 255 result = this.add(result, result);
259 // this.overwriteAdd(result, result); 256 // this.overwriteAdd(result, result);
260 if (k.isBitSet(i)) { 257 if (k.isBitSet(i)) {
261 result = this.add(result, Q); 258 result = this.add(result, Q);
262 // this.overwriteAdd(result, Q); 259 // this.overwriteAdd(result, Q);
263 } 260 }
264 261
265 // if (countIndex==100) {console.log("multiply.break"); break;} else countIndex++; 262 // if (countIndex==100) {console.log("multiply.break"); break;} else countIndex++;
266 } 263 }
267 } 264 }
268//console.profileEnd(); 265//console.profileEnd();
269 266
270 return result; 267 return result;
271 }, 268 },
272 269
273 //----------------------------------------------------------------------------- 270 //-----------------------------------------------------------------------------
274 __syntaxFix__: "syntax fix" 271 __syntaxFix__: "syntax fix"
275}); 272});
276 273
277 274
278//############################################################################# 275//#############################################################################
279 276
280Clipperz.Crypto.ECC.StandardCurves = {}; 277Clipperz.Crypto.ECC.StandardCurves = {};
281 278
282MochiKit.Base.update(Clipperz.Crypto.ECC.StandardCurves, { 279MochiKit.Base.update(Clipperz.Crypto.ECC.StandardCurves, {
283/* 280/*
284 '_K571': null, 281 '_K571': null,
285 'K571': function() { 282 'K571': function() {
286 if (Clipperz.Crypto.ECC.StandardCurves._K571 == null) { 283 if (Clipperz.Crypto.ECC.StandardCurves._K571 == null) {
287 Clipperz.Crypto.ECC.StandardCurves._K571 = new Clipperz.Crypto.ECC.Curve.Koblitz({ 284 Clipperz.Crypto.ECC.StandardCurves._K571 = new Clipperz.Crypto.ECC.Curve.Koblitz({
288 exadecimalForm: '80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425', 285 exadecimalForm: '80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425',
289 a: new Clipperz.Crypto.BigInt(0), 286 a: new Clipperz.Crypto.BigInt(0),
290 G: new Clipperz.Crypto.ECC.Point({ 287 G: new Clipperz.Crypto.ECC.Point({
291 x: new Clipperz.Crypto.BigInt('26eb7a859923fbc82189631f8103fe4ac9ca2970012d5d46024804801841ca44370958493b205e647da304db4ceb08cbbd1ba39494776fb988b47174dca88c7e2945283a01c8972', 16), 288 x: new Clipperz.Crypto.BigInt('26eb7a859923fbc82189631f8103fe4ac9ca2970012d5d46024804801841ca44370958493b205e647da304db4ceb08cbbd1ba39494776fb988b47174dca88c7e2945283a01c8972', 16),
292 y: new Clipperz.Crypto.BigInt('349dc807f4fbf374f4aeade3bca95314dd58cec9f307a54ffc61efc006d8a2c9d4979c0ac44aea74fbebbb9f772aedcb620b01a7ba7af1b320430c8591984f601cd4c143ef1c7a3', 16) 289 y: new Clipperz.Crypto.BigInt('349dc807f4fbf374f4aeade3bca95314dd58cec9f307a54ffc61efc006d8a2c9d4979c0ac44aea74fbebbb9f772aedcb620b01a7ba7af1b320430c8591984f601cd4c143ef1c7a3', 16)
293 }), 290 }),
294 n: new Clipperz.Crypto.BigInt('1932268761508629172347675945465993672149463664853217499328617625725759571144780212268133978522706711834706712800825351461273674974066617311929682421617092503555733685276673', 16), 291 n: new Clipperz.Crypto.BigInt('1932268761508629172347675945465993672149463664853217499328617625725759571144780212268133978522706711834706712800825351461273674974066617311929682421617092503555733685276673', 16),
295 h: new Clipperz.Crypto.BigInt(4) 292 h: new Clipperz.Crypto.BigInt(4)
296 }); 293 });
297 } 294 }
298 295
299 return Clipperz.Crypto.ECC.StandardCurves._K571; 296 return Clipperz.Crypto.ECC.StandardCurves._K571;
300 }, 297 },
301*/ 298*/
302 //----------------------------------------------------------------------------- 299 //-----------------------------------------------------------------------------
303 300
304 '_B571': null, 301 '_B571': null,
305 'B571': function() { //f(z) = z^571 + z^10 + z^5 + z^2 + 1 302 'B571': function() { //f(z) = z^571 + z^10 + z^5 + z^2 + 1
306 if (Clipperz.Crypto.ECC.StandardCurves._B571 == null) { 303 if (Clipperz.Crypto.ECC.StandardCurves._B571 == null) {
307 Clipperz.Crypto.ECC.StandardCurves._B571 = new Clipperz.Crypto.ECC.BinaryField.Curve({ 304 Clipperz.Crypto.ECC.StandardCurves._B571 = new Clipperz.Crypto.ECC.BinaryField.Curve({
308 modulus: new Clipperz.Crypto.ECC.BinaryField.Value('80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425', 16), 305 modulus: new Clipperz.Crypto.ECC.BinaryField.Value('80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425', 16),
309 a: new Clipperz.Crypto.ECC.BinaryField.Value('1', 16), 306 a: new Clipperz.Crypto.ECC.BinaryField.Value('1', 16),
310 b: new Clipperz.Crypto.ECC.BinaryField.Value('02f40e7e2221f295de297117b7f3d62f5c6a97ffcb8ceff1cd6ba8ce4a9a18ad84ffabbd8efa59332be7ad6756a66e294afd185a78ff12aa520e4de739baca0c7ffeff7f2955727a', 16), 307 b: new Clipperz.Crypto.ECC.BinaryField.Value('02f40e7e2221f295de297117b7f3d62f5c6a97ffcb8ceff1cd6ba8ce4a9a18ad84ffabbd8efa59332be7ad6756a66e294afd185a78ff12aa520e4de739baca0c7ffeff7f2955727a', 16),
311 G: new Clipperz.Crypto.ECC.BinaryField.Point({ 308 G: new Clipperz.Crypto.ECC.BinaryField.Point({
312 x: new Clipperz.Crypto.ECC.BinaryField.Value('0303001d 34b85629 6c16c0d4 0d3cd775 0a93d1d2 955fa80a a5f40fc8 db7b2abd bde53950 f4c0d293 cdd711a3 5b67fb14 99ae6003 8614f139 4abfa3b4 c850d927 e1e7769c 8eec2d19', 16), 309 x: new Clipperz.Crypto.ECC.BinaryField.Value('0303001d 34b85629 6c16c0d4 0d3cd775 0a93d1d2 955fa80a a5f40fc8 db7b2abd bde53950 f4c0d293 cdd711a3 5b67fb14 99ae6003 8614f139 4abfa3b4 c850d927 e1e7769c 8eec2d19', 16),
313 y: new Clipperz.Crypto.ECC.BinaryField.Value('037bf273 42da639b 6dccfffe b73d69d7 8c6c27a6 009cbbca 1980f853 3921e8a6 84423e43 bab08a57 6291af8f 461bb2a8 b3531d2f 0485c19b 16e2f151 6e23dd3c 1a4827af 1b8ac15b', 16) 310 y: new Clipperz.Crypto.ECC.BinaryField.Value('037bf273 42da639b 6dccfffe b73d69d7 8c6c27a6 009cbbca 1980f853 3921e8a6 84423e43 bab08a57 6291af8f 461bb2a8 b3531d2f 0485c19b 16e2f151 6e23dd3c 1a4827af 1b8ac15b', 16)
314 }), 311 }),
315 r: new Clipperz.Crypto.ECC.BinaryField.Value('03ffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff e661ce18 ff559873 08059b18 6823851e c7dd9ca1 161de93d 5174d66e 8382e9bb 2fe84e47', 16), 312 r: new Clipperz.Crypto.ECC.BinaryField.Value('03ffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff e661ce18 ff559873 08059b18 6823851e c7dd9ca1 161de93d 5174d66e 8382e9bb 2fe84e47', 16),
316 h: new Clipperz.Crypto.ECC.BinaryField.Value('2', 16) 313 h: new Clipperz.Crypto.ECC.BinaryField.Value('2', 16)
317 314
318 // S: new Clipperz.Crypto.ECC.BinaryField.Value('2aa058f73a0e33ab486b0f610410c53a7f132310', 10), 315 // S: new Clipperz.Crypto.ECC.BinaryField.Value('2aa058f73a0e33ab486b0f610410c53a7f132310', 10),
319 // n: new Clipperz.Crypto.ECC.BinaryField.Value('03ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe661ce18ff55987308059b186823851ec7dd9ca1161de93d5174d66e8382e9bb2fe84e47', 16), 316 // n: new Clipperz.Crypto.ECC.BinaryField.Value('03ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe661ce18ff55987308059b186823851ec7dd9ca1161de93d5174d66e8382e9bb2fe84e47', 16),
320 }); 317 });
321 318
322 //----------------------------------------------------------------------------- 319 //-----------------------------------------------------------------------------
323 // 320 //
324 //Guide to Elliptic Curve Cryptography 321 //Guide to Elliptic Curve Cryptography
325 //Darrel Hankerson, Alfred Menezes, Scott Vanstone 322 //Darrel Hankerson, Alfred Menezes, Scott Vanstone
326 //- Pag: 56, Alorithm 2.45 (with a typo!!!) 323 //- Pag: 56, Alorithm 2.45 (with a typo!!!)
327 // 324 //
328 //----------------------------------------------------------------------------- 325 //-----------------------------------------------------------------------------
329 // 326 //
330 // http://www.milw0rm.com/papers/136 327 // http://www.milw0rm.com/papers/136
331 // 328 //
332 // ------------------------------------------------------------------------- 329 // -------------------------------------------------------------------------
333 // Polynomial Reduction Algorithm Modulo f571 330 // Polynomial Reduction Algorithm Modulo f571
334 // ------------------------------------------------------------------------- 331 // -------------------------------------------------------------------------
335 // 332 //
336 // Input: Polynomial p(x) of degree 1140 or less, stored as 333 // Input: Polynomial p(x) of degree 1140 or less, stored as
337 // an array of 2T machinewords. 334 // an array of 2T machinewords.
338 // Output: p(x) mod f571(x) 335 // Output: p(x) mod f571(x)
339 // 336 //
340 // FOR i = T-1, ..., 0 DO 337 // FOR i = T-1, ..., 0 DO
341 // SET X := P[i+T] 338 // SET X := P[i+T]
342 // P[i] := P[i] ^ (X<<5) ^ (X<<7) ^ (X<<10) ^ (X<<15) 339 // P[i] := P[i] ^ (X<<5) ^ (X<<7) ^ (X<<10) ^ (X<<15)
343 // P[i+1] := P[i+1] ^ (X>>17) ^ (X>>22) ^ (X>>25) ^ (X>>27) 340 // P[i+1] := P[i+1] ^ (X>>17) ^ (X>>22) ^ (X>>25) ^ (X>>27)
344 // 341 //
345 // SET X := P[T-1] >> 27 342 // SET X := P[T-1] >> 27
346 // P[0] := P[0] ^ X ^ (X<<2) ^ (X<<5) ^ (X<<10) 343 // P[0] := P[0] ^ X ^ (X<<2) ^ (X<<5) ^ (X<<10)
347 // P[T-1] := P[T-1] & 0x07ffffff 344 // P[T-1] := P[T-1] & 0x07ffffff
348 // 345 //
349 // RETURN P[T-1],...,P[0] 346 // RETURN P[T-1],...,P[0]
350 // 347 //
351 // ------------------------------------------------------------------------- 348 // -------------------------------------------------------------------------
352 // 349 //
353 Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().slowModule = Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().module; 350 Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().slowModule = Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().module;
354 Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().module = function(aValue) { 351 Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().module = function(aValue) {
355 varresult; 352 varresult;
356 353
357 if (aValue.bitSize() > 1140) { 354 if (aValue.bitSize() > 1140) {
358 MochiKit.Logging.logWarning("ECC.StandarCurves.B571.finiteField().module: falling back to default implementation"); 355 MochiKit.Logging.logWarning("ECC.StandarCurves.B571.finiteField().module: falling back to default implementation");
359 result = Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().slowModule(aValue); 356 result = Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().slowModule(aValue);
360 } else { 357 } else {
361 varC, T; 358 varC, T;
362 var i; 359 var i;
363 360
364//console.log(">>> binaryField.finiteField.(improved)module"); 361//console.log(">>> binaryField.finiteField.(improved)module");
365 // C = aValue.value().slice(0); 362 // C = aValue.value().slice(0);
366 C = aValue._value.slice(0); 363 C = aValue._value.slice(0);
367 for (i=35; i>=18; i--) { 364 for (i=35; i>=18; i--) {
368 T = C[i]; 365 T = C[i];
369 C[i-18] = (((C[i-18] ^ (T<<5) ^ (T<<7) ^ (T<<10) ^ (T<<15)) & 0xffffffff) >>> 0); 366 C[i-18] = (((C[i-18] ^ (T<<5) ^ (T<<7) ^ (T<<10) ^ (T<<15)) & 0xffffffff) >>> 0);
370 C[i-17] = ((C[i-17] ^ (T>>>27) ^ (T>>>25) ^ (T>>>22) ^ (T>>>17)) >>> 0); 367 C[i-17] = ((C[i-17] ^ (T>>>27) ^ (T>>>25) ^ (T>>>22) ^ (T>>>17)) >>> 0);
371 } 368 }
372 T = (C[17] >>> 27); 369 T = (C[17] >>> 27);
373 C[0] = ((C[0] ^ T ^ ((T<<2) ^ (T<<5) ^ (T<<10)) & 0xffffffff) >>> 0); 370 C[0] = ((C[0] ^ T ^ ((T<<2) ^ (T<<5) ^ (T<<10)) & 0xffffffff) >>> 0);
374 C[17] = (C[17] & 0x07ffffff); 371 C[17] = (C[17] & 0x07ffffff);
375 372
376 for(i=18; i<=35; i++) { 373 for(i=18; i<=35; i++) {
377 C[i] = 0; 374 C[i] = 0;
378 } 375 }
379 376
380 result = new Clipperz.Crypto.ECC.BinaryField.Value(C); 377 result = new Clipperz.Crypto.ECC.BinaryField.Value(C);
381//console.log("<<< binaryField.finiteField.(improved)module"); 378//console.log("<<< binaryField.finiteField.(improved)module");
382 } 379 }
383 380
384 return result; 381 return result;
385 }; 382 };
386 } 383 }
387 384
388 return Clipperz.Crypto.ECC.StandardCurves._B571; 385 return Clipperz.Crypto.ECC.StandardCurves._B571;
389 }, 386 },
390 387
391 //----------------------------------------------------------------------------- 388 //-----------------------------------------------------------------------------
392 389
393 '_B283': null, 390 '_B283': null,
394 'B283': function() { //f(z) = z^283 + z^12 + z^7 + z^5 + 1 391 'B283': function() { //f(z) = z^283 + z^12 + z^7 + z^5 + 1
395 if (Clipperz.Crypto.ECC.StandardCurves._B283 == null) { 392 if (Clipperz.Crypto.ECC.StandardCurves._B283 == null) {
396 Clipperz.Crypto.ECC.StandardCurves._B283 = new Clipperz.Crypto.ECC.BinaryField.Curve({ 393 Clipperz.Crypto.ECC.StandardCurves._B283 = new Clipperz.Crypto.ECC.BinaryField.Curve({
397 // modulus: new Clipperz.Crypto.ECC.BinaryField.Value('10000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 000010a1', 16), 394 // modulus: new Clipperz.Crypto.ECC.BinaryField.Value('10000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 000010a1', 16),
398 modulus: new Clipperz.Crypto.ECC.BinaryField.Value('08000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 000010a1', 16), 395 modulus: new Clipperz.Crypto.ECC.BinaryField.Value('08000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 000010a1', 16),
399 a: new Clipperz.Crypto.ECC.BinaryField.Value('1', 16), 396 a: new Clipperz.Crypto.ECC.BinaryField.Value('1', 16),
400 b: new Clipperz.Crypto.ECC.BinaryField.Value('027b680a c8b8596d a5a4af8a 19a0303f ca97fd76 45309fa2 a581485a f6263e31 3b79a2f5', 16), 397 b: new Clipperz.Crypto.ECC.BinaryField.Value('027b680a c8b8596d a5a4af8a 19a0303f ca97fd76 45309fa2 a581485a f6263e31 3b79a2f5', 16),
401 G: new Clipperz.Crypto.ECC.BinaryField.Point({ 398 G: new Clipperz.Crypto.ECC.BinaryField.Point({
402 x: new Clipperz.Crypto.ECC.BinaryField.Value('05f93925 8db7dd90 e1934f8c 70b0dfec 2eed25b8 557eac9c 80e2e198 f8cdbecd 86b12053', 16), 399 x: new Clipperz.Crypto.ECC.BinaryField.Value('05f93925 8db7dd90 e1934f8c 70b0dfec 2eed25b8 557eac9c 80e2e198 f8cdbecd 86b12053', 16),
403 y: new Clipperz.Crypto.ECC.BinaryField.Value('03676854 fe24141c b98fe6d4 b20d02b4 516ff702 350eddb0 826779c8 13f0df45 be8112f4', 16) 400 y: new Clipperz.Crypto.ECC.BinaryField.Value('03676854 fe24141c b98fe6d4 b20d02b4 516ff702 350eddb0 826779c8 13f0df45 be8112f4', 16)
404 }), 401 }),
405 r: new Clipperz.Crypto.ECC.BinaryField.Value('03ffffff ffffffff ffffffff ffffffff ffffef90 399660fc 938a9016 5b042a7c efadb307', 16), 402 r: new Clipperz.Crypto.ECC.BinaryField.Value('03ffffff ffffffff ffffffff ffffffff ffffef90 399660fc 938a9016 5b042a7c efadb307', 16),
406 h: new Clipperz.Crypto.ECC.BinaryField.Value('2', 16) 403 h: new Clipperz.Crypto.ECC.BinaryField.Value('2', 16)
407 404
408 // S: new Clipperz.Crypto.ECC.BinaryField.Value('2aa058f73a0e33ab486b0f610410c53a7f132310', 10), 405 // S: new Clipperz.Crypto.ECC.BinaryField.Value('2aa058f73a0e33ab486b0f610410c53a7f132310', 10),
diff --git a/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js b/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js
index 3ddf2ec..650b479 100644
--- a/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js
+++ b/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { 26try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) {
30 throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!"; 27 throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!";
31} 28}
32if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; } 29if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; }
33if (typeof(Clipperz.Crypto.ECC.BinaryField) == 'undefined') { Clipperz.Crypto.ECC.BinaryField = {}; } 30if (typeof(Clipperz.Crypto.ECC.BinaryField) == 'undefined') { Clipperz.Crypto.ECC.BinaryField = {}; }
34 31
35Clipperz.Crypto.ECC.BinaryField.FiniteField = function(args) { 32Clipperz.Crypto.ECC.BinaryField.FiniteField = function(args) {
36 args = args || {}; 33 args = args || {};
37 this._modulus = args.modulus; 34 this._modulus = args.modulus;
38 35
39 return this; 36 return this;
40} 37}
41 38
42Clipperz.Crypto.ECC.BinaryField.FiniteField.prototype = MochiKit.Base.update(null, { 39Clipperz.Crypto.ECC.BinaryField.FiniteField.prototype = MochiKit.Base.update(null, {
43 40
44 'asString': function() { 41 'asString': function() {
45 return "Clipperz.Crypto.ECC.BinaryField.FiniteField (" + this.modulus().asString() + ")"; 42 return "Clipperz.Crypto.ECC.BinaryField.FiniteField (" + this.modulus().asString() + ")";
46 }, 43 },
47 44
48 //----------------------------------------------------------------------------- 45 //-----------------------------------------------------------------------------
49 46
50 'modulus': function() { 47 'modulus': function() {
51 return this._modulus; 48 return this._modulus;
52 }, 49 },
53 50
54 //----------------------------------------------------------------------------- 51 //-----------------------------------------------------------------------------
55 52
56 '_module': function(aValue) { 53 '_module': function(aValue) {
57 varresult; 54 varresult;
58 var modulusComparison; 55 var modulusComparison;
59//console.log(">>> binaryField.finiteField.(standard)module"); 56//console.log(">>> binaryField.finiteField.(standard)module");
60 57
61 modulusComparison = Clipperz.Crypto.ECC.BinaryField.Value._compare(aValue, this.modulus()._value); 58 modulusComparison = Clipperz.Crypto.ECC.BinaryField.Value._compare(aValue, this.modulus()._value);
62 59
63 if (modulusComparison < 0) { 60 if (modulusComparison < 0) {
64 result = aValue; 61 result = aValue;
65 } else if (modulusComparison == 0) { 62 } else if (modulusComparison == 0) {
66 result = [0]; 63 result = [0];
67 } else { 64 } else {
68 var modulusBitSize; 65 var modulusBitSize;
69 var resultBitSize; 66 var resultBitSize;
70 67
71 result = aValue; 68 result = aValue;
72 69
73 modulusBitSize = this.modulus().bitSize(); 70 modulusBitSize = this.modulus().bitSize();
74 resultBitSize = Clipperz.Crypto.ECC.BinaryField.Value._bitSize(result); 71 resultBitSize = Clipperz.Crypto.ECC.BinaryField.Value._bitSize(result);
75 while (resultBitSize >= modulusBitSize) { 72 while (resultBitSize >= modulusBitSize) {
76 Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor(result, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(this.modulus()._value, resultBitSize - modulusBitSize)); 73 Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor(result, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(this.modulus()._value, resultBitSize - modulusBitSize));
77 resultBitSize = Clipperz.Crypto.ECC.BinaryField.Value._bitSize(result); 74 resultBitSize = Clipperz.Crypto.ECC.BinaryField.Value._bitSize(result);
78 } 75 }
79 } 76 }
80//console.log("<<< binaryField.finiteField.(standard)module"); 77//console.log("<<< binaryField.finiteField.(standard)module");
81 78
82 return result; 79 return result;
83 }, 80 },
84 81
85 'module': function(aValue) { 82 'module': function(aValue) {
86 return new Clipperz.Crypto.ECC.BinaryField.Value(this._module(aValue._value.slice(0))); 83 return new Clipperz.Crypto.ECC.BinaryField.Value(this._module(aValue._value.slice(0)));
87 }, 84 },
88 85
89 //----------------------------------------------------------------------------- 86 //-----------------------------------------------------------------------------
90 87
91 '_add': function(a, b) { 88 '_add': function(a, b) {
92 return Clipperz.Crypto.ECC.BinaryField.Value._xor(a, b); 89 return Clipperz.Crypto.ECC.BinaryField.Value._xor(a, b);
93 }, 90 },
94 91
95 '_overwriteAdd': function(a, b) { 92 '_overwriteAdd': function(a, b) {
96 Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor(a, b); 93 Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor(a, b);
97 }, 94 },
98 95
99 'add': function(a, b) { 96 'add': function(a, b) {
100 return new Clipperz.Crypto.ECC.BinaryField.Value(this._add(a._value, b._value)); 97 return new Clipperz.Crypto.ECC.BinaryField.Value(this._add(a._value, b._value));
101 }, 98 },
102 99
103 //----------------------------------------------------------------------------- 100 //-----------------------------------------------------------------------------
104 101
105 'negate': function(aValue) { 102 'negate': function(aValue) {
106 return aValue.clone(); 103 return aValue.clone();
107 }, 104 },
108 105
109 //----------------------------------------------------------------------------- 106 //-----------------------------------------------------------------------------
110 107
111 '_multiply': function(a, b) { 108 '_multiply': function(a, b) {
112 var result; 109 var result;
113 var valueToXor; 110 var valueToXor;
114 var i,c; 111 var i,c;
115 112
116 result = [0]; 113 result = [0];
117 valueToXor = b; 114 valueToXor = b;
118 c = Clipperz.Crypto.ECC.BinaryField.Value._bitSize(a); 115 c = Clipperz.Crypto.ECC.BinaryField.Value._bitSize(a);
119 for (i=0; i<c; i++) { 116 for (i=0; i<c; i++) {
120 if (Clipperz.Crypto.ECC.BinaryField.Value._isBitSet(a, i) === true) { 117 if (Clipperz.Crypto.ECC.BinaryField.Value._isBitSet(a, i) === true) {
121 Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor(result, valueToXor); 118 Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor(result, valueToXor);
122 } 119 }
123 valueToXor = Clipperz.Crypto.ECC.BinaryField.Value._overwriteShiftLeft(valueToXor, 1); 120 valueToXor = Clipperz.Crypto.ECC.BinaryField.Value._overwriteShiftLeft(valueToXor, 1);
124 } 121 }
125 result = this._module(result); 122 result = this._module(result);
126 123
127 return result; 124 return result;
128 }, 125 },
129 126
130 'multiply': function(a, b) { 127 'multiply': function(a, b) {
131 return new Clipperz.Crypto.ECC.BinaryField.Value(this._multiply(a._value, b._value)); 128 return new Clipperz.Crypto.ECC.BinaryField.Value(this._multiply(a._value, b._value));
132 }, 129 },
133 130
134 //----------------------------------------------------------------------------- 131 //-----------------------------------------------------------------------------
135 132
136 '_fastMultiply': function(a, b) { 133 '_fastMultiply': function(a, b) {
137 var result; 134 var result;
138 var B; 135 var B;
139 var i,c; 136 var i,c;
140 137
141 result = [0]; 138 result = [0];
142 B = b.slice(0); //Is this array copy avoidable? 139 B = b.slice(0); //Is this array copy avoidable?
143 c = 32; 140 c = 32;
144 for (i=0; i<c; i++) { 141 for (i=0; i<c; i++) {
145 var ii, cc; 142 var ii, cc;
146 143
147 cc = a.length; 144 cc = a.length;
148 for (ii=0; ii<cc; ii++) { 145 for (ii=0; ii<cc; ii++) {
149 if (((a[ii] >>> i) & 0x01) == 1) { 146 if (((a[ii] >>> i) & 0x01) == 1) {
150 Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor(result, B, ii); 147 Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor(result, B, ii);
151 } 148 }
152 } 149 }
153 150
154 if (i < (c-1)) { 151 if (i < (c-1)) {
155 B = Clipperz.Crypto.ECC.BinaryField.Value._overwriteShiftLeft(B, 1); 152 B = Clipperz.Crypto.ECC.BinaryField.Value._overwriteShiftLeft(B, 1);
156 } 153 }
157 } 154 }
158 result = this._module(result); 155 result = this._module(result);
159 156
160 return result; 157 return result;
161 }, 158 },
162 159
163 'fastMultiply': function(a, b) { 160 'fastMultiply': function(a, b) {
164 return new Clipperz.Crypto.ECC.BinaryField.Value(this._fastMultiply(a._value, b._value)); 161 return new Clipperz.Crypto.ECC.BinaryField.Value(this._fastMultiply(a._value, b._value));
165 }, 162 },
166 163
167 //----------------------------------------------------------------------------- 164 //-----------------------------------------------------------------------------
168 // 165 //
169 //Guide to Elliptic Curve Cryptography 166 //Guide to Elliptic Curve Cryptography
170 //Darrel Hankerson, Alfred Menezes, Scott Vanstone 167 //Darrel Hankerson, Alfred Menezes, Scott Vanstone
171 //- Pag: 49, Alorithm 2.34 168 //- Pag: 49, Alorithm 2.34
172 // 169 //
173 //----------------------------------------------------------------------------- 170 //-----------------------------------------------------------------------------
174 171
175 '_square': function(aValue) { 172 '_square': function(aValue) {
176 var result; 173 var result;
177 var value; 174 var value;
178 var c,i; 175 var c,i;
179 var precomputedValues; 176 var precomputedValues;
180 177
181 value = aValue; 178 value = aValue;
182 result = new Array(value.length * 2); 179 result = new Array(value.length * 2);
183 precomputedValues = Clipperz.Crypto.ECC.BinaryField.FiniteField.squarePrecomputedBytes; 180 precomputedValues = Clipperz.Crypto.ECC.BinaryField.FiniteField.squarePrecomputedBytes;
184 181
185 c = value.length; 182 c = value.length;
186 for (i=0; i<c; i++) { 183 for (i=0; i<c; i++) {
187 result[i*2] = precomputedValues[(value[i] & 0x000000ff)]; 184 result[i*2] = precomputedValues[(value[i] & 0x000000ff)];
188 result[i*2] |= ((precomputedValues[(value[i] & 0x0000ff00) >>> 8]) << 16); 185 result[i*2] |= ((precomputedValues[(value[i] & 0x0000ff00) >>> 8]) << 16);
189 186
190 result[i*2 + 1] = precomputedValues[(value[i] & 0x00ff0000) >>> 16]; 187 result[i*2 + 1] = precomputedValues[(value[i] & 0x00ff0000) >>> 16];
191 result[i*2 + 1] |= ((precomputedValues[(value[i] & 0xff000000) >>> 24]) << 16); 188 result[i*2 + 1] |= ((precomputedValues[(value[i] & 0xff000000) >>> 24]) << 16);
192 } 189 }
193 190
194 return this._module(result); 191 return this._module(result);
195 }, 192 },
196 193
197 'square': function(aValue) { 194 'square': function(aValue) {
198 return new Clipperz.Crypto.ECC.BinaryField.Value(this._square(aValue._value)); 195 return new Clipperz.Crypto.ECC.BinaryField.Value(this._square(aValue._value));
199 }, 196 },
200 197
201 //----------------------------------------------------------------------------- 198 //-----------------------------------------------------------------------------
202 199
203 '_inverse': function(aValue) { 200 '_inverse': function(aValue) {
204 varresult; 201 varresult;
205 var b, c; 202 var b, c;
206 var u, v; 203 var u, v;
207 204
208 // b = Clipperz.Crypto.ECC.BinaryField.Value.I._value; 205 // b = Clipperz.Crypto.ECC.BinaryField.Value.I._value;
209 b = [1]; 206 b = [1];
210 // c = Clipperz.Crypto.ECC.BinaryField.Value.O._value; 207 // c = Clipperz.Crypto.ECC.BinaryField.Value.O._value;
211 c = [0]; 208 c = [0];
212 u = this._module(aValue); 209 u = this._module(aValue);
213 v = this.modulus()._value.slice(0); 210 v = this.modulus()._value.slice(0);
214 211
215 while (Clipperz.Crypto.ECC.BinaryField.Value._bitSize(u) > 1) { 212 while (Clipperz.Crypto.ECC.BinaryField.Value._bitSize(u) > 1) {
216 varbitDifferenceSize; 213 varbitDifferenceSize;
217 214
218 bitDifferenceSize = Clipperz.Crypto.ECC.BinaryField.Value._bitSize(u) - Clipperz.Crypto.ECC.BinaryField.Value._bitSize(v); 215 bitDifferenceSize = Clipperz.Crypto.ECC.BinaryField.Value._bitSize(u) - Clipperz.Crypto.ECC.BinaryField.Value._bitSize(v);
219 if (bitDifferenceSize < 0) { 216 if (bitDifferenceSize < 0) {
220 var swap; 217 var swap;
221 218
222 swap = u; 219 swap = u;
223 u = v; 220 u = v;
224 v = swap; 221 v = swap;
225 222
226 swap = c; 223 swap = c;
227 c = b; 224 c = b;
228 b = swap; 225 b = swap;
229 226
230 bitDifferenceSize = -bitDifferenceSize; 227 bitDifferenceSize = -bitDifferenceSize;
231 } 228 }
232 229
233 u = this._add(u, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(v, bitDifferenceSize)); 230 u = this._add(u, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(v, bitDifferenceSize));
234 b = this._add(b, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(c, bitDifferenceSize)); 231 b = this._add(b, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(c, bitDifferenceSize));
235 // this._overwriteAdd(u, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(v, bitDifferenceSize)); 232 // this._overwriteAdd(u, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(v, bitDifferenceSize));
236 // this._overwriteAdd(b, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(c, bitDifferenceSize)); 233 // this._overwriteAdd(b, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(c, bitDifferenceSize));
237 } 234 }
238 235
239 result = this._module(b); 236 result = this._module(b);
240 237
241 return result; 238 return result;
242 }, 239 },
243 240
244 'inverse': function(aValue) { 241 'inverse': function(aValue) {
245 return new Clipperz.Crypto.ECC.BinaryField.Value(this._inverse(aValue._value)); 242 return new Clipperz.Crypto.ECC.BinaryField.Value(this._inverse(aValue._value));
246 }, 243 },
247 244
248 //----------------------------------------------------------------------------- 245 //-----------------------------------------------------------------------------
249 __syntaxFix__: "syntax fix" 246 __syntaxFix__: "syntax fix"
250}); 247});
251 248
252 249
253Clipperz.Crypto.ECC.BinaryField.FiniteField.squarePrecomputedBytes = [ 250Clipperz.Crypto.ECC.BinaryField.FiniteField.squarePrecomputedBytes = [
254 0x0000, // 0 = 0000 0000 -> 0000 0000 0000 0000 251 0x0000, // 0 = 0000 0000 -> 0000 0000 0000 0000
255 0x0001, // 1 = 0000 0001 -> 0000 0000 0000 0001 252 0x0001, // 1 = 0000 0001 -> 0000 0000 0000 0001
256 0x0004, // 2 = 0000 0010 -> 0000 0000 0000 0100 253 0x0004, // 2 = 0000 0010 -> 0000 0000 0000 0100
257 0x0005, // 3 = 0000 0011 -> 0000 0000 0000 0101 254 0x0005, // 3 = 0000 0011 -> 0000 0000 0000 0101
258 0x0010, // 4 = 0000 0100 -> 0000 0000 0001 0000 255 0x0010, // 4 = 0000 0100 -> 0000 0000 0001 0000
259 0x0011, // 5 = 0000 0101 -> 0000 0000 0001 0001 256 0x0011, // 5 = 0000 0101 -> 0000 0000 0001 0001
260 0x0014, // 6 = 0000 0110 -> 0000 0000 0001 0100 257 0x0014, // 6 = 0000 0110 -> 0000 0000 0001 0100
261 0x0015, // 7 = 0000 0111 -> 0000 0000 0001 0101 258 0x0015, // 7 = 0000 0111 -> 0000 0000 0001 0101
262 0x0040, // 8 = 0000 1000 -> 0000 0000 0100 0000 259 0x0040, // 8 = 0000 1000 -> 0000 0000 0100 0000
263 0x0041, // 9 = 0000 1001 -> 0000 0000 0100 0001 260 0x0041, // 9 = 0000 1001 -> 0000 0000 0100 0001
264 0x0044, // 10 = 0000 1010 -> 0000 0000 0100 0100 261 0x0044, // 10 = 0000 1010 -> 0000 0000 0100 0100
265 0x0045, // 11 = 0000 1011 -> 0000 0000 0100 0101 262 0x0045, // 11 = 0000 1011 -> 0000 0000 0100 0101
266 0x0050, // 12 = 0000 1100 -> 0000 0000 0101 0000 263 0x0050, // 12 = 0000 1100 -> 0000 0000 0101 0000
267 0x0051, // 13 = 0000 1101 -> 0000 0000 0101 0001 264 0x0051, // 13 = 0000 1101 -> 0000 0000 0101 0001
268 0x0054, // 14 = 0000 1110 -> 0000 0000 0101 0100 265 0x0054, // 14 = 0000 1110 -> 0000 0000 0101 0100
269 0x0055, // 15 = 0000 1111 -> 0000 0000 0101 0101 266 0x0055, // 15 = 0000 1111 -> 0000 0000 0101 0101
270 267
271 0x0100, // 16 = 0001 0000 -> 0000 0001 0000 0000 268 0x0100, // 16 = 0001 0000 -> 0000 0001 0000 0000
272 0x0101, // 17 = 0001 0001 -> 0000 0001 0000 0001 269 0x0101, // 17 = 0001 0001 -> 0000 0001 0000 0001
273 0x0104, // 18 = 0001 0010 -> 0000 0001 0000 0100 270 0x0104, // 18 = 0001 0010 -> 0000 0001 0000 0100
274 0x0105, // 19 = 0001 0011 -> 0000 0001 0000 0101 271 0x0105, // 19 = 0001 0011 -> 0000 0001 0000 0101
275 0x0110, // 20 = 0001 0100 -> 0000 0001 0001 0000 272 0x0110, // 20 = 0001 0100 -> 0000 0001 0001 0000
276 0x0111, // 21 = 0001 0101 -> 0000 0001 0001 0001 273 0x0111, // 21 = 0001 0101 -> 0000 0001 0001 0001
277 0x0114, // 22 = 0001 0110 -> 0000 0001 0001 0100 274 0x0114, // 22 = 0001 0110 -> 0000 0001 0001 0100
278 0x0115, // 23 = 0001 0111 -> 0000 0001 0001 0101 275 0x0115, // 23 = 0001 0111 -> 0000 0001 0001 0101
279 0x0140, // 24 = 0001 1000 -> 0000 0001 0100 0000 276 0x0140, // 24 = 0001 1000 -> 0000 0001 0100 0000
280 0x0141, // 25 = 0001 1001 -> 0000 0001 0100 0001 277 0x0141, // 25 = 0001 1001 -> 0000 0001 0100 0001
281 0x0144, // 26 = 0001 1010 -> 0000 0001 0100 0100 278 0x0144, // 26 = 0001 1010 -> 0000 0001 0100 0100
282 0x0145, // 27 = 0001 1011 -> 0000 0001 0100 0101 279 0x0145, // 27 = 0001 1011 -> 0000 0001 0100 0101
283 0x0150, // 28 = 0001 1100 -> 0000 0001 0101 0000 280 0x0150, // 28 = 0001 1100 -> 0000 0001 0101 0000
284 0x0151, // 28 = 0001 1101 -> 0000 0001 0101 0001 281 0x0151, // 28 = 0001 1101 -> 0000 0001 0101 0001
285 0x0154, // 30 = 0001 1110 -> 0000 0001 0101 0100 282 0x0154, // 30 = 0001 1110 -> 0000 0001 0101 0100
286 0x0155, // 31 = 0001 1111 -> 0000 0001 0101 0101 283 0x0155, // 31 = 0001 1111 -> 0000 0001 0101 0101
287 284
288 0x0400, // 32 = 0010 0000 -> 0000 0100 0000 0000 285 0x0400, // 32 = 0010 0000 -> 0000 0100 0000 0000
289 0x0401, // 33 = 0010 0001 -> 0000 0100 0000 0001 286 0x0401, // 33 = 0010 0001 -> 0000 0100 0000 0001
290 0x0404, // 34 = 0010 0010 -> 0000 0100 0000 0100 287 0x0404, // 34 = 0010 0010 -> 0000 0100 0000 0100
291 0x0405, // 35 = 0010 0011 -> 0000 0100 0000 0101 288 0x0405, // 35 = 0010 0011 -> 0000 0100 0000 0101
292 0x0410, // 36 = 0010 0100 -> 0000 0100 0001 0000 289 0x0410, // 36 = 0010 0100 -> 0000 0100 0001 0000
293 0x0411, // 37 = 0010 0101 -> 0000 0100 0001 0001 290 0x0411, // 37 = 0010 0101 -> 0000 0100 0001 0001
294 0x0414, // 38 = 0010 0110 -> 0000 0100 0001 0100 291 0x0414, // 38 = 0010 0110 -> 0000 0100 0001 0100
295 0x0415, // 39 = 0010 0111 -> 0000 0100 0001 0101 292 0x0415, // 39 = 0010 0111 -> 0000 0100 0001 0101
296 0x0440, // 40 = 0010 1000 -> 0000 0100 0100 0000 293 0x0440, // 40 = 0010 1000 -> 0000 0100 0100 0000
297 0x0441, // 41 = 0010 1001 -> 0000 0100 0100 0001 294 0x0441, // 41 = 0010 1001 -> 0000 0100 0100 0001
298 0x0444, // 42 = 0010 1010 -> 0000 0100 0100 0100 295 0x0444, // 42 = 0010 1010 -> 0000 0100 0100 0100
299 0x0445, // 43 = 0010 1011 -> 0000 0100 0100 0101 296 0x0445, // 43 = 0010 1011 -> 0000 0100 0100 0101
300 0x0450, // 44 = 0010 1100 -> 0000 0100 0101 0000 297 0x0450, // 44 = 0010 1100 -> 0000 0100 0101 0000
301 0x0451, // 45 = 0010 1101 -> 0000 0100 0101 0001 298 0x0451, // 45 = 0010 1101 -> 0000 0100 0101 0001
302 0x0454, // 46 = 0010 1110 -> 0000 0100 0101 0100 299 0x0454, // 46 = 0010 1110 -> 0000 0100 0101 0100
303 0x0455, // 47 = 0010 1111 -> 0000 0100 0101 0101 300 0x0455, // 47 = 0010 1111 -> 0000 0100 0101 0101
304 301
305 0x0500, // 48 = 0011 0000 -> 0000 0101 0000 0000 302 0x0500, // 48 = 0011 0000 -> 0000 0101 0000 0000
306 0x0501, // 49 = 0011 0001 -> 0000 0101 0000 0001 303 0x0501, // 49 = 0011 0001 -> 0000 0101 0000 0001
307 0x0504, // 50 = 0011 0010 -> 0000 0101 0000 0100 304 0x0504, // 50 = 0011 0010 -> 0000 0101 0000 0100
308 0x0505, // 51 = 0011 0011 -> 0000 0101 0000 0101 305 0x0505, // 51 = 0011 0011 -> 0000 0101 0000 0101
309 0x0510, // 52 = 0011 0100 -> 0000 0101 0001 0000 306 0x0510, // 52 = 0011 0100 -> 0000 0101 0001 0000
310 0x0511, // 53 = 0011 0101 -> 0000 0101 0001 0001 307 0x0511, // 53 = 0011 0101 -> 0000 0101 0001 0001
311 0x0514, // 54 = 0011 0110 -> 0000 0101 0001 0100 308 0x0514, // 54 = 0011 0110 -> 0000 0101 0001 0100
312 0x0515, // 55 = 0011 0111 -> 0000 0101 0001 0101 309 0x0515, // 55 = 0011 0111 -> 0000 0101 0001 0101
313 0x0540, // 56 = 0011 1000 -> 0000 0101 0100 0000 310 0x0540, // 56 = 0011 1000 -> 0000 0101 0100 0000
314 0x0541, // 57 = 0011 1001 -> 0000 0101 0100 0001 311 0x0541, // 57 = 0011 1001 -> 0000 0101 0100 0001
315 0x0544, // 58 = 0011 1010 -> 0000 0101 0100 0100 312 0x0544, // 58 = 0011 1010 -> 0000 0101 0100 0100
316 0x0545, // 59 = 0011 1011 -> 0000 0101 0100 0101 313 0x0545, // 59 = 0011 1011 -> 0000 0101 0100 0101
317 0x0550, // 60 = 0011 1100 -> 0000 0101 0101 0000 314 0x0550, // 60 = 0011 1100 -> 0000 0101 0101 0000
318 0x0551, // 61 = 0011 1101 -> 0000 0101 0101 0001 315 0x0551, // 61 = 0011 1101 -> 0000 0101 0101 0001
319 0x0554, // 62 = 0011 1110 -> 0000 0101 0101 0100 316 0x0554, // 62 = 0011 1110 -> 0000 0101 0101 0100
320 0x0555, // 63 = 0011 1111 -> 0000 0101 0101 0101 317 0x0555, // 63 = 0011 1111 -> 0000 0101 0101 0101
321 318
322 0x1000, // 64 = 0100 0000 -> 0001 0000 0000 0000 319 0x1000, // 64 = 0100 0000 -> 0001 0000 0000 0000
323 0x1001, // 65 = 0100 0001 -> 0001 0000 0000 0001 320 0x1001, // 65 = 0100 0001 -> 0001 0000 0000 0001
324 0x1004, // 66 = 0100 0010 -> 0001 0000 0000 0100 321 0x1004, // 66 = 0100 0010 -> 0001 0000 0000 0100
325 0x1005, // 67 = 0100 0011 -> 0001 0000 0000 0101 322 0x1005, // 67 = 0100 0011 -> 0001 0000 0000 0101
326 0x1010, // 68 = 0100 0100 -> 0001 0000 0001 0000 323 0x1010, // 68 = 0100 0100 -> 0001 0000 0001 0000
327 0x1011, // 69 = 0100 0101 -> 0001 0000 0001 0001 324 0x1011, // 69 = 0100 0101 -> 0001 0000 0001 0001
328 0x1014, // 70 = 0100 0110 -> 0001 0000 0001 0100 325 0x1014, // 70 = 0100 0110 -> 0001 0000 0001 0100
329 0x1015, // 71 = 0100 0111 -> 0001 0000 0001 0101 326 0x1015, // 71 = 0100 0111 -> 0001 0000 0001 0101
330 0x1040, // 72 = 0100 1000 -> 0001 0000 0100 0000 327 0x1040, // 72 = 0100 1000 -> 0001 0000 0100 0000
331 0x1041, // 73 = 0100 1001 -> 0001 0000 0100 0001 328 0x1041, // 73 = 0100 1001 -> 0001 0000 0100 0001
332 0x1044, // 74 = 0100 1010 -> 0001 0000 0100 0100 329 0x1044, // 74 = 0100 1010 -> 0001 0000 0100 0100
333 0x1045, // 75 = 0100 1011 -> 0001 0000 0100 0101 330 0x1045, // 75 = 0100 1011 -> 0001 0000 0100 0101
334 0x1050, // 76 = 0100 1100 -> 0001 0000 0101 0000 331 0x1050, // 76 = 0100 1100 -> 0001 0000 0101 0000
335 0x1051, // 77 = 0100 1101 -> 0001 0000 0101 0001 332 0x1051, // 77 = 0100 1101 -> 0001 0000 0101 0001
336 0x1054, // 78 = 0100 1110 -> 0001 0000 0101 0100 333 0x1054, // 78 = 0100 1110 -> 0001 0000 0101 0100
337 0x1055, // 79 = 0100 1111 -> 0001 0000 0101 0101 334 0x1055, // 79 = 0100 1111 -> 0001 0000 0101 0101
338 335
339 0x1100, // 80 = 0101 0000 -> 0001 0001 0000 0000 336 0x1100, // 80 = 0101 0000 -> 0001 0001 0000 0000
340 0x1101, // 81 = 0101 0001 -> 0001 0001 0000 0001 337 0x1101, // 81 = 0101 0001 -> 0001 0001 0000 0001
341 0x1104, // 82 = 0101 0010 -> 0001 0001 0000 0100 338 0x1104, // 82 = 0101 0010 -> 0001 0001 0000 0100
342 0x1105, // 83 = 0101 0011 -> 0001 0001 0000 0101 339 0x1105, // 83 = 0101 0011 -> 0001 0001 0000 0101
343 0x1110, // 84 = 0101 0100 -> 0001 0001 0001 0000 340 0x1110, // 84 = 0101 0100 -> 0001 0001 0001 0000
344 0x1111, // 85 = 0101 0101 -> 0001 0001 0001 0001 341 0x1111, // 85 = 0101 0101 -> 0001 0001 0001 0001
345 0x1114, // 86 = 0101 0110 -> 0001 0001 0001 0100 342 0x1114, // 86 = 0101 0110 -> 0001 0001 0001 0100
346 0x1115, // 87 = 0101 0111 -> 0001 0001 0001 0101 343 0x1115, // 87 = 0101 0111 -> 0001 0001 0001 0101
347 0x1140, // 88 = 0101 1000 -> 0001 0001 0100 0000 344 0x1140, // 88 = 0101 1000 -> 0001 0001 0100 0000
348 0x1141, // 89 = 0101 1001 -> 0001 0001 0100 0001 345 0x1141, // 89 = 0101 1001 -> 0001 0001 0100 0001
349 0x1144, // 90 = 0101 1010 -> 0001 0001 0100 0100 346 0x1144, // 90 = 0101 1010 -> 0001 0001 0100 0100
350 0x1145, // 91 = 0101 1011 -> 0001 0001 0100 0101 347 0x1145, // 91 = 0101 1011 -> 0001 0001 0100 0101
351 0x1150, // 92 = 0101 1100 -> 0001 0001 0101 0000 348 0x1150, // 92 = 0101 1100 -> 0001 0001 0101 0000
352 0x1151, // 93 = 0101 1101 -> 0001 0001 0101 0001 349 0x1151, // 93 = 0101 1101 -> 0001 0001 0101 0001
353 0x1154, // 94 = 0101 1110 -> 0001 0001 0101 0100 350 0x1154, // 94 = 0101 1110 -> 0001 0001 0101 0100
354 0x1155, // 95 = 0101 1111 -> 0001 0001 0101 0101 351 0x1155, // 95 = 0101 1111 -> 0001 0001 0101 0101
355 352
356 0x1400, // 96 = 0110 0000 -> 0001 0100 0000 0000 353 0x1400, // 96 = 0110 0000 -> 0001 0100 0000 0000
357 0x1401, // 97 = 0110 0001 -> 0001 0100 0000 0001 354 0x1401, // 97 = 0110 0001 -> 0001 0100 0000 0001
358 0x1404, // 98 = 0110 0010 -> 0001 0100 0000 0100 355 0x1404, // 98 = 0110 0010 -> 0001 0100 0000 0100
359 0x1405, // 99 = 0110 0011 -> 0001 0100 0000 0101 356 0x1405, // 99 = 0110 0011 -> 0001 0100 0000 0101
360 0x1410, //100 = 0110 0100 -> 0001 0100 0001 0000 357 0x1410, //100 = 0110 0100 -> 0001 0100 0001 0000
361 0x1411, //101 = 0110 0101 -> 0001 0100 0001 0001 358 0x1411, //101 = 0110 0101 -> 0001 0100 0001 0001
362 0x1414, //102 = 0110 0110 -> 0001 0100 0001 0100 359 0x1414, //102 = 0110 0110 -> 0001 0100 0001 0100
363 0x1415, //103 = 0110 0111 -> 0001 0100 0001 0101 360 0x1415, //103 = 0110 0111 -> 0001 0100 0001 0101
364 0x1440, //104 = 0110 1000 -> 0001 0100 0100 0000 361 0x1440, //104 = 0110 1000 -> 0001 0100 0100 0000
365 0x1441, //105 = 0110 1001 -> 0001 0100 0100 0001 362 0x1441, //105 = 0110 1001 -> 0001 0100 0100 0001
366 0x1444, //106 = 0110 1010 -> 0001 0100 0100 0100 363 0x1444, //106 = 0110 1010 -> 0001 0100 0100 0100
367 0x1445, //107 = 0110 1011 -> 0001 0100 0100 0101 364 0x1445, //107 = 0110 1011 -> 0001 0100 0100 0101
368 0x1450, //108 = 0110 1100 -> 0001 0100 0101 0000 365 0x1450, //108 = 0110 1100 -> 0001 0100 0101 0000
369 0x1451, //109 = 0110 1101 -> 0001 0100 0101 0001 366 0x1451, //109 = 0110 1101 -> 0001 0100 0101 0001
370 0x1454, //110 = 0110 1110 -> 0001 0100 0101 0100 367 0x1454, //110 = 0110 1110 -> 0001 0100 0101 0100
371 0x1455, //111 = 0110 1111 -> 0001 0100 0101 0101 368 0x1455, //111 = 0110 1111 -> 0001 0100 0101 0101
372 369
373 0x1500, //112 = 0111 0000 -> 0001 0101 0000 0000 370 0x1500, //112 = 0111 0000 -> 0001 0101 0000 0000
374 0x1501, //113 = 0111 0001 -> 0001 0101 0000 0001 371 0x1501, //113 = 0111 0001 -> 0001 0101 0000 0001
375 0x1504, //114 = 0111 0010 -> 0001 0101 0000 0100 372 0x1504, //114 = 0111 0010 -> 0001 0101 0000 0100
376 0x1505, //115 = 0111 0011 -> 0001 0101 0000 0101 373 0x1505, //115 = 0111 0011 -> 0001 0101 0000 0101
377 0x1510, //116 = 0111 0100 -> 0001 0101 0001 0000 374 0x1510, //116 = 0111 0100 -> 0001 0101 0001 0000
378 0x1511, //117 = 0111 0101 -> 0001 0101 0001 0001 375 0x1511, //117 = 0111 0101 -> 0001 0101 0001 0001
379 0x1514, //118 = 0111 0110 -> 0001 0101 0001 0100 376 0x1514, //118 = 0111 0110 -> 0001 0101 0001 0100
380 0x1515, //119 = 0111 0111 -> 0001 0101 0001 0101 377 0x1515, //119 = 0111 0111 -> 0001 0101 0001 0101
381 0x1540, //120 = 0111 1000 -> 0001 0101 0100 0000 378 0x1540, //120 = 0111 1000 -> 0001 0101 0100 0000
382 0x1541, //121 = 0111 1001 -> 0001 0101 0100 0001 379 0x1541, //121 = 0111 1001 -> 0001 0101 0100 0001
383 0x1544, //122 = 0111 1010 -> 0001 0101 0100 0100 380 0x1544, //122 = 0111 1010 -> 0001 0101 0100 0100
384 0x1545, //123 = 0111 1011 -> 0001 0101 0100 0101 381 0x1545, //123 = 0111 1011 -> 0001 0101 0100 0101
385 0x1550, //124 = 0111 1100 -> 0001 0101 0101 0000 382 0x1550, //124 = 0111 1100 -> 0001 0101 0101 0000
386 0x1551, //125 = 0111 1101 -> 0001 0101 0101 0001 383 0x1551, //125 = 0111 1101 -> 0001 0101 0101 0001
387 0x1554, //126 = 0111 1110 -> 0001 0101 0101 0100 384 0x1554, //126 = 0111 1110 -> 0001 0101 0101 0100
388 0x1555, //127 = 0111 1111 -> 0001 0101 0101 0101 385 0x1555, //127 = 0111 1111 -> 0001 0101 0101 0101
389 386
390 0x4000, //128 = 1000 0000 -> 0100 0000 0000 0000 387 0x4000, //128 = 1000 0000 -> 0100 0000 0000 0000
391 0x4001, //129 = 1000 0001 -> 0100 0000 0000 0001 388 0x4001, //129 = 1000 0001 -> 0100 0000 0000 0001
392 0x4004, //130 = 1000 0010 -> 0100 0000 0000 0100 389 0x4004, //130 = 1000 0010 -> 0100 0000 0000 0100
393 0x4005, //131 = 1000 0011 -> 0100 0000 0000 0101 390 0x4005, //131 = 1000 0011 -> 0100 0000 0000 0101
394 0x4010, //132 = 1000 0100 -> 0100 0000 0001 0000 391 0x4010, //132 = 1000 0100 -> 0100 0000 0001 0000
395 0x4011, //133 = 1000 0101 -> 0100 0000 0001 0001 392 0x4011, //133 = 1000 0101 -> 0100 0000 0001 0001
396 0x4014, //134 = 1000 0110 -> 0100 0000 0001 0100 393 0x4014, //134 = 1000 0110 -> 0100 0000 0001 0100
397 0x4015, //135 = 1000 0111 -> 0100 0000 0001 0101 394 0x4015, //135 = 1000 0111 -> 0100 0000 0001 0101
398 0x4040, //136 = 1000 1000 -> 0100 0000 0100 0000 395 0x4040, //136 = 1000 1000 -> 0100 0000 0100 0000
399 0x4041, //137 = 1000 1001 -> 0100 0000 0100 0001 396 0x4041, //137 = 1000 1001 -> 0100 0000 0100 0001
400 0x4044, //138 = 1000 1010 -> 0100 0000 0100 0100 397 0x4044, //138 = 1000 1010 -> 0100 0000 0100 0100
401 0x4045, //139 = 1000 1011 -> 0100 0000 0100 0101 398 0x4045, //139 = 1000 1011 -> 0100 0000 0100 0101
402 0x4050, //140 = 1000 1100 -> 0100 0000 0101 0000 399 0x4050, //140 = 1000 1100 -> 0100 0000 0101 0000
403 0x4051, //141 = 1000 1101 -> 0100 0000 0101 0001 400 0x4051, //141 = 1000 1101 -> 0100 0000 0101 0001
404 0x4054, //142 = 1000 1110 -> 0100 0000 0101 0100 401 0x4054, //142 = 1000 1110 -> 0100 0000 0101 0100
405 0x4055, //143 = 1000 1111 -> 0100 0000 0101 0101 402 0x4055, //143 = 1000 1111 -> 0100 0000 0101 0101
406 403
407 0x4100, //144 = 1001 0000 -> 0100 0001 0000 0000 404 0x4100, //144 = 1001 0000 -> 0100 0001 0000 0000
408 0x4101, //145 = 1001 0001 -> 0100 0001 0000 0001 405 0x4101, //145 = 1001 0001 -> 0100 0001 0000 0001
diff --git a/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Point.js b/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Point.js
index f0739bc..6661839 100644
--- a/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Point.js
+++ b/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Point.js
@@ -1,67 +1,64 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { 26try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) {
30 throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!"; 27 throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!";
31} 28}
32if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; } 29if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; }
33if (typeof(Clipperz.Crypto.ECC.BinaryField) == 'undefined') { Clipperz.Crypto.ECC.BinaryField = {}; } 30if (typeof(Clipperz.Crypto.ECC.BinaryField) == 'undefined') { Clipperz.Crypto.ECC.BinaryField = {}; }
34 31
35Clipperz.Crypto.ECC.BinaryField.Point = function(args) { 32Clipperz.Crypto.ECC.BinaryField.Point = function(args) {
36 args = args || {}; 33 args = args || {};
37 this._x = args.x; 34 this._x = args.x;
38 this._y = args.y; 35 this._y = args.y;
39 36
40 return this; 37 return this;
41} 38}
42 39
43Clipperz.Crypto.ECC.BinaryField.Point.prototype = MochiKit.Base.update(null, { 40Clipperz.Crypto.ECC.BinaryField.Point.prototype = MochiKit.Base.update(null, {
44 41
45 'asString': function() { 42 'asString': function() {
46 return "Clipperz.Crypto.ECC.BinaryField.Point (" + this.x() + ", " + this.y() + ")"; 43 return "Clipperz.Crypto.ECC.BinaryField.Point (" + this.x() + ", " + this.y() + ")";
47 }, 44 },
48 45
49 //----------------------------------------------------------------------------- 46 //-----------------------------------------------------------------------------
50 47
51 'x': function() { 48 'x': function() {
52 return this._x; 49 return this._x;
53 }, 50 },
54 51
55 'y': function() { 52 'y': function() {
56 return this._y; 53 return this._y;
57 }, 54 },
58 55
59 //----------------------------------------------------------------------------- 56 //-----------------------------------------------------------------------------
60 57
61 'isZero': function() { 58 'isZero': function() {
62 return (this.x().isZero() && this.y().isZero()) 59 return (this.x().isZero() && this.y().isZero())
63 }, 60 },
64 61
65 //----------------------------------------------------------------------------- 62 //-----------------------------------------------------------------------------
66 __syntaxFix__: "syntax fix" 63 __syntaxFix__: "syntax fix"
67}); 64});
diff --git a/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Value.js b/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Value.js
index 10d055e..b5beafa 100644
--- a/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Value.js
+++ b/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Value.js
@@ -1,377 +1,374 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { 26try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) {
30 throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!"; 27 throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!";
31} 28}
32if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; } 29if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; }
33if (typeof(Clipperz.Crypto.ECC.BinaryField) == 'undefined') { Clipperz.Crypto.ECC.BinaryField = {}; } 30if (typeof(Clipperz.Crypto.ECC.BinaryField) == 'undefined') { Clipperz.Crypto.ECC.BinaryField = {}; }
34 31
35Clipperz.Crypto.ECC.BinaryField.Value = function(aValue, aBase) { 32Clipperz.Crypto.ECC.BinaryField.Value = function(aValue, aBase) {
36 if (aValue.constructor == String) { 33 if (aValue.constructor == String) {
37 varvalue; 34 varvalue;
38 varstringLength; 35 varstringLength;
39 var numberOfWords; 36 var numberOfWords;
40 vari,c; 37 vari,c;
41 38
42 if (aBase != 16) { 39 if (aBase != 16) {
43 throw Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedBase; 40 throw Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedBase;
44 } 41 }
45 42
46 value = aValue.replace(/ /g, ''); 43 value = aValue.replace(/ /g, '');
47 stringLength = value.length; 44 stringLength = value.length;
48 numberOfWords = Math.ceil(stringLength / 8); 45 numberOfWords = Math.ceil(stringLength / 8);
49 this._value = new Array(numberOfWords); 46 this._value = new Array(numberOfWords);
50 47
51 c = numberOfWords; 48 c = numberOfWords;
52 for (i=0; i<c; i++) { 49 for (i=0; i<c; i++) {
53 varword; 50 varword;
54 51
55 if (i < (c-1)) { 52 if (i < (c-1)) {
56 word = parseInt(value.substr(stringLength-((i+1)*8), 8), 16); 53 word = parseInt(value.substr(stringLength-((i+1)*8), 8), 16);
57 } else { 54 } else {
58 word = parseInt(value.substr(0, stringLength-(i*8)), 16); 55 word = parseInt(value.substr(0, stringLength-(i*8)), 16);
59 } 56 }
60 57
61 this._value[i] = word; 58 this._value[i] = word;
62 } 59 }
63 } else if (aValue.constructor == Array) { 60 } else if (aValue.constructor == Array) {
64 var itemsToCopy; 61 var itemsToCopy;
65 62
66 itemsToCopy = aValue.length; 63 itemsToCopy = aValue.length;
67 while (aValue[itemsToCopy - 1] == 0) { 64 while (aValue[itemsToCopy - 1] == 0) {
68 itemsToCopy --; 65 itemsToCopy --;
69 } 66 }
70 67
71 this._value = aValue.slice(0, itemsToCopy); 68 this._value = aValue.slice(0, itemsToCopy);
72 } else if (aValue.constructor == Number) { 69 } else if (aValue.constructor == Number) {
73 this._value = [aValue]; 70 this._value = [aValue];
74 } else { 71 } else {
75 // throw Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedConstructorValueType; 72 // throw Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedConstructorValueType;
76 } 73 }
77 74
78 return this; 75 return this;
79} 76}
80 77
81Clipperz.Crypto.ECC.BinaryField.Value.prototype = MochiKit.Base.update(null, { 78Clipperz.Crypto.ECC.BinaryField.Value.prototype = MochiKit.Base.update(null, {
82 79
83 'value': function() { 80 'value': function() {
84 return this._value; 81 return this._value;
85 }, 82 },
86 83
87 //----------------------------------------------------------------------------- 84 //-----------------------------------------------------------------------------
88 85
89 'wordSize': function() { 86 'wordSize': function() {
90 return this._value.length 87 return this._value.length
91 }, 88 },
92 89
93 //----------------------------------------------------------------------------- 90 //-----------------------------------------------------------------------------
94 91
95 'clone': function() { 92 'clone': function() {
96 return new Clipperz.Crypto.ECC.BinaryField.Value(this._value.slice(0)); 93 return new Clipperz.Crypto.ECC.BinaryField.Value(this._value.slice(0));
97 }, 94 },
98 95
99 //----------------------------------------------------------------------------- 96 //-----------------------------------------------------------------------------
100 97
101 'isZero': function() { 98 'isZero': function() {
102 return (this.compare(Clipperz.Crypto.ECC.BinaryField.Value.O) == 0); 99 return (this.compare(Clipperz.Crypto.ECC.BinaryField.Value.O) == 0);
103 }, 100 },
104 101
105 //----------------------------------------------------------------------------- 102 //-----------------------------------------------------------------------------
106 103
107 'asString': function(aBase) { 104 'asString': function(aBase) {
108 varresult; 105 varresult;
109 var i,c; 106 var i,c;
110 107
111 if (aBase != 16) { 108 if (aBase != 16) {
112 throw Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedBase; 109 throw Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedBase;
113 } 110 }
114 111
115 result = ""; 112 result = "";
116 c = this.wordSize(); 113 c = this.wordSize();
117 for (i=0; i<c; i++) { 114 for (i=0; i<c; i++) {
118 varwordAsString; 115 varwordAsString;
119 116
120 // wordAsString = ("00000000" + this.value()[i].toString(16)); 117 // wordAsString = ("00000000" + this.value()[i].toString(16));
121 wordAsString = ("00000000" + this._value[i].toString(16)); 118 wordAsString = ("00000000" + this._value[i].toString(16));
122 wordAsString = wordAsString.substring(wordAsString.length - 8); 119 wordAsString = wordAsString.substring(wordAsString.length - 8);
123 result = wordAsString + result; 120 result = wordAsString + result;
124 } 121 }
125 122
126 result = result.replace(/^(00)*/, ""); 123 result = result.replace(/^(00)*/, "");
127 124
128 if (result == "") { 125 if (result == "") {
129 result = "0"; 126 result = "0";
130 } 127 }
131 128
132 return result; 129 return result;
133 }, 130 },
134 131
135 //----------------------------------------------------------------------------- 132 //-----------------------------------------------------------------------------
136 133
137 'shiftLeft': function(aNumberOfBitsToShift) { 134 'shiftLeft': function(aNumberOfBitsToShift) {
138 return new Clipperz.Crypto.ECC.BinaryField.Value(Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(this._value, aNumberOfBitsToShift)); 135 return new Clipperz.Crypto.ECC.BinaryField.Value(Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(this._value, aNumberOfBitsToShift));
139 }, 136 },
140 137
141 //----------------------------------------------------------------------------- 138 //-----------------------------------------------------------------------------
142 139
143 'bitSize': function() { 140 'bitSize': function() {
144 return Clipperz.Crypto.ECC.BinaryField.Value._bitSize(this._value); 141 return Clipperz.Crypto.ECC.BinaryField.Value._bitSize(this._value);
145 }, 142 },
146 143
147 //----------------------------------------------------------------------------- 144 //-----------------------------------------------------------------------------
148 145
149 'isBitSet': function(aBitPosition) { 146 'isBitSet': function(aBitPosition) {
150 return Clipperz.Crypto.ECC.BinaryField.Value._isBitSet(this._value, aBitPosition); 147 return Clipperz.Crypto.ECC.BinaryField.Value._isBitSet(this._value, aBitPosition);
151 }, 148 },
152 149
153 //----------------------------------------------------------------------------- 150 //-----------------------------------------------------------------------------
154 151
155 'xor': function(aValue) { 152 'xor': function(aValue) {
156 return new Clipperz.Crypto.ECC.BinaryField.Value(Clipperz.Crypto.ECC.BinaryField.Value._xor(this._value, aValue._value)); 153 return new Clipperz.Crypto.ECC.BinaryField.Value(Clipperz.Crypto.ECC.BinaryField.Value._xor(this._value, aValue._value));
157 }, 154 },
158 155
159 //----------------------------------------------------------------------------- 156 //-----------------------------------------------------------------------------
160 157
161 'compare': function(aValue) { 158 'compare': function(aValue) {
162 return Clipperz.Crypto.ECC.BinaryField.Value._compare(this._value, aValue._value); 159 return Clipperz.Crypto.ECC.BinaryField.Value._compare(this._value, aValue._value);
163 }, 160 },
164 161
165 //----------------------------------------------------------------------------- 162 //-----------------------------------------------------------------------------
166 __syntaxFix__: "syntax fix" 163 __syntaxFix__: "syntax fix"
167}); 164});
168 165
169Clipperz.Crypto.ECC.BinaryField.Value.O = new Clipperz.Crypto.ECC.BinaryField.Value('0', 16); 166Clipperz.Crypto.ECC.BinaryField.Value.O = new Clipperz.Crypto.ECC.BinaryField.Value('0', 16);
170Clipperz.Crypto.ECC.BinaryField.Value.I = new Clipperz.Crypto.ECC.BinaryField.Value('1', 16); 167Clipperz.Crypto.ECC.BinaryField.Value.I = new Clipperz.Crypto.ECC.BinaryField.Value('1', 16);
171 168
172Clipperz.Crypto.ECC.BinaryField.Value._xor = function(a, b, aFirstItemOffset) { 169Clipperz.Crypto.ECC.BinaryField.Value._xor = function(a, b, aFirstItemOffset) {
173 var result; 170 var result;
174 var resultSize; 171 var resultSize;
175 var i,c; 172 var i,c;
176 var firstItemOffset; 173 var firstItemOffset;
177 174
178 firstItemOffset = aFirstItemOffset || 0; 175 firstItemOffset = aFirstItemOffset || 0;
179 resultSize = Math.max((a.length - firstItemOffset), b.length) + firstItemOffset; 176 resultSize = Math.max((a.length - firstItemOffset), b.length) + firstItemOffset;
180 177
181 result = new Array(resultSize); 178 result = new Array(resultSize);
182 179
183 c = firstItemOffset; 180 c = firstItemOffset;
184 for (i=0; i<c; i++) { 181 for (i=0; i<c; i++) {
185 result[i] = a[i]; 182 result[i] = a[i];
186 } 183 }
187 184
188 c = resultSize; 185 c = resultSize;
189 for (i=firstItemOffset; i<c; i++) { 186 for (i=firstItemOffset; i<c; i++) {
190 result[i] = (((a[i] || 0) ^ (b[i - firstItemOffset] || 0)) >>> 0); 187 result[i] = (((a[i] || 0) ^ (b[i - firstItemOffset] || 0)) >>> 0);
191 } 188 }
192 189
193 return result; 190 return result;
194}; 191};
195 192
196Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor = function(a, b, aFirstItemOffset) { 193Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor = function(a, b, aFirstItemOffset) {
197 var i,c; 194 var i,c;
198 var firstItemOffset; 195 var firstItemOffset;
199 196
200 firstItemOffset = aFirstItemOffset || 0; 197 firstItemOffset = aFirstItemOffset || 0;
201 198
202 c = Math.max((a.length - firstItemOffset), b.length) + firstItemOffset; 199 c = Math.max((a.length - firstItemOffset), b.length) + firstItemOffset;
203 for (i=firstItemOffset; i<c; i++) { 200 for (i=firstItemOffset; i<c; i++) {
204 a[i] = (((a[i] || 0) ^ (b[i - firstItemOffset] || 0)) >>> 0); 201 a[i] = (((a[i] || 0) ^ (b[i - firstItemOffset] || 0)) >>> 0);
205 } 202 }
206}; 203};
207 204
208Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft = function(aWordArray, aNumberOfBitsToShift) { 205Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft = function(aWordArray, aNumberOfBitsToShift) {
209 var numberOfWordsToShift; 206 var numberOfWordsToShift;
210 varnumberOfBitsToShift; 207 varnumberOfBitsToShift;
211 var result; 208 var result;
212 varoverflowValue; 209 varoverflowValue;
213 vari,c; 210 vari,c;
214 211
215 numberOfWordsToShift = Math.floor(aNumberOfBitsToShift / 32); 212 numberOfWordsToShift = Math.floor(aNumberOfBitsToShift / 32);
216 numberOfBitsToShift = aNumberOfBitsToShift % 32; 213 numberOfBitsToShift = aNumberOfBitsToShift % 32;
217 214
218 result = new Array(aWordArray.length + numberOfWordsToShift); 215 result = new Array(aWordArray.length + numberOfWordsToShift);
219 216
220 c = numberOfWordsToShift; 217 c = numberOfWordsToShift;
221 for (i=0; i<c; i++) { 218 for (i=0; i<c; i++) {
222 result[i] = 0; 219 result[i] = 0;
223 } 220 }
224 221
225 overflowValue = 0; 222 overflowValue = 0;
226 nextOverflowValue = 0; 223 nextOverflowValue = 0;
227 224
228 c = aWordArray.length; 225 c = aWordArray.length;
229 for (i=0; i<c; i++) { 226 for (i=0; i<c; i++) {
230 varvalue; 227 varvalue;
231 varresultWord; 228 varresultWord;
232 229
233 // value = this.value()[i]; 230 // value = this.value()[i];
234 value = aWordArray[i]; 231 value = aWordArray[i];
235 232
236 if (numberOfBitsToShift > 0) { 233 if (numberOfBitsToShift > 0) {
237 var nextOverflowValue; 234 var nextOverflowValue;
238 235
239 nextOverflowValue = (value >>> (32 - numberOfBitsToShift)); 236 nextOverflowValue = (value >>> (32 - numberOfBitsToShift));
240 value = value & (0xffffffff >>> numberOfBitsToShift); 237 value = value & (0xffffffff >>> numberOfBitsToShift);
241 resultWord = (((value << numberOfBitsToShift) | overflowValue) >>> 0); 238 resultWord = (((value << numberOfBitsToShift) | overflowValue) >>> 0);
242 } else { 239 } else {
243 resultWord = value; 240 resultWord = value;
244 } 241 }
245 242
246 result[i+numberOfWordsToShift] = resultWord; 243 result[i+numberOfWordsToShift] = resultWord;
247 overflowValue = nextOverflowValue; 244 overflowValue = nextOverflowValue;
248 } 245 }
249 246
250 if (overflowValue != 0) { 247 if (overflowValue != 0) {
251 result[aWordArray.length + numberOfWordsToShift] = overflowValue; 248 result[aWordArray.length + numberOfWordsToShift] = overflowValue;
252 } 249 }
253 250
254 return result; 251 return result;
255}; 252};
256 253
257Clipperz.Crypto.ECC.BinaryField.Value._overwriteShiftLeft = function(aWordArray, aNumberOfBitsToShift) { 254Clipperz.Crypto.ECC.BinaryField.Value._overwriteShiftLeft = function(aWordArray, aNumberOfBitsToShift) {
258 var numberOfWordsToShift; 255 var numberOfWordsToShift;
259 varnumberOfBitsToShift; 256 varnumberOfBitsToShift;
260 var result; 257 var result;
261 varoverflowValue; 258 varoverflowValue;
262 vari,c; 259 vari,c;
263 260
264 numberOfWordsToShift = Math.floor(aNumberOfBitsToShift / 32); 261 numberOfWordsToShift = Math.floor(aNumberOfBitsToShift / 32);
265 numberOfBitsToShift = aNumberOfBitsToShift % 32; 262 numberOfBitsToShift = aNumberOfBitsToShift % 32;
266 263
267 result = new Array(aWordArray.length + numberOfWordsToShift); 264 result = new Array(aWordArray.length + numberOfWordsToShift);
268 265
269 c = numberOfWordsToShift; 266 c = numberOfWordsToShift;
270 for (i=0; i<c; i++) { 267 for (i=0; i<c; i++) {
271 result[i] = 0; 268 result[i] = 0;
272 } 269 }
273 270
274 overflowValue = 0; 271 overflowValue = 0;
275 nextOverflowValue = 0; 272 nextOverflowValue = 0;
276 273
277 c = aWordArray.length; 274 c = aWordArray.length;
278 for (i=0; i<c; i++) { 275 for (i=0; i<c; i++) {
279 varvalue; 276 varvalue;
280 varresultWord; 277 varresultWord;
281 278
282 // value = this.value()[i]; 279 // value = this.value()[i];
283 value = aWordArray[i]; 280 value = aWordArray[i];
284 281
285 if (numberOfBitsToShift > 0) { 282 if (numberOfBitsToShift > 0) {
286 var nextOverflowValue; 283 var nextOverflowValue;
287 284
288 nextOverflowValue = (value >>> (32 - numberOfBitsToShift)); 285 nextOverflowValue = (value >>> (32 - numberOfBitsToShift));
289 value = value & (0xffffffff >>> numberOfBitsToShift); 286 value = value & (0xffffffff >>> numberOfBitsToShift);
290 resultWord = (((value << numberOfBitsToShift) | overflowValue) >>> 0); 287 resultWord = (((value << numberOfBitsToShift) | overflowValue) >>> 0);
291 } else { 288 } else {
292 resultWord = value; 289 resultWord = value;
293 } 290 }
294 291
295 result[i+numberOfWordsToShift] = resultWord; 292 result[i+numberOfWordsToShift] = resultWord;
296 overflowValue = nextOverflowValue; 293 overflowValue = nextOverflowValue;
297 } 294 }
298 295
299 if (overflowValue != 0) { 296 if (overflowValue != 0) {
300 result[aWordArray.length + numberOfWordsToShift] = overflowValue; 297 result[aWordArray.length + numberOfWordsToShift] = overflowValue;
301 } 298 }
302 299
303 return result; 300 return result;
304}; 301};
305 302
306Clipperz.Crypto.ECC.BinaryField.Value._bitSize = function(aWordArray) { 303Clipperz.Crypto.ECC.BinaryField.Value._bitSize = function(aWordArray) {
307 varresult; 304 varresult;
308 varnotNullElements; 305 varnotNullElements;
309 var mostValuableWord; 306 var mostValuableWord;
310 var matchingBitsInMostImportantWord; 307 var matchingBitsInMostImportantWord;
311 var mask; 308 var mask;
312 var i,c; 309 var i,c;
313 310
314 notNullElements = aWordArray.length; 311 notNullElements = aWordArray.length;
315 312
316 if ((aWordArray.length == 1) && (aWordArray[0] == 0)) { 313 if ((aWordArray.length == 1) && (aWordArray[0] == 0)) {
317 result = 0; 314 result = 0;
318 } else { 315 } else {
319 while((aWordArray[notNullElements - 1] == 0) && (notNullElements > 0)) { 316 while((aWordArray[notNullElements - 1] == 0) && (notNullElements > 0)) {
320 notNullElements --; 317 notNullElements --;
321 } 318 }
322 319
323 result = (notNullElements - 1) * 32; 320 result = (notNullElements - 1) * 32;
324 mostValuableWord = aWordArray[notNullElements - 1]; 321 mostValuableWord = aWordArray[notNullElements - 1];
325 322
326 matchingBits = 32; 323 matchingBits = 32;
327 mask = 0x80000000; 324 mask = 0x80000000;
328 325
329 while ((matchingBits > 0) && ((mostValuableWord & mask) == 0)) { 326 while ((matchingBits > 0) && ((mostValuableWord & mask) == 0)) {
330 matchingBits --; 327 matchingBits --;
331 mask >>>= 1; 328 mask >>>= 1;
332 } 329 }
333 330
334 result += matchingBits; 331 result += matchingBits;
335 } 332 }
336 333
337 return result; 334 return result;
338}; 335};
339 336
340Clipperz.Crypto.ECC.BinaryField.Value._isBitSet = function(aWordArray, aBitPosition) { 337Clipperz.Crypto.ECC.BinaryField.Value._isBitSet = function(aWordArray, aBitPosition) {
341 var result; 338 var result;
342 varbyteIndex; 339 varbyteIndex;
343 var bitIndexInSelectedByte; 340 var bitIndexInSelectedByte;
344 341
345 byteIndex = Math.floor(aBitPosition / 32); 342 byteIndex = Math.floor(aBitPosition / 32);
346 bitIndexInSelectedByte = aBitPosition % 32; 343 bitIndexInSelectedByte = aBitPosition % 32;
347 344
348 if (byteIndex <= aWordArray.length) { 345 if (byteIndex <= aWordArray.length) {
349 result = ((aWordArray[byteIndex] & (1 << bitIndexInSelectedByte)) != 0); 346 result = ((aWordArray[byteIndex] & (1 << bitIndexInSelectedByte)) != 0);
350 } else { 347 } else {
351 result = false; 348 result = false;
352 } 349 }
353 350
354 return result; 351 return result;
355}; 352};
356 353
357Clipperz.Crypto.ECC.BinaryField.Value._compare = function(a,b) { 354Clipperz.Crypto.ECC.BinaryField.Value._compare = function(a,b) {
358 varresult; 355 varresult;
359 var i,c; 356 var i,c;
360 357
361 result = MochiKit.Base.compare(a.length, b.length); 358 result = MochiKit.Base.compare(a.length, b.length);
362 359
363 c = a.length; 360 c = a.length;
364 for (i=0; (i<c) && (result==0); i++) { 361 for (i=0; (i<c) && (result==0); i++) {
365//console.log("compare[" + c + " - " + i + " - 1] " + this.value()[c-i-1] + ", " + aValue.value()[c-i-1]); 362//console.log("compare[" + c + " - " + i + " - 1] " + this.value()[c-i-1] + ", " + aValue.value()[c-i-1]);
366 // result = MochiKit.Base.compare(this.value()[c-i-1], aValue.value()[c-i-1]); 363 // result = MochiKit.Base.compare(this.value()[c-i-1], aValue.value()[c-i-1]);
367 result = MochiKit.Base.compare(a[c-i-1], b[c-i-1]); 364 result = MochiKit.Base.compare(a[c-i-1], b[c-i-1]);
368 } 365 }
369 366
370 return result; 367 return result;
371}; 368};
372 369
373 370
374Clipperz.Crypto.ECC.BinaryField.Value['exception']= { 371Clipperz.Crypto.ECC.BinaryField.Value['exception']= {
375 'UnsupportedBase': new MochiKit.Base.NamedError("Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedBase"), 372 'UnsupportedBase': new MochiKit.Base.NamedError("Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedBase"),
376 'UnsupportedConstructorValueType':new MochiKit.Base.NamedError("Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedConstructorValueType") 373 'UnsupportedConstructorValueType':new MochiKit.Base.NamedError("Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedConstructorValueType")
377}; 374};
diff --git a/frontend/beta/js/Clipperz/Crypto/PRNG.js b/frontend/beta/js/Clipperz/Crypto/PRNG.js
index 770ceb1..39d0045 100644
--- a/frontend/beta/js/Clipperz/Crypto/PRNG.js
+++ b/frontend/beta/js/Clipperz/Crypto/PRNG.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { 26try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) {
30 throw "Clipperz.Crypto.PRNG depends on Clipperz.ByteArray!"; 27 throw "Clipperz.Crypto.PRNG depends on Clipperz.ByteArray!";
31} 28}
32 29
33try { if (typeof(Clipperz.Crypto.SHA) == 'undefined') { throw ""; }} catch (e) { 30try { if (typeof(Clipperz.Crypto.SHA) == 'undefined') { throw ""; }} catch (e) {
34 throw "Clipperz.Crypto.PRNG depends on Clipperz.Crypto.SHA!"; 31 throw "Clipperz.Crypto.PRNG depends on Clipperz.Crypto.SHA!";
35} 32}
36 33
37try { if (typeof(Clipperz.Crypto.AES) == 'undefined') { throw ""; }} catch (e) { 34try { if (typeof(Clipperz.Crypto.AES) == 'undefined') { throw ""; }} catch (e) {
38 throw "Clipperz.Crypto.PRNG depends on Clipperz.Crypto.AES!"; 35 throw "Clipperz.Crypto.PRNG depends on Clipperz.Crypto.AES!";
39} 36}
40 37
41if (typeof(Clipperz.Crypto.PRNG) == 'undefined') { Clipperz.Crypto.PRNG = {}; } 38if (typeof(Clipperz.Crypto.PRNG) == 'undefined') { Clipperz.Crypto.PRNG = {}; }
42 39
43//############################################################################# 40//#############################################################################
44 41
45Clipperz.Crypto.PRNG.EntropyAccumulator = function(args) { 42Clipperz.Crypto.PRNG.EntropyAccumulator = function(args) {
46 args = args || {}; 43 args = args || {};
47 //MochiKit.Base.bindMethods(this); 44 //MochiKit.Base.bindMethods(this);
48 45
49 this._stack = new Clipperz.ByteArray(); 46 this._stack = new Clipperz.ByteArray();
50 this._maxStackLengthBeforeHashing = args.maxStackLengthBeforeHashing || 256; 47 this._maxStackLengthBeforeHashing = args.maxStackLengthBeforeHashing || 256;
51 return this; 48 return this;
52} 49}
53 50
54Clipperz.Crypto.PRNG.EntropyAccumulator.prototype = MochiKit.Base.update(null, { 51Clipperz.Crypto.PRNG.EntropyAccumulator.prototype = MochiKit.Base.update(null, {
55 52
56 'toString': function() { 53 'toString': function() {
57 return "Clipperz.Crypto.PRNG.EntropyAccumulator"; 54 return "Clipperz.Crypto.PRNG.EntropyAccumulator";
58 }, 55 },
59 56
60 //------------------------------------------------------------------------- 57 //-------------------------------------------------------------------------
61 58
62 'stack': function() { 59 'stack': function() {
63 return this._stack; 60 return this._stack;
64 }, 61 },
65 62
66 'setStack': function(aValue) { 63 'setStack': function(aValue) {
67 this._stack = aValue; 64 this._stack = aValue;
68 }, 65 },
69 66
70 'resetStack': function() { 67 'resetStack': function() {
71 this.stack().reset(); 68 this.stack().reset();
72 }, 69 },
73 70
74 'maxStackLengthBeforeHashing': function() { 71 'maxStackLengthBeforeHashing': function() {
75 return this._maxStackLengthBeforeHashing; 72 return this._maxStackLengthBeforeHashing;
76 }, 73 },
77 74
78 //------------------------------------------------------------------------- 75 //-------------------------------------------------------------------------
79 76
80 'addRandomByte': function(aValue) { 77 'addRandomByte': function(aValue) {
81 this.stack().appendByte(aValue); 78 this.stack().appendByte(aValue);
82 79
83 if (this.stack().length() > this.maxStackLengthBeforeHashing()) { 80 if (this.stack().length() > this.maxStackLengthBeforeHashing()) {
84 this.setStack(Clipperz.Crypto.SHA.sha_d256(this.stack())); 81 this.setStack(Clipperz.Crypto.SHA.sha_d256(this.stack()));
85 } 82 }
86 }, 83 },
87 84
88 //------------------------------------------------------------------------- 85 //-------------------------------------------------------------------------
89 __syntaxFix__: "syntax fix" 86 __syntaxFix__: "syntax fix"
90}); 87});
91 88
92//############################################################################# 89//#############################################################################
93 90
94Clipperz.Crypto.PRNG.RandomnessSource = function(args) { 91Clipperz.Crypto.PRNG.RandomnessSource = function(args) {
95 args = args || {}; 92 args = args || {};
96 MochiKit.Base.bindMethods(this); 93 MochiKit.Base.bindMethods(this);
97 94
98 this._generator = args.generator || null; 95 this._generator = args.generator || null;
99 this._sourceId = args.sourceId || null; 96 this._sourceId = args.sourceId || null;
100 this._boostMode = args.boostMode || false; 97 this._boostMode = args.boostMode || false;
101 98
102 this._nextPoolIndex = 0; 99 this._nextPoolIndex = 0;
103 100
104 return this; 101 return this;
105} 102}
106 103
107Clipperz.Crypto.PRNG.RandomnessSource.prototype = MochiKit.Base.update(null, { 104Clipperz.Crypto.PRNG.RandomnessSource.prototype = MochiKit.Base.update(null, {
108 105
109 'generator': function() { 106 'generator': function() {
110 return this._generator; 107 return this._generator;
111 }, 108 },
112 109
113 'setGenerator': function(aValue) { 110 'setGenerator': function(aValue) {
114 this._generator = aValue; 111 this._generator = aValue;
115 }, 112 },
116 113
117 //------------------------------------------------------------------------- 114 //-------------------------------------------------------------------------
118 115
119 'boostMode': function() { 116 'boostMode': function() {
120 return this._boostMode; 117 return this._boostMode;
121 }, 118 },
122 119
123 'setBoostMode': function(aValue) { 120 'setBoostMode': function(aValue) {
124 this._boostMode = aValue; 121 this._boostMode = aValue;
125 }, 122 },
126 123
127 //------------------------------------------------------------------------- 124 //-------------------------------------------------------------------------
128 125
129 'sourceId': function() { 126 'sourceId': function() {
130 return this._sourceId; 127 return this._sourceId;
131 }, 128 },
132 129
133 'setSourceId': function(aValue) { 130 'setSourceId': function(aValue) {
134 this._sourceId = aValue; 131 this._sourceId = aValue;
135 }, 132 },
136 133
137 //------------------------------------------------------------------------- 134 //-------------------------------------------------------------------------
138 135
139 'nextPoolIndex': function() { 136 'nextPoolIndex': function() {
140 return this._nextPoolIndex; 137 return this._nextPoolIndex;
141 }, 138 },
142 139
143 'incrementNextPoolIndex': function() { 140 'incrementNextPoolIndex': function() {
144 this._nextPoolIndex = ((this._nextPoolIndex + 1) % this.generator().numberOfEntropyAccumulators()); 141 this._nextPoolIndex = ((this._nextPoolIndex + 1) % this.generator().numberOfEntropyAccumulators());
145 }, 142 },
146 143
147 //------------------------------------------------------------------------- 144 //-------------------------------------------------------------------------
148 145
149 'updateGeneratorWithValue': function(aRandomValue) { 146 'updateGeneratorWithValue': function(aRandomValue) {
150 if (this.generator() != null) { 147 if (this.generator() != null) {
151 this.generator().addRandomByte(this.sourceId(), this.nextPoolIndex(), aRandomValue); 148 this.generator().addRandomByte(this.sourceId(), this.nextPoolIndex(), aRandomValue);
152 this.incrementNextPoolIndex(); 149 this.incrementNextPoolIndex();
153 } 150 }
154 }, 151 },
155 152
156 //------------------------------------------------------------------------- 153 //-------------------------------------------------------------------------
157 __syntaxFix__: "syntax fix" 154 __syntaxFix__: "syntax fix"
158}); 155});
159 156
160//############################################################################# 157//#############################################################################
161 158
162Clipperz.Crypto.PRNG.TimeRandomnessSource = function(args) { 159Clipperz.Crypto.PRNG.TimeRandomnessSource = function(args) {
163 args = args || {}; 160 args = args || {};
164 //MochiKit.Base.bindMethods(this); 161 //MochiKit.Base.bindMethods(this);
165 162
166 this._intervalTime = args.intervalTime || 1000; 163 this._intervalTime = args.intervalTime || 1000;
167 164
168 Clipperz.Crypto.PRNG.RandomnessSource.call(this, args); 165 Clipperz.Crypto.PRNG.RandomnessSource.call(this, args);
169 166
170 this.collectEntropy(); 167 this.collectEntropy();
171 return this; 168 return this;
172} 169}
173 170
174Clipperz.Crypto.PRNG.TimeRandomnessSource.prototype = MochiKit.Base.update(new Clipperz.Crypto.PRNG.RandomnessSource, { 171Clipperz.Crypto.PRNG.TimeRandomnessSource.prototype = MochiKit.Base.update(new Clipperz.Crypto.PRNG.RandomnessSource, {
175 172
176 'intervalTime': function() { 173 'intervalTime': function() {
177 return this._intervalTime; 174 return this._intervalTime;
178 }, 175 },
179 176
180 //------------------------------------------------------------------------- 177 //-------------------------------------------------------------------------
181 178
182 'collectEntropy': function() { 179 'collectEntropy': function() {
183 varnow; 180 varnow;
184 varentropyByte; 181 varentropyByte;
185 var intervalTime; 182 var intervalTime;
186 now = new Date(); 183 now = new Date();
187 entropyByte = (now.getTime() & 0xff); 184 entropyByte = (now.getTime() & 0xff);
188 185
189 intervalTime = this.intervalTime(); 186 intervalTime = this.intervalTime();
190 if (this.boostMode() == true) { 187 if (this.boostMode() == true) {
191 intervalTime = intervalTime / 9; 188 intervalTime = intervalTime / 9;
192 } 189 }
193 190
194 this.updateGeneratorWithValue(entropyByte); 191 this.updateGeneratorWithValue(entropyByte);
195 setTimeout(this.collectEntropy, intervalTime); 192 setTimeout(this.collectEntropy, intervalTime);
196 }, 193 },
197 194
198 //------------------------------------------------------------------------- 195 //-------------------------------------------------------------------------
199 196
200 'numberOfRandomBits': function() { 197 'numberOfRandomBits': function() {
201 return 5; 198 return 5;
202 }, 199 },
203 200
204 //------------------------------------------------------------------------- 201 //-------------------------------------------------------------------------
205 202
206 'pollingFrequency': function() { 203 'pollingFrequency': function() {
207 return 10; 204 return 10;
208 }, 205 },
209 206
210 //------------------------------------------------------------------------- 207 //-------------------------------------------------------------------------
211 __syntaxFix__: "syntax fix" 208 __syntaxFix__: "syntax fix"
212}); 209});
213 210
214//***************************************************************************** 211//*****************************************************************************
215 212
216Clipperz.Crypto.PRNG.MouseRandomnessSource = function(args) { 213Clipperz.Crypto.PRNG.MouseRandomnessSource = function(args) {
217 args = args || {}; 214 args = args || {};
218 215
219 Clipperz.Crypto.PRNG.RandomnessSource.call(this, args); 216 Clipperz.Crypto.PRNG.RandomnessSource.call(this, args);
220 217
221 this._numberOfBitsToCollectAtEachEvent = 4; 218 this._numberOfBitsToCollectAtEachEvent = 4;
222 this._randomBitsCollector = 0; 219 this._randomBitsCollector = 0;
223 this._numberOfRandomBitsCollected = 0; 220 this._numberOfRandomBitsCollected = 0;
224 221
225 MochiKit.Signal.connect(document, 'onmousemove', this, 'collectEntropy'); 222 MochiKit.Signal.connect(document, 'onmousemove', this, 'collectEntropy');
226 223
227 return this; 224 return this;
228} 225}
229 226
230Clipperz.Crypto.PRNG.MouseRandomnessSource.prototype = MochiKit.Base.update(new Clipperz.Crypto.PRNG.RandomnessSource, { 227Clipperz.Crypto.PRNG.MouseRandomnessSource.prototype = MochiKit.Base.update(new Clipperz.Crypto.PRNG.RandomnessSource, {
231 228
232 //------------------------------------------------------------------------- 229 //-------------------------------------------------------------------------
233 230
234 'numberOfBitsToCollectAtEachEvent': function() { 231 'numberOfBitsToCollectAtEachEvent': function() {
235 return this._numberOfBitsToCollectAtEachEvent; 232 return this._numberOfBitsToCollectAtEachEvent;
236 }, 233 },
237 234
238 //------------------------------------------------------------------------- 235 //-------------------------------------------------------------------------
239 236
240 'randomBitsCollector': function() { 237 'randomBitsCollector': function() {
241 return this._randomBitsCollector; 238 return this._randomBitsCollector;
242 }, 239 },
243 240
244 'setRandomBitsCollector': function(aValue) { 241 'setRandomBitsCollector': function(aValue) {
245 this._randomBitsCollector = aValue; 242 this._randomBitsCollector = aValue;
246 }, 243 },
247 244
248 'appendRandomBitsToRandomBitsCollector': function(aValue) { 245 'appendRandomBitsToRandomBitsCollector': function(aValue) {
249 var collectedBits; 246 var collectedBits;
250 var numberOfRandomBitsCollected; 247 var numberOfRandomBitsCollected;
251 248
252 numberOfRandomBitsCollected = this.numberOfRandomBitsCollected(); 249 numberOfRandomBitsCollected = this.numberOfRandomBitsCollected();
253 collectetBits = this.randomBitsCollector() | (aValue << numberOfRandomBitsCollected); 250 collectetBits = this.randomBitsCollector() | (aValue << numberOfRandomBitsCollected);
254 this.setRandomBitsCollector(collectetBits); 251 this.setRandomBitsCollector(collectetBits);
255 numberOfRandomBitsCollected += this.numberOfBitsToCollectAtEachEvent(); 252 numberOfRandomBitsCollected += this.numberOfBitsToCollectAtEachEvent();
256 253
257 if (numberOfRandomBitsCollected == 8) { 254 if (numberOfRandomBitsCollected == 8) {
258 this.updateGeneratorWithValue(collectetBits); 255 this.updateGeneratorWithValue(collectetBits);
259 numberOfRandomBitsCollected = 0; 256 numberOfRandomBitsCollected = 0;
260 this.setRandomBitsCollector(0); 257 this.setRandomBitsCollector(0);
261 } 258 }
262 259
263 this.setNumberOfRandomBitsCollected(numberOfRandomBitsCollected) 260 this.setNumberOfRandomBitsCollected(numberOfRandomBitsCollected)
264 }, 261 },
265 262
266 //------------------------------------------------------------------------- 263 //-------------------------------------------------------------------------
267 264
268 'numberOfRandomBitsCollected': function() { 265 'numberOfRandomBitsCollected': function() {
269 return this._numberOfRandomBitsCollected; 266 return this._numberOfRandomBitsCollected;
270 }, 267 },
271 268
272 'setNumberOfRandomBitsCollected': function(aValue) { 269 'setNumberOfRandomBitsCollected': function(aValue) {
273 this._numberOfRandomBitsCollected = aValue; 270 this._numberOfRandomBitsCollected = aValue;
274 }, 271 },
275 272
276 //------------------------------------------------------------------------- 273 //-------------------------------------------------------------------------
277 274
278 'collectEntropy': function(anEvent) { 275 'collectEntropy': function(anEvent) {
279 var mouseLocation; 276 var mouseLocation;
280 var randomBit; 277 var randomBit;
281 var mask; 278 var mask;
282 279
283 mask = 0xffffffff >>> (32 - this.numberOfBitsToCollectAtEachEvent()); 280 mask = 0xffffffff >>> (32 - this.numberOfBitsToCollectAtEachEvent());
284 281
285 mouseLocation = anEvent.mouse().client; 282 mouseLocation = anEvent.mouse().client;
286 randomBit = ((mouseLocation.x ^ mouseLocation.y) & mask); 283 randomBit = ((mouseLocation.x ^ mouseLocation.y) & mask);
287 this.appendRandomBitsToRandomBitsCollector(randomBit) 284 this.appendRandomBitsToRandomBitsCollector(randomBit)
288 }, 285 },
289 286
290 //------------------------------------------------------------------------- 287 //-------------------------------------------------------------------------
291 288
292 'numberOfRandomBits': function() { 289 'numberOfRandomBits': function() {
293 return 1; 290 return 1;
294 }, 291 },
295 292
296 //------------------------------------------------------------------------- 293 //-------------------------------------------------------------------------
297 294
298 'pollingFrequency': function() { 295 'pollingFrequency': function() {
299 return 10; 296 return 10;
300 }, 297 },
301 298
302 //------------------------------------------------------------------------- 299 //-------------------------------------------------------------------------
303 __syntaxFix__: "syntax fix" 300 __syntaxFix__: "syntax fix"
304}); 301});
305 302
306//***************************************************************************** 303//*****************************************************************************
307 304
308Clipperz.Crypto.PRNG.KeyboardRandomnessSource = function(args) { 305Clipperz.Crypto.PRNG.KeyboardRandomnessSource = function(args) {
309 args = args || {}; 306 args = args || {};
310 Clipperz.Crypto.PRNG.RandomnessSource.call(this, args); 307 Clipperz.Crypto.PRNG.RandomnessSource.call(this, args);
311 308
312 this._randomBitsCollector = 0; 309 this._randomBitsCollector = 0;
313 this._numberOfRandomBitsCollected = 0; 310 this._numberOfRandomBitsCollected = 0;
314 311
315 MochiKit.Signal.connect(document, 'onkeypress', this, 'collectEntropy'); 312 MochiKit.Signal.connect(document, 'onkeypress', this, 'collectEntropy');
316 313
317 return this; 314 return this;
318} 315}
319 316
320Clipperz.Crypto.PRNG.KeyboardRandomnessSource.prototype = MochiKit.Base.update(new Clipperz.Crypto.PRNG.RandomnessSource, { 317Clipperz.Crypto.PRNG.KeyboardRandomnessSource.prototype = MochiKit.Base.update(new Clipperz.Crypto.PRNG.RandomnessSource, {
321 318
322 //------------------------------------------------------------------------- 319 //-------------------------------------------------------------------------
323 320
324 'randomBitsCollector': function() { 321 'randomBitsCollector': function() {
325 return this._randomBitsCollector; 322 return this._randomBitsCollector;
326 }, 323 },
327 324
328 'setRandomBitsCollector': function(aValue) { 325 'setRandomBitsCollector': function(aValue) {
329 this._randomBitsCollector = aValue; 326 this._randomBitsCollector = aValue;
330 }, 327 },
331 328
332 'appendRandomBitToRandomBitsCollector': function(aValue) { 329 'appendRandomBitToRandomBitsCollector': function(aValue) {
333 var collectedBits; 330 var collectedBits;
334 var numberOfRandomBitsCollected; 331 var numberOfRandomBitsCollected;
335 332
336 numberOfRandomBitsCollected = this.numberOfRandomBitsCollected(); 333 numberOfRandomBitsCollected = this.numberOfRandomBitsCollected();
337 collectetBits = this.randomBitsCollector() | (aValue << numberOfRandomBitsCollected); 334 collectetBits = this.randomBitsCollector() | (aValue << numberOfRandomBitsCollected);
338 this.setRandomBitsCollector(collectetBits); 335 this.setRandomBitsCollector(collectetBits);
339 numberOfRandomBitsCollected ++; 336 numberOfRandomBitsCollected ++;
340 337
341 if (numberOfRandomBitsCollected == 8) { 338 if (numberOfRandomBitsCollected == 8) {
342 this.updateGeneratorWithValue(collectetBits); 339 this.updateGeneratorWithValue(collectetBits);
343 numberOfRandomBitsCollected = 0; 340 numberOfRandomBitsCollected = 0;
344 this.setRandomBitsCollector(0); 341 this.setRandomBitsCollector(0);
345 } 342 }
346 343
347 this.setNumberOfRandomBitsCollected(numberOfRandomBitsCollected) 344 this.setNumberOfRandomBitsCollected(numberOfRandomBitsCollected)
348 }, 345 },
349 346
350 //------------------------------------------------------------------------- 347 //-------------------------------------------------------------------------
351 348
352 'numberOfRandomBitsCollected': function() { 349 'numberOfRandomBitsCollected': function() {
353 return this._numberOfRandomBitsCollected; 350 return this._numberOfRandomBitsCollected;
354 }, 351 },
355 352
356 'setNumberOfRandomBitsCollected': function(aValue) { 353 'setNumberOfRandomBitsCollected': function(aValue) {
357 this._numberOfRandomBitsCollected = aValue; 354 this._numberOfRandomBitsCollected = aValue;
358 }, 355 },
359 356
360 //------------------------------------------------------------------------- 357 //-------------------------------------------------------------------------
361 358
362 'collectEntropy': function(anEvent) { 359 'collectEntropy': function(anEvent) {
363/* 360/*
364 var mouseLocation; 361 var mouseLocation;
365 var randomBit; 362 var randomBit;
366 363
367 mouseLocation = anEvent.mouse().client; 364 mouseLocation = anEvent.mouse().client;
368 365
369 randomBit = ((mouseLocation.x ^ mouseLocation.y) & 0x1); 366 randomBit = ((mouseLocation.x ^ mouseLocation.y) & 0x1);
370 this.appendRandomBitToRandomBitsCollector(randomBit); 367 this.appendRandomBitToRandomBitsCollector(randomBit);
371*/ 368*/
372 }, 369 },
373 370
374 //------------------------------------------------------------------------- 371 //-------------------------------------------------------------------------
375 372
376 'numberOfRandomBits': function() { 373 'numberOfRandomBits': function() {
377 return 1; 374 return 1;
378 }, 375 },
379 376
380 //------------------------------------------------------------------------- 377 //-------------------------------------------------------------------------
381 378
382 'pollingFrequency': function() { 379 'pollingFrequency': function() {
383 return 10; 380 return 10;
384 }, 381 },
385 382
386 //------------------------------------------------------------------------- 383 //-------------------------------------------------------------------------
387 __syntaxFix__: "syntax fix" 384 __syntaxFix__: "syntax fix"
388}); 385});
389 386
390//############################################################################# 387//#############################################################################
391 388
392Clipperz.Crypto.PRNG.Fortuna = function(args) { 389Clipperz.Crypto.PRNG.Fortuna = function(args) {
393 vari,c; 390 vari,c;
394 391
395 args = args || {}; 392 args = args || {};
396 393
397 this._key = args.seed || null; 394 this._key = args.seed || null;
398 if (this._key == null) { 395 if (this._key == null) {
399 this._counter = 0; 396 this._counter = 0;
400 this._key = new Clipperz.ByteArray(); 397 this._key = new Clipperz.ByteArray();
401 } else { 398 } else {
402 this._counter = 1; 399 this._counter = 1;
403 } 400 }
404 401
405 this._aesKey = null; 402 this._aesKey = null;
406 403
407 this._firstPoolReseedLevel = args.firstPoolReseedLevel || 32 || 64; 404 this._firstPoolReseedLevel = args.firstPoolReseedLevel || 32 || 64;
408 this._numberOfEntropyAccumulators = args.numberOfEntropyAccumulators || 32; 405 this._numberOfEntropyAccumulators = args.numberOfEntropyAccumulators || 32;
diff --git a/frontend/beta/js/Clipperz/Crypto/RSA.js b/frontend/beta/js/Clipperz/Crypto/RSA.js
index 4dad8f7..6844dba 100644
--- a/frontend/beta/js/Clipperz/Crypto/RSA.js
+++ b/frontend/beta/js/Clipperz/Crypto/RSA.js
@@ -1,151 +1,148 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29try { if (typeof(Clipperz.Crypto.BigInt) == 'undefined') { throw ""; }} catch (e) { 26try { if (typeof(Clipperz.Crypto.BigInt) == 'undefined') { throw ""; }} catch (e) {
30 throw "Clipperz.Crypto.RSA depends on Clipperz.Crypto.BigInt!"; 27 throw "Clipperz.Crypto.RSA depends on Clipperz.Crypto.BigInt!";
31} 28}
32 29
33if (typeof(Clipperz.Crypto.RSA) == 'undefined') { Clipperz.Crypto.RSA = {}; } 30if (typeof(Clipperz.Crypto.RSA) == 'undefined') { Clipperz.Crypto.RSA = {}; }
34 31
35Clipperz.Crypto.RSA.VERSION = "0.1"; 32Clipperz.Crypto.RSA.VERSION = "0.1";
36Clipperz.Crypto.RSA.NAME = "Clipperz.RSA"; 33Clipperz.Crypto.RSA.NAME = "Clipperz.RSA";
37 34
38//############################################################################# 35//#############################################################################
39 36
40MochiKit.Base.update(Clipperz.Crypto.RSA, { 37MochiKit.Base.update(Clipperz.Crypto.RSA, {
41 38
42 //------------------------------------------------------------------------- 39 //-------------------------------------------------------------------------
43 40
44 'publicKeyWithValues': function (e, d, n) { 41 'publicKeyWithValues': function (e, d, n) {
45 varresult; 42 varresult;
46 43
47 result = {}; 44 result = {};
48 45
49 if (e.isBigInt) { 46 if (e.isBigInt) {
50 result.e = e; 47 result.e = e;
51 } else { 48 } else {
52 result.e = new Clipperz.Crypto.BigInt(e, 16); 49 result.e = new Clipperz.Crypto.BigInt(e, 16);
53 } 50 }
54 51
55 if (d.isBigInt) { 52 if (d.isBigInt) {
56 result.d = d; 53 result.d = d;
57 } else { 54 } else {
58 result.d = new Clipperz.Crypto.BigInt(d, 16); 55 result.d = new Clipperz.Crypto.BigInt(d, 16);
59 } 56 }
60 57
61 if (n.isBigInt) { 58 if (n.isBigInt) {
62 result.n = n; 59 result.n = n;
63 } else { 60 } else {
64 result.n = new Clipperz.Crypto.BigInt(n, 16); 61 result.n = new Clipperz.Crypto.BigInt(n, 16);
65 } 62 }
66 63
67 return result; 64 return result;
68 }, 65 },
69 66
70 'privateKeyWithValues': function(e, d, n) { 67 'privateKeyWithValues': function(e, d, n) {
71 return Clipperz.Crypto.RSA.publicKeyWithValues(e, d, n); 68 return Clipperz.Crypto.RSA.publicKeyWithValues(e, d, n);
72 }, 69 },
73 70
74 //----------------------------------------------------------------------------- 71 //-----------------------------------------------------------------------------
75 72
76 'encryptUsingPublicKey': function (aKey, aMessage) { 73 'encryptUsingPublicKey': function (aKey, aMessage) {
77 varmessageValue; 74 varmessageValue;
78 varresult; 75 varresult;
79 76
80 messageValue = new Clipperz.Crypto.BigInt(aMessage, 16); 77 messageValue = new Clipperz.Crypto.BigInt(aMessage, 16);
81 result = messageValue.powerModule(aKey.e, aKey.n); 78 result = messageValue.powerModule(aKey.e, aKey.n);
82 79
83 return result.asString(16); 80 return result.asString(16);
84 }, 81 },
85 82
86 //............................................................................. 83 //.............................................................................
87 84
88 'decryptUsingPublicKey': function (aKey, aMessage) { 85 'decryptUsingPublicKey': function (aKey, aMessage) {
89 return Clipperz.Crypto.RSA.encryptUsingPublicKey(aKey, aMessage); 86 return Clipperz.Crypto.RSA.encryptUsingPublicKey(aKey, aMessage);
90 }, 87 },
91 88
92 //----------------------------------------------------------------------------- 89 //-----------------------------------------------------------------------------
93 90
94 'encryptUsingPrivateKey': function (aKey, aMessage) { 91 'encryptUsingPrivateKey': function (aKey, aMessage) {
95 varmessageValue; 92 varmessageValue;
96 varresult; 93 varresult;
97 94
98 messageValue = new Clipperz.Crypto.BigInt(aMessage, 16); 95 messageValue = new Clipperz.Crypto.BigInt(aMessage, 16);
99 result = messageValue.powerModule(aKey.d, aKey.n); 96 result = messageValue.powerModule(aKey.d, aKey.n);
100 97
101 return result.asString(16); 98 return result.asString(16);
102 }, 99 },
103 100
104 //............................................................................. 101 //.............................................................................
105 102
106 'decryptUsingPrivateKey': function (aKey, aMessage) { 103 'decryptUsingPrivateKey': function (aKey, aMessage) {
107 return Clipperz.Crypto.RSA.encryptUsingPrivateKey(aKey, aMessage); 104 return Clipperz.Crypto.RSA.encryptUsingPrivateKey(aKey, aMessage);
108 }, 105 },
109 106
110 //----------------------------------------------------------------------------- 107 //-----------------------------------------------------------------------------
111 108
112 'generatePublicKey': function(aNumberOfBits) { 109 'generatePublicKey': function(aNumberOfBits) {
113 varresult; 110 varresult;
114 vare; 111 vare;
115 vard; 112 vard;
116 varn; 113 varn;
117 114
118 e = new Clipperz.Crypto.BigInt("10001", 16); 115 e = new Clipperz.Crypto.BigInt("10001", 16);
119 116
120 { 117 {
121 var p, q; 118 var p, q;
122 varphi; 119 varphi;
123 120
124 do { 121 do {
125 p = Clipperz.Crypto.BigInt.randomPrime(aNumberOfBits); 122 p = Clipperz.Crypto.BigInt.randomPrime(aNumberOfBits);
126 } while (p.module(e).equals(1)); 123 } while (p.module(e).equals(1));
127 124
128 do { 125 do {
129 q = Clipperz.Crypto.BigInt.randomPrime(aNumberOfBits); 126 q = Clipperz.Crypto.BigInt.randomPrime(aNumberOfBits);
130 } while ((q.equals(p)) || (q.module(e).equals(1))); 127 } while ((q.equals(p)) || (q.module(e).equals(1)));
131 128
132 n = p.multiply(q); 129 n = p.multiply(q);
133 phi = (p.subtract(1).multiply(q.subtract(1))); 130 phi = (p.subtract(1).multiply(q.subtract(1)));
134 d = e.powerModule(-1, phi); 131 d = e.powerModule(-1, phi);
135 } 132 }
136 133
137 result = Clipperz.Crypto.RSA.publicKeyWithValues(e, d, n); 134 result = Clipperz.Crypto.RSA.publicKeyWithValues(e, d, n);
138 135
139 return result; 136 return result;
140 }, 137 },
141 138
142 //------------------------------------------------------------------------- 139 //-------------------------------------------------------------------------
143 140
144 __syntaxFix__: "syntax fix" 141 __syntaxFix__: "syntax fix"
145 142
146 //------------------------------------------------------------------------- 143 //-------------------------------------------------------------------------
147 144
148}); 145});
149 146
150//############################################################################# 147//#############################################################################
151 148
diff --git a/frontend/beta/js/Clipperz/Crypto/SHA.js b/frontend/beta/js/Clipperz/Crypto/SHA.js
index bb50b4f..635eb90 100644
--- a/frontend/beta/js/Clipperz/Crypto/SHA.js
+++ b/frontend/beta/js/Clipperz/Crypto/SHA.js
@@ -1,296 +1,293 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { 26try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) {
30 throw "Clipperz.Crypto.PRNG depends on Clipperz.ByteArray!"; 27 throw "Clipperz.Crypto.PRNG depends on Clipperz.ByteArray!";
31} 28}
32 29
33if (typeof(Clipperz.Crypto) == 'undefined') { Clipperz.Crypto = {}; } 30if (typeof(Clipperz.Crypto) == 'undefined') { Clipperz.Crypto = {}; }
34if (typeof(Clipperz.Crypto.SHA) == 'undefined') { Clipperz.Crypto.SHA = {}; } 31if (typeof(Clipperz.Crypto.SHA) == 'undefined') { Clipperz.Crypto.SHA = {}; }
35 32
36Clipperz.Crypto.SHA.VERSION = "0.3"; 33Clipperz.Crypto.SHA.VERSION = "0.3";
37Clipperz.Crypto.SHA.NAME = "Clipperz.Crypto.SHA"; 34Clipperz.Crypto.SHA.NAME = "Clipperz.Crypto.SHA";
38 35
39MochiKit.Base.update(Clipperz.Crypto.SHA, { 36MochiKit.Base.update(Clipperz.Crypto.SHA, {
40 37
41 '__repr__': function () { 38 '__repr__': function () {
42 return "[" + this.NAME + " " + this.VERSION + "]"; 39 return "[" + this.NAME + " " + this.VERSION + "]";
43 }, 40 },
44 41
45 'toString': function () { 42 'toString': function () {
46 return this.__repr__(); 43 return this.__repr__();
47 }, 44 },
48 45
49 //----------------------------------------------------------------------------- 46 //-----------------------------------------------------------------------------
50 47
51 'rotateRight': function(aValue, aNumberOfBits) { 48 'rotateRight': function(aValue, aNumberOfBits) {
52//Clipperz.Profile.start("Clipperz.Crypto.SHA.rotateRight"); 49//Clipperz.Profile.start("Clipperz.Crypto.SHA.rotateRight");
53 var result; 50 var result;
54 51
55 result = (aValue >>> aNumberOfBits) | (aValue << (32 - aNumberOfBits)); 52 result = (aValue >>> aNumberOfBits) | (aValue << (32 - aNumberOfBits));
56 53
57//Clipperz.Profile.stop("Clipperz.Crypto.SHA.rotateRight"); 54//Clipperz.Profile.stop("Clipperz.Crypto.SHA.rotateRight");
58 return result; 55 return result;
59 }, 56 },
60 57
61 'shiftRight': function(aValue, aNumberOfBits) { 58 'shiftRight': function(aValue, aNumberOfBits) {
62//Clipperz.Profile.start("Clipperz.Crypto.SHA.shiftRight"); 59//Clipperz.Profile.start("Clipperz.Crypto.SHA.shiftRight");
63 var result; 60 var result;
64 61
65 result = aValue >>> aNumberOfBits; 62 result = aValue >>> aNumberOfBits;
66 63
67//Clipperz.Profile.stop("Clipperz.Crypto.SHA.shiftRight"); 64//Clipperz.Profile.stop("Clipperz.Crypto.SHA.shiftRight");
68 return result; 65 return result;
69 }, 66 },
70 67
71 //----------------------------------------------------------------------------- 68 //-----------------------------------------------------------------------------
72 69
73 'safeAdd': function() { 70 'safeAdd': function() {
74//Clipperz.Profile.start("Clipperz.Crypto.SHA.safeAdd"); 71//Clipperz.Profile.start("Clipperz.Crypto.SHA.safeAdd");
75 varresult; 72 varresult;
76 vari, c; 73 vari, c;
77 74
78 result = arguments[0]; 75 result = arguments[0];
79 c = arguments.length; 76 c = arguments.length;
80 for (i=1; i<c; i++) { 77 for (i=1; i<c; i++) {
81 varlowerBytesSum; 78 varlowerBytesSum;
82 79
83 lowerBytesSum = (result & 0xffff) + (arguments[i] & 0xffff); 80 lowerBytesSum = (result & 0xffff) + (arguments[i] & 0xffff);
84 result = (((result >> 16) + (arguments[i] >> 16) + (lowerBytesSum >> 16)) << 16) | (lowerBytesSum & 0xffff); 81 result = (((result >> 16) + (arguments[i] >> 16) + (lowerBytesSum >> 16)) << 16) | (lowerBytesSum & 0xffff);
85 } 82 }
86 83
87//Clipperz.Profile.stop("Clipperz.Crypto.SHA.safeAdd"); 84//Clipperz.Profile.stop("Clipperz.Crypto.SHA.safeAdd");
88 return result; 85 return result;
89 }, 86 },
90 87
91 //----------------------------------------------------------------------------- 88 //-----------------------------------------------------------------------------
92 89
93 'sha256_array': function(aValue) { 90 'sha256_array': function(aValue) {
94//Clipperz.Profile.start("Clipperz.Crypto.SHA.sha256_array"); 91//Clipperz.Profile.start("Clipperz.Crypto.SHA.sha256_array");
95 varresult; 92 varresult;
96 varmessage; 93 varmessage;
97 var h0, h1, h2, h3, h4, h5, h6, h7; 94 var h0, h1, h2, h3, h4, h5, h6, h7;
98 vark; 95 vark;
99 varmessageLength; 96 varmessageLength;
100 varmessageLengthInBits; 97 varmessageLengthInBits;
101 var_i, _c; 98 var_i, _c;
102 var charBits; 99 var charBits;
103 var rotateRight; 100 var rotateRight;
104 var shiftRight; 101 var shiftRight;
105 var safeAdd; 102 var safeAdd;
106 varbytesPerBlock; 103 varbytesPerBlock;
107 var currentMessageIndex; 104 var currentMessageIndex;
108 105
109 bytesPerBlock = 512/8; 106 bytesPerBlock = 512/8;
110 rotateRight = Clipperz.Crypto.SHA.rotateRight; 107 rotateRight = Clipperz.Crypto.SHA.rotateRight;
111 shiftRight = Clipperz.Crypto.SHA.shiftRight; 108 shiftRight = Clipperz.Crypto.SHA.shiftRight;
112 safeAdd = Clipperz.Crypto.SHA.safeAdd; 109 safeAdd = Clipperz.Crypto.SHA.safeAdd;
113 110
114 charBits = 8; 111 charBits = 8;
115 112
116 h0 = 0x6a09e667; 113 h0 = 0x6a09e667;
117 h1 = 0xbb67ae85; 114 h1 = 0xbb67ae85;
118 h2 = 0x3c6ef372; 115 h2 = 0x3c6ef372;
119 h3 = 0xa54ff53a; 116 h3 = 0xa54ff53a;
120 h4 = 0x510e527f; 117 h4 = 0x510e527f;
121 h5 = 0x9b05688c; 118 h5 = 0x9b05688c;
122 h6 = 0x1f83d9ab; 119 h6 = 0x1f83d9ab;
123 h7 = 0x5be0cd19; 120 h7 = 0x5be0cd19;
124 121
125 k = [0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 122 k = [0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
126 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 123 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
127 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 124 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
128 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, 125 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
129 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 126 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
130 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, 127 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
131 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, 128 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
132 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2]; 129 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2];
133 130
134 message = aValue; 131 message = aValue;
135 messageLength = message.length; 132 messageLength = message.length;
136 133
137 //Pre-processing: 134 //Pre-processing:
138 message.push(0x80); //append a single "1" bit to message 135 message.push(0x80); //append a single "1" bit to message
139 136
140 _c = (512 - (((messageLength + 1) * charBits) % 512) - 64) / charBits; 137 _c = (512 - (((messageLength + 1) * charBits) % 512) - 64) / charBits;
141 for (_i=0; _i<_c; _i++) { 138 for (_i=0; _i<_c; _i++) {
142 message.push(0x00); //append "0" bits until message length ≡ 448 ≡ -64 (mod 512) 139 message.push(0x00); //append "0" bits until message length ≡ 448 ≡ -64 (mod 512)
143 } 140 }
144 messageLengthInBits = messageLength * charBits; 141 messageLengthInBits = messageLength * charBits;
145 message.push(0x00); //the 4 most high byte are alway 0 as message length is represented with a 32bit value; 142 message.push(0x00); //the 4 most high byte are alway 0 as message length is represented with a 32bit value;
146 message.push(0x00); 143 message.push(0x00);
147 message.push(0x00); 144 message.push(0x00);
148 message.push(0x00); 145 message.push(0x00);
149 message.push((messageLengthInBits >> 24)& 0xff); 146 message.push((messageLengthInBits >> 24)& 0xff);
150 message.push((messageLengthInBits >> 16)& 0xff); 147 message.push((messageLengthInBits >> 16)& 0xff);
151 message.push((messageLengthInBits >> 8) & 0xff); 148 message.push((messageLengthInBits >> 8) & 0xff);
152 message.push( messageLengthInBits & 0xff); 149 message.push( messageLengthInBits & 0xff);
153 150
154 currentMessageIndex = 0; 151 currentMessageIndex = 0;
155 while(currentMessageIndex < message.length) { 152 while(currentMessageIndex < message.length) {
156 varw; 153 varw;
157 vara, b, c, d, e, f, g, h; 154 vara, b, c, d, e, f, g, h;
158 155
159 w = Array(64); 156 w = Array(64);
160 157
161 _c = 16; 158 _c = 16;
162 for (_i=0; _i<_c; _i++) { 159 for (_i=0; _i<_c; _i++) {
163 var _j; 160 var _j;
164 161
165 _j = currentMessageIndex + _i*4; 162 _j = currentMessageIndex + _i*4;
166 w[_i] = (message[_j] << 24) | (message[_j + 1] << 16) | (message[_j + 2] << 8) | (message[_j + 3] << 0); 163 w[_i] = (message[_j] << 24) | (message[_j + 1] << 16) | (message[_j + 2] << 8) | (message[_j + 3] << 0);
167 } 164 }
168 165
169 _c = 64; 166 _c = 64;
170 for (_i=16; _i<_c; _i++) { 167 for (_i=16; _i<_c; _i++) {
171 vars0, s1; 168 vars0, s1;
172 169
173 s0 = (rotateRight(w[_i-15], 7)) ^ (rotateRight(w[_i-15], 18)) ^ (shiftRight(w[_i-15], 3)); 170 s0 = (rotateRight(w[_i-15], 7)) ^ (rotateRight(w[_i-15], 18)) ^ (shiftRight(w[_i-15], 3));
174 s1 = (rotateRight(w[_i-2], 17)) ^ (rotateRight(w[_i-2], 19)) ^ (shiftRight(w[_i-2], 10)); 171 s1 = (rotateRight(w[_i-2], 17)) ^ (rotateRight(w[_i-2], 19)) ^ (shiftRight(w[_i-2], 10));
175 w[_i] = safeAdd(w[_i-16], s0, w[_i-7], s1); 172 w[_i] = safeAdd(w[_i-16], s0, w[_i-7], s1);
176 } 173 }
177 174
178 a=h0; b=h1; c=h2; d=h3; e=h4; f=h5; g=h6; h=h7; 175 a=h0; b=h1; c=h2; d=h3; e=h4; f=h5; g=h6; h=h7;
179 176
180 _c = 64; 177 _c = 64;
181 for (_i=0; _i<_c; _i++) { 178 for (_i=0; _i<_c; _i++) {
182 var s0, s1, ch, maj, t1, t2; 179 var s0, s1, ch, maj, t1, t2;
183 180
184 s0 = (rotateRight(a, 2)) ^ (rotateRight(a, 13)) ^ (rotateRight(a, 22)); 181 s0 = (rotateRight(a, 2)) ^ (rotateRight(a, 13)) ^ (rotateRight(a, 22));
185 maj = (a & b) ^ (a & c) ^ (b & c); 182 maj = (a & b) ^ (a & c) ^ (b & c);
186 t2 = safeAdd(s0, maj); 183 t2 = safeAdd(s0, maj);
187 s1 = (rotateRight(e, 6)) ^ (rotateRight(e, 11)) ^ (rotateRight(e, 25)); 184 s1 = (rotateRight(e, 6)) ^ (rotateRight(e, 11)) ^ (rotateRight(e, 25));
188 ch = (e & f) ^ ((~e) & g); 185 ch = (e & f) ^ ((~e) & g);
189 t1 = safeAdd(h, s1, ch, k[_i], w[_i]); 186 t1 = safeAdd(h, s1, ch, k[_i], w[_i]);
190 187
191 h = g; 188 h = g;
192 g = f; 189 g = f;
193 f = e; 190 f = e;
194 e = safeAdd(d, t1); 191 e = safeAdd(d, t1);
195 d = c; 192 d = c;
196 c = b; 193 c = b;
197 b = a; 194 b = a;
198 a = safeAdd(t1, t2); 195 a = safeAdd(t1, t2);
199 } 196 }
200 197
201 h0 = safeAdd(h0, a); 198 h0 = safeAdd(h0, a);
202 h1 = safeAdd(h1, b); 199 h1 = safeAdd(h1, b);
203 h2 = safeAdd(h2, c); 200 h2 = safeAdd(h2, c);
204 h3 = safeAdd(h3, d); 201 h3 = safeAdd(h3, d);
205 h4 = safeAdd(h4, e); 202 h4 = safeAdd(h4, e);
206 h5 = safeAdd(h5, f); 203 h5 = safeAdd(h5, f);
207 h6 = safeAdd(h6, g); 204 h6 = safeAdd(h6, g);
208 h7 = safeAdd(h7, h); 205 h7 = safeAdd(h7, h);
209 206
210 currentMessageIndex += bytesPerBlock; 207 currentMessageIndex += bytesPerBlock;
211 } 208 }
212 209
213 result = new Array(256/8); 210 result = new Array(256/8);
214 result[0] = (h0 >> 24)& 0xff; 211 result[0] = (h0 >> 24)& 0xff;
215 result[1] = (h0 >> 16)& 0xff; 212 result[1] = (h0 >> 16)& 0xff;
216 result[2] = (h0 >> 8)& 0xff; 213 result[2] = (h0 >> 8)& 0xff;
217 result[3] = h0 & 0xff; 214 result[3] = h0 & 0xff;
218 215
219 result[4] = (h1 >> 24)& 0xff; 216 result[4] = (h1 >> 24)& 0xff;
220 result[5] = (h1 >> 16)& 0xff; 217 result[5] = (h1 >> 16)& 0xff;
221 result[6] = (h1 >> 8)& 0xff; 218 result[6] = (h1 >> 8)& 0xff;
222 result[7] = h1 & 0xff; 219 result[7] = h1 & 0xff;
223 220
224 result[8] = (h2 >> 24)& 0xff; 221 result[8] = (h2 >> 24)& 0xff;
225 result[9] = (h2 >> 16)& 0xff; 222 result[9] = (h2 >> 16)& 0xff;
226 result[10] = (h2 >> 8)& 0xff; 223 result[10] = (h2 >> 8)& 0xff;
227 result[11] = h2 & 0xff; 224 result[11] = h2 & 0xff;
228 225
229 result[12] = (h3 >> 24)& 0xff; 226 result[12] = (h3 >> 24)& 0xff;
230 result[13] = (h3 >> 16)& 0xff; 227 result[13] = (h3 >> 16)& 0xff;
231 result[14] = (h3 >> 8)& 0xff; 228 result[14] = (h3 >> 8)& 0xff;
232 result[15] = h3 & 0xff; 229 result[15] = h3 & 0xff;
233 230
234 result[16] = (h4 >> 24)& 0xff; 231 result[16] = (h4 >> 24)& 0xff;
235 result[17] = (h4 >> 16)& 0xff; 232 result[17] = (h4 >> 16)& 0xff;
236 result[18] = (h4 >> 8)& 0xff; 233 result[18] = (h4 >> 8)& 0xff;
237 result[19] = h4 & 0xff; 234 result[19] = h4 & 0xff;
238 235
239 result[20] = (h5 >> 24)& 0xff; 236 result[20] = (h5 >> 24)& 0xff;
240 result[21] = (h5 >> 16)& 0xff; 237 result[21] = (h5 >> 16)& 0xff;
241 result[22] = (h5 >> 8)& 0xff; 238 result[22] = (h5 >> 8)& 0xff;
242 result[23] = h5 & 0xff; 239 result[23] = h5 & 0xff;
243 240
244 result[24] = (h6 >> 24)& 0xff; 241 result[24] = (h6 >> 24)& 0xff;
245 result[25] = (h6 >> 16)& 0xff; 242 result[25] = (h6 >> 16)& 0xff;
246 result[26] = (h6 >> 8)& 0xff; 243 result[26] = (h6 >> 8)& 0xff;
247 result[27] = h6 & 0xff; 244 result[27] = h6 & 0xff;
248 245
249 result[28] = (h7 >> 24)& 0xff; 246 result[28] = (h7 >> 24)& 0xff;
250 result[29] = (h7 >> 16)& 0xff; 247 result[29] = (h7 >> 16)& 0xff;
251 result[30] = (h7 >> 8)& 0xff; 248 result[30] = (h7 >> 8)& 0xff;
252 result[31] = h7 & 0xff; 249 result[31] = h7 & 0xff;
253 250
254//Clipperz.Profile.stop("Clipperz.Crypto.SHA.sha256_array"); 251//Clipperz.Profile.stop("Clipperz.Crypto.SHA.sha256_array");
255 return result; 252 return result;
256 }, 253 },
257 254
258 //----------------------------------------------------------------------------- 255 //-----------------------------------------------------------------------------
259 256
260 'sha256': function(aValue) { 257 'sha256': function(aValue) {
261//Clipperz.Profile.start("Clipperz.Crypto.SHA.sha256"); 258//Clipperz.Profile.start("Clipperz.Crypto.SHA.sha256");
262 var result; 259 var result;
263 var resultArray; 260 var resultArray;
264 varvalueArray; 261 varvalueArray;
265 262
266 valueArray = aValue.arrayValues(); 263 valueArray = aValue.arrayValues();
267 resultArray = Clipperz.Crypto.SHA.sha256_array(valueArray); 264 resultArray = Clipperz.Crypto.SHA.sha256_array(valueArray);
268 265
269 result = new Clipperz.ByteArray(resultArray); 266 result = new Clipperz.ByteArray(resultArray);
270 267
271//Clipperz.Profile.stop("Clipperz.Crypto.SHA.sha256"); 268//Clipperz.Profile.stop("Clipperz.Crypto.SHA.sha256");
272 return result; 269 return result;
273 }, 270 },
274 271
275 //----------------------------------------------------------------------------- 272 //-----------------------------------------------------------------------------
276 273
277 'sha_d256': function(aValue) { 274 'sha_d256': function(aValue) {
278//Clipperz.Profile.start("Clipperz.Crypto.SHA.sha_d256"); 275//Clipperz.Profile.start("Clipperz.Crypto.SHA.sha_d256");
279 var result; 276 var result;
280 var resultArray; 277 var resultArray;
281 varvalueArray; 278 varvalueArray;
282 279
283 valueArray = aValue.arrayValues(); 280 valueArray = aValue.arrayValues();
284 resultArray = Clipperz.Crypto.SHA.sha256_array(valueArray); 281 resultArray = Clipperz.Crypto.SHA.sha256_array(valueArray);
285 resultArray = Clipperz.Crypto.SHA.sha256_array(resultArray); 282 resultArray = Clipperz.Crypto.SHA.sha256_array(resultArray);
286 283
287 result = new Clipperz.ByteArray(resultArray); 284 result = new Clipperz.ByteArray(resultArray);
288 285
289//Clipperz.Profile.stop("Clipperz.Crypto.SHA.sha256"); 286//Clipperz.Profile.stop("Clipperz.Crypto.SHA.sha256");
290 return result; 287 return result;
291 }, 288 },
292 289
293 //----------------------------------------------------------------------------- 290 //-----------------------------------------------------------------------------
294 __syntaxFix__: "syntax fix" 291 __syntaxFix__: "syntax fix"
295 292
296}); 293});
diff --git a/frontend/beta/js/Clipperz/Crypto/SRP.js b/frontend/beta/js/Clipperz/Crypto/SRP.js
index 0eef6ec..3b25275 100644
--- a/frontend/beta/js/Clipperz/Crypto/SRP.js
+++ b/frontend/beta/js/Clipperz/Crypto/SRP.js
@@ -1,331 +1,328 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { 26try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) {
30 throw "Clipperz.Crypto.PRNG depends on Clipperz.ByteArray!"; 27 throw "Clipperz.Crypto.PRNG depends on Clipperz.ByteArray!";
31} 28}
32 29
33try { if (typeof(Clipperz.Crypto.BigInt) == 'undefined') { throw ""; }} catch (e) { 30try { if (typeof(Clipperz.Crypto.BigInt) == 'undefined') { throw ""; }} catch (e) {
34 throw "Clipperz.Crypto.SRP depends on Clipperz.Crypto.BigInt!"; 31 throw "Clipperz.Crypto.SRP depends on Clipperz.Crypto.BigInt!";
35} 32}
36 33
37try { if (typeof(Clipperz.Crypto.PRNG) == 'undefined') { throw ""; }} catch (e) { 34try { if (typeof(Clipperz.Crypto.PRNG) == 'undefined') { throw ""; }} catch (e) {
38 throw "Clipperz.Crypto.SRP depends on Clipperz.Crypto.PRNG!"; 35 throw "Clipperz.Crypto.SRP depends on Clipperz.Crypto.PRNG!";
39} 36}
40 37
41if (typeof(Clipperz.Crypto.SRP) == 'undefined') { Clipperz.Crypto.SRP = {}; } 38if (typeof(Clipperz.Crypto.SRP) == 'undefined') { Clipperz.Crypto.SRP = {}; }
42 39
43Clipperz.Crypto.SRP.VERSION = "0.1"; 40Clipperz.Crypto.SRP.VERSION = "0.1";
44Clipperz.Crypto.SRP.NAME = "Clipperz.Crypto.SRP"; 41Clipperz.Crypto.SRP.NAME = "Clipperz.Crypto.SRP";
45 42
46//############################################################################# 43//#############################################################################
47 44
48MochiKit.Base.update(Clipperz.Crypto.SRP, { 45MochiKit.Base.update(Clipperz.Crypto.SRP, {
49 46
50 '_n': null, 47 '_n': null,
51 '_g': null, 48 '_g': null,
52 //------------------------------------------------------------------------- 49 //-------------------------------------------------------------------------
53 50
54 'n': function() { 51 'n': function() {
55 if (Clipperz.Crypto.SRP._n == null) { 52 if (Clipperz.Crypto.SRP._n == null) {
56 Clipperz.Crypto.SRP._n = new Clipperz.Crypto.BigInt("115b8b692e0e045692cf280b436735c77a5a9e8a9e7ed56c965f87db5b2a2ece3", 16); 53 Clipperz.Crypto.SRP._n = new Clipperz.Crypto.BigInt("115b8b692e0e045692cf280b436735c77a5a9e8a9e7ed56c965f87db5b2a2ece3", 16);
57 } 54 }
58 55
59 return Clipperz.Crypto.SRP._n; 56 return Clipperz.Crypto.SRP._n;
60 }, 57 },
61 58
62 //------------------------------------------------------------------------- 59 //-------------------------------------------------------------------------
63 60
64 'g': function() { 61 'g': function() {
65 if (Clipperz.Crypto.SRP._g == null) { 62 if (Clipperz.Crypto.SRP._g == null) {
66 Clipperz.Crypto.SRP._g = new Clipperz.Crypto.BigInt(2); //eventually 5 (as suggested on the Diffi-Helmann documentation) 63 Clipperz.Crypto.SRP._g = new Clipperz.Crypto.BigInt(2); //eventually 5 (as suggested on the Diffi-Helmann documentation)
67 } 64 }
68 65
69 return Clipperz.Crypto.SRP._g; 66 return Clipperz.Crypto.SRP._g;
70 }, 67 },
71 68
72 //----------------------------------------------------------------------------- 69 //-----------------------------------------------------------------------------
73 70
74 'exception': { 71 'exception': {
75 'InvalidValue': new MochiKit.Base.NamedError("Clipperz.Crypto.SRP.exception.InvalidValue") 72 'InvalidValue': new MochiKit.Base.NamedError("Clipperz.Crypto.SRP.exception.InvalidValue")
76 }, 73 },
77 74
78 //------------------------------------------------------------------------- 75 //-------------------------------------------------------------------------
79 __syntaxFix__: "syntax fix" 76 __syntaxFix__: "syntax fix"
80 77
81}); 78});
82 79
83//############################################################################# 80//#############################################################################
84// 81//
85 // S R P C o n n e c t i o n version 1.0 82 // S R P C o n n e c t i o n version 1.0
86// 83//
87//============================================================================= 84//=============================================================================
88Clipperz.Crypto.SRP.Connection = function (args) { 85Clipperz.Crypto.SRP.Connection = function (args) {
89 args = args || {}; 86 args = args || {};
90 87
91 this._C = args.C; 88 this._C = args.C;
92 this._P = args.P; 89 this._P = args.P;
93 this.hash = args.hash; 90 this.hash = args.hash;
94 91
95 this._a = null; 92 this._a = null;
96 this._A = null; 93 this._A = null;
97 94
98 this._s = null; 95 this._s = null;
99 this._B = null; 96 this._B = null;
100 97
101 this._x = null; 98 this._x = null;
102 99
103 this._u = null; 100 this._u = null;
104 this._K = null; 101 this._K = null;
105 this._M1 = null; 102 this._M1 = null;
106 this._M2 = null; 103 this._M2 = null;
107 104
108 this._sessionKey = null; 105 this._sessionKey = null;
109 106
110 return this; 107 return this;
111} 108}
112 109
113Clipperz.Crypto.SRP.Connection.prototype = MochiKit.Base.update(null, { 110Clipperz.Crypto.SRP.Connection.prototype = MochiKit.Base.update(null, {
114 111
115 'toString': function () { 112 'toString': function () {
116 return "Clipperz.Crypto.SRP.Connection (username: " + this.username() + "). Status: " + this.statusDescription(); 113 return "Clipperz.Crypto.SRP.Connection (username: " + this.username() + "). Status: " + this.statusDescription();
117 }, 114 },
118 115
119 //------------------------------------------------------------------------- 116 //-------------------------------------------------------------------------
120 117
121 'C': function () { 118 'C': function () {
122 return this._C; 119 return this._C;
123 }, 120 },
124 121
125 //------------------------------------------------------------------------- 122 //-------------------------------------------------------------------------
126 123
127 'P': function () { 124 'P': function () {
128 return this._P; 125 return this._P;
129 }, 126 },
130 127
131 //------------------------------------------------------------------------- 128 //-------------------------------------------------------------------------
132 129
133 'a': function () { 130 'a': function () {
134 if (this._a == null) { 131 if (this._a == null) {
135 this._a = new Clipperz.Crypto.BigInt(Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32).toHexString().substring(2), 16); 132 this._a = new Clipperz.Crypto.BigInt(Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32).toHexString().substring(2), 16);
136 // this._a = new Clipperz.Crypto.BigInt("37532428169486597638072888476611365392249575518156687476805936694442691012367", 10); 133 // this._a = new Clipperz.Crypto.BigInt("37532428169486597638072888476611365392249575518156687476805936694442691012367", 10);
137//MochiKit.Logging.logDebug("SRP a: " + this._a); 134//MochiKit.Logging.logDebug("SRP a: " + this._a);
138 } 135 }
139 136
140 return this._a; 137 return this._a;
141 }, 138 },
142 139
143 //------------------------------------------------------------------------- 140 //-------------------------------------------------------------------------
144 141
145 'A': function () { 142 'A': function () {
146 if (this._A == null) { 143 if (this._A == null) {
147 //Warning: this value should be strictly greater than zero: how should we perform this check? 144 //Warning: this value should be strictly greater than zero: how should we perform this check?
148 this._A = Clipperz.Crypto.SRP.g().powerModule(this.a(), Clipperz.Crypto.SRP.n()); 145 this._A = Clipperz.Crypto.SRP.g().powerModule(this.a(), Clipperz.Crypto.SRP.n());
149 146
150 if (this._A.equals(0)) { 147 if (this._A.equals(0)) {
151MochiKit.Logging.logError("Clipperz.Crypto.SRP.Connection: trying to set 'A' to 0."); 148MochiKit.Logging.logError("Clipperz.Crypto.SRP.Connection: trying to set 'A' to 0.");
152 throw Clipperz.Crypto.SRP.exception.InvalidValue; 149 throw Clipperz.Crypto.SRP.exception.InvalidValue;
153 } 150 }
154//MochiKit.Logging.logDebug("SRP A: " + this._A); 151//MochiKit.Logging.logDebug("SRP A: " + this._A);
155 } 152 }
156 153
157 return this._A; 154 return this._A;
158 }, 155 },
159 156
160 //------------------------------------------------------------------------- 157 //-------------------------------------------------------------------------
161 158
162 's': function () { 159 's': function () {
163 return this._s; 160 return this._s;
164//MochiKit.Logging.logDebug("SRP s: " + this._S); 161//MochiKit.Logging.logDebug("SRP s: " + this._S);
165 }, 162 },
166 163
167 'set_s': function(aValue) { 164 'set_s': function(aValue) {
168 this._s = aValue; 165 this._s = aValue;
169 }, 166 },
170 167
171 //------------------------------------------------------------------------- 168 //-------------------------------------------------------------------------
172 169
173 'B': function () { 170 'B': function () {
174 return this._B; 171 return this._B;
175 }, 172 },
176 173
177 'set_B': function(aValue) { 174 'set_B': function(aValue) {
178 //Warning: this value should be strictly greater than zero: how should we perform this check? 175 //Warning: this value should be strictly greater than zero: how should we perform this check?
179 if (! aValue.equals(0)) { 176 if (! aValue.equals(0)) {
180 this._B = aValue; 177 this._B = aValue;
181//MochiKit.Logging.logDebug("SRP B: " + this._B); 178//MochiKit.Logging.logDebug("SRP B: " + this._B);
182 } else { 179 } else {
183MochiKit.Logging.logError("Clipperz.Crypto.SRP.Connection: trying to set 'B' to 0."); 180MochiKit.Logging.logError("Clipperz.Crypto.SRP.Connection: trying to set 'B' to 0.");
184 throw Clipperz.Crypto.SRP.exception.InvalidValue; 181 throw Clipperz.Crypto.SRP.exception.InvalidValue;
185 } 182 }
186 }, 183 },
187 184
188 //------------------------------------------------------------------------- 185 //-------------------------------------------------------------------------
189 186
190 'x': function () { 187 'x': function () {
191 if (this._x == null) { 188 if (this._x == null) {
192 this._x = new Clipperz.Crypto.BigInt(this.stringHash(this.s().asString(16, 64) + this.P()), 16); 189 this._x = new Clipperz.Crypto.BigInt(this.stringHash(this.s().asString(16, 64) + this.P()), 16);
193//MochiKit.Logging.logDebug("SRP x: " + this._x); 190//MochiKit.Logging.logDebug("SRP x: " + this._x);
194 } 191 }
195 192
196 return this._x; 193 return this._x;
197 }, 194 },
198 195
199 //------------------------------------------------------------------------- 196 //-------------------------------------------------------------------------
200 197
201 'u': function () { 198 'u': function () {
202 if (this._u == null) { 199 if (this._u == null) {
203 this._u = new Clipperz.Crypto.BigInt(this.stringHash(this.B().asString()), 16); 200 this._u = new Clipperz.Crypto.BigInt(this.stringHash(this.B().asString()), 16);
204//MochiKit.Logging.logDebug("SRP u: " + this._u); 201//MochiKit.Logging.logDebug("SRP u: " + this._u);
205 } 202 }
206 203
207 return this._u; 204 return this._u;
208 }, 205 },
209 206
210 //------------------------------------------------------------------------- 207 //-------------------------------------------------------------------------
211 208
212 'S': function () { 209 'S': function () {
213 if (this._S == null) { 210 if (this._S == null) {
214 var bigint; 211 var bigint;
215 varsrp; 212 varsrp;
216 213
217 bigint = Clipperz.Crypto.BigInt; 214 bigint = Clipperz.Crypto.BigInt;
218 srp = Clipperz.Crypto.SRP; 215 srp = Clipperz.Crypto.SRP;
219 216
220 this._S =bigint.powerModule( 217 this._S =bigint.powerModule(
221 bigint.subtract(this.B(), bigint.powerModule(srp.g(), this.x(), srp.n())), 218 bigint.subtract(this.B(), bigint.powerModule(srp.g(), this.x(), srp.n())),
222 bigint.add(this.a(), bigint.multiply(this.u(), this.x())), 219 bigint.add(this.a(), bigint.multiply(this.u(), this.x())),
223 srp.n() 220 srp.n()
224 ) 221 )
225//MochiKit.Logging.logDebug("SRP S: " + this._S); 222//MochiKit.Logging.logDebug("SRP S: " + this._S);
226 } 223 }
227 224
228 return this._S; 225 return this._S;
229 }, 226 },
230 227
231 //------------------------------------------------------------------------- 228 //-------------------------------------------------------------------------
232 229
233 'K': function () { 230 'K': function () {
234 if (this._K == null) { 231 if (this._K == null) {
235 this._K = this.stringHash(this.S().asString()); 232 this._K = this.stringHash(this.S().asString());
236//MochiKit.Logging.logDebug("SRP K: " + this._K); 233//MochiKit.Logging.logDebug("SRP K: " + this._K);
237 } 234 }
238 235
239 return this._K; 236 return this._K;
240 }, 237 },
241 238
242 //------------------------------------------------------------------------- 239 //-------------------------------------------------------------------------
243 240
244 'M1': function () { 241 'M1': function () {
245 if (this._M1 == null) { 242 if (this._M1 == null) {
246 this._M1 = this.stringHash(this.A().asString(10) + this.B().asString(10) + this.K()); 243 this._M1 = this.stringHash(this.A().asString(10) + this.B().asString(10) + this.K());
247//MochiKit.Logging.logDebug("SRP M1: " + this._M1); 244//MochiKit.Logging.logDebug("SRP M1: " + this._M1);
248 } 245 }
249 246
250 return this._M1; 247 return this._M1;
251 }, 248 },
252 249
253 //------------------------------------------------------------------------- 250 //-------------------------------------------------------------------------
254 251
255 'M2': function () { 252 'M2': function () {
256 if (this._M2 == null) { 253 if (this._M2 == null) {
257 this._M2 = this.stringHash(this.A().asString(10) + this.M1() + this.K()); 254 this._M2 = this.stringHash(this.A().asString(10) + this.M1() + this.K());
258//MochiKit.Logging.logDebug("SRP M2: " + this._M2); 255//MochiKit.Logging.logDebug("SRP M2: " + this._M2);
259 } 256 }
260 257
261 return this._M2; 258 return this._M2;
262 }, 259 },
263 260
264 //========================================================================= 261 //=========================================================================
265 262
266 'serverSideCredentialsWithSalt': function(aSalt) { 263 'serverSideCredentialsWithSalt': function(aSalt) {
267 var result; 264 var result;
268 var s, x, v; 265 var s, x, v;
269 266
270 s = aSalt; 267 s = aSalt;
271 x = this.stringHash(s + this.P()); 268 x = this.stringHash(s + this.P());
272 v = Clipperz.Crypto.SRP.g().powerModule(new Clipperz.Crypto.BigInt(x, 16), Clipperz.Crypto.SRP.n()); 269 v = Clipperz.Crypto.SRP.g().powerModule(new Clipperz.Crypto.BigInt(x, 16), Clipperz.Crypto.SRP.n());
273 270
274 result = {}; 271 result = {};
275 result['C'] = this.C(); 272 result['C'] = this.C();
276 result['s'] = s; 273 result['s'] = s;
277 result['v'] = v.asString(16); 274 result['v'] = v.asString(16);
278 275
279 return result; 276 return result;
280 }, 277 },
281 278
282 'serverSideCredentials': function() { 279 'serverSideCredentials': function() {
283 var result; 280 var result;
284 var s; 281 var s;
285 282
286 s = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32).toHexString().substring(2); 283 s = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32).toHexString().substring(2);
287 284
288 result = this.serverSideCredentialsWithSalt(s); 285 result = this.serverSideCredentialsWithSalt(s);
289 286
290 return result; 287 return result;
291 }, 288 },
292 289
293 //========================================================================= 290 //=========================================================================
294/* 291/*
295 'computeServerSide_S': function(b) { 292 'computeServerSide_S': function(b) {
296 var result; 293 var result;
297 var v; 294 var v;
298 var bigint; 295 var bigint;
299 varsrp; 296 varsrp;
300 297
301 bigint = Clipperz.Crypto.BigInt; 298 bigint = Clipperz.Crypto.BigInt;
302 srp = Clipperz.Crypto.SRP; 299 srp = Clipperz.Crypto.SRP;
303 300
304 v = new Clipperz.Crypto.BigInt(srpConnection.serverSideCredentialsWithSalt(this.s().asString(16, 64)).v, 16); 301 v = new Clipperz.Crypto.BigInt(srpConnection.serverSideCredentialsWithSalt(this.s().asString(16, 64)).v, 16);
305 // _S = (this.A().multiply(this.v().modPow(this.u(), this.n()))).modPow(this.b(), this.n()); 302 // _S = (this.A().multiply(this.v().modPow(this.u(), this.n()))).modPow(this.b(), this.n());
306 result = bigint.powerModule( 303 result = bigint.powerModule(
307 bigint.multiply( 304 bigint.multiply(
308 this.A(), 305 this.A(),
309 bigint.powerModule(v, this.u(), srp.n()) 306 bigint.powerModule(v, this.u(), srp.n())
310 ), new Clipperz.Crypto.BigInt(b, 10), srp.n() 307 ), new Clipperz.Crypto.BigInt(b, 10), srp.n()
311 ); 308 );
312 309
313 return result; 310 return result;
314 }, 311 },
315*/ 312*/
316 //========================================================================= 313 //=========================================================================
317 314
318 'stringHash': function(aValue) { 315 'stringHash': function(aValue) {
319 varresult; 316 varresult;
320 317
321 result = this.hash(new Clipperz.ByteArray(aValue)).toHexString().substring(2); 318 result = this.hash(new Clipperz.ByteArray(aValue)).toHexString().substring(2);
322 319
323 return result; 320 return result;
324 }, 321 },
325 322
326 //========================================================================= 323 //=========================================================================
327 __syntaxFix__: "syntax fix" 324 __syntaxFix__: "syntax fix"
328 325
329}); 326});
330 327
331//############################################################################# 328//#############################################################################
diff --git a/frontend/beta/js/Clipperz/DOM.js b/frontend/beta/js/Clipperz/DOM.js
index 7c27359..7e230bc 100644
--- a/frontend/beta/js/Clipperz/DOM.js
+++ b/frontend/beta/js/Clipperz/DOM.js
@@ -1,131 +1,128 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.DOM) == 'undefined') { Clipperz.DOM = {}; } 27if (typeof(Clipperz.DOM) == 'undefined') { Clipperz.DOM = {}; }
31 28
32Clipperz.DOM.VERSION = "0.1"; 29Clipperz.DOM.VERSION = "0.1";
33Clipperz.DOM.NAME = "Clipperz.DOM"; 30Clipperz.DOM.NAME = "Clipperz.DOM";
34 31
35MochiKit.Base.update(Clipperz.DOM, { 32MochiKit.Base.update(Clipperz.DOM, {
36 33
37 //------------------------------------------------------------------------- 34 //-------------------------------------------------------------------------
38 35
39 '__repr__': function () { 36 '__repr__': function () {
40 return "[" + this.NAME + " " + this.VERSION + "]"; 37 return "[" + this.NAME + " " + this.VERSION + "]";
41 }, 38 },
42 39
43 //------------------------------------------------------------------------- 40 //-------------------------------------------------------------------------
44 41
45 'toString': function () { 42 'toString': function () {
46 return this.__repr__(); 43 return this.__repr__();
47 }, 44 },
48 45
49 //------------------------------------------------------------------------- 46 //-------------------------------------------------------------------------
50 47
51 'selectOptionMatchingValue': function (aSelectElement, aValue, shouldUseCaseInsensitiveTest) { 48 'selectOptionMatchingValue': function (aSelectElement, aValue, shouldUseCaseInsensitiveTest) {
52 var selectedOptionIndex; 49 var selectedOptionIndex;
53 var i, c; 50 var i, c;
54 51
55 selectedOptionIndex = -1; 52 selectedOptionIndex = -1;
56 53
57 c = aSelectElement.options.length; 54 c = aSelectElement.options.length;
58 for (i=0; (i<c) && (selectedOptionIndex == -1); i++) { 55 for (i=0; (i<c) && (selectedOptionIndex == -1); i++) {
59 if (shouldUseCaseInsensitiveTest == true) { 56 if (shouldUseCaseInsensitiveTest == true) {
60 if (aSelectElement.options[i].value.toLowerCase() == aValue.toLowerCase()) { 57 if (aSelectElement.options[i].value.toLowerCase() == aValue.toLowerCase()) {
61 selectedOptionIndex = i; 58 selectedOptionIndex = i;
62 } 59 }
63 } else { 60 } else {
64 if (aSelectElement.options[i].value == aValue) { 61 if (aSelectElement.options[i].value == aValue) {
65 selectedOptionIndex = i; 62 selectedOptionIndex = i;
66 } 63 }
67 } 64 }
68 } 65 }
69 66
70 if (selectedOptionIndex != -1) { 67 if (selectedOptionIndex != -1) {
71 aSelectElement.selectedIndex = selectedOptionIndex; 68 aSelectElement.selectedIndex = selectedOptionIndex;
72 } 69 }
73 }, 70 },
74 71
75 //------------------------------------------------------------------------- 72 //-------------------------------------------------------------------------
76 73
77 'setFormContents': function(aNode, someValues) { 74 'setFormContents': function(aNode, someValues) {
78 var node; 75 var node;
79 var values; 76 var values;
80 var i, c; 77 var i, c;
81 78
82 values = {}; 79 values = {};
83 c = someValues[0].length; 80 c = someValues[0].length;
84 for (i=0; i<c; i++) { 81 for (i=0; i<c; i++) {
85 values[someValues[0][i]] = someValues[1][i]; 82 values[someValues[0][i]] = someValues[1][i];
86 } 83 }
87 84
88 // var m = MochiKit.Base; 85 // var m = MochiKit.Base;
89 // var self = MochiKit.DOM; 86 // var self = MochiKit.DOM;
90 if (typeof(aNode) == "undefined" || aNode === null) { 87 if (typeof(aNode) == "undefined" || aNode === null) {
91 node = MochiKit.DOM._document.body; 88 node = MochiKit.DOM._document.body;
92 } else { 89 } else {
93 node = MochiKit.DOM.getElement(aNode); 90 node = MochiKit.DOM.getElement(aNode);
94 } 91 }
95 92
96 MochiKit.Base.nodeWalk(node, function(aNode) { 93 MochiKit.Base.nodeWalk(node, function(aNode) {
97 var result; 94 var result;
98 var name; 95 var name;
99 96
100 result = null; 97 result = null;
101 name = aNode.name; 98 name = aNode.name;
102 if (MochiKit.Base.isNotEmpty(name) && (typeof(values[name]) != 'undefined')) { 99 if (MochiKit.Base.isNotEmpty(name) && (typeof(values[name]) != 'undefined')) {
103 var tagName; 100 var tagName;
104 101
105 tagName = aNode.tagName.toUpperCase(); 102 tagName = aNode.tagName.toUpperCase();
106 if (tagName === "INPUT" && (aNode.type == "radio" || aNode.type == "checkbox")) { 103 if (tagName === "INPUT" && (aNode.type == "radio" || aNode.type == "checkbox")) {
107 aNode.checked = values[name]; 104 aNode.checked = values[name];
108 } else if (tagName === "SELECT") { 105 } else if (tagName === "SELECT") {
109 if (aNode.type == "select-one") { 106 if (aNode.type == "select-one") {
110 Clipperz.DOM.selectOptionMatchingValue(aNode, values[name]); 107 Clipperz.DOM.selectOptionMatchingValue(aNode, values[name]);
111 } else { //aNode.type == "select-multiple" 108 } else { //aNode.type == "select-multiple"
112MochiKit.Logging.logWarning("### unhandled Select.type = 'select-multiple' condition"); 109MochiKit.Logging.logWarning("### unhandled Select.type = 'select-multiple' condition");
113 } 110 }
114 } else if (tagName === "FORM" || tagName === "P" || tagName === "SPAN" || tagName === "DIV") { 111 } else if (tagName === "FORM" || tagName === "P" || tagName === "SPAN" || tagName === "DIV") {
115 result = aNode.childNodes; 112 result = aNode.childNodes;
116 } else { 113 } else {
117 aNode.value = values[name] 114 aNode.value = values[name]
118 } 115 }
119 } else { 116 } else {
120 result = aNode.childNodes; 117 result = aNode.childNodes;
121 } 118 }
122 119
123 return result; 120 return result;
124 }); 121 });
125 }, 122 },
126 123
127 //------------------------------------------------------------------------- 124 //-------------------------------------------------------------------------
128 __syntaxFix__: "syntax fix" 125 __syntaxFix__: "syntax fix"
129 126
130}); 127});
131 128
diff --git a/frontend/beta/js/Clipperz/Date.js b/frontend/beta/js/Clipperz/Date.js
index 4103b88..020d77b 100644
--- a/frontend/beta/js/Clipperz/Date.js
+++ b/frontend/beta/js/Clipperz/Date.js
@@ -1,305 +1,302 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.Date) == 'undefined') { Clipperz.Date = {}; } 27if (typeof(Clipperz.Date) == 'undefined') { Clipperz.Date = {}; }
31 28
32Clipperz.Date.VERSION = "0.1"; 29Clipperz.Date.VERSION = "0.1";
33Clipperz.Date.NAME = "Clipperz.Date"; 30Clipperz.Date.NAME = "Clipperz.Date";
34 31
35MochiKit.Base.update(Clipperz.Date, { 32MochiKit.Base.update(Clipperz.Date, {
36 33
37 //------------------------------------------------------------------------- 34 //-------------------------------------------------------------------------
38 35
39 '__repr__': function () { 36 '__repr__': function () {
40 return "[" + this.NAME + " " + this.VERSION + "]"; 37 return "[" + this.NAME + " " + this.VERSION + "]";
41 }, 38 },
42 39
43 //------------------------------------------------------------------------- 40 //-------------------------------------------------------------------------
44 41
45 'toString': function () { 42 'toString': function () {
46 return this.__repr__(); 43 return this.__repr__();
47 }, 44 },
48 45
49 //------------------------------------------------------------------------- 46 //-------------------------------------------------------------------------
50 47
51 'daysInMonth': [31,28,31,30,31,30,31,31,30,31,30,31], 48 'daysInMonth': [31,28,31,30,31,30,31,31,30,31,30,31],
52 49
53 //------------------------------------------------------------------------- 50 //-------------------------------------------------------------------------
54 51
55 'englishOrdinalDaySuffixForDate': function(aDate) { 52 'englishOrdinalDaySuffixForDate': function(aDate) {
56 var result; 53 var result;
57 54
58 switch (aDate.getDate()) { 55 switch (aDate.getDate()) {
59 case 1: 56 case 1:
60 case 21: 57 case 21:
61 case 31: 58 case 31:
62 result = "st"; 59 result = "st";
63 break; 60 break;
64 case 2: 61 case 2:
65 case 22: 62 case 22:
66 result = "nd"; 63 result = "nd";
67 break; 64 break;
68 case 3: 65 case 3:
69 case 23: 66 case 23:
70 result = "rd"; 67 result = "rd";
71 break; 68 break;
72 default: 69 default:
73 result = "th"; 70 result = "th";
74 break; 71 break;
75 } 72 }
76 73
77 return result; 74 return result;
78 }, 75 },
79 76
80 //------------------------------------------------------------------------- 77 //-------------------------------------------------------------------------
81 78
82 'isLeapYear': function(aDate) { 79 'isLeapYear': function(aDate) {
83 var year; 80 var year;
84 var result; 81 var result;
85 82
86 year = aDate.getFullYear(); 83 year = aDate.getFullYear();
87 result = ((year & 0x03) == 0 && (year % 100 || (year % 400 == 0 && year))); 84 result = ((year & 0x03) == 0 && (year % 100 || (year % 400 == 0 && year)));
88 85
89 return result; 86 return result;
90 }, 87 },
91 88
92 //------------------------------------------------------------------------- 89 //-------------------------------------------------------------------------
93 90
94 'getDaysInMonth': function(aDate) { 91 'getDaysInMonth': function(aDate) {
95 var result; 92 var result;
96 93
97 if (aDate.getMonth() == 1) { 94 if (aDate.getMonth() == 1) {
98 Clipperz.Date.isLeapYear(aDate) 95 Clipperz.Date.isLeapYear(aDate)
99 result += Clipperz.Date.isLeapYear(aDate) ? 29 : 28; 96 result += Clipperz.Date.isLeapYear(aDate) ? 29 : 28;
100 } else { 97 } else {
101 result = Clipperz.Date.daysInMonth[aDate.getMonth()]; 98 result = Clipperz.Date.daysInMonth[aDate.getMonth()];
102 } 99 }
103 100
104 return result; 101 return result;
105 }, 102 },
106 103
107 //------------------------------------------------------------------------- 104 //-------------------------------------------------------------------------
108 105
109 'getTimezone': function(aDate) { 106 'getTimezone': function(aDate) {
110 var result; 107 var result;
111 108
112 result = aDate.toString(); 109 result = aDate.toString();
113 result = result.replace(/([A-Z]{3}) [0-9]{4}/, '$1'); 110 result = result.replace(/([A-Z]{3}) [0-9]{4}/, '$1');
114 result = result.replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/, "$1$2$3"); 111 result = result.replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/, "$1$2$3");
115 112
116 return result; 113 return result;
117 }, 114 },
118 115
119 'getGMTOffset': function(aDate) { 116 'getGMTOffset': function(aDate) {
120 return (aDate.getTimezoneOffset() > 0 ? "-" : "+")+ MochiKit.Format.numberFormatter('00')(Math.floor(this.getTimezoneOffset() / 60)) 117 return (aDate.getTimezoneOffset() > 0 ? "-" : "+")+ MochiKit.Format.numberFormatter('00')(Math.floor(this.getTimezoneOffset() / 60))
121 + MochiKit.Format.numberFormatter('00')(this.getTimezoneOffset() % 60); 118 + MochiKit.Format.numberFormatter('00')(this.getTimezoneOffset() % 60);
122 }, 119 },
123 120
124 //------------------------------------------------------------------------- 121 //-------------------------------------------------------------------------
125 122
126 'dayOfYear': function(aDate) { 123 'dayOfYear': function(aDate) {
127 var result; 124 var result;
128 var i,c; 125 var i,c;
129 126
130 result = 0; 127 result = 0;
131 c = aDate.getMonth(); 128 c = aDate.getMonth();
132 for (i=0; i<c; i++) { 129 for (i=0; i<c; i++) {
133 if (i == 1) { 130 if (i == 1) {
134 result += Clipperz.Date.isLeapYear(aDate) ? 29 : 28; 131 result += Clipperz.Date.isLeapYear(aDate) ? 29 : 28;
135 } else { 132 } else {
136 result += Clipperz.Date.daysInMonth[i]; 133 result += Clipperz.Date.daysInMonth[i];
137 } 134 }
138 } 135 }
139 return num + this.getDate() - 1; 136 return num + this.getDate() - 1;
140 }, 137 },
141 138
142 //------------------------------------------------------------------------- 139 //-------------------------------------------------------------------------
143 140
144 'getPHPLikeFormatCode': function(aCharacter) { 141 'getPHPLikeFormatCode': function(aCharacter) {
145 var result; 142 var result;
146 143
147 switch (aCharacter) { 144 switch (aCharacter) {
148 case "d": 145 case "d":
149 result = " + MochiKit.Format.numberFormatter('00')(aDate.getDate())"; 146 result = " + MochiKit.Format.numberFormatter('00')(aDate.getDate())";
150 break; 147 break;
151 case "D": 148 case "D":
152 result = " + aLocale['shortDays'][aDate.getDay()]"; 149 result = " + aLocale['shortDays'][aDate.getDay()]";
153 break; 150 break;
154 case "j": 151 case "j":
155 result = " + aDate.getDate()"; 152 result = " + aDate.getDate()";
156 break; 153 break;
157 case "l": 154 case "l":
158 result = " + aLocale['days'][aDate.getDay()]"; 155 result = " + aLocale['days'][aDate.getDay()]";
159 break; 156 break;
160 case "S": 157 case "S":
161 result = " + Clipperz.Date.englishOrdinalDaySuffixForDate(aDate)"; 158 result = " + Clipperz.Date.englishOrdinalDaySuffixForDate(aDate)";
162 break; 159 break;
163 case "w": 160 case "w":
164 result = " + aDate.getDay()"; 161 result = " + aDate.getDay()";
165 break; 162 break;
166 case "z": 163 case "z":
167 result = " + aDate.getDayOfYear()"; 164 result = " + aDate.getDayOfYear()";
168 break; 165 break;
169 case "W": 166 case "W":
170 result = " + aDate.getWeekOfYear()"; 167 result = " + aDate.getWeekOfYear()";
171 break; 168 break;
172 case "F": 169 case "F":
173 result = " + aLocale['months'][aDate.getMonth()]"; 170 result = " + aLocale['months'][aDate.getMonth()]";
174 break; 171 break;
175 case "m": 172 case "m":
176 result = " + MochiKit.Format.numberFormatter('00')(aDate.getMonth() + 1)"; 173 result = " + MochiKit.Format.numberFormatter('00')(aDate.getMonth() + 1)";
177 break; 174 break;
178 case "M": 175 case "M":
179 result = " + aLocale['shortMonths'][aDate.getMonth()]"; 176 result = " + aLocale['shortMonths'][aDate.getMonth()]";
180 break; 177 break;
181 case "n": 178 case "n":
182 result = " + (aDate.getMonth() + 1)"; 179 result = " + (aDate.getMonth() + 1)";
183 break; 180 break;
184 case "t": 181 case "t":
185 result = " + Clipperz.Date.getDaysInMonth(aDate)"; 182 result = " + Clipperz.Date.getDaysInMonth(aDate)";
186 break; 183 break;
187 case "L": 184 case "L":
188 result = " + (Clipperz.Date.isLeapYear(aDate) ? 1 : 0)"; 185 result = " + (Clipperz.Date.isLeapYear(aDate) ? 1 : 0)";
189 break; 186 break;
190 case "Y": 187 case "Y":
191 result = " + aDate.getFullYear()"; 188 result = " + aDate.getFullYear()";
192 break; 189 break;
193 case "y": 190 case "y":
194 result = " + ('' + aDate.getFullYear()).substring(2, 4)"; 191 result = " + ('' + aDate.getFullYear()).substring(2, 4)";
195 break; 192 break;
196 case "a": 193 case "a":
197 result = " + (aDate.getHours() < 12 ? aLocale['amDesignation'] : aLocale['pmDesignation'])"; 194 result = " + (aDate.getHours() < 12 ? aLocale['amDesignation'] : aLocale['pmDesignation'])";
198 break; 195 break;
199 case "A": 196 case "A":
200 result = " + (aDate.getHours() < 12 ? aLocale['amDesignation'].toUpperCase() : aLocale['pmDesignation'].toUpperCase())"; 197 result = " + (aDate.getHours() < 12 ? aLocale['amDesignation'].toUpperCase() : aLocale['pmDesignation'].toUpperCase())";
201 break; 198 break;
202 case "g": 199 case "g":
203 result = " + ((aDate.getHours() %12) ? aDate.getHours() % 12 : 12)"; 200 result = " + ((aDate.getHours() %12) ? aDate.getHours() % 12 : 12)";
204 break; 201 break;
205 case "G": 202 case "G":
206 result = " + aDate.getHours()"; 203 result = " + aDate.getHours()";
207 break; 204 break;
208 case "h": 205 case "h":
209 result = " + MochiKit.Format.numberFormatter('00')((aDate.getHours() %12) ? aDate.getHours() % 12 : 12)"; 206 result = " + MochiKit.Format.numberFormatter('00')((aDate.getHours() %12) ? aDate.getHours() % 12 : 12)";
210 break; 207 break;
211 case "H": 208 case "H":
212 result = " + MochiKit.Format.numberFormatter('00')(aDate.getHours())"; 209 result = " + MochiKit.Format.numberFormatter('00')(aDate.getHours())";
213 break; 210 break;
214 case "i": 211 case "i":
215 result = " + MochiKit.Format.numberFormatter('00')(aDate.getMinutes())"; 212 result = " + MochiKit.Format.numberFormatter('00')(aDate.getMinutes())";
216 break; 213 break;
217 case "s": 214 case "s":
218 result = " + MochiKit.Format.numberFormatter('00')(aDate.getSeconds())"; 215 result = " + MochiKit.Format.numberFormatter('00')(aDate.getSeconds())";
219 break; 216 break;
220 case "O": 217 case "O":
221 result = " + aDate.getGMTOffset()"; 218 result = " + aDate.getGMTOffset()";
222 break; 219 break;
223 case "T": 220 case "T":
224 result = " + Clipperz.Date.getTimezone(aDate)"; 221 result = " + Clipperz.Date.getTimezone(aDate)";
225 break; 222 break;
226 case "Z": 223 case "Z":
227 result = " + ( + aDate.getTimezoneOffset() * -60)"; 224 result = " + ( + aDate.getTimezoneOffset() * -60)";
228 break; 225 break;
229 default: 226 default:
230 result = " + '" + aCharacter + "'"; 227 result = " + '" + aCharacter + "'";
231 break; 228 break;
232 }; 229 };
233 230
234 return result; 231 return result;
235 }, 232 },
236 233
237 //========================================================================= 234 //=========================================================================
238 235
239 'formatDateWithPHPLikeTemplateAndLocale': function(aDate, aFormat, aLocale) { 236 'formatDateWithPHPLikeTemplateAndLocale': function(aDate, aFormat, aLocale) {
240 var result; 237 var result;
241 var formatterCode; 238 var formatterCode;
242 var formatter; 239 var formatter;
243 var i,c; 240 var i,c;
244 241
245//MochiKit.Logging.logDebug(">>> Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale"); 242//MochiKit.Logging.logDebug(">>> Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale");
246 formatterCode = "Clipperz.Date.__scratchFormatter = function(aDate, aLocale){return ''"; 243 formatterCode = "Clipperz.Date.__scratchFormatter = function(aDate, aLocale){return ''";
247 244
248 c = aFormat.length; 245 c = aFormat.length;
249 i = 0; 246 i = 0;
250 247
251 while (i<c) { 248 while (i<c) {
252 var character; 249 var character;
253 250
254 character = aFormat.charAt(i); 251 character = aFormat.charAt(i);
255 if (character == "\\") { 252 if (character == "\\") {
256 i++; 253 i++;
257 character = aFormat.charAt(i); 254 character = aFormat.charAt(i);
258 formatterCode += " + '" + character + "'" 255 formatterCode += " + '" + character + "'"
259 } else { 256 } else {
260 formatterCode += Clipperz.Date.getPHPLikeFormatCode(character); 257 formatterCode += Clipperz.Date.getPHPLikeFormatCode(character);
261 } 258 }
262 259
263 i++; 260 i++;
264 } 261 }
265 262
266 formatterCode += ";}"; 263 formatterCode += ";}";
267//MochiKit.Logging.logDebug("--- Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale - formatterCode: " + formatterCode); 264//MochiKit.Logging.logDebug("--- Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale - formatterCode: " + formatterCode);
268 eval(formatterCode); 265 eval(formatterCode);
269 266
270 result = Clipperz.Date.__scratchFormatter.call(this, aDate, aLocale); 267 result = Clipperz.Date.__scratchFormatter.call(this, aDate, aLocale);
271 delete Clipperz.Date.__scratchFormatter; 268 delete Clipperz.Date.__scratchFormatter;
272//MochiKit.Logging.logDebug("<<< Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale"); 269//MochiKit.Logging.logDebug("<<< Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale");
273 270
274 return result; 271 return result;
275 }, 272 },
276 273
277 //------------------------------------------------------------------------- 274 //-------------------------------------------------------------------------
278 275
279 'parseDateWithPHPLikeTemplateAndLocale': function(aString, aFormat, aLocale) { 276 'parseDateWithPHPLikeTemplateAndLocale': function(aString, aFormat, aLocale) {
280 return new Date(); 277 return new Date();
281 }, 278 },
282 279
283 //========================================================================= 280 //=========================================================================
284 281
285 'formatDateWithUTCFormatAndLocale': function(aDate, aLocale) { 282 'formatDateWithUTCFormatAndLocale': function(aDate, aLocale) {
286 // return Clipperz.Date.formatWithJavaLikeTemplateAndLocale(aDate, "EEE, dd MMMM yyyy HH:mm:ss zzz", aLocale); 283 // return Clipperz.Date.formatWithJavaLikeTemplateAndLocale(aDate, "EEE, dd MMMM yyyy HH:mm:ss zzz", aLocale);
287 return aDate.toString(); 284 return aDate.toString();
288 }, 285 },
289 286
290 'parseDateWithUTCFormatAndLocale': function(aValue, aLocale) { 287 'parseDateWithUTCFormatAndLocale': function(aValue, aLocale) {
291 return new Date(Date.parse(aValue)); 288 return new Date(Date.parse(aValue));
292 }, 289 },
293 290
294 //========================================================================= 291 //=========================================================================
295 292
296 'exception': { 293 'exception': {
297 // 'AbstractMethod': new MochiKit.Base.NamedError("Clipperz.Base.exception.AbstractMethod"), 294 // 'AbstractMethod': new MochiKit.Base.NamedError("Clipperz.Base.exception.AbstractMethod"),
298 // 'UnknownType': new MochiKit.Base.NamedError("Clipperz.Base.exception.UnknownType") 295 // 'UnknownType': new MochiKit.Base.NamedError("Clipperz.Base.exception.UnknownType")
299 }, 296 },
300 297
301 //------------------------------------------------------------------------- 298 //-------------------------------------------------------------------------
302 __syntaxFix__: "syntax fix" 299 __syntaxFix__: "syntax fix"
303 300
304}); 301});
305 302
diff --git a/frontend/beta/js/Clipperz/KeePassExportProcessor.js b/frontend/beta/js/Clipperz/KeePassExportProcessor.js
index ba56b8e..74d36ca 100644
--- a/frontend/beta/js/Clipperz/KeePassExportProcessor.js
+++ b/frontend/beta/js/Clipperz/KeePassExportProcessor.js
@@ -1,251 +1,248 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30 27
31 28
32Clipperz.KeePassExportProcessor = function(args) { 29Clipperz.KeePassExportProcessor = function(args) {
33 args = args || {}; 30 args = args || {};
34 31
35 return this; 32 return this;
36} 33}
37 34
38//============================================================================= 35//=============================================================================
39 36
40Clipperz.KeePassExportProcessor.prototype = MochiKit.Base.update(null, { 37Clipperz.KeePassExportProcessor.prototype = MochiKit.Base.update(null, {
41 38
42 //------------------------------------------------------------------------- 39 //-------------------------------------------------------------------------
43/* 40/*
44 'parse': function(aValue) { 41 'parse': function(aValue) {
45 var result; 42 var result;
46 43
47//MochiKit.Logging.logDebug(">>> KeePassExportProcessor.parse"); 44//MochiKit.Logging.logDebug(">>> KeePassExportProcessor.parse");
48 result = []; 45 result = [];
49//MochiKit.Logging.logDebug("--- KeePassExportProcessor.parse - result: " + Clipperz.Base.serializeJSON(result)); 46//MochiKit.Logging.logDebug("--- KeePassExportProcessor.parse - result: " + Clipperz.Base.serializeJSON(result));
50//MochiKit.Logging.logDebug("<<< KeePassExportProcessor.parse"); 47//MochiKit.Logging.logDebug("<<< KeePassExportProcessor.parse");
51 48
52 return result; 49 return result;
53 }, 50 },
54*/ 51*/
55 //------------------------------------------------------------------------- 52 //-------------------------------------------------------------------------
56 53
57 'deferredParse_core': function(aContext) { 54 'deferredParse_core': function(aContext) {
58 var deferredResult; 55 var deferredResult;
59 56
60 //MochiKit.Logging.logDebug(">>> KeePassExportProcessor.deferredParse_core"); 57 //MochiKit.Logging.logDebug(">>> KeePassExportProcessor.deferredParse_core");
61 //MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse_core - (1) aContext.line: " + aContext.line.replace(/\n/g, "\\n").substring(0,50)); 58 //MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse_core - (1) aContext.line: " + aContext.line.replace(/\n/g, "\\n").substring(0,50));
62 //MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse_core - aContext: " + Clipperz.Base.serializeJSON(aContext).substring(0,50)); 59 //MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse_core - aContext: " + Clipperz.Base.serializeJSON(aContext).substring(0,50));
63 //MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse_core - (2) aContext.line: " + aContext.line.replace(/\n/g, "\\n").substring(0,50)); 60 //MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse_core - (2) aContext.line: " + aContext.line.replace(/\n/g, "\\n").substring(0,50));
64//console.log("deferredParse_core - aContext", aContext); 61//console.log("deferredParse_core - aContext", aContext);
65 //MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse_core - (3) aContext.line: " + aContext.line.replace(/\n/g, "\\n").substring(0,50)); 62 //MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse_core - (3) aContext.line: " + aContext.line.replace(/\n/g, "\\n").substring(0,50));
66 if (aContext.line == "") { 63 if (aContext.line == "") {
67 deferredResult = MochiKit.Async.succeed(aContext.result); 64 deferredResult = MochiKit.Async.succeed(aContext.result);
68 } else { 65 } else {
69 var record; 66 var record;
70 67
71 record = this.parseRecord(aContext); 68 record = this.parseRecord(aContext);
72 if (record != null) { 69 if (record != null) {
73 aContext.result.push(record); 70 aContext.result.push(record);
74 } 71 }
75 72
76 //MochiKit.Logging.logDebug("--> KeePassExportProcessor.deferredParse_core - aContext.line: " + aContext.line.replace(/\n/g, "\\n").substring(0,50)); 73 //MochiKit.Logging.logDebug("--> KeePassExportProcessor.deferredParse_core - aContext.line: " + aContext.line.replace(/\n/g, "\\n").substring(0,50));
77 aContext.line = aContext.line.replace(/^\n*/g, "").replace(/\n$/g, ""); 74 aContext.line = aContext.line.replace(/^\n*/g, "").replace(/\n$/g, "");
78 //MochiKit.Logging.logDebug("<-- KeePassExportProcessor.deferredParse_core - aContext.line: " + aContext.line.replace(/\n/g, "\\n").substring(0,50)); 75 //MochiKit.Logging.logDebug("<-- KeePassExportProcessor.deferredParse_core - aContext.line: " + aContext.line.replace(/\n/g, "\\n").substring(0,50));
79 76
80 deferredResult = new MochiKit.Async.Deferred(); 77 deferredResult = new MochiKit.Async.Deferred();
81//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassExportProcessor.deferredParse_core - 1.1 " + res); return res;}); 78//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassExportProcessor.deferredParse_core - 1.1 " + res); return res;});
82 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'importProcessorProgressUpdate', {status:'processing', size:aContext.size, progress:(aContext.size - aContext.line.length)}); 79 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'importProcessorProgressUpdate', {status:'processing', size:aContext.size, progress:(aContext.size - aContext.line.length)});
83//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassExportProcessor.deferredParse_core - 1.2 " + res); return res;}); 80//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassExportProcessor.deferredParse_core - 1.2 " + res); return res;});
84 deferredResult.addCallback(MochiKit.Async.wait, 0.2); 81 deferredResult.addCallback(MochiKit.Async.wait, 0.2);
85//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassExportProcessor.deferredParse_core - 1.3 " + res); return res;}); 82//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassExportProcessor.deferredParse_core - 1.3 " + res); return res;});
86//deferredResult.addBoth(function(res) {console.log("KeePassExportProcessor.deferredParse_core - 1.3 ", res); return res;}); 83//deferredResult.addBoth(function(res) {console.log("KeePassExportProcessor.deferredParse_core - 1.3 ", res); return res;});
87 deferredResult.addCallback(MochiKit.Base.method(this, 'deferredParse_core')) 84 deferredResult.addCallback(MochiKit.Base.method(this, 'deferredParse_core'))
88//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassExportProcessor.deferredParse_core - 1.4 " + res); return res;}); 85//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassExportProcessor.deferredParse_core - 1.4 " + res); return res;});
89 deferredResult.callback(aContext); 86 deferredResult.callback(aContext);
90 } 87 }
91 //MochiKit.Logging.logDebug("<<< KeePassExportProcessor.deferredParse_core"); 88 //MochiKit.Logging.logDebug("<<< KeePassExportProcessor.deferredParse_core");
92 89
93 return deferredResult; 90 return deferredResult;
94 }, 91 },
95 92
96 //......................................................................... 93 //.........................................................................
97 94
98 'deferredParse': function(aValue) { 95 'deferredParse': function(aValue) {
99 var deferredResult; 96 var deferredResult;
100 var lines; 97 var lines;
101 var context; 98 var context;
102 99
103//MochiKit.Logging.logDebug(">>> KeePassExportProcessor.deferredParse"); 100//MochiKit.Logging.logDebug(">>> KeePassExportProcessor.deferredParse");
104//MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse - aValue: " + aValue.length); 101//MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse - aValue: " + aValue.length);
105 lines = aValue.replace(/\r?\n/g, "\n"); 102 lines = aValue.replace(/\r?\n/g, "\n");
106//MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse - lines: " + lines.length); 103//MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse - lines: " + lines.length);
107 context = { 104 context = {
108 line: lines, 105 line: lines,
109 size: lines.length, 106 size: lines.length,
110 result: [] 107 result: []
111 } 108 }
112//MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse - context: " + Clipperz.Base.serializeJSON(context).substring(0,50)); 109//MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse - context: " + Clipperz.Base.serializeJSON(context).substring(0,50));
113//console.log("--- KeePassExportProcessor.deferredParse - context: ", context); 110//console.log("--- KeePassExportProcessor.deferredParse - context: ", context);
114 111
115 deferredResult = new MochiKit.Async.Deferred(); 112 deferredResult = new MochiKit.Async.Deferred();
116//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassExportProcessor.deferredParse - 1 " + res); return res;}); 113//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassExportProcessor.deferredParse - 1 " + res); return res;});
117//deferredResult.addBoth(function(res) {console.log("KeePassExportProcessor.deferredParse - 1 ", res); return res;}); 114//deferredResult.addBoth(function(res) {console.log("KeePassExportProcessor.deferredParse - 1 ", res); return res;});
118 deferredResult.addCallback(MochiKit.Base.method(this, 'deferredParse_core')); 115 deferredResult.addCallback(MochiKit.Base.method(this, 'deferredParse_core'));
119//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassExportProcessor.deferredParse - 2 " + res); return res;}); 116//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassExportProcessor.deferredParse - 2 " + res); return res;});
120 deferredResult.callback(context); 117 deferredResult.callback(context);
121//MochiKit.Logging.logDebug("<<< KeePassExportProcessor.deferredParse"); 118//MochiKit.Logging.logDebug("<<< KeePassExportProcessor.deferredParse");
122 119
123 return deferredResult; 120 return deferredResult;
124 }, 121 },
125 122
126 //------------------------------------------------------------------------- 123 //-------------------------------------------------------------------------
127 124
128 'parseRecord': function(aContext) { 125 'parseRecord': function(aContext) {
129 var result; 126 var result;
130 var recordLabelRegexp; 127 var recordLabelRegexp;
131 varfieldLabelRegexp; 128 varfieldLabelRegexp;
132 var fieldValueRegexp; 129 var fieldValueRegexp;
133 var fullLineRegexp; 130 var fullLineRegexp;
134/* 131/*
135[Record name] 132[Record name]
136Group Tree: 133Group Tree:
137UserName: 134UserName:
138URL: 135URL:
139Password: 136Password:
140Notes: test 137Notes: test
141UUID: 525f62430079bae48b79ed2961924b05 138UUID: 525f62430079bae48b79ed2961924b05
142Icon: 0 139Icon: 0
143Creation Time: 2007-06-26 17:56:03 140Creation Time: 2007-06-26 17:56:03
144Last Access: 2007-10-25 16:23:51 141Last Access: 2007-10-25 16:23:51
145Last Modification: 2007-10-25 16:23:51 142Last Modification: 2007-10-25 16:23:51
146Expires: 2999-12-28 23:59:59 143Expires: 2999-12-28 23:59:59
147 144
148 [Record name] ==> Title 145 [Record name] ==> Title
149 Group: General ==> Group 146 Group: General ==> Group
150 Group Tree: ==> Group Tree 147 Group Tree: ==> Group Tree
151 UserName: ==> UserName 148 UserName: ==> UserName
152 URL: ==>URL 149 URL: ==>URL
153 Password: ==>Password 150 Password: ==>Password
154 Notes: test ==>Notes 151 Notes: test ==>Notes
155 UUID: 525f62430079bae48b79ed2961924b05 ==>UUID 152 UUID: 525f62430079bae48b79ed2961924b05 ==>UUID
156 Icon: 0 ==>Icon 153 Icon: 0 ==>Icon
157 Creation Time: 2007-06-26 17:56:03 ==>Creation Time 154 Creation Time: 2007-06-26 17:56:03 ==>Creation Time
158 Last Access: 2007-10-25 16:23:51 ==>Last Access 155 Last Access: 2007-10-25 16:23:51 ==>Last Access
159 Last Modification: 2007-10-25 16:23:51 ==>Last Modification 156 Last Modification: 2007-10-25 16:23:51 ==>Last Modification
160 Expires: 2999-12-28 23:59:59 ==> Expires 157 Expires: 2999-12-28 23:59:59 ==> Expires
161 Attachment Description: ==> Attachment Description 158 Attachment Description: ==> Attachment Description
162 Attachment: ==> Attachment 159 Attachment: ==> Attachment
163*/ 160*/
164 recordLabelRegexp = new RegExp("^\\[(.*)\\]\\n"); 161 recordLabelRegexp = new RegExp("^\\[(.*)\\]\\n");
165 // recordLabelRegexp = new RegExp("^\\[(.*)\\]$", "m"); 162 // recordLabelRegexp = new RegExp("^\\[(.*)\\]$", "m");
166 fieldLabelRegexp = new RegExp("^(Group|Group Tree|UserName|URL|Password|Notes|UUID|Icon|Creation Time|Last Access|Last Modification|Expires|Attachment Description|Attachment|Valid until): "); 163 fieldLabelRegexp = new RegExp("^(Group|Group Tree|UserName|URL|Password|Notes|UUID|Icon|Creation Time|Last Access|Last Modification|Expires|Attachment Description|Attachment|Valid until): ");
167 fieldValueRegexp = new RegExp("(.*)(\\n|$)"); 164 fieldValueRegexp = new RegExp("(.*)(\\n|$)");
168 fullLineRegexp = new RegExp("^(.*\\n)"); 165 fullLineRegexp = new RegExp("^(.*\\n)");
169 166
170 167
171 if (recordLabelRegexp.test(aContext.line) == true) { 168 if (recordLabelRegexp.test(aContext.line) == true) {
172 var line; 169 var line;
173 170
174//MochiKit.Logging.logDebug("1.0"); 171//MochiKit.Logging.logDebug("1.0");
175 line = aContext.line; 172 line = aContext.line;
176//MochiKit.Logging.logDebug("0 - line: " + line.replace(/\n/g, "\\n").substring(0,50)); 173//MochiKit.Logging.logDebug("0 - line: " + line.replace(/\n/g, "\\n").substring(0,50));
177 174
178 result = {}; 175 result = {};
179 result['Title'] = line.match(recordLabelRegexp)[1]; 176 result['Title'] = line.match(recordLabelRegexp)[1];
180//MochiKit.Logging.logDebug("1 - title: " + result['Title']); 177//MochiKit.Logging.logDebug("1 - title: " + result['Title']);
181 line = line.replace(/^.*\n/, ""); 178 line = line.replace(/^.*\n/, "");
182//MochiKit.Logging.logDebug("2 - line: " + line.replace(/\n/g, "\\n").substring(0,50)); 179//MochiKit.Logging.logDebug("2 - line: " + line.replace(/\n/g, "\\n").substring(0,50));
183//MochiKit.Logging.logDebug("======================================="); 180//MochiKit.Logging.logDebug("=======================================");
184 while (fieldLabelRegexp.test(line) == true) { 181 while (fieldLabelRegexp.test(line) == true) {
185 var fieldName; 182 var fieldName;
186 var fieldValue; 183 var fieldValue;
187 184
188 fieldName = RegExp.$1; 185 fieldName = RegExp.$1;
189//MochiKit.Logging.logDebug("3 - fieldName: " + fieldName); 186//MochiKit.Logging.logDebug("3 - fieldName: " + fieldName);
190 line = RegExp.rightContext; 187 line = RegExp.rightContext;
191//MochiKit.Logging.logDebug("4 - line: " + line.replace(/\n/g, "\\n").substring(0,50)); 188//MochiKit.Logging.logDebug("4 - line: " + line.replace(/\n/g, "\\n").substring(0,50));
192 189
193 fieldValue = line.match(fieldValueRegexp)[1]; 190 fieldValue = line.match(fieldValueRegexp)[1];
194//MochiKit.Logging.logDebug("5 - fieldValue: " + fieldValue); 191//MochiKit.Logging.logDebug("5 - fieldValue: " + fieldValue);
195 line = RegExp.rightContext; 192 line = RegExp.rightContext;
196//MochiKit.Logging.logDebug("6 - line: " + line.replace(/\n/g, "\\n").substring(0,50)); 193//MochiKit.Logging.logDebug("6 - line: " + line.replace(/\n/g, "\\n").substring(0,50));
197 194
198 if (fieldName == 'Notes') { 195 if (fieldName == 'Notes') {
199 var isMultiline; 196 var isMultiline;
200 197
201 isMultiline = false; 198 isMultiline = false;
202 199
203//MochiKit.Logging.logDebug("7 - fieldLabelRegexp.test(line): " + fieldLabelRegexp.test(line) + " - recordLabelRegexp.test(line): " + recordLabelRegexp.test(line)); 200//MochiKit.Logging.logDebug("7 - fieldLabelRegexp.test(line): " + fieldLabelRegexp.test(line) + " - recordLabelRegexp.test(line): " + recordLabelRegexp.test(line));
204 if ((line != "") && (fieldLabelRegexp.test(line) == false) && (recordLabelRegexp.test(line) == false)) { 201 if ((line != "") && (fieldLabelRegexp.test(line) == false) && (recordLabelRegexp.test(line) == false)) {
205 fieldValue += '\n'; 202 fieldValue += '\n';
206 } 203 }
207 204
208 while ((line != "") && (fieldLabelRegexp.test(line) == false) && (recordLabelRegexp.test(line) == false)) { 205 while ((line != "") && (fieldLabelRegexp.test(line) == false) && (recordLabelRegexp.test(line) == false)) {
209 var newLineValue; 206 var newLineValue;
210 207
211 newLineValue = line.match(fullLineRegexp)[1]; 208 newLineValue = line.match(fullLineRegexp)[1];
212 if (newLineValue != "\n") { 209 if (newLineValue != "\n") {
213 isMultiline = true; 210 isMultiline = true;
214 } 211 }
215 fieldValue += newLineValue; 212 fieldValue += newLineValue;
216//MochiKit.Logging.logDebug("8 - fieldValue: " + fieldValue); 213//MochiKit.Logging.logDebug("8 - fieldValue: " + fieldValue);
217 line = RegExp.rightContext; 214 line = RegExp.rightContext;
218//MochiKit.Logging.logDebug("9 - line: " + line.replace(/\n/g, "\\n").substring(0,50)); 215//MochiKit.Logging.logDebug("9 - line: " + line.replace(/\n/g, "\\n").substring(0,50));
219//MochiKit.Logging.logDebug("10 - fieldLabelRegexp.test(line): " + fieldLabelRegexp.test(line) + " - recordLabelRegexp.test(line): " + recordLabelRegexp.test(line)); 216//MochiKit.Logging.logDebug("10 - fieldLabelRegexp.test(line): " + fieldLabelRegexp.test(line) + " - recordLabelRegexp.test(line): " + recordLabelRegexp.test(line));
220 } 217 }
221 218
222 if (isMultiline) { 219 if (isMultiline) {
223 fieldValue = fieldValue.replace(/\n$/g, ""); 220 fieldValue = fieldValue.replace(/\n$/g, "");
224 } else { 221 } else {
225 fieldValue = fieldValue.replace(/\n\n$/g, ""); 222 fieldValue = fieldValue.replace(/\n\n$/g, "");
226 } 223 }
227 224
228 line = line.replace(/^\n/, ''); 225 line = line.replace(/^\n/, '');
229 } 226 }
230//MochiKit.Logging.logDebug("5 - fieldValue: " + fieldValue); 227//MochiKit.Logging.logDebug("5 - fieldValue: " + fieldValue);
231 228
232 result[fieldName] = fieldValue; 229 result[fieldName] = fieldValue;
233//MochiKit.Logging.logDebug("6 - line: " + line.replace(/\n/g, "\\n").substring(0,50)); 230//MochiKit.Logging.logDebug("6 - line: " + line.replace(/\n/g, "\\n").substring(0,50));
234//MochiKit.Logging.logDebug("---------------------------------------"); 231//MochiKit.Logging.logDebug("---------------------------------------");
235 } 232 }
236 } else { 233 } else {
237//MochiKit.Logging.logDebug("2.0"); 234//MochiKit.Logging.logDebug("2.0");
238 result = null; 235 result = null;
239 } 236 }
240 237
241 aContext.line = line; 238 aContext.line = line;
242//MochiKit.Logging.logDebug("#######################################"); 239//MochiKit.Logging.logDebug("#######################################");
243 240
244 return result; 241 return result;
245 }, 242 },
246 243
247 //------------------------------------------------------------------------- 244 //-------------------------------------------------------------------------
248 __syntaxFix__: "syntax fix" 245 __syntaxFix__: "syntax fix"
249}); 246});
250 247
251 248
diff --git a/frontend/beta/js/Clipperz/NotificationCenter.js b/frontend/beta/js/Clipperz/NotificationCenter.js
index 815d4fd..e346b1c 100644
--- a/frontend/beta/js/Clipperz/NotificationCenter.js
+++ b/frontend/beta/js/Clipperz/NotificationCenter.js
@@ -1,325 +1,322 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.NotificationCenter) == 'undefined') { Clipperz.NotificationCenter = {}; } 27if (typeof(Clipperz.NotificationCenter) == 'undefined') { Clipperz.NotificationCenter = {}; }
31 28
32 29
33//############################################################################# 30//#############################################################################
34 31
35Clipperz.NotificationCenterEvent = function(args) { 32Clipperz.NotificationCenterEvent = function(args) {
36 args = args || {}; 33 args = args || {};
37 //MochiKit.Base.bindMethods(this); 34 //MochiKit.Base.bindMethods(this);
38 35
39 this._source = args.source || null; 36 this._source = args.source || null;
40 this._event = args.event || null; 37 this._event = args.event || null;
41 this._parameters = args.parameters || null; 38 this._parameters = args.parameters || null;
42 this._isSynchronous = args.isSynchronous || false; 39 this._isSynchronous = args.isSynchronous || false;
43 40
44 return this; 41 return this;
45} 42}
46 43
47//============================================================================= 44//=============================================================================
48 45
49Clipperz.NotificationCenterEvent.prototype = MochiKit.Base.update(null, { 46Clipperz.NotificationCenterEvent.prototype = MochiKit.Base.update(null, {
50 47
51 //------------------------------------------------------------------------- 48 //-------------------------------------------------------------------------
52 49
53 'toString': function() { 50 'toString': function() {
54 return "Clipperz.NotificationCenterEvent"; 51 return "Clipperz.NotificationCenterEvent";
55 //return "Clipperz.NotificationCenterEvent {source: " + this.source() + ", event: " + this.event() + ", parameters: " + this.parameters() + "}"; 52 //return "Clipperz.NotificationCenterEvent {source: " + this.source() + ", event: " + this.event() + ", parameters: " + this.parameters() + "}";
56 }, 53 },
57 54
58 //------------------------------------------------------------------------- 55 //-------------------------------------------------------------------------
59 56
60 'source': function() { 57 'source': function() {
61 return this._source; 58 return this._source;
62 }, 59 },
63 60
64 'setSource': function(aValue) { 61 'setSource': function(aValue) {
65 this._source = aValue; 62 this._source = aValue;
66 }, 63 },
67 64
68 //------------------------------------------------------------------------- 65 //-------------------------------------------------------------------------
69 66
70 'event': function() { 67 'event': function() {
71 return this._event; 68 return this._event;
72 }, 69 },
73 70
74 'setEvent': function(aValue) { 71 'setEvent': function(aValue) {
75 this._event = aValue; 72 this._event = aValue;
76 }, 73 },
77 74
78 //------------------------------------------------------------------------- 75 //-------------------------------------------------------------------------
79 76
80 'parameters': function() { 77 'parameters': function() {
81 return this._parameters; 78 return this._parameters;
82 }, 79 },
83 80
84 'setParameters': function(aValue) { 81 'setParameters': function(aValue) {
85 this._parameters = aValue; 82 this._parameters = aValue;
86 }, 83 },
87 84
88 //------------------------------------------------------------------------- 85 //-------------------------------------------------------------------------
89 86
90 'isSynchronous': function() { 87 'isSynchronous': function() {
91 return this._isSynchronous; 88 return this._isSynchronous;
92 }, 89 },
93 90
94 //------------------------------------------------------------------------- 91 //-------------------------------------------------------------------------
95 __syntaxFix__: "syntax fix" 92 __syntaxFix__: "syntax fix"
96}); 93});
97 94
98 95
99//############################################################################# 96//#############################################################################
100//############################################################################# 97//#############################################################################
101 98
102Clipperz.NotificationCenter = function(args) { 99Clipperz.NotificationCenter = function(args) {
103 args = args || {}; 100 args = args || {};
104 //MochiKit.Base.bindMethods(this); 101 //MochiKit.Base.bindMethods(this);
105 102
106 this._listeners = {}; 103 this._listeners = {};
107 this._useSynchronousListenerInvocation = args.useSynchronousListenerInvocation || false; 104 this._useSynchronousListenerInvocation = args.useSynchronousListenerInvocation || false;
108 this._timeoutDelay = args.timeoutDelay || 0.1; 105 this._timeoutDelay = args.timeoutDelay || 0.1;
109 106
110 return this; 107 return this;
111} 108}
112 109
113//============================================================================= 110//=============================================================================
114 111
115Clipperz.NotificationCenter.prototype = MochiKit.Base.update(null, { 112Clipperz.NotificationCenter.prototype = MochiKit.Base.update(null, {
116 113
117 //------------------------------------------------------------------------- 114 //-------------------------------------------------------------------------
118 115
119 'toString': function() { 116 'toString': function() {
120 return "Clipperz.NotificationCenter"; 117 return "Clipperz.NotificationCenter";
121 }, 118 },
122 119
123 //------------------------------------------------------------------------- 120 //-------------------------------------------------------------------------
124 121
125 'useSynchronousListenerInvocation': function() { 122 'useSynchronousListenerInvocation': function() {
126 return this._useSynchronousListenerInvocation; 123 return this._useSynchronousListenerInvocation;
127 }, 124 },
128 125
129 'setUseSynchronousListenerInvocation': function(aValue) { 126 'setUseSynchronousListenerInvocation': function(aValue) {
130 this._useSynchronousListenerInvocation = aValue; 127 this._useSynchronousListenerInvocation = aValue;
131 }, 128 },
132 129
133 //------------------------------------------------------------------------- 130 //-------------------------------------------------------------------------
134 131
135 'timeoutDelay': function() { 132 'timeoutDelay': function() {
136 return this._timeoutDelay; 133 return this._timeoutDelay;
137 }, 134 },
138 135
139 'setTimeoutDelay': function(aValue) { 136 'setTimeoutDelay': function(aValue) {
140 this._timeoutDelay = aValue; 137 this._timeoutDelay = aValue;
141 }, 138 },
142 139
143 //------------------------------------------------------------------------- 140 //-------------------------------------------------------------------------
144 141
145 'listeners': function() { 142 'listeners': function() {
146 return this._listeners; 143 return this._listeners;
147 }, 144 },
148 145
149 //------------------------------------------------------------------------- 146 //-------------------------------------------------------------------------
150 147
151 'register': function(aSource, anEvent, aListener, aMethod) { 148 'register': function(aSource, anEvent, aListener, aMethod) {
152 vareventListeners; 149 vareventListeners;
153 varlistenerInfo; 150 varlistenerInfo;
154 vareventKey; 151 vareventKey;
155 152
156 if (anEvent != null) { 153 if (anEvent != null) {
157 eventKey = anEvent; 154 eventKey = anEvent;
158 } else { 155 } else {
159 eventKey = '_notificationCenter_matchAnyEvent_key_'; 156 eventKey = '_notificationCenter_matchAnyEvent_key_';
160 } 157 }
161 158
162 eventListeners = this.listeners()[eventKey]; 159 eventListeners = this.listeners()[eventKey];
163 160
164 if (eventListeners == null) { 161 if (eventListeners == null) {
165 eventListeners = []; 162 eventListeners = [];
166 this.listeners()[eventKey] = eventListeners; 163 this.listeners()[eventKey] = eventListeners;
167 } 164 }
168 165
169 listenerInfo = {}; 166 listenerInfo = {};
170 if (aSource != null) { 167 if (aSource != null) {
171 listenerInfo['source'] = aSource; 168 listenerInfo['source'] = aSource;
172 } else { 169 } else {
173 listenerInfo['source'] = 'any'; 170 listenerInfo['source'] = 'any';
174 } 171 }
175 172
176 listenerInfo['listener'] = aListener; 173 listenerInfo['listener'] = aListener;
177 listenerInfo['method'] = aMethod; 174 listenerInfo['method'] = aMethod;
178 175
179 eventListeners.push(listenerInfo); 176 eventListeners.push(listenerInfo);
180 177
181 return listenerInfo; 178 return listenerInfo;
182 }, 179 },
183 180
184 //------------------------------------------------------------------------- 181 //-------------------------------------------------------------------------
185 182
186 'removeListenerInfoFromListeners': function(aListener, someListeners) { 183 'removeListenerInfoFromListeners': function(aListener, someListeners) {
187 varlistenerIndex; 184 varlistenerIndex;
188 vari,c; 185 vari,c;
189 186
190 if (someListeners != null) { 187 if (someListeners != null) {
191 listenerIndex = -1; 188 listenerIndex = -1;
192 c = someListeners.length; 189 c = someListeners.length;
193 for (i=0; i<c; i++) { 190 for (i=0; i<c; i++) {
194 varlistenerInfo; 191 varlistenerInfo;
195 192
196 listenerInfo = someListeners[i]; 193 listenerInfo = someListeners[i];
197 if (listenerInfo['listener'] === aListener) { 194 if (listenerInfo['listener'] === aListener) {
198 listenerIndex = i; 195 listenerIndex = i;
199 } 196 }
200 } 197 }
201 198
202 if (listenerIndex != -1) { 199 if (listenerIndex != -1) {
203 Clipperz.Base.removeObjectAtIndexFromArray(listenerIndex, someListeners); 200 Clipperz.Base.removeObjectAtIndexFromArray(listenerIndex, someListeners);
204 } 201 }
205 } 202 }
206 }, 203 },
207 204
208 //------------------------------------------------------------------------- 205 //-------------------------------------------------------------------------
209 206
210 'unregister': function(aListener, anEvent) { 207 'unregister': function(aListener, anEvent) {
211 if (anEvent == null) { 208 if (anEvent == null) {
212 varallListenerList; 209 varallListenerList;
213 vari, c; 210 vari, c;
214 211
215 // allListenerList = Clipperz.Base.values(this.listeners()); 212 // allListenerList = Clipperz.Base.values(this.listeners());
216 allListenerList = MochiKit.Base.values(this.listeners()); 213 allListenerList = MochiKit.Base.values(this.listeners());
217 c = allListenerList.length; 214 c = allListenerList.length;
218 for (i=0; i<c; i++) { 215 for (i=0; i<c; i++) {
219 this.removeListenerInfoFromListeners(aListener, allListenerList[i]); 216 this.removeListenerInfoFromListeners(aListener, allListenerList[i]);
220 } 217 }
221 } else { 218 } else {
222 this.removeListenerInfoFromListeners(aListener, this.listeners()[anEvent]); 219 this.removeListenerInfoFromListeners(aListener, this.listeners()[anEvent]);
223 } 220 }
224 }, 221 },
225 222
226 //------------------------------------------------------------------------- 223 //-------------------------------------------------------------------------
227 224
228 'asysnchronousListenerNotification': function(anEventInfo, aMethod, aListener) { 225 'asysnchronousListenerNotification': function(anEventInfo, aMethod, aListener) {
229 MochiKit.Async.callLater(this.timeoutDelay(), MochiKit.Base.partial(MochiKit.Base.methodcaller(aMethod, anEventInfo), aListener)); 226 MochiKit.Async.callLater(this.timeoutDelay(), MochiKit.Base.partial(MochiKit.Base.methodcaller(aMethod, anEventInfo), aListener));
230 // setTimeout(MochiKit.Base.partial(MochiKit.Base.methodcaller(aMethod, anEventInfo), aListener), this.timeoutDelay()); 227 // setTimeout(MochiKit.Base.partial(MochiKit.Base.methodcaller(aMethod, anEventInfo), aListener), this.timeoutDelay());
231 }, 228 },
232 229
233 //------------------------------------------------------------------------- 230 //-------------------------------------------------------------------------
234 231
235 'processListenerInfo': function(anEventInfo, aListenerInfo) { 232 'processListenerInfo': function(anEventInfo, aListenerInfo) {
236 varshouldInvokeListenerMethod; 233 varshouldInvokeListenerMethod;
237 234
238 if (aListenerInfo['source'] == 'any') { 235 if (aListenerInfo['source'] == 'any') {
239 shouldInvokeListenerMethod = true; 236 shouldInvokeListenerMethod = true;
240 } else { 237 } else {
241 if (aListenerInfo['source'] === anEventInfo.source()) { 238 if (aListenerInfo['source'] === anEventInfo.source()) {
242 shouldInvokeListenerMethod = true; 239 shouldInvokeListenerMethod = true;
243 } else { 240 } else {
244 shouldInvokeListenerMethod = false; 241 shouldInvokeListenerMethod = false;
245 } 242 }
246 } 243 }
247 244
248 if (shouldInvokeListenerMethod) { 245 if (shouldInvokeListenerMethod) {
249 if (this.useSynchronousListenerInvocation() || anEventInfo.isSynchronous()) { 246 if (this.useSynchronousListenerInvocation() || anEventInfo.isSynchronous()) {
250//MochiKit.Logging.logDebug("syncrhronous listener invocation"); 247//MochiKit.Logging.logDebug("syncrhronous listener invocation");
251 try { 248 try {
252 // MochiKit.Base.map(MochiKit.Base.methodcaller(aListenerInfo['method'], anEventInfo), [aListenerInfo['listener']]); 249 // MochiKit.Base.map(MochiKit.Base.methodcaller(aListenerInfo['method'], anEventInfo), [aListenerInfo['listener']]);
253//console.log("notification: ", aListenerInfo['listener'], aListenerInfo['method'], anEventInfo); 250//console.log("notification: ", aListenerInfo['listener'], aListenerInfo['method'], anEventInfo);
254 MochiKit.Base.method(aListenerInfo['listener'], aListenerInfo['method'], anEventInfo)(); 251 MochiKit.Base.method(aListenerInfo['listener'], aListenerInfo['method'], anEventInfo)();
255 } catch(exception) { 252 } catch(exception) {
256 MochiKit.Logging.logError('NotificationCenter ERROR: unable to invoke method \'' + aListenerInfo['method'] + '\' on object ' + aListenerInfo['listener']); 253 MochiKit.Logging.logError('NotificationCenter ERROR: unable to invoke method \'' + aListenerInfo['method'] + '\' on object ' + aListenerInfo['listener']);
257 } 254 }
258 } else { 255 } else {
259 var asyncMethod; 256 var asyncMethod;
260 257
261//MochiKit.Logging.logDebug("asyncrhronous listener invocation"); 258//MochiKit.Logging.logDebug("asyncrhronous listener invocation");
262 asyncMethod = MochiKit.Base.bind(this.asysnchronousListenerNotification, this) 259 asyncMethod = MochiKit.Base.bind(this.asysnchronousListenerNotification, this)
263 MochiKit.Base.map(MochiKit.Base.partial(asyncMethod, anEventInfo, aListenerInfo['method']), [aListenerInfo['listener']]); 260 MochiKit.Base.map(MochiKit.Base.partial(asyncMethod, anEventInfo, aListenerInfo['method']), [aListenerInfo['listener']]);
264 } 261 }
265 } 262 }
266 }, 263 },
267 264
268 //------------------------------------------------------------------------- 265 //-------------------------------------------------------------------------
269 266
270 'notify': function(aSource, anEvent, someEventParameters, isSynchronous) { 267 'notify': function(aSource, anEvent, someEventParameters, isSynchronous) {
271 vareventInfo; 268 vareventInfo;
272 var processInfoMethod; 269 var processInfoMethod;
273 270
274//MochiKit.Logging.logDebug(">>> NotificationCenter.notify"); 271//MochiKit.Logging.logDebug(">>> NotificationCenter.notify");
275 eventInfo = new Clipperz.NotificationCenterEvent({source:aSource, event:anEvent, parameters:someEventParameters, isSynchronous:isSynchronous}); 272 eventInfo = new Clipperz.NotificationCenterEvent({source:aSource, event:anEvent, parameters:someEventParameters, isSynchronous:isSynchronous});
276//MochiKit.Logging.logDebug("--- NotificationCenter.notify - 1"); 273//MochiKit.Logging.logDebug("--- NotificationCenter.notify - 1");
277 processInfoMethod = MochiKit.Base.bind(this.processListenerInfo, this); 274 processInfoMethod = MochiKit.Base.bind(this.processListenerInfo, this);
278//MochiKit.Logging.logDebug("--- NotificationCenter.notify - 2"); 275//MochiKit.Logging.logDebug("--- NotificationCenter.notify - 2");
279 276
280 MochiKit.Base.map(MochiKit.Base.partial(processInfoMethod, eventInfo), this.listeners()[anEvent] || []); 277 MochiKit.Base.map(MochiKit.Base.partial(processInfoMethod, eventInfo), this.listeners()[anEvent] || []);
281//MochiKit.Logging.logDebug("--- NotificationCenter.notify - 3"); 278//MochiKit.Logging.logDebug("--- NotificationCenter.notify - 3");
282 MochiKit.Base.map(MochiKit.Base.partial(processInfoMethod, eventInfo), this.listeners()['_notificationCenter_matchAnyEvent_key_'] || []); 279 MochiKit.Base.map(MochiKit.Base.partial(processInfoMethod, eventInfo), this.listeners()['_notificationCenter_matchAnyEvent_key_'] || []);
283//MochiKit.Logging.logDebug("<<< NotificationCenter.notify"); 280//MochiKit.Logging.logDebug("<<< NotificationCenter.notify");
284 }, 281 },
285 282
286 //------------------------------------------------------------------------- 283 //-------------------------------------------------------------------------
287 284
288 'deferredNotification': function(aSource, anEvent, someEventParameters, aDeferredResult) { 285 'deferredNotification': function(aSource, anEvent, someEventParameters, aDeferredResult) {
289 286
290 this.notify(aSource, anEvent, someEventParameters, true); 287 this.notify(aSource, anEvent, someEventParameters, true);
291 288
292 return aDeferredResult; 289 return aDeferredResult;
293 // return MochiKit.Async.wait(1, aDeferredResult); 290 // return MochiKit.Async.wait(1, aDeferredResult);
294 }, 291 },
295 292
296 //------------------------------------------------------------------------- 293 //-------------------------------------------------------------------------
297 294
298 'resetStatus': function() { 295 'resetStatus': function() {
299 this._listeners = {}; 296 this._listeners = {};
300 }, 297 },
301 298
302 //------------------------------------------------------------------------- 299 //-------------------------------------------------------------------------
303 __syntaxFix__: "syntax fix" 300 __syntaxFix__: "syntax fix"
304 301
305}); 302});
306 303
307//############################################################################# 304//#############################################################################
308 305
309Clipperz.NotificationCenter.defaultNotificationCenter = new Clipperz.NotificationCenter(); 306Clipperz.NotificationCenter.defaultNotificationCenter = new Clipperz.NotificationCenter();
310 307
311Clipperz.NotificationCenter.notify = MochiKit.Base.method(Clipperz.NotificationCenter.defaultNotificationCenter, 'notify'); 308Clipperz.NotificationCenter.notify = MochiKit.Base.method(Clipperz.NotificationCenter.defaultNotificationCenter, 'notify');
312Clipperz.NotificationCenter.register = MochiKit.Base.method(Clipperz.NotificationCenter.defaultNotificationCenter, 'register'); 309Clipperz.NotificationCenter.register = MochiKit.Base.method(Clipperz.NotificationCenter.defaultNotificationCenter, 'register');
313Clipperz.NotificationCenter.unregister = MochiKit.Base.method(Clipperz.NotificationCenter.defaultNotificationCenter, 'unregister'); 310Clipperz.NotificationCenter.unregister = MochiKit.Base.method(Clipperz.NotificationCenter.defaultNotificationCenter, 'unregister');
314Clipperz.NotificationCenter.deferredNotification = MochiKit.Base.method(Clipperz.NotificationCenter.defaultNotificationCenter, 'deferredNotification'); 311Clipperz.NotificationCenter.deferredNotification = MochiKit.Base.method(Clipperz.NotificationCenter.defaultNotificationCenter, 'deferredNotification');
315/* 312/*
316_clipperz_notificationCenter_defaultNotificationCenter = null; 313_clipperz_notificationCenter_defaultNotificationCenter = null;
317 314
318Clipperz.NotificationCenter.defaultNotificationCenter = function() { 315Clipperz.NotificationCenter.defaultNotificationCenter = function() {
319 if (_clipperz_notificationCenter_defaultNotificationCenter == null) { 316 if (_clipperz_notificationCenter_defaultNotificationCenter == null) {
320 _clipperz_notificationCenter_defaultNotificationCenter = new Clipperz.NotificationCenter(); 317 _clipperz_notificationCenter_defaultNotificationCenter = new Clipperz.NotificationCenter();
321 } 318 }
322 319
323 return _clipperz_notificationCenter_defaultNotificationCenter; 320 return _clipperz_notificationCenter_defaultNotificationCenter;
324}; 321};
325*/ 322*/
diff --git a/frontend/beta/js/Clipperz/PM/BookmarkletProcessor.js b/frontend/beta/js/Clipperz/PM/BookmarkletProcessor.js
index 4dfdd8e..83cbfe2 100644
--- a/frontend/beta/js/Clipperz/PM/BookmarkletProcessor.js
+++ b/frontend/beta/js/Clipperz/PM/BookmarkletProcessor.js
@@ -1,288 +1,285 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31//if (typeof(Clipperz.PM.BookmarkletProcessor) == 'undefined') { Clipperz.PM.BookmarkletProcessor = {}; } 28//if (typeof(Clipperz.PM.BookmarkletProcessor) == 'undefined') { Clipperz.PM.BookmarkletProcessor = {}; }
32//if (typeof(Clipperz.PM.BookmarkletProcessor.versions) == 'undefined') { Clipperz.PM.BookmarkletProcessor.versions = {}; } 29//if (typeof(Clipperz.PM.BookmarkletProcessor.versions) == 'undefined') { Clipperz.PM.BookmarkletProcessor.versions = {}; }
33 30
34/* 31/*
35Clipperz.PM.BookmarkletProcessor.versions['abstract'] = function(anUser, aConfiguration) { 32Clipperz.PM.BookmarkletProcessor.versions['abstract'] = function(anUser, aConfiguration) {
36 this._user = anUser; 33 this._user = anUser;
37 this._configuration = aConfiguration; 34 this._configuration = aConfiguration;
38 35
39 this._recordTitle = null; 36 this._recordTitle = null;
40 this._record = null; 37 this._record = null;
41 this._editableFields = null; 38 this._editableFields = null;
42 39
43 return this; 40 return this;
44} 41}
45 42
46 43
47Clipperz.PM.BookmarkletProcessor.versions['abstract'].prototype = MochiKit.Base.update(null, { 44Clipperz.PM.BookmarkletProcessor.versions['abstract'].prototype = MochiKit.Base.update(null, {
48 45
49 'toString': function() { 46 'toString': function() {
50 return "BookmarkletProcessor - " + this.user(); 47 return "BookmarkletProcessor - " + this.user();
51 }, 48 },
52 49
53 //------------------------------------------------------------------------- 50 //-------------------------------------------------------------------------
54 51
55 'user': function() { 52 'user': function() {
56 return this._user; 53 return this._user;
57 }, 54 },
58 55
59 //------------------------------------------------------------------------- 56 //-------------------------------------------------------------------------
60 57
61 'configuration': function() { 58 'configuration': function() {
62 return this._configuration; 59 return this._configuration;
63 }, 60 },
64 61
65 //------------------------------------------------------------------------- 62 //-------------------------------------------------------------------------
66 63
67 'record': function() { 64 'record': function() {
68 throw Clipperz.Base.exception.AbstractMethod; 65 throw Clipperz.Base.exception.AbstractMethod;
69 }, 66 },
70 67
71 //------------------------------------------------------------------------- 68 //-------------------------------------------------------------------------
72 __syntaxFix__: "syntax fix" 69 __syntaxFix__: "syntax fix"
73}); 70});
74*/ 71*/
75 72
76Clipperz.PM.BookmarkletProcessor = function(anUser, aConfiguration) { 73Clipperz.PM.BookmarkletProcessor = function(anUser, aConfiguration) {
77 this._user = anUser; 74 this._user = anUser;
78 this._configuration = aConfiguration; 75 this._configuration = aConfiguration;
79 76
80 this._recordTitle = null; 77 this._recordTitle = null;
81 this._record = null; 78 this._record = null;
82 this._editableFields = null; 79 this._editableFields = null;
83 this._favicon = null; 80 this._favicon = null;
84 81
85 return this; 82 return this;
86} 83}
87 84
88Clipperz.PM.BookmarkletProcessor.prototype = MochiKit.Base.update(null, { 85Clipperz.PM.BookmarkletProcessor.prototype = MochiKit.Base.update(null, {
89 86
90 'toString': function() { 87 'toString': function() {
91 return "BookmarkletProcessor - " + this.user(); 88 return "BookmarkletProcessor - " + this.user();
92 }, 89 },
93 90
94 //------------------------------------------------------------------------- 91 //-------------------------------------------------------------------------
95 92
96 'user': function() { 93 'user': function() {
97 return this._user; 94 return this._user;
98 }, 95 },
99 96
100 //------------------------------------------------------------------------- 97 //-------------------------------------------------------------------------
101 98
102 'configuration': function() { 99 'configuration': function() {
103 return this._configuration; 100 return this._configuration;
104 }, 101 },
105 102
106 //------------------------------------------------------------------------- 103 //-------------------------------------------------------------------------
107 104
108 'recordTitle': function() { 105 'recordTitle': function() {
109 if (this._recordTitle == null) { 106 if (this._recordTitle == null) {
110 this._recordTitle = this.configuration().page.title; 107 this._recordTitle = this.configuration().page.title;
111 } 108 }
112 109
113 return this._recordTitle; 110 return this._recordTitle;
114 }, 111 },
115 112
116 //------------------------------------------------------------------------- 113 //-------------------------------------------------------------------------
117 114
118 'fields': function() { 115 'fields': function() {
119 return this.configuration().form.inputs; 116 return this.configuration().form.inputs;
120 }, 117 },
121 118
122 //------------------------------------------------------------------------- 119 //-------------------------------------------------------------------------
123 120
124 'editableFields': function() { 121 'editableFields': function() {
125 if (this._editableFields == null) { 122 if (this._editableFields == null) {
126 this._editableFields = MochiKit.Base.filter(function(aField) { 123 this._editableFields = MochiKit.Base.filter(function(aField) {
127 var result; 124 var result;
128 var type; 125 var type;
129 126
130 type = aField['type'].toLowerCase(); 127 type = aField['type'].toLowerCase();
131 result = ((type != 'hidden') && (type != 'submit') && (type != 'checkbox') && (type != 'radio') && (type != 'select')); 128 result = ((type != 'hidden') && (type != 'submit') && (type != 'checkbox') && (type != 'radio') && (type != 'select'));
132 129
133 return result; 130 return result;
134 }, this.fields()) 131 }, this.fields())
135 } 132 }
136 133
137 return this._editableFields; 134 return this._editableFields;
138 }, 135 },
139 136
140 //------------------------------------------------------------------------- 137 //-------------------------------------------------------------------------
141 138
142 'hostname': function() { 139 'hostname': function() {
143 if (this._hostname == null) { 140 if (this._hostname == null) {
144 var actionUrl; 141 var actionUrl;
145 142
146 actionUrl = this.configuration()['form']['attributes']['action']; 143 actionUrl = this.configuration()['form']['attributes']['action'];
147//MochiKit.Logging.logDebug("+++ actionUrl: " + actionUrl); 144//MochiKit.Logging.logDebug("+++ actionUrl: " + actionUrl);
148 this._hostname = actionUrl.replace(/^https?:\/\/([^\/]*)\/.*/, '$1'); 145 this._hostname = actionUrl.replace(/^https?:\/\/([^\/]*)\/.*/, '$1');
149 } 146 }
150 147
151 return this._hostname; 148 return this._hostname;
152 }, 149 },
153 150
154 'favicon': function() { 151 'favicon': function() {
155 if (this._favicon == null) { 152 if (this._favicon == null) {
156 this._favicon = "http://" + this.hostname() + "/favicon.ico"; 153 this._favicon = "http://" + this.hostname() + "/favicon.ico";
157//MochiKit.Logging.logDebug("+++ favicon: " + this._favicon); 154//MochiKit.Logging.logDebug("+++ favicon: " + this._favicon);
158 } 155 }
159 156
160 return this._favicon; 157 return this._favicon;
161 }, 158 },
162 159
163 //------------------------------------------------------------------------- 160 //-------------------------------------------------------------------------
164 161
165 'record': function() { 162 'record': function() {
166 if (this._record == null) { 163 if (this._record == null) {
167 var record; 164 var record;
168 var recordVersion; 165 var recordVersion;
169 var directLogin; 166 var directLogin;
170 var bindings; 167 var bindings;
171 var i,c; 168 var i,c;
172 169
173 record = new Clipperz.PM.DataModel.Record({ 170 record = new Clipperz.PM.DataModel.Record({
174 label:this.recordTitle(), 171 label:this.recordTitle(),
175 notes:"", 172 notes:"",
176 user:this.user() 173 user:this.user()
177 }); 174 });
178 recordVersion = new Clipperz.PM.DataModel.RecordVersion(record, {}) 175 recordVersion = new Clipperz.PM.DataModel.RecordVersion(record, {})
179 record.setCurrentVersion(recordVersion); 176 record.setCurrentVersion(recordVersion);
180 177
181 bindings = {}; 178 bindings = {};
182 179
183 c = this.editableFields().length; 180 c = this.editableFields().length;
184 for (i=0; i<c; i++) { 181 for (i=0; i<c; i++) {
185 var formField; 182 var formField;
186 var recordField; 183 var recordField;
187 184
188//MochiKit.Logging.logDebug(">>> adding a field"); 185//MochiKit.Logging.logDebug(">>> adding a field");
189 formField = this.editableFields()[i]; 186 formField = this.editableFields()[i];
190 recordField = new Clipperz.PM.DataModel.RecordField({ 187 recordField = new Clipperz.PM.DataModel.RecordField({
191 recordVersion:recordVersion, 188 recordVersion:recordVersion,
192 label:formField['name'], 189 label:formField['name'],
193 value:formField['value'], 190 value:formField['value'],
194 type:Clipperz.PM.Strings.inputTypeToRecordFieldType[formField['type']], 191 type:Clipperz.PM.Strings.inputTypeToRecordFieldType[formField['type']],
195 hidden:false 192 hidden:false
196 }); 193 });
197 recordVersion.addField(recordField); 194 recordVersion.addField(recordField);
198 195
199 bindings[formField['name']] = recordField.key(); 196 bindings[formField['name']] = recordField.key();
200//MochiKit.Logging.logDebug("<<< adding a field"); 197//MochiKit.Logging.logDebug("<<< adding a field");
201 } 198 }
202 199
203 directLogin = new Clipperz.PM.DataModel.DirectLogin({ 200 directLogin = new Clipperz.PM.DataModel.DirectLogin({
204 record:record, 201 record:record,
205 label:this.recordTitle() + Clipperz.PM.Strings['newDirectLoginLabelSuffix'], 202 label:this.recordTitle() + Clipperz.PM.Strings['newDirectLoginLabelSuffix'],
206 // bookmarkletVersion:this.version(), 203 // bookmarkletVersion:this.version(),
207 bookmarkletVersion:'0.2', 204 bookmarkletVersion:'0.2',
208 favicon:this.favicon(), 205 favicon:this.favicon(),
209 formData:this.configuration()['form'], 206 formData:this.configuration()['form'],
210 bindingData:bindings 207 bindingData:bindings
211 }); 208 });
212 record.addDirectLogin(directLogin); 209 record.addDirectLogin(directLogin);
213 210
214 this.user().addRecord(record); 211 this.user().addRecord(record);
215 212
216 this._record = record; 213 this._record = record;
217 } 214 }
218 215
219 return this._record; 216 return this._record;
220 }, 217 },
221 218
222 //------------------------------------------------------------------------- 219 //-------------------------------------------------------------------------
223 __syntaxFix__: "syntax fix" 220 __syntaxFix__: "syntax fix"
224}); 221});
225 222
226//############################################################################# 223//#############################################################################
227 224
228Clipperz.PM.BookmarkletProcessor.createRecordFromBookmarkletConfiguration = function(anUser, aConfiguration) { 225Clipperz.PM.BookmarkletProcessor.createRecordFromBookmarkletConfiguration = function(anUser, aConfiguration) {
229 var processor; 226 var processor;
230 227
231 processor = new Clipperz.PM.BookmarkletProcessor(anUser, aConfiguration); 228 processor = new Clipperz.PM.BookmarkletProcessor(anUser, aConfiguration);
232 229
233 return processor.record(); 230 return processor.record();
234}; 231};
235 232
236//----------------------------------------------------------------------------- 233//-----------------------------------------------------------------------------
237 234
238Clipperz.PM.BookmarkletProcessor.sanitizeBookmarkletConfiguration = function(aConfiguration) { 235Clipperz.PM.BookmarkletProcessor.sanitizeBookmarkletConfiguration = function(aConfiguration) {
239 var result; 236 var result;
240 237
241 //throw "XSS Bookmarklet attempt"; 238 //throw "XSS Bookmarklet attempt";
242 239
243 result = aConfiguration; 240 result = aConfiguration;
244 241
245 return result; 242 return result;
246}; 243};
247 244
248//----------------------------------------------------------------------------- 245//-----------------------------------------------------------------------------
249 246
250Clipperz.PM.BookmarkletProcessor.checkBookmarkletConfiguration = function(aConfiguration, aButton, aCallback) { 247Clipperz.PM.BookmarkletProcessor.checkBookmarkletConfiguration = function(aConfiguration, aButton, aCallback) {
251 var result; 248 var result;
252 249
253 try { 250 try {
254 result = Clipperz.Base.evalJSON(aConfiguration); 251 result = Clipperz.Base.evalJSON(aConfiguration);
255 result = Clipperz.PM.BookmarkletProcessor.sanitizeBookmarkletConfiguration(result); 252 result = Clipperz.PM.BookmarkletProcessor.sanitizeBookmarkletConfiguration(result);
256 253
257 if (result['version'] != '0.2.3') { 254 if (result['version'] != '0.2.3') {
258 throw "WrongBookmarkletVersion"; 255 throw "WrongBookmarkletVersion";
259 } 256 }
260 } catch (exception) { 257 } catch (exception) {
261 var title; 258 var title;
262 var message; 259 var message;
263 260
264 if (exception == "WrongBookmarkletVersion") { 261 if (exception == "WrongBookmarkletVersion") {
265 title = Clipperz.PM.Strings['newRecordPanelWrongBookmarkletVersionExceptionTitle']; 262 title = Clipperz.PM.Strings['newRecordPanelWrongBookmarkletVersionExceptionTitle'];
266 message = Clipperz.PM.Strings['newRecordPanelWrongBookmarkletVersionExceptionMessage']; 263 message = Clipperz.PM.Strings['newRecordPanelWrongBookmarkletVersionExceptionMessage'];
267 } else { 264 } else {
268 title = Clipperz.PM.Strings['newRecordPanelGeneralExceptionTitle']; 265 title = Clipperz.PM.Strings['newRecordPanelGeneralExceptionTitle'];
269 message = Clipperz.PM.Strings['newRecordPanelGeneralExceptionMessage']; 266 message = Clipperz.PM.Strings['newRecordPanelGeneralExceptionMessage'];
270 } 267 }
271 Clipperz.PM.Components.MessageBox().show({ 268 Clipperz.PM.Components.MessageBox().show({
272 title:title, 269 title:title,
273 text:message, 270 text:message,
274 width:240, 271 width:240,
275 fn:aCallback, 272 fn:aCallback,
276 closable:false, 273 closable:false,
277 showProgressBar:false, 274 showProgressBar:false,
278 showCloseButton:false, 275 showCloseButton:false,
279 buttons:{'ok':Clipperz.PM.Strings['newRecordPanelExceptionPanelCloseButtonLabel']} 276 buttons:{'ok':Clipperz.PM.Strings['newRecordPanelExceptionPanelCloseButtonLabel']}
280 }, aButton); 277 }, aButton);
281 278
282 throw exception; 279 throw exception;
283 } 280 }
284 281
285 return result; 282 return result;
286}; 283};
287 284
288//----------------------------------------------------------------------------- 285//-----------------------------------------------------------------------------
diff --git a/frontend/beta/js/Clipperz/PM/Components/BaseComponent.js b/frontend/beta/js/Clipperz/PM/Components/BaseComponent.js
index 67e257b..f3a3902 100644
--- a/frontend/beta/js/Clipperz/PM/Components/BaseComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/BaseComponent.js
@@ -1,124 +1,121 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32 29
33//############################################################################# 30//#############################################################################
34 31
35var _Clipperz_PM_Components_Panels_base_id_ = 0; 32var _Clipperz_PM_Components_Panels_base_id_ = 0;
36 33
37//############################################################################# 34//#############################################################################
38 35
39Clipperz.PM.Components.BaseComponent = function(anElement, args) { 36Clipperz.PM.Components.BaseComponent = function(anElement, args) {
40 args = args || {}; 37 args = args || {};
41 //MochiKit.Base.bindMethods(this); 38 //MochiKit.Base.bindMethods(this);
42 //Clipperz.PM.Components.BaseComponent.superclass.constructor.call(this, args); 39 //Clipperz.PM.Components.BaseComponent.superclass.constructor.call(this, args);
43 40
44 this._element = anElement; 41 this._element = anElement;
45 this._ids = {}; 42 this._ids = {};
46 43
47 return this; 44 return this;
48} 45}
49 46
50//============================================================================= 47//=============================================================================
51 48
52//MochiKit.Base.update(Clipperz.PM.Components.BaseComponent.prototype, { 49//MochiKit.Base.update(Clipperz.PM.Components.BaseComponent.prototype, {
53YAHOO.extendX(Clipperz.PM.Components.BaseComponent, YAHOO.ext.util.Observable, { 50YAHOO.extendX(Clipperz.PM.Components.BaseComponent, YAHOO.ext.util.Observable, {
54 51
55 'isClipperzPMComponent': true, 52 'isClipperzPMComponent': true,
56 53
57 //------------------------------------------------------------------------- 54 //-------------------------------------------------------------------------
58 55
59 'toString': function () { 56 'toString': function () {
60 return "Clipperz.PM.Components.BaseComponent component"; 57 return "Clipperz.PM.Components.BaseComponent component";
61 }, 58 },
62 59
63 //------------------------------------------------------------------------- 60 //-------------------------------------------------------------------------
64 61
65 'domHelper': function() { 62 'domHelper': function() {
66 return Clipperz.YUI.DomHelper; 63 return Clipperz.YUI.DomHelper;
67 }, 64 },
68 65
69 //------------------------------------------------------------------------- 66 //-------------------------------------------------------------------------
70 67
71 'element': function() { 68 'element': function() {
72//MochiKit.Logging.logDebug(">>> BaseComponent.element"); 69//MochiKit.Logging.logDebug(">>> BaseComponent.element");
73 return this._element; 70 return this._element;
74 }, 71 },
75 72
76 'setElement': function(aValue) { 73 'setElement': function(aValue) {
77 this._element = aValue; 74 this._element = aValue;
78 }, 75 },
79 76
80 //----------------------------------------------------- 77 //-----------------------------------------------------
81 78
82 'remove': function() { 79 'remove': function() {
83//MochiKit.Logging.logDebug(">>> BaseComponent.remove"); 80//MochiKit.Logging.logDebug(">>> BaseComponent.remove");
84 Clipperz.NotificationCenter.unregister(this); 81 Clipperz.NotificationCenter.unregister(this);
85 MochiKit.Signal.disconnectAllTo(this); 82 MochiKit.Signal.disconnectAllTo(this);
86//MochiKit.Logging.logDebug("<<< BaseComponent.remove"); 83//MochiKit.Logging.logDebug("<<< BaseComponent.remove");
87 }, 84 },
88 85
89 //------------------------------------------------------------------------- 86 //-------------------------------------------------------------------------
90 87
91 'getId': function(aValue) { 88 'getId': function(aValue) {
92 varresult; 89 varresult;
93 90
94 result = this._ids[aValue]; 91 result = this._ids[aValue];
95 92
96 if (typeof(result) == 'undefined') { 93 if (typeof(result) == 'undefined') {
97 _Clipperz_PM_Components_Panels_base_id_ ++; 94 _Clipperz_PM_Components_Panels_base_id_ ++;
98 95
99 result = "Clipperz_PM_Components_Panels_" + aValue + "_" + _Clipperz_PM_Components_Panels_base_id_; 96 result = "Clipperz_PM_Components_Panels_" + aValue + "_" + _Clipperz_PM_Components_Panels_base_id_;
100 this._ids[aValue] = result; 97 this._ids[aValue] = result;
101//MochiKit.Logging.logDebug(">>> getId(" + aValue + ") = " + result); 98//MochiKit.Logging.logDebug(">>> getId(" + aValue + ") = " + result);
102 } else { 99 } else {
103//MochiKit.Logging.logDebug("<<< getId(" + aValue + ") = " + result); 100//MochiKit.Logging.logDebug("<<< getId(" + aValue + ") = " + result);
104 } 101 }
105 102
106 return result; 103 return result;
107 }, 104 },
108 105
109 'getDom': function(aValue) { 106 'getDom': function(aValue) {
110 return YAHOO.util.Dom.get(this.getId(aValue)); 107 return YAHOO.util.Dom.get(this.getId(aValue));
111 }, 108 },
112 109
113 'getElement': function(aValue) { 110 'getElement': function(aValue) {
114 return YAHOO.ext.Element.get(this.getId(aValue)); 111 return YAHOO.ext.Element.get(this.getId(aValue));
115 }, 112 },
116 113
117 'getActor': function(aValue, anAnimator) { 114 'getActor': function(aValue, anAnimator) {
118 return new YAHOO.ext.Actor(this.getDom(aValue), anAnimator); 115 return new YAHOO.ext.Actor(this.getDom(aValue), anAnimator);
119 }, 116 },
120 117
121 //------------------------------------------------------------------------- 118 //-------------------------------------------------------------------------
122 __syntaxFix__: "syntax fix" 119 __syntaxFix__: "syntax fix"
123 120
124}); 121});
diff --git a/frontend/beta/js/Clipperz/PM/Components/Compact/CompactHeader.js b/frontend/beta/js/Clipperz/PM/Components/Compact/CompactHeader.js
index e51b56f..7a3b3a3 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Compact/CompactHeader.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Compact/CompactHeader.js
@@ -1,86 +1,83 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; } 29if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; }
33 30
34Clipperz.PM.Components.Compact.CompactHeader = function(anElement, args) { 31Clipperz.PM.Components.Compact.CompactHeader = function(anElement, args) {
35 32
36 Clipperz.PM.Components.Compact.CompactHeader.superclass.constructor.call(this, anElement, args); 33 Clipperz.PM.Components.Compact.CompactHeader.superclass.constructor.call(this, anElement, args);
37 34
38 this.render(); 35 this.render();
39 36
40 return this; 37 return this;
41}; 38};
42 39
43YAHOO.extendX(Clipperz.PM.Components.Compact.CompactHeader, Clipperz.PM.Components.BaseComponent, { 40YAHOO.extendX(Clipperz.PM.Components.Compact.CompactHeader, Clipperz.PM.Components.BaseComponent, {
44 41
45 'toString': function() { 42 'toString': function() {
46 return "Clipperz.PM.Components.Compact.CompactHeader"; 43 return "Clipperz.PM.Components.Compact.CompactHeader";
47 }, 44 },
48 45
49 //----------------------------------------------------- 46 //-----------------------------------------------------
50 47
51 'render': function() { 48 'render': function() {
52 this.element().update(""); 49 this.element().update("");
53 50
54 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', children:[ 51 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', children:[
55 {tag:'img', src:'./images/logo.gif'}, 52 {tag:'img', src:'./images/logo.gif'},
56 {tag:'div', id:'lockBlock', children:[ 53 {tag:'div', id:'lockBlock', children:[
57 {tag:'input', type:'checkbox', id:'autolock'}, 54 {tag:'input', type:'checkbox', id:'autolock'},
58 {tag:'span', html:'auto'}, 55 {tag:'span', html:'auto'},
59 {tag:'a', href:'#', htmlString:Clipperz.PM.Strings['lockMenuLabel'], id:'lock'} 56 {tag:'a', href:'#', htmlString:Clipperz.PM.Strings['lockMenuLabel'], id:'lock'}
60 ]} 57 ]}
61 ]}); 58 ]});
62 59
63 Clipperz.YUI.DomHelper.append(this.element().dom, 60 Clipperz.YUI.DomHelper.append(this.element().dom,
64 {tag:'div', id:'compactMiscLinks', children:[ 61 {tag:'div', id:'compactMiscLinks', children:[
65 {tag:'a', id:'donateHeaderIconLink', target:'_blank', href:Clipperz.PM.Strings['donateHeaderLinkUrl'], children:[ 62 {tag:'a', id:'donateHeaderIconLink', target:'_blank', href:Clipperz.PM.Strings['donateHeaderLinkUrl'], children:[
66 {tag:'img', id:'donateHeaderLinkIcon', src:'./images/smiles_small.gif'} 63 {tag:'img', id:'donateHeaderLinkIcon', src:'./images/smiles_small.gif'}
67 ]}, 64 ]},
68 {tag:'ul', children:[ 65 {tag:'ul', children:[
69 {tag:'li', children:[{tag:'a', id:'donateHeaderLink', html:'donate', target:'_blank'}]}, 66 {tag:'li', children:[{tag:'a', id:'donateHeaderLink', html:'donate', target:'_blank'}]},
70 {tag:'li', children:[{tag:'a', id:'creditsHeaderLink', html:'credits', target:'_blank'}]}, 67 {tag:'li', children:[{tag:'a', id:'creditsHeaderLink', html:'credits', target:'_blank'}]},
71 {tag:'li', children:[{tag:'a', id:'feedbackHeaderLink', html:'feedback', target:'_blank'}]}, 68 {tag:'li', children:[{tag:'a', id:'feedbackHeaderLink', html:'feedback', target:'_blank'}]},
72 {tag:'li', children:[{tag:'a', id:'helpHeaderLink', html:'help', target:'_blank'}]}, 69 {tag:'li', children:[{tag:'a', id:'helpHeaderLink', html:'help', target:'_blank'}]},
73 {tag:'li', children:[{tag:'a', id:'forumHeaderLink', html:'forum', target:'_blank'}]} 70 {tag:'li', children:[{tag:'a', id:'forumHeaderLink', html:'forum', target:'_blank'}]}
74 ]} 71 ]}
75 ]} 72 ]}
76 ); 73 );
77 74
78 YAHOO.ext.Element.get('lockBlock').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 75 YAHOO.ext.Element.get('lockBlock').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
79 Clipperz.NotificationCenter.notify(this, 'switchLanguage'); 76 Clipperz.NotificationCenter.notify(this, 'switchLanguage');
80 }, 77 },
81 78
82 //----------------------------------------------------- 79 //-----------------------------------------------------
83 __syntaxFix__: '__syntaxFix__' 80 __syntaxFix__: '__syntaxFix__'
84}); 81});
85 82
86 83
diff --git a/frontend/beta/js/Clipperz/PM/Components/Compact/CompactInterface.js b/frontend/beta/js/Clipperz/PM/Components/Compact/CompactInterface.js
index 492f815..0f6858a 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Compact/CompactInterface.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Compact/CompactInterface.js
@@ -1,312 +1,309 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; } 29if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; }
33 30
34Clipperz.PM.Components.Compact.CompactInterface = function(anElement, args) { 31Clipperz.PM.Components.Compact.CompactInterface = function(anElement, args) {
35 32
36 Clipperz.PM.Components.Compact.CompactInterface.superclass.constructor.call(this, anElement, args); 33 Clipperz.PM.Components.Compact.CompactInterface.superclass.constructor.call(this, anElement, args);
37 34
38 this._directLoginItemTemplate = null; 35 this._directLoginItemTemplate = null;
39 this._user = args.user; 36 this._user = args.user;
40 this._autoLockTimer = null; 37 this._autoLockTimer = null;
41 38
42 Clipperz.NotificationCenter.register(null, 'updatedProgressState', this, 'userNotificationHandler') 39 Clipperz.NotificationCenter.register(null, 'updatedProgressState', this, 'userNotificationHandler')
43 Clipperz.NotificationCenter.register(null, 'directLoginAdded', this, 'directLoginAddedHandler'); 40 Clipperz.NotificationCenter.register(null, 'directLoginAdded', this, 'directLoginAddedHandler');
44 41
45 this.render(); 42 this.render();
46 43
47 return this; 44 return this;
48}; 45};
49 46
50YAHOO.extendX(Clipperz.PM.Components.Compact.CompactInterface, Clipperz.PM.Components.BaseComponent, { 47YAHOO.extendX(Clipperz.PM.Components.Compact.CompactInterface, Clipperz.PM.Components.BaseComponent, {
51 48
52 'toString': function() { 49 'toString': function() {
53 return "Clipperz.PM.Components.Compact.CompactInterface"; 50 return "Clipperz.PM.Components.Compact.CompactInterface";
54 }, 51 },
55 52
56 //----------------------------------------------------- 53 //-----------------------------------------------------
57 54
58 'render': function() { 55 'render': function() {
59 var result; 56 var result;
60 varlayout; 57 varlayout;
61 var registerButton; 58 var registerButton;
62 59
63//MochiKit.Logging.logDebug(">>> CompactInterface.render"); 60//MochiKit.Logging.logDebug(">>> CompactInterface.render");
64 this.element().update(""); 61 this.element().update("");
65 62
66 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', children:[ 63 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', children:[
67 {tag:'div', id:this.getId('cantentPanel'), children:[ 64 {tag:'div', id:this.getId('cantentPanel'), children:[
68 {tag:'h4', id:this.getId('message')}, 65 {tag:'h4', id:this.getId('message')},
69 {tag:'ul', id:'directLogins', children:[]} 66 {tag:'ul', id:'directLogins', children:[]}
70 ]}, 67 ]},
71 {tag:'div', id:this.getId('lockPanel'), cls:'lockPanel', children:[ 68 {tag:'div', id:this.getId('lockPanel'), cls:'lockPanel', children:[
72 {tag:'div', htmlString:Clipperz.PM.Strings['lockDescription']}, 69 {tag:'div', htmlString:Clipperz.PM.Strings['lockDescription']},
73 {tag:'form', id:'lockDialogForm', children:[ 70 {tag:'form', id:'lockDialogForm', children:[
74 {tag:'input', type:'password', id:this.getId('lockPassphrase')} 71 {tag:'input', type:'password', id:this.getId('lockPassphrase')}
75 ]}, 72 ]},
76 {tag:'div', id:this.getId('unlock')} 73 {tag:'div', id:this.getId('unlock')}
77 ]} 74 ]}
78 ]}); 75 ]});
79 76
80 this.getElement('lockPanel').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 77 this.getElement('lockPanel').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
81 78
82 YAHOO.ext.Element.get('lockBlock').show(); 79 YAHOO.ext.Element.get('lockBlock').show();
83 MochiKit.Signal.connect(YAHOO.ext.Element.get('lock').dom, 'onclick', this, 'doLockEventHandler'); 80 MochiKit.Signal.connect(YAHOO.ext.Element.get('lock').dom, 'onclick', this, 'doLockEventHandler');
84 new YAHOO.ext.Button(this.getId('unlock'), {text:Clipperz.PM.Strings['unlockButtonLabel'], handler:this.doUnlockEventHandler, scope:this, minWidth:0}); 81 new YAHOO.ext.Button(this.getId('unlock'), {text:Clipperz.PM.Strings['unlockButtonLabel'], handler:this.doUnlockEventHandler, scope:this, minWidth:0});
85 this.getElement('unlock').swallowEvent('click', true); 82 this.getElement('unlock').swallowEvent('click', true);
86 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('lockPassphrase')); 83 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('lockPassphrase'));
87 MochiKit.Signal.connect('lockDialogForm', 'onsubmit', this, 'doUnlockEventHandler'); 84 MochiKit.Signal.connect('lockDialogForm', 'onsubmit', this, 'doUnlockEventHandler');
88 85
89 this.getElement('cantentPanel').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 86 this.getElement('cantentPanel').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
90//MochiKit.Logging.logDebug("<<< CompactInterface.render"); 87//MochiKit.Logging.logDebug("<<< CompactInterface.render");
91 88
92 return result; 89 return result;
93 }, 90 },
94 91
95 //----------------------------------------------------- 92 //-----------------------------------------------------
96 93
97 'directLoginAddedHandler': function(anEvent) { 94 'directLoginAddedHandler': function(anEvent) {
98 this.redrawDirectLoginItems(); 95 this.redrawDirectLoginItems();
99 }, 96 },
100 97
101 //----------------------------------------------------- 98 //-----------------------------------------------------
102 99
103 'compareDirectLogins': function(a, b) { 100 'compareDirectLogins': function(a, b) {
104 return MochiKit.Base.compare(a.label().toLowerCase(), b.label().toLowerCase()); 101 return MochiKit.Base.compare(a.label().toLowerCase(), b.label().toLowerCase());
105 }, 102 },
106 103
107 //----------------------------------------------------- 104 //-----------------------------------------------------
108 105
109 'redrawDirectLoginItems': function() { 106 'redrawDirectLoginItems': function() {
110 var template; 107 var template;
111 var allDirectLogins; 108 var allDirectLogins;
112 109
113 this.getElement('message').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 110 this.getElement('message').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
114//MochiKit.Logging.logDebug(">>> CompactInterface.redrawDirectLoginItems"); 111//MochiKit.Logging.logDebug(">>> CompactInterface.redrawDirectLoginItems");
115//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 0"); 112//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 0");
116 MochiKit.Iter.forEach(YAHOO.ext.Element.get('directLogins').getChildrenByTagName('li'), function(aDirectLoginElement) { 113 MochiKit.Iter.forEach(YAHOO.ext.Element.get('directLogins').getChildrenByTagName('li'), function(aDirectLoginElement) {
117 MochiKit.Signal.disconnectAll(aDirectLoginElement.dom); 114 MochiKit.Signal.disconnectAll(aDirectLoginElement.dom);
118//MochiKit.Logging.logDebug("disconnecting IMG " + aDirectLoginElement.getChildrenByTagName('img')[0].dom.src); 115//MochiKit.Logging.logDebug("disconnecting IMG " + aDirectLoginElement.getChildrenByTagName('img')[0].dom.src);
119 MochiKit.Signal.disconnectAll(aDirectLoginElement.getChildrenByTagName('img')[0].dom); 116 MochiKit.Signal.disconnectAll(aDirectLoginElement.getChildrenByTagName('img')[0].dom);
120 }) 117 })
121//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 1"); 118//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 1");
122 YAHOO.ext.Element.get('directLogins').update(""); 119 YAHOO.ext.Element.get('directLogins').update("");
123//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 2"); 120//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 2");
124 allDirectLogins = MochiKit.Base.values(this.user().directLoginReferences()); 121 allDirectLogins = MochiKit.Base.values(this.user().directLoginReferences());
125//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 3"); 122//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 3");
126 allDirectLogins.sort(this.compareDirectLogins); 123 allDirectLogins.sort(this.compareDirectLogins);
127 124
128//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 4"); 125//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 4");
129 template = this.directLoginItemTemplate(); 126 template = this.directLoginItemTemplate();
130//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 5"); 127//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 5");
131 MochiKit.Iter.forEach(allDirectLogins, MochiKit.Base.bind(function(aDirectLogin) { 128 MochiKit.Iter.forEach(allDirectLogins, MochiKit.Base.bind(function(aDirectLogin) {
132 vardirectLoginElement; 129 vardirectLoginElement;
133 varfaviconImageElementID; 130 varfaviconImageElementID;
134 131
135 faviconImageElementID = aDirectLogin.reference() + "_faviconIMG"; 132 faviconImageElementID = aDirectLogin.reference() + "_faviconIMG";
136 directLoginElement = template.append('directLogins', { 133 directLoginElement = template.append('directLogins', {
137 elementID:faviconImageElementID, 134 elementID:faviconImageElementID,
138 faviconUrl:aDirectLogin.fixedFavicon(), 135 faviconUrl:aDirectLogin.fixedFavicon(),
139 directLoginTitle:aDirectLogin.label(), 136 directLoginTitle:aDirectLogin.label(),
140 directLoginReference:aDirectLogin.reference() 137 directLoginReference:aDirectLogin.reference()
141 }, true); 138 }, true);
142//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 6: " + recordElement.dom); 139//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 6: " + recordElement.dom);
143 directLoginElement.addClassOnOver("hover"); 140 directLoginElement.addClassOnOver("hover");
144 MochiKit.Signal.connect(directLoginElement.dom, 'onclick', this, 'handleDirectLoginClick'); 141 MochiKit.Signal.connect(directLoginElement.dom, 'onclick', this, 'handleDirectLoginClick');
145 142
146 MochiKit.Signal.connect(faviconImageElementID, 'onload', this, 'handleLoadedFaviconImage'); 143 MochiKit.Signal.connect(faviconImageElementID, 'onload', this, 'handleLoadedFaviconImage');
147 MochiKit.Signal.connect(faviconImageElementID, 'onerror', aDirectLogin, 'handleMissingFaviconImage'); 144 MochiKit.Signal.connect(faviconImageElementID, 'onerror', aDirectLogin, 'handleMissingFaviconImage');
148 MochiKit.Signal.connect(faviconImageElementID, 'onabort', aDirectLogin, 'handleMissingFaviconImage'); 145 MochiKit.Signal.connect(faviconImageElementID, 'onabort', aDirectLogin, 'handleMissingFaviconImage');
149 146
150 // YAHOO.ext.Element.get(faviconImageElementID).dom.src = aDirectLogin.fixedFavicon(); 147 // YAHOO.ext.Element.get(faviconImageElementID).dom.src = aDirectLogin.fixedFavicon();
151 }, this)); 148 }, this));
152 149
153 this.resetAutoLockTimer(); 150 this.resetAutoLockTimer();
154//MochiKit.Logging.logDebug("<<< CompactInterface.redrawDirectLoginItems"); 151//MochiKit.Logging.logDebug("<<< CompactInterface.redrawDirectLoginItems");
155 }, 152 },
156 153
157 //----------------------------------------------------- 154 //-----------------------------------------------------
158 155
159 'directLoginItemTemplate': function() { 156 'directLoginItemTemplate': function() {
160 if (this._directLoginItemTemplate == null) { 157 if (this._directLoginItemTemplate == null) {
161 this._directLoginItemTemplate = Clipperz.YUI.DomHelper.createTemplate({tag:'li', id:'{directLoginReference}', children:[ 158 this._directLoginItemTemplate = Clipperz.YUI.DomHelper.createTemplate({tag:'li', id:'{directLoginReference}', children:[
162 {tag:'table', border:'0', cellpadding:'0', cellspacing:'0', children:[ 159 {tag:'table', border:'0', cellpadding:'0', cellspacing:'0', children:[
163 {tag:'tbody', children:[ 160 {tag:'tbody', children:[
164 {tag:'tr', children:[ 161 {tag:'tr', children:[
165 {tag:'td', width:'20', align:'center', valign:'top', children:[ 162 {tag:'td', width:'20', align:'center', valign:'top', children:[
166 {tag:'img', id:'{elementID}', src:'{faviconUrl}'} 163 {tag:'img', id:'{elementID}', src:'{faviconUrl}'}
167 ]}, 164 ]},
168 {tag:'td', valign:'top', children:[ 165 {tag:'td', valign:'top', children:[
169 {tag:'a', cls:'directLoginItemTitle', html:'{directLoginTitle}'} 166 {tag:'a', cls:'directLoginItemTitle', html:'{directLoginTitle}'}
170 ]} 167 ]}
171 ]} 168 ]}
172 ]} 169 ]}
173 ]} 170 ]}
174 ]}); 171 ]});
175 this._directLoginItemTemplate.compile(); 172 this._directLoginItemTemplate.compile();
176 } 173 }
177 174
178 return this._directLoginItemTemplate; 175 return this._directLoginItemTemplate;
179 }, 176 },
180 177
181 //------------------------------------------------------------------------- 178 //-------------------------------------------------------------------------
182 179
183 'handleDirectLoginClick': function(anEvent) { 180 'handleDirectLoginClick': function(anEvent) {
184 vardirectLoginReference; 181 vardirectLoginReference;
185//MochiKit.Logging.logDebug(">>> MainPanel.handleDirectLoginClick !!!"); 182//MochiKit.Logging.logDebug(">>> MainPanel.handleDirectLoginClick !!!");
186 183
187 directLoginReference = this.user().directLoginReferences()[anEvent.src().id]; 184 directLoginReference = this.user().directLoginReferences()[anEvent.src().id];
188 this.openDirectLogin(directLoginReference); 185 this.openDirectLogin(directLoginReference);
189 this.resetAutoLockTimer(); 186 this.resetAutoLockTimer();
190 //MochiKit.Logging.logDebug("<<< MainPanel.handleDirectLoginClick"); 187 //MochiKit.Logging.logDebug("<<< MainPanel.handleDirectLoginClick");
191 }, 188 },
192 189
193 //----------------------------------------------------- 190 //-----------------------------------------------------
194 191
195 'openDirectLogin': function(aDirectLoginReference) { 192 'openDirectLogin': function(aDirectLoginReference) {
196 vardeferredResult; 193 vardeferredResult;
197 varnewWindow; 194 varnewWindow;
198 195
199//MochiKit.Logging.logDebug(">>> MainPanel.openDirectLogin - " + aDirectLoginReference.label()); 196//MochiKit.Logging.logDebug(">>> MainPanel.openDirectLogin - " + aDirectLoginReference.label());
200 deferredResult = new MochiKit.Async.Deferred(); 197 deferredResult = new MochiKit.Async.Deferred();
201//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.openDirectLogin - 1: " + res); return res;}); 198//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.openDirectLogin - 1: " + res); return res;});
202 deferredResult.addCallback(MochiKit.Base.method(aDirectLoginReference, 'setupJumpPageWindow')); 199 deferredResult.addCallback(MochiKit.Base.method(aDirectLoginReference, 'setupJumpPageWindow'));
203 deferredResult.addCallback(MochiKit.Base.method(aDirectLoginReference, 'deferredDirectLogin')); 200 deferredResult.addCallback(MochiKit.Base.method(aDirectLoginReference, 'deferredDirectLogin'));
204 deferredResult.addCallback(function(aDirectLogin) { 201 deferredResult.addCallback(function(aDirectLogin) {
205 aDirectLogin.runDirectLogin(newWindow); 202 aDirectLogin.runDirectLogin(newWindow);
206 }); 203 });
207 204
208 newWindow = window.open(Clipperz.PM.Strings['directLoginJumpPageUrl'], ""); 205 newWindow = window.open(Clipperz.PM.Strings['directLoginJumpPageUrl'], "");
209 // MochiKit.Signal.connect(newWindow, 'onload', MochiKit.Base.method(deferredResult, 'callback', newWindow)) 206 // MochiKit.Signal.connect(newWindow, 'onload', MochiKit.Base.method(deferredResult, 'callback', newWindow))
210 // MochiKit.Signal.connect(newWindow, 'onload', MochiKit.Base.partial(alert, "done")); 207 // MochiKit.Signal.connect(newWindow, 'onload', MochiKit.Base.partial(alert, "done"));
211 deferredResult.callback(newWindow); 208 deferredResult.callback(newWindow);
212//MochiKit.Logging.logDebug("<<< MainPanel.openDirectLogin"); 209//MochiKit.Logging.logDebug("<<< MainPanel.openDirectLogin");
213 }, 210 },
214 211
215 //------------------------------------------------------------------------- 212 //-------------------------------------------------------------------------
216 213
217 'handleLoadedFaviconImage': function(anEvent) { 214 'handleLoadedFaviconImage': function(anEvent) {
218//MochiKit.Logging.logDebug(">>> MainPanel.handleLoadedFaviconImage"); 215//MochiKit.Logging.logDebug(">>> MainPanel.handleLoadedFaviconImage");
219 MochiKit.Signal.disconnectAll(anEvent.src()) 216 MochiKit.Signal.disconnectAll(anEvent.src())
220//MochiKit.Logging.logDebug("<<< MainPanel.handleLoadedFaviconImage"); 217//MochiKit.Logging.logDebug("<<< MainPanel.handleLoadedFaviconImage");
221 }, 218 },
222 219
223 //------------------------------------------------------------------------- 220 //-------------------------------------------------------------------------
224 221
225 'doLockEventHandler': function(anEvent) { 222 'doLockEventHandler': function(anEvent) {
226 anEvent.stop(); 223 anEvent.stop();
227 this.lock(); 224 this.lock();
228 }, 225 },
229 226
230 'doUnlockEventHandler': function(anEvent) { 227 'doUnlockEventHandler': function(anEvent) {
231 if (typeof(anEvent.stop) != 'undefined') { 228 if (typeof(anEvent.stop) != 'undefined') {
232 anEvent.stop(); 229 anEvent.stop();
233 } 230 }
234 this.unlock(); 231 this.unlock();
235 }, 232 },
236 233
237 //------------------------------------------------------------------------- 234 //-------------------------------------------------------------------------
238 235
239 'autolock': function() { 236 'autolock': function() {
240 varshouldAutoLock; 237 varshouldAutoLock;
241 238
242 shouldAutoLock = YAHOO.ext.Element.get('autolock').dom.checked; 239 shouldAutoLock = YAHOO.ext.Element.get('autolock').dom.checked;
243 240
244 if (shouldAutoLock) { 241 if (shouldAutoLock) {
245 this.lock(); 242 this.lock();
246 } else { 243 } else {
247 this.resetAutoLockTimer(); 244 this.resetAutoLockTimer();
248 } 245 }
249 }, 246 },
250 247
251 'lock': function() { 248 'lock': function() {
252//MochiKit.Logging.logDebug(">>> lock"); 249//MochiKit.Logging.logDebug(">>> lock");
253 this.getDom('lockPassphrase').value = ""; 250 this.getDom('lockPassphrase').value = "";
254 this.getElement('lockPanel').show(); 251 this.getElement('lockPanel').show();
255 this.getElement('cantentPanel').hide(); 252 this.getElement('cantentPanel').hide();
256 YAHOO.ext.Element.get('lockBlock').hide(); 253 YAHOO.ext.Element.get('lockBlock').hide();
257 //this.getElement('lockPassphrase').focus(); 254 //this.getElement('lockPassphrase').focus();
258//MochiKit.Logging.logDebug("<<< lock"); 255//MochiKit.Logging.logDebug("<<< lock");
259 }, 256 },
260 257
261 'unlock': function(anEvent) { 258 'unlock': function(anEvent) {
262//MochiKit.Logging.logDebug(">>> unlock"); 259//MochiKit.Logging.logDebug(">>> unlock");
263 if (this.getDom('lockPassphrase').value == this.user().passphrase()) { 260 if (this.getDom('lockPassphrase').value == this.user().passphrase()) {
264 this.getElement('lockPanel').hide(); 261 this.getElement('lockPanel').hide();
265 this.getElement('cantentPanel').show(); 262 this.getElement('cantentPanel').show();
266 YAHOO.ext.Element.get('lockBlock').show(); 263 YAHOO.ext.Element.get('lockBlock').show();
267 this.resetAutoLockTimer(); 264 this.resetAutoLockTimer();
268 } else { 265 } else {
269 this.getDom('lockPassphrase').value = ""; 266 this.getDom('lockPassphrase').value = "";
270 this.getElement('lockPassphrase').focus(); 267 this.getElement('lockPassphrase').focus();
271 } 268 }
272//MochiKit.Logging.logDebug("<<< unlock"); 269//MochiKit.Logging.logDebug("<<< unlock");
273 }, 270 },
274 271
275 //------------------------------------------------------------------------- 272 //-------------------------------------------------------------------------
276 273
277 'user': function() { 274 'user': function() {
278 return this._user; 275 return this._user;
279 }, 276 },
280 277
281 //----------------------------------------------------- 278 //-----------------------------------------------------
282 279
283 'autoLockTimer': function() { 280 'autoLockTimer': function() {
284 if (this._autoLockTimer == null) { 281 if (this._autoLockTimer == null) {
285//MochiKit.Logging.logDebug("--- timer started - 1"); 282//MochiKit.Logging.logDebug("--- timer started - 1");
286 this._autoLockTimer = MochiKit.Async.callLater(60, MochiKit.Base.method(this, 'autolock')); 283 this._autoLockTimer = MochiKit.Async.callLater(60, MochiKit.Base.method(this, 'autolock'));
287//MochiKit.Logging.logDebug("--- timer started - 2"); 284//MochiKit.Logging.logDebug("--- timer started - 2");
288 } 285 }
289 286
290 return this._autoLockTimer; 287 return this._autoLockTimer;
291 }, 288 },
292 289
293 'resetAutoLockTimer': function() { 290 'resetAutoLockTimer': function() {
294//MochiKit.Logging.logDebug(">>> timer resetted"); 291//MochiKit.Logging.logDebug(">>> timer resetted");
295 this.autoLockTimer().cancel(); 292 this.autoLockTimer().cancel();
296 this._autoLockTimer = null; 293 this._autoLockTimer = null;
297//MochiKit.Logging.logDebug("--- timer resetted - 1"); 294//MochiKit.Logging.logDebug("--- timer resetted - 1");
298 this.autoLockTimer(); 295 this.autoLockTimer();
299//MochiKit.Logging.logDebug("<<< timer resetted"); 296//MochiKit.Logging.logDebug("<<< timer resetted");
300 }, 297 },
301 298
302 //----------------------------------------------------- 299 //-----------------------------------------------------
303 300
304 'userNotificationHandler': function(anEvent) { 301 'userNotificationHandler': function(anEvent) {
305 this.getElement('message').update(anEvent.parameters().text); 302 this.getElement('message').update(anEvent.parameters().text);
306 }, 303 },
307 304
308 //----------------------------------------------------- 305 //-----------------------------------------------------
309 __syntaxFix__: '__syntaxFix__' 306 __syntaxFix__: '__syntaxFix__'
310}); 307});
311 308
312 309
diff --git a/frontend/beta/js/Clipperz/PM/Components/Compact/LoginForm.js b/frontend/beta/js/Clipperz/PM/Components/Compact/LoginForm.js
index d708464..a1e60d8 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Compact/LoginForm.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Compact/LoginForm.js
@@ -1,189 +1,186 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; } 29if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; }
33 30
34Clipperz.PM.Components.Compact.LoginForm = function(anElement, args) { 31Clipperz.PM.Components.Compact.LoginForm = function(anElement, args) {
35 32
36 Clipperz.PM.Components.Compact.LoginForm.superclass.constructor.call(this, anElement, args); 33 Clipperz.PM.Components.Compact.LoginForm.superclass.constructor.call(this, anElement, args);
37 34
38 this.render(); 35 this.render();
39 Clipperz.NotificationCenter.register(null, 'updatedProgressState', this, 'userNotificationHandler') 36 Clipperz.NotificationCenter.register(null, 'updatedProgressState', this, 'userNotificationHandler')
40 37
41 return this; 38 return this;
42}; 39};
43 40
44YAHOO.extendX(Clipperz.PM.Components.Compact.LoginForm, Clipperz.PM.Components.BaseComponent, { 41YAHOO.extendX(Clipperz.PM.Components.Compact.LoginForm, Clipperz.PM.Components.BaseComponent, {
45 42
46 'toString': function() { 43 'toString': function() {
47 return "Clipperz.PM.Components.Compact.LoginForm"; 44 return "Clipperz.PM.Components.Compact.LoginForm";
48 }, 45 },
49 46
50 //----------------------------------------------------- 47 //-----------------------------------------------------
51 48
52 'render': function() { 49 'render': function() {
53 var result; 50 var result;
54 varlayout; 51 varlayout;
55 52
56 MochiKit.Signal.disconnectAllTo(this); 53 MochiKit.Signal.disconnectAllTo(this);
57 this.element().update(""); 54 this.element().update("");
58 55
59 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('baseDiv'), cls:'LoginPanel', children:[ 56 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('baseDiv'), cls:'LoginPanel', children:[
60 {tag:'div', id:'compactHeader'}, 57 {tag:'div', id:'compactHeader'},
61 {tag:'div', id:'compactBody', children:[ 58 {tag:'div', id:'compactBody', children:[
62 {tag:'form', id:this.getId('loginForm_form'), children:[ 59 {tag:'form', id:this.getId('loginForm_form'), children:[
63 {tag:'dl', children:[ 60 {tag:'dl', children:[
64 {tag:'dt', htmlString:Clipperz.PM.Strings['loginFormUsernameLabel']}, 61 {tag:'dt', htmlString:Clipperz.PM.Strings['loginFormUsernameLabel']},
65 {tag:'dd', children:[ 62 {tag:'dd', children:[
66 {tag:'input', id:this.getId('login_username'), type:'text', size:'30', name:'username'} 63 {tag:'input', id:this.getId('login_username'), type:'text', size:'30', name:'username'}
67 ]}, 64 ]},
68 {tag:'dt', htmlString:Clipperz.PM.Strings['loginFormPassphraseLabel']}, 65 {tag:'dt', htmlString:Clipperz.PM.Strings['loginFormPassphraseLabel']},
69 {tag:'dd', children:[ 66 {tag:'dd', children:[
70 {tag:'input', id:this.getId('login_passphrase'), type:'password', size:'30', name:'passphrase'} 67 {tag:'input', id:this.getId('login_passphrase'), type:'password', size:'30', name:'passphrase'}
71 ]} 68 ]}
72 ]}, 69 ]},
73 {tag:'div', id:this.getId('login_submit')} 70 {tag:'div', id:this.getId('login_submit')}
74 ]}, 71 ]},
75 {tag:'h4', id:this.getId('message')} 72 {tag:'h4', id:this.getId('message')}
76 ]} 73 ]}
77 ]}); 74 ]});
78 75
79 new Clipperz.PM.Components.Compact.CompactHeader(YAHOO.ext.Element.get('compactHeader')); 76 new Clipperz.PM.Components.Compact.CompactHeader(YAHOO.ext.Element.get('compactHeader'));
80 77
81 MochiKit.Signal.connect(this.getId('loginForm_form'), 'onsubmit', this, 'stopFormSubmit'); 78 MochiKit.Signal.connect(this.getId('loginForm_form'), 'onsubmit', this, 'stopFormSubmit');
82 new YAHOO.ext.Button(this.getId('login_submit'), {text:Clipperz.PM.Strings['loginFormButtonLabel'], handler:this.doLogin, scope:this, minWidth:0}); 79 new YAHOO.ext.Button(this.getId('login_submit'), {text:Clipperz.PM.Strings['loginFormButtonLabel'], handler:this.doLogin, scope:this, minWidth:0});
83 this.getElement('login_submit').swallowEvent('click', true); 80 this.getElement('login_submit').swallowEvent('click', true);
84 81
85 MochiKit.Signal.connect(this.getId('loginForm_form'), 'onkeydown', this, 'onkeydown'); 82 MochiKit.Signal.connect(this.getId('loginForm_form'), 'onkeydown', this, 'onkeydown');
86 83
87 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('login_passphrase')); 84 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('login_passphrase'));
88 this.getElement('login_username').focus(); 85 this.getElement('login_username').focus();
89 86
90 return result; 87 return result;
91 }, 88 },
92 89
93 //----------------------------------------------------- 90 //-----------------------------------------------------
94 91
95 'doLogin': function(e) { 92 'doLogin': function(e) {
96//MochiKit.Logging.logDebug(">>> compact.LoginForm.doLogin"); 93//MochiKit.Logging.logDebug(">>> compact.LoginForm.doLogin");
97 if (this.checkLoginForm()) { 94 if (this.checkLoginForm()) {
98 this.doLoginWithUsernameAndPassphrase(this.getDom('login_username').value, this.getDom('login_passphrase').value); 95 this.doLoginWithUsernameAndPassphrase(this.getDom('login_username').value, this.getDom('login_passphrase').value);
99 } 96 }
100//MochiKit.Logging.logDebug("<<< compact.LoginForm.doLogin"); 97//MochiKit.Logging.logDebug("<<< compact.LoginForm.doLogin");
101 }, 98 },
102 99
103 //......................................................................... 100 //.........................................................................
104 101
105 'doLoginWithUsernameAndPassphrase': function(anUsername, aPassphrase) { 102 'doLoginWithUsernameAndPassphrase': function(anUsername, aPassphrase) {
106 var deferredResult; 103 var deferredResult;
107 var user; 104 var user;
108 105
109//MochiKit.Logging.logDebug(">>> compact.LoginForm.doLoginWithUsernameAndPassphrase"); 106//MochiKit.Logging.logDebug(">>> compact.LoginForm.doLoginWithUsernameAndPassphrase");
110 user = new Clipperz.PM.DataModel.User({username:anUsername, passphrase:aPassphrase}); 107 user = new Clipperz.PM.DataModel.User({username:anUsername, passphrase:aPassphrase});
111 108
112 deferredResult = new MochiKit.Async.Deferred(); 109 deferredResult = new MochiKit.Async.Deferred();
113 deferredResult.addCallback(MochiKit.Base.method(user, 'connect')); 110 deferredResult.addCallback(MochiKit.Base.method(user, 'connect'));
114 deferredResult.addCallback(MochiKit.Base.method(user, 'loadPreferences')); 111 deferredResult.addCallback(MochiKit.Base.method(user, 'loadPreferences'));
115 deferredResult.addCallback(MochiKit.Base.method(user, 'loadRecords')); 112 deferredResult.addCallback(MochiKit.Base.method(user, 'loadRecords'));
116 deferredResult.addCallback(MochiKit.Base.method(user, 'loadDirectLogins')); 113 deferredResult.addCallback(MochiKit.Base.method(user, 'loadDirectLogins'));
117 deferredResult.addErrback(MochiKit.Base.bind(function() { 114 deferredResult.addErrback(MochiKit.Base.bind(function() {
118 this.getElement('loginForm_form').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show(); 115 this.getElement('loginForm_form').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show();
119 this.getElement('message').update(Clipperz.PM.Strings['loginMessagePanelFailureText']); 116 this.getElement('message').update(Clipperz.PM.Strings['loginMessagePanelFailureText']);
120 this.getDom('login_passphrase').value = ""; 117 this.getDom('login_passphrase').value = "";
121 this.getElement('login_passphrase').focus(); 118 this.getElement('login_passphrase').focus();
122 }, this)) 119 }, this))
123//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("compact.LoginForm.doLogin - 6: " + res); return res;}); 120//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("compact.LoginForm.doLogin - 6: " + res); return res;});
124 deferredResult.callback("token"); 121 deferredResult.callback("token");
125//MochiKit.Logging.logDebug("<<< compact.LoginForm.doLoginWithUsernameAndPassphrase"); 122//MochiKit.Logging.logDebug("<<< compact.LoginForm.doLoginWithUsernameAndPassphrase");
126 123
127 return deferredResult; 124 return deferredResult;
128 }, 125 },
129 126
130 //......................................................................... 127 //.........................................................................
131 128
132 'checkLoginForm': function() { 129 'checkLoginForm': function() {
133 var result; 130 var result;
134 var username 131 var username
135 varpassphrase; 132 varpassphrase;
136 133
137//MochiKit.Logging.logDebug(">>> checkLoginForm"); 134//MochiKit.Logging.logDebug(">>> checkLoginForm");
138 username = this.getDom('login_username').value; 135 username = this.getDom('login_username').value;
139 passphrase = this.getDom('login_passphrase').value; 136 passphrase = this.getDom('login_passphrase').value;
140 137
141 if ((username != "") && (passphrase != "")) { 138 if ((username != "") && (passphrase != "")) {
142 result = true; 139 result = true;
143 } else { 140 } else {
144 if (username == "") { 141 if (username == "") {
145 this.getElement('login_username').focus(); 142 this.getElement('login_username').focus();
146 } else if (passphrase == "") { 143 } else if (passphrase == "") {
147 this.getElement('login_passphrase').focus(); 144 this.getElement('login_passphrase').focus();
148 } 145 }
149 146
150 result = false; 147 result = false;
151 } 148 }
152//MochiKit.Logging.logDebug("<<< checkLoginForm - " + result); 149//MochiKit.Logging.logDebug("<<< checkLoginForm - " + result);
153 150
154 return result; 151 return result;
155 }, 152 },
156 153
157 //------------------------------------------------------------------------- 154 //-------------------------------------------------------------------------
158 155
159 'stopFormSubmit': function(anEvent) { 156 'stopFormSubmit': function(anEvent) {
160 anEvent.stop(); 157 anEvent.stop();
161 }, 158 },
162 159
163 //------------------------------------------------------------------------- 160 //-------------------------------------------------------------------------
164 161
165 'onkeydown': function(anEvent) { 162 'onkeydown': function(anEvent) {
166//MochiKit.Logging.logDebug(">>> onkeydown - " + anEvent.src().id); 163//MochiKit.Logging.logDebug(">>> onkeydown - " + anEvent.src().id);
167 if (anEvent.key().code == 13) { 164 if (anEvent.key().code == 13) {
168 this.doLogin(); 165 this.doLogin();
169 anEvent.stop(); 166 anEvent.stop();
170 } 167 }
171 }, 168 },
172 169
173 //----------------------------------------------------- 170 //-----------------------------------------------------
174 171
175 'userNotificationHandler': function(anEvent) { 172 'userNotificationHandler': function(anEvent) {
176//MochiKit.Logging.logDebug(">>> compact.LoginForm.userNotificationHandler"); 173//MochiKit.Logging.logDebug(">>> compact.LoginForm.userNotificationHandler");
177//MochiKit.Logging.logDebug("userNotificationHandler - event: " + anEvent.event()); 174//MochiKit.Logging.logDebug("userNotificationHandler - event: " + anEvent.event());
178 this.getElement('loginForm_form').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 175 this.getElement('loginForm_form').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
179 if (this.getDom('message') != null) { 176 if (this.getDom('message') != null) {
180 this.getElement('message').update(Clipperz.PM.Strings.messagePanelConfigurations[anEvent.parameters()]()['text']); 177 this.getElement('message').update(Clipperz.PM.Strings.messagePanelConfigurations[anEvent.parameters()]()['text']);
181 } 178 }
182//MochiKit.Logging.logDebug("<<< compact.LoginForm.userNotificationHandler"); 179//MochiKit.Logging.logDebug("<<< compact.LoginForm.userNotificationHandler");
183 }, 180 },
184 181
185 //----------------------------------------------------- 182 //-----------------------------------------------------
186 __syntaxFix__: '__syntaxFix__' 183 __syntaxFix__: '__syntaxFix__'
187}); 184});
188 185
189 186
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js
index 18b36da..3f4952d 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js
@@ -1,174 +1,171 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } 29if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
33if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } 30if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; }
34 31
35//############################################################################# 32//#############################################################################
36 33
37Clipperz.PM.Components.Import.CSVImport.CSVImportColumns = function(anElement, args) { 34Clipperz.PM.Components.Import.CSVImport.CSVImportColumns = function(anElement, args) {
38 args = args || {}; 35 args = args || {};
39 36
40 Clipperz.PM.Components.Import.CSVImport.CSVImportColumns.superclass.constructor.call(this, anElement, args); 37 Clipperz.PM.Components.Import.CSVImport.CSVImportColumns.superclass.constructor.call(this, anElement, args);
41 this._mainComponent = args.mainComponent; 38 this._mainComponent = args.mainComponent;
42 39
43 return this; 40 return this;
44} 41}
45 42
46//============================================================================= 43//=============================================================================
47 44
48YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportColumns, Clipperz.PM.Components.BaseComponent, { 45YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportColumns, Clipperz.PM.Components.BaseComponent, {
49 46
50 'toString': function() { 47 'toString': function() {
51 return "Clipperz.PM.Components.Import.CSVImport.CSVImportColumns component"; 48 return "Clipperz.PM.Components.Import.CSVImport.CSVImportColumns component";
52 }, 49 },
53 50
54 //------------------------------------------------------------------------- 51 //-------------------------------------------------------------------------
55 52
56 'mainComponent': function() { 53 'mainComponent': function() {
57 return this._mainComponent; 54 return this._mainComponent;
58 }, 55 },
59 56
60 //------------------------------------------------------------------------- 57 //-------------------------------------------------------------------------
61 58
62 'render': function() { 59 'render': function() {
63 var i,c; 60 var i,c;
64 var columnSelectorCheckboxCells; 61 var columnSelectorCheckboxCells;
65 var checkboxes; 62 var checkboxes;
66 var data; 63 var data;
67 64
68//MochiKit.Logging.logDebug(">>> CSVImportColumns.render"); 65//MochiKit.Logging.logDebug(">>> CSVImportColumns.render");
69 Clipperz.NotificationCenter.unregister(this); 66 Clipperz.NotificationCenter.unregister(this);
70 MochiKit.Signal.disconnectAllTo(this); 67 MochiKit.Signal.disconnectAllTo(this);
71 68
72 this.element().update(""); 69 this.element().update("");
73 70
74 data = this.mainComponent().parsedValues(); 71 data = this.mainComponent().parsedValues();
75 columnSelectorCheckboxCells = []; 72 columnSelectorCheckboxCells = [];
76 73
77 c =data[0].length; 74 c =data[0].length;
78 for (i=0; i<c; i++) { 75 for (i=0; i<c; i++) {
79 columnSelectorCheckboxCells.push({tag:'th', valign:'top', cls:(this.mainComponent().isColumnSelected(i) ? 'selectedColumn': 'skippedColumn'), children:[ 76 columnSelectorCheckboxCells.push({tag:'th', valign:'top', cls:(this.mainComponent().isColumnSelected(i) ? 'selectedColumn': 'skippedColumn'), children:[
80 {tag:'input', type:'checkbox', id:this.getId('columnCheckbox_' + i), value:i} 77 {tag:'input', type:'checkbox', id:this.getId('columnCheckbox_' + i), value:i}
81 ]}) 78 ]})
82 } 79 }
83 80
84 this.domHelper().append(this.element(), {tag:'div', children:[ 81 this.domHelper().append(this.element(), {tag:'div', children:[
85 {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Columns']}, 82 {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Columns']},
86 {tag:'div', id:this.getId('dataDiv'), cls:'csvImportPreview', children:[ 83 {tag:'div', id:this.getId('dataDiv'), cls:'csvImportPreview', children:[
87 {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview columns', cellspacing:'0', children:[ 84 {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview columns', cellspacing:'0', children:[
88 {tag:'thead', id:this.getId('previewData_thead'), children:[ 85 {tag:'thead', id:this.getId('previewData_thead'), children:[
89 {tag:'tr', children:columnSelectorCheckboxCells} 86 {tag:'tr', children:columnSelectorCheckboxCells}
90 ]}, 87 ]},
91 {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} 88 {tag:'tbody', id:this.getId('previewData_tbody'), children:[]}
92 ]} 89 ]}
93 ]} 90 ]}
94 ]}); 91 ]});
95 92
96 c =data[0].length; 93 c =data[0].length;
97 for (i=0; i<c; i++) { 94 for (i=0; i<c; i++) {
98 if (this.mainComponent().isColumnSelected(i)) { 95 if (this.mainComponent().isColumnSelected(i)) {
99 this.getDom('columnCheckbox_' + i).checked = true; 96 this.getDom('columnCheckbox_' + i).checked = true;
100 } 97 }
101 } 98 }
102 99
103 this.renderData(this.getElement('previewData_tbody'), data); 100 this.renderData(this.getElement('previewData_tbody'), data);
104 101
105 checkboxes = MochiKit.DOM.getElementsByTagAndClassName('input', null, this.getDom('previewData_thead')); 102 checkboxes = MochiKit.DOM.getElementsByTagAndClassName('input', null, this.getDom('previewData_thead'));
106 c = checkboxes.length; 103 c = checkboxes.length;
107 for (i=0; i<c; i++) { 104 for (i=0; i<c; i++) {
108 MochiKit.Signal.connect(checkboxes[i], 'onclick', this, 'renderDataHandler'); 105 MochiKit.Signal.connect(checkboxes[i], 'onclick', this, 'renderDataHandler');
109 } 106 }
110//MochiKit.Logging.logDebug("<<< CSVImportColumns.render"); 107//MochiKit.Logging.logDebug("<<< CSVImportColumns.render");
111 }, 108 },
112 109
113 //------------------------------------------------------------------------- 110 //-------------------------------------------------------------------------
114 111
115 'renderData': function(anElement, someData) { 112 'renderData': function(anElement, someData) {
116 var config; 113 var config;
117 var i,c; 114 var i,c;
118 115
119//MochiKit.Logging.logDebug(">>> CSVImportColumns.renderData"); 116//MochiKit.Logging.logDebug(">>> CSVImportColumns.renderData");
120 // anElement.update(""); 117 // anElement.update("");
121 MochiKit.DOM.replaceChildNodes(anElement.dom); 118 MochiKit.DOM.replaceChildNodes(anElement.dom);
122 119
123 config = MochiKit.Base.map(MochiKit.Base.bind(function(aRowData) { 120 config = MochiKit.Base.map(MochiKit.Base.bind(function(aRowData) {
124 var result; 121 var result;
125 var i,c; 122 var i,c;
126 123
127 result = {tag:'tr', children:[]}; 124 result = {tag:'tr', children:[]};
128 c = aRowData.length; 125 c = aRowData.length;
129 for (i=0; i<c; i++) { 126 for (i=0; i<c; i++) {
130 var field; 127 var field;
131 128
132 field = aRowData[i]; 129 field = aRowData[i];
133 result.children.push({tag:'td', valign:'top', cls:(this.mainComponent().isColumnSelected(i) ? 'selectedColumn': 'skippedColumn'), html:(MochiKit.Base.isNotEmpty(field) ? field.replace(/\n/g, '<br>') : '&nbsp;')}); 130 result.children.push({tag:'td', valign:'top', cls:(this.mainComponent().isColumnSelected(i) ? 'selectedColumn': 'skippedColumn'), html:(MochiKit.Base.isNotEmpty(field) ? field.replace(/\n/g, '<br>') : '&nbsp;')});
134 } 131 }
135 132
136 return result; 133 return result;
137 }, this), someData); 134 }, this), someData);
138 135
139 MochiKit.Base.map(function(aRowConfig) {Clipperz.YUI.DomHelper.append(anElement, aRowConfig);}, config); 136 MochiKit.Base.map(function(aRowConfig) {Clipperz.YUI.DomHelper.append(anElement, aRowConfig);}, config);
140 137
141 Clipperz.Style.applyZebraStylesToTable(this.getId('previewDada')); 138 Clipperz.Style.applyZebraStylesToTable(this.getId('previewDada'));
142//MochiKit.Logging.logDebug("<<< CSVImportColumns.renderData"); 139//MochiKit.Logging.logDebug("<<< CSVImportColumns.renderData");
143 }, 140 },
144 141
145 //------------------------------------------------------------------------- 142 //-------------------------------------------------------------------------
146 143
147 'renderDataHandler': function(anEvent) { 144 'renderDataHandler': function(anEvent) {
148 var thElement; 145 var thElement;
149 146
150 thElement = YAHOO.ext.Element.get(anEvent.src().parentNode); 147 thElement = YAHOO.ext.Element.get(anEvent.src().parentNode);
151 148
152 if (anEvent.src().checked == true) { 149 if (anEvent.src().checked == true) {
153 this.mainComponent().skippedColumns().remove(anEvent.src().value); 150 this.mainComponent().skippedColumns().remove(anEvent.src().value);
154 thElement.addClass('selectedColumn'); 151 thElement.addClass('selectedColumn');
155 thElement.removeClass('skippedColumn'); 152 thElement.removeClass('skippedColumn');
156 } else { 153 } else {
157 this.mainComponent().skippedColumns().add(anEvent.src().value); 154 this.mainComponent().skippedColumns().add(anEvent.src().value);
158 thElement.removeClass('selectedColumn'); 155 thElement.removeClass('selectedColumn');
159 thElement.addClass('skippedColumn'); 156 thElement.addClass('skippedColumn');
160 } 157 }
161 158
162 if (this.mainComponent().skippedColumns().allItems().length == this.mainComponent().parsedValues()[0].length) { 159 if (this.mainComponent().skippedColumns().allItems().length == this.mainComponent().parsedValues()[0].length) {
163 this.mainComponent().nextButton().disable(); 160 this.mainComponent().nextButton().disable();
164 } else { 161 } else {
165 this.mainComponent().nextButton().enable(); 162 this.mainComponent().nextButton().enable();
166 } 163 }
167 164
168 this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); 165 this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues());
169 }, 166 },
170 167
171 //------------------------------------------------------------------------- 168 //-------------------------------------------------------------------------
172 __syntaxFix__: "syntax fix" 169 __syntaxFix__: "syntax fix"
173}); 170});
174 171
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js
index a368747..f7dbd5d 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js
@@ -1,247 +1,244 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } 29if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
33if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } 30if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; }
34 31
35//############################################################################# 32//#############################################################################
36 33
37Clipperz.PM.Components.Import.CSVImport.CSVImportFields = function(anElement, args) { 34Clipperz.PM.Components.Import.CSVImport.CSVImportFields = function(anElement, args) {
38 args = args || {}; 35 args = args || {};
39 36
40 Clipperz.PM.Components.Import.CSVImport.CSVImportFields.superclass.constructor.call(this, anElement, args); 37 Clipperz.PM.Components.Import.CSVImport.CSVImportFields.superclass.constructor.call(this, anElement, args);
41 this._mainComponent = args.mainComponent; 38 this._mainComponent = args.mainComponent;
42 39
43 return this; 40 return this;
44} 41}
45 42
46//============================================================================= 43//=============================================================================
47 44
48YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportFields, Clipperz.PM.Components.BaseComponent, { 45YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportFields, Clipperz.PM.Components.BaseComponent, {
49 46
50 'toString': function() { 47 'toString': function() {
51 return "Clipperz.PM.Components.Import.CSVImport.CSVImportFields component"; 48 return "Clipperz.PM.Components.Import.CSVImport.CSVImportFields component";
52 }, 49 },
53 50
54 //------------------------------------------------------------------------- 51 //-------------------------------------------------------------------------
55 52
56 'mainComponent': function() { 53 'mainComponent': function() {
57 return this._mainComponent; 54 return this._mainComponent;
58 }, 55 },
59 56
60 //------------------------------------------------------------------------- 57 //-------------------------------------------------------------------------
61 58
62 'render': function() { 59 'render': function() {
63 varfieldsHeaderCells; 60 varfieldsHeaderCells;
64 var titleColumnIndex; 61 var titleColumnIndex;
65 var notesColumnIndex; 62 var notesColumnIndex;
66 var i,c; 63 var i,c;
67 64
68 Clipperz.NotificationCenter.unregister(this); 65 Clipperz.NotificationCenter.unregister(this);
69 MochiKit.Signal.disconnectAllTo(this); 66 MochiKit.Signal.disconnectAllTo(this);
70 67
71 this.element().update(""); 68 this.element().update("");
72 69
73 titleColumnIndex = this.mainComponent().titleColumnIndex() 70 titleColumnIndex = this.mainComponent().titleColumnIndex()
74 notesColumnIndex = this.mainComponent().notesColumnIndex() 71 notesColumnIndex = this.mainComponent().notesColumnIndex()
75 72
76 fieldsHeaderCells = []; 73 fieldsHeaderCells = [];
77 fieldsHeaderCells.push({tag:'td', valign:'top', cls:'title', html:this.mainComponent().labelForColumn(titleColumnIndex)}); 74 fieldsHeaderCells.push({tag:'td', valign:'top', cls:'title', html:this.mainComponent().labelForColumn(titleColumnIndex)});
78 75
79 c =this.mainComponent().parsedValues()[0].length; 76 c =this.mainComponent().parsedValues()[0].length;
80 for (i=0; i<c; i++) { 77 for (i=0; i<c; i++) {
81 if ((i != titleColumnIndex) && (i != notesColumnIndex) && (this.mainComponent().isColumnSelected(i))) { 78 if ((i != titleColumnIndex) && (i != notesColumnIndex) && (this.mainComponent().isColumnSelected(i))) {
82 var trimmedLabel; 79 var trimmedLabel;
83 80
84 trimmedLabel = Clipperz.Base.trim(this.mainComponent().labelForColumn(i)); 81 trimmedLabel = Clipperz.Base.trim(this.mainComponent().labelForColumn(i));
85 fieldsHeaderCells.push({tag:'td', valign:'top', id:this.getId('fieldHeaderTD_' + i), cls:((trimmedLabel == "") ? 'missingLabelWarning' : (this.isColumnSetup(i) ? 'configuredColumn': 'unconfiguredColumn')), children:[ 82 fieldsHeaderCells.push({tag:'td', valign:'top', id:this.getId('fieldHeaderTD_' + i), cls:((trimmedLabel == "") ? 'missingLabelWarning' : (this.isColumnSetup(i) ? 'configuredColumn': 'unconfiguredColumn')), children:[
86 {tag:'span', html:((trimmedLabel == "") ? Clipperz.PM.Strings['CSV_ImportWizard_Fields_MissingLabelWarning'] : trimmedLabel)/*, cls:((trimmedLabel == "") ? 'missingLabelWarning' : '')*/}, 83 {tag:'span', html:((trimmedLabel == "") ? Clipperz.PM.Strings['CSV_ImportWizard_Fields_MissingLabelWarning'] : trimmedLabel)/*, cls:((trimmedLabel == "") ? 'missingLabelWarning' : '')*/},
87 {tag:'select', id:this.getId('select_' + i), name:i, children:[ 84 {tag:'select', id:this.getId('select_' + i), name:i, children:[
88 {tag:'option', value:'UNDEFINED', html:"select data type", cls:'disabledOption'}, 85 {tag:'option', value:'UNDEFINED', html:"select data type", cls:'disabledOption'},
89 {tag:'option', value:'TXT', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['TXT']['shortDescription']}, 86 {tag:'option', value:'TXT', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['TXT']['shortDescription']},
90 {tag:'option', value:'PWD', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['PWD']['shortDescription']}, 87 {tag:'option', value:'PWD', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['PWD']['shortDescription']},
91 {tag:'option', value:'URL', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['URL']['shortDescription']}, 88 {tag:'option', value:'URL', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['URL']['shortDescription']},
92 {tag:'option', value:'DATE', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['DATE']['shortDescription']}, 89 {tag:'option', value:'DATE', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['DATE']['shortDescription']},
93 {tag:'option', value:'ADDR', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['ADDR']['shortDescription']} 90 {tag:'option', value:'ADDR', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['ADDR']['shortDescription']}
94 ]} 91 ]}
95 ]}) 92 ]})
96 } 93 }
97 } 94 }
98 95
99 if (notesColumnIndex != -1) { 96 if (notesColumnIndex != -1) {
100 fieldsHeaderCells.push({tag:'td', valign:'top', cls:'notes', html:this.mainComponent().labelForColumn(notesColumnIndex)}); 97 fieldsHeaderCells.push({tag:'td', valign:'top', cls:'notes', html:this.mainComponent().labelForColumn(notesColumnIndex)});
101 } 98 }
102 99
103 this.domHelper().append(this.element(), {tag:'div', children:[ 100 this.domHelper().append(this.element(), {tag:'div', children:[
104 {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Fields']}, 101 {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Fields']},
105 {tag:'div', id:this.getId('dataDiv'), children:[ 102 {tag:'div', id:this.getId('dataDiv'), children:[
106 {tag:'div', children:[ 103 {tag:'div', children:[
107 ]}, 104 ]},
108 {tag:'div', cls:'csvImportPreview', children:[ 105 {tag:'div', cls:'csvImportPreview', children:[
109 {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[ 106 {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[
110 {tag:'thead', id:this.getId('previewData_thead'), children:[ 107 {tag:'thead', id:this.getId('previewData_thead'), children:[
111 {tag:'tr', cls:'CSV_previewData_header', children:fieldsHeaderCells} 108 {tag:'tr', cls:'CSV_previewData_header', children:fieldsHeaderCells}
112 ]}, 109 ]},
113 {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} 110 {tag:'tbody', id:this.getId('previewData_tbody'), children:[]}
114 ]} 111 ]}
115 ]} 112 ]}
116 ]} 113 ]}
117 ]}); 114 ]});
118 115
119 for (i=0; i<c; i++) { 116 for (i=0; i<c; i++) {
120 if ((i != titleColumnIndex) && (i != notesColumnIndex) && (this.mainComponent().isColumnSelected(i))) { 117 if ((i != titleColumnIndex) && (i != notesColumnIndex) && (this.mainComponent().isColumnSelected(i))) {
121 Clipperz.DOM.selectOptionMatchingValue(this.getDom('select_' + i), this.mainComponent().typeForColumn(i)); 118 Clipperz.DOM.selectOptionMatchingValue(this.getDom('select_' + i), this.mainComponent().typeForColumn(i));
122 MochiKit.Signal.connect(this.getDom('select_' + i), 'onchange', this, 'renderDataRowsHandler'); 119 MochiKit.Signal.connect(this.getDom('select_' + i), 'onchange', this, 'renderDataRowsHandler');
123 } 120 }
124 } 121 }
125 122
126 this.renderDataRows(this.getElement('previewData_tbody')); 123 this.renderDataRows(this.getElement('previewData_tbody'));
127 // Clipperz.NotificationCenter.register(null, 'updatedCSVImportColumnHeader', this, 'renderDataRowsHandler'); 124 // Clipperz.NotificationCenter.register(null, 'updatedCSVImportColumnHeader', this, 'renderDataRowsHandler');
128 }, 125 },
129 126
130 //------------------------------------------------------------------------- 127 //-------------------------------------------------------------------------
131 128
132 'isColumnSetup': function(aColumnIndex) { 129 'isColumnSetup': function(aColumnIndex) {
133 return ((Clipperz.Base.trim(this.mainComponent().labelForColumn(aColumnIndex)) != "") && (this.mainComponent().typeForColumn(aColumnIndex) != 'UNDEFINED')); 130 return ((Clipperz.Base.trim(this.mainComponent().labelForColumn(aColumnIndex)) != "") && (this.mainComponent().typeForColumn(aColumnIndex) != 'UNDEFINED'));
134 }, 131 },
135 132
136 //------------------------------------------------------------------------- 133 //-------------------------------------------------------------------------
137 134
138 'renderDataRowsHandler': function(anEvent) { 135 'renderDataRowsHandler': function(anEvent) {
139 var columnIndex; 136 var columnIndex;
140 var tdElement; 137 var tdElement;
141 138
142//MochiKit.Logging.logDebug(">>> renderDataRowsHandler") 139//MochiKit.Logging.logDebug(">>> renderDataRowsHandler")
143 columnIndex = anEvent.src().name; 140 columnIndex = anEvent.src().name;
144 this.mainComponent().setTypeForColumn(anEvent.src().value, columnIndex); 141 this.mainComponent().setTypeForColumn(anEvent.src().value, columnIndex);
145 142
146 tdElement = this.getElement('fieldHeaderTD_' + columnIndex); 143 tdElement = this.getElement('fieldHeaderTD_' + columnIndex);
147 144
148 if (this.isColumnSetup(columnIndex)) { 145 if (this.isColumnSetup(columnIndex)) {
149 tdElement.removeClass('unconfiguredColumn'); 146 tdElement.removeClass('unconfiguredColumn');
150 tdElement.addClass('configuredColumn'); 147 tdElement.addClass('configuredColumn');
151 } else { 148 } else {
152 tdElement.addClass('unconfiguredColumn'); 149 tdElement.addClass('unconfiguredColumn');
153 tdElement.removeClass('configuredColumn'); 150 tdElement.removeClass('configuredColumn');
154 } 151 }
155 152
156 this.renderDataRows(this.getElement('previewData_tbody')); 153 this.renderDataRows(this.getElement('previewData_tbody'));
157 }, 154 },
158 155
159 //------------------------------------------------------------------------- 156 //-------------------------------------------------------------------------
160 157
161 'renderDataRows': function(anElement) { 158 'renderDataRows': function(anElement) {
162 var titleColumnIndex; 159 var titleColumnIndex;
163 var notesColumnIndex; 160 var notesColumnIndex;
164 var data 161 var data
165 var i,c; 162 var i,c;
166 163
167//MochiKit.Logging.logDebug("#### >> renderDataRows"); 164//MochiKit.Logging.logDebug("#### >> renderDataRows");
168 // anElement.update(""); 165 // anElement.update("");
169 MochiKit.DOM.replaceChildNodes(anElement.dom); 166 MochiKit.DOM.replaceChildNodes(anElement.dom);
170 167
171 if (this.mainComponent().isFirstRowHeader()) { 168 if (this.mainComponent().isFirstRowHeader()) {
172 data = this.mainComponent().parsedValues().slice(1); 169 data = this.mainComponent().parsedValues().slice(1);
173 } else { 170 } else {
174 data = this.mainComponent().parsedValues(); 171 data = this.mainComponent().parsedValues();
175 } 172 }
176 173
177 174
178 titleColumnIndex = this.mainComponent().titleColumnIndex(); 175 titleColumnIndex = this.mainComponent().titleColumnIndex();
179 notesColumnIndex = this.mainComponent().notesColumnIndex(); 176 notesColumnIndex = this.mainComponent().notesColumnIndex();
180 177
181 c = data.length; 178 c = data.length;
182 for (i=0; i<c; i++) { 179 for (i=0; i<c; i++) {
183 var rowData; 180 var rowData;
184 var rowConfig; 181 var rowConfig;
185 var ii, cc; 182 var ii, cc;
186 183
187 rowData = data[i]; 184 rowData = data[i];
188 185
189 rowConfig = {tag:'tr', children:[ 186 rowConfig = {tag:'tr', children:[
190 {tag:'td', valign:'top', cls:'title', html:(MochiKit.Base.isNotEmpty(rowData[titleColumnIndex]) ? rowData[titleColumnIndex].replace(/\n/g, '<br>') : '&nbsp;')} 187 {tag:'td', valign:'top', cls:'title', html:(MochiKit.Base.isNotEmpty(rowData[titleColumnIndex]) ? rowData[titleColumnIndex].replace(/\n/g, '<br>') : '&nbsp;')}
191 ]}; 188 ]};
192 189
193 cc = rowData.length; 190 cc = rowData.length;
194 for (ii=0; ii<cc; ii++) { 191 for (ii=0; ii<cc; ii++) {
195 // if ((ii != titleColumnIndex) && (ii != notesColumnIndex)) { 192 // if ((ii != titleColumnIndex) && (ii != notesColumnIndex)) {
196 if ((ii != titleColumnIndex) && (ii != notesColumnIndex) && (this.mainComponent().isColumnSelected(ii))) { 193 if ((ii != titleColumnIndex) && (ii != notesColumnIndex) && (this.mainComponent().isColumnSelected(ii))) {
197 rowConfig.children.push({ 194 rowConfig.children.push({
198 tag:'td', 195 tag:'td',
199 valign:'top', 196 valign:'top',
200 cls:(this.isColumnSetup(ii) ? 'configuredColumn' : 'unconfiguredColumn'), 197 cls:(this.isColumnSetup(ii) ? 'configuredColumn' : 'unconfiguredColumn'),
201 html:(MochiKit.Base.isNotEmpty(rowData[ii]) ? rowData[ii].replace(/\n/g, '<br>') : '&nbsp;') 198 html:(MochiKit.Base.isNotEmpty(rowData[ii]) ? rowData[ii].replace(/\n/g, '<br>') : '&nbsp;')
202 }); 199 });
203 } 200 }
204 } 201 }
205 if (notesColumnIndex != -1) { 202 if (notesColumnIndex != -1) {
206 rowConfig.children.push({tag:'td', valign:'top', cls:'notes', html:(MochiKit.Base.isNotEmpty(rowData[notesColumnIndex]) ? rowData[notesColumnIndex].replace(/\n/g, '<br>') : '&nbsp;')}); 203 rowConfig.children.push({tag:'td', valign:'top', cls:'notes', html:(MochiKit.Base.isNotEmpty(rowData[notesColumnIndex]) ? rowData[notesColumnIndex].replace(/\n/g, '<br>') : '&nbsp;')});
207 } 204 }
208 205
209 this.domHelper().append(anElement, rowConfig); 206 this.domHelper().append(anElement, rowConfig);
210 } 207 }
211 208
212 Clipperz.Style.applyZebraStylesToTable(this.getId('previewDada')); 209 Clipperz.Style.applyZebraStylesToTable(this.getId('previewDada'));
213 210
214 this.checkWetherToEnableNextButton(); 211 this.checkWetherToEnableNextButton();
215//MochiKit.Logging.logDebug("#### << renderDataRows"); 212//MochiKit.Logging.logDebug("#### << renderDataRows");
216 }, 213 },
217 214
218 //------------------------------------------------------------------------- 215 //-------------------------------------------------------------------------
219 216
220 'checkWetherToEnableNextButton': function() { 217 'checkWetherToEnableNextButton': function() {
221 var result; 218 var result;
222 var titleColumnIndex; 219 var titleColumnIndex;
223 var notesColumnIndex; 220 var notesColumnIndex;
224 var i,c; 221 var i,c;
225 222
226 titleColumnIndex = this.mainComponent().titleColumnIndex() 223 titleColumnIndex = this.mainComponent().titleColumnIndex()
227 notesColumnIndex = this.mainComponent().notesColumnIndex() 224 notesColumnIndex = this.mainComponent().notesColumnIndex()
228 225
229 result = true; 226 result = true;
230 c =this.mainComponent().parsedValues()[0].length; 227 c =this.mainComponent().parsedValues()[0].length;
231 for (i=0; i<c; i++) { 228 for (i=0; i<c; i++) {
232 if ((i != titleColumnIndex) && (i != notesColumnIndex) && (this.mainComponent().isColumnSelected(i))) { 229 if ((i != titleColumnIndex) && (i != notesColumnIndex) && (this.mainComponent().isColumnSelected(i))) {
233 result = result && this.isColumnSetup(i); 230 result = result && this.isColumnSetup(i);
234 } 231 }
235 } 232 }
236 233
237 if (result) { 234 if (result) {
238 this.mainComponent().nextButton().enable(); 235 this.mainComponent().nextButton().enable();
239 } else { 236 } else {
240 this.mainComponent().nextButton().disable(); 237 this.mainComponent().nextButton().disable();
241 } 238 }
242 }, 239 },
243 240
244 //------------------------------------------------------------------------- 241 //-------------------------------------------------------------------------
245 __syntaxFix__: "syntax fix" 242 __syntaxFix__: "syntax fix"
246}); 243});
247 244
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js
index ebd243a..5cb8679 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js
@@ -1,240 +1,237 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } 29if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
33if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } 30if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; }
34 31
35//############################################################################# 32//#############################################################################
36 33
37Clipperz.PM.Components.Import.CSVImport.CSVImportHeader = function(anElement, args) { 34Clipperz.PM.Components.Import.CSVImport.CSVImportHeader = function(anElement, args) {
38 args = args || {}; 35 args = args || {};
39 36
40 Clipperz.PM.Components.Import.CSVImport.CSVImportHeader.superclass.constructor.call(this, anElement, args); 37 Clipperz.PM.Components.Import.CSVImport.CSVImportHeader.superclass.constructor.call(this, anElement, args);
41 this._mainComponent = args.mainComponent; 38 this._mainComponent = args.mainComponent;
42 39
43 this._pendingDeferredLabelFieldHandlerEvents = 0; 40 this._pendingDeferredLabelFieldHandlerEvents = 0;
44 41
45 return this; 42 return this;
46} 43}
47 44
48//============================================================================= 45//=============================================================================
49 46
50YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportHeader, Clipperz.PM.Components.BaseComponent, { 47YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportHeader, Clipperz.PM.Components.BaseComponent, {
51 48
52 'toString': function() { 49 'toString': function() {
53 return "Clipperz.PM.Components.Import.CSVImport.CSVImportHeader component"; 50 return "Clipperz.PM.Components.Import.CSVImport.CSVImportHeader component";
54 }, 51 },
55 52
56 //------------------------------------------------------------------------- 53 //-------------------------------------------------------------------------
57 54
58 'mainComponent': function() { 55 'mainComponent': function() {
59 return this._mainComponent; 56 return this._mainComponent;
60 }, 57 },
61 58
62 //------------------------------------------------------------------------- 59 //-------------------------------------------------------------------------
63 60
64 'render': function() { 61 'render': function() {
65 var thConfigs; 62 var thConfigs;
66 var i,c; 63 var i,c;
67 64
68//MochiKit.Logging.logDebug(">>> CSVImportHeader.render"); 65//MochiKit.Logging.logDebug(">>> CSVImportHeader.render");
69 Clipperz.NotificationCenter.unregister(this); 66 Clipperz.NotificationCenter.unregister(this);
70 MochiKit.Signal.disconnectAllTo(this); 67 MochiKit.Signal.disconnectAllTo(this);
71 68
72 thConfigs = []; 69 thConfigs = [];
73 c = this.mainComponent().parsedValues()[0].length; 70 c = this.mainComponent().parsedValues()[0].length;
74 for (i=0; i<c; i++) { 71 for (i=0; i<c; i++) {
75 if (this.mainComponent().isColumnSelected(i)) { 72 if (this.mainComponent().isColumnSelected(i)) {
76 // thConfigs.push({tag:'th', children:[{tag:'input', type:'text', id:this.getId('headerTextField_' + i), value:this.mainComponent().labelForColumn(i)}]}); 73 // thConfigs.push({tag:'th', children:[{tag:'input', type:'text', id:this.getId('headerTextField_' + i), value:this.mainComponent().labelForColumn(i)}]});
77 thConfigs.push({tag:'th', children:[{tag:'input', type:'text', id:this.getId('headerTextField_' + i), value:""}]}); 74 thConfigs.push({tag:'th', children:[{tag:'input', type:'text', id:this.getId('headerTextField_' + i), value:""}]});
78 } 75 }
79 } 76 }
80 77
81 this.element().update(""); 78 this.element().update("");
82 this.domHelper().append(this.element(), {tag:'div', children:[ 79 this.domHelper().append(this.element(), {tag:'div', children:[
83 {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Header']}, 80 {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Header']},
84 {tag:'div', cls:'importStepParameters', children:[ 81 {tag:'div', cls:'importStepParameters', children:[
85 {tag:'input', type:'checkbox', name:'isFistRowHeader', id:this.getId('isFirstRowHeader_checkbox')}, 82 {tag:'input', type:'checkbox', name:'isFistRowHeader', id:this.getId('isFirstRowHeader_checkbox')},
86 {tag:'span', id:this.getId('isFirstRowHeader_span'), cls:'clickableSpan', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Header_Settings_firstRowHeaderLabel']} 83 {tag:'span', id:this.getId('isFirstRowHeader_span'), cls:'clickableSpan', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Header_Settings_firstRowHeaderLabel']}
87 ]}, 84 ]},
88 {tag:'div', id:this.getId('dataDiv'), children:[ 85 {tag:'div', id:this.getId('dataDiv'), children:[
89 {tag:'div', cls:'csvImportPreview', children:[ 86 {tag:'div', cls:'csvImportPreview', children:[
90 {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview header', cellspacing:'0', children:[ 87 {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview header', cellspacing:'0', children:[
91 {tag:'thead', children:[{tag:'tr', children:thConfigs}]}, 88 {tag:'thead', children:[{tag:'tr', children:thConfigs}]},
92 {tag:'tbody', id:this.getId('previewData_tbody')} 89 {tag:'tbody', id:this.getId('previewData_tbody')}
93 ]} 90 ]}
94 ]} 91 ]}
95 ]} 92 ]}
96 ]}); 93 ]});
97 94
98 for (i=0; i<c; i++) { 95 for (i=0; i<c; i++) {
99 if (this.mainComponent().isColumnSelected(i)) { 96 if (this.mainComponent().isColumnSelected(i)) {
100 this.getElement('headerTextField_' + i).dom.value = this.mainComponent().labelForColumn(i); 97 this.getElement('headerTextField_' + i).dom.value = this.mainComponent().labelForColumn(i);
101 } 98 }
102 } 99 }
103 100
104 this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); 101 this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues());
105 102
106 if (this.mainComponent().isFirstRowHeader()) { 103 if (this.mainComponent().isFirstRowHeader()) {
107 this.getDom('isFirstRowHeader_checkbox').click(); 104 this.getDom('isFirstRowHeader_checkbox').click();
108 } 105 }
109 106
110 c = this.mainComponent().parsedValues()[0].length; 107 c = this.mainComponent().parsedValues()[0].length;
111 for (i=0; i<c; i++) { 108 for (i=0; i<c; i++) {
112 if (this.mainComponent().isColumnSelected(i)) { 109 if (this.mainComponent().isColumnSelected(i)) {
113 MochiKit.Signal.connect(this.getDom('headerTextField_' + i), 'onchange', MochiKit.Base.partial(MochiKit.Base.method(this, 'labelFieldHandler'), i)); 110 MochiKit.Signal.connect(this.getDom('headerTextField_' + i), 'onchange', MochiKit.Base.partial(MochiKit.Base.method(this, 'labelFieldHandler'), i));
114 MochiKit.Signal.connect(this.getDom('headerTextField_' + i), 'onkeypress', MochiKit.Base.partial(MochiKit.Base.method(this, 'deferredLabelFieldHandler'), i)); 111 MochiKit.Signal.connect(this.getDom('headerTextField_' + i), 'onkeypress', MochiKit.Base.partial(MochiKit.Base.method(this, 'deferredLabelFieldHandler'), i));
115 } 112 }
116 } 113 }
117 114
118 MochiKit.Signal.connect(this.getDom('isFirstRowHeader_checkbox'), 'onclick', this, 'toggleFirstRowHeaderCheckboxHandler'); 115 MochiKit.Signal.connect(this.getDom('isFirstRowHeader_checkbox'), 'onclick', this, 'toggleFirstRowHeaderCheckboxHandler');
119 if (Clipperz_IEisBroken != true) { 116 if (Clipperz_IEisBroken != true) {
120 MochiKit.Signal.connect(this.getDom('isFirstRowHeader_span'), 'onclick', this.getDom('isFirstRowHeader_checkbox'), 'click'); 117 MochiKit.Signal.connect(this.getDom('isFirstRowHeader_span'), 'onclick', this.getDom('isFirstRowHeader_checkbox'), 'click');
121 } 118 }
122//MochiKit.Logging.logDebug("<<< CSVImportHeader.render"); 119//MochiKit.Logging.logDebug("<<< CSVImportHeader.render");
123 }, 120 },
124 121
125 //------------------------------------------------------------------------- 122 //-------------------------------------------------------------------------
126 123
127 'renderData': function(anElement, someData) { 124 'renderData': function(anElement, someData) {
128 var trConfigs; 125 var trConfigs;
129 var data; 126 var data;
130 var i,c; 127 var i,c;
131 128
132 // anElement.update(""); 129 // anElement.update("");
133 MochiKit.DOM.replaceChildNodes(anElement.dom); 130 MochiKit.DOM.replaceChildNodes(anElement.dom);
134 131
135 if (this.mainComponent().isFirstRowHeader()) { 132 if (this.mainComponent().isFirstRowHeader()) {
136 data = someData.slice(1); 133 data = someData.slice(1);
137 } else { 134 } else {
138 data = someData; 135 data = someData;
139 } 136 }
140 137
141 trConfigs = MochiKit.Base.map(MochiKit.Base.bind(function(aRowData) { 138 trConfigs = MochiKit.Base.map(MochiKit.Base.bind(function(aRowData) {
142 var result; 139 var result;
143 var i,c; 140 var i,c;
144 141
145 result = {tag:'tr', children:[]}; 142 result = {tag:'tr', children:[]};
146 c = aRowData.length; 143 c = aRowData.length;
147 for (i=0; i<c; i++) { 144 for (i=0; i<c; i++) {
148 if (this.mainComponent().isColumnSelected(i)) { 145 if (this.mainComponent().isColumnSelected(i)) {
149 result.children.push({tag:'td', valign:'top', html:(MochiKit.Base.isNotEmpty(aRowData[i]) ? aRowData[i].replace(/\n/g, '<br>') : '&nbsp;')}); 146 result.children.push({tag:'td', valign:'top', html:(MochiKit.Base.isNotEmpty(aRowData[i]) ? aRowData[i].replace(/\n/g, '<br>') : '&nbsp;')});
150 } 147 }
151 } 148 }
152 149
153 return result; 150 return result;
154 }, this), data); 151 }, this), data);
155 152
156 MochiKit.Base.map(function(aRowConfig) {Clipperz.YUI.DomHelper.append(anElement, aRowConfig);}, trConfigs); 153 MochiKit.Base.map(function(aRowConfig) {Clipperz.YUI.DomHelper.append(anElement, aRowConfig);}, trConfigs);
157 154
158 Clipperz.Style.applyZebraStylesToTable(this.getId('previewDada')); 155 Clipperz.Style.applyZebraStylesToTable(this.getId('previewDada'));
159 }, 156 },
160 157
161 //------------------------------------------------------------------------- 158 //-------------------------------------------------------------------------
162 159
163 'toggleFirstRowHeaderCheckboxHandler': function() { 160 'toggleFirstRowHeaderCheckboxHandler': function() {
164 var firstRowData; 161 var firstRowData;
165 var i,c; 162 var i,c;
166 163
167//MochiKit.Logging.logDebug(">>> toggleFirstRowHeaderCheckboxHandler"); 164//MochiKit.Logging.logDebug(">>> toggleFirstRowHeaderCheckboxHandler");
168 this.mainComponent().setIsFirstRowHeader(this.getDom('isFirstRowHeader_checkbox').checked); 165 this.mainComponent().setIsFirstRowHeader(this.getDom('isFirstRowHeader_checkbox').checked);
169 166
170 firstRowData = this.mainComponent().parsedValues()[0]; 167 firstRowData = this.mainComponent().parsedValues()[0];
171 168
172 c = firstRowData.length; 169 c = firstRowData.length;
173 for (i=0; i<c; i++) { 170 for (i=0; i<c; i++) {
174 if (this.mainComponent().isColumnSelected(i)) { 171 if (this.mainComponent().isColumnSelected(i)) {
175 var label; 172 var label;
176 173
177 if (this.mainComponent().isFirstRowHeader()) { 174 if (this.mainComponent().isFirstRowHeader()) {
178 label = firstRowData[i]; 175 label = firstRowData[i];
179 } else { 176 } else {
180 label = null; 177 label = null;
181 } 178 }
182 179
183 this.mainComponent().setLabelForColumn(label, i); 180 this.mainComponent().setLabelForColumn(label, i);
184 } 181 }
185 }; 182 };
186 183
187 this.updateInputFieldValues(); 184 this.updateInputFieldValues();
188 this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); 185 this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues());
189//MochiKit.Logging.logDebug("<<< toggleFirstRowHeaderCheckboxHandler"); 186//MochiKit.Logging.logDebug("<<< toggleFirstRowHeaderCheckboxHandler");
190 }, 187 },
191 188
192 //------------------------------------------------------------------------- 189 //-------------------------------------------------------------------------
193 190
194 'updateInputFieldValues': function() { 191 'updateInputFieldValues': function() {
195 var i,c; 192 var i,c;
196 193
197//MochiKit.Logging.logDebug(">>> updateInputFieldValues"); 194//MochiKit.Logging.logDebug(">>> updateInputFieldValues");
198 c = this.mainComponent().parsedValues()[0].length; 195 c = this.mainComponent().parsedValues()[0].length;
199 for (i=0; i<c; i++) { 196 for (i=0; i<c; i++) {
200 if (this.mainComponent().isColumnSelected(i)) { 197 if (this.mainComponent().isColumnSelected(i)) {
201 this.getDom('headerTextField_' + i).value = this.mainComponent().labelForColumn(i); 198 this.getDom('headerTextField_' + i).value = this.mainComponent().labelForColumn(i);
202 } 199 }
203 } 200 }
204//console.log('[1] fieldSettings', fieldSettings); 201//console.log('[1] fieldSettings', fieldSettings);
205//MochiKit.Logging.logDebug("<<< updateInputFieldValues"); 202//MochiKit.Logging.logDebug("<<< updateInputFieldValues");
206 }, 203 },
207 204
208 //------------------------------------------------------------------------- 205 //-------------------------------------------------------------------------
209 206
210 'labelFieldHandler': function(aColumnIndex, anEvent) { 207 'labelFieldHandler': function(aColumnIndex, anEvent) {
211 var inputField; 208 var inputField;
212 209
213//MochiKit.Logging.logDebug(">>> labelFieldHandler"); 210//MochiKit.Logging.logDebug(">>> labelFieldHandler");
214 inputField = anEvent.src(); 211 inputField = anEvent.src();
215 212
216 this.mainComponent().setLabelForColumn(inputField.value, aColumnIndex); 213 this.mainComponent().setLabelForColumn(inputField.value, aColumnIndex);
217//MochiKit.Logging.logDebug("##### [" + anEvent.src().id + "] -> label[" + aColumnIndex + "]: '" + inputField.value + "'"); 214//MochiKit.Logging.logDebug("##### [" + anEvent.src().id + "] -> label[" + aColumnIndex + "]: '" + inputField.value + "'");
218//MochiKit.Logging.logDebug("<<< labelFieldHandler"); 215//MochiKit.Logging.logDebug("<<< labelFieldHandler");
219 }, 216 },
220 217
221 'deferredLabelFieldHandler': function(aColumnIndex, anEvent) { 218 'deferredLabelFieldHandler': function(aColumnIndex, anEvent) {
222//MochiKit.Logging.logDebug(">>> deferredLabelFieldHandler"); 219//MochiKit.Logging.logDebug(">>> deferredLabelFieldHandler");
223 this._pendingDeferredLabelFieldHandlerEvents ++; 220 this._pendingDeferredLabelFieldHandlerEvents ++;
224 MochiKit.Async.callLater(1, MochiKit.Base.partial(MochiKit.Base.method(this, 'deferredLabelFieldHandlerCatcher'), aColumnIndex, anEvent)); 221 MochiKit.Async.callLater(1, MochiKit.Base.partial(MochiKit.Base.method(this, 'deferredLabelFieldHandlerCatcher'), aColumnIndex, anEvent));
225//MochiKit.Logging.logDebug("<<< deferredLabelFieldHandler"); 222//MochiKit.Logging.logDebug("<<< deferredLabelFieldHandler");
226 }, 223 },
227 224
228 'deferredLabelFieldHandlerCatcher': function(aColumnIndex, anEvent) { 225 'deferredLabelFieldHandlerCatcher': function(aColumnIndex, anEvent) {
229//MochiKit.Logging.logDebug(">>> deferredLabelFieldHandlerCatcher"); 226//MochiKit.Logging.logDebug(">>> deferredLabelFieldHandlerCatcher");
230 this._pendingDeferredLabelFieldHandlerEvents --; 227 this._pendingDeferredLabelFieldHandlerEvents --;
231 if (this._pendingDeferredLabelFieldHandlerEvents == 0) { 228 if (this._pendingDeferredLabelFieldHandlerEvents == 0) {
232 this.labelFieldHandler(aColumnIndex, anEvent); 229 this.labelFieldHandler(aColumnIndex, anEvent);
233 } 230 }
234//MochiKit.Logging.logDebug("<<< deferredLabelFieldHandlerCatcher"); 231//MochiKit.Logging.logDebug("<<< deferredLabelFieldHandlerCatcher");
235 }, 232 },
236 233
237 //------------------------------------------------------------------------- 234 //-------------------------------------------------------------------------
238 __syntaxFix__: "syntax fix" 235 __syntaxFix__: "syntax fix"
239}); 236});
240 237
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js
index a53c531..6344e06 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js
@@ -1,212 +1,209 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } 29if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
33if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } 30if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; }
34 31
35//############################################################################# 32//#############################################################################
36 33
37Clipperz.PM.Components.Import.CSVImport.CSVImportNotes = function(anElement, args) { 34Clipperz.PM.Components.Import.CSVImport.CSVImportNotes = function(anElement, args) {
38 args = args || {}; 35 args = args || {};
39 36
40 Clipperz.PM.Components.Import.CSVImport.CSVImportNotes.superclass.constructor.call(this, anElement, args); 37 Clipperz.PM.Components.Import.CSVImport.CSVImportNotes.superclass.constructor.call(this, anElement, args);
41 this._mainComponent = args.mainComponent; 38 this._mainComponent = args.mainComponent;
42 39
43 return this; 40 return this;
44} 41}
45 42
46//============================================================================= 43//=============================================================================
47 44
48YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportNotes, Clipperz.PM.Components.BaseComponent, { 45YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportNotes, Clipperz.PM.Components.BaseComponent, {
49 46
50 'toString': function() { 47 'toString': function() {
51 return "Clipperz.PM.Components.Import.CSVImport.CSVImportNotes component"; 48 return "Clipperz.PM.Components.Import.CSVImport.CSVImportNotes component";
52 }, 49 },
53 50
54 //------------------------------------------------------------------------- 51 //-------------------------------------------------------------------------
55 52
56 'mainComponent': function() { 53 'mainComponent': function() {
57 return this._mainComponent; 54 return this._mainComponent;
58 }, 55 },
59 56
60 //------------------------------------------------------------------------- 57 //-------------------------------------------------------------------------
61 58
62 'render': function() { 59 'render': function() {
63 varnotesSelectorCheckboxCells; 60 varnotesSelectorCheckboxCells;
64 var totalNumberOfColumns; 61 var totalNumberOfColumns;
65 var titleColumnIndex; 62 var titleColumnIndex;
66 var notesColumnIndex; 63 var notesColumnIndex;
67 var i,c; 64 var i,c;
68 65
69 Clipperz.NotificationCenter.unregister(this); 66 Clipperz.NotificationCenter.unregister(this);
70 MochiKit.Signal.disconnectAllTo(this); 67 MochiKit.Signal.disconnectAllTo(this);
71 68
72 this.element().update(""); 69 this.element().update("");
73 70
74 titleColumnIndex = this.mainComponent().titleColumnIndex() 71 titleColumnIndex = this.mainComponent().titleColumnIndex()
75 notesColumnIndex = this.mainComponent().notesColumnIndex() 72 notesColumnIndex = this.mainComponent().notesColumnIndex()
76 73
77 totalNumberOfColumns = this.mainComponent().parsedValues()[0].length; 74 totalNumberOfColumns = this.mainComponent().parsedValues()[0].length;
78 75
79 notesSelectorCheckboxCells = [{tag:'th', cls:'title', html:this.mainComponent().labelForColumn(titleColumnIndex)}]; 76 notesSelectorCheckboxCells = [{tag:'th', cls:'title', html:this.mainComponent().labelForColumn(titleColumnIndex)}];
80 c =totalNumberOfColumns; 77 c =totalNumberOfColumns;
81 for (i=0; i<c; i++) { 78 for (i=0; i<c; i++) {
82 if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) { 79 if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) {
83 notesSelectorCheckboxCells.push({tag:'th', id:this.getId('th_' + i), valign:'top', children:[ 80 notesSelectorCheckboxCells.push({tag:'th', id:this.getId('th_' + i), valign:'top', children:[
84 {tag:'input', type:'radio', id:this.getId('radio_' + i), name:'CSVImportNotesColumn', value:i}, 81 {tag:'input', type:'radio', id:this.getId('radio_' + i), name:'CSVImportNotesColumn', value:i},
85 {tag:'span', cls:'clickableSpan', id:this.getId('columnLabel_' + i), html:this.mainComponent().labelForColumn(i)} 82 {tag:'span', cls:'clickableSpan', id:this.getId('columnLabel_' + i), html:this.mainComponent().labelForColumn(i)}
86 ]}) 83 ]})
87 } 84 }
88 } 85 }
89 86
90 this.domHelper().append(this.element(), {tag:'div', children:[ 87 this.domHelper().append(this.element(), {tag:'div', children:[
91 {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Notes']}, 88 {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Notes']},
92 {tag:'div', id:this.getId('dataDiv'), children:[ 89 {tag:'div', id:this.getId('dataDiv'), children:[
93 {tag:'div', cls:'importStepParameters', children:[ 90 {tag:'div', cls:'importStepParameters', children:[
94 {tag:'input', id:this.getId('doNotSetNotes_radio'), type:'radio', name:'CSVImportNotesColumn', value:-1}, 91 {tag:'input', id:this.getId('doNotSetNotes_radio'), type:'radio', name:'CSVImportNotesColumn', value:-1},
95 {tag:'span', id:this.getId('doNotSetNotes_span'), cls:'clickableSpan', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Notes_Settings_noSelectionLabel']} 92 {tag:'span', id:this.getId('doNotSetNotes_span'), cls:'clickableSpan', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Notes_Settings_noSelectionLabel']}
96 ]}, 93 ]},
97 {tag:'div', cls:'csvImportPreview', children:[ 94 {tag:'div', cls:'csvImportPreview', children:[
98 {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[ 95 {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[
99 {tag:'thead', id:this.getId('previewData_thead'), children:[ 96 {tag:'thead', id:this.getId('previewData_thead'), children:[
100 {tag:'tr', children:notesSelectorCheckboxCells} 97 {tag:'tr', children:notesSelectorCheckboxCells}
101 ]}, 98 ]},
102 {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} 99 {tag:'tbody', id:this.getId('previewData_tbody'), children:[]}
103 ]} 100 ]}
104 ]} 101 ]}
105 ]} 102 ]}
106 ]}); 103 ]});
107 104
108 this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); 105 this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues());
109 106
110 if ((notesColumnIndex >= totalNumberOfColumns) || (notesColumnIndex == titleColumnIndex) || !(this.mainComponent().isColumnSelected(notesColumnIndex))) { 107 if ((notesColumnIndex >= totalNumberOfColumns) || (notesColumnIndex == titleColumnIndex) || !(this.mainComponent().isColumnSelected(notesColumnIndex))) {
111 this.mainComponent().setNotesColumnIndex(-1); 108 this.mainComponent().setNotesColumnIndex(-1);
112 notesColumnIndex = -1; 109 notesColumnIndex = -1;
113 } 110 }
114 111
115 c =totalNumberOfColumns; 112 c =totalNumberOfColumns;
116 for (i=0; i<c; i++) { 113 for (i=0; i<c; i++) {
117 if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) { 114 if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) {
118 MochiKit.Signal.connect(this.getDom('radio_' + i), 'onclick', this, 'renderDataHandler'); 115 MochiKit.Signal.connect(this.getDom('radio_' + i), 'onclick', this, 'renderDataHandler');
119 if (Clipperz_IEisBroken != true) { 116 if (Clipperz_IEisBroken != true) {
120 MochiKit.Signal.connect(this.getDom('columnLabel_' + i), 'onclick', this.getDom('radio_' + i), 'click'); 117 MochiKit.Signal.connect(this.getDom('columnLabel_' + i), 'onclick', this.getDom('radio_' + i), 'click');
121 } 118 }
122 } 119 }
123 } 120 }
124 121
125 MochiKit.Signal.connect(this.getDom('doNotSetNotes_radio'), 'onclick', this, 'renderDataHandler'); 122 MochiKit.Signal.connect(this.getDom('doNotSetNotes_radio'), 'onclick', this, 'renderDataHandler');
126 if (Clipperz_IEisBroken != true) { 123 if (Clipperz_IEisBroken != true) {
127 MochiKit.Signal.connect(this.getDom('doNotSetNotes_span'), 'onclick', this.getDom('doNotSetNotes_radio'), 'click'); 124 MochiKit.Signal.connect(this.getDom('doNotSetNotes_span'), 'onclick', this.getDom('doNotSetNotes_radio'), 'click');
128 } 125 }
129 126
130 if (notesColumnIndex == -1) { 127 if (notesColumnIndex == -1) {
131 this.getDom('doNotSetNotes_radio').click(); 128 this.getDom('doNotSetNotes_radio').click();
132 } else { 129 } else {
133 this.getDom('radio_' + notesColumnIndex).click(); 130 this.getDom('radio_' + notesColumnIndex).click();
134 } 131 }
135 }, 132 },
136 133
137 //------------------------------------------------------------------------- 134 //-------------------------------------------------------------------------
138 135
139 'renderData': function(anElement, someData) { 136 'renderData': function(anElement, someData) {
140 var data; 137 var data;
141 var config; 138 var config;
142 var titleColumnIndex; 139 var titleColumnIndex;
143 var notesColumnIndex; 140 var notesColumnIndex;
144 var i,c; 141 var i,c;
145 142
146 // anElement.update(""); 143 // anElement.update("");
147 MochiKit.DOM.replaceChildNodes(anElement.dom); 144 MochiKit.DOM.replaceChildNodes(anElement.dom);
148 145
149 titleColumnIndex = this.mainComponent().titleColumnIndex(); 146 titleColumnIndex = this.mainComponent().titleColumnIndex();
150 notesColumnIndex = this.mainComponent().notesColumnIndex(); 147 notesColumnIndex = this.mainComponent().notesColumnIndex();
151 148
152 if (this.mainComponent().isFirstRowHeader()) { 149 if (this.mainComponent().isFirstRowHeader()) {
153 data = someData.slice(1); 150 data = someData.slice(1);
154 } else { 151 } else {
155 data = someData; 152 data = someData;
156 } 153 }
157 154
158 155
159 // config = [{tag:'tr', cls:'CSV_previewData_header', children:[{tag:'td', valign:'top', html:header[titleColumnIndex], cls:'title'}]}]; 156 // config = [{tag:'tr', cls:'CSV_previewData_header', children:[{tag:'td', valign:'top', html:header[titleColumnIndex], cls:'title'}]}];
160 // c = header.length; 157 // c = header.length;
161 // for (i=0; i<c; i++) { 158 // for (i=0; i<c; i++) {
162 // if (i != titleColumnIndex) { 159 // if (i != titleColumnIndex) {
163 // config[0].children.push({tag:'td', valign:'top', html:header[i], cls:((notesColumnIndex == i) ? 'notesColumn': '')}) 160 // config[0].children.push({tag:'td', valign:'top', html:header[i], cls:((notesColumnIndex == i) ? 'notesColumn': '')})
164 // } 161 // }
165 // } 162 // }
166 163
167 config = MochiKit.Base.map(MochiKit.Base.bind(function(aTitleColumnIndex, aRowData) { 164 config = MochiKit.Base.map(MochiKit.Base.bind(function(aTitleColumnIndex, aRowData) {
168 var result; 165 var result;
169 var i,c; 166 var i,c;
170 167
171 result = {tag:'tr', children:[{tag:'td', valign:'top', cls:'title', html:(MochiKit.Base.isNotEmpty(aRowData[aTitleColumnIndex]) ? aRowData[aTitleColumnIndex].replace(/\n/g, '<br>') : '&nbsp;')}]}; 168 result = {tag:'tr', children:[{tag:'td', valign:'top', cls:'title', html:(MochiKit.Base.isNotEmpty(aRowData[aTitleColumnIndex]) ? aRowData[aTitleColumnIndex].replace(/\n/g, '<br>') : '&nbsp;')}]};
172 c = aRowData.length; 169 c = aRowData.length;
173 for (i=0; i<c; i++) { 170 for (i=0; i<c; i++) {
174 if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) { 171 if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) {
175 result.children.push({tag:'td', valign:'top', cls:((notesColumnIndex == i) ? 'notesColumn': ''), html:(MochiKit.Base.isNotEmpty(aRowData[i]) ? aRowData[i].replace(/\n/g, '<br>') : '&nbsp;')}); 172 result.children.push({tag:'td', valign:'top', cls:((notesColumnIndex == i) ? 'notesColumn': ''), html:(MochiKit.Base.isNotEmpty(aRowData[i]) ? aRowData[i].replace(/\n/g, '<br>') : '&nbsp;')});
176 } 173 }
177 } 174 }
178 175
179 return result; 176 return result;
180 }, this, titleColumnIndex), data); 177 }, this, titleColumnIndex), data);
181 178
182 MochiKit.Base.map(function(aRowConfig) {Clipperz.YUI.DomHelper.append(anElement, aRowConfig);}, config); 179 MochiKit.Base.map(function(aRowConfig) {Clipperz.YUI.DomHelper.append(anElement, aRowConfig);}, config);
183 180
184 Clipperz.Style.applyZebraStylesToTable(this.getId('previewDada')); 181 Clipperz.Style.applyZebraStylesToTable(this.getId('previewDada'));
185 }, 182 },
186 183
187 //------------------------------------------------------------------------- 184 //-------------------------------------------------------------------------
188 185
189 'renderDataHandler': function(anEvent) { 186 'renderDataHandler': function(anEvent) {
190 var titleColumnIndex; 187 var titleColumnIndex;
191 var i,c; 188 var i,c;
192 189
193 this.mainComponent().setNotesColumnIndex(anEvent.src().value); 190 this.mainComponent().setNotesColumnIndex(anEvent.src().value);
194 titleColumnIndex = this.mainComponent().titleColumnIndex(); 191 titleColumnIndex = this.mainComponent().titleColumnIndex();
195 192
196 c = this.mainComponent().parsedValues()[0].length; 193 c = this.mainComponent().parsedValues()[0].length;
197 for (i=0; i<c; i++) { 194 for (i=0; i<c; i++) {
198 if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) { 195 if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) {
199 this.getElement('th_' + i).removeClass('notesColumn'); 196 this.getElement('th_' + i).removeClass('notesColumn');
200 } 197 }
201 } 198 }
202 if (anEvent.src().value != -1) { 199 if (anEvent.src().value != -1) {
203 this.getElement('th_' + anEvent.src().value).addClass('notesColumn'); 200 this.getElement('th_' + anEvent.src().value).addClass('notesColumn');
204 } 201 }
205 202
206 this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); 203 this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues());
207 }, 204 },
208 205
209 //------------------------------------------------------------------------- 206 //-------------------------------------------------------------------------
210 __syntaxFix__: "syntax fix" 207 __syntaxFix__: "syntax fix"
211}); 208});
212 209
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js
index 9162867..aa57580 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js
@@ -1,189 +1,186 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } 29if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
33if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } 30if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; }
34 31
35//############################################################################# 32//#############################################################################
36 33
37Clipperz.PM.Components.Import.CSVImport.CSVImportTitle = function(anElement, args) { 34Clipperz.PM.Components.Import.CSVImport.CSVImportTitle = function(anElement, args) {
38 args = args || {}; 35 args = args || {};
39 36
40 Clipperz.PM.Components.Import.CSVImport.CSVImportTitle.superclass.constructor.call(this, anElement, args); 37 Clipperz.PM.Components.Import.CSVImport.CSVImportTitle.superclass.constructor.call(this, anElement, args);
41 this._mainComponent = args.mainComponent; 38 this._mainComponent = args.mainComponent;
42 39
43 return this; 40 return this;
44} 41}
45 42
46//============================================================================= 43//=============================================================================
47 44
48YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportTitle, Clipperz.PM.Components.BaseComponent, { 45YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportTitle, Clipperz.PM.Components.BaseComponent, {
49 46
50 'toString': function() { 47 'toString': function() {
51 return "Clipperz.PM.Components.Import.CSVImport.CSVImportTitle component"; 48 return "Clipperz.PM.Components.Import.CSVImport.CSVImportTitle component";
52 }, 49 },
53 50
54 //------------------------------------------------------------------------- 51 //-------------------------------------------------------------------------
55 52
56 'mainComponent': function() { 53 'mainComponent': function() {
57 return this._mainComponent; 54 return this._mainComponent;
58 }, 55 },
59 56
60 //------------------------------------------------------------------------- 57 //-------------------------------------------------------------------------
61 58
62 'render': function() { 59 'render': function() {
63 vartitleSelectorCheckboxCells; 60 vartitleSelectorCheckboxCells;
64 var titleColumnIndex; 61 var titleColumnIndex;
65 var i,c; 62 var i,c;
66 63
67 Clipperz.NotificationCenter.unregister(this); 64 Clipperz.NotificationCenter.unregister(this);
68 MochiKit.Signal.disconnectAllTo(this); 65 MochiKit.Signal.disconnectAllTo(this);
69 66
70 this.element().update(""); 67 this.element().update("");
71 68
72 titleColumnIndex = this.mainComponent().titleColumnIndex() 69 titleColumnIndex = this.mainComponent().titleColumnIndex()
73 titleSelectorCheckboxCells = []; 70 titleSelectorCheckboxCells = [];
74 c =this.mainComponent().parsedValues()[0].length; 71 c =this.mainComponent().parsedValues()[0].length;
75 for (i=0; i<c; i++) { 72 for (i=0; i<c; i++) {
76 if (this.mainComponent().isColumnSelected(i)) { 73 if (this.mainComponent().isColumnSelected(i)) {
77 titleSelectorCheckboxCells.push({tag:'th', valign:'top', id:this.getId('th_' + i), children:[ 74 titleSelectorCheckboxCells.push({tag:'th', valign:'top', id:this.getId('th_' + i), children:[
78 {tag:'input', type:'radio', id:this.getId('radio_' + i), name:'CSVImportTitleColumn', value:i}, 75 {tag:'input', type:'radio', id:this.getId('radio_' + i), name:'CSVImportTitleColumn', value:i},
79 {tag:'span', cls:'clickableSpan', id:this.getId('columnLabel_' + i), html:this.mainComponent().labelForColumn(i)} 76 {tag:'span', cls:'clickableSpan', id:this.getId('columnLabel_' + i), html:this.mainComponent().labelForColumn(i)}
80 ]}) 77 ]})
81 } 78 }
82 } 79 }
83 80
84 if (titleColumnIndex >= titleSelectorCheckboxCells.length) { 81 if (titleColumnIndex >= titleSelectorCheckboxCells.length) {
85 this.mainComponent().setTitleColumnIndex(-1); 82 this.mainComponent().setTitleColumnIndex(-1);
86 } 83 }
87 84
88 this.domHelper().append(this.element(), {tag:'div', children:[ 85 this.domHelper().append(this.element(), {tag:'div', children:[
89 {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Title']}, 86 {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Title']},
90 {tag:'div', id:this.getId('dataDiv'), cls:'csvImportPreview', children:[ 87 {tag:'div', id:this.getId('dataDiv'), cls:'csvImportPreview', children:[
91 {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[ 88 {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[
92 {tag:'thead', id:this.getId('previewData_thead'), children:[ 89 {tag:'thead', id:this.getId('previewData_thead'), children:[
93 {tag:'tr', children:titleSelectorCheckboxCells} 90 {tag:'tr', children:titleSelectorCheckboxCells}
94 ]}, 91 ]},
95 {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} 92 {tag:'tbody', id:this.getId('previewData_tbody'), children:[]}
96 ]} 93 ]}
97 ]} 94 ]}
98 ]}); 95 ]});
99 96
100 this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); 97 this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues());
101 98
102 c =this.mainComponent().parsedValues()[0].length; 99 c =this.mainComponent().parsedValues()[0].length;
103 for (i=0; i<c; i++) { 100 for (i=0; i<c; i++) {
104 if (this.mainComponent().isColumnSelected(i)) { 101 if (this.mainComponent().isColumnSelected(i)) {
105 MochiKit.Signal.connect(this.getDom('radio_' + i), 'onclick', this, 'renderDataHandler'); 102 MochiKit.Signal.connect(this.getDom('radio_' + i), 'onclick', this, 'renderDataHandler');
106 if (Clipperz_IEisBroken != true) { 103 if (Clipperz_IEisBroken != true) {
107 MochiKit.Signal.connect(this.getDom('columnLabel_' + i), 'onclick', this.getDom('radio_' + i), 'click'); 104 MochiKit.Signal.connect(this.getDom('columnLabel_' + i), 'onclick', this.getDom('radio_' + i), 'click');
108 } 105 }
109 } 106 }
110 } 107 }
111 108
112 if (titleColumnIndex != -1) { 109 if (titleColumnIndex != -1) {
113 this.getDom('radio_' + titleColumnIndex).click(); 110 this.getDom('radio_' + titleColumnIndex).click();
114 } else { 111 } else {
115 this.mainComponent().nextButton().disable(); 112 this.mainComponent().nextButton().disable();
116 } 113 }
117 114
118 }, 115 },
119 116
120 //------------------------------------------------------------------------- 117 //-------------------------------------------------------------------------
121 118
122 'renderData': function(anElement, someData) { 119 'renderData': function(anElement, someData) {
123 var data; 120 var data;
124 var config; 121 var config;
125 var titleColumnIndex; 122 var titleColumnIndex;
126 var i,c; 123 var i,c;
127 124
128 // anElement.update(""); 125 // anElement.update("");
129 MochiKit.DOM.replaceChildNodes(anElement.dom); 126 MochiKit.DOM.replaceChildNodes(anElement.dom);
130 127
131 titleColumnIndex = this.mainComponent().titleColumnIndex() 128 titleColumnIndex = this.mainComponent().titleColumnIndex()
132 129
133 if (this.mainComponent().isFirstRowHeader()) { 130 if (this.mainComponent().isFirstRowHeader()) {
134 data = someData.slice(1); 131 data = someData.slice(1);
135 } else { 132 } else {
136 data = someData; 133 data = someData;
137 } 134 }
138 135
139 config = MochiKit.Base.map(MochiKit.Base.bind(function(aRowData) { 136 config = MochiKit.Base.map(MochiKit.Base.bind(function(aRowData) {
140 var result; 137 var result;
141 var i,c; 138 var i,c;
142 139
143 result = {tag:'tr', children:[]}; 140 result = {tag:'tr', children:[]};
144 c = aRowData.length; 141 c = aRowData.length;
145 for (i=0; i<c; i++) { 142 for (i=0; i<c; i++) {
146 if (this.mainComponent().isColumnSelected(i)) { 143 if (this.mainComponent().isColumnSelected(i)) {
147 var field; 144 var field;
148 145
149 field = aRowData[i]; 146 field = aRowData[i];
150 result.children.push({tag:'td', valign:'top', cls:((titleColumnIndex == i) ? 'titleColumn': ''), html:(MochiKit.Base.isNotEmpty(field) ? field.replace(/\n/g, '<br>') : '&nbsp;')}); 147 result.children.push({tag:'td', valign:'top', cls:((titleColumnIndex == i) ? 'titleColumn': ''), html:(MochiKit.Base.isNotEmpty(field) ? field.replace(/\n/g, '<br>') : '&nbsp;')});
151 } 148 }
152 } 149 }
153 150
154 return result; 151 return result;
155 }, this), data); 152 }, this), data);
156 153
157 MochiKit.Base.map(function(aRowConfig) {Clipperz.YUI.DomHelper.append(anElement, aRowConfig);}, config); 154 MochiKit.Base.map(function(aRowConfig) {Clipperz.YUI.DomHelper.append(anElement, aRowConfig);}, config);
158 155
159 Clipperz.Style.applyZebraStylesToTable(this.getId('previewDada')); 156 Clipperz.Style.applyZebraStylesToTable(this.getId('previewDada'));
160 }, 157 },
161 158
162 //------------------------------------------------------------------------- 159 //-------------------------------------------------------------------------
163 160
164 'renderDataHandler': function(anEvent) { 161 'renderDataHandler': function(anEvent) {
165 var i,c; 162 var i,c;
166 163
167 this.mainComponent().setTitleColumnIndex(anEvent.src().value); 164 this.mainComponent().setTitleColumnIndex(anEvent.src().value);
168 165
169 c = this.mainComponent().parsedValues()[0].length; 166 c = this.mainComponent().parsedValues()[0].length;
170 for (i=0; i<c; i++) { 167 for (i=0; i<c; i++) {
171 if (this.mainComponent().isColumnSelected(i)) { 168 if (this.mainComponent().isColumnSelected(i)) {
172 this.getElement('th_' + i).removeClass('titleColumn'); 169 this.getElement('th_' + i).removeClass('titleColumn');
173 } 170 }
174 } 171 }
175 this.getElement('th_' + anEvent.src().value).addClass('titleColumn'); 172 this.getElement('th_' + anEvent.src().value).addClass('titleColumn');
176 173
177 if (anEvent.src().value != -1) { 174 if (anEvent.src().value != -1) {
178 this.mainComponent().nextButton().enable(); 175 this.mainComponent().nextButton().enable();
179 } else { 176 } else {
180 this.mainComponent().nextButton().disable(); 177 this.mainComponent().nextButton().disable();
181 } 178 }
182 179
183 this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); 180 this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues());
184 }, 181 },
185 182
186 //------------------------------------------------------------------------- 183 //-------------------------------------------------------------------------
187 __syntaxFix__: "syntax fix" 184 __syntaxFix__: "syntax fix"
188}); 185});
189 186
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImportComponent.js
index 707a3d2..c1dd1a9 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImportComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImportComponent.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } 29if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Components.Import.CSVImportComponent = function(anElement, args) { 33Clipperz.PM.Components.Import.CSVImportComponent = function(anElement, args) {
37 args = args || {}; 34 args = args || {};
38 35
39 this._steps = this._steps || ['CSV_EDIT', 'CSV_COLUMNS', 'CSV_HEADER', 'CSV_TITLE', 'CSV_NOTES', 'CSV_FIELDS', 'PREVIEW', 'IMPORT']; 36 this._steps = this._steps || ['CSV_EDIT', 'CSV_COLUMNS', 'CSV_HEADER', 'CSV_TITLE', 'CSV_NOTES', 'CSV_FIELDS', 'PREVIEW', 'IMPORT'];
40 37
41 Clipperz.PM.Components.Import.CSVImportComponent.superclass.constructor.call(this, anElement, args); 38 Clipperz.PM.Components.Import.CSVImportComponent.superclass.constructor.call(this, anElement, args);
42 39
43 this._step1Component = null; 40 this._step1Component = null;
44 this._step2Component = null; 41 this._step2Component = null;
45 this._step3Component = null; 42 this._step3Component = null;
46 this._step4Component = null; 43 this._step4Component = null;
47 this._step5Component = null; 44 this._step5Component = null;
48 45
49 this._isFirstRowHeader = false; 46 this._isFirstRowHeader = false;
50 this._titleColumnIndex = -1; 47 this._titleColumnIndex = -1;
51 this._notesColumnIndex = -1; 48 this._notesColumnIndex = -1;
52 this._fieldSettings = {}; 49 this._fieldSettings = {};
53 this._skippedColumns = new Clipperz.Set(); 50 this._skippedColumns = new Clipperz.Set();
54 51
55 this.render(); 52 this.render();
56 53
57 return this; 54 return this;
58} 55}
59 56
60//============================================================================= 57//=============================================================================
61 58
62YAHOO.extendX(Clipperz.PM.Components.Import.CSVImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { 59YAHOO.extendX(Clipperz.PM.Components.Import.CSVImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, {
63 60
64 'toString': function() { 61 'toString': function() {
65 return "Clipperz.PM.Components.Import.CSVImportComponent component"; 62 return "Clipperz.PM.Components.Import.CSVImportComponent component";
66 }, 63 },
67 64
68 //------------------------------------------------------------------------- 65 //-------------------------------------------------------------------------
69 66
70 'render': function() { 67 'render': function() {
71 this.domHelper().append(this.element(), {tag:'div', cls:'csvImportWizard', children:[ 68 this.domHelper().append(this.element(), {tag:'div', cls:'csvImportWizard', children:[
72 {tag:'h3', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Title']}, 69 {tag:'h3', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Title']},
73 {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, 70 {tag:'div', cls:'importSteps', id:this.getId('importSteps')},
74 {tag:'div', cls:'importStepBlocks', children:[ 71 {tag:'div', cls:'importStepBlocks', children:[
75 {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ 72 {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[
76 {tag:'div', children:[ 73 {tag:'div', children:[
77 {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_csv_description']}, 74 {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_csv_description']},
78 {tag:'div', cls:'importOptionsParameters', children:[ 75 {tag:'div', cls:'importOptionsParameters', children:[
79 {tag:'div', cls:'CSVImportOptionsParameters', children:[ 76 {tag:'div', cls:'CSVImportOptionsParameters', children:[
80 {tag:'ul', children:[ 77 {tag:'ul', children:[
81 {tag:'li', children:[ 78 {tag:'li', children:[
82 {tag:'label', 'for':this.getId('CSV_inputOptions_separator'), html:"separator"}, 79 {tag:'label', 'for':this.getId('CSV_inputOptions_separator'), html:"separator"},
83 {tag:'select', name:this.getId('CSV_inputOptions_separator'), id:this.getId('CSV_inputOptions_separator'), children:[ 80 {tag:'select', name:this.getId('CSV_inputOptions_separator'), id:this.getId('CSV_inputOptions_separator'), children:[
84 {tag:'option', name:'comma', value:',', html:"comma (,)", selected:true}, 81 {tag:'option', name:'comma', value:',', html:"comma (,)", selected:true},
85 {tag:'option', name:'tab', value:'\t', html:"tab"} 82 {tag:'option', name:'tab', value:'\t', html:"tab"}
86 ]} 83 ]}
87 ]}, 84 ]},
88 85
89 {tag:'li', children:[ 86 {tag:'li', children:[
90 {tag:'label', 'for':this.getId('CSV_inputOptions_quote'), html:"quote"}, 87 {tag:'label', 'for':this.getId('CSV_inputOptions_quote'), html:"quote"},
91 {tag:'select', name:this.getId('CSV_inputOptions_quote'), id:this.getId('CSV_inputOptions_quote'), children:[ 88 {tag:'select', name:this.getId('CSV_inputOptions_quote'), id:this.getId('CSV_inputOptions_quote'), children:[
92 {tag:'option', name:'doubleQuote', value:'\"', html:"double quote (\")", selected:true}, 89 {tag:'option', name:'doubleQuote', value:'\"', html:"double quote (\")", selected:true},
93 {tag:'option', name:'singleQuote', value:'\'', html:"single quote (\')"} 90 {tag:'option', name:'singleQuote', value:'\'', html:"single quote (\')"}
94 ]} 91 ]}
95 ]}, 92 ]},
96 93
97 {tag:'li', children:[ 94 {tag:'li', children:[
98 {tag:'label', 'for':this.getId('CSV_inputOptions_escape'), html:"escape"}, 95 {tag:'label', 'for':this.getId('CSV_inputOptions_escape'), html:"escape"},
99 {tag:'select', name:this.getId('CSV_inputOptions_escape'), id:this.getId('CSV_inputOptions_escape'), children:[ 96 {tag:'select', name:this.getId('CSV_inputOptions_escape'), id:this.getId('CSV_inputOptions_escape'), children:[
100 {tag:'option', name:'doubleQuote', value:'\"', html:"double quote (\")", selected:true}, 97 {tag:'option', name:'doubleQuote', value:'\"', html:"double quote (\")", selected:true},
101 {tag:'option', name:'slash', value:'\/', html:"slash (\/)"}, 98 {tag:'option', name:'slash', value:'\/', html:"slash (\/)"},
102 {tag:'option', name:'backslash', value:'\\', html:"backslash (\\)"} 99 {tag:'option', name:'backslash', value:'\\', html:"backslash (\\)"}
103 ]} 100 ]}
104 ]} 101 ]}
105 ]} 102 ]}
106 ]} 103 ]}
107 ]}, 104 ]},
108 this.textAreaConfig() 105 this.textAreaConfig()
109 ]} 106 ]}
110 ]}, 107 ]},
111 {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[]}, 108 {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[]},
112 {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[]}, 109 {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[]},
113 {tag:'div', cls:'step_3', id:this.getId('step_3'), children:[]}, 110 {tag:'div', cls:'step_3', id:this.getId('step_3'), children:[]},
114 {tag:'div', cls:'step_4', id:this.getId('step_4'), children:[]}, 111 {tag:'div', cls:'step_4', id:this.getId('step_4'), children:[]},
115 {tag:'div', cls:'step_5', id:this.getId('step_5'), children:[]}, 112 {tag:'div', cls:'step_5', id:this.getId('step_5'), children:[]},
116 {tag:'div', cls:'step_6', id:this.getId('step_6'), children:[ 113 {tag:'div', cls:'step_6', id:this.getId('step_6'), children:[
117 {tag:'div', children:[ 114 {tag:'div', children:[
118 {tag:'div', id:this.getId('previewDiv'), html:"preview"} 115 {tag:'div', id:this.getId('previewDiv'), html:"preview"}
119 ]} 116 ]}
120 ]}, 117 ]},
121 {tag:'div', cls:'step_7', id:this.getId('step_7'), children:[ 118 {tag:'div', cls:'step_7', id:this.getId('step_7'), children:[
122 {tag:'div', children:[ 119 {tag:'div', children:[
123 {tag:'h4', html:"done"} 120 {tag:'h4', html:"done"}
124 ]} 121 ]}
125 ]} 122 ]}
126 ]}, 123 ]},
127 {tag:'div', cls:'importOptionsButtons', children:[ 124 {tag:'div', cls:'importOptionsButtons', children:[
128 {tag:'table', children:[ 125 {tag:'table', children:[
129 {tag:'tbody', children:[ 126 {tag:'tbody', children:[
130 {tag:'tr', children:[ 127 {tag:'tr', children:[
131 {tag:'td', html:'&nbsp;'}, 128 {tag:'td', html:'&nbsp;'},
132 {tag:'td', children:[ 129 {tag:'td', children:[
133 {tag:'div', id:this.getId('backActionButton')} 130 {tag:'div', id:this.getId('backActionButton')}
134 ]}, 131 ]},
135 {tag:'td', html:'&nbsp;'}, 132 {tag:'td', html:'&nbsp;'},
136 {tag:'td', children:[ 133 {tag:'td', children:[
137 {tag:'div', id:this.getId('nextActionButton')} 134 {tag:'div', id:this.getId('nextActionButton')}
138 ]}, 135 ]},
139 {tag:'td', html:'&nbsp;'} 136 {tag:'td', html:'&nbsp;'}
140 ]} 137 ]}
141 ]} 138 ]}
142 ]} 139 ]}
143 ]} 140 ]}
144 ]}); 141 ]});
145 142
146 this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); 143 this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this}));
147 this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); 144 this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this}));
148 145
149 this.updateSteps(); 146 this.updateSteps();
150 147
151 this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() 148 this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show()
152 this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 149 this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
153 this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 150 this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
154 this.getElement('step_3').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 151 this.getElement('step_3').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
155 this.getElement('step_4').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 152 this.getElement('step_4').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
156 this.getElement('step_5').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 153 this.getElement('step_5').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
157 this.getElement('step_6').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 154 this.getElement('step_6').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
158 this.getElement('step_7').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 155 this.getElement('step_7').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
159 156
160 // this.backButton().disable(); 157 // this.backButton().disable();
161 }, 158 },
162 159
163 //------------------------------------------------------------------------- 160 //-------------------------------------------------------------------------
164 161
165 'nextAction': function() { 162 'nextAction': function() {
166 switch (this.currentStep()) { 163 switch (this.currentStep()) {
167 case 0: //-> 1 164 case 0: //-> 1
168 Clipperz.PM.Components.MessageBox.showProgressPanel( 165 Clipperz.PM.Components.MessageBox.showProgressPanel(
169 MochiKit.Base.method(this, 'deferredParseValues'), 166 MochiKit.Base.method(this, 'deferredParseValues'),
170 MochiKit.Base.method(this, 'handleParseError'), 167 MochiKit.Base.method(this, 'handleParseError'),
171 this.getDom('nextActionButton') 168 this.getDom('nextActionButton')
172 ); 169 );
173 break; 170 break;
174 case 1: //-> 2 171 case 1: //-> 2
175 this.getElement('step_1').hide(); 172 this.getElement('step_1').hide();
176 this.step2Component().render(); 173 this.step2Component().render();
177 this.setCurrentStep(2); 174 this.setCurrentStep(2);
178 this.getElement('step_2').show(); 175 this.getElement('step_2').show();
179 break; 176 break;
180 case 2: //-> 3 177 case 2: //-> 3
181 this.getElement('step_2').hide(); 178 this.getElement('step_2').hide();
182 this.step3Component().render(); 179 this.step3Component().render();
183 this.setCurrentStep(3); 180 this.setCurrentStep(3);
184 this.getElement('step_3').show(); 181 this.getElement('step_3').show();
185 break; 182 break;
186 case 3: //-> 4 183 case 3: //-> 4
187 this.getElement('step_3').hide(); 184 this.getElement('step_3').hide();
188 this.step4Component().render(); 185 this.step4Component().render();
189 this.setCurrentStep(4); 186 this.setCurrentStep(4);
190 this.getElement('step_4').show(); 187 this.getElement('step_4').show();
191 break; 188 break;
192 case 4: //-> 5 189 case 4: //-> 5
193 this.getElement('step_4').hide(); 190 this.getElement('step_4').hide();
194 this.step5Component().render(); 191 this.step5Component().render();
195 this.setCurrentStep(5); 192 this.setCurrentStep(5);
196 this.getElement('step_5').show(); 193 this.getElement('step_5').show();
197 break; 194 break;
198 case 5: //-> 6 195 case 5: //-> 6
199 this.previewValues(); 196 this.previewValues();
200 break; 197 break;
201 case 6: //-> 7 198 case 6: //-> 7
202 this.importValues(); 199 this.importValues();
203 break; 200 break;
204 } 201 }
205 }, 202 },
206 203
207 //------------------------------------------------------------------------- 204 //-------------------------------------------------------------------------
208 205
209 'deferredParseValues': function() { 206 'deferredParseValues': function() {
210 var deferredResult; 207 var deferredResult;
211 208
212 deferredResult = new MochiKit.Async.Deferred(); 209 deferredResult = new MochiKit.Async.Deferred();
213//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("CSVImportComponent.deferredParseValues - 1 " + res.substring(0,50)); return res;}); 210//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("CSVImportComponent.deferredParseValues - 1 " + res.substring(0,50)); return res;});
214 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'parseImportData'); 211 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'parseImportData');
215//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("CSVImportComponent.deferredParseValues - 2 " + res.substring(0,50)); return res;}); 212//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("CSVImportComponent.deferredParseValues - 2 " + res.substring(0,50)); return res;});
216 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 213 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
217 this.startProcessing(); 214 this.startProcessing();
218 215
219 return res; 216 return res;
220 }, this)); 217 }, this));
221//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("CSVImportComponent.deferredParseValues - 3 " + res.substring(0,50)); return res;}); 218//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("CSVImportComponent.deferredParseValues - 3 " + res.substring(0,50)); return res;});
222 deferredResult.addCallback(MochiKit.Base.method(this, 'parseCSVValues')); 219 deferredResult.addCallback(MochiKit.Base.method(this, 'parseCSVValues'));
223//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("CSVImportComponent.deferredParseValues - 4 " + res); return res;}); 220//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("CSVImportComponent.deferredParseValues - 4 " + res); return res;});
224 deferredResult.addCallback(MochiKit.Base.method(this, 'setParsedValues')); 221 deferredResult.addCallback(MochiKit.Base.method(this, 'setParsedValues'));
225//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("CSVImportComponent.deferredParseValues - 5 " + res); return res;}); 222//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("CSVImportComponent.deferredParseValues - 5 " + res); return res;});
226 deferredResult.addCallback(MochiKit.Base.method(this.step1Component(), 'render')); 223 deferredResult.addCallback(MochiKit.Base.method(this.step1Component(), 'render'));
227//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("CSVImportComponent.deferredParseValues - 6 " + res); return res;}); 224//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("CSVImportComponent.deferredParseValues - 6 " + res); return res;});
228 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 225 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
229 this.processingDone(); 226 this.processingDone();
230 this.getElement('step_0').hide(); 227 this.getElement('step_0').hide();
231 this.getElement('step_1').show(); 228 this.getElement('step_1').show();
232 this.backButton().enable(); 229 this.backButton().enable();
233 230
234 return res; 231 return res;
235 }, this)); 232 }, this));
236//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("CSVImportComponent.deferredParseValues - 7 " + res); return res;}); 233//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("CSVImportComponent.deferredParseValues - 7 " + res); return res;});
237 deferredResult.callback(this.textAreaContent()); 234 deferredResult.callback(this.textAreaContent());
238 235
239 return deferredResult; 236 return deferredResult;
240 }, 237 },
241 238
242 //------------------------------------------------------------------------- 239 //-------------------------------------------------------------------------
243 240
244 'deferredPreviewValues': function() { 241 'deferredPreviewValues': function() {
245 var deferredResult; 242 var deferredResult;
246 243
247//MochiKit.Logging.logDebug(">>> CSVImportComponent.deferredPreviewValues"); 244//MochiKit.Logging.logDebug(">>> CSVImportComponent.deferredPreviewValues");
248 deferredResult = new MochiKit.Async.Deferred(); 245 deferredResult = new MochiKit.Async.Deferred();
249//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 1 " + res); return res;}); 246//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 1 " + res); return res;});
250 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'previewImportData'); 247 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'previewImportData');
251//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 2 " + res); return res;}); 248//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 2 " + res); return res;});
252 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 249 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
253 this.startProcessing(); 250 this.startProcessing();
254 251
255 return res; 252 return res;
256 }, this)); 253 }, this));
257//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 3 " + res); return res;}); 254//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 3 " + res); return res;});
258 deferredResult.addCallback(MochiKit.Base.method(this, 'processCSVParsedValues')); 255 deferredResult.addCallback(MochiKit.Base.method(this, 'processCSVParsedValues'));
259//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 4 " + res); return res;}); 256//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 4 " + res); return res;});
260 deferredResult.addCallback(MochiKit.Base.method(this, 'setProcessedValues')); 257 deferredResult.addCallback(MochiKit.Base.method(this, 'setProcessedValues'));
261//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 5 " + res); return res;}); 258//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 5 " + res); return res;});
262 deferredResult.addCallback(MochiKit.Base.method(this, 'previewRecordValues')); 259 deferredResult.addCallback(MochiKit.Base.method(this, 'previewRecordValues'));
263//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 6 " + res); return res;}); 260//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 6 " + res); return res;});
264 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 261 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
265 this.processingDone(); 262 this.processingDone();
266 this.getElement('step_5').hide(); 263 this.getElement('step_5').hide();
267 this.getElement('step_6').show(); 264 this.getElement('step_6').show();
268 this.backButton().enable(); 265 this.backButton().enable();
269 266
270 return res; 267 return res;
271 }, this)); 268 }, this));
272 deferredResult.callback(this.parsedValues()); 269 deferredResult.callback(this.parsedValues());
273//MochiKit.Logging.logDebug("<<< CSVImportComponent.deferredPreviewValues"); 270//MochiKit.Logging.logDebug("<<< CSVImportComponent.deferredPreviewValues");
274 271
275 return deferredResult; 272 return deferredResult;
276 }, 273 },
277 274
278 //------------------------------------------------------------------------- 275 //-------------------------------------------------------------------------
279 276
280 'csvProcessor': function() { 277 'csvProcessor': function() {
281 return new Clipperz.CSVProcessor({ 278 return new Clipperz.CSVProcessor({
282 quoteChar: this.getDom('CSV_inputOptions_quote').value, 279 quoteChar: this.getDom('CSV_inputOptions_quote').value,
283 escapeChar: this.getDom('CSV_inputOptions_escape').value, 280 escapeChar: this.getDom('CSV_inputOptions_escape').value,
284 separatorChar:this.getDom('CSV_inputOptions_separator').value, 281 separatorChar:this.getDom('CSV_inputOptions_separator').value,
285 binary:true 282 binary:true
286 }); 283 });
287 }, 284 },
288 285
289 //------------------------------------------------------------------------- 286 //-------------------------------------------------------------------------
290 287
291 'parseCSVValues': function(someData) { 288 'parseCSVValues': function(someData) {
292 var deferredResult; 289 var deferredResult;
293 var csvProcessor; 290 var csvProcessor;
294 291
295 csvProcessor = this.csvProcessor(); 292 csvProcessor = this.csvProcessor();
296 deferredResult = new MochiKit.Async.Deferred(); 293 deferredResult = new MochiKit.Async.Deferred();
297//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.parseKeePassValues - 1 " + res.substring(0,50)); return res;}); 294//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.parseKeePassValues - 1 " + res.substring(0,50)); return res;});
298 deferredResult.addCallback(function(res) { 295 deferredResult.addCallback(function(res) {
299 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:(res.length)}, res); 296 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:(res.length)}, res);
300 }) 297 })
301//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.parseKeePassValues - 2 " + res.substring(0,50)); return res;}); 298//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.parseKeePassValues - 2 " + res.substring(0,50)); return res;});
302 deferredResult.addCallback(MochiKit.Base.method(csvProcessor, 'deferredParse')); 299 deferredResult.addCallback(MochiKit.Base.method(csvProcessor, 'deferredParse'));
303//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.parseKeePassValues - 3 " + res); return res;}); 300//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.parseKeePassValues - 3 " + res); return res;});
304 deferredResult.callback(someData); 301 deferredResult.callback(someData);
305 302
306 return deferredResult; 303 return deferredResult;
307 }, 304 },
308 305
309 //------------------------------------------------------------------------- 306 //-------------------------------------------------------------------------
310 307
311 'processCSVParsedValues': function (someValues) { 308 'processCSVParsedValues': function (someValues) {
312 var deferredResult; 309 var deferredResult;
313 var records; 310 var records;
314 var titleColumnIndex; 311 var titleColumnIndex;
315 var notesColumnIndex; 312 var notesColumnIndex;
316 var i,c; 313 var i,c;
317 314
318 deferredResult = new MochiKit.Async.Deferred(); 315 deferredResult = new MochiKit.Async.Deferred();
319 records = []; 316 records = [];
320 317
321 titleColumnIndex = this.titleColumnIndex(); 318 titleColumnIndex = this.titleColumnIndex();
322 notesColumnIndex = this.notesColumnIndex(); 319 notesColumnIndex = this.notesColumnIndex();
323 320
324 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {steps:(someValues.length)}); 321 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {steps:(someValues.length)});
325 322
326 c = someValues.length; 323 c = someValues.length;
327 if (this.isFirstRowHeader()) { 324 if (this.isFirstRowHeader()) {
328 i = 1; 325 i = 1;
329 } else { 326 } else {
330 i = 0; 327 i = 0;
331 } 328 }
332 329
333 for( ; i<c; i++) { 330 for( ; i<c; i++) {
334 deferredResult.addCallback(MochiKit.Async.wait, 0.2); 331 deferredResult.addCallback(MochiKit.Async.wait, 0.2);
335 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {}); 332 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {});
336 deferredResult.addCallback(MochiKit.Base.bind(function(someRecords, someData) { 333 deferredResult.addCallback(MochiKit.Base.bind(function(someRecords, someData) {
337 var record; 334 var record;
338 var recordVersion; 335 var recordVersion;
339 var ii; 336 var ii;
340 337
341 record = new Clipperz.PM.DataModel.Record({user:this.user()}); 338 record = new Clipperz.PM.DataModel.Record({user:this.user()});
342 record.setLabel(someData[titleColumnIndex]); 339 record.setLabel(someData[titleColumnIndex]);
343 if (notesColumnIndex != -1) { 340 if (notesColumnIndex != -1) {
344 record.setNotes(someData[notesColumnIndex]); 341 record.setNotes(someData[notesColumnIndex]);
345 } 342 }
346 recordVersion = record.currentVersion() 343 recordVersion = record.currentVersion()
347 344
348 for (ii in someData) { 345 for (ii in someData) {
349 // if ((ii != titleColumnIndex) && (ii != notesColumnIndex) && (typeof(this.fieldSettings()[ii]) != 'undefined')) { 346 // if ((ii != titleColumnIndex) && (ii != notesColumnIndex) && (typeof(this.fieldSettings()[ii]) != 'undefined')) {
350 if ((ii != titleColumnIndex) && (ii != notesColumnIndex) && (this.isColumnSelected(ii))) { 347 if ((ii != titleColumnIndex) && (ii != notesColumnIndex) && (this.isColumnSelected(ii))) {
351 var recordField; 348 var recordField;
352 349
353 recordField = new Clipperz.PM.DataModel.RecordField({ 350 recordField = new Clipperz.PM.DataModel.RecordField({
354 recordVersion:recordVersion, 351 recordVersion:recordVersion,
355 label: this.labelForColumn(ii), 352 label: this.labelForColumn(ii),
356 value: someData[ii], 353 value: someData[ii],
357 type: this.typeForColumn(ii) 354 type: this.typeForColumn(ii)
358 }); 355 });
359 recordVersion.addField(recordField); 356 recordVersion.addField(recordField);
360 } 357 }
361 } 358 }
362 359
363 someRecords.push(record); 360 someRecords.push(record);
364 361
365 return someRecords; 362 return someRecords;
366 }, this), records, someValues[i]); 363 }, this), records, someValues[i]);
367 } 364 }
368 deferredResult.addCallback(MochiKit.Async.succeed, records); 365 deferredResult.addCallback(MochiKit.Async.succeed, records);
369 deferredResult.callback(); 366 deferredResult.callback();
370 367
371 return deferredResult; 368 return deferredResult;
372 }, 369 },
373 370
374 //------------------------------------------------------------------------- 371 //-------------------------------------------------------------------------
375 372
376 'step1Component': function() { 373 'step1Component': function() {
377 if (this._step1Component == null) { 374 if (this._step1Component == null) {
378 this._step1Component = new Clipperz.PM.Components.Import.CSVImport.CSVImportColumns(this.getElement('step_1'), {mainComponent:this}); 375 this._step1Component = new Clipperz.PM.Components.Import.CSVImport.CSVImportColumns(this.getElement('step_1'), {mainComponent:this});
379 } 376 }
380 377
381 return this._step1Component; 378 return this._step1Component;
382 }, 379 },
383 380
384 'step2Component': function() { 381 'step2Component': function() {
385 if (this._step2Component == null) { 382 if (this._step2Component == null) {
386 this._step2Component = new Clipperz.PM.Components.Import.CSVImport.CSVImportHeader(this.getElement('step_2'), {mainComponent:this}); 383 this._step2Component = new Clipperz.PM.Components.Import.CSVImport.CSVImportHeader(this.getElement('step_2'), {mainComponent:this});
387 } 384 }
388 385
389 return this._step2Component; 386 return this._step2Component;
390 }, 387 },
391 388
392 'step3Component': function() { 389 'step3Component': function() {
393 if (this._step3Component == null) { 390 if (this._step3Component == null) {
394 this._step3Component = new Clipperz.PM.Components.Import.CSVImport.CSVImportTitle(this.getElement('step_3'), {mainComponent:this}); 391 this._step3Component = new Clipperz.PM.Components.Import.CSVImport.CSVImportTitle(this.getElement('step_3'), {mainComponent:this});
395 } 392 }
396 393
397 return this._step3Component; 394 return this._step3Component;
398 }, 395 },
399 396
400 'step4Component': function() { 397 'step4Component': function() {
401 if (this._step4Component == null) { 398 if (this._step4Component == null) {
402 this._step4Component = new Clipperz.PM.Components.Import.CSVImport.CSVImportNotes(this.getElement('step_4'), {mainComponent:this}); 399 this._step4Component = new Clipperz.PM.Components.Import.CSVImport.CSVImportNotes(this.getElement('step_4'), {mainComponent:this});
403 } 400 }
404 401
405 return this._step4Component; 402 return this._step4Component;
406 }, 403 },
407 404
408 'step5Component': function() { 405 'step5Component': function() {
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/ClipperzImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/ClipperzImportComponent.js
index 50dcb93..c3d2fac 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/ClipperzImportComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/ClipperzImportComponent.js
@@ -1,212 +1,209 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } 29if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Components.Import.ClipperzImportComponent = function(anElement, args) { 33Clipperz.PM.Components.Import.ClipperzImportComponent = function(anElement, args) {
37 args = args || {}; 34 args = args || {};
38 35
39 Clipperz.PM.Components.Import.ClipperzImportComponent.superclass.constructor.call(this, anElement, args); 36 Clipperz.PM.Components.Import.ClipperzImportComponent.superclass.constructor.call(this, anElement, args);
40 37
41 this.render(); 38 this.render();
42 39
43 return this; 40 return this;
44} 41}
45 42
46//============================================================================= 43//=============================================================================
47 44
48YAHOO.extendX(Clipperz.PM.Components.Import.ClipperzImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { 45YAHOO.extendX(Clipperz.PM.Components.Import.ClipperzImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, {
49 46
50 'toString': function() { 47 'toString': function() {
51 return "Clipperz.PM.Components.Import.ClipperzImportComponent component"; 48 return "Clipperz.PM.Components.Import.ClipperzImportComponent component";
52 }, 49 },
53 50
54 //------------------------------------------------------------------------- 51 //-------------------------------------------------------------------------
55 52
56 'render': function() { 53 'render': function() {
57//MochiKit.Logging.logDebug(">>> Import.ClipperzImportComponent.render"); 54//MochiKit.Logging.logDebug(">>> Import.ClipperzImportComponent.render");
58 this.domHelper().append(this.element(), {tag:'div', cls:'clipperzImportWizard', children:[ 55 this.domHelper().append(this.element(), {tag:'div', cls:'clipperzImportWizard', children:[
59 {tag:'h3', htmlString:Clipperz.PM.Strings['Clipperz_ImportWizard_Title']}, 56 {tag:'h3', htmlString:Clipperz.PM.Strings['Clipperz_ImportWizard_Title']},
60 {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, 57 {tag:'div', cls:'importSteps', id:this.getId('importSteps')},
61 {tag:'div', cls:'importStepBlocks', children:[ 58 {tag:'div', cls:'importStepBlocks', children:[
62 {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ 59 {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[
63 {tag:'div', children:[ 60 {tag:'div', children:[
64 {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_clipperz_description']}, 61 {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_clipperz_description']},
65 {tag:'div', cls:'importOptionsParameters', children:[]}, 62 {tag:'div', cls:'importOptionsParameters', children:[]},
66 this.textAreaConfig() 63 this.textAreaConfig()
67 ]} 64 ]}
68 ]}, 65 ]},
69 {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ 66 {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[
70 {tag:'div', children:[ 67 {tag:'div', children:[
71 {tag:'div', id:this.getId('previewDiv'), html:"preview"} 68 {tag:'div', id:this.getId('previewDiv'), html:"preview"}
72 ]} 69 ]}
73 ]}, 70 ]},
74 {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[ 71 {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[
75 {tag:'div', children:[ 72 {tag:'div', children:[
76 {tag:'h4', html:"done"} 73 {tag:'h4', html:"done"}
77 ]} 74 ]}
78 ]} 75 ]}
79 ]}, 76 ]},
80 {tag:'div', cls:'importOptionsButtons', children:[ 77 {tag:'div', cls:'importOptionsButtons', children:[
81 {tag:'table', children:[ 78 {tag:'table', children:[
82 {tag:'tbody', children:[ 79 {tag:'tbody', children:[
83 {tag:'tr', children:[ 80 {tag:'tr', children:[
84 {tag:'td', html:'&nbsp;'}, 81 {tag:'td', html:'&nbsp;'},
85 {tag:'td', children:[ 82 {tag:'td', children:[
86 {tag:'div', id:this.getId('backActionButton')} 83 {tag:'div', id:this.getId('backActionButton')}
87 ]}, 84 ]},
88 {tag:'td', html:'&nbsp;'}, 85 {tag:'td', html:'&nbsp;'},
89 {tag:'td', children:[ 86 {tag:'td', children:[
90 {tag:'div', id:this.getId('nextActionButton')} 87 {tag:'div', id:this.getId('nextActionButton')}
91 ]}, 88 ]},
92 {tag:'td', html:'&nbsp;'} 89 {tag:'td', html:'&nbsp;'}
93 ]} 90 ]}
94 ]} 91 ]}
95 ]} 92 ]}
96 ]} 93 ]}
97 ]}); 94 ]});
98 95
99 this.updateSteps(); 96 this.updateSteps();
100 97
101 this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); 98 this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this}));
102 this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); 99 this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this}));
103 100
104 this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() 101 this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show()
105 this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 102 this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
106 this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 103 this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
107//MochiKit.Logging.logDebug("<<< Import.ClipperzImportComponent.render"); 104//MochiKit.Logging.logDebug("<<< Import.ClipperzImportComponent.render");
108 }, 105 },
109 106
110 //------------------------------------------------------------------------- 107 //-------------------------------------------------------------------------
111 108
112 'nextAction': function() { 109 'nextAction': function() {
113 switch (this.currentStep()) { 110 switch (this.currentStep()) {
114 case 0: //-> 1 111 case 0: //-> 1
115 this.previewValues(); 112 this.previewValues();
116 break; 113 break;
117 case 1: //-> 2 114 case 1: //-> 2
118 this.importValues(); 115 this.importValues();
119 break; 116 break;
120 } 117 }
121 }, 118 },
122 119
123 //------------------------------------------------------------------------- 120 //-------------------------------------------------------------------------
124 121
125 'deferredPreviewValues': function() { 122 'deferredPreviewValues': function() {
126 var deferredResult; 123 var deferredResult;
127 124
128 deferredResult = new MochiKit.Async.Deferred(); 125 deferredResult = new MochiKit.Async.Deferred();
129 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 126 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
130 this.startProcessing(); 127 this.startProcessing();
131 128
132 return res; 129 return res;
133 }, this)); 130 }, this));
134 deferredResult.addCallback(MochiKit.Base.method(this, 'processClipperzValues')); 131 deferredResult.addCallback(MochiKit.Base.method(this, 'processClipperzValues'));
135 deferredResult.addCallback(MochiKit.Base.method(this, 'setProcessedValues')); 132 deferredResult.addCallback(MochiKit.Base.method(this, 'setProcessedValues'));
136 deferredResult.addCallback(MochiKit.Base.method(this, 'previewRecordValues')); 133 deferredResult.addCallback(MochiKit.Base.method(this, 'previewRecordValues'));
137 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 134 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
138 this.processingDone(); 135 this.processingDone();
139 this.getElement('step_0').hide(); 136 this.getElement('step_0').hide();
140 this.getElement('step_1').show(); 137 this.getElement('step_1').show();
141 this.backButton().enable(); 138 this.backButton().enable();
142 139
143 return res; 140 return res;
144 }, this)); 141 }, this));
145 // deferredResult.addErrback(MochiKit.Base.bind(function() { 142 // deferredResult.addErrback(MochiKit.Base.bind(function() {
146 // this.processingAborted(); 143 // this.processingAborted();
147 // }, this)) 144 // }, this))
148 deferredResult.callback(this.textAreaContent()); 145 deferredResult.callback(this.textAreaContent());
149 146
150 return deferredResult; 147 return deferredResult;
151 }, 148 },
152 149
153 //------------------------------------------------------------------------- 150 //-------------------------------------------------------------------------
154 151
155 'processClipperzValues': function(someData) { 152 'processClipperzValues': function(someData) {
156 var deferredResult; 153 var deferredResult;
157 154
158 deferredResult = new MochiKit.Async.Deferred(); 155 deferredResult = new MochiKit.Async.Deferred();
159//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Record.processClipperzValues - 1: " + res); return res;}); 156//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Record.processClipperzValues - 1: " + res); return res;});
160 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'parseImportData'); 157 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'parseImportData');
161//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Record.processClipperzValues - 2: " + res); return res;}); 158//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Record.processClipperzValues - 2: " + res); return res;});
162 deferredResult.addCallback(Clipperz.Base.evalJSON); 159 deferredResult.addCallback(Clipperz.Base.evalJSON);
163//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Record.processClipperzValues - 3: " + res); return res;}); 160//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Record.processClipperzValues - 3: " + res); return res;});
164 deferredResult.addCallback(function(res) { 161 deferredResult.addCallback(function(res) {
165 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:(res.length)}, res); 162 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:(res.length)}, res);
166 }) 163 })
167//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Record.processClipperzValues - 4: " + res); return res;}); 164//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Record.processClipperzValues - 4: " + res); return res;});
168 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'previewImportData'); 165 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'previewImportData');
169//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Record.processClipperzValues - 5: " + res); return res;}); 166//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Record.processClipperzValues - 5: " + res); return res;});
170 deferredResult.addCallback(MochiKit.Base.bind(function(someClipperzValues) { 167 deferredResult.addCallback(MochiKit.Base.bind(function(someClipperzValues) {
171 var innerDeferredResult; 168 var innerDeferredResult;
172 var records; 169 var records;
173 var i,c; 170 var i,c;
174 171
175 innerDeferredResult = new MochiKit.Async.Deferred(); 172 innerDeferredResult = new MochiKit.Async.Deferred();
176 records = []; 173 records = [];
177 174
178 c = someClipperzValues.length; 175 c = someClipperzValues.length;
179 for(i=0; i<c; i++) { 176 for(i=0; i<c; i++) {
180 innerDeferredResult.addCallback(MochiKit.Async.wait, 0.2); 177 innerDeferredResult.addCallback(MochiKit.Async.wait, 0.2);
181 innerDeferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {}); 178 innerDeferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {});
182 innerDeferredResult.addCallback(MochiKit.Base.bind(function(someRecords, someData) { 179 innerDeferredResult.addCallback(MochiKit.Base.bind(function(someRecords, someData) {
183 var record; 180 var record;
184 var recordVersion; 181 var recordVersion;
185 182
186//MochiKit.Logging.logDebug("=== someData: " + Clipperz.Base.serializeJSON(someData)); 183//MochiKit.Logging.logDebug("=== someData: " + Clipperz.Base.serializeJSON(someData));
187 record = new Clipperz.PM.DataModel.Record({user:this.user()}); 184 record = new Clipperz.PM.DataModel.Record({user:this.user()});
188 record.setLabel(someData['label']); 185 record.setLabel(someData['label']);
189 record.setShouldProcessData(true); 186 record.setShouldProcessData(true);
190 record.processData(someData); 187 record.processData(someData);
191 188
192 someRecords.push(record); 189 someRecords.push(record);
193 190
194 return someRecords; 191 return someRecords;
195 }, this), records, someClipperzValues[i]); 192 }, this), records, someClipperzValues[i]);
196 } 193 }
197 innerDeferredResult.addCallback(MochiKit.Async.succeed, records); 194 innerDeferredResult.addCallback(MochiKit.Async.succeed, records);
198 innerDeferredResult.callback(); 195 innerDeferredResult.callback();
199 196
200 return innerDeferredResult; 197 return innerDeferredResult;
201 }, this)); 198 }, this));
202//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Record.processClipperzValues - 6: " + res); return res;}); 199//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Record.processClipperzValues - 6: " + res); return res;});
203 deferredResult.callback(someData); 200 deferredResult.callback(someData);
204 201
205 return deferredResult; 202 return deferredResult;
206 }, 203 },
207 204
208 205
209 //------------------------------------------------------------------------- 206 //-------------------------------------------------------------------------
210 __syntaxFix__: "syntax fix" 207 __syntaxFix__: "syntax fix"
211}); 208});
212 209
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/ExcelImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/ExcelImportComponent.js
index ecdf509..ad0d985 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/ExcelImportComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/ExcelImportComponent.js
@@ -1,134 +1,131 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } 29if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Components.Import.ExcelImportComponent = function(anElement, args) { 33Clipperz.PM.Components.Import.ExcelImportComponent = function(anElement, args) {
37 args = args || {}; 34 args = args || {};
38 35
39 this._steps = ['EXCEL_EDIT', 'CSV_COLUMNS', 'CSV_HEADER', 'CSV_TITLE', 'CSV_NOTES', 'CSV_FIELDS', 'PREVIEW', 'IMPORT']; 36 this._steps = ['EXCEL_EDIT', 'CSV_COLUMNS', 'CSV_HEADER', 'CSV_TITLE', 'CSV_NOTES', 'CSV_FIELDS', 'PREVIEW', 'IMPORT'];
40 37
41 Clipperz.PM.Components.Import.ExcelImportComponent.superclass.constructor.call(this, anElement, args); 38 Clipperz.PM.Components.Import.ExcelImportComponent.superclass.constructor.call(this, anElement, args);
42 39
43 return this; 40 return this;
44} 41}
45 42
46//============================================================================= 43//=============================================================================
47 44
48YAHOO.extendX(Clipperz.PM.Components.Import.ExcelImportComponent, Clipperz.PM.Components.Import.CSVImportComponent, { 45YAHOO.extendX(Clipperz.PM.Components.Import.ExcelImportComponent, Clipperz.PM.Components.Import.CSVImportComponent, {
49 46
50 'toString': function() { 47 'toString': function() {
51 return "Clipperz.PM.Components.Import.ExcelImportComponent component"; 48 return "Clipperz.PM.Components.Import.ExcelImportComponent component";
52 }, 49 },
53 50
54 //------------------------------------------------------------------------- 51 //-------------------------------------------------------------------------
55 52
56 'render': function() { 53 'render': function() {
57//MochiKit.Logging.logDebug(">>> Import.ExcelImportComponent.render"); 54//MochiKit.Logging.logDebug(">>> Import.ExcelImportComponent.render");
58 this.domHelper().append(this.element(), {tag:'div', cls:'excelImportWizard', children:[ 55 this.domHelper().append(this.element(), {tag:'div', cls:'excelImportWizard', children:[
59 {tag:'h3', htmlString:Clipperz.PM.Strings['Excel_ImportWizard_Title']}, 56 {tag:'h3', htmlString:Clipperz.PM.Strings['Excel_ImportWizard_Title']},
60 {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, 57 {tag:'div', cls:'importSteps', id:this.getId('importSteps')},
61 {tag:'div', cls:'importStepBlocks', children:[ 58 {tag:'div', cls:'importStepBlocks', children:[
62 {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ 59 {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[
63 {tag:'div', children:[ 60 {tag:'div', children:[
64 {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_excel_description']}, 61 {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_excel_description']},
65 {tag:'div', cls:'importOptionsParameters', children:[]}, 62 {tag:'div', cls:'importOptionsParameters', children:[]},
66 this.textAreaConfig() 63 this.textAreaConfig()
67 ]} 64 ]}
68 ]}, 65 ]},
69 {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[]}, 66 {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[]},
70 {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[]}, 67 {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[]},
71 {tag:'div', cls:'step_3', id:this.getId('step_3'), children:[]}, 68 {tag:'div', cls:'step_3', id:this.getId('step_3'), children:[]},
72 {tag:'div', cls:'step_4', id:this.getId('step_4'), children:[]}, 69 {tag:'div', cls:'step_4', id:this.getId('step_4'), children:[]},
73 {tag:'div', cls:'step_5', id:this.getId('step_5'), children:[]}, 70 {tag:'div', cls:'step_5', id:this.getId('step_5'), children:[]},
74 {tag:'div', cls:'step_6', id:this.getId('step_6'), children:[ 71 {tag:'div', cls:'step_6', id:this.getId('step_6'), children:[
75 {tag:'div', children:[ 72 {tag:'div', children:[
76 {tag:'div', id:this.getId('previewDiv'), html:"preview"} 73 {tag:'div', id:this.getId('previewDiv'), html:"preview"}
77 ]} 74 ]}
78 ]}, 75 ]},
79 {tag:'div', cls:'step_7', id:this.getId('step_7'), children:[ 76 {tag:'div', cls:'step_7', id:this.getId('step_7'), children:[
80 {tag:'div', children:[ 77 {tag:'div', children:[
81 {tag:'h4', html:"done"} 78 {tag:'h4', html:"done"}
82 ]} 79 ]}
83 ]} 80 ]}
84 ]}, 81 ]},
85 {tag:'div', cls:'importOptionsButtons', children:[ 82 {tag:'div', cls:'importOptionsButtons', children:[
86 {tag:'table', children:[ 83 {tag:'table', children:[
87 {tag:'tbody', children:[ 84 {tag:'tbody', children:[
88 {tag:'tr', children:[ 85 {tag:'tr', children:[
89 {tag:'td', html:'&nbsp;'}, 86 {tag:'td', html:'&nbsp;'},
90 {tag:'td', children:[ 87 {tag:'td', children:[
91 {tag:'div', id:this.getId('backActionButton')} 88 {tag:'div', id:this.getId('backActionButton')}
92 ]}, 89 ]},
93 {tag:'td', html:'&nbsp;'}, 90 {tag:'td', html:'&nbsp;'},
94 {tag:'td', children:[ 91 {tag:'td', children:[
95 {tag:'div', id:this.getId('nextActionButton')} 92 {tag:'div', id:this.getId('nextActionButton')}
96 ]}, 93 ]},
97 {tag:'td', html:'&nbsp;'} 94 {tag:'td', html:'&nbsp;'}
98 ]} 95 ]}
99 ]} 96 ]}
100 ]} 97 ]}
101 ]} 98 ]}
102 ]}); 99 ]});
103 100
104 this.updateSteps(); 101 this.updateSteps();
105 102
106 this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); 103 this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this}));
107 this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); 104 this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this}));
108 105
109 this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() 106 this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show()
110 this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 107 this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
111 this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 108 this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
112 this.getElement('step_3').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 109 this.getElement('step_3').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
113 this.getElement('step_4').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 110 this.getElement('step_4').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
114 this.getElement('step_5').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 111 this.getElement('step_5').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
115 this.getElement('step_6').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 112 this.getElement('step_6').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
116 this.getElement('step_7').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 113 this.getElement('step_7').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
117//MochiKit.Logging.logDebug("<<< Import.ExcelImportComponent.render"); 114//MochiKit.Logging.logDebug("<<< Import.ExcelImportComponent.render");
118 }, 115 },
119 116
120 //------------------------------------------------------------------------- 117 //-------------------------------------------------------------------------
121 118
122 'csvProcessor': function() { 119 'csvProcessor': function() {
123 return new Clipperz.CSVProcessor({ 120 return new Clipperz.CSVProcessor({
124 // quoteChar: this.getDom('CSV_inputOptions_quote').value, 121 // quoteChar: this.getDom('CSV_inputOptions_quote').value,
125 // escapeChar: this.getDom('CSV_inputOptions_escape').value, 122 // escapeChar: this.getDom('CSV_inputOptions_escape').value,
126 separatorChar:'\t', 123 separatorChar:'\t',
127 binary:true 124 binary:true
128 }); 125 });
129 }, 126 },
130 127
131 //------------------------------------------------------------------------- 128 //-------------------------------------------------------------------------
132 __syntaxFix__: "syntax fix" 129 __syntaxFix__: "syntax fix"
133}); 130});
134 131
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js
index 4f6b1e4..a55455a 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } 29if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Components.Import.GenericImportComponent = function(anElement, args) { 33Clipperz.PM.Components.Import.GenericImportComponent = function(anElement, args) {
37 args = args || {}; 34 args = args || {};
38 35
39 this._steps = this._steps || ['EDIT', 'PREVIEW', 'IMPORT']; 36 this._steps = this._steps || ['EDIT', 'PREVIEW', 'IMPORT'];
40 37
41 Clipperz.PM.Components.Import.GenericImportComponent.superclass.constructor.call(this, anElement, args); 38 Clipperz.PM.Components.Import.GenericImportComponent.superclass.constructor.call(this, anElement, args);
42 39
43 this._user = args['user']; 40 this._user = args['user'];
44 41
45 this._currentStep = 0; 42 this._currentStep = 0;
46 this._currentStatus = 'IDLE'; //'PROCESSING' 43 this._currentStatus = 'IDLE'; //'PROCESSING'
47 44
48 this._parsedValues = null; 45 this._parsedValues = null;
49 this._processedValues = null; 46 this._processedValues = null;
50 47
51 this._backButton = null; 48 this._backButton = null;
52 this._nextButton = null; 49 this._nextButton = null;
53 50
54 Clipperz.NotificationCenter.register(null, 'importProcessorProgressUpdate', this, 'updateProgressDialogStatus'); 51 Clipperz.NotificationCenter.register(null, 'importProcessorProgressUpdate', this, 'updateProgressDialogStatus');
55 52
56 return this; 53 return this;
57} 54}
58 55
59//============================================================================= 56//=============================================================================
60 57
61YAHOO.extendX(Clipperz.PM.Components.Import.GenericImportComponent, Clipperz.PM.Components.BaseComponent, { 58YAHOO.extendX(Clipperz.PM.Components.Import.GenericImportComponent, Clipperz.PM.Components.BaseComponent, {
62 59
63 'toString': function() { 60 'toString': function() {
64 return "Clipperz.PM.Components.Import.GenericImportComponent component"; 61 return "Clipperz.PM.Components.Import.GenericImportComponent component";
65 }, 62 },
66 63
67 //------------------------------------------------------------------------- 64 //-------------------------------------------------------------------------
68 65
69 'user': function() { 66 'user': function() {
70 return this._user; 67 return this._user;
71 }, 68 },
72 69
73 //------------------------------------------------------------------------- 70 //-------------------------------------------------------------------------
74 71
75 'textAreaConfig': function() { 72 'textAreaConfig': function() {
76 return {tag:'textarea', name:this.getId('importTextArea'), cls:'importTextArea', id:this.getId('importTextArea'), cols:60, rows:15, html:""}; 73 return {tag:'textarea', name:this.getId('importTextArea'), cls:'importTextArea', id:this.getId('importTextArea'), cols:60, rows:15, html:""};
77 }, 74 },
78 75
79 'textAreaContent': function() { 76 'textAreaContent': function() {
80 return this.getDom('importTextArea').value 77 return this.getDom('importTextArea').value
81 }, 78 },
82 79
83 //------------------------------------------------------------------------- 80 //-------------------------------------------------------------------------
84 81
85 'steps': function() { 82 'steps': function() {
86 return this._steps; 83 return this._steps;
87 }, 84 },
88 85
89 'currentStep': function() { 86 'currentStep': function() {
90 return this._currentStep; 87 return this._currentStep;
91 }, 88 },
92 89
93 'setCurrentStep': function(aValue) { 90 'setCurrentStep': function(aValue) {
94 this._currentStep = aValue; 91 this._currentStep = aValue;
95 this.updateSteps(); 92 this.updateSteps();
96 }, 93 },
97 94
98 //------------------------------------------------------------------------- 95 //-------------------------------------------------------------------------
99 96
100 'currentStatus': function() { 97 'currentStatus': function() {
101 return this._currentStatus; 98 return this._currentStatus;
102 }, 99 },
103 100
104 'startProcessing': function() { 101 'startProcessing': function() {
105 this._currentStatus = 'PROCESSING'; 102 this._currentStatus = 'PROCESSING';
106 this.updateSteps(); 103 this.updateSteps();
107 }, 104 },
108 105
109 'processingDone': function() { 106 'processingDone': function() {
110 this._currentStatus = 'IDLE'; 107 this._currentStatus = 'IDLE';
111 this.setCurrentStep(this.currentStep() + 1); 108 this.setCurrentStep(this.currentStep() + 1);
112 }, 109 },
113 110
114 'processingAborted': function() { 111 'processingAborted': function() {
115 this._currentStatus = 'IDLE'; 112 this._currentStatus = 'IDLE';
116 this.updateSteps(); 113 this.updateSteps();
117 }, 114 },
118 115
119 //------------------------------------------------------------------------- 116 //-------------------------------------------------------------------------
120 117
121 'stepsConfig': function() { 118 'stepsConfig': function() {
122 var result; 119 var result;
123 var i,c; 120 var i,c;
124 121
125 result = []; 122 result = [];
126 c = this.steps().length; 123 c = this.steps().length;
127 for (i=0; i<c; i++) { 124 for (i=0; i<c; i++) {
128 var cls; 125 var cls;
129 126
130 if (this.currentStep() == i) { 127 if (this.currentStep() == i) {
131 if (this.currentStatus() == 'IDLE') { 128 if (this.currentStatus() == 'IDLE') {
132 cls = 'current'; 129 cls = 'current';
133 } else { 130 } else {
134 cls = 'currentProcessing'; 131 cls = 'currentProcessing';
135 } 132 }
136 } else { 133 } else {
137 cls = ""; 134 cls = "";
138 } 135 }
139 136
140 result.push({tag:'td', cls:cls, children:[ 137 result.push({tag:'td', cls:cls, children:[
141 {tag:'div', children:[{tag:'span', htmlString:Clipperz.PM.Strings['ImportWizard'][this.steps()[i]]}]} 138 {tag:'div', children:[{tag:'span', htmlString:Clipperz.PM.Strings['ImportWizard'][this.steps()[i]]}]}
142 ]}) 139 ]})
143 if (i < (c-1)) { 140 if (i < (c-1)) {
144 if ((this.currentStep() == i) && (this.currentStatus() == 'PROCESSING')) { 141 if ((this.currentStep() == i) && (this.currentStatus() == 'PROCESSING')) {
145 cls = 'stepSeparatorProcessing'; 142 cls = 'stepSeparatorProcessing';
146 } else { 143 } else {
147 cls = 'stepSeparator'; 144 cls = 'stepSeparator';
148 } 145 }
149 146
150 result.push({tag:'td', cls:cls, children:[ 147 result.push({tag:'td', cls:cls, children:[
151 {tag:'div', children:[{tag:'span', html:">"}]} 148 {tag:'div', children:[{tag:'span', html:">"}]}
152 ]}); 149 ]});
153 } 150 }
154 } 151 }
155 152
156 result = [{tag:'div', cls:'importWizardStepsBox', children:[ 153 result = [{tag:'div', cls:'importWizardStepsBox', children:[
157 {tag:'div', cls:'importWizardStepsInnerBox', children:[ 154 {tag:'div', cls:'importWizardStepsInnerBox', children:[
158 {tag:'table', cls:'importWizardSteps', children:[ 155 {tag:'table', cls:'importWizardSteps', children:[
159 {tag:'tbody', children:[ 156 {tag:'tbody', children:[
160 {tag:'tr', children:result} 157 {tag:'tr', children:result}
161 ]} 158 ]}
162 ]} 159 ]}
163 ]}, 160 ]},
164 {tag:'div', cls:'importWizardStepsBoxFooter'} 161 {tag:'div', cls:'importWizardStepsBoxFooter'}
165 ]}]; 162 ]}];
166 163
167 return result; 164 return result;
168 }, 165 },
169 166
170 'updateSteps': function() { 167 'updateSteps': function() {
171 this.getElement('importSteps').update(""); 168 this.getElement('importSteps').update("");
172 Clipperz.YUI.DomHelper.append(this.getDom('importSteps'), {tag:'div', children:this.stepsConfig()}); 169 Clipperz.YUI.DomHelper.append(this.getDom('importSteps'), {tag:'div', children:this.stepsConfig()});
173 }, 170 },
174 171
175 //------------------------------------------------------------------------- 172 //-------------------------------------------------------------------------
176 173
177 'backAction': function() { 174 'backAction': function() {
178//MochiKit.Logging.logDebug(">>> backAction"); 175//MochiKit.Logging.logDebug(">>> backAction");
179 if (this.currentStep() == 0) { 176 if (this.currentStep() == 0) {
180 Clipperz.NotificationCenter.notify(this, 'importCancelled'); 177 Clipperz.NotificationCenter.notify(this, 'importCancelled');
181 } else { 178 } else {
182 this.getElement('step_' + this.currentStep()).hide(); 179 this.getElement('step_' + this.currentStep()).hide();
183 this.setCurrentStep(this.currentStep() - 1); 180 this.setCurrentStep(this.currentStep() - 1);
184 this.getElement('step_' + this.currentStep()).show(); 181 this.getElement('step_' + this.currentStep()).show();
185 182
186 this.nextButton().enable(); 183 this.nextButton().enable();
187 } 184 }
188//MochiKit.Logging.logDebug("<<< backAction"); 185//MochiKit.Logging.logDebug("<<< backAction");
189 }, 186 },
190 187
191 //------------------------------------------------------------------------- 188 //-------------------------------------------------------------------------
192 189
193 'backButton': function() { 190 'backButton': function() {
194 return this._backButton; 191 return this._backButton;
195 }, 192 },
196 193
197 'setBackButton': function(aValue) { 194 'setBackButton': function(aValue) {
198 this._backButton = aValue; 195 this._backButton = aValue;
199 }, 196 },
200 197
201 'nextButton': function() { 198 'nextButton': function() {
202 return this._nextButton; 199 return this._nextButton;
203 }, 200 },
204 201
205 'setNextButton': function(aValue) { 202 'setNextButton': function(aValue) {
206 this._nextButton = aValue; 203 this._nextButton = aValue;
207 }, 204 },
208 205
209 //------------------------------------------------------------------------- 206 //-------------------------------------------------------------------------
210 207
211 'render': function() { 208 'render': function() {
212//MochiKit.Logging.logDebug(">>> Import.GenericImportComponent.render"); 209//MochiKit.Logging.logDebug(">>> Import.GenericImportComponent.render");
213 this.domHelper().append(this.element(), {tag:'div', children:[ 210 this.domHelper().append(this.element(), {tag:'div', children:[
214 {tag:'h2', html:this.toString()} 211 {tag:'h2', html:this.toString()}
215 ]}); 212 ]});
216//MochiKit.Logging.logDebug("<<< Import.GenericImportComponent.render"); 213//MochiKit.Logging.logDebug("<<< Import.GenericImportComponent.render");
217 }, 214 },
218 215
219 //------------------------------------------------------------------------- 216 //-------------------------------------------------------------------------
220 217
221 'previewValues': function() { 218 'previewValues': function() {
222 Clipperz.PM.Components.MessageBox.showProgressPanel( 219 Clipperz.PM.Components.MessageBox.showProgressPanel(
223 MochiKit.Base.method(this, 'deferredPreviewValues'), 220 MochiKit.Base.method(this, 'deferredPreviewValues'),
224 MochiKit.Base.method(this, 'handlePreviewError'), 221 MochiKit.Base.method(this, 'handlePreviewError'),
225 this.getDom('nextActionButton') 222 this.getDom('nextActionButton')
226 ); 223 );
227 }, 224 },
228 225
229 'deferredPreviewValues': function() { 226 'deferredPreviewValues': function() {
230 throw Clipperz.Base.exception.AbstractMethod; 227 throw Clipperz.Base.exception.AbstractMethod;
231 }, 228 },
232 229
233 'handlePreviewError': function(anError) { 230 'handlePreviewError': function(anError) {
234console.log("anError", anError); 231console.log("anError", anError);
235 MochiKit.Logging.logError("An error occurred while previewing the data: " + anError); 232 MochiKit.Logging.logError("An error occurred while previewing the data: " + anError);
236 alert("An error occurred while previewing the data"); 233 alert("An error occurred while previewing the data");
237 Clipperz.PM.Components.MessageBox().hide(); 234 Clipperz.PM.Components.MessageBox().hide();
238 }, 235 },
239 236
240 //------------------------------------------------------------------------- 237 //-------------------------------------------------------------------------
241 238
242 'previewRecordValues': function(someProcessedRecords) { 239 'previewRecordValues': function(someProcessedRecords) {
243//MochiKit.Logging.logDebug(">>> previewRecordValues"); 240//MochiKit.Logging.logDebug(">>> previewRecordValues");
244 this.getElement('previewDiv').update(""); 241 this.getElement('previewDiv').update("");
245//MochiKit.Logging.logDebug("--- previewRecordValues - 1"); 242//MochiKit.Logging.logDebug("--- previewRecordValues - 1");
246 this.domHelper().append(this.getElement('previewDiv'), {tag:'div', cls:'importPreviewDiv', children:[{tag:'table', id:'importPreview', cellspacing:'0', children:[ 243 this.domHelper().append(this.getElement('previewDiv'), {tag:'div', cls:'importPreviewDiv', children:[{tag:'table', id:'importPreview', cellspacing:'0', children:[
247 {tag:'tbody', children: 244 {tag:'tbody', children:
248 MochiKit.Base.map(MochiKit.Base.bind(function(aRecord) { 245 MochiKit.Base.map(MochiKit.Base.bind(function(aRecord) {
249 var result; 246 var result;
250//MochiKit.Logging.logDebug("--- previewRecordValues - 1.1"); 247//MochiKit.Logging.logDebug("--- previewRecordValues - 1.1");
251//console.log("fields", aRecord.currentVersion().fields()); 248//console.log("fields", aRecord.currentVersion().fields());
252 result = {tag:'tr', children:[{tag:'td', children:[ 249 result = {tag:'tr', children:[{tag:'td', children:[
253 {tag:'table', cls:'importPreview_record', children:[ 250 {tag:'table', cls:'importPreview_record', children:[
254 {tag:'tbody', children:[ 251 {tag:'tbody', children:[
255 {tag:'tr', children:[ 252 {tag:'tr', children:[
256 {tag:'td', rowspan:'2', valign:'top', children:[ 253 {tag:'td', rowspan:'2', valign:'top', children:[
257 {tag:'input', type:'checkbox', id:this.getId(aRecord.reference()), value:"aRecord.reference()", checked:true} 254 {tag:'input', type:'checkbox', id:this.getId(aRecord.reference()), value:"aRecord.reference()", checked:true}
258 ]}, 255 ]},
259 {tag:'td', colspan:'2', children:[ 256 {tag:'td', colspan:'2', children:[
260 {tag:'span', cls:'importPreview_title', html:aRecord.label()} 257 {tag:'span', cls:'importPreview_title', html:aRecord.label()}
261 ]} 258 ]}
262 ]}, 259 ]},
263 {tag:'tr', children:[ 260 {tag:'tr', children:[
264 {tag:'td', valign:'top', children:[ 261 {tag:'td', valign:'top', children:[
265 {tag:'span', cls:'importPreview_notes', html:(MochiKit.Base.isNotEmpty(aRecord.notes()) ? aRecord.notes().replace(/\n/g, '<br>') : '&nbsp;')} 262 {tag:'span', cls:'importPreview_notes', html:(MochiKit.Base.isNotEmpty(aRecord.notes()) ? aRecord.notes().replace(/\n/g, '<br>') : '&nbsp;')}
266 ]}, 263 ]},
267 {tag:'td', valign:'top', cls:'importPreview_fieds', children:[ 264 {tag:'td', valign:'top', cls:'importPreview_fieds', children:[
268 {tag:'table', cls:'importPreview_fields', children:[ 265 {tag:'table', cls:'importPreview_fields', children:[
269 {tag:'tbody', children:MochiKit.Base.map(function(aField) { 266 {tag:'tbody', children:MochiKit.Base.map(function(aField) {
270 var result; 267 var result;
271//MochiKit.Logging.logDebug("--- previewRecordValues - 1.1.1"); 268//MochiKit.Logging.logDebug("--- previewRecordValues - 1.1.1");
272 result = {tag:'tr', children:[ 269 result = {tag:'tr', children:[
273 {tag:'td', valign:'top', children:[ 270 {tag:'td', valign:'top', children:[
274 {tag:'span', cls:'importPreview_fields_label', html:aField.label()} 271 {tag:'span', cls:'importPreview_fields_label', html:aField.label()}
275 ]}, 272 ]},
276 {tag:'td', valign:'top', children:[ 273 {tag:'td', valign:'top', children:[
277 {tag:'span', cls:'importPreview_fields_value', html:aField.value()} 274 {tag:'span', cls:'importPreview_fields_value', html:aField.value()}
278 ]} 275 ]}
279 ]}; 276 ]};
280//MochiKit.Logging.logDebug("--- previewRecordValues - 1.1.2"); 277//MochiKit.Logging.logDebug("--- previewRecordValues - 1.1.2");
281 return result; 278 return result;
282 }, MochiKit.Base.values(aRecord.currentVersion().fields()))} 279 }, MochiKit.Base.values(aRecord.currentVersion().fields()))}
283 ]} 280 ]}
284 ]} 281 ]}
285 ]} 282 ]}
286 ]} 283 ]}
287 ]} 284 ]}
288 ]}]}; 285 ]}]};
289//MochiKit.Logging.logDebug("--- previewRecordValues - 1.2"); 286//MochiKit.Logging.logDebug("--- previewRecordValues - 1.2");
290 return result; 287 return result;
291 }, this), someProcessedRecords) 288 }, this), someProcessedRecords)
292 } 289 }
293 ]}]}); 290 ]}]});
294//MochiKit.Logging.logDebug("--- previewRecordValues - 2"); 291//MochiKit.Logging.logDebug("--- previewRecordValues - 2");
295 292
296 MochiKit.Base.map(MochiKit.Base.bind(function(aRecord) { 293 MochiKit.Base.map(MochiKit.Base.bind(function(aRecord) {
297 this.getElement(aRecord.reference()).dom.value = aRecord.reference(); 294 this.getElement(aRecord.reference()).dom.value = aRecord.reference();
298 }, this), someProcessedRecords); 295 }, this), someProcessedRecords);
299 296
300 Clipperz.Style.applyZebraStylesToTable('importPreview'); 297 Clipperz.Style.applyZebraStylesToTable('importPreview');
301//MochiKit.Logging.logDebug("<<< previewRecordValues"); 298//MochiKit.Logging.logDebug("<<< previewRecordValues");
302 }, 299 },
303 300
304 //------------------------------------------------------------------------- 301 //-------------------------------------------------------------------------
305 302
306 'updateProgressDialogStatus': function(anEvent) { 303 'updateProgressDialogStatus': function(anEvent) {
307 Clipperz.PM.Components.MessageBox().update({step:anEvent.parameters().progress}); 304 Clipperz.PM.Components.MessageBox().update({step:anEvent.parameters().progress});
308 }, 305 },
309 306
310 //------------------------------------------------------------------------- 307 //-------------------------------------------------------------------------
311 308
312 'parsedValues': function() { 309 'parsedValues': function() {
313 return this._parsedValues; 310 return this._parsedValues;
314 }, 311 },
315 312
316 'setParsedValues': function(aValue) { 313 'setParsedValues': function(aValue) {
317 this._parsedValues = aValue; 314 this._parsedValues = aValue;
318 315
319 return this._parsedValues; 316 return this._parsedValues;
320 }, 317 },
321 318
322 //------------------------------------------------------------------------- 319 //-------------------------------------------------------------------------
323 320
324 'processedValues': function() { 321 'processedValues': function() {
325 return this._processedValues; 322 return this._processedValues;
326 }, 323 },
327 324
328 'setProcessedValues': function(aValue) { 325 'setProcessedValues': function(aValue) {
329 this._processedValues = aValue; 326 this._processedValues = aValue;
330 return this._processedValues; 327 return this._processedValues;
331 }, 328 },
332 329
333 //------------------------------------------------------------------------- 330 //-------------------------------------------------------------------------
334 331
335 'importValues': function() { 332 'importValues': function() {
336 var deferredResult; 333 var deferredResult;
337 334
338 deferredResult = new MochiKit.Async.Deferred(); 335 deferredResult = new MochiKit.Async.Deferred();
339 336
340 deferredResult.addCallback(MochiKit.Base.bind(function() { 337 deferredResult.addCallback(MochiKit.Base.bind(function() {
341 this.nextButton().disable(); 338 this.nextButton().disable();
342 this.startProcessing(); 339 this.startProcessing();
343 },this)); 340 },this));
344 deferredResult.addCallback(MochiKit.Base.method(this, 'importProcessedValues')); 341 deferredResult.addCallback(MochiKit.Base.method(this, 'importProcessedValues'));
345 deferredResult.addCallback(MochiKit.Base.method(this, 'processingDone')); 342 deferredResult.addCallback(MochiKit.Base.method(this, 'processingDone'));
346 deferredResult.addErrback (MochiKit.Base.method(this, 'processingAborted')); 343 deferredResult.addErrback (MochiKit.Base.method(this, 'processingAborted'));
347 deferredResult.callback(); 344 deferredResult.callback();
348 345
349 return deferredResult; 346 return deferredResult;
350 }, 347 },
351 348
352 //------------------------------------------------------------------------- 349 //-------------------------------------------------------------------------
353 350
354 'importProcessedValues': function() { 351 'importProcessedValues': function() {
355 var deferredResult; 352 var deferredResult;
356 var processedValues; 353 var processedValues;
357 var selectedRecords; 354 var selectedRecords;
358 var i,c; 355 var i,c;
359 356
360//MochiKit.Logging.logDebug(">>> GenericImportComponent.importProcessedValues"); 357//MochiKit.Logging.logDebug(">>> GenericImportComponent.importProcessedValues");
361 processedValues = this.processedValues(); 358 processedValues = this.processedValues();
362 selectedRecords = []; 359 selectedRecords = [];
363 360
364 c = processedValues.length; 361 c = processedValues.length;
365 for (i=0; i<c; i++) { 362 for (i=0; i<c; i++) {
366 var currentRecord; 363 var currentRecord;
367 364
368 currentRecord = processedValues[i]; 365 currentRecord = processedValues[i];
369 if (this.getDom(currentRecord.reference()).checked == true) { 366 if (this.getDom(currentRecord.reference()).checked == true) {
370 selectedRecords.push(currentRecord); 367 selectedRecords.push(currentRecord);
371 } 368 }
372 } 369 }
373 370
374 deferredResult = new MochiKit.Async.Deferred(); 371 deferredResult = new MochiKit.Async.Deferred();
375//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("GenericImportComponent - 1: " + res); return res;}); 372//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("GenericImportComponent - 1: " + res); return res;});
376 deferredResult.addCallback(function(someRecords) { 373 deferredResult.addCallback(function(someRecords) {
377 var innerDeferredResult; 374 var innerDeferredResult;
378 var text; 375 var text;
379 376
380 text = Clipperz.PM.Strings['importData_importConfirmation_text']; 377 text = Clipperz.PM.Strings['importData_importConfirmation_text'];
381 text = text.replace(/__numberOfRecords__/, someRecords.length); 378 text = text.replace(/__numberOfRecords__/, someRecords.length);
382 379
383 innerDeferredResult = new MochiKit.Async.Deferred(); 380 innerDeferredResult = new MochiKit.Async.Deferred();
384//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("GenericImportComponent - 1.1: " + res); return res;}); 381//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("GenericImportComponent - 1.1: " + res); return res;});
385 innerDeferredResult.addCallback(MochiKit.Async.succeed, someRecords); 382 innerDeferredResult.addCallback(MochiKit.Async.succeed, someRecords);
386//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("GenericImportComponent - 1.2: " + res); return res;}); 383//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("GenericImportComponent - 1.2: " + res); return res;});
387 384
388 Clipperz.PM.Components.MessageBox().deferredShow({ 385 Clipperz.PM.Components.MessageBox().deferredShow({
389 title:Clipperz.PM.Strings['importData_importConfirmation_title'], 386 title:Clipperz.PM.Strings['importData_importConfirmation_title'],
390 text:text, 387 text:text,
391 width:240, 388 width:240,
392 showProgressBar:false, 389 showProgressBar:false,
393 showCloseButton:false, 390 showCloseButton:false,
394 buttons:{ 391 buttons:{
395 'yes':"yes", //Clipperz.PM.Strings['mainPanelDeleteRecordPanelConfirmButtonLabel'], 392 'yes':"yes", //Clipperz.PM.Strings['mainPanelDeleteRecordPanelConfirmButtonLabel'],
396 'no':"no" //Clipperz.PM.Strings['mainPanelDeleteRecordPanelDenyButtonLabel'] 393 'no':"no" //Clipperz.PM.Strings['mainPanelDeleteRecordPanelDenyButtonLabel']
397 }, 394 },
398 fn:MochiKit.Base.partial(function(aDeferred, aResult) { 395 fn:MochiKit.Base.partial(function(aDeferred, aResult) {
399 if (aResult == 'yes') { 396 if (aResult == 'yes') {
400 aDeferred.callback(aResult); 397 aDeferred.callback(aResult);
401 } else { 398 } else {
402 aDeferred.errback(aResult); 399 aDeferred.errback(aResult);
403 } 400 }
404 }, innerDeferredResult) 401 }, innerDeferredResult)
405 }/*, this.getId('nextActionButton')*/); 402 }/*, this.getId('nextActionButton')*/);
406 403
407 return innerDeferredResult; 404 return innerDeferredResult;
408 }); 405 });
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/KeePassImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/KeePassImportComponent.js
index 0657520..5f4fe33 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/KeePassImportComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/KeePassImportComponent.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } 29if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Components.Import.KeePassImportComponent = function(anElement, args) { 33Clipperz.PM.Components.Import.KeePassImportComponent = function(anElement, args) {
37 args = args || {}; 34 args = args || {};
38 35
39 Clipperz.PM.Components.Import.KeePassImportComponent.superclass.constructor.call(this, anElement, args); 36 Clipperz.PM.Components.Import.KeePassImportComponent.superclass.constructor.call(this, anElement, args);
40 37
41 this._steps = ['EDIT', 'KEEPASS_SETTINGS', 'PREVIEW', 'IMPORT']; 38 this._steps = ['EDIT', 'KEEPASS_SETTINGS', 'PREVIEW', 'IMPORT'];
42 this._definedFields = ['Group', 'Group Tree', 'UserName', 'URL', 'Password', 'Notes', 'UUID', 'Icon', 'Creation Time', 'Last Access', 'Last Modification', 'Expires', 'Attachment Description', 'Attachment']; 39 this._definedFields = ['Group', 'Group Tree', 'UserName', 'URL', 'Password', 'Notes', 'UUID', 'Icon', 'Creation Time', 'Last Access', 'Last Modification', 'Expires', 'Attachment Description', 'Attachment'];
43 40
44 this.render(); 41 this.render();
45 42
46 return this; 43 return this;
47} 44}
48 45
49//============================================================================= 46//=============================================================================
50 47
51YAHOO.extendX(Clipperz.PM.Components.Import.KeePassImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { 48YAHOO.extendX(Clipperz.PM.Components.Import.KeePassImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, {
52 49
53 'toString': function() { 50 'toString': function() {
54 return "Clipperz.PM.Components.Import.KeePassImportComponent component"; 51 return "Clipperz.PM.Components.Import.KeePassImportComponent component";
55 }, 52 },
56 53
57 //------------------------------------------------------------------------- 54 //-------------------------------------------------------------------------
58 55
59 'render': function() { 56 'render': function() {
60//MochiKit.Logging.logDebug(">>> Import.KeePassImportComponent.render"); 57//MochiKit.Logging.logDebug(">>> Import.KeePassImportComponent.render");
61 this.domHelper().append(this.element(), {tag:'div', cls:'keePassImportWizard', children:[ 58 this.domHelper().append(this.element(), {tag:'div', cls:'keePassImportWizard', children:[
62 {tag:'h3', htmlString:Clipperz.PM.Strings['KeePass_ImportWizard_Title']}, 59 {tag:'h3', htmlString:Clipperz.PM.Strings['KeePass_ImportWizard_Title']},
63 {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, 60 {tag:'div', cls:'importSteps', id:this.getId('importSteps')},
64 {tag:'div', cls:'importStepBlocks', children:[ 61 {tag:'div', cls:'importStepBlocks', children:[
65 {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ 62 {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[
66 {tag:'div', children:[ 63 {tag:'div', children:[
67 {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_keePass_description']}, 64 {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_keePass_description']},
68 {tag:'div', cls:'importOptionsParameters', children:[]}, 65 {tag:'div', cls:'importOptionsParameters', children:[]},
69 this.textAreaConfig() 66 this.textAreaConfig()
70 ]} 67 ]}
71 ]}, 68 ]},
72 {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ 69 {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[
73 {tag:'div', children:[ 70 {tag:'div', children:[
74 {tag:'div', id:this.getId('settingsDiv'), children:[ 71 {tag:'div', id:this.getId('settingsDiv'), children:[
75 {tag:'table', id:'KeePassSettings', children:[ 72 {tag:'table', id:'KeePassSettings', children:[
76 {tag:'tbody', children:[ 73 {tag:'tbody', children:[
77 {tag:'tr', children:[ 74 {tag:'tr', children:[
78 {tag:'td', width:'50%', valign:'top', children:[ 75 {tag:'td', width:'50%', valign:'top', children:[
79 {tag:'table', children:[ 76 {tag:'table', children:[
80 {tag:'tbody', children:[ 77 {tag:'tbody', children:[
81 {tag:'tr', children:[ 78 {tag:'tr', children:[
82 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Group_checkbox'), name:'Group'/*, checked:true*/}]}, 79 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Group_checkbox'), name:'Group'/*, checked:true*/}]},
83 {tag:'td', width:'150', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Group_label'), html:"Group"}]} 80 {tag:'td', width:'150', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Group_label'), html:"Group"}]}
84 ]}, 81 ]},
85 {tag:'tr', children:[ 82 {tag:'tr', children:[
86 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Group Tree_checkbox'), name:'Group Tree'/*, checked:true*/}]}, 83 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Group Tree_checkbox'), name:'Group Tree'/*, checked:true*/}]},
87 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Group Tree_label'), html:"Group Tree"}]} 84 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Group Tree_label'), html:"Group Tree"}]}
88 ]}, 85 ]},
89 {tag:'tr', children:[ 86 {tag:'tr', children:[
90 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('UserName_checkbox'), name:'UserName', checked:true}]}, 87 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('UserName_checkbox'), name:'UserName', checked:true}]},
91 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('UserName_label'), html:"UserName"}]} 88 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('UserName_label'), html:"UserName"}]}
92 ]}, 89 ]},
93 {tag:'tr', children:[ 90 {tag:'tr', children:[
94 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('URL_checkbox'), name:'URL', checked:true}]}, 91 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('URL_checkbox'), name:'URL', checked:true}]},
95 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('URL_label'), html:"URL"}]} 92 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('URL_label'), html:"URL"}]}
96 ]}, 93 ]},
97 {tag:'tr', children:[ 94 {tag:'tr', children:[
98 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Password_checkbox'), name:'Password', checked:true}]}, 95 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Password_checkbox'), name:'Password', checked:true}]},
99 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Password_label'), html:"Password"}]} 96 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Password_label'), html:"Password"}]}
100 ]}, 97 ]},
101 {tag:'tr', children:[ 98 {tag:'tr', children:[
102 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Notes_checkbox'), name:'Notes', checked:true}]}, 99 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Notes_checkbox'), name:'Notes', checked:true}]},
103 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Notes_label'), html:"Notes"}]} 100 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Notes_label'), html:"Notes"}]}
104 ]}, 101 ]},
105 {tag:'tr', children:[ 102 {tag:'tr', children:[
106 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('UUID_checkbox'), name:'UUID'/*, checked:true*/}]}, 103 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('UUID_checkbox'), name:'UUID'/*, checked:true*/}]},
107 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('UUID_label'), html:"UUID"}]} 104 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('UUID_label'), html:"UUID"}]}
108 ]} 105 ]}
109 ]} 106 ]}
110 ]} 107 ]}
111 ]}, 108 ]},
112 {tag:'td', width:'50%', valign:'top', children:[ 109 {tag:'td', width:'50%', valign:'top', children:[
113 {tag:'table', children:[ 110 {tag:'table', children:[
114 {tag:'tbody', children:[ 111 {tag:'tbody', children:[
115 {tag:'tr', children:[ 112 {tag:'tr', children:[
116 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Icon_checkbox'), name:'Icon'/*, checked:true*/}]}, 113 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Icon_checkbox'), name:'Icon'/*, checked:true*/}]},
117 {tag:'td', width:'150', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Icon_label'), html:"Icon"}]} 114 {tag:'td', width:'150', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Icon_label'), html:"Icon"}]}
118 ]}, 115 ]},
119 {tag:'tr', children:[ 116 {tag:'tr', children:[
120 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Creation Time_checkbox'), name:'Creation Time'/*, checked:true*/}]}, 117 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Creation Time_checkbox'), name:'Creation Time'/*, checked:true*/}]},
121 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Creation Time_label'), html:"Creation Time"}]} 118 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Creation Time_label'), html:"Creation Time"}]}
122 ]}, 119 ]},
123 {tag:'tr', children:[ 120 {tag:'tr', children:[
124 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Last Access_checkbox'), name:'Last Access'/*, checked:true*/}]}, 121 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Last Access_checkbox'), name:'Last Access'/*, checked:true*/}]},
125 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Last Access_label'), html:"Last Access"}]} 122 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Last Access_label'), html:"Last Access"}]}
126 ]}, 123 ]},
127 {tag:'tr', children:[ 124 {tag:'tr', children:[
128 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Last Modification_checkbox'), name:'Last Modification'/*, checked:true*/}]}, 125 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Last Modification_checkbox'), name:'Last Modification'/*, checked:true*/}]},
129 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Last Modification_label'), html:"Last Modification"}]} 126 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Last Modification_label'), html:"Last Modification"}]}
130 ]}, 127 ]},
131 {tag:'tr', children:[ 128 {tag:'tr', children:[
132 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Expires_checkbox'), name:'Expires'/*, checked:true*/}]}, 129 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Expires_checkbox'), name:'Expires'/*, checked:true*/}]},
133 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Expires_label'), html:"Expires"}]} 130 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Expires_label'), html:"Expires"}]}
134 ]}, 131 ]},
135 {tag:'tr', children:[ 132 {tag:'tr', children:[
136 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Attachment Description_checkbox'), name:'Attachment Description', checked:true}]}, 133 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Attachment Description_checkbox'), name:'Attachment Description', checked:true}]},
137 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Attachment Description_label'), html:"Attachment Description"}]} 134 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Attachment Description_label'), html:"Attachment Description"}]}
138 ]}, 135 ]},
139 {tag:'tr', children:[ 136 {tag:'tr', children:[
140 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Attachment_checkbox'), name:'Attachment', checked:true}]}, 137 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Attachment_checkbox'), name:'Attachment', checked:true}]},
141 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Attachment_label'), html:"Attachment"}]} 138 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Attachment_label'), html:"Attachment"}]}
142 ]} 139 ]}
143 ]} 140 ]}
144 ]} 141 ]}
145 ]} 142 ]}
146 ]} 143 ]}
147 ]} 144 ]}
148 ]} 145 ]}
149 ]} 146 ]}
150 ]} 147 ]}
151 ]}, 148 ]},
152 {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[ 149 {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[
153 {tag:'div', children:[ 150 {tag:'div', children:[
154 {tag:'div', id:this.getId('previewDiv'), html:"preview"} 151 {tag:'div', id:this.getId('previewDiv'), html:"preview"}
155 ]} 152 ]}
156 ]}, 153 ]},
157 {tag:'div', cls:'step_3', id:this.getId('step_3'), children:[ 154 {tag:'div', cls:'step_3', id:this.getId('step_3'), children:[
158 {tag:'div', children:[ 155 {tag:'div', children:[
159 {tag:'h4', html:"done"} 156 {tag:'h4', html:"done"}
160 ]} 157 ]}
161 ]} 158 ]}
162 ]}, 159 ]},
163 {tag:'div', cls:'importOptionsButtons', children:[ 160 {tag:'div', cls:'importOptionsButtons', children:[
164 {tag:'table', children:[ 161 {tag:'table', children:[
165 {tag:'tbody', children:[ 162 {tag:'tbody', children:[
166 {tag:'tr', children:[ 163 {tag:'tr', children:[
167 {tag:'td', html:'&nbsp;'}, 164 {tag:'td', html:'&nbsp;'},
168 {tag:'td', children:[ 165 {tag:'td', children:[
169 {tag:'div', id:this.getId('backActionButton')} 166 {tag:'div', id:this.getId('backActionButton')}
170 ]}, 167 ]},
171 {tag:'td', html:'&nbsp;'}, 168 {tag:'td', html:'&nbsp;'},
172 {tag:'td', children:[ 169 {tag:'td', children:[
173 {tag:'div', id:this.getId('nextActionButton')} 170 {tag:'div', id:this.getId('nextActionButton')}
174 ]}, 171 ]},
175 {tag:'td', html:'&nbsp;'} 172 {tag:'td', html:'&nbsp;'}
176 ]} 173 ]}
177 ]} 174 ]}
178 ]} 175 ]}
179 ]} 176 ]}
180 ]}); 177 ]});
181 178
182 this.updateSteps(); 179 this.updateSteps();
183 180
184 this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); 181 this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this}));
185 this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); 182 this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this}));
186 183
187 this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() 184 this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show()
188 this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 185 this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
189 this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 186 this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
190 this.getElement('step_3').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 187 this.getElement('step_3').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
191//MochiKit.Logging.logDebug("<<< Import.KeePassImportComponent.render"); 188//MochiKit.Logging.logDebug("<<< Import.KeePassImportComponent.render");
192 }, 189 },
193 190
194 //------------------------------------------------------------------------- 191 //-------------------------------------------------------------------------
195 192
196 'nextAction': function() { 193 'nextAction': function() {
197 switch (this.currentStep()) { 194 switch (this.currentStep()) {
198 case 0: //-> 1 195 case 0: //-> 1
199 Clipperz.PM.Components.MessageBox.showProgressPanel( 196 Clipperz.PM.Components.MessageBox.showProgressPanel(
200 MochiKit.Base.method(this, 'deferredParseValues'), 197 MochiKit.Base.method(this, 'deferredParseValues'),
201 MochiKit.Base.method(this, 'handleParseError'), 198 MochiKit.Base.method(this, 'handleParseError'),
202 this.getDom('nextActionButton') 199 this.getDom('nextActionButton')
203 ); 200 );
204 break; 201 break;
205 case 1: //-> 2 202 case 1: //-> 2
206 this.previewValues(); 203 this.previewValues();
207 break; 204 break;
208 case 2: //-> 3 205 case 2: //-> 3
209 this.importValues(); 206 this.importValues();
210 break; 207 break;
211 } 208 }
212 }, 209 },
213 210
214 //------------------------------------------------------------------------- 211 //-------------------------------------------------------------------------
215 212
216 'deferredParseValues': function() { 213 'deferredParseValues': function() {
217 var deferredResult; 214 var deferredResult;
218 215
219 deferredResult = new MochiKit.Async.Deferred(); 216 deferredResult = new MochiKit.Async.Deferred();
220//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredParseValues - 1 " + res.substring(0,50)); return res;}); 217//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredParseValues - 1 " + res.substring(0,50)); return res;});
221 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'parseImportData'); 218 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'parseImportData');
222//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredParseValues - 2 " + res.substring(0,50)); return res;}); 219//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredParseValues - 2 " + res.substring(0,50)); return res;});
223 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 220 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
224 this.startProcessing(); 221 this.startProcessing();
225 222
226 return res; 223 return res;
227 }, this)); 224 }, this));
228//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredParseValues - 3 " + res.substring(0,50)); return res;}); 225//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredParseValues - 3 " + res.substring(0,50)); return res;});
229 deferredResult.addCallback(MochiKit.Base.method(this, 'parseKeePassValues')); //processPasswordPlusValues 226 deferredResult.addCallback(MochiKit.Base.method(this, 'parseKeePassValues')); //processPasswordPlusValues
230//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredParseValues - 4 " + res); return res;}); 227//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredParseValues - 4 " + res); return res;});
231 deferredResult.addCallback(MochiKit.Base.method(this, 'setParsedValues')); //setProcessedValues 228 deferredResult.addCallback(MochiKit.Base.method(this, 'setParsedValues')); //setProcessedValues
232//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredParseValues - 5 " + res); return res;}); 229//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredParseValues - 5 " + res); return res;});
233 deferredResult.addCallback(MochiKit.Base.method(this, 'showSettings')); //previewRecordValues 230 deferredResult.addCallback(MochiKit.Base.method(this, 'showSettings')); //previewRecordValues
234//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredParseValues - 6 " + res); return res;}); 231//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredParseValues - 6 " + res); return res;});
235 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 232 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
236 this.processingDone(); 233 this.processingDone();
237 this.getElement('step_0').hide(); 234 this.getElement('step_0').hide();
238 this.getElement('step_1').show(); 235 this.getElement('step_1').show();
239 this.backButton().enable(); 236 this.backButton().enable();
240 237
241 return res; 238 return res;
242 }, this)); 239 }, this));
243//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredParseValues - 7 " + res); return res;}); 240//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredParseValues - 7 " + res); return res;});
244 deferredResult.callback(this.textAreaContent()); 241 deferredResult.callback(this.textAreaContent());
245 242
246 return deferredResult; 243 return deferredResult;
247 }, 244 },
248 245
249 //------------------------------------------------------------------------- 246 //-------------------------------------------------------------------------
250 247
251 'deferredPreviewValues': function() { 248 'deferredPreviewValues': function() {
252 var deferredResult; 249 var deferredResult;
253 250
254//MochiKit.Logging.logDebug(">>> KeePassImportComonent.deferredPreviewValues"); 251//MochiKit.Logging.logDebug(">>> KeePassImportComonent.deferredPreviewValues");
255 deferredResult = new MochiKit.Async.Deferred(); 252 deferredResult = new MochiKit.Async.Deferred();
256//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 1 " + res); return res;}); 253//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 1 " + res); return res;});
257 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'previewImportData'); 254 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'previewImportData');
258//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 2 " + res); return res;}); 255//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 2 " + res); return res;});
259 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 256 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
260 this.startProcessing(); 257 this.startProcessing();
261 258
262 return res; 259 return res;
263 }, this)); 260 }, this));
264//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 3 " + res); return res;}); 261//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 3 " + res); return res;});
265 deferredResult.addCallback(MochiKit.Base.method(this, 'processKeePassParsedValues')); 262 deferredResult.addCallback(MochiKit.Base.method(this, 'processKeePassParsedValues'));
266//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 4 " + res); return res;}); 263//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 4 " + res); return res;});
267 deferredResult.addCallback(MochiKit.Base.method(this, 'setProcessedValues')); 264 deferredResult.addCallback(MochiKit.Base.method(this, 'setProcessedValues'));
268//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 5 " + res); return res;}); 265//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 5 " + res); return res;});
269 deferredResult.addCallback(MochiKit.Base.method(this, 'previewRecordValues')); 266 deferredResult.addCallback(MochiKit.Base.method(this, 'previewRecordValues'));
270//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 6 " + res); return res;}); 267//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 6 " + res); return res;});
271 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 268 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
272 this.processingDone(); 269 this.processingDone();
273 this.getElement('step_1').hide(); 270 this.getElement('step_1').hide();
274 this.getElement('step_2').show(); 271 this.getElement('step_2').show();
275 this.backButton().enable(); 272 this.backButton().enable();
276 273
277 return res; 274 return res;
278 }, this)); 275 }, this));
279//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 7 " + res); return res;}); 276//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 7 " + res); return res;});
280 // deferredResult.addErrback(MochiKit.Base.bind(function() { 277 // deferredResult.addErrback(MochiKit.Base.bind(function() {
281 // this.processingAborted(); 278 // this.processingAborted();
282 // }, this)) 279 // }, this))
283//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 8 " + res); return res;}); 280//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 8 " + res); return res;});
284 deferredResult.callback(this.parsedValues()); 281 deferredResult.callback(this.parsedValues());
285//MochiKit.Logging.logDebug("<<< KeePassImportComonent.deferredPreviewValues"); 282//MochiKit.Logging.logDebug("<<< KeePassImportComonent.deferredPreviewValues");
286 283
287 return deferredResult; 284 return deferredResult;
288 }, 285 },
289 286
290 //------------------------------------------------------------------------- 287 //-------------------------------------------------------------------------
291 288
292 'definedFields': function() { 289 'definedFields': function() {
293 return this._definedFields; 290 return this._definedFields;
294 }, 291 },
295 292
296 //------------------------------------------------------------------------- 293 //-------------------------------------------------------------------------
297 294
298 'parseKeePassValues': function(someData) { 295 'parseKeePassValues': function(someData) {
299 var deferredResult; 296 var deferredResult;
300 var keePassProcessor; 297 var keePassProcessor;
301 298
302 keePassProcessor = new Clipperz.KeePassExportProcessor(); 299 keePassProcessor = new Clipperz.KeePassExportProcessor();
303 300
304 deferredResult = new MochiKit.Async.Deferred(); 301 deferredResult = new MochiKit.Async.Deferred();
305//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.parseKeePassValues - 1 " + res.substring(0,50)); return res;}); 302//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.parseKeePassValues - 1 " + res.substring(0,50)); return res;});
306 deferredResult.addCallback(function(res) { 303 deferredResult.addCallback(function(res) {
307 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:(res.length)}, res); 304 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:(res.length)}, res);
308 }) 305 })
309//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.parseKeePassValues - 2 " + res.substring(0,50)); return res;}); 306//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.parseKeePassValues - 2 " + res.substring(0,50)); return res;});
310 deferredResult.addCallback(MochiKit.Base.method(keePassProcessor, 'deferredParse')); 307 deferredResult.addCallback(MochiKit.Base.method(keePassProcessor, 'deferredParse'));
311//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.parseKeePassValues - 3 " + res); return res;}); 308//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.parseKeePassValues - 3 " + res); return res;});
312 deferredResult.callback(someData); 309 deferredResult.callback(someData);
313 310
314 return deferredResult; 311 return deferredResult;
315 }, 312 },
316 313
317 //------------------------------------------------------------------------- 314 //-------------------------------------------------------------------------
318 315
319 'showSettings': function(someValues) { 316 'showSettings': function(someValues) {
320 var availableFields; 317 var availableFields;
321 var i,c; 318 var i,c;
322 319
323//MochiKit.Logging.logDebug(">>> KeePassImportCOmponent.showSettings"); 320//MochiKit.Logging.logDebug(">>> KeePassImportCOmponent.showSettings");
324 availableFields = new Clipperz.Set(); 321 availableFields = new Clipperz.Set();
325 c = this.parsedValues().length; 322 c = this.parsedValues().length;
326 for (i=0; i<c; i++) { 323 for (i=0; i<c; i++) {
327 var fieldLabel; 324 var fieldLabel;
328 325
329 for (fieldLabel in this.parsedValues()[i]) { 326 for (fieldLabel in this.parsedValues()[i]) {
330 availableFields.add(fieldLabel); 327 availableFields.add(fieldLabel);
331 } 328 }
332 } 329 }
333 330
334 c = this.definedFields().length; 331 c = this.definedFields().length;
335 for (i=0; i<c; i++) { 332 for (i=0; i<c; i++) {
336 var definedField; 333 var definedField;
337 334
338 definedField = this.definedFields()[i]; 335 definedField = this.definedFields()[i];
339 if (availableFields.contains(definedField)) { 336 if (availableFields.contains(definedField)) {
340//MochiKit.Logging.logDebug("enabling field " + definedField); 337//MochiKit.Logging.logDebug("enabling field " + definedField);
341 this.getDom(definedField + '_checkbox').disabled = false; 338 this.getDom(definedField + '_checkbox').disabled = false;
342 this.getElement(definedField + '_label').removeClass('disabled'); 339 this.getElement(definedField + '_label').removeClass('disabled');
343 } else { 340 } else {
344//MochiKit.Logging.logDebug("disabling field " + definedField); 341//MochiKit.Logging.logDebug("disabling field " + definedField);
345 this.getDom(definedField + '_checkbox').disabled = true; 342 this.getDom(definedField + '_checkbox').disabled = true;
346 this.getDom(definedField + '_checkbox').checked = false; //???? 343 this.getDom(definedField + '_checkbox').checked = false; //????
347 this.getElement(definedField + '_label').addClass('disabled'); 344 this.getElement(definedField + '_label').addClass('disabled');
348 } 345 }
349 } 346 }
350//MochiKit.Logging.logDebug("<<< KeePassImportCOmponent.showSettings"); 347//MochiKit.Logging.logDebug("<<< KeePassImportCOmponent.showSettings");
351 348
352 return MochiKit.Async.succeed(someValues); 349 return MochiKit.Async.succeed(someValues);
353 }, 350 },
354 351
355 //------------------------------------------------------------------------- 352 //-------------------------------------------------------------------------
356 353
357 'shouldImportField': function(aFieldName) { 354 'shouldImportField': function(aFieldName) {
358 var fieldCheckbox; 355 var fieldCheckbox;
359 var result; 356 var result;
360 357
361//MochiKit.Logging.logDebug(">>> shouldImportField: " + aFieldName); 358//MochiKit.Logging.logDebug(">>> shouldImportField: " + aFieldName);
362 // fieldCheckbox = this.getDom(aFieldName + '_checkbox'); 359 // fieldCheckbox = this.getDom(aFieldName + '_checkbox');
363 fieldCheckbox = MochiKit.DOM.getElement(this.getId(aFieldName + '_checkbox')); 360 fieldCheckbox = MochiKit.DOM.getElement(this.getId(aFieldName + '_checkbox'));
364 if (fieldCheckbox != null) { 361 if (fieldCheckbox != null) {
365 result = fieldCheckbox.checked; 362 result = fieldCheckbox.checked;
366 } else { 363 } else {
367 result = false; 364 result = false;
368 } 365 }
369//MochiKit.Logging.logDebug("<<< shouldImportField: " + result); 366//MochiKit.Logging.logDebug("<<< shouldImportField: " + result);
370 367
371 return result; 368 return result;
372 }, 369 },
373 370
374 //------------------------------------------------------------------------- 371 //-------------------------------------------------------------------------
375 372
376 'processKeePassParsedValues': function(someValues) { 373 'processKeePassParsedValues': function(someValues) {
377 var deferredResult; 374 var deferredResult;
378 var records; 375 var records;
379 var i,c; 376 var i,c;
380 377
381//MochiKit.Logging.logDebug(">>> processKeePassParsedValues"); 378//MochiKit.Logging.logDebug(">>> processKeePassParsedValues");
382 deferredResult = new MochiKit.Async.Deferred(); 379 deferredResult = new MochiKit.Async.Deferred();
383 records = []; 380 records = [];
384 381
385//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("processKeePassParsedValues - 1: " + res); return res;}); 382//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("processKeePassParsedValues - 1: " + res); return res;});
386 c = someValues.length; 383 c = someValues.length;
387 deferredResult.addCallback(function(res) { 384 deferredResult.addCallback(function(res) {
388 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:c}, res); 385 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:c}, res);
389 }) 386 })
390 for(i=0; i<c; i++) { 387 for(i=0; i<c; i++) {
391//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + i + "] processKeePassParsedValues - 1.1: " + res); return res;}); 388//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + i + "] processKeePassParsedValues - 1.1: " + res); return res;});
392 deferredResult.addCallback(MochiKit.Async.wait, 0.2); 389 deferredResult.addCallback(MochiKit.Async.wait, 0.2);
393//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + i + "] processKeePassParsedValues - 1.2: " + res); return res;}); 390//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + i + "] processKeePassParsedValues - 1.2: " + res); return res;});
394 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {}); 391 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {});
395//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + i + "] processKeePassParsedValues - 1.3: " + res); return res;}); 392//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + i + "] processKeePassParsedValues - 1.3: " + res); return res;});
396 deferredResult.addCallback(MochiKit.Base.bind(function(someRecords, someData) { 393 deferredResult.addCallback(MochiKit.Base.bind(function(someRecords, someData) {
397 var record; 394 var record;
398 var recordVersion; 395 var recordVersion;
399 var ii; 396 var ii;
400 397
401 record = new Clipperz.PM.DataModel.Record({user:this.user()}); 398 record = new Clipperz.PM.DataModel.Record({user:this.user()});
402 record.setLabel(someData['Title']); 399 record.setLabel(someData['Title']);
403 if (this.shouldImportField('Notes')) { 400 if (this.shouldImportField('Notes')) {
404 record.setNotes(someData['Notes']); 401 record.setNotes(someData['Notes']);
405 } 402 }
406 recordVersion = record.currentVersion() 403 recordVersion = record.currentVersion()
407 404
408 for (ii in someData) { 405 for (ii in someData) {
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js
index 54813bc..05baf46 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js
@@ -1,332 +1,329 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } 29if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Components.Import.MainComponent = function(anElement, args) { 33Clipperz.PM.Components.Import.MainComponent = function(anElement, args) {
37 args = args || {}; 34 args = args || {};
38 35
39 Clipperz.PM.Components.Import.MainComponent.superclass.constructor.call(this, anElement, args); 36 Clipperz.PM.Components.Import.MainComponent.superclass.constructor.call(this, anElement, args);
40 37
41 this._user = args.user; 38 this._user = args.user;
42 this._wizardComponent = null; 39 this._wizardComponent = null;
43 40
44 this._backButton = null; 41 this._backButton = null;
45 this._nextButton = null; 42 this._nextButton = null;
46 43
47 this._selectedComponent = null; 44 this._selectedComponent = null;
48 45
49 this.render(); 46 this.render();
50 47
51 return this; 48 return this;
52} 49}
53 50
54//============================================================================= 51//=============================================================================
55 52
56YAHOO.extendX(Clipperz.PM.Components.Import.MainComponent, Clipperz.PM.Components.BaseComponent, { 53YAHOO.extendX(Clipperz.PM.Components.Import.MainComponent, Clipperz.PM.Components.BaseComponent, {
57 54
58 'toString': function() { 55 'toString': function() {
59 return "Clipperz.PM.Components.Import.MainComponent component"; 56 return "Clipperz.PM.Components.Import.MainComponent component";
60 }, 57 },
61 58
62 //------------------------------------------------------------------------- 59 //-------------------------------------------------------------------------
63 60
64 'user': function() { 61 'user': function() {
65 return this._user; 62 return this._user;
66 }, 63 },
67 64
68 //------------------------------------------------------------------------- 65 //-------------------------------------------------------------------------
69 66
70 'wizardComponent': function() { 67 'wizardComponent': function() {
71 return this._wizardComponent; 68 return this._wizardComponent;
72 }, 69 },
73 70
74 'setWizardComponent': function(aValue) { 71 'setWizardComponent': function(aValue) {
75 if (this._wizardComponent != null) { 72 if (this._wizardComponent != null) {
76 this._wizardComponent.remove(); 73 this._wizardComponent.remove();
77 } 74 }
78 75
79 if (aValue != null) { 76 if (aValue != null) {
80 this.getElement('importCover').hide(); 77 this.getElement('importCover').hide();
81 this.getElement('importWizard').show(); 78 this.getElement('importWizard').show();
82 } 79 }
83 this._wizardComponent = aValue; 80 this._wizardComponent = aValue;
84 }, 81 },
85 82
86 'resetImportComponent': function() { 83 'resetImportComponent': function() {
87//MochiKit.Logging.logDebug(">>> resetImportComponent"); 84//MochiKit.Logging.logDebug(">>> resetImportComponent");
88 this.setWizardComponent(null); 85 this.setWizardComponent(null);
89 this.getElement('wizardComponent').update(""); 86 this.getElement('wizardComponent').update("");
90 87
91 this.getElement('importCover').show(); 88 this.getElement('importCover').show();
92 this.getElement('importWizard').hide(); 89 this.getElement('importWizard').hide();
93//MochiKit.Logging.logDebug("<<< resetImportComponent"); 90//MochiKit.Logging.logDebug("<<< resetImportComponent");
94 }, 91 },
95 92
96 //------------------------------------------------------------------------- 93 //-------------------------------------------------------------------------
97 94
98 'backButton': function() { 95 'backButton': function() {
99 return this._backButton; 96 return this._backButton;
100 }, 97 },
101 98
102 'setBackButton': function(aValue) { 99 'setBackButton': function(aValue) {
103 this._backButton = aValue; 100 this._backButton = aValue;
104 }, 101 },
105 102
106 'nextButton': function() { 103 'nextButton': function() {
107 return this._nextButton; 104 return this._nextButton;
108 }, 105 },
109 106
110 'setNextButton': function(aValue) { 107 'setNextButton': function(aValue) {
111 this._nextButton = aValue; 108 this._nextButton = aValue;
112 }, 109 },
113 110
114 //------------------------------------------------------------------------- 111 //-------------------------------------------------------------------------
115 112
116 'render': function() { 113 'render': function() {
117//MochiKit.Logging.logDebug(">>> Import.MainComponent.render"); 114//MochiKit.Logging.logDebug(">>> Import.MainComponent.render");
118 Clipperz.NotificationCenter.unregister(this); 115 Clipperz.NotificationCenter.unregister(this);
119 MochiKit.Signal.disconnectAllTo(this); 116 MochiKit.Signal.disconnectAllTo(this);
120 117
121 this.element().update(""); 118 this.element().update("");
122 this.domHelper().append(this.element(), {tag:'div', id:this.getId('mainDiv'), children:[ 119 this.domHelper().append(this.element(), {tag:'div', id:this.getId('mainDiv'), children:[
123 {tag:'div', id:this.getId('importCover'), children:[ 120 {tag:'div', id:this.getId('importCover'), children:[
124 {tag:'h5', htmlString:Clipperz.PM.Strings['importTabTitle']}, 121 {tag:'h5', htmlString:Clipperz.PM.Strings['importTabTitle']},
125 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['importTabDescription']}, 122 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['importTabDescription']},
126 {tag:'div', cls:'importFormats', children:[ 123 {tag:'div', cls:'importFormats', children:[
127 {tag:'ul', cls:'radioList', children:[ 124 {tag:'ul', cls:'radioList', children:[
128 {tag:'li', children:[ 125 {tag:'li', children:[
129 {tag:'table', children:[{tag:'tbody', children:[{tag:'tr', children:[ 126 {tag:'table', children:[{tag:'tbody', children:[{tag:'tr', children:[
130 {tag:'td', valign:'top', children:[ 127 {tag:'td', valign:'top', children:[
131 {tag:'input', id:this.getId('CSV_radio'), type:'radio', name:'importFormat', value:'CSV'} 128 {tag:'input', id:this.getId('CSV_radio'), type:'radio', name:'importFormat', value:'CSV'}
132 ]}, 129 ]},
133 {tag:'td', valign:'top', children:[ 130 {tag:'td', valign:'top', children:[
134 {tag:'h4', id:this.getId('CSV_title'), htmlString:Clipperz.PM.Strings['importFormats']['CSV']['label']}, 131 {tag:'h4', id:this.getId('CSV_title'), htmlString:Clipperz.PM.Strings['importFormats']['CSV']['label']},
135 {tag:'div', cls:'templateDescription', htmlString:Clipperz.PM.Strings['importFormats']['CSV']['description']} 132 {tag:'div', cls:'templateDescription', htmlString:Clipperz.PM.Strings['importFormats']['CSV']['description']}
136 ]} 133 ]}
137 ]}]}]} 134 ]}]}]}
138 ]}, 135 ]},
139 {tag:'li', children:[ 136 {tag:'li', children:[
140 {tag:'table', children:[{tag:'tbody', children:[{tag:'tr', children:[ 137 {tag:'table', children:[{tag:'tbody', children:[{tag:'tr', children:[
141 {tag:'td', valign:'top', children:[ 138 {tag:'td', valign:'top', children:[
142 {tag:'input', id:this.getId('Excel_radio'), type:'radio', name:'importFormat', value:'EXCEL'} 139 {tag:'input', id:this.getId('Excel_radio'), type:'radio', name:'importFormat', value:'EXCEL'}
143 ]}, 140 ]},
144 {tag:'td', valign:'top', children:[ 141 {tag:'td', valign:'top', children:[
145 {tag:'h4', id:this.getId('Excel_title'), htmlString:Clipperz.PM.Strings['importFormats']['Excel']['label']}, 142 {tag:'h4', id:this.getId('Excel_title'), htmlString:Clipperz.PM.Strings['importFormats']['Excel']['label']},
146 {tag:'div', cls:'templateDescription', htmlString:Clipperz.PM.Strings['importFormats']['Excel']['description']} 143 {tag:'div', cls:'templateDescription', htmlString:Clipperz.PM.Strings['importFormats']['Excel']['description']}
147 ]} 144 ]}
148 ]}]}]} 145 ]}]}]}
149 ]}, 146 ]},
150 {tag:'li', children:[ 147 {tag:'li', children:[
151 {tag:'table', children:[{tag:'tbody', children:[{tag:'tr', children:[ 148 {tag:'table', children:[{tag:'tbody', children:[{tag:'tr', children:[
152 {tag:'td', valign:'top', children:[ 149 {tag:'td', valign:'top', children:[
153 {tag:'input', id:this.getId('KeePass_radio'), type:'radio', name:'importFormat', value:'KEEPASS'} 150 {tag:'input', id:this.getId('KeePass_radio'), type:'radio', name:'importFormat', value:'KEEPASS'}
154 ]}, 151 ]},
155 {tag:'td', valign:'top', children:[ 152 {tag:'td', valign:'top', children:[
156 {tag:'h4', id:this.getId('KeePass_title'), htmlString:Clipperz.PM.Strings['importFormats']['KeePass']['label']}, 153 {tag:'h4', id:this.getId('KeePass_title'), htmlString:Clipperz.PM.Strings['importFormats']['KeePass']['label']},
157 {tag:'div', cls:'templateDescription', htmlString:Clipperz.PM.Strings['importFormats']['KeePass']['description']} 154 {tag:'div', cls:'templateDescription', htmlString:Clipperz.PM.Strings['importFormats']['KeePass']['description']}
158 ]} 155 ]}
159 ]}]}]} 156 ]}]}]}
160 ]}, 157 ]},
161 {tag:'li', children:[ 158 {tag:'li', children:[
162 {tag:'table', children:[{tag:'tbody', children:[{tag:'tr', children:[ 159 {tag:'table', children:[{tag:'tbody', children:[{tag:'tr', children:[
163 {tag:'td', valign:'top', children:[ 160 {tag:'td', valign:'top', children:[
164 {tag:'input', id:this.getId('Roboform_radio'), type:'radio', name:'importFormat', value:'ROBOFORM'} 161 {tag:'input', id:this.getId('Roboform_radio'), type:'radio', name:'importFormat', value:'ROBOFORM'}
165 ]}, 162 ]},
166 {tag:'td', valign:'top', children:[ 163 {tag:'td', valign:'top', children:[
167 {tag:'h4', id:this.getId('Roboform_title'), htmlString:Clipperz.PM.Strings['importFormats']['Roboform']['label']}, 164 {tag:'h4', id:this.getId('Roboform_title'), htmlString:Clipperz.PM.Strings['importFormats']['Roboform']['label']},
168 {tag:'div', cls:'templateDescription', htmlString:Clipperz.PM.Strings['importFormats']['Roboform']['description']} 165 {tag:'div', cls:'templateDescription', htmlString:Clipperz.PM.Strings['importFormats']['Roboform']['description']}
169 ]} 166 ]}
170 ]}]}]} 167 ]}]}]}
171 ]}, 168 ]},
172 {tag:'li', children:[ 169 {tag:'li', children:[
173 {tag:'table', children:[{tag:'tbody', children:[{tag:'tr', children:[ 170 {tag:'table', children:[{tag:'tbody', children:[{tag:'tr', children:[
174 {tag:'td', valign:'top', children:[ 171 {tag:'td', valign:'top', children:[
175 {tag:'input', id:this.getId('PasswordPlus_radio'), type:'radio', name:'importFormat', value:'PASSWORD_PLUS'} 172 {tag:'input', id:this.getId('PasswordPlus_radio'), type:'radio', name:'importFormat', value:'PASSWORD_PLUS'}
176 ]}, 173 ]},
177 {tag:'td', valign:'top', children:[ 174 {tag:'td', valign:'top', children:[
178 {tag:'h4', id:this.getId('PasswordPlus_title'), htmlString:Clipperz.PM.Strings['importFormats']['PasswordPlus']['label']}, 175 {tag:'h4', id:this.getId('PasswordPlus_title'), htmlString:Clipperz.PM.Strings['importFormats']['PasswordPlus']['label']},
179 {tag:'div', cls:'templateDescription', htmlString:Clipperz.PM.Strings['importFormats']['PasswordPlus']['description']} 176 {tag:'div', cls:'templateDescription', htmlString:Clipperz.PM.Strings['importFormats']['PasswordPlus']['description']}
180 ]} 177 ]}
181 ]}]}]} 178 ]}]}]}
182 ]}, 179 ]},
183 {tag:'li', children:[ 180 {tag:'li', children:[
184 {tag:'table', children:[{tag:'tbody', children:[{tag:'tr', children:[ 181 {tag:'table', children:[{tag:'tbody', children:[{tag:'tr', children:[
185 {tag:'td', valign:'top', children:[ 182 {tag:'td', valign:'top', children:[
186 {tag:'input', id:this.getId('ClipperzExport_radio'), type:'radio', name:'importFormat', value:'CLIPPERZ_EXPORT'} 183 {tag:'input', id:this.getId('ClipperzExport_radio'), type:'radio', name:'importFormat', value:'CLIPPERZ_EXPORT'}
187 ]}, 184 ]},
188 {tag:'td', valign:'top', children:[ 185 {tag:'td', valign:'top', children:[
189 {tag:'h4', id:this.getId('ClipperzExport_title'), htmlString:Clipperz.PM.Strings['importFormats']['ClipperzExport']['label']}, 186 {tag:'h4', id:this.getId('ClipperzExport_title'), htmlString:Clipperz.PM.Strings['importFormats']['ClipperzExport']['label']},
190 {tag:'div', cls:'templateDescription', htmlString:Clipperz.PM.Strings['importFormats']['ClipperzExport']['description']} 187 {tag:'div', cls:'templateDescription', htmlString:Clipperz.PM.Strings['importFormats']['ClipperzExport']['description']}
191 ]} 188 ]}
192 ]}]}]} 189 ]}]}]}
193 ]} 190 ]}
194 ]}, 191 ]},
195 192
196 {tag:'div', cls:'importOptionsButtons', children:[ 193 {tag:'div', cls:'importOptionsButtons', children:[
197 {tag:'table', children:[ 194 {tag:'table', children:[
198 {tag:'tbody', children:[ 195 {tag:'tbody', children:[
199 {tag:'tr', children:[ 196 {tag:'tr', children:[
200 {tag:'td', html:'&nbsp;'}, 197 {tag:'td', html:'&nbsp;'},
201 {tag:'td', children:[ 198 {tag:'td', children:[
202 {tag:'div', id:this.getId('backActionButton')} 199 {tag:'div', id:this.getId('backActionButton')}
203 ]}, 200 ]},
204 {tag:'td', html:'&nbsp;'}, 201 {tag:'td', html:'&nbsp;'},
205 {tag:'td', children:[ 202 {tag:'td', children:[
206 {tag:'div', id:this.getId('nextActionButton')} 203 {tag:'div', id:this.getId('nextActionButton')}
207 ]}, 204 ]},
208 {tag:'td', html:'&nbsp;'} 205 {tag:'td', html:'&nbsp;'}
209 ]} 206 ]}
210 ]} 207 ]}
211 ]} 208 ]}
212 ]} 209 ]}
213 ]} 210 ]}
214 ]}, 211 ]},
215 {tag:'div', id:this.getId('importWizard'), children:[ 212 {tag:'div', id:this.getId('importWizard'), children:[
216 {tag:'form', id:this.getId('importWizardForm'), children:[ 213 {tag:'form', id:this.getId('importWizardForm'), children:[
217 {tag:'div', cls:'wizardComponent', id:this.getId('wizardComponent'), children:[]} 214 {tag:'div', cls:'wizardComponent', id:this.getId('wizardComponent'), children:[]}
218 ]} 215 ]}
219 ]} 216 ]}
220 ]}); 217 ]});
221 218
222 this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); 219 this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this}));
223 this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); 220 this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this}));
224 221
225 this.backButton().disable(); 222 this.backButton().disable();
226 this.nextButton().disable(); 223 this.nextButton().disable();
227 224
228 this.getElement('importCover').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show(); 225 this.getElement('importCover').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show();
229 this.getElement('importWizard').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 226 this.getElement('importWizard').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
230 227
231 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { 228 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) {
232 this.getElement('mainDiv').addClass('read-only'); 229 this.getElement('mainDiv').addClass('read-only');
233 230
234 this.getDom('ClipperzExport_radio').disabled = true; 231 this.getDom('ClipperzExport_radio').disabled = true;
235 this.getDom('CSV_radio').disabled = true; 232 this.getDom('CSV_radio').disabled = true;
236 this.getDom('Excel_radio').disabled = true; 233 this.getDom('Excel_radio').disabled = true;
237 this.getDom('PasswordPlus_radio').disabled = true; 234 this.getDom('PasswordPlus_radio').disabled = true;
238 this.getDom('Roboform_radio').disabled = true; 235 this.getDom('Roboform_radio').disabled = true;
239 this.getDom('KeePass_radio').disabled = true; 236 this.getDom('KeePass_radio').disabled = true;
240 } else { 237 } else {
241 MochiKit.Signal.connect(this.getId('ClipperzExport_radio'), 'onclick', MochiKit.Base.method(this, 'selectComponent')); 238 MochiKit.Signal.connect(this.getId('ClipperzExport_radio'), 'onclick', MochiKit.Base.method(this, 'selectComponent'));
242 MochiKit.Signal.connect(this.getId('CSV_radio'), 'onclick', MochiKit.Base.method(this, 'selectComponent')); 239 MochiKit.Signal.connect(this.getId('CSV_radio'), 'onclick', MochiKit.Base.method(this, 'selectComponent'));
243 MochiKit.Signal.connect(this.getId('Excel_radio'), 'onclick', MochiKit.Base.method(this, 'selectComponent')); 240 MochiKit.Signal.connect(this.getId('Excel_radio'), 'onclick', MochiKit.Base.method(this, 'selectComponent'));
244 MochiKit.Signal.connect(this.getId('PasswordPlus_radio'), 'onclick', MochiKit.Base.method(this, 'selectComponent')); 241 MochiKit.Signal.connect(this.getId('PasswordPlus_radio'), 'onclick', MochiKit.Base.method(this, 'selectComponent'));
245 MochiKit.Signal.connect(this.getId('Roboform_radio'), 'onclick', MochiKit.Base.method(this, 'selectComponent')); 242 MochiKit.Signal.connect(this.getId('Roboform_radio'), 'onclick', MochiKit.Base.method(this, 'selectComponent'));
246 MochiKit.Signal.connect(this.getId('KeePass_radio'), 'onclick', MochiKit.Base.method(this, 'selectComponent')); 243 MochiKit.Signal.connect(this.getId('KeePass_radio'), 'onclick', MochiKit.Base.method(this, 'selectComponent'));
247 244
248 if (Clipperz_IEisBroken != true) { 245 if (Clipperz_IEisBroken != true) {
249 MochiKit.Signal.connect(this.getId('ClipperzExport_title'), 'onclick', this.getDom('ClipperzExport_radio'), 'click'); 246 MochiKit.Signal.connect(this.getId('ClipperzExport_title'), 'onclick', this.getDom('ClipperzExport_radio'), 'click');
250 MochiKit.Signal.connect(this.getId('CSV_title'), 'onclick', this.getDom('CSV_radio'), 'click'); 247 MochiKit.Signal.connect(this.getId('CSV_title'), 'onclick', this.getDom('CSV_radio'), 'click');
251 MochiKit.Signal.connect(this.getId('Excel_title'), 'onclick', this.getDom('Excel_radio'), 'click'); 248 MochiKit.Signal.connect(this.getId('Excel_title'), 'onclick', this.getDom('Excel_radio'), 'click');
252 MochiKit.Signal.connect(this.getId('PasswordPlus_title'), 'onclick', this.getDom('PasswordPlus_radio'), 'click'); 249 MochiKit.Signal.connect(this.getId('PasswordPlus_title'), 'onclick', this.getDom('PasswordPlus_radio'), 'click');
253 MochiKit.Signal.connect(this.getId('Roboform_title'), 'onclick', this.getDom('Roboform_radio'), 'click'); 250 MochiKit.Signal.connect(this.getId('Roboform_title'), 'onclick', this.getDom('Roboform_radio'), 'click');
254 MochiKit.Signal.connect(this.getId('KeePass_title'), 'onclick', this.getDom('KeePass_radio'), 'click'); 251 MochiKit.Signal.connect(this.getId('KeePass_title'), 'onclick', this.getDom('KeePass_radio'), 'click');
255 } 252 }
256 253
257 Clipperz.NotificationCenter.register(null, 'importCompleted', this, 'resetImportComponent'); 254 Clipperz.NotificationCenter.register(null, 'importCompleted', this, 'resetImportComponent');
258 Clipperz.NotificationCenter.register(null, 'importCancelled', this, 'resetImportComponent'); 255 Clipperz.NotificationCenter.register(null, 'importCancelled', this, 'resetImportComponent');
259 } 256 }
260 257
261//MochiKit.Logging.logDebug("<<< Import.MainComponent.render"); 258//MochiKit.Logging.logDebug("<<< Import.MainComponent.render");
262 }, 259 },
263 260
264 //------------------------------------------------------------------------- 261 //-------------------------------------------------------------------------
265/* 262/*
266 'selectedFormat': function() { 263 'selectedFormat': function() {
267 return this.getDom('importSelectionOptions').value; 264 return this.getDom('importSelectionOptions').value;
268 }, 265 },
269*/ 266*/
270 //------------------------------------------------------------------------- 267 //-------------------------------------------------------------------------
271 268
272 'updateSelectedImportWizardComponent': function(aComponent) { 269 'updateSelectedImportWizardComponent': function(aComponent) {
273 var newWizardComponent; 270 var newWizardComponent;
274 271
275//MochiKit.Logging.logDebug(">>> Import.MainComponent.updateSelectedImportWizardComponent"); 272//MochiKit.Logging.logDebug(">>> Import.MainComponent.updateSelectedImportWizardComponent");
276 this.getElement('wizardComponent').update(""); 273 this.getElement('wizardComponent').update("");
277 274
278 switch(aComponent) { 275 switch(aComponent) {
279 case 'CLIPPERZ_EXPORT': 276 case 'CLIPPERZ_EXPORT':
280 newWizardComponent = new Clipperz.PM.Components.Import.ClipperzImportComponent(this.getElement('wizardComponent'), {user:this.user()}); 277 newWizardComponent = new Clipperz.PM.Components.Import.ClipperzImportComponent(this.getElement('wizardComponent'), {user:this.user()});
281 break; 278 break;
282 case 'CSV': 279 case 'CSV':
283 newWizardComponent = new Clipperz.PM.Components.Import.CSVImportComponent(this.getElement('wizardComponent'), {user:this.user()}); 280 newWizardComponent = new Clipperz.PM.Components.Import.CSVImportComponent(this.getElement('wizardComponent'), {user:this.user()});
284 break; 281 break;
285 case 'EXCEL': 282 case 'EXCEL':
286 newWizardComponent = new Clipperz.PM.Components.Import.ExcelImportComponent(this.getElement('wizardComponent'), {user:this.user()}); 283 newWizardComponent = new Clipperz.PM.Components.Import.ExcelImportComponent(this.getElement('wizardComponent'), {user:this.user()});
287 break; 284 break;
288 case 'PASSWORD_PLUS': 285 case 'PASSWORD_PLUS':
289 newWizardComponent = new Clipperz.PM.Components.Import.PasswordPlusImportComponent(this.getElement('wizardComponent'), {user:this.user()}); 286 newWizardComponent = new Clipperz.PM.Components.Import.PasswordPlusImportComponent(this.getElement('wizardComponent'), {user:this.user()});
290 break; 287 break;
291 case 'ROBOFORM': 288 case 'ROBOFORM':
292 newWizardComponent = new Clipperz.PM.Components.Import.RoboFormImportComponent(this.getElement('wizardComponent'), {user:this.user()});; 289 newWizardComponent = new Clipperz.PM.Components.Import.RoboFormImportComponent(this.getElement('wizardComponent'), {user:this.user()});;
293 break; 290 break;
294 case 'KEEPASS': 291 case 'KEEPASS':
295 newWizardComponent = new Clipperz.PM.Components.Import.KeePassImportComponent(this.getElement('wizardComponent'), {user:this.user()}); 292 newWizardComponent = new Clipperz.PM.Components.Import.KeePassImportComponent(this.getElement('wizardComponent'), {user:this.user()});
296 break; 293 break;
297 } 294 }
298 295
299 this.setWizardComponent(newWizardComponent); 296 this.setWizardComponent(newWizardComponent);
300//MochiKit.Logging.logDebug("<<< Import.MainComponent.updateSelectedWizardComponent"); 297//MochiKit.Logging.logDebug("<<< Import.MainComponent.updateSelectedWizardComponent");
301 }, 298 },
302 299
303 //------------------------------------------------------------------------- 300 //-------------------------------------------------------------------------
304 301
305 'selectComponent': function(anEvent) { 302 'selectComponent': function(anEvent) {
306 this.setSelectedComponent(anEvent.src().value); 303 this.setSelectedComponent(anEvent.src().value);
307 this.nextButton().enable(); 304 this.nextButton().enable();
308 }, 305 },
309 306
310 'selectedComponent': function() { 307 'selectedComponent': function() {
311 return this._selectedComponent; 308 return this._selectedComponent;
312 }, 309 },
313 310
314 'setSelectedComponent': function(aValue) { 311 'setSelectedComponent': function(aValue) {
315 this._selectedComponent = aValue; 312 this._selectedComponent = aValue;
316 }, 313 },
317 314
318 //------------------------------------------------------------------------- 315 //-------------------------------------------------------------------------
319 316
320 'backAction': function() { 317 'backAction': function() {
321 }, 318 },
322 319
323 //------------------------------------------------------------------------- 320 //-------------------------------------------------------------------------
324 321
325 'nextAction': function() { 322 'nextAction': function() {
326 this.updateSelectedImportWizardComponent(this.selectedComponent()); 323 this.updateSelectedImportWizardComponent(this.selectedComponent());
327 }, 324 },
328 325
329 //------------------------------------------------------------------------- 326 //-------------------------------------------------------------------------
330 __syntaxFix__: "syntax fix" 327 __syntaxFix__: "syntax fix"
331}); 328});
332 329
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/PasswordPlusImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/PasswordPlusImportComponent.js
index f476ac2..24dc785 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/PasswordPlusImportComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/PasswordPlusImportComponent.js
@@ -1,315 +1,312 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } 29if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Components.Import.PasswordPlusImportComponent = function(anElement, args) { 33Clipperz.PM.Components.Import.PasswordPlusImportComponent = function(anElement, args) {
37 args = args || {}; 34 args = args || {};
38 35
39 Clipperz.PM.Components.Import.PasswordPlusImportComponent.superclass.constructor.call(this, anElement, args); 36 Clipperz.PM.Components.Import.PasswordPlusImportComponent.superclass.constructor.call(this, anElement, args);
40 37
41 this.render(); 38 this.render();
42 39
43 return this; 40 return this;
44} 41}
45 42
46//============================================================================= 43//=============================================================================
47 44
48YAHOO.extendX(Clipperz.PM.Components.Import.PasswordPlusImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { 45YAHOO.extendX(Clipperz.PM.Components.Import.PasswordPlusImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, {
49 46
50 'toString': function() { 47 'toString': function() {
51 return "Clipperz.PM.Components.Import.PasswordPlusImportComponent component"; 48 return "Clipperz.PM.Components.Import.PasswordPlusImportComponent component";
52 }, 49 },
53 50
54 //------------------------------------------------------------------------- 51 //-------------------------------------------------------------------------
55 52
56 'render': function() { 53 'render': function() {
57//MochiKit.Logging.logDebug(">>> Import.PasswordPlusImportComponent.render"); 54//MochiKit.Logging.logDebug(">>> Import.PasswordPlusImportComponent.render");
58 this.domHelper().append(this.element(), {tag:'div', cls:'passwordPlusImportWizard', children:[ 55 this.domHelper().append(this.element(), {tag:'div', cls:'passwordPlusImportWizard', children:[
59 {tag:'h3', htmlString:Clipperz.PM.Strings['PasswordPlus_ImportWizard_Title']}, 56 {tag:'h3', htmlString:Clipperz.PM.Strings['PasswordPlus_ImportWizard_Title']},
60 {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, 57 {tag:'div', cls:'importSteps', id:this.getId('importSteps')},
61 {tag:'div', cls:'importStepBlocks', children:[ 58 {tag:'div', cls:'importStepBlocks', children:[
62 {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ 59 {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[
63 {tag:'div', children:[ 60 {tag:'div', children:[
64 {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_passwordPlus_description']}, 61 {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_passwordPlus_description']},
65 {tag:'div', cls:'importOptionsParameters', children:[]}, 62 {tag:'div', cls:'importOptionsParameters', children:[]},
66 this.textAreaConfig() 63 this.textAreaConfig()
67 ]} 64 ]}
68 ]}, 65 ]},
69 {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ 66 {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[
70 {tag:'div', children:[ 67 {tag:'div', children:[
71 {tag:'div', id:this.getId('previewDiv'), html:"preview"} 68 {tag:'div', id:this.getId('previewDiv'), html:"preview"}
72 ]} 69 ]}
73 ]}, 70 ]},
74 {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[ 71 {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[
75 {tag:'div', children:[ 72 {tag:'div', children:[
76 {tag:'h4', html:"done"} 73 {tag:'h4', html:"done"}
77 ]} 74 ]}
78 ]} 75 ]}
79 ]}, 76 ]},
80 {tag:'div', cls:'importOptionsButtons', children:[ 77 {tag:'div', cls:'importOptionsButtons', children:[
81 {tag:'table', children:[ 78 {tag:'table', children:[
82 {tag:'tbody', children:[ 79 {tag:'tbody', children:[
83 {tag:'tr', children:[ 80 {tag:'tr', children:[
84 {tag:'td', html:'&nbsp;'}, 81 {tag:'td', html:'&nbsp;'},
85 {tag:'td', children:[ 82 {tag:'td', children:[
86 {tag:'div', id:this.getId('backActionButton')} 83 {tag:'div', id:this.getId('backActionButton')}
87 ]}, 84 ]},
88 {tag:'td', html:'&nbsp;'}, 85 {tag:'td', html:'&nbsp;'},
89 {tag:'td', children:[ 86 {tag:'td', children:[
90 {tag:'div', id:this.getId('nextActionButton')} 87 {tag:'div', id:this.getId('nextActionButton')}
91 ]}, 88 ]},
92 {tag:'td', html:'&nbsp;'} 89 {tag:'td', html:'&nbsp;'}
93 ]} 90 ]}
94 ]} 91 ]}
95 ]} 92 ]}
96 ]} 93 ]}
97 ]}); 94 ]});
98 95
99 this.updateSteps(); 96 this.updateSteps();
100 97
101 this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); 98 this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this}));
102 this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); 99 this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this}));
103 100
104 this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() 101 this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show()
105 this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 102 this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
106 this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 103 this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
107//MochiKit.Logging.logDebug("<<< Import.PasswordPlusImportComponent.render"); 104//MochiKit.Logging.logDebug("<<< Import.PasswordPlusImportComponent.render");
108 }, 105 },
109 106
110 //------------------------------------------------------------------------- 107 //-------------------------------------------------------------------------
111/* 108/*
112 'backAction': function() { 109 'backAction': function() {
113 switch (this.currentStep()) { 110 switch (this.currentStep()) {
114 case 1: //-> 0 111 case 1: //-> 0
115 this.backButton().disable(); 112 this.backButton().disable();
116 this.getElement('step_1').hide(); 113 this.getElement('step_1').hide();
117 this.setCurrentStep(0); 114 this.setCurrentStep(0);
118 this.getElement('step_0').show(); 115 this.getElement('step_0').show();
119 break; 116 break;
120 } 117 }
121 }, 118 },
122*/ 119*/
123 //------------------------------------------------------------------------- 120 //-------------------------------------------------------------------------
124 121
125 'nextAction': function() { 122 'nextAction': function() {
126 switch (this.currentStep()) { 123 switch (this.currentStep()) {
127 case 0: //-> 1 124 case 0: //-> 1
128 this.previewValues(); 125 this.previewValues();
129 break; 126 break;
130 case 1: //-> 2 127 case 1: //-> 2
131 this.importValues(); 128 this.importValues();
132 break; 129 break;
133 } 130 }
134 }, 131 },
135 132
136 //------------------------------------------------------------------------- 133 //-------------------------------------------------------------------------
137 134
138 'deferredPreviewValues': function() { 135 'deferredPreviewValues': function() {
139 var deferredResult; 136 var deferredResult;
140 137
141 // this.setFormValues(MochiKit.DOM.formContents(this.getDom('dataForm'))); 138 // this.setFormValues(MochiKit.DOM.formContents(this.getDom('dataForm')));
142 139
143 deferredResult = new MochiKit.Async.Deferred(); 140 deferredResult = new MochiKit.Async.Deferred();
144 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 141 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
145 this.startProcessing(); 142 this.startProcessing();
146 143
147 return res; 144 return res;
148 }, this)); 145 }, this));
149 deferredResult.addCallback(MochiKit.Base.method(this, 'processPasswordPlusValues')); 146 deferredResult.addCallback(MochiKit.Base.method(this, 'processPasswordPlusValues'));
150 deferredResult.addCallback(MochiKit.Base.method(this, 'setProcessedValues')); 147 deferredResult.addCallback(MochiKit.Base.method(this, 'setProcessedValues'));
151 deferredResult.addCallback(MochiKit.Base.method(this, 'previewRecordValues')); 148 deferredResult.addCallback(MochiKit.Base.method(this, 'previewRecordValues'));
152 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 149 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
153 this.processingDone(); 150 this.processingDone();
154 this.getElement('step_0').hide(); 151 this.getElement('step_0').hide();
155 this.getElement('step_1').show(); 152 this.getElement('step_1').show();
156 this.backButton().enable(); 153 this.backButton().enable();
157 154
158 return res; 155 return res;
159 }, this)); 156 }, this));
160 // deferredResult.addErrback(MochiKit.Base.bind(function() { 157 // deferredResult.addErrback(MochiKit.Base.bind(function() {
161 // this.processingAborted(); 158 // this.processingAborted();
162 // }, this)) 159 // }, this))
163 deferredResult.callback(this.textAreaContent()); 160 deferredResult.callback(this.textAreaContent());
164 161
165 return deferredResult; 162 return deferredResult;
166 }, 163 },
167 164
168 //------------------------------------------------------------------------- 165 //-------------------------------------------------------------------------
169 166
170 'processPasswordPlusValues': function(someData) { 167 'processPasswordPlusValues': function(someData) {
171 var deferredResult; 168 var deferredResult;
172 var csvProcessor; 169 var csvProcessor;
173 170
174 csvProcessor = new Clipperz.CSVProcessor({binary:true}); 171 csvProcessor = new Clipperz.CSVProcessor({binary:true});
175 172
176 deferredResult = new MochiKit.Async.Deferred(); 173 deferredResult = new MochiKit.Async.Deferred();
177 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'parseImportData'); 174 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'parseImportData');
178 deferredResult.addCallback(function(res) { 175 deferredResult.addCallback(function(res) {
179 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:(res.length * 2)}, res); 176 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:(res.length * 2)}, res);
180 }) 177 })
181 deferredResult.addCallback(MochiKit.Base.method(csvProcessor, 'deferredParse')); 178 deferredResult.addCallback(MochiKit.Base.method(csvProcessor, 'deferredParse'));
182 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'previewImportData'); 179 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'previewImportData');
183 deferredResult.addCallback(function(res) { 180 deferredResult.addCallback(function(res) {
184 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:(res.length * 2), step:res.length}, res); 181 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:(res.length * 2), step:res.length}, res);
185 }) 182 })
186 deferredResult.addCallback(MochiKit.Base.bind(function(someCSVValues) { 183 deferredResult.addCallback(MochiKit.Base.bind(function(someCSVValues) {
187 var innerDeferredResult; 184 var innerDeferredResult;
188 var records; 185 var records;
189 var i,c; 186 var i,c;
190 187
191 innerDeferredResult = new MochiKit.Async.Deferred(); 188 innerDeferredResult = new MochiKit.Async.Deferred();
192 records = []; 189 records = [];
193 190
194 c = someCSVValues.length; 191 c = someCSVValues.length;
195 i=0; 192 i=0;
196 i++; //Dataviz Passwords Plus Export, Version,1, Minimum Version To Read,1 193 i++; //Dataviz Passwords Plus Export, Version,1, Minimum Version To Read,1
197 i++; //Is Template,Title,Category,Field 1 Label,Field 1 Value,Field 1 Hidden,Field 2 Label,Field 2 Value,Field 2 Hidden,Field 3 Label,Field 3 Value,Field 3 Hidden,Field 4 Label,Field 4 Value,Field 4 Hidden,Field 5 Label,Field 5 Value,Field 5 Hidden,Field 6 Label,Field 6 Value,Field 6 Hidden,Field 7 Label,Field 7 Value,Field 7 Hidden,Field 8 Label,Field 8 Value,Field 8 Hidden,Field 9 Label,Field 9 Value,Field 9 Hidden,Field 10 Label,Field 10 Value,Field 10 Hidden,Note 194 i++; //Is Template,Title,Category,Field 1 Label,Field 1 Value,Field 1 Hidden,Field 2 Label,Field 2 Value,Field 2 Hidden,Field 3 Label,Field 3 Value,Field 3 Hidden,Field 4 Label,Field 4 Value,Field 4 Hidden,Field 5 Label,Field 5 Value,Field 5 Hidden,Field 6 Label,Field 6 Value,Field 6 Hidden,Field 7 Label,Field 7 Value,Field 7 Hidden,Field 8 Label,Field 8 Value,Field 8 Hidden,Field 9 Label,Field 9 Value,Field 9 Hidden,Field 10 Label,Field 10 Value,Field 10 Hidden,Note
198 195
199 for( ; i<c; i++) { 196 for( ; i<c; i++) {
200 innerDeferredResult.addCallback(MochiKit.Async.wait, 0.2); 197 innerDeferredResult.addCallback(MochiKit.Async.wait, 0.2);
201 innerDeferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {}); 198 innerDeferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {});
202 innerDeferredResult.addCallback(MochiKit.Base.bind(function(someRecords, someData) { 199 innerDeferredResult.addCallback(MochiKit.Base.bind(function(someRecords, someData) {
203 if (someData[0] == '0') { 200 if (someData[0] == '0') {
204 var record; 201 var record;
205 var recordVersion; 202 var recordVersion;
206 var ii, cc; 203 var ii, cc;
207 204
208 record = new Clipperz.PM.DataModel.Record({user:this.user()}); 205 record = new Clipperz.PM.DataModel.Record({user:this.user()});
209 if (someData[1] != "") { 206 if (someData[1] != "") {
210 record.setLabel(someData[1]); 207 record.setLabel(someData[1]);
211 } else { 208 } else {
212 record.setLabel("imported record [" + (i+1) + "]"); 209 record.setLabel("imported record [" + (i+1) + "]");
213 } 210 }
214 record.setNotes(someData[33]); 211 record.setNotes(someData[33]);
215 recordVersion = record.currentVersion() 212 recordVersion = record.currentVersion()
216 213
217 cc = 10; 214 cc = 10;
218 for (ii=0; ii<cc; ii++) { 215 for (ii=0; ii<cc; ii++) {
219 var currentFieldValueIndex; 216 var currentFieldValueIndex;
220 var currentType; 217 var currentType;
221 218
222 currentFieldValueIndex = (ii * 3) + 4; 219 currentFieldValueIndex = (ii * 3) + 4;
223 220
224 if (someData[currentFieldValueIndex] != "") { 221 if (someData[currentFieldValueIndex] != "") {
225 var recordField; 222 var recordField;
226 var recordFieldType; 223 var recordFieldType;
227 224
228 recordFieldType = 'TXT'; 225 recordFieldType = 'TXT';
229 if (someData[currentFieldValueIndex + 1] == 1) { 226 if (someData[currentFieldValueIndex + 1] == 1) {
230 recordFieldType = 'PWD'; 227 recordFieldType = 'PWD';
231 } else if (/^http/.test(someData[currentFieldValueIndex])) { 228 } else if (/^http/.test(someData[currentFieldValueIndex])) {
232 recordFieldType = 'URL'; 229 recordFieldType = 'URL';
233 } 230 }
234 231
235 recordField = new Clipperz.PM.DataModel.RecordField({ 232 recordField = new Clipperz.PM.DataModel.RecordField({
236 recordVersion:recordVersion, 233 recordVersion:recordVersion,
237 label: someData[currentFieldValueIndex - 1], 234 label: someData[currentFieldValueIndex - 1],
238 value: someData[currentFieldValueIndex], 235 value: someData[currentFieldValueIndex],
239 type: recordFieldType 236 type: recordFieldType
240 }); 237 });
241 recordVersion.addField(recordField); 238 recordVersion.addField(recordField);
242 } 239 }
243 } 240 }
244 241
245 // this.user().addRecord(record, true); 242 // this.user().addRecord(record, true);
246 243
247 someRecords.push(record); 244 someRecords.push(record);
248 } 245 }
249 246
250 return someRecords; 247 return someRecords;
251 }, this), records, someCSVValues[i]); 248 }, this), records, someCSVValues[i]);
252 } 249 }
253 innerDeferredResult.addCallback(MochiKit.Async.succeed, records); 250 innerDeferredResult.addCallback(MochiKit.Async.succeed, records);
254 innerDeferredResult.callback(); 251 innerDeferredResult.callback();
255 252
256 return innerDeferredResult; 253 return innerDeferredResult;
257 }, this)); 254 }, this));
258 deferredResult.callback(someData); 255 deferredResult.callback(someData);
259 256
260 return deferredResult; 257 return deferredResult;
261 258
262/* 259/*
263 0Is Template 260 0Is Template
264 1Title 261 1Title
265 2Category 262 2Category
266 263
267 3Field 1 Label 264 3Field 1 Label
268 4Field 1 Value 265 4Field 1 Value
269 5Field 1 Hidden 266 5Field 1 Hidden
270 267
271 6Field 2 Label 268 6Field 2 Label
272 7Field 2 Value 269 7Field 2 Value
273 8Field 2 Hidden 270 8Field 2 Hidden
274 271
275 9Field 3 Label 272 9Field 3 Label
276 10Field 3 Value 273 10Field 3 Value
277 11Field 3 Hidden 274 11Field 3 Hidden
278 275
279 12Field 4 Label 276 12Field 4 Label
280 13Field 4 Value 277 13Field 4 Value
281 14Field 4 Hidden 278 14Field 4 Hidden
282 279
283 15Field 5 Label 280 15Field 5 Label
284 16Field 5 Value 281 16Field 5 Value
285 17Field 5 Hidden 282 17Field 5 Hidden
286 283
287 18Field 6 Label 284 18Field 6 Label
288 19Field 6 Value 285 19Field 6 Value
289 20Field 6 Hidden 286 20Field 6 Hidden
290 287
291 21Field 7 Label 288 21Field 7 Label
292 22Field 7 Value 289 22Field 7 Value
293 23Field 7 Hidden 290 23Field 7 Hidden
294 291
295 24Field 8 Label 292 24Field 8 Label
296 25Field 8 Value 293 25Field 8 Value
297 26Field 8 Hidden 294 26Field 8 Hidden
298 295
299 27Field 9 Label 296 27Field 9 Label
300 28Field 9 Value 297 28Field 9 Value
301 29Field 9 Hidden 298 29Field 9 Hidden
302 299
303 30Field 10 Label 300 30Field 10 Label
304 31Field 10 Value 301 31Field 10 Value
305 32Field 10 Hidden 302 32Field 10 Hidden
306 303
307 33Note 304 33Note
308*/ 305*/
309 }, 306 },
310 307
311 308
312 //------------------------------------------------------------------------- 309 //-------------------------------------------------------------------------
313 __syntaxFix__: "syntax fix" 310 __syntaxFix__: "syntax fix"
314}); 311});
315 312
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/RoboFormImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/RoboFormImportComponent.js
index d35bdc6..fe4d45c 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/RoboFormImportComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/RoboFormImportComponent.js
@@ -1,392 +1,389 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } 29if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Components.Import.RoboFormImportComponent = function(anElement, args) { 33Clipperz.PM.Components.Import.RoboFormImportComponent = function(anElement, args) {
37 args = args || {}; 34 args = args || {};
38 35
39 Clipperz.PM.Components.Import.RoboFormImportComponent.superclass.constructor.call(this, anElement, args); 36 Clipperz.PM.Components.Import.RoboFormImportComponent.superclass.constructor.call(this, anElement, args);
40 37
41 this.render(); 38 this.render();
42 39
43 return this; 40 return this;
44} 41}
45 42
46//============================================================================= 43//=============================================================================
47 44
48YAHOO.extendX(Clipperz.PM.Components.Import.RoboFormImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { 45YAHOO.extendX(Clipperz.PM.Components.Import.RoboFormImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, {
49 46
50 'toString': function() { 47 'toString': function() {
51 return "Clipperz.PM.Components.Import.RoboFormImportComponent component"; 48 return "Clipperz.PM.Components.Import.RoboFormImportComponent component";
52 }, 49 },
53 50
54 //------------------------------------------------------------------------- 51 //-------------------------------------------------------------------------
55 52
56 'render': function() { 53 'render': function() {
57//MochiKit.Logging.logDebug(">>> Import.RoboFormImportComponent.render"); 54//MochiKit.Logging.logDebug(">>> Import.RoboFormImportComponent.render");
58 this.domHelper().append(this.element(), {tag:'div', cls:'roboFormImportWizard', children:[ 55 this.domHelper().append(this.element(), {tag:'div', cls:'roboFormImportWizard', children:[
59 {tag:'h3', htmlString:Clipperz.PM.Strings['RoboForm_ImportWizard_Title']}, 56 {tag:'h3', htmlString:Clipperz.PM.Strings['RoboForm_ImportWizard_Title']},
60 {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, 57 {tag:'div', cls:'importSteps', id:this.getId('importSteps')},
61 {tag:'div', cls:'importStepBlocks', children:[ 58 {tag:'div', cls:'importStepBlocks', children:[
62 {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ 59 {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[
63 {tag:'div', children:[ 60 {tag:'div', children:[
64 {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_roboForm_description']}, 61 {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_roboForm_description']},
65 {tag:'div', cls:'importOptionsParameters', children:[]}, 62 {tag:'div', cls:'importOptionsParameters', children:[]},
66 this.textAreaConfig() 63 this.textAreaConfig()
67 ]} 64 ]}
68 ]}, 65 ]},
69 {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ 66 {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[
70 {tag:'div', children:[ 67 {tag:'div', children:[
71 {tag:'div', id:this.getId('previewDiv'), html:"preview"} 68 {tag:'div', id:this.getId('previewDiv'), html:"preview"}
72 ]} 69 ]}
73 ]}, 70 ]},
74 {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[ 71 {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[
75 {tag:'div', children:[ 72 {tag:'div', children:[
76 {tag:'h4', html:"done"} 73 {tag:'h4', html:"done"}
77 ]} 74 ]}
78 ]} 75 ]}
79 ]}, 76 ]},
80 {tag:'div', cls:'importOptionsButtons', children:[ 77 {tag:'div', cls:'importOptionsButtons', children:[
81 {tag:'table', children:[ 78 {tag:'table', children:[
82 {tag:'tbody', children:[ 79 {tag:'tbody', children:[
83 {tag:'tr', children:[ 80 {tag:'tr', children:[
84 {tag:'td', html:'&nbsp;'}, 81 {tag:'td', html:'&nbsp;'},
85 {tag:'td', children:[ 82 {tag:'td', children:[
86 {tag:'div', id:this.getId('backActionButton')} 83 {tag:'div', id:this.getId('backActionButton')}
87 ]}, 84 ]},
88 {tag:'td', html:'&nbsp;'}, 85 {tag:'td', html:'&nbsp;'},
89 {tag:'td', children:[ 86 {tag:'td', children:[
90 {tag:'div', id:this.getId('nextActionButton')} 87 {tag:'div', id:this.getId('nextActionButton')}
91 ]}, 88 ]},
92 {tag:'td', html:'&nbsp;'} 89 {tag:'td', html:'&nbsp;'}
93 ]} 90 ]}
94 ]} 91 ]}
95 ]} 92 ]}
96 ]} 93 ]}
97 ]}); 94 ]});
98 95
99 this.updateSteps(); 96 this.updateSteps();
100 97
101 this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); 98 this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this}));
102 this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); 99 this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this}));
103 100
104 this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() 101 this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show()
105 this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 102 this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
106 this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 103 this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
107//MochiKit.Logging.logDebug("<<< Import.RoboFormImportComponent.render"); 104//MochiKit.Logging.logDebug("<<< Import.RoboFormImportComponent.render");
108 }, 105 },
109 106
110 //------------------------------------------------------------------------- 107 //-------------------------------------------------------------------------
111 108
112 'nextAction': function() { 109 'nextAction': function() {
113 switch (this.currentStep()) { 110 switch (this.currentStep()) {
114 case 0: //-> 1 111 case 0: //-> 1
115 this.previewValues(); 112 this.previewValues();
116 break; 113 break;
117 case 1: //-> 2 114 case 1: //-> 2
118 this.importValues(); 115 this.importValues();
119 break; 116 break;
120 } 117 }
121 }, 118 },
122 119
123 //------------------------------------------------------------------------- 120 //-------------------------------------------------------------------------
124 121
125 'deferredPreviewValues': function() { 122 'deferredPreviewValues': function() {
126 var deferredResult; 123 var deferredResult;
127 124
128 // this.setFormValues(MochiKit.DOM.formContents(this.getDom('dataForm'))); 125 // this.setFormValues(MochiKit.DOM.formContents(this.getDom('dataForm')));
129 126
130 deferredResult = new MochiKit.Async.Deferred(); 127 deferredResult = new MochiKit.Async.Deferred();
131 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 128 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
132 this.startProcessing(); 129 this.startProcessing();
133 130
134 return res; 131 return res;
135 }, this)); 132 }, this));
136 deferredResult.addCallback(MochiKit.Base.method(this, 'processRoboFormValues')); 133 deferredResult.addCallback(MochiKit.Base.method(this, 'processRoboFormValues'));
137 deferredResult.addCallback(MochiKit.Base.method(this, 'setProcessedValues')); 134 deferredResult.addCallback(MochiKit.Base.method(this, 'setProcessedValues'));
138 deferredResult.addCallback(MochiKit.Base.method(this, 'previewRecordValues')); 135 deferredResult.addCallback(MochiKit.Base.method(this, 'previewRecordValues'));
139 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 136 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
140 this.processingDone(); 137 this.processingDone();
141 this.getElement('step_0').hide(); 138 this.getElement('step_0').hide();
142 this.getElement('step_1').show(); 139 this.getElement('step_1').show();
143 this.backButton().enable(); 140 this.backButton().enable();
144 141
145 return res; 142 return res;
146 }, this)); 143 }, this));
147 // deferredResult.addErrback(MochiKit.Base.bind(function() { 144 // deferredResult.addErrback(MochiKit.Base.bind(function() {
148 // this.processingAborted(); 145 // this.processingAborted();
149 // }, this)) 146 // }, this))
150 deferredResult.callback(this.textAreaContent()); 147 deferredResult.callback(this.textAreaContent());
151 148
152 return deferredResult; 149 return deferredResult;
153 }, 150 },
154 151
155 //------------------------------------------------------------------------- 152 //-------------------------------------------------------------------------
156 153
157 'processRoboFormValues': function(someData) { 154 'processRoboFormValues': function(someData) {
158 var result; 155 var result;
159 156
160 if (someData.match(/^\<HTML\>\<HEAD\>\<TITLE\>RoboForm Passcards List /g)) { 157 if (someData.match(/^\<HTML\>\<HEAD\>\<TITLE\>RoboForm Passcards List /g)) {
161 result = this.processRoboFormPasscardsValues(someData); 158 result = this.processRoboFormPasscardsValues(someData);
162 } else if (someData.match(/\<HTML\>\<HEAD\>\<TITLE\>RoboForm Safenotes List /g)) { 159 } else if (someData.match(/\<HTML\>\<HEAD\>\<TITLE\>RoboForm Safenotes List /g)) {
163 result = this.processRoboFormSafenotesValues(someData); 160 result = this.processRoboFormSafenotesValues(someData);
164 } 161 }
165 162
166 return result; 163 return result;
167 }, 164 },
168 165
169 //......................................................................... 166 //.........................................................................
170 167
171 'processRoboFormPasscardsValues': function(someData) { 168 'processRoboFormPasscardsValues': function(someData) {
172 var deferredResult; 169 var deferredResult;
173 170
174 deferredResult = new MochiKit.Async.Deferred(); 171 deferredResult = new MochiKit.Async.Deferred();
175//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 1: "/* + res*/); return res;}); 172//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 1: "/* + res*/); return res;});
176 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'parseImportData'); 173 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'parseImportData');
177//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 2: "/* + res*/); return res;}); 174//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 2: "/* + res*/); return res;});
178 deferredResult.addCallback(function(someData) { 175 deferredResult.addCallback(function(someData) {
179 var result; 176 var result;
180 var data; 177 var data;
181 178
182 data = someData.replace(/\r?\n/g, ""); 179 data = someData.replace(/\r?\n/g, "");
183 result = data.match(/\<TABLE width\=\"100\%\"\>.*?\<\/TABLE\>/g); 180 result = data.match(/\<TABLE width\=\"100\%\"\>.*?\<\/TABLE\>/g);
184 181
185 return result; 182 return result;
186 }); 183 });
187//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 3: "/* + res*/); return res;}); 184//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 3: "/* + res*/); return res;});
188//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 3.1: " + res.length); return res;}); 185//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 3.1: " + res.length); return res;});
189 deferredResult.addCallback(function(res) { 186 deferredResult.addCallback(function(res) {
190 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:(res.length)}, res); 187 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:(res.length)}, res);
191 }) 188 })
192//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 4: "/* + res*/); return res;}); 189//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 4: "/* + res*/); return res;});
193 deferredResult.addCallback(MochiKit.Base.bind(function(someRecordValues) { 190 deferredResult.addCallback(MochiKit.Base.bind(function(someRecordValues) {
194 var innerDeferredResult; 191 var innerDeferredResult;
195 var records; 192 var records;
196 var i,c; 193 var i,c;
197 194
198 innerDeferredResult = new MochiKit.Async.Deferred(); 195 innerDeferredResult = new MochiKit.Async.Deferred();
199 records = []; 196 records = [];
200 197
201 c = someRecordValues.length; 198 c = someRecordValues.length;
202 for(i=0; i<c; i++) { 199 for(i=0; i<c; i++) {
203//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 1: " + res); return res;}); 200//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 1: " + res); return res;});
204 innerDeferredResult.addCallback(MochiKit.Async.wait, 0.2); 201 innerDeferredResult.addCallback(MochiKit.Async.wait, 0.2);
205//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 2: " + res); return res;}); 202//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 2: " + res); return res;});
206 innerDeferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {}); 203 innerDeferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {});
207//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 3: " + res); return res;}); 204//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 3: " + res); return res;});
208 innerDeferredResult.addCallback(MochiKit.Base.bind(function(someRecords, someData) { 205 innerDeferredResult.addCallback(MochiKit.Base.bind(function(someRecords, someData) {
209 var data; 206 var data;
210 var record; 207 var record;
211 var recordVersion; 208 var recordVersion;
212 var fields; 209 var fields;
213 var ii, cc; 210 var ii, cc;
214 var hasNotes; 211 var hasNotes;
215 212
216 var caption; 213 var caption;
217 var subcaption; 214 var subcaption;
218 215
219//MochiKit.Logging.logDebug("data: " + someData); 216//MochiKit.Logging.logDebug("data: " + someData);
220 data = someData.replace(/\<WBR\>/g, ""); 217 data = someData.replace(/\<WBR\>/g, "");
221 hasNotes = false; 218 hasNotes = false;
222 219
223 /\<TD class\=caption colSpan\=3\>(.*?)\<\/TD\>/.test(data); //<TD class=caption colSpan=3>110mb</TD> 220 /\<TD class\=caption colSpan\=3\>(.*?)\<\/TD\>/.test(data); //<TD class=caption colSpan=3>110mb</TD>
224 caption = RegExp.$1; 221 caption = RegExp.$1;
225//MochiKit.Logging.logDebug("caption: " + caption); 222//MochiKit.Logging.logDebug("caption: " + caption);
226 223
227 /\<TD class\=subcaption colSpan\=3\>(.*?)\<\/TD\>/.test(data); //<TD class=subcaption colSpan=3>110<WBR>mb.com</TD> 224 /\<TD class\=subcaption colSpan\=3\>(.*?)\<\/TD\>/.test(data); //<TD class=subcaption colSpan=3>110<WBR>mb.com</TD>
228 subcaption = RegExp.$1; 225 subcaption = RegExp.$1;
229//MochiKit.Logging.logDebug("subcaption: " + subcaption); 226//MochiKit.Logging.logDebug("subcaption: " + subcaption);
230 227
231 record = new Clipperz.PM.DataModel.Record({user:this.user()}); 228 record = new Clipperz.PM.DataModel.Record({user:this.user()});
232 recordVersion = record.currentVersion() 229 recordVersion = record.currentVersion()
233 230
234 record.setLabel(caption); 231 record.setLabel(caption);
235 // record.setNotes(subcaption); 232 // record.setNotes(subcaption);
236 if (subcaption != null) { 233 if (subcaption != null) {
237 var recordField; 234 var recordField;
238 235
239 recordField = new Clipperz.PM.DataModel.RecordField({ 236 recordField = new Clipperz.PM.DataModel.RecordField({
240 recordVersion:recordVersion, 237 recordVersion:recordVersion,
241 label: "url", 238 label: "url",
242 value: subcaption, 239 value: subcaption,
243 type: 'URL' 240 type: 'URL'
244 }); 241 });
245 recordVersion.addField(recordField); 242 recordVersion.addField(recordField);
246 } 243 }
247 244
248 fields = data.match(/\<TR\>.*?\<\/TR\>/g) || []; 245 fields = data.match(/\<TR\>.*?\<\/TR\>/g) || [];
249 cc = fields.length; 246 cc = fields.length;
250//MochiKit.Logging.logDebug("fields.length: " + cc); 247//MochiKit.Logging.logDebug("fields.length: " + cc);
251 for (ii=0; ii<cc; ii++) { 248 for (ii=0; ii<cc; ii++) {
252 var recordField; 249 var recordField;
253 var fieldString; 250 var fieldString;
254 var fieldName; 251 var fieldName;
255 var fieldValue; 252 var fieldValue;
256 253
257//MochiKit.Logging.logDebug("fieldString: " + fields[ii]); 254//MochiKit.Logging.logDebug("fieldString: " + fields[ii]);
258 fieldString = fields[ii]; 255 fieldString = fields[ii];
259//MochiKit.Logging.logDebug("fieldString (cleaned): " + fieldString); 256//MochiKit.Logging.logDebug("fieldString (cleaned): " + fieldString);
260 /\<TD class\=field vAlign\=top align\=left width\=\"40\%\"\>(.*?)\<\/TD\>/.test(fieldString); 257 /\<TD class\=field vAlign\=top align\=left width\=\"40\%\"\>(.*?)\<\/TD\>/.test(fieldString);
261 fieldName = RegExp.$1; 258 fieldName = RegExp.$1;
262 259
263 /\<TD class\=wordbreakfield vAlign\=top align\=left width\=\"55\%\"\>(.*?)\<\/TD\>/.test(fieldString); 260 /\<TD class\=wordbreakfield vAlign\=top align\=left width\=\"55\%\"\>(.*?)\<\/TD\>/.test(fieldString);
264 fieldValue = RegExp.$1; 261 fieldValue = RegExp.$1;
265 262
266 if (fieldName == "Note$") { 263 if (fieldName == "Note$") {
267 record.setNotes(fieldValue); 264 record.setNotes(fieldValue);
268 hasNotes = true; 265 hasNotes = true;
269 } else { 266 } else {
270 var fieldType; 267 var fieldType;
271 268
272 if (((ii == 1) && (hasNotes == false)) || ((ii == 2) && (hasNotes == true))) { 269 if (((ii == 1) && (hasNotes == false)) || ((ii == 2) && (hasNotes == true))) {
273 fieldType = 'PWD'; 270 fieldType = 'PWD';
274 } else { 271 } else {
275 fieldType = 'TXT'; 272 fieldType = 'TXT';
276 } 273 }
277 274
278 recordField = new Clipperz.PM.DataModel.RecordField({ 275 recordField = new Clipperz.PM.DataModel.RecordField({
279 recordVersion:recordVersion, 276 recordVersion:recordVersion,
280 label: fieldName, 277 label: fieldName,
281 value: fieldValue, 278 value: fieldValue,
282 type: fieldType 279 type: fieldType
283 }); 280 });
284 recordVersion.addField(recordField); 281 recordVersion.addField(recordField);
285 } 282 }
286 } 283 }
287 284
288 someRecords.push(record); 285 someRecords.push(record);
289 286
290 return someRecords; 287 return someRecords;
291 }, this), records, someRecordValues[i]); 288 }, this), records, someRecordValues[i]);
292 } 289 }
293//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 4: " + res); return res;}); 290//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 4: " + res); return res;});
294 innerDeferredResult.addCallback(MochiKit.Async.succeed, records); 291 innerDeferredResult.addCallback(MochiKit.Async.succeed, records);
295//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 5: " + res); return res;}); 292//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 5: " + res); return res;});
296 innerDeferredResult.callback(); 293 innerDeferredResult.callback();
297 294
298 return innerDeferredResult; 295 return innerDeferredResult;
299 }, this)); 296 }, this));
300 deferredResult.callback(someData); 297 deferredResult.callback(someData);
301 298
302 return deferredResult; 299 return deferredResult;
303 }, 300 },
304 301
305 302
306 //......................................................................... 303 //.........................................................................
307 304
308 'processRoboFormSafenotesValues': function(someData) { 305 'processRoboFormSafenotesValues': function(someData) {
309 var deferredResult; 306 var deferredResult;
310 307
311 deferredResult = new MochiKit.Async.Deferred(); 308 deferredResult = new MochiKit.Async.Deferred();
312//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 1: "/* + res*/); return res;}); 309//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 1: "/* + res*/); return res;});
313 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'parseImportData'); 310 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'parseImportData');
314//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 2: "/* + res*/); return res;}); 311//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 2: "/* + res*/); return res;});
315 deferredResult.addCallback(function(someData) { 312 deferredResult.addCallback(function(someData) {
316 var result; 313 var result;
317 var data; 314 var data;
318 315
319 data = someData.replace(/\r?\n/g, ""); 316 data = someData.replace(/\r?\n/g, "");
320 result = data.match(/\<TABLE width\=\"100\%\"\>.*?\<\/TABLE\>/g); 317 result = data.match(/\<TABLE width\=\"100\%\"\>.*?\<\/TABLE\>/g);
321 318
322 return result; 319 return result;
323 }); 320 });
324//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 3: "/* + res*/); return res;}); 321//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 3: "/* + res*/); return res;});
325//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 3.1: " + res.length); return res;}); 322//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 3.1: " + res.length); return res;});
326 deferredResult.addCallback(function(res) { 323 deferredResult.addCallback(function(res) {
327 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:(res.length)}, res); 324 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:(res.length)}, res);
328 }) 325 })
329//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 4: "/* + res*/); return res;}); 326//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 4: "/* + res*/); return res;});
330 deferredResult.addCallback(MochiKit.Base.bind(function(someRecordValues) { 327 deferredResult.addCallback(MochiKit.Base.bind(function(someRecordValues) {
331 var innerDeferredResult; 328 var innerDeferredResult;
332 var records; 329 var records;
333 var i,c; 330 var i,c;
334 331
335 innerDeferredResult = new MochiKit.Async.Deferred(); 332 innerDeferredResult = new MochiKit.Async.Deferred();
336 records = []; 333 records = [];
337 334
338 c = someRecordValues.length; 335 c = someRecordValues.length;
339 for(i=0; i<c; i++) { 336 for(i=0; i<c; i++) {
340//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 1: " + res); return res;}); 337//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 1: " + res); return res;});
341 innerDeferredResult.addCallback(MochiKit.Async.wait, 0.2); 338 innerDeferredResult.addCallback(MochiKit.Async.wait, 0.2);
342//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 2: " + res); return res;}); 339//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 2: " + res); return res;});
343 innerDeferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {}); 340 innerDeferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {});
344//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 3: " + res); return res;}); 341//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 3: " + res); return res;});
345 innerDeferredResult.addCallback(MochiKit.Base.bind(function(someRecords, someData) { 342 innerDeferredResult.addCallback(MochiKit.Base.bind(function(someRecords, someData) {
346 var data; 343 var data;
347 var record; 344 var record;
348 var recordVersion; 345 var recordVersion;
349 346
350 var caption; 347 var caption;
351 var wordbreakfield; 348 var wordbreakfield;
352 349
353//MochiKit.Logging.logDebug("data: " + someData); 350//MochiKit.Logging.logDebug("data: " + someData);
354 data = someData.replace(/\<WBR\>/g, ""); 351 data = someData.replace(/\<WBR\>/g, "");
355 hasNotes = false; 352 hasNotes = false;
356 353
357 /\<TD class\=caption colSpan\=3\>(.*?)\<\/TD\>/.test(data); //<TD class=caption colSpan=3>110mb</TD> 354 /\<TD class\=caption colSpan\=3\>(.*?)\<\/TD\>/.test(data); //<TD class=caption colSpan=3>110mb</TD>
358 caption = RegExp.$1; 355 caption = RegExp.$1;
359//MochiKit.Logging.logDebug("caption: " + caption); 356//MochiKit.Logging.logDebug("caption: " + caption);
360 357
361 /\<TD class\=wordbreakfield vAlign=top align\=left width\=\"\1\0\0\%\"\>(.*?)\<\/TD\>/.test(data); //<TD class=wordbreakfield vAlign=top align=left width="100%">7759500</TD> 358 /\<TD class\=wordbreakfield vAlign=top align\=left width\=\"\1\0\0\%\"\>(.*?)\<\/TD\>/.test(data); //<TD class=wordbreakfield vAlign=top align=left width="100%">7759500</TD>
362 wordbreakfield = RegExp.$1; 359 wordbreakfield = RegExp.$1;
363//MochiKit.Logging.logDebug("subcaption: " + subcaption); 360//MochiKit.Logging.logDebug("subcaption: " + subcaption);
364 361
365 record = new Clipperz.PM.DataModel.Record({user:this.user()}); 362 record = new Clipperz.PM.DataModel.Record({user:this.user()});
366 recordVersion = record.currentVersion() 363 recordVersion = record.currentVersion()
367 364
368 record.setLabel(caption); 365 record.setLabel(caption);
369 record.setNotes(wordbreakfield); 366 record.setNotes(wordbreakfield);
370 367
371 someRecords.push(record); 368 someRecords.push(record);
372 369
373 return someRecords; 370 return someRecords;
374 }, this), records, someRecordValues[i]); 371 }, this), records, someRecordValues[i]);
375 } 372 }
376//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 4: " + res); return res;}); 373//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 4: " + res); return res;});
377 innerDeferredResult.addCallback(MochiKit.Async.succeed, records); 374 innerDeferredResult.addCallback(MochiKit.Async.succeed, records);
378//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 5: " + res); return res;}); 375//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 5: " + res); return res;});
379 innerDeferredResult.callback(); 376 innerDeferredResult.callback();
380 377
381 return innerDeferredResult; 378 return innerDeferredResult;
382 }, this)); 379 }, this));
383 deferredResult.callback(someData); 380 deferredResult.callback(someData);
384 381
385 return deferredResult; 382 return deferredResult;
386 }, 383 },
387 384
388 385
389 //------------------------------------------------------------------------- 386 //-------------------------------------------------------------------------
390 __syntaxFix__: "syntax fix" 387 __syntaxFix__: "syntax fix"
391}); 388});
392 389
diff --git a/frontend/beta/js/Clipperz/PM/Components/MessageBox.js b/frontend/beta/js/Clipperz/PM/Components/MessageBox.js
index d2bc09a..cf9ec86 100644
--- a/frontend/beta/js/Clipperz/PM/Components/MessageBox.js
+++ b/frontend/beta/js/Clipperz/PM/Components/MessageBox.js
@@ -1,224 +1,221 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32 29
33 30
34 31
35Clipperz.PM.Components.MessageBoxImplementation = function() { 32Clipperz.PM.Components.MessageBoxImplementation = function() {
36 this._step = 0; 33 this._step = 0;
37 this._steps = 0; 34 this._steps = 0;
38 35
39 return this; 36 return this;
40}; 37};
41 38
42//YAHOO.extendX(Clipperz.PM.Components.MessageBoxImplementation, Clipperz.PM.Components.BaseComponent, { 39//YAHOO.extendX(Clipperz.PM.Components.MessageBoxImplementation, Clipperz.PM.Components.BaseComponent, {
43Clipperz.PM.Components.MessageBoxImplementation.prototype = MochiKit.Base.update(null, { 40Clipperz.PM.Components.MessageBoxImplementation.prototype = MochiKit.Base.update(null, {
44 41
45 'toString': function() { 42 'toString': function() {
46 return "Clipperz.PM.Components.MessageBox"; 43 return "Clipperz.PM.Components.MessageBox";
47 }, 44 },
48 45
49 //----------------------------------------------------- 46 //-----------------------------------------------------
50 47
51 'step': function() { 48 'step': function() {
52 return this._step; 49 return this._step;
53 }, 50 },
54 51
55 'setStep': function(aValue) { 52 'setStep': function(aValue) {
56 if (aValue == 'next') { 53 if (aValue == 'next') {
57 this._step = this._step + 1; 54 this._step = this._step + 1;
58 } else { 55 } else {
59 this._step = aValue; 56 this._step = aValue;
60 } 57 }
61 58
62 if (this._step > this.steps()) { 59 if (this._step > this.steps()) {
63//MochiKit.Logging.logDebug("overstepping: " + this._step + " (" + this.steps() + ")"); 60//MochiKit.Logging.logDebug("overstepping: " + this._step + " (" + this.steps() + ")");
64 this._step = this.steps(); 61 this._step = this.steps();
65 } 62 }
66 }, 63 },
67 64
68 //----------------------------------------------------- 65 //-----------------------------------------------------
69 66
70 'steps': function() { 67 'steps': function() {
71 return this._steps; 68 return this._steps;
72 }, 69 },
73 70
74 'setSteps': function(aValue) { 71 'setSteps': function(aValue) {
75 if (aValue.constructor == String) { 72 if (aValue.constructor == String) {
76 if (aValue.charAt(0) == '+') { 73 if (aValue.charAt(0) == '+') {
77 this._steps += aValue.substring(1)*1; 74 this._steps += aValue.substring(1)*1;
78 } else if (aValue.charAt(0) == '-') { 75 } else if (aValue.charAt(0) == '-') {
79 this._steps -= aValue.substring(1)*1; 76 this._steps -= aValue.substring(1)*1;
80 } else { 77 } else {
81 this._steps = aValue.substring(1)*1; 78 this._steps = aValue.substring(1)*1;
82 } 79 }
83 } else { 80 } else {
84 this._steps = aValue; 81 this._steps = aValue;
85 } 82 }
86 }, 83 },
87 84
88 //----------------------------------------------------- 85 //-----------------------------------------------------
89 86
90 'deferredShow': function(aConfiguration, anAnimationTargetElement, aValue) { 87 'deferredShow': function(aConfiguration, anAnimationTargetElement, aValue) {
91 this.show(aConfiguration, anAnimationTargetElement); 88 this.show(aConfiguration, anAnimationTargetElement);
92 89
93 return aValue; 90 return aValue;
94 }, 91 },
95 92
96 'show': function(aConfiguration, anAnimationTargetElement) { 93 'show': function(aConfiguration, anAnimationTargetElement) {
97 varmessageBoxConfiguration; 94 varmessageBoxConfiguration;
98 95
99 messageBoxConfiguration = MochiKit.Base.clone(aConfiguration); 96 messageBoxConfiguration = MochiKit.Base.clone(aConfiguration);
100 messageBoxConfiguration.msg = messageBoxConfiguration.text; 97 messageBoxConfiguration.msg = messageBoxConfiguration.text;
101 messageBoxConfiguration.animEl = anAnimationTargetElement; 98 messageBoxConfiguration.animEl = anAnimationTargetElement;
102 messageBoxConfiguration.progress = messageBoxConfiguration.showProgressBar; 99 messageBoxConfiguration.progress = messageBoxConfiguration.showProgressBar;
103 messageBoxConfiguration.closable = messageBoxConfiguration.showCloseButton; 100 messageBoxConfiguration.closable = messageBoxConfiguration.showCloseButton;
104 this.setSteps(aConfiguration.steps || 0); 101 this.setSteps(aConfiguration.steps || 0);
105 this.setStep(aConfiguration.step || 0); 102 this.setStep(aConfiguration.step || 0);
106 delete messageBoxConfiguration.buttons; 103 delete messageBoxConfiguration.buttons;
107 104
108 Clipperz.YUI.MessageBox.show(messageBoxConfiguration); 105 Clipperz.YUI.MessageBox.show(messageBoxConfiguration);
109 }, 106 },
110 107
111 //----------------------------------------------------- 108 //-----------------------------------------------------
112 109
113 'update': function(someValues) { 110 'update': function(someValues) {
114//MochiKit.Logging.logDebug(">>> MessageBox.update"); 111//MochiKit.Logging.logDebug(">>> MessageBox.update");
115 if (someValues.title) { 112 if (someValues.title) {
116 Clipperz.YUI.MessageBox.getDialog().setTitle(someValues.title); 113 Clipperz.YUI.MessageBox.getDialog().setTitle(someValues.title);
117 }; 114 };
118 115
119 if (someValues.text) { 116 if (someValues.text) {
120 Clipperz.YUI.MessageBox.updateText(someValues.text); 117 Clipperz.YUI.MessageBox.updateText(someValues.text);
121 }; 118 };
122 119
123 if (typeof(someValues.showProgressBar) != 'undefined') { 120 if (typeof(someValues.showProgressBar) != 'undefined') {
124 Clipperz.YUI.MessageBox.progressElement().setDisplayed(someValues.showProgressBar); 121 Clipperz.YUI.MessageBox.progressElement().setDisplayed(someValues.showProgressBar);
125 Clipperz.YUI.MessageBox.updateProgress(0); 122 Clipperz.YUI.MessageBox.updateProgress(0);
126 }; 123 };
127 124
128 if (typeof(someValues.steps) != 'undefined') { 125 if (typeof(someValues.steps) != 'undefined') {
129 this.setSteps(someValues.steps); 126 this.setSteps(someValues.steps);
130 }; 127 };
131 128
132 if (typeof(someValues.step) != 'undefined') { 129 if (typeof(someValues.step) != 'undefined') {
133 this.setStep(someValues.step); 130 this.setStep(someValues.step);
134 } else { 131 } else {
135 this.setStep('next'); 132 this.setStep('next');
136 } 133 }
137 Clipperz.YUI.MessageBox.updateProgress(this.step() / this.steps()); 134 Clipperz.YUI.MessageBox.updateProgress(this.step() / this.steps());
138 135
139 136
140 if (typeof(someValues.fn) != 'undefined') { 137 if (typeof(someValues.fn) != 'undefined') {
141 Clipperz.YUI.MessageBox.opt().fn = someValues.fn; 138 Clipperz.YUI.MessageBox.opt().fn = someValues.fn;
142 }; 139 };
143 140
144 if (typeof(someValues.scope) != 'undefined') { 141 if (typeof(someValues.scope) != 'undefined') {
145 Clipperz.YUI.MessageBox.opt().scope = someValues.scope; 142 Clipperz.YUI.MessageBox.opt().scope = someValues.scope;
146 }; 143 };
147 144
148 if (someValues.buttons) { 145 if (someValues.buttons) {
149 Clipperz.YUI.MessageBox.updateButtons(someValues.buttons); 146 Clipperz.YUI.MessageBox.updateButtons(someValues.buttons);
150 }; 147 };
151 148
152 // if (someValues.title) { 149 // if (someValues.title) {
153 // Clipperz.YUI.MessageBox.getDialog().setTitle(someValues.title + " [" + this.step() + " / " + this.steps() + "]"); 150 // Clipperz.YUI.MessageBox.getDialog().setTitle(someValues.title + " [" + this.step() + " / " + this.steps() + "]");
154 // }; 151 // };
155 152
156//MochiKit.Logging.logDebug("--- MessageBox.update - step: " + this.step() + " / " + this.steps() + " - " + someValues.text); 153//MochiKit.Logging.logDebug("--- MessageBox.update - step: " + this.step() + " / " + this.steps() + " - " + someValues.text);
157//MochiKit.Logging.logDebug("<<< MessageBox.update"); 154//MochiKit.Logging.logDebug("<<< MessageBox.update");
158 }, 155 },
159 156
160 //----------------------------------------------------- 157 //-----------------------------------------------------
161 158
162 'hide': function(anAnimationTargetElement) { 159 'hide': function(anAnimationTargetElement) {
163 if (anAnimationTargetElement) { 160 if (anAnimationTargetElement) {
164 Clipperz.YUI.MessageBox.getDialog().animateTarget = anAnimationTargetElement; 161 Clipperz.YUI.MessageBox.getDialog().animateTarget = anAnimationTargetElement;
165 } 162 }
166 163
167 Clipperz.YUI.MessageBox.hide(); 164 Clipperz.YUI.MessageBox.hide();
168 }, 165 },
169 166
170 //----------------------------------------------------- 167 //-----------------------------------------------------
171 __syntaxFix__: '__syntaxFix__' 168 __syntaxFix__: '__syntaxFix__'
172}); 169});
173 170
174 171
175//########################################################## 172//##########################################################
176 173
177_clipperz_pm_components_messageBox = null; 174_clipperz_pm_components_messageBox = null;
178 175
179Clipperz.PM.Components.MessageBox = function() { 176Clipperz.PM.Components.MessageBox = function() {
180 if (_clipperz_pm_components_messageBox == null) { 177 if (_clipperz_pm_components_messageBox == null) {
181 _clipperz_pm_components_messageBox = new Clipperz.PM.Components.MessageBoxImplementation(); 178 _clipperz_pm_components_messageBox = new Clipperz.PM.Components.MessageBoxImplementation();
182 } 179 }
183 180
184 return _clipperz_pm_components_messageBox; 181 return _clipperz_pm_components_messageBox;
185} 182}
186 183
187//--------------------------------------------------------- 184//---------------------------------------------------------
188 185
189Clipperz.PM.Components.MessageBox.showProgressPanel = function(aCallback, anErrback, anActivationItem) { 186Clipperz.PM.Components.MessageBox.showProgressPanel = function(aCallback, anErrback, anActivationItem) {
190 var deferredResult; 187 var deferredResult;
191 188
192 deferredResult = new MochiKit.Async.Deferred(); 189 deferredResult = new MochiKit.Async.Deferred();
193//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Components.MessageBox.showProgressPanel - 0: " + res); return res;}); 190//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Components.MessageBox.showProgressPanel - 0: " + res); return res;});
194 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Components.MessageBox(), 'deferredShow'), 191 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Components.MessageBox(), 'deferredShow'),
195 { 192 {
196 title: "", 193 title: "",
197 text: "", 194 text: "",
198 width:240, 195 width:240,
199 showProgressBar:true, 196 showProgressBar:true,
200 showCloseButton:false, 197 showCloseButton:false,
201 fn:MochiKit.Base.method(deferredResult, 'cancel'), 198 fn:MochiKit.Base.method(deferredResult, 'cancel'),
202 scope:this, 199 scope:this,
203 buttons:{ 200 buttons:{
204 //'ok':Clipperz.PM.Strings['loginMessagePanelInitialButtonLabel'] 201 //'ok':Clipperz.PM.Strings['loginMessagePanelInitialButtonLabel']
205 } 202 }
206 }, 203 },
207 anActivationItem 204 anActivationItem
208 ); 205 );
209//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Components.MessageBox.showProgressPanel - 1: " + res); return res;}); 206//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Components.MessageBox.showProgressPanel - 1: " + res); return res;});
210 deferredResult.addCallback(aCallback); 207 deferredResult.addCallback(aCallback);
211//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Components.MessageBox.showProgressPanel - 2: " + res); return res;}); 208//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Components.MessageBox.showProgressPanel - 2: " + res); return res;});
212 deferredResult.addCallback(MochiKit.Async.wait, 0.5); 209 deferredResult.addCallback(MochiKit.Async.wait, 0.5);
213 deferredResult.addCallback(function(res) { 210 deferredResult.addCallback(function(res) {
214 Clipperz.PM.Components.MessageBox().hide(YAHOO.ext.Element.get(anActivationItem)); 211 Clipperz.PM.Components.MessageBox().hide(YAHOO.ext.Element.get(anActivationItem));
215 return res; 212 return res;
216 }); 213 });
217//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Components.MessageBox.showProgressPanel - 3: " + res); return res;}); 214//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Components.MessageBox.showProgressPanel - 3: " + res); return res;});
218 deferredResult.addErrback(anErrback); 215 deferredResult.addErrback(anErrback);
219//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Components.MessageBox.showProgressPanel - 4: " + res); return res;}); 216//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Components.MessageBox.showProgressPanel - 4: " + res); return res;});
220 deferredResult.callback(); 217 deferredResult.callback();
221 218
222 return deferredResult; 219 return deferredResult;
223}; 220};
224 221
diff --git a/frontend/beta/js/Clipperz/PM/Components/OTP/MainComponent.js b/frontend/beta/js/Clipperz/PM/Components/OTP/MainComponent.js
index 9d191f6..7b0b12b 100644
--- a/frontend/beta/js/Clipperz/PM/Components/OTP/MainComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/OTP/MainComponent.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.OTP) == 'undefined') { Clipperz.PM.Components.OTP = {}; } 29if (typeof(Clipperz.PM.Components.OTP) == 'undefined') { Clipperz.PM.Components.OTP = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Components.OTP.MainComponent = function(anElement, args) { 33Clipperz.PM.Components.OTP.MainComponent = function(anElement, args) {
37 args = args || {}; 34 args = args || {};
38 35
39//MochiKit.Logging.logDebug("new OTP.MainComponent"); 36//MochiKit.Logging.logDebug("new OTP.MainComponent");
40 Clipperz.PM.Components.OTP.MainComponent.superclass.constructor.call(this, anElement, args); 37 Clipperz.PM.Components.OTP.MainComponent.superclass.constructor.call(this, anElement, args);
41 38
42 this._user = args.user; 39 this._user = args.user;
43 this._shouldRender = true; 40 this._shouldRender = true;
44 41
45 this._deleteButton = null; 42 this._deleteButton = null;
46 this._printButton = null; 43 this._printButton = null;
47 44
48 Clipperz.NotificationCenter.register(null, 'tabSelected', this, 'tabSelectedHandler'); 45 Clipperz.NotificationCenter.register(null, 'tabSelected', this, 'tabSelectedHandler');
49 //Clipperz.NotificationCenter.register(null, 'oneTimePasswordAdded', this, 'render'); 46 //Clipperz.NotificationCenter.register(null, 'oneTimePasswordAdded', this, 'render');
50 47
51 return this; 48 return this;
52} 49}
53 50
54//============================================================================= 51//=============================================================================
55 52
56YAHOO.extendX(Clipperz.PM.Components.OTP.MainComponent, Clipperz.PM.Components.BaseComponent, { 53YAHOO.extendX(Clipperz.PM.Components.OTP.MainComponent, Clipperz.PM.Components.BaseComponent, {
57 54
58 'toString': function() { 55 'toString': function() {
59 return "Clipperz.PM.Components.OTP.MainComponent component"; 56 return "Clipperz.PM.Components.OTP.MainComponent component";
60 }, 57 },
61 58
62 //------------------------------------------------------------------------- 59 //-------------------------------------------------------------------------
63 60
64 'render': function() { 61 'render': function() {
65//MochiKit.Logging.logDebug("### OTP.MainComponent.render"); 62//MochiKit.Logging.logDebug("### OTP.MainComponent.render");
66 Clipperz.NotificationCenter.unregister(this); 63 Clipperz.NotificationCenter.unregister(this);
67 MochiKit.Signal.disconnectAllTo(this); 64 MochiKit.Signal.disconnectAllTo(this);
68 65
69 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { 66 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) {
70 this.element().update(""); 67 this.element().update("");
71 this.domHelper().append(this.element(), {tag:'div', cls:'oneTimePasswordReadOnlyMessage', htmlString:Clipperz.PM.Strings['oneTimePasswordReadOnlyMessage']}); 68 this.domHelper().append(this.element(), {tag:'div', cls:'oneTimePasswordReadOnlyMessage', htmlString:Clipperz.PM.Strings['oneTimePasswordReadOnlyMessage']});
72 } else { 69 } else {
73 var deferredResult; 70 var deferredResult;
74 71
75 deferredResult = new MochiKit.Async.Deferred(); 72 deferredResult = new MochiKit.Async.Deferred();
76 73
77//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 1: " + res); return res;}); 74//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 1: " + res); return res;});
78 deferredResult.addCallback(MochiKit.Base.bind(function() { 75 deferredResult.addCallback(MochiKit.Base.bind(function() {
79 this.element().update(""); 76 this.element().update("");
80 Clipperz.YUI.DomHelper.append(this.element(), {tag:'div', htmlString:Clipperz.PM.Strings['oneTimePasswordLoadingMessage']}); 77 Clipperz.YUI.DomHelper.append(this.element(), {tag:'div', htmlString:Clipperz.PM.Strings['oneTimePasswordLoadingMessage']});
81 }, this)); 78 }, this));
82//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 2: " + res); return res;}); 79//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 2: " + res); return res;});
83 deferredResult.addCallback(MochiKit.Base.method(this.user(), 'loadOneTimePasswords')); 80 deferredResult.addCallback(MochiKit.Base.method(this.user(), 'loadOneTimePasswords'));
84//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 3: " + res); return res;}); 81//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 3: " + res); return res;});
85//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 3.1: " + Clipperz.Base.serializeJSON(res.serializedData())); return res;}); 82//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 3.1: " + Clipperz.Base.serializeJSON(res.serializedData())); return res;});
86 deferredResult.addCallback(MochiKit.Base.bind(function(aResult) { 83 deferredResult.addCallback(MochiKit.Base.bind(function(aResult) {
87 vartbodyElement; 84 vartbodyElement;
88 varoneTimePasswordReferenceKeys; 85 varoneTimePasswordReferenceKeys;
89 var imageExtension; 86 var imageExtension;
90 var isThereAnyActiveOneTimePassword; 87 var isThereAnyActiveOneTimePassword;
91 88
92 isThereAnyActiveOneTimePassword = false; 89 isThereAnyActiveOneTimePassword = false;
93 90
94 this.element().update(""); 91 this.element().update("");
95 Clipperz.YUI.DomHelper.append(this.element(), {tag:'div', id:'oneTimePasswordList', children:[ 92 Clipperz.YUI.DomHelper.append(this.element(), {tag:'div', id:'oneTimePasswordList', children:[
96 {tag:'div', id:'oneTimePasswords_header', children:[ 93 {tag:'div', id:'oneTimePasswords_header', children:[
97 {tag:'table', width:'100%', children:[ 94 {tag:'table', width:'100%', children:[
98 {tag:'tbody', children:[ 95 {tag:'tbody', children:[
99 {tag:'tr', children:[ 96 {tag:'tr', children:[
100 {tag:'td', width:'10%', children:[ 97 {tag:'td', width:'10%', children:[
101 {tag:'div', id:this.getId('createNewOneTimePasswordButton')} 98 {tag:'div', id:this.getId('createNewOneTimePasswordButton')}
102 ]}, 99 ]},
103 {tag:'td', width:'40%', children:[ 100 {tag:'td', width:'40%', children:[
104 {tag:'div', id:this.getId('deleteSelectedOneTimePasswordButton')} 101 {tag:'div', id:this.getId('deleteSelectedOneTimePasswordButton')}
105 ]}, 102 ]},
106 {tag:'td', width:'50%', align:'right', children:[ 103 {tag:'td', width:'50%', align:'right', children:[
107 {tag:'div', id:this.getId('printOneTimePasswordButton')} 104 {tag:'div', id:this.getId('printOneTimePasswordButton')}
108 ]} 105 ]}
109 ]} 106 ]}
110 ]} 107 ]}
111 ]}, 108 ]},
112 {tag:'div', children:[ 109 {tag:'div', children:[
113 {tag:'ul', children:[ 110 {tag:'ul', children:[
114 {tag:'li', children:[ 111 {tag:'li', children:[
115 {tag:'span', htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_selectLabel']} 112 {tag:'span', htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_selectLabel']}
116 ]}, 113 ]},
117 {tag:'li', children:[ 114 {tag:'li', children:[
118 {tag:'a', href:'#', id:this.getId('selectAllOneTimePasswords_link'), htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_all']} 115 {tag:'a', href:'#', id:this.getId('selectAllOneTimePasswords_link'), htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_all']}
119 ]}, 116 ]},
120 {tag:'li', children:[ 117 {tag:'li', children:[
121 {tag:'a', href:'#', id:this.getId('selectNoneOneTimePasswords_link'), htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_none']} 118 {tag:'a', href:'#', id:this.getId('selectNoneOneTimePasswords_link'), htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_none']}
122 ]}, 119 ]},
123 {tag:'li', children:[ 120 {tag:'li', children:[
124 {tag:'a', href:'#', id:this.getId('selectUsedOneTimePasswords_link'), htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_used']} 121 {tag:'a', href:'#', id:this.getId('selectUsedOneTimePasswords_link'), htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_used']}
125 ]}, 122 ]},
126 {tag:'li', children:[ 123 {tag:'li', children:[
127 {tag:'a', href:'#', id:this.getId('selectUnusedOneTimePasswords_link'), htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_unused']} 124 {tag:'a', href:'#', id:this.getId('selectUnusedOneTimePasswords_link'), htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_unused']}
128 ]} 125 ]}
129 ]} 126 ]}
130 ]} 127 ]}
131 ]}, 128 ]},
132 {tag:'form', id:this.getId('oneTimePasswords_form'), children:[ 129 {tag:'form', id:this.getId('oneTimePasswords_form'), children:[
133 {tag:'table', cls:'oneTimePassword', cellspacing:'0', cellpadding:'2', children:[ 130 {tag:'table', cls:'oneTimePassword', cellspacing:'0', cellpadding:'2', children:[
134 {tag:'tbody', id:this.getId('oneTimePasswords_tbody'), children:[ 131 {tag:'tbody', id:this.getId('oneTimePasswords_tbody'), children:[
135 ]} 132 ]}
136 ]} 133 ]}
137 ]} 134 ]}
138 ]}); 135 ]});
139 136
140 imageExtension = (Clipperz_IEisBroken == true) ? 'gif': 'png'; 137 imageExtension = (Clipperz_IEisBroken == true) ? 'gif': 'png';
141 138
142 tbodyElement = this.getElement('oneTimePasswords_tbody'); 139 tbodyElement = this.getElement('oneTimePasswords_tbody');
143 oneTimePasswordReferenceKeys = MochiKit.Base.keys(this.user().oneTimePasswordManager().oneTimePasswords()).reverse(); 140 oneTimePasswordReferenceKeys = MochiKit.Base.keys(this.user().oneTimePasswordManager().oneTimePasswords()).reverse();
144 c = oneTimePasswordReferenceKeys.length; 141 c = oneTimePasswordReferenceKeys.length;
145 if (c>0) { 142 if (c>0) {
146 for (i=0; i<c; i++) { 143 for (i=0; i<c; i++) {
147 var otpReference; 144 var otpReference;
148 var currentOTP; 145 var currentOTP;
149 var loginSessionInfoConfig; 146 var loginSessionInfoConfig;
150 147
151 imageExtension = (Clipperz_IEisBroken == true) ? 'gif': 'png'; 148 imageExtension = (Clipperz_IEisBroken == true) ? 'gif': 'png';
152 149
153 otpReference = oneTimePasswordReferenceKeys[i]; 150 otpReference = oneTimePasswordReferenceKeys[i];
154 currentOTP = this.user().oneTimePasswordManager().oneTimePasswords()[otpReference]; 151 currentOTP = this.user().oneTimePasswordManager().oneTimePasswords()[otpReference];
155 152
156 switch (currentOTP.status()) { 153 switch (currentOTP.status()) {
157 case 'USED': 154 case 'USED':
158 var loginSessionInfo; 155 var loginSessionInfo;
159 156
160 loginSessionInfo = currentOTP.connectionInfo(); 157 loginSessionInfo = currentOTP.connectionInfo();
161 try { 158 try {
162 var ip; 159 var ip;
163 160
164 ip = (currentOTP.connectionInfo()['ip'].match(/^\d{1,3}(.\d{1,3}){3}$/)) ? currentOTP.connectionInfo()['ip'] : Clipperz.PM.Strings['unknown_ip']; 161 ip = (currentOTP.connectionInfo()['ip'].match(/^\d{1,3}(.\d{1,3}){3}$/)) ? currentOTP.connectionInfo()['ip'] : Clipperz.PM.Strings['unknown_ip'];
165 162
166 loginSessionInfoConfig = [ 163 loginSessionInfoConfig = [
167 {tag:'div', cls:'oneTimePassword_usageDateDescription', children:[ 164 {tag:'div', cls:'oneTimePassword_usageDateDescription', children:[
168 {tag:'span', cls:'value', html:Clipperz.PM.Date.getElapsedTimeDescription(currentOTP.usageDate())} 165 {tag:'span', cls:'value', html:Clipperz.PM.Date.getElapsedTimeDescription(currentOTP.usageDate())}
169 ]}, 166 ]},
170 {tag:'div', cls:'oneTimePassword_usageDetails', children:[ 167 {tag:'div', cls:'oneTimePassword_usageDetails', children:[
171 {tag:'img', cls:'flag', title:Clipperz.PM.Strings['countries'][ loginSessionInfo['country']], src:Clipperz.PM.Strings['icons_baseUrl'] + "/flags/" + loginSessionInfo['country'].toLowerCase() + "." + imageExtension, width:'32', height:'32'}, 168 {tag:'img', cls:'flag', title:Clipperz.PM.Strings['countries'][ loginSessionInfo['country']], src:Clipperz.PM.Strings['icons_baseUrl'] + "/flags/" + loginSessionInfo['country'].toLowerCase() + "." + imageExtension, width:'32', height:'32'},
172 {tag:'img', cls:'browser', title:Clipperz.PM.Strings['browsers'][ loginSessionInfo['browser']], src:Clipperz.PM.Strings['icons_baseUrl'] + "/browsers/" + loginSessionInfo['browser'].toLowerCase() + "." + imageExtension, width:'32', height:'32'}, 169 {tag:'img', cls:'browser', title:Clipperz.PM.Strings['browsers'][ loginSessionInfo['browser']], src:Clipperz.PM.Strings['icons_baseUrl'] + "/browsers/" + loginSessionInfo['browser'].toLowerCase() + "." + imageExtension, width:'32', height:'32'},
173 {tag:'img', cls:'operatingSystem', title:Clipperz.PM.Strings['operatingSystems'][loginSessionInfo['operatingSystem']], src:Clipperz.PM.Strings['icons_baseUrl'] + "/operatingSystems/" + loginSessionInfo['operatingSystem'].toLowerCase() + "." + imageExtension, width:'32', height:'32'} 170 {tag:'img', cls:'operatingSystem', title:Clipperz.PM.Strings['operatingSystems'][loginSessionInfo['operatingSystem']], src:Clipperz.PM.Strings['icons_baseUrl'] + "/operatingSystems/" + loginSessionInfo['operatingSystem'].toLowerCase() + "." + imageExtension, width:'32', height:'32'}
174 ]}, 171 ]},
175 {tag:'div', cls:'oneTimePassword_usageDate', html:Clipperz.PM.Date.formatDateWithTemplate(currentOTP.usageDate(), Clipperz.PM.Strings['fullDate_format'])}, 172 {tag:'div', cls:'oneTimePassword_usageDate', html:Clipperz.PM.Date.formatDateWithTemplate(currentOTP.usageDate(), Clipperz.PM.Strings['fullDate_format'])},
176 {tag:'div', cls:'oneTimePassword_IP', children:[ 173 {tag:'div', cls:'oneTimePassword_IP', children:[
177 {tag:'span', cls:'oneTimePassword_IPLabel', htmlString:Clipperz.PM.Strings['loginHistoryIPLabel']}, 174 {tag:'span', cls:'oneTimePassword_IPLabel', htmlString:Clipperz.PM.Strings['loginHistoryIPLabel']},
178 {tag:'span', cls:'oneTimePassword_IPValue', html:ip} 175 {tag:'span', cls:'oneTimePassword_IPValue', html:ip}
179 ]} 176 ]}
180 ]; 177 ];
181 } catch(exception) { 178 } catch(exception) {
182 MochiKit.Logging.logWarning("an error occured while showing the One Time Password session details"); 179 MochiKit.Logging.logWarning("an error occured while showing the One Time Password session details");
183 loginSessionInfoConfig = []; 180 loginSessionInfoConfig = [];
184 } 181 }
185 break; 182 break;
186 case 'DISABLED': 183 case 'DISABLED':
187 loginSessionInfoConfig = [ 184 loginSessionInfoConfig = [
188 {tag:'span', cls:'disabledOneTimePassword', htmlString:Clipperz.PM.Strings['disabledOneTimePassword_warning']} 185 {tag:'span', cls:'disabledOneTimePassword', htmlString:Clipperz.PM.Strings['disabledOneTimePassword_warning']}
189 ]; 186 ];
190 break; 187 break;
191 case 'ACTIVE': 188 case 'ACTIVE':
192 default: 189 default:
193 loginSessionInfoConfig = []; 190 loginSessionInfoConfig = [];
194 break; 191 break;
195 } 192 }
196 193
197 194
198 if (currentOTP.isExpired() == false) { 195 if (currentOTP.isExpired() == false) {
199 isThereAnyActiveOneTimePassword = true; 196 isThereAnyActiveOneTimePassword = true;
200 }; 197 };
201 198
202 199
203 this.domHelper().append(tbodyElement, {tag:'tr', cls:(currentOTP.isExpired() ? 'oneTimePassword_used': 'oneTimePassword_new'), children:[ 200 this.domHelper().append(tbodyElement, {tag:'tr', cls:(currentOTP.isExpired() ? 'oneTimePassword_used': 'oneTimePassword_new'), children:[
204 {tag:'td', valign:'top', children:[ 201 {tag:'td', valign:'top', children:[
205 {tag:'input', type:'checkbox', cls:'otpCheckbox', name:currentOTP.reference()} 202 {tag:'input', type:'checkbox', cls:'otpCheckbox', name:currentOTP.reference()}
206 ]}, 203 ]},
207 {tag:'td', valign:'top', children:[ 204 {tag:'td', valign:'top', children:[
208 {tag:'span', cls:'oneTimePassword_value', html:currentOTP.password()} 205 {tag:'span', cls:'oneTimePassword_value', html:currentOTP.password()}
209 ]}, 206 ]},
210 {tag:'td', valign:'top', children:[ 207 {tag:'td', valign:'top', children:[
211 {tag:'div', cls:'oneTimePassword_usageStats', children:loginSessionInfoConfig} 208 {tag:'div', cls:'oneTimePassword_usageStats', children:loginSessionInfoConfig}
212 ]} 209 ]}
213 ]}); 210 ]});
214 } 211 }
215 } else { 212 } else {
216 this.domHelper().append(tbodyElement, {tag:'tr', children:[ 213 this.domHelper().append(tbodyElement, {tag:'tr', children:[
217 {tag:'td', children:[ 214 {tag:'td', children:[
218 {tag:'div', cls:'oneTimePassword_noPasswordPresent', htmlString:Clipperz.PM.Strings['oneTimePasswordNoPasswordAvailable']} 215 {tag:'div', cls:'oneTimePassword_noPasswordPresent', htmlString:Clipperz.PM.Strings['oneTimePasswordNoPasswordAvailable']}
219 ]} 216 ]}
220 ]}); 217 ]});
221 } 218 }
222 219
223 new YAHOO.ext.Button(this.getDom('createNewOneTimePasswordButton'), {text:Clipperz.PM.Strings['createNewOTPButtonLabel'], handler:this.createNewOneTimePassword, scope:this}); 220 new YAHOO.ext.Button(this.getDom('createNewOneTimePasswordButton'), {text:Clipperz.PM.Strings['createNewOTPButtonLabel'], handler:this.createNewOneTimePassword, scope:this});
224 this.setDeleteButton(new YAHOO.ext.Button(this.getDom('deleteSelectedOneTimePasswordButton'), {text:Clipperz.PM.Strings['deleteOTPButtonLabel'], handler:this.deleteSelectedOneTimePasswords, scope:this})); 221 this.setDeleteButton(new YAHOO.ext.Button(this.getDom('deleteSelectedOneTimePasswordButton'), {text:Clipperz.PM.Strings['deleteOTPButtonLabel'], handler:this.deleteSelectedOneTimePasswords, scope:this}));
225 this.setPrintButton(new YAHOO.ext.Button(this.getDom('printOneTimePasswordButton'), {text:Clipperz.PM.Strings['printOTPButtonLabel'], handler:this.printOneTimePasswords, scope:this})); 222 this.setPrintButton(new YAHOO.ext.Button(this.getDom('printOneTimePasswordButton'), {text:Clipperz.PM.Strings['printOTPButtonLabel'], handler:this.printOneTimePasswords, scope:this}));
226 223
227 MochiKit.Signal.connect(this.getId('selectAllOneTimePasswords_link'),'onclick', this, 'selectAllOneTimePasswords'); 224 MochiKit.Signal.connect(this.getId('selectAllOneTimePasswords_link'),'onclick', this, 'selectAllOneTimePasswords');
228 MochiKit.Signal.connect(this.getId('selectNoneOneTimePasswords_link'),'onclick', this, 'selectNoneOneTimePasswords'); 225 MochiKit.Signal.connect(this.getId('selectNoneOneTimePasswords_link'),'onclick', this, 'selectNoneOneTimePasswords');
229 MochiKit.Signal.connect(this.getId('selectUsedOneTimePasswords_link'),'onclick', this, 'selectUsedOneTimePasswords'); 226 MochiKit.Signal.connect(this.getId('selectUsedOneTimePasswords_link'),'onclick', this, 'selectUsedOneTimePasswords');
230 MochiKit.Signal.connect(this.getId('selectUnusedOneTimePasswords_link'),'onclick', this, 'selectUnusedOneTimePasswords'); 227 MochiKit.Signal.connect(this.getId('selectUnusedOneTimePasswords_link'),'onclick', this, 'selectUnusedOneTimePasswords');
231 228
232 MochiKit.Base.map(MochiKit.Base.bind(function(aCheckbox) { 229 MochiKit.Base.map(MochiKit.Base.bind(function(aCheckbox) {
233 MochiKit.Signal.connect(aCheckbox, 'onclick', this, 'handleCheckboxClick'); 230 MochiKit.Signal.connect(aCheckbox, 'onclick', this, 'handleCheckboxClick');
234 }, this), this.oneTimePasswordCheckboxes()); 231 }, this), this.oneTimePasswordCheckboxes());
235 232
236 this.updateDeleteButtonStatus(); 233 this.updateDeleteButtonStatus();
237 234
238 if (isThereAnyActiveOneTimePassword == true) { 235 if (isThereAnyActiveOneTimePassword == true) {
239 this.printButton().enable(); 236 this.printButton().enable();
240 } else { 237 } else {
241 this.printButton().disable(); 238 this.printButton().disable();
242 } 239 }
243 240
244 // Clipperz.NotificationCenter.register(null, 'oneTimePasswordAdded', this, 'render'); 241 // Clipperz.NotificationCenter.register(null, 'oneTimePasswordAdded', this, 'render');
245 Clipperz.NotificationCenter.register(null, 'oneTimePassword_saveChanges_done', this, 'render'); 242 Clipperz.NotificationCenter.register(null, 'oneTimePassword_saveChanges_done', this, 'render');
246 243
247 }, this)); 244 }, this));
248//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 4: " + res); return res;}); 245//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 4: " + res); return res;});
249 246
250 deferredResult.callback(); 247 deferredResult.callback();
251 } 248 }
252 }, 249 },
253 250
254 //------------------------------------------------------------------------- 251 //-------------------------------------------------------------------------
255 252
256 'printOneTimePasswords': function() { 253 'printOneTimePasswords': function() {
257 var newWindow; 254 var newWindow;
258 var activeOneTimePasswords; 255 var activeOneTimePasswords;
259 256
260//MochiKit.Logging.logDebug(">>> printAllData"); 257//MochiKit.Logging.logDebug(">>> printAllData");
261 newWindow = window.open("", ""); 258 newWindow = window.open("", "");
262 newWindow.document.write( 259 newWindow.document.write(
263"<html>" + 260"<html>" +
264"<header>" + 261"<header>" +
265 "<title>Clipperz One Time Password</title>" + 262 "<title>Clipperz One Time Password</title>" +
266"<style>" + 263"<style>" +
267"div.oneTimePassword_print h2 {" + 264"div.oneTimePassword_print h2 {" +
268 "font-family: monospace;" + 265 "font-family: monospace;" +
269 "font-weight: normal;" + 266 "font-weight: normal;" +
270 "padding: 10px 20px;" + 267 "padding: 10px 20px;" +
271"}" + 268"}" +
272"</style>" + 269"</style>" +
273"" + 270"" +
274"<!--[if IE]>" + 271"<!--[if IE]>" +
275"<style>" + 272"<style>" +
276"</style>" + 273"</style>" +
277"<![endif]-->" + 274"<![endif]-->" +
278"" + 275"" +
279"</header>" + 276"</header>" +
280"<body>" + 277"<body>" +
281"</body>" + 278"</body>" +
282"</html>" 279"</html>"
283 ); 280 );
284 281
285 activeOneTimePasswords = MochiKit.Base.filter(function(aOneTimePassword) {return (aOneTimePassword.isExpired() == false)}, MochiKit.Base.values(this.user().oneTimePasswordManager().oneTimePasswords()).reverse()); 282 activeOneTimePasswords = MochiKit.Base.filter(function(aOneTimePassword) {return (aOneTimePassword.isExpired() == false)}, MochiKit.Base.values(this.user().oneTimePasswordManager().oneTimePasswords()).reverse());
286 283
287 MochiKit.Iter.forEach(activeOneTimePasswords, MochiKit.Base.partial(function(aWindow, aOneTimePassword) { 284 MochiKit.Iter.forEach(activeOneTimePasswords, MochiKit.Base.partial(function(aWindow, aOneTimePassword) {
288 MochiKit.DOM.withWindow(aWindow, MochiKit.Base.partial(function(aOneTimePassword) { 285 MochiKit.DOM.withWindow(aWindow, MochiKit.Base.partial(function(aOneTimePassword) {
289 var newBlock; 286 var newBlock;
290 287
291 newBlock = MochiKit.DOM.DIV({'class': 'oneTimePassword_print'}, 288 newBlock = MochiKit.DOM.DIV({'class': 'oneTimePassword_print'},
292 MochiKit.DOM.H2(null, aOneTimePassword.password()) 289 MochiKit.DOM.H2(null, aOneTimePassword.password())
293 ); 290 );
294 MochiKit.DOM.appendChildNodes(MochiKit.DOM.currentDocument().body, newBlock); 291 MochiKit.DOM.appendChildNodes(MochiKit.DOM.currentDocument().body, newBlock);
295 292
296 }, aOneTimePassword)); 293 }, aOneTimePassword));
297 }, newWindow)); 294 }, newWindow));
298 }, 295 },
299 296
300 //------------------------------------------------------------------------- 297 //-------------------------------------------------------------------------
301 298
302 'generateRandomBase32OTPValue': function(aButton) { 299 'generateRandomBase32OTPValue': function(aButton) {
303 var randomValue; 300 var randomValue;
304 varresult; 301 varresult;
305 302
306 randomValue = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(160/8); 303 randomValue = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(160/8);
307 result = randomValue.toBase32String(); 304 result = randomValue.toBase32String();
308 result = result.replace(/.{4}\B/g, '$&' + ' '); 305 result = result.replace(/.{4}\B/g, '$&' + ' ');
309 result = result.replace(/(.{4} ){2}/g, '$&' + '- '); 306 result = result.replace(/(.{4} ){2}/g, '$&' + '- ');
310 307
311 return result; 308 return result;
312 }, 309 },
313 310
314 //------------------------------------------------------------------------- 311 //-------------------------------------------------------------------------
315 312
316 'createNewOneTimePassword': function() { 313 'createNewOneTimePassword': function() {
317 var newOneTimePassword; 314 var newOneTimePassword;
318 var password; 315 var password;
319 316
320 password = this.generateRandomBase32OTPValue(); 317 password = this.generateRandomBase32OTPValue();
321 newOneTimePassword = new Clipperz.PM.DataModel.OneTimePassword({ 318 newOneTimePassword = new Clipperz.PM.DataModel.OneTimePassword({
322 user:this.user(), 319 user:this.user(),
323 password:password 320 password:password
324 }); 321 });
325 this.user().oneTimePasswordManager().addOneTimePassword(newOneTimePassword); 322 this.user().oneTimePasswordManager().addOneTimePassword(newOneTimePassword);
326 Clipperz.PM.Components.MessageBox.showProgressPanel(MochiKit.Base.method(newOneTimePassword, 'saveChanges'), null, this.getDom('createNewOneTimePasswordButton')); 323 Clipperz.PM.Components.MessageBox.showProgressPanel(MochiKit.Base.method(newOneTimePassword, 'saveChanges'), null, this.getDom('createNewOneTimePasswordButton'));
327 }, 324 },
328 325
329 //------------------------------------------------------------------------- 326 //-------------------------------------------------------------------------
330 327
331 'oneTimePasswordCheckboxes': function() { 328 'oneTimePasswordCheckboxes': function() {
332 return MochiKit.DOM.getElementsByTagAndClassName('input', 'otpCheckbox', this.getId('oneTimePasswords_tbody')); 329 return MochiKit.DOM.getElementsByTagAndClassName('input', 'otpCheckbox', this.getId('oneTimePasswords_tbody'));
333 }, 330 },
334 331
335 'checkedOneTimePasswordCheckboxes': function() { 332 'checkedOneTimePasswordCheckboxes': function() {
336 return MochiKit.Base.filter(function(aCheckbox) {return (aCheckbox.checked == true)}, this.oneTimePasswordCheckboxes()); 333 return MochiKit.Base.filter(function(aCheckbox) {return (aCheckbox.checked == true)}, this.oneTimePasswordCheckboxes());
337 }, 334 },
338 335
339 //------------------------------------------------------------------------- 336 //-------------------------------------------------------------------------
340 337
341 'selectAllOneTimePasswords': function(anEvent) { 338 'selectAllOneTimePasswords': function(anEvent) {
342 var checkboxes; 339 var checkboxes;
343 var i,c; 340 var i,c;
344 341
345 anEvent.stop(); 342 anEvent.stop();
346 checkboxes = this.oneTimePasswordCheckboxes(); 343 checkboxes = this.oneTimePasswordCheckboxes();
347 c = checkboxes.length; 344 c = checkboxes.length;
348 for (i=0; i<c; i++) { 345 for (i=0; i<c; i++) {
349 checkboxes[i].checked = true; 346 checkboxes[i].checked = true;
350 } 347 }
351 348
352 this.updateDeleteButtonStatus(); 349 this.updateDeleteButtonStatus();
353 }, 350 },
354 351
355 'selectNoneOneTimePasswords': function(anEvent) { 352 'selectNoneOneTimePasswords': function(anEvent) {
356 var checkboxes; 353 var checkboxes;
357 var i,c; 354 var i,c;
358 355
359 anEvent.stop(); 356 anEvent.stop();
360 checkboxes = this.oneTimePasswordCheckboxes(); 357 checkboxes = this.oneTimePasswordCheckboxes();
361 c = checkboxes.length; 358 c = checkboxes.length;
362 for (i=0; i<c; i++) { 359 for (i=0; i<c; i++) {
363 checkboxes[i].checked = false; 360 checkboxes[i].checked = false;
364 } 361 }
365 362
366 this.updateDeleteButtonStatus(); 363 this.updateDeleteButtonStatus();
367 }, 364 },
368 365
369 'selectUsedOneTimePasswords': function(anEvent) { 366 'selectUsedOneTimePasswords': function(anEvent) {
370 var checkboxes; 367 var checkboxes;
371 var oneTimePasswordManager; 368 var oneTimePasswordManager;
372 var i,c; 369 var i,c;
373 370
374 anEvent.stop(); 371 anEvent.stop();
375 oneTimePasswordManager = this.user().oneTimePasswordManager(); 372 oneTimePasswordManager = this.user().oneTimePasswordManager();
376 checkboxes = this.oneTimePasswordCheckboxes(); 373 checkboxes = this.oneTimePasswordCheckboxes();
377 c = checkboxes.length; 374 c = checkboxes.length;
378 for (i=0; i<c; i++) { 375 for (i=0; i<c; i++) {
379 var matchingOneTimePassword; 376 var matchingOneTimePassword;
380 377
381 matchingOneTimePassword = oneTimePasswordManager.oneTimePasswordWithReference(checkboxes[i].name); 378 matchingOneTimePassword = oneTimePasswordManager.oneTimePasswordWithReference(checkboxes[i].name);
382 checkboxes[i].checked = matchingOneTimePassword.isExpired(); 379 checkboxes[i].checked = matchingOneTimePassword.isExpired();
383 } 380 }
384 381
385 this.updateDeleteButtonStatus(); 382 this.updateDeleteButtonStatus();
386 }, 383 },
387 384
388 'selectUnusedOneTimePasswords': function(anEvent) { 385 'selectUnusedOneTimePasswords': function(anEvent) {
389 var checkboxes; 386 var checkboxes;
390 var oneTimePasswordManager; 387 var oneTimePasswordManager;
391 var i,c; 388 var i,c;
392 389
393 anEvent.stop(); 390 anEvent.stop();
394 oneTimePasswordManager = this.user().oneTimePasswordManager(); 391 oneTimePasswordManager = this.user().oneTimePasswordManager();
395 checkboxes = this.oneTimePasswordCheckboxes(); 392 checkboxes = this.oneTimePasswordCheckboxes();
396 c = checkboxes.length; 393 c = checkboxes.length;
397 for (i=0; i<c; i++) { 394 for (i=0; i<c; i++) {
398 var matchingOneTimePassword; 395 var matchingOneTimePassword;
399 396
400 matchingOneTimePassword = oneTimePasswordManager.oneTimePasswordWithReference(checkboxes[i].name); 397 matchingOneTimePassword = oneTimePasswordManager.oneTimePasswordWithReference(checkboxes[i].name);
401 checkboxes[i].checked = !matchingOneTimePassword.isExpired(); 398 checkboxes[i].checked = !matchingOneTimePassword.isExpired();
402 } 399 }
403 400
404 this.updateDeleteButtonStatus(); 401 this.updateDeleteButtonStatus();
405 }, 402 },
406 403
407 //------------------------------------------------------------------------- 404 //-------------------------------------------------------------------------
408 405
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js
index 6b467d0..f7991f1 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } 29if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Components.Panels.AccountPanel = function(anElement, args) { 33Clipperz.PM.Components.Panels.AccountPanel = function(anElement, args) {
37//MochiKit.Logging.logDebug(">>> new AccountPanel"); 34//MochiKit.Logging.logDebug(">>> new AccountPanel");
38 args = args || {}; 35 args = args || {};
39 36
40 Clipperz.PM.Components.Panels.AccountPanel.superclass.constructor.call(this, anElement, args); 37 Clipperz.PM.Components.Panels.AccountPanel.superclass.constructor.call(this, anElement, args);
41 38
42 Clipperz.NotificationCenter.register(null, 'setupDone', this, 'render'); 39 Clipperz.NotificationCenter.register(null, 'setupDone', this, 'render');
43 40
44 this._shouldLoadLoginHistory = true; 41 this._shouldLoadLoginHistory = true;
45 42
46 //this.render(); 43 //this.render();
47//MochiKit.Logging.logDebug("<<< new AccountPanel"); 44//MochiKit.Logging.logDebug("<<< new AccountPanel");
48 45
49 return this; 46 return this;
50} 47}
51 48
52//============================================================================= 49//=============================================================================
53 50
54YAHOO.extendX(Clipperz.PM.Components.Panels.AccountPanel, Clipperz.PM.Components.Panels.BasePanel, { 51YAHOO.extendX(Clipperz.PM.Components.Panels.AccountPanel, Clipperz.PM.Components.Panels.BasePanel, {
55 52
56 'toString': function() { 53 'toString': function() {
57 return "Clipperz.PM.Components.AccountPanel component"; 54 return "Clipperz.PM.Components.AccountPanel component";
58 }, 55 },
59 56
60 //------------------------------------------------------------------------- 57 //-------------------------------------------------------------------------
61 58
62 'render': function() { 59 'render': function() {
63 var errorMessageActor; 60 var errorMessageActor;
64 varchangePasswordButton; 61 varchangePasswordButton;
65 var deleteAccountButton; 62 var deleteAccountButton;
66 63
67try { 64try {
68//MochiKit.Logging.logDebug(">>> AccountPanel.render"); 65//MochiKit.Logging.logDebug(">>> AccountPanel.render");
69 Clipperz.NotificationCenter.unregister(this); 66 Clipperz.NotificationCenter.unregister(this);
70 MochiKit.Signal.disconnectAllTo(this); 67 MochiKit.Signal.disconnectAllTo(this);
71 68
72 this.element().update(""); 69 this.element().update("");
73 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ 70 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[
74 {tag:'tbody', children:[ 71 {tag:'tbody', children:[
75 {tag:'tr', children:[ 72 {tag:'tr', children:[
76 {tag:'td', valign:'top', width:'200', children:[ 73 {tag:'td', valign:'top', width:'200', children:[
77 {tag:'ul', id:"accountSubMenu", cls:'subMenu', children:[ 74 {tag:'ul', id:"accountSubMenu", cls:'subMenu', children:[
78 {tag:'li', id:'changePassphraseTab', htmlString:Clipperz.PM.Strings['changePasswordTabLabel']}, 75 {tag:'li', id:'changePassphraseTab', htmlString:Clipperz.PM.Strings['changePasswordTabLabel']},
79 {tag:'li', id:'manageOTPTab', htmlString:Clipperz.PM.Strings['manageOTPTabLabel']}, 76 {tag:'li', id:'manageOTPTab', htmlString:Clipperz.PM.Strings['manageOTPTabLabel']},
80 {tag:'li', id:'accountPreferencesTab', htmlString:Clipperz.PM.Strings['accountPreferencesLabel']}, 77 {tag:'li', id:'accountPreferencesTab', htmlString:Clipperz.PM.Strings['accountPreferencesLabel']},
81 {tag:'li', id:'loginHistoryTab', htmlString:Clipperz.PM.Strings['accountLoginHistoryLabel']}, 78 {tag:'li', id:'loginHistoryTab', htmlString:Clipperz.PM.Strings['accountLoginHistoryLabel']},
82 {tag:'li', id:'deleteAccountTab', htmlString:Clipperz.PM.Strings['deleteAccountTabLabel']} 79 {tag:'li', id:'deleteAccountTab', htmlString:Clipperz.PM.Strings['deleteAccountTabLabel']}
83 // {tag:'li', id:'paidAccountTab'), htmlString:Clipperz.PM.Strings['paidAccountTabLabel']} 80 // {tag:'li', id:'paidAccountTab'), htmlString:Clipperz.PM.Strings['paidAccountTabLabel']}
84 ]} 81 ]}
85 ]}, 82 ]},
86 {tag:'td', valign:'top', children:[ 83 {tag:'td', valign:'top', children:[
87 {tag:'ul', cls:'clipperzTabPanels', children:[ 84 {tag:'ul', cls:'clipperzTabPanels', children:[
88 {tag:'li', id:this.getId('changePassphrasePanel'), children:[ 85 {tag:'li', id:this.getId('changePassphrasePanel'), children:[
89 {tag:'div', cls:'clipperzSubPanel', children:[ 86 {tag:'div', cls:'clipperzSubPanel', children:[
90 {tag:'h5', htmlString:Clipperz.PM.Strings['changePasswordTabTitle']}, 87 {tag:'h5', htmlString:Clipperz.PM.Strings['changePasswordTabTitle']},
91 {tag:'div', cls:'panelBody', id:'changePassphraseBlock', children:[ 88 {tag:'div', cls:'panelBody', id:'changePassphraseBlock', children:[
92 {tag:'form', id:this.getId('changePassphraseForm'), children:[ 89 {tag:'form', id:this.getId('changePassphraseForm'), children:[
93 {tag:'h5', cls:'errorMessage', id:this.getId('changePassphrase_errorMessage')}, 90 {tag:'h5', cls:'errorMessage', id:this.getId('changePassphrase_errorMessage')},
94 {tag:'table', cls:'panelBody', children:[ 91 {tag:'table', cls:'panelBody', children:[
95 {tag:'tr', children:[ 92 {tag:'tr', children:[
96 {tag:'td', children:[ 93 {tag:'td', children:[
97 {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormUsernameLabel']} 94 {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormUsernameLabel']}
98 ]}, 95 ]},
99 {tag:'td', children:[ 96 {tag:'td', children:[
100 {tag:'input', type:'text', name:'username', id:this.getId('changePassphrase_username')} 97 {tag:'input', type:'text', name:'username', id:this.getId('changePassphrase_username')}
101 ]} 98 ]}
102 ]}, 99 ]},
103 {tag:'tr', children:[ 100 {tag:'tr', children:[
104 {tag:'td', children:[ 101 {tag:'td', children:[
105 {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormOldPassphraseLabel']} 102 {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormOldPassphraseLabel']}
106 ]}, 103 ]},
107 {tag:'td', children:[ 104 {tag:'td', children:[
108 {tag:'input', type:'password', name:'oldPassphrase', id:this.getId('changePassphrase_oldPassphrase')} 105 {tag:'input', type:'password', name:'oldPassphrase', id:this.getId('changePassphrase_oldPassphrase')}
109 ]} 106 ]}
110 ]}, 107 ]},
111 {tag:'tr', children:[ 108 {tag:'tr', children:[
112 {tag:'td', children:[ 109 {tag:'td', children:[
113 {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormNewPassphraseLabel']} 110 {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormNewPassphraseLabel']}
114 ]}, 111 ]},
115 {tag:'td', children:[ 112 {tag:'td', children:[
116 {tag:'input', type:'password', name:'newPassphrase', id:this.getId('changePassphrase_newPassphrase')} 113 {tag:'input', type:'password', name:'newPassphrase', id:this.getId('changePassphrase_newPassphrase')}
117 ]} 114 ]}
118 ]}, 115 ]},
119 {tag:'tr', children:[ 116 {tag:'tr', children:[
120 {tag:'td', children:[ 117 {tag:'td', children:[
121 {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormRetypePassphraseLabel']} 118 {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormRetypePassphraseLabel']}
122 ]}, 119 ]},
123 {tag:'td', children:[ 120 {tag:'td', children:[
124 {tag:'input', type:'password', name:'renewPassphrase', id:this.getId('changePassphrase_renewPassphrase')} 121 {tag:'input', type:'password', name:'renewPassphrase', id:this.getId('changePassphrase_renewPassphrase')}
125 ]} 122 ]}
126 ]}, 123 ]},
127 {tag:'tr', children:[ 124 {tag:'tr', children:[
128 {tag:'td', align:'right', children:[ 125 {tag:'td', align:'right', children:[
129 {tag:'input', type:'checkbox', id:this.getId('changePassphrase_safetyCheck')} 126 {tag:'input', type:'checkbox', id:this.getId('changePassphrase_safetyCheck')}
130 ]}, 127 ]},
131 {tag:'td', children:[ 128 {tag:'td', children:[
132 {tag:'span', htmlString:Clipperz.PM.Strings['changePasswordFormSafetyCheckboxLabel']} 129 {tag:'span', htmlString:Clipperz.PM.Strings['changePasswordFormSafetyCheckboxLabel']}
133 ]} 130 ]}
134 ]} 131 ]}
135 ]}, 132 ]},
136 {tag:'div', cls:'clipperzSubPanelButtonBox', children:[ 133 {tag:'div', cls:'clipperzSubPanelButtonBox', children:[
137 {tag:'div', id:this.getId('changePassphraseButton')} 134 {tag:'div', id:this.getId('changePassphraseButton')}
138 ]} 135 ]}
139 ]} 136 ]}
140 ]} 137 ]}
141 ]} 138 ]}
142 ]}, 139 ]},
143 {tag:'li', id:this.getId('manageOTPPanel'), children:[ 140 {tag:'li', id:this.getId('manageOTPPanel'), children:[
144 {tag:'div', cls:'clipperzSubPanel', children:[ 141 {tag:'div', cls:'clipperzSubPanel', children:[
145 {tag:'h5', htmlString:Clipperz.PM.Strings['manageOTPTabTitle']}, 142 {tag:'h5', htmlString:Clipperz.PM.Strings['manageOTPTabTitle']},
146 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['manageOTPTabDescription']}, 143 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['manageOTPTabDescription']},
147 {tag:'div', id:'OTPComponent'} 144 {tag:'div', id:'OTPComponent'}
148 ]} 145 ]}
149 ]}, 146 ]},
150 {tag:'li', id:this.getId('accountPreferencesPanel'), children:[ 147 {tag:'li', id:this.getId('accountPreferencesPanel'), children:[
151 {tag:'div', cls:'clipperzSubPanel', children:[ 148 {tag:'div', cls:'clipperzSubPanel', children:[
152 {tag:'h5', htmlString:Clipperz.PM.Strings['accountPreferencesTabTitle']}, 149 {tag:'h5', htmlString:Clipperz.PM.Strings['accountPreferencesTabTitle']},
153 {tag:'div', cls:'panelBody', id:this.getId('preferencesPanelBody')} 150 {tag:'div', cls:'panelBody', id:this.getId('preferencesPanelBody')}
154 ]} 151 ]}
155 ]}, 152 ]},
156 {tag:'li', id:this.getId('loginHistoryAccountPanel'), children:[ 153 {tag:'li', id:this.getId('loginHistoryAccountPanel'), children:[
157 {tag:'div', cls:'clipperzSubPanel', children:[ 154 {tag:'div', cls:'clipperzSubPanel', children:[
158 {tag:'h5', htmlString:Clipperz.PM.Strings['loginHistoryTabTitle']}, 155 {tag:'h5', htmlString:Clipperz.PM.Strings['loginHistoryTabTitle']},
159 {tag:'div', cls:'panelBody', id:'loginHistoryAccountBlock'} 156 {tag:'div', cls:'panelBody', id:'loginHistoryAccountBlock'}
160 ]} 157 ]}
161 ]}, 158 ]},
162 {tag:'li', id:this.getId('deleteAccountPanel'), children:[ 159 {tag:'li', id:this.getId('deleteAccountPanel'), children:[
163 {tag:'div', cls:'clipperzSubPanel', children:[ 160 {tag:'div', cls:'clipperzSubPanel', children:[
164 {tag:'h5', htmlString:Clipperz.PM.Strings['deleteAccountTabTitle']}, 161 {tag:'h5', htmlString:Clipperz.PM.Strings['deleteAccountTabTitle']},
165 162
166 {tag:'div', cls:'panelBody', id:'deleteAccountBlock', children:[ 163 {tag:'div', cls:'panelBody', id:'deleteAccountBlock', children:[
167 {tag:'form', id:this.getId('deleteAccountForm'), children:[ 164 {tag:'form', id:this.getId('deleteAccountForm'), children:[
168 {tag:'h5', cls:'errorMessage', id:this.getId('deleteAccount_errorMessage')}, 165 {tag:'h5', cls:'errorMessage', id:this.getId('deleteAccount_errorMessage')},
169 {tag:'table', cls:'panelBody', children:[ 166 {tag:'table', cls:'panelBody', children:[
170 {tag:'tr', children:[ 167 {tag:'tr', children:[
171 {tag:'td', children:[ 168 {tag:'td', children:[
172 {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['deleteAccountFormUsernameLabel']} 169 {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['deleteAccountFormUsernameLabel']}
173 ]}, 170 ]},
174 {tag:'td', children:[ 171 {tag:'td', children:[
175 {tag:'input', type:'text', name:'username', id:this.getId('deleteAccount_username')} 172 {tag:'input', type:'text', name:'username', id:this.getId('deleteAccount_username')}
176 ]} 173 ]}
177 ]}, 174 ]},
178 {tag:'tr', children:[ 175 {tag:'tr', children:[
179 {tag:'td', children:[ 176 {tag:'td', children:[
180 {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['deleteAccountFormPassphraseLabel']} 177 {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['deleteAccountFormPassphraseLabel']}
181 ]}, 178 ]},
182 {tag:'td', children:[ 179 {tag:'td', children:[
183 {tag:'input', type:'password', name:'passphrase', id:this.getId('deleteAccount_passphrase')} 180 {tag:'input', type:'password', name:'passphrase', id:this.getId('deleteAccount_passphrase')}
184 ]} 181 ]}
185 ]}, 182 ]},
186 {tag:'tr', children:[ 183 {tag:'tr', children:[
187 {tag:'td', align:'right', children:[ 184 {tag:'td', align:'right', children:[
188 {tag:'input', type:'checkbox', id:this.getId('deleteAccount_safetyCheck')} 185 {tag:'input', type:'checkbox', id:this.getId('deleteAccount_safetyCheck')}
189 ]}, 186 ]},
190 {tag:'td', children:[ 187 {tag:'td', children:[
191 {tag:'span', htmlString:Clipperz.PM.Strings['deleteAccountFormSafetyCheckboxLabel']} 188 {tag:'span', htmlString:Clipperz.PM.Strings['deleteAccountFormSafetyCheckboxLabel']}
192 ]} 189 ]}
193 ]} 190 ]}
194 ]}, 191 ]},
195 {tag:'div', cls:'clipperzSubPanelButtonBox', children:[ 192 {tag:'div', cls:'clipperzSubPanelButtonBox', children:[
196 {tag:'div', id:this.getId('deleteAccountButton')} 193 {tag:'div', id:this.getId('deleteAccountButton')}
197 ]} 194 ]}
198 ]} 195 ]}
199 ]} 196 ]}
200 ]} 197 ]}
201 ]} 198 ]}
202 /* 199 /*
203 {tag:'li', id:this.getId('paidAccountPanel'), children:[ 200 {tag:'li', id:this.getId('paidAccountPanel'), children:[
204 {tag:'div', cls:'clipperzSubPanel', children:[ 201 {tag:'div', cls:'clipperzSubPanel', children:[
205 {tag:'h5', htmlString:Clipperz.PM.Strings['upgradeAccountTabTitle']}, 202 {tag:'h5', htmlString:Clipperz.PM.Strings['upgradeAccountTabTitle']},
206 {tag:'div', htmlString:Clipperz.PM.Strings['comingSoon']} 203 {tag:'div', htmlString:Clipperz.PM.Strings['comingSoon']}
207 ]} 204 ]}
208 ]} 205 ]}
209*/ 206*/
210 ]} 207 ]}
211 ]} 208 ]}
212 ]} 209 ]}
213 ]} 210 ]}
214 ]}); 211 ]});
215 212
216//MochiKit.Logging.logDebug("--- AccountPanel.render - 1"); 213//MochiKit.Logging.logDebug("--- AccountPanel.render - 1");
217 MochiKit.Signal.connect(this.getId('changePassphraseForm'), 'onkeydown', this, 'onkeydown'); 214 MochiKit.Signal.connect(this.getId('changePassphraseForm'), 'onkeydown', this, 'onkeydown');
218 errorMessageActor = this.getActor('changePassphrase_errorMessage'); 215 errorMessageActor = this.getActor('changePassphrase_errorMessage');
219 errorMessageActor.setVisibilityMode(YAHOO.ext.Element.DISPLAY); 216 errorMessageActor.setVisibilityMode(YAHOO.ext.Element.DISPLAY);
220 errorMessageActor.update("---"); 217 errorMessageActor.update("---");
221 errorMessageActor.hide(); 218 errorMessageActor.hide();
222 changePasswordButton = new YAHOO.ext.Button(this.getDom('changePassphraseButton'), {text:Clipperz.PM.Strings['changePasswordFormSubmitLabel'], handler:this.doChangePassphrase, scope:this}); 219 changePasswordButton = new YAHOO.ext.Button(this.getDom('changePassphraseButton'), {text:Clipperz.PM.Strings['changePasswordFormSubmitLabel'], handler:this.doChangePassphrase, scope:this});
223 220
224//MochiKit.Logging.logDebug("--- AccountPanel.render - 2"); 221//MochiKit.Logging.logDebug("--- AccountPanel.render - 2");
225 222
226 MochiKit.Signal.connect(this.getId('deleteAccountForm'), 'onkeydown', this, 'onkeydown'); 223 MochiKit.Signal.connect(this.getId('deleteAccountForm'), 'onkeydown', this, 'onkeydown');
227 errorMessageActor = this.getActor('deleteAccount_errorMessage'); 224 errorMessageActor = this.getActor('deleteAccount_errorMessage');
228 errorMessageActor.setVisibilityMode(YAHOO.ext.Element.DISPLAY); 225 errorMessageActor.setVisibilityMode(YAHOO.ext.Element.DISPLAY);
229 errorMessageActor.update(Clipperz.PM.Strings['deleteAccountFormEmptyErrorMessage']); 226 errorMessageActor.update(Clipperz.PM.Strings['deleteAccountFormEmptyErrorMessage']);
230 errorMessageActor.hide(); 227 errorMessageActor.hide();
231 deleteAccountButton = new YAHOO.ext.Button(this.getDom('deleteAccountButton'), {text:Clipperz.PM.Strings['deleteAccountFormSubmitLabel'], handler:this.doDeleteAccount, scope:this}); 228 deleteAccountButton = new YAHOO.ext.Button(this.getDom('deleteAccountButton'), {text:Clipperz.PM.Strings['deleteAccountFormSubmitLabel'], handler:this.doDeleteAccount, scope:this});
232//MochiKit.Logging.logDebug("--- AccountPanel.render - 5"); 229//MochiKit.Logging.logDebug("--- AccountPanel.render - 5");
233 230
234 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { 231 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) {
235 this.getElement('changePassphraseForm').addClass('read-only'); 232 this.getElement('changePassphraseForm').addClass('read-only');
236 // this.getElement('accountPreferencesForm').addClass('read-only'); 233 // this.getElement('accountPreferencesForm').addClass('read-only');
237 this.getElement('deleteAccountForm').addClass('read-only'); 234 this.getElement('deleteAccountForm').addClass('read-only');
238 changePasswordButton.disable(); 235 changePasswordButton.disable();
239 deleteAccountButton.disable(); 236 deleteAccountButton.disable();
240 } 237 }
241//MochiKit.Logging.logDebug("--- AccountPanel.render - 6"); 238//MochiKit.Logging.logDebug("--- AccountPanel.render - 6");
242 239
243 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('changePassphrase_oldPassphrase')); 240 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('changePassphrase_oldPassphrase'));
244 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('changePassphrase_newPassphrase')); 241 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('changePassphrase_newPassphrase'));
245 242
246 new Clipperz.PM.Components.OTP.MainComponent(YAHOO.ext.Element.get('OTPComponent'), {user:this.user()}); 243 new Clipperz.PM.Components.OTP.MainComponent(YAHOO.ext.Element.get('OTPComponent'), {user:this.user()});
247 244
248 this.tabPanelController().setUp(); 245 this.tabPanelController().setUp();
249 Clipperz.NotificationCenter.register(null, 'tabSelected', this, 'tabSelectedHandler'); 246 Clipperz.NotificationCenter.register(null, 'tabSelected', this, 'tabSelectedHandler');
250 Clipperz.NotificationCenter.register(null, 'updatedPreferences', this, 'renderPreferences'); 247 Clipperz.NotificationCenter.register(null, 'updatedPreferences', this, 'renderPreferences');
251 Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler'); 248 Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler');
252//MochiKit.Logging.logDebug("<<< AccountPanel.render"); 249//MochiKit.Logging.logDebug("<<< AccountPanel.render");
253 250
254} catch(exception) { 251} catch(exception) {
255 MochiKit.Logging.logError("### " + exception); 252 MochiKit.Logging.logError("### " + exception);
256 throw exception; 253 throw exception;
257} 254}
258 }, 255 },
259 256
260 //------------------------------------------------------------------------- 257 //-------------------------------------------------------------------------
261 258
262 'tabPanelController': function() { 259 'tabPanelController': function() {
263 if (this._tabPanelController == null) { 260 if (this._tabPanelController == null) {
264 var tabPanelControllerConfig; 261 var tabPanelControllerConfig;
265 262
266 tabPanelControllerConfig = {} 263 tabPanelControllerConfig = {}
267 tabPanelControllerConfig['changePassphraseTab'] = this.getId('changePassphrasePanel'); 264 tabPanelControllerConfig['changePassphraseTab'] = this.getId('changePassphrasePanel');
268 tabPanelControllerConfig['manageOTPTab'] = this.getId('manageOTPPanel'); 265 tabPanelControllerConfig['manageOTPTab'] = this.getId('manageOTPPanel');
269 tabPanelControllerConfig['accountPreferencesTab'] = this.getId('accountPreferencesPanel'); 266 tabPanelControllerConfig['accountPreferencesTab'] = this.getId('accountPreferencesPanel');
270 tabPanelControllerConfig['loginHistoryTab'] = this.getId('loginHistoryAccountPanel'); 267 tabPanelControllerConfig['loginHistoryTab'] = this.getId('loginHistoryAccountPanel');
271 tabPanelControllerConfig['deleteAccountTab'] = this.getId('deleteAccountPanel'); 268 tabPanelControllerConfig['deleteAccountTab'] = this.getId('deleteAccountPanel');
272 // tabPanelControllerConfig['paidAccountTab'] = this.getId('paidAccountPanel'); 269 // tabPanelControllerConfig['paidAccountTab'] = this.getId('paidAccountPanel');
273 270
274 this._tabPanelController = new Clipperz.PM.Components.TabPanel.TabPanelController({ 271 this._tabPanelController = new Clipperz.PM.Components.TabPanel.TabPanelController({
275 name:'accountTabPanel', 272 name:'accountTabPanel',
276 config:tabPanelControllerConfig, 273 config:tabPanelControllerConfig,
277 selectedTab:'changePassphraseTab' 274 selectedTab:'changePassphraseTab'
278 }); 275 });
279 } 276 }
280 277
281 return this._tabPanelController; 278 return this._tabPanelController;
282 }, 279 },
283 280
284 //------------------------------------------------------------------------- 281 //-------------------------------------------------------------------------
285 282
286 'doChangePassphrase': function() { 283 'doChangePassphrase': function() {
287 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly() == false) { 284 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly() == false) {
288 varusername; 285 varusername;
289 varoldPassphrase; 286 varoldPassphrase;
290 var newPassphrase; 287 var newPassphrase;
291 var renewPassphrase; 288 var renewPassphrase;
292 var safetyCheck; 289 var safetyCheck;
293 varareThereAnyErrors; 290 varareThereAnyErrors;
294 var errorMessageActor; 291 var errorMessageActor;
295 292
296 errorMessageActor = this.getActor('changePassphrase_errorMessage'); 293 errorMessageActor = this.getActor('changePassphrase_errorMessage');
297 294
298 areThereAnyErrors = false; 295 areThereAnyErrors = false;
299 username = this.getDom('changePassphrase_username').value; 296 username = this.getDom('changePassphrase_username').value;
300 oldPassphrase= this.getDom('changePassphrase_oldPassphrase').value; 297 oldPassphrase= this.getDom('changePassphrase_oldPassphrase').value;
301 newPassphrase= this.getDom('changePassphrase_newPassphrase').value; 298 newPassphrase= this.getDom('changePassphrase_newPassphrase').value;
302 renewPassphrase= this.getDom('changePassphrase_renewPassphrase').value; 299 renewPassphrase= this.getDom('changePassphrase_renewPassphrase').value;
303 safetyCheck = this.getDom('changePassphrase_safetyCheck').checked; 300 safetyCheck = this.getDom('changePassphrase_safetyCheck').checked;
304 301
305 if (this.user().username() != username) { 302 if (this.user().username() != username) {
306 this.showFormErrorMessageAnimation(errorMessageActor, Clipperz.PM.Strings['changePasswordFormWrongUsernameWarning']); 303 this.showFormErrorMessageAnimation(errorMessageActor, Clipperz.PM.Strings['changePasswordFormWrongUsernameWarning']);
307 this.getElement('changePassphrase_username').focus().dom.select(); 304 this.getElement('changePassphrase_username').focus().dom.select();
308 areThereAnyErrors = true; 305 areThereAnyErrors = true;
309 } else if (this.user().passphrase() != oldPassphrase) { 306 } else if (this.user().passphrase() != oldPassphrase) {
310 this.showFormErrorMessageAnimation(errorMessageActor, Clipperz.PM.Strings['changePasswordFormWrongPassphraseWarning']); 307 this.showFormErrorMessageAnimation(errorMessageActor, Clipperz.PM.Strings['changePasswordFormWrongPassphraseWarning']);
311 this.getElement('changePassphrase_oldPassphrase').focus().dom.select(); 308 this.getElement('changePassphrase_oldPassphrase').focus().dom.select();
312 areThereAnyErrors = true; 309 areThereAnyErrors = true;
313 } else if (newPassphrase != renewPassphrase) { 310 } else if (newPassphrase != renewPassphrase) {
314 this.showFormErrorMessageAnimation(errorMessageActor, Clipperz.PM.Strings['changePasswordFormWrongRetypePassphraseWarning']); 311 this.showFormErrorMessageAnimation(errorMessageActor, Clipperz.PM.Strings['changePasswordFormWrongRetypePassphraseWarning']);
315 this.getElement('changePassphrase_renewPassphrase').focus().dom.select(); 312 this.getElement('changePassphrase_renewPassphrase').focus().dom.select();
316 areThereAnyErrors = true; 313 areThereAnyErrors = true;
317 } else if (safetyCheck != true) { 314 } else if (safetyCheck != true) {
318 this.showFormErrorMessageAnimation(errorMessageActor, Clipperz.PM.Strings['changePasswordFormSafetyCheckWarning']); 315 this.showFormErrorMessageAnimation(errorMessageActor, Clipperz.PM.Strings['changePasswordFormSafetyCheckWarning']);
319 this.getElement('changePassphrase_safetyCheck').focus(); 316 this.getElement('changePassphrase_safetyCheck').focus();
320 areThereAnyErrors = true; 317 areThereAnyErrors = true;
321 } 318 }
322 319
323 if (areThereAnyErrors == false) { 320 if (areThereAnyErrors == false) {
324 errorMessageActor.hide(); 321 errorMessageActor.hide();
325 this.doChangePassphraseWithUsernameAndPassphrase(username, newPassphrase); 322 this.doChangePassphraseWithUsernameAndPassphrase(username, newPassphrase);
326 } 323 }
327 } 324 }
328 }, 325 },
329 326
330 //------------------------------------------------------------------------- 327 //-------------------------------------------------------------------------
331 328
332 'doChangePassphraseWithUsernameAndPassphrase': function(anUsername, aPassphrase) { 329 'doChangePassphraseWithUsernameAndPassphrase': function(anUsername, aPassphrase) {
333 var deferredResult; 330 var deferredResult;
334 331
335//MochiKit.Logging.logDebug(">>> AccountPanel.doChangePassphraseWithUsernameAndPassphrase - this.user: " + this.user()); 332//MochiKit.Logging.logDebug(">>> AccountPanel.doChangePassphraseWithUsernameAndPassphrase - this.user: " + this.user());
336 deferredResult = new MochiKit.Async.Deferred(); 333 deferredResult = new MochiKit.Async.Deferred();
337//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 1: " + res); return res;}); 334//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 1: " + res); return res;});
338 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Components.MessageBox(), 'deferredShow'), 335 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Components.MessageBox(), 'deferredShow'),
339 { 336 {
340 title:Clipperz.PM.Strings['changePasswordFormProgressDialogTitle'], 337 title:Clipperz.PM.Strings['changePasswordFormProgressDialogTitle'],
341 text:Clipperz.PM.Strings['changePasswordFormProgressDialogEmptyText'], 338 text:Clipperz.PM.Strings['changePasswordFormProgressDialogEmptyText'],
342 width:240, 339 width:240,
343 showProgressBar:true, 340 showProgressBar:true,
344 showCloseButton:false, 341 showCloseButton:false,
345 steps:4 342 steps:4
346 }, 343 },
347 this.getDom('changePassphraseButton') 344 this.getDom('changePassphraseButton')
348 ); 345 );
349//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 2: " + res); return res;}); 346//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 2: " + res); return res;});
350 deferredResult.addCallback(MochiKit.Base.method(this.user(), 'changeCredentials'), anUsername, aPassphrase); 347 deferredResult.addCallback(MochiKit.Base.method(this.user(), 'changeCredentials'), anUsername, aPassphrase);
351//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 3: " + res); return res;}); 348//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 3: " + res); return res;});
352 deferredResult.addCallback(function() { 349 deferredResult.addCallback(function() {
353 Clipperz.PM.Components.MessageBox().update({ 350 Clipperz.PM.Components.MessageBox().update({
354 title:Clipperz.PM.Strings['changePasswordFormProgressDialogConnectedMessageTitle'], 351 title:Clipperz.PM.Strings['changePasswordFormProgressDialogConnectedMessageTitle'],
355 text:Clipperz.PM.Strings['changePasswordFormProgressDialogConnectedMessageText'], 352 text:Clipperz.PM.Strings['changePasswordFormProgressDialogConnectedMessageText'],
356 /*showProgressBar:false,*/ 353 /*showProgressBar:false,*/
357 step:'next' 354 step:'next'
358 }); 355 });
359 }); 356 });
360//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 4: " + res); return res;}); 357//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 4: " + res); return res;});
361 deferredResult.addCallback(MochiKit.Async.wait, 1); 358 deferredResult.addCallback(MochiKit.Async.wait, 1);
362//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 5: " + res); return res;}); 359//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 5: " + res); return res;});
363 deferredResult.addCallback(function(anAccountPanel, res) { 360 deferredResult.addCallback(function(anAccountPanel, res) {
364 Clipperz.PM.Components.MessageBox().hide(YAHOO.ext.Element.get('main')); 361 Clipperz.PM.Components.MessageBox().hide(YAHOO.ext.Element.get('main'));
365 362
366 anAccountPanel.getDom('changePassphrase_username').value = ""; 363 anAccountPanel.getDom('changePassphrase_username').value = "";
367 anAccountPanel.getDom('changePassphrase_oldPassphrase').value = ""; 364 anAccountPanel.getDom('changePassphrase_oldPassphrase').value = "";
368 anAccountPanel.getElement('changePassphrase_oldPassphrase').focus(); 365 anAccountPanel.getElement('changePassphrase_oldPassphrase').focus();
369 anAccountPanel.getDom('changePassphrase_newPassphrase').value = ""; 366 anAccountPanel.getDom('changePassphrase_newPassphrase').value = "";
370 anAccountPanel.getElement('changePassphrase_newPassphrase').focus(); 367 anAccountPanel.getElement('changePassphrase_newPassphrase').focus();
371 anAccountPanel.getDom('changePassphrase_renewPassphrase').value = ""; 368 anAccountPanel.getDom('changePassphrase_renewPassphrase').value = "";
372 anAccountPanel.getDom('changePassphrase_safetyCheck').checked = false; 369 anAccountPanel.getDom('changePassphrase_safetyCheck').checked = false;
373 370
374 anAccountPanel.getElement('changePassphrase_username').focus(); 371 anAccountPanel.getElement('changePassphrase_username').focus();
375 return res; 372 return res;
376 }, this); 373 }, this);
377//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 6: " + res); return res;}); 374//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 6: " + res); return res;});
378 deferredResult.addErrback(function() { 375 deferredResult.addErrback(function() {
379 Clipperz.PM.Components.MessageBox().update({ 376 Clipperz.PM.Components.MessageBox().update({
380 title:Clipperz.PM.Strings['changePasswordFormProgressDialogErrorMessageTitle'], 377 title:Clipperz.PM.Strings['changePasswordFormProgressDialogErrorMessageTitle'],
381 text:Clipperz.PM.Strings['changePasswordFormProgressDialogErrorMessageText'], 378 text:Clipperz.PM.Strings['changePasswordFormProgressDialogErrorMessageText'],
382 buttons:{'ok':"close"} 379 buttons:{'ok':"close"}
383 }); 380 });
384 }); 381 });
385//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 7: " + res); return res;}); 382//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 7: " + res); return res;});
386 deferredResult.callback(); 383 deferredResult.callback();
387 384
388//MochiKit.Logging.logDebug("<<< AccountPanel.doChangePassphraseWithUsernameAndPassphrase"); 385//MochiKit.Logging.logDebug("<<< AccountPanel.doChangePassphraseWithUsernameAndPassphrase");
389 }, 386 },
390 387
391 //------------------------------------------------------------------------- 388 //-------------------------------------------------------------------------
392 389
393 'doDeleteAccount': function() { 390 'doDeleteAccount': function() {
394 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly() == false) { 391 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly() == false) {
395 varusername; 392 varusername;
396 varpassphrase; 393 varpassphrase;
397 var safetyCheck; 394 var safetyCheck;
398 varareThereAnyErrors; 395 varareThereAnyErrors;
399 var errorMessageActor; 396 var errorMessageActor;
400 397
401 errorMessageActor = this.getActor('deleteAccount_errorMessage'); 398 errorMessageActor = this.getActor('deleteAccount_errorMessage');
402 399
403 areThereAnyErrors = false; 400 areThereAnyErrors = false;
404 username = this.getDom('deleteAccount_username').value; 401 username = this.getDom('deleteAccount_username').value;
405 passphrase= this.getDom('deleteAccount_passphrase').value; 402 passphrase= this.getDom('deleteAccount_passphrase').value;
406 safetyCheck = this.getDom('deleteAccount_safetyCheck').checked; 403 safetyCheck = this.getDom('deleteAccount_safetyCheck').checked;
407 404
408 if (this.user().username() != username) { 405 if (this.user().username() != username) {
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/BasePanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/BasePanel.js
index bf60f45..15dd622 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Panels/BasePanel.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Panels/BasePanel.js
@@ -1,96 +1,93 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } 29if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; }
33 30
34//var _Clipperz_PM_Components_Panels_base_id_ = 0; 31//var _Clipperz_PM_Components_Panels_base_id_ = 0;
35 32
36//############################################################################# 33//#############################################################################
37 34
38Clipperz.PM.Components.Panels.BasePanel = function(anElement, args) { 35Clipperz.PM.Components.Panels.BasePanel = function(anElement, args) {
39 args = args || {}; 36 args = args || {};
40 37
41 Clipperz.PM.Components.Panels.BasePanel.superclass.constructor.call(this, anElement, args); 38 Clipperz.PM.Components.Panels.BasePanel.superclass.constructor.call(this, anElement, args);
42 39
43 this._user = args.user || null; 40 this._user = args.user || null;
44 this._delegate = args.delegate || null; 41 this._delegate = args.delegate || null;
45 this._tabPanelController = null; 42 this._tabPanelController = null;
46 //Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler'); 43 //Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler');
47 44
48 //this._ids = {}; 45 //this._ids = {};
49 46
50 return this; 47 return this;
51} 48}
52 49
53//============================================================================= 50//=============================================================================
54 51
55YAHOO.extendX(Clipperz.PM.Components.Panels.BasePanel, Clipperz.PM.Components.BaseComponent, { 52YAHOO.extendX(Clipperz.PM.Components.Panels.BasePanel, Clipperz.PM.Components.BaseComponent, {
56 53
57 'toString': function() { 54 'toString': function() {
58 return "Clipperz.PM.Components.Panels.BasePanel component"; 55 return "Clipperz.PM.Components.Panels.BasePanel component";
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 'setUser': function(aValue) { 64 'setUser': function(aValue) {
68 this._user = aValue; 65 this._user = aValue;
69 }, 66 },
70 67
71 //------------------------------------------------------------------------- 68 //-------------------------------------------------------------------------
72 69
73 'delegate': function() { 70 'delegate': function() {
74 return this._delegate; 71 return this._delegate;
75 }, 72 },
76 73
77 'setDelegate': function(aValue) { 74 'setDelegate': function(aValue) {
78 this._delegate = aValue; 75 this._delegate = aValue;
79 }, 76 },
80 77
81 //------------------------------------------------------------------------- 78 //-------------------------------------------------------------------------
82 79
83 'tabPanelController': function() { 80 'tabPanelController': function() {
84 return this._tabPanelController; 81 return this._tabPanelController;
85 }, 82 },
86 83
87 'switchLanguageHandler': function() { 84 'switchLanguageHandler': function() {
88//MochiKit.Logging.logDebug(">>> BasePanel.switchLanguageHandler [" + this.toString() + "]"); 85//MochiKit.Logging.logDebug(">>> BasePanel.switchLanguageHandler [" + this.toString() + "]");
89 this.render(); 86 this.render();
90//MochiKit.Logging.logDebug("<<< BasePanel.switchLanguageHandler [" + this.toString() + "]"); 87//MochiKit.Logging.logDebug("<<< BasePanel.switchLanguageHandler [" + this.toString() + "]");
91 }, 88 },
92 89
93 //------------------------------------------------------------------------- 90 //-------------------------------------------------------------------------
94 __syntaxFix__: "syntax fix" 91 __syntaxFix__: "syntax fix"
95 92
96}); 93});
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/ContactsPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/ContactsPanel.js
index f0eb9c8..5a91d83 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Panels/ContactsPanel.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Panels/ContactsPanel.js
@@ -1,105 +1,102 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } 29if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Components.Panels.ContactsPanel = function(anElement, args) { 33Clipperz.PM.Components.Panels.ContactsPanel = function(anElement, args) {
37 args = args || {}; 34 args = args || {};
38 35
39 Clipperz.PM.Components.Panels.ContactsPanel.superclass.constructor.call(this, anElement, args); 36 Clipperz.PM.Components.Panels.ContactsPanel.superclass.constructor.call(this, anElement, args);
40 37
41 this.render(); 38 this.render();
42 39
43 return this; 40 return this;
44} 41}
45 42
46//============================================================================= 43//=============================================================================
47 44
48YAHOO.extendX(Clipperz.PM.Components.Panels.ContactsPanel, Clipperz.PM.Components.Panels.BasePanel, { 45YAHOO.extendX(Clipperz.PM.Components.Panels.ContactsPanel, Clipperz.PM.Components.Panels.BasePanel, {
49 46
50 'toString': function() { 47 'toString': function() {
51 return "Clipperz.PM.Components.ContactsPanel component"; 48 return "Clipperz.PM.Components.ContactsPanel component";
52 }, 49 },
53 50
54 //------------------------------------------------------------------------- 51 //-------------------------------------------------------------------------
55 52
56 'render': function() { 53 'render': function() {
57 // var tabPanelControllerConfig; 54 // var tabPanelControllerConfig;
58 55
59 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ 56 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[
60 {tag:'tbody', children:[ 57 {tag:'tbody', children:[
61 {tag:'tr', children:[ 58 {tag:'tr', children:[
62 {tag:'td', valign:'top', width:'200', children:[ 59 {tag:'td', valign:'top', width:'200', children:[
63 {tag:'ul', id:"dataSubMenu", cls:'subMenu', children:[ 60 {tag:'ul', id:"dataSubMenu", cls:'subMenu', children:[
64 {tag:'li', id:this.getId('contacts'), htmlString:Clipperz.PM.Strings['contactsTabLabel']}, 61 {tag:'li', id:this.getId('contacts'), htmlString:Clipperz.PM.Strings['contactsTabLabel']},
65 ]} 62 ]}
66 ]}, 63 ]},
67 {tag:'td', valign:'top', children:[ 64 {tag:'td', valign:'top', children:[
68 {tag:'ul', cls:'clipperzTabPanels', children:[ 65 {tag:'ul', cls:'clipperzTabPanels', children:[
69 {tag:'li', id:this.getId('contactsPanel'), children:[ 66 {tag:'li', id:this.getId('contactsPanel'), children:[
70 {tag:'div', cls:'clipperzSubPanel', children:[ 67 {tag:'div', cls:'clipperzSubPanel', children:[
71 {tag:'h5', htmlString:Clipperz.PM.Strings['contactsTabTitle']}, 68 {tag:'h5', htmlString:Clipperz.PM.Strings['contactsTabTitle']},
72 {tag:'div', htmlString:Clipperz.PM.Strings['comingSoon']} 69 {tag:'div', htmlString:Clipperz.PM.Strings['comingSoon']}
73 ]} 70 ]}
74 ]} 71 ]}
75 ]} 72 ]}
76 ]} 73 ]}
77 ]} 74 ]}
78 ]} 75 ]}
79 ]}); 76 ]});
80 77
81 // tabPanelControllerConfig = {} 78 // tabPanelControllerConfig = {}
82 // tabPanelControllerConfig[this.getId('contacts')] = this.getId('contactsPanel'); 79 // tabPanelControllerConfig[this.getId('contacts')] = this.getId('contactsPanel');
83 // new Clipperz.PM.Components.TabPanel.TabPanelController({ config:tabPanelControllerConfig, selectedTab:this.getId('contacts') }); 80 // new Clipperz.PM.Components.TabPanel.TabPanelController({ config:tabPanelControllerConfig, selectedTab:this.getId('contacts') });
84 this.tabPanelController().setUp(); 81 this.tabPanelController().setUp();
85 }, 82 },
86 83
87 //------------------------------------------------------------------------- 84 //-------------------------------------------------------------------------
88 85
89 'tabPanelController': function() { 86 'tabPanelController': function() {
90 if (this._tabPanelController == null) { 87 if (this._tabPanelController == null) {
91 var tabPanelControllerConfig; 88 var tabPanelControllerConfig;
92 89
93 tabPanelControllerConfig = {} 90 tabPanelControllerConfig = {}
94 tabPanelControllerConfig[this.getId('contacts')] = this.getId('contactsPanel'); 91 tabPanelControllerConfig[this.getId('contacts')] = this.getId('contactsPanel');
95 this._tabPanelController = new Clipperz.PM.Components.TabPanel.TabPanelController({ config:tabPanelControllerConfig, selectedTab:this.getId('contacts') }); 92 this._tabPanelController = new Clipperz.PM.Components.TabPanel.TabPanelController({ config:tabPanelControllerConfig, selectedTab:this.getId('contacts') });
96 } 93 }
97 94
98 return this._tabPanelController; 95 return this._tabPanelController;
99 }, 96 },
100 97
101 //------------------------------------------------------------------------- 98 //-------------------------------------------------------------------------
102 __syntaxFix__: "syntax fix" 99 __syntaxFix__: "syntax fix"
103 100
104}); 101});
105 102
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/DataPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/DataPanel.js
index 759903f..11d4bd7 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Panels/DataPanel.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Panels/DataPanel.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } 29if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Components.Panels.DataPanel = function(anElement, args) { 33Clipperz.PM.Components.Panels.DataPanel = function(anElement, args) {
37 args = args || {}; 34 args = args || {};
38 35
39 Clipperz.PM.Components.Panels.DataPanel.superclass.constructor.call(this, anElement, args); 36 Clipperz.PM.Components.Panels.DataPanel.superclass.constructor.call(this, anElement, args);
40 37
41 this._progressWidth = 400; 38 this._progressWidth = 400;
42 39
43 40
44 this.render(); 41 this.render();
45 42
46 return this; 43 return this;
47} 44}
48 45
49//============================================================================= 46//=============================================================================
50 47
51YAHOO.extendX(Clipperz.PM.Components.Panels.DataPanel, Clipperz.PM.Components.Panels.BasePanel, { 48YAHOO.extendX(Clipperz.PM.Components.Panels.DataPanel, Clipperz.PM.Components.Panels.BasePanel, {
52 49
53 'toString': function() { 50 'toString': function() {
54 return "Clipperz.PM.Components.DataPanel component"; 51 return "Clipperz.PM.Components.DataPanel component";
55 }, 52 },
56 53
57 //------------------------------------------------------------------------- 54 //-------------------------------------------------------------------------
58 55
59 'render': function() { 56 'render': function() {
60 MochiKit.Signal.disconnectAllTo(this); 57 MochiKit.Signal.disconnectAllTo(this);
61 Clipperz.NotificationCenter.unregister(this); 58 Clipperz.NotificationCenter.unregister(this);
62 this.element().update(""); 59 this.element().update("");
63 60
64 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ 61 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[
65 {tag:'tbody', children:[ 62 {tag:'tbody', children:[
66 {tag:'tr', children:[ 63 {tag:'tr', children:[
67 {tag:'td', valign:'top', width:'200', children:[ 64 {tag:'td', valign:'top', width:'200', children:[
68 {tag:'ul', id:"dataSubMenu", cls:'subMenu', children:[ 65 {tag:'ul', id:"dataSubMenu", cls:'subMenu', children:[
69 {tag:'li', id:'offlineCopyTab', htmlString:Clipperz.PM.Strings['offlineCopyTabLabel']}, 66 {tag:'li', id:'offlineCopyTab', htmlString:Clipperz.PM.Strings['offlineCopyTabLabel']},
70 {tag:'li', id:'sharingTab', htmlString:Clipperz.PM.Strings['sharingTabLabel']}, 67 {tag:'li', id:'sharingTab', htmlString:Clipperz.PM.Strings['sharingTabLabel']},
71 {tag:'li', id:'importTab', htmlString:Clipperz.PM.Strings['importTabLabel']}, 68 {tag:'li', id:'importTab', htmlString:Clipperz.PM.Strings['importTabLabel']},
72 {tag:'li', id:'printingTab', htmlString:Clipperz.PM.Strings['printingTabLabel']} 69 {tag:'li', id:'printingTab', htmlString:Clipperz.PM.Strings['printingTabLabel']}
73 ]} 70 ]}
74 ]}, 71 ]},
75 {tag:'td', valign:'top', children:[ 72 {tag:'td', valign:'top', children:[
76 {tag:'ul', cls:'clipperzTabPanels', children:[ 73 {tag:'ul', cls:'clipperzTabPanels', children:[
77 {tag:'li', id:this.getId('offlineCopyPanel'), children:[ 74 {tag:'li', id:this.getId('offlineCopyPanel'), children:[
78 {tag:'div', cls:'clipperzSubPanel', children:[ 75 {tag:'div', cls:'clipperzSubPanel', children:[
79 {tag:'h5', htmlString:Clipperz.PM.Strings['offlineCopyTabTitle']}, 76 {tag:'h5', htmlString:Clipperz.PM.Strings['offlineCopyTabTitle']},
80 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['offlineCopyTabDescription']}, 77 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['offlineCopyTabDescription']},
81 {tag:'div', id:this.getId('offlineCopyLinkBox'), children:[ 78 {tag:'div', id:this.getId('offlineCopyLinkBox'), children:[
82 {tag:'a', id:'offlineCopyLink', href:'#', htmlString:Clipperz.PM.Strings['offlineCopyDownloadLinkLabel']} 79 {tag:'a', id:'offlineCopyLink', href:'#', htmlString:Clipperz.PM.Strings['offlineCopyDownloadLinkLabel']}
83 ]}, 80 ]},
84 {tag:'div', id:this.getId('offlineCopyLinkBox_read-only'), children:[ 81 {tag:'div', id:this.getId('offlineCopyLinkBox_read-only'), children:[
85 {tag:'span', cls:'read-only', htmlString:Clipperz.PM.Strings['offlineCopyDownloadLinkLabel']} 82 {tag:'span', cls:'read-only', htmlString:Clipperz.PM.Strings['offlineCopyDownloadLinkLabel']}
86 ]} 83 ]}
87 ]} 84 ]}
88 ]}, 85 ]},
89 {tag:'li', id:this.getId('sharingPanel'), children:[ 86 {tag:'li', id:this.getId('sharingPanel'), children:[
90 {tag:'div', cls:'clipperzSubPanel', children:[ 87 {tag:'div', cls:'clipperzSubPanel', children:[
91 {tag:'h5', htmlString:Clipperz.PM.Strings['sharingTabTitle']}, 88 {tag:'h5', htmlString:Clipperz.PM.Strings['sharingTabTitle']},
92 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['sharingTabDescription']} 89 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['sharingTabDescription']}
93 ]} 90 ]}
94 ]}, 91 ]},
95 {tag:'li', id:this.getId('importPanel'), children:[ 92 {tag:'li', id:this.getId('importPanel'), children:[
96 {tag:'div', cls:'clipperzSubPanel', children:[ 93 {tag:'div', cls:'clipperzSubPanel', children:[
97 {tag:'div', id:this.getId('importPanelMainComponent')} 94 {tag:'div', id:this.getId('importPanelMainComponent')}
98 ]} 95 ]}
99 ]}, 96 ]},
100 {tag:'li', id:this.getId('printingPanel'), children:[ 97 {tag:'li', id:this.getId('printingPanel'), children:[
101 {tag:'div', cls:'clipperzSubPanel', children:[ 98 {tag:'div', cls:'clipperzSubPanel', children:[
102 {tag:'h5', htmlString:Clipperz.PM.Strings['printingTabTitle']}, 99 {tag:'h5', htmlString:Clipperz.PM.Strings['printingTabTitle']},
103 100
104 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['printingTabDescription']}, 101 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['printingTabDescription']},
105 {tag:'div', id:this.getId('printingLinkBox'), children:[ 102 {tag:'div', id:this.getId('printingLinkBox'), children:[
106 {tag:'a', id:'printingLink', href:'#', htmlString:Clipperz.PM.Strings['printingLinkLabel']} 103 {tag:'a', id:'printingLink', href:'#', htmlString:Clipperz.PM.Strings['printingLinkLabel']}
107 ]}, 104 ]},
108 105
109 {tag:'hr'}, 106 {tag:'hr'},
110 107
111 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['exportTabDescription']}, 108 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['exportTabDescription']},
112 {tag:'div', id:this.getId('exportLinkBox'), children:[ 109 {tag:'div', id:this.getId('exportLinkBox'), children:[
113 {tag:'a', id:'exportLink', href:'#', htmlString:Clipperz.PM.Strings['exportLinkLabel']} 110 {tag:'a', id:'exportLink', href:'#', htmlString:Clipperz.PM.Strings['exportLinkLabel']}
114 ]} 111 ]}
115 ]} 112 ]}
116 ]} 113 ]}
117 ]} 114 ]}
118 ]} 115 ]}
119 ]} 116 ]}
120 ]} 117 ]}
121 ]}); 118 ]});
122 119
123 this.tabPanelController().setUp(); 120 this.tabPanelController().setUp();
124 121
125 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { 122 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) {
126 this.getElement('offlineCopyLinkBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 123 this.getElement('offlineCopyLinkBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
127 } else { 124 } else {
128 this.getElement('offlineCopyLinkBox_read-only').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 125 this.getElement('offlineCopyLinkBox_read-only').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
129 MochiKit.Signal.connect('offlineCopyLink', 'onclick', this, 'downloadOfflineCopy'); 126 MochiKit.Signal.connect('offlineCopyLink', 'onclick', this, 'downloadOfflineCopy');
130 } 127 }
131 128
132 new Clipperz.PM.Components.Import.MainComponent(this.getElement('importPanelMainComponent'), {user:this.user()}); 129 new Clipperz.PM.Components.Import.MainComponent(this.getElement('importPanelMainComponent'), {user:this.user()});
133 130
134 MochiKit.Signal.connect('printingLink', 'onclick', this, 'printAllData'); 131 MochiKit.Signal.connect('printingLink', 'onclick', this, 'printAllData');
135 MochiKit.Signal.connect('exportLink', 'onclick', this, 'exportAllData'); 132 MochiKit.Signal.connect('exportLink', 'onclick', this, 'exportAllData');
136 133
137 Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler'); 134 Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler');
138 }, 135 },
139 136
140 //------------------------------------------------------------------------- 137 //-------------------------------------------------------------------------
141 138
142 'tabPanelController': function() { 139 'tabPanelController': function() {
143 if (this._tabPanelController == null) { 140 if (this._tabPanelController == null) {
144 var tabPanelControllerConfig; 141 var tabPanelControllerConfig;
145 142
146 tabPanelControllerConfig = {} 143 tabPanelControllerConfig = {}
147 tabPanelControllerConfig['offlineCopyTab'] = this.getId('offlineCopyPanel'); 144 tabPanelControllerConfig['offlineCopyTab'] = this.getId('offlineCopyPanel');
148 tabPanelControllerConfig['sharingTab'] = this.getId('sharingPanel'); 145 tabPanelControllerConfig['sharingTab'] = this.getId('sharingPanel');
149 tabPanelControllerConfig['importTab'] = this.getId('importPanel'); 146 tabPanelControllerConfig['importTab'] = this.getId('importPanel');
150 tabPanelControllerConfig['printingTab'] = this.getId('printingPanel'); 147 tabPanelControllerConfig['printingTab'] = this.getId('printingPanel');
151 this._tabPanelController = new Clipperz.PM.Components.TabPanel.TabPanelController({ 148 this._tabPanelController = new Clipperz.PM.Components.TabPanel.TabPanelController({
152 name: 'dataTabPanel', 149 name: 'dataTabPanel',
153 config:tabPanelControllerConfig, 150 config:tabPanelControllerConfig,
154 selectedTab:'offlineCopyTab' 151 selectedTab:'offlineCopyTab'
155 }); 152 });
156 } 153 }
157 154
158 return this._tabPanelController; 155 return this._tabPanelController;
159 }, 156 },
160 157
161 //------------------------------------------------------------------------- 158 //-------------------------------------------------------------------------
162 159
163 'downloadOfflineCopy': function(anEvent) { 160 'downloadOfflineCopy': function(anEvent) {
164 var downloadHref; 161 var downloadHref;
165 162
166 downloadHref = window.location.href.replace(/\/[^\/]*$/,'') + Clipperz_dumpUrl; 163 downloadHref = window.location.href.replace(/\/[^\/]*$/,'') + Clipperz_dumpUrl;
167 164
168 if (Clipperz_IEisBroken == true) { 165 if (Clipperz_IEisBroken == true) {
169 window.open(downloadHref, ""); 166 window.open(downloadHref, "");
170 } else { 167 } else {
171 vardeferredResult; 168 vardeferredResult;
172 var newWindow; 169 var newWindow;
173 170
174 newWindow = window.open("", ""); 171 newWindow = window.open("", "");
175 172
176 anEvent.preventDefault(); 173 anEvent.preventDefault();
177 174
178 deferredResult = new MochiKit.Async.Deferred(); 175 deferredResult = new MochiKit.Async.Deferred();
179 deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'echo', {'echo':"echo"}); 176 deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'echo', {'echo':"echo"});
180 deferredResult.addCallback(function(aWindow) { 177 deferredResult.addCallback(function(aWindow) {
181 aWindow.location.href = downloadHref; 178 aWindow.location.href = downloadHref;
182 }, newWindow); 179 }, newWindow);
183 deferredResult.callback(); 180 deferredResult.callback();
184 } 181 }
185 }, 182 },
186 183
187 //------------------------------------------------------------------------- 184 //-------------------------------------------------------------------------
188 185
189 'compareRecords': function(a, b) { 186 'compareRecords': function(a, b) {
190 return MochiKit.Base.compare(a.label().toLowerCase(), b.label().toLowerCase()); 187 return MochiKit.Base.compare(a.label().toLowerCase(), b.label().toLowerCase());
191 }, 188 },
192 189
193 'logo': function() { 190 'logo': function() {
194 var result; 191 var result;
195 192
196 if (Clipperz_IEisBroken == true) { 193 if (Clipperz_IEisBroken == true) {
197 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { 194 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) {
198 result = "<span><span class=\"clipperzLogoSpan\">clipper</span><span class=\"clipperzLoggoZSpan\">z</span></span>"; 195 result = "<span><span class=\"clipperzLogoSpan\">clipper</span><span class=\"clipperzLoggoZSpan\">z</span></span>";
199 } else { 196 } else {
200 result = "<img src=\"./images/exportLogo.png\" />"; 197 result = "<img src=\"./images/exportLogo.png\" />";
201 } 198 }
202 } else { 199 } else {
203 result = "<img src=\"data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAANYAAABOCAIAAADTtH9XAAANIWlDQ1BJQ0MgUHJvZmlsZQAAeJyV13k0lG8bB/BrFsYyZhhjDyO77LKHLJFItmwp2bdhJiZRypIUIkso2iiSFC0kEtWPLCHJkq2oyJI9kmXeP6R6f+f9ve95rz+ecz3385xz389zzud7nxsAr+FKpZKRABAQSAuyNjEgOTg6kTBdgAJewAEzaLi6B1P1LS3N4R9roRMQAADtcq5UKvmf3/uPhQtycHQCQMgCANF7vd8OAES39d4WAIhHaFQaAMIHAIjuPq4eAIhwAJANsrU2BEAUAADOe70vBwCc23pfDwC4EHdvGgCiG4CREOjhGwiAmQBg1PXwDHYHwMkCgIdHsHsAAC4ZACwCAigeALgPACDlTg2iAeCZAEDOwdGJtL7kffEAW/kAmMx+jx1JByjNAZDa/XtM9BEAtytAbuLvsTlrQAAAgrs12EtFGQAAEFgDAIYBOn1OAgCTCrCaQqcv59Lpq9cBUH0ANWT3w0EhP/8XAtEM8L/u17/5Z6EQAEgAhBgiH3kUFY4OZzjBGImJZjrJbMRcy3Ka9Qw2ju0srozdhyOFkMKZSjzPlc6dzpPJW8tPEcjelC14WaiedFgkd/N10VbxYxL5km3SJ2Rub+mUi5a/o9CjdFr5vsp71bNqZeqDmklaFdrDOmm6T/XG9DMMnhtO7sgyrjOZNb26q9FsYXeuRcue15avrdqsV2wL93bYddp3OXQ7offdc+7b339gwOX9wQ9uWPfHHp88P3sNe4/4fPEd9eciPwv4GjhJmaJOH5oJmg2ep80f/haycGQx9HvY0tEfx1bCV46vRkhHdkQjTiJjUKfQsQynGc9g4pjimRNYzrImYpPYzuGS8SnsqRxphPOc6cQMrkzuCzwXebP4svkvCVzedEXwqtA14RxSrsj1zTdE88TyxW9KFkjekiqUvi1ze7yIfEf2rlyxQoniPaX7Sg+UH24tVS1TK1t4FFKu/lijQqtS+8m2qm1PdZ6uVUfU6D3b/lz/hcFfhrXo2pi6HS+N600aTBtNm1iaEl6ZNZu3WLTiWs+9tmyzemPdTmhPfWvTYdu5t4u7K7Pb/p1Dj1Mvf292n3O/88D+90Lvr35wGTw4JDKU+9Htk/tnj2Hx4fwRry/eoz5j0mOF434T/l/Jk3KTd6cCpykz1Fml2ftzQfPB32gLqgtliyHfQ5fCfoQtay1XrhxbDV/TWXtKpwMgRJE45DSqCX2bIY0xHOPNZMtsyLKVVRIrycaL48HzsvNycBEkOKWIGlzm3Ad4gnmT+Ir5mwRGBTmF1IS9SRdEXooixHTED0nck5ySlpIhb6mUQ8nrK6QoDipLq8Ru7VKTUadq1GrxaIdue6XLrUfZ/txAzPCYUZuxkEnozirTJTMlc8/d6RZtljgrE+tQmzzbt3Ys9tsdDjledqrbN7Vf+MAel6MHc11r3UY9uDz1vBy8T/hc863x6/dfCuAM3EIxovocCg9KDs6llR6uD+k9Mha6cBR1jCOcdFz2hGrE9kizqD3R+04ejPE8RY6lnQ46ExkXGX8yIe5samJCUta5i8mZKSmpl9JSz2ekX8goyLx54e7Fgqzb2cWXnlx+cqX26qtrbTntue3X22/05n3KH7k5VPD51lThzO2posk7s3enisdLJu6N3B98MPSwp7StrOFRTfmjx8UVlypTn0RWBTzdV21Ws+2ZzHPC86UXH/5qrH1Yl/YyqN6mQa1RoJHe1PPqYXN8i1OraOvw6wdtx9/saMe197+91uHXqdK52tXcnfZuf490z1xvRV90v9kAcWDg/a0PwYPaQ+ihxo/nPx34LPl5YrhiJOrLrlGu0f6xG+PkCdWJta8Nk6lT+6bFpidmHsyGz5nME+a7v+UtUBY1v6O+v1xK+bFvWXT560rZauSaKZ2bTgeAk4hQ5FGUNqoCfZxBj6GaMQpzismYqZY5luU0azx2F7aJLRGXiE9i38PeypFMSOVMI6Zx2XK95c7gyeC9wJfFny2QvemSoLNgv9BV4WukHJGczTmi18VuiOdJ5EvelCqQviXjKzO2pVC2SO6O/F2FYsUSpXvK91UebH2oWqZWpl6mEarxXbNCq0K7ctsTnSrdE7pretXba/SfGTw3fGEUswO9o9a4zuTlznrThl2NZgnmWPNXu5stWva0WiZbsVu1Wb+xabd9u7fTLsOe277LodvxnVPPvmxnAee+/f0H3rt8OPjBNcdNxG3I/aPHJ8/PXvneEusJ4jfmf5ssS574txSZ+5Ui5WEaYUtHfxxbDl85vnpiLYIeBdHIX0mCOYOJY4priN+VwHoWm4hNYjuHT2ZP4fiVJdyZPBd4f2bJpj+zJHfouvsN0TyxfImbEhtpUiR7R+6u/B9ZolK6tUz1kXq5+mONCs1K7SfaVdue6lbr/pEjO+qMXxrXmzTsbDRtMnsV0rK51eK1ZZvlG6v24x0ynXZd9t3RPQq9Tn2xAyrv4wZVh85+8hjWHkkZ9R33+0qeoszEzzstnFtKWLWm0wHW9z4AAEY1gIwtAHZZADa5ALFbACRdALgLACzZAGw1AckgBEgdKiB26WzsH4AAdhAEeTAARwiGZCiB7wgSwgwRiihAtCBGkHikCTIKWYVcQemgolB1qBW0CNoRnY/+xmDMcIqhmGGK0YQxh3EYw4VxxlQxYZg0mWKYxpm1mCnMNSxyLJEs5aw41ijWd1giNhD7hW0H20m2QZwr7jkehffCT7BbsWewr3LEccwStAh5nOqceZxTRBfiIpcvVxn3Fu6XPF68GN5CPnG+I3zz/JcFTATmNl0TFBMMF0IIlQr7kURIPSLnN2/eHCmKF20VSxHfK8EvMSR5W8pQ6pa0gQyHzOCWB7Kn5ZzlVRSwCiOKfynlKkereGw1UZVV41RbUR/WyNTEadZolWjnbDuvc0Y3Qu/I9kP6ZANfQx8jnx3+xoEmtJ3HTGN2nTPLNr+1u9yiYU+f5Yw1xkbIVmOvjR3VPsnhruNrpzln3v26B7xckg9Wun5x5/Ew8QzzKvLl9bP0jyfXBiIp+tSoQy+CGWlmh1NDxcIoR5+Esxx3OlEUQY+yjUGeco59dIYz7lB8W2J60lKyS0pdmsL5rMzgCx+zbLJrr9y9Jp5z+TpPPvvNpFu4wnN3MosFS27clys1Kmsrd308U8XztKjG4AWtFl9XVL+rKb5ZrqXtdUh7XQe1S6C7vk+iv/t9/KDep6Jhjy/Coz1f7aa4p7tms+ZdFieWSpcj6Lx0OgAggQV4QBr0wAEOQzqUwwACg1BEuCCSENWIOaQM0gWZhXyLwqN2o86imtFs6D3odHQvA4nBl6GE4TujIeM5xncYccxhzAsmApMHUzkzK7Mz810WNMsBloesLKzurNVYLiwV28wmw5bINoEzxxXj2fAUfCf7dvYbHDiOEI5egjHhHieJM5VzjRhM/MrlxzXGTeae5aHxLPAe5UPwneXn5y8U0BSo22S3aVQwUohPqEzYSniMFCsiIVK/OVCUR/SpmLs4VvyZRKCksOQbqThpA+lVmcot4bI6soty1fJnFGwVRRSnlKqVU1T8thqpCqkuq3WoP9a4rBml5a1tv01HR0FXRI+wHa2P0p81mDGcMhrfMWw8ZzK+89supBnRnGe3koXunj2W1lb+1mE22bb3976y67VfcSQ6KeyzcD60/+KBWpcRV2Y3RXcfjyzPaq9pH2lfT79M/44AgcC9lGzqlyCp4BBaQ4jgkeDQxqOix5LCx044RtRHqUXnxRBOJZ0mnMmI503ITlRNakn2TPmRlpiunvH5wpUsv0t7r0hfY8iZuP48r/TmxVuxt93vOBcb39N4sLVU/pHcY6lK8SqpasVnei921lq9JDccakppvtb6pG2gnd4p3K3T49GXMFDxYeIj32eDkcjRgvFPk/zTXrNX5ocXpZYCl8vWEHQ6ADACOwiCAThCMpTAmw37G+7X1aPxaEf0NwZjhqyf3tcwzkzCTDFM48y2zDUsciyXWHGsUayL2EDsFzYPnCvuI94LP8EezL7KEUfgJuRxqnM2El2Ii1zJv0xb8M3/9GwphBAq/WnZal3yT8ch0gZ/Gv4t+KffN5o1WiW/7f6W+89u/5ta70FfXj/Lv6sN6fm72+jCP+WeVf4tN4Nxw+5lzQ29N9I2/BYRNgQ/KN8wXHlyXfGzng3HDaNN8a/+as5oaXsd8kawva6D2lnSFdtd3xPSJ9HvP2D0Pn5Qb+j0R7dPRZ8Xhtu/CI/6j5mOS01gvtpN5k/FTnvP7JyVmWOdm5x//e3BQsai7eLE95glgx+SP4aXI1Z4V66scqzGrC6u3aAn0OkA6+clAABgMaSQKUEkc0Oj//Ow978qgHx4Yw4kAGA9A/faAAABAKR8aaa2AEAEAC0wBAqQgQJBQAJzMASjn1cSuP964guwfpYDAGBkB7hkDwBQ/f1Y5N/npXmG0gAADCnUsCBfbx8aSZ9KJXuSDCkB1MM0zyBZkmmgu7wsSVlRURUA4F93RgACxGzQPQAAAAlwSFlzAAALEwAACxMBAJqcGAAAC25JREFUeJztnHlUE9cex38JYY2JGhQ14Hae1BSXKoK4C0UtbtRqRUWlomi1NK5Y6tKKQpG2qK0pWo8oPp+ix+rRFlCPyxEVV9TXpx7klOdxKQFERQ1CWMLM+wMfDZk7k5nJMsHez8k/+d3f/d1fJt+5d+6SiEiSBAxGOMRCJ4D5u4MliBEYLEGMwGAJYgQGSxAjMFiCGIHBEsQIDJYgRmCwBDECgyWIERgsQYzAYAliBAZLECMwWIIYgcESxAgMliBGYLAEMQKDJYgRGCxBjMBgCWIEBksQIzASoRN4w+93X25YpWkl8zCyifr37bDsy5mcfDAtDkeRYFFRmVZbbmKsrixeBjM5+WBaHI4yEJNg/ufMbHwwLQ5HkSDmb0uLl6BM1kroFDAW0ZIkqNfXU43FJU/snwnGijjKdIQNUTP6hoelmhjdXEWCJIOxFi1JgiIRtFW4Cp0Fxsq0pIEY81ZitV5QV0nmZOUfz877o/CBkZlQqbpMmDB0TJh/a4UHbWV2NBBQ/PiFi4uzkU3k7ka2UTSbkehr4GnZC2cjt/q6ui7d2gKIAOB5heHg/tyjR85W6l43JRkYqPpkTlhAUA+RmHZYt1FYJNoS/bEjl86culqi/etJVy53DwsLipg+onO39szVmVMFgCfl9ds0x07kXGh8HxTos3VHPAmkqP4uiC0YZ5ze4VFJZPn/CxaX1EVFrqv669LTYUhPX9HHvwey7NDRe5sSt5kYO3s7H87a3PT2n5m3t6XuNPGRy+tO5+4wtiDdzp5Z79FW8WF4crm2lCHFz2PHzZ43Fllko7AmXLqiXRqbYm5sMqSlqQMG+9EVI1PNyV7bTtmhpg6mTjHNtvE6G8iHkp+6s0mSFnUDj3HV0oE4OeXklAkrWOgPACQxMT9GRyYBSfBry93dmWr0UXZg4/bgYfWAAWpmoQDAT2nHRwerkRnaKGwTBgImTkxebl5/ACCJjd2++FPTmRlzqq1kHroqGDGINlsnEaKWHbBIgtMjt/56KIdTlYLCJ0EDFvBWIZXKSjbqh5iYb13YBdTpYHTIEpatWytsTR0MCjAvZWOu5T/6eOIXrN2JoiJd8HC1Ay4f8Jfg0hUHHxQW8arqHj3za97t2gGdDhZ/utFuYQkShg5SO3EP+KdWv3rFD+x8xTExKcL0cubgKcF7RdVXzl2iKw0J6bciLnLs+BF0DgWFr67k3uDXtOXI5a5zosctip3aybsTnc+1/JJnHBe9eYddHneQblYYGKj6LHby8rjZdDHPnrtfdPc+pzzpaCARK/92gOeMeMa0eOTEKXx8/zUb5v5/4gXrEqfuz7ylSc2gen6dsOt0bgC/1i3AkJX9jZdS0fhmzrwRryrh/ZFq5FVYGafJyEyyddjyCkDezEGBXX9IWyaWvOkcp0UOLC6p/2jCcmqfMSsq8dqtPezybIa3dzsSxFptuUzmAQASUTdQmx5EMkICUA0aH8aQfHo0PhJ8XNKA1F9oiO+axLnGFhHArEj/1/r6jLR9Js46HQkkASJ7LkwaLl3eLHFzNza1lsG1G5qgAIRcCgpfNNTVObmYfdizKOyqVbuoEUNDfJM3LTYx+iidcy9rQoZQn+dkL8sr2ngpzOX5hs7erXfsivf0kqEKmZZ7nh+f5MlQrK5imYAJfBSwadMvKHNt8iY10j9qdhBq4cf55dOXPFrnzfa0hSZCaUQihqPZW1A1xKdy8mwattYAd/J/pzjUJ6d+jmxL6gbhEROo9j27s8zm2Uj4+D6Hs5Jo9MeELi/S8/4F2mJ1OQDPdV8+EryIGjji46Y0rXya4OECfQPfk8ulMqMXAOHqbs/dtlr/wX3pyrooJa5yxImbQ7/k2jTsvUId9ZLFRAczDA6fxX5ANR44dAlYHKaUyw1rEheYdaNSdS9B/u8DtMULbzN3n8xwHoiratB1RocFMdRK3xHDtSHrEhriR3eHNKJe8klqYpqdw2ZlX6Ea0zMudvTp+bxCh6pB3ClATpKcSEODSGLm20zfGc/sgISoyJKeWU9bPPM3cO7DI2wTnCX4SkeiLnm9rK3ckjxszfBhtH1VIyNHqlITTY0FhcUAJIPILAx75dJNVCVxUuJu5rAUJM/Kn7enrNI3R9/VtyvHsAD1d8T7w2lLx34HiomcYzaH80AskSC/DwOIHHDV0xh+8x4XMLOBaVFYpRnRcMBZYmbVz0/VkbnDpkKCFn6mv8f6z4AeKzkFRML5Crq7Ih46eHw8O+PX27LdT9uElbZCzGNsRGVlNSd/EqprGZZglO/BsExLcwIAHhKsrEIMxAWF5WwehwXkZn6BA4YtK31mrUwMBjMLy5EzRrOPRgDxTCN1oyt2bwNTqBN5nljrsJYYSNLhx2ImDAa02cIPxSNsUKDyx+2rDAYOtzRBgCutXvhQlu6pZCiOeW7FtjhLsJUUee2cn5U+bUf/ZLNFc/FgxiETY0rytJCwYVwT4EfmgbOTI5mOS2VlXaca/VRK5gcMC8OGhAZlUPbZgwa+KxKDs4tg9/OTI/2UevolW3WVdU86c44llwKyx9+39yRDrb0U/QFAn76+XFvnzZ9aPVFXx+Dwc9q/UGYzJ3osDDsqtB+1bGvaMeZGCQJqa0jjV4PBaiePKvIiO5T8h7ZYXcx7CZoOPnL+YHwo1Xjg0HVDjR7pX1IOqE0ug6dXGx6t80WckriHruzClTLkNtyCBZNsGrZbF1eUdmSPih4xNBkQoB4xZLHxK2zUInN5sqL6v98rGJag5+cDeFulIWP4SHDZMuQXIx46ZBF1UlJvgAlhiI27zt5SkcSuv0X6NefOiaPnqfbScmJl7DeoGobBIxC9lBXDSsQQirqfI6al6GkmsEtXZFJXXzYkzDebp1mIiiyPE/QHEOdeBDebHCvhMx3xUkA3le9DxGFBWZD/or171/Ts1RlEQBCQe+HhquWbkAtW69cLsF+SkHj4+MmbSRsXNv6QpaYG9u2/vDMNfd+HhviCmNX1sSTsV2smncs5S/GSBI+Mnxs9Jnr+OBc3JwAgCLh6rXhJ7LeoPqN28Eh/NnkyQAJZtT+caef48RmoRD5UNGfgDvM+zeE5I965c/Ho4chDCc5RUd+ZrS6XG3r5q/g1bSHX8x+MGcVqn2rdhoV2CCt1g+nRHx/MOEz13J1xanfGKWMLcsxKSZ5jlQNH6Ll7Ewx7dMYM3M51aOWZulwKSZt5r4wTJ05uNu8lKAlfTXGVWvm5my7sMvVI5GkGNvip2oaEDbE4LyHhf/eMDu6SmraaR8Xs7ATk6SYbw2HOOCNi4NiPgu0Z9nzuxvb0Z63pkMshI5Nd5+TAWNSBDx/cKfvM1gbW/n6qDpevbm6vRB7sYbMMxn+pLCV5RvYZDRvPL+I+XPrlbDuHFQFkZ62eH8vhjxInju9/OldjxX1Rof5Yw9JniPYK0Y1bmm3pazt6M+24v6vq9Fv2+ozMtU4u6N30jh0RCzQmu/hsfOh4UVHZXgF51zWTI8LofAID/3Hu/PdTIkexCWiLsDHzBuVe1syKnsS8MTItYnje5S1rmx9QN8YddRATaTTGzLMgWzjfElb4KXsTBAFlZdVFf2hfvdC5uruVasu9vT1VKh+fLgp7ns9H/io+Pm5c0zYGSUJpafWd2w9q9TXV+jpPhZRNkjYKS0dVFfnwwVNt8dMafTUJkhq9vnt3r3d6erdRuDn4iRCuWLP3FYtBqfRQKpv2PHpZMbgVEYka87RyetYNK5WKevX26tXbyyrRHBn8t0YYgcESxAgMliBGYLAEMQKDJYgRmLdQgno90wE+RwuLaUn/Nc2S4UN8n0a8LzXain1dVeMf2Nsxw2KsuTSNwfDgLRyIMS0LLEGMwGAJYgQGSxAjMFiCGIHBEsQIDJYgRmCwBDECgyWIERgsQYzAYAliBOZ/jys2NWyvP3gAAAAASUVORK5CYIIK\" />"; 200 result = "<img src=\"data:image/png;charset=utf-8;base64,iVBORw0KGgoAAAANSUhEUgAAANYAAABOCAIAAADTtH9XAAANIWlDQ1BJQ0MgUHJvZmlsZQAAeJyV13k0lG8bB/BrFsYyZhhjDyO77LKHLJFItmwp2bdhJiZRypIUIkso2iiSFC0kEtWPLCHJkq2oyJI9kmXeP6R6f+f9ve95rz+ecz3385xz389zzud7nxsAr+FKpZKRABAQSAuyNjEgOTg6kTBdgAJewAEzaLi6B1P1LS3N4R9roRMQAADtcq5UKvmf3/uPhQtycHQCQMgCANF7vd8OAES39d4WAIhHaFQaAMIHAIjuPq4eAIhwAJANsrU2BEAUAADOe70vBwCc23pfDwC4EHdvGgCiG4CREOjhGwiAmQBg1PXwDHYHwMkCgIdHsHsAAC4ZACwCAigeALgPACDlTg2iAeCZAEDOwdGJtL7kffEAW/kAmMx+jx1JByjNAZDa/XtM9BEAtytAbuLvsTlrQAAAgrs12EtFGQAAEFgDAIYBOn1OAgCTCrCaQqcv59Lpq9cBUH0ANWT3w0EhP/8XAtEM8L/u17/5Z6EQAEgAhBgiH3kUFY4OZzjBGImJZjrJbMRcy3Ka9Qw2ju0srozdhyOFkMKZSjzPlc6dzpPJW8tPEcjelC14WaiedFgkd/N10VbxYxL5km3SJ2Rub+mUi5a/o9CjdFr5vsp71bNqZeqDmklaFdrDOmm6T/XG9DMMnhtO7sgyrjOZNb26q9FsYXeuRcue15avrdqsV2wL93bYddp3OXQ7offdc+7b339gwOX9wQ9uWPfHHp88P3sNe4/4fPEd9eciPwv4GjhJmaJOH5oJmg2ep80f/haycGQx9HvY0tEfx1bCV46vRkhHdkQjTiJjUKfQsQynGc9g4pjimRNYzrImYpPYzuGS8SnsqRxphPOc6cQMrkzuCzwXebP4svkvCVzedEXwqtA14RxSrsj1zTdE88TyxW9KFkjekiqUvi1ze7yIfEf2rlyxQoniPaX7Sg+UH24tVS1TK1t4FFKu/lijQqtS+8m2qm1PdZ6uVUfU6D3b/lz/hcFfhrXo2pi6HS+N600aTBtNm1iaEl6ZNZu3WLTiWs+9tmyzemPdTmhPfWvTYdu5t4u7K7Pb/p1Dj1Mvf292n3O/88D+90Lvr35wGTw4JDKU+9Htk/tnj2Hx4fwRry/eoz5j0mOF434T/l/Jk3KTd6cCpykz1Fml2ftzQfPB32gLqgtliyHfQ5fCfoQtay1XrhxbDV/TWXtKpwMgRJE45DSqCX2bIY0xHOPNZMtsyLKVVRIrycaL48HzsvNycBEkOKWIGlzm3Ad4gnmT+Ir5mwRGBTmF1IS9SRdEXooixHTED0nck5ySlpIhb6mUQ8nrK6QoDipLq8Ru7VKTUadq1GrxaIdue6XLrUfZ/txAzPCYUZuxkEnozirTJTMlc8/d6RZtljgrE+tQmzzbt3Ys9tsdDjledqrbN7Vf+MAel6MHc11r3UY9uDz1vBy8T/hc863x6/dfCuAM3EIxovocCg9KDs6llR6uD+k9Mha6cBR1jCOcdFz2hGrE9kizqD3R+04ejPE8RY6lnQ46ExkXGX8yIe5samJCUta5i8mZKSmpl9JSz2ekX8goyLx54e7Fgqzb2cWXnlx+cqX26qtrbTntue3X22/05n3KH7k5VPD51lThzO2posk7s3enisdLJu6N3B98MPSwp7StrOFRTfmjx8UVlypTn0RWBTzdV21Ws+2ZzHPC86UXH/5qrH1Yl/YyqN6mQa1RoJHe1PPqYXN8i1OraOvw6wdtx9/saMe197+91uHXqdK52tXcnfZuf490z1xvRV90v9kAcWDg/a0PwYPaQ+ihxo/nPx34LPl5YrhiJOrLrlGu0f6xG+PkCdWJta8Nk6lT+6bFpidmHsyGz5nME+a7v+UtUBY1v6O+v1xK+bFvWXT560rZauSaKZ2bTgeAk4hQ5FGUNqoCfZxBj6GaMQpzismYqZY5luU0azx2F7aJLRGXiE9i38PeypFMSOVMI6Zx2XK95c7gyeC9wJfFny2QvemSoLNgv9BV4WukHJGczTmi18VuiOdJ5EvelCqQviXjKzO2pVC2SO6O/F2FYsUSpXvK91UebH2oWqZWpl6mEarxXbNCq0K7ctsTnSrdE7pretXba/SfGTw3fGEUswO9o9a4zuTlznrThl2NZgnmWPNXu5stWva0WiZbsVu1Wb+xabd9u7fTLsOe277LodvxnVPPvmxnAee+/f0H3rt8OPjBNcdNxG3I/aPHJ8/PXvneEusJ4jfmf5ssS574txSZ+5Ui5WEaYUtHfxxbDl85vnpiLYIeBdHIX0mCOYOJY4priN+VwHoWm4hNYjuHT2ZP4fiVJdyZPBd4f2bJpj+zJHfouvsN0TyxfImbEhtpUiR7R+6u/B9ZolK6tUz1kXq5+mONCs1K7SfaVdue6lbr/pEjO+qMXxrXmzTsbDRtMnsV0rK51eK1ZZvlG6v24x0ynXZd9t3RPQq9Tn2xAyrv4wZVh85+8hjWHkkZ9R33+0qeoszEzzstnFtKWLWm0wHW9z4AAEY1gIwtAHZZADa5ALFbACRdALgLACzZAGw1AckgBEgdKiB26WzsH4AAdhAEeTAARwiGZCiB7wgSwgwRiihAtCBGkHikCTIKWYVcQemgolB1qBW0CNoRnY/+xmDMcIqhmGGK0YQxh3EYw4VxxlQxYZg0mWKYxpm1mCnMNSxyLJEs5aw41ijWd1giNhD7hW0H20m2QZwr7jkehffCT7BbsWewr3LEccwStAh5nOqceZxTRBfiIpcvVxn3Fu6XPF68GN5CPnG+I3zz/JcFTATmNl0TFBMMF0IIlQr7kURIPSLnN2/eHCmKF20VSxHfK8EvMSR5W8pQ6pa0gQyHzOCWB7Kn5ZzlVRSwCiOKfynlKkereGw1UZVV41RbUR/WyNTEadZolWjnbDuvc0Y3Qu/I9kP6ZANfQx8jnx3+xoEmtJ3HTGN2nTPLNr+1u9yiYU+f5Yw1xkbIVmOvjR3VPsnhruNrpzln3v26B7xckg9Wun5x5/Ew8QzzKvLl9bP0jyfXBiIp+tSoQy+CGWlmh1NDxcIoR5+Esxx3OlEUQY+yjUGeco59dIYz7lB8W2J60lKyS0pdmsL5rMzgCx+zbLJrr9y9Jp5z+TpPPvvNpFu4wnN3MosFS27clys1Kmsrd308U8XztKjG4AWtFl9XVL+rKb5ZrqXtdUh7XQe1S6C7vk+iv/t9/KDep6Jhjy/Coz1f7aa4p7tms+ZdFieWSpcj6Lx0OgAggQV4QBr0wAEOQzqUwwACg1BEuCCSENWIOaQM0gWZhXyLwqN2o86imtFs6D3odHQvA4nBl6GE4TujIeM5xncYccxhzAsmApMHUzkzK7Mz810WNMsBloesLKzurNVYLiwV28wmw5bINoEzxxXj2fAUfCf7dvYbHDiOEI5egjHhHieJM5VzjRhM/MrlxzXGTeae5aHxLPAe5UPwneXn5y8U0BSo22S3aVQwUohPqEzYSniMFCsiIVK/OVCUR/SpmLs4VvyZRKCksOQbqThpA+lVmcot4bI6soty1fJnFGwVRRSnlKqVU1T8thqpCqkuq3WoP9a4rBml5a1tv01HR0FXRI+wHa2P0p81mDGcMhrfMWw8ZzK+89supBnRnGe3koXunj2W1lb+1mE22bb3976y67VfcSQ6KeyzcD60/+KBWpcRV2Y3RXcfjyzPaq9pH2lfT79M/44AgcC9lGzqlyCp4BBaQ4jgkeDQxqOix5LCx044RtRHqUXnxRBOJZ0mnMmI503ITlRNakn2TPmRlpiunvH5wpUsv0t7r0hfY8iZuP48r/TmxVuxt93vOBcb39N4sLVU/pHcY6lK8SqpasVnei921lq9JDccakppvtb6pG2gnd4p3K3T49GXMFDxYeIj32eDkcjRgvFPk/zTXrNX5ocXpZYCl8vWEHQ6ADACOwiCAThCMpTAmw37G+7X1aPxaEf0NwZjhqyf3tcwzkzCTDFM48y2zDUsciyXWHGsUayL2EDsFzYPnCvuI94LP8EezL7KEUfgJuRxqnM2El2Ii1zJv0xb8M3/9GwphBAq/WnZal3yT8ch0gZ/Gv4t+KffN5o1WiW/7f6W+89u/5ta70FfXj/Lv6sN6fm72+jCP+WeVf4tN4Nxw+5lzQ29N9I2/BYRNgQ/KN8wXHlyXfGzng3HDaNN8a/+as5oaXsd8kawva6D2lnSFdtd3xPSJ9HvP2D0Pn5Qb+j0R7dPRZ8Xhtu/CI/6j5mOS01gvtpN5k/FTnvP7JyVmWOdm5x//e3BQsai7eLE95glgx+SP4aXI1Z4V66scqzGrC6u3aAn0OkA6+clAABgMaSQKUEkc0Oj//Ow978qgHx4Yw4kAGA9A/faAAABAKR8aaa2AEAEAC0wBAqQgQJBQAJzMASjn1cSuP964guwfpYDAGBkB7hkDwBQ/f1Y5N/npXmG0gAADCnUsCBfbx8aSZ9KJXuSDCkB1MM0zyBZkmmgu7wsSVlRURUA4F93RgACxGzQPQAAAAlwSFlzAAALEwAACxMBAJqcGAAAC25JREFUeJztnHlUE9cex38JYY2JGhQ14Hae1BSXKoK4C0UtbtRqRUWlomi1NK5Y6tKKQpG2qK0pWo8oPp+ix+rRFlCPyxEVV9TXpx7klOdxKQFERQ1CWMLM+wMfDZk7k5nJMsHez8k/+d3f/d1fJt+5d+6SiEiSBAxGOMRCJ4D5u4MliBEYLEGMwGAJYgQGSxAjMFiCGIHBEsQIDJYgRmCwBDECgyWIERgsQYzAYAliBAZLECMwWIIYgcESxAgMliBGYLAEMQKDJYgRGCxBjMBgCWIEBksQIzASoRN4w+93X25YpWkl8zCyifr37bDsy5mcfDAtDkeRYFFRmVZbbmKsrixeBjM5+WBaHI4yEJNg/ufMbHwwLQ5HkSDmb0uLl6BM1kroFDAW0ZIkqNfXU43FJU/snwnGijjKdIQNUTP6hoelmhjdXEWCJIOxFi1JgiIRtFW4Cp0Fxsq0pIEY81ZitV5QV0nmZOUfz877o/CBkZlQqbpMmDB0TJh/a4UHbWV2NBBQ/PiFi4uzkU3k7ka2UTSbkehr4GnZC2cjt/q6ui7d2gKIAOB5heHg/tyjR85W6l43JRkYqPpkTlhAUA+RmHZYt1FYJNoS/bEjl86culqi/etJVy53DwsLipg+onO39szVmVMFgCfl9ds0x07kXGh8HxTos3VHPAmkqP4uiC0YZ5ze4VFJZPn/CxaX1EVFrqv669LTYUhPX9HHvwey7NDRe5sSt5kYO3s7H87a3PT2n5m3t6XuNPGRy+tO5+4wtiDdzp5Z79FW8WF4crm2lCHFz2PHzZ43Fllko7AmXLqiXRqbYm5sMqSlqQMG+9EVI1PNyV7bTtmhpg6mTjHNtvE6G8iHkp+6s0mSFnUDj3HV0oE4OeXklAkrWOgPACQxMT9GRyYBSfBry93dmWr0UXZg4/bgYfWAAWpmoQDAT2nHRwerkRnaKGwTBgImTkxebl5/ACCJjd2++FPTmRlzqq1kHroqGDGINlsnEaKWHbBIgtMjt/56KIdTlYLCJ0EDFvBWIZXKSjbqh5iYb13YBdTpYHTIEpatWytsTR0MCjAvZWOu5T/6eOIXrN2JoiJd8HC1Ay4f8Jfg0hUHHxQW8arqHj3za97t2gGdDhZ/utFuYQkShg5SO3EP+KdWv3rFD+x8xTExKcL0cubgKcF7RdVXzl2iKw0J6bciLnLs+BF0DgWFr67k3uDXtOXI5a5zosctip3aybsTnc+1/JJnHBe9eYddHneQblYYGKj6LHby8rjZdDHPnrtfdPc+pzzpaCARK/92gOeMeMa0eOTEKXx8/zUb5v5/4gXrEqfuz7ylSc2gen6dsOt0bgC/1i3AkJX9jZdS0fhmzrwRryrh/ZFq5FVYGafJyEyyddjyCkDezEGBXX9IWyaWvOkcp0UOLC6p/2jCcmqfMSsq8dqtPezybIa3dzsSxFptuUzmAQASUTdQmx5EMkICUA0aH8aQfHo0PhJ8XNKA1F9oiO+axLnGFhHArEj/1/r6jLR9Js46HQkkASJ7LkwaLl3eLHFzNza1lsG1G5qgAIRcCgpfNNTVObmYfdizKOyqVbuoEUNDfJM3LTYx+iidcy9rQoZQn+dkL8sr2ngpzOX5hs7erXfsivf0kqEKmZZ7nh+f5MlQrK5imYAJfBSwadMvKHNt8iY10j9qdhBq4cf55dOXPFrnzfa0hSZCaUQihqPZW1A1xKdy8mwattYAd/J/pzjUJ6d+jmxL6gbhEROo9j27s8zm2Uj4+D6Hs5Jo9MeELi/S8/4F2mJ1OQDPdV8+EryIGjji46Y0rXya4OECfQPfk8ulMqMXAOHqbs/dtlr/wX3pyrooJa5yxImbQ7/k2jTsvUId9ZLFRAczDA6fxX5ANR44dAlYHKaUyw1rEheYdaNSdS9B/u8DtMULbzN3n8xwHoiratB1RocFMdRK3xHDtSHrEhriR3eHNKJe8klqYpqdw2ZlX6Ea0zMudvTp+bxCh6pB3ClATpKcSEODSGLm20zfGc/sgISoyJKeWU9bPPM3cO7DI2wTnCX4SkeiLnm9rK3ckjxszfBhtH1VIyNHqlITTY0FhcUAJIPILAx75dJNVCVxUuJu5rAUJM/Kn7enrNI3R9/VtyvHsAD1d8T7w2lLx34HiomcYzaH80AskSC/DwOIHHDV0xh+8x4XMLOBaVFYpRnRcMBZYmbVz0/VkbnDpkKCFn6mv8f6z4AeKzkFRML5Crq7Ih46eHw8O+PX27LdT9uElbZCzGNsRGVlNSd/EqprGZZglO/BsExLcwIAHhKsrEIMxAWF5WwehwXkZn6BA4YtK31mrUwMBjMLy5EzRrOPRgDxTCN1oyt2bwNTqBN5nljrsJYYSNLhx2ImDAa02cIPxSNsUKDyx+2rDAYOtzRBgCutXvhQlu6pZCiOeW7FtjhLsJUUee2cn5U+bUf/ZLNFc/FgxiETY0rytJCwYVwT4EfmgbOTI5mOS2VlXaca/VRK5gcMC8OGhAZlUPbZgwa+KxKDs4tg9/OTI/2UevolW3WVdU86c44llwKyx9+39yRDrb0U/QFAn76+XFvnzZ9aPVFXx+Dwc9q/UGYzJ3osDDsqtB+1bGvaMeZGCQJqa0jjV4PBaiePKvIiO5T8h7ZYXcx7CZoOPnL+YHwo1Xjg0HVDjR7pX1IOqE0ug6dXGx6t80WckriHruzClTLkNtyCBZNsGrZbF1eUdmSPih4xNBkQoB4xZLHxK2zUInN5sqL6v98rGJag5+cDeFulIWP4SHDZMuQXIx46ZBF1UlJvgAlhiI27zt5SkcSuv0X6NefOiaPnqfbScmJl7DeoGobBIxC9lBXDSsQQirqfI6al6GkmsEtXZFJXXzYkzDebp1mIiiyPE/QHEOdeBDebHCvhMx3xUkA3le9DxGFBWZD/or171/Ts1RlEQBCQe+HhquWbkAtW69cLsF+SkHj4+MmbSRsXNv6QpaYG9u2/vDMNfd+HhviCmNX1sSTsV2smncs5S/GSBI+Mnxs9Jnr+OBc3JwAgCLh6rXhJ7LeoPqN28Eh/NnkyQAJZtT+caef48RmoRD5UNGfgDvM+zeE5I965c/Ho4chDCc5RUd+ZrS6XG3r5q/g1bSHX8x+MGcVqn2rdhoV2CCt1g+nRHx/MOEz13J1xanfGKWMLcsxKSZ5jlQNH6Ll7Ewx7dMYM3M51aOWZulwKSZt5r4wTJ05uNu8lKAlfTXGVWvm5my7sMvVI5GkGNvip2oaEDbE4LyHhf/eMDu6SmraaR8Xs7ATk6SYbw2HOOCNi4NiPgu0Z9nzuxvb0Z63pkMshI5Nd5+TAWNSBDx/cKfvM1gbW/n6qDpevbm6vRB7sYbMMxn+pLCV5RvYZDRvPL+I+XPrlbDuHFQFkZ62eH8vhjxInju9/OldjxX1Rof5Yw9JniPYK0Y1bmm3pazt6M+24v6vq9Fv2+ozMtU4u6N30jh0RCzQmu/hsfOh4UVHZXgF51zWTI8LofAID/3Hu/PdTIkexCWiLsDHzBuVe1syKnsS8MTItYnje5S1rmx9QN8YddRATaTTGzLMgWzjfElb4KXsTBAFlZdVFf2hfvdC5uruVasu9vT1VKh+fLgp7ns9H/io+Pm5c0zYGSUJpafWd2w9q9TXV+jpPhZRNkjYKS0dVFfnwwVNt8dMafTUJkhq9vnt3r3d6erdRuDn4iRCuWLP3FYtBqfRQKpv2PHpZMbgVEYka87RyetYNK5WKevX26tXbyyrRHBn8t0YYgcESxAgMliBGYLAEMQKDJYgRmLdQgno90wE+RwuLaUn/Nc2S4UN8n0a8LzXain1dVeMf2Nsxw2KsuTSNwfDgLRyIMS0LLEGMwGAJYgQGSxAjMFiCGIHBEsQIDJYgRmCwBDECgyWIERgsQYzAYAliBOZ/jys2NWyvP3gAAAAASUVORK5CYIIK\" />";
204 } 201 }
205 202
206 return result; 203 return result;
207 }, 204 },
208 205
209 'progressWidth': function() { 206 'progressWidth': function() {
210 return this._progressWidth; 207 return this._progressWidth;
211 }, 208 },
212 209
213 'updateProgress': function(aProgressComponent, aPercentage) { 210 'updateProgress': function(aProgressComponent, aPercentage) {
214 211
215 212
216 }, 213 },
217 214
218 //------------------------------------------------------------------------- 215 //-------------------------------------------------------------------------
219 216
220 'printAllData': function(anEvent) { 217 'printAllData': function(anEvent) {
221 var newWindow; 218 var newWindow;
222 var allRecords; 219 var allRecords;
223 220
224//MochiKit.Logging.logDebug(">>> printAllData"); 221//MochiKit.Logging.logDebug(">>> printAllData");
225 newWindow = window.open("", ""); 222 newWindow = window.open("", "");
226 newWindow.document.write( 223 newWindow.document.write(
227"<html>" + 224"<html>" +
228"<header>" + 225"<header>" +
229 "<title>Clipperz export data</title>" + 226 "<title>Clipperz export data</title>" +
230"<style>" + 227"<style>" +
231"#exportedData {" + 228"#exportedData {" +
232 " width: 600px;"+ 229 " width: 600px;"+
233"}" + 230"}" +
234".ext-mb-progress-wrap {" + 231".ext-mb-progress-wrap {" +
235 "border:1px solid #6593cf;" + 232 "border:1px solid #6593cf;" +
236 "margin-bottom: 10px;" + 233 "margin-bottom: 10px;" +
237 "width: " + this.progressWidth() + "px;" + 234 "width: " + this.progressWidth() + "px;" +
238"}" + 235"}" +
239".ext-mb-progress {" + 236".ext-mb-progress {" +
240 "height:18px;" + 237 "height:18px;" +
241 "background:transparent url(./images/default/basic-dialog/progress2.gif) repeat-x 1px 1px;" + 238 "background:transparent url(./images/default/basic-dialog/progress2.gif) repeat-x 1px 1px;" +
242"}" + 239"}" +
243".ext-mb-progress-bar {" + 240".ext-mb-progress-bar {" +
244 "height:18px;" + 241 "height:18px;" +
245 "overflow:hidden;" + 242 "overflow:hidden;" +
246 "width:0;" + 243 "width:0;" +
247 "background:#8bb8f3;" + 244 "background:#8bb8f3;" +
248"}" + 245"}" +
249"body {" + 246"body {" +
250 "font-family: sans-serif;" + 247 "font-family: sans-serif;" +
251"}" + 248"}" +
252"div#logo {" + 249"div#logo {" +
253 "border-bottom: 1px dotted #aaaaaa;" + 250 "border-bottom: 1px dotted #aaaaaa;" +
254 "margin-bottom: 15px;" + 251 "margin-bottom: 15px;" +
255"}" + 252"}" +
256"div.recordBlock h2 {" + 253"div.recordBlock h2 {" +
257 "font-size: 14pt;" + 254 "font-size: 14pt;" +
258 "margin: 0px;" + 255 "margin: 0px;" +
259 "padding: 0px;" + 256 "padding: 0px;" +
260 "border: 0px;" + 257 "border: 0px;" +
261 "color: #666666;" + 258 "color: #666666;" +
262"}" + 259"}" +
263"div.recordBlock div.recordNotes p {" + 260"div.recordBlock div.recordNotes p {" +
264 "margin: 0px;" + 261 "margin: 0px;" +
265 "padding: 0px;" + 262 "padding: 0px;" +
266 "border: 0px;" + 263 "border: 0px;" +
267 "color: #aaaaaa;" + 264 "color: #aaaaaa;" +
268 "font-size: 10pt;" + 265 "font-size: 10pt;" +
269 "line-height: 18pt;" + 266 "line-height: 18pt;" +
270 "border-left: 1px solid #aaaaaa;" + 267 "border-left: 1px solid #aaaaaa;" +
271 "padding-left: 10px;" + 268 "padding-left: 10px;" +
272"}" + 269"}" +
273"div.recordBlock dl {" + 270"div.recordBlock dl {" +
274 "margin: 0px;" + 271 "margin: 0px;" +
275 "padding: 0px;" + 272 "padding: 0px;" +
276 "border: 0px;" + 273 "border: 0px;" +
277 "color: #999999;" + 274 "color: #999999;" +
278 "padding-bottom: 10px;" + 275 "padding-bottom: 10px;" +
279 "border-bottom: 1px dotted #aaaaaa;" + 276 "border-bottom: 1px dotted #aaaaaa;" +
280 "margin-top: 10px;" + 277 "margin-top: 10px;" +
281 "margin-bottom: 15px;" + 278 "margin-bottom: 15px;" +
282"}" + 279"}" +
283"div.recordBlock dl dt {" + 280"div.recordBlock dl dt {" +
284 "display: block;" + 281 "display: block;" +
285 "float: left;" + 282 "float: left;" +
286 "min-width: 100px;" + 283 "min-width: 100px;" +
287 "white-space: nowrap;" + 284 "white-space: nowrap;" +
288 "overflow: hidden;" + 285 "overflow: hidden;" +
289 "margin-right: 10px;" + 286 "margin-right: 10px;" +
290 "font-size: 10pt;" + 287 "font-size: 10pt;" +
291 "line-height: 18pt;" + 288 "line-height: 18pt;" +
292"}" + 289"}" +
293"div.recordBlock dl dd {" + 290"div.recordBlock dl dd {" +
294 "color: #666666;" + 291 "color: #666666;" +
295 "font-size: 10pt;" + 292 "font-size: 10pt;" +
296 "line-height: 18pt;" + 293 "line-height: 18pt;" +
297"}" + 294"}" +
298"" + 295"" +
299"</style>" + 296"</style>" +
300"" + 297"" +
301"<!--[if IE]>" + 298"<!--[if IE]>" +
302"<style>" + 299"<style>" +
303"div.recordBlock dl dt {" + 300"div.recordBlock dl dt {" +
304 "width: 100px;" + 301 "width: 100px;" +
305"}" + 302"}" +
306"</style>" + 303"</style>" +
307"<![endif]-->" + 304"<![endif]-->" +
308"" + 305"" +
309"</header>" + 306"</header>" +
310"<body>" + 307"<body>" +
311 "<div id=\"logo\">" + this.logo() + 308 "<div id=\"logo\">" + this.logo() +
312 "<div id=\"progressWrapper\"><div class=\"ext-mb-progress-wrap\"><div class=\"ext-mb-progress\"><div id=\"progress\" class=\"ext-mb-progress-bar\">&#160;</div></div></div></div>" + 309 "<div id=\"progressWrapper\"><div class=\"ext-mb-progress-wrap\"><div class=\"ext-mb-progress\"><div id=\"progress\" class=\"ext-mb-progress-bar\">&#160;</div></div></div></div>" +
313" </div>" + 310" </div>" +
314"</body>" + 311"</body>" +
315"</html>" 312"</html>"
316 ); 313 );
317 314
318 anEvent.preventDefault(); 315 anEvent.preventDefault();
319 316
320 allRecords = MochiKit.Base.values(this.user().records()); 317 allRecords = MochiKit.Base.values(this.user().records());
321 allRecords.sort(this.compareRecords); 318 allRecords.sort(this.compareRecords);
322 319
323/* 320/*
324 deferredResult = new MochiKit.Async.Deferred(); 321 deferredResult = new MochiKit.Async.Deferred();
325 MochiKit.Iter.forEach(allRecords, MochiKit.Base.partial(function(aDeferredResult, aWindow, aRecord) { 322 MochiKit.Iter.forEach(allRecords, MochiKit.Base.partial(function(aDeferredResult, aWindow, aRecord) {
326 var printerRecord; 323 var printerRecord;
327 324
328 printerRecord = new Clipperz.PM.Components.Printing.Record({record:aRecord}); 325 printerRecord = new Clipperz.PM.Components.Printing.Record({record:aRecord});
329 aDeferredResult.addCallback(MochiKit.Base.method(printerRecord, 'deferredDrawToWindow', aWindow)); 326 aDeferredResult.addCallback(MochiKit.Base.method(printerRecord, 'deferredDrawToWindow', aWindow));
330 }, deferredResult, newWindow)); 327 }, deferredResult, newWindow));
331 deferredResult.callback(); 328 deferredResult.callback();
332 329
333 return deferredResult; 330 return deferredResult;
334 */ 331 */
335 332
336 MochiKit.DOM.withWindow(newWindow, MochiKit.Base.bind(function(someRecords) { 333 MochiKit.DOM.withWindow(newWindow, MochiKit.Base.bind(function(someRecords) {
337 var currentWindow; 334 var currentWindow;
338 vardeferredResult; 335 vardeferredResult;
339 var progressBar; 336 var progressBar;
340 var progressWrapper; 337 var progressWrapper;
341 var i, c; 338 var i, c;
342 339
343 currentWindow = MochiKit.DOM.currentWindow(); 340 currentWindow = MochiKit.DOM.currentWindow();
344 progressBar = MochiKit.DOM.getElement('progress'); 341 progressBar = MochiKit.DOM.getElement('progress');
345 progressWrapper = MochiKit.DOM.getElement('progressWrapper'); 342 progressWrapper = MochiKit.DOM.getElement('progressWrapper');
346 343
347 deferredResult = new MochiKit.Async.Deferred(); 344 deferredResult = new MochiKit.Async.Deferred();
348 c = someRecords.length; 345 c = someRecords.length;
349 for (i=0; i<c; i++) { 346 for (i=0; i<c; i++) {
350 deferredResult.addCallback(function(aWindow, aRecord) { 347 deferredResult.addCallback(function(aWindow, aRecord) {
351 var printerRecord; 348 var printerRecord;
352 349
353 printerRecord = new Clipperz.PM.Components.Printing.Record({record:aRecord}); 350 printerRecord = new Clipperz.PM.Components.Printing.Record({record:aRecord});
354 return printerRecord.deferredDrawToWindow(aWindow); 351 return printerRecord.deferredDrawToWindow(aWindow);
355 }, currentWindow, someRecords[i]) 352 }, currentWindow, someRecords[i])
356 deferredResult.addCallback(MochiKit.Base.bind(function(aProgressBar, aProgress) { 353 deferredResult.addCallback(MochiKit.Base.bind(function(aProgressBar, aProgress) {
357 MochiKit.Style.setElementDimensions(aProgressBar, {w:aProgress * this.progressWidth()}); 354 MochiKit.Style.setElementDimensions(aProgressBar, {w:aProgress * this.progressWidth()});
358 }, this, progressBar, ((i+1)/c))); 355 }, this, progressBar, ((i+1)/c)));
359 deferredResult.addCallback(MochiKit.Async.wait, 0.2); 356 deferredResult.addCallback(MochiKit.Async.wait, 0.2);
360 } 357 }
361 358
362 deferredResult.addCallback(function(aWindow, aProgressWrapper) { 359 deferredResult.addCallback(function(aWindow, aProgressWrapper) {
363 MochiKit.DOM.replaceChildNodes(aProgressWrapper); 360 MochiKit.DOM.replaceChildNodes(aProgressWrapper);
364 MochiKit.Style.hideElement(aProgressWrapper); 361 MochiKit.Style.hideElement(aProgressWrapper);
365 aWindow.stop(); 362 aWindow.stop();
366 }, currentWindow, progressWrapper); 363 }, currentWindow, progressWrapper);
367 364
368 365
369 deferredResult.callback(); 366 deferredResult.callback();
370 }, this, allRecords)); 367 }, this, allRecords));
371 }, 368 },
372 369
373 //------------------------------------------------------------------------- 370 //-------------------------------------------------------------------------
374 371
375 'exportAllData': function(anEvent) { 372 'exportAllData': function(anEvent) {
376 // vardeferredResult; 373 // vardeferredResult;
377 var newWindow; 374 var newWindow;
378 var allRecords; 375 var allRecords;
379 376
380//MochiKit.Logging.logDebug(">>> printAllData"); 377//MochiKit.Logging.logDebug(">>> printAllData");
381 newWindow = window.open("", ""); 378 newWindow = window.open("", "");
382 newWindow.document.write( 379 newWindow.document.write(
383"<html>" + 380"<html>" +
384"<header>" + 381"<header>" +
385 "<title>Clipperz export data</title>" + 382 "<title>Clipperz export data</title>" +
386"<style>" + 383"<style>" +
387"#exportedData {" + 384"#exportedData {" +
388 " width: 600px;"+ 385 " width: 600px;"+
389"}" + 386"}" +
390".ext-mb-progress-wrap {" + 387".ext-mb-progress-wrap {" +
391 "margin-top:4px;" + 388 "margin-top:4px;" +
392 "margin-bottom: 10px;" + 389 "margin-bottom: 10px;" +
393 "border:1px solid #6593cf;" + 390 "border:1px solid #6593cf;" +
394 "width: " + this.progressWidth() + "px;" + 391 "width: " + this.progressWidth() + "px;" +
395"}" + 392"}" +
396".ext-mb-progress {" + 393".ext-mb-progress {" +
397 "height:18px;" + 394 "height:18px;" +
398 "background:transparent url(./images/default/basic-dialog/progress2.gif) repeat-x 1px 1px;" + 395 "background:transparent url(./images/default/basic-dialog/progress2.gif) repeat-x 1px 1px;" +
399"}" + 396"}" +
400".ext-mb-progress-bar {" + 397".ext-mb-progress-bar {" +
401 "height:18px;" + 398 "height:18px;" +
402 "overflow:hidden;" + 399 "overflow:hidden;" +
403 "width:0;" + 400 "width:0;" +
404 "background:#8bb8f3;" + 401 "background:#8bb8f3;" +
405"}" + 402"}" +
406"</style>" + 403"</style>" +
407"" + 404"" +
408"<!--[if IE]>" + 405"<!--[if IE]>" +
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/LoginPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/LoginPanel.js
index 84b2475..ef2b91c 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Panels/LoginPanel.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Panels/LoginPanel.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } 29if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; }
33 30
34 31
35Clipperz.PM.Components.Panels.LoginPanel = function(anElement, args) { 32Clipperz.PM.Components.Panels.LoginPanel = function(anElement, args) {
36 args = args || {}; 33 args = args || {};
37 34
38 Clipperz.PM.Components.Panels.LoginPanel.superclass.constructor.call(this, anElement, args); 35 Clipperz.PM.Components.Panels.LoginPanel.superclass.constructor.call(this, anElement, args);
39 36
40 this._showLoginFormAnimator = null; 37 this._showLoginFormAnimator = null;
41 this._showRegistrationFormAnimator = null; 38 this._showRegistrationFormAnimator = null;
42 this._shouldShowRegistrationAlert = true; 39 this._shouldShowRegistrationAlert = true;
43 40
44 this._visibleForm = null; 41 this._visibleForm = null;
45 //this._isPassphraseVisible = true; 42 //this._isPassphraseVisible = true;
46 43
47 Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler'); 44 Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler');
48 45
49 this.render(); 46 this.render();
50 47
51 return this; 48 return this;
52} 49}
53 50
54//============================================================================= 51//=============================================================================
55 52
56//MochiKit.Base.update(Clipperz.PM.Components.Panels.LoginPanel.prototype, { 53//MochiKit.Base.update(Clipperz.PM.Components.Panels.LoginPanel.prototype, {
57YAHOO.extendX(Clipperz.PM.Components.Panels.LoginPanel, Clipperz.PM.Components.Panels.BasePanel, { 54YAHOO.extendX(Clipperz.PM.Components.Panels.LoginPanel, Clipperz.PM.Components.Panels.BasePanel, {
58 55
59 'toString': function() { 56 'toString': function() {
60 return "Clipperz.PM.Components.LoginPanel component"; 57 return "Clipperz.PM.Components.LoginPanel component";
61 }, 58 },
62 59
63 //------------------------------------------------------------------------- 60 //-------------------------------------------------------------------------
64 61
65 'render': function() { 62 'render': function() {
66 var result; 63 var result;
67 varlayout; 64 varlayout;
68 var registerButton; 65 var registerButton;
69 66
70 MochiKit.Signal.disconnectAllTo(this); 67 MochiKit.Signal.disconnectAllTo(this);
71 this.element().update(""); 68 this.element().update("");
72 69
73//MochiKit.Logging.logDebug(">>> LoginPanel.initPanel"); 70//MochiKit.Logging.logDebug(">>> LoginPanel.initPanel");
74 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('baseDiv'), cls:'LoginPanel', children:[ 71 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('baseDiv'), cls:'LoginPanel', children:[
75 {tag:'table', children:[ 72 {tag:'table', children:[
76 {tag:'thead'}, 73 {tag:'thead'},
77 {tag:'tbody', children:[ 74 {tag:'tbody', children:[
78 {tag:'tr', children:[ 75 {tag:'tr', children:[
79 {tag:'td', valign:'top', children:[ 76 {tag:'td', valign:'top', children:[
80 {tag:'div', cls:'clipperzServiceDescription', htmlString:Clipperz.PM.Strings['clipperzServiceDescription']} 77 {tag:'div', cls:'clipperzServiceDescription', htmlString:Clipperz.PM.Strings['clipperzServiceDescription']}
81 ]}, 78 ]},
82 {tag:'td', valign:'top', align:'right', children:[ 79 {tag:'td', valign:'top', align:'right', children:[
83{tag:'div', id:this.getId('forms'), cls:'clipperzLoginForm', children:[ 80{tag:'div', id:this.getId('forms'), cls:'clipperzLoginForm', children:[
84 {tag:'div', id:this.getId('loginForm'), cls:'loginForm', children:[ 81 {tag:'div', id:this.getId('loginForm'), cls:'loginForm', children:[
85 {tag:'div', cls:'loginFormHeaderBox', children:[{tag:'h3', htmlString:Clipperz.PM.Strings['loginFormTitle']}]}, 82 {tag:'div', cls:'loginFormHeaderBox', children:[{tag:'h3', htmlString:Clipperz.PM.Strings['loginFormTitle']}]},
86 {tag:'form', id:this.getId('loginForm_form'), autocomplete:'off', children:[ 83 {tag:'form', id:this.getId('loginForm_form'), autocomplete:'off', children:[
87 84
88 {tag:'table', cls:'formLayout', children:[ 85 {tag:'table', cls:'formLayout', children:[
89 {tag:'thead'}, 86 {tag:'thead'},
90 {tag:'tbody', children:[ 87 {tag:'tbody', children:[
91 {tag:'tr', cls:'formFieldTR', children:[ 88 {tag:'tr', cls:'formFieldTR', children:[
92 {tag:'td', width:'90', htmlString:Clipperz.PM.Strings['loginFormUsernameLabel']}, 89 {tag:'td', width:'90', htmlString:Clipperz.PM.Strings['loginFormUsernameLabel']},
93 {tag:'td', children:[ 90 {tag:'td', children:[
94 {tag:'input', id:this.getId('login_username'), cls:'loginFormField', type:'text', name:'username'} 91 {tag:'input', id:this.getId('login_username'), cls:'loginFormField', type:'text', name:'username'}
95 ]} 92 ]}
96 ]}, 93 ]},
97 {tag:'tr', cls:'formFieldTR', children:[ 94 {tag:'tr', cls:'formFieldTR', children:[
98 {tag:'td', htmlString:Clipperz.PM.Strings['loginFormPassphraseLabel']}, 95 {tag:'td', htmlString:Clipperz.PM.Strings['loginFormPassphraseLabel']},
99 {tag:'td', children:[ 96 {tag:'td', children:[
100 {tag:'div', id:this.getId('passphraseDIV'), children:[ 97 {tag:'div', id:this.getId('passphraseDIV'), children:[
101 {tag:'input', id:this.getId('login_passphrase'), cls:'loginFormField', type:'password', name:'passphrase'} 98 {tag:'input', id:this.getId('login_passphrase'), cls:'loginFormField', type:'password', name:'passphrase'}
102 ]}, 99 ]},
103 {tag:'div', cls:'oneTimePassword', id:this.getId('oneTimePasswordDIV'), children:[ 100 {tag:'div', cls:'oneTimePassword', id:this.getId('oneTimePasswordDIV'), children:[
104 {tag:'input', type:'text', id:this.getId('oneTimePassword_1'), name:'passphrase'}, 101 {tag:'input', type:'text', id:this.getId('oneTimePassword_1'), name:'passphrase'},
105 {tag:'span', html:'-'}, 102 {tag:'span', html:'-'},
106 {tag:'input', type:'text', id:this.getId('oneTimePassword_2'), name:'passphrase'}, 103 {tag:'input', type:'text', id:this.getId('oneTimePassword_2'), name:'passphrase'},
107 {tag:'span', html:'-'}, 104 {tag:'span', html:'-'},
108 {tag:'input', type:'text', id:this.getId('oneTimePassword_3'), name:'passphrase'}, 105 {tag:'input', type:'text', id:this.getId('oneTimePassword_3'), name:'passphrase'},
109 {tag:'span', html:'-'}, 106 {tag:'span', html:'-'},
110 {tag:'input', type:'text', id:this.getId('oneTimePassword_4'), name:'passphrase'} 107 {tag:'input', type:'text', id:this.getId('oneTimePassword_4'), name:'passphrase'}
111 ]} 108 ]}
112 ]} 109 ]}
113 ]}, 110 ]},
114 {tag:'tr', cls:'formFieldTR', id:this.getId('passwordTypeChooserTR'), children:[ 111 {tag:'tr', cls:'formFieldTR', id:this.getId('passwordTypeChooserTR'), children:[
115 {tag:'td', valign:'top', align:'right', children:[ 112 {tag:'td', valign:'top', align:'right', children:[
116 {tag:'input', type:'checkbox', cls:'passwordTypeCheckbox', id:this.getId('useOneTimePasswordCheckbox')} 113 {tag:'input', type:'checkbox', cls:'passwordTypeCheckbox', id:this.getId('useOneTimePasswordCheckbox')}
117 ]}, 114 ]},
118 {tag:'td', children:[ 115 {tag:'td', children:[
119 {tag:'div', cls:'passwordTypeChooser', children:[ 116 {tag:'div', cls:'passwordTypeChooser', children:[
120 {tag:'h4', htmlString:Clipperz.PM.Strings['loginFormOneTimePasswordCheckboxLabel']}, 117 {tag:'h4', htmlString:Clipperz.PM.Strings['loginFormOneTimePasswordCheckboxLabel']},
121 {tag:'span', htmlString:Clipperz.PM.Strings['loginFormOneTimePasswordCheckboxDescription']} 118 {tag:'span', htmlString:Clipperz.PM.Strings['loginFormOneTimePasswordCheckboxDescription']}
122 ]} 119 ]}
123 ]} 120 ]}
124 ]}, 121 ]},
125 {tag:'tr', children:[ 122 {tag:'tr', children:[
126 {tag:'td'}, 123 {tag:'td'},
127 {tag:'td', children:[ 124 {tag:'td', children:[
128 {tag:'div', id:this.getId('login_submit')} 125 {tag:'div', id:this.getId('login_submit')}
129 ]} 126 ]}
130 ]} 127 ]}
131 ]}, 128 ]},
132 {tag:'tfoot'} 129 {tag:'tfoot'}
133 ]} 130 ]}
134 ]}, 131 ]},
135 132
136 {tag:'div', cls:'loginFormFooterBox', children:[ 133 {tag:'div', cls:'loginFormFooterBox', children:[
137 {tag:'ul', children:[ 134 {tag:'ul', children:[
138 {tag:'li', id:this.getId('showRegistrationLI'), children:[ 135 {tag:'li', id:this.getId('showRegistrationLI'), children:[
139 {tag:'span', htmlString:Clipperz.PM.Strings['loginFormDontHaveAnAccountLabel']}, 136 {tag:'span', htmlString:Clipperz.PM.Strings['loginFormDontHaveAnAccountLabel']},
140 {tag:'a', href:'.', id:this.getId('showRegistration'), cls:'clipperzActionLink', htmlString:Clipperz.PM.Strings['loginFormCreateOneLabel']} 137 {tag:'a', href:'.', id:this.getId('showRegistration'), cls:'clipperzActionLink', htmlString:Clipperz.PM.Strings['loginFormCreateOneLabel']}
141 ]}, 138 ]},
142 {tag:'li', children:[ 139 {tag:'li', children:[
143 {tag:'span', htmlString:Clipperz.PM.Strings['loginFormForgotYourCredentialsLabel']}, 140 {tag:'span', htmlString:Clipperz.PM.Strings['loginFormForgotYourCredentialsLabel']},
144 {tag:'a', href:Clipperz.PM.Strings['loginFormAarghThatsBadUrl'], target:'Clipperz_Help', htmlString:Clipperz.PM.Strings['loginFormAarghThatsBadLabel']} 141 {tag:'a', href:Clipperz.PM.Strings['loginFormAarghThatsBadUrl'], target:'Clipperz_Help', htmlString:Clipperz.PM.Strings['loginFormAarghThatsBadLabel']}
145 ]}, 142 ]},
146 {tag:'li', children:[ 143 {tag:'li', children:[
147 {tag:'span', htmlString:Clipperz.PM.Strings['loginFormAfraidOfMaliciousScriptsLabel']}, 144 {tag:'span', htmlString:Clipperz.PM.Strings['loginFormAfraidOfMaliciousScriptsLabel']},
148 {tag:'a', href:Clipperz.PM.Strings['loginFormVerifyTheCodeUrl'], target:'Clipperz_Help', htmlString:Clipperz.PM.Strings['loginFormVerifyTheCodeLabel']} 145 {tag:'a', href:Clipperz.PM.Strings['loginFormVerifyTheCodeUrl'], target:'Clipperz_Help', htmlString:Clipperz.PM.Strings['loginFormVerifyTheCodeLabel']}
149 ]} 146 ]}
150 ]} 147 ]}
151 ]} 148 ]}
152 ]}, 149 ]},
153 150
154 151
155 152
156 {tag:'div', id:this.getId('registrationForm'), cls:'registrationForm', children:[ 153 {tag:'div', id:this.getId('registrationForm'), cls:'registrationForm', children:[
157 {tag:'div', cls:'loginFormHeaderBox', children:[{tag:'h3', htmlString:Clipperz.PM.Strings['registrationFormTitle']}]}, 154 {tag:'div', cls:'loginFormHeaderBox', children:[{tag:'h3', htmlString:Clipperz.PM.Strings['registrationFormTitle']}]},
158 {tag:'form', id:this.getId('registrationForm_form'), children:[ 155 {tag:'form', id:this.getId('registrationForm_form'), children:[
159 {tag:'h5', cls:'errorMessage', id:this.getId('registration_errorMessage')}, 156 {tag:'h5', cls:'errorMessage', id:this.getId('registration_errorMessage')},
160 {tag:'table', cls:'formLayout', children:[ 157 {tag:'table', cls:'formLayout', children:[
161 {tag:'thead'}, 158 {tag:'thead'},
162 {tag:'tbody', children:[ 159 {tag:'tbody', children:[
163 {tag:'tr', cls:'formFieldTR', children:[ 160 {tag:'tr', cls:'formFieldTR', children:[
164 {tag:'td', width:'90', htmlString:Clipperz.PM.Strings['registrationFormUsernameLabel']}, 161 {tag:'td', width:'90', htmlString:Clipperz.PM.Strings['registrationFormUsernameLabel']},
165 {tag:'td', children:[ 162 {tag:'td', children:[
166 {tag:'input', id:this.getId('registration_username'), cls:'loginFormField', type:'text', name:'username'} 163 {tag:'input', id:this.getId('registration_username'), cls:'loginFormField', type:'text', name:'username'}
167 ]} 164 ]}
168 ]}, 165 ]},
169 {tag:'tr', cls:'formFieldTR', children:[ 166 {tag:'tr', cls:'formFieldTR', children:[
170 {tag:'td', htmlString:Clipperz.PM.Strings['registrationFormPassphraseLabel']}, 167 {tag:'td', htmlString:Clipperz.PM.Strings['registrationFormPassphraseLabel']},
171 {tag:'td', children:[ 168 {tag:'td', children:[
172 {tag:'input', id:this.getId('registration_passphrase'), cls:'loginFormField', type:'password', name:'passphrase'} 169 {tag:'input', id:this.getId('registration_passphrase'), cls:'loginFormField', type:'password', name:'passphrase'}
173 ]} 170 ]}
174 ]}, 171 ]},
175 {tag:'tr', cls:'formFieldTR', children:[ 172 {tag:'tr', cls:'formFieldTR', children:[
176 {tag:'td', htmlString:Clipperz.PM.Strings['registrationFormRetypePassphraseLabel']}, 173 {tag:'td', htmlString:Clipperz.PM.Strings['registrationFormRetypePassphraseLabel']},
177 {tag:'td', children:[ 174 {tag:'td', children:[
178 {tag:'input', id:this.getId('registration_repassphrase'), cls:'loginFormField', type:'password', name:'repeat-passphrase'} 175 {tag:'input', id:this.getId('registration_repassphrase'), cls:'loginFormField', type:'password', name:'repeat-passphrase'}
179 ]} 176 ]}
180 ]}, 177 ]},
181 {tag:'tr', cls:'formFieldTR', children:[ 178 {tag:'tr', cls:'formFieldTR', children:[
182 {tag:'td', align:'right', valign:'top', children:[ 179 {tag:'td', align:'right', valign:'top', children:[
183 {tag:'input', id:this.getId('registration_check'), type:'checkbox', name:'safetyCheck'} 180 {tag:'input', id:this.getId('registration_check'), type:'checkbox', name:'safetyCheck'}
184 ]}, 181 ]},
185 {tag:'td', children:[ 182 {tag:'td', children:[
186 {tag:'span', htmlString:Clipperz.PM.Strings['registrationFormSafetyCheckLabel']} 183 {tag:'span', htmlString:Clipperz.PM.Strings['registrationFormSafetyCheckLabel']}
187 ]} 184 ]}
188 ]}, 185 ]},
189 {tag:'tr', cls:'formFieldTR', children:[ 186 {tag:'tr', cls:'formFieldTR', children:[
190 {tag:'td', align:'right', valign:'top', children:[ 187 {tag:'td', align:'right', valign:'top', children:[
191 {tag:'input', id:this.getId('registration_termsOfServiceCheck'), type:'checkbox', name:'termsOfServiceCheck'} 188 {tag:'input', id:this.getId('registration_termsOfServiceCheck'), type:'checkbox', name:'termsOfServiceCheck'}
192 ]}, 189 ]},
193 {tag:'td', children:[ 190 {tag:'td', children:[
194 {tag:'span', htmlString:Clipperz.PM.Strings['registrationFormTermsOfServiceCheckLabel']} 191 {tag:'span', htmlString:Clipperz.PM.Strings['registrationFormTermsOfServiceCheckLabel']}
195 ]} 192 ]}
196 ]}, 193 ]},
197 // {tag:'tr', cls:'formFieldTR', children:[ 194 // {tag:'tr', cls:'formFieldTR', children:[
198 // {tag:'td', htmlString:Clipperz.PM.Strings['registrationFormInvitationCodeLabel']}, 195 // {tag:'td', htmlString:Clipperz.PM.Strings['registrationFormInvitationCodeLabel']},
199 // {tag:'td', children:[ 196 // {tag:'td', children:[
200 // {tag:'input', id:this.getId('registration_invitationCode'), type:'text', size:'30', name:'invitationCode'} 197 // {tag:'input', id:this.getId('registration_invitationCode'), type:'text', size:'30', name:'invitationCode'}
201 // ]} 198 // ]}
202 // ]}, 199 // ]},
203 {tag:'tr', children:[ 200 {tag:'tr', children:[
204 {tag:'td'}, 201 {tag:'td'},
205 {tag:'td', children:[ 202 {tag:'td', children:[
206 {tag:'div', id:this.getId('registration_submit')} 203 {tag:'div', id:this.getId('registration_submit')}
207 ]} 204 ]}
208 ]} 205 ]}
209 ]}, 206 ]},
210 {tag:'tfoot'} 207 {tag:'tfoot'}
211 ]} 208 ]}
212 ]}, 209 ]},
213 {tag:'div', cls:'loginFormFooterBox', children:[ 210 {tag:'div', cls:'loginFormFooterBox', children:[
214 {tag:'ul', children:[ 211 {tag:'ul', children:[
215 {tag:'li', children:[ 212 {tag:'li', children:[
216 {tag:'span', htmlString:Clipperz.PM.Strings['registrationFormDoYouAlreadyHaveAnAccountLabel']}, 213 {tag:'span', htmlString:Clipperz.PM.Strings['registrationFormDoYouAlreadyHaveAnAccountLabel']},
217 {tag:'a', href:'.', id:this.getId('showLogin'), cls:'clipperzActionLink', htmlString:Clipperz.PM.Strings['registrationFormSimplyLoginLabel']} 214 {tag:'a', href:'.', id:this.getId('showLogin'), cls:'clipperzActionLink', htmlString:Clipperz.PM.Strings['registrationFormSimplyLoginLabel']}
218 ]} 215 ]}
219 ]} 216 ]}
220 ]} 217 ]}
221 ]} 218 ]}
222]}, 219]},
223 {tag:'div', cls:'loginPanelSwitchLanguageBox', children:[ 220 {tag:'div', cls:'loginPanelSwitchLanguageBox', children:[
224 {tag:'div', cls:'loginPanelSwitchLanguageDescription', htmlString:Clipperz.PM.Strings['loginPanelSwithLanguageDescription']}, 221 {tag:'div', cls:'loginPanelSwitchLanguageDescription', htmlString:Clipperz.PM.Strings['loginPanelSwithLanguageDescription']},
225 {tag:'div', cls:'loginPanelSwitchLanguageSelect', children:[ 222 {tag:'div', cls:'loginPanelSwitchLanguageSelect', children:[
226 {tag:'select', id:this.getId('languageSelector'), children:Clipperz.PM.Strings['loginPanelSwitchLanguageSelectOptions']} 223 {tag:'select', id:this.getId('languageSelector'), children:Clipperz.PM.Strings['loginPanelSwitchLanguageSelectOptions']}
227 ]} 224 ]}
228 ]}, 225 ]},
229 {tag:'div', cls:'browserCompatibilityBox', htmlString:Clipperz.PM.Strings['browserCompatibilityDescription']} 226 {tag:'div', cls:'browserCompatibilityBox', htmlString:Clipperz.PM.Strings['browserCompatibilityDescription']}
230 ]} 227 ]}
231 ]} 228 ]}
232 ]} 229 ]}
233 ]} 230 ]}
234 ]}); 231 ]});
235 232
236 MochiKit.Signal.connect(this.getId('loginForm_form'), 'onsubmit', function(e){e.stop();}); 233 MochiKit.Signal.connect(this.getId('loginForm_form'), 'onsubmit', function(e){e.stop();});
237 MochiKit.Signal.connect(this.getId('registrationForm_form'), 'onsubmit', function(e){e.stop();}); 234 MochiKit.Signal.connect(this.getId('registrationForm_form'), 'onsubmit', function(e){e.stop();});
238 235
239 MochiKit.Signal.connect(this.getId('showRegistration'), 'onclick', this, 'showRegistrationFormEventHandler'); 236 MochiKit.Signal.connect(this.getId('showRegistration'), 'onclick', this, 'showRegistrationFormEventHandler');
240 MochiKit.Signal.connect(this.getId('showLogin'), 'onclick', this, 'showLoginFormEventHandler'); 237 MochiKit.Signal.connect(this.getId('showLogin'), 'onclick', this, 'showLoginFormEventHandler');
241 238
242 new YAHOO.ext.Button(this.getId('login_submit'), {text:Clipperz.PM.Strings['loginFormButtonLabel'], handler:this.doLogin, scope:this, minWidth:0}); 239 new YAHOO.ext.Button(this.getId('login_submit'), {text:Clipperz.PM.Strings['loginFormButtonLabel'], handler:this.doLogin, scope:this, minWidth:0});
243 registerButton = new YAHOO.ext.Button(this.getId('registration_submit'), {text:Clipperz.PM.Strings['registrationFormButtonLabel'], handler:this.doRegister, scope:this, minWidth:0}) 240 registerButton = new YAHOO.ext.Button(this.getId('registration_submit'), {text:Clipperz.PM.Strings['registrationFormButtonLabel'], handler:this.doRegister, scope:this, minWidth:0})
244 241
245 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { 242 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) {
246 // this.getElement('showRegistrationLI').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 243 // this.getElement('showRegistrationLI').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
247 this.getElement('registrationForm_form').addClass('read-only'); 244 this.getElement('registrationForm_form').addClass('read-only');
248 registerButton.disable(); 245 registerButton.disable();
249 this.getElement('passwordTypeChooserTR').addClass('read-only'); 246 this.getElement('passwordTypeChooserTR').addClass('read-only');
250 this.getDom('useOneTimePasswordCheckbox').disabled = true; 247 this.getDom('useOneTimePasswordCheckbox').disabled = true;
251 } 248 }
252 249
253 MochiKit.Signal.connect(this.getId('loginForm'), 'onkeydown', this, 'onkeydown'); 250 MochiKit.Signal.connect(this.getId('loginForm'), 'onkeydown', this, 'onkeydown');
254 MochiKit.Signal.connect(this.getId('registrationForm'), 'onkeydown', this, 'onkeydown'); 251 MochiKit.Signal.connect(this.getId('registrationForm'), 'onkeydown', this, 'onkeydown');
255 // MochiKit.Signal.connect(this.getId('useOneTimePasswordCheckbox'), 'onchange', this, 'renderPasswordField'); 252 // MochiKit.Signal.connect(this.getId('useOneTimePasswordCheckbox'), 'onchange', this, 'renderPasswordField');
256 MochiKit.Signal.connect(this.getId('useOneTimePasswordCheckbox'), 'onclick', this, 'renderPasswordField'); 253 MochiKit.Signal.connect(this.getId('useOneTimePasswordCheckbox'), 'onclick', this, 'renderPasswordField');
257 this.renderPasswordField(); 254 this.renderPasswordField();
258 255
259 this.selectSelectedLanguageOption(); 256 this.selectSelectedLanguageOption();
260 MochiKit.Signal.connect(this.getId('languageSelector'), 'onchange', this, 'switchLanguage'); 257 MochiKit.Signal.connect(this.getId('languageSelector'), 'onchange', this, 'switchLanguage');
261 258
262 MochiKit.Signal.connect(this.getId('oneTimePassword_1'), 'onkeypress', this, 'handleOneTimePasswordFieldKeyPress'); 259 MochiKit.Signal.connect(this.getId('oneTimePassword_1'), 'onkeypress', this, 'handleOneTimePasswordFieldKeyPress');
263 MochiKit.Signal.connect(this.getId('oneTimePassword_2'), 'onkeypress', this, 'handleOneTimePasswordFieldKeyPress'); 260 MochiKit.Signal.connect(this.getId('oneTimePassword_2'), 'onkeypress', this, 'handleOneTimePasswordFieldKeyPress');
264 MochiKit.Signal.connect(this.getId('oneTimePassword_3'), 'onkeypress', this, 'handleOneTimePasswordFieldKeyPress'); 261 MochiKit.Signal.connect(this.getId('oneTimePassword_3'), 'onkeypress', this, 'handleOneTimePasswordFieldKeyPress');
265 MochiKit.Signal.connect(this.getId('oneTimePassword_4'), 'onkeypress', this, 'handleOneTimePasswordFieldKeyPress'); 262 MochiKit.Signal.connect(this.getId('oneTimePassword_4'), 'onkeypress', this, 'handleOneTimePasswordFieldKeyPress');
266 263
267 MochiKit.Signal.connect(this.getId('oneTimePassword_1'), 'onkeyup', this, 'handleOneTimePasswordFieldKeyUp'); 264 MochiKit.Signal.connect(this.getId('oneTimePassword_1'), 'onkeyup', this, 'handleOneTimePasswordFieldKeyUp');
268 MochiKit.Signal.connect(this.getId('oneTimePassword_2'), 'onkeyup', this, 'handleOneTimePasswordFieldKeyUp'); 265 MochiKit.Signal.connect(this.getId('oneTimePassword_2'), 'onkeyup', this, 'handleOneTimePasswordFieldKeyUp');
269 MochiKit.Signal.connect(this.getId('oneTimePassword_3'), 'onkeyup', this, 'handleOneTimePasswordFieldKeyUp'); 266 MochiKit.Signal.connect(this.getId('oneTimePassword_3'), 'onkeyup', this, 'handleOneTimePasswordFieldKeyUp');
270 MochiKit.Signal.connect(this.getId('oneTimePassword_4'), 'onkeyup', this, 'handleOneTimePasswordFieldKeyUp'); 267 MochiKit.Signal.connect(this.getId('oneTimePassword_4'), 'onkeyup', this, 'handleOneTimePasswordFieldKeyUp');
271 268
272 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('login_passphrase')); 269 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('login_passphrase'));
273 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('registration_passphrase')); 270 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('registration_passphrase'));
274//MochiKit.Logging.logDebug("<<< LoginPanel.initPanel"); 271//MochiKit.Logging.logDebug("<<< LoginPanel.initPanel");
275 272
276 return result; 273 return result;
277 }, 274 },
278 275
279 //------------------------------------------------------------------------- 276 //-------------------------------------------------------------------------
280 277
281 'renderPasswordField': function() { 278 'renderPasswordField': function() {
282 if (this.getDom('useOneTimePasswordCheckbox').checked == false) { 279 if (this.getDom('useOneTimePasswordCheckbox').checked == false) {
283 this.getElement('oneTimePasswordDIV').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(false); 280 this.getElement('oneTimePasswordDIV').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(false);
284 this.getElement('passphraseDIV').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show(false); 281 this.getElement('passphraseDIV').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show(false);
285 this.getElement('login_passphrase').focus(); 282 this.getElement('login_passphrase').focus();
286 } else { 283 } else {
287 this.getElement('passphraseDIV').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 284 this.getElement('passphraseDIV').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
288 this.getElement('oneTimePasswordDIV').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show(); 285 this.getElement('oneTimePasswordDIV').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show();
289 this.getElement('oneTimePassword_1').focus(); 286 this.getElement('oneTimePassword_1').focus();
290 } 287 }
291 288
292 }, 289 },
293 290
294 //......................................................................... 291 //.........................................................................
295 292
296 'handleOneTimePasswordFieldKeyPress': function(anEvent) { 293 'handleOneTimePasswordFieldKeyPress': function(anEvent) {
297 if (anEvent.key().string == '-') { 294 if (anEvent.key().string == '-') {
298 switch (anEvent.src().id) { 295 switch (anEvent.src().id) {
299 case this.getId('oneTimePassword_1'): 296 case this.getId('oneTimePassword_1'):
300 this.getElement('oneTimePassword_2').focus(); 297 this.getElement('oneTimePassword_2').focus();
301 break; 298 break;
302 case this.getId('oneTimePassword_2'): 299 case this.getId('oneTimePassword_2'):
303 this.getElement('oneTimePassword_3').focus(); 300 this.getElement('oneTimePassword_3').focus();
304 break; 301 break;
305 case this.getId('oneTimePassword_3'): 302 case this.getId('oneTimePassword_3'):
306 this.getElement('oneTimePassword_4').focus(); 303 this.getElement('oneTimePassword_4').focus();
307 break; 304 break;
308 } 305 }
309 306
310 anEvent.stop(); 307 anEvent.stop();
311 } 308 }
312 }, 309 },
313 310
314/* 311/*
315 var ctrl = document.getElementById("txtTargetText"); 312 var ctrl = document.getElementById("txtTargetText");
316 var saveText = ctrl.value; 313 var saveText = ctrl.value;
317 ctrl.focus(); 314 ctrl.focus();
318 315
319 var range = document.selection.createRange(); 316 var range = document.selection.createRange();
320 var specialchar = String.fromCharCode(1); 317 var specialchar = String.fromCharCode(1);
321 range.text = specialchar; 318 range.text = specialchar;
322 var pos = ctrl.value.indexOf(specialchar); 319 var pos = ctrl.value.indexOf(specialchar);
323 ctrl.value = saveText; 320 ctrl.value = saveText;
324 range = ctrl.createTextRange(); 321 range = ctrl.createTextRange();
325 range.move('character', pos); 322 range.move('character', pos);
326 range.select(); 323 range.select();
327 range.text = 324 range.text =
328 document.getElementById("txtSourceText").value; 325 document.getElementById("txtSourceText").value;
329 document.getElementById("txtTargetText").focus(); 326 document.getElementById("txtTargetText").focus();
330 window.event.returnValue = false; 327 window.event.returnValue = false;
331*/ 328*/
332 329
333 'handleOneTimePasswordFieldKeyUp': function(anEvent) { 330 'handleOneTimePasswordFieldKeyUp': function(anEvent) {
334 varfield; 331 varfield;
335 varfieldValue; 332 varfieldValue;
336 var key; 333 var key;
337 334
338//console.log("keyUp", anEvent); 335//console.log("keyUp", anEvent);
339 field = anEvent.src(); 336 field = anEvent.src();
340 fieldValue = field.value; 337 fieldValue = field.value;
341 key = anEvent.key(); 338 key = anEvent.key();
342 339
343 // &&(key.string != 'KEY_TAB') 340 // &&(key.string != 'KEY_TAB')
344 // &&(key.string != 'KEY_SHIFT') 341 // &&(key.string != 'KEY_SHIFT')
345 // &&(key.string != 'KEY_BACKSPACE') 342 // &&(key.string != 'KEY_BACKSPACE')
346 // &&(key.string != 'KEY_DELETE') 343 // &&(key.string != 'KEY_DELETE')
347 // &&(key.string.indexOf('KEY_ARROW') != 0) 344 // &&(key.string.indexOf('KEY_ARROW') != 0)
348 345
349 346
350 if ((fieldValue.replace(/\s/g, '').length == 8) && (key.string == 'KEY_SPACEBAR')) { 347 if ((fieldValue.replace(/\s/g, '').length == 8) && (key.string == 'KEY_SPACEBAR')) {
351 // field.value = Clipperz.Base.trim(fieldValue).replace(/.{4}/g, '$&' + ' '); 348 // field.value = Clipperz.Base.trim(fieldValue).replace(/.{4}/g, '$&' + ' ');
352 349
353 switch (field.id) { 350 switch (field.id) {
354 case this.getId('oneTimePassword_1'): 351 case this.getId('oneTimePassword_1'):
355 this.getElement('oneTimePassword_2').focus(); 352 this.getElement('oneTimePassword_2').focus();
356 break; 353 break;
357 case this.getId('oneTimePassword_2'): 354 case this.getId('oneTimePassword_2'):
358 this.getElement('oneTimePassword_3').focus(); 355 this.getElement('oneTimePassword_3').focus();
359 break; 356 break;
360 case this.getId('oneTimePassword_3'): 357 case this.getId('oneTimePassword_3'):
361 this.getElement('oneTimePassword_4').focus(); 358 this.getElement('oneTimePassword_4').focus();
362 break; 359 break;
363 } 360 }
364 // } else if (fieldValue.replace(/\s/g, '').length > 8) { 361 // } else if (fieldValue.replace(/\s/g, '').length > 8) {
365 } 362 }
366 363
367//MochiKit.Logging.logDebug("-- fieldValue: " + fieldValue); 364//MochiKit.Logging.logDebug("-- fieldValue: " + fieldValue);
368 }, 365 },
369 366
370 //......................................................................... 367 //.........................................................................
371 368
372 'doLogin': function() { 369 'doLogin': function() {
373//MochiKit.Logging.logDebug(">>> LoginPanel.doLogin"); 370//MochiKit.Logging.logDebug(">>> LoginPanel.doLogin");
374 if (this.checkLoginForm()) { 371 if (this.checkLoginForm()) {
375 if (this.getDom('useOneTimePasswordCheckbox').checked == false) { 372 if (this.getDom('useOneTimePasswordCheckbox').checked == false) {
376 this.doLoginWithUsernameAndPassphrase(this.getDom('login_username').value, this.getDom('login_passphrase').value); 373 this.doLoginWithUsernameAndPassphrase(this.getDom('login_username').value, this.getDom('login_passphrase').value);
377 } else { 374 } else {
378 varoneTimePasswordValue; 375 varoneTimePasswordValue;
379 376
380 oneTimePasswordValue = this.getDom('oneTimePassword_1').value + this.getDom('oneTimePassword_2').value + this.getDom('oneTimePassword_3').value + this.getDom('oneTimePassword_4').value; 377 oneTimePasswordValue = this.getDom('oneTimePassword_1').value + this.getDom('oneTimePassword_2').value + this.getDom('oneTimePassword_3').value + this.getDom('oneTimePassword_4').value;
381 this.doLoginWithUsernameAndOneTimePassword(this.getDom('login_username').value, oneTimePasswordValue); 378 this.doLoginWithUsernameAndOneTimePassword(this.getDom('login_username').value, oneTimePasswordValue);
382 } 379 }
383 } 380 }
384//MochiKit.Logging.logDebug("<<< LoginPanel.doLogin"); 381//MochiKit.Logging.logDebug("<<< LoginPanel.doLogin");
385 }, 382 },
386 383
387 //......................................................................... 384 //.........................................................................
388 385
389 'doLoginWithUsernameAndPassphrase': function(anUsername, aPassphrase) { 386 'doLoginWithUsernameAndPassphrase': function(anUsername, aPassphrase) {
390 var deferredResult; 387 var deferredResult;
391 var user; 388 var user;
392 var loginPanel; 389 var loginPanel;
393 390
394//MochiKit.Logging.logDebug(">>> LoginPanel.doLoginWithUsernameAndPassphrase"); 391//MochiKit.Logging.logDebug(">>> LoginPanel.doLoginWithUsernameAndPassphrase");
395 user = new Clipperz.PM.DataModel.User({username:anUsername, passphrase:aPassphrase}); 392 user = new Clipperz.PM.DataModel.User({username:anUsername, passphrase:aPassphrase});
396 loginPanel = this; 393 loginPanel = this;
397 394
398 deferredResult = new MochiKit.Async.Deferred(); 395 deferredResult = new MochiKit.Async.Deferred();
399//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("0 - LoginPanel.doLogin - 0: "/* + res*/); return res;}); 396//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("0 - LoginPanel.doLogin - 0: "/* + res*/); return res;});
400//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 397//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
401 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Components.MessageBox(), 'deferredShow'), 398 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Components.MessageBox(), 'deferredShow'),
402 { 399 {
403 title: "", 400 title: "",
404 text: "", 401 text: "",
405 width:240, 402 width:240,
406 showProgressBar:true, 403 showProgressBar:true,
407 showCloseButton:false, 404 showCloseButton:false,
408 fn:MochiKit.Base.method(deferredResult, 'cancel'), 405 fn:MochiKit.Base.method(deferredResult, 'cancel'),
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/LogoutPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/LogoutPanel.js
index d7abfd6..b8cc556 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Panels/LogoutPanel.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Panels/LogoutPanel.js
@@ -1,73 +1,70 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } 29if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Components.Panels.LogoutPanel = function(args) { 33Clipperz.PM.Components.Panels.LogoutPanel = function(args) {
37 args = args || {}; 34 args = args || {};
38 35
39 Clipperz.PM.Components.Panels.LogoutPanel.superclass.constructor.call(this, args); 36 Clipperz.PM.Components.Panels.LogoutPanel.superclass.constructor.call(this, args);
40 37
41 return this; 38 return this;
42} 39}
43 40
44//============================================================================= 41//=============================================================================
45 42
46YAHOO.extendX(Clipperz.PM.Components.Panels.LogoutPanel, Clipperz.PM.Components.Panels.BasePanel, { 43YAHOO.extendX(Clipperz.PM.Components.Panels.LogoutPanel, Clipperz.PM.Components.Panels.BasePanel, {
47 44
48 'toString': function() { 45 'toString': function() {
49 return "Clipperz.PM.Components.LogoutPanel component"; 46 return "Clipperz.PM.Components.LogoutPanel component";
50 }, 47 },
51 48
52 //------------------------------------------------------------------------- 49 //-------------------------------------------------------------------------
53 50
54 'initPanel': function() { 51 'initPanel': function() {
55 var result; 52 var result;
56 varlayout; 53 varlayout;
57 54
58 result = new YAHOO.ext.ContentPanel(this.getId('panel'), {title:'logout', closable:false, autoCreate:true}); 55 result = new YAHOO.ext.ContentPanel(this.getId('panel'), {title:'logout', closable:false, autoCreate:true});
59 56
60 Clipperz.YUI.DomHelper.append(result.getEl().dom, 57 Clipperz.YUI.DomHelper.append(result.getEl().dom,
61 {tag:'div', children:[ 58 {tag:'div', children:[
62 {tag:'h2', html:'Logout panel'} 59 {tag:'h2', html:'Logout panel'}
63 ]} 60 ]}
64 ); 61 );
65 62
66 return result; 63 return result;
67 }, 64 },
68 65
69 //------------------------------------------------------------------------- 66 //-------------------------------------------------------------------------
70 __syntaxFix__: "syntax fix" 67 __syntaxFix__: "syntax fix"
71 68
72}); 69});
73 70
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js
index e2036d0..29ef516 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } 29if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Components.Panels.MainPanel = function(anElement, args) { 33Clipperz.PM.Components.Panels.MainPanel = function(anElement, args) {
37 args = args || {}; 34 args = args || {};
38 35
39 Clipperz.PM.Components.Panels.MainPanel.superclass.constructor.call(this, anElement, args); 36 Clipperz.PM.Components.Panels.MainPanel.superclass.constructor.call(this, anElement, args);
40 37
41 this._recordListDataModel = null; 38 this._recordListDataModel = null;
42 this._selectedRecord = null; 39 this._selectedRecord = null;
43 this._recordDetailComponent = null; 40 this._recordDetailComponent = null;
44 this._recordListGrid = null; 41 this._recordListGrid = null;
45 42
46 this._directLinkItemTemplate = null; 43 this._directLinkItemTemplate = null;
47 this._recordItemTemplate = null; 44 this._recordItemTemplate = null;
48 45
49 this._addNewRecordButton = null; 46 this._addNewRecordButton = null;
50 this._deleteRecordButton = null; 47 this._deleteRecordButton = null;
51 48
52 this._creationWizard = null; 49 this._creationWizard = null;
53 50
54 Clipperz.NotificationCenter.register(null, 'selectAndEnterEditMode', this, 'selectRecordAndEnterEditModeHandler'); 51 Clipperz.NotificationCenter.register(null, 'selectAndEnterEditMode', this, 'selectRecordAndEnterEditModeHandler');
55 52
56 Clipperz.NotificationCenter.register(null, 'recordAdded', this, 'recordAddedHandler'); 53 Clipperz.NotificationCenter.register(null, 'recordAdded', this, 'recordAddedHandler');
57 Clipperz.NotificationCenter.register(null, 'recordUpdated', this, 'recordUpdatedHandler'); 54 Clipperz.NotificationCenter.register(null, 'recordUpdated', this, 'recordUpdatedHandler');
58 Clipperz.NotificationCenter.register(null, 'recordRemoved', this, 'recordRemovedHandler'); 55 Clipperz.NotificationCenter.register(null, 'recordRemoved', this, 'recordRemovedHandler');
59 56
60 Clipperz.NotificationCenter.register(null, 'directLoginAdded', this, 'directLoginAddedHandler'); 57 Clipperz.NotificationCenter.register(null, 'directLoginAdded', this, 'directLoginAddedHandler');
61 Clipperz.NotificationCenter.register(null, 'directLoginUpdated', this, 'directLoginUpdatedHandler'); 58 Clipperz.NotificationCenter.register(null, 'directLoginUpdated', this, 'directLoginUpdatedHandler');
62 Clipperz.NotificationCenter.register(null, 'directLoginRemoved', this, 'directLoginRemovedHandler'); 59 Clipperz.NotificationCenter.register(null, 'directLoginRemoved', this, 'directLoginRemovedHandler');
63 60
64 Clipperz.NotificationCenter.register(null, 'accountLocked', this, 'accountLockedHandler'); 61 Clipperz.NotificationCenter.register(null, 'accountLocked', this, 'accountLockedHandler');
65 62
66 MochiKit.Signal.connect(MochiKit.DOM.currentWindow(), 'onresize', this, 'resizeModalMask'); 63 MochiKit.Signal.connect(MochiKit.DOM.currentWindow(), 'onresize', this, 'resizeModalMask');
67 this.render(); 64 this.render();
68 65
69 return this; 66 return this;
70} 67}
71 68
72//============================================================================= 69//=============================================================================
73 70
74YAHOO.extendX(Clipperz.PM.Components.Panels.MainPanel, Clipperz.PM.Components.Panels.BasePanel, { 71YAHOO.extendX(Clipperz.PM.Components.Panels.MainPanel, Clipperz.PM.Components.Panels.BasePanel, {
75 72
76 'toString': function() { 73 'toString': function() {
77 return "Clipperz.PM.Components.Panels.MainPanel component"; 74 return "Clipperz.PM.Components.Panels.MainPanel component";
78 }, 75 },
79 76
80 //------------------------------------------------------------------------- 77 //-------------------------------------------------------------------------
81 78
82 'render': function() { 79 'render': function() {
83 this.element().update(""); 80 this.element().update("");
84 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', id:'mainPanelTABLE', border:'0', cellspacing:'0', cellpadding:'0', children:[ 81 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', id:'mainPanelTABLE', border:'0', cellspacing:'0', cellpadding:'0', children:[
85 {tag:'tbody', children:[ 82 {tag:'tbody', children:[
86 {tag:'tr', children:[ 83 {tag:'tr', children:[
87 {tag:'td', width:'15', children:[ 84 {tag:'td', width:'15', children:[
88 {tag:'div', cls:'mainPanelMinHeightDiv'} 85 {tag:'div', cls:'mainPanelMinHeightDiv'}
89 ]}, 86 ]},
90 {tag:'td', valign:'top', id:'directLoginsTD', width:'200', children:[ 87 {tag:'td', valign:'top', id:'directLoginsTD', width:'200', children:[
91 {tag:'div', id:'directLoginsBlock', children:[ 88 {tag:'div', id:'directLoginsBlock', children:[
92 {tag:'div', cls:'directLoginsBlockHeaderBox', children:[{tag:'h3', id:'directLoginTitle', htmlString:Clipperz.PM.Strings['mainPanelDirectLoginBlockLabel']}]}, 89 {tag:'div', cls:'directLoginsBlockHeaderBox', children:[{tag:'h3', id:'directLoginTitle', htmlString:Clipperz.PM.Strings['mainPanelDirectLoginBlockLabel']}]},
93 {tag:'div', id:'directLoginsDescription', htmlString:Clipperz.PM.Strings['mainPanelDirectLoginBlockDescription']}, 90 {tag:'div', id:'directLoginsDescription', htmlString:Clipperz.PM.Strings['mainPanelDirectLoginBlockDescription']},
94 {tag:'ul', id:'directLogins'} 91 {tag:'ul', id:'directLogins'}
95 ]} 92 ]}
96 ]}, 93 ]},
97 {tag:'td', width:'15', children:[ 94 {tag:'td', width:'15', children:[
98 {tag:'div', cls:'mainPanelMinHeightDiv'} 95 {tag:'div', cls:'mainPanelMinHeightDiv'}
99 ]}, 96 ]},
100 {tag:'td', valign:'top', children:[ 97 {tag:'td', valign:'top', children:[
101 {tag:'div', id:'mainContent', children:[ 98 {tag:'div', id:'mainContent', children:[
102 {tag:'div', id:'recordListBlockHeader'}, 99 {tag:'div', id:'recordListBlockHeader'},
103 {tag:'div', id:'recordListAndDetailBlock', children:[ 100 {tag:'div', id:'recordListAndDetailBlock', children:[
104 {tag:'table', id:'recordListAndDetailBlockTABLE', border:'0', cellspacing:'0', cellpadding:'0', children:[ 101 {tag:'table', id:'recordListAndDetailBlockTABLE', border:'0', cellspacing:'0', cellpadding:'0', children:[
105 {tag:'tbody', children:[ 102 {tag:'tbody', children:[
106 {tag:'tr', children:[ 103 {tag:'tr', children:[
107 {tag:'td', valign:'top', width:'250', children:[ 104 {tag:'td', valign:'top', width:'250', children:[
108 {tag:'div', id:'recordListBlock', children:[ 105 {tag:'div', id:'recordListBlock', children:[
109 {tag:'div', id:'recordListFilterHeader'}, 106 {tag:'div', id:'recordListFilterHeader'},
110 {tag:'ul', id:'records'} 107 {tag:'ul', id:'records'}
111 ]} 108 ]}
112 ]}, 109 ]},
113 {tag:'td', id:'recordDetailSeparatorTD', rowspan:'2', valign:'top', bgcolor:'#ddddff', html:'&nbsp;'}, 110 {tag:'td', id:'recordDetailSeparatorTD', rowspan:'2', valign:'top', bgcolor:'#ddddff', html:'&nbsp;'},
114 {tag:'td', valign:'top', children:[ 111 {tag:'td', valign:'top', children:[
115 {tag:'div', id:'recordDetailMainBlock', children:[ 112 {tag:'div', id:'recordDetailMainBlock', children:[
116 {tag:'div', id:'recordTitleTopBlock'}, 113 {tag:'div', id:'recordTitleTopBlock'},
117 {tag:'div', id:'recordDetailBlock', children:[ 114 {tag:'div', id:'recordDetailBlock', children:[
118 {tag:'div', id:'recordDetail'} 115 {tag:'div', id:'recordDetail'}
119 ]} 116 ]}
120 ]}, 117 ]},
121 {tag:'div', id:'recordCreationWizardMainBlock', children:[ 118 {tag:'div', id:'recordCreationWizardMainBlock', children:[
122 {tag:'div', id:'recordCreationWizard', html:"WIZARD"} 119 {tag:'div', id:'recordCreationWizard', html:"WIZARD"}
123 ]} 120 ]}
124 ]} 121 ]}
125 ]}, 122 ]},
126 {tag:'tr', children:[ 123 {tag:'tr', children:[
127 {tag:'td', id:'cardBoxLowerLeftTD', html:'&nbsp;'}, 124 {tag:'td', id:'cardBoxLowerLeftTD', html:'&nbsp;'},
128 {tag:'td', id:'cardBoxLowerRightTD', html:'&nbsp;'} 125 {tag:'td', id:'cardBoxLowerRightTD', html:'&nbsp;'}
129 ]} 126 ]}
130 ]} 127 ]}
131 ]} 128 ]}
132 ]} 129 ]}
133 ]} 130 ]}
134 ]}, 131 ]},
135 {tag:'td', width:'15', html:"&nbsp;"} 132 {tag:'td', width:'15', html:"&nbsp;"}
136 ]} 133 ]}
137 ]} 134 ]}
138 ]}); 135 ]});
139 136
140 this.renderRecordListBlockHeader(); 137 this.renderRecordListBlockHeader();
141 // this.renderRecordListFilterHeader(); 138 // this.renderRecordListFilterHeader();
142 139
143 YAHOO.ext.Element.get('directLogins').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 140 YAHOO.ext.Element.get('directLogins').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
144 141
145 this.recordDetailComponent(); 142 this.recordDetailComponent();
146 143
147 YAHOO.ext.Element.get('recordDetailMainBlock').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show(); 144 YAHOO.ext.Element.get('recordDetailMainBlock').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show();
148 YAHOO.ext.Element.get('recordCreationWizardMainBlock').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 145 YAHOO.ext.Element.get('recordCreationWizardMainBlock').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
149 }, 146 },
150 147
151 //------------------------------------------------------------------------- 148 //-------------------------------------------------------------------------
152 149
153 'addNewRecordButton': function() { 150 'addNewRecordButton': function() {
154 return this._addNewRecordButton; 151 return this._addNewRecordButton;
155 }, 152 },
156 153
157 'setAddNewRecordButton': function(aValue) { 154 'setAddNewRecordButton': function(aValue) {
158 this._addNewRecordButton = aValue; 155 this._addNewRecordButton = aValue;
159 }, 156 },
160 157
161 'deleteRecordButton': function() { 158 'deleteRecordButton': function() {
162 return this._deleteRecordButton; 159 return this._deleteRecordButton;
163 }, 160 },
164 161
165 'setDeleteRecordButton': function(aValue) { 162 'setDeleteRecordButton': function(aValue) {
166 this._deleteRecordButton = aValue; 163 this._deleteRecordButton = aValue;
167 }, 164 },
168 165
169 //------------------------------------------------------------------------- 166 //-------------------------------------------------------------------------
170 167
171 'addNewRecord': function(anEvent) { 168 'addNewRecord': function(anEvent) {
172 var deferredResult; 169 var deferredResult;
173 // var currentNumberOfRecords; 170 // var currentNumberOfRecords;
174 171
175 deferredResult = new MochiKit.Async.Deferred(); 172 deferredResult = new MochiKit.Async.Deferred();
176 173
177 // currentNumberOfRecords = MochiKit.Base.keys(this.user().records()).length; 174 // currentNumberOfRecords = MochiKit.Base.keys(this.user().records()).length;
178/* 175/*
179 // if ((this.user().preferences().shouldShowDonationPanel()) && (currentNumberOfRecords > 0) && ((currentNumberOfRecords%10) == 0)) { 176 // if ((this.user().preferences().shouldShowDonationPanel()) && (currentNumberOfRecords > 0) && ((currentNumberOfRecords%10) == 0)) {
180 // if (true) { 177 // if (true) {
181 if ((this.user().preferences().shouldShowDonationPanel()) && (currentNumberOfRecords >= 5)) { 178 if ((this.user().preferences().shouldShowDonationPanel()) && (currentNumberOfRecords >= 5)) {
182 deferredResult.addCallback(Clipperz.PM.showDonationSplashScreen, this.user(), 'recordListAddRecordButton'); 179 deferredResult.addCallback(Clipperz.PM.showDonationSplashScreen, this.user(), 'recordListAddRecordButton');
183 } 180 }
184*/ 181*/
185 deferredResult.addCallback(MochiKit.Base.bind(function() { 182 deferredResult.addCallback(MochiKit.Base.bind(function() {
186 var currentlySelectedRecord; 183 var currentlySelectedRecord;
187 184
188 currentlySelecedRecord = this.selectedRecord(); 185 currentlySelecedRecord = this.selectedRecord();
189 this.setSelectedRecord(null); 186 this.setSelectedRecord(null);
190 187
191 YAHOO.ext.Element.get('recordDetailMainBlock').hide(); 188 YAHOO.ext.Element.get('recordDetailMainBlock').hide();
192 YAHOO.ext.Element.get('recordCreationWizardMainBlock').show(); 189 YAHOO.ext.Element.get('recordCreationWizardMainBlock').show();
193 this.setCreationWizard(new Clipperz.PM.Components.RecordDetail.CreationWizard(YAHOO.ext.Element.get('recordCreationWizardMainBlock'), {previouslySelectedRecord:currentlySelecedRecord, mainComponent:this})); 190 this.setCreationWizard(new Clipperz.PM.Components.RecordDetail.CreationWizard(YAHOO.ext.Element.get('recordCreationWizardMainBlock'), {previouslySelectedRecord:currentlySelecedRecord, mainComponent:this}));
194 191
195 this.enterModalView(); 192 this.enterModalView();
196 }, this)); 193 }, this));
197 194
198 deferredResult.callback(); 195 deferredResult.callback();
199 }, 196 },
200 197
201 //------------------------------------------------------------------------- 198 //-------------------------------------------------------------------------
202 199
203 'creationWizard': function() { 200 'creationWizard': function() {
204 return this._creationWizard; 201 return this._creationWizard;
205 }, 202 },
206 203
207 'setCreationWizard': function(aValue) { 204 'setCreationWizard': function(aValue) {
208 this._creationWizard = aValue; 205 this._creationWizard = aValue;
209 }, 206 },
210 207
211 //------------------------------------------------------------------------- 208 //-------------------------------------------------------------------------
212 209
213 'exitWizard': function(aSelectedRecord, shouldEnterEditMode) { 210 'exitWizard': function(aSelectedRecord, shouldEnterEditMode) {
214//MochiKit.Logging.logDebug(">>> MainPanel.exitWizard - " + aSelectedRecord) 211//MochiKit.Logging.logDebug(">>> MainPanel.exitWizard - " + aSelectedRecord)
215 YAHOO.ext.Element.get('recordCreationWizardMainBlock').hide(); 212 YAHOO.ext.Element.get('recordCreationWizardMainBlock').hide();
216 YAHOO.ext.Element.get('recordDetailMainBlock').show(); 213 YAHOO.ext.Element.get('recordDetailMainBlock').show();
217 214
218 if (shouldEnterEditMode == true) { 215 if (shouldEnterEditMode == true) {
219 this.selectRecordAndEnterEditMode(aSelectedRecord); 216 this.selectRecordAndEnterEditMode(aSelectedRecord);
220 } else { 217 } else {
221 this.setSelectedRecord(aSelectedRecord); 218 this.setSelectedRecord(aSelectedRecord);
222 this.exitModalView(); 219 this.exitModalView();
223 } 220 }
224 221
225 this.creationWizard().remove(); 222 this.creationWizard().remove();
226 this.setCreationWizard(null); 223 this.setCreationWizard(null);
227//MochiKit.Logging.logDebug("<<< MainPanel.exitWizard"); 224//MochiKit.Logging.logDebug("<<< MainPanel.exitWizard");
228 }, 225 },
229 226
230 //------------------------------------------------------------------------- 227 //-------------------------------------------------------------------------
231 228
232 'selectRecordAndEnterEditMode': function(aRecord) { 229 'selectRecordAndEnterEditMode': function(aRecord) {
233 this.setSelectedRecord(aRecord); 230 this.setSelectedRecord(aRecord);
234 this.recordDetailComponent().setEditMode('EDIT'); 231 this.recordDetailComponent().setEditMode('EDIT');
235 }, 232 },
236 233
237 'selectRecordAndEnterEditModeHandler': function(anEvent) { 234 'selectRecordAndEnterEditModeHandler': function(anEvent) {
238 this.selectRecordAndEnterEditMode(anEvent.source()); 235 this.selectRecordAndEnterEditMode(anEvent.source());
239 }, 236 },
240 237
241 //------------------------------------------------------------------------- 238 //-------------------------------------------------------------------------
242 239
243 'resizeModalMask': function() { 240 'resizeModalMask': function() {
244//MochiKit.Logging.logDebug(">>> MainPanel.resizeModalMask"); 241//MochiKit.Logging.logDebug(">>> MainPanel.resizeModalMask");
245 MochiKit.Style.setElementDimensions('recordDetailEditModeHeaderMask', {w:MochiKit.Style.getElementDimensions('mainDiv').w, h:119}); 242 MochiKit.Style.setElementDimensions('recordDetailEditModeHeaderMask', {w:MochiKit.Style.getElementDimensions('mainDiv').w, h:119});
246 243
247 MochiKit.Style.setElementDimensions('recordDetailEditModeVerticalMask', {w:511, h:MochiKit.Style.getElementDimensions('mainDiv').h - 119}); 244 MochiKit.Style.setElementDimensions('recordDetailEditModeVerticalMask', {w:511, h:MochiKit.Style.getElementDimensions('mainDiv').h - 119});
248//MochiKit.Logging.logDebug("<<< MainPanel.resizeModalMask"); 245//MochiKit.Logging.logDebug("<<< MainPanel.resizeModalMask");
249 }, 246 },
250 247
251 //------------------------------------------------------------------------- 248 //-------------------------------------------------------------------------
252 249
253 'enterModalView': function() { 250 'enterModalView': function() {
254 if (this.user().preferences().useSafeEditMode()) { 251 if (this.user().preferences().useSafeEditMode()) {
255 var headerMaskElement; 252 var headerMaskElement;
256 var verticalMaskElement; 253 var verticalMaskElement;
257 254
258 this.resizeModalMask(); 255 this.resizeModalMask();
259 256
260 headerMaskElement = YAHOO.ext.Element.get('recordDetailEditModeHeaderMask'); 257 headerMaskElement = YAHOO.ext.Element.get('recordDetailEditModeHeaderMask');
261 headerMaskElement.show(); 258 headerMaskElement.show();
262 headerMaskElement.mask(); 259 headerMaskElement.mask();
263 260
264 verticalMaskElement = YAHOO.ext.Element.get('recordDetailEditModeVerticalMask'); 261 verticalMaskElement = YAHOO.ext.Element.get('recordDetailEditModeVerticalMask');
265 verticalMaskElement.show(); 262 verticalMaskElement.show();
266 verticalMaskElement.mask(); 263 verticalMaskElement.mask();
267 } 264 }
268 }, 265 },
269 266
270 //------------------------------------------------------------------------- 267 //-------------------------------------------------------------------------
271 268
272 'exitModalView': function() { 269 'exitModalView': function() {
273 if (this.user().preferences().useSafeEditMode()) { 270 if (this.user().preferences().useSafeEditMode()) {
274 var headerMaskElement; 271 var headerMaskElement;
275 var verticalMaskElement; 272 var verticalMaskElement;
276 273
277 headerMaskElement = YAHOO.ext.Element.get('recordDetailEditModeHeaderMask'); 274 headerMaskElement = YAHOO.ext.Element.get('recordDetailEditModeHeaderMask');
278 headerMaskElement.unmask(); 275 headerMaskElement.unmask();
279 headerMaskElement.hide(); 276 headerMaskElement.hide();
280 277
281 verticalMaskElement = YAHOO.ext.Element.get('recordDetailEditModeVerticalMask'); 278 verticalMaskElement = YAHOO.ext.Element.get('recordDetailEditModeVerticalMask');
282 verticalMaskElement.unmask(); 279 verticalMaskElement.unmask();
283 verticalMaskElement.hide(); 280 verticalMaskElement.hide();
284 } 281 }
285 }, 282 },
286 283
287 //------------------------------------------------------------------------- 284 //-------------------------------------------------------------------------
288 285
289 'removeSelectedRecord': function() { 286 'removeSelectedRecord': function() {
290 var selectedRecordReferences; 287 var selectedRecordReferences;
291 288
292//MochiKit.Logging.logDebug(">>> MainPanel.removeSelectedRecord"); 289//MochiKit.Logging.logDebug(">>> MainPanel.removeSelectedRecord");
293 if (this.selectedRecord() != null) { 290 if (this.selectedRecord() != null) {
294 selectedRecordReferences = [this.selectedRecord().reference()]; 291 selectedRecordReferences = [this.selectedRecord().reference()];
295 } else { 292 } else {
296 selectedRecordReferences = []; 293 selectedRecordReferences = [];
297 } 294 }
298 295
299 if (selectedRecordReferences.length > 0 ) { 296 if (selectedRecordReferences.length > 0 ) {
300 varrecordReference; 297 varrecordReference;
301 varrecords; 298 varrecords;
302 var deferred; 299 var deferred;
303 300
304 records = []; 301 records = [];
305 for (recordReference in selectedRecordReferences) { 302 for (recordReference in selectedRecordReferences) {
306 var record; 303 var record;
307 304
308//MochiKit.Logging.logDebug("### MainPanel.removeSelectedRecord - recordReference: " + selectedRecordReferences[recordReference]); 305//MochiKit.Logging.logDebug("### MainPanel.removeSelectedRecord - recordReference: " + selectedRecordReferences[recordReference]);
309 record = this.user().records()[selectedRecordReferences[recordReference]]; 306 record = this.user().records()[selectedRecordReferences[recordReference]];
310//MochiKit.Logging.logDebug("### MainPanel.removeSelectedRecord - record: " + record); 307//MochiKit.Logging.logDebug("### MainPanel.removeSelectedRecord - record: " + record);
311 records.push(record); 308 records.push(record);
312 } 309 }
313//MochiKit.Logging.logDebug("### MainPanel.removeSelectedRecord - records.length: " + records.length); 310//MochiKit.Logging.logDebug("### MainPanel.removeSelectedRecord - records.length: " + records.length);
314 311
315 deferred = new MochiKit.Async.Deferred(); 312 deferred = new MochiKit.Async.Deferred();
316//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 1:"); 313//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 1:");
317//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 1: " + res); return res;}); 314//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 1: " + res); return res;});
318//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 2:"); 315//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 2:");
319 deferred.addCallback(function() { 316 deferred.addCallback(function() {
320 var deferredResult; 317 var deferredResult;
321 318
322 deferredResult = new MochiKit.Async.Deferred(); 319 deferredResult = new MochiKit.Async.Deferred();
323 Clipperz.PM.Components.MessageBox().deferredShow({ 320 Clipperz.PM.Components.MessageBox().deferredShow({
324 title:Clipperz.PM.Strings['mainPanelDeletingRecordPanelConfirmationTitle'], 321 title:Clipperz.PM.Strings['mainPanelDeletingRecordPanelConfirmationTitle'],
325 text:Clipperz.PM.Strings['mainPanelDeleteRecordPanelConfirmationText'], 322 text:Clipperz.PM.Strings['mainPanelDeleteRecordPanelConfirmationText'],
326 width:240, 323 width:240,
327 showProgressBar:false, 324 showProgressBar:false,
328 showCloseButton:false, 325 showCloseButton:false,
329 buttons:{ 326 buttons:{
330 'yes':Clipperz.PM.Strings['mainPanelDeleteRecordPanelConfirmButtonLabel'], 327 'yes':Clipperz.PM.Strings['mainPanelDeleteRecordPanelConfirmButtonLabel'],
331 'no':Clipperz.PM.Strings['mainPanelDeleteRecordPanelDenyButtonLabel'] 328 'no':Clipperz.PM.Strings['mainPanelDeleteRecordPanelDenyButtonLabel']
332 }, 329 },
333 fn:MochiKit.Base.partial(function(aDeferred, aResult) { 330 fn:MochiKit.Base.partial(function(aDeferred, aResult) {
334 if (aResult == 'yes') { 331 if (aResult == 'yes') {
335 aDeferred.callback(aResult); 332 aDeferred.callback(aResult);
336 } else { 333 } else {
337 aDeferred.errback(aResult); 334 aDeferred.errback(aResult);
338 } 335 }
339 }, deferredResult) 336 }, deferredResult)
340 }, 'recordListRemoveRecordButton'); 337 }, 'recordListRemoveRecordButton');
341 338
342 return deferredResult; 339 return deferredResult;
343 }); 340 });
344//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 3:"); 341//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 3:");
345//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 2: " + res); return res;}); 342//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 2: " + res); return res;});
346//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 4:"); 343//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 4:");
347//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 3: " + res); return res;}); 344//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 3: " + res); return res;});
348 deferred.addCallback(MochiKit.Base.method(Clipperz.PM.Components.MessageBox(), 'deferredShow'), 345 deferred.addCallback(MochiKit.Base.method(Clipperz.PM.Components.MessageBox(), 'deferredShow'),
349 { 346 {
350 title:Clipperz.PM.Strings['mainPanelDeletingRecordPanelInitialTitle'], 347 title:Clipperz.PM.Strings['mainPanelDeletingRecordPanelInitialTitle'],
351 text:Clipperz.PM.Strings['mainPanelDeletingRecordPanelInitialText'], 348 text:Clipperz.PM.Strings['mainPanelDeletingRecordPanelInitialText'],
352 width:240, 349 width:240,
353 showProgressBar:true, 350 showProgressBar:true,
354 showCloseButton:false, 351 showCloseButton:false,
355 steps:5 352 steps:5
356 } 353 }
357 ); 354 );
358//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 5:"); 355//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 5:");
359//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 4: " + res); return res;}); 356//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 4: " + res); return res;});
360 deferred.addCallback(MochiKit.Base.method(this.user(), 'deleteRecordsAction'), records); 357 deferred.addCallback(MochiKit.Base.method(this.user(), 'deleteRecordsAction'), records);
361//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 6:"); 358//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 6:");
362//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 5: " + res); return res;}); 359//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 5: " + res); return res;});
363//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 7:"); 360//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 7:");
364//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 6: " + res); return res;}); 361//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 6: " + res); return res;});
365 deferred.addCallback(function() { 362 deferred.addCallback(function() {
366 Clipperz.PM.Components.MessageBox().update({ 363 Clipperz.PM.Components.MessageBox().update({
367 title:null, 364 title:null,
368 text:Clipperz.PM.Strings['mainPanelDeletingRecordPanelCompletedText'], 365 text:Clipperz.PM.Strings['mainPanelDeletingRecordPanelCompletedText'],
369 step:'next', 366 step:'next',
370 buttons:{} 367 buttons:{}
371 }); 368 });
372 }); 369 });
373//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 8:"); 370//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 8:");
374//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 7: " + res); return res;}); 371//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 7: " + res); return res;});
375 deferred.addCallback(MochiKit.Async.wait, 1); 372 deferred.addCallback(MochiKit.Async.wait, 1);
376//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 9:"); 373//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 9:");
377//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 8: " + res); return res;}); 374//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 8: " + res); return res;});
378 deferred.addCallback(function(res) { 375 deferred.addCallback(function(res) {
379 Clipperz.PM.Components.MessageBox().hide(YAHOO.ext.Element.get('main')); 376 Clipperz.PM.Components.MessageBox().hide(YAHOO.ext.Element.get('main'));
380 return res; 377 return res;
381 }); 378 });
382//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 10:"); 379//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 10:");
383//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 9: " + res); return res;}); 380//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 9: " + res); return res;});
384 deferred.callback(); 381 deferred.callback();
385 } else { 382 } else {
386//MochiKit.Logging.logDebug("+++ MainPanel.removeSelectedRecord - nothing selected"); 383//MochiKit.Logging.logDebug("+++ MainPanel.removeSelectedRecord - nothing selected");
387 } 384 }
388 }, 385 },
389 386
390 //------------------------------------------------------------------------- 387 //-------------------------------------------------------------------------
391 388
392 'recordDetailComponent': function() { 389 'recordDetailComponent': function() {
393//MochiKit.Logging.logDebug(">>> MainPanel.recordDetailComponent"); 390//MochiKit.Logging.logDebug(">>> MainPanel.recordDetailComponent");
394 if (this._recordDetailComponent == null) { 391 if (this._recordDetailComponent == null) {
395//MochiKit.Logging.logDebug("--- MainPanel.recordDetailComponent - 1"); 392//MochiKit.Logging.logDebug("--- MainPanel.recordDetailComponent - 1");
396//MochiKit.Logging.logDebug("--- MainPanel.recordDetailComponent - 1 - user: " + this.user()); 393//MochiKit.Logging.logDebug("--- MainPanel.recordDetailComponent - 1 - user: " + this.user());
397 this._recordDetailComponent = new Clipperz.PM.Components.RecordDetail.MainComponent( 394 this._recordDetailComponent = new Clipperz.PM.Components.RecordDetail.MainComponent(
398 YAHOO.ext.Element.get('recordDetail'), 395 YAHOO.ext.Element.get('recordDetail'),
399 {user:this.user(), mainPanel:this} 396 {user:this.user(), mainPanel:this}
400 ); 397 );
401 } 398 }
402 399
403//MochiKit.Logging.logDebug("<<< MainPanel.recordDetailComponent"); 400//MochiKit.Logging.logDebug("<<< MainPanel.recordDetailComponent");
404 401
405 return this._recordDetailComponent; 402 return this._recordDetailComponent;
406 }, 403 },
407 404
408 //------------------------------------------------------------------------- 405 //-------------------------------------------------------------------------
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/ToolsPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/ToolsPanel.js
index abd2621..4f2a015 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Panels/ToolsPanel.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Panels/ToolsPanel.js
@@ -1,305 +1,302 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } 29if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Components.Panels.ToolsPanel = function(anElement, args) { 33Clipperz.PM.Components.Panels.ToolsPanel = function(anElement, args) {
37 args = args || {}; 34 args = args || {};
38 35
39 Clipperz.PM.Components.Panels.ToolsPanel.superclass.constructor.call(this, anElement, args); 36 Clipperz.PM.Components.Panels.ToolsPanel.superclass.constructor.call(this, anElement, args);
40 37
41 this._generateButtonElement = null; 38 this._generateButtonElement = null;
42 this._needsRenderingUponTabSwitch = false; 39 this._needsRenderingUponTabSwitch = false;
43 40
44 this.render(); 41 this.render();
45 42
46 return this; 43 return this;
47} 44}
48 45
49//============================================================================= 46//=============================================================================
50 47
51YAHOO.extendX(Clipperz.PM.Components.Panels.ToolsPanel, Clipperz.PM.Components.Panels.BasePanel, { 48YAHOO.extendX(Clipperz.PM.Components.Panels.ToolsPanel, Clipperz.PM.Components.Panels.BasePanel, {
52 49
53 'toString': function() { 50 'toString': function() {
54 return "Clipperz.PM.Components.Panels.ToolsPanel component"; 51 return "Clipperz.PM.Components.Panels.ToolsPanel component";
55 }, 52 },
56 53
57 //------------------------------------------------------------------------- 54 //-------------------------------------------------------------------------
58 55
59 'render': function() { 56 'render': function() {
60 var bookmarkletUrl; 57 var bookmarkletUrl;
61 58
62//MochiKit.Logging.logDebug(">>> ToolsPanel.render"); 59//MochiKit.Logging.logDebug(">>> ToolsPanel.render");
63 Clipperz.NotificationCenter.unregister(this); 60 Clipperz.NotificationCenter.unregister(this);
64 MochiKit.Signal.disconnectAllTo(this); 61 MochiKit.Signal.disconnectAllTo(this);
65 62
66 if (Clipperz_IEisBroken == true) { 63 if (Clipperz_IEisBroken == true) {
67 bookmarkletUrl = bookmarklet_ie; 64 bookmarkletUrl = bookmarklet_ie;
68 } else { 65 } else {
69 bookmarkletUrl = bookmarklet; 66 bookmarkletUrl = bookmarklet;
70 } 67 }
71 68
72 this.element().update(""); 69 this.element().update("");
73 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ 70 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[
74 {tag:'tbody', children:[ 71 {tag:'tbody', children:[
75 {tag:'tr', children:[ 72 {tag:'tr', children:[
76 {tag:'td', valign:'top', width:'200', children:[ 73 {tag:'td', valign:'top', width:'200', children:[
77 {tag:'ul', id:"dataSubMenu", cls:'subMenu', children:[ 74 {tag:'ul', id:"dataSubMenu", cls:'subMenu', children:[
78 {tag:'li', id:this.getId('passwordGenerator'), htmlString:Clipperz.PM.Strings['passwordGeneratorTabLabel']}, 75 {tag:'li', id:this.getId('passwordGenerator'), htmlString:Clipperz.PM.Strings['passwordGeneratorTabLabel']},
79 {tag:'li', id:this.getId('bookmarklet'), htmlString:Clipperz.PM.Strings['bookmarkletTabLabel']}, 76 {tag:'li', id:this.getId('bookmarklet'), htmlString:Clipperz.PM.Strings['bookmarkletTabLabel']},
80 {tag:'li', id:this.getId('compact'), htmlString:Clipperz.PM.Strings['compactTabLabel']}, 77 {tag:'li', id:this.getId('compact'), htmlString:Clipperz.PM.Strings['compactTabLabel']},
81 {tag:'li', id:this.getId('httpAuth'), htmlString:Clipperz.PM.Strings['httpAuthTabLabel']} 78 {tag:'li', id:this.getId('httpAuth'), htmlString:Clipperz.PM.Strings['httpAuthTabLabel']}
82 ]} 79 ]}
83 ]}, 80 ]},
84 {tag:'td', valign:'top', children:[ 81 {tag:'td', valign:'top', children:[
85 {tag:'ul', cls:'clipperzTabPanels', children:[ 82 {tag:'ul', cls:'clipperzTabPanels', children:[
86 {tag:'li', id:this.getId('passwordGeneratorPanel'), children:[ 83 {tag:'li', id:this.getId('passwordGeneratorPanel'), children:[
87 {tag:'div', cls:'clipperzSubPanel', children:[ 84 {tag:'div', cls:'clipperzSubPanel', children:[
88 {tag:'h5', htmlString:Clipperz.PM.Strings['passwordGeneratorTabTitle']}, 85 {tag:'h5', htmlString:Clipperz.PM.Strings['passwordGeneratorTabTitle']},
89 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['paswordGeneratorTabDescription']}, 86 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['paswordGeneratorTabDescription']},
90 87
91 //--------------------------------------------------- 88 //---------------------------------------------------
92 {tag:'div', children:[ 89 {tag:'div', children:[
93 {tag:'form', id:this.getId('passwordGeneratorForm'), cls:'passwordGenerator', children:[ 90 {tag:'form', id:this.getId('passwordGeneratorForm'), cls:'passwordGenerator', children:[
94 {tag:'input', type:'text', cls:'clipperz_passwordGenerator_password', id:this.getId('passwordField')}, 91 {tag:'input', type:'text', cls:'clipperz_passwordGenerator_password', id:this.getId('passwordField')},
95 {tag:'table', children:[ 92 {tag:'table', children:[
96 {tag:'tbody', children:[ 93 {tag:'tbody', children:[
97 {tag:'tr', children:[ 94 {tag:'tr', children:[
98 {tag:'td', width:'20%', children:[ 95 {tag:'td', width:'20%', children:[
99 {tag:'input', type:'checkbox', name:'lowercase', id:this.getId('lowercase'), checked:true}, 96 {tag:'input', type:'checkbox', name:'lowercase', id:this.getId('lowercase'), checked:true},
100 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLowercaseLabel']} 97 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLowercaseLabel']}
101 ]}, 98 ]},
102 {tag:'td', width:'20%', children:[ 99 {tag:'td', width:'20%', children:[
103 {tag:'input', type:'checkbox', name:'uppercase', id:this.getId('uppercase'), checked:true}, 100 {tag:'input', type:'checkbox', name:'uppercase', id:this.getId('uppercase'), checked:true},
104 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorUppercaseLabel']} 101 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorUppercaseLabel']}
105 ]}, 102 ]},
106 {tag:'td', width:'20%', children:[ 103 {tag:'td', width:'20%', children:[
107 {tag:'input', type:'checkbox', name:'numbers', id:this.getId('numbers'), checked:true}, 104 {tag:'input', type:'checkbox', name:'numbers', id:this.getId('numbers'), checked:true},
108 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorNumberLabel']} 105 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorNumberLabel']}
109 ]}, 106 ]},
110 {tag:'td', width:'20%', children:[ 107 {tag:'td', width:'20%', children:[
111 {tag:'input', type:'checkbox', name:'symbols', id:this.getId('symbols'), checked:true}, 108 {tag:'input', type:'checkbox', name:'symbols', id:this.getId('symbols'), checked:true},
112 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorSymbolLabel']} 109 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorSymbolLabel']}
113 ]}, 110 ]},
114 {tag:'td', width:'20%', children:[ 111 {tag:'td', width:'20%', children:[
115 {tag:'span', cls:'passwordGeneratorLength', children:[ 112 {tag:'span', cls:'passwordGeneratorLength', children:[
116 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLengthLabel']}, 113 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLengthLabel']},
117 {tag:'span', id:this.getId('passwordLength'), cls:'passwordGeneratorLengthValue', html:'0'} 114 {tag:'span', id:this.getId('passwordLength'), cls:'passwordGeneratorLengthValue', html:'0'}
118 ]} 115 ]}
119 ]} 116 ]}
120 ]} 117 ]}
121 ]} 118 ]}
122 ]} 119 ]}
123 ]}, 120 ]},
124 {tag:'div', id:this.getId('generateRandomPassword')} 121 {tag:'div', id:this.getId('generateRandomPassword')}
125 ]} 122 ]}
126 //--------------------------------------------------- 123 //---------------------------------------------------
127 124
128 ]} 125 ]}
129 ]}, 126 ]},
130 {tag:'li', id:this.getId('bookmarkletPanel'), children:[ 127 {tag:'li', id:this.getId('bookmarkletPanel'), children:[
131 {tag:'div', cls:'clipperzSubPanel', children:[ 128 {tag:'div', cls:'clipperzSubPanel', children:[
132 {tag:'h5', htmlString:Clipperz.PM.Strings['bookmarkletTabTitle']}, 129 {tag:'h5', htmlString:Clipperz.PM.Strings['bookmarkletTabTitle']},
133 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['bookmarkletTabDescription']}, 130 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['bookmarkletTabDescription']},
134 {tag:'a', href:bookmarkletUrl, cls:'bookmarkletLink', htmlString:Clipperz.PM.Strings['bookmarkletTabBookmarkletTitle']}, 131 {tag:'a', href:bookmarkletUrl, cls:'bookmarkletLink', htmlString:Clipperz.PM.Strings['bookmarkletTabBookmarkletTitle']},
135 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['bookmarkletTabInstructions']} 132 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['bookmarkletTabInstructions']}
136 ]} 133 ]}
137 ]}, 134 ]},
138 {tag:'li', id:this.getId('compactPanel'), children:[ 135 {tag:'li', id:this.getId('compactPanel'), children:[
139 {tag:'div', cls:'clipperzSubPanel', children:[ 136 {tag:'div', cls:'clipperzSubPanel', children:[
140 {tag:'h5', htmlString:Clipperz.PM.Strings['compactTabTitle']}, 137 {tag:'h5', htmlString:Clipperz.PM.Strings['compactTabTitle']},
141 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['compactTabDescription']} 138 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['compactTabDescription']}
142 ]} 139 ]}
143 ]}, 140 ]},
144 {tag:'li', id:this.getId('httpAuthPanel'), children:[ 141 {tag:'li', id:this.getId('httpAuthPanel'), children:[
145 {tag:'div', cls:'clipperzSubPanel', children:[ 142 {tag:'div', cls:'clipperzSubPanel', children:[
146 {tag:'h5', htmlString:Clipperz.PM.Strings['httpAuthTabTitle']}, 143 {tag:'h5', htmlString:Clipperz.PM.Strings['httpAuthTabTitle']},
147 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['httpAuthTabDescription']}, 144 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['httpAuthTabDescription']},
148 {tag:'div', cls:'bookmarkletConfiguration', children:[Clipperz.PM.Strings['httpAuthBookmarkletConfiguration']]} 145 {tag:'div', cls:'bookmarkletConfiguration', children:[Clipperz.PM.Strings['httpAuthBookmarkletConfiguration']]}
149 ]} 146 ]}
150 ]} 147 ]}
151 ]} 148 ]}
152 ]} 149 ]}
153 ]} 150 ]}
154 ]} 151 ]}
155 ]}); 152 ]});
156 153
157 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('passwordField')); 154 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('passwordField'));
158 155
159 MochiKit.Signal.connect(this.getId('lowercase'), 'onclick', this, 'updatePasswordValue'); 156 MochiKit.Signal.connect(this.getId('lowercase'), 'onclick', this, 'updatePasswordValue');
160 MochiKit.Signal.connect(this.getId('uppercase'), 'onclick', this, 'updatePasswordValue'); 157 MochiKit.Signal.connect(this.getId('uppercase'), 'onclick', this, 'updatePasswordValue');
161 MochiKit.Signal.connect(this.getId('numbers'), 'onclick', this, 'updatePasswordValue'); 158 MochiKit.Signal.connect(this.getId('numbers'), 'onclick', this, 'updatePasswordValue');
162 MochiKit.Signal.connect(this.getId('symbols'), 'onclick', this, 'updatePasswordValue'); 159 MochiKit.Signal.connect(this.getId('symbols'), 'onclick', this, 'updatePasswordValue');
163 160
164 MochiKit.Signal.connect(this.getDom('passwordField'), 'onkeyup', this, 'updatePasswordLengthLabel'); 161 MochiKit.Signal.connect(this.getDom('passwordField'), 'onkeyup', this, 'updatePasswordLengthLabel');
165 MochiKit.Signal.connect(this.getDom('passwordField'), 'onchange', this, 'updatePasswordLengthLabel'); 162 MochiKit.Signal.connect(this.getDom('passwordField'), 'onchange', this, 'updatePasswordLengthLabel');
166 MochiKit.Signal.connect(this.getDom('passwordField'), 'onblur', this, 'updatePasswordLengthLabel'); 163 MochiKit.Signal.connect(this.getDom('passwordField'), 'onblur', this, 'updatePasswordLengthLabel');
167 164
168 this.setGenerateButtonElement(new YAHOO.ext.Button(this.getDom('generateRandomPassword'), {text:Clipperz.PM.Strings['passwordGeneratorTabButtonLabel'], handler:this.updatePasswordValue, scope:this})); 165 this.setGenerateButtonElement(new YAHOO.ext.Button(this.getDom('generateRandomPassword'), {text:Clipperz.PM.Strings['passwordGeneratorTabButtonLabel'], handler:this.updatePasswordValue, scope:this}));
169 166
170 this.setNeedsRenderingUponTabSwitch(false); 167 this.setNeedsRenderingUponTabSwitch(false);
171 this.tabPanelController().setUp(); 168 this.tabPanelController().setUp();
172 Clipperz.NotificationCenter.register(null, 'tabSelected', this, 'tabSelectedHandler'); 169 Clipperz.NotificationCenter.register(null, 'tabSelected', this, 'tabSelectedHandler');
173 Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler'); 170 Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler');
174//MochiKit.Logging.logDebug("<<< ToolsPanel.render"); 171//MochiKit.Logging.logDebug("<<< ToolsPanel.render");
175 }, 172 },
176 173
177 //------------------------------------------------------------------------- 174 //-------------------------------------------------------------------------
178 175
179 'needsRenderingUponTabSwitch': function() { 176 'needsRenderingUponTabSwitch': function() {
180 return this._needsRenderingUponTabSwitch; 177 return this._needsRenderingUponTabSwitch;
181 }, 178 },
182 179
183 'setNeedsRenderingUponTabSwitch': function(aValue) { 180 'setNeedsRenderingUponTabSwitch': function(aValue) {
184 this._needsRenderingUponTabSwitch = aValue; 181 this._needsRenderingUponTabSwitch = aValue;
185 }, 182 },
186 183
187 'tabSelectedHandler': function(anEvent) { 184 'tabSelectedHandler': function(anEvent) {
188 if (this.needsRenderingUponTabSwitch()) { 185 if (this.needsRenderingUponTabSwitch()) {
189 this.render(); 186 this.render();
190 } 187 }
191 188
192 if (anEvent.parameters() == this.getId('httpAuth')) { 189 if (anEvent.parameters() == this.getId('httpAuth')) {
193 var textarea; 190 var textarea;
194 191
195 textarea = document.getElementById("httpAuthDefaultConfiguration"); 192 textarea = document.getElementById("httpAuthDefaultConfiguration");
196 textarea.focus(); 193 textarea.focus();
197 textarea.select(); 194 textarea.select();
198 } 195 }
199 }, 196 },
200 197
201 //------------------------------------------------------------------------- 198 //-------------------------------------------------------------------------
202 199
203 'tabPanelController': function() { 200 'tabPanelController': function() {
204 if (this._tabPanelController == null) { 201 if (this._tabPanelController == null) {
205 var tabPanelControllerConfig; 202 var tabPanelControllerConfig;
206 203
207 tabPanelControllerConfig = {} 204 tabPanelControllerConfig = {}
208 tabPanelControllerConfig[this.getId('passwordGenerator')] = this.getId('passwordGeneratorPanel'); 205 tabPanelControllerConfig[this.getId('passwordGenerator')] = this.getId('passwordGeneratorPanel');
209 tabPanelControllerConfig[this.getId('bookmarklet')] = this.getId('bookmarkletPanel'); 206 tabPanelControllerConfig[this.getId('bookmarklet')] = this.getId('bookmarkletPanel');
210 tabPanelControllerConfig[this.getId('compact')] = this.getId('compactPanel'); 207 tabPanelControllerConfig[this.getId('compact')] = this.getId('compactPanel');
211 tabPanelControllerConfig[this.getId('httpAuth')] = this.getId('httpAuthPanel'); 208 tabPanelControllerConfig[this.getId('httpAuth')] = this.getId('httpAuthPanel');
212 this._tabPanelController = new Clipperz.PM.Components.TabPanel.TabPanelController({ config:tabPanelControllerConfig, selectedTab:this.getId('passwordGenerator') }); 209 this._tabPanelController = new Clipperz.PM.Components.TabPanel.TabPanelController({ config:tabPanelControllerConfig, selectedTab:this.getId('passwordGenerator') });
213 } 210 }
214 211
215 return this._tabPanelController; 212 return this._tabPanelController;
216 }, 213 },
217 214
218 //------------------------------------------------------------------------- 215 //-------------------------------------------------------------------------
219 216
220 'generateButtonElement': function() { 217 'generateButtonElement': function() {
221 return this._generateButtonElement; 218 return this._generateButtonElement;
222 }, 219 },
223 220
224 'setGenerateButtonElement': function(aValue) { 221 'setGenerateButtonElement': function(aValue) {
225 this._generateButtonElement = aValue; 222 this._generateButtonElement = aValue;
226 }, 223 },
227 224
228 //------------------------------------------------------------------------- 225 //-------------------------------------------------------------------------
229 226
230 'updatePasswordValue': function(anEvent) { 227 'updatePasswordValue': function(anEvent) {
231 varrandomBytes; 228 varrandomBytes;
232 varrandomValue; 229 varrandomValue;
233 var charset; 230 var charset;
234 var charsetBitSize; 231 var charsetBitSize;
235 var stringValue; 232 var stringValue;
236 varblockIndex; 233 varblockIndex;
237 234
238//MochiKit.Logging.logDebug(">>> updatePasswordValue"); 235//MochiKit.Logging.logDebug(">>> updatePasswordValue");
239 randomBytes = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(50); 236 randomBytes = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(50);
240 stringValue = ""; 237 stringValue = "";
241 blockIndex = 0; 238 blockIndex = 0;
242 239
243 charset = ""; 240 charset = "";
244 if (this.getDom('lowercase').checked) { 241 if (this.getDom('lowercase').checked) {
245 charset += Clipperz.PM.Strings['passwordGeneratorLowercaseCharset']; 242 charset += Clipperz.PM.Strings['passwordGeneratorLowercaseCharset'];
246 } 243 }
247 if (this.getDom('uppercase').checked) { 244 if (this.getDom('uppercase').checked) {
248 charset += Clipperz.PM.Strings['passwordGeneratorUppercaseCharset']; 245 charset += Clipperz.PM.Strings['passwordGeneratorUppercaseCharset'];
249 } 246 }
250 if (this.getDom('numbers').checked) { 247 if (this.getDom('numbers').checked) {
251 charset += Clipperz.PM.Strings['passwordGeneratorNumberCharset']; 248 charset += Clipperz.PM.Strings['passwordGeneratorNumberCharset'];
252 } 249 }
253 if (this.getDom('symbols').checked) { 250 if (this.getDom('symbols').checked) {
254 charset += Clipperz.PM.Strings['passwordGeneratorSymbolCharset']; 251 charset += Clipperz.PM.Strings['passwordGeneratorSymbolCharset'];
255 } 252 }
256 253
257 charsetBitSize = 0; 254 charsetBitSize = 0;
258 while (Math.pow(2, charsetBitSize) < charset.length) { 255 while (Math.pow(2, charsetBitSize) < charset.length) {
259 charsetBitSize ++; 256 charsetBitSize ++;
260 } 257 }
261 258
262 if (charsetBitSize > 0) { 259 if (charsetBitSize > 0) {
263 while (Clipperz.PM.Crypto.passwordEntropy(stringValue) < 128) { 260 while (Clipperz.PM.Crypto.passwordEntropy(stringValue) < 128) {
264 if (((blockIndex + 1)*charsetBitSize) > (randomBytes.length() * 8)) { 261 if (((blockIndex + 1)*charsetBitSize) > (randomBytes.length() * 8)) {
265 randomBytes = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(50); 262 randomBytes = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(50);
266 blockIndex = 0; 263 blockIndex = 0;
267 } 264 }
268 randomValue = randomBytes.bitBlockAtIndexWithSize(blockIndex*charsetBitSize, charsetBitSize); 265 randomValue = randomBytes.bitBlockAtIndexWithSize(blockIndex*charsetBitSize, charsetBitSize);
269 if (randomValue < charset.length) { 266 if (randomValue < charset.length) {
270 stringValue += charset.charAt(randomValue); 267 stringValue += charset.charAt(randomValue);
271 } 268 }
272 269
273 blockIndex ++; 270 blockIndex ++;
274 } 271 }
275 } else { 272 } else {
276 stringValue = ""; 273 stringValue = "";
277 } 274 }
278 275
279 this.getElement('passwordField').dom.focus() 276 this.getElement('passwordField').dom.focus()
280 this.getElement('passwordField').dom.value = stringValue; 277 this.getElement('passwordField').dom.value = stringValue;
281 278
282 279
283 if (anEvent.src) { 280 if (anEvent.src) {
284 anEvent.src().focus(); 281 anEvent.src().focus();
285 } else { 282 } else {
286 this.generateButtonElement().el.focus(); 283 this.generateButtonElement().el.focus();
287 } 284 }
288 285
289 this.setNeedsRenderingUponTabSwitch(true); 286 this.setNeedsRenderingUponTabSwitch(true);
290 287
291 return false; 288 return false;
292//MochiKit.Logging.logDebug("<<< updatePasswordValue"); 289//MochiKit.Logging.logDebug("<<< updatePasswordValue");
293 }, 290 },
294 291
295 //----------------------------------------------------- 292 //-----------------------------------------------------
296 293
297 'updatePasswordLengthLabel': function() { 294 'updatePasswordLengthLabel': function() {
298 this.getElement('passwordLength').update(this.getDom('passwordField').value.length); 295 this.getElement('passwordLength').update(this.getDom('passwordField').value.length);
299 }, 296 },
300 297
301 //------------------------------------------------------------------------- 298 //-------------------------------------------------------------------------
302 __syntaxFix__: "syntax fix" 299 __syntaxFix__: "syntax fix"
303 300
304}); 301});
305 302
diff --git a/frontend/beta/js/Clipperz/PM/Components/PasswordEntropyDisplay.js b/frontend/beta/js/Clipperz/PM/Components/PasswordEntropyDisplay.js
index 530d2cb..784dce9 100644
--- a/frontend/beta/js/Clipperz/PM/Components/PasswordEntropyDisplay.js
+++ b/frontend/beta/js/Clipperz/PM/Components/PasswordEntropyDisplay.js
@@ -1,118 +1,115 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32 29
33Clipperz.PM.Components.PasswordEntropyDisplay = function(anElement, args) { 30Clipperz.PM.Components.PasswordEntropyDisplay = function(anElement, args) {
34 args = args || {}; 31 args = args || {};
35 32
36//MochiKit.Logging.logDebug(">>> new TextFormField"); 33//MochiKit.Logging.logDebug(">>> new TextFormField");
37 Clipperz.PM.Components.PasswordEntropyDisplay.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.PasswordEntropyDisplay.superclass.constructor.call(this, anElement, args);
38 35
39 this._wrapperElement = null; 36 this._wrapperElement = null;
40 this._entropyElement = null; 37 this._entropyElement = null;
41 38
42 this.render(); 39 this.render();
43//MochiKit.Logging.logDebug("<<< new TextFormField"); 40//MochiKit.Logging.logDebug("<<< new TextFormField");
44 41
45 return this; 42 return this;
46}; 43};
47 44
48YAHOO.extendX(Clipperz.PM.Components.PasswordEntropyDisplay, Clipperz.PM.Components.BaseComponent, { 45YAHOO.extendX(Clipperz.PM.Components.PasswordEntropyDisplay, Clipperz.PM.Components.BaseComponent, {
49 46
50 'toString': function() { 47 'toString': function() {
51 return "Clipperz.PM.Components.PasswordEntropyDisplay"; 48 return "Clipperz.PM.Components.PasswordEntropyDisplay";
52 }, 49 },
53 50
54 //----------------------------------------------------- 51 //-----------------------------------------------------
55 52
56 'wrapperElement': function() { 53 'wrapperElement': function() {
57 return this._wrapperElement; 54 return this._wrapperElement;
58 }, 55 },
59 56
60 'setWrapperElement': function(aValue) { 57 'setWrapperElement': function(aValue) {
61 this._wrapperElement = aValue; 58 this._wrapperElement = aValue;
62 }, 59 },
63 60
64 //----------------------------------------------------- 61 //-----------------------------------------------------
65 62
66 'passwordElement': function() { 63 'passwordElement': function() {
67 return this.element(); 64 return this.element();
68 }, 65 },
69 66
70 //----------------------------------------------------- 67 //-----------------------------------------------------
71 68
72 'entropyElement': function() { 69 'entropyElement': function() {
73 return this._entropyElement; 70 return this._entropyElement;
74 }, 71 },
75 72
76 'setEntropyElement': function(aValue) { 73 'setEntropyElement': function(aValue) {
77 this._entropyElement = aValue; 74 this._entropyElement = aValue;
78 }, 75 },
79 76
80 //----------------------------------------------------- 77 //-----------------------------------------------------
81 78
82 'render': function() { 79 'render': function() {
83 MochiKit.Signal.disconnectAllTo(this); 80 MochiKit.Signal.disconnectAllTo(this);
84 81
85 this.setWrapperElement(this.element().wrap({tag:'div'})); 82 this.setWrapperElement(this.element().wrap({tag:'div'}));
86 this.setEntropyElement(Clipperz.YUI.DomHelper.append(this.wrapperElement().dom, {tag:'div', cls:'passwordEntropy', html:"&nbsp;"}, true)); 83 this.setEntropyElement(Clipperz.YUI.DomHelper.append(this.wrapperElement().dom, {tag:'div', cls:'passwordEntropy', html:"&nbsp;"}, true));
87 84
88 // this.entropyElement().setWidth(this.passwordElement().getWidth()); 85 // this.entropyElement().setWidth(this.passwordElement().getWidth());
89 this.updateEntropyElement(); 86 this.updateEntropyElement();
90 87
91 MochiKit.Signal.connect(this.element().dom, 'onkeyup', this, 'updateEntropyElement'); 88 MochiKit.Signal.connect(this.element().dom, 'onkeyup', this, 'updateEntropyElement');
92 MochiKit.Signal.connect(this.element().dom, 'onchange', this, 'updateEntropyElement'); 89 MochiKit.Signal.connect(this.element().dom, 'onchange', this, 'updateEntropyElement');
93 MochiKit.Signal.connect(this.element().dom, 'onblur', this, 'updateEntropyElement'); 90 MochiKit.Signal.connect(this.element().dom, 'onblur', this, 'updateEntropyElement');
94 }, 91 },
95 92
96 //----------------------------------------------------- 93 //-----------------------------------------------------
97 94
98 'computeEntropyForString': function(aValue) { 95 'computeEntropyForString': function(aValue) {
99 return Clipperz.PM.Crypto.passwordEntropy(aValue); 96 return Clipperz.PM.Crypto.passwordEntropy(aValue);
100 }, 97 },
101 98
102 //----------------------------------------------------- 99 //-----------------------------------------------------
103 100
104 'updateEntropyElement': function(anEvent) { 101 'updateEntropyElement': function(anEvent) {
105//MochiKit.Logging.logDebug(">>> PasswordEntropyDisplay.updateEntropyElement"); 102//MochiKit.Logging.logDebug(">>> PasswordEntropyDisplay.updateEntropyElement");
106 varmaxExtent; 103 varmaxExtent;
107 varentropy; 104 varentropy;
108 105
109 entropy = Math.min(128, this.computeEntropyForString(this.passwordElement().dom.value)); 106 entropy = Math.min(128, this.computeEntropyForString(this.passwordElement().dom.value));
110//MochiKit.Logging.logDebug("--- PasswordEntropyDisplay.updateEntropyElement - entropy: " + entropy); 107//MochiKit.Logging.logDebug("--- PasswordEntropyDisplay.updateEntropyElement - entropy: " + entropy);
111 this.entropyElement().setStyle('background-position', "0px " + -entropy + "px"); 108 this.entropyElement().setStyle('background-position', "0px " + -entropy + "px");
112 this.entropyElement().setWidth(this.passwordElement().getWidth() * (entropy/128)); 109 this.entropyElement().setWidth(this.passwordElement().getWidth() * (entropy/128));
113//MochiKit.Logging.logDebug("<<< PasswordEntropyDisplay.updateEntropyElement"); 110//MochiKit.Logging.logDebug("<<< PasswordEntropyDisplay.updateEntropyElement");
114 }, 111 },
115 112
116 //----------------------------------------------------- 113 //-----------------------------------------------------
117 __syntaxFix__: '__syntaxFix__' 114 __syntaxFix__: '__syntaxFix__'
118}); 115});
diff --git a/frontend/beta/js/Clipperz/PM/Components/PasswordGenerator.js b/frontend/beta/js/Clipperz/PM/Components/PasswordGenerator.js
index 8195f2e..87c52b2 100644
--- a/frontend/beta/js/Clipperz/PM/Components/PasswordGenerator.js
+++ b/frontend/beta/js/Clipperz/PM/Components/PasswordGenerator.js
@@ -1,285 +1,282 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32 29
33Clipperz.PM.Components.PasswordGenerator = function(anElement, aFieldValueComponent, args) { 30Clipperz.PM.Components.PasswordGenerator = function(anElement, aFieldValueComponent, args) {
34 args = args || {}; 31 args = args || {};
35 32
36//MochiKit.Logging.logDebug(">>> new TextFormField"); 33//MochiKit.Logging.logDebug(">>> new TextFormField");
37 Clipperz.PM.Components.PasswordGenerator.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.PasswordGenerator.superclass.constructor.call(this, anElement, args);
38 35
39 this._fieldValueComponent = aFieldValueComponent; 36 this._fieldValueComponent = aFieldValueComponent;
40 this._panelButton = null; 37 this._panelButton = null;
41 this.render(); 38 this.render();
42//MochiKit.Logging.logDebug("<<< new TextFormField"); 39//MochiKit.Logging.logDebug("<<< new TextFormField");
43 40
44 return this; 41 return this;
45}; 42};
46 43
47YAHOO.extendX(Clipperz.PM.Components.PasswordGenerator, Clipperz.PM.Components.BaseComponent, { 44YAHOO.extendX(Clipperz.PM.Components.PasswordGenerator, Clipperz.PM.Components.BaseComponent, {
48 45
49 'toString': function() { 46 'toString': function() {
50 return "Clipperz.PM.Components.PasswordGenerator"; 47 return "Clipperz.PM.Components.PasswordGenerator";
51 }, 48 },
52 49
53 //----------------------------------------------------- 50 //-----------------------------------------------------
54 51
55 'fieldValueComponent': function() { 52 'fieldValueComponent': function() {
56 return this._fieldValueComponent; 53 return this._fieldValueComponent;
57 }, 54 },
58 55
59 //----------------------------------------------------- 56 //-----------------------------------------------------
60 57
61 'render': function() { 58 'render': function() {
62 MochiKit.Signal.disconnectAllTo(this); 59 MochiKit.Signal.disconnectAllTo(this);
63 60
64 // this._panelButton = new YAHOO.ext.Button(this.element().dom, {text:Clipperz.PM.Strings['passwordGeneratorButtonLabel'], handler:this.openPasswordPanel, scope:this}); 61 // this._panelButton = new YAHOO.ext.Button(this.element().dom, {text:Clipperz.PM.Strings['passwordGeneratorButtonLabel'], handler:this.openPasswordPanel, scope:this});
65 MochiKit.Signal.connect(this.element().dom, 'onmouseenter', this, 'onMouseEnter'); 62 MochiKit.Signal.connect(this.element().dom, 'onmouseenter', this, 'onMouseEnter');
66 MochiKit.Signal.connect(this.element().dom, 'onmouseleave', this, 'onMouseLeave'); 63 MochiKit.Signal.connect(this.element().dom, 'onmouseleave', this, 'onMouseLeave');
67 MochiKit.Signal.connect(this.element().dom, 'onclick', this, 'openPasswordPanel'); 64 MochiKit.Signal.connect(this.element().dom, 'onclick', this, 'openPasswordPanel');
68 }, 65 },
69 66
70 //----------------------------------------------------- 67 //-----------------------------------------------------
71 68
72 'onMouseEnter': function() { 69 'onMouseEnter': function() {
73 this.element().addClass('hover'); 70 this.element().addClass('hover');
74 }, 71 },
75 72
76 'onMouseLeave': function() { 73 'onMouseLeave': function() {
77 this.element().removeClass('hover'); 74 this.element().removeClass('hover');
78 }, 75 },
79 76
80 //----------------------------------------------------- 77 //-----------------------------------------------------
81 78
82 'panelButton': function() { 79 'panelButton': function() {
83 return this._panelButton; 80 return this._panelButton;
84 }, 81 },
85 82
86 //----------------------------------------------------- 83 //-----------------------------------------------------
87 84
88 'openPasswordPanel': function() { 85 'openPasswordPanel': function() {
89 var passwordGeneratorElement; 86 var passwordGeneratorElement;
90 var passwordGeneratorDialog; 87 var passwordGeneratorDialog;
91 var cancelButton; 88 var cancelButton;
92 var okButton; 89 var okButton;
93 var cancelFunction; 90 var cancelFunction;
94 var okFunction; 91 var okFunction;
95 92
96//MochiKit.Logging.logDebug(">>> PasswordGenerator.openPasswordPanel"); 93//MochiKit.Logging.logDebug(">>> PasswordGenerator.openPasswordPanel");
97 passwordGeneratorElement = Clipperz.YUI.DomHelper.append(document.body, {tag:'div', id:'passwordGenerator', children:[ 94 passwordGeneratorElement = Clipperz.YUI.DomHelper.append(document.body, {tag:'div', id:'passwordGenerator', children:[
98 {tag:'div', cls:'ydlg-hd', htmlString:Clipperz.PM.Strings['passwordGeneratorPanelTitle']}, 95 {tag:'div', cls:'ydlg-hd', htmlString:Clipperz.PM.Strings['passwordGeneratorPanelTitle']},
99 {tag:'div', cls:'ydlg-bd', children:[ 96 {tag:'div', cls:'ydlg-bd', children:[
100 {tag:'form', id:this.getId('passwordGeneratorForm'), cls:'passwordGenerator', children:[ 97 {tag:'form', id:this.getId('passwordGeneratorForm'), cls:'passwordGenerator', children:[
101 {tag:'input', type:'text', cls:'clipperz_passwordGenerator_password', id:this.getId('passwordField')}, 98 {tag:'input', type:'text', cls:'clipperz_passwordGenerator_password', id:this.getId('passwordField')},
102 {tag:'table', children:[ 99 {tag:'table', children:[
103 {tag:'tbody', children:[ 100 {tag:'tbody', children:[
104 {tag:'tr', children:[ 101 {tag:'tr', children:[
105 {tag:'td', width:'20%', children:[ 102 {tag:'td', width:'20%', children:[
106 {tag:'input', type:'checkbox', name:'lowercase', id:this.getId('lowercase'), checked:true}, 103 {tag:'input', type:'checkbox', name:'lowercase', id:this.getId('lowercase'), checked:true},
107 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLowercaseLabel']} 104 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLowercaseLabel']}
108 ]}, 105 ]},
109 {tag:'td', width:'20%', children:[ 106 {tag:'td', width:'20%', children:[
110 {tag:'input', type:'checkbox', name:'uppercase', id:this.getId('uppercase'), checked:true}, 107 {tag:'input', type:'checkbox', name:'uppercase', id:this.getId('uppercase'), checked:true},
111 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorUppercaseLabel']} 108 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorUppercaseLabel']}
112 ]}, 109 ]},
113 {tag:'td', width:'20%', children:[ 110 {tag:'td', width:'20%', children:[
114 {tag:'input', type:'checkbox', name:'numbers', id:this.getId('numbers'), checked:true}, 111 {tag:'input', type:'checkbox', name:'numbers', id:this.getId('numbers'), checked:true},
115 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorNumberLabel']} 112 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorNumberLabel']}
116 ]}, 113 ]},
117 {tag:'td', width:'20%', children:[ 114 {tag:'td', width:'20%', children:[
118 {tag:'input', type:'checkbox', name:'symbols', id:this.getId('symbols'), checked:true}, 115 {tag:'input', type:'checkbox', name:'symbols', id:this.getId('symbols'), checked:true},
119 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorSymbolLabel']} 116 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorSymbolLabel']}
120 ]}, 117 ]},
121 {tag:'td', width:'20%', children:[ 118 {tag:'td', width:'20%', children:[
122 {tag:'span', cls:'passwordGeneratorLength', children:[ 119 {tag:'span', cls:'passwordGeneratorLength', children:[
123 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLengthLabel']}, 120 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLengthLabel']},
124 {tag:'span', id:this.getId('passwordLength'), cls:'passwordGeneratorLengthValue', html:'0'} 121 {tag:'span', id:this.getId('passwordLength'), cls:'passwordGeneratorLengthValue', html:'0'}
125 ]} 122 ]}
126 ]} 123 ]}
127 ]} 124 ]}
128 ]} 125 ]}
129 ]} 126 ]}
130 ]} 127 ]}
131 ]}, 128 ]},
132 {tag:'div', cls:'ydlg-ft'} 129 {tag:'div', cls:'ydlg-ft'}
133 ]}, true); 130 ]}, true);
134 131
135 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('passwordField')); 132 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('passwordField'));
136 133
137 MochiKit.Signal.connect(this.getId('lowercase'), 'onclick', this, 'updatePasswordValue'); 134 MochiKit.Signal.connect(this.getId('lowercase'), 'onclick', this, 'updatePasswordValue');
138 MochiKit.Signal.connect(this.getId('uppercase'), 'onclick', this, 'updatePasswordValue'); 135 MochiKit.Signal.connect(this.getId('uppercase'), 'onclick', this, 'updatePasswordValue');
139 MochiKit.Signal.connect(this.getId('numbers'), 'onclick', this, 'updatePasswordValue'); 136 MochiKit.Signal.connect(this.getId('numbers'), 'onclick', this, 'updatePasswordValue');
140 MochiKit.Signal.connect(this.getId('symbols'), 'onclick', this, 'updatePasswordValue'); 137 MochiKit.Signal.connect(this.getId('symbols'), 'onclick', this, 'updatePasswordValue');
141 138
142 MochiKit.Signal.connect(this.getDom('passwordField'), 'onkeyup', this, 'updatePasswordLengthLabel'); 139 MochiKit.Signal.connect(this.getDom('passwordField'), 'onkeyup', this, 'updatePasswordLengthLabel');
143 MochiKit.Signal.connect(this.getDom('passwordField'), 'onchange', this, 'updatePasswordLengthLabel'); 140 MochiKit.Signal.connect(this.getDom('passwordField'), 'onchange', this, 'updatePasswordLengthLabel');
144 MochiKit.Signal.connect(this.getDom('passwordField'), 'onblur', this, 'updatePasswordLengthLabel'); 141 MochiKit.Signal.connect(this.getDom('passwordField'), 'onblur', this, 'updatePasswordLengthLabel');
145 142
146 this.updatePasswordValue(); 143 this.updatePasswordValue();
147 144
148 passwordGeneratorDialog = new YAHOO.ext.BasicDialog( 145 passwordGeneratorDialog = new YAHOO.ext.BasicDialog(
149 passwordGeneratorElement, { 146 passwordGeneratorElement, {
150 autoCreate:false, 147 autoCreate:false,
151 closable:false, 148 closable:false,
152 modal:true, 149 modal:true,
153 autoTabs:false, 150 autoTabs:false,
154 resizable:false, 151 resizable:false,
155 fixedcenter:true, 152 fixedcenter:true,
156 constraintoviewport:false, 153 constraintoviewport:false,
157 width:320, 154 width:320,
158 height:130, 155 height:130,
159 shadow:true, 156 shadow:true,
160 minWidth:200, 157 minWidth:200,
161 minHeight:100 158 minHeight:100
162 } 159 }
163 ); 160 );
164 161
165 cancelFunction = MochiKit.Base.partial(MochiKit.Base.bind(this.cancelPasswordPanel, this), passwordGeneratorDialog); 162 cancelFunction = MochiKit.Base.partial(MochiKit.Base.bind(this.cancelPasswordPanel, this), passwordGeneratorDialog);
166 passwordGeneratorDialog.addKeyListener(27, cancelFunction); 163 passwordGeneratorDialog.addKeyListener(27, cancelFunction);
167 cancelButton = passwordGeneratorDialog.addButton(Clipperz.PM.Strings['passwordGeneratorPanelCancelLabel'], cancelFunction, this); 164 cancelButton = passwordGeneratorDialog.addButton(Clipperz.PM.Strings['passwordGeneratorPanelCancelLabel'], cancelFunction, this);
168 165
169 okFunction = MochiKit.Base.partial(MochiKit.Base.bind(this.okPasswordPanel, this), passwordGeneratorDialog); 166 okFunction = MochiKit.Base.partial(MochiKit.Base.bind(this.okPasswordPanel, this), passwordGeneratorDialog);
170 passwordGeneratorDialog.addKeyListener([10, 13], okFunction); 167 passwordGeneratorDialog.addKeyListener([10, 13], okFunction);
171 okButton = passwordGeneratorDialog.addButton(Clipperz.PM.Strings['passwordGeneratorPanelOkLabel'], okFunction, this); 168 okButton = passwordGeneratorDialog.addButton(Clipperz.PM.Strings['passwordGeneratorPanelOkLabel'], okFunction, this);
172 169
173 MochiKit.Signal.connect(this.getId('passwordGeneratorForm'), 'onsubmit', okFunction); 170 MochiKit.Signal.connect(this.getId('passwordGeneratorForm'), 'onsubmit', okFunction);
174 171
175 passwordGeneratorDialog.setDefaultButton(okButton); 172 passwordGeneratorDialog.setDefaultButton(okButton);
176 173
177 this.fieldValueComponent().mainComponent().mainPanel().exitModalView(); 174 this.fieldValueComponent().mainComponent().mainPanel().exitModalView();
178 this.fieldValueComponent().mainComponent().scrollToTop(); 175 this.fieldValueComponent().mainComponent().scrollToTop();
179 176
180 // passwordGeneratorDialog.show(this.panelButton().getEl()); 177 // passwordGeneratorDialog.show(this.panelButton().getEl());
181 passwordGeneratorDialog.show(this.element()); 178 passwordGeneratorDialog.show(this.element());
182 this.onMouseLeave(); 179 this.onMouseLeave();
183 }, 180 },
184 181
185 //----------------------------------------------------- 182 //-----------------------------------------------------
186 183
187 'cancelPasswordPanel': function(aPasswordGeneratorPanel) { 184 'cancelPasswordPanel': function(aPasswordGeneratorPanel) {
188 this.fieldValueComponent().mainComponent().mainPanel().enterModalView(); 185 this.fieldValueComponent().mainComponent().mainPanel().enterModalView();
189 aPasswordGeneratorPanel.hide(MochiKit.Base.bind(function() { 186 aPasswordGeneratorPanel.hide(MochiKit.Base.bind(function() {
190 aPasswordGeneratorPanel.destroy(true); 187 aPasswordGeneratorPanel.destroy(true);
191 MochiKit.Signal.disconnectAllTo(this); 188 MochiKit.Signal.disconnectAllTo(this);
192 }, this)); 189 }, this));
193 }, 190 },
194 191
195 //----------------------------------------------------- 192 //-----------------------------------------------------
196 193
197 'updatePasswordLengthLabel': function() { 194 'updatePasswordLengthLabel': function() {
198 this.getElement('passwordLength').update(this.getDom('passwordField').value.length); 195 this.getElement('passwordLength').update(this.getDom('passwordField').value.length);
199 }, 196 },
200 197
201 //----------------------------------------------------- 198 //-----------------------------------------------------
202 199
203 'okPasswordPanel': function(aPasswordGeneratorPanel, anEvent) { 200 'okPasswordPanel': function(aPasswordGeneratorPanel, anEvent) {
204//MochiKit.Logging.logDebug(">>> PasswordGenerator.okPasswordPanel"); 201//MochiKit.Logging.logDebug(">>> PasswordGenerator.okPasswordPanel");
205 202
206 if (anEvent.stop) { 203 if (anEvent.stop) {
207 anEvent.stop(); 204 anEvent.stop();
208 } 205 }
209 206
210 this.fieldValueComponent().inputElement().dom.focus(); 207 this.fieldValueComponent().inputElement().dom.focus();
211 this.fieldValueComponent().inputElement().dom.value = this.getElement('passwordField').dom.value; 208 this.fieldValueComponent().inputElement().dom.value = this.getElement('passwordField').dom.value;
212 this.getElement('passwordField').dom.focus(); 209 this.getElement('passwordField').dom.focus();
213 this.cancelPasswordPanel(aPasswordGeneratorPanel); 210 this.cancelPasswordPanel(aPasswordGeneratorPanel);
214 211
215 return false; 212 return false;
216 }, 213 },
217 214
218 //----------------------------------------------------- 215 //-----------------------------------------------------
219 216
220 'updatePasswordValue': function(anEvent) { 217 'updatePasswordValue': function(anEvent) {
221 varrandomBytes; 218 varrandomBytes;
222 varrandomValue; 219 varrandomValue;
223 var charset; 220 var charset;
224 var charsetBitSize; 221 var charsetBitSize;
225 var stringValue; 222 var stringValue;
226 varblockIndex; 223 varblockIndex;
227 224
228//MochiKit.Logging.logDebug(">>> updatePasswordValue"); 225//MochiKit.Logging.logDebug(">>> updatePasswordValue");
229 randomBytes = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(50); 226 randomBytes = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(50);
230 stringValue = ""; 227 stringValue = "";
231 blockIndex = 0; 228 blockIndex = 0;
232 229
233 charset = ""; 230 charset = "";
234 if (this.getDom('lowercase').checked) { 231 if (this.getDom('lowercase').checked) {
235 charset += Clipperz.PM.Strings['passwordGeneratorLowercaseCharset']; 232 charset += Clipperz.PM.Strings['passwordGeneratorLowercaseCharset'];
236 } 233 }
237 if (this.getDom('uppercase').checked) { 234 if (this.getDom('uppercase').checked) {
238 charset += Clipperz.PM.Strings['passwordGeneratorUppercaseCharset']; 235 charset += Clipperz.PM.Strings['passwordGeneratorUppercaseCharset'];
239 } 236 }
240 if (this.getDom('numbers').checked) { 237 if (this.getDom('numbers').checked) {
241 charset += Clipperz.PM.Strings['passwordGeneratorNumberCharset']; 238 charset += Clipperz.PM.Strings['passwordGeneratorNumberCharset'];
242 } 239 }
243 if (this.getDom('symbols').checked) { 240 if (this.getDom('symbols').checked) {
244 charset += Clipperz.PM.Strings['passwordGeneratorSymbolCharset']; 241 charset += Clipperz.PM.Strings['passwordGeneratorSymbolCharset'];
245 } 242 }
246 243
247 charsetBitSize = 0; 244 charsetBitSize = 0;
248 while (Math.pow(2, charsetBitSize) < charset.length) { 245 while (Math.pow(2, charsetBitSize) < charset.length) {
249 charsetBitSize ++; 246 charsetBitSize ++;
250 } 247 }
251 248
252 if (charsetBitSize > 0) { 249 if (charsetBitSize > 0) {
253 while (Clipperz.PM.Crypto.passwordEntropy(stringValue) < 128) { 250 while (Clipperz.PM.Crypto.passwordEntropy(stringValue) < 128) {
254 if (((blockIndex + 1)*charsetBitSize) > (randomBytes.length() * 8)) { 251 if (((blockIndex + 1)*charsetBitSize) > (randomBytes.length() * 8)) {
255 randomBytes = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(50); 252 randomBytes = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(50);
256 blockIndex = 0; 253 blockIndex = 0;
257 } 254 }
258 randomValue = randomBytes.bitBlockAtIndexWithSize(blockIndex*charsetBitSize, charsetBitSize); 255 randomValue = randomBytes.bitBlockAtIndexWithSize(blockIndex*charsetBitSize, charsetBitSize);
259 if (randomValue < charset.length) { 256 if (randomValue < charset.length) {
260 stringValue += charset.charAt(randomValue); 257 stringValue += charset.charAt(randomValue);
261 } 258 }
262 259
263 blockIndex ++; 260 blockIndex ++;
264 } 261 }
265 } else { 262 } else {
266 stringValue = ""; 263 stringValue = "";
267 } 264 }
268 265
269 this.getElement('passwordField').dom.focus() 266 this.getElement('passwordField').dom.focus()
270 this.getElement('passwordField').dom.value = stringValue; 267 this.getElement('passwordField').dom.value = stringValue;
271 268
272 269
273 if (anEvent) { 270 if (anEvent) {
274 anEvent.src().focus(); 271 anEvent.src().focus();
275 } else { 272 } else {
276 this.element().focus(); 273 this.element().focus();
277 } 274 }
278 275
279 return false; 276 return false;
280//MochiKit.Logging.logDebug("<<< updatePasswordValue"); 277//MochiKit.Logging.logDebug("<<< updatePasswordValue");
281 }, 278 },
282 279
283 //----------------------------------------------------- 280 //-----------------------------------------------------
284 __syntaxFix__: '__syntaxFix__' 281 __syntaxFix__: '__syntaxFix__'
285}); 282});
diff --git a/frontend/beta/js/Clipperz/PM/Components/Printing/Footer.js b/frontend/beta/js/Clipperz/PM/Components/Printing/Footer.js
index 6bede3e..b3debad 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Printing/Footer.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Printing/Footer.js
@@ -1,28 +1,25 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
diff --git a/frontend/beta/js/Clipperz/PM/Components/Printing/Header.js b/frontend/beta/js/Clipperz/PM/Components/Printing/Header.js
index 6bede3e..b3debad 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Printing/Header.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Printing/Header.js
@@ -1,28 +1,25 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
diff --git a/frontend/beta/js/Clipperz/PM/Components/Printing/Record.js b/frontend/beta/js/Clipperz/PM/Components/Printing/Record.js
index 910d4b1..5f5c29f 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Printing/Record.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Printing/Record.js
@@ -1,95 +1,92 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.Printing) == 'undefined') { Clipperz.PM.Components.Printing = {}; } 29if (typeof(Clipperz.PM.Components.Printing) == 'undefined') { Clipperz.PM.Components.Printing = {}; }
33 30
34Clipperz.PM.Components.Printing.Record = function(args) { 31Clipperz.PM.Components.Printing.Record = function(args) {
35 args = args || {}; 32 args = args || {};
36 33
37 this._record = args['record']; 34 this._record = args['record'];
38 35
39 return this; 36 return this;
40} 37}
41 38
42MochiKit.Base.update(Clipperz.PM.Components.Printing.Record.prototype, { 39MochiKit.Base.update(Clipperz.PM.Components.Printing.Record.prototype, {
43 40
44 'record': function() { 41 'record': function() {
45 return this._record; 42 return this._record;
46 }, 43 },
47 44
48 //------------------------------------------------------------------------- 45 //-------------------------------------------------------------------------
49 46
50 'deferredDrawToWindow': function(aWindow) { 47 'deferredDrawToWindow': function(aWindow) {
51 vardeferredResult; 48 vardeferredResult;
52 49
53 deferredResult = new MochiKit.Async.Deferred(); 50 deferredResult = new MochiKit.Async.Deferred();
54 deferredResult.addCallback(MochiKit.Base.method(this.record(), 'deferredData')); 51 deferredResult.addCallback(MochiKit.Base.method(this.record(), 'deferredData'));
55 deferredResult.addCallback(MochiKit.Base.method(this, 'appendToWindow', aWindow)); 52 deferredResult.addCallback(MochiKit.Base.method(this, 'appendToWindow', aWindow));
56 deferredResult.callback(); 53 deferredResult.callback();
57 return deferredResult; 54 return deferredResult;
58 }, 55 },
59 56
60 //------------------------------------------------------------------------- 57 //-------------------------------------------------------------------------
61 58
62 'appendToWindow': function(aWindow) { 59 'appendToWindow': function(aWindow) {
63 MochiKit.DOM.withWindow(aWindow, MochiKit.Base.bind(function() { 60 MochiKit.DOM.withWindow(aWindow, MochiKit.Base.bind(function() {
64 var newBlock; 61 var newBlock;
65 var fields; 62 var fields;
66 63
67 fields = MochiKit.Base.concat( 64 fields = MochiKit.Base.concat(
68 MochiKit.Base.map(MochiKit.Base.bind(function(aField) { 65 MochiKit.Base.map(MochiKit.Base.bind(function(aField) {
69 var result; 66 var result;
70 var dt, dd; 67 var dt, dd;
71 var label, value; 68 var label, value;
72 69
73 label = aField.label(); 70 label = aField.label();
74 value = aField.value(); 71 value = aField.value();
75 dt = MochiKit.DOM.createDOM('DT', null, label); 72 dt = MochiKit.DOM.createDOM('DT', null, label);
76 dd = MochiKit.DOM.createDOM('DD', null, value) 73 dd = MochiKit.DOM.createDOM('DD', null, value)
77 result = [dt, dd]; 74 result = [dt, dd];
78 75
79 return result 76 return result
80 }, this), MochiKit.Base.values(this.record().currentVersion().fields())) 77 }, this), MochiKit.Base.values(this.record().currentVersion().fields()))
81 ); 78 );
82 79
83 newBlock = MochiKit.DOM.DIV({'class': 'recordBlock'}, 80 newBlock = MochiKit.DOM.DIV({'class': 'recordBlock'},
84 MochiKit.DOM.H2(null, this.record().label()), 81 MochiKit.DOM.H2(null, this.record().label()),
85 MochiKit.DOM.DIV({'class': 'recordNotes'}, MochiKit.Base.map(MochiKit.Base.partial(MochiKit.DOM.P, null), this.record().notes().split("\n"))), 82 MochiKit.DOM.DIV({'class': 'recordNotes'}, MochiKit.Base.map(MochiKit.Base.partial(MochiKit.DOM.P, null), this.record().notes().split("\n"))),
86 MochiKit.DOM.createDOM('DL', null, fields) 83 MochiKit.DOM.createDOM('DL', null, fields)
87 ); 84 );
88 MochiKit.DOM.appendChildNodes(MochiKit.DOM.currentDocument().body, newBlock); 85 MochiKit.DOM.appendChildNodes(MochiKit.DOM.currentDocument().body, newBlock);
89 86
90 }, this)); 87 }, this));
91 }, 88 },
92 89
93 //------------------------------------------------------------------------- 90 //-------------------------------------------------------------------------
94 __syntaxFix__: "syntax fix" 91 __syntaxFix__: "syntax fix"
95}); 92});
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js
index 840d555..5b50284 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js
@@ -1,105 +1,102 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Components.RecordDetail.AbstractComponent = function(anElement, args) { 33Clipperz.PM.Components.RecordDetail.AbstractComponent = function(anElement, args) {
37 args = args || {}; 34 args = args || {};
38 35
39 Clipperz.PM.Components.RecordDetail.AbstractComponent.superclass.constructor.call(this, args); 36 Clipperz.PM.Components.RecordDetail.AbstractComponent.superclass.constructor.call(this, args);
40 37
41 this._element = anElement; 38 this._element = anElement;
42 this._mainComponent = args.mainComponent; 39 this._mainComponent = args.mainComponent;
43 40
44 return this; 41 return this;
45} 42}
46 43
47//============================================================================= 44//=============================================================================
48 45
49YAHOO.extendX(Clipperz.PM.Components.RecordDetail.AbstractComponent, Clipperz.PM.Components.BaseComponent, { 46YAHOO.extendX(Clipperz.PM.Components.RecordDetail.AbstractComponent, Clipperz.PM.Components.BaseComponent, {
50 47
51 'toString': function() { 48 'toString': function() {
52 return "Clipperz.PM.Components.RecordDetail.AbstractComponent"; 49 return "Clipperz.PM.Components.RecordDetail.AbstractComponent";
53 }, 50 },
54 51
55 //------------------------------------------------------------------------- 52 //-------------------------------------------------------------------------
56 53
57 'mainComponent': function() { 54 'mainComponent': function() {
58 return this._mainComponent; 55 return this._mainComponent;
59 }, 56 },
60 57
61 //------------------------------------------------------------------------- 58 //-------------------------------------------------------------------------
62 59
63 'record': function() { 60 'record': function() {
64 return this.mainComponent().record(); 61 return this.mainComponent().record();
65 }, 62 },
66 63
67 //------------------------------------------------------------------------- 64 //-------------------------------------------------------------------------
68 65
69 'editMode': function() { 66 'editMode': function() {
70 return this.mainComponent().editMode(); 67 return this.mainComponent().editMode();
71 }, 68 },
72 69
73 //------------------------------------------------------------------------- 70 //-------------------------------------------------------------------------
74 71
75 'render': function() { 72 'render': function() {
76 this.element().update(""); 73 this.element().update("");
77 this.update(); 74 this.update();
78 }, 75 },
79 76
80 //------------------------------------------------------------------------- 77 //-------------------------------------------------------------------------
81 78
82 'update': function(anEvent) { 79 'update': function(anEvent) {
83 if (this.editMode() == 'EDIT') { 80 if (this.editMode() == 'EDIT') {
84 this.updateEditMode(); 81 this.updateEditMode();
85 } else if (this.editMode() == 'VIEW') { 82 } else if (this.editMode() == 'VIEW') {
86 this.updateViewMode(); 83 this.updateViewMode();
87 } 84 }
88 }, 85 },
89 86
90 //------------------------------------------------------------------------- 87 //-------------------------------------------------------------------------
91 88
92 'updateViewMode': function() {}, 89 'updateViewMode': function() {},
93 'updateEditMode': function() {}, 90 'updateEditMode': function() {},
94 'synchronizeComponentValues': function() {}, 91 'synchronizeComponentValues': function() {},
95 92
96 //------------------------------------------------------------------------- 93 //-------------------------------------------------------------------------
97 94
98 'destroy': function() { 95 'destroy': function() {
99 this.element().remove(); 96 this.element().remove();
100 }, 97 },
101 98
102 //------------------------------------------------------------------------- 99 //-------------------------------------------------------------------------
103 __syntaxFix__: "syntax fix" 100 __syntaxFix__: "syntax fix"
104}); 101});
105 102
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js
index 7596184..ad733aa 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js
@@ -1,77 +1,74 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent = function(anElement, args) { 33Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent = function(anElement, args) {
37 args = args || {}; 34 args = args || {};
38 35
39 Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent.superclass.constructor.call(this, anElement, args); 36 Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent.superclass.constructor.call(this, anElement, args);
40 37
41 this._fieldComponent = args.fieldComponent || null; 38 this._fieldComponent = args.fieldComponent || null;
42 39
43 this.render(); 40 this.render();
44 41
45 return this; 42 return this;
46} 43}
47 44
48//============================================================================= 45//=============================================================================
49 46
50YAHOO.extendX(Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 47YAHOO.extendX(Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
51 48
52 'toString': function() { 49 'toString': function() {
53 return "Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent"; 50 return "Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent";
54 }, 51 },
55 52
56 //------------------------------------------------------------------------- 53 //-------------------------------------------------------------------------
57 54
58 'fieldComponent': function() { 55 'fieldComponent': function() {
59 return this._fieldComponent; 56 return this._fieldComponent;
60 }, 57 },
61 58
62 //------------------------------------------------------------------------- 59 //-------------------------------------------------------------------------
63 60
64 'mainComponent': function() { 61 'mainComponent': function() {
65 return this.fieldComponent().mainComponent(); 62 return this.fieldComponent().mainComponent();
66 }, 63 },
67 64
68 //------------------------------------------------------------------------- 65 //-------------------------------------------------------------------------
69 66
70 'recordField': function() { 67 'recordField': function() {
71 return this.fieldComponent().recordField(); 68 return this.fieldComponent().recordField();
72 }, 69 },
73 70
74 //------------------------------------------------------------------------- 71 //-------------------------------------------------------------------------
75 __syntaxFix__: "syntax fix" 72 __syntaxFix__: "syntax fix"
76}); 73});
77 74
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js
index a92285f..d4c7837 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js
@@ -1,317 +1,314 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Components.RecordDetail.CreationWizard = function(anElement, args) { 33Clipperz.PM.Components.RecordDetail.CreationWizard = function(anElement, args) {
37 args = args || {}; 34 args = args || {};
38 35
39 Clipperz.PM.Components.RecordDetail.CreationWizard.superclass.constructor.call(this, anElement, args); 36 Clipperz.PM.Components.RecordDetail.CreationWizard.superclass.constructor.call(this, anElement, args);
40 37
41 this._mainComponent = args.mainComponent; 38 this._mainComponent = args.mainComponent;
42 this._previouslySelectedRecord = args.previouslySelectedRecord; 39 this._previouslySelectedRecord = args.previouslySelectedRecord;
43//MochiKit.Logging.logDebug("--- new CreationWizard - previouslySelectedRecord: " + args.previouslySelectedRecord); 40//MochiKit.Logging.logDebug("--- new CreationWizard - previouslySelectedRecord: " + args.previouslySelectedRecord);
44 this._createButton_header = null; 41 this._createButton_header = null;
45 this._createButton_footer = null; 42 this._createButton_footer = null;
46 43
47 this._cancelButton_header = null; 44 this._cancelButton_header = null;
48 this._cancelButton_footer = null; 45 this._cancelButton_footer = null;
49 46
50 this.render(); 47 this.render();
51 48
52 return this; 49 return this;
53} 50}
54 51
55//============================================================================= 52//=============================================================================
56 53
57YAHOO.extendX(Clipperz.PM.Components.RecordDetail.CreationWizard, Clipperz.PM.Components.BaseComponent, { 54YAHOO.extendX(Clipperz.PM.Components.RecordDetail.CreationWizard, Clipperz.PM.Components.BaseComponent, {
58 55
59 'toString': function() { 56 'toString': function() {
60 return "Clipperz.PM.Components.RecordDetail.CreationWizard component"; 57 return "Clipperz.PM.Components.RecordDetail.CreationWizard component";
61 }, 58 },
62 59
63 //------------------------------------------------------------------------- 60 //-------------------------------------------------------------------------
64 61
65 'previouslySelectedRecord': function() { 62 'previouslySelectedRecord': function() {
66 return this._previouslySelectedRecord; 63 return this._previouslySelectedRecord;
67 }, 64 },
68 65
69 //------------------------------------------------------------------------- 66 //-------------------------------------------------------------------------
70 67
71 'render': function() { 68 'render': function() {
72 vartemplateListElement; 69 vartemplateListElement;
73 vartemplates; 70 vartemplates;
74 71
75 this.element().update(""); 72 this.element().update("");
76 73
77 Clipperz.YUI.DomHelper.append(this.element().dom, 74 Clipperz.YUI.DomHelper.append(this.element().dom,
78 {tag:'form', cls:'recordDataFORM', id:this.getId('form'), children:[ 75 {tag:'form', cls:'recordDataFORM', id:this.getId('form'), children:[
79 {tag:'div', id:'recordDetailDataBox', cls:'recordDetailDataBox', children:[ 76 {tag:'div', id:'recordDetailDataBox', cls:'recordDetailDataBox', children:[
80 {tag:'div', id:this.getId('wizardBox'), cls:'recordCreationWizard', children:[ 77 {tag:'div', id:this.getId('wizardBox'), cls:'recordCreationWizard', children:[
81 {tag:'div', id:this.getId('recordCreationWizardTitleBox'), cls:'recordCreationWizardTitleBox', htmlString:Clipperz.PM.Strings['newRecordWizardTitleBox']}, 78 {tag:'div', id:this.getId('recordCreationWizardTitleBox'), cls:'recordCreationWizardTitleBox', htmlString:Clipperz.PM.Strings['newRecordWizardTitleBox']},
82 {tag:'ul', id:this.getId('templateList'), cls:'radioList'} 79 {tag:'ul', id:this.getId('templateList'), cls:'radioList'}
83 ]} 80 ]}
84 ]} 81 ]}
85 ]} 82 ]}
86 ); 83 );
87 84
88 Clipperz.YUI.DomHelper.append(this.getDom('recordCreationWizardTitleBox'), {tag:'div', cls:'newRecordWizardHeader', children:[ 85 Clipperz.YUI.DomHelper.append(this.getDom('recordCreationWizardTitleBox'), {tag:'div', cls:'newRecordWizardHeader', children:[
89 {tag:'table', width:'100%', cellpadding:'5', children:[ 86 {tag:'table', width:'100%', cellpadding:'5', children:[
90 {tag:'tbody', children:[ 87 {tag:'tbody', children:[
91 {tag:'tr', children:[ 88 {tag:'tr', children:[
92 {tag:'td', width:'49%', align:'right', children:[ 89 {tag:'td', width:'49%', align:'right', children:[
93 {tag:'div', id:this.getId('cancelButton_header')} 90 {tag:'div', id:this.getId('cancelButton_header')}
94 ]}, 91 ]},
95 {tag:'td', width:'10', html:'&nbsp;'}, 92 {tag:'td', width:'10', html:'&nbsp;'},
96 {tag:'td', width:'49%', align:'left', children:[ 93 {tag:'td', width:'49%', align:'left', children:[
97 {tag:'div', id:this.getId('createButton_header')} 94 {tag:'div', id:this.getId('createButton_header')}
98 ]} 95 ]}
99 ]} 96 ]}
100 ]} 97 ]}
101 ]} 98 ]}
102 ]}); 99 ]});
103 100
104 templateListElement = this.getElement('templateList'); 101 templateListElement = this.getElement('templateList');
105 templates = Clipperz.PM.Strings['recordTemplates']; 102 templates = Clipperz.PM.Strings['recordTemplates'];
106 MochiKit.Iter.forEach(MochiKit.Base.keys(templates), MochiKit.Base.bind(function(aTemplateKey) { 103 MochiKit.Iter.forEach(MochiKit.Base.keys(templates), MochiKit.Base.bind(function(aTemplateKey) {
107 Clipperz.YUI.DomHelper.append(templateListElement.dom, {tag:'li', children:[ 104 Clipperz.YUI.DomHelper.append(templateListElement.dom, {tag:'li', children:[
108 {tag:'table', children:[ 105 {tag:'table', children:[
109 {tag:'tbody', children:[ 106 {tag:'tbody', children:[
110 {tag:'tr', children:[ 107 {tag:'tr', children:[
111 {tag:'td', valign:'top', children:[ 108 {tag:'td', valign:'top', children:[
112 {tag:'input', id:this.getId(aTemplateKey+"_radio"), type:'radio', name:'recordTemplate', value:"aTemplateKey"} 109 {tag:'input', id:this.getId(aTemplateKey+"_radio"), type:'radio', name:'recordTemplate', value:"aTemplateKey"}
113 ]}, 110 ]},
114 {tag:'td', valign:'top', children:[ 111 {tag:'td', valign:'top', children:[
115 {tag:'h4', id:this.getId(aTemplateKey+"_title"), html:templates[aTemplateKey]['title']}, 112 {tag:'h4', id:this.getId(aTemplateKey+"_title"), html:templates[aTemplateKey]['title']},
116 {tag:'div', cls:'templateDescription', htmlString:templates[aTemplateKey]['description']} 113 {tag:'div', cls:'templateDescription', htmlString:templates[aTemplateKey]['description']}
117 ]} 114 ]}
118 ]} 115 ]}
119 ]} 116 ]}
120 ]} 117 ]}
121 ]}); 118 ]});
122 this.getElement(aTemplateKey+"_radio").dom.value = aTemplateKey; 119 this.getElement(aTemplateKey+"_radio").dom.value = aTemplateKey;
123 MochiKit.Signal.connect(this.getDom(aTemplateKey+"_title"), 'onclick', MochiKit.Base.partial(function(aRadioButton) {aRadioButton.click();}, this.getDom(aTemplateKey+"_radio"))); 120 MochiKit.Signal.connect(this.getDom(aTemplateKey+"_title"), 'onclick', MochiKit.Base.partial(function(aRadioButton) {aRadioButton.click();}, this.getDom(aTemplateKey+"_radio")));
124 }, this)); 121 }, this));
125 122
126 Clipperz.YUI.DomHelper.append(templateListElement.dom, {tag:'li', children:[ 123 Clipperz.YUI.DomHelper.append(templateListElement.dom, {tag:'li', children:[
127 {tag:'table', children:[ 124 {tag:'table', children:[
128 {tag:'tbody', children:[ 125 {tag:'tbody', children:[
129 {tag:'tr', children:[ 126 {tag:'tr', children:[
130 {tag:'td', valign:'top', children:[ 127 {tag:'td', valign:'top', children:[
131 {tag:'input', type:'radio', name:'recordTemplate', id:this.getId('bookmarkletRadioButton'), value:'BookmarkletConfigurationTemplate'} 128 {tag:'input', type:'radio', name:'recordTemplate', id:this.getId('bookmarkletRadioButton'), value:'BookmarkletConfigurationTemplate'}
132 ]}, 129 ]},
133 {tag:'td', valign:'top', children:[ 130 {tag:'td', valign:'top', children:[
134 {tag:'h4', htmlString:Clipperz.PM.Strings['newRecordWizardBookmarkletConfigurationTitle']}, 131 {tag:'h4', htmlString:Clipperz.PM.Strings['newRecordWizardBookmarkletConfigurationTitle']},
135 {tag:'div', cls:'templateDescription', htmlString:Clipperz.PM.Strings['newRecordWizardBookmarkletConfigurationDescription']}, 132 {tag:'div', cls:'templateDescription', htmlString:Clipperz.PM.Strings['newRecordWizardBookmarkletConfigurationDescription']},
136 {tag:'div', cls:'bookmarkletConfiguration', children:[ 133 {tag:'div', cls:'bookmarkletConfiguration', children:[
137 // {tag:'span', htmlString:Clipperz.PM.Strings['newRecordWizardBookmarkletConfigurationLabel']}, 134 // {tag:'span', htmlString:Clipperz.PM.Strings['newRecordWizardBookmarkletConfigurationLabel']},
138 {tag:'div', htmlString:Clipperz.PM.Strings['recordDetailNewDirectLoginDescription']}, 135 {tag:'div', htmlString:Clipperz.PM.Strings['recordDetailNewDirectLoginDescription']},
139 {tag:'textarea', id:this.getId('bookmarkletConfiguration')} 136 {tag:'textarea', id:this.getId('bookmarkletConfiguration')}
140 ]} 137 ]}
141 ]} 138 ]}
142 ]} 139 ]}
143 ]} 140 ]}
144 ]} 141 ]}
145 ]}); 142 ]});
146 143
147 Clipperz.YUI.DomHelper.append(this.getDom('wizardBox'), {tag:'div', cls:'newRecordWizardFooter', children:[ 144 Clipperz.YUI.DomHelper.append(this.getDom('wizardBox'), {tag:'div', cls:'newRecordWizardFooter', children:[
148 {tag:'table', width:'100%', cellpadding:'5', children:[ 145 {tag:'table', width:'100%', cellpadding:'5', children:[
149 {tag:'tbody', children:[ 146 {tag:'tbody', children:[
150 {tag:'tr', children:[ 147 {tag:'tr', children:[
151 {tag:'td', width:'49%', align:'right', children:[ 148 {tag:'td', width:'49%', align:'right', children:[
152 {tag:'div', id:this.getId('cancelButton_footer')} 149 {tag:'div', id:this.getId('cancelButton_footer')}
153 ]}, 150 ]},
154 {tag:'td', width:'10', html:'&nbsp;'}, 151 {tag:'td', width:'10', html:'&nbsp;'},
155 {tag:'td', width:'49%', align:'left', children:[ 152 {tag:'td', width:'49%', align:'left', children:[
156 {tag:'div', id:this.getId('createButton_footer')} 153 {tag:'div', id:this.getId('createButton_footer')}
157 ]} 154 ]}
158 ]} 155 ]}
159 ]} 156 ]}
160 ]} 157 ]}
161 ]}); 158 ]});
162 159
163 this.setCreateButton_header(new YAHOO.ext.Button(this.getDom('createButton_header'), {text:Clipperz.PM.Strings['newRecordWizardCreateButtonLabel'], handler:this.createRecord, scope:this})); 160 this.setCreateButton_header(new YAHOO.ext.Button(this.getDom('createButton_header'), {text:Clipperz.PM.Strings['newRecordWizardCreateButtonLabel'], handler:this.createRecord, scope:this}));
164 this.setCreateButton_footer(new YAHOO.ext.Button(this.getDom('createButton_footer'), {text:Clipperz.PM.Strings['newRecordWizardCreateButtonLabel'], handler:this.createRecord, scope:this})); 161 this.setCreateButton_footer(new YAHOO.ext.Button(this.getDom('createButton_footer'), {text:Clipperz.PM.Strings['newRecordWizardCreateButtonLabel'], handler:this.createRecord, scope:this}));
165 162
166 this.setCancelButton_header(new YAHOO.ext.Button(this.getDom('cancelButton_header'), {text:Clipperz.PM.Strings['newRecordWizardCancelButtonLabel'], handler:this.exitWizard, scope:this})); 163 this.setCancelButton_header(new YAHOO.ext.Button(this.getDom('cancelButton_header'), {text:Clipperz.PM.Strings['newRecordWizardCancelButtonLabel'], handler:this.exitWizard, scope:this}));
167 this.setCancelButton_footer(new YAHOO.ext.Button(this.getDom('cancelButton_footer'), {text:Clipperz.PM.Strings['newRecordWizardCancelButtonLabel'], handler:this.exitWizard, scope:this})); 164 this.setCancelButton_footer(new YAHOO.ext.Button(this.getDom('cancelButton_footer'), {text:Clipperz.PM.Strings['newRecordWizardCancelButtonLabel'], handler:this.exitWizard, scope:this}));
168 165
169 this.createButton_header().disable(); 166 this.createButton_header().disable();
170 this.createButton_footer().disable(); 167 this.createButton_footer().disable();
171 168
172 MochiKit.Iter.forEach(this.getElement('form').getChildrenByTagName('input'), MochiKit.Base.bind(function(anInput) { 169 MochiKit.Iter.forEach(this.getElement('form').getChildrenByTagName('input'), MochiKit.Base.bind(function(anInput) {
173 // MochiKit.Signal.connect(anInput.dom, 'onchange', this, 'enableCreateButton'); 170 // MochiKit.Signal.connect(anInput.dom, 'onchange', this, 'enableCreateButton');
174 MochiKit.Signal.connect(anInput.dom, 'onclick', this, 'enableCreateButton'); //for Safari 171 MochiKit.Signal.connect(anInput.dom, 'onclick', this, 'enableCreateButton'); //for Safari
175 },this)); 172 },this));
176 173
177 MochiKit.Signal.connect(this.getDom('bookmarkletConfiguration'), 'onkeyup', this, 'enableCreateButton'); 174 MochiKit.Signal.connect(this.getDom('bookmarkletConfiguration'), 'onkeyup', this, 'enableCreateButton');
178 MochiKit.Signal.connect(this.getDom('bookmarkletConfiguration'), 'onkeydown', this, 'enableCreateButton'); //for Safari 175 MochiKit.Signal.connect(this.getDom('bookmarkletConfiguration'), 'onkeydown', this, 'enableCreateButton'); //for Safari
179 }, 176 },
180 177
181 //------------------------------------------------------------------------- 178 //-------------------------------------------------------------------------
182 179
183 'createButton_header': function() { 180 'createButton_header': function() {
184 return this._createButton_header; 181 return this._createButton_header;
185 }, 182 },
186 183
187 'setCreateButton_header': function(aValue) { 184 'setCreateButton_header': function(aValue) {
188 this._createButton_header = aValue; 185 this._createButton_header = aValue;
189 }, 186 },
190 187
191 //......................................................................... 188 //.........................................................................
192 189
193 'createButton_footer': function() { 190 'createButton_footer': function() {
194 return this._createButton_footer; 191 return this._createButton_footer;
195 }, 192 },
196 193
197 'setCreateButton_footer': function(aValue) { 194 'setCreateButton_footer': function(aValue) {
198 this._createButton_footer = aValue; 195 this._createButton_footer = aValue;
199 }, 196 },
200 197
201 198
202 //------------------------------------------------------------------------- 199 //-------------------------------------------------------------------------
203 200
204 'cancelButton_header': function() { 201 'cancelButton_header': function() {
205 return this._cancelButton_header; 202 return this._cancelButton_header;
206 }, 203 },
207 204
208 'setCancelButton_header': function(aValue) { 205 'setCancelButton_header': function(aValue) {
209 this._cancelButton_header = aValue; 206 this._cancelButton_header = aValue;
210 }, 207 },
211 208
212 //......................................................................... 209 //.........................................................................
213 210
214 'cancelButton_footer': function() { 211 'cancelButton_footer': function() {
215 return this._cancelButton_footer; 212 return this._cancelButton_footer;
216 }, 213 },
217 214
218 'setCancelButton_footer': function(aValue) { 215 'setCancelButton_footer': function(aValue) {
219 this._cancelButton_footer = aValue; 216 this._cancelButton_footer = aValue;
220 }, 217 },
221 218
222 //------------------------------------------------------------------------- 219 //-------------------------------------------------------------------------
223 220
224 'enableCreateButton': function(anEvent, skipKeyDownCheck) { 221 'enableCreateButton': function(anEvent, skipKeyDownCheck) {
225//MochiKit.Logging.logDebug(">>> CreationWizard.enableCreateButton (" + anEvent.type() + ")"); 222//MochiKit.Logging.logDebug(">>> CreationWizard.enableCreateButton (" + anEvent.type() + ")");
226 if ((anEvent.type() == "keydown") && (skipKeyDownCheck != true)) { 223 if ((anEvent.type() == "keydown") && (skipKeyDownCheck != true)) {
227//MochiKit.Logging.logDebug("--- CreationWizard.enableCreateButton - handling 'keydown' event with a postponed execution of the check"); 224//MochiKit.Logging.logDebug("--- CreationWizard.enableCreateButton - handling 'keydown' event with a postponed execution of the check");
228 MochiKit.Async.callLater(0.3, MochiKit.Base.method(this, 'enableCreateButton', anEvent, true)); 225 MochiKit.Async.callLater(0.3, MochiKit.Base.method(this, 'enableCreateButton', anEvent, true));
229 } else { 226 } else {
230 var shouldEnableCreateButton; 227 var shouldEnableCreateButton;
231 var isBookmarkletConfigurationEmpty; 228 var isBookmarkletConfigurationEmpty;
232 229
233//MochiKit.Logging.logDebug("--- CreationWizard.enableCreateButton - common execution"); 230//MochiKit.Logging.logDebug("--- CreationWizard.enableCreateButton - common execution");
234 231
235 shouldEnableCreateButton = true; 232 shouldEnableCreateButton = true;
236 233
237 isBookmarkletConfigurationEmpty = !/[^ \n]/.test(this.getDom('bookmarkletConfiguration').value); 234 isBookmarkletConfigurationEmpty = !/[^ \n]/.test(this.getDom('bookmarkletConfiguration').value);
238//MochiKit.Logging.logDebug("--- CreationWizard.enableCreateButton - isBookmarkletConfigurationEmpty: " + isBookmarkletConfigurationEmpty); 235//MochiKit.Logging.logDebug("--- CreationWizard.enableCreateButton - isBookmarkletConfigurationEmpty: " + isBookmarkletConfigurationEmpty);
239 236
240 if ((anEvent.src() == this.getDom('bookmarkletConfiguration')) && !isBookmarkletConfigurationEmpty) { 237 if ((anEvent.src() == this.getDom('bookmarkletConfiguration')) && !isBookmarkletConfigurationEmpty) {
241 this.getDom('bookmarkletRadioButton').checked = true; 238 this.getDom('bookmarkletRadioButton').checked = true;
242 } 239 }
243 240
244 if ((this.getDom('bookmarkletRadioButton').checked) && isBookmarkletConfigurationEmpty) { 241 if ((this.getDom('bookmarkletRadioButton').checked) && isBookmarkletConfigurationEmpty) {
245 shouldEnableCreateButton = false; 242 shouldEnableCreateButton = false;
246 } 243 }
247 244
248 if (shouldEnableCreateButton) { 245 if (shouldEnableCreateButton) {
249//MochiKit.Logging.logDebug("--- CreationWizard.enableCreateButton - enabling button"); 246//MochiKit.Logging.logDebug("--- CreationWizard.enableCreateButton - enabling button");
250 this.createButton_header().enable(); 247 this.createButton_header().enable();
251 this.createButton_footer().enable(); 248 this.createButton_footer().enable();
252 } else { 249 } else {
253//MochiKit.Logging.logDebug("--- CreationWizard.enableCreateButton - disabling button"); 250//MochiKit.Logging.logDebug("--- CreationWizard.enableCreateButton - disabling button");
254 this.createButton_header().disable(); 251 this.createButton_header().disable();
255 this.createButton_footer().disable(); 252 this.createButton_footer().disable();
256 } 253 }
257 } 254 }
258//MochiKit.Logging.logDebug("<<< CreationWizard.enableCreateButton"); 255//MochiKit.Logging.logDebug("<<< CreationWizard.enableCreateButton");
259 }, 256 },
260 257
261 //------------------------------------------------------------------------- 258 //-------------------------------------------------------------------------
262 259
263 'createRecord': function() { 260 'createRecord': function() {
264 varselectedTemplateKey; 261 varselectedTemplateKey;
265 varnewRecord; 262 varnewRecord;
266 263
267 selectedTemplateKey = MochiKit.Base.filter(function(aCheckBoxElement) { 264 selectedTemplateKey = MochiKit.Base.filter(function(aCheckBoxElement) {
268 return aCheckBoxElement.dom.checked; 265 return aCheckBoxElement.dom.checked;
269 },this.getElement('form').getChildrenByTagName('input'))[0].dom.value; 266 },this.getElement('form').getChildrenByTagName('input'))[0].dom.value;
270 267
271//MochiKit.Logging.logDebug("--- CreationWizard.createRecord - selectedTemplateKey: " + selectedTemplateKey); 268//MochiKit.Logging.logDebug("--- CreationWizard.createRecord - selectedTemplateKey: " + selectedTemplateKey);
272 if (selectedTemplateKey == 'BookmarkletConfigurationTemplate') { 269 if (selectedTemplateKey == 'BookmarkletConfigurationTemplate') {
273 var bookmarkletConfiguration; 270 var bookmarkletConfiguration;
274 271
275 this.mainComponent().exitModalView(); 272 this.mainComponent().exitModalView();
276 bookmarkletConfiguration = Clipperz.PM.BookmarkletProcessor.checkBookmarkletConfiguration(this.getDom('bookmarkletConfiguration').value, this.getDom('createButton'), MochiKit.Base.method(this.mainComponent(), 'enterModalView')); 273 bookmarkletConfiguration = Clipperz.PM.BookmarkletProcessor.checkBookmarkletConfiguration(this.getDom('bookmarkletConfiguration').value, this.getDom('createButton'), MochiKit.Base.method(this.mainComponent(), 'enterModalView'));
277 this.mainComponent().enterModalView(); 274 this.mainComponent().enterModalView();
278 newRecord = Clipperz.PM.BookmarkletProcessor.createRecordFromBookmarkletConfiguration(this.mainComponent().user(), bookmarkletConfiguration); 275 newRecord = Clipperz.PM.BookmarkletProcessor.createRecordFromBookmarkletConfiguration(this.mainComponent().user(), bookmarkletConfiguration);
279 } else { 276 } else {
280 varfieldsConfigurations; 277 varfieldsConfigurations;
281 278
282 newRecord = this.mainComponent().user().addNewRecord(); 279 newRecord = this.mainComponent().user().addNewRecord();
283 newRecord.setLabel(Clipperz.PM.Strings['recordTemplates'][selectedTemplateKey]['title']); 280 newRecord.setLabel(Clipperz.PM.Strings['recordTemplates'][selectedTemplateKey]['title']);
284 281
285 fieldsConfigurations = Clipperz.PM.Strings['recordTemplates'][selectedTemplateKey]['fields']; 282 fieldsConfigurations = Clipperz.PM.Strings['recordTemplates'][selectedTemplateKey]['fields'];
286 283
287 MochiKit.Iter.forEach(fieldsConfigurations, MochiKit.Base.partial(function(aRecord, aFieldConfiguration) { 284 MochiKit.Iter.forEach(fieldsConfigurations, MochiKit.Base.partial(function(aRecord, aFieldConfiguration) {
288 var newField; 285 var newField;
289 286
290 newField = new Clipperz.PM.DataModel.RecordField({recordVersion:aRecord.currentVersion()}); 287 newField = new Clipperz.PM.DataModel.RecordField({recordVersion:aRecord.currentVersion()});
291 newField.setLabel(aFieldConfiguration['label']); 288 newField.setLabel(aFieldConfiguration['label']);
292 newField.setType(aFieldConfiguration['type']); 289 newField.setType(aFieldConfiguration['type']);
293 aRecord.currentVersion().addField(newField); 290 aRecord.currentVersion().addField(newField);
294 }, newRecord)); 291 }, newRecord));
295 } 292 }
296 293
297 this.mainComponent().exitWizard(newRecord, true); 294 this.mainComponent().exitWizard(newRecord, true);
298 }, 295 },
299 296
300 //------------------------------------------------------------------------- 297 //-------------------------------------------------------------------------
301 298
302 'exitWizard': function() { 299 'exitWizard': function() {
303//MochiKit.Logging.logDebug(">>> CreationWizard.exitWizard - " + this.previouslySelectedRecord()); 300//MochiKit.Logging.logDebug(">>> CreationWizard.exitWizard - " + this.previouslySelectedRecord());
304 this.mainComponent().exitWizard(this.previouslySelectedRecord()); 301 this.mainComponent().exitWizard(this.previouslySelectedRecord());
305//MochiKit.Logging.logDebug("<<< CreationWizard.exitWizard"); 302//MochiKit.Logging.logDebug("<<< CreationWizard.exitWizard");
306 }, 303 },
307 304
308 //------------------------------------------------------------------------- 305 //-------------------------------------------------------------------------
309 306
310 'mainComponent': function() { 307 'mainComponent': function() {
311 return this._mainComponent; 308 return this._mainComponent;
312 }, 309 },
313 310
314 //------------------------------------------------------------------------- 311 //-------------------------------------------------------------------------
315 __syntaxFix__: "syntax fix" 312 __syntaxFix__: "syntax fix"
316}); 313});
317 314
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js
index 6171a4e..36dd9a8 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js
@@ -1,174 +1,171 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent = function(anElement, args) { 33Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent = function(anElement, args) {
37//MochiKit.Logging.logDebug(">>> new DirectLoginBindingComponent"); 34//MochiKit.Logging.logDebug(">>> new DirectLoginBindingComponent");
38 args = args || {}; 35 args = args || {};
39 36
40 Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent.superclass.constructor.call(this, anElement, args); 37 Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent.superclass.constructor.call(this, anElement, args);
41 38
42 this._directLoginBinding = args.directLoginBinding || null; 39 this._directLoginBinding = args.directLoginBinding || null;
43 this.render(); 40 this.render();
44 41
45 Clipperz.NotificationCenter.register(this.record(), 'addNewRecordField',this, 'syncAndUpdateEditMode'); 42 Clipperz.NotificationCenter.register(this.record(), 'addNewRecordField',this, 'syncAndUpdateEditMode');
46 Clipperz.NotificationCenter.register(this.record(), 'removedField', this, 'syncAndUpdateEditMode'); 43 Clipperz.NotificationCenter.register(this.record(), 'removedField', this, 'syncAndUpdateEditMode');
47 Clipperz.NotificationCenter.register(this.record(), 'updatedFieldLabel',this, 'syncAndUpdateEditMode'); 44 Clipperz.NotificationCenter.register(this.record(), 'updatedFieldLabel',this, 'syncAndUpdateEditMode');
48//MochiKit.Logging.logDebug("<<< new DirectLoginBindingComponent"); 45//MochiKit.Logging.logDebug("<<< new DirectLoginBindingComponent");
49 46
50 return this; 47 return this;
51} 48}
52 49
53//============================================================================= 50//=============================================================================
54 51
55YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 52YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
56 53
57 'toString': function() { 54 'toString': function() {
58 return "Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent component"; 55 return "Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent component";
59 }, 56 },
60 57
61 //------------------------------------------------------------------------- 58 //-------------------------------------------------------------------------
62 59
63 'directLoginBinding': function() { 60 'directLoginBinding': function() {
64 return this._directLoginBinding; 61 return this._directLoginBinding;
65 }, 62 },
66 63
67 //------------------------------------------------------------------------- 64 //-------------------------------------------------------------------------
68 65
69 'render': function() { 66 'render': function() {
70 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', style:'font-weight:bold;', html:this.directLoginBinding().key()}) 67 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', style:'font-weight:bold;', html:this.directLoginBinding().key()})
71 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', html:this.directLoginBinding().value()}) 68 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', html:this.directLoginBinding().value()})
72//MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.render"); 69//MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.render");
73 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginBindingLabelTD', children:[ 70 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginBindingLabelTD', children:[
74 {tag:'span', html:this.directLoginBinding().key()} 71 {tag:'span', html:this.directLoginBinding().key()}
75 ]}); 72 ]});
76//MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.render - 1"); 73//MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.render - 1");
77 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginBindingValueTD', children:[ 74 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginBindingValueTD', children:[
78 {tag:'div', id:this.getId('editModeBox'), children:[ 75 {tag:'div', id:this.getId('editModeBox'), children:[
79 {tag:'select', id:this.getId('select'), children:this.recordFieldOptions()} 76 {tag:'select', id:this.getId('select'), children:this.recordFieldOptions()}
80 ]}, 77 ]},
81 {tag:'div', id:this.getId('viewModeBox'), children:[ 78 {tag:'div', id:this.getId('viewModeBox'), children:[
82 {tag:'span', id:this.getId('viewValue'), html:""} 79 {tag:'span', id:this.getId('viewValue'), html:""}
83 ]} 80 ]}
84 ]}); 81 ]});
85//MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.render - 2"); 82//MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.render - 2");
86 this.getElement('editModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 83 this.getElement('editModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
87 this.getElement('viewModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 84 this.getElement('viewModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
88 85
89 this.update(); 86 this.update();
90//MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.render"); 87//MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.render");
91 }, 88 },
92 89
93 //------------------------------------------------------------------------- 90 //-------------------------------------------------------------------------
94 91
95 'recordFieldOptions': function() { 92 'recordFieldOptions': function() {
96 varresult; 93 varresult;
97 var option; 94 var option;
98 varrecordFieldKey; 95 varrecordFieldKey;
99 varrecordFields; 96 varrecordFields;
100 97
101//MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.recordFieldOptions"); 98//MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.recordFieldOptions");
102 recordFields = this.directLoginBinding().directLogin().record().currentVersion().fields(); 99 recordFields = this.directLoginBinding().directLogin().record().currentVersion().fields();
103 result = []; 100 result = [];
104 option = {tag:'option', value:null, html:'---'}; 101 option = {tag:'option', value:null, html:'---'};
105 result.push(option); 102 result.push(option);
106 for (recordFieldKey in recordFields) { 103 for (recordFieldKey in recordFields) {
107 //TODO: remove the value: field and replace it with element.dom.value = <some value> 104 //TODO: remove the value: field and replace it with element.dom.value = <some value>
108 option = {tag:'option', value:recordFieldKey, html:recordFields[recordFieldKey].label()} 105 option = {tag:'option', value:recordFieldKey, html:recordFields[recordFieldKey].label()}
109 if (recordFieldKey == this.directLoginBinding().fieldKey()) { 106 if (recordFieldKey == this.directLoginBinding().fieldKey()) {
110 option['selected'] = true; 107 option['selected'] = true;
111 } 108 }
112 result.push(option); 109 result.push(option);
113 } 110 }
114//MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.recordFieldOptions"); 111//MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.recordFieldOptions");
115 112
116 return result; 113 return result;
117 }, 114 },
118 115
119 //------------------------------------------------------------------------- 116 //-------------------------------------------------------------------------
120 117
121 'syncAndUpdateEditMode': function() { 118 'syncAndUpdateEditMode': function() {
122 this.synchronizeComponentValues(); 119 this.synchronizeComponentValues();
123 this.updateEditMode(); 120 this.updateEditMode();
124 }, 121 },
125 122
126 'updateEditMode': function() { 123 'updateEditMode': function() {
127 varselectElementBox; 124 varselectElementBox;
128 125
129//MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.updateEditMode"); 126//MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.updateEditMode");
130 this.getElement('viewModeBox').hide(); 127 this.getElement('viewModeBox').hide();
131 128
132 selectElementBox = this.getElement('editModeBox'); 129 selectElementBox = this.getElement('editModeBox');
133 selectElementBox.update(""); 130 selectElementBox.update("");
134 131
135 Clipperz.YUI.DomHelper.append(selectElementBox.dom, {tag:'select', id:this.getId('select'), children:this.recordFieldOptions()}); 132 Clipperz.YUI.DomHelper.append(selectElementBox.dom, {tag:'select', id:this.getId('select'), children:this.recordFieldOptions()});
136 133
137/* 134/*
138 selectElement = this.getElement('select'); 135 selectElement = this.getElement('select');
139 136
140 selectElement.update(""); 137 selectElement.update("");
141 MochiKit.Iter.forEach(this.recordFieldOptions(), function(anOption) { 138 MochiKit.Iter.forEach(this.recordFieldOptions(), function(anOption) {
142 Clipperz.YUI.DomHelper.append(selectElement.dom, anOption); 139 Clipperz.YUI.DomHelper.append(selectElement.dom, anOption);
143 }); 140 });
144*/ 141*/
145 142
146 143
147 this.getElement('editModeBox').show(); 144 this.getElement('editModeBox').show();
148//MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.updateEditMode"); 145//MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.updateEditMode");
149 }, 146 },
150 147
151 //------------------------------------------------------------------------- 148 //-------------------------------------------------------------------------
152 149
153 'updateViewMode': function() { 150 'updateViewMode': function() {
154//MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.updateViewMode"); 151//MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.updateViewMode");
155 this.getElement('editModeBox').hide(); 152 this.getElement('editModeBox').hide();
156 this.getElement('viewModeBox').show(); 153 this.getElement('viewModeBox').show();
157 154
158 this.getElement('viewValue').update(this.directLoginBinding().field().label()); 155 this.getElement('viewValue').update(this.directLoginBinding().field().label());
159//MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.updateViewMode"); 156//MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.updateViewMode");
160 }, 157 },
161 158
162 //------------------------------------------------------------------------- 159 //-------------------------------------------------------------------------
163 160
164 'synchronizeComponentValues': function() { 161 'synchronizeComponentValues': function() {
165//MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.synchronizeComponentValues") 162//MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.synchronizeComponentValues")
166//MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.synchronizeComponentValues - 1 - " + this.getId('select')); 163//MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.synchronizeComponentValues - 1 - " + this.getId('select'));
167 this.directLoginBinding().setFieldKey(this.getDom('select').value); 164 this.directLoginBinding().setFieldKey(this.getDom('select').value);
168//MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.synchronizeComponentValues"); 165//MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.synchronizeComponentValues");
169 }, 166 },
170 167
171 //------------------------------------------------------------------------- 168 //-------------------------------------------------------------------------
172 __syntaxFix__: "syntax fix" 169 __syntaxFix__: "syntax fix"
173}); 170});
174 171
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js
index 7638f00..69cad79 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js
@@ -1,362 +1,359 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Components.RecordDetail.DirectLoginComponent = function(anElement, args) { 33Clipperz.PM.Components.RecordDetail.DirectLoginComponent = function(anElement, args) {
37 args = args || {}; 34 args = args || {};
38 35
39 Clipperz.PM.Components.RecordDetail.DirectLoginComponent.superclass.constructor.call(this, anElement, args); 36 Clipperz.PM.Components.RecordDetail.DirectLoginComponent.superclass.constructor.call(this, anElement, args);
40 37
41 this._directLogin = args.directLogin || null; 38 this._directLogin = args.directLogin || null;
42 //this._titleElement = null; 39 //this._titleElement = null;
43 this._structureElement = null; 40 this._structureElement = null;
44 this._removeButton = null; 41 this._removeButton = null;
45 this._directLoginBindingComponents = null; 42 this._directLoginBindingComponents = null;
46 this._collapser = null; 43 this._collapser = null;
47 44
48 this.mainComponent().addEditComponent(this); 45 this.mainComponent().addEditComponent(this);
49 this.render(); 46 this.render();
50 47
51 return this; 48 return this;
52} 49}
53 50
54//============================================================================= 51//=============================================================================
55 52
56YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 53YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
57 54
58 'toString': function() { 55 'toString': function() {
59 return "Clipperz.PM.Components.RecordDetail.DirectLoginComponent component"; 56 return "Clipperz.PM.Components.RecordDetail.DirectLoginComponent component";
60 }, 57 },
61 58
62 //------------------------------------------------------------------------- 59 //-------------------------------------------------------------------------
63 60
64 'directLogin': function() { 61 'directLogin': function() {
65 return this._directLogin; 62 return this._directLogin;
66 }, 63 },
67 64
68 'directLoginBindingComponents': function() { 65 'directLoginBindingComponents': function() {
69 return this._directLoginBindingComponents; 66 return this._directLoginBindingComponents;
70 }, 67 },
71 68
72 //------------------------------------------------------------------------- 69 //-------------------------------------------------------------------------
73 70
74 'removeDirectLogin': function() { 71 'removeDirectLogin': function() {
75//MochiKit.Logging.logDebug(">>> DirectLoginComponent.removeDirectLogin"); 72//MochiKit.Logging.logDebug(">>> DirectLoginComponent.removeDirectLogin");
76 this.mainComponent().synchronizeComponentValues(); 73 this.mainComponent().synchronizeComponentValues();
77 this.directLogin().remove(); 74 this.directLogin().remove();
78 this.mainComponent().removeEditComponent(this); 75 this.mainComponent().removeEditComponent(this);
79 this.mainComponent().render(); 76 this.mainComponent().render();
80//MochiKit.Logging.logDebug("<<< DirectLoginComponent.removeDirectLogin"); 77//MochiKit.Logging.logDebug("<<< DirectLoginComponent.removeDirectLogin");
81 }, 78 },
82 79
83 //------------------------------------------------------------------------- 80 //-------------------------------------------------------------------------
84/* 81/*
85 'formDataValue': function() { 82 'formDataValue': function() {
86 return Clipperz.Base.serializeJSON(this.directLogin().formData()); 83 return Clipperz.Base.serializeJSON(this.directLogin().formData());
87 }, 84 },
88 85
89 'setFormDataValue': function(aValue) { 86 'setFormDataValue': function(aValue) {
90 87
91 }, 88 },
92 */ 89 */
93 //------------------------------------------------------------------------- 90 //-------------------------------------------------------------------------
94 91
95 'removeButton': function() { 92 'removeButton': function() {
96 return this._removeButton; 93 return this._removeButton;
97 }, 94 },
98 95
99 'setRemoveButton': function(aValue) { 96 'setRemoveButton': function(aValue) {
100 this._removeButton = aValue; 97 this._removeButton = aValue;
101 }, 98 },
102 99
103 //------------------------------------------------------------------------- 100 //-------------------------------------------------------------------------
104/* 101/*
105 'titleElement': function() { 102 'titleElement': function() {
106 return this._titleElement; 103 return this._titleElement;
107 }, 104 },
108 105
109 'setTitleElement': function(aValue) { 106 'setTitleElement': function(aValue) {
110 this._titleElement = aValue; 107 this._titleElement = aValue;
111 }, 108 },
112 */ 109 */
113 //------------------------------------------------------------------------- 110 //-------------------------------------------------------------------------
114 111
115 'structureElement': function() { 112 'structureElement': function() {
116 return this._structureElement; 113 return this._structureElement;
117 }, 114 },
118 115
119 'setStructureElement': function(aValue) { 116 'setStructureElement': function(aValue) {
120 this._structureElement = aValue; 117 this._structureElement = aValue;
121 }, 118 },
122 119
123 //------------------------------------------------------------------------- 120 //-------------------------------------------------------------------------
124 121
125 'render': function() { 122 'render': function() {
126//MochiKit.Logging.logDebug(">>> DirectLoginComponent.render"); 123//MochiKit.Logging.logDebug(">>> DirectLoginComponent.render");
127 try { 124 try {
128 this.element().update(""); 125 this.element().update("");
129 Clipperz.YUI.DomHelper.append(this.element().dom, 126 Clipperz.YUI.DomHelper.append(this.element().dom,
130 {tag:'li', children:[ 127 {tag:'li', children:[
131 {tag:'table', width:'100%', border:'0', cellpadding:'0', cellspacing:'0', children:[ 128 {tag:'table', width:'100%', border:'0', cellpadding:'0', cellspacing:'0', children:[
132 {tag:'tbody', children:[ 129 {tag:'tbody', children:[
133 {tag:'tr', children:[ 130 {tag:'tr', children:[
134 {tag:'td', rowspan:'2', width:'30', valign:'top', html:'&#160', children:[ 131 {tag:'td', rowspan:'2', width:'30', valign:'top', html:'&#160', children:[
135 {tag:'div', id:this.getId('removeDirectLogin'), children:[ 132 {tag:'div', id:this.getId('removeDirectLogin'), children:[
136 {tag:'div', id:this.getId('removeDirectLoginButton')} 133 {tag:'div', id:this.getId('removeDirectLoginButton')}
137 ]}, 134 ]},
138 {tag:'div', id:this.getId('collapseLink'), cls:'directLoginCollapseLink'} 135 {tag:'div', id:this.getId('collapseLink'), cls:'directLoginCollapseLink'}
139 ]}, 136 ]},
140 {tag:'td', valign:'top', children:[ 137 {tag:'td', valign:'top', children:[
141 {tag:'table', width:'100%', border:'0', cellpadding:'0', cellspacing:'0', children:[ 138 {tag:'table', width:'100%', border:'0', cellpadding:'0', cellspacing:'0', children:[
142 {tag:'tbody', children:[ 139 {tag:'tbody', children:[
143 {tag:'tr', children:[ 140 {tag:'tr', children:[
144 {tag:'td', width:'20', valign:'top', children:[ 141 {tag:'td', width:'20', valign:'top', children:[
145 {tag:'a', href:'#', id:this.getId('directLogin'), children:[ 142 {tag:'a', href:'#', id:this.getId('directLogin'), children:[
146 {tag:'img', id:this.getId('faviconImage'), width:'16', height:'16', src:this.directLogin().fixedFavicon()} 143 {tag:'img', id:this.getId('faviconImage'), width:'16', height:'16', src:this.directLogin().fixedFavicon()}
147 ]} 144 ]}
148 ]}, 145 ]},
149 {tag:'td', valign:'top', children:[ 146 {tag:'td', valign:'top', children:[
150 {tag:'div', cls:'directLoginDetailTitle', children:[ 147 {tag:'div', cls:'directLoginDetailTitle', children:[
151 {tag:'div', id:this.getId('titleViewBox'), children:[ 148 {tag:'div', id:this.getId('titleViewBox'), children:[
152 {tag:'a', href:'#', id:this.getId('titleLink')} 149 {tag:'a', href:'#', id:this.getId('titleLink')}
153 ]}, 150 ]},
154 {tag:'div', id:this.getId('titleEditBox'), children:[ 151 {tag:'div', id:this.getId('titleEditBox'), children:[
155 {tag:'input', type:'text', id:this.getId('titleInput')} 152 {tag:'input', type:'text', id:this.getId('titleInput')}
156 ]} 153 ]}
157 ]} 154 ]}
158 ]} 155 ]}
159 ]} 156 ]}
160 ]} 157 ]}
161 ]} 158 ]}
162 ]} 159 ]}
163 ]}, 160 ]},
164 {tag:'tr', children:[ 161 {tag:'tr', children:[
165 {tag:'td', /*colspan:'2',*/ children:[ 162 {tag:'td', /*colspan:'2',*/ children:[
166 {tag:'div', id:this.getId('details'), children:[ 163 {tag:'div', id:this.getId('details'), children:[
167 {tag:'table', cls:'directLoginBindings', border:'0', cellpadding:'0', cellspacing:'0', children:[ 164 {tag:'table', cls:'directLoginBindings', border:'0', cellpadding:'0', cellspacing:'0', children:[
168 {tag:'tbody', id:this.getId('tbodyBindings'), children:[]} 165 {tag:'tbody', id:this.getId('tbodyBindings'), children:[]}
169 ]} 166 ]}
170 ]} 167 ]}
171 ]} 168 ]}
172 ]} 169 ]}
173 ]} 170 ]}
174 ]} 171 ]}
175 ]} 172 ]}
176 ); 173 );
177 174
178 MochiKit.Signal.connect(this.getId('faviconImage'), 'onload', this, 'handleLoadedFaviconImage'); 175 MochiKit.Signal.connect(this.getId('faviconImage'), 'onload', this, 'handleLoadedFaviconImage');
179 MochiKit.Signal.connect(this.getId('faviconImage'), 'onerror', this.directLogin(), 'handleMissingFaviconImage'); 176 MochiKit.Signal.connect(this.getId('faviconImage'), 'onerror', this.directLogin(), 'handleMissingFaviconImage');
180 MochiKit.Signal.connect(this.getId('faviconImage'), 'onabort', this.directLogin(), 'handleMissingFaviconImage'); 177 MochiKit.Signal.connect(this.getId('faviconImage'), 'onabort', this.directLogin(), 'handleMissingFaviconImage');
181 178
182 this.getElement('removeDirectLogin').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 179 this.getElement('removeDirectLogin').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
183//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 1"); 180//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 1");
184 this.getElement('collapseLink').addClassOnOver('hover'); 181 this.getElement('collapseLink').addClassOnOver('hover');
185 this._collapser = new Clipperz.YUI.Collapser(this.getElement('collapseLink'), this.getElement('details'), true); 182 this._collapser = new Clipperz.YUI.Collapser(this.getElement('collapseLink'), this.getElement('details'), true);
186//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 2"); 183//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 2");
187 MochiKit.Signal.connect(this.getId('directLogin'), 'onclick', this, 'runDirectLogin'); 184 MochiKit.Signal.connect(this.getId('directLogin'), 'onclick', this, 'runDirectLogin');
188 // this.getElement('directLogin').on('click', this.runDirectLogin, this, false); 185 // this.getElement('directLogin').on('click', this.runDirectLogin, this, false);
189//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 3"); 186//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 3");
190 // this.setTitleElement(new Clipperz.PM.Components.TextFormField(this.getElement('title'), { 187 // this.setTitleElement(new Clipperz.PM.Components.TextFormField(this.getElement('title'), {
191 // editMode:this.editMode(), 188 // editMode:this.editMode(),
192 // value:this.directLogin().label() 189 // value:this.directLogin().label()
193 // })); 190 // }));
194 this.getElement('titleViewBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 191 this.getElement('titleViewBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
195 this.getElement('titleEditBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 192 this.getElement('titleEditBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
196 //- this.getElement('titleLink').on('click', this.runDirectLogin, this, false); 193 //- this.getElement('titleLink').on('click', this.runDirectLogin, this, false);
197 MochiKit.Signal.connect(this.getId('titleLink'), 'onclick', this, 'runDirectLogin'); 194 MochiKit.Signal.connect(this.getId('titleLink'), 'onclick', this, 'runDirectLogin');
198 195
199//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 4"); 196//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 4");
200 //- this.setStructureElement(new Clipperz.PM.Components.TextFormField(this.getElement('formStructure'), { 197 //- this.setStructureElement(new Clipperz.PM.Components.TextFormField(this.getElement('formStructure'), {
201 //- editMode:this.editMode(), 198 //- editMode:this.editMode(),
202 //- value:this.formDataValue(), multiline:true 199 //- value:this.formDataValue(), multiline:true
203 //- })); 200 //- }));
204//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 5"); 201//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 5");
205 { 202 {
206 varbindingKey; 203 varbindingKey;
207 var valueName; 204 var valueName;
208 var inputsRequiringAdditionalValues; 205 var inputsRequiringAdditionalValues;
209 var bindingsElement; 206 var bindingsElement;
210 var i,c; 207 var i,c;
211 208
212//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 6"); 209//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 6");
213 this._directLoginBindingComponents = []; 210 this._directLoginBindingComponents = [];
214//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 7"); 211//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 7");
215 bindingsElement = this.getElement('tbodyBindings'); 212 bindingsElement = this.getElement('tbodyBindings');
216//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 8"); 213//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 8");
217 for (bindingKey in this.directLogin().bindings()) { 214 for (bindingKey in this.directLogin().bindings()) {
218 try { 215 try {
219 var directLoginBindingElement; 216 var directLoginBindingElement;
220 var directLoginBindingComponent; 217 var directLoginBindingComponent;
221 218
222//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 9"); 219//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 9");
223 directLoginBindingElement = Clipperz.YUI.DomHelper.append(bindingsElement.dom, {tag:'tr'}, true); 220 directLoginBindingElement = Clipperz.YUI.DomHelper.append(bindingsElement.dom, {tag:'tr'}, true);
224//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 10"); 221//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 10");
225 directLoginBindingComponent =new Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent(directLoginBindingElement, { 222 directLoginBindingComponent =new Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent(directLoginBindingElement, {
226 mainComponent:this, 223 mainComponent:this,
227 directLoginBinding:this.directLogin().bindings()[bindingKey] 224 directLoginBinding:this.directLogin().bindings()[bindingKey]
228 }); 225 });
229//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 11"); 226//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 11");
230 this._directLoginBindingComponents.push(directLoginBindingComponent); 227 this._directLoginBindingComponents.push(directLoginBindingComponent);
231 } catch (e) { 228 } catch (e) {
232 MochiKit.Logging.logError("Error while rendering a DirectLoginBindingComponent - " + e); 229 MochiKit.Logging.logError("Error while rendering a DirectLoginBindingComponent - " + e);
233 } 230 }
234//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 12"); 231//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 12");
235 } 232 }
236//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 13"); 233//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 13");
237 234
238 inputsRequiringAdditionalValues = this.directLogin().inputsRequiringAdditionalValues(); 235 inputsRequiringAdditionalValues = this.directLogin().inputsRequiringAdditionalValues();
239//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 13.1"); 236//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 13.1");
240 for (valueName in inputsRequiringAdditionalValues) { 237 for (valueName in inputsRequiringAdditionalValues) {
241 //- Clipperz.YUI.DomHelper.append(bindingsElement.dom, {tag:'tr', children:[ 238 //- Clipperz.YUI.DomHelper.append(bindingsElement.dom, {tag:'tr', children:[
242 //- {tag:'td', html:valueName}, 239 //- {tag:'td', html:valueName},
243 //- {tag:'td', children:inputsRequiringAdditionalValues[valueName].inputElementConfiguration()} 240 //- {tag:'td', children:inputsRequiringAdditionalValues[valueName].inputElementConfiguration()}
244 //- ]}, true) 241 //- ]}, true)
245 var directLoginValueElement; 242 var directLoginValueElement;
246 var directLoginValueComponent; 243 var directLoginValueComponent;
247 244
248//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 13.2"); 245//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 13.2");
249 directLoginValueElement = Clipperz.YUI.DomHelper.append(bindingsElement.dom, {tag:'tr'}, true); 246 directLoginValueElement = Clipperz.YUI.DomHelper.append(bindingsElement.dom, {tag:'tr'}, true);
250//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 13.3"); 247//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 13.3");
251 directLoginValueComponent =new Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent(directLoginValueElement, { 248 directLoginValueComponent =new Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent(directLoginValueElement, {
252 mainComponent:this, 249 mainComponent:this,
253 directLoginInputValue:inputsRequiringAdditionalValues[valueName] 250 directLoginInputValue:inputsRequiringAdditionalValues[valueName]
254 }); 251 });
255//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 13.4"); 252//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 13.4");
256 this._directLoginBindingComponents.push(directLoginValueComponent); 253 this._directLoginBindingComponents.push(directLoginValueComponent);
257//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 13.5"); 254//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 13.5");
258 } 255 }
259//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 13.6"); 256//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 13.6");
260 } 257 }
261//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 14"); 258//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 14");
262 this.setRemoveButton(new YAHOO.ext.Button(this.getDom('removeDirectLoginButton'), {text:Clipperz.PM.Strings['recordDetailDeleteDirectLoginButtonLabel'], handler:this.removeDirectLogin, scope:this})); 259 this.setRemoveButton(new YAHOO.ext.Button(this.getDom('removeDirectLoginButton'), {text:Clipperz.PM.Strings['recordDetailDeleteDirectLoginButtonLabel'], handler:this.removeDirectLogin, scope:this}));
263//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 15"); 260//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 15");
264 this.update(); 261 this.update();
265 } catch (e) { 262 } catch (e) {
266 MochiKit.Logging.logError("Error while rendering a DirectLoginComponent - " + e); 263 MochiKit.Logging.logError("Error while rendering a DirectLoginComponent - " + e);
267 } 264 }
268//MochiKit.Logging.logDebug("<<< DirectLoginComponent.render"); 265//MochiKit.Logging.logDebug("<<< DirectLoginComponent.render");
269 }, 266 },
270 267
271 //------------------------------------------------------------------------- 268 //-------------------------------------------------------------------------
272 269
273 'collapser': function() { 270 'collapser': function() {
274 return this._collapser; 271 return this._collapser;
275 }, 272 },
276 273
277 //------------------------------------------------------------------------- 274 //-------------------------------------------------------------------------
278 275
279 'handleLoadedFaviconImage': function(anEvent) { 276 'handleLoadedFaviconImage': function(anEvent) {
280 MochiKit.Signal.disconnectAll(anEvent.src()) 277 MochiKit.Signal.disconnectAll(anEvent.src())
281 }, 278 },
282 279
283 //------------------------------------------------------------------------- 280 //-------------------------------------------------------------------------
284 281
285 'update': function() { 282 'update': function() {
286 var i,c; 283 var i,c;
287 var bindingComponents; 284 var bindingComponents;
288 285
289//MochiKit.Logging.logDebug(">>> DirectLoginComponent.update"); 286//MochiKit.Logging.logDebug(">>> DirectLoginComponent.update");
290 bindingComponents = this.directLoginBindingComponents(); 287 bindingComponents = this.directLoginBindingComponents();
291 c = bindingComponents.length; 288 c = bindingComponents.length;
292 for (i=0; i<c; i++) { 289 for (i=0; i<c; i++) {
293 bindingComponents[i].update(); 290 bindingComponents[i].update();
294 } 291 }
295 292
296 Clipperz.PM.Components.RecordDetail.DirectLoginComponent.superclass.update.call(this); 293 Clipperz.PM.Components.RecordDetail.DirectLoginComponent.superclass.update.call(this);
297//MochiKit.Logging.logDebug("<<< DirectLoginComponent.update"); 294//MochiKit.Logging.logDebug("<<< DirectLoginComponent.update");
298 }, 295 },
299 296
300 //------------------------------------------------------------------------- 297 //-------------------------------------------------------------------------
301 298
302 'updateEditMode': function() { 299 'updateEditMode': function() {
303 // this.element().update(""); 300 // this.element().update("");
304 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', style:'border:4px solid red; padding:10px;', children:[ 301 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', style:'border:4px solid red; padding:10px;', children:[
305 // {tag:'div', style:'font-weight:bold;', html:this.directLogin().label()}, 302 // {tag:'div', style:'font-weight:bold;', html:this.directLogin().label()},
306 // {tag:'div', style:'border:1px solid #aaaaaa;', html:Clipperz.Base.serializeJSON(this.directLogin().formData())}, 303 // {tag:'div', style:'border:1px solid #aaaaaa;', html:Clipperz.Base.serializeJSON(this.directLogin().formData())},
307 // {tag:'div', style:'border:1px solid #aaaaaa;', html:Clipperz.Base.serializeJSON(this.directLogin().bindings())} 304 // {tag:'div', style:'border:1px solid #aaaaaa;', html:Clipperz.Base.serializeJSON(this.directLogin().bindings())}
308 // ]}); 305 // ]});
309 306
310 this.getElement('titleEditBox').show(); 307 this.getElement('titleEditBox').show();
311 this.getElement('titleViewBox').hide(); 308 this.getElement('titleViewBox').hide();
312 309
313 this.getDom('titleInput').value = this.directLogin().label(); 310 this.getDom('titleInput').value = this.directLogin().label();
314 311
315//MochiKit.Logging.logDebug(">>> DirectLoginComponent.updateEditMode"); 312//MochiKit.Logging.logDebug(">>> DirectLoginComponent.updateEditMode");
316 this.collapser().expand(); 313 this.collapser().expand();
317 this.getElement('collapseLink').hide(); 314 this.getElement('collapseLink').hide();
318 this.getElement('removeDirectLogin').show(); 315 this.getElement('removeDirectLogin').show();
319 // this.removeButton().show(); 316 // this.removeButton().show();
320//MochiKit.Logging.logDebug("<<< DirectLoginComponent.updateEditMode"); 317//MochiKit.Logging.logDebug("<<< DirectLoginComponent.updateEditMode");
321 }, 318 },
322 319
323 //------------------------------------------------------------------------- 320 //-------------------------------------------------------------------------
324 321
325 'updateViewMode': function() { 322 'updateViewMode': function() {
326//MochiKit.Logging.logDebug(">>> DirectLoginComponent.updateViewMode"); 323//MochiKit.Logging.logDebug(">>> DirectLoginComponent.updateViewMode");
327 this.getElement('titleEditBox').hide(); 324 this.getElement('titleEditBox').hide();
328 this.getElement('titleViewBox').show(); 325 this.getElement('titleViewBox').show();
329 this.getElement('titleLink').update(this.directLogin().label()); 326 this.getElement('titleLink').update(this.directLogin().label());
330 327
331 this.getElement('collapseLink').show(); 328 this.getElement('collapseLink').show();
332 this.getElement('removeDirectLogin').hide(); 329 this.getElement('removeDirectLogin').hide();
333 // this.removeButton().hide(); 330 // this.removeButton().hide();
334//MochiKit.Logging.logDebug("<<< DirectLoginComponent.updateViewMode"); 331//MochiKit.Logging.logDebug("<<< DirectLoginComponent.updateViewMode");
335 }, 332 },
336 333
337 //------------------------------------------------------------------------- 334 //-------------------------------------------------------------------------
338 335
339 'synchronizeComponentValues': function() { 336 'synchronizeComponentValues': function() {
340//MochiKit.Logging.logDebug(">>> DirectLoginComponent.syncronizeComponentValues"); 337//MochiKit.Logging.logDebug(">>> DirectLoginComponent.syncronizeComponentValues");
341 this.directLogin().setLabel(this.getDom('titleInput').value); 338 this.directLogin().setLabel(this.getDom('titleInput').value);
342 // this.setFormDataValue(this.structureElement().value()); 339 // this.setFormDataValue(this.structureElement().value());
343 340
344 MochiKit.Iter.forEach(this.directLoginBindingComponents(), MochiKit.Base.methodcaller('synchronizeComponentValues')); 341 MochiKit.Iter.forEach(this.directLoginBindingComponents(), MochiKit.Base.methodcaller('synchronizeComponentValues'));
345//MochiKit.Logging.logDebug("<<< DirectLoginComponent.syncronizeComponentValues"); 342//MochiKit.Logging.logDebug("<<< DirectLoginComponent.syncronizeComponentValues");
346 }, 343 },
347 344
348 //------------------------------------------------------------------------- 345 //-------------------------------------------------------------------------
349 346
350 'runDirectLogin': function(anEvent) { 347 'runDirectLogin': function(anEvent) {
351//MochiKit.Logging.logDebug("--- DirectLoginComponent.runDirectLogin - 1"); 348//MochiKit.Logging.logDebug("--- DirectLoginComponent.runDirectLogin - 1");
352//MochiKit.Logging.logDebug("--- DirectLoginComponent.runDirectLogin - 1 anEvent: " + anEvent); 349//MochiKit.Logging.logDebug("--- DirectLoginComponent.runDirectLogin - 1 anEvent: " + anEvent);
353 anEvent.stop(); 350 anEvent.stop();
354//MochiKit.Logging.logDebug("--- DirectLoginComponent.runDirectLogin - 2"); 351//MochiKit.Logging.logDebug("--- DirectLoginComponent.runDirectLogin - 2");
355 this.directLogin().runDirectLogin(); 352 this.directLogin().runDirectLogin();
356//MochiKit.Logging.logDebug("--- DirectLoginComponent.runDirectLogin - 3"); 353//MochiKit.Logging.logDebug("--- DirectLoginComponent.runDirectLogin - 3");
357 }, 354 },
358 355
359 //------------------------------------------------------------------------- 356 //-------------------------------------------------------------------------
360 __syntaxFix__: "syntax fix" 357 __syntaxFix__: "syntax fix"
361}); 358});
362 359
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js
index e70229b..d210100 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js
@@ -1,257 +1,254 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent = function(anElement, args) { 33Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent = function(anElement, args) {
37//MochiKit.Logging.logDebug(">>> new DirectLoginValueComponent"); 34//MochiKit.Logging.logDebug(">>> new DirectLoginValueComponent");
38 args = args || {}; 35 args = args || {};
39 36
40 Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent.superclass.constructor.call(this, anElement, args); 37 Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent.superclass.constructor.call(this, anElement, args);
41 38
42 this._directLoginInputValue = args.directLoginInputValue || null; 39 this._directLoginInputValue = args.directLoginInputValue || null;
43 this._value = this.directLoginInputValue().directLogin().formValues()[this.directLoginInputValue().name()]; 40 this._value = this.directLoginInputValue().directLogin().formValues()[this.directLoginInputValue().name()];
44 41
45 this.render(); 42 this.render();
46//MochiKit.Logging.logDebug("<<< new DirectLoginValueComponent - record: " + this.record()); 43//MochiKit.Logging.logDebug("<<< new DirectLoginValueComponent - record: " + this.record());
47 44
48 return this; 45 return this;
49} 46}
50 47
51//============================================================================= 48//=============================================================================
52 49
53YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 50YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
54 51
55 'toString': function() { 52 'toString': function() {
56 return "Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent component - " + this.directLoginInputValue().name(); 53 return "Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent component - " + this.directLoginInputValue().name();
57 }, 54 },
58 55
59 //------------------------------------------------------------------------- 56 //-------------------------------------------------------------------------
60 57
61 'directLoginInputValue': function() { 58 'directLoginInputValue': function() {
62 return this._directLoginInputValue; 59 return this._directLoginInputValue;
63 }, 60 },
64 61
65 //------------------------------------------------------------------------- 62 //-------------------------------------------------------------------------
66 63
67 'render': function() { 64 'render': function() {
68//MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.render"); 65//MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.render");
69 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginDataLabelTD', children:[ 66 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginDataLabelTD', children:[
70 {tag:'span', html:this.directLoginInputValue().name()} 67 {tag:'span', html:this.directLoginInputValue().name()}
71 ]}); 68 ]});
72//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.render - 1"); 69//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.render - 1");
73 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginDataValueTD', children:[ 70 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginDataValueTD', children:[
74 {tag:'span', id:this.getId('inputElement')} 71 {tag:'span', id:this.getId('inputElement')}
75 ]}); 72 ]});
76//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.render - 2"); 73//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.render - 2");
77 this.update(); 74 this.update();
78//MochiKit.Logging.logDebug("<<< DirectLoginValueComponent.render"); 75//MochiKit.Logging.logDebug("<<< DirectLoginValueComponent.render");
79 }, 76 },
80 77
81 //------------------------------------------------------------------------- 78 //-------------------------------------------------------------------------
82 79
83 'inputElementConfiguration': function() { 80 'inputElementConfiguration': function() {
84 var result; 81 var result;
85 var currentValue; 82 var currentValue;
86 83
87//MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.inputElementConfiguration - " + this.directLoginInputValue().name()); 84//MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.inputElementConfiguration - " + this.directLoginInputValue().name());
88 result = []; 85 result = [];
89 currentValue = this.value(); 86 currentValue = this.value();
90 87
91 switch (this.directLoginInputValue().type()) { 88 switch (this.directLoginInputValue().type()) {
92 case 'checkbox': 89 case 'checkbox':
93 var checkbox; 90 var checkbox;
94//{"type":"checkbox", "name":"rememberUsernameChk", "value":"checkbox"} 91//{"type":"checkbox", "name":"rememberUsernameChk", "value":"checkbox"}
95 checkbox = {tag:'input', id:this.getId('checkbox'), type:'checkbox'} 92 checkbox = {tag:'input', id:this.getId('checkbox'), type:'checkbox'}
96 if (currentValue == true) { 93 if (currentValue == true) {
97 checkbox.checked = true; 94 checkbox.checked = true;
98 } 95 }
99 result.push(checkbox); 96 result.push(checkbox);
100 break; 97 break;
101 98
102 case 'select': 99 case 'select':
103 var input; 100 var input;
104//{"type":"select", "name":"DOMAIN", "options":[{"selected":true, "label":"@tin.it", "value":"tin.it"}, {"selected":false, "label":"@virgilio.it", "value":"virgilio.it"}]} 101//{"type":"select", "name":"DOMAIN", "options":[{"selected":true, "label":"@tin.it", "value":"tin.it"}, {"selected":false, "label":"@virgilio.it", "value":"virgilio.it"}]}
105 input = {tag:'select', id:this.getId('select'), name:this.directLoginInputValue().name(), children:[]}; 102 input = {tag:'select', id:this.getId('select'), name:this.directLoginInputValue().name(), children:[]};
106 input.children.push({tag:'option', value:null, html:"---"}); 103 input.children.push({tag:'option', value:null, html:"---"});
107 MochiKit.Iter.forEach(this.directLoginInputValue().args()['options'], function(anOption) { 104 MochiKit.Iter.forEach(this.directLoginInputValue().args()['options'], function(anOption) {
108 var option; 105 var option;
109 106
110 //TODO: remove the value: field and replace it with element.dom.value = <some value> 107 //TODO: remove the value: field and replace it with element.dom.value = <some value>
111 option = {tag:'option', value:anOption['value'], html:anOption['label']} 108 option = {tag:'option', value:anOption['value'], html:anOption['label']}
112 if (currentValue == anOption['value']) { 109 if (currentValue == anOption['value']) {
113 option.selected = true; 110 option.selected = true;
114 } 111 }
115 input.children.push(option); 112 input.children.push(option);
116 }) 113 })
117 result.push(input); 114 result.push(input);
118 break; 115 break;
119 116
120 case 'radio': 117 case 'radio':
121 var name; 118 var name;
122 var radioBox; 119 var radioBox;
123 120
124//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3"); 121//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3");
125 name = this.getId(this.directLoginInputValue().name()); 122 name = this.getId(this.directLoginInputValue().name());
126 radioBox = {tag:'div', id:this.getId('radioBox'), children:[]}; 123 radioBox = {tag:'div', id:this.getId('radioBox'), children:[]};
127 result.push(radioBox); 124 result.push(radioBox);
128//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1 - options.length: " + this.directLoginInputValue().args()['options'].length); 125//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1 - options.length: " + this.directLoginInputValue().args()['options'].length);
129//{"name":"dominio", "type":"radio", "options":[{"value":"@alice.it", "checked":true}, {"value":"@tin.it", "checked":false}, {"value":"@virgilio.it", "checked":false}, {"value":"@tim.it", "checked":false}]} 126//{"name":"dominio", "type":"radio", "options":[{"value":"@alice.it", "checked":true}, {"value":"@tin.it", "checked":false}, {"value":"@virgilio.it", "checked":false}, {"value":"@tim.it", "checked":false}]}
130 127
131 MochiKit.Iter.forEach(this.directLoginInputValue().args()['options'], function(anOption) { 128 MochiKit.Iter.forEach(this.directLoginInputValue().args()['options'], function(anOption) {
132 varradio; 129 varradio;
133 130
134//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1.1"); 131//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1.1");
135 //TODO: remove the value: field and replace it with element.dom.value = <some value> 132 //TODO: remove the value: field and replace it with element.dom.value = <some value>
136 radio = {tag:'input', type:'radio', name:name, value:anOption['value']}; 133 radio = {tag:'input', type:'radio', name:name, value:anOption['value']};
137//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1.2"); 134//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1.2");
138 if (currentValue == anOption['value']) { 135 if (currentValue == anOption['value']) {
139//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1.3"); 136//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1.3");
140 radio.checked = true; 137 radio.checked = true;
141//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1.4"); 138//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1.4");
142 } 139 }
143//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1.5"); 140//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1.5");
144 radioBox.children.push({tag:'div', children:[ radio, {tag:'span', html:anOption['value']} ]}) 141 radioBox.children.push({tag:'div', children:[ radio, {tag:'span', html:anOption['value']} ]})
145//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1.6"); 142//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1.6");
146 }) 143 })
147//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.2"); 144//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.2");
148 break; 145 break;
149 } 146 }
150//MochiKit.Logging.logDebug("<<< DirectLoginValueComponent.inputElementConfiguration"); 147//MochiKit.Logging.logDebug("<<< DirectLoginValueComponent.inputElementConfiguration");
151 148
152 return result; 149 return result;
153 }, 150 },
154 151
155 //------------------------------------------------------------------------- 152 //-------------------------------------------------------------------------
156 153
157 'inputValue': function() { 154 'inputValue': function() {
158 var result; 155 var result;
159 156
160 switch (this.directLoginInputValue().type()) { 157 switch (this.directLoginInputValue().type()) {
161 case 'checkbox': 158 case 'checkbox':
162 result = this.getDom('checkbox').checked; 159 result = this.getDom('checkbox').checked;
163 break; 160 break;
164 case 'select': 161 case 'select':
165 result = this.getDom('select').value; 162 result = this.getDom('select').value;
166 break; 163 break;
167 case 'radio': 164 case 'radio':
168 var checkedRadioButtons; 165 var checkedRadioButtons;
169 166
170 checkedRadioButtons = MochiKit.Base.filter(function(aRadioButton) { return aRadioButton.dom.checked }, 167 checkedRadioButtons = MochiKit.Base.filter(function(aRadioButton) { return aRadioButton.dom.checked },
171 this.getElement('radioBox').getChildrenByTagName('input')); 168 this.getElement('radioBox').getChildrenByTagName('input'));
172 169
173 if (checkedRadioButtons.length == 0) { 170 if (checkedRadioButtons.length == 0) {
174 result = null; 171 result = null;
175 } else { 172 } else {
176 result = checkedRadioButtons[0].dom.value; 173 result = checkedRadioButtons[0].dom.value;
177 } 174 }
178 break; 175 break;
179 } 176 }
180 177
181 return result; 178 return result;
182 }, 179 },
183 180
184 //------------------------------------------------------------------------- 181 //-------------------------------------------------------------------------
185 182
186 'value': function() { 183 'value': function() {
187 return this._value; 184 return this._value;
188 }, 185 },
189 186
190 'setValue': function(aValue) { 187 'setValue': function(aValue) {
191 this._value = aValue; 188 this._value = aValue;
192 }, 189 },
193 190
194 //------------------------------------------------------------------------- 191 //-------------------------------------------------------------------------
195 192
196 'updateEditMode': function() { 193 'updateEditMode': function() {
197//MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.updateEditMode - " + this); 194//MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.updateEditMode - " + this);
198 this.getElement('inputElement').update(""); 195 this.getElement('inputElement').update("");
199//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.updateEditMode - 1"); 196//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.updateEditMode - 1");
200 Clipperz.YUI.DomHelper.append(this.getDom('inputElement'), {tag:'div', children:this.inputElementConfiguration()}); 197 Clipperz.YUI.DomHelper.append(this.getDom('inputElement'), {tag:'div', children:this.inputElementConfiguration()});
201//MochiKit.Logging.logDebug("<<< DirectLoginValueComponent.updateEditMode"); 198//MochiKit.Logging.logDebug("<<< DirectLoginValueComponent.updateEditMode");
202 }, 199 },
203 200
204 //------------------------------------------------------------------------- 201 //-------------------------------------------------------------------------
205 202
206 'updateViewMode': function() { 203 'updateViewMode': function() {
207//MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.updateViewMode"); 204//MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.updateViewMode");
208 // this.getElement('inputElement').update(this.directLoginInputValue().value()); 205 // this.getElement('inputElement').update(this.directLoginInputValue().value());
209 206
210 this.getElement('inputElement').update(""); 207 this.getElement('inputElement').update("");
211 208
212 switch (this.directLoginInputValue().type()) { 209 switch (this.directLoginInputValue().type()) {
213 case 'checkbox': 210 case 'checkbox':
214 if (this.value() == true) { 211 if (this.value() == true) {
215 this.getElement('inputElement').update(Clipperz.PM.Strings['directLoginConfigurationCheckBoxFieldSelectedValue']); 212 this.getElement('inputElement').update(Clipperz.PM.Strings['directLoginConfigurationCheckBoxFieldSelectedValue']);
216 } else { 213 } else {
217 this.getElement('inputElement').update(Clipperz.PM.Strings['directLoginConfigurationCheckBoxFieldNotSelectedValue']) 214 this.getElement('inputElement').update(Clipperz.PM.Strings['directLoginConfigurationCheckBoxFieldNotSelectedValue'])
218 } 215 }
219 break; 216 break;
220 case 'select': 217 case 'select':
221 var displayedValue; 218 var displayedValue;
222 var selectedOptions; 219 var selectedOptions;
223 var currentValue; 220 var currentValue;
224 221
225 currentValue = this.value(); 222 currentValue = this.value();
226 selectedOptions = MochiKit.Base.filter(function(anOption) { return (anOption['value'] == currentValue); }, 223 selectedOptions = MochiKit.Base.filter(function(anOption) { return (anOption['value'] == currentValue); },
227 this.directLoginInputValue().args()['options']); 224 this.directLoginInputValue().args()['options']);
228 if (selectedOptions.length == 0) { 225 if (selectedOptions.length == 0) {
229 displayedValue = "---"; 226 displayedValue = "---";
230 } else { 227 } else {
231//MochiKit.Logging.logDebug("+++ " + Clipperz.Base.serializeJSON(selectedOptions)); 228//MochiKit.Logging.logDebug("+++ " + Clipperz.Base.serializeJSON(selectedOptions));
232//MochiKit.Logging.logDebug("*** " + Clipperz.Base.serializeJSON(selectedOptions[0])); 229//MochiKit.Logging.logDebug("*** " + Clipperz.Base.serializeJSON(selectedOptions[0]));
233 displayedValue = selectedOptions[0]['label']; 230 displayedValue = selectedOptions[0]['label'];
234 } 231 }
235 this.getElement('inputElement').update(displayedValue); 232 this.getElement('inputElement').update(displayedValue);
236 break; 233 break;
237 case 'radio': 234 case 'radio':
238 this.getElement('inputElement').update(this.value()); 235 this.getElement('inputElement').update(this.value());
239 break; 236 break;
240 } 237 }
241//MochiKit.Logging.logDebug("<<< DirectLoginValueComponent.updateViewMode"); 238//MochiKit.Logging.logDebug("<<< DirectLoginValueComponent.updateViewMode");
242 }, 239 },
243 240
244 //------------------------------------------------------------------------- 241 //-------------------------------------------------------------------------
245 242
246 'synchronizeComponentValues': function() { 243 'synchronizeComponentValues': function() {
247//MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.synchronizeComponentValues"); 244//MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.synchronizeComponentValues");
248//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.synchronizeComponentValues - 1; value: " + this.inputValue()); 245//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.synchronizeComponentValues - 1; value: " + this.inputValue());
249 this.setValue(this.inputValue()); 246 this.setValue(this.inputValue());
250 this.directLoginInputValue().directLogin().formValues()[this.directLoginInputValue().name()] = this.value(); 247 this.directLoginInputValue().directLogin().formValues()[this.directLoginInputValue().name()] = this.value();
251//MochiKit.Logging.logDebug("<<< DirectLoginValueComponent.synchronizeComponentValues"); 248//MochiKit.Logging.logDebug("<<< DirectLoginValueComponent.synchronizeComponentValues");
252 }, 249 },
253 250
254 //------------------------------------------------------------------------- 251 //-------------------------------------------------------------------------
255 __syntaxFix__: "syntax fix" 252 __syntaxFix__: "syntax fix"
256}); 253});
257 254
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js
index 3292a95..1396bd8 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js
@@ -1,199 +1,196 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Components.RecordDetail.DirectLoginsComponent = function(anElement, args) { 33Clipperz.PM.Components.RecordDetail.DirectLoginsComponent = function(anElement, args) {
37//MochiKit.Logging.logDebug(">>> new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent"); 34//MochiKit.Logging.logDebug(">>> new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent");
38 args = args || {}; 35 args = args || {};
39 36
40//MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 0"); 37//MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 0");
41 Clipperz.PM.Components.RecordDetail.DirectLoginsComponent.superclass.constructor.call(this, anElement, args); 38 Clipperz.PM.Components.RecordDetail.DirectLoginsComponent.superclass.constructor.call(this, anElement, args);
42//MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 1"); 39//MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 1");
43 40
44 this._addDirectLoginButton = null; 41 this._addDirectLoginButton = null;
45 42
46//MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 2"); 43//MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 2");
47 this.mainComponent().addEditComponent(this); 44 this.mainComponent().addEditComponent(this);
48//MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 3"); 45//MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 3");
49 this.render(); 46 this.render();
50//MochiKit.Logging.logDebug("<<< new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent"); 47//MochiKit.Logging.logDebug("<<< new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent");
51 48
52 return this; 49 return this;
53} 50}
54 51
55//============================================================================= 52//=============================================================================
56 53
57YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginsComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 54YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginsComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
58 55
59 'toString': function() { 56 'toString': function() {
60 return "Clipperz.PM.Components.RecordDetail.DirectLoginsComponent component"; 57 return "Clipperz.PM.Components.RecordDetail.DirectLoginsComponent component";
61 }, 58 },
62 59
63 //------------------------------------------------------------------------- 60 //-------------------------------------------------------------------------
64 61
65 'addDirectLoginButton': function() { 62 'addDirectLoginButton': function() {
66 return this._addDirectLoginButton; 63 return this._addDirectLoginButton;
67 }, 64 },
68 65
69 'setAddDirectLoginButton': function(aValue) { 66 'setAddDirectLoginButton': function(aValue) {
70 this._addDirectLoginButton = aValue; 67 this._addDirectLoginButton = aValue;
71 }, 68 },
72 69
73 //------------------------------------------------------------------------- 70 //-------------------------------------------------------------------------
74 71
75 'render': function() { 72 'render': function() {
76 this.element().update(""); 73 this.element().update("");
77 74
78 Clipperz.YUI.DomHelper.append(this.element().dom, 75 Clipperz.YUI.DomHelper.append(this.element().dom,
79 {tag:'div', cls:'directLoginsRecordBox', children:[ 76 {tag:'div', cls:'directLoginsRecordBox', children:[
80 {tag:'h3', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockTitle']}, 77 {tag:'h3', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockTitle']},
81 {tag:'ul', id:this.getId('directLogins')}, 78 {tag:'ul', id:this.getId('directLogins')},
82 79
83 {tag:'div', cls:'addDirectLoginBox', id:this.getId('addDirectLogin'), children:[ 80 {tag:'div', cls:'addDirectLoginBox', id:this.getId('addDirectLogin'), children:[
84 {tag:'div', cls:'addDirectLoginBoxContent', children:[ 81 {tag:'div', cls:'addDirectLoginBoxContent', children:[
85 {tag:'div', cls:'bookmarkletConfiguration', children:[ 82 {tag:'div', cls:'bookmarkletConfiguration', children:[
86 // {tag:'span', htmlString:Clipperz.PM.Strings['newRecordWizardBookmarkletConfigurationLabel']}, 83 // {tag:'span', htmlString:Clipperz.PM.Strings['newRecordWizardBookmarkletConfigurationLabel']},
87 {tag:'div', htmlString:Clipperz.PM.Strings['recordDetailNewDirectLoginDescription']}, 84 {tag:'div', htmlString:Clipperz.PM.Strings['recordDetailNewDirectLoginDescription']},
88 {tag:'textarea', id:this.getId('addDirectLoginTextarea')} 85 {tag:'textarea', id:this.getId('addDirectLoginTextarea')}
89 ]}, 86 ]},
90 {tag:'div', id:this.getId('addDirectLoginButton')} 87 {tag:'div', id:this.getId('addDirectLoginButton')}
91 ]} 88 ]}
92 ]} 89 ]}
93 ]} 90 ]}
94 ); 91 );
95 92
96 if (MochiKit.Base.keys(this.record().directLogins()).length == 0) { 93 if (MochiKit.Base.keys(this.record().directLogins()).length == 0) {
97//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 3"); 94//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 3");
98 Clipperz.YUI.DomHelper.append(this.getElement('directLogins'), 95 Clipperz.YUI.DomHelper.append(this.getElement('directLogins'),
99 {tag:'li', children:[ 96 {tag:'li', children:[
100 // {tag:'span', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockNoDirectLoginConfiguredLabel']} 97 // {tag:'span', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockNoDirectLoginConfiguredLabel']}
101 {tag:'div', cls:'recordDetailNoDirectLoginDescriptionBox', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription']} 98 {tag:'div', cls:'recordDetailNoDirectLoginDescriptionBox', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription']}
102 ]} 99 ]}
103 ); 100 );
104//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 4"); 101//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 4");
105 } else { 102 } else {
106//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 5"); 103//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 5");
107 for (directLoginReference in this.record().directLogins()) { 104 for (directLoginReference in this.record().directLogins()) {
108//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 6"); 105//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 6");
109 this.addDirectLogin(this.record().directLogins()[directLoginReference]); 106 this.addDirectLogin(this.record().directLogins()[directLoginReference]);
110//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 7"); 107//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 7");
111 } 108 }
112//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 8"); 109//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 8");
113 } 110 }
114//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 9"); 111//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 9");
115 112
116 this.setAddDirectLoginButton(new YAHOO.ext.Button(this.getDom('addDirectLoginButton'), { 113 this.setAddDirectLoginButton(new YAHOO.ext.Button(this.getDom('addDirectLoginButton'), {
117 text:Clipperz.PM.Strings['recordDetailAddNewDirectLoginButtonLabel'], 114 text:Clipperz.PM.Strings['recordDetailAddNewDirectLoginButtonLabel'],
118 handler:this.addNewDirectLogin, 115 handler:this.addNewDirectLogin,
119 scope:this 116 scope:this
120 })); 117 }));
121 MochiKit.Signal.connect(this.getId('addDirectLoginTextarea'), 'onkeydown', this, 'onkeydown'); 118 MochiKit.Signal.connect(this.getId('addDirectLoginTextarea'), 'onkeydown', this, 'onkeydown');
122//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 11"); 119//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 11");
123 120
124 this.update(); 121 this.update();
125//MochiKit.Logging.logDebug("<<< DirectLoginsComponent.render"); 122//MochiKit.Logging.logDebug("<<< DirectLoginsComponent.render");
126 }, 123 },
127 124
128 //------------------------------------------------------------------------- 125 //-------------------------------------------------------------------------
129 126
130 'addDirectLogin': function(aDirectLogin) { 127 'addDirectLogin': function(aDirectLogin) {
131//MochiKit.Logging.logDebug(">>> DirectLoginsComponent.addDirectLogin"); 128//MochiKit.Logging.logDebug(">>> DirectLoginsComponent.addDirectLogin");
132 new Clipperz.PM.Components.RecordDetail.DirectLoginComponent( 129 new Clipperz.PM.Components.RecordDetail.DirectLoginComponent(
133 Clipperz.YUI.DomHelper.append(this.getDom('directLogins'), {tag:'div'}, true), 130 Clipperz.YUI.DomHelper.append(this.getDom('directLogins'), {tag:'div'}, true),
134 { 131 {
135 mainComponent:this.mainComponent(), 132 mainComponent:this.mainComponent(),
136 directLogin:aDirectLogin 133 directLogin:aDirectLogin
137 } 134 }
138 ); 135 );
139//MochiKit.Logging.logDebug("<<< DirectLoginsComponent.addDirectLogin"); 136//MochiKit.Logging.logDebug("<<< DirectLoginsComponent.addDirectLogin");
140 }, 137 },
141 138
142 //------------------------------------------------------------------------- 139 //-------------------------------------------------------------------------
143 140
144 'addNewDirectLogin': function() { 141 'addNewDirectLogin': function() {
145 varnewDirectLogin; 142 varnewDirectLogin;
146 varconfiguration; 143 varconfiguration;
147 144
148//MochiKit.Logging.logDebug(">>> DirectLoginsComponent.addNewDirectLogin"); 145//MochiKit.Logging.logDebug(">>> DirectLoginsComponent.addNewDirectLogin");
149 if (MochiKit.Base.keys(this.record().directLogins()).length == 0) { 146 if (MochiKit.Base.keys(this.record().directLogins()).length == 0) {
150 this.getElement('directLogins').update(""); 147 this.getElement('directLogins').update("");
151 } 148 }
152 149
153 this.mainComponent().synchronizeComponentValues(); 150 this.mainComponent().synchronizeComponentValues();
154 151
155 this.mainComponent().exitModalView(); 152 this.mainComponent().exitModalView();
156 configuration = Clipperz.PM.BookmarkletProcessor.checkBookmarkletConfiguration( 153 configuration = Clipperz.PM.BookmarkletProcessor.checkBookmarkletConfiguration(
157 this.getDom('addDirectLoginTextarea').value, 154 this.getDom('addDirectLoginTextarea').value,
158 this.getDom('addDirectLoginButton'), 155 this.getDom('addDirectLoginButton'),
159 MochiKit.Base.method(this.mainComponent(), 'enterModalView') 156 MochiKit.Base.method(this.mainComponent(), 'enterModalView')
160 ); 157 );
161 this.mainComponent().enterModalView(); 158 this.mainComponent().enterModalView();
162 159
163 newDirectLogin = new Clipperz.PM.DataModel.DirectLogin({record:this.record(), 160 newDirectLogin = new Clipperz.PM.DataModel.DirectLogin({record:this.record(),
164 label:configuration['page']['title'], 161 label:configuration['page']['title'],
165 bookmarkletVersion:'0.2', 162 bookmarkletVersion:'0.2',
166 // bookmarkletVersion:configuration['version'], 163 // bookmarkletVersion:configuration['version'],
167 formData:configuration['form']}); 164 formData:configuration['form']});
168 this.record().addDirectLogin(newDirectLogin); 165 this.record().addDirectLogin(newDirectLogin);
169 this.addDirectLogin(newDirectLogin); 166 this.addDirectLogin(newDirectLogin);
170 this.getDom('addDirectLoginTextarea').value = ""; 167 this.getDom('addDirectLoginTextarea').value = "";
171//MochiKit.Logging.logDebug("<<< DirectLoginsComponent.addNewDirectLogin"); 168//MochiKit.Logging.logDebug("<<< DirectLoginsComponent.addNewDirectLogin");
172 }, 169 },
173 170
174 //------------------------------------------------------------------------- 171 //-------------------------------------------------------------------------
175 172
176 'updateViewMode': function() { 173 'updateViewMode': function() {
177 this.getElement('addDirectLogin').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 174 this.getElement('addDirectLogin').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
178 this.getElement('addDirectLogin').hide(); 175 this.getElement('addDirectLogin').hide();
179 }, 176 },
180 177
181 //------------------------------------------------------------------------- 178 //-------------------------------------------------------------------------
182 179
183 'updateEditMode': function() { 180 'updateEditMode': function() {
184 this.getElement('addDirectLogin').show(); 181 this.getElement('addDirectLogin').show();
185 }, 182 },
186 183
187 //------------------------------------------------------------------------- 184 //-------------------------------------------------------------------------
188 185
189 'onkeydown': function(anEvent) { 186 'onkeydown': function(anEvent) {
190//MochiKit.Logging.logDebug(">>> onkeydown - " + anEvent.src().id + ": " + anEvent.key().code); 187//MochiKit.Logging.logDebug(">>> onkeydown - " + anEvent.src().id + ": " + anEvent.key().code);
191 if (anEvent.key().code == 13) { 188 if (anEvent.key().code == 13) {
192 this.addNewDirectLogin(); 189 this.addNewDirectLogin();
193 } 190 }
194 }, 191 },
195 192
196 //------------------------------------------------------------------------- 193 //-------------------------------------------------------------------------
197 __syntaxFix__: "syntax fix" 194 __syntaxFix__: "syntax fix"
198}); 195});
199 196
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js
index 9e1d56a..b79c365 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js
@@ -1,117 +1,114 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Components.RecordDetail.FieldButtonComponent = function(anElement, args) { 33Clipperz.PM.Components.RecordDetail.FieldButtonComponent = function(anElement, args) {
37 args = args || {}; 34 args = args || {};
38 35
39 Clipperz.PM.Components.RecordDetail.FieldButtonComponent.superclass.constructor.call(this, anElement, args); 36 Clipperz.PM.Components.RecordDetail.FieldButtonComponent.superclass.constructor.call(this, anElement, args);
40 37
41 this._button = null; 38 this._button = null;
42 39
43 this.render(); 40 this.render();
44 41
45 return this; 42 return this;
46} 43}
47 44
48//============================================================================= 45//=============================================================================
49 46
50YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldButtonComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { 47YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldButtonComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, {
51 48
52 'toString': function() { 49 'toString': function() {
53 return "Clipperz.PM.Components.RecordDetail.FieldButtonComponent"; 50 return "Clipperz.PM.Components.RecordDetail.FieldButtonComponent";
54 }, 51 },
55 52
56 //------------------------------------------------------------------------- 53 //-------------------------------------------------------------------------
57 54
58 'buttonText': function() { 55 'buttonText': function() {
59 varresult; 56 varresult;
60 57
61 if (this.recordField() == null) { 58 if (this.recordField() == null) {
62 //TODO: this is never used. It is just an obsolete legacy chunk of code 59 //TODO: this is never used. It is just an obsolete legacy chunk of code
63 result = Clipperz.PM.Strings['recordDetailAddFieldButtonLabel']; 60 result = Clipperz.PM.Strings['recordDetailAddFieldButtonLabel'];
64 } else { 61 } else {
65 result = Clipperz.PM.Strings['recordDetailRemoveFieldButtonLabel']; 62 result = Clipperz.PM.Strings['recordDetailRemoveFieldButtonLabel'];
66 } 63 }
67 64
68 return result; 65 return result;
69 }, 66 },
70 67
71 //------------------------------------------------------------------------- 68 //-------------------------------------------------------------------------
72 69
73 'button': function() { 70 'button': function() {
74 return this._button; 71 return this._button;
75 }, 72 },
76 73
77 'setButton': function(aValue) { 74 'setButton': function(aValue) {
78 this._button = aValue; 75 this._button = aValue;
79 }, 76 },
80 77
81 //------------------------------------------------------------------------- 78 //-------------------------------------------------------------------------
82 79
83 'render': function() { 80 'render': function() {
84 this.element().update(""); 81 this.element().update("");
85 82
86 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('button')}) 83 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('button')})
87 this.setButton(new YAHOO.ext.Button(this.getDom('button'), {text:this.buttonText(), handler:this.handleButtonClick, scope:this})); 84 this.setButton(new YAHOO.ext.Button(this.getDom('button'), {text:this.buttonText(), handler:this.handleButtonClick, scope:this}));
88 85
89 this.update(); 86 this.update();
90 }, 87 },
91 88
92 //------------------------------------------------------------------------- 89 //-------------------------------------------------------------------------
93 90
94 'handleButtonClick': function() { 91 'handleButtonClick': function() {
95 if (this.recordField() == null) { 92 if (this.recordField() == null) {
96 this.mainComponent().addNewField(); 93 this.mainComponent().addNewField();
97 } else { 94 } else {
98 this.mainComponent().removeField(this.fieldComponent()); 95 this.mainComponent().removeField(this.fieldComponent());
99 } 96 }
100 }, 97 },
101 98
102 //------------------------------------------------------------------------- 99 //-------------------------------------------------------------------------
103 100
104 'updateEditMode': function() { 101 'updateEditMode': function() {
105 this.button().show(); 102 this.button().show();
106 }, 103 },
107 104
108 //------------------------------------------------------------------------- 105 //-------------------------------------------------------------------------
109 106
110 'updateViewMode': function() { 107 'updateViewMode': function() {
111 this.button().hide(); 108 this.button().hide();
112 }, 109 },
113 110
114 //------------------------------------------------------------------------- 111 //-------------------------------------------------------------------------
115 __syntaxFix__: "syntax fix" 112 __syntaxFix__: "syntax fix"
116}); 113});
117 114
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js
index c2d947e..978a54e 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js
@@ -1,189 +1,186 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Components.RecordDetail.FieldComponent = function(anElement, args) { 33Clipperz.PM.Components.RecordDetail.FieldComponent = function(anElement, args) {
37//MochiKit.Logging.logDebug(">>> new FieldComponent"); 34//MochiKit.Logging.logDebug(">>> new FieldComponent");
38 args = args || {}; 35 args = args || {};
39 36
40 Clipperz.PM.Components.RecordDetail.FieldComponent.superclass.constructor.call(this, anElement, args); 37 Clipperz.PM.Components.RecordDetail.FieldComponent.superclass.constructor.call(this, anElement, args);
41 38
42 this._element = anElement; 39 this._element = anElement;
43 this._recordField = args.recordField || null; 40 this._recordField = args.recordField || null;
44 41
45 this._buttonComponent = null; 42 this._buttonComponent = null;
46 this._labelComponent = null; 43 this._labelComponent = null;
47 this._dragHandler = null; 44 this._dragHandler = null;
48 this._valueComponent = null; 45 this._valueComponent = null;
49 this._typeComponent = null; 46 this._typeComponent = null;
50 47
51 this.mainComponent().addEditComponent(this); 48 this.mainComponent().addEditComponent(this);
52 49
53 this.render(); 50 this.render();
54 51
55 return this; 52 return this;
56} 53}
57 54
58//============================================================================= 55//=============================================================================
59 56
60YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 57YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
61 58
62 'toString': function() { 59 'toString': function() {
63 return "Clipperz.PM.Components.RecordDetail.FieldComponent component"; 60 return "Clipperz.PM.Components.RecordDetail.FieldComponent component";
64 }, 61 },
65 62
66 //------------------------------------------------------------------------- 63 //-------------------------------------------------------------------------
67 64
68 'recordField': function() { 65 'recordField': function() {
69 return this._recordField; 66 return this._recordField;
70 }, 67 },
71 68
72 //------------------------------------------------------------------------- 69 //-------------------------------------------------------------------------
73 70
74 'buttonComponent': function() { 71 'buttonComponent': function() {
75 return this._buttonComponent; 72 return this._buttonComponent;
76 }, 73 },
77 74
78 'setButtonComponent': function(aValue) { 75 'setButtonComponent': function(aValue) {
79 this._buttonComponent = aValue; 76 this._buttonComponent = aValue;
80 }, 77 },
81 78
82 //------------------------------------------------------------------------- 79 //-------------------------------------------------------------------------
83 80
84 'labelComponent': function() { 81 'labelComponent': function() {
85 return this._labelComponent; 82 return this._labelComponent;
86 }, 83 },
87 84
88 'setLabelComponent': function(aValue) { 85 'setLabelComponent': function(aValue) {
89 this._labelComponent = aValue; 86 this._labelComponent = aValue;
90 }, 87 },
91 88
92 //------------------------------------------------------------------------- 89 //-------------------------------------------------------------------------
93 90
94 'dragHandler': function() { 91 'dragHandler': function() {
95 return this._dragHandler; 92 return this._dragHandler;
96 }, 93 },
97 94
98 'setDragHandler': function(aValue) { 95 'setDragHandler': function(aValue) {
99 this._dragHandler = aValue; 96 this._dragHandler = aValue;
100 }, 97 },
101 98
102 //------------------------------------------------------------------------- 99 //-------------------------------------------------------------------------
103 100
104 'valueComponent': function() { 101 'valueComponent': function() {
105 return this._valueComponent; 102 return this._valueComponent;
106 }, 103 },
107 104
108 'setValueComponent': function(aValue) { 105 'setValueComponent': function(aValue) {
109 this._valueComponent = aValue; 106 this._valueComponent = aValue;
110 }, 107 },
111 108
112 //------------------------------------------------------------------------- 109 //-------------------------------------------------------------------------
113 110
114 'typeComponent': function() { 111 'typeComponent': function() {
115 return this._typeComponent; 112 return this._typeComponent;
116 }, 113 },
117 114
118 'setTypeComponent': function(aValue) { 115 'setTypeComponent': function(aValue) {
119 this._typeComponent = aValue; 116 this._typeComponent = aValue;
120 }, 117 },
121 118
122 //------------------------------------------------------------------------- 119 //-------------------------------------------------------------------------
123 120
124 'render': function() { 121 'render': function() {
125//MochiKit.Logging.logDebug(">>> RecordDetail.FieldComponent.render"); 122//MochiKit.Logging.logDebug(">>> RecordDetail.FieldComponent.render");
126 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td',/* width:'32',*/ height:'24', cls:'removeFieldButton', align:'left', valign:'top', id:this.getId('button')}); 123 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td',/* width:'32',*/ height:'24', cls:'removeFieldButton', align:'left', valign:'top', id:this.getId('button')});
127 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td',/* width:'25%',*/ valign:'top', id:this.getId('label')}); 124 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td',/* width:'25%',*/ valign:'top', id:this.getId('label')});
128 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td',/* width:'3',*/ valign:'top', id:this.getId('dragHandler')}); 125 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td',/* width:'3',*/ valign:'top', id:this.getId('dragHandler')});
129 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td',/* width:'50%',*/ valign:'top', children:[ 126 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td',/* width:'50%',*/ valign:'top', children:[
130 {tag:'div', cls:'Clipperz_recordFieldData', id:this.getId('value')} 127 {tag:'div', cls:'Clipperz_recordFieldData', id:this.getId('value')}
131 ]}); 128 ]});
132 129
133 130
134 this.setButtonComponent(new Clipperz.PM.Components.RecordDetail.FieldButtonComponent(this.getElement('button'), {fieldComponent:this})); 131 this.setButtonComponent(new Clipperz.PM.Components.RecordDetail.FieldButtonComponent(this.getElement('button'), {fieldComponent:this}));
135 this.setLabelComponent(new Clipperz.PM.Components.RecordDetail.FieldLabelComponent(this.getElement('label'), {fieldComponent:this})); 132 this.setLabelComponent(new Clipperz.PM.Components.RecordDetail.FieldLabelComponent(this.getElement('label'), {fieldComponent:this}));
136 this.setDragHandler(new Clipperz.PM.Components.RecordDetail.FieldDragHandler(this.getElement('dragHandler'), {fieldComponent:this})); 133 this.setDragHandler(new Clipperz.PM.Components.RecordDetail.FieldDragHandler(this.getElement('dragHandler'), {fieldComponent:this}));
137 this.setValueComponent(new Clipperz.PM.Components.RecordDetail.FieldValueComponent(this.getElement('value'), {fieldComponent:this})); 134 this.setValueComponent(new Clipperz.PM.Components.RecordDetail.FieldValueComponent(this.getElement('value'), {fieldComponent:this}));
138 135
139 if (this.editMode() == 'EDIT') { 136 if (this.editMode() == 'EDIT') {
140 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td',/* width:'60',*/ align:'left', cls:'fieldTypeTD', valign:'top', id:this.getId('type')}); 137 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td',/* width:'60',*/ align:'left', cls:'fieldTypeTD', valign:'top', id:this.getId('type')});
141 this.setTypeComponent(new Clipperz.PM.Components.RecordDetail.FieldTypeComponent(this.getElement('type'), {fieldComponent:this})); 138 this.setTypeComponent(new Clipperz.PM.Components.RecordDetail.FieldTypeComponent(this.getElement('type'), {fieldComponent:this}));
142 } 139 }
143 140
144 this.update(); 141 this.update();
145//MochiKit.Logging.logDebug("<<< RecordDetail.FieldComponent.render"); 142//MochiKit.Logging.logDebug("<<< RecordDetail.FieldComponent.render");
146 }, 143 },
147 144
148 //------------------------------------------------------------------------- 145 //-------------------------------------------------------------------------
149 146
150 'handleButtonClick': function() { 147 'handleButtonClick': function() {
151 this.mainComponent().record().removeField(this.recordField()); 148 this.mainComponent().record().removeField(this.recordField());
152 149
153 // if (this.recordField() == null) { 150 // if (this.recordField() == null) {
154 // this.mainComponent().record().addNewField(); 151 // this.mainComponent().record().addNewField();
155 // } else { 152 // } else {
156 // this.mainComponent().record().removeField(this.recordField()); 153 // this.mainComponent().record().removeField(this.recordField());
157 // } 154 // }
158 }, 155 },
159 156
160 //------------------------------------------------------------------------- 157 //-------------------------------------------------------------------------
161 158
162 'update': function(anEvent) { 159 'update': function(anEvent) {
163//MochiKit.Logging.logDebug(">>> RecordDetail.FieldComponent.update"); 160//MochiKit.Logging.logDebug(">>> RecordDetail.FieldComponent.update");
164 this.buttonComponent().update(); 161 this.buttonComponent().update();
165 this.labelComponent().update(); 162 this.labelComponent().update();
166 this.dragHandler().update(); 163 this.dragHandler().update();
167 this.valueComponent().update(); 164 this.valueComponent().update();
168 if (this.editMode() == 'EDIT') { 165 if (this.editMode() == 'EDIT') {
169 this.typeComponent().update(); 166 this.typeComponent().update();
170 } 167 }
171//MochiKit.Logging.logDebug("<<< RecordDetail.FieldComponent.update"); 168//MochiKit.Logging.logDebug("<<< RecordDetail.FieldComponent.update");
172 }, 169 },
173 170
174 //------------------------------------------------------------------------- 171 //-------------------------------------------------------------------------
175 172
176 'synchronizeComponentValues': function() { 173 'synchronizeComponentValues': function() {
177//MochiKit.Logging.logDebug(">>> FieldComponent.synchronizeComponentValues"); 174//MochiKit.Logging.logDebug(">>> FieldComponent.synchronizeComponentValues");
178 this.labelComponent().synchronizeComponentValues(); 175 this.labelComponent().synchronizeComponentValues();
179 this.valueComponent().synchronizeComponentValues(); 176 this.valueComponent().synchronizeComponentValues();
180 if (this.editMode() == 'EDIT') { 177 if (this.editMode() == 'EDIT') {
181 this.typeComponent().synchronizeComponentValues(); 178 this.typeComponent().synchronizeComponentValues();
182 } 179 }
183//MochiKit.Logging.logDebug("<<< FieldComponent.synchronizeComponentValues"); 180//MochiKit.Logging.logDebug("<<< FieldComponent.synchronizeComponentValues");
184 }, 181 },
185 182
186 //------------------------------------------------------------------------- 183 //-------------------------------------------------------------------------
187 __syntaxFix__: "syntax fix" 184 __syntaxFix__: "syntax fix"
188}); 185});
189 186
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js
index 13a08fc..f7c5e21 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js
@@ -1,59 +1,56 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Components.RecordDetail.FieldDragHandler = function(anElement, args) { 33Clipperz.PM.Components.RecordDetail.FieldDragHandler = function(anElement, args) {
37 args = args || {}; 34 args = args || {};
38 35
39 Clipperz.PM.Components.RecordDetail.FieldDragHandler.superclass.constructor.call(this, anElement, args); 36 Clipperz.PM.Components.RecordDetail.FieldDragHandler.superclass.constructor.call(this, anElement, args);
40 37
41 this._element = anElement; 38 this._element = anElement;
42 39
43 this.render(); 40 this.render();
44 41
45 return this; 42 return this;
46} 43}
47 44
48//============================================================================= 45//=============================================================================
49 46
50YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldDragHandler, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { 47YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldDragHandler, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, {
51 48
52 'toString': function() { 49 'toString': function() {
53 return "Clipperz.PM.Components.RecordDetail.FieldDragHandler component"; 50 return "Clipperz.PM.Components.RecordDetail.FieldDragHandler component";
54 }, 51 },
55 52
56 //------------------------------------------------------------------------- 53 //-------------------------------------------------------------------------
57 __syntaxFix__: "syntax fix" 54 __syntaxFix__: "syntax fix"
58}); 55});
59 56
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js
index 3bbcd1d..c58a7e2 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js
@@ -1,141 +1,138 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Components.RecordDetail.FieldLabelComponent = function(anElement, args) { 33Clipperz.PM.Components.RecordDetail.FieldLabelComponent = function(anElement, args) {
37 args = args || {}; 34 args = args || {};
38 35
39 Clipperz.PM.Components.RecordDetail.FieldLabelComponent.superclass.constructor.call(this, anElement, args); 36 Clipperz.PM.Components.RecordDetail.FieldLabelComponent.superclass.constructor.call(this, anElement, args);
40 37
41 this._inputElement = null; 38 this._inputElement = null;
42 39
43 this.render(); 40 this.render();
44 41
45 return this; 42 return this;
46} 43}
47 44
48//============================================================================= 45//=============================================================================
49 46
50YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldLabelComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { 47YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldLabelComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, {
51 48
52 'toString': function() { 49 'toString': function() {
53 return "Clipperz.PM.Components.RecordDetail.FieldLabelComponent component"; 50 return "Clipperz.PM.Components.RecordDetail.FieldLabelComponent component";
54 }, 51 },
55 52
56 //------------------------------------------------------------------------- 53 //-------------------------------------------------------------------------
57 54
58 'value': function() { 55 'value': function() {
59 return this.recordField().label(); 56 return this.recordField().label();
60 }, 57 },
61 58
62 //------------------------------------------------------------------------- 59 //-------------------------------------------------------------------------
63 60
64 'inputElement': function() { 61 'inputElement': function() {
65 return this._inputElement; 62 return this._inputElement;
66 }, 63 },
67 64
68 'setInputElement': function(aValue) { 65 'setInputElement': function(aValue) {
69 this._inputElement = aValue; 66 this._inputElement = aValue;
70 }, 67 },
71 68
72 //------------------------------------------------------------------------- 69 //-------------------------------------------------------------------------
73 70
74 'render': function() { 71 'render': function() {
75 varnewTextFormField; 72 varnewTextFormField;
76 this.element().update(""); 73 this.element().update("");
77 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'Clipperz_recordFieldLabel', id:this.getId('label')}); 74 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'Clipperz_recordFieldLabel', id:this.getId('label')});
78 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', style:'font-size:8pt;', html:this.recordField().key()}); 75 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', style:'font-size:8pt;', html:this.recordField().key()});
79 76
80 // this.setInputElement(new Clipperz.PM.Components.TextFormField(this.getElement('label'), {editMode:this.editMode(), value:this.value()})); 77 // this.setInputElement(new Clipperz.PM.Components.TextFormField(this.getElement('label'), {editMode:this.editMode(), value:this.value()}));
81 newTextFormField = new Clipperz.PM.Components.TextFormField(this.getElement('label'), {editMode:this.editMode(), value:this.value()}); 78 newTextFormField = new Clipperz.PM.Components.TextFormField(this.getElement('label'), {editMode:this.editMode(), value:this.value()});
82 // newTextFormField.inputElement().setStyle({border:'3px solid cyan;'}); 79 // newTextFormField.inputElement().setStyle({border:'3px solid cyan;'});
83 newTextFormField.on('change', this.notifyChanges, this, true) 80 newTextFormField.on('change', this.notifyChanges, this, true)
84 // this.inputElement().on('change', function() {alert("CHANGE");}); 81 // this.inputElement().on('change', function() {alert("CHANGE");});
85 // this.inputElement().getElement('editComponent_input').on('change', function() {alert("CHANGE");}) 82 // this.inputElement().getElement('editComponent_input').on('change', function() {alert("CHANGE");})
86 // this.inputElement().on('blur', this.notifyChanges, this, true); 83 // this.inputElement().on('blur', this.notifyChanges, this, true);
87 84
88 this.setInputElement(newTextFormField); 85 this.setInputElement(newTextFormField);
89 this.update(); 86 this.update();
90 }, 87 },
91 88
92 'notifyChanges': function() { 89 'notifyChanges': function() {
93//MochiKit.Logging.logDebug(">>> FieldLabelComponent.notifyChanges - " + this); 90//MochiKit.Logging.logDebug(">>> FieldLabelComponent.notifyChanges - " + this);
94 this.synchronizeComponentValues(); 91 this.synchronizeComponentValues();
95 Clipperz.NotificationCenter.notify(this.recordField().recordVersion().record(), 'updatedFieldLabel'); 92 Clipperz.NotificationCenter.notify(this.recordField().recordVersion().record(), 'updatedFieldLabel');
96//MochiKit.Logging.logDebug("<<< FieldLabelComponent.notifyChanges"); 93//MochiKit.Logging.logDebug("<<< FieldLabelComponent.notifyChanges");
97 }, 94 },
98 95
99 //------------------------------------------------------------------------- 96 //-------------------------------------------------------------------------
100 97
101 'update': function() { 98 'update': function() {
102//MochiKit.Logging.logDebug(">>> FieldLabelComponent.update"); 99//MochiKit.Logging.logDebug(">>> FieldLabelComponent.update");
103 this.inputElement().update({editMode:this.editMode(), value:this.value()}); 100 this.inputElement().update({editMode:this.editMode(), value:this.value()});
104//MochiKit.Logging.logDebug("<<< FieldLabelComponent.update"); 101//MochiKit.Logging.logDebug("<<< FieldLabelComponent.update");
105 }, 102 },
106 103
107 //------------------------------------------------------------------------- 104 //-------------------------------------------------------------------------
108/* 105/*
109 'updateViewMode': function() { 106 'updateViewMode': function() {
110 varwidth; 107 varwidth;
111 varelement; 108 varelement;
112 109
113 this.element().update(""); 110 this.element().update("");
114 width = this.element().getWidth(); 111 width = this.element().getWidth();
115 element = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', html:this.value()}, true); 112 element = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', html:this.value()}, true);
116 element.setWidth(width-1); 113 element.setWidth(width-1);
117 }, 114 },
118 115
119 //------------------------------------------------------------------------- 116 //-------------------------------------------------------------------------
120 117
121 'updateEditMode': function() { 118 'updateEditMode': function() {
122 varwidth; 119 varwidth;
123 120
124 this.element().update(""); 121 this.element().update("");
125 width = this.element().getWidth(true); 122 width = this.element().getWidth(true);
126 this.setInputElement(Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'input', type:'text', value:this.value()}, true)); 123 this.setInputElement(Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'input', type:'text', value:this.value()}, true));
127 this.inputElement().setWidth(width-1); 124 this.inputElement().setWidth(width-1);
128 }, 125 },
129*/ 126*/
130 //------------------------------------------------------------------------- 127 //-------------------------------------------------------------------------
131 128
132 'synchronizeComponentValues': function() { 129 'synchronizeComponentValues': function() {
133 if (this.inputElement() != null) { 130 if (this.inputElement() != null) {
134 this.recordField().setLabel(this.inputElement().value()); 131 this.recordField().setLabel(this.inputElement().value());
135 } 132 }
136 }, 133 },
137 134
138 //------------------------------------------------------------------------- 135 //-------------------------------------------------------------------------
139 __syntaxFix__: "syntax fix" 136 __syntaxFix__: "syntax fix"
140}); 137});
141 138
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js
index 3bdd093..489258a 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js
@@ -1,157 +1,154 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Components.RecordDetail.FieldTypeComponent = function(anElement, args) { 33Clipperz.PM.Components.RecordDetail.FieldTypeComponent = function(anElement, args) {
37 args = args || {}; 34 args = args || {};
38 35
39 Clipperz.PM.Components.RecordDetail.FieldTypeComponent.superclass.constructor.call(this, anElement, args); 36 Clipperz.PM.Components.RecordDetail.FieldTypeComponent.superclass.constructor.call(this, anElement, args);
40 37
41 this._inputElement = null; 38 this._inputElement = null;
42 39
43 this.render(); 40 this.render();
44 41
45 return this; 42 return this;
46} 43}
47 44
48//============================================================================= 45//=============================================================================
49 46
50YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldTypeComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { 47YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldTypeComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, {
51 48
52 'toString': function() { 49 'toString': function() {
53 return "Clipperz.PM.Components.RecordDetail.FieldTypeComponent component"; 50 return "Clipperz.PM.Components.RecordDetail.FieldTypeComponent component";
54 }, 51 },
55 52
56 //------------------------------------------------------------------------- 53 //-------------------------------------------------------------------------
57 54
58 'inputElement': function() { 55 'inputElement': function() {
59 return this._inputElement; 56 return this._inputElement;
60 }, 57 },
61 58
62 'setInputElement': function(aValue) { 59 'setInputElement': function(aValue) {
63 this._inputElement = aValue; 60 this._inputElement = aValue;
64 }, 61 },
65 62
66 //------------------------------------------------------------------------- 63 //-------------------------------------------------------------------------
67 64
68 'value': function() { 65 'value': function() {
69 return this.recordField().type(); 66 return this.recordField().type();
70 }, 67 },
71 68
72 'canChangeType': function() { 69 'canChangeType': function() {
73 var value; 70 var value;
74 var result; 71 var result;
75 72
76 value = this.value(); 73 value = this.value();
77 result = ((value == 'TXT') || (value == 'PWD') || (value == 'URL') || (value == 'DATE') || (value == 'ADDR')); 74 result = ((value == 'TXT') || (value == 'PWD') || (value == 'URL') || (value == 'DATE') || (value == 'ADDR'));
78 75
79 return result 76 return result
80 }, 77 },
81 78
82 //------------------------------------------------------------------------- 79 //-------------------------------------------------------------------------
83 80
84 'updateViewMode': function() { 81 'updateViewMode': function() {
85 this.element().update(""); 82 this.element().update("");
86 if (this.canChangeType()) { 83 if (this.canChangeType()) {
87 varwidth; 84 varwidth;
88 var element; 85 var element;
89 86
90 width = this.element().getWidth(true); 87 width = this.element().getWidth(true);
91 element = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', html:this.recordField().typeShortDescription()}, true); 88 element = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', html:this.recordField().typeShortDescription()}, true);
92 element.setWidth(width-1); 89 element.setWidth(width-1);
93 } 90 }
94 }, 91 },
95 92
96 //------------------------------------------------------------------------- 93 //-------------------------------------------------------------------------
97 94
98 'updateEditMode': function() { 95 'updateEditMode': function() {
99 this.element().update(""); 96 this.element().update("");
100 97
101 if (this.canChangeType()) { 98 if (this.canChangeType()) {
102 varwidth; 99 varwidth;
103 100
104 width = this.element().getWidth(true); 101 width = this.element().getWidth(true);
105 this.setInputElement(Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'select', children:[ 102 this.setInputElement(Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'select', children:[
106 {tag:'option', value:'TXT', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['TXT']['shortDescription']}, 103 {tag:'option', value:'TXT', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['TXT']['shortDescription']},
107 {tag:'option', value:'PWD', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['PWD']['shortDescription']}, 104 {tag:'option', value:'PWD', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['PWD']['shortDescription']},
108 {tag:'option', value:'URL', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['URL']['shortDescription']}, 105 {tag:'option', value:'URL', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['URL']['shortDescription']},
109 {tag:'option', value:'DATE', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['DATE']['shortDescription']}, 106 {tag:'option', value:'DATE', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['DATE']['shortDescription']},
110 {tag:'option', value:'ADDR', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['ADDR']['shortDescription']} 107 {tag:'option', value:'ADDR', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['ADDR']['shortDescription']}
111 108
112 // {tag:'option', value:'CHECK', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['CHECK']['shortDescription']}, 109 // {tag:'option', value:'CHECK', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['CHECK']['shortDescription']},
113 // {tag:'option', value:'RADIO', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['RADIO']['shortDescription']}, 110 // {tag:'option', value:'RADIO', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['RADIO']['shortDescription']},
114 // {tag:'option', value:'CHECK', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['SELECT']['shortDescription']} 111 // {tag:'option', value:'CHECK', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['SELECT']['shortDescription']}
115 // {tag:'option', value:'NOTE', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['NOTE']['shortDescription']} 112 // {tag:'option', value:'NOTE', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['NOTE']['shortDescription']}
116 ]}, true)); 113 ]}, true));
117 this.inputElement().setWidth(width-1); 114 this.inputElement().setWidth(width-1);
118 this.inputElement().addHandler('change', true, this.onChange, this, true); 115 this.inputElement().addHandler('change', true, this.onChange, this, true);
119 // this.selectCorrectOption(); 116 // this.selectCorrectOption();
120 Clipperz.DOM.selectOptionMatchingValue(this.inputElement().dom, this.value()); 117 Clipperz.DOM.selectOptionMatchingValue(this.inputElement().dom, this.value());
121 } 118 }
122 }, 119 },
123 120
124 //------------------------------------------------------------------------- 121 //-------------------------------------------------------------------------
125 122
126 'onChange': function() { 123 'onChange': function() {
127 this.synchronizeComponentValues(); 124 this.synchronizeComponentValues();
128 this.fieldComponent().valueComponent().handleTypeChange(); 125 this.fieldComponent().valueComponent().handleTypeChange();
129 }, 126 },
130 127
131 //------------------------------------------------------------------------- 128 //-------------------------------------------------------------------------
132/* 129/*
133 'selectCorrectOption': function() { 130 'selectCorrectOption': function() {
134 varoptions; 131 varoptions;
135 var i,c; 132 var i,c;
136 133
137 options = this.inputElement().getChildrenByTagName('option'); 134 options = this.inputElement().getChildrenByTagName('option');
138 c = options.length; 135 c = options.length;
139 for (i=0; i<c; i++) { 136 for (i=0; i<c; i++) {
140 if (options[i].dom.value == this.value()) { 137 if (options[i].dom.value == this.value()) {
141 options[i].dom.selected = true; 138 options[i].dom.selected = true;
142 } 139 }
143 } 140 }
144 }, 141 },
145 */ 142 */
146 //------------------------------------------------------------------------- 143 //-------------------------------------------------------------------------
147 144
148 'synchronizeComponentValues': function() { 145 'synchronizeComponentValues': function() {
149 if (this.inputElement() != null) { 146 if (this.inputElement() != null) {
150 this.recordField().setType(this.inputElement().dom.value); 147 this.recordField().setType(this.inputElement().dom.value);
151 } 148 }
152 }, 149 },
153 150
154 //------------------------------------------------------------------------- 151 //-------------------------------------------------------------------------
155 __syntaxFix__: "syntax fix" 152 __syntaxFix__: "syntax fix"
156}); 153});
157 154
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js
index a30992a..8621397 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js
@@ -1,275 +1,272 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Components.RecordDetail.FieldValueComponent = function(anElement, args) { 33Clipperz.PM.Components.RecordDetail.FieldValueComponent = function(anElement, args) {
37 args = args || {}; 34 args = args || {};
38 35
39 Clipperz.PM.Components.RecordDetail.FieldValueComponent.superclass.constructor.call(this, anElement, args); 36 Clipperz.PM.Components.RecordDetail.FieldValueComponent.superclass.constructor.call(this, anElement, args);
40 37
41 this._inputElement = null; 38 this._inputElement = null;
42 this._scrambledStatus = 'SCRAMBLED'; //'UNSCRAMBLED' 39 this._scrambledStatus = 'SCRAMBLED'; //'UNSCRAMBLED'
43 40
44 this.render(); 41 this.render();
45 42
46 return this; 43 return this;
47} 44}
48 45
49//============================================================================= 46//=============================================================================
50 47
51YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldValueComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { 48YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldValueComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, {
52 49
53 'toString': function() { 50 'toString': function() {
54 return "Clipperz.PM.Components.RecordDetail.FieldValueComponent component"; 51 return "Clipperz.PM.Components.RecordDetail.FieldValueComponent component";
55 }, 52 },
56 53
57 //------------------------------------------------------------------------- 54 //-------------------------------------------------------------------------
58 55
59 'value': function() { 56 'value': function() {
60 return this.recordField().value(); 57 return this.recordField().value();
61 }, 58 },
62 59
63 'setValue': function(aValue) { 60 'setValue': function(aValue) {
64 this.recordField().setValue(aValue); 61 this.recordField().setValue(aValue);
65 }, 62 },
66 63
67 //------------------------------------------------------------------------- 64 //-------------------------------------------------------------------------
68 65
69 'inputElement': function() { 66 'inputElement': function() {
70 return this._inputElement; 67 return this._inputElement;
71 }, 68 },
72 69
73 'setInputElement': function(aValue) { 70 'setInputElement': function(aValue) {
74 this._inputElement = aValue; 71 this._inputElement = aValue;
75 }, 72 },
76 73
77 //------------------------------------------------------------------------- 74 //-------------------------------------------------------------------------
78 75
79 'scrambledStatus': function() { 76 'scrambledStatus': function() {
80 return this._scrambledStatus; 77 return this._scrambledStatus;
81 }, 78 },
82 79
83 'setScrambledStatus': function(aValue) { 80 'setScrambledStatus': function(aValue) {
84 this._scrambledStatus = aValue; 81 this._scrambledStatus = aValue;
85 }, 82 },
86 83
87 //------------------------------------------------------------------------- 84 //-------------------------------------------------------------------------
88 85
89 'handleTypeChange': function() { 86 'handleTypeChange': function() {
90//MochiKit.Logging.logDebug(">>> handling type change - " + this.recordField().type()); 87//MochiKit.Logging.logDebug(">>> handling type change - " + this.recordField().type());
91 this.synchronizeComponentValues(); 88 this.synchronizeComponentValues();
92 this.update(); 89 this.update();
93 }, 90 },
94 91
95 //------------------------------------------------------------------------- 92 //-------------------------------------------------------------------------
96 93
97 'addrUrl': function() { 94 'addrUrl': function() {
98 var result; 95 var result;
99 96
100 result = "http://maps.google.com/maps?q=" + this.value().split(' ').join('+'); 97 result = "http://maps.google.com/maps?q=" + this.value().split(' ').join('+');
101 98
102 return result; 99 return result;
103 }, 100 },
104 101
105 //------------------------------------------------------------------------- 102 //-------------------------------------------------------------------------
106 103
107 'updateViewMode': function() { 104 'updateViewMode': function() {
108 var scarmbledStatus; 105 var scarmbledStatus;
109 106
110 scrambledStatus = this.scrambledStatus() || 'SCRAMBLED'; 107 scrambledStatus = this.scrambledStatus() || 'SCRAMBLED';
111 108
112 this.element().update(""); 109 this.element().update("");
113 if (this.recordField().hidden() == false) { 110 if (this.recordField().hidden() == false) {
114 switch(this.recordField().type()) { 111 switch(this.recordField().type()) {
115 case 'TXT': 112 case 'TXT':
116 case 'PWD': 113 case 'PWD':
117 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', html:this.value()}); 114 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', html:this.value()});
118 break; 115 break;
119 case 'URL': 116 case 'URL':
120 varurlLocation; 117 varurlLocation;
121 118
122 urlLocation = Clipperz.Base.sanitizeString(this.value()); 119 urlLocation = Clipperz.Base.sanitizeString(this.value());
123 if (! (/^(https?|ftp|svn):\/\//.test(urlLocation))) { 120 if (! (/^(https?|ftp|svn):\/\//.test(urlLocation))) {
124 urlLocation = 'http://' + urlLocation; 121 urlLocation = 'http://' + urlLocation;
125 } 122 }
126 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'a', href:urlLocation, html:this.value(), target:'_blank'}); 123 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'a', href:urlLocation, html:this.value(), target:'_blank'});
127 break; 124 break;
128 case 'DATE': 125 case 'DATE':
129 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', html:this.value()}); 126 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', html:this.value()});
130 break; 127 break;
131 case 'ADDR': 128 case 'ADDR':
132 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'a', href:this.addrUrl(), html:this.value(), target:'_blank'}); 129 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'a', href:this.addrUrl(), html:this.value(), target:'_blank'});
133 break; 130 break;
134 } 131 }
135 } else { 132 } else {
136 var tableElement; 133 var tableElement;
137 var tdElement; 134 var tdElement;
138 var inputElement; 135 var inputElement;
139 var passwordElementConfiguration; 136 var passwordElementConfiguration;
140 137
141 if (scrambledStatus == 'SCRAMBLED') { 138 if (scrambledStatus == 'SCRAMBLED') {
142 varscrambledInputElement; 139 varscrambledInputElement;
143 140
144 if ((Clipperz_IEisBroken === true) && (Clipperz.PM.Proxy.defaultProxy.isReadOnly())) { 141 if ((Clipperz_IEisBroken === true) && (Clipperz.PM.Proxy.defaultProxy.isReadOnly())) {
145 scrambledInputElement = {tag:'input', type:'password', value:"this.value()"}; 142 scrambledInputElement = {tag:'input', type:'password', value:"this.value()"};
146 } else { 143 } else {
147 scrambledInputElement = {tag:'input', type:'text', cls:'scrambledField', title:Clipperz.PM.Strings['recordDetailPasswordFieldTooltipLabel'], value:"this.value()"}; 144 scrambledInputElement = {tag:'input', type:'text', cls:'scrambledField', title:Clipperz.PM.Strings['recordDetailPasswordFieldTooltipLabel'], value:"this.value()"};
148 } 145 }
149 146
150 passwordElementConfiguration = 147 passwordElementConfiguration =
151 {tag:'table', border:'0', cellspacing:'2', cellpadding:'0', children:[ 148 {tag:'table', border:'0', cellspacing:'2', cellpadding:'0', children:[
152 {tag:'tbody', children:[ 149 {tag:'tbody', children:[
153 {tag:'tr', children:[ 150 {tag:'tr', children:[
154 {tag:'td', valign:'top', children:[ 151 {tag:'td', valign:'top', children:[
155 scrambledInputElement, 152 scrambledInputElement,
156 {tag:'a', cls:'scrambleLink', id:this.getId('scrambleLink'), href:'#', htmlString:Clipperz.PM.Strings['recordDetailPasswordFieldUnscrambleLabel']} 153 {tag:'a', cls:'scrambleLink', id:this.getId('scrambleLink'), href:'#', htmlString:Clipperz.PM.Strings['recordDetailPasswordFieldUnscrambleLabel']}
157 ]}, 154 ]},
158 {tag:'td', valign:'top', children:[ 155 {tag:'td', valign:'top', children:[
159 {tag:'span', cls:'scrambledFieldLabel', htmlString:Clipperz.PM.Strings['recordDetailPasswordFieldHelpLabel']} 156 {tag:'span', cls:'scrambledFieldLabel', htmlString:Clipperz.PM.Strings['recordDetailPasswordFieldHelpLabel']}
160 ]} 157 ]}
161 ]} 158 ]}
162 ]} 159 ]}
163 ]}; 160 ]};
164 } else { 161 } else {
165 passwordElementConfiguration = 162 passwordElementConfiguration =
166 {tag:'div', children:[ 163 {tag:'div', children:[
167 {tag:'input', type:'text', cls:'unscrambledField', value:"this.value()"}, 164 {tag:'input', type:'text', cls:'unscrambledField', value:"this.value()"},
168 {tag:'a', cls:'scrambleLink', id:this.getId('scrambleLink'), href:'#', htmlString:Clipperz.PM.Strings['recordDetailPasswordFieldScrambleLabel']} 165 {tag:'a', cls:'scrambleLink', id:this.getId('scrambleLink'), href:'#', htmlString:Clipperz.PM.Strings['recordDetailPasswordFieldScrambleLabel']}
169 ]}; 166 ]};
170 } 167 }
171 168
172 tableElement = Clipperz.YUI.DomHelper.append(this.element().dom, passwordElementConfiguration, true); 169 tableElement = Clipperz.YUI.DomHelper.append(this.element().dom, passwordElementConfiguration, true);
173 170
174 inputElement = tableElement.getChildrenByTagName('input')[0]; 171 inputElement = tableElement.getChildrenByTagName('input')[0];
175 inputElement.dom.value = this.value(); 172 inputElement.dom.value = this.value();
176 inputElement.wrap({tag:'div', cls:'passwordBackground'}).setStyle('background-position', "0px -" + Math.min(128, Clipperz.PM.Crypto.passwordEntropy(this.value())) + "px"); 173 inputElement.wrap({tag:'div', cls:'passwordBackground'}).setStyle('background-position', "0px -" + Math.min(128, Clipperz.PM.Crypto.passwordEntropy(this.value())) + "px");
177 174
178 MochiKit.Signal.connect(inputElement.dom, 'onfocus', this, 'selectHiddenFieldOnFocus'); 175 MochiKit.Signal.connect(inputElement.dom, 'onfocus', this, 'selectHiddenFieldOnFocus');
179 MochiKit.Signal.connect(this.getDom('scrambleLink'), 'onclick', this, 'toggleScramble'); 176 MochiKit.Signal.connect(this.getDom('scrambleLink'), 'onclick', this, 'toggleScramble');
180 } 177 }
181 }, 178 },
182 179
183 //------------------------------------------------------------------------- 180 //-------------------------------------------------------------------------
184 181
185 'updateEditMode': function() { 182 'updateEditMode': function() {
186 var inputElement; 183 var inputElement;
187 var scarmbledStatus; 184 var scarmbledStatus;
188 185
189 scrambledStatus = this.scrambledStatus() || 'SCRAMBLED'; 186 scrambledStatus = this.scrambledStatus() || 'SCRAMBLED';
190 187
191 this.element().update(""); 188 this.element().update("");
192 switch(this.recordField().type()) { 189 switch(this.recordField().type()) {
193 case 'TXT': 190 case 'TXT':
194 case 'URL': 191 case 'URL':
195 case 'ADDR': 192 case 'ADDR':
196 inputElement = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'input', type:'text', value:"this.value()"}, true); 193 inputElement = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'input', type:'text', value:"this.value()"}, true);
197 inputElement.dom.value = this.value(); 194 inputElement.dom.value = this.value();
198 break; 195 break;
199 case 'PWD': 196 case 'PWD':
200 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', width:'100%', cellpadding:'0', cellspacing:'0', children:[ 197 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', width:'100%', cellpadding:'0', cellspacing:'0', children:[
201 {tag:'tbody', children:[ 198 {tag:'tbody', children:[
202 {tag:'tr', children:[ 199 {tag:'tr', children:[
203 {tag:'td', valign:'top', children:[ 200 {tag:'td', valign:'top', children:[
204 {tag:'input', type:((scrambledStatus == 'SCRAMBLED') ? 'password' : 'text'), id:this.getId('passwordInputElement'), value:"this.value()"}, 201 {tag:'input', type:((scrambledStatus == 'SCRAMBLED') ? 'password' : 'text'), id:this.getId('passwordInputElement'), value:"this.value()"},
205 {tag:'a', cls:'scrambleLink', id:this.getId('scrambleLink'), href:'#', html:(scrambledStatus == 'SCRAMBLED' ? Clipperz.PM.Strings['recordDetailPasswordFieldUnscrambleLabel'] : Clipperz.PM.Strings['recordDetailPasswordFieldScrambleLabel'])} 202 {tag:'a', cls:'scrambleLink', id:this.getId('scrambleLink'), href:'#', html:(scrambledStatus == 'SCRAMBLED' ? Clipperz.PM.Strings['recordDetailPasswordFieldUnscrambleLabel'] : Clipperz.PM.Strings['recordDetailPasswordFieldScrambleLabel'])}
206 ]}, 203 ]},
207 {tag:'td', valign:'top', children:[ 204 {tag:'td', valign:'top', children:[
208 {tag:'div', id:this.getId('passwordGenerator'), cls:'Clipperz_PasswordGenerator_button', html:'&nbsp;'} 205 {tag:'div', id:this.getId('passwordGenerator'), cls:'Clipperz_PasswordGenerator_button', html:'&nbsp;'}
209 ]} 206 ]}
210 ]} 207 ]}
211 ]} 208 ]}
212 ]}) 209 ]})
213 inputElement = this.getElement('passwordInputElement'); 210 inputElement = this.getElement('passwordInputElement');
214 inputElement.dom.value = this.value(); 211 inputElement.dom.value = this.value();
215 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('passwordInputElement')); 212 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('passwordInputElement'));
216 new Clipperz.PM.Components.PasswordGenerator(this.getElement('passwordGenerator'), this); 213 new Clipperz.PM.Components.PasswordGenerator(this.getElement('passwordGenerator'), this);
217 MochiKit.Signal.connect(this.getDom('scrambleLink'), 'onclick', this, 'toggleScramble'); 214 MochiKit.Signal.connect(this.getDom('scrambleLink'), 'onclick', this, 'toggleScramble');
218 break; 215 break;
219 // case 'NOTE': 216 // case 'NOTE':
220 // inputElement = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'textarea', rows:'5', html:this.value()}, true); 217 // inputElement = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'textarea', rows:'5', html:this.value()}, true);
221 // break 218 // break
222 case 'DATE': 219 case 'DATE':
223 inputElement = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'input', type:'text', value:"this.value()"}, true); 220 inputElement = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'input', type:'text', value:"this.value()"}, true);
224 inputElement.dom.value = this.value(); 221 inputElement.dom.value = this.value();
225 break; 222 break;
226 } 223 }
227 224
228 this.setInputElement(inputElement); 225 this.setInputElement(inputElement);
229 }, 226 },
230 227
231 //------------------------------------------------------------------------- 228 //-------------------------------------------------------------------------
232 229
233 'synchronizeComponentValues': function() { 230 'synchronizeComponentValues': function() {
234//MochiKit.Logging.logDebug(">>> FieldValueComponent.synchronizeComponentValues"); 231//MochiKit.Logging.logDebug(">>> FieldValueComponent.synchronizeComponentValues");
235 if (this.inputElement() != null) { 232 if (this.inputElement() != null) {
236 var value; 233 var value;
237 234
238 switch(this.recordField().type()) { 235 switch(this.recordField().type()) {
239 case 'TXT': 236 case 'TXT':
240 case 'URL': 237 case 'URL':
241 case 'ADDR': 238 case 'ADDR':
242 case 'PWD': 239 case 'PWD':
243 case 'DATE': 240 case 'DATE':
244 value = this.inputElement().dom.value; 241 value = this.inputElement().dom.value;
245 break; 242 break;
246 } 243 }
247 this.setValue(value); 244 this.setValue(value);
248 } 245 }
249//MochiKit.Logging.logDebug("<<< FieldValueComponent.synchronizeComponentValues"); 246//MochiKit.Logging.logDebug("<<< FieldValueComponent.synchronizeComponentValues");
250 }, 247 },
251 248
252 //------------------------------------------------------------------------- 249 //-------------------------------------------------------------------------
253 250
254 'selectHiddenFieldOnFocus': function(anEvent) { 251 'selectHiddenFieldOnFocus': function(anEvent) {
255 anEvent.src().select(); 252 anEvent.src().select();
256 }, 253 },
257 254
258 //------------------------------------------------------------------------- 255 //-------------------------------------------------------------------------
259 256
260 'toggleScramble': function(anEvent) { 257 'toggleScramble': function(anEvent) {
261 this.synchronizeComponentValues(); 258 this.synchronizeComponentValues();
262 259
263 if (this.scrambledStatus() == 'SCRAMBLED') { 260 if (this.scrambledStatus() == 'SCRAMBLED') {
264 this.setScrambledStatus('UNSCRAMBLED'); 261 this.setScrambledStatus('UNSCRAMBLED');
265 } else { 262 } else {
266 this.setScrambledStatus('SCRAMBLED'); 263 this.setScrambledStatus('SCRAMBLED');
267 }; 264 };
268 265
269 this.update(); 266 this.update();
270 }, 267 },
271 268
272 //------------------------------------------------------------------------- 269 //-------------------------------------------------------------------------
273 __syntaxFix__: "syntax fix" 270 __syntaxFix__: "syntax fix"
274}); 271});
275 272
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js
index 7aaca3e..46f456b 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js
@@ -1,165 +1,162 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Components.RecordDetail.HeaderComponent = function(anElement, args) { 33Clipperz.PM.Components.RecordDetail.HeaderComponent = function(anElement, args) {
37 args = args || {}; 34 args = args || {};
38 35
39 Clipperz.PM.Components.RecordDetail.HeaderComponent.superclass.constructor.call(this, anElement, args); 36 Clipperz.PM.Components.RecordDetail.HeaderComponent.superclass.constructor.call(this, anElement, args);
40 this.mainComponent().addEditComponent(this); 37 this.mainComponent().addEditComponent(this);
41 38
42 this._saveButton = null; 39 this._saveButton = null;
43 40
44 this.render(); 41 this.render();
45 42
46 return this; 43 return this;
47} 44}
48 45
49//============================================================================= 46//=============================================================================
50 47
51YAHOO.extendX(Clipperz.PM.Components.RecordDetail.HeaderComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 48YAHOO.extendX(Clipperz.PM.Components.RecordDetail.HeaderComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
52 49
53 'toString': function() { 50 'toString': function() {
54 return "Clipperz.PM.Components.RecordDetail.HeaderComponent component"; 51 return "Clipperz.PM.Components.RecordDetail.HeaderComponent component";
55 }, 52 },
56 53
57 //------------------------------------------------------------------------- 54 //-------------------------------------------------------------------------
58 55
59 'render': function() { 56 'render': function() {
60 var editButton; 57 var editButton;
61 58
62//MochiKit.Logging.logDebug(">>> RecordDetail.HeaderComponent.appendTo"); 59//MochiKit.Logging.logDebug(">>> RecordDetail.HeaderComponent.appendTo");
63 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'recordDetailButtonsBox', children:[ 60 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'recordDetailButtonsBox', children:[
64 {tag:'div', id:this.getId('editButtonBox'), children:[ 61 {tag:'div', id:this.getId('editButtonBox'), children:[
65 {tag:'table', cls:'recordDetailButtonsTABLE', border:'0', cellpadding:'0', cellspacing:'0', children:[ 62 {tag:'table', cls:'recordDetailButtonsTABLE', border:'0', cellpadding:'0', cellspacing:'0', children:[
66 {tag:'tbody', children:[ 63 {tag:'tbody', children:[
67 {tag:'tr', children:[ 64 {tag:'tr', children:[
68 {tag:'td', align:'center', children:[ 65 {tag:'td', align:'center', children:[
69 {tag:'div', id:this.getId('editButton')} 66 {tag:'div', id:this.getId('editButton')}
70 ]} 67 ]}
71 ]} 68 ]}
72 ]} 69 ]}
73 ]} 70 ]}
74 ]}, 71 ]},
75 {tag:'div', id:this.getId('saveCancelButtonBox'), children:[ 72 {tag:'div', id:this.getId('saveCancelButtonBox'), children:[
76 {tag:'table', cls:'recordDetailButtonsTABLE', border:'0', cellpadding:'0', cellspacing:'0', children:[ 73 {tag:'table', cls:'recordDetailButtonsTABLE', border:'0', cellpadding:'0', cellspacing:'0', children:[
77 {tag:'tbody', children:[ 74 {tag:'tbody', children:[
78 {tag:'tr', children:[ 75 {tag:'tr', children:[
79 {tag:'td', width:'49%', align:'right', children:[ 76 {tag:'td', width:'49%', align:'right', children:[
80 {tag:'div', id:this.getId('saveButton')} 77 {tag:'div', id:this.getId('saveButton')}
81 ]}, 78 ]},
82 {tag:'td', html:'&nbsp'}, 79 {tag:'td', html:'&nbsp'},
83 {tag:'td', width:'49%', align:'left', children:[ 80 {tag:'td', width:'49%', align:'left', children:[
84 {tag:'div', id:this.getId('cancelButton')} 81 {tag:'div', id:this.getId('cancelButton')}
85 ]} 82 ]}
86 ]} 83 ]}
87 ]} 84 ]}
88 ]} 85 ]}
89 ]} 86 ]}
90 ]}); 87 ]});
91 88
92 this.getElement('editButtonBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 89 this.getElement('editButtonBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
93 this.getElement('saveCancelButtonBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 90 this.getElement('saveCancelButtonBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
94 91
95 editButton = new YAHOO.ext.Button(this.getDom('editButton'), {text:Clipperz.PM.Strings['recordDetailEditButtonLabel'], handler:this.editButtonHandler, scope:this}); 92 editButton = new YAHOO.ext.Button(this.getDom('editButton'), {text:Clipperz.PM.Strings['recordDetailEditButtonLabel'], handler:this.editButtonHandler, scope:this});
96 this.setSaveButton(new YAHOO.ext.Button(this.getDom('saveButton'), {text:Clipperz.PM.Strings['recordDetailSaveButtonLabel'], handler:this.saveButtonHandler, scope:this})); 93 this.setSaveButton(new YAHOO.ext.Button(this.getDom('saveButton'), {text:Clipperz.PM.Strings['recordDetailSaveButtonLabel'], handler:this.saveButtonHandler, scope:this}));
97 new YAHOO.ext.Button(this.getDom('cancelButton'), {text:Clipperz.PM.Strings['recordDetailCancelButtonLabel'], handler:this.cancelButtonHandler, scope:this}); 94 new YAHOO.ext.Button(this.getDom('cancelButton'), {text:Clipperz.PM.Strings['recordDetailCancelButtonLabel'], handler:this.cancelButtonHandler, scope:this});
98 95
99 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { 96 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) {
100 editButton.disable(); 97 editButton.disable();
101 } 98 }
102 99
103 this.update(); 100 this.update();
104//MochiKit.Logging.logDebug("<<< RecordDetail.HeaderComponent.appendTo"); 101//MochiKit.Logging.logDebug("<<< RecordDetail.HeaderComponent.appendTo");
105 }, 102 },
106 103
107 //------------------------------------------------------------------------- 104 //-------------------------------------------------------------------------
108 105
109 'updateViewMode': function() { 106 'updateViewMode': function() {
110//MochiKit.Logging.logDebug(">>> HeaderComponent.updateViewMode"); 107//MochiKit.Logging.logDebug(">>> HeaderComponent.updateViewMode");
111 this.getElement('editButtonBox').show(); 108 this.getElement('editButtonBox').show();
112 this.getElement('saveCancelButtonBox').hide(); 109 this.getElement('saveCancelButtonBox').hide();
113//MochiKit.Logging.logDebug("<<< HeaderComponent.updateViewMode"); 110//MochiKit.Logging.logDebug("<<< HeaderComponent.updateViewMode");
114 }, 111 },
115 112
116 //------------------------------------------------------------------------- 113 //-------------------------------------------------------------------------
117 114
118 'updateEditMode': function() { 115 'updateEditMode': function() {
119 this.getElement('editButtonBox').hide(); 116 this.getElement('editButtonBox').hide();
120 this.getElement('saveCancelButtonBox').show(); 117 this.getElement('saveCancelButtonBox').show();
121 if (this.mainComponent().enableSaveButton() == true) { 118 if (this.mainComponent().enableSaveButton() == true) {
122//MochiKit.Logging.logDebug("--- HeaderComponent.updateViewMode - ENABLE"); 119//MochiKit.Logging.logDebug("--- HeaderComponent.updateViewMode - ENABLE");
123 this.saveButton().enable(); 120 this.saveButton().enable();
124 } else { 121 } else {
125 this.saveButton().disable(); 122 this.saveButton().disable();
126 } 123 }
127 }, 124 },
128 125
129 //------------------------------------------------------------------------- 126 //-------------------------------------------------------------------------
130 127
131 'saveButton': function() { 128 'saveButton': function() {
132 return this._saveButton; 129 return this._saveButton;
133 }, 130 },
134 131
135 'setSaveButton': function(aValue) { 132 'setSaveButton': function(aValue) {
136 this._saveButton = aValue; 133 this._saveButton = aValue;
137 }, 134 },
138 135
139 //------------------------------------------------------------------------- 136 //-------------------------------------------------------------------------
140 137
141 'editButtonHandler': function(anEvent) { 138 'editButtonHandler': function(anEvent) {
142 this.mainComponent().setEditMode('EDIT'); 139 this.mainComponent().setEditMode('EDIT');
143 }, 140 },
144 141
145 //------------------------------------------------------------------------- 142 //-------------------------------------------------------------------------
146 143
147 'saveButtonHandler': function(anEvent) { 144 'saveButtonHandler': function(anEvent) {
148//MochiKit.Logging.logDebug(">>> RecordDetail.HeaderComponent.saveButtonHandler"); 145//MochiKit.Logging.logDebug(">>> RecordDetail.HeaderComponent.saveButtonHandler");
149 this.mainComponent().setEditMode('VIEW', this.getElement('saveButton')); 146 this.mainComponent().setEditMode('VIEW', this.getElement('saveButton'));
150//MochiKit.Logging.logDebug("<<< RecordDetail.HeaderComponent.saveButtonHandler"); 147//MochiKit.Logging.logDebug("<<< RecordDetail.HeaderComponent.saveButtonHandler");
151 }, 148 },
152 149
153 //------------------------------------------------------------------------- 150 //-------------------------------------------------------------------------
154 151
155 'cancelButtonHandler': function(anEvent) { 152 'cancelButtonHandler': function(anEvent) {
156 this.record().cancelChanges(); 153 this.record().cancelChanges();
157//MochiKit.Logging.logDebug("--- HeaderComponent.cancelButtonHandler - " + Clipperz.Base.serializeJSON(this.record().currentDataSnapshot())); 154//MochiKit.Logging.logDebug("--- HeaderComponent.cancelButtonHandler - " + Clipperz.Base.serializeJSON(this.record().currentDataSnapshot()));
158 this.mainComponent().setEditMode('VIEW', null, true); 155 this.mainComponent().setEditMode('VIEW', null, true);
159 }, 156 },
160 157
161 //------------------------------------------------------------------------- 158 //-------------------------------------------------------------------------
162 159
163 __syntaxFix__: "syntax fix" 160 __syntaxFix__: "syntax fix"
164}); 161});
165 162
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js
index 53bf9c5..d6a03d7 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Components.RecordDetail.MainComponent = function(anElement, args) { 33Clipperz.PM.Components.RecordDetail.MainComponent = function(anElement, args) {
37 args = args || {}; 34 args = args || {};
38 35
39 Clipperz.PM.Components.RecordDetail.MainComponent.superclass.constructor.call(this, anElement, args); 36 Clipperz.PM.Components.RecordDetail.MainComponent.superclass.constructor.call(this, anElement, args);
40 37
41 //this._element = args.element; 38 //this._element = args.element;
42 this._user = args.user; 39 this._user = args.user;
43 this._editMode = args.editMode || 'VIEW'; //[ 'VIEW' | 'EDIT' ] 40 this._editMode = args.editMode || 'VIEW'; //[ 'VIEW' | 'EDIT' ]
44 this._mainPanel = args.mainPanel; 41 this._mainPanel = args.mainPanel;
45 42
46 this._record = null; 43 this._record = null;
47 this._editComponents = []; 44 this._editComponents = [];
48 this._addFieldButton = null; 45 this._addFieldButton = null;
49 46
50 this._enableSaveButton = true; 47 this._enableSaveButton = true;
51 this._shouldShowLoginInfo = (Clipperz.PM.Proxy.defaultProxy.isReadOnly() ? false : true); 48 this._shouldShowLoginInfo = (Clipperz.PM.Proxy.defaultProxy.isReadOnly() ? false : true);
52 49
53 //this._mainLayoutManager = null; 50 //this._mainLayoutManager = null;
54 //this._layoutRegion = null; 51 //this._layoutRegion = null;
55 52
56 Clipperz.NotificationCenter.register(null, 'loadingRecordData', this, 'render'); 53 Clipperz.NotificationCenter.register(null, 'loadingRecordData', this, 'render');
57 Clipperz.NotificationCenter.register(null, 'decryptingRecordData', this, 'render'); 54 Clipperz.NotificationCenter.register(null, 'decryptingRecordData', this, 'render');
58 Clipperz.NotificationCenter.register(null, 'loadingRecordVersionData', this, 'render'); 55 Clipperz.NotificationCenter.register(null, 'loadingRecordVersionData', this, 'render');
59 Clipperz.NotificationCenter.register(null, 'decryptingRecordVersionData', this, 'render'); 56 Clipperz.NotificationCenter.register(null, 'decryptingRecordVersionData', this, 'render');
60 Clipperz.NotificationCenter.register(null, 'setupDone', this, 'render'); 57 Clipperz.NotificationCenter.register(null, 'setupDone', this, 'render');
61 Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'render'); 58 Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'render');
62 59
63 this.render(); 60 this.render();
64 61
65 return this; 62 return this;
66} 63}
67 64
68//============================================================================= 65//=============================================================================
69 66
70YAHOO.extendX(Clipperz.PM.Components.RecordDetail.MainComponent, Clipperz.PM.Components.BaseComponent, { 67YAHOO.extendX(Clipperz.PM.Components.RecordDetail.MainComponent, Clipperz.PM.Components.BaseComponent, {
71 68
72 'toString': function() { 69 'toString': function() {
73 return "Clipperz.PM.Components.RecordDetail.MainComponent component"; 70 return "Clipperz.PM.Components.RecordDetail.MainComponent component";
74 }, 71 },
75 72
76 //------------------------------------------------------------------------- 73 //-------------------------------------------------------------------------
77 74
78 'editMode': function() { 75 'editMode': function() {
79 return this._editMode; 76 return this._editMode;
80 }, 77 },
81 78
82 'setEditMode': function(aValue, aButtonElement, shouldSkipComponentSynchronization) { 79 'setEditMode': function(aValue, aButtonElement, shouldSkipComponentSynchronization) {
83//MochiKit.Logging.logDebug(">>> MainComponent.setEditingMode"); 80//MochiKit.Logging.logDebug(">>> MainComponent.setEditingMode");
84 this.scrollToTop(); 81 this.scrollToTop();
85 82
86 if (aValue == 'VIEW') { 83 if (aValue == 'VIEW') {
87 if (shouldSkipComponentSynchronization == true) { 84 if (shouldSkipComponentSynchronization == true) {
88 this.exitModalView(); 85 this.exitModalView();
89 } else { 86 } else {
90 this.synchronizeComponentValues(); 87 this.synchronizeComponentValues();
91 if (this.record().hasPendingChanges()) { 88 if (this.record().hasPendingChanges()) {
92 if (this.record().isBrandNew()) { 89 if (this.record().isBrandNew()) {
93 this.record().removeEmptyFields(); 90 this.record().removeEmptyFields();
94 } 91 }
95 this.saveCurrentRecordChanges(aButtonElement); 92 this.saveCurrentRecordChanges(aButtonElement);
96 } else { 93 } else {
97 if (this.record().isBrandNew()) { 94 if (this.record().isBrandNew()) {
98 this.record().user().removeRecord(this.record()); 95 this.record().user().removeRecord(this.record());
99 } 96 }
100 this.exitModalView(); 97 this.exitModalView();
101 } 98 }
102 } 99 }
103 } else if (aValue == 'EDIT') { 100 } else if (aValue == 'EDIT') {
104 this.enterModalView(); 101 this.enterModalView();
105 } else { 102 } else {
106 //???? 103 //????
107 } 104 }
108 105
109 this._editMode = aValue; 106 this._editMode = aValue;
110 this.render(); 107 this.render();
111 }, 108 },
112 109
113 //------------------------------------------------------------------------- 110 //-------------------------------------------------------------------------
114 111
115 'user': function() { 112 'user': function() {
116 return this._user; 113 return this._user;
117 }, 114 },
118 115
119 //------------------------------------------------------------------------- 116 //-------------------------------------------------------------------------
120 117
121 'mainPanel': function() { 118 'mainPanel': function() {
122 return this._mainPanel; 119 return this._mainPanel;
123 }, 120 },
124 121
125 //------------------------------------------------------------------------- 122 //-------------------------------------------------------------------------
126 123
127 'render': function() { 124 'render': function() {
128//MochiKit.Logging.logDebug(">>> RecordDetail.MainComponent.render"); 125//MochiKit.Logging.logDebug(">>> RecordDetail.MainComponent.render");
129 this.setEnableSaveButton(true); 126 this.setEnableSaveButton(true);
130 this.element().update(""); 127 this.element().update("");
131 128
132 if (this.record() == null) { 129 if (this.record() == null) {
133 if (MochiKit.Base.keys(this.user().records()).length == 0) { 130 if (MochiKit.Base.keys(this.user().records()).length == 0) {
134 this.renderWithNoRecordAtAll(); 131 this.renderWithNoRecordAtAll();
135 } else { 132 } else {
136 this.renderWithNoSelectedRecord(); 133 this.renderWithNoSelectedRecord();
137 } 134 }
138 } else { 135 } else {
139 this.renderWithSelectedRecord(); 136 this.renderWithSelectedRecord();
140 } 137 }
141//MochiKit.Logging.logDebug("<<< RecordDetail.MainComponent.render"); 138//MochiKit.Logging.logDebug("<<< RecordDetail.MainComponent.render");
142 }, 139 },
143 140
144 //------------------------------------------------------------------------- 141 //-------------------------------------------------------------------------
145 142
146 'renderWithNoRecordAtAll': function() { 143 'renderWithNoRecordAtAll': function() {
147//MochiKit.Logging.logDebug(">>> RecordDetail.MainComponent.renderWithNoRecordAtAll"); 144//MochiKit.Logging.logDebug(">>> RecordDetail.MainComponent.renderWithNoRecordAtAll");
148 Clipperz.YUI.DomHelper.append(this.element().dom, 145 Clipperz.YUI.DomHelper.append(this.element().dom,
149 {tag:'form', cls:'noRecordAtAllFORM', children:[ 146 {tag:'form', cls:'noRecordAtAllFORM', children:[
150 {tag:'div', cls:'recordTitleBlock', children:[ 147 {tag:'div', cls:'recordTitleBlock', children:[
151 {tag:'h2', id:'recordTitle', htmlString:Clipperz.PM.Strings['recordDetailNoRecordAtAllTitle']} 148 {tag:'h2', id:'recordTitle', htmlString:Clipperz.PM.Strings['recordDetailNoRecordAtAllTitle']}
152 ]}, 149 ]},
153 {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ 150 {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[
154 {tag:'tbody', children:[ 151 {tag:'tbody', children:[
155 {tag:'tr', children:[ 152 {tag:'tr', children:[
156 {tag:'td', colspan:'5', children:[ 153 {tag:'td', colspan:'5', children:[
157 {tag:'div', cls:'recordDetailDescriptionBox', htmlString:Clipperz.PM.Strings['recordDetailNoRecordAtAllDescription']} 154 {tag:'div', cls:'recordDetailDescriptionBox', htmlString:Clipperz.PM.Strings['recordDetailNoRecordAtAllDescription']}
158 ]} 155 ]}
159 ]} 156 ]}
160 ]} 157 ]}
161 ]} 158 ]}
162 ]} 159 ]}
163 ); 160 );
164//MochiKit.Logging.logDebug("<<< RecordDetail.MainComponent.renderWithNoRecordAtAll"); 161//MochiKit.Logging.logDebug("<<< RecordDetail.MainComponent.renderWithNoRecordAtAll");
165 }, 162 },
166 163
167 //------------------------------------------------------------------------- 164 //-------------------------------------------------------------------------
168 165
169 'renderWithNoSelectedRecord': function() { 166 'renderWithNoSelectedRecord': function() {
170//MochiKit.Logging.logDebug(">>> RecordDetail.MainComponent.renderWithNoSelectedRecord"); 167//MochiKit.Logging.logDebug(">>> RecordDetail.MainComponent.renderWithNoSelectedRecord");
171 Clipperz.YUI.DomHelper.append(this.element().dom, 168 Clipperz.YUI.DomHelper.append(this.element().dom,
172 {tag:'form', cls:'noRecordSelectedFORM', children:[ 169 {tag:'form', cls:'noRecordSelectedFORM', children:[
173 {tag:'div', cls:'recordTitleBlock', children:[ 170 {tag:'div', cls:'recordTitleBlock', children:[
174 {tag:'h2', id:'recordTitle', htmlString:Clipperz.PM.Strings['recordDetailNoRecordSelectedTitle']} 171 {tag:'h2', id:'recordTitle', htmlString:Clipperz.PM.Strings['recordDetailNoRecordSelectedTitle']}
175 ]}, 172 ]},
176 {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ 173 {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[
177 {tag:'tbody', children:[ 174 {tag:'tbody', children:[
178 {tag:'tr', children:[ 175 {tag:'tr', children:[
179 {tag:'td', colspan:'5', children:[ 176 {tag:'td', colspan:'5', children:[
180 {tag:'div', cls:'recordDetailDescriptionBox', htmlString:Clipperz.PM.Strings['recordDetailNoRecordSelectedDescription']} 177 {tag:'div', cls:'recordDetailDescriptionBox', htmlString:Clipperz.PM.Strings['recordDetailNoRecordSelectedDescription']}
181 ]} 178 ]}
182 ]}, 179 ]},
183 {tag:'tr', colspan:'5', children:[ 180 {tag:'tr', colspan:'5', children:[
184 {tag:'td', colspan:'5', children:this.loginInfo()} 181 {tag:'td', colspan:'5', children:this.loginInfo()}
185 ]} 182 ]}
186 ]} 183 ]}
187 ]} 184 ]}
188 ]} 185 ]}
189 ); 186 );
190//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithNoSelectedRecord - 1"); 187//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithNoSelectedRecord - 1");
191 188
192 if (MochiKit.DOM.getElement('fullLoginHistoryLink') != null) { 189 if (MochiKit.DOM.getElement('fullLoginHistoryLink') != null) {
193 MochiKit.Signal.connect('fullLoginHistoryLink', 'onclick', this, 'showLoginHistoryPanel'); 190 MochiKit.Signal.connect('fullLoginHistoryLink', 'onclick', this, 'showLoginHistoryPanel');
194 } 191 }
195//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithNoSelectedRecord - 2"); 192//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithNoSelectedRecord - 2");
196 193
197 if (MochiKit.DOM.getElement('offlineCopyDownloadWarningLink') != null) { 194 if (MochiKit.DOM.getElement('offlineCopyDownloadWarningLink') != null) {
198 MochiKit.Signal.connect('offlineCopyDownloadWarningLink', 'onclick', this, 'showDownloadOfflineCopyPanel'); 195 MochiKit.Signal.connect('offlineCopyDownloadWarningLink', 'onclick', this, 'showDownloadOfflineCopyPanel');
199 } 196 }
200//MochiKit.Logging.logDebug("<<< RecordDetail.MainComponent.renderWithNoSelectedRecord"); 197//MochiKit.Logging.logDebug("<<< RecordDetail.MainComponent.renderWithNoSelectedRecord");
201 }, 198 },
202 199
203 //------------------------------------------------------------------------- 200 //-------------------------------------------------------------------------
204 201
205 'renderWithSelectedRecord': function() { 202 'renderWithSelectedRecord': function() {
206//MochiKit.Logging.logDebug(">>> RecordDetail.MainComponent.renderWithSelectedRecord"); 203//MochiKit.Logging.logDebug(">>> RecordDetail.MainComponent.renderWithSelectedRecord");
207 if (this.record().shouldLoadData() === true) { 204 if (this.record().shouldLoadData() === true) {
208 // this.renderWithSelectedRecordLoading(); 205 // this.renderWithSelectedRecordLoading();
209//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 1.1"); 206//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 1.1");
210 this.renderWhileProcessingWithMessage(Clipperz.PM.Strings['recordDetailLoadingRecordMessage']); 207 this.renderWhileProcessingWithMessage(Clipperz.PM.Strings['recordDetailLoadingRecordMessage']);
211//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 1.2"); 208//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 1.2");
212 } else if (this.record().shouldDecryptData() === true) { 209 } else if (this.record().shouldDecryptData() === true) {
213 // this.renderWithSelectedRecordDecrypting(); 210 // this.renderWithSelectedRecordDecrypting();
214//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 2.1"); 211//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 2.1");
215 this.renderWhileProcessingWithMessage(Clipperz.PM.Strings['recordDetailDecryptingRecordMessage']); 212 this.renderWhileProcessingWithMessage(Clipperz.PM.Strings['recordDetailDecryptingRecordMessage']);
216//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 2.2"); 213//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 2.2");
217 } else if (this.record().currentVersion().shouldLoadData() === true) { 214 } else if (this.record().currentVersion().shouldLoadData() === true) {
218//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 3.1"); 215//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 3.1");
219 this.renderWhileProcessingWithMessage(Clipperz.PM.Strings['recordDetailLoadingRecordVersionMessage']); 216 this.renderWhileProcessingWithMessage(Clipperz.PM.Strings['recordDetailLoadingRecordVersionMessage']);
220//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 3.2"); 217//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 3.2");
221 } else if (this.record().currentVersion().shouldDecryptData() === true) { 218 } else if (this.record().currentVersion().shouldDecryptData() === true) {
222 // this.renderWithSelectedRecordCurrentVersionDecrypting(); 219 // this.renderWithSelectedRecordCurrentVersionDecrypting();
223//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 4.1"); 220//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 4.1");
224 this.renderWhileProcessingWithMessage(Clipperz.PM.Strings['recordDetailDecryptingRecordVersionMessage']); 221 this.renderWhileProcessingWithMessage(Clipperz.PM.Strings['recordDetailDecryptingRecordVersionMessage']);
225//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 4.2"); 222//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 4.2");
226 } else { 223 } else {
227//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 5.1"); 224//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 5.1");
228 this.renderWithSelectedRecordData(); 225 this.renderWithSelectedRecordData();
229//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 5.2"); 226//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 5.2");
230 } 227 }
231//MochiKit.Logging.logDebug("<<< RecordDetail.MainComponent.renderWithSelectedRecord"); 228//MochiKit.Logging.logDebug("<<< RecordDetail.MainComponent.renderWithSelectedRecord");
232 }, 229 },
233 230
234 //......................................................................... 231 //.........................................................................
235 232
236 'renderWhileProcessingWithMessage': function(aMessage) { 233 'renderWhileProcessingWithMessage': function(aMessage) {
237//MochiKit.Logging.logDebug(">>> RecordDetail.MainComponent.renderWhileProcessingWithMessage"); 234//MochiKit.Logging.logDebug(">>> RecordDetail.MainComponent.renderWhileProcessingWithMessage");
238 Clipperz.YUI.DomHelper.append(this.element().dom, 235 Clipperz.YUI.DomHelper.append(this.element().dom,
239 {tag:'form', cls:'processingRecordFORM', children:[ 236 {tag:'form', cls:'processingRecordFORM', children:[
240 {tag:'div', cls:'recordTitleBlock', children:[ 237 {tag:'div', cls:'recordTitleBlock', children:[
241 {tag:'h2', id:'recordTitle', html:this.record().label()} 238 {tag:'h2', id:'recordTitle', html:this.record().label()}
242 ]}, 239 ]},
243 {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ 240 {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[
244 {tag:'tbody', children:[ 241 {tag:'tbody', children:[
245 {tag:'tr', cls:'recordTR', children:[ 242 {tag:'tr', cls:'recordTR', children:[
246 {tag:'td', colspan:'5', children:[ 243 {tag:'td', colspan:'5', children:[
247 {tag:'div', cls:'recordDetailDescriptionBox', children:[ 244 {tag:'div', cls:'recordDetailDescriptionBox', children:[
248 {tag:'h5', cls:'recordLoadingMessage', html:aMessage} 245 {tag:'h5', cls:'recordLoadingMessage', html:aMessage}
249 ]} 246 ]}
250 ]} 247 ]}
251 ]} 248 ]}
252 ]} 249 ]}
253 ]} 250 ]}
254 ]} 251 ]}
255 ); 252 );
256//MochiKit.Logging.logDebug("<<< RecordDetail.MainComponent.renderWhileProcessingWithMessage"); 253//MochiKit.Logging.logDebug("<<< RecordDetail.MainComponent.renderWhileProcessingWithMessage");
257 }, 254 },
258 255
259 //......................................................................... 256 //.........................................................................
260/* 257/*
261 'renderWithSelectedRecordLoading': function() { 258 'renderWithSelectedRecordLoading': function() {
262 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'', style:'border:1px solid red; padding: 20px;', children:[ 259 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'', style:'border:1px solid red; padding: 20px;', children:[
263 {tag:'div', cls:'Clipprez_RecordDetailTitle', children:[ 260 {tag:'div', cls:'Clipprez_RecordDetailTitle', children:[
264 {tag:'h3', html:this.record().label()}, 261 {tag:'h3', html:this.record().label()},
265 {tag:'h3', html:"loading"} 262 {tag:'h3', html:"loading"}
266 ]} 263 ]}
267 ]}); 264 ]});
268 }, 265 },
269 266
270 //......................................................................... 267 //.........................................................................
271 268
272 'renderWithSelectedRecordDecrypting': function() { 269 'renderWithSelectedRecordDecrypting': function() {
273 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'', style:'border:1px solid red; padding: 20px;', children:[ 270 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'', style:'border:1px solid red; padding: 20px;', children:[
274 {tag:'div', cls:'Clipprez_RecordDetailTitle', children:[ 271 {tag:'div', cls:'Clipprez_RecordDetailTitle', children:[
275 {tag:'h3', html:this.record().label()}, 272 {tag:'h3', html:this.record().label()},
276 {tag:'h3', html:"decrypting ... "} 273 {tag:'h3', html:"decrypting ... "}
277 ]} 274 ]}
278 ]}); 275 ]});
279 }, 276 },
280 277
281 //......................................................................... 278 //.........................................................................
282 279
283 'renderWithSelectedRecordCurrentVersionDecrypting': function() { 280 'renderWithSelectedRecordCurrentVersionDecrypting': function() {
284 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'', style:'border:1px solid red; padding: 20px;', children:[ 281 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'', style:'border:1px solid red; padding: 20px;', children:[
285 {tag:'div', cls:'Clipprez_RecordDetailTitle', children:[ 282 {tag:'div', cls:'Clipprez_RecordDetailTitle', children:[
286 {tag:'h3', html:this.record().label()}, 283 {tag:'h3', html:this.record().label()},
287 {tag:'h3', html:"decrypting version ... "} 284 {tag:'h3', html:"decrypting version ... "}
288 ]} 285 ]}
289 ]}); 286 ]});
290 }, 287 },
291*/ 288*/
292 //------------------------------------------------------------------------- 289 //-------------------------------------------------------------------------
293 290
294 'renderWithErrorMessage': function(anErrorMessage) { 291 'renderWithErrorMessage': function(anErrorMessage) {
295//MochiKit.Logging.logDebug(">>> RecordDetail.MainComponent.renderWithErrorMessage"); 292//MochiKit.Logging.logDebug(">>> RecordDetail.MainComponent.renderWithErrorMessage");
296 this.element().update(""); 293 this.element().update("");
297 294
298//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithErrorMessage - 1"); 295//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithErrorMessage - 1");
299 Clipperz.YUI.DomHelper.append(this.element().dom, 296 Clipperz.YUI.DomHelper.append(this.element().dom,
300 {tag:'form', cls:'errorMessageFORM', children:[ 297 {tag:'form', cls:'errorMessageFORM', children:[
301 {tag:'div', cls:'recordTitleBlock', children:[ 298 {tag:'div', cls:'recordTitleBlock', children:[
302 {tag:'h2', id:'recordTitle', html:this.record().label()} 299 {tag:'h2', id:'recordTitle', html:this.record().label()}
303 ]}, 300 ]},
304 {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ 301 {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[
305 {tag:'tbody', children:[ 302 {tag:'tbody', children:[
306 {tag:'tr', cls:'recordTR', children:[ 303 {tag:'tr', cls:'recordTR', children:[
307 {tag:'td', colspan:'5', children:[ 304 {tag:'td', colspan:'5', children:[
308 {tag:'div', cls:'recordDetailDescriptionBox loadingError', children:[ 305 {tag:'div', cls:'recordDetailDescriptionBox loadingError', children:[
309 {tag:'h5', htmlString:Clipperz.PM.Strings['recordDetailLoadingErrorMessageTitle']}, 306 {tag:'h5', htmlString:Clipperz.PM.Strings['recordDetailLoadingErrorMessageTitle']},
310 {tag:'p', html:anErrorMessage.message} 307 {tag:'p', html:anErrorMessage.message}
311 ]} 308 ]}
312 ]} 309 ]}
313 ]} 310 ]}
314 ]} 311 ]}
315 ]} 312 ]}
316 ]} 313 ]}
317 ); 314 );
318//MochiKit.Logging.logDebug("<<< RecordDetail.MainComponent.renderWithErrorMessage"); 315//MochiKit.Logging.logDebug("<<< RecordDetail.MainComponent.renderWithErrorMessage");
319 }, 316 },
320 317
321 //------------------------------------------------------------------------- 318 //-------------------------------------------------------------------------
322 319
323 'renderWithSelectedRecordData': function() { 320 'renderWithSelectedRecordData': function() {
324 varcolumns; 321 varcolumns;
325 322
326 this.resetEditComponents(); 323 this.resetEditComponents();
327 324
328 columns = [ 325 columns = [
329 {tag:'td', width:'25', html:'&#160'}, 326 {tag:'td', width:'25', html:'&#160'},
330 {tag:'td', width:'25%', htmlString:Clipperz.PM.Strings['recordDetailLabelFieldColumnLabel']}, 327 {tag:'td', width:'25%', htmlString:Clipperz.PM.Strings['recordDetailLabelFieldColumnLabel']},
331 {tag:'td', width:'3', html:'&#160'}, 328 {tag:'td', width:'3', html:'&#160'},
332 {tag:'td', /*width:'80%',*/ htmlString:Clipperz.PM.Strings['recordDetailDataFieldColumnLabel']} 329 {tag:'td', /*width:'80%',*/ htmlString:Clipperz.PM.Strings['recordDetailDataFieldColumnLabel']}
333 ]; 330 ];
334 331
335 if (this.editMode() == 'EDIT') { 332 if (this.editMode() == 'EDIT') {
336 columns.push({tag:'td', /*width:'55',*/ htmlString:Clipperz.PM.Strings['recordDetailTypeFieldColumnLabel']}) 333 columns.push({tag:'td', /*width:'55',*/ htmlString:Clipperz.PM.Strings['recordDetailTypeFieldColumnLabel']})
337 } 334 }
338 335
339//MochiKit.Logging.logDebug(">>> RecordDetail.MainComponent.renderWithSelectedRecordData"); 336//MochiKit.Logging.logDebug(">>> RecordDetail.MainComponent.renderWithSelectedRecordData");
340 Clipperz.YUI.DomHelper.append(this.element().dom, 337 Clipperz.YUI.DomHelper.append(this.element().dom,
341 {tag:'form', cls:'recordDataFORM', children:[ 338 {tag:'form', cls:'recordDataFORM', children:[
342 {tag:'div', cls:'recordTitleBlock', id:this.getId('title')}, 339 {tag:'div', cls:'recordTitleBlock', id:this.getId('title')},
343 {tag:'div', id:'recordDetailDataBox', cls:'recordDetailDataBox', children:[ 340 {tag:'div', id:'recordDetailDataBox', cls:'recordDetailDataBox', children:[
344 341
345{tag:'table', width:'100%', border:'0', cellspacing:'0', cellpadding:'0', children:[ 342{tag:'table', width:'100%', border:'0', cellspacing:'0', cellpadding:'0', children:[
346 {tag:'tbody', children:[ 343 {tag:'tbody', children:[
347 {tag:'tr', children:[ 344 {tag:'tr', children:[
348 {tag:'td', width:'5', html:"&nbsp;"}, 345 {tag:'td', width:'5', html:"&nbsp;"},
349 {tag:'td', children:[ 346 {tag:'td', children:[
350 347
351 {tag:'table', cls:'recordDetailDataBoxTABLE', border:'0', cellspacing:'0', cellpadding:'0', children:[ 348 {tag:'table', cls:'recordDetailDataBoxTABLE', border:'0', cellspacing:'0', cellpadding:'0', children:[
352 {tag:'tbody', id:this.getId('tbody'), children:[ 349 {tag:'tbody', id:this.getId('tbody'), children:[
353 {tag:'tr', /*cls:'recordNoteTR',*/ children:[ 350 {tag:'tr', /*cls:'recordNoteTR',*/ children:[
354 {tag:'td', colspan:'5', id:this.getId('notes')} 351 {tag:'td', colspan:'5', id:this.getId('notes')}
355 ]}, 352 ]},
356 {tag:'tr', cls:'recordFieldsTR', children:columns /*[ 353 {tag:'tr', cls:'recordFieldsTR', children:columns /*[
357 {tag:'td', width:'25', html:'&#160'}, 354 {tag:'td', width:'25', html:'&#160'},
358 {tag:'td', width:'25%', htmlString:Clipperz.PM.Strings['recordDetailLabelFieldColumnLabel']}, 355 {tag:'td', width:'25%', htmlString:Clipperz.PM.Strings['recordDetailLabelFieldColumnLabel']},
359 {tag:'td', width:'3', html:'&#160'}, 356 {tag:'td', width:'3', html:'&#160'},
360 {tag:'td', / *width:'80%',* / htmlString:Clipperz.PM.Strings['recordDetailDataFieldColumnLabel']}, 357 {tag:'td', / *width:'80%',* / htmlString:Clipperz.PM.Strings['recordDetailDataFieldColumnLabel']},
361 {tag:'td', / *width:'55',* / htmlString:Clipperz.PM.Strings['recordDetailTypeFieldColumnLabel']} 358 {tag:'td', / *width:'55',* / htmlString:Clipperz.PM.Strings['recordDetailTypeFieldColumnLabel']}
362 ] */} 359 ] */}
363 ]} 360 ]}
364 ]}, 361 ]},
365 {tag:'div', cls:'addFieldButton', id:this.getId('addField'), children:[ 362 {tag:'div', cls:'addFieldButton', id:this.getId('addField'), children:[
366 {tag:'div', id:this.getId('addFieldButton')} 363 {tag:'div', id:this.getId('addFieldButton')}
367 ]}, 364 ]},
368 {tag:'div', id:this.getId('directLogins')}, 365 {tag:'div', id:this.getId('directLogins')},
369 {tag:'div', id:this.getId('footer')} 366 {tag:'div', id:this.getId('footer')}
370 367
371 ]} 368 ]}
372 ]} 369 ]}
373 ]} 370 ]}
374]} 371]}
375 372
376 ]} 373 ]}
377 ]} 374 ]}
378 ); 375 );
379 376
380//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecordData - 1"); 377//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecordData - 1");
381 378
382 new Clipperz.PM.Components.RecordDetail.TitleComponent(this.getElement('title'), {mainComponent:this}); 379 new Clipperz.PM.Components.RecordDetail.TitleComponent(this.getElement('title'), {mainComponent:this});
383//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecordData - 2"); 380//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecordData - 2");
384 new Clipperz.PM.Components.RecordDetail.NotesComponent(this.getElement('notes'), {mainComponent:this}); 381 new Clipperz.PM.Components.RecordDetail.NotesComponent(this.getElement('notes'), {mainComponent:this});
385//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecordData - 3"); 382//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecordData - 3");
386 new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent(this.getElement('directLogins'), {mainComponent:this}); 383 new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent(this.getElement('directLogins'), {mainComponent:this});
387//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecordData - 4"); 384//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecordData - 4");
388 new Clipperz.PM.Components.RecordDetail.HeaderComponent(this.getElement('footer'), {mainComponent:this}); 385 new Clipperz.PM.Components.RecordDetail.HeaderComponent(this.getElement('footer'), {mainComponent:this});
389//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecordData - 5"); 386//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecordData - 5");
390 MochiKit.Iter.forEach(MochiKit.Base.values(this.record().currentVersion().fields()), this.appendFieldComponent, this); 387 MochiKit.Iter.forEach(MochiKit.Base.values(this.record().currentVersion().fields()), this.appendFieldComponent, this);
391//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecordData - 6"); 388//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecordData - 6");
392 this.setAddFieldButton(new YAHOO.ext.Button(this.getDom('addFieldButton'), {text:Clipperz.PM.Strings['recordDetailAddFieldButtonLabel'], handler:this.addNewRecordField, scope:this})); 389 this.setAddFieldButton(new YAHOO.ext.Button(this.getDom('addFieldButton'), {text:Clipperz.PM.Strings['recordDetailAddFieldButtonLabel'], handler:this.addNewRecordField, scope:this}));
393//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecordData - 7"); 390//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecordData - 7");
394 391
395 this.update(); 392 this.update();
396 393
397//MochiKit.Logging.logDebug("<<< RecordDetail.MainComponent.renderWithSelectedRecordData"); 394//MochiKit.Logging.logDebug("<<< RecordDetail.MainComponent.renderWithSelectedRecordData");
398 }, 395 },
399 396
400 //------------------------------------------------------------------------- 397 //-------------------------------------------------------------------------
401 398
402 'editComponents': function() { 399 'editComponents': function() {
403 return this._editComponents; 400 return this._editComponents;
404 }, 401 },
405 402
406 'resetEditComponents': function() { 403 'resetEditComponents': function() {
407 this._editComponents = []; 404 this._editComponents = [];
408 }, 405 },
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js
index 6f454fc..2066543 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js
@@ -1,240 +1,237 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36 33
37 34
38Clipperz.PM.Components.RecordDetail.NotesComponent = function(anElement, args) { 35Clipperz.PM.Components.RecordDetail.NotesComponent = function(anElement, args) {
39//MochiKit.Logging.logDebug(">>> new NotesComponent"); 36//MochiKit.Logging.logDebug(">>> new NotesComponent");
40 args = args || {}; 37 args = args || {};
41 38
42 Clipperz.PM.Components.RecordDetail.NotesComponent.superclass.constructor.call(this, anElement, args); 39 Clipperz.PM.Components.RecordDetail.NotesComponent.superclass.constructor.call(this, anElement, args);
43 40
44 this.mainComponent().addEditComponent(this); 41 this.mainComponent().addEditComponent(this);
45 42
46 this._staticOffset = null; 43 this._staticOffset = null;
47 this._componentHeight = 50; 44 this._componentHeight = 50;
48 this._mouseMoveIdentifier = null; 45 this._mouseMoveIdentifier = null;
49 this._mouseUpIdentifier = null; 46 this._mouseUpIdentifier = null;
50 47
51 this.element().setVisibilityMode(YAHOO.ext.Element.DISPLAY); 48 this.element().setVisibilityMode(YAHOO.ext.Element.DISPLAY);
52 49
53 this.render(); 50 this.render();
54//MochiKit.Logging.logDebug("<<< new NotesComponent"); 51//MochiKit.Logging.logDebug("<<< new NotesComponent");
55 52
56 return this; 53 return this;
57} 54}
58 55
59//============================================================================= 56//=============================================================================
60 57
61YAHOO.extendX(Clipperz.PM.Components.RecordDetail.NotesComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 58YAHOO.extendX(Clipperz.PM.Components.RecordDetail.NotesComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
62 59
63 'toString': function() { 60 'toString': function() {
64 return "Clipperz.PM.Components.RecordDetail.NotesComponent component"; 61 return "Clipperz.PM.Components.RecordDetail.NotesComponent component";
65 }, 62 },
66 63
67 //------------------------------------------------------------------------- 64 //-------------------------------------------------------------------------
68 65
69 'value': function() { 66 'value': function() {
70 return this.record().notes(); 67 return this.record().notes();
71 }, 68 },
72 69
73 'setValue': function(aValue) { 70 'setValue': function(aValue) {
74 this.record().setNotes(aValue); 71 this.record().setNotes(aValue);
75 }, 72 },
76 73
77 //------------------------------------------------------------------------- 74 //-------------------------------------------------------------------------
78 75
79 'render': function() { 76 'render': function() {
80//MochiKit.Logging.logDebug(">>> NotesComponent.render"); 77//MochiKit.Logging.logDebug(">>> NotesComponent.render");
81/* 78/*
82 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', colspan:'5', children:[ 79 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', colspan:'5', children:[
83 {tag:'span', cls:'noteFieldLabel', htmlString:Clipperz.PM.Strings['recordDetailNotesLabel']}, 80 {tag:'span', cls:'noteFieldLabel', htmlString:Clipperz.PM.Strings['recordDetailNotesLabel']},
84 {tag:'div', cls:'noteFieldContent', id:this.getId('notes')} 81 {tag:'div', cls:'noteFieldContent', id:this.getId('notes')}
85 ]}); 82 ]});
86 */ 83 */
87 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', cls:'noteFieldLabel', htmlString:Clipperz.PM.Strings['recordDetailNotesLabel']}); 84 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', cls:'noteFieldLabel', htmlString:Clipperz.PM.Strings['recordDetailNotesLabel']});
88 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'noteFieldContent', id:this.getId('notes'), children:[ 85 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'noteFieldContent', id:this.getId('notes'), children:[
89 {tag:'div', id:this.getId('resizableDiv'), cls:'resizable-textarea', children:[ 86 {tag:'div', id:this.getId('resizableDiv'), cls:'resizable-textarea', children:[
90 {tag:'div', id:this.getId('contentView'), cls:'viewMode', html:""}, 87 {tag:'div', id:this.getId('contentView'), cls:'viewMode', html:""},
91 {tag:'div', id:this.getId('contentEdit'), children:[ 88 {tag:'div', id:this.getId('contentEdit'), children:[
92 {tag:'span', children:[ 89 {tag:'span', children:[
93 {tag:'textarea', id:this.getId('textarea'), html:""} 90 {tag:'textarea', id:this.getId('textarea'), html:""}
94 ]} 91 ]}
95 ]}, 92 ]},
96 {tag:'div', id:this.getId('grippie'), cls:'grippie'} 93 {tag:'div', id:this.getId('grippie'), cls:'grippie'}
97 ]} 94 ]}
98 ]}); 95 ]});
99 96
100 this.getElement('contentView').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 97 this.getElement('contentView').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
101 this.getElement('contentEdit').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 98 this.getElement('contentEdit').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
102 99
103 MochiKit.Signal.connect(this.getId('grippie'), 'onmousedown', this, 'startResize'); 100 MochiKit.Signal.connect(this.getId('grippie'), 'onmousedown', this, 'startResize');
104 101
105 this.update(); 102 this.update();
106//MochiKit.Logging.logDebug("<<< NotesComponent.render"); 103//MochiKit.Logging.logDebug("<<< NotesComponent.render");
107 }, 104 },
108 105
109 //------------------------------------------------------------------------- 106 //-------------------------------------------------------------------------
110 107
111 'updateViewMode': function() { 108 'updateViewMode': function() {
112//MochiKit.Logging.logDebug(">>> NotesComponent.updateViewMode"); 109//MochiKit.Logging.logDebug(">>> NotesComponent.updateViewMode");
113 // this.getElement('notes').update(this.value().replace(/\n/g, '<br>')); 110 // this.getElement('notes').update(this.value().replace(/\n/g, '<br>'));
114 111
115 this.getElement('contentView').update(Clipperz.Base.sanitizeString(this.value()).replace(/\n/g, '<br>')); 112 this.getElement('contentView').update(Clipperz.Base.sanitizeString(this.value()).replace(/\n/g, '<br>'));
116 113
117 if (this.isNoteEmpty()) { 114 if (this.isNoteEmpty()) {
118 this.element().hide(); 115 this.element().hide();
119 } else { 116 } else {
120 this.getElement('contentView').show(); 117 this.getElement('contentView').show();
121 this.getElement('contentView').setHeight(this.componentHeight()); 118 this.getElement('contentView').setHeight(this.componentHeight());
122 } 119 }
123 this.getElement('contentEdit').hide(); 120 this.getElement('contentEdit').hide();
124 121
125//MochiKit.Logging.logDebug("<<< NotesComponent.updateViewMode"); 122//MochiKit.Logging.logDebug("<<< NotesComponent.updateViewMode");
126 }, 123 },
127 124
128 //------------------------------------------------------------------------- 125 //-------------------------------------------------------------------------
129 126
130 'updateEditMode': function() { 127 'updateEditMode': function() {
131//MochiKit.Logging.logDebug(">>> NotesComponent.updateEditMode"); 128//MochiKit.Logging.logDebug(">>> NotesComponent.updateEditMode");
132 this.getDom('textarea').value = this.value().replace(/\n/g, Clipperz_normalizedNewLine); 129 this.getDom('textarea').value = this.value().replace(/\n/g, Clipperz_normalizedNewLine);
133 130
134 this.getElement('contentView').hide(); 131 this.getElement('contentView').hide();
135 this.getElement('contentEdit').show(); 132 this.getElement('contentEdit').show();
136 133
137 this.getElement('textarea').setHeight(this.componentHeight()); 134 this.getElement('textarea').setHeight(this.componentHeight());
138//MochiKit.Logging.logDebug("<<< NotesComponent.updateEditMode"); 135//MochiKit.Logging.logDebug("<<< NotesComponent.updateEditMode");
139 }, 136 },
140 137
141 //------------------------------------------------------------------------- 138 //-------------------------------------------------------------------------
142 139
143 'synchronizeComponentValues': function() { 140 'synchronizeComponentValues': function() {
144//MochiKit.Logging.logDebug(">>> NotesComponent.synchronizeComponentValues"); 141//MochiKit.Logging.logDebug(">>> NotesComponent.synchronizeComponentValues");
145 if (this.getElement('textarea') != null) { 142 if (this.getElement('textarea') != null) {
146 this.setValue(this.getDom('textarea').value.replace(/(\x0a\x0d|\x0d\x0a)/g,'\n')); 143 this.setValue(this.getDom('textarea').value.replace(/(\x0a\x0d|\x0d\x0a)/g,'\n'));
147 } 144 }
148//MochiKit.Logging.logDebug("<<< NotesComponent.synchronizeComponentValues"); 145//MochiKit.Logging.logDebug("<<< NotesComponent.synchronizeComponentValues");
149 }, 146 },
150 147
151 //------------------------------------------------------------------------- 148 //-------------------------------------------------------------------------
152 149
153 'componentHeight': function() { 150 'componentHeight': function() {
154 return this._componentHeight; 151 return this._componentHeight;
155 }, 152 },
156 153
157 'setComponentHeight': function(aValue) { 154 'setComponentHeight': function(aValue) {
158 this._componentHeight = aValue; 155 this._componentHeight = aValue;
159 }, 156 },
160 157
161 //------------------------------------------------------------------------- 158 //-------------------------------------------------------------------------
162 159
163 'isNoteEmpty': function() { 160 'isNoteEmpty': function() {
164 return !/[^ \n]/.test(this.value()); 161 return !/[^ \n]/.test(this.value());
165 }, 162 },
166 163
167 //------------------------------------------------------------------------- 164 //-------------------------------------------------------------------------
168 165
169 'staticOffset': function() { 166 'staticOffset': function() {
170 return this._staticOffset; 167 return this._staticOffset;
171 }, 168 },
172 169
173 'setStaticOffset': function(aValue) { 170 'setStaticOffset': function(aValue) {
174 this._staticOffset = aValue; 171 this._staticOffset = aValue;
175 }, 172 },
176 173
177 //------------------------------------------------------------------------- 174 //-------------------------------------------------------------------------
178 175
179 'startResize': function(anEvent) { 176 'startResize': function(anEvent) {
180//MochiKit.Logging.logDebug(">>> startResize"); 177//MochiKit.Logging.logDebug(">>> startResize");
181 if (this.editMode() == 'VIEW') { 178 if (this.editMode() == 'VIEW') {
182 this.setStaticOffset(this.getElement('contentView').getHeight() - anEvent.mouse().page['y']) 179 this.setStaticOffset(this.getElement('contentView').getHeight() - anEvent.mouse().page['y'])
183 } else { 180 } else {
184 this.setStaticOffset(this.getElement('textarea').getHeight() - anEvent.mouse().page['y']) 181 this.setStaticOffset(this.getElement('textarea').getHeight() - anEvent.mouse().page['y'])
185 // this.getElement('textarea').setStyle('opacity', 0.25); 182 // this.getElement('textarea').setStyle('opacity', 0.25);
186 } 183 }
187 this.setMouseMoveIdentifier(MochiKit.Signal.connect(MochiKit.DOM.currentDocument(), 'onmousemove', this, 'whileResizing')); 184 this.setMouseMoveIdentifier(MochiKit.Signal.connect(MochiKit.DOM.currentDocument(), 'onmousemove', this, 'whileResizing'));
188 this.setMouseUpIdentifier(MochiKit.Signal.connect(MochiKit.DOM.currentDocument(), 'onmouseup', this, 'endResize')); 185 this.setMouseUpIdentifier(MochiKit.Signal.connect(MochiKit.DOM.currentDocument(), 'onmouseup', this, 'endResize'));
189 anEvent.stop(); 186 anEvent.stop();
190//MochiKit.Logging.logDebug("<<< startResize"); 187//MochiKit.Logging.logDebug("<<< startResize");
191 }, 188 },
192 189
193 //------------------------------------------------------------------------- 190 //-------------------------------------------------------------------------
194 191
195 'whileResizing': function(anEvent) { 192 'whileResizing': function(anEvent) {
196//MochiKit.Logging.logDebug(">>> whileResizing"); 193//MochiKit.Logging.logDebug(">>> whileResizing");
197 this.getElement('textarea').setHeight(Math.max(32, this.staticOffset() + anEvent.mouse().page['y']) + 'px'); 194 this.getElement('textarea').setHeight(Math.max(32, this.staticOffset() + anEvent.mouse().page['y']) + 'px');
198 this.getElement('contentView').setHeight(Math.max(32, this.staticOffset() + anEvent.mouse().page['y']) + 'px'); 195 this.getElement('contentView').setHeight(Math.max(32, this.staticOffset() + anEvent.mouse().page['y']) + 'px');
199 anEvent.stop(); 196 anEvent.stop();
200//MochiKit.Logging.logDebug("<<< whileResizing"); 197//MochiKit.Logging.logDebug("<<< whileResizing");
201 }, 198 },
202 199
203 //------------------------------------------------------------------------- 200 //-------------------------------------------------------------------------
204 201
205 'endResize': function(anEvent) { 202 'endResize': function(anEvent) {
206//MochiKit.Logging.logDebug(">>> endResize"); 203//MochiKit.Logging.logDebug(">>> endResize");
207 MochiKit.Signal.disconnect(this.mouseMoveIdentifier()); 204 MochiKit.Signal.disconnect(this.mouseMoveIdentifier());
208 this.setMouseMoveIdentifier(null); 205 this.setMouseMoveIdentifier(null);
209 MochiKit.Signal.disconnect(this.mouseUpIdentifier()); 206 MochiKit.Signal.disconnect(this.mouseUpIdentifier());
210 this.setMouseUpIdentifier(null); 207 this.setMouseUpIdentifier(null);
211 // this.getElement('textarea').setStyle('opacity', 1); 208 // this.getElement('textarea').setStyle('opacity', 1);
212 209
213 this.setComponentHeight(this.getElement('textarea').getHeight()); 210 this.setComponentHeight(this.getElement('textarea').getHeight());
214//MochiKit.Logging.logDebug("<<< endResize"); 211//MochiKit.Logging.logDebug("<<< endResize");
215 }, 212 },
216 213
217 //------------------------------------------------------------------------- 214 //-------------------------------------------------------------------------
218 215
219 'mouseMoveIdentifier': function() { 216 'mouseMoveIdentifier': function() {
220 return this._mouseMoveIdentifier; 217 return this._mouseMoveIdentifier;
221 }, 218 },
222 219
223 'setMouseMoveIdentifier': function(aValue) { 220 'setMouseMoveIdentifier': function(aValue) {
224 this._mouseMoveIdentifier = aValue; 221 this._mouseMoveIdentifier = aValue;
225 }, 222 },
226 223
227 //------------------------------------------------------------------------- 224 //-------------------------------------------------------------------------
228 225
229 'mouseUpIdentifier': function() { 226 'mouseUpIdentifier': function() {
230 return this._mouseUpIdentifier; 227 return this._mouseUpIdentifier;
231 }, 228 },
232 229
233 'setMouseUpIdentifier': function(aValue) { 230 'setMouseUpIdentifier': function(aValue) {
234 this._mouseUpIdentifier = aValue; 231 this._mouseUpIdentifier = aValue;
235 }, 232 },
236 233
237 //------------------------------------------------------------------------- 234 //-------------------------------------------------------------------------
238 __syntaxFix__: "syntax fix" 235 __syntaxFix__: "syntax fix"
239}); 236});
240 237
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js
index 52e718c..29fe972 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js
@@ -1,137 +1,134 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Components.RecordDetail.TitleComponent = function(anElement, args) { 33Clipperz.PM.Components.RecordDetail.TitleComponent = function(anElement, args) {
37 args = args || {}; 34 args = args || {};
38 35
39 Clipperz.PM.Components.RecordDetail.TitleComponent.superclass.constructor.call(this, anElement, args); 36 Clipperz.PM.Components.RecordDetail.TitleComponent.superclass.constructor.call(this, anElement, args);
40 37
41 //this._inputElement = null; 38 //this._inputElement = null;
42 39
43 this.mainComponent().addEditComponent(this); 40 this.mainComponent().addEditComponent(this);
44 41
45 this.render(); 42 this.render();
46 43
47 return this; 44 return this;
48} 45}
49 46
50//============================================================================= 47//=============================================================================
51 48
52YAHOO.extendX(Clipperz.PM.Components.RecordDetail.TitleComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 49YAHOO.extendX(Clipperz.PM.Components.RecordDetail.TitleComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
53 50
54 'toString': function() { 51 'toString': function() {
55 return "Clipperz.PM.Components.RecordDetail.TitleComponent component"; 52 return "Clipperz.PM.Components.RecordDetail.TitleComponent component";
56 }, 53 },
57 54
58 //------------------------------------------------------------------------- 55 //-------------------------------------------------------------------------
59 56
60 'value': function() { 57 'value': function() {
61 return this.record().label(); 58 return this.record().label();
62 }, 59 },
63 60
64 'setValue': function(aValue) { 61 'setValue': function(aValue) {
65 this.record().setLabel(aValue); 62 this.record().setLabel(aValue);
66 }, 63 },
67 64
68 //------------------------------------------------------------------------- 65 //-------------------------------------------------------------------------
69/* 66/*
70 'inputElement': function() { 67 'inputElement': function() {
71 return this._inputElement; 68 return this._inputElement;
72 }, 69 },
73 70
74 'setInputElement': function(aValue) { 71 'setInputElement': function(aValue) {
75 this._inputElement = aValue; 72 this._inputElement = aValue;
76 }, 73 },
77*/ 74*/
78 //------------------------------------------------------------------------- 75 //-------------------------------------------------------------------------
79 76
80 'render': function() { 77 'render': function() {
81 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', html:'&#160'}); 78 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', html:'&#160'});
82 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', colspan:"3", html:'&#160', children:[ 79 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', colspan:"3", html:'&#160', children:[
83 // {tag:'div', /*style:'border: 1px solid green;',*/ id:this.getId('title')} 80 // {tag:'div', /*style:'border: 1px solid green;',*/ id:this.getId('title')}
84 // ]}); 81 // ]});
85 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', html:'&#160'}); 82 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', html:'&#160'});
86 // 83 //
87 // this.setInputElement(new Clipperz.PM.Components.TextFormField(this.getElement('title'), {editMode:this.editMode(), value:this.value()})); 84 // this.setInputElement(new Clipperz.PM.Components.TextFormField(this.getElement('title'), {editMode:this.editMode(), value:this.value()}));
88 85
89 this.update(); 86 this.update();
90 }, 87 },
91 88
92 //------------------------------------------------------------------------- 89 //-------------------------------------------------------------------------
93/* 90/*
94 'update': function() { 91 'update': function() {
95 this.inputElement().update({value:this.value(), editMode:this.editMode()}); 92 this.inputElement().update({value:this.value(), editMode:this.editMode()});
96 }, 93 },
97 */ 94 */
98 //------------------------------------------------------------------------- 95 //-------------------------------------------------------------------------
99 96
100 'updateViewMode': function() { 97 'updateViewMode': function() {
101 this.element().update(""); 98 this.element().update("");
102 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'h2', html:this.value()}); 99 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'h2', html:this.value()});
103 }, 100 },
104 101
105 //------------------------------------------------------------------------- 102 //-------------------------------------------------------------------------
106 103
107 'updateEditMode': function() { 104 'updateEditMode': function() {
108//MochiKit.Logging.logDebug(">>> TitleComponent.updateEditMode"); 105//MochiKit.Logging.logDebug(">>> TitleComponent.updateEditMode");
109 // this.getElement('title').update(""); 106 // this.getElement('title').update("");
110 // Clipperz.YUI.DomHelper.append(this.getDom('title'), {tag:'div', id:this.getId('title_input')}); 107 // Clipperz.YUI.DomHelper.append(this.getDom('title'), {tag:'div', id:this.getId('title_input')});
111 // this.setInputElement(Clipperz.YUI.DomHelper.append(this.getDom('title_input'), {tag:'input', type:'text', value:this.value()}, true)); 108 // this.setInputElement(Clipperz.YUI.DomHelper.append(this.getDom('title_input'), {tag:'input', type:'text', value:this.value()}, true));
112 109
113 this.element().update(""); 110 this.element().update("");
114 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'input', id:this.getId('titleField'), type:'text', value:"this.value()"}); 111 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'input', id:this.getId('titleField'), type:'text', value:"this.value()"});
115 this.getElement('titleField').dom.value = this.value(); 112 this.getElement('titleField').dom.value = this.value();
116 113
117//MochiKit.Logging.logDebug("<<< TitleComponent.updateEditMode"); 114//MochiKit.Logging.logDebug("<<< TitleComponent.updateEditMode");
118 }, 115 },
119 116
120 //------------------------------------------------------------------------- 117 //-------------------------------------------------------------------------
121 118
122 'synchronizeComponentValues': function() { 119 'synchronizeComponentValues': function() {
123 var inputElement; 120 var inputElement;
124 121
125//MochiKit.Logging.logDebug(">>> TitleComponent.synchronizeComponentValues"); 122//MochiKit.Logging.logDebug(">>> TitleComponent.synchronizeComponentValues");
126 inputElement = this.element().getChildrenByTagName('input')[0]; 123 inputElement = this.element().getChildrenByTagName('input')[0];
127 124
128 if (inputElement != null) { 125 if (inputElement != null) {
129 this.setValue(inputElement.dom.value); 126 this.setValue(inputElement.dom.value);
130 } 127 }
131//MochiKit.Logging.logDebug("<<< TitleComponent.synchronizeComponentValues"); 128//MochiKit.Logging.logDebug("<<< TitleComponent.synchronizeComponentValues");
132 }, 129 },
133 130
134 //------------------------------------------------------------------------- 131 //-------------------------------------------------------------------------
135 __syntaxFix__: "syntax fix" 132 __syntaxFix__: "syntax fix"
136}); 133});
137 134
diff --git a/frontend/beta/js/Clipperz/PM/Components/TabPanel/TabPanelController.js b/frontend/beta/js/Clipperz/PM/Components/TabPanel/TabPanelController.js
index c872462..b300ba6 100644
--- a/frontend/beta/js/Clipperz/PM/Components/TabPanel/TabPanelController.js
+++ b/frontend/beta/js/Clipperz/PM/Components/TabPanel/TabPanelController.js
@@ -1,158 +1,155 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32if (typeof(Clipperz.PM.Components.TabPanel) == 'undefined') { Clipperz.PM.Components.TabPanel = {}; } 29if (typeof(Clipperz.PM.Components.TabPanel) == 'undefined') { Clipperz.PM.Components.TabPanel = {}; }
33 30
34Clipperz.PM.Components.TabPanel.TabPanelController = function(args) { 31Clipperz.PM.Components.TabPanel.TabPanelController = function(args) {
35 args = args || {}; 32 args = args || {};
36 33
37 Clipperz.PM.Components.TabPanel.TabPanelController.superclass.constructor.call(this); 34 Clipperz.PM.Components.TabPanel.TabPanelController.superclass.constructor.call(this);
38 35
39 this._name = args.name || 'undefined'; 36 this._name = args.name || 'undefined';
40 this._config = args.config; 37 this._config = args.config;
41 this._selectedTab = args.selectedTab || ((MochiKit.Base.keys(args.config).length > 0) ? MochiKit.Base.keys(args.config)[0] : null); 38 this._selectedTab = args.selectedTab || ((MochiKit.Base.keys(args.config).length > 0) ? MochiKit.Base.keys(args.config)[0] : null);
42 39
43 this._tabs = {}; 40 this._tabs = {};
44 this._panels = {}; 41 this._panels = {};
45 42
46 Clipperz.NotificationCenter.register(null, 'selectTab', this, 'handleSelectTabNotification'); 43 Clipperz.NotificationCenter.register(null, 'selectTab', this, 'handleSelectTabNotification');
47 return this; 44 return this;
48} 45}
49 46
50//============================================================================= 47//=============================================================================
51 48
52YAHOO.extendX(Clipperz.PM.Components.TabPanel.TabPanelController, YAHOO.ext.util.Observable, { 49YAHOO.extendX(Clipperz.PM.Components.TabPanel.TabPanelController, YAHOO.ext.util.Observable, {
53 50
54 //------------------------------------------------------------------------- 51 //-------------------------------------------------------------------------
55 52
56 'name': function() { 53 'name': function() {
57 return this._name; 54 return this._name;
58 }, 55 },
59 56
60 //------------------------------------------------------------------------- 57 //-------------------------------------------------------------------------
61 58
62 'tabs': function() { 59 'tabs': function() {
63 return this._tabs; 60 return this._tabs;
64 }, 61 },
65 62
66 //------------------------------------------------------------------------- 63 //-------------------------------------------------------------------------
67 64
68 'panels': function() { 65 'panels': function() {
69 return this._panels; 66 return this._panels;
70 }, 67 },
71 68
72 //------------------------------------------------------------------------- 69 //-------------------------------------------------------------------------
73 70
74 'config': function() { 71 'config': function() {
75 return this._config; 72 return this._config;
76 }, 73 },
77 74
78 //------------------------------------------------------------------------- 75 //-------------------------------------------------------------------------
79 76
80 'selectedTab': function() { 77 'selectedTab': function() {
81 return this._selectedTab; 78 return this._selectedTab;
82 }, 79 },
83 80
84 'setSelectedTab': function(aValue) { 81 'setSelectedTab': function(aValue) {
85 this._selectedTab = aValue; 82 this._selectedTab = aValue;
86 }, 83 },
87 84
88 //------------------------------------------------------------------------- 85 //-------------------------------------------------------------------------
89 86
90 'setUp': function() { 87 'setUp': function() {
91 vartabId; 88 vartabId;
92 89
93//MochiKit.Logging.logDebug(">>> TabPanelController.setUp - config: " + Clipperz.Base.serializeJSON(this.config())); 90//MochiKit.Logging.logDebug(">>> TabPanelController.setUp - config: " + Clipperz.Base.serializeJSON(this.config()));
94 for (tabId in this.config()) { 91 for (tabId in this.config()) {
95 vartabElement; 92 vartabElement;
96 varpanelElement; 93 varpanelElement;
97 94
98//MochiKit.Logging.logDebug("--- TabPanelController.setUp - tabId: " + tabId); 95//MochiKit.Logging.logDebug("--- TabPanelController.setUp - tabId: " + tabId);
99//MochiKit.Logging.logDebug("--- TabPanelController.setUp - panelId: " + this.config()[tabId]); 96//MochiKit.Logging.logDebug("--- TabPanelController.setUp - panelId: " + this.config()[tabId]);
100 tabElement = YAHOO.ext.Element.get(tabId); 97 tabElement = YAHOO.ext.Element.get(tabId);
101 tabElement.addClassOnOver("hover"); 98 tabElement.addClassOnOver("hover");
102 MochiKit.Signal.connect(tabId, 'onclick', this, 'selectTabHandler'); 99 MochiKit.Signal.connect(tabId, 'onclick', this, 'selectTabHandler');
103 100
104 panelElement = YAHOO.ext.Element.get(this.config()[tabId]); 101 panelElement = YAHOO.ext.Element.get(this.config()[tabId]);
105 102
106 this._tabs[tabId] = tabElement; 103 this._tabs[tabId] = tabElement;
107 this._panels[tabId] = panelElement; 104 this._panels[tabId] = panelElement;
108 105
109 if (tabId == this.selectedTab()) { 106 if (tabId == this.selectedTab()) {
110 tabElement.addClass('selectedTab'); 107 tabElement.addClass('selectedTab');
111 panelElement.addClass('selectedPanel'); 108 panelElement.addClass('selectedPanel');
112 } else { 109 } else {
113 panelElement.addClass('hiddenPanel'); 110 panelElement.addClass('hiddenPanel');
114 } 111 }
115 } 112 }
116//MochiKit.Logging.logDebug("<<< TabPanelController.setUp"); 113//MochiKit.Logging.logDebug("<<< TabPanelController.setUp");
117 }, 114 },
118 115
119 //------------------------------------------------------------------------- 116 //-------------------------------------------------------------------------
120 117
121 'selectTab': function(aTab) { 118 'selectTab': function(aTab) {
122 if (aTab != this.selectedTab()) { 119 if (aTab != this.selectedTab()) {
123 this.tabs()[this.selectedTab()].removeClass('selectedTab'); 120 this.tabs()[this.selectedTab()].removeClass('selectedTab');
124 this.panels()[this.selectedTab()].removeClass('selectedPanel').addClass('hiddenPanel'); 121 this.panels()[this.selectedTab()].removeClass('selectedPanel').addClass('hiddenPanel');
125 122
126 this.tabs()[aTab].addClass('selectedTab'); 123 this.tabs()[aTab].addClass('selectedTab');
127 this.panels()[aTab].addClass('selectedPanel').removeClass('hiddenPanel'); 124 this.panels()[aTab].addClass('selectedPanel').removeClass('hiddenPanel');
128 125
129 this.setSelectedTab(aTab); 126 this.setSelectedTab(aTab);
130 127
131 Clipperz.NotificationCenter.notify(this, 'tabSelected', aTab); 128 Clipperz.NotificationCenter.notify(this, 'tabSelected', aTab);
132 } 129 }
133 }, 130 },
134 131
135 //------------------------------------------------------------------------- 132 //-------------------------------------------------------------------------
136 133
137 'selectTabHandler': function(anEvent) { 134 'selectTabHandler': function(anEvent) {
138 this.selectTab(anEvent.src().id); 135 this.selectTab(anEvent.src().id);
139 }, 136 },
140 137
141 //------------------------------------------------------------------------- 138 //-------------------------------------------------------------------------
142 139
143 'handleSelectTabNotification': function(aNotificationEvent) { 140 'handleSelectTabNotification': function(aNotificationEvent) {
144 var parameters; 141 var parameters;
145 var splittedParamters; 142 var splittedParamters;
146 vartargetTabPanel; 143 vartargetTabPanel;
147 144
148 parameters = aNotificationEvent.parameters(); 145 parameters = aNotificationEvent.parameters();
149 splittedParamters = parameters.split('.'); 146 splittedParamters = parameters.split('.');
150 targetTabPanel = splittedParamters[0]; 147 targetTabPanel = splittedParamters[0];
151 if (targetTabPanel == this.name()) { 148 if (targetTabPanel == this.name()) {
152 this.selectTab(splittedParamters[1]) 149 this.selectTab(splittedParamters[1])
153 } 150 }
154 }, 151 },
155 152
156 //------------------------------------------------------------------------- 153 //-------------------------------------------------------------------------
157 __syntaxFix__: "syntax fix" 154 __syntaxFix__: "syntax fix"
158}); 155});
diff --git a/frontend/beta/js/Clipperz/PM/Components/TextFormField.js b/frontend/beta/js/Clipperz/PM/Components/TextFormField.js
index cb4f06a..c6f0349 100644
--- a/frontend/beta/js/Clipperz/PM/Components/TextFormField.js
+++ b/frontend/beta/js/Clipperz/PM/Components/TextFormField.js
@@ -1,310 +1,307 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
32 29
33Clipperz.PM.Components.TextFormField = function(anElement, args) { 30Clipperz.PM.Components.TextFormField = function(anElement, args) {
34 args = args || {}; 31 args = args || {};
35 32
36//MochiKit.Logging.logDebug(">>> new TextFormField"); 33//MochiKit.Logging.logDebug(">>> new TextFormField");
37 Clipperz.PM.Components.TextFormField.superclass.constructor.call(this, args); 34 Clipperz.PM.Components.TextFormField.superclass.constructor.call(this, args);
38 35
39 this._element = anElement; 36 this._element = anElement;
40 this._editMode = args.editMode || 'VIEW'; 37 this._editMode = args.editMode || 'VIEW';
41 this._value = args.value || ""; 38 this._value = args.value || "";
42 this._inputElement = null; 39 this._inputElement = null;
43 this._wrapper = null; 40 this._wrapper = null;
44 this._multiline = args.multiline || false; 41 this._multiline = args.multiline || false;
45 42
46 //this.multiline = args.multiline || true; 43 //this.multiline = args.multiline || true;
47 //this.editing = true; 44 //this.editing = true;
48 //this.completeOnBlur = true; 45 //this.completeOnBlur = true;
49 //this.autoSizeTask = new YAHOO.ext.util.DelayedTask(this.autoSize, this); 46 //this.autoSizeTask = new YAHOO.ext.util.DelayedTask(this.autoSize, this);
50 //this.textSizeEl = Clipperz.YUI.DomHelper.append(document.body, { 47 //this.textSizeEl = Clipperz.YUI.DomHelper.append(document.body, {
51 // tag: 'div', 48 // tag: 'div',
52 // cls: 'yinline-editor-sizer ' + (this.cls || '') 49 // cls: 'yinline-editor-sizer ' + (this.cls || '')
53 //}); 50 //});
54 51
55 this.render(); 52 this.render();
56//MochiKit.Logging.logDebug("<<< new TextFormField"); 53//MochiKit.Logging.logDebug("<<< new TextFormField");
57 54
58 return this; 55 return this;
59}; 56};
60 57
61YAHOO.extendX(Clipperz.PM.Components.TextFormField, Clipperz.PM.Components.BaseComponent, { 58YAHOO.extendX(Clipperz.PM.Components.TextFormField, Clipperz.PM.Components.BaseComponent, {
62 59
63 'toString': function() { 60 'toString': function() {
64 return "Clipperz.PM.Components.TextFormField"; 61 return "Clipperz.PM.Components.TextFormField";
65 }, 62 },
66 63
67 //----------------------------------------------------- 64 //-----------------------------------------------------
68 65
69 'value': function() { 66 'value': function() {
70 if (this.inputElement() != null) { 67 if (this.inputElement() != null) {
71 this._value = this.inputElement().dom.value; 68 this._value = this.inputElement().dom.value;
72 } 69 }
73 70
74 return this._value; 71 return this._value;
75 // return this.inlineEditor().getValue(); 72 // return this.inlineEditor().getValue();
76 }, 73 },
77 74
78 'setValue': function(aValue) { 75 'setValue': function(aValue) {
79 this._value = aValue; 76 this._value = aValue;
80 // this.getElement('viewComponent_Content').update(aValue); 77 // this.getElement('viewComponent_Content').update(aValue);
81 // this.inlineEditor().setValue(aValue); 78 // this.inlineEditor().setValue(aValue);
82 }, 79 },
83 80
84 //----------------------------------------------------- 81 //-----------------------------------------------------
85 82
86 'multiline': function() { 83 'multiline': function() {
87 return this._multiline; 84 return this._multiline;
88 }, 85 },
89 86
90 //----------------------------------------------------- 87 //-----------------------------------------------------
91 88
92 'editMode': function() { 89 'editMode': function() {
93 return this._editMode; 90 return this._editMode;
94 }, 91 },
95 92
96 'setEditMode': function(aValue) { 93 'setEditMode': function(aValue) {
97 this._editMode = aValue; 94 this._editMode = aValue;
98 }, 95 },
99 96
100 //----------------------------------------------------- 97 //-----------------------------------------------------
101 98
102 'inputElement': function() { 99 'inputElement': function() {
103 return this._inputElement; 100 return this._inputElement;
104 }, 101 },
105 102
106 'setInputElement': function(aValue) { 103 'setInputElement': function(aValue) {
107 this._inputElement = aValue; 104 this._inputElement = aValue;
108 }, 105 },
109 106
110 //----------------------------------------------------- 107 //-----------------------------------------------------
111 108
112 'on': function(anEventName, anHandler, aScope, shouldOverride) { 109 'on': function(anEventName, anHandler, aScope, shouldOverride) {
113//MochiKit.Logging.logDebug(">>> TextFormField.on - inputElement: " + this.inputElement()); 110//MochiKit.Logging.logDebug(">>> TextFormField.on - inputElement: " + this.inputElement());
114 return this.inputElement().on(anEventName, anHandler, aScope, shouldOverride); 111 return this.inputElement().on(anEventName, anHandler, aScope, shouldOverride);
115//MochiKit.Logging.logDebug("<<< TextFormField.on - inputElement: " + this.inputElement()); 112//MochiKit.Logging.logDebug("<<< TextFormField.on - inputElement: " + this.inputElement());
116 }, 113 },
117 114
118 //----------------------------------------------------- 115 //-----------------------------------------------------
119 116
120 'wrapper': function() { 117 'wrapper': function() {
121 return this._wrapper; 118 return this._wrapper;
122 }, 119 },
123 120
124 //----------------------------------------------------- 121 //-----------------------------------------------------
125 122
126 'render': function() { 123 'render': function() {
127 var editModeConfiguration; 124 var editModeConfiguration;
128 var viewModeConfiguration; 125 var viewModeConfiguration;
129 126
130 editModeConfiguration = {tag:'div', id:this.getId('editComponent'), children:[]}; 127 editModeConfiguration = {tag:'div', id:this.getId('editComponent'), children:[]};
131 if (this.multiline() == false) { 128 if (this.multiline() == false) {
132 editModeConfiguration.children.push({tag:'input', type:'text', id:this.getId('editComponent_input'), value:"this.value(1)"}); 129 editModeConfiguration.children.push({tag:'input', type:'text', id:this.getId('editComponent_input'), value:"this.value(1)"});
133 } else { 130 } else {
134 editModeConfiguration.children.push({tag:'textarea', id:this.getId('editComponent_input'), html:"this.value(2)"}); 131 editModeConfiguration.children.push({tag:'textarea', id:this.getId('editComponent_input'), html:"this.value(2)"});
135 } 132 }
136 133
137 viewModeConfiguration = {tag:'div', id:this.getId('viewComponent'), /*style:'border: 1px solid blue;',*/ children:[ 134 viewModeConfiguration = {tag:'div', id:this.getId('viewComponent'), /*style:'border: 1px solid blue;',*/ children:[
138 {tag:'span', id:this.getId('viewComponent_Content'), html:this.value()} 135 {tag:'span', id:this.getId('viewComponent_Content'), html:this.value()}
139 ]} 136 ]}
140 137
141//MochiKit.Logging.logDebug(">>> TextFormField.render"); 138//MochiKit.Logging.logDebug(">>> TextFormField.render");
142 this._wrapper = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('wrapper'), children:[ 139 this._wrapper = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('wrapper'), children:[
143 {tag:'div', id:this.getId('editModeBox'), children:[editModeConfiguration]}, 140 {tag:'div', id:this.getId('editModeBox'), children:[editModeConfiguration]},
144 {tag:'div', id:this.getId('viewModeBox'), children:[viewModeConfiguration]} 141 {tag:'div', id:this.getId('viewModeBox'), children:[viewModeConfiguration]}
145 ]}, true); 142 ]}, true);
146 143
147 this.getElement('editModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 144 this.getElement('editModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
148 this.getElement('viewModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 145 this.getElement('viewModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
149 146
150 this.getElement('editComponent_input').dom.value = this.value(); 147 this.getElement('editComponent_input').dom.value = this.value();
151 this.setInputElement(this.getElement('editComponent_input')); 148 this.setInputElement(this.getElement('editComponent_input'));
152 149
153 this.update(); 150 this.update();
154//MochiKit.Logging.logDebug("<<< TextFormField.render"); 151//MochiKit.Logging.logDebug("<<< TextFormField.render");
155 }, 152 },
156 153
157 //----------------------------------------------------- 154 //-----------------------------------------------------
158 155
159 'update': function(args) { 156 'update': function(args) {
160 args = args || {}; 157 args = args || {};
161 158
162//MochiKit.Logging.logDebug(">>> TextFormField.update"); 159//MochiKit.Logging.logDebug(">>> TextFormField.update");
163 if (typeof(args.value) != 'undefined') { 160 if (typeof(args.value) != 'undefined') {
164 this.setValue(args.value); 161 this.setValue(args.value);
165 } 162 }
166 if (typeof(args.editMode) != 'undefined') { 163 if (typeof(args.editMode) != 'undefined') {
167 this.setEditMode(args.editMode) 164 this.setEditMode(args.editMode)
168 } 165 }
169 166
170 if (this.editMode() == 'VIEW') { 167 if (this.editMode() == 'VIEW') {
171 this.updateViewMode(); 168 this.updateViewMode();
172 } else if (this.editMode() == 'EDIT') { 169 } else if (this.editMode() == 'EDIT') {
173 this.updateEditMode(); 170 this.updateEditMode();
174 } else { 171 } else {
175 //????? 172 //?????
176 } 173 }
177//MochiKit.Logging.logDebug("<<< TextFormField.update"); 174//MochiKit.Logging.logDebug("<<< TextFormField.update");
178 }, 175 },
179 176
180 //----------------------------------------------------- 177 //-----------------------------------------------------
181 178
182 'updateEditMode': function() { 179 'updateEditMode': function() {
183//MochiKit.Logging.logDebug(">>> TextFormField.updateEditMode"); 180//MochiKit.Logging.logDebug(">>> TextFormField.updateEditMode");
184 this.getElement('viewModeBox').hide(); 181 this.getElement('viewModeBox').hide();
185 this.getElement('editModeBox').show(); 182 this.getElement('editModeBox').show();
186 183
187 if (this.multiline() == false) { 184 if (this.multiline() == false) {
188 this.getElement('editComponent_input').dom.value = this.value(); 185 this.getElement('editComponent_input').dom.value = this.value();
189 } else { 186 } else {
190 this.getElement('editComponent_input').update(Clipperz.Base.sanitizeString(this.value())); 187 this.getElement('editComponent_input').update(Clipperz.Base.sanitizeString(this.value()));
191 } 188 }
192//MochiKit.Logging.logDebug("<<< TextFormField.updateEditMode"); 189//MochiKit.Logging.logDebug("<<< TextFormField.updateEditMode");
193 }, 190 },
194 191
195 //----------------------------------------------------- 192 //-----------------------------------------------------
196 193
197 'updateViewMode': function() { 194 'updateViewMode': function() {
198//MochiKit.Logging.logDebug(">>> TextFormField.updateViewMode"); 195//MochiKit.Logging.logDebug(">>> TextFormField.updateViewMode");
199 this.getElement('editModeBox').hide(); 196 this.getElement('editModeBox').hide();
200 this.getElement('viewModeBox').show(); 197 this.getElement('viewModeBox').show();
201 198
202 this.getElement('viewComponent_Content').update(Clipperz.Base.sanitizeString(this.value())); 199 this.getElement('viewComponent_Content').update(Clipperz.Base.sanitizeString(this.value()));
203//MochiKit.Logging.logDebug("<<< TextFormField.updateViewMode"); 200//MochiKit.Logging.logDebug("<<< TextFormField.updateViewMode");
204 }, 201 },
205 202
206 //##################################################### 203 //#####################################################
207 //##################################################### 204 //#####################################################
208 //##################################################### 205 //#####################################################
209 //##################################################### 206 //#####################################################
210 /* 207 /*
211 'onEnter': function(k, e) { 208 'onEnter': function(k, e) {
212MochiKit.Logging.logDebug(">>> TextFormField.onEnter"); 209MochiKit.Logging.logDebug(">>> TextFormField.onEnter");
213 if (this.multiline && (e.ctrlKey || e.shiftKey)) { 210 if (this.multiline && (e.ctrlKey || e.shiftKey)) {
214 return; 211 return;
215 } else { 212 } else {
216 this.completeEdit(); 213 this.completeEdit();
217 e.stopEvent(); 214 e.stopEvent();
218 } 215 }
219MochiKit.Logging.logDebug("<<< TextFormField.onEnter"); 216MochiKit.Logging.logDebug("<<< TextFormField.onEnter");
220 }, 217 },
221 218
222 //----------------------------------------------------- 219 //-----------------------------------------------------
223 220
224 'onEsc': function() { 221 'onEsc': function() {
225MochiKit.Logging.logDebug(">>> TextFormField.onEsc"); 222MochiKit.Logging.logDebug(">>> TextFormField.onEsc");
226 // if (this.ignoreNoChange) { 223 // if (this.ignoreNoChange) {
227 // this.revert(true); 224 // this.revert(true);
228 // } else { 225 // } else {
229 this.revert(false); 226 this.revert(false);
230 this.completeEdit(); 227 this.completeEdit();
231 // } 228 // }
232MochiKit.Logging.logDebug("<<< TextFormField.onEsc"); 229MochiKit.Logging.logDebug("<<< TextFormField.onEsc");
233 }, 230 },
234 231
235 //----------------------------------------------------- 232 //-----------------------------------------------------
236 233
237 onBlur : function(){ 234 onBlur : function(){
238MochiKit.Logging.logDebug(">>> TextFormField.onBlur"); 235MochiKit.Logging.logDebug(">>> TextFormField.onBlur");
239 if (this.editing && this.completeOnBlur !== false) { 236 if (this.editing && this.completeOnBlur !== false) {
240 this.completeEdit(); 237 this.completeEdit();
241 } 238 }
242MochiKit.Logging.logDebug("<<< TextFormField.onBlur"); 239MochiKit.Logging.logDebug("<<< TextFormField.onBlur");
243 }, 240 },
244 241
245 //----------------------------------------------------- 242 //-----------------------------------------------------
246 243
247 'onKeyUp': function(e) { 244 'onKeyUp': function(e) {
248 var k = e.getKey(); 245 var k = e.getKey();
249 if (this.editing && (k < 33 || k > 40) && k != 27) { 246 if (this.editing && (k < 33 || k > 40) && k != 27) {
250 this.autoSizeTask.delay(50); 247 this.autoSizeTask.delay(50);
251 } 248 }
252 }, 249 },
253 250
254 //----------------------------------------------------- 251 //-----------------------------------------------------
255 252
256 'autoSize': function() { 253 'autoSize': function() {
257 var el = this.inputElement(); 254 var el = this.inputElement();
258 var wrap = this.getElement('editComponent'); 255 var wrap = this.getElement('editComponent');
259 var v = el.dom.value; 256 var v = el.dom.value;
260 var ts = this.textSizeEl; 257 var ts = this.textSizeEl;
261 258
262 if (v.length < 1) { 259 if (v.length < 1) {
263 ts.innerHTML = "&#160;&#160;"; 260 ts.innerHTML = "&#160;&#160;";
264 } else { 261 } else {
265 v = v.replace(/[<> ]/g, '&#160;'); 262 v = v.replace(/[<> ]/g, '&#160;');
266 if (this.multiline) { 263 if (this.multiline) {
267 v = v.replace(/\n/g, '<br />&#160;'); 264 v = v.replace(/\n/g, '<br />&#160;');
268 } 265 }
269 ts.innerHTML = v; 266 ts.innerHTML = v;
270 } 267 }
271 268
272 var ww = wrap.dom.offsetWidth; 269 var ww = wrap.dom.offsetWidth;
273 var wh = wrap.dom.offsetHeight; 270 var wh = wrap.dom.offsetHeight;
274 var w = ts.offsetWidth; 271 var w = ts.offsetWidth;
275 var h = ts.offsetHeight; 272 var h = ts.offsetHeight;
276 // lots of magic numbers in this block - wtf? 273 // lots of magic numbers in this block - wtf?
277 // the logic is to prevent the scrollbars from flashing 274 // the logic is to prevent the scrollbars from flashing
278 // in firefox. Updates the right element first 275 // in firefox. Updates the right element first
279 // so there's never overflow. 276 // so there's never overflow.
280 if (ww > w+4) { 277 if (ww > w+4) {
281 el.setWidth(w+4); 278 el.setWidth(w+4);
282 wrap.setWidth(w+8); 279 wrap.setWidth(w+8);
283 } else { 280 } else {
284 wrap.setWidth(w+8); 281 wrap.setWidth(w+8);
285 el.setWidth(w+4); 282 el.setWidth(w+4);
286 } 283 }
287 if (wh > h+4) { 284 if (wh > h+4) {
288 el.setHeight(h); 285 el.setHeight(h);
289 wrap.setHeight(h+4); 286 wrap.setHeight(h+4);
290 } else { 287 } else {
291 wrap.setHeight(h+4); 288 wrap.setHeight(h+4);
292 el.setHeight(h); 289 el.setHeight(h);
293 } 290 }
294 }, 291 },
295 292
296 //----------------------------------------------------- 293 //-----------------------------------------------------
297 294
298 'completeEdit': function() { 295 'completeEdit': function() {
299MochiKit.Logging.logDebug(">>> TextFormField.completeEdit"); 296MochiKit.Logging.logDebug(">>> TextFormField.completeEdit");
300 297
301 }, 298 },
302 299
303 'revert': function() { 300 'revert': function() {
304MochiKit.Logging.logDebug(">>> TextFormField.revert"); 301MochiKit.Logging.logDebug(">>> TextFormField.revert");
305 302
306 }, 303 },
307 */ 304 */
308 //----------------------------------------------------- 305 //-----------------------------------------------------
309 __syntaxFix__: '__syntaxFix__' 306 __syntaxFix__: '__syntaxFix__'
310}); 307});
diff --git a/frontend/beta/js/Clipperz/PM/Connection.js b/frontend/beta/js/Clipperz/PM/Connection.js
index cf37ccc..85aea21 100644
--- a/frontend/beta/js/Clipperz/PM/Connection.js
+++ b/frontend/beta/js/Clipperz/PM/Connection.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31 28
32//----------------------------------------------------------------------------- 29//-----------------------------------------------------------------------------
33// 30//
34 // Abstract C O N N E C T I O N class 31 // Abstract C O N N E C T I O N class
35// 32//
36//----------------------------------------------------------------------------- 33//-----------------------------------------------------------------------------
37 34
38Clipperz.PM.Connection = function (args) { 35Clipperz.PM.Connection = function (args) {
39 args = args || {}; 36 args = args || {};
40 37
41 this._user = args.user; 38 this._user = args.user;
42 this._clipperz_pm_crypto_version = null; 39 this._clipperz_pm_crypto_version = null;
43 this._connectionId = null; 40 this._connectionId = null;
44 this._oneTimePassword = null; 41 this._oneTimePassword = null;
45 42
46 return this; 43 return this;
47} 44}
48 45
49Clipperz.PM.Connection.prototype = MochiKit.Base.update(null, { 46Clipperz.PM.Connection.prototype = MochiKit.Base.update(null, {
50 47
51 'user': function() { 48 'user': function() {
52 return this._user; 49 return this._user;
53 }, 50 },
54 51
55 'toString': function() { 52 'toString': function() {
56 return "Connection [" + this.version() + "] - user: " + this.user(); 53 return "Connection [" + this.version() + "] - user: " + this.user();
57 }, 54 },
58 55
59 //========================================================================= 56 //=========================================================================
60 57
61 'version': function() { 58 'version': function() {
62 throw Clipperz.Base.exception.AbstractMethod; 59 throw Clipperz.Base.exception.AbstractMethod;
63 }, 60 },
64 61
65 'clipperz_pm_crypto_version': function() { 62 'clipperz_pm_crypto_version': function() {
66 if (this._clipperz_pm_crypto_version == null) { 63 if (this._clipperz_pm_crypto_version == null) {
67 var connectionVersions; 64 var connectionVersions;
68 varversions; 65 varversions;
69 varversion; 66 varversion;
70 var i, c; 67 var i, c;
71 68
72 version = null; 69 version = null;
73 connectionVersions = Clipperz.PM.Crypto.communicationProtocol.versions; 70 connectionVersions = Clipperz.PM.Crypto.communicationProtocol.versions;
74 versions = MochiKit.Base.keys(connectionVersions); 71 versions = MochiKit.Base.keys(connectionVersions);
75 c = versions.length; 72 c = versions.length;
76 for (i=0; i<c; i++) { 73 for (i=0; i<c; i++) {
77 if (! (versions[i] == 'current')) { 74 if (! (versions[i] == 'current')) {
78 if (this instanceof connectionVersions[versions[i]]) { 75 if (this instanceof connectionVersions[versions[i]]) {
79 version = versions[i]; 76 version = versions[i];
80 }; 77 };
81 } 78 }
82 } 79 }
83 80
84 this._clipperz_pm_crypto_version = version; 81 this._clipperz_pm_crypto_version = version;
85 } 82 }
86 83
87 return this._clipperz_pm_crypto_version; 84 return this._clipperz_pm_crypto_version;
88 }, 85 },
89 86
90 //------------------------------------------------------------------------- 87 //-------------------------------------------------------------------------
91 88
92 'defaultErrorHandler': function(anErrorString, anException) { 89 'defaultErrorHandler': function(anErrorString, anException) {
93MochiKit.Logging.logError("### Connection.defaultErrorHandler: " + anErrorString + " (" + anException + ")"); 90MochiKit.Logging.logError("### Connection.defaultErrorHandler: " + anErrorString + " (" + anException + ")");
94 }, 91 },
95 92
96 //------------------------------------------------------------------------- 93 //-------------------------------------------------------------------------
97 94
98 'login': function(someArguments, aCallback) { 95 'login': function(someArguments, aCallback) {
99 throw Clipperz.Base.exception.AbstractMethod; 96 throw Clipperz.Base.exception.AbstractMethod;
100 }, 97 },
101 98
102 //------------------------------------------------------------------------- 99 //-------------------------------------------------------------------------
103 100
104 'message': function(someArguments, aCallback) { 101 'message': function(someArguments, aCallback) {
105 throw Clipperz.Base.exception.AbstractMethod; 102 throw Clipperz.Base.exception.AbstractMethod;
106 }, 103 },
107 104
108 //------------------------------------------------------------------------- 105 //-------------------------------------------------------------------------
109 106
110 'sharedSecret': function() { 107 'sharedSecret': function() {
111 throw Clipperz.Base.exception.AbstractMethod; 108 throw Clipperz.Base.exception.AbstractMethod;
112 }, 109 },
113 110
114 'serverSideUserCredentials': function() { 111 'serverSideUserCredentials': function() {
115 throw Clipperz.Base.exception.AbstractMethod; 112 throw Clipperz.Base.exception.AbstractMethod;
116 }, 113 },
117 114
118 //========================================================================= 115 //=========================================================================
119 116
120 'connectionId': function() { 117 'connectionId': function() {
121 return this._connectionId; 118 return this._connectionId;
122 }, 119 },
123 120
124 'setConnectionId': function(aValue) { 121 'setConnectionId': function(aValue) {
125 this._connectionId = aValue; 122 this._connectionId = aValue;
126 }, 123 },
127 124
128 //========================================================================= 125 //=========================================================================
129 126
130 'oneTimePassword': function() { 127 'oneTimePassword': function() {
131 return this._oneTimePassword; 128 return this._oneTimePassword;
132 }, 129 },
133 130
134 'setOneTimePassword': function(aValue) { 131 'setOneTimePassword': function(aValue) {
135 this._oneTimePassword = aValue; 132 this._oneTimePassword = aValue;
136 }, 133 },
137 134
138 //========================================================================= 135 //=========================================================================
139 __syntaxFix__: "syntax fix" 136 __syntaxFix__: "syntax fix"
140 137
141} 138}
142); 139);
143 140
144 141
145if (typeof(Clipperz.PM.Connection.SRP) == 'undefined') { Clipperz.PM.Connection.SRP = {}; } 142if (typeof(Clipperz.PM.Connection.SRP) == 'undefined') { Clipperz.PM.Connection.SRP = {}; }
146//----------------------------------------------------------------------------- 143//-----------------------------------------------------------------------------
147// 144//
148 // S R P [ 1 . 0 ] C O N N E C T I O N class 145 // S R P [ 1 . 0 ] C O N N E C T I O N class
149// 146//
150//----------------------------------------------------------------------------- 147//-----------------------------------------------------------------------------
151 148
152Clipperz.PM.Connection.SRP['1.0'] = function (args) { 149Clipperz.PM.Connection.SRP['1.0'] = function (args) {
153 args = args || {}; 150 args = args || {};
154 Clipperz.PM.Connection.call(this, args); 151 Clipperz.PM.Connection.call(this, args);
155 152
156 this._C = null; 153 this._C = null;
157 this._P = null; 154 this._P = null;
158 this._srpConnection = null; 155 this._srpConnection = null;
159 156
160 return this; 157 return this;
161} 158}
162 159
163Clipperz.PM.Connection.SRP['1.0'].prototype = MochiKit.Base.update(new Clipperz.PM.Connection(), { 160Clipperz.PM.Connection.SRP['1.0'].prototype = MochiKit.Base.update(new Clipperz.PM.Connection(), {
164 161
165 'version': function() { 162 'version': function() {
166 return '1.0'; 163 return '1.0';
167 }, 164 },
168 165
169 //========================================================================= 166 //=========================================================================
170 167
171 'register': function(anInvitationCode) { 168 'register': function(anInvitationCode) {
172 var deferredResult; 169 var deferredResult;
173 varparameters; 170 varparameters;
174 171
175//MochiKit.Logging.logError(">>> Connection.register: " + this); 172//MochiKit.Logging.logError(">>> Connection.register: " + this);
176 parameters = {}; 173 parameters = {};
177 deferredResult = new MochiKit.Async.Deferred(); 174 deferredResult = new MochiKit.Async.Deferred();
178//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.register - 1: " + res); return res;}); 175//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.register - 1: " + res); return res;});
179 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'registration_verify'); 176 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'registration_verify');
180//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.register - 2: " + res); return res;}); 177//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.register - 2: " + res); return res;});
181 deferredResult.addCallback(function(aConnection, anInvitationCode) { 178 deferredResult.addCallback(function(aConnection, anInvitationCode) {
182 var args; 179 var args;
183 180
184 args = {}; 181 args = {};
185 args.message = 'register'; 182 args.message = 'register';
186 args.version = aConnection.clipperz_pm_crypto_version(); 183 args.version = aConnection.clipperz_pm_crypto_version();
187 args.invitationCode = anInvitationCode; 184 args.invitationCode = anInvitationCode;
188 185
189 return args; 186 return args;
190 }, this); 187 }, this);
191//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.register - 3: " + res); return res;}); 188//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.register - 3: " + res); return res;});
192 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'registration_sendingCredentials'); 189 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'registration_sendingCredentials');
193//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.register - 4: " + res); return res;}); 190//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.register - 4: " + res); return res;});
194 deferredResult.addCallback(MochiKit.Base.method(this.user(), 'encryptedData')); 191 deferredResult.addCallback(MochiKit.Base.method(this.user(), 'encryptedData'));
195//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.register - 5: " + res); return res;}); 192//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.register - 5: " + res); return res;});
196 deferredResult.addCallback(function(someParameters, anUser, anEncryptedData) { 193 deferredResult.addCallback(function(someParameters, anUser, anEncryptedData) {
197 var currentVersionConnection; 194 var currentVersionConnection;
198 var args; 195 var args;
199 196
200 currentVersionConnection = new Clipperz.PM.Crypto.communicationProtocol.versions['current']({user:anUser}); 197 currentVersionConnection = new Clipperz.PM.Crypto.communicationProtocol.versions['current']({user:anUser});
201 198
202 args = someParameters 199 args = someParameters
203 args.credentials = currentVersionConnection.serverSideUserCredentials(); 200 args.credentials = currentVersionConnection.serverSideUserCredentials();
204 args.user = anEncryptedData; 201 args.user = anEncryptedData;
205 args.version = args.credentials.version; 202 args.version = args.credentials.version;
206 args.message = "completeRegistration"; 203 args.message = "completeRegistration";
207 204
208 return args; 205 return args;
209 }, parameters, this.user()); 206 }, parameters, this.user());
210//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.register - 6: " + res); return res;}); 207//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.register - 6: " + res); return res;});
211 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Proxy.defaultProxy, 'registration')); 208 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Proxy.defaultProxy, 'registration'));
212//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.register - 7: " + Clipperz.Base.serializeJSON(res)); return res;}); 209//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.register - 7: " + Clipperz.Base.serializeJSON(res)); return res;});
213 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 210 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
214 this.user().setLock(res['lock']); 211 this.user().setLock(res['lock']);
215 212
216 return res; 213 return res;
217 }, this)); 214 }, this));
218 deferredResult.callback(anInvitationCode); 215 deferredResult.callback(anInvitationCode);
219//MochiKit.Logging.logError("<<< Connection.register"); 216//MochiKit.Logging.logError("<<< Connection.register");
220 217
221 return deferredResult; 218 return deferredResult;
222 }, 219 },
223 220
224 //========================================================================= 221 //=========================================================================
225 222
226 'login': function(isReconnecting) { 223 'login': function(isReconnecting) {
227 vardeferredResult; 224 vardeferredResult;
228 225
229//MochiKit.Logging.logDebug(">>> Connection.login: "/* + this*/); 226//MochiKit.Logging.logDebug(">>> Connection.login: "/* + this*/);
230//MochiKit.Logging.logDebug("--- Connection.login - isReconnecting: " + (isReconnecting == true)); 227//MochiKit.Logging.logDebug("--- Connection.login - isReconnecting: " + (isReconnecting == true));
231 deferredResult = new MochiKit.Async.Deferred(); 228 deferredResult = new MochiKit.Async.Deferred();
232//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.1 - Connection.login - 1: "/* + res*/); return res;}); 229//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.1 - Connection.login - 1: "/* + res*/); return res;});
233//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 230//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
234 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'connection_sendingCredentials'); 231 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'connection_sendingCredentials');
235//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.2 - Connection.login - 2: "/* + res*/); return res;}); 232//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.2 - Connection.login - 2: "/* + res*/); return res;});
236//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 233//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
237 deferredResult.addCallback(function(aConnection) { 234 deferredResult.addCallback(function(aConnection) {
238 var args; 235 var args;
239 236
240 args = {}; 237 args = {};
241 args.message = 'connect'; 238 args.message = 'connect';
242 args.version = aConnection.clipperz_pm_crypto_version(); 239 args.version = aConnection.clipperz_pm_crypto_version();
243 args.parameters = {}; 240 args.parameters = {};
244//MochiKit.Logging.logDebug("=== Connection.login - username: " + aConnection.srpConnection().C()); 241//MochiKit.Logging.logDebug("=== Connection.login - username: " + aConnection.srpConnection().C());
245 args.parameters['C'] = aConnection.srpConnection().C(); 242 args.parameters['C'] = aConnection.srpConnection().C();
246 args.parameters['A'] = aConnection.srpConnection().A().asString(16); 243 args.parameters['A'] = aConnection.srpConnection().A().asString(16);
247 244
248 if (isReconnecting == true) { 245 if (isReconnecting == true) {
249//MochiKit.Logging.logDebug("--- Connection.login - reconnecting"); 246//MochiKit.Logging.logDebug("--- Connection.login - reconnecting");
250 //# args.parameters['reconnecting'] = "yes"; 247 //# args.parameters['reconnecting'] = "yes";
251 args.parameters['reconnecting'] = aConnection.connectionId(); 248 args.parameters['reconnecting'] = aConnection.connectionId();
252 } 249 }
253//MochiKit.Logging.logDebug("--- Connection.login - args: " + Clipperz.Base.serializeJSON(args)); 250//MochiKit.Logging.logDebug("--- Connection.login - args: " + Clipperz.Base.serializeJSON(args));
254//MochiKit.Logging.logDebug("--- Connection.login - srp.a: " + aConnection.srpConnection().a().asString(16)); 251//MochiKit.Logging.logDebug("--- Connection.login - srp.a: " + aConnection.srpConnection().a().asString(16));
255 252
256 return args; 253 return args;
257 }); 254 });
258//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.3 - Connection.login - 3: "/* + res*/); return res;}); 255//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.3 - Connection.login - 3: "/* + res*/); return res;});
259//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 256//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
260 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Proxy.defaultProxy, 'handshake')); 257 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Proxy.defaultProxy, 'handshake'));
261//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.4 - Connection.login - 4: "/* + res*/); return res;}); 258//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.4 - Connection.login - 4: "/* + res*/); return res;});
262//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 259//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
263 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'connection_credentialVerification'); 260 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'connection_credentialVerification');
264//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.5 - Connection.login - 5: "/* + res*/); return res;}); 261//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.5 - Connection.login - 5: "/* + res*/); return res;});
265//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 262//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
266deferredResult.addErrback(MochiKit.Base.bind(function(res) {MochiKit.Logging.logDebug("ERROR - c: " + this.srpConnection().C() + " # version: " + this.clipperz_pm_crypto_version()); return res;}, this)); 263deferredResult.addErrback(MochiKit.Base.bind(function(res) {MochiKit.Logging.logDebug("ERROR - c: " + this.srpConnection().C() + " # version: " + this.clipperz_pm_crypto_version()); return res;}, this));
267 deferredResult.addCallback(MochiKit.Base.bind(function(someParameters) { 264 deferredResult.addCallback(MochiKit.Base.bind(function(someParameters) {
268 var args; 265 var args;
269 266
270 this.srpConnection().set_s(new Clipperz.Crypto.BigInt(someParameters['s'], 16)); 267 this.srpConnection().set_s(new Clipperz.Crypto.BigInt(someParameters['s'], 16));
271 this.srpConnection().set_B(new Clipperz.Crypto.BigInt(someParameters['B'], 16)); 268 this.srpConnection().set_B(new Clipperz.Crypto.BigInt(someParameters['B'], 16));
272 269
273 if (typeof(someParameters['oneTimePassword']) != 'undefined') { 270 if (typeof(someParameters['oneTimePassword']) != 'undefined') {
274 this.setOneTimePassword(someParameters['oneTimePassword']); 271 this.setOneTimePassword(someParameters['oneTimePassword']);
275 } 272 }
276 273
277 args = {}; 274 args = {};
278 args.message = 'credentialCheck'; 275 args.message = 'credentialCheck';
279 args.version = this.clipperz_pm_crypto_version(); 276 args.version = this.clipperz_pm_crypto_version();
280 args.parameters = {}; 277 args.parameters = {};
281 args.parameters['M1'] = this.srpConnection().M1(); 278 args.parameters['M1'] = this.srpConnection().M1();
282 279
283 return args; 280 return args;
284 }, this)); 281 }, this));
285//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.6 - Connection.login - 6: "/* + res*/); return res;}); 282//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.6 - Connection.login - 6: "/* + res*/); return res;});
286//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 283//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
287 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Proxy.defaultProxy, 'handshake')); 284 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Proxy.defaultProxy, 'handshake'));
288//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.7 - Connection.login - 7: "/* + res*/); return res;}); 285//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.7 - Connection.login - 7: "/* + res*/); return res;});
289//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 286//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
290 //# deferredResult.addCallback(MochiKit.Base.method(this, 'loginDone')); 287 //# deferredResult.addCallback(MochiKit.Base.method(this, 'loginDone'));
291 deferredResult.addCallback(MochiKit.Base.bind(function(someParameters) { 288 deferredResult.addCallback(MochiKit.Base.bind(function(someParameters) {
292 var result; 289 var result;
293 290
294//MochiKit.Logging.logDebug(">>> Connection.loginDone: " + this + " (M2: " + this.srpConnection().M2() + ")"); 291//MochiKit.Logging.logDebug(">>> Connection.loginDone: " + this + " (M2: " + this.srpConnection().M2() + ")");
295 if (someParameters['M2'] == this.srpConnection().M2()) { 292 if (someParameters['M2'] == this.srpConnection().M2()) {
296 result = new MochiKit.Async.Deferred(); 293 result = new MochiKit.Async.Deferred();
297 294
298//MochiKit.Logging.logDebug("--- Connection.loginDone - someParameters: " + Clipperz.Base.serializeJSON(someParameters)); 295//MochiKit.Logging.logDebug("--- Connection.loginDone - someParameters: " + Clipperz.Base.serializeJSON(someParameters));
299 this.setConnectionId(someParameters['connectionId']); 296 this.setConnectionId(someParameters['connectionId']);
300 this.user().setLoginInfo(someParameters['loginInfo']); 297 this.user().setLoginInfo(someParameters['loginInfo']);
301 this.user().setShouldDownloadOfflineCopy(someParameters['offlineCopyNeeded']); 298 this.user().setShouldDownloadOfflineCopy(someParameters['offlineCopyNeeded']);
302 this.user().setLock(someParameters['lock']); 299 this.user().setLock(someParameters['lock']);
303 300
304 if (this.oneTimePassword() != null) { 301 if (this.oneTimePassword() != null) {
305 result.addCallback(MochiKit.Base.method(this.user().oneTimePasswordManager(), 'archiveOneTimePassword', this.oneTimePassword())); 302 result.addCallback(MochiKit.Base.method(this.user().oneTimePasswordManager(), 'archiveOneTimePassword', this.oneTimePassword()));
306 } 303 }
307 result.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'connection_loggedIn'); 304 result.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'connection_loggedIn');
308 result.addCallback(MochiKit.Async.succeed, someParameters); 305 result.addCallback(MochiKit.Async.succeed, someParameters);
309 306
310 result.callback(); 307 result.callback();
311//MochiKit.Logging.logDebug("--- Connection.loginDone - 1 - result: "/* + Clipperz.Base.serializeJSON(result)*/); 308//MochiKit.Logging.logDebug("--- Connection.loginDone - 1 - result: "/* + Clipperz.Base.serializeJSON(result)*/);
312 } else { 309 } else {
313//MochiKit.Logging.logDebug("--- Connection.loginDone - 2 - ERROR"); 310//MochiKit.Logging.logDebug("--- Connection.loginDone - 2 - ERROR");
314//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 311//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
315 result = MochiKit.Async.fail(Clipperz.PM.Connection.exception.WrongChecksum); 312 result = MochiKit.Async.fail(Clipperz.PM.Connection.exception.WrongChecksum);
316 } 313 }
317//MochiKit.Logging.logDebug("<<< Connection.loginDone - result: " + Clipperz.Base.serializeJSON(result)); 314//MochiKit.Logging.logDebug("<<< Connection.loginDone - result: " + Clipperz.Base.serializeJSON(result));
318 315
319 return result; 316 return result;
320 }, this)); 317 }, this));
321 318
322//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.8 - Connection.login - 8: "/* + res*/); return res;}); 319//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.8 - Connection.login - 8: "/* + res*/); return res;});
323//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 320//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
324 deferredResult.callback(this); 321 deferredResult.callback(this);
325//MochiKit.Logging.logDebug("<<< Connection.login"); 322//MochiKit.Logging.logDebug("<<< Connection.login");
326 323
327 return deferredResult; 324 return deferredResult;
328 }, 325 },
329 326
330 //========================================================================= 327 //=========================================================================
331 328
332 'logout': function() { 329 'logout': function() {
333 var deferredResult; 330 var deferredResult;
334 331
335//MochiKit.Logging.logDebug(">>> Connection.logout: " + this); 332//MochiKit.Logging.logDebug(">>> Connection.logout: " + this);
336 deferredResult = new MochiKit.Async.Deferred(); 333 deferredResult = new MochiKit.Async.Deferred();
337//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.logout - 1: " + res); return res;}); 334//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.logout - 1: " + res); return res;});
338 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Proxy.defaultProxy, 'logout'), {}); 335 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Proxy.defaultProxy, 'logout'), {});
339//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.logout - 2: " + res); return res;}); 336//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.logout - 2: " + res); return res;});
340 deferredResult.addCallback(MochiKit.Base.method(this, 'resetSrpConnection')); 337 deferredResult.addCallback(MochiKit.Base.method(this, 'resetSrpConnection'));
341//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.logout - 3: " + res); return res;}); 338//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.logout - 3: " + res); return res;});
342 deferredResult.callback(); 339 deferredResult.callback();
343//MochiKit.Logging.logDebug("<<< Connection.logout"); 340//MochiKit.Logging.logDebug("<<< Connection.logout");
344 341
345 return deferredResult; 342 return deferredResult;
346 }, 343 },
347 344
348 //========================================================================= 345 //=========================================================================
349 346
350 'message': function(aMessageName, someParameters) { 347 'message': function(aMessageName, someParameters) {
351 var args; 348 var args;
352 var deferredResult; 349 var deferredResult;
353 350
354//MochiKit.Logging.logDebug(">>> Connection.message: " + this); 351//MochiKit.Logging.logDebug(">>> Connection.message: " + this);
355 args = {} 352 args = {}
356 args['message'] = aMessageName; 353 args['message'] = aMessageName;
357 args['srpSharedSecret'] = this.srpConnection().K(); 354 args['srpSharedSecret'] = this.srpConnection().K();
358 // args['lock'] = this.user().lock(); 355 // args['lock'] = this.user().lock();
359 356
360 if (someParameters != null) { 357 if (someParameters != null) {
361 args['parameters'] = someParameters; 358 args['parameters'] = someParameters;
362 } else { 359 } else {
363 args['parameters'] = {}; 360 args['parameters'] = {};
364 } 361 }
365//MochiKit.Logging.logDebug("--- Connection.message - args: " + Clipperz.Base.serializeJSON(args)); 362//MochiKit.Logging.logDebug("--- Connection.message - args: " + Clipperz.Base.serializeJSON(args));
366 363
367 // deferredResult = new MochiKit.Async.Deferred(); //### ????????????? 364 // deferredResult = new MochiKit.Async.Deferred(); //### ?????????????
368 365
369 return this.sendMessage(args); 366 return this.sendMessage(args);
370 }, 367 },
371 368
372 //------------------------------------------------------------------------- 369 //-------------------------------------------------------------------------
373 370
374 'sendMessage': function(someArguments) { 371 'sendMessage': function(someArguments) {
375 vardeferredResult; 372 vardeferredResult;
376 373
377//MochiKit.Logging.logDebug(">>> Connection.sendMessage: " + this); 374//MochiKit.Logging.logDebug(">>> Connection.sendMessage: " + this);
378 deferredResult = new MochiKit.Async.Deferred(); 375 deferredResult = new MochiKit.Async.Deferred();
379//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.sendMessage - 1: " + res); return res;}); 376//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.sendMessage - 1: " + res); return res;});
380 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Proxy.defaultProxy, 'message'), someArguments); 377 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Proxy.defaultProxy, 'message'), someArguments);
381//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.sendMessage - 2: " + res); return res;}); 378//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.sendMessage - 2: " + res); return res;});
382 379
383 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 380 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
384 if (typeof(res['lock']) != 'undefined') { 381 if (typeof(res['lock']) != 'undefined') {
385 this.user().setLock(res['lock']); 382 this.user().setLock(res['lock']);
386 } 383 }
387 return res; 384 return res;
388 }, this)); 385 }, this));
389 386
390 deferredResult.addErrback(MochiKit.Base.method(this, 'messageExceptionHandler'), someArguments); 387 deferredResult.addErrback(MochiKit.Base.method(this, 'messageExceptionHandler'), someArguments);
391//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.sendMessage - 3: " + res); return res;}); 388//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.sendMessage - 3: " + res); return res;});
392//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.sendMessage - 3: " + Clipperz.Base.serializeJSON(res)); return res;}); 389//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.sendMessage - 3: " + Clipperz.Base.serializeJSON(res)); return res;});
393 deferredResult.callback(); 390 deferredResult.callback();
394//MochiKit.Logging.logDebug("<<< Connection.sendMessage"); 391//MochiKit.Logging.logDebug("<<< Connection.sendMessage");
395 392
396 return deferredResult 393 return deferredResult
397 }, 394 },
398 395
399 //------------------------------------------------------------------------- 396 //-------------------------------------------------------------------------
400 397
401 'messageExceptionHandler': function(anOriginalMessageArguments, anError) { 398 'messageExceptionHandler': function(anOriginalMessageArguments, anError) {
402 var result; 399 var result;
403 400
404//MochiKit.Logging.logDebug(">>> Connection.messageExceptionHandler - this: " + this + ", anError: " + anError); 401//MochiKit.Logging.logDebug(">>> Connection.messageExceptionHandler - this: " + this + ", anError: " + anError);
405 if (anError instanceof MochiKit.Async.CancelledError) { 402 if (anError instanceof MochiKit.Async.CancelledError) {
406//MochiKit.Logging.logDebug("--- Connection.messageExceptionHandler - 1"); 403//MochiKit.Logging.logDebug("--- Connection.messageExceptionHandler - 1");
407 result = anError; 404 result = anError;
408//MochiKit.Logging.logDebug("--- Connection.messageExceptionHandler - 2"); 405//MochiKit.Logging.logDebug("--- Connection.messageExceptionHandler - 2");
diff --git a/frontend/beta/js/Clipperz/PM/Crypto.js b/frontend/beta/js/Clipperz/PM/Crypto.js
index 7636822..6e9608c 100644
--- a/frontend/beta/js/Clipperz/PM/Crypto.js
+++ b/frontend/beta/js/Clipperz/PM/Crypto.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Crypto) == 'undefined') { Clipperz.PM.Crypto = {}; } 28if (typeof(Clipperz.PM.Crypto) == 'undefined') { Clipperz.PM.Crypto = {}; }
32 29
33Clipperz.PM.Crypto.VERSION = "0.2"; 30Clipperz.PM.Crypto.VERSION = "0.2";
34Clipperz.PM.Crypto.NAME = "Clipperz.PM.Crypto"; 31Clipperz.PM.Crypto.NAME = "Clipperz.PM.Crypto";
35 32
36MochiKit.Base.update(Clipperz.PM.Crypto, { 33MochiKit.Base.update(Clipperz.PM.Crypto, {
37 34
38 '__repr__': function () { 35 '__repr__': function () {
39 return "[" + this.NAME + " " + this.VERSION + "]"; 36 return "[" + this.NAME + " " + this.VERSION + "]";
40 }, 37 },
41 38
42 //------------------------------------------------------------------------- 39 //-------------------------------------------------------------------------
43 40
44 'toString': function () { 41 'toString': function () {
45 return this.__repr__(); 42 return this.__repr__();
46 }, 43 },
47 44
48 //------------------------------------------------------------------------- 45 //-------------------------------------------------------------------------
49 46
50 'communicationProtocol': { 47 'communicationProtocol': {
51 'currentVersion': '0.2', 48 'currentVersion': '0.2',
52 'versions': { 49 'versions': {
53 '0.1': Clipperz.PM.Connection.SRP['1.0'],//Clipperz.Crypto.SRP.versions['1.0'].Connection, 50 '0.1': Clipperz.PM.Connection.SRP['1.0'],//Clipperz.Crypto.SRP.versions['1.0'].Connection,
54 '0.2': Clipperz.PM.Connection.SRP['1.1']//Clipperz.Crypto.SRP.versions['1.1'].Connection, 51 '0.2': Clipperz.PM.Connection.SRP['1.1']//Clipperz.Crypto.SRP.versions['1.1'].Connection,
55 }, 52 },
56 'fallbackVersions': { 53 'fallbackVersions': {
57 'current':'0.1', 54 'current':'0.1',
58 '0.2': '0.1', 55 '0.2': '0.1',
59 '0.1': null 56 '0.1': null
60 } 57 }
61 }, 58 },
62 59
63 //------------------------------------------------------------------------- 60 //-------------------------------------------------------------------------
64 61
65 'encryptingFunctions': { 62 'encryptingFunctions': {
66 'currentVersion': '0.3', 63 'currentVersion': '0.3',
67 'versions': { 64 'versions': {
68 65
69 //##################################################################### 66 //#####################################################################
70 67
71 '0.1': { 68 '0.1': {
72 'encrypt': function(aKey, aValue) { 69 'encrypt': function(aKey, aValue) {
73 return Clipperz.Crypto.Base.encryptUsingSecretKey(aKey, Clipperz.Base.serializeJSON(aValue)); 70 return Clipperz.Crypto.Base.encryptUsingSecretKey(aKey, Clipperz.Base.serializeJSON(aValue));
74 }, 71 },
75 72
76 'deferredEncrypt': function(aKey, aValue) { 73 'deferredEncrypt': function(aKey, aValue) {
77 var deferredResult; 74 var deferredResult;
78 75
79 deferredResult = new MochiKit.Async.Deferred(); 76 deferredResult = new MochiKit.Async.Deferred();
80 deferredResult.addCallback(Clipperz.PM.Crypto.encryptingFunctions.versions['0.1'].encrypt, aKey, aValue); 77 deferredResult.addCallback(Clipperz.PM.Crypto.encryptingFunctions.versions['0.1'].encrypt, aKey, aValue);
81 deferredResult.callback(); 78 deferredResult.callback();
82 79
83 return deferredResult; 80 return deferredResult;
84 }, 81 },
85 82
86 'decrypt': function(aKey, aValue) { 83 'decrypt': function(aKey, aValue) {
87 var result; 84 var result;
88 85
89 if (aValue != null) { 86 if (aValue != null) {
90 result = Clipperz.Base.evalJSON(Clipperz.Crypto.Base.decryptUsingSecretKey(aKey, aValue)); 87 result = Clipperz.Base.evalJSON(Clipperz.Crypto.Base.decryptUsingSecretKey(aKey, aValue));
91 } else { 88 } else {
92 result = null; 89 result = null;
93 } 90 }
94 91
95 return result; 92 return result;
96 }, 93 },
97 94
98 'deferredDecrypt': function(aKey, aValue) { 95 'deferredDecrypt': function(aKey, aValue) {
99 var deferredResult; 96 var deferredResult;
100 97
101 deferredResult = new MochiKit.Async.Deferred(); 98 deferredResult = new MochiKit.Async.Deferred();
102 deferredResult.addCallback(Clipperz.PM.Crypto.encryptingFunctions.versions['0.1'].decrypt, aKey, aValue); 99 deferredResult.addCallback(Clipperz.PM.Crypto.encryptingFunctions.versions['0.1'].decrypt, aKey, aValue);
103 deferredResult.callback(); 100 deferredResult.callback();
104 101
105 return deferredResult; 102 return deferredResult;
106 }, 103 },
107 104
108 'hash': function(aValue) { 105 'hash': function(aValue) {
109 var result; 106 var result;
110 var strngResult; 107 var strngResult;
111 108
112 stringResult = Clipperz.Crypto.Base.computeHashValue(aValue.asString()); //!!!!!!! 109 stringResult = Clipperz.Crypto.Base.computeHashValue(aValue.asString()); //!!!!!!!
113 result = new Clipperz.ByteArray("0x" + stringResult); 110 result = new Clipperz.ByteArray("0x" + stringResult);
114 111
115 return result; 112 return result;
116 } 113 }
117 }, 114 },
118 115
119 //##################################################################### 116 //#####################################################################
120 117
121 '0.2': { 118 '0.2': {
122 'encrypt': function(aKey, aValue, aNonce) { 119 'encrypt': function(aKey, aValue, aNonce) {
123 var result; 120 var result;
124 varkey, value; 121 varkey, value;
125 var dataToEncrypt; 122 var dataToEncrypt;
126 var encryptedData; 123 var encryptedData;
127 124
128 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey)); 125 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey));
129 value = new Clipperz.ByteArray(Clipperz.Base.serializeJSON(aValue)); 126 value = new Clipperz.ByteArray(Clipperz.Base.serializeJSON(aValue));
130 dataToEncrypt = Clipperz.Crypto.SHA.sha_d256(value).appendBlock(value); 127 dataToEncrypt = Clipperz.Crypto.SHA.sha_d256(value).appendBlock(value);
131 encryptedData = Clipperz.Crypto.AES.encrypt(key, dataToEncrypt, aNonce); 128 encryptedData = Clipperz.Crypto.AES.encrypt(key, dataToEncrypt, aNonce);
132 result = encryptedData.toBase64String(); 129 result = encryptedData.toBase64String();
133 130
134 return result; 131 return result;
135 }, 132 },
136 133
137 'deferredEncrypt': function(aKey, aValue, aNonce) { 134 'deferredEncrypt': function(aKey, aValue, aNonce) {
138 var deferredResult; 135 var deferredResult;
139 varkey, value; 136 varkey, value;
140 var dataToEncrypt; 137 var dataToEncrypt;
141 var encryptedData; 138 var encryptedData;
142 139
143 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey)); 140 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey));
144 value = new Clipperz.ByteArray(Clipperz.Base.serializeJSON(aValue)); 141 value = new Clipperz.ByteArray(Clipperz.Base.serializeJSON(aValue));
145 dataToEncrypt = Clipperz.Crypto.SHA.sha_d256(value).appendBlock(value); 142 dataToEncrypt = Clipperz.Crypto.SHA.sha_d256(value).appendBlock(value);
146 143
147 deferredResult = new MochiKit.Async.Deferred() 144 deferredResult = new MochiKit.Async.Deferred()
148 deferredResult.addCallback(Clipperz.Crypto.AES.deferredEncrypt, key, dataToEncrypt, aNonce); 145 deferredResult.addCallback(Clipperz.Crypto.AES.deferredEncrypt, key, dataToEncrypt, aNonce);
149 deferredResult.addCallback(function(aResult) { 146 deferredResult.addCallback(function(aResult) {
150 return aResult.toBase64String(); 147 return aResult.toBase64String();
151 }) 148 })
152 deferredResult.callback(); 149 deferredResult.callback();
153 150
154 return deferredResult; 151 return deferredResult;
155 }, 152 },
156 153
157 'decrypt': function(aKey, aValue) { 154 'decrypt': function(aKey, aValue) {
158 var result; 155 var result;
159 156
160 if (aValue != null) { 157 if (aValue != null) {
161 var key, value; 158 var key, value;
162 var decryptedData; 159 var decryptedData;
163 var decryptedData; 160 var decryptedData;
164 161
165 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey)); 162 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey));
166 value = new Clipperz.ByteArray().appendBase64String(aValue); 163 value = new Clipperz.ByteArray().appendBase64String(aValue);
167 164
168 decryptedData = Clipperz.Crypto.AES.decrypt(key, value); 165 decryptedData = Clipperz.Crypto.AES.decrypt(key, value);
169 decryptedData = decryptedData.split((256/8)); 166 decryptedData = decryptedData.split((256/8));
170 167
171 try { 168 try {
172 result = Clipperz.Base.evalJSON(decryptedData.asString()); 169 result = Clipperz.Base.evalJSON(decryptedData.asString());
173 } catch (exception) { 170 } catch (exception) {
174 MochiKit.Logging.logError("Error while decrypting data"); 171 MochiKit.Logging.logError("Error while decrypting data");
175 throw Clipperz.Crypto.Base.exception.CorruptedMessage; 172 throw Clipperz.Crypto.Base.exception.CorruptedMessage;
176 } 173 }
177 } else { 174 } else {
178 result = null; 175 result = null;
179 } 176 }
180 177
181 return result; 178 return result;
182 }, 179 },
183 180
184 'deferredDecrypt': function(aKey, aValue) { 181 'deferredDecrypt': function(aKey, aValue) {
185 var result; 182 var result;
186 183
187 if (aValue != null) { 184 if (aValue != null) {
188 var deferredResult; 185 var deferredResult;
189 var key, value; 186 var key, value;
190 var decryptedData; 187 var decryptedData;
191 188
192 result = new MochiKit.Async.Deferred(); 189 result = new MochiKit.Async.Deferred();
193 190
194 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey)); 191 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey));
195 value = new Clipperz.ByteArray().appendBase64String(aValue); 192 value = new Clipperz.ByteArray().appendBase64String(aValue);
196 193
197 194
198 deferredResult = new MochiKit.Async.Deferred() 195 deferredResult = new MochiKit.Async.Deferred()
199 deferredResult.addCallback(Clipperz.Crypto.AES.deferredDecrypt, key, value); 196 deferredResult.addCallback(Clipperz.Crypto.AES.deferredDecrypt, key, value);
200 deferredResult.addCallback(function(aResult) { 197 deferredResult.addCallback(function(aResult) {
201 var result; 198 var result;
202 var decryptedData; 199 var decryptedData;
203 200
204 decryptedData = aResult.split((256/8)); 201 decryptedData = aResult.split((256/8));
205 202
206 try { 203 try {
207 result = Clipperz.Base.evalJSON(decryptedData.asString()); 204 result = Clipperz.Base.evalJSON(decryptedData.asString());
208 } catch (exception) { 205 } catch (exception) {
209 MochiKit.Logging.logError("Error while decrypting data"); 206 MochiKit.Logging.logError("Error while decrypting data");
210 throw Clipperz.Crypto.Base.exception.CorruptedMessage; 207 throw Clipperz.Crypto.Base.exception.CorruptedMessage;
211 } 208 }
212 209
213 return result; 210 return result;
214 }) 211 })
215 deferredResult.callback(); 212 deferredResult.callback();
216 213
217 result = deferredResult; 214 result = deferredResult;
218 } else { 215 } else {
219 result = MochiKit.Async.succeed(null); 216 result = MochiKit.Async.succeed(null);
220 } 217 }
221 218
222 return result; 219 return result;
223 }, 220 },
224 221
225 'hash': Clipperz.Crypto.SHA.sha_d256 222 'hash': Clipperz.Crypto.SHA.sha_d256
226 }, 223 },
227 224
228 //##################################################################### 225 //#####################################################################
229 226
230 '0.3': { 227 '0.3': {
231 'encrypt': function(aKey, aValue, aNonce) { 228 'encrypt': function(aKey, aValue, aNonce) {
232 var result; 229 var result;
233 varkey, value; 230 varkey, value;
234 var data; 231 var data;
235 var dataToEncrypt; 232 var dataToEncrypt;
236 var encryptedData; 233 var encryptedData;
237 234
238 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey)); 235 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey));
239 value = Clipperz.Base.serializeJSON(aValue); 236 value = Clipperz.Base.serializeJSON(aValue);
240 data = new Clipperz.ByteArray(value); 237 data = new Clipperz.ByteArray(value);
241 encryptedData = Clipperz.Crypto.AES.encrypt(key, data, aNonce); 238 encryptedData = Clipperz.Crypto.AES.encrypt(key, data, aNonce);
242 result = encryptedData.toBase64String(); 239 result = encryptedData.toBase64String();
243 240
244 return result; 241 return result;
245 }, 242 },
246 243
247 'deferredEncrypt': function(aKey, aValue, aNonce) { 244 'deferredEncrypt': function(aKey, aValue, aNonce) {
248 var deferredResult; 245 var deferredResult;
249 varkey, value; 246 varkey, value;
250 var data; 247 var data;
251 var dataToEncrypt; 248 var dataToEncrypt;
252 var encryptedData; 249 var encryptedData;
253 250
254 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey)); 251 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey));
255 value = Clipperz.Base.serializeJSON(aValue); 252 value = Clipperz.Base.serializeJSON(aValue);
256 data = new Clipperz.ByteArray(value); 253 data = new Clipperz.ByteArray(value);
257 254
258 deferredResult = new MochiKit.Async.Deferred() 255 deferredResult = new MochiKit.Async.Deferred()
259//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Crypto.deferredEncrypt - 1: " + res); return res;}); 256//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Crypto.deferredEncrypt - 1: " + res); return res;});
260 deferredResult.addCallback(Clipperz.Crypto.AES.deferredEncrypt, key, data, aNonce); 257 deferredResult.addCallback(Clipperz.Crypto.AES.deferredEncrypt, key, data, aNonce);
261//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Crypto.deferredEncrypt - 2: " + res); return res;}); 258//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Crypto.deferredEncrypt - 2: " + res); return res;});
262 deferredResult.addCallback(function(aResult) { 259 deferredResult.addCallback(function(aResult) {
263 return aResult.toBase64String(); 260 return aResult.toBase64String();
264 }) 261 })
265//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Crypto.deferredEncrypt - 3: " + res); return res;}); 262//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Crypto.deferredEncrypt - 3: " + res); return res;});
266 deferredResult.callback(); 263 deferredResult.callback();
267 264
268 return deferredResult; 265 return deferredResult;
269 }, 266 },
270 267
271 'decrypt': function(aKey, aValue) { 268 'decrypt': function(aKey, aValue) {
272 var result; 269 var result;
273 270
274 if (aValue != null) { 271 if (aValue != null) {
275 var key, value; 272 var key, value;
276 var decryptedData; 273 var decryptedData;
277 var decryptedValue; 274 var decryptedValue;
278 275
279 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey)); 276 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey));
280 value = new Clipperz.ByteArray().appendBase64String(aValue); 277 value = new Clipperz.ByteArray().appendBase64String(aValue);
281 278
282 decryptedData = Clipperz.Crypto.AES.decrypt(key, value); 279 decryptedData = Clipperz.Crypto.AES.decrypt(key, value);
283 280
284 value = decryptedData.asString(); 281 value = decryptedData.asString();
285 try { 282 try {
286 result = Clipperz.Base.evalJSON(value); 283 result = Clipperz.Base.evalJSON(value);
287 } catch (exception) { 284 } catch (exception) {
288 MochiKit.Logging.logError("Error while decrypting data"); 285 MochiKit.Logging.logError("Error while decrypting data");
289 throw Clipperz.Crypto.Base.exception.CorruptedMessage; 286 throw Clipperz.Crypto.Base.exception.CorruptedMessage;
290 } 287 }
291 } else { 288 } else {
292 result = null; 289 result = null;
293 } 290 }
294 291
295 return result; 292 return result;
296 }, 293 },
297 294
298 'deferredDecrypt': function(aKey, aValue) { 295 'deferredDecrypt': function(aKey, aValue) {
299 var deferredResult; 296 var deferredResult;
300 // var now; 297 // var now;
301 298
302 deferredResult = new MochiKit.Async.Deferred(); 299 deferredResult = new MochiKit.Async.Deferred();
303 now = new Date; 300 now = new Date;
304 301
305//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 1: " + res); return res;}); 302//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 1: " + res); return res;});
306 if (aValue != null) { 303 if (aValue != null) {
307 var key, value; 304 var key, value;
308 var decryptedData; 305 var decryptedData;
309 var decryptedValue; 306 var decryptedValue;
310 307
311 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey)); 308 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey));
312//MochiKit.Logging.logDebug("[" + (new Date() - now) + "] computed key"); 309//MochiKit.Logging.logDebug("[" + (new Date() - now) + "] computed key");
313 value = new Clipperz.ByteArray().appendBase64String(aValue); 310 value = new Clipperz.ByteArray().appendBase64String(aValue);
314//MochiKit.Logging.logDebug("[" + (new Date() - now) + "] appendedBase64String"); 311//MochiKit.Logging.logDebug("[" + (new Date() - now) + "] appendedBase64String");
315 312
316//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 1.1: " /* + res*/); return res;}); 313//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 1.1: " /* + res*/); return res;});
317 deferredResult.addCallback(Clipperz.Crypto.AES.deferredDecrypt, key, value); 314 deferredResult.addCallback(Clipperz.Crypto.AES.deferredDecrypt, key, value);
318//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 2: " /* + res*/); return res;}); 315//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 2: " /* + res*/); return res;});
319 deferredResult.addCallback(MochiKit.Async.wait, 0.1); 316 deferredResult.addCallback(MochiKit.Async.wait, 0.1);
320//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 3: " /* + res*/); return res;}); 317//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 3: " /* + res*/); return res;});
321 deferredResult.addCallback(function(aResult) { 318 deferredResult.addCallback(function(aResult) {
322 return aResult.asString(); 319 return aResult.asString();
323 }); 320 });
324//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 4: " /* + res*/); return res;}); 321//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 4: " /* + res*/); return res;});
325 deferredResult.addCallback(MochiKit.Async.wait, 0.1); 322 deferredResult.addCallback(MochiKit.Async.wait, 0.1);
326//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 5: " /* + res*/); return res;}); 323//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 5: " /* + res*/); return res;});
327 deferredResult.addCallback(Clipperz.Base.evalJSON); 324 deferredResult.addCallback(Clipperz.Base.evalJSON);
328//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 6: " /* + res*/); return res;}); 325//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 6: " /* + res*/); return res;});
329 deferredResult.addErrback(function(anError) { 326 deferredResult.addErrback(function(anError) {
330 MochiKit.Logging.logError("Error while decrypting data"); 327 MochiKit.Logging.logError("Error while decrypting data");
331 throw Clipperz.Crypto.Base.exception.CorruptedMessage; 328 throw Clipperz.Crypto.Base.exception.CorruptedMessage;
332 }) 329 })
333//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 7: " /* + res*/); return res;}); 330//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 7: " /* + res*/); return res;});
334 } else { 331 } else {
335 deferredResult.addCallback(function() { 332 deferredResult.addCallback(function() {
336 return null; 333 return null;
337 }); 334 });
338 } 335 }
339 deferredResult.callback(); 336 deferredResult.callback();
340 337
341 return deferredResult; 338 return deferredResult;
342 }, 339 },
343 340
344 'hash': Clipperz.Crypto.SHA.sha_d256 341 'hash': Clipperz.Crypto.SHA.sha_d256
345 }, 342 },
346 343
347 //##################################################################### 344 //#####################################################################
348/* 345/*
349 '0.4': { 346 '0.4': {
350 'encrypt': function(aKey, aValue, aNonce) { 347 'encrypt': function(aKey, aValue, aNonce) {
351 var result; 348 var result;
352 varkey, value; 349 varkey, value;
353 var data; 350 var data;
354 var dataToEncrypt; 351 var dataToEncrypt;
355 var encryptedData; 352 var encryptedData;
356 353
357//MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt"); 354//MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt");
358 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey)); 355 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey));
359//MochiKit.Logging.logDebug("--- [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt - 1"); 356//MochiKit.Logging.logDebug("--- [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt - 1");
360 value = Clipperz.Base.serializeJSON(aValue); 357 value = Clipperz.Base.serializeJSON(aValue);
361//MochiKit.Logging.logDebug("--- [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt - 2"); 358//MochiKit.Logging.logDebug("--- [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt - 2");
362/ * 359/ *
363//MochiKit.Logging.logDebug("--> encrypt.fullSize: " + value.length); 360//MochiKit.Logging.logDebug("--> encrypt.fullSize: " + value.length);
364 value = value.replace(/":{"label":"/g, '":{l:"'); 361 value = value.replace(/":{"label":"/g, '":{l:"');
365 value = value.replace(/":{"key":"/g, '":{k:"'); 362 value = value.replace(/":{"key":"/g, '":{k:"');
366 value = value.replace(/":{"notes":"/g, '":{n:"'); 363 value = value.replace(/":{"notes":"/g, '":{n:"');
367 value = value.replace(/":{"record":"/g, '":{r:"'); 364 value = value.replace(/":{"record":"/g, '":{r:"');
368 value = value.replace(/", "label":"/g, '",l:"'); 365 value = value.replace(/", "label":"/g, '",l:"');
369 value = value.replace(/", "favicon":"/g,'",f:"'); 366 value = value.replace(/", "favicon":"/g,'",f:"');
370//MochiKit.Logging.logDebug("<-- encrypt.compressed: " + value.length); 367//MochiKit.Logging.logDebug("<-- encrypt.compressed: " + value.length);
371* / 368* /
372 data = new Clipperz.ByteArray(value); 369 data = new Clipperz.ByteArray(value);
373//MochiKit.Logging.logDebug("--- [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt - 3"); 370//MochiKit.Logging.logDebug("--- [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt - 3");
374 encryptedData = Clipperz.Crypto.AES.encrypt(key, data, aNonce); 371 encryptedData = Clipperz.Crypto.AES.encrypt(key, data, aNonce);
375//MochiKit.Logging.logDebug("--- [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt - 4"); 372//MochiKit.Logging.logDebug("--- [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt - 4");
376 result = encryptedData.toBase64String(); 373 result = encryptedData.toBase64String();
377//MochiKit.Logging.logDebug("<<< [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt"); 374//MochiKit.Logging.logDebug("<<< [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt");
378 375
379 return result; 376 return result;
380 }, 377 },
381 378
382 'decrypt': function(aKey, aValue) { 379 'decrypt': function(aKey, aValue) {
383 var result; 380 var result;
384 381
385 if (aValue != null) { 382 if (aValue != null) {
386 var key, value; 383 var key, value;
387 var decryptedData; 384 var decryptedData;
388 var decryptedValue; 385 var decryptedValue;
389 386
390 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey)); 387 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey));
391 value = new Clipperz.ByteArray().appendBase64String(aValue); 388 value = new Clipperz.ByteArray().appendBase64String(aValue);
392 389
393 decryptedData = Clipperz.Crypto.AES.decrypt(key, value); 390 decryptedData = Clipperz.Crypto.AES.decrypt(key, value);
394 391
395 value = decryptedData.asString(); 392 value = decryptedData.asString();
396/ * 393/ *
397 value = value.replace(/":{l:"/g,'":{"label":"'); 394 value = value.replace(/":{l:"/g,'":{"label":"');
398 value = value.replace(/":{k:"/g,'":{"key":"'); 395 value = value.replace(/":{k:"/g,'":{"key":"');
399 value = value.replace(/":{n:"/g,'":{"notes":"'); 396 value = value.replace(/":{n:"/g,'":{"notes":"');
400 value = value.replace(/":{r:"/g,'":{"record":"'); 397 value = value.replace(/":{r:"/g,'":{"record":"');
401 value = value.replace(/",l:"/g, '", "label":"'); 398 value = value.replace(/",l:"/g, '", "label":"');
402 value = value.replace(/",f:"/g, '", "favicon":"'); 399 value = value.replace(/",f:"/g, '", "favicon":"');
403* / 400* /
404 try { 401 try {
405 result = Clipperz.Base.evalJSON(value); 402 result = Clipperz.Base.evalJSON(value);
406 } catch (exception) { 403 } catch (exception) {
407 MochiKit.Logging.logError("Error while decrypting data"); 404 MochiKit.Logging.logError("Error while decrypting data");
408 throw Clipperz.Crypto.Base.exception.CorruptedMessage; 405 throw Clipperz.Crypto.Base.exception.CorruptedMessage;
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/DirectLogin.js b/frontend/beta/js/Clipperz/PM/DataModel/DirectLogin.js
index 3ebc208..aee5703 100644
--- a/frontend/beta/js/Clipperz/PM/DataModel/DirectLogin.js
+++ b/frontend/beta/js/Clipperz/PM/DataModel/DirectLogin.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } 28if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
32 29
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.DataModel.DirectLogin = function(args) { 33Clipperz.PM.DataModel.DirectLogin = function(args) {
37//MochiKit.Logging.logDebug(">>> new Clipperz.PM.DataModel.DirectLogin"); 34//MochiKit.Logging.logDebug(">>> new Clipperz.PM.DataModel.DirectLogin");
38//console.log(">>> new Clipperz.PM.DataModel.DirectLogin - args: %o", args); 35//console.log(">>> new Clipperz.PM.DataModel.DirectLogin - args: %o", args);
39//console.log("--- formData: %s", Clipperz.Base.serializeJSON(args.formData)); 36//console.log("--- formData: %s", Clipperz.Base.serializeJSON(args.formData));
40 args = args || {}; 37 args = args || {};
41 38
42//MochiKit.Logging.logDebug("--- new Clipperz.PM.DataModel.DirectLogin - args: " + Clipperz.Base.serializeJSON(MochiKit.Base.keys(args))); 39//MochiKit.Logging.logDebug("--- new Clipperz.PM.DataModel.DirectLogin - args: " + Clipperz.Base.serializeJSON(MochiKit.Base.keys(args)));
43 this._record = args.record || null; 40 this._record = args.record || null;
44 this._label = args.label || "unnamed record" 41 this._label = args.label || "unnamed record"
45 this._reference = args.reference || Clipperz.PM.Crypto.randomKey(); 42 this._reference = args.reference || Clipperz.PM.Crypto.randomKey();
46 this._favicon = args.favicon || null; 43 this._favicon = args.favicon || null;
47 this._bookmarkletVersion = args.bookmarkletVersion || "0.1"; 44 this._bookmarkletVersion = args.bookmarkletVersion || "0.1";
48 45
49 this._directLoginInputs = null; 46 this._directLoginInputs = null;
50 47
51 this._formValues = args.formValues || {}; 48 this._formValues = args.formValues || {};
52 this.setFormData(args.formData || null); 49 this.setFormData(args.formData || null);
53//console.log("=== formData: %o", this.formData()); 50//console.log("=== formData: %o", this.formData());
54 51
55 if (args.legacyBindingData == null) { 52 if (args.legacyBindingData == null) {
56 this.setBindingData(args.bindingData || null); 53 this.setBindingData(args.bindingData || null);
57 } else { 54 } else {
58 this.setLegacyBindingData(args.legacyBindingData); 55 this.setLegacyBindingData(args.legacyBindingData);
59 } 56 }
60 57
61 this._fixedFavicon = null; 58 this._fixedFavicon = null;
62 59
63 //this._formValues = args.formValues || (this.hasValuesToSet() ? {} : null); 60 //this._formValues = args.formValues || (this.hasValuesToSet() ? {} : null);
64//MochiKit.Logging.logDebug("<<< new Clipperz.PM.DataModel.DirectLogin"); 61//MochiKit.Logging.logDebug("<<< new Clipperz.PM.DataModel.DirectLogin");
65 62
66 return this; 63 return this;
67} 64}
68 65
69Clipperz.PM.DataModel.DirectLogin.prototype = MochiKit.Base.update(null, { 66Clipperz.PM.DataModel.DirectLogin.prototype = MochiKit.Base.update(null, {
70 67
71 'remove': function() { 68 'remove': function() {
72 this.record().removeDirectLogin(this); 69 this.record().removeDirectLogin(this);
73 }, 70 },
74 71
75 //------------------------------------------------------------------------- 72 //-------------------------------------------------------------------------
76 73
77 'record': function() { 74 'record': function() {
78 return this._record; 75 return this._record;
79 }, 76 },
80 77
81 //------------------------------------------------------------------------- 78 //-------------------------------------------------------------------------
82 79
83 'user': function() { 80 'user': function() {
84 return this.record().user(); 81 return this.record().user();
85 }, 82 },
86 83
87 //------------------------------------------------------------------------- 84 //-------------------------------------------------------------------------
88 85
89 'reference': function() { 86 'reference': function() {
90 return this._reference; 87 return this._reference;
91 }, 88 },
92 89
93 //------------------------------------------------------------------------- 90 //-------------------------------------------------------------------------
94 91
95 'label': function() { 92 'label': function() {
96 return this._label; 93 return this._label;
97 }, 94 },
98 95
99 'setLabel': function(aValue) { 96 'setLabel': function(aValue) {
100 this._label = aValue; 97 this._label = aValue;
101 }, 98 },
102 99
103 //------------------------------------------------------------------------- 100 //-------------------------------------------------------------------------
104 101
105 'favicon': function() { 102 'favicon': function() {
106 if (this._favicon == null) { 103 if (this._favicon == null) {
107 varactionUrl; 104 varactionUrl;
108 var hostname; 105 var hostname;
109 106
110 actionUrl = this.formData()['attributes']['action']; 107 actionUrl = this.formData()['attributes']['action'];
111 hostname = actionUrl.replace(/^https?:\/\/([^\/]*)\/.*/, '$1'); 108 hostname = actionUrl.replace(/^https?:\/\/([^\/]*)\/.*/, '$1');
112 this._favicon = "http://" + hostname + "/favicon.ico"; 109 this._favicon = "http://" + hostname + "/favicon.ico";
113 } 110 }
114 111
115 return this._favicon; 112 return this._favicon;
116 }, 113 },
117 114
118 //------------------------------------------------------------------------- 115 //-------------------------------------------------------------------------
119 116
120 'fixedFavicon': function() { 117 'fixedFavicon': function() {
121 var result; 118 var result;
122 119
123 if (this._fixedFavicon == null) { 120 if (this._fixedFavicon == null) {
124 result = this.favicon(); 121 result = this.favicon();
125 122
126 if (Clipperz_IEisBroken) { 123 if (Clipperz_IEisBroken) {
127 if (this.user().preferences().disableUnsecureFaviconLoadingForIE()) { 124 if (this.user().preferences().disableUnsecureFaviconLoadingForIE()) {
128 if (result.indexOf('https://') != 0) { 125 if (result.indexOf('https://') != 0) {
129 result = Clipperz.PM.Strings['defaultFaviconUrl_IE']; 126 result = Clipperz.PM.Strings['defaultFaviconUrl_IE'];
130 this.setFixedFavicon(result); 127 this.setFixedFavicon(result);
131 } 128 }
132 } 129 }
133 } 130 }
134 } else { 131 } else {
135 result = this._fixedFavicon; 132 result = this._fixedFavicon;
136 } 133 }
137 134
138 return result; 135 return result;
139 }, 136 },
140 137
141 'setFixedFavicon': function(aValue) { 138 'setFixedFavicon': function(aValue) {
142 this._fixedFavicon = aValue; 139 this._fixedFavicon = aValue;
143 }, 140 },
144 141
145 //------------------------------------------------------------------------- 142 //-------------------------------------------------------------------------
146 143
147 'bookmarkletVersion': function() { 144 'bookmarkletVersion': function() {
148 return this._bookmarkletVersion; 145 return this._bookmarkletVersion;
149 }, 146 },
150 147
151 'setBookmarkletVersion': function(aValue) { 148 'setBookmarkletVersion': function(aValue) {
152 this._bookmarkletVersion = aValue; 149 this._bookmarkletVersion = aValue;
153 }, 150 },
154 151
155 //------------------------------------------------------------------------- 152 //-------------------------------------------------------------------------
156 153
157 'formData': function() { 154 'formData': function() {
158 return this._formData; 155 return this._formData;
159 }, 156 },
160 157
161 'setFormData': function(aValue) { 158 'setFormData': function(aValue) {
162 var formData; 159 var formData;
163 160
164//MochiKit.Logging.logDebug(">>> DirectLogin.setFormData - " + Clipperz.Base.serializeJSON(aValue)); 161//MochiKit.Logging.logDebug(">>> DirectLogin.setFormData - " + Clipperz.Base.serializeJSON(aValue));
165 switch (this.bookmarkletVersion()) { 162 switch (this.bookmarkletVersion()) {
166 case "0.2": 163 case "0.2":
167 formData = aValue; 164 formData = aValue;
168 break; 165 break;
169 case "0.1": 166 case "0.1":
170//MochiKit.Logging.logDebug("--- DirectLogin.setFormData - fixing form data from bookmarklet version 0.1"); 167//MochiKit.Logging.logDebug("--- DirectLogin.setFormData - fixing form data from bookmarklet version 0.1");
171 formData = this.fixFormDataFromBookmarkletVersion_0_1(aValue); 168 formData = this.fixFormDataFromBookmarkletVersion_0_1(aValue);
172 break; 169 break;
173 } 170 }
174 171
175 this._formData = aValue; 172 this._formData = aValue;
176 this.setBookmarkletVersion("0.2"); 173 this.setBookmarkletVersion("0.2");
177 174
178//MochiKit.Logging.logDebug("--- DirectLogin.setFormData - formData: " + Clipperz.Base.serializeJSON(formData)); 175//MochiKit.Logging.logDebug("--- DirectLogin.setFormData - formData: " + Clipperz.Base.serializeJSON(formData));
179 if (formData != null) { 176 if (formData != null) {
180 var i,c; 177 var i,c;
181 178
182 this._directLoginInputs = []; 179 this._directLoginInputs = [];
183 c = formData['inputs'].length; 180 c = formData['inputs'].length;
184 for (i=0; i<c; i++) { 181 for (i=0; i<c; i++) {
185 var directLoginInput; 182 var directLoginInput;
186 183
187 directLoginInput = new Clipperz.PM.DataModel.DirectLoginInput(this, formData['inputs'][i]); 184 directLoginInput = new Clipperz.PM.DataModel.DirectLoginInput(this, formData['inputs'][i]);
188 this._directLoginInputs.push(directLoginInput); 185 this._directLoginInputs.push(directLoginInput);
189 } 186 }
190 } 187 }
191//MochiKit.Logging.logDebug("<<< DirectLogin.setFormData"); 188//MochiKit.Logging.logDebug("<<< DirectLogin.setFormData");
192 }, 189 },
193 190
194 'fixFormDataFromBookmarkletVersion_0_1': function(aValue) { 191 'fixFormDataFromBookmarkletVersion_0_1': function(aValue) {
195//{"type":"radio", "name":"action", "value":"new-user", "checked":false }, { "type":"radio", "name":"action", "value":"sign-in", "checked":true } 192//{"type":"radio", "name":"action", "value":"new-user", "checked":false }, { "type":"radio", "name":"action", "value":"sign-in", "checked":true }
196 // || 193 // ||
197 // \ / 194 // \ /
198 // \/ 195 // \/
199//{"name":"dominio", "type":"radio", "options":[{"value":"@alice.it", "checked":true}, {"value":"@tin.it", "checked":false}, {"value":"@virgilio.it", "checked":false}, {"value":"@tim.it", "checked":false}]} 196//{"name":"dominio", "type":"radio", "options":[{"value":"@alice.it", "checked":true}, {"value":"@tin.it", "checked":false}, {"value":"@virgilio.it", "checked":false}, {"value":"@tim.it", "checked":false}]}
200 var result; 197 var result;
201 var inputs; 198 var inputs;
202 var updatedInputs; 199 var updatedInputs;
203 var radios; 200 var radios;
204 201
205//MochiKit.Logging.logDebug(">>> DirectLogin.fixFormDataFromBookmarkletVersion_0_1"); 202//MochiKit.Logging.logDebug(">>> DirectLogin.fixFormDataFromBookmarkletVersion_0_1");
206 result = aValue; 203 result = aValue;
207 inputs = aValue['inputs']; 204 inputs = aValue['inputs'];
208 205
209 updatedInputs = MochiKit.Base.filter(function(anInput) { 206 updatedInputs = MochiKit.Base.filter(function(anInput) {
210 varresult; 207 varresult;
211 var type; 208 var type;
212 209
213 type = anInput['type'] || 'text'; 210 type = anInput['type'] || 'text';
214 result = type.toLowerCase() != 'radio'; 211 result = type.toLowerCase() != 'radio';
215 212
216 return result; 213 return result;
217 }, inputs); 214 }, inputs);
218 radios = MochiKit.Base.filter(function(anInput) { 215 radios = MochiKit.Base.filter(function(anInput) {
219 varresult; 216 varresult;
220 var type; 217 var type;
221 218
222 type = anInput['type'] || 'text'; 219 type = anInput['type'] || 'text';
223 result = type.toLowerCase() == 'radio'; 220 result = type.toLowerCase() == 'radio';
224 221
225 return result; 222 return result;
226 }, inputs); 223 }, inputs);
227 224
228 if (radios.length > 0) { 225 if (radios.length > 0) {
229 var updatedRadios; 226 var updatedRadios;
230 227
231 updatedRadios = {}; 228 updatedRadios = {};
232 MochiKit.Iter.forEach(radios, MochiKit.Base.bind(function(aRadio) { 229 MochiKit.Iter.forEach(radios, MochiKit.Base.bind(function(aRadio) {
233 varradioConfiguration; 230 varradioConfiguration;
234 231
235 radioConfiguration = updatedRadios[aRadio['name']]; 232 radioConfiguration = updatedRadios[aRadio['name']];
236 if (radioConfiguration == null) { 233 if (radioConfiguration == null) {
237 radioConfiguration = {type:'radio', name:aRadio['name'], options:[]}; 234 radioConfiguration = {type:'radio', name:aRadio['name'], options:[]};
238 updatedRadios[aRadio['name']] = radioConfiguration; 235 updatedRadios[aRadio['name']] = radioConfiguration;
239 } 236 }
240 237
241 //TODO: remove the value: field and replace it with element.dom.value = <some value> 238 //TODO: remove the value: field and replace it with element.dom.value = <some value>
242 radioConfiguration.options.push({value:aRadio['value'], checked:aRadio['checked']}); 239 radioConfiguration.options.push({value:aRadio['value'], checked:aRadio['checked']});
243 240
244 if ((aRadio['checked'] == true) && (this.formValues()[aRadio['name']] == null)) { 241 if ((aRadio['checked'] == true) && (this.formValues()[aRadio['name']] == null)) {
245//MochiKit.Logging.logDebug("+++ setting value '" + aRadio['value'] + "' for key: '" + aRadio['name'] + "'"); 242//MochiKit.Logging.logDebug("+++ setting value '" + aRadio['value'] + "' for key: '" + aRadio['name'] + "'");
246 this.formValues()[aRadio['name']] = aRadio['value']; 243 this.formValues()[aRadio['name']] = aRadio['value'];
247 } 244 }
248 }, this)) 245 }, this))
249 246
250 updatedInputs = MochiKit.Base.concat(updatedInputs, MochiKit.Base.values(updatedRadios)); 247 updatedInputs = MochiKit.Base.concat(updatedInputs, MochiKit.Base.values(updatedRadios));
251 } 248 }
252 249
253 delete result.inputs; 250 delete result.inputs;
254 result.inputs = updatedInputs; 251 result.inputs = updatedInputs;
255//MochiKit.Logging.logDebug("<<< DirectLogin.fixFormDataFromBookmarkletVersion_0_1"); 252//MochiKit.Logging.logDebug("<<< DirectLogin.fixFormDataFromBookmarkletVersion_0_1");
256 253
257 return result; 254 return result;
258 }, 255 },
259 256
260 //......................................................................... 257 //.........................................................................
261 258
262 'directLoginInputs': function() { 259 'directLoginInputs': function() {
263 return this._directLoginInputs; 260 return this._directLoginInputs;
264 }, 261 },
265 262
266 //------------------------------------------------------------------------- 263 //-------------------------------------------------------------------------
267 264
268 'formValues': function() { 265 'formValues': function() {
269 return this._formValues; 266 return this._formValues;
270 }, 267 },
271 268
272 'hasValuesToSet': function() { 269 'hasValuesToSet': function() {
273 var result; 270 var result;
274 271
275//MochiKit.Logging.logDebug(">>> DirectLogin.hasValuesToSet"); 272//MochiKit.Logging.logDebug(">>> DirectLogin.hasValuesToSet");
276 if (this.directLoginInputs() != null) { 273 if (this.directLoginInputs() != null) {
277 result = MochiKit.Iter.some(this.directLoginInputs(), MochiKit.Base.methodcaller('shouldSetValue')); 274 result = MochiKit.Iter.some(this.directLoginInputs(), MochiKit.Base.methodcaller('shouldSetValue'));
278 } else { 275 } else {
279 result = false; 276 result = false;
280 } 277 }
281//MochiKit.Logging.logDebug("<<< DirectLogin.hasValuesToSet"); 278//MochiKit.Logging.logDebug("<<< DirectLogin.hasValuesToSet");
282 279
283 return result; 280 return result;
284 }, 281 },
285 282
286 //'additionalValues': function() { 283 //'additionalValues': function() {
287 'inputsRequiringAdditionalValues': function() { 284 'inputsRequiringAdditionalValues': function() {
288 varresult; 285 varresult;
289 var inputs; 286 var inputs;
290 287
291//MochiKit.Logging.logDebug(">>> DirectLogin.additionalValues"); 288//MochiKit.Logging.logDebug(">>> DirectLogin.additionalValues");
292 result = {}; 289 result = {};
293 if (this.directLoginInputs() != null) { 290 if (this.directLoginInputs() != null) {
294 inputs = MochiKit.Base.filter(MochiKit.Base.methodcaller('shouldSetValue'), this.directLoginInputs()); 291 inputs = MochiKit.Base.filter(MochiKit.Base.methodcaller('shouldSetValue'), this.directLoginInputs());
295 MochiKit.Iter.forEach(inputs, function(anInput) { 292 MochiKit.Iter.forEach(inputs, function(anInput) {
296 result[anInput.name()] = anInput; 293 result[anInput.name()] = anInput;
297 }) 294 })
298 } 295 }
299//MochiKit.Logging.logDebug("<<< DirectLogin.additionalValues"); 296//MochiKit.Logging.logDebug("<<< DirectLogin.additionalValues");
300 297
301 return result; 298 return result;
302 }, 299 },
303 300
304 //------------------------------------------------------------------------- 301 //-------------------------------------------------------------------------
305 302
306 'bindingData': function() { 303 'bindingData': function() {
307 return this._bindingData; 304 return this._bindingData;
308 }, 305 },
309 306
310 'setBindingData': function(aValue) { 307 'setBindingData': function(aValue) {
311//MochiKit.Logging.logDebug(">>> DirectLogin.setBindingData"); 308//MochiKit.Logging.logDebug(">>> DirectLogin.setBindingData");
312 if (aValue != null) { 309 if (aValue != null) {
313 var bindingKey; 310 var bindingKey;
314 311
315 this._bindingData = aValue; 312 this._bindingData = aValue;
316 this._bindings = {}; 313 this._bindings = {};
317 314
318 for (bindingKey in aValue) { 315 for (bindingKey in aValue) {
319 var directLoginBinding; 316 var directLoginBinding;
320 317
321 directLoginBinding = new Clipperz.PM.DataModel.DirectLoginBinding(this, bindingKey, {fieldKey:aValue[bindingKey]}); 318 directLoginBinding = new Clipperz.PM.DataModel.DirectLoginBinding(this, bindingKey, {fieldKey:aValue[bindingKey]});
322 this._bindings[bindingKey] = directLoginBinding; 319 this._bindings[bindingKey] = directLoginBinding;
323 } 320 }
324 } else { 321 } else {
325 var editableFields; 322 var editableFields;
326 var bindings; 323 var bindings;
327 324
328 bindings = {}; 325 bindings = {};
329 326
330 editableFields = MochiKit.Base.filter(function(aField) { 327 editableFields = MochiKit.Base.filter(function(aField) {
331 var result; 328 var result;
332 var type; 329 var type;
333 330
334 type = aField['type'].toLowerCase(); 331 type = aField['type'].toLowerCase();
335 result = ((type != 'hidden') && (type != 'submit') && (type != 'checkbox') && (type != 'radio') && (type != 'select')); 332 result = ((type != 'hidden') && (type != 'submit') && (type != 'checkbox') && (type != 'radio') && (type != 'select'));
336 333
337 return result; 334 return result;
338 }, this.formData().inputs); 335 }, this.formData().inputs);
339 336
340 MochiKit.Iter.forEach(editableFields, function(anEditableField) { 337 MochiKit.Iter.forEach(editableFields, function(anEditableField) {
341 bindings[anEditableField['name']] = new Clipperz.PM.DataModel.DirectLoginBinding(this, anEditableField['name']); 338 bindings[anEditableField['name']] = new Clipperz.PM.DataModel.DirectLoginBinding(this, anEditableField['name']);
342 }, this); 339 }, this);
343 340
344 this._bindings = bindings; 341 this._bindings = bindings;
345 } 342 }
346//MochiKit.Logging.logDebug("<<< DirectLogin.setBindingData"); 343//MochiKit.Logging.logDebug("<<< DirectLogin.setBindingData");
347 }, 344 },
348 345
349 'setLegacyBindingData': function(aValue) { 346 'setLegacyBindingData': function(aValue) {
350//MochiKit.Logging.logDebug(">>> DirectLogin.setLegacyBindingData"); 347//MochiKit.Logging.logDebug(">>> DirectLogin.setLegacyBindingData");
351 var bindingKey; 348 var bindingKey;
352 349
353 this._bindingData = aValue; 350 this._bindingData = aValue;
354 this._bindings = {}; 351 this._bindings = {};
355 352
356 for (bindingKey in aValue) { 353 for (bindingKey in aValue) {
357 var directLoginBinding; 354 var directLoginBinding;
358 355
359 directLoginBinding = new Clipperz.PM.DataModel.DirectLoginBinding(this, bindingKey, {fieldName:aValue[bindingKey]}); 356 directLoginBinding = new Clipperz.PM.DataModel.DirectLoginBinding(this, bindingKey, {fieldName:aValue[bindingKey]});
360 this._bindings[bindingKey] = directLoginBinding; 357 this._bindings[bindingKey] = directLoginBinding;
361 } 358 }
362//MochiKit.Logging.logDebug("<<< DirectLogin.setLegacyBindingData"); 359//MochiKit.Logging.logDebug("<<< DirectLogin.setLegacyBindingData");
363 }, 360 },
364 361
365 //......................................................................... 362 //.........................................................................
366 363
367 'bindings': function() { 364 'bindings': function() {
368 return this._bindings; 365 return this._bindings;
369 }, 366 },
370 367
371 //------------------------------------------------------------------------- 368 //-------------------------------------------------------------------------
372 369
373 'serializedData': function() { 370 'serializedData': function() {
374 var result; 371 var result;
375 varbindingKey; 372 varbindingKey;
376 373
377 result = {}; 374 result = {};
378 // result.reference = this.reference(); 375 // result.reference = this.reference();
379 result.label = this.label(); 376 result.label = this.label();
380 result.favicon = this.favicon() || ""; 377 result.favicon = this.favicon() || "";
381 result.bookmarkletVersion = this.bookmarkletVersion(); 378 result.bookmarkletVersion = this.bookmarkletVersion();
382 result.formData = this.formData(); 379 result.formData = this.formData();
383 if (this.hasValuesToSet) { 380 if (this.hasValuesToSet) {
384 result.formValues = this.formValues(); 381 result.formValues = this.formValues();
385 } 382 }
386 result.bindingData = {}; 383 result.bindingData = {};
387 384
388 for (bindingKey in this.bindings()) { 385 for (bindingKey in this.bindings()) {
389 result.bindingData[bindingKey] = this.bindings()[bindingKey].serializedData(); 386 result.bindingData[bindingKey] = this.bindings()[bindingKey].serializedData();
390 } 387 }
391 388
392 return result; 389 return result;
393 }, 390 },
394 391
395 //------------------------------------------------------------------------- 392 //-------------------------------------------------------------------------
396 393
397 'handleMissingFaviconImage': function(anEvent) { 394 'handleMissingFaviconImage': function(anEvent) {
398 anEvent.stop(); 395 anEvent.stop();
399 MochiKit.Signal.disconnectAll(anEvent.src()); 396 MochiKit.Signal.disconnectAll(anEvent.src());
400 this.setFixedFavicon(Clipperz.PM.Strings['defaultFaviconUrl']); 397 this.setFixedFavicon(Clipperz.PM.Strings['defaultFaviconUrl']);
401 anEvent.src().src = this.fixedFavicon(); 398 anEvent.src().src = this.fixedFavicon();
402 }, 399 },
403 400
404 //========================================================================= 401 //=========================================================================
405 402
406 'runHttpAuthDirectLogin': function(aWindow) { 403 'runHttpAuthDirectLogin': function(aWindow) {
407 MochiKit.DOM.withWindow(aWindow, MochiKit.Base.bind(function() { 404 MochiKit.DOM.withWindow(aWindow, MochiKit.Base.bind(function() {
408 var completeUrl; 405 var completeUrl;
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginBinding.js b/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginBinding.js
index 19aa9cb..7f09bff 100644
--- a/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginBinding.js
+++ b/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginBinding.js
@@ -1,113 +1,110 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } 28if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
32 29
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.DataModel.DirectLoginBinding = function(aDirectLogin, aKey, args) { 33Clipperz.PM.DataModel.DirectLoginBinding = function(aDirectLogin, aKey, args) {
37//MochiKit.Logging.logDebug(">>> new DirectLoginBinding") 34//MochiKit.Logging.logDebug(">>> new DirectLoginBinding")
38 args = args || {}; 35 args = args || {};
39//MochiKit.Logging.logDebug("--- new DirectLoginBinding - args: " + Clipperz.Base.serializeJSON(args)); 36//MochiKit.Logging.logDebug("--- new DirectLoginBinding - args: " + Clipperz.Base.serializeJSON(args));
40 37
41 this._directLogin = aDirectLogin || args.directLogin || null; 38 this._directLogin = aDirectLogin || args.directLogin || null;
42 this._key = aKey; 39 this._key = aKey;
43 40
44 this._fieldKey = args.fieldKey || null; 41 this._fieldKey = args.fieldKey || null;
45 this._fieldName = args.fieldName || null; 42 this._fieldName = args.fieldName || null;
46//MochiKit.Logging.logDebug("<<< new DirectLoginBinding") 43//MochiKit.Logging.logDebug("<<< new DirectLoginBinding")
47 44
48 return this; 45 return this;
49} 46}
50 47
51Clipperz.PM.DataModel.DirectLoginBinding.prototype = MochiKit.Base.update(null, { 48Clipperz.PM.DataModel.DirectLoginBinding.prototype = MochiKit.Base.update(null, {
52 49
53 'directLogin': function() { 50 'directLogin': function() {
54 return this._directLogin; 51 return this._directLogin;
55 }, 52 },
56 53
57 //------------------------------------------------------------------------- 54 //-------------------------------------------------------------------------
58 55
59 'key': function() { 56 'key': function() {
60 return this._key; 57 return this._key;
61 }, 58 },
62 59
63 //------------------------------------------------------------------------- 60 //-------------------------------------------------------------------------
64 61
65 'fieldKey': function() { 62 'fieldKey': function() {
66//MochiKit.Logging.logDebug("=== Clipperz.PM.DataModel.DirectLoginBinding.fieldKey"); 63//MochiKit.Logging.logDebug("=== Clipperz.PM.DataModel.DirectLoginBinding.fieldKey");
67//MochiKit.Logging.logDebug("=== Clipperz.PM.DataModel.DirectLoginBinding.fieldKey - " + this._fieldKey); 64//MochiKit.Logging.logDebug("=== Clipperz.PM.DataModel.DirectLoginBinding.fieldKey - " + this._fieldKey);
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;
73 }, 70 },
74 71
75 'fieldName': function() { 72 'fieldName': function() {
76 return this._fieldName; 73 return this._fieldName;
77 }, 74 },
78 75
79 //------------------------------------------------------------------------- 76 //-------------------------------------------------------------------------
80 77
81 'field': function() { 78 'field': function() {
82 var result; 79 var result;
83 80
84 //MochiKit.Logging.logDebug(">>> Clipperz.PM.DataModel.DirectLoginBinding.field") 81 //MochiKit.Logging.logDebug(">>> Clipperz.PM.DataModel.DirectLoginBinding.field")
85//MochiKit.Logging.logDebug("--- Clipperz.PM.DataModel.DirectLoginBinding.field - 1 - this.fieldKey(): " + this.fieldKey()); 82//MochiKit.Logging.logDebug("--- Clipperz.PM.DataModel.DirectLoginBinding.field - 1 - this.fieldKey(): " + this.fieldKey());
86//MochiKit.Logging.logDebug("--- Clipperz.PM.DataModel.DirectLoginBinding.field - 2 - this.fieldName(): " + this.fieldName()); 83//MochiKit.Logging.logDebug("--- Clipperz.PM.DataModel.DirectLoginBinding.field - 2 - this.fieldName(): " + this.fieldName());
87 if (this.fieldKey() != null) { 84 if (this.fieldKey() != null) {
88 result = this.directLogin().record().currentVersion().fields()[this.fieldKey()]; 85 result = this.directLogin().record().currentVersion().fields()[this.fieldKey()];
89//MochiKit.Logging.logDebug("--- Clipperz.PM.DataModel.DirectLoginBinding.field - 3 - result: " + result); 86//MochiKit.Logging.logDebug("--- Clipperz.PM.DataModel.DirectLoginBinding.field - 3 - result: " + result);
90 } else if (this.fieldName() != null) { 87 } else if (this.fieldName() != null) {
91 result = this.directLogin().record().currentVersion().fieldWithName(this.fieldName()); 88 result = this.directLogin().record().currentVersion().fieldWithName(this.fieldName());
92//MochiKit.Logging.logDebug("--- Clipperz.PM.DataModel.DirectLoginBinding.field - 4 - result: " + result); 89//MochiKit.Logging.logDebug("--- Clipperz.PM.DataModel.DirectLoginBinding.field - 4 - result: " + result);
93 90
94 this.setFieldKey(result.key()); 91 this.setFieldKey(result.key());
95 } else { 92 } else {
96 result = null; 93 result = null;
97 } 94 }
98 //MochiKit.Logging.logDebug("<<< Clipperz.PM.DataModel.DirectLoginBinding.field") 95 //MochiKit.Logging.logDebug("<<< Clipperz.PM.DataModel.DirectLoginBinding.field")
99 96
100 return result; 97 return result;
101 }, 98 },
102 99
103 //------------------------------------------------------------------------- 100 //-------------------------------------------------------------------------
104 101
105 'serializedData': function() { 102 'serializedData': function() {
106 return this.fieldKey(); 103 return this.fieldKey();
107 }, 104 },
108 105
109 //------------------------------------------------------------------------- 106 //-------------------------------------------------------------------------
110 __syntaxFix__: "syntax fix" 107 __syntaxFix__: "syntax fix"
111 108
112}); 109});
113 110
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginInput.js b/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginInput.js
index 3302ed6..0e2b7ad 100644
--- a/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginInput.js
+++ b/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginInput.js
@@ -1,229 +1,226 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } 28if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
32 29
33//############################################################################# 30//#############################################################################
34 31
35Clipperz.PM.DataModel.DirectLoginInput = function(aDirectLogin, args) { 32Clipperz.PM.DataModel.DirectLoginInput = function(aDirectLogin, args) {
36 args = args || {}; 33 args = args || {};
37 34
38//console.log(">>> new DirectLoginInput - args: %o" + args); 35//console.log(">>> new DirectLoginInput - args: %o" + args);
39 this._directLogin = aDirectLogin; 36 this._directLogin = aDirectLogin;
40 this._args = args; 37 this._args = args;
41 38
42 return this; 39 return this;
43} 40}
44 41
45Clipperz.PM.DataModel.DirectLoginInput.prototype = MochiKit.Base.update(null, { 42Clipperz.PM.DataModel.DirectLoginInput.prototype = MochiKit.Base.update(null, {
46 43
47 'directLogin': function() { 44 'directLogin': function() {
48 return this._directLogin; 45 return this._directLogin;
49 }, 46 },
50 47
51 //------------------------------------------------------------------------- 48 //-------------------------------------------------------------------------
52 49
53 'args': function() { 50 'args': function() {
54 return this._args; 51 return this._args;
55 }, 52 },
56 53
57 //------------------------------------------------------------------------- 54 //-------------------------------------------------------------------------
58 55
59 'name': function() { 56 'name': function() {
60 return this.args()['name']; 57 return this.args()['name'];
61 }, 58 },
62 59
63 //------------------------------------------------------------------------- 60 //-------------------------------------------------------------------------
64 61
65 'type': function() { 62 'type': function() {
66 var result; 63 var result;
67 64
68 result = this.args()['type']; 65 result = this.args()['type'];
69 66
70 if (result != null) { 67 if (result != null) {
71 result = result.toLowerCase(); 68 result = result.toLowerCase();
72 } 69 }
73 return result; 70 return result;
74 }, 71 },
75 72
76 //------------------------------------------------------------------------- 73 //-------------------------------------------------------------------------
77 74
78 'value': function() { 75 'value': function() {
79 return this.args()['value']; 76 return this.args()['value'];
80 }, 77 },
81 78
82 //------------------------------------------------------------------------- 79 //-------------------------------------------------------------------------
83 80
84 'formConfiguration': function() { 81 'formConfiguration': function() {
85 var result; 82 var result;
86 83
87//MochiKit.Logging.logDebug(">>> DirectLoginInput.formConfiguration - " + this.name()); 84//MochiKit.Logging.logDebug(">>> DirectLoginInput.formConfiguration - " + this.name());
88 if (this.shouldSetValue()) { 85 if (this.shouldSetValue()) {
89//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 1"); 86//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 1");
90 switch (this.type()) { 87 switch (this.type()) {
91 case 'select': 88 case 'select':
92 var currentValue; 89 var currentValue;
93 var options; 90 var options;
94 91
95//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2"); 92//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2");
96 currentValue = this.directLogin().formValues()[this.name()]; 93 currentValue = this.directLogin().formValues()[this.name()];
97//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.1"); 94//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.1");
98 options = this.args()['options']; 95 options = this.args()['options'];
99//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.2"); 96//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.2");
100 97
101 result = MochiKit.DOM.SELECT({name:this.name()}, 98 result = MochiKit.DOM.SELECT({name:this.name()},
102 MochiKit.Base.map(function(anOption) { 99 MochiKit.Base.map(function(anOption) {
103 var options; 100 var options;
104 101
105//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.3"); 102//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.3");
106 //TODO: remove the value: field and replace it with element.dom.value = <some value> 103 //TODO: remove the value: field and replace it with element.dom.value = <some value>
107 options = {value:anOption['value']}; 104 options = {value:anOption['value']};
108//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.4"); 105//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.4");
109 if (currentValue == anOption['value']) { 106 if (currentValue == anOption['value']) {
110//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.5"); 107//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.5");
111 options.selected = true; 108 options.selected = true;
112//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.6"); 109//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.6");
113 } 110 }
114//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.7"); 111//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.7");
115 112
116 return MochiKit.DOM.OPTION(options, anOption['label']) 113 return MochiKit.DOM.OPTION(options, anOption['label'])
117 }, options) 114 }, options)
118 ) 115 )
119//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.8"); 116//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.8");
120 break; 117 break;
121 case 'checkbox': 118 case 'checkbox':
122 var options; 119 var options;
123 120
124//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 3"); 121//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 3");
125 options = {type:'checkbox', name: this.name()}; 122 options = {type:'checkbox', name: this.name()};
126 if (this.directLogin().formValues()[this.name()] == true) { 123 if (this.directLogin().formValues()[this.name()] == true) {
127 options['checked'] = true; 124 options['checked'] = true;
128 }; 125 };
129 126
130 result = MochiKit.DOM.INPUT(options, null); 127 result = MochiKit.DOM.INPUT(options, null);
131 break; 128 break;
132 case 'radio': 129 case 'radio':
133 var currentName; 130 var currentName;
134 var currentValue; 131 var currentValue;
135 var options; 132 var options;
136 133
137//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4"); 134//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4");
138 currentName = this.name(); 135 currentName = this.name();
139//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.1"); 136//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.1");
140 currentValue = this.directLogin().formValues()[this.name()]; 137 currentValue = this.directLogin().formValues()[this.name()];
141//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.2"); 138//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.2");
142 options = this.args()['options']; 139 options = this.args()['options'];
143//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.3"); 140//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.3");
144 141
145 result = MochiKit.DOM.DIV(null, 142 result = MochiKit.DOM.DIV(null,
146 MochiKit.Base.map(function(anOption) { 143 MochiKit.Base.map(function(anOption) {
147 var options; 144 var options;
148 var isChecked; 145 var isChecked;
149 var inputNode; 146 var inputNode;
150 var divNode; 147 var divNode;
151 148
152//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.4"); 149//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.4");
153 //TODO: remove the value: field and replace it with element.dom.value = <some value> 150 //TODO: remove the value: field and replace it with element.dom.value = <some value>
154 options = {type:'radio', name:currentName, value:anOption['value']} 151 options = {type:'radio', name:currentName, value:anOption['value']}
155 isChecked = (currentValue == anOption['value']); 152 isChecked = (currentValue == anOption['value']);
156//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.5"); 153//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.5");
157 if (isChecked) { 154 if (isChecked) {
158//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.6"); 155//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.6");
159 options.checked = true; 156 options.checked = true;
160//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.7"); 157//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.7");
161 } 158 }
162//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.8 - options: " + Clipperz.Base.serializeJSON(options)); 159//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.8 - options: " + Clipperz.Base.serializeJSON(options));
163//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.8 - value: " + anOption['value']); 160//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.8 - value: " + anOption['value']);
164 161
165 if (Clipperz_IEisBroken == true) { 162 if (Clipperz_IEisBroken == true) {
166 var checkedValue; 163 var checkedValue;
167 164
168//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.8.1"); 165//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.8.1");
169 checkedValue = (isChecked ? " CHECKED" : ""); 166 checkedValue = (isChecked ? " CHECKED" : "");
170//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.8.2"); 167//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.8.2");
171 inputNode = MochiKit.DOM.currentDocument().createElement("<INPUT TYPE='RADIO' NAME='" + currentName + "' VALUE='" + anOption['value'] + "'" + checkedValue + ">"); 168 inputNode = MochiKit.DOM.currentDocument().createElement("<INPUT TYPE='RADIO' NAME='" + currentName + "' VALUE='" + anOption['value'] + "'" + checkedValue + ">");
172//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.8.3"); 169//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.8.3");
173 } else { 170 } else {
174//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.8.4"); 171//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.8.4");
175 inputNode = MochiKit.DOM.INPUT(options, anOption['value']); 172 inputNode = MochiKit.DOM.INPUT(options, anOption['value']);
176//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.8.5"); 173//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.8.5");
177 } 174 }
178//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.9"); 175//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.9");
179 divNode = MochiKit.DOM.DIV(null, inputNode); 176 divNode = MochiKit.DOM.DIV(null, inputNode);
180//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.10"); 177//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.10");
181 178
182 return divNode; 179 return divNode;
183 // return MochiKit.DOM.DIV(null, MochiKit.DOM.INPUT(options, anOption['value'])); 180 // return MochiKit.DOM.DIV(null, MochiKit.DOM.INPUT(options, anOption['value']));
184 }, options) 181 }, options)
185 ); 182 );
186//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.9"); 183//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.9");
187 break; 184 break;
188 } 185 }
189 } else { 186 } else {
190 var binding; 187 var binding;
191//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 5"); 188//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 5");
192 binding = this.directLogin().bindings()[this.name()]; 189 binding = this.directLogin().bindings()[this.name()];
193 190
194//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 6"); 191//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 6");
195 //TODO: remove the value: field and replace it with element.dom.value = <some value> 192 //TODO: remove the value: field and replace it with element.dom.value = <some value>
196 result = MochiKit.DOM.INPUT({ 193 result = MochiKit.DOM.INPUT({
197 type:((this.type() != 'password') ? this.type() : 'text'), 194 type:((this.type() != 'password') ? this.type() : 'text'),
198 // type:(((this.type() != 'password') && (this.type() != 'submit')) ? this.type() : 'text'), 195 // type:(((this.type() != 'password') && (this.type() != 'submit')) ? this.type() : 'text'),
199 name:this.name(), 196 name:this.name(),
200 value:((binding != null)? binding.field().value() : this.value()) 197 value:((binding != null)? binding.field().value() : this.value())
201 }, null); 198 }, null);
202//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 7"); 199//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 7");
203 } 200 }
204 201
205//MochiKit.Logging.logDebug("<<< DirectLoginInput.formConfiguration: "); 202//MochiKit.Logging.logDebug("<<< DirectLoginInput.formConfiguration: ");
206 return result; 203 return result;
207 }, 204 },
208 205
209 //------------------------------------------------------------------------- 206 //-------------------------------------------------------------------------
210 207
211 'shouldSetValue': function() { 208 'shouldSetValue': function() {
212 var type; 209 var type;
213 var result; 210 var result;
214 211
215//MochiKit.Logging.logDebug(">>> DirectLoginInput.shouldSetValue"); 212//MochiKit.Logging.logDebug(">>> DirectLoginInput.shouldSetValue");
216 type = this.type(); 213 type = this.type();
217 result = ((type == 'checkbox') || (type == 'radio') || (type == 'select')); 214 result = ((type == 'checkbox') || (type == 'radio') || (type == 'select'));
218//if (result == true) { 215//if (result == true) {
219 //MochiKit.Logging.logDebug("DIRECT LOGIN INPUT need value: " + Clipperz.Base.serializeJSON(this.args())); 216 //MochiKit.Logging.logDebug("DIRECT LOGIN INPUT need value: " + Clipperz.Base.serializeJSON(this.args()));
220//} 217//}
221//MochiKit.Logging.logDebug("<<< DirectLoginInput.shouldSetValue"); 218//MochiKit.Logging.logDebug("<<< DirectLoginInput.shouldSetValue");
222 return result; 219 return result;
223 }, 220 },
224 221
225 //------------------------------------------------------------------------- 222 //-------------------------------------------------------------------------
226 __syntaxFix__: "syntax fix" 223 __syntaxFix__: "syntax fix"
227 224
228}); 225});
229 226
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginReference.js b/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginReference.js
index b067a21..2be7d58 100644
--- a/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginReference.js
+++ b/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginReference.js
@@ -1,192 +1,189 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } 28if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
32 29
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.DataModel.DirectLoginReference = function(args) { 33Clipperz.PM.DataModel.DirectLoginReference = function(args) {
37 args = args || {}; 34 args = args || {};
38 35
39//MochiKit.Logging.logDebug(">>> new DirectLoginReference: " + Clipperz.Base.serializeJSON(MochiKit.Base.keys(args))); 36//MochiKit.Logging.logDebug(">>> new DirectLoginReference: " + Clipperz.Base.serializeJSON(MochiKit.Base.keys(args)));
40//MochiKit.Logging.logDebug(">>> new DirectLoginReference - record: " + args.record); 37//MochiKit.Logging.logDebug(">>> new DirectLoginReference - record: " + args.record);
41 this._user = args.user; 38 this._user = args.user;
42 39
43 if (args.directLogin != null) { 40 if (args.directLogin != null) {
44 this._reference = args.directLogin.reference(); 41 this._reference = args.directLogin.reference();
45 this._recordReference = args.directLogin.record().reference(); 42 this._recordReference = args.directLogin.record().reference();
46 this._label = args.directLogin.label(); 43 this._label = args.directLogin.label();
47 this._favicon = args.directLogin.favicon() || null; 44 this._favicon = args.directLogin.favicon() || null;
48 45
49 this._directLogin = args.directLogin; 46 this._directLogin = args.directLogin;
50 this._record = args.directLogin.record(); 47 this._record = args.directLogin.record();
51 } else { 48 } else {
52 this._reference = args.reference; 49 this._reference = args.reference;
53 this._recordReference = args.record; 50 this._recordReference = args.record;
54 this._label = args.label; 51 this._label = args.label;
55 this._favicon = args.favicon || null; 52 this._favicon = args.favicon || null;
56 53
57 this._directLogin = null; 54 this._directLogin = null;
58 this._record = null; 55 this._record = null;
59 } 56 }
60 57
61 this._fixedFavicon = null; 58 this._fixedFavicon = null;
62 59
63 return this; 60 return this;
64} 61}
65 62
66Clipperz.PM.DataModel.DirectLoginReference.prototype = MochiKit.Base.update(null, { 63Clipperz.PM.DataModel.DirectLoginReference.prototype = MochiKit.Base.update(null, {
67 64
68 'user': function() { 65 'user': function() {
69 return this._user; 66 return this._user;
70 }, 67 },
71 68
72 //------------------------------------------------------------------------- 69 //-------------------------------------------------------------------------
73 70
74 'reference': function() { 71 'reference': function() {
75 return this._reference; 72 return this._reference;
76 }, 73 },
77 74
78 //------------------------------------------------------------------------- 75 //-------------------------------------------------------------------------
79 76
80 'synchronizeValues': function(aDirectLogin) { 77 'synchronizeValues': function(aDirectLogin) {
81 this._label = aDirectLogin.label(); 78 this._label = aDirectLogin.label();
82 this._favicon = aDirectLogin.favicon(); 79 this._favicon = aDirectLogin.favicon();
83 }, 80 },
84 81
85 //------------------------------------------------------------------------- 82 //-------------------------------------------------------------------------
86 83
87 'label': function() { 84 'label': function() {
88 return this._label; 85 return this._label;
89 }, 86 },
90 87
91 //------------------------------------------------------------------------- 88 //-------------------------------------------------------------------------
92 89
93 'recordReference': function() { 90 'recordReference': function() {
94 return this._recordReference; 91 return this._recordReference;
95 }, 92 },
96 93
97 //------------------------------------------------------------------------- 94 //-------------------------------------------------------------------------
98 95
99 'record': function() { 96 'record': function() {
100//MochiKit.Logging.logDebug(">>> DirectLoginReference.record"); 97//MochiKit.Logging.logDebug(">>> DirectLoginReference.record");
101 if (this._record == null) { 98 if (this._record == null) {
102 this._record = this.user().records()[this.recordReference()]; 99 this._record = this.user().records()[this.recordReference()];
103 } 100 }
104 101
105//MochiKit.Logging.logDebug("<<< DirectLoginReference.record"); 102//MochiKit.Logging.logDebug("<<< DirectLoginReference.record");
106 return this._record; 103 return this._record;
107 }, 104 },
108 105
109 //------------------------------------------------------------------------- 106 //-------------------------------------------------------------------------
110 107
111 'favicon': function() { 108 'favicon': function() {
112 return this._favicon; 109 return this._favicon;
113 }, 110 },
114 111
115 //------------------------------------------------------------------------- 112 //-------------------------------------------------------------------------
116 113
117 'fixedFavicon': function() { 114 'fixedFavicon': function() {
118 var result; 115 var result;
119 116
120 if (this._fixedFavicon == null) { 117 if (this._fixedFavicon == null) {
121 result = this.favicon(); 118 result = this.favicon();
122 119
123 if (Clipperz_IEisBroken && (this.user().preferences().disableUnsecureFaviconLoadingForIE()) && (result.indexOf('https://') != 0)) { 120 if (Clipperz_IEisBroken && (this.user().preferences().disableUnsecureFaviconLoadingForIE()) && (result.indexOf('https://') != 0)) {
124 result = Clipperz.PM.Strings['defaultFaviconUrl_IE']; 121 result = Clipperz.PM.Strings['defaultFaviconUrl_IE'];
125 this.setFixedFavicon(result); 122 this.setFixedFavicon(result);
126 } 123 }
127 } else { 124 } else {
128 result = this._fixedFavicon; 125 result = this._fixedFavicon;
129 } 126 }
130 127
131 return result; 128 return result;
132 }, 129 },
133 130
134 'setFixedFavicon': function(aValue) { 131 'setFixedFavicon': function(aValue) {
135 this._fixedFavicon = aValue; 132 this._fixedFavicon = aValue;
136 }, 133 },
137 134
138 //------------------------------------------------------------------------- 135 //-------------------------------------------------------------------------
139 136
140 'setupJumpPageWindow': function(aWindow) { 137 'setupJumpPageWindow': function(aWindow) {
141//MochiKit.Logging.logDebug(">>> DirectLoginReference.setupJumpPageWindow - " + aWindow); 138//MochiKit.Logging.logDebug(">>> DirectLoginReference.setupJumpPageWindow - " + aWindow);
142 try { 139 try {
143 MochiKit.DOM.withWindow(aWindow, MochiKit.Base.bind(function() { 140 MochiKit.DOM.withWindow(aWindow, MochiKit.Base.bind(function() {
144 MochiKit.DOM.appendChildNodes(MochiKit.DOM.currentDocument().body, 141 MochiKit.DOM.appendChildNodes(MochiKit.DOM.currentDocument().body,
145 MochiKit.DOM.H1(null, "Loading " + this.label()) 142 MochiKit.DOM.H1(null, "Loading " + this.label())
146 ); 143 );
147 }, this)); 144 }, this));
148 } catch(e) { 145 } catch(e) {
149 MochiKit.Logging.logDebug("EXCEPTION: " + e); 146 MochiKit.Logging.logDebug("EXCEPTION: " + e);
150 } 147 }
151//MochiKit.Logging.logDebug("<<< DirectLoginReference.setupJumpPageWindow"); 148//MochiKit.Logging.logDebug("<<< DirectLoginReference.setupJumpPageWindow");
152 }, 149 },
153 150
154 //------------------------------------------------------------------------- 151 //-------------------------------------------------------------------------
155 152
156 'deferredDirectLogin': function() { 153 'deferredDirectLogin': function() {
157 var deferredResult; 154 var deferredResult;
158 155
159//MochiKit.Logging.logDebug(">>> DirectLoginReference.deferredDirectLogin - " + this); 156//MochiKit.Logging.logDebug(">>> DirectLoginReference.deferredDirectLogin - " + this);
160 deferredResult = new MochiKit.Async.Deferred(); 157 deferredResult = new MochiKit.Async.Deferred();
161//MochiKit.Logging.logDebug("--- DirectLoginReference.deferredDirectLogin - 1"); 158//MochiKit.Logging.logDebug("--- DirectLoginReference.deferredDirectLogin - 1");
162 deferredResult.addCallback(MochiKit.Base.method(this.record(), 'deferredData')); 159 deferredResult.addCallback(MochiKit.Base.method(this.record(), 'deferredData'));
163//MochiKit.Logging.logDebug("--- DirectLoginReference.deferredDirectLogin - 2"); 160//MochiKit.Logging.logDebug("--- DirectLoginReference.deferredDirectLogin - 2");
164 deferredResult.addCallback(function(aRecord, aDirectLoginReference) { 161 deferredResult.addCallback(function(aRecord, aDirectLoginReference) {
165 return aRecord.directLogins()[aDirectLoginReference]; 162 return aRecord.directLogins()[aDirectLoginReference];
166 }, this.record(), this.reference()); 163 }, this.record(), this.reference());
167//MochiKit.Logging.logDebug("--- DirectLoginReference.deferredDirectLogin - 3"); 164//MochiKit.Logging.logDebug("--- DirectLoginReference.deferredDirectLogin - 3");
168 deferredResult.callback(); 165 deferredResult.callback();
169//MochiKit.Logging.logDebug("<<< DirectLoginReference.deferredDirectLogin"); 166//MochiKit.Logging.logDebug("<<< DirectLoginReference.deferredDirectLogin");
170 167
171 return deferredResult; 168 return deferredResult;
172 }, 169 },
173 170
174 //------------------------------------------------------------------------- 171 //-------------------------------------------------------------------------
175 172
176 'handleMissingFaviconImage': function(anEvent) { 173 'handleMissingFaviconImage': function(anEvent) {
177//MochiKit.Logging.logDebug(">>> DirectLoginReference.handleMissingFaviconImage"); 174//MochiKit.Logging.logDebug(">>> DirectLoginReference.handleMissingFaviconImage");
178 anEvent.stop(); 175 anEvent.stop();
179 MochiKit.Signal.disconnectAll(anEvent.src()); 176 MochiKit.Signal.disconnectAll(anEvent.src());
180 this.setFixedFavicon(Clipperz.PM.Strings['defaultFaviconUrl']); 177 this.setFixedFavicon(Clipperz.PM.Strings['defaultFaviconUrl']);
181//MochiKit.Logging.logDebug("--- DirectLoginReference.handleMissingFaviconImage - fixedFavicon: " + this.fixedFavicon()); 178//MochiKit.Logging.logDebug("--- DirectLoginReference.handleMissingFaviconImage - fixedFavicon: " + this.fixedFavicon());
182//MochiKit.Logging.logDebug("--- DirectLoginReference.handleMissingFaviconImage - anEvent.src().src: " + anEvent.src().src); 179//MochiKit.Logging.logDebug("--- DirectLoginReference.handleMissingFaviconImage - anEvent.src().src: " + anEvent.src().src);
183 // MochiKit.DOM.swapDOM(anEvent.src(), MochiKit.DOM.IMG({src:'this.fixedFavicon()'})); 180 // MochiKit.DOM.swapDOM(anEvent.src(), MochiKit.DOM.IMG({src:'this.fixedFavicon()'}));
184 anEvent.src().src = this.fixedFavicon(); 181 anEvent.src().src = this.fixedFavicon();
185//MochiKit.Logging.logDebug("<<< DirectLoginReference.handleMissingFaviconImage"); 182//MochiKit.Logging.logDebug("<<< DirectLoginReference.handleMissingFaviconImage");
186 }, 183 },
187 184
188 //------------------------------------------------------------------------- 185 //-------------------------------------------------------------------------
189 __syntaxFix__: "syntax fix" 186 __syntaxFix__: "syntax fix"
190 187
191}); 188});
192 189
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/Header.js b/frontend/beta/js/Clipperz/PM/DataModel/Header.js
index ef34732..c780855 100644
--- a/frontend/beta/js/Clipperz/PM/DataModel/Header.js
+++ b/frontend/beta/js/Clipperz/PM/DataModel/Header.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } 28if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
32 29
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.DataModel.Header = function(args) { 33Clipperz.PM.DataModel.Header = function(args) {
37 args = args || {}; 34 args = args || {};
38 35
39 this._user = args.user; 36 this._user = args.user;
40 37
41 this._serverData = null; 38 this._serverData = null;
42 this._serverDataVersion = null; 39 this._serverDataVersion = null;
43 this._jsonEvaledServerData = null; 40 this._jsonEvaledServerData = null;
44 41
45 this._decryptedLegacyServerData = null; 42 this._decryptedLegacyServerData = null;
46 this._isDecryptingLegacyServerData = false; 43 this._isDecryptingLegacyServerData = false;
47 this._decryptingLegacyServerDataPendingQueue = []; 44 this._decryptingLegacyServerDataPendingQueue = [];
48 45
49 this.resetUpdatedSections(); 46 this.resetUpdatedSections();
50 47
51 this._shouldLoadSections = {}; 48 this._shouldLoadSections = {};
52 49
53 Clipperz.NotificationCenter.register(this.user(), 'updatedSection', this, 'updatedSectionHandler'); 50 Clipperz.NotificationCenter.register(this.user(), 'updatedSection', this, 'updatedSectionHandler');
54 51
55 return this; 52 return this;
56} 53}
57 54
58Clipperz.PM.DataModel.Header.prototype = MochiKit.Base.update(null, { 55Clipperz.PM.DataModel.Header.prototype = MochiKit.Base.update(null, {
59 56
60 //------------------------------------------------------------------------- 57 //-------------------------------------------------------------------------
61 58
62 'user': function() { 59 'user': function() {
63 return this._user; 60 return this._user;
64 }, 61 },
65 62
66 //------------------------------------------------------------------------- 63 //-------------------------------------------------------------------------
67 //------------------------------------------------------------------------- 64 //-------------------------------------------------------------------------
68 //------------------------------------------------------------------------- 65 //-------------------------------------------------------------------------
69 //------------------------------------------------------------------------- 66 //-------------------------------------------------------------------------
70 //------------------------------------------------------------------------- 67 //-------------------------------------------------------------------------
71 //------------------------------------------------------------------------- 68 //-------------------------------------------------------------------------
72 //------------------------------------------------------------------------- 69 //-------------------------------------------------------------------------
73 //------------------------------------------------------------------------- 70 //-------------------------------------------------------------------------
74 //------------------------------------------------------------------------- 71 //-------------------------------------------------------------------------
75 72
76 'updatedSections': function() { 73 'updatedSections': function() {
77 return this._updatedSections; 74 return this._updatedSections;
78 }, 75 },
79 76
80 'markSectionAsUpdated': function(aSectionName) { 77 'markSectionAsUpdated': function(aSectionName) {
81 this.updatedSections().push(aSectionName); 78 this.updatedSections().push(aSectionName);
82 }, 79 },
83 80
84 'resetUpdatedSections': function() { 81 'resetUpdatedSections': function() {
85 this._updatedSections = [] 82 this._updatedSections = []
86 }, 83 },
87 84
88 'hasSectionBeenUpdated': function(aSectionName) { 85 'hasSectionBeenUpdated': function(aSectionName) {
89 return (this.updatedSections().join().indexOf(aSectionName) != -1); 86 return (this.updatedSections().join().indexOf(aSectionName) != -1);
90 }, 87 },
91 88
92 'cachedServerDataSection': function(aSectionName) { 89 'cachedServerDataSection': function(aSectionName) {
93 return (this.hasSectionBeenUpdated(aSectionName)) ? {} : this.jsonEvaledServerData()[aSectionName]; 90 return (this.hasSectionBeenUpdated(aSectionName)) ? {} : this.jsonEvaledServerData()[aSectionName];
94 }, 91 },
95 92
96 'updateAllSections': function() { 93 'updateAllSections': function() {
97 this.resetUpdatedSections(); 94 this.resetUpdatedSections();
98 this.markSectionAsUpdated('records'); 95 this.markSectionAsUpdated('records');
99 this.markSectionAsUpdated('directLogins'); 96 this.markSectionAsUpdated('directLogins');
100 this.markSectionAsUpdated('preferences'); 97 this.markSectionAsUpdated('preferences');
101 this.markSectionAsUpdated('oneTimePasswords'); 98 this.markSectionAsUpdated('oneTimePasswords');
102 99
103 return MochiKit.Async.succeed(this); 100 return MochiKit.Async.succeed(this);
104 }, 101 },
105 102
106 'updatedSectionHandler': function(anEvent) { 103 'updatedSectionHandler': function(anEvent) {
107 this.markSectionAsUpdated(anEvent.parameters()); 104 this.markSectionAsUpdated(anEvent.parameters());
108 }, 105 },
109 106
110 //------------------------------------------------------------------------- 107 //-------------------------------------------------------------------------
111 108
112 'getObjectKeyIndex': function(anObject) { 109 'getObjectKeyIndex': function(anObject) {
113 var result; 110 var result;
114 varitemReference; 111 varitemReference;
115 var index; 112 var index;
116 113
117 result = {}; 114 result = {};
118 index = 0; 115 index = 0;
119 116
120 for (itemReference in anObject) { 117 for (itemReference in anObject) {
121 result[itemReference] = index.toString(); 118 result[itemReference] = index.toString();
122 index ++; 119 index ++;
123 } 120 }
124 121
125 return result; 122 return result;
126 }, 123 },
127 124
128 //------------------------------------------------------------------------- 125 //-------------------------------------------------------------------------
129 126
130 'serializedDataWithRecordAndDirectLoginIndexes': function(aRecordIndexes, aDirectLoginIndexs) { 127 'serializedDataWithRecordAndDirectLoginIndexes': function(aRecordIndexes, aDirectLoginIndexs) {
131 var result; 128 var result;
132 var records; 129 var records;
133 var recordReference; 130 var recordReference;
134 131
135//MochiKit.Logging.logDebug(">>> Header.serializedData"); 132//MochiKit.Logging.logDebug(">>> Header.serializedData");
136 result = { 133 result = {
137 'records': {}, 134 'records': {},
138 'directLogins': {} 135 'directLogins': {}
139 }; 136 };
140 137
141 records = this.user().records(); 138 records = this.user().records();
142 for (recordReference in records) { 139 for (recordReference in records) {
143 result['records'][aRecordIndexes[recordReference]] = this.user().records()[recordReference].headerData(); 140 result['records'][aRecordIndexes[recordReference]] = this.user().records()[recordReference].headerData();
144 } 141 }
145 142
146 for (directLoginReference in this.user().directLoginReferences()) { 143 for (directLoginReference in this.user().directLoginReferences()) {
147 var currentDirectLogin; 144 var currentDirectLogin;
148 vardirectLoginData; 145 vardirectLoginData;
149 146
150 currentDirectLogin = this.user().directLoginReferences()[directLoginReference]; 147 currentDirectLogin = this.user().directLoginReferences()[directLoginReference];
151 if (aRecordIndexes[currentDirectLogin.recordReference()] != null) { 148 if (aRecordIndexes[currentDirectLogin.recordReference()] != null) {
152 directLoginData = { 149 directLoginData = {
153 // reference: currentDirectLogin.reference(), 150 // reference: currentDirectLogin.reference(),
154 record: aRecordIndexes[currentDirectLogin.recordReference()].toString(), 151 record: aRecordIndexes[currentDirectLogin.recordReference()].toString(),
155 label: currentDirectLogin.label(), 152 label: currentDirectLogin.label(),
156 favicon:currentDirectLogin.favicon() || "" 153 favicon:currentDirectLogin.favicon() || ""
157 } 154 }
158 155
159 result['directLogins'][aDirectLoginIndexs[directLoginReference]] = directLoginData; 156 result['directLogins'][aDirectLoginIndexs[directLoginReference]] = directLoginData;
160 } 157 }
161 158
162 } 159 }
163//MochiKit.Logging.logDebug("<<< Header.serializedData - result: " + Clipperz.Base.serializeJSON(result)); 160//MochiKit.Logging.logDebug("<<< Header.serializedData - result: " + Clipperz.Base.serializeJSON(result));
164//MochiKit.Logging.logDebug("<<< Header.serializedData"); 161//MochiKit.Logging.logDebug("<<< Header.serializedData");
165 162
166 return result; 163 return result;
167 }, 164 },
168 165
169 //------------------------------------------------------------------------- 166 //-------------------------------------------------------------------------
170 167
171 'encryptedData': function() { 168 'encryptedData': function() {
172 var deferredResult; 169 var deferredResult;
173 var recordIndex; 170 var recordIndex;
174 var directLoginIndex; 171 var directLoginIndex;
175 varserializedData; 172 varserializedData;
176 var result; 173 var result;
177 174
178//MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] Header.encryptedData"); 175//MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] Header.encryptedData");
179//MochiKit.Logging.logDebug("### Header.encryptedData - " + Clipperz.Base.serializeJSON(this.updatedSections())); 176//MochiKit.Logging.logDebug("### Header.encryptedData - " + Clipperz.Base.serializeJSON(this.updatedSections()));
180 result = { 177 result = {
181 'records': this.cachedServerDataSection('records'), 178 'records': this.cachedServerDataSection('records'),
182 'directLogins': this.cachedServerDataSection('directLogins'), 179 'directLogins': this.cachedServerDataSection('directLogins'),
183 'preferences': this.cachedServerDataSection('preferences'), 180 'preferences': this.cachedServerDataSection('preferences'),
184 'oneTimePasswords': this.cachedServerDataSection('oneTimePasswords'), 181 'oneTimePasswords': this.cachedServerDataSection('oneTimePasswords'),
185 'version': '0.1' 182 'version': '0.1'
186 }; 183 };
187 184
188 if (this.hasSectionBeenUpdated('records')) { 185 if (this.hasSectionBeenUpdated('records')) {
189 recordIndex = this.getObjectKeyIndex(this.user().records()); 186 recordIndex = this.getObjectKeyIndex(this.user().records());
190 result['records']['index'] = recordIndex; 187 result['records']['index'] = recordIndex;
191 } else { 188 } else {
192 recordIndex = result['records']['index']; 189 recordIndex = result['records']['index'];
193 } 190 }
194 191
195 if (this.hasSectionBeenUpdated('directLogins')) { 192 if (this.hasSectionBeenUpdated('directLogins')) {
196 directLoginIndex = this.getObjectKeyIndex(this.user().directLoginReferences()); 193 directLoginIndex = this.getObjectKeyIndex(this.user().directLoginReferences());
197 result['directLogins']['index'] = directLoginIndex; 194 result['directLogins']['index'] = directLoginIndex;
198 } else { 195 } else {
199 directLoginIndex = result['directLogins']['index']; 196 directLoginIndex = result['directLogins']['index'];
200 } 197 }
201 198
202 if (this.hasSectionBeenUpdated('records') || this.hasSectionBeenUpdated('directLogins')) { 199 if (this.hasSectionBeenUpdated('records') || this.hasSectionBeenUpdated('directLogins')) {
203 serializedData = this.serializedDataWithRecordAndDirectLoginIndexes(recordIndex, directLoginIndex); 200 serializedData = this.serializedDataWithRecordAndDirectLoginIndexes(recordIndex, directLoginIndex);
204 } 201 }
205 202
206 deferredResult = new MochiKit.Async.Deferred(); 203 deferredResult = new MochiKit.Async.Deferred();
207 204
208//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 1: " + res); return res;}); 205//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 1: " + res); return res;});
209 if (this.hasSectionBeenUpdated('records')) { 206 if (this.hasSectionBeenUpdated('records')) {
210//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 1.1: " + res); return res;}); 207//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 1.1: " + res); return res;});
211 deferredResult.addCallback(function(anHeader, aResult, aSerializedData, aValue) { 208 deferredResult.addCallback(function(anHeader, aResult, aSerializedData, aValue) {
212 return Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion(anHeader.user().passphrase(), aSerializedData['records']); 209 return Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion(anHeader.user().passphrase(), aSerializedData['records']);
213 }, this, result, serializedData); 210 }, this, result, serializedData);
214//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 1.2: " + res); return res;}); 211//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 1.2: " + res); return res;});
215 deferredResult.addCallback(function(anHeader, aResult, aValue) { 212 deferredResult.addCallback(function(anHeader, aResult, aValue) {
216 aResult['records']['data'] = aValue; 213 aResult['records']['data'] = aValue;
217 }, this, result); 214 }, this, result);
218//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 1.3: " + res); return res;}); 215//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 1.3: " + res); return res;});
219 } 216 }
220 217
221//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 2: " + res); return res;}); 218//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 2: " + res); return res;});
222 if (this.hasSectionBeenUpdated('directLogins')) { 219 if (this.hasSectionBeenUpdated('directLogins')) {
223//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 2.1: " + res); return res;}); 220//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 2.1: " + res); return res;});
224 deferredResult.addCallback(function(anHeader, aResult, aSerializedData, aValue) { 221 deferredResult.addCallback(function(anHeader, aResult, aSerializedData, aValue) {
225 return Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion(anHeader.user().passphrase(), aSerializedData['directLogins']); 222 return Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion(anHeader.user().passphrase(), aSerializedData['directLogins']);
226 }, this, result, serializedData); 223 }, this, result, serializedData);
227//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 2.2: " + res); return res;}); 224//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 2.2: " + res); return res;});
228 deferredResult.addCallback(function(anHeader, aResult, aValue) { 225 deferredResult.addCallback(function(anHeader, aResult, aValue) {
229 aResult['directLogins']['data'] = aValue; 226 aResult['directLogins']['data'] = aValue;
230 }, this, result); 227 }, this, result);
231//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 2.3: " + res); return res;}); 228//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 2.3: " + res); return res;});
232 } 229 }
233 230
234//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 3: " + res); return res;}); 231//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 3: " + res); return res;});
235 if (this.hasSectionBeenUpdated('preferences')) { 232 if (this.hasSectionBeenUpdated('preferences')) {
236//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 3.1: " + res); return res;}); 233//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 3.1: " + res); return res;});
237 deferredResult.addCallback(function(anHeader, aResult, aValue) { 234 deferredResult.addCallback(function(anHeader, aResult, aValue) {
238 return Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion(anHeader.user().passphrase(), anHeader.user().preferences().serializedData()); 235 return Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion(anHeader.user().passphrase(), anHeader.user().preferences().serializedData());
239 }, this, result); 236 }, this, result);
240//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 3.2: " + res); return res;}); 237//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 3.2: " + res); return res;});
241 deferredResult.addCallback(function(anHeader, aResult, aValue) { 238 deferredResult.addCallback(function(anHeader, aResult, aValue) {
242 aResult['preferences']['data'] = aValue; 239 aResult['preferences']['data'] = aValue;
243 }, this, result); 240 }, this, result);
244//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 3.3: " + res); return res;}); 241//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 3.3: " + res); return res;});
245 } 242 }
246 243
247//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 4: " + res); return res;}); 244//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 4: " + res); return res;});
248 if (this.hasSectionBeenUpdated('oneTimePasswords')) { 245 if (this.hasSectionBeenUpdated('oneTimePasswords')) {
249//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 4.1: " + res); return res;}); 246//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 4.1: " + res); return res;});
250 // deferredResult.addCallback(MochiKit.Base.method(this, 'loadOneTimePasswords')); 247 // deferredResult.addCallback(MochiKit.Base.method(this, 'loadOneTimePasswords'));
251//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 4.2: " + res); return res;}); 248//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 4.2: " + res); return res;});
252 deferredResult.addCallback(function(anHeader, aResult, aValue) { 249 deferredResult.addCallback(function(anHeader, aResult, aValue) {
253 return Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion(anHeader.user().passphrase(), anHeader.user().oneTimePasswordManager().serializedData()); 250 return Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion(anHeader.user().passphrase(), anHeader.user().oneTimePasswordManager().serializedData());
254 }, this, result); 251 }, this, result);
255//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 4.3: " + res); return res;}); 252//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 4.3: " + res); return res;});
256 deferredResult.addCallback(function(anHeader, aResult, aValue) { 253 deferredResult.addCallback(function(anHeader, aResult, aValue) {
257 aResult['oneTimePasswords']['data'] = aValue; 254 aResult['oneTimePasswords']['data'] = aValue;
258 }, this, result); 255 }, this, result);
259//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 4.4: " + res); return res;}); 256//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 4.4: " + res); return res;});
260 } 257 }
261 258
262//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 5: " + res); return res;}); 259//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 5: " + res); return res;});
263 deferredResult.addCallback(function(anHeader, aResult, aValue) { 260 deferredResult.addCallback(function(anHeader, aResult, aValue) {
264 var serverData; 261 var serverData;
265 262
266 serverData = Clipperz.Base.serializeJSON(aResult); 263 serverData = Clipperz.Base.serializeJSON(aResult);
267 anHeader.setServerData(serverData); 264 anHeader.setServerData(serverData);
268 265
269 return serverData; 266 return serverData;
270 }, this, result); 267 }, this, result);
271//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 6: " + res); return res;}); 268//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 6: " + res); return res;});
272 269
273 deferredResult.callback(); 270 deferredResult.callback();
274//MochiKit.Logging.logDebug("<<< [" + (new Date()).valueOf() + "] Header.encryptedData"); 271//MochiKit.Logging.logDebug("<<< [" + (new Date()).valueOf() + "] Header.encryptedData");
275 272
276 return deferredResult; 273 return deferredResult;
277 }, 274 },
278 275
279 //------------------------------------------------------------------------- 276 //-------------------------------------------------------------------------
280 277
281 'serverData': function() { 278 'serverData': function() {
282 return this._serverData; 279 return this._serverData;
283 }, 280 },
284 281
285 'setServerData': function(aValue) { 282 'setServerData': function(aValue) {
286//MochiKit.Logging.logDebug(">>> Header.setServerData"); 283//MochiKit.Logging.logDebug(">>> Header.setServerData");
287//MochiKit.Logging.logDebug("[start]============================================="); 284//MochiKit.Logging.logDebug("[start]=============================================");
288//MochiKit.Logging.logDebug("SERVER_DATA: " + aValue); 285//MochiKit.Logging.logDebug("SERVER_DATA: " + aValue);
289//MochiKit.Logging.logDebug("[end]==============================================="); 286//MochiKit.Logging.logDebug("[end]===============================================");
290 this._serverData = aValue; 287 this._serverData = aValue;
291//MochiKit.Logging.logDebug("--- Header.setServerData - 1"); 288//MochiKit.Logging.logDebug("--- Header.setServerData - 1");
292 this.resetUpdatedSections(); 289 this.resetUpdatedSections();
293//MochiKit.Logging.logDebug("--- Header.setServerData - 2"); 290//MochiKit.Logging.logDebug("--- Header.setServerData - 2");
294 this.resetJsonEvaledServerData(); 291 this.resetJsonEvaledServerData();
295//MochiKit.Logging.logDebug("<<< Header.setServerData"); 292//MochiKit.Logging.logDebug("<<< Header.setServerData");
296 }, 293 },
297 294
298 'jsonEvaledServerData': function() { 295 'jsonEvaledServerData': function() {
299 if (this._jsonEvaledServerData == null) { 296 if (this._jsonEvaledServerData == null) {
300 this._jsonEvaledServerData = Clipperz.Base.evalJSON(this.serverData()); 297 this._jsonEvaledServerData = Clipperz.Base.evalJSON(this.serverData());
301 } 298 }
302 299
303 return this._jsonEvaledServerData; 300 return this._jsonEvaledServerData;
304 }, 301 },
305 302
306 'resetJsonEvaledServerData': function() { 303 'resetJsonEvaledServerData': function() {
307 this._jsonEvaledServerData = null; 304 this._jsonEvaledServerData = null;
308 }, 305 },
309 306
310 //------------------------------------------------------------------------- 307 //-------------------------------------------------------------------------
311 308
312 'serverDataVersion': function() { 309 'serverDataVersion': function() {
313 return this._serverDataVersion; 310 return this._serverDataVersion;
314 }, 311 },
315 312
316 'setServerDataVersion': function(aValue) { 313 'setServerDataVersion': function(aValue) {
317 this._serverDataVersion = aValue; 314 this._serverDataVersion = aValue;
318 }, 315 },
319 316
320 //------------------------------------------------------------------------- 317 //-------------------------------------------------------------------------
321 318
322 'decryptedLegacyServerData': function() { 319 'decryptedLegacyServerData': function() {
323 var deferredResult; 320 var deferredResult;
324 321
325//MochiKit.Logging.logDebug(">>> Header.decryptedLegacyServerData"); 322//MochiKit.Logging.logDebug(">>> Header.decryptedLegacyServerData");
326 deferredResult = new MochiKit.Async.Deferred(); 323 deferredResult = new MochiKit.Async.Deferred();
327//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 1: "/* + res*/); return res;}); 324//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 1: "/* + res*/); return res;});
328//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 325//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
329 deferredResult.addCallback(MochiKit.Base.method(this, 'updateAllSections')); 326 deferredResult.addCallback(MochiKit.Base.method(this, 'updateAllSections'));
330//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 2: "/* + res*/); return res;}); 327//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 2: "/* + res*/); return res;});
331//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 328//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
332 if (this._decryptedLegacyServerData == null) { 329 if (this._decryptedLegacyServerData == null) {
333//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 3: "/* + res*/); return res;}); 330//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 3: "/* + res*/); return res;});
334//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 331//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
335 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'connection_decryptingUserData'); 332 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'connection_decryptingUserData');
336//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 4: "/* + res*/); return res;}); 333//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 4: "/* + res*/); return res;});
337//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 334//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
338 deferredResult.addCallback(Clipperz.PM.Crypto.deferredDecrypt, this.user().passphrase(), this.serverData(), this.serverDataVersion()); 335 deferredResult.addCallback(Clipperz.PM.Crypto.deferredDecrypt, this.user().passphrase(), this.serverData(), this.serverDataVersion());
339//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 5: "/* + res*/); return res;}); 336//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 5: "/* + res*/); return res;});
340//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 337//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
341 deferredResult.addCallback(function(anHeader, aValue) { 338 deferredResult.addCallback(function(anHeader, aValue) {
342 anHeader._decryptedLegacyServerData = aValue; 339 anHeader._decryptedLegacyServerData = aValue;
343 }, this); 340 }, this);
344//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 6: "/* + res*/); return res;}); 341//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 6: "/* + res*/); return res;});
345//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 342//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
346 }; 343 };
347//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 7: "/* + res*/); return res;}); 344//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 7: "/* + res*/); return res;});
348//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 345//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
349 346
350 deferredResult.addCallback(function(anHeader) { 347 deferredResult.addCallback(function(anHeader) {
351 return anHeader._decryptedLegacyServerData; 348 return anHeader._decryptedLegacyServerData;
352 }, this); 349 }, this);
353//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 8: "/* + res*/); return res;}); 350//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 8: "/* + res*/); return res;});
354//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 351//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
355 deferredResult.callback(); 352 deferredResult.callback();
356//MochiKit.Logging.logDebug("<<< Header.decryptedLegacyServerData"); 353//MochiKit.Logging.logDebug("<<< Header.decryptedLegacyServerData");
357 354
358 return deferredResult; 355 return deferredResult;
359 }, 356 },
360 357
361 //------------------------------------------------------------------------- 358 //-------------------------------------------------------------------------
362 359
363 'serverDataFormat': function() { 360 'serverDataFormat': function() {
364 var result; 361 var result;
365 362
366//MochiKit.Logging.logDebug(">>> Header.serverDataFormat"); 363//MochiKit.Logging.logDebug(">>> Header.serverDataFormat");
367 if (this.serverData().charAt(0) == '{') { 364 if (this.serverData().charAt(0) == '{') {
368 varserverData; 365 varserverData;
369 366
370 serverData = Clipperz.Base.evalJSON(this.serverData()); 367 serverData = Clipperz.Base.evalJSON(this.serverData());
371 result = serverData['version']; 368 result = serverData['version'];
372 } else { 369 } else {
373 result = 'LEGACY'; 370 result = 'LEGACY';
374 } 371 }
375//MochiKit.Logging.logDebug("<<< Header.serverDataFormat"); 372//MochiKit.Logging.logDebug("<<< Header.serverDataFormat");
376 373
377 return result; 374 return result;
378 }, 375 },
379 376
380 //------------------------------------------------------------------------- 377 //-------------------------------------------------------------------------
381 378
382 'extractHeaderDataFromUserDetails': function(someUserDetails) { 379 'extractHeaderDataFromUserDetails': function(someUserDetails) {
383 if (this.serverData() == null) { 380 if (this.serverData() == null) {
384 this.setServerData(someUserDetails['header']); 381 this.setServerData(someUserDetails['header']);
385 this.setServerDataVersion(someUserDetails['version']) 382 this.setServerDataVersion(someUserDetails['version'])
386 } 383 }
387 }, 384 },
388 385
389 //------------------------------------------------------------------------- 386 //-------------------------------------------------------------------------
390 387
391 'extractDataWithKey': function(aKey) { 388 'extractDataWithKey': function(aKey) {
392 var deferredResult; 389 var deferredResult;
393 390
394//MochiKit.Logging.logDebug(">>> Header.extractDataWithKey"); 391//MochiKit.Logging.logDebug(">>> Header.extractDataWithKey");
395 deferredResult = new MochiKit.Async.Deferred(); 392 deferredResult = new MochiKit.Async.Deferred();
396 393
397 switch (this.serverDataFormat()) { 394 switch (this.serverDataFormat()) {
398 case 'LEGACY': 395 case 'LEGACY':
399//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.extractDataWithKey 1: "/* + res*/); return res;}); 396//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.extractDataWithKey 1: "/* + res*/); return res;});
400//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 397//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
401 deferredResult.addCallback(MochiKit.Base.method(this, 'decryptedLegacyServerData')); 398 deferredResult.addCallback(MochiKit.Base.method(this, 'decryptedLegacyServerData'));
402//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.extractDataWithKey 2: "/* + res*/); return res;}); 399//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.extractDataWithKey 2: "/* + res*/); return res;});
403//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 400//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
404 deferredResult.addCallback(function(someDecryptedValues) { 401 deferredResult.addCallback(function(someDecryptedValues) {
405 return someDecryptedValues[aKey] || {}; 402 return someDecryptedValues[aKey] || {};
406 }) 403 })
407//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.extractDataWithKey 3: "/* + res*/); return res;}); 404//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.extractDataWithKey 3: "/* + res*/); return res;});
408//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 405//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/OneTimePassword.js b/frontend/beta/js/Clipperz/PM/DataModel/OneTimePassword.js
index dd8d5c9..88f383a 100644
--- a/frontend/beta/js/Clipperz/PM/DataModel/OneTimePassword.js
+++ b/frontend/beta/js/Clipperz/PM/DataModel/OneTimePassword.js
@@ -1,333 +1,330 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } 28if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
32 29
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.DataModel.OneTimePassword = function(args) { 33Clipperz.PM.DataModel.OneTimePassword = function(args) {
37 args = args || {}; 34 args = args || {};
38 35
39//console.log("new OneTimePassword", args); 36//console.log("new OneTimePassword", args);
40//MochiKit.Logging.logDebug("---"); 37//MochiKit.Logging.logDebug("---");
41 this._user = args['user']; 38 this._user = args['user'];
42 this._password = args['password']; 39 this._password = args['password'];
43 this._passwordValue = Clipperz.PM.DataModel.OneTimePassword.normalizedOneTimePassword(args['password']); 40 this._passwordValue = Clipperz.PM.DataModel.OneTimePassword.normalizedOneTimePassword(args['password']);
44 this._reference = args['reference'] || Clipperz.PM.Crypto.randomKey(); 41 this._reference = args['reference'] || Clipperz.PM.Crypto.randomKey();
45 this._creationDate = args['created'] ? Clipperz.PM.Date.parseDateWithUTCFormat(args['created']) : new Date(); 42 this._creationDate = args['created'] ? Clipperz.PM.Date.parseDateWithUTCFormat(args['created']) : new Date();
46 this._usageDate = args['used'] ? Clipperz.PM.Date.parseDateWithUTCFormat(args['used']) : null; 43 this._usageDate = args['used'] ? Clipperz.PM.Date.parseDateWithUTCFormat(args['used']) : null;
47 44
48 this._status = args['status'] || 'ACTIVE'; 45 this._status = args['status'] || 'ACTIVE';
49 this._connectionInfo = null; 46 this._connectionInfo = null;
50 47
51 this._key = null; 48 this._key = null;
52 this._keyChecksum = null; 49 this._keyChecksum = null;
53 50
54 return this; 51 return this;
55} 52}
56 53
57Clipperz.PM.DataModel.OneTimePassword.prototype = MochiKit.Base.update(null, { 54Clipperz.PM.DataModel.OneTimePassword.prototype = MochiKit.Base.update(null, {
58 55
59 'toString': function() { 56 'toString': function() {
60 return "Clipperz.PM.DataModel.OneTimePassword"; 57 return "Clipperz.PM.DataModel.OneTimePassword";
61 }, 58 },
62 59
63 //------------------------------------------------------------------------- 60 //-------------------------------------------------------------------------
64 61
65 'user': function() { 62 'user': function() {
66 return this._user; 63 return this._user;
67 }, 64 },
68 65
69 //------------------------------------------------------------------------- 66 //-------------------------------------------------------------------------
70 67
71 'password': function() { 68 'password': function() {
72 return this._password; 69 return this._password;
73 }, 70 },
74 71
75 //------------------------------------------------------------------------- 72 //-------------------------------------------------------------------------
76 73
77 'passwordValue': function() { 74 'passwordValue': function() {
78 return this._passwordValue; 75 return this._passwordValue;
79 }, 76 },
80 77
81 //------------------------------------------------------------------------- 78 //-------------------------------------------------------------------------
82 79
83 'creationDate': function() { 80 'creationDate': function() {
84 return this._creationDate; 81 return this._creationDate;
85 }, 82 },
86 83
87 //------------------------------------------------------------------------- 84 //-------------------------------------------------------------------------
88 85
89 'reference': function() { 86 'reference': function() {
90 return this._reference; 87 return this._reference;
91 }, 88 },
92 89
93 //------------------------------------------------------------------------- 90 //-------------------------------------------------------------------------
94 91
95 'key': function() { 92 'key': function() {
96 if (this._key == null) { 93 if (this._key == null) {
97 this._key = Clipperz.PM.DataModel.OneTimePassword.computeKeyWithUsernameAndPassword(this.user().username(), this.passwordValue()); 94 this._key = Clipperz.PM.DataModel.OneTimePassword.computeKeyWithUsernameAndPassword(this.user().username(), this.passwordValue());
98 } 95 }
99 96
100 return this._key; 97 return this._key;
101 }, 98 },
102 99
103 //------------------------------------------------------------------------- 100 //-------------------------------------------------------------------------
104 101
105 'keyChecksum': function() { 102 'keyChecksum': function() {
106 if (this._keyChecksum == null) { 103 if (this._keyChecksum == null) {
107 this._keyChecksum = Clipperz.PM.DataModel.OneTimePassword.computeKeyChecksumWithUsernameAndPassword(this.user().username(), this.passwordValue()); 104 this._keyChecksum = Clipperz.PM.DataModel.OneTimePassword.computeKeyChecksumWithUsernameAndPassword(this.user().username(), this.passwordValue());
108 } 105 }
109 106
110 return this._keyChecksum; 107 return this._keyChecksum;
111 }, 108 },
112 109
113 //------------------------------------------------------------------------- 110 //-------------------------------------------------------------------------
114 111
115 'status': function() { 112 'status': function() {
116 return this._status; 113 return this._status;
117 }, 114 },
118 115
119 'setStatus': function(aValue) { 116 'setStatus': function(aValue) {
120 this._status = aValue; 117 this._status = aValue;
121 }, 118 },
122 119
123 //------------------------------------------------------------------------- 120 //-------------------------------------------------------------------------
124 121
125 'serializedData': function() { 122 'serializedData': function() {
126 var result; 123 var result;
127 124
128 result = { 125 result = {
129 'password': this.password(), 126 'password': this.password(),
130 'created': this.creationDate() ? Clipperz.PM.Date.formatDateWithUTCFormat(this.creationDate()) : null, 127 'created': this.creationDate() ? Clipperz.PM.Date.formatDateWithUTCFormat(this.creationDate()) : null,
131 'used': this.usageDate() ? Clipperz.PM.Date.formatDateWithUTCFormat(this.usageDate()) : null, 128 'used': this.usageDate() ? Clipperz.PM.Date.formatDateWithUTCFormat(this.usageDate()) : null,
132 'status': this.status() 129 'status': this.status()
133 }; 130 };
134 131
135 return result; 132 return result;
136 }, 133 },
137 134
138 //------------------------------------------------------------------------- 135 //-------------------------------------------------------------------------
139 136
140 'packedPassphrase': function() { 137 'packedPassphrase': function() {
141 var result; 138 var result;
142 var packedPassphrase; 139 var packedPassphrase;
143 var encodedPassphrase; 140 var encodedPassphrase;
144 varprefixPadding; 141 varprefixPadding;
145 var suffixPadding; 142 var suffixPadding;
146 var getRandomBytes; 143 var getRandomBytes;
147 144
148 getRandomBytes = MochiKit.Base.method(Clipperz.Crypto.PRNG.defaultRandomGenerator(), 'getRandomBytes'); 145 getRandomBytes = MochiKit.Base.method(Clipperz.Crypto.PRNG.defaultRandomGenerator(), 'getRandomBytes');
149 146
150 encodedPassphrase = new Clipperz.ByteArray(this.user().passphrase()).toBase64String(); 147 encodedPassphrase = new Clipperz.ByteArray(this.user().passphrase()).toBase64String();
151//MochiKit.Logging.logDebug("--- encodedPassphrase.length: " + encodedPassphrase.length); 148//MochiKit.Logging.logDebug("--- encodedPassphrase.length: " + encodedPassphrase.length);
152 prefixPadding = getRandomBytes(getRandomBytes(1).byteAtIndex(0)).toBase64String(); 149 prefixPadding = getRandomBytes(getRandomBytes(1).byteAtIndex(0)).toBase64String();
153//MochiKit.Logging.logDebug("--- prefixPadding.length: " + prefixPadding.length); 150//MochiKit.Logging.logDebug("--- prefixPadding.length: " + prefixPadding.length);
154 suffixPadding = getRandomBytes((500 - prefixPadding.length - encodedPassphrase.length) * 6 / 8).toBase64String(); 151 suffixPadding = getRandomBytes((500 - prefixPadding.length - encodedPassphrase.length) * 6 / 8).toBase64String();
155//MochiKit.Logging.logDebug("--- suffixPadding.length: " + suffixPadding.length); 152//MochiKit.Logging.logDebug("--- suffixPadding.length: " + suffixPadding.length);
156//MochiKit.Logging.logDebug("--- total.length: " + (prefixPadding.length + encodedPassphrase.length + suffixPadding.length)); 153//MochiKit.Logging.logDebug("--- total.length: " + (prefixPadding.length + encodedPassphrase.length + suffixPadding.length));
157 154
158 packedPassphrase = { 155 packedPassphrase = {
159 'prefix': prefixPadding, 156 'prefix': prefixPadding,
160 'passphrase': encodedPassphrase, 157 'passphrase': encodedPassphrase,
161 'suffix': suffixPadding 158 'suffix': suffixPadding
162 }; 159 };
163 160
164 // result = Clipperz.Base.serializeJSON(packedPassphrase); 161 // result = Clipperz.Base.serializeJSON(packedPassphrase);
165 result = packedPassphrase; 162 result = packedPassphrase;
166//MochiKit.Logging.logDebug("===== OTP packedPassprase: [" + result.length + "]" + result); 163//MochiKit.Logging.logDebug("===== OTP packedPassprase: [" + result.length + "]" + result);
167//MochiKit.Logging.logDebug("<<< OneTimePassword.packedPassphrase"); 164//MochiKit.Logging.logDebug("<<< OneTimePassword.packedPassphrase");
168 165
169 return result; 166 return result;
170 }, 167 },
171 168
172 //------------------------------------------------------------------------- 169 //-------------------------------------------------------------------------
173 170
174 'encryptedPackedPassphrase': function() { 171 'encryptedPackedPassphrase': function() {
175 return Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion(this.passwordValue(), this.packedPassphrase()) 172 return Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion(this.passwordValue(), this.packedPassphrase())
176 }, 173 },
177 174
178 //------------------------------------------------------------------------- 175 //-------------------------------------------------------------------------
179 176
180 'encryptedData': function() { 177 'encryptedData': function() {
181 var deferredResult; 178 var deferredResult;
182 varresult; 179 varresult;
183 180
184//MochiKit.Logging.logDebug(">>> OneTimePassword.encryptedData"); 181//MochiKit.Logging.logDebug(">>> OneTimePassword.encryptedData");
185//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - id: " + this.reference()); 182//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - id: " + this.reference());
186 result = { 183 result = {
187 'reference': this.reference(), 184 'reference': this.reference(),
188 'key': this.key(), 185 'key': this.key(),
189 'keyChecksum': this.keyChecksum(), 186 'keyChecksum': this.keyChecksum(),
190 'data': "", 187 'data': "",
191 'version': Clipperz.PM.Crypto.encryptingFunctions.currentVersion 188 'version': Clipperz.PM.Crypto.encryptingFunctions.currentVersion
192 } 189 }
193//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 2: " + Clipperz.Base.serializeJSON(result)); 190//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 2: " + Clipperz.Base.serializeJSON(result));
194 deferredResult = new MochiKit.Async.Deferred(); 191 deferredResult = new MochiKit.Async.Deferred();
195//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 3"); 192//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 3");
196//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.encryptedData - 1: " + res); return res;}); 193//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.encryptedData - 1: " + res); return res;});
197 //# deferredResult.addCallback(Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion, this.passwordValue(), this.packedPassphrase()); 194 //# deferredResult.addCallback(Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion, this.passwordValue(), this.packedPassphrase());
198 deferredResult.addCallback(MochiKit.Base.method(this, 'encryptedPackedPassphrase')); 195 deferredResult.addCallback(MochiKit.Base.method(this, 'encryptedPackedPassphrase'));
199//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 4"); 196//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 4");
200//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.encryptedData - 2: [" + res.length + "]" + res); return res;}); 197//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.encryptedData - 2: [" + res.length + "]" + res); return res;});
201 deferredResult.addCallback(function(aResult, res) { 198 deferredResult.addCallback(function(aResult, res) {
202 aResult['data'] = res; 199 aResult['data'] = res;
203 return aResult; 200 return aResult;
204 }, result); 201 }, result);
205//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 5"); 202//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 5");
206//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.encryptedData - 3: " + Clipperz.Base.serializeJSON(res)); return res;}); 203//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.encryptedData - 3: " + Clipperz.Base.serializeJSON(res)); return res;});
207 deferredResult.callback(); 204 deferredResult.callback();
208//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 6"); 205//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 6");
209 206
210 return deferredResult; 207 return deferredResult;
211 }, 208 },
212 209
213 //------------------------------------------------------------------------- 210 //-------------------------------------------------------------------------
214 211
215 'saveChanges': function() { 212 'saveChanges': function() {
216 var deferredResult; 213 var deferredResult;
217 varresult; 214 varresult;
218 215
219//MochiKit.Logging.logDebug(">>> OneTimePassword.saveChanges"); 216//MochiKit.Logging.logDebug(">>> OneTimePassword.saveChanges");
220 result = {}; 217 result = {};
221 deferredResult = new MochiKit.Async.Deferred(); 218 deferredResult = new MochiKit.Async.Deferred();
222 219
223 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_encryptUserData'); 220 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_encryptUserData');
224 deferredResult.addCallback(MochiKit.Base.method(this.user(), 'encryptedData')); 221 deferredResult.addCallback(MochiKit.Base.method(this.user(), 'encryptedData'));
225 deferredResult.addCallback(function(aResult, res) { 222 deferredResult.addCallback(function(aResult, res) {
226 aResult['user'] = res; 223 aResult['user'] = res;
227 return aResult; 224 return aResult;
228 }, result); 225 }, result);
229 226
230 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_encryptOTPData'); 227 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_encryptOTPData');
231 deferredResult.addCallback(MochiKit.Base.method(this, 'encryptedData')); 228 deferredResult.addCallback(MochiKit.Base.method(this, 'encryptedData'));
232 deferredResult.addCallback(function(aResult, res) { 229 deferredResult.addCallback(function(aResult, res) {
233 aResult['oneTimePassword'] = res; 230 aResult['oneTimePassword'] = res;
234 return aResult; 231 return aResult;
235 }, result); 232 }, result);
236 233
237 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_sendingData'); 234 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_sendingData');
238//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.saveChanges - 1: " + Clipperz.Base.serializeJSON(res)); return res;}); 235//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.saveChanges - 1: " + Clipperz.Base.serializeJSON(res)); return res;});
239 deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'addNewOneTimePassword'); 236 deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'addNewOneTimePassword');
240 237
241 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_updatingInterface'); 238 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_updatingInterface');
242//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.saveChanges - 2: " + res); return res;}); 239//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.saveChanges - 2: " + res); return res;});
243 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'notify', 'OTPUpdated'); 240 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'notify', 'OTPUpdated');
244 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'oneTimePassword_saveChanges_done', null); 241 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'oneTimePassword_saveChanges_done', null);
245//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.saveChanges - 2: " + res); return res;}); 242//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.saveChanges - 2: " + res); return res;});
246 deferredResult.callback(); 243 deferredResult.callback();
247//MochiKit.Logging.logDebug("<<< OneTimePassword.saveChanges"); 244//MochiKit.Logging.logDebug("<<< OneTimePassword.saveChanges");
248 245
249 return deferredResult; 246 return deferredResult;
250 }, 247 },
251 248
252 //------------------------------------------------------------------------- 249 //-------------------------------------------------------------------------
253 250
254 'usageDate': function() { 251 'usageDate': function() {
255 return this._usageDate; 252 return this._usageDate;
256 }, 253 },
257 254
258 'setUsageDate': function(aValue) { 255 'setUsageDate': function(aValue) {
259 this._usageDate = aValue; 256 this._usageDate = aValue;
260 }, 257 },
261 258
262 //------------------------------------------------------------------------- 259 //-------------------------------------------------------------------------
263 260
264 'connectionInfo': function() { 261 'connectionInfo': function() {
265 return this._connectionInfo; 262 return this._connectionInfo;
266 }, 263 },
267 264
268 'setConnectionInfo': function(aValue) { 265 'setConnectionInfo': function(aValue) {
269 this._connectionInfo = aValue; 266 this._connectionInfo = aValue;
270 }, 267 },
271 268
272 //------------------------------------------------------------------------- 269 //-------------------------------------------------------------------------
273 270
274 'isExpired': function() { 271 'isExpired': function() {
275 return (this.usageDate() != null); 272 return (this.usageDate() != null);
276 }, 273 },
277 274
278 //------------------------------------------------------------------------- 275 //-------------------------------------------------------------------------
279 276
280 'updateStatusWithValues': function(someValues) { 277 'updateStatusWithValues': function(someValues) {
281 var result; 278 var result;
282 279
283 result = false; 280 result = false;
284 281
285 if (someValues['status'] != this.status()) { 282 if (someValues['status'] != this.status()) {
286 result = true; 283 result = true;
287 } 284 }
288 285
289 this.setStatus(someValues['status']); 286 this.setStatus(someValues['status']);
290 this.setUsageDate(Clipperz.PM.Date.parseDateWithUTCFormat(someValues['requestDate'])); 287 this.setUsageDate(Clipperz.PM.Date.parseDateWithUTCFormat(someValues['requestDate']));
291 this.setConnectionInfo(someValues['connection']); 288 this.setConnectionInfo(someValues['connection']);
292 289
293 return result; 290 return result;
294 }, 291 },
295 292
296 //------------------------------------------------------------------------- 293 //-------------------------------------------------------------------------
297 __syntaxFix__: "syntax fix" 294 __syntaxFix__: "syntax fix"
298}); 295});
299 296
300//============================================================================= 297//=============================================================================
301 298
302Clipperz.PM.DataModel.OneTimePassword.computeKeyWithUsernameAndPassword = function(anUsername, aPassword) { 299Clipperz.PM.DataModel.OneTimePassword.computeKeyWithUsernameAndPassword = function(anUsername, aPassword) {
303 return Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aPassword)).toHexString().substring(2); 300 return Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aPassword)).toHexString().substring(2);
304} 301}
305 302
306Clipperz.PM.DataModel.OneTimePassword.computeKeyChecksumWithUsernameAndPassword = function(anUsername, aPassword) { 303Clipperz.PM.DataModel.OneTimePassword.computeKeyChecksumWithUsernameAndPassword = function(anUsername, aPassword) {
307 return Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(anUsername + aPassword)).toHexString().substring(2); 304 return Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(anUsername + aPassword)).toHexString().substring(2);
308} 305}
309 306
310//============================================================================= 307//=============================================================================
311 308
312Clipperz.PM.DataModel.OneTimePassword.normalizedOneTimePassword = function(aPassword) { 309Clipperz.PM.DataModel.OneTimePassword.normalizedOneTimePassword = function(aPassword) {
313 varresult; 310 varresult;
314 311
315 if (aPassword.replace(/[\s\-]/g, '').length == 32) { 312 if (aPassword.replace(/[\s\-]/g, '').length == 32) {
316 try { 313 try {
317 var passwordByteArray; 314 var passwordByteArray;
318 315
319 passwordByteArray = new Clipperz.ByteArray(); 316 passwordByteArray = new Clipperz.ByteArray();
320 passwordByteArray.appendBase32String(aPassword); 317 passwordByteArray.appendBase32String(aPassword);
321 318
322 result = passwordByteArray.toBase64String(); 319 result = passwordByteArray.toBase64String();
323 } catch(exception) { 320 } catch(exception) {
324 result = aPassword; 321 result = aPassword;
325 } 322 }
326 } else { 323 } else {
327 result = aPassword; 324 result = aPassword;
328 } 325 }
329 326
330 return result; 327 return result;
331} 328}
332 329
333//============================================================================= 330//=============================================================================
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/OneTimePasswordManager.js b/frontend/beta/js/Clipperz/PM/DataModel/OneTimePasswordManager.js
index d90100a..aa40aba 100644
--- a/frontend/beta/js/Clipperz/PM/DataModel/OneTimePasswordManager.js
+++ b/frontend/beta/js/Clipperz/PM/DataModel/OneTimePasswordManager.js
@@ -1,280 +1,277 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } 28if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
32 29
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.DataModel.OneTimePasswordManager = function(anUser, args) { 33Clipperz.PM.DataModel.OneTimePasswordManager = function(anUser, args) {
37 args = args || {}; 34 args = args || {};
38 35
39 this._user = anUser; 36 this._user = anUser;
40 this._oneTimePasswords = {}; 37 this._oneTimePasswords = {};
41 38
42 this.updateWithData(args); 39 this.updateWithData(args);
43 40
44 Clipperz.NotificationCenter.notify(null, 'oneTimePasswordAdded', null, true); 41 Clipperz.NotificationCenter.notify(null, 'oneTimePasswordAdded', null, true);
45 42
46 return this; 43 return this;
47} 44}
48 45
49Clipperz.PM.DataModel.OneTimePasswordManager.prototype = MochiKit.Base.update(null, { 46Clipperz.PM.DataModel.OneTimePasswordManager.prototype = MochiKit.Base.update(null, {
50 47
51 'toString': function() { 48 'toString': function() {
52 return "Clipperz.PM.DataModel.OneTimePasswordManager"; 49 return "Clipperz.PM.DataModel.OneTimePasswordManager";
53 }, 50 },
54 51
55 //------------------------------------------------------------------------- 52 //-------------------------------------------------------------------------
56 53
57 'updateWithData': function(someValues) { 54 'updateWithData': function(someValues) {
58 varotpReference; 55 varotpReference;
59 56
60//console.log("OneTimePasswordManager.updateWithData", someValues); 57//console.log("OneTimePasswordManager.updateWithData", someValues);
61//MochiKit.Logging.logDebug("OneTimePasswordManager.updateWithData: " + Clipperz.Base.serializeJSON(someValues)); 58//MochiKit.Logging.logDebug("OneTimePasswordManager.updateWithData: " + Clipperz.Base.serializeJSON(someValues));
62 for (otpReference in someValues) { 59 for (otpReference in someValues) {
63 var otp; 60 var otp;
64 var otpConfiguration; 61 var otpConfiguration;
65 62
66 otpConfiguration = someValues[otpReference]; 63 otpConfiguration = someValues[otpReference];
67 otpConfiguration['user'] = this.user(); 64 otpConfiguration['user'] = this.user();
68 otpConfiguration['reference'] = otpReference; 65 otpConfiguration['reference'] = otpReference;
69 otp = new Clipperz.PM.DataModel.OneTimePassword(otpConfiguration); 66 otp = new Clipperz.PM.DataModel.OneTimePassword(otpConfiguration);
70 this._oneTimePasswords[otpReference] = otp; 67 this._oneTimePasswords[otpReference] = otp;
71 } 68 }
72 69
73 return this; 70 return this;
74 }, 71 },
75 72
76 //------------------------------------------------------------------------- 73 //-------------------------------------------------------------------------
77 74
78 'updateWithServerData': function(someValues) { 75 'updateWithServerData': function(someValues) {
79 var deferredResult; 76 var deferredResult;
80 varoneTimePasswordReference; 77 varoneTimePasswordReference;
81 var wereChangesApplied; 78 var wereChangesApplied;
82 79
83//MochiKit.Logging.logDebug(">>> OneTimePasswordManager.updateWithServerData"); 80//MochiKit.Logging.logDebug(">>> OneTimePasswordManager.updateWithServerData");
84 deferredResult = new MochiKit.Async.Deferred(); 81 deferredResult = new MochiKit.Async.Deferred();
85 wereChangesApplied = false; 82 wereChangesApplied = false;
86 83
87 for (oneTimePasswordReference in someValues) { 84 for (oneTimePasswordReference in someValues) {
88 var oneTimePassword; 85 var oneTimePassword;
89 86
90 oneTimePassword = this.oneTimePasswordWithReference(oneTimePasswordReference); 87 oneTimePassword = this.oneTimePasswordWithReference(oneTimePasswordReference);
91 if (oneTimePassword != null) { 88 if (oneTimePassword != null) {
92 var oneTimePasswordHasBeenUpdated; 89 var oneTimePasswordHasBeenUpdated;
93 90
94 oneTimePasswordHasBeenUpdated = oneTimePassword.updateStatusWithValues(someValues[oneTimePasswordReference]); 91 oneTimePasswordHasBeenUpdated = oneTimePassword.updateStatusWithValues(someValues[oneTimePasswordReference]);
95 wereChangesApplied = oneTimePasswordHasBeenUpdated || wereChangesApplied; 92 wereChangesApplied = oneTimePasswordHasBeenUpdated || wereChangesApplied;
96 } else { 93 } else {
97 94
98 } 95 }
99 } 96 }
100 97
101 if (wereChangesApplied == true) { 98 if (wereChangesApplied == true) {
102 this.user().header().markSectionAsUpdated('oneTimePasswords'); 99 this.user().header().markSectionAsUpdated('oneTimePasswords');
103 } 100 }
104 101
105 for (oneTimePasswordReference in this.oneTimePasswords()) { 102 for (oneTimePasswordReference in this.oneTimePasswords()) {
106 if (typeof(someValues[oneTimePasswordReference]) == 'undefind') { 103 if (typeof(someValues[oneTimePasswordReference]) == 'undefind') {
107 deferredResult.addCallback(MochiKit.Base.method(this.oneTimePasswordWithReference(oneTimePasswordReference), 'saveChanges')); 104 deferredResult.addCallback(MochiKit.Base.method(this.oneTimePasswordWithReference(oneTimePasswordReference), 'saveChanges'));
108 } 105 }
109 } 106 }
110 107
111 deferredResult.addCallback(MochiKit.Async.succeed, this); 108 deferredResult.addCallback(MochiKit.Async.succeed, this);
112 109
113 deferredResult.callback(); 110 deferredResult.callback();
114//MochiKit.Logging.logDebug("<<< OneTimePasswordManager.updateWithServerData"); 111//MochiKit.Logging.logDebug("<<< OneTimePasswordManager.updateWithServerData");
115 112
116 return deferredResult; 113 return deferredResult;
117 }, 114 },
118 115
119 //------------------------------------------------------------------------- 116 //-------------------------------------------------------------------------
120 117
121 'user': function() { 118 'user': function() {
122 return this._user; 119 return this._user;
123 }, 120 },
124 121
125 //------------------------------------------------------------------------- 122 //-------------------------------------------------------------------------
126 123
127 'addOneTimePassword': function(aOneTimePassword, isBatchUpdate) { 124 'addOneTimePassword': function(aOneTimePassword, isBatchUpdate) {
128 this.oneTimePasswords()[aOneTimePassword.reference()] = aOneTimePassword; 125 this.oneTimePasswords()[aOneTimePassword.reference()] = aOneTimePassword;
129 126
130 if (isBatchUpdate != true) { 127 if (isBatchUpdate != true) {
131 Clipperz.NotificationCenter.notify(aOneTimePassword, 'oneTimePasswordAdded'); 128 Clipperz.NotificationCenter.notify(aOneTimePassword, 'oneTimePasswordAdded');
132 Clipperz.NotificationCenter.notify(this.user(), 'updatedSection', 'oneTimePasswords', true); 129 Clipperz.NotificationCenter.notify(this.user(), 'updatedSection', 'oneTimePasswords', true);
133 } 130 }
134 }, 131 },
135 132
136 //------------------------------------------------------------------------- 133 //-------------------------------------------------------------------------
137 134
138 'archiveOneTimePassword': function(aOneTimePasswordReference) { 135 'archiveOneTimePassword': function(aOneTimePasswordReference) {
139 var deferredResult; 136 var deferredResult;
140 137
141//MochiKit.Logging.logDebug(">>> OneTimePasswordManager.archiveOneTimePassword"); 138//MochiKit.Logging.logDebug(">>> OneTimePasswordManager.archiveOneTimePassword");
142//MochiKit.Logging.logDebug("--- OneTimePasswordManager.archiveOneTimePassword - 0 otp.reference: " + aOneTimePasswordReference); 139//MochiKit.Logging.logDebug("--- OneTimePasswordManager.archiveOneTimePassword - 0 otp.reference: " + aOneTimePasswordReference);
143 deferredResult = new MochiKit.Async.Deferred(); 140 deferredResult = new MochiKit.Async.Deferred();
144 deferredResult.addCallback(MochiKit.Base.method(this.user(), 'loadOneTimePasswords')); 141 deferredResult.addCallback(MochiKit.Base.method(this.user(), 'loadOneTimePasswords'));
145 deferredResult.addCallback(MochiKit.Base.bind(function(aOneTimePasswordReference) { 142 deferredResult.addCallback(MochiKit.Base.bind(function(aOneTimePasswordReference) {
146 var oneTimePassword; 143 var oneTimePassword;
147 144
148//MochiKit.Logging.logDebug("--- OneTimePasswordManager.archiveOneTimePassword - 1 serializedData: " + Clipperz.Base.serializeJSON(this.serializedData())); 145//MochiKit.Logging.logDebug("--- OneTimePasswordManager.archiveOneTimePassword - 1 serializedData: " + Clipperz.Base.serializeJSON(this.serializedData()));
149 oneTimePassword = this.oneTimePasswords()[aOneTimePasswordReference]; 146 oneTimePassword = this.oneTimePasswords()[aOneTimePasswordReference];
150 147
151 if (oneTimePassword != null) { 148 if (oneTimePassword != null) {
152 oneTimePassword.setUsageDate(new Date()); 149 oneTimePassword.setUsageDate(new Date());
153 150
154 // while (this.usedOneTimePasswords().length > 10) { 151 // while (this.usedOneTimePasswords().length > 10) {
155 // var referenceOfOneTimePasswordToRemove; 152 // var referenceOfOneTimePasswordToRemove;
156 // 153 //
157 // referenceOfOneTimePasswordToRemove = this.usedOneTimePasswords()[0]; 154 // referenceOfOneTimePasswordToRemove = this.usedOneTimePasswords()[0];
158 // delete this.oneTimePasswords()[referenceOfOneTimePasswordToRemove]; 155 // delete this.oneTimePasswords()[referenceOfOneTimePasswordToRemove];
159 // this.usedOneTimePasswords().shift(); 156 // this.usedOneTimePasswords().shift();
160 // } 157 // }
161 158
162 Clipperz.NotificationCenter.notify(this.user(), 'updatedSection', 'oneTimePasswords', true); 159 Clipperz.NotificationCenter.notify(this.user(), 'updatedSection', 'oneTimePasswords', true);
163 } else { 160 } else {
164 MochiKit.Logging.logError("### OneTimePasswordManager.archiveOneTimePassword - the used OneTimePassword has not been found on the index-card. :-("); 161 MochiKit.Logging.logError("### OneTimePasswordManager.archiveOneTimePassword - the used OneTimePassword has not been found on the index-card. :-(");
165 } 162 }
166 163
167//MochiKit.Logging.logDebug("--- OneTimePasswordManager.archiveOneTimePassword - 2 serializedData: " + Clipperz.Base.serializeJSON(this.serializedData())); 164//MochiKit.Logging.logDebug("--- OneTimePasswordManager.archiveOneTimePassword - 2 serializedData: " + Clipperz.Base.serializeJSON(this.serializedData()));
168 }, this), aOneTimePasswordReference); 165 }, this), aOneTimePasswordReference);
169 deferredResult.addCallback(MochiKit.Base.method(this, 'saveChanges')); 166 deferredResult.addCallback(MochiKit.Base.method(this, 'saveChanges'));
170 deferredResult.callback(); 167 deferredResult.callback();
171//MochiKit.Logging.logDebug("<<< OneTimePasswordManager.archiveOneTimePassword"); 168//MochiKit.Logging.logDebug("<<< OneTimePasswordManager.archiveOneTimePassword");
172 169
173 return deferredResult; 170 return deferredResult;
174 }, 171 },
175 172
176 //------------------------------------------------------------------------- 173 //-------------------------------------------------------------------------
177 174
178 'serializedData': function() { 175 'serializedData': function() {
179 var result; 176 var result;
180 varkey; 177 varkey;
181 178
182 result = {}; 179 result = {};
183 180
184 for (key in this.oneTimePasswords()) { 181 for (key in this.oneTimePasswords()) {
185 result[key] = this.oneTimePasswords()[key].serializedData(); 182 result[key] = this.oneTimePasswords()[key].serializedData();
186 } 183 }
187 184
188 return result; 185 return result;
189 }, 186 },
190 187
191 //------------------------------------------------------------------------- 188 //-------------------------------------------------------------------------
192 189
193 'oneTimePasswords': function() { 190 'oneTimePasswords': function() {
194 return this._oneTimePasswords; 191 return this._oneTimePasswords;
195 }, 192 },
196 193
197 //------------------------------------------------------------------------- 194 //-------------------------------------------------------------------------
198 195
199 'oneTimePasswordWithReference': function(aOneTimePasswordReference) { 196 'oneTimePasswordWithReference': function(aOneTimePasswordReference) {
200 return this.oneTimePasswords()[aOneTimePasswordReference]; 197 return this.oneTimePasswords()[aOneTimePasswordReference];
201 }, 198 },
202 199
203 //------------------------------------------------------------------------- 200 //-------------------------------------------------------------------------
204 201
205 'deleteOneTimePasswordWithReference': function(aOneTimePasswordReference) { 202 'deleteOneTimePasswordWithReference': function(aOneTimePasswordReference) {
206 delete(this.oneTimePasswords()[aOneTimePasswordReference]); 203 delete(this.oneTimePasswords()[aOneTimePasswordReference]);
207 Clipperz.NotificationCenter.notify(this.user(), 'updatedSection', 'oneTimePasswords', true); 204 Clipperz.NotificationCenter.notify(this.user(), 'updatedSection', 'oneTimePasswords', true);
208 }, 205 },
209 206
210 //------------------------------------------------------------------------- 207 //-------------------------------------------------------------------------
211 208
212 'encryptedData': function() { 209 'encryptedData': function() {
213 var deferredResult; 210 var deferredResult;
214 var oneTimePasswordReferences; 211 var oneTimePasswordReferences;
215 var result; 212 var result;
216 var i, c; 213 var i, c;
217 214
218 result = {}; 215 result = {};
219 deferredResult = new MochiKit.Async.Deferred(); 216 deferredResult = new MochiKit.Async.Deferred();
220 deferredResult.addCallback(MochiKit.Async.succeed); 217 deferredResult.addCallback(MochiKit.Async.succeed);
221 218
222 oneTimePasswordReferences = MochiKit.Base.keys(this.oneTimePasswords()); 219 oneTimePasswordReferences = MochiKit.Base.keys(this.oneTimePasswords());
223 c = oneTimePasswordReferences.length; 220 c = oneTimePasswordReferences.length;
224 for (i=0; i<c; i++) { 221 for (i=0; i<c; i++) {
225 var currentOneTimePassword; 222 var currentOneTimePassword;
226 223
227 currentOneTimePassword = this.oneTimePasswords()[oneTimePasswordReferences[i]]; 224 currentOneTimePassword = this.oneTimePasswords()[oneTimePasswordReferences[i]];
228 deferredResult.addCallback(MochiKit.Base.method(currentOneTimePassword, 'encryptedPackedPassphrase')); 225 deferredResult.addCallback(MochiKit.Base.method(currentOneTimePassword, 'encryptedPackedPassphrase'));
229 deferredResult.addCallback(function(aResult, aOneTimePasswordReference, anEncryptedPackedPassphrase) { 226 deferredResult.addCallback(function(aResult, aOneTimePasswordReference, anEncryptedPackedPassphrase) {
230 aResult[aOneTimePasswordReference] = anEncryptedPackedPassphrase; 227 aResult[aOneTimePasswordReference] = anEncryptedPackedPassphrase;
231 return aResult; 228 return aResult;
232 }, result, oneTimePasswordReferences[i]); 229 }, result, oneTimePasswordReferences[i]);
233 } 230 }
234//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePasswordManager.encryptedData: " + res); return res;}); 231//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePasswordManager.encryptedData: " + res); return res;});
235 232
236 deferredResult.callback(result); 233 deferredResult.callback(result);
237 234
238 return deferredResult; 235 return deferredResult;
239 }, 236 },
240 237
241 //------------------------------------------------------------------------- 238 //-------------------------------------------------------------------------
242 239
243 'saveChanges': function() { 240 'saveChanges': function() {
244 var deferredResult; 241 var deferredResult;
245 varresult; 242 varresult;
246 243
247//MochiKit.Logging.logDebug(">>> OneTimePasswordManager.saveChanges"); 244//MochiKit.Logging.logDebug(">>> OneTimePasswordManager.saveChanges");
248 result = {}; 245 result = {};
249 deferredResult = new MochiKit.Async.Deferred(); 246 deferredResult = new MochiKit.Async.Deferred();
250 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_encryptUserData'); 247 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_encryptUserData');
251 deferredResult.addCallback(MochiKit.Base.method(this.user(), 'encryptedData')); 248 deferredResult.addCallback(MochiKit.Base.method(this.user(), 'encryptedData'));
252 deferredResult.addCallback(function(aResult, res) { 249 deferredResult.addCallback(function(aResult, res) {
253 aResult['user'] = res; 250 aResult['user'] = res;
254 return aResult; 251 return aResult;
255 }, result); 252 }, result);
256 253
257 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_encryptOTPData'); 254 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_encryptOTPData');
258 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 255 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
259 res['oneTimePasswords'] = MochiKit.Base.keys(this.oneTimePasswords()); 256 res['oneTimePasswords'] = MochiKit.Base.keys(this.oneTimePasswords());
260 return res; 257 return res;
261 }, this)); 258 }, this));
262 259
263 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_sendingData'); 260 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_sendingData');
264//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePasswordManager.saveChanges - 1: " + Clipperz.Base.serializeJSON(res)); return res;}); 261//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePasswordManager.saveChanges - 1: " + Clipperz.Base.serializeJSON(res)); return res;});
265 deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'updateOneTimePasswords'); 262 deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'updateOneTimePasswords');
266 263
267 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_updatingInterface'); 264 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_updatingInterface');
268//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePasswordManager.saveChanges - 2: " + res); return res;}); 265//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePasswordManager.saveChanges - 2: " + res); return res;});
269 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'notify', 'OTPUpdated'); 266 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'notify', 'OTPUpdated');
270//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePasswordManager.saveChanges - 3: " + res); return res;}); 267//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePasswordManager.saveChanges - 3: " + res); return res;});
271 deferredResult.callback(); 268 deferredResult.callback();
272//MochiKit.Logging.logDebug("<<< OneTimePasswordManager.saveChanges"); 269//MochiKit.Logging.logDebug("<<< OneTimePasswordManager.saveChanges");
273 270
274 return deferredResult; 271 return deferredResult;
275 }, 272 },
276 273
277 //------------------------------------------------------------------------- 274 //-------------------------------------------------------------------------
278 __syntaxFix__: "syntax fix" 275 __syntaxFix__: "syntax fix"
279}); 276});
280 277
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/Record.js b/frontend/beta/js/Clipperz/PM/DataModel/Record.js
index b4b5023..270f2ae 100644
--- a/frontend/beta/js/Clipperz/PM/DataModel/Record.js
+++ b/frontend/beta/js/Clipperz/PM/DataModel/Record.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } 28if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
32 29
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.DataModel.Record = function(args) { 33Clipperz.PM.DataModel.Record = function(args) {
37 args = args || {}; 34 args = args || {};
38 35
39 this._user = args['user'] || null; 36 this._user = args['user'] || null;
40 this._reference = args['reference'] || Clipperz.PM.Crypto.randomKey(); 37 this._reference = args['reference'] || Clipperz.PM.Crypto.randomKey();
41 this._version = args['version'] || Clipperz.PM.Crypto.encryptingFunctions.currentVersion; 38 this._version = args['version'] || Clipperz.PM.Crypto.encryptingFunctions.currentVersion;
42 this._key = args['key'] || Clipperz.PM.Crypto.randomKey(); 39 this._key = args['key'] || Clipperz.PM.Crypto.randomKey();
43 40
44 this.setLabel(args['label'] || Clipperz.PM.Strings['newRecordTitleLabel']); 41 this.setLabel(args['label'] || Clipperz.PM.Strings['newRecordTitleLabel']);
45 42
46 this.setHeaderNotes(args['headerNotes'] || null); 43 this.setHeaderNotes(args['headerNotes'] || null);
47 this.setNotes(args['notes'] || args['headerNotes'] || ""); 44 this.setNotes(args['notes'] || args['headerNotes'] || "");
48//MochiKit.Logging.logDebug("--- new Record ('" + this._label + "')- _headerNotes: '" + this._headerNotes + "'"); 45//MochiKit.Logging.logDebug("--- new Record ('" + this._label + "')- _headerNotes: '" + this._headerNotes + "'");
49//MochiKit.Logging.logDebug("--- new Record ('" + this._label + "')- _notes: '" + this._notes + "'"); 46//MochiKit.Logging.logDebug("--- new Record ('" + this._label + "')- _notes: '" + this._notes + "'");
50 //this._notes = args.notes || ""; 47 //this._notes = args.notes || "";
51 48
52 this._versions = {}; 49 this._versions = {};
53 this._directLogins = {}; 50 this._directLogins = {};
54 this._removedDirectLogins = []; 51 this._removedDirectLogins = [];
55 52
56 this.setIsBrandNew(args['reference'] == null); 53 this.setIsBrandNew(args['reference'] == null);
57 54
58 this.setShouldLoadData(this.isBrandNew() ? false: true); 55 this.setShouldLoadData(this.isBrandNew() ? false: true);
59 this.setShouldDecryptData(this.isBrandNew() ? false: true); 56 this.setShouldDecryptData(this.isBrandNew() ? false: true);
60 this.setShouldProcessData(this.isBrandNew() ? false: true); 57 this.setShouldProcessData(this.isBrandNew() ? false: true);
61 58
62 this.setCurrentVersion(this.isBrandNew() ? new Clipperz.PM.DataModel.RecordVersion(this, null): null); 59 this.setCurrentVersion(this.isBrandNew() ? new Clipperz.PM.DataModel.RecordVersion(this, null): null);
63 this.setCurrentVersionKey(null); 60 this.setCurrentVersionKey(null);
64 61
65 this._serverData = null; 62 this._serverData = null;
66 this._decryptedData = null; 63 this._decryptedData = null;
67 this._cachedData = null; 64 this._cachedData = null;
68 65
69 return this; 66 return this;
70} 67}
71 68
72Clipperz.PM.DataModel.Record.prototype = MochiKit.Base.update(null, { 69Clipperz.PM.DataModel.Record.prototype = MochiKit.Base.update(null, {
73 70
74 'toString': function() { 71 'toString': function() {
75 return "Record (" + this.label() + ")"; 72 return "Record (" + this.label() + ")";
76 }, 73 },
77 74
78 //------------------------------------------------------------------------- 75 //-------------------------------------------------------------------------
79 76
80 'isBrandNew': function() { 77 'isBrandNew': function() {
81 return this._isBrandNew; 78 return this._isBrandNew;
82 }, 79 },
83 80
84 'setIsBrandNew': function(aValue) { 81 'setIsBrandNew': function(aValue) {
85 this._isBrandNew = aValue; 82 this._isBrandNew = aValue;
86 }, 83 },
87 84
88 //------------------------------------------------------------------------- 85 //-------------------------------------------------------------------------
89/* 86/*
90 'shouldRunTheRecordCreationWizard': function() { 87 'shouldRunTheRecordCreationWizard': function() {
91 return (this.isBrandNew() && (MochiKit.Base.keys(this.currentVersion().fields()).length == 0)); 88 return (this.isBrandNew() && (MochiKit.Base.keys(this.currentVersion().fields()).length == 0));
92 }, 89 },
93 */ 90 */
94 //------------------------------------------------------------------------- 91 //-------------------------------------------------------------------------
95 92
96 'user': function() { 93 'user': function() {
97 return this._user; 94 return this._user;
98 }, 95 },
99 96
100 //------------------------------------------------------------------------- 97 //-------------------------------------------------------------------------
101 98
102 'reference': function() { 99 'reference': function() {
103 return this._reference; 100 return this._reference;
104 }, 101 },
105 102
106 //------------------------------------------------------------------------- 103 //-------------------------------------------------------------------------
107 104
108 'key': function() { 105 'key': function() {
109 return this._key; 106 return this._key;
110 }, 107 },
111 108
112 'updateKey': function() { 109 'updateKey': function() {
113 this._key = Clipperz.PM.Crypto.randomKey(); 110 this._key = Clipperz.PM.Crypto.randomKey();
114 }, 111 },
115 112
116 //------------------------------------------------------------------------- 113 //-------------------------------------------------------------------------
117 114
118 'label': function() { 115 'label': function() {
119 return this._label; 116 return this._label;
120 }, 117 },
121 118
122 'setLabel': function(aValue) { 119 'setLabel': function(aValue) {
123 this._label = aValue; 120 this._label = aValue;
124 }, 121 },
125 122
126 'lowerCaseLabel': function() { 123 'lowerCaseLabel': function() {
127 return this.label().toLowerCase(); 124 return this.label().toLowerCase();
128 }, 125 },
129 126
130 //------------------------------------------------------------------------- 127 //-------------------------------------------------------------------------
131 128
132 'versions': function() { 129 'versions': function() {
133 return this._versions; 130 return this._versions;
134 }, 131 },
135 132
136 //------------------------------------------------------------------------- 133 //-------------------------------------------------------------------------
137 134
138 'currentVersion': function() { 135 'currentVersion': function() {
139 return this._currentVersion; 136 return this._currentVersion;
140 }, 137 },
141 138
142 'setCurrentVersion': function(aValue) { 139 'setCurrentVersion': function(aValue) {
143 this._currentVersion = aValue; 140 this._currentVersion = aValue;
144 }, 141 },
145 142
146 //------------------------------------------------------------------------- 143 //-------------------------------------------------------------------------
147 144
148 'currentVersionKey': function() { 145 'currentVersionKey': function() {
149 return this._currentVersionKey; 146 return this._currentVersionKey;
150 }, 147 },
151 148
152 'setCurrentVersionKey': function(aValue) { 149 'setCurrentVersionKey': function(aValue) {
153 this._currentVersionKey = aValue; 150 this._currentVersionKey = aValue;
154 }, 151 },
155 152
156 //------------------------------------------------------------------------- 153 //-------------------------------------------------------------------------
157 154
158 'deferredData': function() { 155 'deferredData': function() {
159 vardeferredResult; 156 vardeferredResult;
160 157
161//MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] Record.deferredData - this: " + this); 158//MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] Record.deferredData - this: " + this);
162 deferredResult = new MochiKit.Async.Deferred(); 159 deferredResult = new MochiKit.Async.Deferred();
163 deferredResult.addCallback(MochiKit.Base.method(this, 'loadData')); 160 deferredResult.addCallback(MochiKit.Base.method(this, 'loadData'));
164 deferredResult.addCallback(MochiKit.Base.method(this, 'decryptData')); 161 deferredResult.addCallback(MochiKit.Base.method(this, 'decryptData'));
165 deferredResult.addCallback(MochiKit.Base.method(this, 'processData')); 162 deferredResult.addCallback(MochiKit.Base.method(this, 'processData'));
166 deferredResult.addCallback(function(aRecord) { 163 deferredResult.addCallback(function(aRecord) {
167 return aRecord.currentVersion().deferredData(); 164 return aRecord.currentVersion().deferredData();
168 }); 165 });
169 deferredResult.addCallback(MochiKit.Base.method(this, 'takeSnapshotOfCurrentData')); 166 deferredResult.addCallback(MochiKit.Base.method(this, 'takeSnapshotOfCurrentData'));
170 deferredResult.addCallback(MochiKit.Async.succeed, this); 167 deferredResult.addCallback(MochiKit.Async.succeed, this);
171 deferredResult.callback(); 168 deferredResult.callback();
172//MochiKit.Logging.logDebug("<<< [" + (new Date()).valueOf() + "] Record.deferredData"); 169//MochiKit.Logging.logDebug("<<< [" + (new Date()).valueOf() + "] Record.deferredData");
173 170
174 return deferredResult; 171 return deferredResult;
175 }, 172 },
176 173
177 //------------------------------------------------------------------------- 174 //-------------------------------------------------------------------------
178 175
179 'exportedData': function() { 176 'exportedData': function() {
180 var result; 177 var result;
181 178
182 result = {}; 179 result = {};
183 result['label'] = this.label(); 180 result['label'] = this.label();
184 result['data'] = this.serializedData(); 181 result['data'] = this.serializedData();
185 result['currentVersion'] = this.currentVersion().serializedData(); 182 result['currentVersion'] = this.currentVersion().serializedData();
186 result['currentVersion']['reference'] = this.currentVersion().reference(); 183 result['currentVersion']['reference'] = this.currentVersion().reference();
187 // result['versions'] = MochiKit.Base.map(MochiKit.Base.methodcaller("serializedData"), MochiKit.Base.values(this.versions())); 184 // result['versions'] = MochiKit.Base.map(MochiKit.Base.methodcaller("serializedData"), MochiKit.Base.values(this.versions()));
188 185
189 return Clipperz.Base.serializeJSON(result); 186 return Clipperz.Base.serializeJSON(result);
190 }, 187 },
191 188
192 //------------------------------------------------------------------------- 189 //-------------------------------------------------------------------------
193 190
194 'shouldLoadData': function() { 191 'shouldLoadData': function() {
195 return this._shouldLoadData; 192 return this._shouldLoadData;
196 }, 193 },
197 194
198 'setShouldLoadData': function(aValue) { 195 'setShouldLoadData': function(aValue) {
199 this._shouldLoadData = aValue; 196 this._shouldLoadData = aValue;
200 }, 197 },
201 198
202 //------------------------------------------------------------------------- 199 //-------------------------------------------------------------------------
203 200
204 'shouldDecryptData': function() { 201 'shouldDecryptData': function() {
205 return this._shouldDecryptData; 202 return this._shouldDecryptData;
206 }, 203 },
207 204
208 'setShouldDecryptData': function(aValue) { 205 'setShouldDecryptData': function(aValue) {
209 this._shouldDecryptData = aValue; 206 this._shouldDecryptData = aValue;
210 }, 207 },
211 208
212 //------------------------------------------------------------------------- 209 //-------------------------------------------------------------------------
213 210
214 'shouldProcessData': function() { 211 'shouldProcessData': function() {
215 return this._shouldProcessData; 212 return this._shouldProcessData;
216 }, 213 },
217 214
218 'setShouldProcessData': function(aValue) { 215 'setShouldProcessData': function(aValue) {
219 this._shouldProcessData = aValue; 216 this._shouldProcessData = aValue;
220 }, 217 },
221 218
222 //------------------------------------------------------------------------- 219 //-------------------------------------------------------------------------
223 220
224 'loadData': function() { 221 'loadData': function() {
225 var result; 222 var result;
226 223
227//MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] Record.loadData - this: " + this); 224//MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] Record.loadData - this: " + this);
228 if (this.shouldLoadData()) { 225 if (this.shouldLoadData()) {
229 var deferredResult; 226 var deferredResult;
230 227
231 deferredResult = new MochiKit.Async.Deferred(); 228 deferredResult = new MochiKit.Async.Deferred();
232 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'notify', 'loadingRecordData'); 229 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'notify', 'loadingRecordData');
233 deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'getRecordDetail', {reference: this.reference()}); 230 deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'getRecordDetail', {reference: this.reference()});
234 deferredResult.addCallback(MochiKit.Base.method(this,'setServerData')); 231 deferredResult.addCallback(MochiKit.Base.method(this,'setServerData'));
235 deferredResult.callback(); 232 deferredResult.callback();
236 result = deferredResult; 233 result = deferredResult;
237 } else { 234 } else {
238 result = MochiKit.Async.succeed(this.serverData()); 235 result = MochiKit.Async.succeed(this.serverData());
239 } 236 }
240//MochiKit.Logging.logDebug("<<< [" + (new Date()).valueOf() + "] Record.loadData"); 237//MochiKit.Logging.logDebug("<<< [" + (new Date()).valueOf() + "] Record.loadData");
241 238
242 return result; 239 return result;
243 }, 240 },
244 241
245 //------------------------------------------------------------------------- 242 //-------------------------------------------------------------------------
246 243
247 'decryptData': function(anEncryptedData) { 244 'decryptData': function(anEncryptedData) {
248 var result; 245 var result;
249 246
250//MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] Record.decryptData - this: " + this + " (" + anEncryptedData + ")"); 247//MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] Record.decryptData - this: " + this + " (" + anEncryptedData + ")");
251 if (this.shouldDecryptData()) { 248 if (this.shouldDecryptData()) {
252 var deferredResult; 249 var deferredResult;
253 250
254 deferredResult = new MochiKit.Async.Deferred(); 251 deferredResult = new MochiKit.Async.Deferred();
255 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'notify', 'decryptingRecordData'); 252 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'notify', 'decryptingRecordData');
256 deferredResult.addCallback(Clipperz.PM.Crypto.deferredDecrypt, this.key(), anEncryptedData['data'], anEncryptedData['version']); 253 deferredResult.addCallback(Clipperz.PM.Crypto.deferredDecrypt, this.key(), anEncryptedData['data'], anEncryptedData['version']);
257 deferredResult.addCallback(function(anEncryptedData, someDecryptedValues) { 254 deferredResult.addCallback(function(anEncryptedData, someDecryptedValues) {
258 varresult; 255 varresult;
259 256
260 result = anEncryptedData; 257 result = anEncryptedData;
261 result['data'] = someDecryptedValues; 258 result['data'] = someDecryptedValues;
262 259
263 return result; 260 return result;
264 }, anEncryptedData); 261 }, anEncryptedData);
265 deferredResult.addCallback(MochiKit.Base.method(this, 'setDecryptedData')); 262 deferredResult.addCallback(MochiKit.Base.method(this, 'setDecryptedData'));
266 deferredResult.callback(); 263 deferredResult.callback();
267 264
268 result = deferredResult; 265 result = deferredResult;
269 } else { 266 } else {
270 result = MochiKit.Async.succeed(this.decryptedData()); 267 result = MochiKit.Async.succeed(this.decryptedData());
271 } 268 }
272//MochiKit.Logging.logDebug("<<< [" + (new Date()).valueOf() + "] Record.decryptData"); 269//MochiKit.Logging.logDebug("<<< [" + (new Date()).valueOf() + "] Record.decryptData");
273 270
274 return result; 271 return result;
275 }, 272 },
276 273
277 //------------------------------------------------------------------------- 274 //-------------------------------------------------------------------------
278 275
279 'processData': function(someValues) { 276 'processData': function(someValues) {
280//MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] Record.processData"); 277//MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] Record.processData");
281//MochiKit.Logging.logDebug("--- Record.processData: " + Clipperz.Base.serializeJSON(someValues)); 278//MochiKit.Logging.logDebug("--- Record.processData: " + Clipperz.Base.serializeJSON(someValues));
282 if (this.shouldProcessData()) { 279 if (this.shouldProcessData()) {
283 var currentVersionParameters; 280 var currentVersionParameters;
284 281
285 this.processDataToExtractLegacyValues(someValues['data']); 282 this.processDataToExtractLegacyValues(someValues['data']);
286 283
287 if (typeof(someValues['data']['notes']) != 'undefined') { 284 if (typeof(someValues['data']['notes']) != 'undefined') {
288 this.setNotes(someValues['data']['notes']); 285 this.setNotes(someValues['data']['notes']);
289 } 286 }
290 if (someValues['data']['currentVersionKey'] != null) { 287 if (someValues['data']['currentVersionKey'] != null) {
291 this.setCurrentVersionKey(someValues['data']['currentVersionKey']); 288 this.setCurrentVersionKey(someValues['data']['currentVersionKey']);
292 } else { 289 } else {
293 this.setCurrentVersionKey(this.key()); 290 this.setCurrentVersionKey(this.key());
294 } 291 }
295 292
296 currentVersionParameters = someValues['currentVersion']; 293 currentVersionParameters = someValues['currentVersion'];
297 currentVersionParameters['key'] = this.currentVersionKey(); 294 currentVersionParameters['key'] = this.currentVersionKey();
298 this.setCurrentVersion(new Clipperz.PM.DataModel.RecordVersion(this, currentVersionParameters)); 295 this.setCurrentVersion(new Clipperz.PM.DataModel.RecordVersion(this, currentVersionParameters));
299 296
300 if (someValues['data']['directLogins'] != null) { 297 if (someValues['data']['directLogins'] != null) {
301 vardirectLoginReference; 298 vardirectLoginReference;
302 299
303 for (directLoginReference in someValues['data']['directLogins']) { 300 for (directLoginReference in someValues['data']['directLogins']) {
304 var directLogin; 301 var directLogin;
305 var directLoginParameters; 302 var directLoginParameters;
306 303
307 directLoginParameters = someValues['data']['directLogins'][directLoginReference]; 304 directLoginParameters = someValues['data']['directLogins'][directLoginReference];
308 directLoginParameters.record = this; 305 directLoginParameters.record = this;
309 directLoginParameters.reference = directLoginReference; 306 directLoginParameters.reference = directLoginReference;
310 307
311 directLogin = new Clipperz.PM.DataModel.DirectLogin(directLoginParameters); 308 directLogin = new Clipperz.PM.DataModel.DirectLogin(directLoginParameters);
312 this.addDirectLogin(directLogin, true); 309 this.addDirectLogin(directLogin, true);
313 } 310 }
314 } 311 }
315 this.setShouldProcessData(false); 312 this.setShouldProcessData(false);
316 } 313 }
317 314
318 Clipperz.NotificationCenter.notify(this, 'recordDataReady'); 315 Clipperz.NotificationCenter.notify(this, 'recordDataReady');
319//MochiKit.Logging.logDebug("<<< [" + (new Date()).valueOf() + "] Record.processData"); 316//MochiKit.Logging.logDebug("<<< [" + (new Date()).valueOf() + "] Record.processData");
320//MochiKit.Logging.logDebug("<<< Record.processData"); 317//MochiKit.Logging.logDebug("<<< Record.processData");
321 318
322 return this; 319 return this;
323 }, 320 },
324 321
325 //------------------------------------------------------------------------- 322 //-------------------------------------------------------------------------
326 323
327 'processDataToExtractLegacyValues': function(someValues) { 324 'processDataToExtractLegacyValues': function(someValues) {
328//MochiKit.Logging.logDebug(">>> Record.processDataToExtractLegacyValues"); 325//MochiKit.Logging.logDebug(">>> Record.processDataToExtractLegacyValues");
329 if (someValues['data'] != null) { 326 if (someValues['data'] != null) {
330 this.setNotes(someValues['data']); 327 this.setNotes(someValues['data']);
331 } 328 }
332 329
333 if ( 330 if (
334 (typeof(someValues['loginFormData']) != "undefined") 331 (typeof(someValues['loginFormData']) != "undefined")
335 &&(typeof(someValues['loginBindings'] != "undefined")) 332 &&(typeof(someValues['loginBindings'] != "undefined"))
336 &&(someValues['loginFormData'] != "") 333 &&(someValues['loginFormData'] != "")
337 &&(someValues['loginBindings'] != "") 334 &&(someValues['loginBindings'] != "")
338 ) { 335 ) {
339 vardirectLogin; 336 vardirectLogin;
340 337
341 directLogin = new Clipperz.PM.DataModel.DirectLogin({ 338 directLogin = new Clipperz.PM.DataModel.DirectLogin({
342 record:this, 339 record:this,
343 label:this.label() + Clipperz.PM.Strings['newDirectLoginLabelSuffix'], 340 label:this.label() + Clipperz.PM.Strings['newDirectLoginLabelSuffix'],
344 reference:Clipperz.Crypto.SHA.sha256(new Clipperz.ByteArray(this.label() + 341 reference:Clipperz.Crypto.SHA.sha256(new Clipperz.ByteArray(this.label() +
345 someValues['loginFormData'] + 342 someValues['loginFormData'] +
346 someValues['loginBindings'])).toHexString().substring(2), 343 someValues['loginBindings'])).toHexString().substring(2),
347 formData:Clipperz.Base.evalJSON(someValues['loginFormData']), 344 formData:Clipperz.Base.evalJSON(someValues['loginFormData']),
348 legacyBindingData:Clipperz.Base.evalJSON(someValues['loginBindings']), 345 legacyBindingData:Clipperz.Base.evalJSON(someValues['loginBindings']),
349 bookmarkletVersion:'0.1' 346 bookmarkletVersion:'0.1'
350 }); 347 });
351 this.addDirectLogin(directLogin, true); 348 this.addDirectLogin(directLogin, true);
352 } 349 }
353//MochiKit.Logging.logDebug("<<< Record.processDataToExtractLegacyValues"); 350//MochiKit.Logging.logDebug("<<< Record.processDataToExtractLegacyValues");
354 }, 351 },
355 352
356 //------------------------------------------------------------------------- 353 //-------------------------------------------------------------------------
357 354
358 'getReadyBeforeUpdatingVersionValues': function() { 355 'getReadyBeforeUpdatingVersionValues': function() {
359 }, 356 },
360 357
361 //------------------------------------------------------------------------- 358 //-------------------------------------------------------------------------
362 359
363 'addNewField': function() { 360 'addNewField': function() {
364 varnewField; 361 varnewField;
365 362
366//MochiKit.Logging.logDebug(">>> Record.addNewField - " + this); 363//MochiKit.Logging.logDebug(">>> Record.addNewField - " + this);
367 this.getReadyBeforeUpdatingVersionValues(); 364 this.getReadyBeforeUpdatingVersionValues();
368 newField = this.currentVersion().addNewField(); 365 newField = this.currentVersion().addNewField();
369 Clipperz.NotificationCenter.notify(this, 'recordUpdated'); 366 Clipperz.NotificationCenter.notify(this, 'recordUpdated');
370//MochiKit.Logging.logDebug("<<< Record.addNewField"); 367//MochiKit.Logging.logDebug("<<< Record.addNewField");
371 368
372 return newField; 369 return newField;
373 }, 370 },
374 371
375 //------------------------------------------------------------------------- 372 //-------------------------------------------------------------------------
376 373
377 'removeField': function(aField) { 374 'removeField': function(aField) {
378 this.getReadyBeforeUpdatingVersionValues(); 375 this.getReadyBeforeUpdatingVersionValues();
379 this.currentVersion().removeField(aField); 376 this.currentVersion().removeField(aField);
380 Clipperz.NotificationCenter.notify(this, 'recordUpdated'); 377 Clipperz.NotificationCenter.notify(this, 'recordUpdated');
381 }, 378 },
382 379
383 'removeEmptyFields': function() { 380 'removeEmptyFields': function() {
384 MochiKit.Iter.forEach(MochiKit.Base.values(this.currentVersion().fields()), MochiKit.Base.bind(function(aField) { 381 MochiKit.Iter.forEach(MochiKit.Base.values(this.currentVersion().fields()), MochiKit.Base.bind(function(aField) {
385 if (aField.isEmpty()) { 382 if (aField.isEmpty()) {
386 this.removeField(aField); 383 this.removeField(aField);
387 // this.currentVersion().removeField(aField); 384 // this.currentVersion().removeField(aField);
388 } 385 }
389 }, this)); 386 }, this));
390 }, 387 },
391 388
392 //------------------------------------------------------------------------- 389 //-------------------------------------------------------------------------
393 390
394 'notes': function() { 391 'notes': function() {
395 return this._notes; 392 return this._notes;
396 }, 393 },
397 394
398 'setNotes': function(aValue) { 395 'setNotes': function(aValue) {
399 this._notes = aValue; 396 this._notes = aValue;
400 this.setHeaderNotes(null); 397 this.setHeaderNotes(null);
401 }, 398 },
402 399
403 //------------------------------------------------------------------------- 400 //-------------------------------------------------------------------------
404 401
405 'headerNotes': function() { 402 'headerNotes': function() {
406 return this._headerNotes; 403 return this._headerNotes;
407 }, 404 },
408 405
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/RecordField.js b/frontend/beta/js/Clipperz/PM/DataModel/RecordField.js
index 2063825..bca664d 100644
--- a/frontend/beta/js/Clipperz/PM/DataModel/RecordField.js
+++ b/frontend/beta/js/Clipperz/PM/DataModel/RecordField.js
@@ -1,220 +1,217 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } 28if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
32 29
33//############################################################################# 30//#############################################################################
34 31
35Clipperz.PM.DataModel.RecordField = function(args) { 32Clipperz.PM.DataModel.RecordField = function(args) {
36 args = args || {}; 33 args = args || {};
37 34
38 this._recordVersion = args.recordVersion || null; 35 this._recordVersion = args.recordVersion || null;
39 this._key = args.key || Clipperz.PM.Crypto.randomKey(); 36 this._key = args.key || Clipperz.PM.Crypto.randomKey();
40 this.setLabel(args.label || ''); 37 this.setLabel(args.label || '');
41 this.setValue(args.value || ''); 38 this.setValue(args.value || '');
42 this.setType(args.type || 'TXT'); //valid types: 'TXT', 'PWD', 'URL', 'DATE', 'ADDR', 'CHECK', 'RADIO', ('NOTE' probably not), ... 39 this.setType(args.type || 'TXT'); //valid types: 'TXT', 'PWD', 'URL', 'DATE', 'ADDR', 'CHECK', 'RADIO', ('NOTE' probably not), ...
43 this._hidden = args.hidden || (args.type == 'PWD') || false; 40 this._hidden = args.hidden || (args.type == 'PWD') || false;
44 41
45 return this; 42 return this;
46} 43}
47 44
48Clipperz.PM.DataModel.RecordField.prototype = MochiKit.Base.update(null, { 45Clipperz.PM.DataModel.RecordField.prototype = MochiKit.Base.update(null, {
49 46
50 'toString': function() { 47 'toString': function() {
51 return "Clipperz.PM.DataModel.RecordField - " + this.label() + " (" + this.key() + ")"; 48 return "Clipperz.PM.DataModel.RecordField - " + this.label() + " (" + this.key() + ")";
52 }, 49 },
53 50
54 //------------------------------------------------------------------------- 51 //-------------------------------------------------------------------------
55 52
56 'recordVersion': function() { 53 'recordVersion': function() {
57 return this._recordVersion; 54 return this._recordVersion;
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 'label': function() { 65 'label': function() {
69 return this._label; 66 return this._label;
70 }, 67 },
71 68
72 'setLabel': function(aValue) { 69 'setLabel': function(aValue) {
73 this._label = aValue; 70 this._label = aValue;
74 }, 71 },
75 72
76 //------------------------------------------------------------------------- 73 //-------------------------------------------------------------------------
77 74
78 'value': function() { 75 'value': function() {
79 return this._value; 76 return this._value;
80 }, 77 },
81 78
82 'setValue': function(aValue) { 79 'setValue': function(aValue) {
83 this._value = aValue; 80 this._value = aValue;
84 }, 81 },
85 82
86 //------------------------------------------------------------------------- 83 //-------------------------------------------------------------------------
87 84
88 'type': function() { 85 'type': function() {
89 return this._type; 86 return this._type;
90 }, 87 },
91 88
92 'setType': function(aValue) { 89 'setType': function(aValue) {
93 this._type = aValue; 90 this._type = aValue;
94 91
95 if (aValue == 'PWD') { 92 if (aValue == 'PWD') {
96 this.setHidden(true); 93 this.setHidden(true);
97 } else { 94 } else {
98 this.setHidden(false); 95 this.setHidden(false);
99 } 96 }
100 }, 97 },
101 98
102 //------------------------------------------------------------------------- 99 //-------------------------------------------------------------------------
103 100
104 'serializeData': function() { 101 'serializeData': function() {
105 var result; 102 var result;
106 103
107//MochiKit.Logging.logDebug(">>> RecordField.serializeData - " + this); 104//MochiKit.Logging.logDebug(">>> RecordField.serializeData - " + this);
108 result = { 105 result = {
109 label: this.label(), 106 label: this.label(),
110 value:this.value(), 107 value:this.value(),
111 type: this.type(), 108 type: this.type(),
112 hidden: this.hidden() 109 hidden: this.hidden()
113 }; 110 };
114//MochiKit.Logging.logDebug("<<< RecordField.serializeData"); 111//MochiKit.Logging.logDebug("<<< RecordField.serializeData");
115 112
116 return result; 113 return result;
117 }, 114 },
118 115
119 //------------------------------------------------------------------------- 116 //-------------------------------------------------------------------------
120 117
121 'typeShortDescription': function() { 118 'typeShortDescription': function() {
122 // return Clipperz.PM.DataModel.RecordField.TypeDescriptions[this.type()]['shortDescription']; 119 // return Clipperz.PM.DataModel.RecordField.TypeDescriptions[this.type()]['shortDescription'];
123 return Clipperz.PM.Strings['recordFieldTypologies'][this.type()]['shortDescription']; 120 return Clipperz.PM.Strings['recordFieldTypologies'][this.type()]['shortDescription'];
124 }, 121 },
125 122
126 //------------------------------------------------------------------------- 123 //-------------------------------------------------------------------------
127 124
128 'hidden': function() { 125 'hidden': function() {
129 return this._hidden; 126 return this._hidden;
130 }, 127 },
131 128
132 'setHidden': function(aValue) { 129 'setHidden': function(aValue) {
133 this._hidden = aValue; 130 this._hidden = aValue;
134 }, 131 },
135 132
136 //------------------------------------------------------------------------- 133 //-------------------------------------------------------------------------
137 134
138 'clone': function(aRecordVersion) { 135 'clone': function(aRecordVersion) {
139 var result; 136 var result;
140 137
141 result = new Clipperz.PM.DataModel.RecordField({ 138 result = new Clipperz.PM.DataModel.RecordField({
142 recordVersion:aRecordVersion, 139 recordVersion:aRecordVersion,
143 label:this.label(), 140 label:this.label(),
144 value:this.value(), 141 value:this.value(),
145 type:this.type(), 142 type:this.type(),
146 hidden:this.hidden() 143 hidden:this.hidden()
147 }); 144 });
148 145
149 return result; 146 return result;
150 }, 147 },
151 148
152 //------------------------------------------------------------------------- 149 //-------------------------------------------------------------------------
153 150
154 'isEmpty': function() { 151 'isEmpty': function() {
155 var result; 152 var result;
156 153
157 if ((this.label() == "") && (this.value() == "") && (this.type() == 'TXT')) { 154 if ((this.label() == "") && (this.value() == "") && (this.type() == 'TXT')) {
158 result = true; 155 result = true;
159 } else { 156 } else {
160 result = false; 157 result = false;
161 } 158 }
162 159
163 return result; 160 return result;
164 }, 161 },
165 162
166 //------------------------------------------------------------------------- 163 //-------------------------------------------------------------------------
167 __syntaxFix__: "syntax fix" 164 __syntaxFix__: "syntax fix"
168 165
169}); 166});
170 167
171//############################################################################# 168//#############################################################################
172/* 169/*
173Clipperz.PM.DataModel.RecordField.TypeDescriptions = { 170Clipperz.PM.DataModel.RecordField.TypeDescriptions = {
174 'TXT': { 171 'TXT': {
175 description: 'simple text field', 172 description: 'simple text field',
176 shortDescription: 'txt' 173 shortDescription: 'txt'
177 }, 174 },
178 'PWD': { 175 'PWD': {
179 description: 'simple text field, with default status set to hidden', 176 description: 'simple text field, with default status set to hidden',
180 shortDescription: 'pwd' 177 shortDescription: 'pwd'
181 }, 178 },
182 'URL': { 179 'URL': {
183 description: 'simple text field in edit mode, that became an active url in view mode', 180 description: 'simple text field in edit mode, that became an active url in view mode',
184 shortDescription: 'url' 181 shortDescription: 'url'
185 }, 182 },
186 'DATE': { 183 'DATE': {
187 description: 'a value set with a calendar helper', 184 description: 'a value set with a calendar helper',
188 shortDescription: 'date' 185 shortDescription: 'date'
189 }, 186 },
190 'ADDR': { 187 'ADDR': {
191 description: 'just like the URL, but the active link points to Google Maps (or similar service) passing the address value as argument', 188 description: 'just like the URL, but the active link points to Google Maps (or similar service) passing the address value as argument',
192 shortDescription: 'addr' 189 shortDescription: 'addr'
193 }, 190 },
194 'CHECK': { 191 'CHECK': {
195 description: 'check description', 192 description: 'check description',
196 shortDescription: 'check' 193 shortDescription: 'check'
197 }, 194 },
198 'RADIO': { 195 'RADIO': {
199 description: 'radio description', 196 description: 'radio description',
200 shortDescription: 'radio' 197 shortDescription: 'radio'
201 }, 198 },
202 'SELECT': { 199 'SELECT': {
203 description: 'select description', 200 description: 'select description',
204 shortDescription: 'select' 201 shortDescription: 'select'
205 } 202 }
206 203
207 //'NOTE': { 204 //'NOTE': {
208 // description: 'a simple text field, but with a bigger component dimension; possibly with "smart edit components"', 205 // description: 'a simple text field, but with a bigger component dimension; possibly with "smart edit components"',
209 // shortDescription: 'note' 206 // shortDescription: 'note'
210 //} 207 //}
211}; 208};
212 209
213Clipperz.PM.DataModel.RecordField.InputTypeToRecordFieldType = { 210Clipperz.PM.DataModel.RecordField.InputTypeToRecordFieldType = {
214 'text': 'TXT', 211 'text': 'TXT',
215 'password': 'PWD', 212 'password': 'PWD',
216 'checkbox': 'CHECK', 213 'checkbox': 'CHECK',
217 'radio': 'RADIO', 214 'radio': 'RADIO',
218 'select': 'SELECT' 215 'select': 'SELECT'
219}; 216};
220*/ 217*/
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/RecordVersion.js b/frontend/beta/js/Clipperz/PM/DataModel/RecordVersion.js
index d2b3e12..fc4a45c 100644
--- a/frontend/beta/js/Clipperz/PM/DataModel/RecordVersion.js
+++ b/frontend/beta/js/Clipperz/PM/DataModel/RecordVersion.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } 28if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
32 29
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.DataModel.RecordVersion = function(aRecord, args) { 33Clipperz.PM.DataModel.RecordVersion = function(aRecord, args) {
37 args = args || {}; 34 args = args || {};
38 35
39 this._record = aRecord; 36 this._record = aRecord;
40 37
41 this._reference = args.reference || Clipperz.PM.Crypto.randomKey(); 38 this._reference = args.reference || Clipperz.PM.Crypto.randomKey();
42 this._version = args.version || Clipperz.PM.Crypto.encryptingFunctions.currentVersion; 39 this._version = args.version || Clipperz.PM.Crypto.encryptingFunctions.currentVersion;
43 this._key = args.key || Clipperz.PM.Crypto.randomKey();; 40 this._key = args.key || Clipperz.PM.Crypto.randomKey();;
44 41
45 this._previousVersion = args.previousVersion || null; 42 this._previousVersion = args.previousVersion || null;
46 this._previousVersionKey = args.previousVersionKey || null; 43 this._previousVersionKey = args.previousVersionKey || null;
47 44
48 this.setIsBrandNew(args.reference == null); 45 this.setIsBrandNew(args.reference == null);
49 46
50 if (this.isBrandNew()) { 47 if (this.isBrandNew()) {
51 this._fields = {}; 48 this._fields = {};
52 49
53 this.setShouldLoadData(false); 50 this.setShouldLoadData(false);
54 this.setShouldDecryptData(false); 51 this.setShouldDecryptData(false);
55 this.setShouldProcessData(false); 52 this.setShouldProcessData(false);
56 } else { 53 } else {
57 if (typeof(args.fields) != 'undefined') { 54 if (typeof(args.fields) != 'undefined') {
58 this.processFieldData(args.fields); 55 this.processFieldData(args.fields);
59 56
60 this.setShouldLoadData(false); 57 this.setShouldLoadData(false);
61 this.setShouldDecryptData(false); 58 this.setShouldDecryptData(false);
62 this.setShouldProcessData(false); 59 this.setShouldProcessData(false);
63 } else { 60 } else {
64 if (typeof(args.data) != 'undefined') { 61 if (typeof(args.data) != 'undefined') {
65 this.setShouldLoadData(false); 62 this.setShouldLoadData(false);
66 } else { 63 } else {
67 this.setShouldLoadData(true); 64 this.setShouldLoadData(true);
68 } 65 }
69 this.setShouldDecryptData(true); 66 this.setShouldDecryptData(true);
70 this.setShouldProcessData(true); 67 this.setShouldProcessData(true);
71 } 68 }
72 } 69 }
73 70
74 this._serverData = args.data; 71 this._serverData = args.data;
75 this._decryptedData = null; 72 this._decryptedData = null;
76 73
77 return this; 74 return this;
78} 75}
79 76
80Clipperz.PM.DataModel.RecordVersion.prototype = MochiKit.Base.update(null, { 77Clipperz.PM.DataModel.RecordVersion.prototype = MochiKit.Base.update(null, {
81 78
82 'toString': function() { 79 'toString': function() {
83 return "RecordVersion"; 80 return "RecordVersion";
84 }, 81 },
85 82
86 //------------------------------------------------------------------------- 83 //-------------------------------------------------------------------------
87 84
88 'record': function() { 85 'record': function() {
89 return this._record; 86 return this._record;
90 }, 87 },
91 88
92 //------------------------------------------------------------------------- 89 //-------------------------------------------------------------------------
93 90
94 'reference': function() { 91 'reference': function() {
95 return this._reference; 92 return this._reference;
96 }, 93 },
97 94
98 'setReference': function(aValue) { 95 'setReference': function(aValue) {
99 this._reference = aValue; 96 this._reference = aValue;
100 }, 97 },
101 98
102 //------------------------------------------------------------------------- 99 //-------------------------------------------------------------------------
103 100
104 'key': function() { 101 'key': function() {
105//MochiKit.Logging.logDebug(">>> RecordVersion.key"); 102//MochiKit.Logging.logDebug(">>> RecordVersion.key");
106//MochiKit.Logging.logDebug("--- RecordVersion.key - " + this._key); 103//MochiKit.Logging.logDebug("--- RecordVersion.key - " + this._key);
107 return this._key; 104 return this._key;
108 }, 105 },
109 106
110 'setKey': function(aValue) { 107 'setKey': function(aValue) {
111 this._key = aValue; 108 this._key = aValue;
112 }, 109 },
113 110
114 //------------------------------------------------------------------------- 111 //-------------------------------------------------------------------------
115 112
116 'serverData': function() { 113 'serverData': function() {
117 return this._serverData; 114 return this._serverData;
118 }, 115 },
119 116
120 'setServerData': function(aValue) { 117 'setServerData': function(aValue) {
121 this._serverData = aValue; 118 this._serverData = aValue;
122 this.setShouldLoadData(false); 119 this.setShouldLoadData(false);
123 return aValue; 120 return aValue;
124 }, 121 },
125 122
126 //------------------------------------------------------------------------- 123 //-------------------------------------------------------------------------
127 124
128 'decryptedData': function() { 125 'decryptedData': function() {
129//MochiKit.Logging.logDebug(">>> RecordVersion.decryptedData: " + (this._decryptedData ? Clipperz.Base.serializeJSON(aValue) : "null")); 126//MochiKit.Logging.logDebug(">>> RecordVersion.decryptedData: " + (this._decryptedData ? Clipperz.Base.serializeJSON(aValue) : "null"));
130 return this._decryptedData; 127 return this._decryptedData;
131 }, 128 },
132 129
133 'setDecryptedData': function(aValue) { 130 'setDecryptedData': function(aValue) {
134//MochiKit.Logging.logDebug(">>> RecordVersion.setDecryptedData: " + Clipperz.Base.serializeJSON(aValue)); 131//MochiKit.Logging.logDebug(">>> RecordVersion.setDecryptedData: " + Clipperz.Base.serializeJSON(aValue));
135 this._decryptedData = aValue; 132 this._decryptedData = aValue;
136 this.setShouldDecryptData(false); 133 this.setShouldDecryptData(false);
137 return aValue; 134 return aValue;
138 }, 135 },
139 136
140 //------------------------------------------------------------------------- 137 //-------------------------------------------------------------------------
141 138
142 'version': function() { 139 'version': function() {
143 return this._version; 140 return this._version;
144 }, 141 },
145 142
146 //------------------------------------------------------------------------- 143 //-------------------------------------------------------------------------
147 144
148 'isBrandNew': function() { 145 'isBrandNew': function() {
149 return this._isBrandNew; 146 return this._isBrandNew;
150 }, 147 },
151 148
152 'setIsBrandNew': function(aValue) { 149 'setIsBrandNew': function(aValue) {
153 this._isBrandNew = aValue; 150 this._isBrandNew = aValue;
154 }, 151 },
155 152
156 //------------------------------------------------------------------------- 153 //-------------------------------------------------------------------------
157 154
158 'fields': function() { 155 'fields': function() {
159 return this._fields; 156 return this._fields;
160 }, 157 },
161 158
162 'addField': function(aField) { 159 'addField': function(aField) {
163 this.fields()[aField.key()] = aField; 160 this.fields()[aField.key()] = aField;
164 }, 161 },
165 162
166 'addNewField': function() { 163 'addNewField': function() {
167 varnewRecordField; 164 varnewRecordField;
168 165
169 newRecordField = new Clipperz.PM.DataModel.RecordField({recordVersion:this}); 166 newRecordField = new Clipperz.PM.DataModel.RecordField({recordVersion:this});
170 this.addField(newRecordField); 167 this.addField(newRecordField);
171 168
172 return newRecordField; 169 return newRecordField;
173 }, 170 },
174 171
175 'fieldWithName': function(aValue) { 172 'fieldWithName': function(aValue) {
176 varresult; 173 varresult;
177 var fieldValues; 174 var fieldValues;
178 var i,c; 175 var i,c;
179 176
180 result = null; 177 result = null;
181 fieldValues = MochiKit.Base.values(this.fields()); 178 fieldValues = MochiKit.Base.values(this.fields());
182 c = fieldValues.length; 179 c = fieldValues.length;
183 for (i=0; (i<c) && (result == null); i++) { 180 for (i=0; (i<c) && (result == null); i++) {
184 varcurrentField; 181 varcurrentField;
185 182
186 currentField = fieldValues[i]; 183 currentField = fieldValues[i];
187 if (currentField.label() == aValue) { 184 if (currentField.label() == aValue) {
188 result = currentField; 185 result = currentField;
189 } 186 }
190 } 187 }
191 188
192 return result; 189 return result;
193 }, 190 },
194 191
195 //------------------------------------------------------------------------- 192 //-------------------------------------------------------------------------
196 193
197 'shouldLoadData': function() { 194 'shouldLoadData': function() {
198 return this._shouldLoadData; 195 return this._shouldLoadData;
199 }, 196 },
200 197
201 'setShouldLoadData': function(aValue) { 198 'setShouldLoadData': function(aValue) {
202 this._shouldLoadData = aValue; 199 this._shouldLoadData = aValue;
203 }, 200 },
204 201
205 //------------------------------------------------------------------------- 202 //-------------------------------------------------------------------------
206 203
207 'shouldDecryptData': function() { 204 'shouldDecryptData': function() {
208 return this._shouldDecryptData; 205 return this._shouldDecryptData;
209 }, 206 },
210 207
211 'setShouldDecryptData': function(aValue) { 208 'setShouldDecryptData': function(aValue) {
212 this._shouldDecryptData = aValue; 209 this._shouldDecryptData = aValue;
213 }, 210 },
214 211
215 //------------------------------------------------------------------------- 212 //-------------------------------------------------------------------------
216 213
217 'shouldProcessData': function() { 214 'shouldProcessData': function() {
218 return this._shouldProcessData; 215 return this._shouldProcessData;
219 }, 216 },
220 217
221 'setShouldProcessData': function(aValue) { 218 'setShouldProcessData': function(aValue) {
222 this._shouldProcessData = aValue; 219 this._shouldProcessData = aValue;
223 }, 220 },
224 221
225 //------------------------------------------------------------------------- 222 //-------------------------------------------------------------------------
226 223
227 'deferredData': function() { 224 'deferredData': function() {
228 var deferredResult; 225 var deferredResult;
229 226
230//MochiKit.Logging.logDebug(">>> RecordVersion.deferredData - this: " + this); 227//MochiKit.Logging.logDebug(">>> RecordVersion.deferredData - this: " + this);
231 deferredResult = new MochiKit.Async.Deferred(); 228 deferredResult = new MochiKit.Async.Deferred();
232 deferredResult.addCallback(MochiKit.Base.method(this, 'loadData')); 229 deferredResult.addCallback(MochiKit.Base.method(this, 'loadData'));
233 deferredResult.addCallback(MochiKit.Base.method(this, 'decryptData')); 230 deferredResult.addCallback(MochiKit.Base.method(this, 'decryptData'));
234 deferredResult.addCallback(MochiKit.Base.method(this, 'processData')); 231 deferredResult.addCallback(MochiKit.Base.method(this, 'processData'));
235 deferredResult.callback(); 232 deferredResult.callback();
236//MochiKit.Logging.logDebug("<<< RecordVersion.deferredData"); 233//MochiKit.Logging.logDebug("<<< RecordVersion.deferredData");
237 234
238 return deferredResult; 235 return deferredResult;
239 }, 236 },
240 237
241 //------------------------------------------------------------------------- 238 //-------------------------------------------------------------------------
242 239
243 'loadData': function() { 240 'loadData': function() {
244 var result; 241 var result;
245 242
246//MochiKit.Logging.logDebug(">>> RecordVersion.loadData - this: " + this); 243//MochiKit.Logging.logDebug(">>> RecordVersion.loadData - this: " + this);
247 if (this.shouldLoadData()) { 244 if (this.shouldLoadData()) {
248 var deferredResult; 245 var deferredResult;
249 246
250 alert("ERROR: this should have not happened yet!"); 247 alert("ERROR: this should have not happened yet!");
251//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 1"); 248//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 1");
252 deferredResult = new MochiKit.Async.Deferred(); 249 deferredResult = new MochiKit.Async.Deferred();
253//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 2"); 250//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 2");
254 deferredResult.addCallback(MochiKit.Base.method(this, 'notify'), 'loadingRecordVersionData'); 251 deferredResult.addCallback(MochiKit.Base.method(this, 'notify'), 'loadingRecordVersionData');
255//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 3"); 252//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 3");
256 deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'getRecordVersionDetail', {reference: this.reference()}); 253 deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'getRecordVersionDetail', {reference: this.reference()});
257//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 4"); 254//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 4");
258 deferredResult.addCallback(MochiKit.Base.method(this, 'setServerData')); 255 deferredResult.addCallback(MochiKit.Base.method(this, 'setServerData'));
259//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 5"); 256//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 5");
260 deferredResult.callback(); 257 deferredResult.callback();
261//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 6"); 258//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 6");
262 result = deferredResult; 259 result = deferredResult;
263//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 7"); 260//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 7");
264 } else { 261 } else {
265//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 8"); 262//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 8");
266 result = MochiKit.Async.succeed(this.serverData()); 263 result = MochiKit.Async.succeed(this.serverData());
267//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 9"); 264//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 9");
268 } 265 }
269//MochiKit.Logging.logDebug("<<< RecordVersion.loadData"); 266//MochiKit.Logging.logDebug("<<< RecordVersion.loadData");
270 267
271 return result; 268 return result;
272 }, 269 },
273 270
274 //------------------------------------------------------------------------- 271 //-------------------------------------------------------------------------
275 272
276 'decryptData': function(anEncryptedData) { 273 'decryptData': function(anEncryptedData) {
277 var result; 274 var result;
278 275
279//MochiKit.Logging.logDebug(">>> RecordVersion.decryptData - this: " + this + " (" + anEncryptedData + ")"); 276//MochiKit.Logging.logDebug(">>> RecordVersion.decryptData - this: " + this + " (" + anEncryptedData + ")");
280 if (this.shouldDecryptData()) { 277 if (this.shouldDecryptData()) {
281 var deferredResult; 278 var deferredResult;
282 279
283//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 1"); 280//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 1");
284 deferredResult = new MochiKit.Async.Deferred(); 281 deferredResult = new MochiKit.Async.Deferred();
285//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 2"); 282//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 2");
286//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RecordVersion.decryptData 1: " + res); return res;}); 283//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RecordVersion.decryptData 1: " + res); return res;});
287 deferredResult.addCallback(MochiKit.Base.method(this, 'notify'), 'decryptingRecordVersionData'); 284 deferredResult.addCallback(MochiKit.Base.method(this, 'notify'), 'decryptingRecordVersionData');
288//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 3"); 285//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 3");
289//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RecordVersion.decryptData 2: " + res); return res;}); 286//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RecordVersion.decryptData 2: " + res); return res;});
290 deferredResult.addCallback(Clipperz.PM.Crypto.deferredDecrypt, this.key(), anEncryptedData, this.version()); 287 deferredResult.addCallback(Clipperz.PM.Crypto.deferredDecrypt, this.key(), anEncryptedData, this.version());
291//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 4"); 288//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 4");
292//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RecordVersion.decryptData 3: " + res); return res;}); 289//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RecordVersion.decryptData 3: " + res); return res;});
293//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 5"); 290//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 5");
294//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RecordVersion.decryptData 4: " + res); return res;}); 291//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RecordVersion.decryptData 4: " + res); return res;});
295 deferredResult.addCallback(MochiKit.Base.method(this, 'setDecryptedData')); 292 deferredResult.addCallback(MochiKit.Base.method(this, 'setDecryptedData'));
296//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 6"); 293//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 6");
297//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RecordVersion.decryptData 5: " + res); return res;}); 294//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RecordVersion.decryptData 5: " + res); return res;});
298 deferredResult.callback(); 295 deferredResult.callback();
299//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 7"); 296//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 7");
300 result = deferredResult; 297 result = deferredResult;
301//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 8"); 298//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 8");
302 } else { 299 } else {
303//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 9"); 300//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 9");
304 result = MochiKit.Async.succeed(this.decryptedData()); 301 result = MochiKit.Async.succeed(this.decryptedData());
305//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 10"); 302//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 10");
306 } 303 }
307//MochiKit.Logging.logDebug("<<< RecordVersion.decryptData"); 304//MochiKit.Logging.logDebug("<<< RecordVersion.decryptData");
308 305
309 return result; 306 return result;
310 }, 307 },
311 308
312 //------------------------------------------------------------------------- 309 //-------------------------------------------------------------------------
313 310
314 'processFieldData': function(someValues) { 311 'processFieldData': function(someValues) {
315 var fieldValues; 312 var fieldValues;
316 313
317 this._fields = {}; 314 this._fields = {};
318 315
319 if (typeof(someValues) == 'undefined') { 316 if (typeof(someValues) == 'undefined') {
320 fieldValues = {}; 317 fieldValues = {};
321 } else { 318 } else {
322 fieldValues = someValues; 319 fieldValues = someValues;
323 } 320 }
324 321
325 if (fieldValues.constructor == Array) { 322 if (fieldValues.constructor == Array) {
326 var i, c; 323 var i, c;
327 c = fieldValues.length; 324 c = fieldValues.length;
328 for (i=0; i<c; i++) { 325 for (i=0; i<c; i++) {
329 var newRecordField; 326 var newRecordField;
330 var currentFieldValues; 327 var currentFieldValues;
331 328
332 currentFieldValues = fieldValues[i]; 329 currentFieldValues = fieldValues[i];
333 currentFieldValues['recordVersion'] = this; 330 currentFieldValues['recordVersion'] = this;
334 newRecordField = new Clipperz.PM.DataModel.RecordField(currentFieldValues); 331 newRecordField = new Clipperz.PM.DataModel.RecordField(currentFieldValues);
335 this._fields[newRecordField.key()] = newRecordField; 332 this._fields[newRecordField.key()] = newRecordField;
336 } 333 }
337 334
338 } else { 335 } else {
339 var fieldKey; 336 var fieldKey;
340 337
341 for (fieldKey in fieldValues) { 338 for (fieldKey in fieldValues) {
342 var newRecordField; 339 var newRecordField;
343 var currentFieldValues; 340 var currentFieldValues;
344 341
345 currentFieldValues = fieldValues[fieldKey]; 342 currentFieldValues = fieldValues[fieldKey];
346 currentFieldValues['key'] = fieldKey; 343 currentFieldValues['key'] = fieldKey;
347 currentFieldValues['recordVersion'] = this; 344 currentFieldValues['recordVersion'] = this;
348 newRecordField = new Clipperz.PM.DataModel.RecordField(currentFieldValues); 345 newRecordField = new Clipperz.PM.DataModel.RecordField(currentFieldValues);
349 this._fields[fieldKey] = newRecordField; 346 this._fields[fieldKey] = newRecordField;
350 } 347 }
351 } 348 }
352 349
353 }, 350 },
354 351
355 'processData': function(someValues) { 352 'processData': function(someValues) {
356 if (this.shouldProcessData()) { 353 if (this.shouldProcessData()) {
357 this.processFieldData(someValues.fields); 354 this.processFieldData(someValues.fields);
358 this.setShouldProcessData(false); 355 this.setShouldProcessData(false);
359 } 356 }
360 357
361 this.notify('recordVersionDataReady'); 358 this.notify('recordVersionDataReady');
362 359
363 return this; 360 return this;
364 }, 361 },
365 362
366 //------------------------------------------------------------------------- 363 //-------------------------------------------------------------------------
367 364
368 'notify': function(aValue) { 365 'notify': function(aValue) {
369 Clipperz.NotificationCenter.notify(this, aValue); 366 Clipperz.NotificationCenter.notify(this, aValue);
370 }, 367 },
371 368
372 //------------------------------------------------------------------------- 369 //-------------------------------------------------------------------------
373 370
374 'removeField': function(aField) { 371 'removeField': function(aField) {
375 delete this.fields()[aField.key()]; 372 delete this.fields()[aField.key()];
376 }, 373 },
377 374
378 //------------------------------------------------------------------------- 375 //-------------------------------------------------------------------------
379 376
380 'previousVersion': function() { 377 'previousVersion': function() {
381 return this._previousVersion; 378 return this._previousVersion;
382 }, 379 },
383 380
384 'setPreviousVersion': function(aValue) { 381 'setPreviousVersion': function(aValue) {
385 this._previousVersion = aValue; 382 this._previousVersion = aValue;
386 }, 383 },
387 384
388 //------------------------------------------------------------------------- 385 //-------------------------------------------------------------------------
389 386
390 'previousVersionKey': function() { 387 'previousVersionKey': function() {
391 return this._previousVersionKey; 388 return this._previousVersionKey;
392 }, 389 },
393 390
394 'setPreviousVersionKey': function(aValue) { 391 'setPreviousVersionKey': function(aValue) {
395 this._previousVersionKey = aValue; 392 this._previousVersionKey = aValue;
396 }, 393 },
397 394
398 //------------------------------------------------------------------------- 395 //-------------------------------------------------------------------------
399 396
400 'serializedData': function() { 397 'serializedData': function() {
401 var result; 398 var result;
402 varfieldKey; 399 varfieldKey;
403 400
404//MochiKit.Logging.logDebug(">>> RecordVersion.serializedData"); 401//MochiKit.Logging.logDebug(">>> RecordVersion.serializedData");
405 result = { 402 result = {
406 fields: {} 403 fields: {}
407 }; 404 };
408//MochiKit.Logging.logDebug("--- RecordVersion.serializedData - 1"); 405//MochiKit.Logging.logDebug("--- RecordVersion.serializedData - 1");
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/Statistics.js b/frontend/beta/js/Clipperz/PM/DataModel/Statistics.js
index fb5eb01..3d53adf 100644
--- a/frontend/beta/js/Clipperz/PM/DataModel/Statistics.js
+++ b/frontend/beta/js/Clipperz/PM/DataModel/Statistics.js
@@ -1,133 +1,130 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } 28if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
32 29
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.DataModel.Statistics = function(args) { 33Clipperz.PM.DataModel.Statistics = function(args) {
37 args = args || {}; 34 args = args || {};
38 35
39 this._user = args.user; 36 this._user = args.user;
40 this._data = args.data || null; 37 this._data = args.data || null;
41 38
42 return this; 39 return this;
43} 40}
44 41
45Clipperz.PM.DataModel.Statistics.prototype = MochiKit.Base.update(null, { 42Clipperz.PM.DataModel.Statistics.prototype = MochiKit.Base.update(null, {
46 43
47 //------------------------------------------------------------------------- 44 //-------------------------------------------------------------------------
48 45
49 'decrypt': function(aVersion, someEncryptedData) { 46 'decrypt': function(aVersion, someEncryptedData) {
50 var deferredResult; 47 var deferredResult;
51 48
52//MochiKit.Logging.logDebug(">>> Statistics.decrypt"); 49//MochiKit.Logging.logDebug(">>> Statistics.decrypt");
53 if (someEncryptedData == Clipperz.PM.Crypto.nullValue) { 50 if (someEncryptedData == Clipperz.PM.Crypto.nullValue) {
54 this.setData({}); 51 this.setData({});
55 deferredResult = MochiKit.Async.succeed(this.data()); 52 deferredResult = MochiKit.Async.succeed(this.data());
56 } else { 53 } else {
57 varstatistic; 54 varstatistic;
58 var user; 55 var user;
59 56
60 statistic = this; 57 statistic = this;
61 user = this.user(); 58 user = this.user();
62 deferredResult = new MochiKit.Async.Deferred(); 59 deferredResult = new MochiKit.Async.Deferred();
63//deferredResult.addCallback(function() { console.time("Statistics.decrypt.deferredDecrypt")}); 60//deferredResult.addCallback(function() { console.time("Statistics.decrypt.deferredDecrypt")});
64 deferredResult.addCallback(Clipperz.PM.Crypto.deferredDecrypt, user.passphrase(), someEncryptedData, aVersion); 61 deferredResult.addCallback(Clipperz.PM.Crypto.deferredDecrypt, user.passphrase(), someEncryptedData, aVersion);
65//deferredResult.addCallback(function() { console.timeEnd("Statistics.decrypt.deferredDecrypt")}); 62//deferredResult.addCallback(function() { console.timeEnd("Statistics.decrypt.deferredDecrypt")});
66//deferredResult.addCallback(function() { console.time("Statistics.decrypt.setup")}); 63//deferredResult.addCallback(function() { console.time("Statistics.decrypt.setup")});
67 deferredResult.addCallbacks( 64 deferredResult.addCallbacks(
68 MochiKit.Base.partial(function (aStatistic, someData) { 65 MochiKit.Base.partial(function (aStatistic, someData) {
69 aStatistic.setData(someData); 66 aStatistic.setData(someData);
70 return aStatistic.data(); 67 return aStatistic.data();
71 }, statistic), 68 }, statistic),
72 MochiKit.Base.partial(function (aStatistic) { 69 MochiKit.Base.partial(function (aStatistic) {
73 MochiKit.Logging.logWarning("resetting user statistics due to an error while decrypting stored data"); 70 MochiKit.Logging.logWarning("resetting user statistics due to an error while decrypting stored data");
74 aStatistic.setData({}); 71 aStatistic.setData({});
75 return aStatistic.data(); 72 return aStatistic.data();
76 }, statistic) 73 }, statistic)
77 ); 74 );
78//deferredResult.addCallback(function() { console.timeEnd("Statistics.decrypt.setup")}); 75//deferredResult.addCallback(function() { console.timeEnd("Statistics.decrypt.setup")});
79 76
80 deferredResult.callback(); 77 deferredResult.callback();
81 } 78 }
82//MochiKit.Logging.logDebug("<<< Statistics.decrypt"); 79//MochiKit.Logging.logDebug("<<< Statistics.decrypt");
83 80
84 return deferredResult; 81 return deferredResult;
85 }, 82 },
86 83
87 //------------------------------------------------------------------------- 84 //-------------------------------------------------------------------------
88 85
89 'user': function() { 86 'user': function() {
90 return this._user; 87 return this._user;
91 }, 88 },
92 89
93 //------------------------------------------------------------------------- 90 //-------------------------------------------------------------------------
94 91
95 'data': function() { 92 'data': function() {
96 return this._data; 93 return this._data;
97 }, 94 },
98 95
99 'setData': function(aValue) { 96 'setData': function(aValue) {
100 this._data = aValue; 97 this._data = aValue;
101 98
102 this.extractInfoFromData(aValue); 99 this.extractInfoFromData(aValue);
103 }, 100 },
104 101
105 //------------------------------------------------------------------------- 102 //-------------------------------------------------------------------------
106 103
107 'extractInfoFromData': function(someValues) { 104 'extractInfoFromData': function(someValues) {
108 105
109 }, 106 },
110 107
111 //------------------------------------------------------------------------- 108 //-------------------------------------------------------------------------
112 109
113 'encryptedData': function() { 110 'encryptedData': function() {
114 return Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion(this.user().passphrase(), this.serializedData()); 111 return Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion(this.user().passphrase(), this.serializedData());
115 }, 112 },
116 113
117 //------------------------------------------------------------------------- 114 //-------------------------------------------------------------------------
118 115
119 'serializedData': function() { 116 'serializedData': function() {
120 var result; 117 var result;
121 118
122//MochiKit.Logging.logDebug(">>> Statistics.serializedData"); 119//MochiKit.Logging.logDebug(">>> Statistics.serializedData");
123 result = {}; 120 result = {};
124//MochiKit.Logging.logDebug("<<< Statistics.serializedData"); 121//MochiKit.Logging.logDebug("<<< Statistics.serializedData");
125 122
126 return result; 123 return result;
127 }, 124 },
128 125
129 //------------------------------------------------------------------------- 126 //-------------------------------------------------------------------------
130 __syntaxFix__: "syntax fix" 127 __syntaxFix__: "syntax fix"
131 128
132}); 129});
133 130
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/User.js b/frontend/beta/js/Clipperz/PM/DataModel/User.js
index 5aaaff7..dbbe9a0 100644
--- a/frontend/beta/js/Clipperz/PM/DataModel/User.js
+++ b/frontend/beta/js/Clipperz/PM/DataModel/User.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } 28if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
32 29
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.DataModel.User = function(args) { 33Clipperz.PM.DataModel.User = function(args) {
37//MochiKit.Logging.logDebug(">>> new User"); 34//MochiKit.Logging.logDebug(">>> new User");
38 args = args || {}; 35 args = args || {};
39 36
40 this._username = args.username || null; 37 this._username = args.username || null;
41 this._passphrase = args.passphrase || null; 38 this._passphrase = args.passphrase || null;
42 39
43 this._connection = null; 40 this._connection = null;
44 this._connectionVersion = 'current'; 41 this._connectionVersion = 'current';
45 42
46 this._header = null; 43 this._header = null;
47 this._statistics = null; 44 this._statistics = null;
48 this._lock = 'new lock'; 45 this._lock = 'new lock';
49 46
50 this._preferences = null; 47 this._preferences = null;
51 this._records = {}; 48 this._records = {};
52 this._directLoginReferences = {}; 49 this._directLoginReferences = {};
53 this._oneTimePasswordManager = null; 50 this._oneTimePasswordManager = null;
54 51
55 this._isLoadingUserDetails = false; 52 this._isLoadingUserDetails = false;
56 this._loadingUserDetailsPendingQueue = []; 53 this._loadingUserDetailsPendingQueue = [];
57 54
58 this._maxNumberOfRecords = Number.MAX_VALUE; 55 this._maxNumberOfRecords = Number.MAX_VALUE;
59 56
60 this._shouldDownloadOfflineCopy = false; 57 this._shouldDownloadOfflineCopy = false;
61 58
62 this._loginInfo = null; 59 this._loginInfo = null;
63 this._loginHistory = null; 60 this._loginHistory = null;
64 61
65 this._serverData = null; 62 this._serverData = null;
66//MochiKit.Logging.logDebug("<<< new User"); 63//MochiKit.Logging.logDebug("<<< new User");
67 64
68 return this; 65 return this;
69} 66}
70 67
71Clipperz.PM.DataModel.User.prototype = MochiKit.Base.update(null, { 68Clipperz.PM.DataModel.User.prototype = MochiKit.Base.update(null, {
72 69
73 'toString': function() { 70 'toString': function() {
74 return "Clipperz.PM.DataModel.User - " + this.username(); 71 return "Clipperz.PM.DataModel.User - " + this.username();
75 }, 72 },
76 73
77 //------------------------------------------------------------------------- 74 //-------------------------------------------------------------------------
78 75
79 'username': function() { 76 'username': function() {
80 return this._username; 77 return this._username;
81 }, 78 },
82 79
83 'setUsername': function(aValue) { 80 'setUsername': function(aValue) {
84 this._username = aValue; 81 this._username = aValue;
85 }, 82 },
86 83
87 //------------------------------------------------------------------------- 84 //-------------------------------------------------------------------------
88 85
89 'passphrase': function() { 86 'passphrase': function() {
90 return this._passphrase; 87 return this._passphrase;
91 }, 88 },
92 89
93 'setPassphrase': function(aValue) { 90 'setPassphrase': function(aValue) {
94 this._passphrase = aValue; 91 this._passphrase = aValue;
95 }, 92 },
96 93
97 //------------------------------------------------------------------------- 94 //-------------------------------------------------------------------------
98 95
99 'maxNumberOfRecords': function() { 96 'maxNumberOfRecords': function() {
100 return this._maxNumberOfRecords; 97 return this._maxNumberOfRecords;
101 }, 98 },
102 99
103 'setMaxNumberOfRecords': function(aValue) { 100 'setMaxNumberOfRecords': function(aValue) {
104 this._maxNumberOfRecords = aValue; 101 this._maxNumberOfRecords = aValue;
105 }, 102 },
106 103
107 //------------------------------------------------------------------------- 104 //-------------------------------------------------------------------------
108 105
109 'errorHandler': function(anErrorString, anException) { 106 'errorHandler': function(anErrorString, anException) {
110MochiKit.Logging.logError("- User.errorHandler: " + anErrorString + " (" + anException + ")"); 107MochiKit.Logging.logError("- User.errorHandler: " + anErrorString + " (" + anException + ")");
111 }, 108 },
112 109
113 //------------------------------------------------------------------------- 110 //-------------------------------------------------------------------------
114 111
115 'connectionVersion': function() { 112 'connectionVersion': function() {
116 return this._connectionVersion; 113 return this._connectionVersion;
117 }, 114 },
118 115
119 'setConnectionVersion': function(aValue) { 116 'setConnectionVersion': function(aValue) {
120 this._connectionVersion = aValue; 117 this._connectionVersion = aValue;
121 }, 118 },
122 119
123 //------------------------------------------------------------------------- 120 //-------------------------------------------------------------------------
124 121
125 'connection': function() { 122 'connection': function() {
126 if ((this._connection == null) && (this.connectionVersion() != null) ){ 123 if ((this._connection == null) && (this.connectionVersion() != null) ){
127 this._connection = new Clipperz.PM.Crypto.communicationProtocol.versions[this.connectionVersion()]({user:this}); 124 this._connection = new Clipperz.PM.Crypto.communicationProtocol.versions[this.connectionVersion()]({user:this});
128 } 125 }
129 126
130 return this._connection; 127 return this._connection;
131 }, 128 },
132 129
133 'resetConnection': function(aValue) { 130 'resetConnection': function(aValue) {
134 this._connection = null; 131 this._connection = null;
135 }, 132 },
136 133
137 //========================================================================= 134 //=========================================================================
138 135
139 'register': function(anInvitationCode) { 136 'register': function(anInvitationCode) {
140 vardeferredResult; 137 vardeferredResult;
141 var prng; 138 var prng;
142 139
143//MochiKit.Logging.logError(">>> User.register: " + this); 140//MochiKit.Logging.logError(">>> User.register: " + this);
144 prng = Clipperz.Crypto.PRNG.defaultRandomGenerator(); 141 prng = Clipperz.Crypto.PRNG.defaultRandomGenerator();
145 142
146 deferredResult = new MochiKit.Async.Deferred() 143 deferredResult = new MochiKit.Async.Deferred()
147//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.register - 1: " + res); return res;}); 144//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.register - 1: " + res); return res;});
148 deferredResult.addCallback(MochiKit.Base.method(prng, 'deferredEntropyCollection')); 145 deferredResult.addCallback(MochiKit.Base.method(prng, 'deferredEntropyCollection'));
149//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.register - 2: " + res); return res;}); 146//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.register - 2: " + res); return res;});
150 deferredResult.addCallback(MochiKit.Base.method(this.header(), 'updateAllSections'), anInvitationCode); 147 deferredResult.addCallback(MochiKit.Base.method(this.header(), 'updateAllSections'), anInvitationCode);
151//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.register - 2.1: " + res); return res;}); 148//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.register - 2.1: " + res); return res;});
152 deferredResult.addCallback(MochiKit.Base.method(this.connection(), 'register'), anInvitationCode); 149 deferredResult.addCallback(MochiKit.Base.method(this.connection(), 'register'), anInvitationCode);
153//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.register - 3: " + res); return res;}); 150//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.register - 3: " + res); return res;});
154 deferredResult.callback(); 151 deferredResult.callback();
155//MochiKit.Logging.logError("<<< User.register"); 152//MochiKit.Logging.logError("<<< User.register");
156 153
157 return deferredResult; 154 return deferredResult;
158 }, 155 },
159 156
160 //========================================================================= 157 //=========================================================================
161 158
162 'connect': function(aValue) { 159 'connect': function(aValue) {
163 vardeferredResult; 160 vardeferredResult;
164 var prng; 161 var prng;
165 162
166 prng = Clipperz.Crypto.PRNG.defaultRandomGenerator(); 163 prng = Clipperz.Crypto.PRNG.defaultRandomGenerator();
167 164
168//MochiKit.Logging.logDebug(">>> User.connect"); 165//MochiKit.Logging.logDebug(">>> User.connect");
169 deferredResult = new MochiKit.Async.Deferred(); 166 deferredResult = new MochiKit.Async.Deferred();
170//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.1 - User.connect - 1: "/* + res*/); return res;}); 167//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.1 - User.connect - 1: "/* + res*/); return res;});
171//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 168//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
172 deferredResult.addCallback(MochiKit.Base.method(prng, 'deferredEntropyCollection')); 169 deferredResult.addCallback(MochiKit.Base.method(prng, 'deferredEntropyCollection'));
173//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.2 - User.connect - 2: "/* + res*/); return res;}); 170//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.2 - User.connect - 2: "/* + res*/); return res;});
174//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 171//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
175 deferredResult.addCallback(MochiKit.Base.method(this.connection(), 'login')); 172 deferredResult.addCallback(MochiKit.Base.method(this.connection(), 'login'));
176//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.3 - User.connect - 3: "/* + res*/); return res;}); 173//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.3 - User.connect - 3: "/* + res*/); return res;});
177//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 174//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
178 175
179 // TODO:add an addErrback call here to manage a wrong login. Any error after this point is due to some other causes. 176 // TODO:add an addErrback call here to manage a wrong login. Any error after this point is due to some other causes.
180 // possibly the same exact 'handleConnectionFallback use at the end of this same method. 177 // possibly the same exact 'handleConnectionFallback use at the end of this same method.
181 178
182 if (this.connectionVersion() != 'current') { 179 if (this.connectionVersion() != 'current') {
183 varcurrentConnection; 180 varcurrentConnection;
184 181
185 currentVersionConnection = new Clipperz.PM.Crypto.communicationProtocol.versions['current']({user:this}); 182 currentVersionConnection = new Clipperz.PM.Crypto.communicationProtocol.versions['current']({user:this});
186 183
187//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.4 - User.connect - 4: "/* + res*/); return res;}); 184//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.4 - User.connect - 4: "/* + res*/); return res;});
188//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 185//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
189 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'connection_upgrading'); 186 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'connection_upgrading');
190//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.5 - User.connect - 5: "/* + res*/); return res;}); 187//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.5 - User.connect - 5: "/* + res*/); return res;});
191//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 188//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
192 deferredResult.addCallback(MochiKit.Base.method(this.connection(), 'message'), 'upgradeUserCredentials', currentVersionConnection.serverSideUserCredentials()); 189 deferredResult.addCallback(MochiKit.Base.method(this.connection(), 'message'), 'upgradeUserCredentials', currentVersionConnection.serverSideUserCredentials());
193//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.6 - User.connect - 6: "/* + res*/); return res;}); 190//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.6 - User.connect - 6: "/* + res*/); return res;});
194//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 191//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
195 } 192 }
196 193
197//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.7 - User.connect - 7: "/* + res*/); return res;}); 194//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.7 - User.connect - 7: "/* + res*/); return res;});
198//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 195//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
199 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'userConnected', null); 196 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'userConnected', null);
200//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.8 - User.connect - 8: "/* + res*/); return res;}); 197//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.8 - User.connect - 8: "/* + res*/); return res;});
201//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 198//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
202 deferredResult.addErrback(MochiKit.Base.method(this, 'handleConnectionFallback')); 199 deferredResult.addErrback(MochiKit.Base.method(this, 'handleConnectionFallback'));
203//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.9 - User.connect - 9: "/* + res*/); return res;}); 200//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.9 - User.connect - 9: "/* + res*/); return res;});
204//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 201//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
205 202
206 deferredResult.callback(aValue); 203 deferredResult.callback(aValue);
207//MochiKit.Logging.logDebug("<<< User.connect"); 204//MochiKit.Logging.logDebug("<<< User.connect");
208 205
209 return deferredResult; 206 return deferredResult;
210 }, 207 },
211 208
212 //......................................................................... 209 //.........................................................................
213 210
214 'handleConnectionFallback': function(aValue) { 211 'handleConnectionFallback': function(aValue) {
215 var result; 212 var result;
216//MochiKit.Logging.logDebug(">>> User.handleConnectionFallback"); 213//MochiKit.Logging.logDebug(">>> User.handleConnectionFallback");
217 if (aValue instanceof MochiKit.Async.CancelledError) { 214 if (aValue instanceof MochiKit.Async.CancelledError) {
218//MochiKit.Logging.logDebug("--- User.handleConnectionFallback - operation cancelled"); 215//MochiKit.Logging.logDebug("--- User.handleConnectionFallback - operation cancelled");
219 result = aValue; 216 result = aValue;
220 } else { 217 } else {
221 218
222//MochiKit.Logging.logDebug("--- User.handleConnectionFallback - an ERROR has occurred - " + aValue); 219//MochiKit.Logging.logDebug("--- User.handleConnectionFallback - an ERROR has occurred - " + aValue);
223 this.resetConnection(); 220 this.resetConnection();
224 this.setConnectionVersion(Clipperz.PM.Crypto.communicationProtocol.fallbackVersions[this.connectionVersion()]); 221 this.setConnectionVersion(Clipperz.PM.Crypto.communicationProtocol.fallbackVersions[this.connectionVersion()]);
225 222
226 if (this.connectionVersion() != null) { 223 if (this.connectionVersion() != null) {
227 result = new MochiKit.Async.Deferred(); 224 result = new MochiKit.Async.Deferred();
228 225
229 result.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'connection_tryOlderSchema'); 226 result.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'connection_tryOlderSchema');
230 result.addCallback(MochiKit.Base.method(this, 'connect')); 227 result.addCallback(MochiKit.Base.method(this, 'connect'));
231 result.callback(); 228 result.callback();
232 } else { 229 } else {
233 result = MochiKit.Async.fail(Clipperz.PM.DataModel.User.exception.LoginFailed); 230 result = MochiKit.Async.fail(Clipperz.PM.DataModel.User.exception.LoginFailed);
234 } 231 }
235 } 232 }
236//MochiKit.Logging.logDebug("<<< User.handleConnectionFallback"); 233//MochiKit.Logging.logDebug("<<< User.handleConnectionFallback");
237 return result; 234 return result;
238 }, 235 },
239 236
240 //========================================================================= 237 //=========================================================================
241 238
242 'header': function() { 239 'header': function() {
243 if (this._header == null) { 240 if (this._header == null) {
244 this._header = new Clipperz.PM.DataModel.Header({user:this}); 241 this._header = new Clipperz.PM.DataModel.Header({user:this});
245 } 242 }
246 return this._header; 243 return this._header;
247 }, 244 },
248 245
249 //------------------------------------------------------------------------- 246 //-------------------------------------------------------------------------
250 247
251 'statistics': function() { 248 'statistics': function() {
252 if (this._statistics == null) { 249 if (this._statistics == null) {
253 this._statistics = new Clipperz.PM.DataModel.Statistics({user:this}); 250 this._statistics = new Clipperz.PM.DataModel.Statistics({user:this});
254 } 251 }
255 return this._statistics; 252 return this._statistics;
256 }, 253 },
257 254
258 //------------------------------------------------------------------------- 255 //-------------------------------------------------------------------------
259 256
260 'records': function() { 257 'records': function() {
261 return this._records; 258 return this._records;
262 }, 259 },
263 260
264 //......................................................................... 261 //.........................................................................
265 262
266 'addRecord': function(aValue, isBatchUpdate) { 263 'addRecord': function(aValue, isBatchUpdate) {
267 this.records()[aValue.reference()] = aValue; 264 this.records()[aValue.reference()] = aValue;
268 265
269 if (isBatchUpdate != true) { 266 if (isBatchUpdate != true) {
270 Clipperz.NotificationCenter.notify(aValue, 'recordAdded', null, true); 267 Clipperz.NotificationCenter.notify(aValue, 'recordAdded', null, true);
271 Clipperz.NotificationCenter.notify(this, 'updatedSection', 'records', true); 268 Clipperz.NotificationCenter.notify(this, 'updatedSection', 'records', true);
272 } 269 }
273 }, 270 },
274 271
275 //----------------------------------------------------------------------------- 272 //-----------------------------------------------------------------------------
276 273
277 'addNewRecord': function() { 274 'addNewRecord': function() {
278 varrecord; 275 varrecord;
279 276
280//MochiKit.Logging.logDebug(">>> User.addNewRecord"); 277//MochiKit.Logging.logDebug(">>> User.addNewRecord");
281 record = new Clipperz.PM.DataModel.Record({user:this}); 278 record = new Clipperz.PM.DataModel.Record({user:this});
282 this.addRecord(record); 279 this.addRecord(record);
283 Clipperz.NotificationCenter.notify(this, 'updatedSection', 'records', true); 280 Clipperz.NotificationCenter.notify(this, 'updatedSection', 'records', true);
284//MochiKit.Logging.logDebug("<<< User.addNewRecord"); 281//MochiKit.Logging.logDebug("<<< User.addNewRecord");
285 282
286 return record; 283 return record;
287 }, 284 },
288 285
289 //------------------------------------------------------------------------- 286 //-------------------------------------------------------------------------
290 287
291 'saveRecords': function(someRecords, aMethodName) { 288 'saveRecords': function(someRecords, aMethodName) {
292 var deferredResult; 289 var deferredResult;
293 var methodName; 290 var methodName;
294 varresult; 291 varresult;
295 var i,c; 292 var i,c;
296 293
297//console.log("User.saveRecords - someRecords", someRecords); 294//console.log("User.saveRecords - someRecords", someRecords);
298 methodName = aMethodName || 'addNewRecords'; 295 methodName = aMethodName || 'addNewRecords';
299 296
300 Clipperz.NotificationCenter.notify(this, 'updatedSection', 'records', true); 297 Clipperz.NotificationCenter.notify(this, 'updatedSection', 'records', true);
301//MochiKit.Logging.logDebug(">>> User.saveRecords"); 298//MochiKit.Logging.logDebug(">>> User.saveRecords");
302//MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] User.saveRecords"); 299//MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] User.saveRecords");
303/* 300/*
304MochiKit.Logging.logDebug("--- User.saveRecords - 1"); 301MochiKit.Logging.logDebug("--- User.saveRecords - 1");
305 MochiKit.Iter.forEach(someRecords, function(aRecord) { 302 MochiKit.Iter.forEach(someRecords, function(aRecord) {
306 if (aRecord.headerNotes() != null) { 303 if (aRecord.headerNotes() != null) {
307 aRecord.setNotes(aRecord.headerNotes()); 304 aRecord.setNotes(aRecord.headerNotes());
308 } 305 }
309 aRecord.syncDirectLoginReferenceValues(); 306 aRecord.syncDirectLoginReferenceValues();
310 aRecord.currentVersion().createNewVersion(); 307 aRecord.currentVersion().createNewVersion();
311 aRecord.updateKey(); 308 aRecord.updateKey();
312 }); 309 });
313MochiKit.Logging.logDebug("--- User.saveRecords - 2"); 310MochiKit.Logging.logDebug("--- User.saveRecords - 2");
314*/ 311*/
315 312
316 result = {'records': []}; 313 result = {'records': []};
317 314
318 deferredResult = new MochiKit.Async.Deferred(); 315 deferredResult = new MochiKit.Async.Deferred();
319 c = someRecords.length; 316 c = someRecords.length;
320 for (i=0; i<c; i++) { 317 for (i=0; i<c; i++) {
321 deferredResult.addCallback(function(aRecord) { 318 deferredResult.addCallback(function(aRecord) {
322 if (aRecord.headerNotes() != null) { 319 if (aRecord.headerNotes() != null) {
323 aRecord.setNotes(aRecord.headerNotes()); 320 aRecord.setNotes(aRecord.headerNotes());
324 } 321 }
325 aRecord.syncDirectLoginReferenceValues(); 322 aRecord.syncDirectLoginReferenceValues();
326 aRecord.currentVersion().createNewVersion(); 323 aRecord.currentVersion().createNewVersion();
327 aRecord.updateKey(); 324 aRecord.updateKey();
328 }, someRecords[i]); 325 }, someRecords[i]);
329 deferredResult.addCallback(MochiKit.Async.wait, 0.1); 326 deferredResult.addCallback(MochiKit.Async.wait, 0.1);
330 } 327 }
331//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 1 " + res); return res;}); 328//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 1 " + res); return res;});
332 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveCard_collectRecordInfo'); 329 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveCard_collectRecordInfo');
333//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 2 " + res); return res;}); 330//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 2 " + res); return res;});
334 331
335 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveCard_encryptUserData'); 332 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveCard_encryptUserData');
336//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 3 " + res); return res;}); 333//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 3 " + res); return res;});
337 deferredResult.addCallback(MochiKit.Base.method(this, 'encryptedData')); 334 deferredResult.addCallback(MochiKit.Base.method(this, 'encryptedData'));
338//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 4 " + res); return res;}); 335//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 4 " + res); return res;});
339 deferredResult.addCallback(function(aResult, res) { 336 deferredResult.addCallback(function(aResult, res) {
340 aResult['user'] = res; 337 aResult['user'] = res;
341 return aResult; 338 return aResult;
342 }, result); 339 }, result);
343//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 5 " + res); return res;}); 340//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 5 " + res); return res;});
344 341
345 c = someRecords.length; 342 c = someRecords.length;
346 for (i=0; i<c; i++) { 343 for (i=0; i<c; i++) {
347 var recordData; 344 var recordData;
348 345
349 recordData = {}; 346 recordData = {};
350 347
351//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.1 " + res); return res;}); 348//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.1 " + res); return res;});
352 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveCard_encryptRecordData'); 349 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveCard_encryptRecordData');
353//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.2 " + res); return res;}); 350//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.2 " + res); return res;});
354 deferredResult.addCallback(MochiKit.Base.method(someRecords[i], 'encryptedData')); 351 deferredResult.addCallback(MochiKit.Base.method(someRecords[i], 'encryptedData'));
355//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.3 " + res); return res;}); 352//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.3 " + res); return res;});
356 deferredResult.addCallback(function(aResult, res) { 353 deferredResult.addCallback(function(aResult, res) {
357 aResult['record'] = res; 354 aResult['record'] = res;
358 return aResult; 355 return aResult;
359 }, recordData); 356 }, recordData);
360//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.4 " + res); return res;}); 357//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.4 " + res); return res;});
361 358
362 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {} /*'saveCard_encryptRecordVersions'*/); 359 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {} /*'saveCard_encryptRecordVersions'*/);
363//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.5 " + res); return res;}); 360//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.5 " + res); return res;});
364 deferredResult.addCallback(MochiKit.Base.method(someRecords[i].currentVersion(), 'encryptedData')); 361 deferredResult.addCallback(MochiKit.Base.method(someRecords[i].currentVersion(), 'encryptedData'));
365//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.6 " + res); return res;}); 362//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.6 " + res); return res;});
366 deferredResult.addCallback(function(aResult, res) { 363 deferredResult.addCallback(function(aResult, res) {
367 aResult['currentRecordVersion'] = res; 364 aResult['currentRecordVersion'] = res;
368 return aResult; 365 return aResult;
369 }, recordData); 366 }, recordData);
370//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.7 " + res); return res;}); 367//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.7 " + res); return res;});
371 368
372 deferredResult.addCallback(function(aResult, res) { 369 deferredResult.addCallback(function(aResult, res) {
373 aResult['records'].push(res); 370 aResult['records'].push(res);
374 return aResult; 371 return aResult;
375 }, result); 372 }, result);
376//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.8 " + res); return res;}); 373//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.8 " + res); return res;});
377 } 374 }
378 375
379//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 7 " + res); return res;}); 376//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 7 " + res); return res;});
380 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveCard_sendingData'); 377 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveCard_sendingData');
381//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 8 " + res); return res;}); 378//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 8 " + res); return res;});
382 deferredResult.addCallback(MochiKit.Base.method(this.connection(), 'message'), methodName); 379 deferredResult.addCallback(MochiKit.Base.method(this.connection(), 'message'), methodName);
383//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 9 " + res); return res;}); 380//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 9 " + res); return res;});
384 381
385 for (i=0; i<c; i++) { 382 for (i=0; i<c; i++) {
386//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 9.1 " + res); return res;}); 383//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 9.1 " + res); return res;});
387 deferredResult.addCallback(MochiKit.Base.method(someRecords[i], 'takeSnapshotOfCurrentData')); 384 deferredResult.addCallback(MochiKit.Base.method(someRecords[i], 'takeSnapshotOfCurrentData'));
388//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 9.2 " + res); return res;}); 385//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 9.2 " + res); return res;});
389 deferredResult.addCallback(MochiKit.Base.method(someRecords[i], 'setIsBrandNew'), false); 386 deferredResult.addCallback(MochiKit.Base.method(someRecords[i], 'setIsBrandNew'), false);
390//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 9.3 " + res); return res;}); 387//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 9.3 " + res); return res;});
391 } 388 }
392 389
393//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 10 " + res); return res;}); 390//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 10 " + res); return res;});
394 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'notify', 'recordUpdated'); 391 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'notify', 'recordUpdated');
395//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 11 " + res); return res;}); 392//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 11 " + res); return res;});
396 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'notify', 'directLoginUpdated'); 393 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'notify', 'directLoginUpdated');
397//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 12 " + res); return res;}); 394//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 12 " + res); return res;});
398 deferredResult.callback(); 395 deferredResult.callback();
399 396
400 return deferredResult; 397 return deferredResult;
401 }, 398 },
402 399
403 //------------------------------------------------------------------------- 400 //-------------------------------------------------------------------------
404 401
405 'removeRecord': function(aRecord) { 402 'removeRecord': function(aRecord) {
406//MochiKit.Logging.logDebug(">>> User.removeRecord"); 403//MochiKit.Logging.logDebug(">>> User.removeRecord");
407 delete this.records()[aRecord.reference()]; 404 delete this.records()[aRecord.reference()];
408//MochiKit.Logging.logDebug("--- User.removeRecord - 1"); 405//MochiKit.Logging.logDebug("--- User.removeRecord - 1");
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/UserPreferences.js b/frontend/beta/js/Clipperz/PM/DataModel/UserPreferences.js
index dc73ce1..9e80b3a 100644
--- a/frontend/beta/js/Clipperz/PM/DataModel/UserPreferences.js
+++ b/frontend/beta/js/Clipperz/PM/DataModel/UserPreferences.js
@@ -1,197 +1,194 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } 28if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
32 29
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.DataModel.UserPreferences = function(args) { 33Clipperz.PM.DataModel.UserPreferences = function(args) {
37 args = args || {}; 34 args = args || {};
38 35
39 this._user = args['user']; delete args['user']; 36 this._user = args['user']; delete args['user'];
40 this._config = args; 37 this._config = args;
41 38
42 return this; 39 return this;
43} 40}
44 41
45Clipperz.PM.DataModel.UserPreferences.prototype = MochiKit.Base.update(null, { 42Clipperz.PM.DataModel.UserPreferences.prototype = MochiKit.Base.update(null, {
46 43
47 //------------------------------------------------------------------------- 44 //-------------------------------------------------------------------------
48 45
49 'config': function() { 46 'config': function() {
50 return this._config; 47 return this._config;
51 }, 48 },
52 49
53 //------------------------------------------------------------------------- 50 //-------------------------------------------------------------------------
54 51
55 'user': function() { 52 'user': function() {
56 return this._user; 53 return this._user;
57 }, 54 },
58 55
59 //------------------------------------------------------------------------- 56 //-------------------------------------------------------------------------
60 57
61 'updateWithData': function(someValues) { 58 'updateWithData': function(someValues) {
62 var currentLanguage; 59 var currentLanguage;
63 60
64//MochiKit.Logging.logDebug(">>> Clipperz.PM.DataModel.UserPreferences.updateWithData: " + Clipperz.Base.serializeJSON(someValues)); 61//MochiKit.Logging.logDebug(">>> Clipperz.PM.DataModel.UserPreferences.updateWithData: " + Clipperz.Base.serializeJSON(someValues));
65 currentLanguage = this.preferredLanguage(); 62 currentLanguage = this.preferredLanguage();
66 63
67 MochiKit.Base.update(this._config, someValues); 64 MochiKit.Base.update(this._config, someValues);
68 65
69 if (this.preferredLanguage() != currentLanguage) { 66 if (this.preferredLanguage() != currentLanguage) {
70 Clipperz.PM.Strings.Languages.setSelectedLanguage(this.preferredLanguage()); 67 Clipperz.PM.Strings.Languages.setSelectedLanguage(this.preferredLanguage());
71 } else { 68 } else {
72//MochiKit.Logging.logDebug("### keepping the browser selected language: " + Clipperz.PM.Strings.selectedLanguage); 69//MochiKit.Logging.logDebug("### keepping the browser selected language: " + Clipperz.PM.Strings.selectedLanguage);
73 } 70 }
74 71
75 return this; 72 return this;
76 }, 73 },
77 74
78 //------------------------------------------------------------------------- 75 //-------------------------------------------------------------------------
79 76
80 'configValue': function(aConfigName, aDefaultValue) { 77 'configValue': function(aConfigName, aDefaultValue) {
81 var result; 78 var result;
82 79
83//MochiKit.Logging.logDebug(">>> UserPreferences.configValue - config: " + Clipperz.Base.serializeJSON(this.config())); 80//MochiKit.Logging.logDebug(">>> UserPreferences.configValue - config: " + Clipperz.Base.serializeJSON(this.config()));
84 if (typeof(this.config()[aConfigName]) == 'undefined') { 81 if (typeof(this.config()[aConfigName]) == 'undefined') {
85 result = aDefaultValue; 82 result = aDefaultValue;
86 } else { 83 } else {
87 result = this.config()[aConfigName]; 84 result = this.config()[aConfigName];
88 } 85 }
89//MochiKit.Logging.logDebug("<<< UserPreferences.configValue"); 86//MochiKit.Logging.logDebug("<<< UserPreferences.configValue");
90 87
91 return result; 88 return result;
92 }, 89 },
93 90
94 'setConfigValue': function(aConfigName, aValue) { 91 'setConfigValue': function(aConfigName, aValue) {
95 var result; 92 var result;
96 93
97 if (aValue != this.configValue(aConfigName)) { 94 if (aValue != this.configValue(aConfigName)) {
98 if (aValue == null) { 95 if (aValue == null) {
99 delete this.config()[aConfigName] 96 delete this.config()[aConfigName]
100 } else { 97 } else {
101 this.config()[aConfigName] = aValue; 98 this.config()[aConfigName] = aValue;
102 } 99 }
103 100
104 Clipperz.NotificationCenter.notify(this.user(), 'updatedSection', 'preferences', true); 101 Clipperz.NotificationCenter.notify(this.user(), 'updatedSection', 'preferences', true);
105 102
106 result = true; 103 result = true;
107 } else { 104 } else {
108 result = false; 105 result = false;
109 } 106 }
110 107
111 return result; 108 return result;
112 }, 109 },
113 110
114 //------------------------------------------------------------------------- 111 //-------------------------------------------------------------------------
115 112
116 'useSafeEditMode': function() { 113 'useSafeEditMode': function() {
117 return this.configValue('useSafeEditMode', true); 114 return this.configValue('useSafeEditMode', true);
118 }, 115 },
119 116
120 'setUseSafeEditMode': function(aValue) { 117 'setUseSafeEditMode': function(aValue) {
121 this.setConfigValue('useSafeEditMode', aValue); 118 this.setConfigValue('useSafeEditMode', aValue);
122 }, 119 },
123 120
124 //------------------------------------------------------------------------- 121 //-------------------------------------------------------------------------
125 122
126 'preferredLanguage': function() { 123 'preferredLanguage': function() {
127 return this.configValue('preferredLanguage', null); 124 return this.configValue('preferredLanguage', null);
128 }, 125 },
129 126
130 'setPreferredLanguage': function(aValue) { 127 'setPreferredLanguage': function(aValue) {
131 if (this.setConfigValue('preferredLanguage', aValue)) { 128 if (this.setConfigValue('preferredLanguage', aValue)) {
132 Clipperz.PM.Strings.Languages.setSelectedLanguage(this.preferredLanguage()); 129 Clipperz.PM.Strings.Languages.setSelectedLanguage(this.preferredLanguage());
133 } 130 }
134 }, 131 },
135 132
136 //------------------------------------------------------------------------- 133 //-------------------------------------------------------------------------
137 134
138 'shouldShowDonationPanel': function() { 135 'shouldShowDonationPanel': function() {
139 return this.configValue('shouldShowDonationPanel', true); 136 return this.configValue('shouldShowDonationPanel', true);
140 }, 137 },
141 138
142 'setShouldShowDonationPanel': function(aValue) { 139 'setShouldShowDonationPanel': function(aValue) {
143 this.setConfigValue('shouldShowDonationPanel', aValue); 140 this.setConfigValue('shouldShowDonationPanel', aValue);
144 }, 141 },
145 142
146 //------------------------------------------------------------------------- 143 //-------------------------------------------------------------------------
147 144
148 'disableUnsecureFaviconLoadingForIE': function() { 145 'disableUnsecureFaviconLoadingForIE': function() {
149 return this.configValue('disableUnsecureFaviconLoadingForIE', false); 146 return this.configValue('disableUnsecureFaviconLoadingForIE', false);
150 }, 147 },
151 148
152 'setDisableUnsecureFaviconLoadingForIE': function(aValue) { 149 'setDisableUnsecureFaviconLoadingForIE': function(aValue) {
153 this.setConfigValue('disableUnsecureFaviconLoadingForIE', aValue); 150 this.setConfigValue('disableUnsecureFaviconLoadingForIE', aValue);
154 }, 151 },
155 152
156 //------------------------------------------------------------------------- 153 //-------------------------------------------------------------------------
157 154
158 'serializedData': function() { 155 'serializedData': function() {
159 return this.config(); 156 return this.config();
160 }, 157 },
161 158
162 //------------------------------------------------------------------------- 159 //-------------------------------------------------------------------------
163 160
164 'saveChanges': function(aReferenceElement) { 161 'saveChanges': function(aReferenceElement) {
165 vardeferredResult; 162 vardeferredResult;
166 163
167 deferredResult = new MochiKit.Async.Deferred(); 164 deferredResult = new MochiKit.Async.Deferred();
168 165
169 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Components.MessageBox(), 'deferredShow'), 166 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Components.MessageBox(), 'deferredShow'),
170 { 167 {
171 title:"", //Clipperz.PM.Strings['accountPreferencesSavingPanelTitle_Step1'], 168 title:"", //Clipperz.PM.Strings['accountPreferencesSavingPanelTitle_Step1'],
172 text:"", //Clipperz.PM.Strings['accountPreferencesSavingPanelText_Step1'], 169 text:"", //Clipperz.PM.Strings['accountPreferencesSavingPanelText_Step1'],
173 width:240, 170 width:240,
174 showProgressBar:true, 171 showProgressBar:true,
175 showCloseButton:false 172 showCloseButton:false
176 }, 173 },
177 aReferenceElement 174 aReferenceElement
178 ); 175 );
179 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'account_savingPreferences_1'); 176 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'account_savingPreferences_1');
180 deferredResult.addCallback(MochiKit.Base.method(this.user(), 'encryptedData')); 177 deferredResult.addCallback(MochiKit.Base.method(this.user(), 'encryptedData'));
181 deferredResult.addCallback(function(res) { 178 deferredResult.addCallback(function(res) {
182 return {user:res}; 179 return {user:res};
183 }) 180 })
184 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'account_savingPreferences_2'); 181 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'account_savingPreferences_2');
185 deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'updateData'); 182 deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'updateData');
186 deferredResult.addCallback(Clipperz.PM.Components.MessageBox().hide, YAHOO.ext.Element.get('main')); 183 deferredResult.addCallback(Clipperz.PM.Components.MessageBox().hide, YAHOO.ext.Element.get('main'));
187 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedPreferences', null); 184 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedPreferences', null);
188 185
189 deferredResult.callback(); 186 deferredResult.callback();
190 187
191 return deferredResult; 188 return deferredResult;
192 }, 189 },
193 190
194 //------------------------------------------------------------------------- 191 //-------------------------------------------------------------------------
195 __syntaxFix__: "syntax fix" 192 __syntaxFix__: "syntax fix"
196}); 193});
197 194
diff --git a/frontend/beta/js/Clipperz/PM/Date.js b/frontend/beta/js/Clipperz/PM/Date.js
index 5e21340..13116e9 100644
--- a/frontend/beta/js/Clipperz/PM/Date.js
+++ b/frontend/beta/js/Clipperz/PM/Date.js
@@ -1,193 +1,190 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Date) == 'undefined') { Clipperz.PM.Date = {}; } 28if (typeof(Clipperz.PM.Date) == 'undefined') { Clipperz.PM.Date = {}; }
32 29
33Clipperz.PM.Date.VERSION = "0.1"; 30Clipperz.PM.Date.VERSION = "0.1";
34Clipperz.PM.Date.NAME = "Clipperz.PM.Date"; 31Clipperz.PM.Date.NAME = "Clipperz.PM.Date";
35 32
36MochiKit.Base.update(Clipperz.PM.Date, { 33MochiKit.Base.update(Clipperz.PM.Date, {
37 34
38 '__repr__': function () { 35 '__repr__': function () {
39 return "[" + this.NAME + " " + this.VERSION + "]"; 36 return "[" + this.NAME + " " + this.VERSION + "]";
40 }, 37 },
41 38
42 //------------------------------------------------------------------------- 39 //-------------------------------------------------------------------------
43 40
44 'toString': function () { 41 'toString': function () {
45 return this.__repr__(); 42 return this.__repr__();
46 }, 43 },
47 44
48 //------------------------------------------------------------------------- 45 //-------------------------------------------------------------------------
49 46
50 'locale': function() { 47 'locale': function() {
51 return { 48 return {
52 'amDesignation':Clipperz.PM.Strings['calendarStrings']['amDesignation'], 49 'amDesignation':Clipperz.PM.Strings['calendarStrings']['amDesignation'],
53 'pmDesignation':Clipperz.PM.Strings['calendarStrings']['pmDesignation'], 50 'pmDesignation':Clipperz.PM.Strings['calendarStrings']['pmDesignation'],
54 'days': Clipperz.PM.Strings['calendarStrings']['days'], 51 'days': Clipperz.PM.Strings['calendarStrings']['days'],
55 'shortDays': Clipperz.PM.Strings['calendarStrings']['shortDays'], 52 'shortDays': Clipperz.PM.Strings['calendarStrings']['shortDays'],
56 'shortMonths': Clipperz.PM.Strings['calendarStrings']['shortMonths'], 53 'shortMonths': Clipperz.PM.Strings['calendarStrings']['shortMonths'],
57 'months': Clipperz.PM.Strings['calendarStrings']['months'] 54 'months': Clipperz.PM.Strings['calendarStrings']['months']
58 } 55 }
59 }, 56 },
60 57
61 //========================================================================= 58 //=========================================================================
62/* 59/*
63 'formatDateWithPHPLikeTemplate': function(aDate, aTemplate) { 60 'formatDateWithPHPLikeTemplate': function(aDate, aTemplate) {
64 return Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale(aDate, aTemplate, Clipperz.PM.Date.locale()); 61 return Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale(aDate, aTemplate, Clipperz.PM.Date.locale());
65 }, 62 },
66 63
67 'parseDateWithPHPLikeTemplate': function(aDate, aTemplate) { 64 'parseDateWithPHPLikeTemplate': function(aDate, aTemplate) {
68 return Clipperz.Date.parseDateWithPHPTemplateAndLocale(aDate, aTemplate, Clipperz.PM.Date.locale()); 65 return Clipperz.Date.parseDateWithPHPTemplateAndLocale(aDate, aTemplate, Clipperz.PM.Date.locale());
69 }, 66 },
70 67
71 //========================================================================= 68 //=========================================================================
72 69
73 'formatDateWithJavaLikeTemplate': function(aDate, aTemplate) { 70 'formatDateWithJavaLikeTemplate': function(aDate, aTemplate) {
74 return Clipperz.Date.formatDateWithJavaLikeTemplateAndLocale(aDate, aTemplate, Clipperz.PM.Date.locale()); 71 return Clipperz.Date.formatDateWithJavaLikeTemplateAndLocale(aDate, aTemplate, Clipperz.PM.Date.locale());
75 }, 72 },
76 73
77 'parseDateWithJavaLikeTemplate': function(aDate, aTemplate) { 74 'parseDateWithJavaLikeTemplate': function(aDate, aTemplate) {
78 return Clipperz.Date.parseDateWithJavaLikeTemplateAndLocale(aDate, aTemplate, Clipperz.PM.Date.locale()); 75 return Clipperz.Date.parseDateWithJavaLikeTemplateAndLocale(aDate, aTemplate, Clipperz.PM.Date.locale());
79 }, 76 },
80*/ 77*/
81 //========================================================================= 78 //=========================================================================
82 79
83 'formatDateWithTemplate': function(aDate, aTemplate) { 80 'formatDateWithTemplate': function(aDate, aTemplate) {
84 var result; 81 var result;
85 82
86 if (aDate == null) { 83 if (aDate == null) {
87 result = "" 84 result = ""
88 } else { 85 } else {
89 result = Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale(aDate, aTemplate, Clipperz.PM.Date.locale()); 86 result = Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale(aDate, aTemplate, Clipperz.PM.Date.locale());
90 }; 87 };
91 88
92 return result; 89 return result;
93 }, 90 },
94 91
95 'parseDateWithTemplate': function(aValue, aTemplate) { 92 'parseDateWithTemplate': function(aValue, aTemplate) {
96 return Clipperz.Date.parseDateWithPHPTemplateAndLocale(aValue, aTemplate, Clipperz.PM.Date.locale()); 93 return Clipperz.Date.parseDateWithPHPTemplateAndLocale(aValue, aTemplate, Clipperz.PM.Date.locale());
97 }, 94 },
98 95
99 //========================================================================= 96 //=========================================================================
100 97
101 'formatDateWithUTCFormat': function(aDate) { 98 'formatDateWithUTCFormat': function(aDate) {
102 return Clipperz.Date.formatDateWithUTCFormatAndLocale(aDate, Clipperz.PM.Date.locale()); 99 return Clipperz.Date.formatDateWithUTCFormatAndLocale(aDate, Clipperz.PM.Date.locale());
103 }, 100 },
104 101
105 'parseDateWithUTCFormat': function(aValue) { 102 'parseDateWithUTCFormat': function(aValue) {
106 var result; 103 var result;
107 104
108 if (aValue == null) { 105 if (aValue == null) {
109 result = null; 106 result = null;
110 } else { 107 } else {
111 result = Clipperz.Date.parseDateWithUTCFormatAndLocale(aValue, Clipperz.PM.Date.locale()); 108 result = Clipperz.Date.parseDateWithUTCFormatAndLocale(aValue, Clipperz.PM.Date.locale());
112 } 109 }
113 110
114 return result; 111 return result;
115 }, 112 },
116 113
117 //========================================================================= 114 //=========================================================================
118 115
119 'getElapsedTimeDescription': function(aDate) { 116 'getElapsedTimeDescription': function(aDate) {
120 var result; 117 var result;
121 118
122 result = "" 119 result = ""
123 120
124 if (aDate != null) { 121 if (aDate != null) {
125 var now; 122 var now;
126 var elapsedTime; 123 var elapsedTime;
127 124
128 var millisencondsInAMinute; 125 var millisencondsInAMinute;
129 var millisencondsInAnHour; 126 var millisencondsInAnHour;
130 var millisencondsInADay; 127 var millisencondsInADay;
131 var millisencondsInAWeek; 128 var millisencondsInAWeek;
132 var millisencondsInAMonth; 129 var millisencondsInAMonth;
133 130
134 now = new Date(); 131 now = new Date();
135 elapsedTime = now.getTime() - aDate.getTime(); 132 elapsedTime = now.getTime() - aDate.getTime();
136 133
137 millisencondsInAMinute = 60 * 1000; 134 millisencondsInAMinute = 60 * 1000;
138 millisencondsInAnHour = millisencondsInAMinute * 60; 135 millisencondsInAnHour = millisencondsInAMinute * 60;
139 millisencondsInADay = millisencondsInAnHour * 24; 136 millisencondsInADay = millisencondsInAnHour * 24;
140 millisencondsInAWeek = millisencondsInADay * 7; 137 millisencondsInAWeek = millisencondsInADay * 7;
141 millisencondsInAMonth = millisencondsInAWeek * 5; 138 millisencondsInAMonth = millisencondsInAWeek * 5;
142 139
143 if ((elapsedTime / millisencondsInAMonth) > 1) { 140 if ((elapsedTime / millisencondsInAMonth) > 1) {
144 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['MORE_THAN_A_MONTH_AGO']; 141 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['MORE_THAN_A_MONTH_AGO'];
145 } else if ((elapsedTime / millisencondsInAWeek) > 1) { 142 } else if ((elapsedTime / millisencondsInAWeek) > 1) {
146 var elapsedWeeks; 143 var elapsedWeeks;
147 144
148 elapsedWeeks = Math.floor((elapsedTime / millisencondsInAWeek)); 145 elapsedWeeks = Math.floor((elapsedTime / millisencondsInAWeek));
149 if (elapsedWeeks == 1) { 146 if (elapsedWeeks == 1) {
150 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['MORE_THAN_A_WEEK_AGO']; 147 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['MORE_THAN_A_WEEK_AGO'];
151 } else { 148 } else {
152 result = Clipprez.PM.Strings['elapsedTimeDescriptions']['MORE_THAN_*_WEEKS_AGO'].replace(/__elapsed__/, elapsedWeeks); 149 result = Clipprez.PM.Strings['elapsedTimeDescriptions']['MORE_THAN_*_WEEKS_AGO'].replace(/__elapsed__/, elapsedWeeks);
153 } 150 }
154 } else if ((elapsedTime / millisencondsInADay) > 1) { 151 } else if ((elapsedTime / millisencondsInADay) > 1) {
155 var elapsedDays; 152 var elapsedDays;
156 153
157 elapsedDays = Math.floor((elapsedTime / millisencondsInADay)); 154 elapsedDays = Math.floor((elapsedTime / millisencondsInADay));
158 if (elapsedDays == 1) { 155 if (elapsedDays == 1) {
159 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['YESTERDAY']; 156 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['YESTERDAY'];
160 } else { 157 } else {
161 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['*_DAYS_AGO'].replace(/__elapsed__/, elapsedDays); 158 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['*_DAYS_AGO'].replace(/__elapsed__/, elapsedDays);
162 } 159 }
163 } else if ((elapsedTime / millisencondsInAnHour) > 1) { 160 } else if ((elapsedTime / millisencondsInAnHour) > 1) {
164 var elapsedHours; 161 var elapsedHours;
165 162
166 elapsedHours = Math.floor((elapsedTime / millisencondsInAnHour)); 163 elapsedHours = Math.floor((elapsedTime / millisencondsInAnHour));
167 if (elapsedHours == 1) { 164 if (elapsedHours == 1) {
168 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['ABOUT_AN_HOUR_AGO']; 165 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['ABOUT_AN_HOUR_AGO'];
169 } else { 166 } else {
170 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['*_HOURS_AGO'].replace(/__elapsed__/, elapsedHours); 167 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['*_HOURS_AGO'].replace(/__elapsed__/, elapsedHours);
171 } 168 }
172 } else { 169 } else {
173 var elapsed10Minutes; 170 var elapsed10Minutes;
174 171
175 elapsed10Minutes = (Math.floor((elapsedTime / millisencondsInAMinute) / 10)) * 10; 172 elapsed10Minutes = (Math.floor((elapsedTime / millisencondsInAMinute) / 10)) * 10;
176 if (elapsed10Minutes == 0) { 173 if (elapsed10Minutes == 0) {
177 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['JUST_A_FEW_MINUTES_AGO']; 174 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['JUST_A_FEW_MINUTES_AGO'];
178 } else { 175 } else {
179 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['ABOUT_*_MINUTES_AGO'].replace(/__elapsed__/, elapsed10Minutes+""); 176 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['ABOUT_*_MINUTES_AGO'].replace(/__elapsed__/, elapsed10Minutes+"");
180 } 177 }
181 } 178 }
182 } 179 }
183 180
184 return result; 181 return result;
185 }, 182 },
186 183
187 //------------------------------------------------------------------------- 184 //-------------------------------------------------------------------------
188 185
189 //------------------------------------------------------------------------- 186 //-------------------------------------------------------------------------
190 __syntaxFix__: "syntax fix" 187 __syntaxFix__: "syntax fix"
191 188
192}); 189});
193 190
diff --git a/frontend/beta/js/Clipperz/PM/Main.js b/frontend/beta/js/Clipperz/PM/Main.js
index 9a068e1..989e0a4 100644
--- a/frontend/beta/js/Clipperz/PM/Main.js
+++ b/frontend/beta/js/Clipperz/PM/Main.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 26if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
30 27
31Clipperz.PM.VERSION = "0.1"; 28Clipperz.PM.VERSION = "0.1";
32Clipperz.PM.NAME = "Clipperz.PM"; 29Clipperz.PM.NAME = "Clipperz.PM";
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.PM.Main = function() { 33Clipperz.PM.Main = function() {
37 this._loginPanel = null; 34 this._loginPanel = null;
38 this._user = null; 35 this._user = null;
39 36
40 this._isRunningCompact = false; 37 this._isRunningCompact = false;
41 38
42 Clipperz.NotificationCenter.register(null, 'userConnected', this, 'userConnectedCallback'); 39 Clipperz.NotificationCenter.register(null, 'userConnected', this, 'userConnectedCallback');
43 Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler'); 40 Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler');
44 41
45 Clipperz.NotificationCenter.register(null, 'EXCEPTION', this, 'reportException'); 42 Clipperz.NotificationCenter.register(null, 'EXCEPTION', this, 'reportException');
46 43
47 return this; 44 return this;
48} 45}
49 46
50//============================================================================= 47//=============================================================================
51 48
52MochiKit.Base.update(Clipperz.PM.Main.prototype, { 49MochiKit.Base.update(Clipperz.PM.Main.prototype, {
53 'toString': function() { 50 'toString': function() {
54 return "Clipperz.PM.Main"; 51 return "Clipperz.PM.Main";
55 }, 52 },
56 53
57 'switchLanguageHandler': function() { 54 'switchLanguageHandler': function() {
58//MochiKit.Logging.logDebug(">>> main.switchLanguageHandler"); 55//MochiKit.Logging.logDebug(">>> main.switchLanguageHandler");
59 YAHOO.ext.Element.get('donateHeaderIconLink').dom.href = Clipperz.PM.Strings['donateHeaderLinkUrl']; 56 YAHOO.ext.Element.get('donateHeaderIconLink').dom.href = Clipperz.PM.Strings['donateHeaderLinkUrl'];
60 YAHOO.ext.Element.get('donateHeaderLink').update(Clipperz.PM.Strings['donateHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['donateHeaderLinkUrl']; 57 YAHOO.ext.Element.get('donateHeaderLink').update(Clipperz.PM.Strings['donateHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['donateHeaderLinkUrl'];
61 YAHOO.ext.Element.get('creditsHeaderLink').update(Clipperz.PM.Strings['creditsHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['creditsHeaderLinkUrl']; 58 YAHOO.ext.Element.get('creditsHeaderLink').update(Clipperz.PM.Strings['creditsHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['creditsHeaderLinkUrl'];
62 YAHOO.ext.Element.get('feedbackHeaderLink').update(Clipperz.PM.Strings['feedbackHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['feedbackHeaderLinkUrl']; 59 YAHOO.ext.Element.get('feedbackHeaderLink').update(Clipperz.PM.Strings['feedbackHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['feedbackHeaderLinkUrl'];
63 YAHOO.ext.Element.get('helpHeaderLink').update(Clipperz.PM.Strings['helpHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['helpHeaderLinkUrl']; 60 YAHOO.ext.Element.get('helpHeaderLink').update(Clipperz.PM.Strings['helpHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['helpHeaderLinkUrl'];
64 YAHOO.ext.Element.get('forumHeaderLink').update(Clipperz.PM.Strings['forumHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['forumHeaderLinkUrl']; 61 YAHOO.ext.Element.get('forumHeaderLink').update(Clipperz.PM.Strings['forumHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['forumHeaderLinkUrl'];
65 62
66 if (YAHOO.ext.Element.get('logout') != null) { 63 if (YAHOO.ext.Element.get('logout') != null) {
67 YAHOO.ext.Element.get('logout').update(Clipperz.PM.Strings['logoutMenuLabel']); 64 YAHOO.ext.Element.get('logout').update(Clipperz.PM.Strings['logoutMenuLabel']);
68 YAHOO.ext.Element.get('lock').update(Clipperz.PM.Strings['lockMenuLabel']); 65 YAHOO.ext.Element.get('lock').update(Clipperz.PM.Strings['lockMenuLabel']);
69 66
70 YAHOO.ext.Element.get('recordsTabAnchor').update(Clipperz.PM.Strings['recordMenuLabel']); 67 YAHOO.ext.Element.get('recordsTabAnchor').update(Clipperz.PM.Strings['recordMenuLabel']);
71 YAHOO.ext.Element.get('accountTabAnchor').update(Clipperz.PM.Strings['accountMenuLabel']); 68 YAHOO.ext.Element.get('accountTabAnchor').update(Clipperz.PM.Strings['accountMenuLabel']);
72 YAHOO.ext.Element.get('dataTabAnchor').update(Clipperz.PM.Strings['dataMenuLabel']); 69 YAHOO.ext.Element.get('dataTabAnchor').update(Clipperz.PM.Strings['dataMenuLabel']);
73 // YAHOO.ext.Element.get('contactsTabAnchor').update(Clipperz.PM.Strings['contactsMenuLabel']); 70 // YAHOO.ext.Element.get('contactsTabAnchor').update(Clipperz.PM.Strings['contactsMenuLabel']);
74 YAHOO.ext.Element.get('toolsTabAnchor').update(Clipperz.PM.Strings['toolsMenuLabel']); 71 YAHOO.ext.Element.get('toolsTabAnchor').update(Clipperz.PM.Strings['toolsMenuLabel']);
75 } 72 }
76//MochiKit.Logging.logDebug("<<< main.switchLanguageHandler"); 73//MochiKit.Logging.logDebug("<<< main.switchLanguageHandler");
77 }, 74 },
78 75
79 //------------------------------------------------------------------------- 76 //-------------------------------------------------------------------------
80 77
81 'fixToDrawTheMainTabsCorrectlyOnSafari': function() { 78 'fixToDrawTheMainTabsCorrectlyOnSafari': function() {
82 this.switchLanguageHandler(); 79 this.switchLanguageHandler();
83 }, 80 },
84 81
85 //------------------------------------------------------------------------- 82 //-------------------------------------------------------------------------
86 83
87 'run': function(shouldShowRegistrationForm) { 84 'run': function(shouldShowRegistrationForm) {
88 varmainElement; 85 varmainElement;
89 86
90 Clipperz.NotificationCenter.register(null, 'updatedProgressState', this, 'updateProgressDialogStatus'); 87 Clipperz.NotificationCenter.register(null, 'updatedProgressState', this, 'updateProgressDialogStatus');
91 88
92 YAHOO.ext.Element.get('recordDetailEditModeHeaderMask').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide().unmask(); 89 YAHOO.ext.Element.get('recordDetailEditModeHeaderMask').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide().unmask();
93 YAHOO.ext.Element.get('recordDetailEditModeVerticalMask').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide().unmask(); 90 YAHOO.ext.Element.get('recordDetailEditModeVerticalMask').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide().unmask();
94 91
95//MochiKit.Logging.logDebug(">>> Main.run"); 92//MochiKit.Logging.logDebug(">>> Main.run");
96 mainElement = YAHOO.ext.Element.get('main'); 93 mainElement = YAHOO.ext.Element.get('main');
97 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { 94 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) {
98 YAHOO.ext.Element.get('applicationVersionType').dom.className = "readOnly"; 95 YAHOO.ext.Element.get('applicationVersionType').dom.className = "readOnly";
99 } 96 }
100 mainElement.update(""); 97 mainElement.update("");
101 98
102 Clipperz.YUI.DomHelper.append(mainElement.dom, {tag:'ul', cls:'clipperzTabPanels', children:[ 99 Clipperz.YUI.DomHelper.append(mainElement.dom, {tag:'ul', cls:'clipperzTabPanels', children:[
103 {tag:'li', id:'loginPanel'} 100 {tag:'li', id:'loginPanel'}
104 ]}) 101 ]})
105 102
106 this.setLoginPanel(new Clipperz.PM.Components.Panels.LoginPanel(YAHOO.ext.Element.get('loginPanel'))); 103 this.setLoginPanel(new Clipperz.PM.Components.Panels.LoginPanel(YAHOO.ext.Element.get('loginPanel')));
107 104
108//MochiKit.Logging.logDebug("--- Main.run - selecting active form to show ..."); 105//MochiKit.Logging.logDebug("--- Main.run - selecting active form to show ...");
109 if (shouldShowRegistrationForm == true) { 106 if (shouldShowRegistrationForm == true) {
110 this.loginPanel().showRegistrationForm(false); 107 this.loginPanel().showRegistrationForm(false);
111 } else { 108 } else {
112 this.loginPanel().showLoginForm(false); 109 this.loginPanel().showLoginForm(false);
113 } 110 }
114 111
115 this.switchLanguageHandler(); 112 this.switchLanguageHandler();
116//MochiKit.Logging.logDebug("--- Main.run - selecting active form to show. done."); 113//MochiKit.Logging.logDebug("--- Main.run - selecting active form to show. done.");
117//MochiKit.Logging.logDebug("<<< Main.run"); 114//MochiKit.Logging.logDebug("<<< Main.run");
118 }, 115 },
119 116
120 //------------------------------------------------------------------------- 117 //-------------------------------------------------------------------------
121 118
122 'runCompact': function() { 119 'runCompact': function() {
123 this.setIsRunningCompact(true); 120 this.setIsRunningCompact(true);
124 YAHOO.ext.Element.get(document.body).addClass("compact"); 121 YAHOO.ext.Element.get(document.body).addClass("compact");
125 new Clipperz.PM.Components.Compact.LoginForm(YAHOO.ext.Element.get('mainDiv')); 122 new Clipperz.PM.Components.Compact.LoginForm(YAHOO.ext.Element.get('mainDiv'));
126 }, 123 },
127 124
128 'showCompactInterface': function() { 125 'showCompactInterface': function() {
129//MochiKit.Logging.logDebug(">>> main.showCompactInterface"); 126//MochiKit.Logging.logDebug(">>> main.showCompactInterface");
130 new Clipperz.PM.Components.Compact.CompactInterface(YAHOO.ext.Element.get('compactBody'), {user:this.user()}); 127 new Clipperz.PM.Components.Compact.CompactInterface(YAHOO.ext.Element.get('compactBody'), {user:this.user()});
131//MochiKit.Logging.logDebug("<<< main.showCompactInterface"); 128//MochiKit.Logging.logDebug("<<< main.showCompactInterface");
132 }, 129 },
133 130
134 //------------------------------------------------------------------------- 131 //-------------------------------------------------------------------------
135 132
136 'mainPage': function() { 133 'mainPage': function() {
137 if (this._mainPage == null) { 134 if (this._mainPage == null) {
138 this._mainPage = new Clipperz.PM.Components.MainPage(); 135 this._mainPage = new Clipperz.PM.Components.MainPage();
139 } 136 }
140 137
141 return this._mainPage; 138 return this._mainPage;
142 }, 139 },
143 140
144 //------------------------------------------------------------------------- 141 //-------------------------------------------------------------------------
145 142
146 'loginPanel': function() { 143 'loginPanel': function() {
147 return this._loginPanel; 144 return this._loginPanel;
148 }, 145 },
149 146
150 'setLoginPanel': function(aValue) { 147 'setLoginPanel': function(aValue) {
151 this._loginPanel = aValue; 148 this._loginPanel = aValue;
152 }, 149 },
153 150
154 //------------------------------------------------------------------------- 151 //-------------------------------------------------------------------------
155 152
156 'showMainPanels': function() { 153 'showMainPanels': function() {
157 varmainElement; 154 varmainElement;
158 var logoutBlock; 155 var logoutBlock;
159 var lockBlock; 156 var lockBlock;
160 var menusTRElement; 157 var menusTRElement;
161 158
162 this.loginPanel().remove(); 159 this.loginPanel().remove();
163 this.setLoginPanel(null); 160 this.setLoginPanel(null);
164 161
165 logoutBlock = YAHOO.ext.Element.get('logoutLI'); 162 logoutBlock = YAHOO.ext.Element.get('logoutLI');
166 Clipperz.YUI.DomHelper.append(logoutBlock.dom, {tag:'a', href:"#", id:'logout', htmlString:Clipperz.PM.Strings['logoutMenuLabel']}); 163 Clipperz.YUI.DomHelper.append(logoutBlock.dom, {tag:'a', href:"#", id:'logout', htmlString:Clipperz.PM.Strings['logoutMenuLabel']});
167 MochiKit.Signal.connect('logout', 'onclick', this, 'doLogoutEventHandler'); 164 MochiKit.Signal.connect('logout', 'onclick', this, 'doLogoutEventHandler');
168 165
169 lockBlock = YAHOO.ext.Element.get('lockLI'); 166 lockBlock = YAHOO.ext.Element.get('lockLI');
170 Clipperz.YUI.DomHelper.append(lockBlock.dom, {tag:'a', href:"#", id:'lock', htmlString:Clipperz.PM.Strings['lockMenuLabel']}); 167 Clipperz.YUI.DomHelper.append(lockBlock.dom, {tag:'a', href:"#", id:'lock', htmlString:Clipperz.PM.Strings['lockMenuLabel']});
171 MochiKit.Signal.connect('lock', 'onclick', this, 'doLockEventHandler'); 168 MochiKit.Signal.connect('lock', 'onclick', this, 'doLockEventHandler');
172 169
173 menusTRElement = YAHOO.ext.Element.get('menusTR'); 170 menusTRElement = YAHOO.ext.Element.get('menusTR');
174 Clipperz.YUI.DomHelper.append(menusTRElement.dom, {tag:'td', id:'recordsTab', children:[{tag:'div', children:[{tag:'a', id:'recordsTabAnchor', htmlString:Clipperz.PM.Strings['recordMenuLabel']}]}]}); 171 Clipperz.YUI.DomHelper.append(menusTRElement.dom, {tag:'td', id:'recordsTab', children:[{tag:'div', children:[{tag:'a', id:'recordsTabAnchor', htmlString:Clipperz.PM.Strings['recordMenuLabel']}]}]});
175 Clipperz.YUI.DomHelper.append(menusTRElement.dom, {tag:'td', id:'accountTab', children:[{tag:'div', children:[{tag:'a', id:'accountTabAnchor', htmlString:Clipperz.PM.Strings['accountMenuLabel']}]}]}); 172 Clipperz.YUI.DomHelper.append(menusTRElement.dom, {tag:'td', id:'accountTab', children:[{tag:'div', children:[{tag:'a', id:'accountTabAnchor', htmlString:Clipperz.PM.Strings['accountMenuLabel']}]}]});
176 Clipperz.YUI.DomHelper.append(menusTRElement.dom, {tag:'td', id:'dataTab', children:[{tag:'div', children:[{tag:'a', id:'dataTabAnchor', htmlString:Clipperz.PM.Strings['dataMenuLabel']}]}]}); 173 Clipperz.YUI.DomHelper.append(menusTRElement.dom, {tag:'td', id:'dataTab', children:[{tag:'div', children:[{tag:'a', id:'dataTabAnchor', htmlString:Clipperz.PM.Strings['dataMenuLabel']}]}]});
177 // Clipperz.YUI.DomHelper.append(menusTRElement.dom, {tag:'td', id:'contactsTab', children:[{tag:'div', children:[{tag:'a', id:'contactsTabAnchor', htmlString:Clipperz.PM.Strings['contactsMenuLabel']}]}]}); 174 // Clipperz.YUI.DomHelper.append(menusTRElement.dom, {tag:'td', id:'contactsTab', children:[{tag:'div', children:[{tag:'a', id:'contactsTabAnchor', htmlString:Clipperz.PM.Strings['contactsMenuLabel']}]}]});
178 Clipperz.YUI.DomHelper.append(menusTRElement.dom, {tag:'td', id:'toolsTab', children:[{tag:'div', children:[{tag:'a', id:'toolsTabAnchor', htmlString:Clipperz.PM.Strings['toolsMenuLabel']}]}]}); 175 Clipperz.YUI.DomHelper.append(menusTRElement.dom, {tag:'td', id:'toolsTab', children:[{tag:'div', children:[{tag:'a', id:'toolsTabAnchor', htmlString:Clipperz.PM.Strings['toolsMenuLabel']}]}]});
179 176
180 mainElement = YAHOO.ext.Element.get('main'); 177 mainElement = YAHOO.ext.Element.get('main');
181 mainElement.update(""); 178 mainElement.update("");
182 Clipperz.YUI.DomHelper.append(mainElement.dom, {tag:'ul', cls:'clipperzTabPanels', children:[ 179 Clipperz.YUI.DomHelper.append(mainElement.dom, {tag:'ul', cls:'clipperzTabPanels', children:[
183 {tag:'li', id:'recordsPanel'}, 180 {tag:'li', id:'recordsPanel'},
184 {tag:'li', id:'accountPanel'}, 181 {tag:'li', id:'accountPanel'},
185 {tag:'li', id:'dataPanel'}, 182 {tag:'li', id:'dataPanel'},
186 // {tag:'li', id:'contactsPanel'}, 183 // {tag:'li', id:'contactsPanel'},
187 {tag:'li', id:'toolsPanel'} 184 {tag:'li', id:'toolsPanel'}
188 ]}, true) 185 ]}, true)
189 186
190 new Clipperz.PM.Components.TabPanel.TabPanelController({ 187 new Clipperz.PM.Components.TabPanel.TabPanelController({
191 name: 'mainTabPanel', 188 name: 'mainTabPanel',
192 config:{'recordsTab':'recordsPanel', 189 config:{'recordsTab':'recordsPanel',
193 'accountTab':'accountPanel', 190 'accountTab':'accountPanel',
194 'dataTab':'dataPanel', 191 'dataTab':'dataPanel',
195 // 'contactsTab':'contactsPanel', 192 // 'contactsTab':'contactsPanel',
196 'toolsTab':'toolsPanel'}, 193 'toolsTab':'toolsPanel'},
197 selectedTab:'recordsTab' 194 selectedTab:'recordsTab'
198 }).setUp(); 195 }).setUp();
199 196
200 new Clipperz.PM.Components.Panels.MainPanel(YAHOO.ext.Element.get('recordsPanel'), {user:this.user()}); 197 new Clipperz.PM.Components.Panels.MainPanel(YAHOO.ext.Element.get('recordsPanel'), {user:this.user()});
201 new Clipperz.PM.Components.Panels.AccountPanel(YAHOO.ext.Element.get('accountPanel'), {user:this.user()}); 198 new Clipperz.PM.Components.Panels.AccountPanel(YAHOO.ext.Element.get('accountPanel'), {user:this.user()});
202 new Clipperz.PM.Components.Panels.DataPanel(YAHOO.ext.Element.get('dataPanel'), {user:this.user()}); 199 new Clipperz.PM.Components.Panels.DataPanel(YAHOO.ext.Element.get('dataPanel'), {user:this.user()});
203 // new Clipperz.PM.Components.Panels.ContactsPanel(YAHOO.ext.Element.get('contactsPanel'), {user:this.user()}); 200 // new Clipperz.PM.Components.Panels.ContactsPanel(YAHOO.ext.Element.get('contactsPanel'), {user:this.user()});
204 new Clipperz.PM.Components.Panels.ToolsPanel(YAHOO.ext.Element.get('toolsPanel'), {user:this.user()}); 201 new Clipperz.PM.Components.Panels.ToolsPanel(YAHOO.ext.Element.get('toolsPanel'), {user:this.user()});
205 202
206 this.fixToDrawTheMainTabsCorrectlyOnSafari(); //fix to 203 this.fixToDrawTheMainTabsCorrectlyOnSafari(); //fix to
207//MochiKit.Logging.logDebug("<<< Main.showMainPanels"); 204//MochiKit.Logging.logDebug("<<< Main.showMainPanels");
208 }, 205 },
209 206
210 //------------------------------------------------------------------------- 207 //-------------------------------------------------------------------------
211 208
212 'userConnectedCallback': function(anEvent) { 209 'userConnectedCallback': function(anEvent) {
213//MochiKit.Logging.logDebug(">>> Main.userConnectedCallback"); 210//MochiKit.Logging.logDebug(">>> Main.userConnectedCallback");
214//MochiKit.Logging.logDebug(">>> doConnect - user: " + this.user()); 211//MochiKit.Logging.logDebug(">>> doConnect - user: " + this.user());
215 this.setUser(anEvent.source()); 212 this.setUser(anEvent.source());
216 213
217 if (this.isRunningCompact()) { 214 if (this.isRunningCompact()) {
218 this.showCompactInterface(); 215 this.showCompactInterface();
219 } else { 216 } else {
220 this.showMainPanels(); 217 this.showMainPanels();
221 } 218 }
222//MochiKit.Logging.logDebug("<<< Main.userConnectedCallback"); 219//MochiKit.Logging.logDebug("<<< Main.userConnectedCallback");
223 }, 220 },
224 221
225 //----------------------------------------------------------------------------- 222 //-----------------------------------------------------------------------------
226 223
227 'user': function() { 224 'user': function() {
228 return this._user; 225 return this._user;
229 }, 226 },
230 227
231 'setUser': function(aValue) { 228 'setUser': function(aValue) {
232 this._user = aValue; 229 this._user = aValue;
233 }, 230 },
234 231
235 //----------------------------------------------------------------------------- 232 //-----------------------------------------------------------------------------
236 233
237 'doLogoutEventHandler': function(anEvent) { 234 'doLogoutEventHandler': function(anEvent) {
238 var deferred; 235 var deferred;
239 236
240 anEvent.stop(); 237 anEvent.stop();
241 238
242 deferred = new MochiKit.Async.Deferred(); 239 deferred = new MochiKit.Async.Deferred();
243//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("Main.doLogoutEventHandler - 1: " + res); return res;}); 240//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("Main.doLogoutEventHandler - 1: " + res); return res;});
244 deferred.addCallback(MochiKit.Base.method(this.user(), 'doLogout')); 241 deferred.addCallback(MochiKit.Base.method(this.user(), 'doLogout'));
245//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("Main.doLogoutEventHandler - 2: " + res); return res;}); 242//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("Main.doLogoutEventHandler - 2: " + res); return res;});
246 deferred.addCallback(Clipperz.PM.exit, 'logout.html'); 243 deferred.addCallback(Clipperz.PM.exit, 'logout.html');
247//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("Main.doLogoutEventHandler - 3: " + res); return res;}); 244//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("Main.doLogoutEventHandler - 3: " + res); return res;});
248 deferred.callback(); 245 deferred.callback();
249 }, 246 },
250 247
251 //----------------------------------------------------------------------------- 248 //-----------------------------------------------------------------------------
252 249
253 'doLockEventHandler': function(anEvent) { 250 'doLockEventHandler': function(anEvent) {
254 vardeferredResult; 251 vardeferredResult;
255 varlockDialogElement; 252 varlockDialogElement;
256 var lockDialog; 253 var lockDialog;
257 var unlockButton; 254 var unlockButton;
258 255
259 anEvent.stop(); 256 anEvent.stop();
260 257
261 Clipperz.NotificationCenter.notify(this, 'accountLocked', null, true); 258 Clipperz.NotificationCenter.notify(this, 'accountLocked', null, true);
262 259
263 lockDialogElement = Clipperz.YUI.DomHelper.append(document.body, {tag:'div', id:'lockDialog', children:[ 260 lockDialogElement = Clipperz.YUI.DomHelper.append(document.body, {tag:'div', id:'lockDialog', children:[
264 {tag:'div', cls:'ydlg-hd', htmlString:Clipperz.PM.Strings['lockTitle']}, 261 {tag:'div', cls:'ydlg-hd', htmlString:Clipperz.PM.Strings['lockTitle']},
265 {tag:'div', cls:'ydlg-bd', children:[ 262 {tag:'div', cls:'ydlg-bd', children:[
266 {tag:'div', cls:'alert-message', id:'lockMessage', children:[ 263 {tag:'div', cls:'alert-message', id:'lockMessage', children:[
267 {tag:'div', htmlString:Clipperz.PM.Strings['lockDescription']}, 264 {tag:'div', htmlString:Clipperz.PM.Strings['lockDescription']},
268 {tag:'form', id:'lockDialogForm', children:[ 265 {tag:'form', id:'lockDialogForm', children:[
269 {tag:'input', type:'password', id:'lockPassphrase'} 266 {tag:'input', type:'password', id:'lockPassphrase'}
270 ]} 267 ]}
271 ]} 268 ]}
272 ]}, 269 ]},
273 {tag:'div', cls:'ydlg-ft'} 270 {tag:'div', cls:'ydlg-ft'}
274 ]}, true); 271 ]}, true);
275 new Clipperz.PM.Components.PasswordEntropyDisplay(YAHOO.ext.Element.get('lockPassphrase')); 272 new Clipperz.PM.Components.PasswordEntropyDisplay(YAHOO.ext.Element.get('lockPassphrase'));
276 273
277 lockDialog = new YAHOO.ext.BasicDialog( 274 lockDialog = new YAHOO.ext.BasicDialog(
278 lockDialogElement, { 275 lockDialogElement, {
279 closable:false, 276 closable:false,
280 modal:true, 277 modal:true,
281 autoTabs:false, 278 autoTabs:false,
282 resizable:false, 279 resizable:false,
283 fixedcenter:true, 280 fixedcenter:true,
284 constraintoviewport:false, 281 constraintoviewport:false,
285 width:350, 282 width:350,
286 height:130, 283 height:130,
287 shadow:true 284 shadow:true
288 } 285 }
289 ); 286 );
290 287
291 unlockButton = lockDialog.addButton(Clipperz.PM.Strings['unlockButtonLabel'], MochiKit.Base.method(this, 'exitLock', lockDialog)); 288 unlockButton = lockDialog.addButton(Clipperz.PM.Strings['unlockButtonLabel'], MochiKit.Base.method(this, 'exitLock', lockDialog));
292//MochiKit.Logging.logDebug("--- Main.showAlertDialog - 5"); 289//MochiKit.Logging.logDebug("--- Main.showAlertDialog - 5");
293 lockDialog.setDefaultButton(unlockButton); 290 lockDialog.setDefaultButton(unlockButton);
294 291
295 MochiKit.Signal.connect('lockDialogForm', 'onsubmit', MochiKit.Base.method(this, 'exitLock', lockDialog)); 292 MochiKit.Signal.connect('lockDialogForm', 'onsubmit', MochiKit.Base.method(this, 'exitLock', lockDialog));
296 lockDialog.on('show', function() {YAHOO.ext.Element.get('lockPassphrase').focus();}); 293 lockDialog.on('show', function() {YAHOO.ext.Element.get('lockPassphrase').focus();});
297 lockDialog.show('main'); 294 lockDialog.show('main');
298 // this.user().lock(); 295 // this.user().lock();
299 }, 296 },
300 297
301 'exitLock': function(aLockDialog, anEvent) { 298 'exitLock': function(aLockDialog, anEvent) {
302 // var deferredResult; 299 // var deferredResult;
303 300
304//MochiKit.Logging.logDebug(">>> Exiting lock"); 301//MochiKit.Logging.logDebug(">>> Exiting lock");
305 if (typeof(anEvent.stop) != 'undefined') { 302 if (typeof(anEvent.stop) != 'undefined') {
306 anEvent.stop(); 303 anEvent.stop();
307 } 304 }
308 305
309 if (this.user().passphrase() == YAHOO.ext.Element.get('lockPassphrase').dom.value) { 306 if (this.user().passphrase() == YAHOO.ext.Element.get('lockPassphrase').dom.value) {
310 aLockDialog.hide(MochiKit.Base.method(aLockDialog, 'destroy', true)); 307 aLockDialog.hide(MochiKit.Base.method(aLockDialog, 'destroy', true));
311 Clipperz.NotificationCenter.notify(this, 'accountUnlocked', null, true); 308 Clipperz.NotificationCenter.notify(this, 'accountUnlocked', null, true);
312 } else { 309 } else {
313 YAHOO.ext.Element.get('lockPassphrase').dom.value = ""; 310 YAHOO.ext.Element.get('lockPassphrase').dom.value = "";
314 YAHOO.ext.Element.get('lockPassphrase').focus(); 311 YAHOO.ext.Element.get('lockPassphrase').focus();
315 } 312 }
316 313
317 // deferredResult = new MochiKit.Async.Deferred(); 314 // deferredResult = new MochiKit.Async.Deferred();
318 // deferredResult.addCallback(MochiKit.Base.method(this.user(), 'unlockWithPassphrase')); 315 // deferredResult.addCallback(MochiKit.Base.method(this.user(), 'unlockWithPassphrase'));
319 // deferredResult.addCallback(MochiKit.Base.method(aLockDialog, 'hide', MochiKit.Base.method(aLockDialog, 'destroy', true))); 316 // deferredResult.addCallback(MochiKit.Base.method(aLockDialog, 'hide', MochiKit.Base.method(aLockDialog, 'destroy', true)));
320 // deferredResult.addCallback(MochiKit.Base.method(Clipperz.NotificationCenter, 'notify', this, 'accountUnlocked', null, true)); 317 // deferredResult.addCallback(MochiKit.Base.method(Clipperz.NotificationCenter, 'notify', this, 'accountUnlocked', null, true));
321 // deferredResult.addErrback(function() { 318 // deferredResult.addErrback(function() {
322 // YAHOO.ext.Element.get('lockPassphrase').dom.value = ""; 319 // YAHOO.ext.Element.get('lockPassphrase').dom.value = "";
323 // YAHOO.ext.Element.get('lockPassphrase').focus(); 320 // YAHOO.ext.Element.get('lockPassphrase').focus();
324 // }); 321 // });
325 // deferredResult.callback(YAHOO.ext.Element.get('lockPassphrase').dom.value); 322 // deferredResult.callback(YAHOO.ext.Element.get('lockPassphrase').dom.value);
326 323
327 return false; 324 return false;
328 }, 325 },
329 326
330 //----------------------------------------------------------------------------- 327 //-----------------------------------------------------------------------------
331 328
332 'updateProgressDialogStatus': function(anEvent) { 329 'updateProgressDialogStatus': function(anEvent) {
333//MochiKit.Logging.logDebug(">>> main.updateProgressDialogStatus - " + anEvent.parameters()); 330//MochiKit.Logging.logDebug(">>> main.updateProgressDialogStatus - " + anEvent.parameters());
334//try { 331//try {
335 if (Clipperz.Base.objectType(anEvent.parameters()) == 'string') { 332 if (Clipperz.Base.objectType(anEvent.parameters()) == 'string') {
336 Clipperz.PM.Components.MessageBox().update(Clipperz.PM.Strings.messagePanelConfigurations[anEvent.parameters()]()); 333 Clipperz.PM.Components.MessageBox().update(Clipperz.PM.Strings.messagePanelConfigurations[anEvent.parameters()]());
337 } else { 334 } else {
338 Clipperz.PM.Components.MessageBox().update(anEvent.parameters()); 335 Clipperz.PM.Components.MessageBox().update(anEvent.parameters());
339 } 336 }
340//} catch (exception) { 337//} catch (exception) {
341//console.log("updateProgressDialogStatus - anEvent", anEvent); 338//console.log("updateProgressDialogStatus - anEvent", anEvent);
342 //MochiKit.Logging.logError("Main.updateProgressDialogStatus: " + exception); 339 //MochiKit.Logging.logError("Main.updateProgressDialogStatus: " + exception);
343 //throw exception; 340 //throw exception;
344//} 341//}
345//MochiKit.Logging.logDebug("<<< main.updateProgressDialogStatus"); 342//MochiKit.Logging.logDebug("<<< main.updateProgressDialogStatus");
346 }, 343 },
347 344
348 //----------------------------------------------------------------------------- 345 //-----------------------------------------------------------------------------
349 346
350 'defaultErrorHandler': function(anErrorString, anException) { 347 'defaultErrorHandler': function(anErrorString, anException) {
351MochiKit.Logging.logDebug(">>> DEFAULT ERROR HANDLER: " + anErrorString + " (exception: " + Clipperz.Base.serializeJSON(anException) + ")"); 348MochiKit.Logging.logDebug(">>> DEFAULT ERROR HANDLER: " + anErrorString + " (exception: " + Clipperz.Base.serializeJSON(anException) + ")");
352 }, 349 },
353 350
354 //----------------------------------------------------------------------------- 351 //-----------------------------------------------------------------------------
355 352
356 'isRunningCompact': function() { 353 'isRunningCompact': function() {
357 return this._isRunningCompact; 354 return this._isRunningCompact;
358 }, 355 },
359 356
360 'setIsRunningCompact': function(aValue) { 357 'setIsRunningCompact': function(aValue) {
361 this._isRunningCompact = aValue; 358 this._isRunningCompact = aValue;
362 }, 359 },
363 360
364 //----------------------------------------------------------------------------- 361 //-----------------------------------------------------------------------------
365 362
366 'reportException': function(anError) { 363 'reportException': function(anError) {
367/* 364/*
368 var deferredResult; 365 var deferredResult;
369 366
370 deferredResult = new MochiKit.Async.Deferred(); 367 deferredResult = new MochiKit.Async.Deferred();
371 368
372 Clipperz.PM.Components.MessageBox().show( 369 Clipperz.PM.Components.MessageBox().show(
373 { 370 {
374 title:Clipperz.PM.Strings['fatalErrorMessageTitle'], 371 title:Clipperz.PM.Strings['fatalErrorMessageTitle'],
375 text:Clipperz.PM.Strings['fatalErrorMessageText'], 372 text:Clipperz.PM.Strings['fatalErrorMessageText'],
376 width:240, 373 width:240,
377 showProgressBar:false, 374 showProgressBar:false,
378 showCloseButton:false, 375 showCloseButton:false,
379 fn:MochiKit.Base.method(deferredResult, 'callback'), 376 fn:MochiKit.Base.method(deferredResult, 'callback'),
380 scope:this, 377 scope:this,
381 buttons:{ 378 buttons:{
382 'ok':Clipperz.PM.Strings['fatalErrorMessageCloseButtonLabel'] 379 'ok':Clipperz.PM.Strings['fatalErrorMessageCloseButtonLabel']
383 } 380 }
384 } 381 }
385 ); 382 );
386 383
387 deferredResult.addCallback(function() { 384 deferredResult.addCallback(function() {
388 window.document.body.innerHTML = ""; 385 window.document.body.innerHTML = "";
389 window.location.reload(true); 386 window.location.reload(true);
390 }); 387 });
391*/ 388*/
392 Clipperz.PM.exit('error.html'); 389 Clipperz.PM.exit('error.html');
393 }, 390 },
394 391
395 //----------------------------------------------------------------------------- 392 //-----------------------------------------------------------------------------
396 __syntaxFix__: "syntax fix" 393 __syntaxFix__: "syntax fix"
397 394
398}); 395});
399 396
400 397
401 398
402//############################################################################# 399//#############################################################################
403 400
404MochiKit.Base.update(Clipperz.PM, { 401MochiKit.Base.update(Clipperz.PM, {
405 402
406 __repr__: function() { 403 __repr__: function() {
407 return "[" + this.NAME + " " + this.VERSION + "]"; 404 return "[" + this.NAME + " " + this.VERSION + "]";
408 }, 405 },
diff --git a/frontend/beta/js/Clipperz/PM/Proxy.js b/frontend/beta/js/Clipperz/PM/Proxy.js
index d05a5e0..f476196 100644
--- a/frontend/beta/js/Clipperz/PM/Proxy.js
+++ b/frontend/beta/js/Clipperz/PM/Proxy.js
@@ -1,173 +1,170 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31 28
32//============================================================================= 29//=============================================================================
33 30
34Clipperz.PM.Proxy = function(args) { 31Clipperz.PM.Proxy = function(args) {
35 args = args || {}; 32 args = args || {};
36 33
37 this._shouldPayTolls = args.shouldPayTolls || false; 34 this._shouldPayTolls = args.shouldPayTolls || false;
38 35
39 this._tolls = { 36 this._tolls = {
40 'CONNECT':[], 37 'CONNECT':[],
41 'REGISTER':[], 38 'REGISTER':[],
42 'MESSAGE':[] 39 'MESSAGE':[]
43 }; 40 };
44 41
45 if (args.isDefault === true) { 42 if (args.isDefault === true) {
46 Clipperz.PM.Proxy.defaultProxy = this; 43 Clipperz.PM.Proxy.defaultProxy = this;
47 } 44 }
48 45
49 return this; 46 return this;
50} 47}
51 48
52Clipperz.PM.Proxy.prototype = MochiKit.Base.update(null, { 49Clipperz.PM.Proxy.prototype = MochiKit.Base.update(null, {
53 50
54 'toString': function() { 51 'toString': function() {
55 return "Clipperz.PM.Proxy"; 52 return "Clipperz.PM.Proxy";
56 }, 53 },
57 54
58 //========================================================================= 55 //=========================================================================
59 56
60 'shouldPayTolls': function() { 57 'shouldPayTolls': function() {
61 return this._shouldPayTolls; 58 return this._shouldPayTolls;
62 }, 59 },
63 60
64 //------------------------------------------------------------------------- 61 //-------------------------------------------------------------------------
65 62
66 'tolls': function() { 63 'tolls': function() {
67 return this._tolls; 64 return this._tolls;
68 }, 65 },
69 66
70 //------------------------------------------------------------------------- 67 //-------------------------------------------------------------------------
71 68
72 'payToll': function(aRequestType, someParameters) { 69 'payToll': function(aRequestType, someParameters) {
73 vardeferredResult; 70 vardeferredResult;
74 71
75//console.log(">>> Proxy.payToll", aRequestType, someParameters); 72//console.log(">>> Proxy.payToll", aRequestType, someParameters);
76 if (this.shouldPayTolls()) { 73 if (this.shouldPayTolls()) {
77 deferredResult = new MochiKit.Async.Deferred(); 74 deferredResult = new MochiKit.Async.Deferred();
78 75
79 if (this.tolls()[aRequestType].length == 0) { 76 if (this.tolls()[aRequestType].length == 0) {
80 deferredResult.addCallback(MochiKit.Base.method(this, 'sendMessage', 'knock', {requestType:aRequestType})); 77 deferredResult.addCallback(MochiKit.Base.method(this, 'sendMessage', 'knock', {requestType:aRequestType}));
81 deferredResult.addCallback(MochiKit.Base.method(this, 'setTollCallback')); 78 deferredResult.addCallback(MochiKit.Base.method(this, 'setTollCallback'));
82 } 79 }
83 deferredResult.addCallback(MochiKit.Base.method(this.tolls()[aRequestType], 'pop')); 80 deferredResult.addCallback(MochiKit.Base.method(this.tolls()[aRequestType], 'pop'));
84 deferredResult.addCallback(MochiKit.Base.methodcaller('deferredPay')); 81 deferredResult.addCallback(MochiKit.Base.methodcaller('deferredPay'));
85 deferredResult.addCallback(function(aToll) { 82 deferredResult.addCallback(function(aToll) {
86 var result; 83 var result;
87 84
88 result = { 85 result = {
89 parameters: someParameters, 86 parameters: someParameters,
90 toll: aToll 87 toll: aToll
91 } 88 }
92 89
93 return result; 90 return result;
94 }); 91 });
95 92
96 deferredResult.callback(); 93 deferredResult.callback();
97 } else { 94 } else {
98 deferredResult = MochiKit.Async.succeed({parameters:someParameters}); 95 deferredResult = MochiKit.Async.succeed({parameters:someParameters});
99 } 96 }
100//console.log("<<< Proxy.payToll"); 97//console.log("<<< Proxy.payToll");
101 98
102 return deferredResult; 99 return deferredResult;
103 }, 100 },
104 101
105 //------------------------------------------------------------------------- 102 //-------------------------------------------------------------------------
106 103
107 'addToll': function(aToll) { 104 'addToll': function(aToll) {
108//console.log(">>> Proxy.addToll", aToll); 105//console.log(">>> Proxy.addToll", aToll);
109 this.tolls()[aToll.requestType()].push(aToll); 106 this.tolls()[aToll.requestType()].push(aToll);
110//console.log("<<< Proxy.addToll"); 107//console.log("<<< Proxy.addToll");
111 }, 108 },
112 109
113 //========================================================================= 110 //=========================================================================
114 111
115 'setTollCallback': function(someParameters) { 112 'setTollCallback': function(someParameters) {
116//console.log(">>> Proxy.setTollCallback", someParameters); 113//console.log(">>> Proxy.setTollCallback", someParameters);
117 if (typeof(someParameters['toll']) != 'undefined') { 114 if (typeof(someParameters['toll']) != 'undefined') {
118//console.log("added a new toll", someParameters['toll']); 115//console.log("added a new toll", someParameters['toll']);
119 this.addToll(new Clipperz.PM.Toll(someParameters['toll'])); 116 this.addToll(new Clipperz.PM.Toll(someParameters['toll']));
120 } 117 }
121//console.log("<<< Proxy.setTallCallback", someParameters['result']); 118//console.log("<<< Proxy.setTallCallback", someParameters['result']);
122 //return someParameters['result']; 119 //return someParameters['result'];
123 return someParameters; 120 return someParameters;
124 }, 121 },
125 122
126 //========================================================================= 123 //=========================================================================
127 124
128 'registration': function (someParameters) { 125 'registration': function (someParameters) {
129 return this.processMessage('registration', someParameters, 'REGISTER'); 126 return this.processMessage('registration', someParameters, 'REGISTER');
130 }, 127 },
131 128
132 'handshake': function (someParameters) { 129 'handshake': function (someParameters) {
133 return this.processMessage('handshake', someParameters, 'CONNECT'); 130 return this.processMessage('handshake', someParameters, 'CONNECT');
134 }, 131 },
135 132
136 'message': function (someParameters) { 133 'message': function (someParameters) {
137 return this.processMessage('message', someParameters, 'MESSAGE'); 134 return this.processMessage('message', someParameters, 'MESSAGE');
138 }, 135 },
139 136
140 'logout': function (someParameters) { 137 'logout': function (someParameters) {
141 return this.processMessage('logout', someParameters, 'MESSAGE'); 138 return this.processMessage('logout', someParameters, 'MESSAGE');
142 }, 139 },
143 140
144 //========================================================================= 141 //=========================================================================
145 142
146 'processMessage': function (aFunctionName, someParameters, aRequestType) { 143 'processMessage': function (aFunctionName, someParameters, aRequestType) {
147 vardeferredResult; 144 vardeferredResult;
148 145
149 deferredResult = new MochiKit.Async.Deferred(); 146 deferredResult = new MochiKit.Async.Deferred();
150 deferredResult.addCallback(MochiKit.Base.method(this, 'payToll', aRequestType)); 147 deferredResult.addCallback(MochiKit.Base.method(this, 'payToll', aRequestType));
151 deferredResult.addCallback(MochiKit.Base.method(this, 'sendMessage', aFunctionName)); 148 deferredResult.addCallback(MochiKit.Base.method(this, 'sendMessage', aFunctionName));
152 deferredResult.addCallback(MochiKit.Base.method(this, 'setTollCallback')); 149 deferredResult.addCallback(MochiKit.Base.method(this, 'setTollCallback'));
153 deferredResult.callback(someParameters); 150 deferredResult.callback(someParameters);
154 151
155 return deferredResult; 152 return deferredResult;
156 }, 153 },
157 154
158 //========================================================================= 155 //=========================================================================
159 156
160 'sendMessage': function () { 157 'sendMessage': function () {
161 throw Clipperz.Base.exception.AbstractMethod; 158 throw Clipperz.Base.exception.AbstractMethod;
162 }, 159 },
163 160
164 //========================================================================= 161 //=========================================================================
165 162
166 'isReadOnly': function () { 163 'isReadOnly': function () {
167 return false; 164 return false;
168 }, 165 },
169 166
170 //========================================================================= 167 //=========================================================================
171 __syntaxFix__: "syntax fix" 168 __syntaxFix__: "syntax fix"
172 169
173}); 170});
diff --git a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.JSON.js b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.JSON.js
index 889e1f1..4f3b4b2 100755
--- a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.JSON.js
+++ b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.JSON.js
@@ -1,100 +1,97 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31 28
32//============================================================================= 29//=============================================================================
33 30
34Clipperz.PM.Proxy.JSON = function(args) { 31Clipperz.PM.Proxy.JSON = function(args) {
35 Clipperz.PM.Proxy.JSON.superclass.constructor.call(this, args); 32 Clipperz.PM.Proxy.JSON.superclass.constructor.call(this, args);
36 33
37 this._url = args.url || Clipperz.Base.exception.raise('MandatoryParameter'); 34 this._url = args.url || Clipperz.Base.exception.raise('MandatoryParameter');
38 35
39 return this; 36 return this;
40} 37}
41 38
42YAHOO.extendX(Clipperz.PM.Proxy.JSON, Clipperz.PM.Proxy, { 39YAHOO.extendX(Clipperz.PM.Proxy.JSON, Clipperz.PM.Proxy, {
43 40
44 'toString': function() { 41 'toString': function() {
45 return "Clipperz.PM.Proxy.JSON"; 42 return "Clipperz.PM.Proxy.JSON";
46 }, 43 },
47 44
48 //========================================================================= 45 //=========================================================================
49 46
50 'url': function () { 47 'url': function () {
51 return this._url; 48 return this._url;
52 }, 49 },
53 50
54 //========================================================================= 51 //=========================================================================
55 52
56 'sendMessage': function(aFunctionName, someParameters) { 53 'sendMessage': function(aFunctionName, someParameters) {
57 vardeferredResult; 54 vardeferredResult;
58 var parameters; 55 var parameters;
59 56
60 parameters = { 57 parameters = {
61 method: aFunctionName, 58 method: aFunctionName,
62 // version: someParameters['version'], 59 // version: someParameters['version'],
63 // message: someParameters['message'], 60 // message: someParameters['message'],
64 parameters: Clipperz.Base.serializeJSON(someParameters) 61 parameters: Clipperz.Base.serializeJSON(someParameters)
65 }; 62 };
66 63
67 deferredResult = new MochiKit.Async.Deferred(); 64 deferredResult = new MochiKit.Async.Deferred();
68 deferredResult.addCallback(function (aValue) { 65 deferredResult.addCallback(function (aValue) {
69 MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'remoteRequestSent'); 66 MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'remoteRequestSent');
70 return aValue; 67 return aValue;
71 }); 68 });
72 deferredResult.addCallback(MochiKit.Async.doXHR, this.url(), { 69 deferredResult.addCallback(MochiKit.Async.doXHR, this.url(), {
73 method:'POST', 70 method:'POST',
74 sendContent:MochiKit.Base.queryString(parameters), 71 sendContent:MochiKit.Base.queryString(parameters),
75 headers:{"Content-Type":"application/x-www-form-urlencoded"} 72 headers:{"Content-Type":"application/x-www-form-urlencoded"}
76 }); 73 });
77 deferredResult.addCallback(function (aValue) { 74 deferredResult.addCallback(function (aValue) {
78 MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'remoteRequestReceived'); 75 MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'remoteRequestReceived');
79 return aValue; 76 return aValue;
80 }); 77 });
81 // deferredResult.addCallback(MochiKit.Async.evalJSONRequest); 78 // deferredResult.addCallback(MochiKit.Async.evalJSONRequest);
82 deferredResult.addCallback(MochiKit.Base.itemgetter('responseText')); 79 deferredResult.addCallback(MochiKit.Base.itemgetter('responseText'));
83 deferredResult.addCallback(Clipperz.Base.evalJSON); 80 deferredResult.addCallback(Clipperz.Base.evalJSON);
84 deferredResult.addCallback(function (someValues) { 81 deferredResult.addCallback(function (someValues) {
85 if (someValues['result'] == 'EXCEPTION') { 82 if (someValues['result'] == 'EXCEPTION') {
86 throw someValues['message']; 83 throw someValues['message'];
87 } 84 }
88 85
89 return someValues; 86 return someValues;
90 }) 87 })
91 // return MochiKit.Base.evalJSON(req.responseText); 88 // return MochiKit.Base.evalJSON(req.responseText);
92 deferredResult.callback(); 89 deferredResult.callback();
93 90
94 return deferredResult; 91 return deferredResult;
95 }, 92 },
96 93
97 //========================================================================= 94 //=========================================================================
98 __syntaxFix__: "syntax fix" 95 __syntaxFix__: "syntax fix"
99 96
100}); 97});
diff --git a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js
index 4d3ba08..d5336be 100644
--- a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js
+++ b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29try { if (typeof(Clipperz.PM.Proxy.Offline) == 'undefined') { throw ""; }} catch (e) { 26try { if (typeof(Clipperz.PM.Proxy.Offline) == 'undefined') { throw ""; }} catch (e) {
30 throw "Clipperz.PM.Proxy.Offline.DataStore depends on Clipperz.PM.Proxy.Offline!"; 27 throw "Clipperz.PM.Proxy.Offline.DataStore depends on Clipperz.PM.Proxy.Offline!";
31} 28}
32 29
33//============================================================================= 30//=============================================================================
34 31
35Clipperz.PM.Proxy.Offline.DataStore = function(args) { 32Clipperz.PM.Proxy.Offline.DataStore = function(args) {
36 args = args || {}; 33 args = args || {};
37 34
38 this._data = args.data || (typeof(_clipperz_dump_data_) != 'undefined' ? _clipperz_dump_data_ : null); 35 this._data = args.data || (typeof(_clipperz_dump_data_) != 'undefined' ? _clipperz_dump_data_ : null);
39 this._isReadOnly = (typeof(args.readOnly) == 'undefined' ? true : args.readOnly); 36 this._isReadOnly = (typeof(args.readOnly) == 'undefined' ? true : args.readOnly);
40 this._shouldPayTolls = args.shouldPayTolls || false; 37 this._shouldPayTolls = args.shouldPayTolls || false;
41 38
42 this._tolls = {}; 39 this._tolls = {};
43 this._connections = {}; 40 this._connections = {};
44 41
45 this._b = null; 42 this._b = null;
46 this._B = null; 43 this._B = null;
47 this._A = null; 44 this._A = null;
48 this._userData = null; 45 this._userData = null;
49 46
50 return this; 47 return this;
51} 48}
52 49
53//Clipperz.Base.extend(Clipperz.PM.Proxy.Offline.DataStore, Object, { 50//Clipperz.Base.extend(Clipperz.PM.Proxy.Offline.DataStore, Object, {
54Clipperz.PM.Proxy.Offline.DataStore.prototype = MochiKit.Base.update(null, { 51Clipperz.PM.Proxy.Offline.DataStore.prototype = MochiKit.Base.update(null, {
55 52
56 //------------------------------------------------------------------------- 53 //-------------------------------------------------------------------------
57 54
58 'isReadOnly': function () { 55 'isReadOnly': function () {
59 return this._isReadOnly; 56 return this._isReadOnly;
60 }, 57 },
61 58
62 //------------------------------------------------------------------------- 59 //-------------------------------------------------------------------------
63 60
64 'shouldPayTolls': function() { 61 'shouldPayTolls': function() {
65 return this._shouldPayTolls; 62 return this._shouldPayTolls;
66 }, 63 },
67 64
68 //------------------------------------------------------------------------- 65 //-------------------------------------------------------------------------
69 66
70 'data': function () { 67 'data': function () {
71 return this._data; 68 return this._data;
72 }, 69 },
73 70
74 //------------------------------------------------------------------------- 71 //-------------------------------------------------------------------------
75 72
76 'tolls': function () { 73 'tolls': function () {
77 return this._tolls; 74 return this._tolls;
78 }, 75 },
79 76
80 //------------------------------------------------------------------------- 77 //-------------------------------------------------------------------------
81 78
82 'connections': function () { 79 'connections': function () {
83 return this._connections; 80 return this._connections;
84 }, 81 },
85 82
86 //========================================================================= 83 //=========================================================================
87 84
88 'resetData': function() { 85 'resetData': function() {
89 this._data = { 86 this._data = {
90 'users': { 87 'users': {
91 'catchAllUser': { 88 'catchAllUser': {
92 __masterkey_test_value__: 'masterkey', 89 __masterkey_test_value__: 'masterkey',
93 s: '112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00', 90 s: '112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00',
94 v: '112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00' 91 v: '112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00'
95 } 92 }
96 } 93 }
97 }; 94 };
98 }, 95 },
99 96
100 //------------------------------------------------------------------------- 97 //-------------------------------------------------------------------------
101 98
102 'setupWithEncryptedData': function(someData) { 99 'setupWithEncryptedData': function(someData) {
103 this._data = Clipperz.Base.deepClone(someData); 100 this._data = Clipperz.Base.deepClone(someData);
104 }, 101 },
105 102
106 //------------------------------------------------------------------------- 103 //-------------------------------------------------------------------------
107 104
108 'setupWithData': function(someData) { 105 'setupWithData': function(someData) {
109 var deferredResult; 106 var deferredResult;
110 var resultData; 107 var resultData;
111 var i, c; 108 var i, c;
112 109
113//Clipperz.log(">>> Proxy.Test.setupWithData"); 110//Clipperz.log(">>> Proxy.Test.setupWithData");
114 resultData = this._data; 111 resultData = this._data;
115 112
116 deferredResult = new MochiKit.Async.Deferred(); 113 deferredResult = new MochiKit.Async.Deferred();
117 c = someData['users'].length; 114 c = someData['users'].length;
118 115
119 for (i=0; i<c; i++) { 116 for (i=0; i<c; i++) {
120 varnewConnection; 117 varnewConnection;
121 varrecordConfiguration; 118 varrecordConfiguration;
122 119
123 deferredResult.addCallback(MochiKit.Base.method(this, 'userSerializedEncryptedData', someData['users'][i])); 120 deferredResult.addCallback(MochiKit.Base.method(this, 'userSerializedEncryptedData', someData['users'][i]));
124 deferredResult.addCallback(MochiKit.Base.bind(function(aUserSerializationContext) { 121 deferredResult.addCallback(MochiKit.Base.bind(function(aUserSerializationContext) {
125//console.log("SERIALIZED USER", aUserSerializationContext); 122//console.log("SERIALIZED USER", aUserSerializationContext);
126 resultData['users'][aUserSerializationContext['credentials']['C']] = { 123 resultData['users'][aUserSerializationContext['credentials']['C']] = {
127 's': aUserSerializationContext['credentials']['s'], 124 's': aUserSerializationContext['credentials']['s'],
128 'v': aUserSerializationContext['credentials']['v'], 125 'v': aUserSerializationContext['credentials']['v'],
129 'version': aUserSerializationContext['data']['connectionVersion'], 126 'version': aUserSerializationContext['data']['connectionVersion'],
130 'userDetails': aUserSerializationContext['encryptedData']['user']['header'], 127 'userDetails': aUserSerializationContext['encryptedData']['user']['header'],
131 'userDetailsVersion':aUserSerializationContext['encryptedData']['user']['version'], 128 'userDetailsVersion':aUserSerializationContext['encryptedData']['user']['version'],
132 'statistics': aUserSerializationContext['encryptedData']['user']['statistics'], 129 'statistics': aUserSerializationContext['encryptedData']['user']['statistics'],
133 'lock': aUserSerializationContext['encryptedData']['user']['lock'], 130 'lock': aUserSerializationContext['encryptedData']['user']['lock'],
134 'records': this.rearrangeRecordsData(aUserSerializationContext['encryptedData']['records']) 131 'records': this.rearrangeRecordsData(aUserSerializationContext['encryptedData']['records'])
135 } 132 }
136 }, this)); 133 }, this));
137 } 134 }
138 135
139 deferredResult.addCallback(MochiKit.Base.bind(function() { 136 deferredResult.addCallback(MochiKit.Base.bind(function() {
140//console.log("this._data", resultData); 137//console.log("this._data", resultData);
141 this._data = resultData; 138 this._data = resultData;
142 }, this)); 139 }, this));
143 140
144 deferredResult.callback(); 141 deferredResult.callback();
145//Clipperz.log("<<< Proxy.Test.setupWithData"); 142//Clipperz.log("<<< Proxy.Test.setupWithData");
146 143
147 return deferredResult; 144 return deferredResult;
148 }, 145 },
149 146
150 //========================================================================= 147 //=========================================================================
151 148
152 'b': function() { 149 'b': function() {
153 return this._b; 150 return this._b;
154 }, 151 },
155 152
156 'set_b': function(aValue) { 153 'set_b': function(aValue) {
157 this._b = aValue; 154 this._b = aValue;
158 }, 155 },
159 156
160 //------------------------------------------------------------------------- 157 //-------------------------------------------------------------------------
161 158
162 'B': function() { 159 'B': function() {
163 return this._B; 160 return this._B;
164 }, 161 },
165 162
166 'set_B': function(aValue) { 163 'set_B': function(aValue) {
167 this._B = aValue; 164 this._B = aValue;
168 }, 165 },
169 166
170 //------------------------------------------------------------------------- 167 //-------------------------------------------------------------------------
171 168
172 'A': function() { 169 'A': function() {
173 return this._A; 170 return this._A;
174 }, 171 },
175 172
176 'set_A': function(aValue) { 173 'set_A': function(aValue) {
177 this._A = aValue; 174 this._A = aValue;
178 }, 175 },
179 176
180 //------------------------------------------------------------------------- 177 //-------------------------------------------------------------------------
181 178
182 'userData': function() { 179 'userData': function() {
183 return this._userData; 180 return this._userData;
184 }, 181 },
185 182
186 'setUserData': function(aValue) { 183 'setUserData': function(aValue) {
187 this._userData = aValue; 184 this._userData = aValue;
188 }, 185 },
189 186
190 //========================================================================= 187 //=========================================================================
191 188
192 'getTollForRequestType': function (aRequestType) { 189 'getTollForRequestType': function (aRequestType) {
193 varresult; 190 varresult;
194 vartargetValue; 191 vartargetValue;
195 var cost; 192 var cost;
196 193
197 targetValue = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32).toHexString().substring(2); 194 targetValue = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32).toHexString().substring(2);
198 switch (aRequestType) { 195 switch (aRequestType) {
199 case 'REGISTER': 196 case 'REGISTER':
200 cost = 5; 197 cost = 5;
201 break; 198 break;
202 case 'CONNECT': 199 case 'CONNECT':
203 cost = 5; 200 cost = 5;
204 break; 201 break;
205 case 'MESSAGE': 202 case 'MESSAGE':
206 cost = 2; 203 cost = 2;
207 break; 204 break;
208 } 205 }
209 206
210 result = { 207 result = {
211 requestType: aRequestType, 208 requestType: aRequestType,
212 targetValue: targetValue, 209 targetValue: targetValue,
213 cost: cost 210 cost: cost
214 } 211 }
215 212
216 if (this.shouldPayTolls()) { 213 if (this.shouldPayTolls()) {
217 this.tolls()[targetValue] = result; 214 this.tolls()[targetValue] = result;
218 } 215 }
219 216
220 return result; 217 return result;
221 }, 218 },
222 219
223 //------------------------------------------------------------------------- 220 //-------------------------------------------------------------------------
224 221
225 'checkToll': function (aFunctionName, someParameters) { 222 'checkToll': function (aFunctionName, someParameters) {
226 if (this.shouldPayTolls()) { 223 if (this.shouldPayTolls()) {
227 var localToll; 224 var localToll;
228 vartollParameters; 225 vartollParameters;
229 226
230 tollParameters = someParameters['toll']; 227 tollParameters = someParameters['toll'];
231 localToll = this.tolls()[tollParameters['targetValue']]; 228 localToll = this.tolls()[tollParameters['targetValue']];
232 229
233 if (localToll != null) { 230 if (localToll != null) {
234 if (! Clipperz.PM.Toll.validate(tollParameters['targetValue'], tollParameters['toll'], localToll['cost'])) { 231 if (! Clipperz.PM.Toll.validate(tollParameters['targetValue'], tollParameters['toll'], localToll['cost'])) {
235 throw "Toll value too low."; 232 throw "Toll value too low.";
236 }; 233 };
237 } else { 234 } else {
238 throw "Missing toll"; 235 throw "Missing toll";
239 } 236 }
240 } 237 }
241 }, 238 },
242 239
243 //========================================================================= 240 //=========================================================================
244 241
245 'processMessage': function(aFunctionName, someParameters) { 242 'processMessage': function(aFunctionName, someParameters) {
246 var result; 243 var result;
247 244
248 switch(aFunctionName) { 245 switch(aFunctionName) {
249 case 'knock': 246 case 'knock':
250 result = this._knock(someParameters); 247 result = this._knock(someParameters);
251 break; 248 break;
252 case 'registration': 249 case 'registration':
253 this.checkToll(aFunctionName, someParameters); 250 this.checkToll(aFunctionName, someParameters);
254 result = this._registration(someParameters.parameters); 251 result = this._registration(someParameters.parameters);
255 break; 252 break;
256 case 'handshake': 253 case 'handshake':
257 this.checkToll(aFunctionName, someParameters); 254 this.checkToll(aFunctionName, someParameters);
258 result = this._handshake(someParameters.parameters); 255 result = this._handshake(someParameters.parameters);
259 break; 256 break;
260 case 'message': 257 case 'message':
261 this.checkToll(aFunctionName, someParameters); 258 this.checkToll(aFunctionName, someParameters);
262 result = this._message(someParameters.parameters); 259 result = this._message(someParameters.parameters);
263 break; 260 break;
264 case 'logout': 261 case 'logout':
265 result = this._logout(someParameters.parameters); 262 result = this._logout(someParameters.parameters);
266 break; 263 break;
267 } 264 }
268 265
269 return result; 266 return result;
270 }, 267 },
271 268
272 //========================================================================= 269 //=========================================================================
273 270
274 '_knock': function(someParameters) { 271 '_knock': function(someParameters) {
275 var result; 272 var result;
276 273
277 result = { 274 result = {
278 toll: this.getTollForRequestType(someParameters['requestType']) 275 toll: this.getTollForRequestType(someParameters['requestType'])
279 // toll: { 276 // toll: {
280 // requestType: someParameters['requestType'], 277 // requestType: someParameters['requestType'],
281 // targetValue: "3a1ba0be23580f902885c6c8a6b035e228ed1ca74d77de5f9bb0e0c899f07cfe", 278 // targetValue: "3a1ba0be23580f902885c6c8a6b035e228ed1ca74d77de5f9bb0e0c899f07cfe",
282 // cost: 279 // cost:
283 // } 280 // }
284 } 281 }
285 282
286 return result; 283 return result;
287 }, 284 },
288 285
289 //------------------------------------------------------------------------- 286 //-------------------------------------------------------------------------
290 287
291 '_registration': function(someParameters) { 288 '_registration': function(someParameters) {
292//console.log("_registration", someParameters); 289//console.log("_registration", someParameters);
293 if (this.isReadOnly() == false) { 290 if (this.isReadOnly() == false) {
294 if (typeof(this.data()['users'][someParameters['credentials']['C']]) == 'undefined') { 291 if (typeof(this.data()['users'][someParameters['credentials']['C']]) == 'undefined') {
295 this.data()['users'][someParameters['credentials']['C']] = { 292 this.data()['users'][someParameters['credentials']['C']] = {
296 's': someParameters['credentials']['s'], 293 's': someParameters['credentials']['s'],
297 'v': someParameters['credentials']['v'], 294 'v': someParameters['credentials']['v'],
298 'version':someParameters['credentials']['version'], 295 'version':someParameters['credentials']['version'],
299 // 'lock': someParameters['user']['lock'], 296 // 'lock': someParameters['user']['lock'],
300 'lock': Clipperz.Crypto.Base.generateRandomSeed(), 297 'lock': Clipperz.Crypto.Base.generateRandomSeed(),
301 // 'maxNumberOfRecords':'100', 298 // 'maxNumberOfRecords':'100',
302 'userDetails': someParameters['user']['header'], 299 'userDetails': someParameters['user']['header'],
303 'statistics': someParameters['user']['statistics'], 300 'statistics': someParameters['user']['statistics'],
304 'userDetailsVersion':someParameters['user']['version'], 301 'userDetailsVersion':someParameters['user']['version'],
305 'records':{} 302 'records':{}
306 } 303 }
307 } else { 304 } else {
308 throw "user already exists"; 305 throw "user already exists";
309 } 306 }
310 } else { 307 } else {
311 throw Clipperz.PM.Proxy.Offline.DataStore.exception.ReadOnly; 308 throw Clipperz.PM.Proxy.Offline.DataStore.exception.ReadOnly;
312 } 309 }
313 310
314 result = { 311 result = {
315 result: { 312 result: {
316 'lock': this.data()['users'][someParameters['credentials']['C']]['lock'], 313 'lock': this.data()['users'][someParameters['credentials']['C']]['lock'],
317 'result':'done' 314 'result':'done'
318 }, 315 },
319 toll: this.getTollForRequestType('CONNECT') 316 toll: this.getTollForRequestType('CONNECT')
320 } 317 }
321 318
322 return MochiKit.Async.succeed(result); 319 return MochiKit.Async.succeed(result);
323 }, 320 },
324 321
325 //------------------------------------------------------------------------- 322 //-------------------------------------------------------------------------
326 323
327 '_handshake': function(someParameters) { 324 '_handshake': function(someParameters) {
328 var result; 325 var result;
329 varnextTollRequestType; 326 varnextTollRequestType;
330 327
331//Clipperz.log(">>> Proxy.Offline.DataStore._handshake"); 328//Clipperz.log(">>> Proxy.Offline.DataStore._handshake");
332 result = {}; 329 result = {};
333 if (someParameters.message == "connect") { 330 if (someParameters.message == "connect") {
334 var userData; 331 var userData;
335 var randomBytes; 332 var randomBytes;
336 var b, B, v; 333 var b, B, v;
337 334
338//console.log(">>> Proxy.Offline.DataStore._handshake.connect", someParameters); 335//console.log(">>> Proxy.Offline.DataStore._handshake.connect", someParameters);
339 userData = this.data()['users'][someParameters.parameters.C]; 336 userData = this.data()['users'][someParameters.parameters.C];
340 337
341 if ((typeof(userData) != 'undefined') && (userData['version'] == someParameters.version)) { 338 if ((typeof(userData) != 'undefined') && (userData['version'] == someParameters.version)) {
342 this.setUserData(userData); 339 this.setUserData(userData);
343 } else { 340 } else {
344 this.setUserData(this.data()['users']['catchAllUser']); 341 this.setUserData(this.data()['users']['catchAllUser']);
345 } 342 }
346 343
347 randomBytes = Clipperz.Crypto.Base.generateRandomSeed(); 344 randomBytes = Clipperz.Crypto.Base.generateRandomSeed();
348 this.set_b(new Clipperz.Crypto.BigInt(randomBytes, 16)); 345 this.set_b(new Clipperz.Crypto.BigInt(randomBytes, 16));
349 v = new Clipperz.Crypto.BigInt(this.userData()['v'], 16); 346 v = new Clipperz.Crypto.BigInt(this.userData()['v'], 16);
350 this.set_B(v.add(Clipperz.Crypto.SRP.g().powerModule(this.b(), Clipperz.Crypto.SRP.n()))); 347 this.set_B(v.add(Clipperz.Crypto.SRP.g().powerModule(this.b(), Clipperz.Crypto.SRP.n())));
351 348
352 this.set_A(someParameters.parameters.A); 349 this.set_A(someParameters.parameters.A);
353 350
354 result['s'] = this.userData()['s']; 351 result['s'] = this.userData()['s'];
355 result['B'] = this.B().asString(16); 352 result['B'] = this.B().asString(16);
356 353
357 nextTollRequestType = 'CONNECT'; 354 nextTollRequestType = 'CONNECT';
358 } else if (someParameters.message == "credentialCheck") { 355 } else if (someParameters.message == "credentialCheck") {
359 var v, u, S, A, K, M1; 356 var v, u, S, A, K, M1;
360 357
361//console.log(">>> Proxy.Offline.DataStore._handshake.credentialCheck", someParameters); 358//console.log(">>> Proxy.Offline.DataStore._handshake.credentialCheck", someParameters);
362 v = new Clipperz.Crypto.BigInt(this.userData()['v'], 16); 359 v = new Clipperz.Crypto.BigInt(this.userData()['v'], 16);
363 u = new Clipperz.Crypto.BigInt(Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters.version].hash(new Clipperz.ByteArray(this.B().asString(10))).toHexString(), 16); 360 u = new Clipperz.Crypto.BigInt(Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters.version].hash(new Clipperz.ByteArray(this.B().asString(10))).toHexString(), 16);
364 A = new Clipperz.Crypto.BigInt(this.A(), 16); 361 A = new Clipperz.Crypto.BigInt(this.A(), 16);
365 S = (A.multiply(v.powerModule(u, Clipperz.Crypto.SRP.n()))).powerModule(this.b(), Clipperz.Crypto.SRP.n()); 362 S = (A.multiply(v.powerModule(u, Clipperz.Crypto.SRP.n()))).powerModule(this.b(), Clipperz.Crypto.SRP.n());
366 363
367 K = Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters.version].hash(new Clipperz.ByteArray(S.asString(10))).toHexString().slice(2); 364 K = Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters.version].hash(new Clipperz.ByteArray(S.asString(10))).toHexString().slice(2);
368 365
369 M1 = Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters.version].hash(new Clipperz.ByteArray(A.asString(10) + this.B().asString(10) + K)).toHexString().slice(2); 366 M1 = Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters.version].hash(new Clipperz.ByteArray(A.asString(10) + this.B().asString(10) + K)).toHexString().slice(2);
370 if (someParameters.parameters.M1 == M1) { 367 if (someParameters.parameters.M1 == M1) {
371 var M2; 368 var M2;
372 369
373 M2 = Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters.version].hash(new Clipperz.ByteArray(A.asString(10) + someParameters.parameters.M1 + K)).toHexString().slice(2); 370 M2 = Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters.version].hash(new Clipperz.ByteArray(A.asString(10) + someParameters.parameters.M1 + K)).toHexString().slice(2);
374 result['M2'] = M2; 371 result['M2'] = M2;
375 } else { 372 } else {
376 throw new Error("Client checksum verification failed! Expected <" + M1 + ">, received <" + someParameters.parameters.M1 + ">.", "Error"); 373 throw new Error("Client checksum verification failed! Expected <" + M1 + ">, received <" + someParameters.parameters.M1 + ">.", "Error");
377 } 374 }
378 375
379 nextTollRequestType = 'MESSAGE'; 376 nextTollRequestType = 'MESSAGE';
380 } else if (someParameters.message == "oneTimePassword") { 377 } else if (someParameters.message == "oneTimePassword") {
381 var otpData; 378 var otpData;
382 379
383//console.log("HANDSHAKE WITH OTP", someParameters.parameters.oneTimePasswordKey); 380//console.log("HANDSHAKE WITH OTP", someParameters.parameters.oneTimePasswordKey);
384//console.log("someParameters", someParameters); 381//console.log("someParameters", someParameters);
385//console.log("data.OTP", Clipperz.Base.serializeJSON(this.data()['onetimePasswords'])); 382//console.log("data.OTP", Clipperz.Base.serializeJSON(this.data()['onetimePasswords']));
386 otpData = this.data()['onetimePasswords'][someParameters.parameters.oneTimePasswordKey]; 383 otpData = this.data()['onetimePasswords'][someParameters.parameters.oneTimePasswordKey];
387 384
388 try { 385 try {
389 if (typeof(otpData) != 'undefined') { 386 if (typeof(otpData) != 'undefined') {
390 if (otpData['status'] == 'ACTIVE') { 387 if (otpData['status'] == 'ACTIVE') {
391 if (otpData['key_checksum'] == someParameters.parameters.oneTimePasswordKeyChecksum) { 388 if (otpData['key_checksum'] == someParameters.parameters.oneTimePasswordKeyChecksum) {
392 result = { 389 result = {
393 'data': otpData['data'], 390 'data': otpData['data'],
394 'version':otpData['version'] 391 'version':otpData['version']
395 } 392 }
396 393
397 otpData['status'] = 'REQUESTED'; 394 otpData['status'] = 'REQUESTED';
398 } else { 395 } else {
399 otpData['status'] = 'DISABLED'; 396 otpData['status'] = 'DISABLED';
400 throw "The requested One Time Password has been disabled, due to a wrong keyChecksum"; 397 throw "The requested One Time Password has been disabled, due to a wrong keyChecksum";
401 } 398 }
402 } else { 399 } else {
403 throw "The requested One Time Password was not active"; 400 throw "The requested One Time Password was not active";
404 } 401 }
405 } else { 402 } else {
406 throw "The requested One Time Password has not been found" 403 throw "The requested One Time Password has not been found"
407 } 404 }
408 } catch (exception) { 405 } catch (exception) {
diff --git a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.js b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.js
index 072f9bf..3cf499e 100644
--- a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.js
+++ b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.js
@@ -1,73 +1,70 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31 28
32//============================================================================= 29//=============================================================================
33 30
34Clipperz.PM.Proxy.Offline = function(args) { 31Clipperz.PM.Proxy.Offline = function(args) {
35 args = args || {}; 32 args = args || {};
36 33
37 Clipperz.PM.Proxy.Offline.superclass.constructor.call(this, args); 34 Clipperz.PM.Proxy.Offline.superclass.constructor.call(this, args);
38 35
39 this._dataStore = args.dataStore || new Clipperz.PM.Proxy.Offline.DataStore(args); 36 this._dataStore = args.dataStore || new Clipperz.PM.Proxy.Offline.DataStore(args);
40 37
41 return this; 38 return this;
42} 39}
43 40
44YAHOO.extendX(Clipperz.PM.Proxy.Offline, Clipperz.PM.Proxy, { 41YAHOO.extendX(Clipperz.PM.Proxy.Offline, Clipperz.PM.Proxy, {
45 42
46 'toString': function () { 43 'toString': function () {
47 return "Clipperz.PM.Proxy.Offline"; 44 return "Clipperz.PM.Proxy.Offline";
48 }, 45 },
49 46
50 //------------------------------------------------------------------------- 47 //-------------------------------------------------------------------------
51 48
52 'dataStore': function () { 49 'dataStore': function () {
53 return this._dataStore; 50 return this._dataStore;
54 }, 51 },
55 52
56 //------------------------------------------------------------------------- 53 //-------------------------------------------------------------------------
57 54
58 'sendMessage': function(aFunctionName, someParameters) { 55 'sendMessage': function(aFunctionName, someParameters) {
59 return this.dataStore().processMessage(aFunctionName, someParameters); 56 return this.dataStore().processMessage(aFunctionName, someParameters);
60 }, 57 },
61 58
62 //------------------------------------------------------------------------- 59 //-------------------------------------------------------------------------
63 60
64 'isReadOnly': function () { 61 'isReadOnly': function () {
65 return true; 62 return true;
66 }, 63 },
67 64
68 //------------------------------------------------------------------------- 65 //-------------------------------------------------------------------------
69 66
70 __syntaxFix__: "syntax fix" 67 __syntaxFix__: "syntax fix"
71 68
72}); 69});
73 70
diff --git a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.PHP.js b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.PHP.js
index 6185fd6..34a10c2 100755
--- a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.PHP.js
+++ b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.PHP.js
@@ -1,265 +1,262 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31 28
32//============================================================================= 29//=============================================================================
33 30
34Clipperz.PM.Proxy.PHP = function(args) { 31Clipperz.PM.Proxy.PHP = function(args) {
35 Clipperz.PM.Proxy.PHP.superclass.constructor.call(this, args); 32 Clipperz.PM.Proxy.PHP.superclass.constructor.call(this, args);
36/* 33/*
37 this._tolls = { 34 this._tolls = {
38 'CONNECT':[], 35 'CONNECT':[],
39 'REGISTER':[], 36 'REGISTER':[],
40 'MESSAGE':[] 37 'MESSAGE':[]
41 }; 38 };
42 */ 39 */
43 return this; 40 return this;
44} 41}
45 42
46YAHOO.extendX(Clipperz.PM.Proxy.PHP, Clipperz.PM.Proxy, { 43YAHOO.extendX(Clipperz.PM.Proxy.PHP, Clipperz.PM.Proxy, {
47 44
48 'toString': function() { 45 'toString': function() {
49 return "Clipperz.PM.Proxy.PHP - " + this.args(); 46 return "Clipperz.PM.Proxy.PHP - " + this.args();
50 }, 47 },
51 48
52 //========================================================================= 49 //=========================================================================
53/* 50/*
54 'tolls': function() { 51 'tolls': function() {
55 return this._tolls; 52 return this._tolls;
56 }, 53 },
57*/ 54*/
58 //------------------------------------------------------------------------- 55 //-------------------------------------------------------------------------
59/* 56/*
60 'payToll': function(aRequestType, someParameters) { 57 'payToll': function(aRequestType, someParameters) {
61 vardeferredResult; 58 vardeferredResult;
62 59
63//MochiKit.Logging.logDebug(">>> Proxy.DWR.payToll: " + aRequestType); 60//MochiKit.Logging.logDebug(">>> Proxy.DWR.payToll: " + aRequestType);
64 if (this.tolls()[aRequestType].length > 0) { 61 if (this.tolls()[aRequestType].length > 0) {
65 deferredResult = MochiKit.Async.succeed(this.tolls()[aRequestType].pop()); 62 deferredResult = MochiKit.Async.succeed(this.tolls()[aRequestType].pop());
66 } else { 63 } else {
67//MochiKit.Logging.logDebug("### " + aRequestType + " toll NOT immediately available; request queued."); 64//MochiKit.Logging.logDebug("### " + aRequestType + " toll NOT immediately available; request queued.");
68 deferredResult = new MochiKit.Async.Deferred(); 65 deferredResult = new MochiKit.Async.Deferred();
69 deferredResult.addCallback(function(someParameters) { 66 deferredResult.addCallback(function(someParameters) {
70 return new Clipperz.PM.Toll(someParameters['toll']); 67 return new Clipperz.PM.Toll(someParameters['toll']);
71 }) 68 })
72 com_clipperz_pm_Proxy.knock(Clipperz.Base.serializeJSON({requestType:aRequestType}), { 69 com_clipperz_pm_Proxy.knock(Clipperz.Base.serializeJSON({requestType:aRequestType}), {
73 callback:MochiKit.Base.method(deferredResult, 'callback'), 70 callback:MochiKit.Base.method(deferredResult, 'callback'),
74 errorHandler:MochiKit.Base.method(deferredResult, 'errback') 71 errorHandler:MochiKit.Base.method(deferredResult, 'errback')
75 }); 72 });
76 } 73 }
77 74
78 deferredResult.addCallback(function(aToll) { 75 deferredResult.addCallback(function(aToll) {
79 return aToll.deferredPay(); 76 return aToll.deferredPay();
80 }); 77 });
81 deferredResult.addCallback(function(someParameters, aToll) { 78 deferredResult.addCallback(function(someParameters, aToll) {
82 var result; 79 var result;
83 80
84 result = { 81 result = {
85 parameters: someParameters, 82 parameters: someParameters,
86 toll: aToll 83 toll: aToll
87 } 84 }
88 85
89 return result; 86 return result;
90 }, someParameters); 87 }, someParameters);
91 88
92 return deferredResult; 89 return deferredResult;
93 }, 90 },
94*/ 91*/
95 //------------------------------------------------------------------------- 92 //-------------------------------------------------------------------------
96/* 93/*
97 'addToll': function(aToll) { 94 'addToll': function(aToll) {
98 this.tolls()[aToll.requestType()].push(aToll); 95 this.tolls()[aToll.requestType()].push(aToll);
99 }, 96 },
100*/ 97*/
101 //========================================================================= 98 //=========================================================================
102/* 99/*
103 'setTollCallback': function(someParameters) { 100 'setTollCallback': function(someParameters) {
104//MochiKit.Logging.logDebug(">>> Proxy.DWR.setTollCallback"); 101//MochiKit.Logging.logDebug(">>> Proxy.DWR.setTollCallback");
105//MochiKit.Logging.logDebug("--- Proxy.DWR.setTollCallback - " + Clipperz.Base.serializeJSON(someParameters)); 102//MochiKit.Logging.logDebug("--- Proxy.DWR.setTollCallback - " + Clipperz.Base.serializeJSON(someParameters));
106 if (typeof(someParameters['toll']) != 'undefined') { 103 if (typeof(someParameters['toll']) != 'undefined') {
107 this.addToll(new Clipperz.PM.Toll(someParameters['toll'])); 104 this.addToll(new Clipperz.PM.Toll(someParameters['toll']));
108 } 105 }
109 return someParameters['result']; 106 return someParameters['result'];
110 }, 107 },
111*/ 108*/
112 //========================================================================= 109 //=========================================================================
113 110
114 'registration': function(someParameters) { 111 'registration': function(someParameters) {
115 return this.sendMessage('registration', someParameters, 'REGISTER'); 112 return this.sendMessage('registration', someParameters, 'REGISTER');
116 }, 113 },
117 114
118 //------------------------------------------------------------------------- 115 //-------------------------------------------------------------------------
119 116
120 'handshake': function(someParameters) { 117 'handshake': function(someParameters) {
121/* 118/*
122 _s = "e8a2162f29aeaabb729f5625e9740edbf0cd80ac77c6b19ab951ed6c88443b8c"; 119 _s = "e8a2162f29aeaabb729f5625e9740edbf0cd80ac77c6b19ab951ed6c88443b8c";
123 _v = new Clipperz.Crypto.BigInt("955e2db0f7844aca372f5799e5f7e51b5866718493096908bd66abcf1d068108", 16); 120 _v = new Clipperz.Crypto.BigInt("955e2db0f7844aca372f5799e5f7e51b5866718493096908bd66abcf1d068108", 16);
124 _b = new Clipperz.Crypto.BigInt("5761e6c84d22ea3c5649de01702d60f674ccfe79238540eb34c61cd020230c53", 16); 121 _b = new Clipperz.Crypto.BigInt("5761e6c84d22ea3c5649de01702d60f674ccfe79238540eb34c61cd020230c53", 16);
125 122
126 _B = _v.add(Clipperz.Crypto.SRP.g().powerModule(_b, Clipperz.Crypto.SRP.n())); 123 _B = _v.add(Clipperz.Crypto.SRP.g().powerModule(_b, Clipperz.Crypto.SRP.n()));
127 _u = new Clipperz.Crypto.BigInt(Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters.version].hash(new Clipperz.ByteArray(_B.asString(10))).toHexString(), 16); 124 _u = new Clipperz.Crypto.BigInt(Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters.version].hash(new Clipperz.ByteArray(_B.asString(10))).toHexString(), 16);
128 _A = new Clipperz.Crypto.BigInt("3b3567ec33d73673552e960872eb154d091a2488915941038aef759236a27e64", 16); 125 _A = new Clipperz.Crypto.BigInt("3b3567ec33d73673552e960872eb154d091a2488915941038aef759236a27e64", 16);
129 _S = (_A.multiply(_v.powerModule(_u, Clipperz.Crypto.SRP.n()))).powerModule(_b, Clipperz.Crypto.SRP.n()); 126 _S = (_A.multiply(_v.powerModule(_u, Clipperz.Crypto.SRP.n()))).powerModule(_b, Clipperz.Crypto.SRP.n());
130 _K = Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters.version].hash(new Clipperz.ByteArray(_S.asString(10))).toHexString().slice(2); 127 _K = Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters.version].hash(new Clipperz.ByteArray(_S.asString(10))).toHexString().slice(2);
131 _M1 = Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters.version].hash(new Clipperz.ByteArray(_A.asString(10) + _B.asString(10) + _K)).toHexString().slice(2); 128 _M1 = Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters.version].hash(new Clipperz.ByteArray(_A.asString(10) + _B.asString(10) + _K)).toHexString().slice(2);
132 _M2 = Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters.version].hash(new Clipperz.ByteArray(_A.asString(10) + _M1 + _K)).toHexString().slice(2); 129 _M2 = Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters.version].hash(new Clipperz.ByteArray(_A.asString(10) + _M1 + _K)).toHexString().slice(2);
133 130
134 // MochiKit.Logging.logDebug("b = " + _b.asString(16)); 131 // MochiKit.Logging.logDebug("b = " + _b.asString(16));
135 // MochiKit.Logging.logDebug("v = " + _v.asString(16)); 132 // MochiKit.Logging.logDebug("v = " + _v.asString(16));
136 MochiKit.Logging.logDebug("B = " + _B.asString(16)); 133 MochiKit.Logging.logDebug("B = " + _B.asString(16));
137 MochiKit.Logging.logDebug("u = " + _u.asString(16)); 134 MochiKit.Logging.logDebug("u = " + _u.asString(16));
138 MochiKit.Logging.logDebug("S = " + _S.asString(16)); 135 MochiKit.Logging.logDebug("S = " + _S.asString(16));
139 MochiKit.Logging.logDebug("K = " + _K); 136 MochiKit.Logging.logDebug("K = " + _K);
140 MochiKit.Logging.logDebug("M1 = " + _M1); 137 MochiKit.Logging.logDebug("M1 = " + _M1);
141 MochiKit.Logging.logDebug("M2 = " + _M2); 138 MochiKit.Logging.logDebug("M2 = " + _M2);
142 // MochiKit.Logging.logDebug("someParameters.version: " + someParameters.version); 139 // MochiKit.Logging.logDebug("someParameters.version: " + someParameters.version);
143 */ 140 */
144 return this.sendMessage('handshake', someParameters, 'CONNECT'); 141 return this.sendMessage('handshake', someParameters, 'CONNECT');
145 }, 142 },
146 143
147 //------------------------------------------------------------------------- 144 //-------------------------------------------------------------------------
148 145
149 'message': function(someParameters) { 146 'message': function(someParameters) {
150 return this.sendMessage('message', someParameters, 'MESSAGE'); 147 return this.sendMessage('message', someParameters, 'MESSAGE');
151 }, 148 },
152 149
153 //------------------------------------------------------------------------- 150 //-------------------------------------------------------------------------
154 151
155 'logout': function(someParameters) { 152 'logout': function(someParameters) {
156//MochiKit.Logging.logDebug("=== Proxy.DWR.logout"); 153//MochiKit.Logging.logDebug("=== Proxy.DWR.logout");
157 return this.sendMessage('logout', someParameters, 'MESSAGE'); 154 return this.sendMessage('logout', someParameters, 'MESSAGE');
158 }, 155 },
159 156
160 //========================================================================= 157 //=========================================================================
161 158
162 'sendMessage': function(aFunctionName, someParameters, aRequestType) { 159 'sendMessage': function(aFunctionName, someParameters, aRequestType) {
163/* 160/*
164 vardeferredResult; 161 vardeferredResult;
165 var proxy; 162 var proxy;
166 163
167//MochiKit.Logging.logDebug(">>> Proxy.DWR.sendMessage - " + aFunctionName + " - " + aRequestType); 164//MochiKit.Logging.logDebug(">>> Proxy.DWR.sendMessage - " + aFunctionName + " - " + aRequestType);
168 proxy = this; 165 proxy = this;
169 166
170 deferredResult = new MochiKit.Async.Deferred(); 167 deferredResult = new MochiKit.Async.Deferred();
171//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("x.1 Proxy.DWR.sendMessage - 1: " + res); return res;}); 168//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("x.1 Proxy.DWR.sendMessage - 1: " + res); return res;});
172 deferredResult.addCallback(MochiKit.Base.method(proxy, 'payToll'), aRequestType); 169 deferredResult.addCallback(MochiKit.Base.method(proxy, 'payToll'), aRequestType);
173//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("x.2 Proxy.DWR.sendMessage - 2: " + Clipperz.Base.serializeJSON(res)); return res;}); 170//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("x.2 Proxy.DWR.sendMessage - 2: " + Clipperz.Base.serializeJSON(res)); return res;});
174 deferredResult.addCallback(MochiKit.Base.method(proxy, 'sendRemoteMessage'), aFunctionName); 171 deferredResult.addCallback(MochiKit.Base.method(proxy, 'sendRemoteMessage'), aFunctionName);
175//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("x.3 Proxy.DWR.sendMessage - 3: " + res); return res;}); 172//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("x.3 Proxy.DWR.sendMessage - 3: " + res); return res;});
176//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("x.3 Proxy.DWR.sendMessage - 3: " + Clipperz.Base.serializeJSON(res)); return res;}); 173//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("x.3 Proxy.DWR.sendMessage - 3: " + Clipperz.Base.serializeJSON(res)); return res;});
177 deferredResult.callback(someParameters); 174 deferredResult.callback(someParameters);
178 175
179//MochiKit.Logging.logDebug("<<< Proxy.DWR.sendMessage"); 176//MochiKit.Logging.logDebug("<<< Proxy.DWR.sendMessage");
180 return deferredResult; 177 return deferredResult;
181*/ 178*/
182 179
183 // return this.sendRemoteMessage(aFunctionName, someParameters); 180 // return this.sendRemoteMessage(aFunctionName, someParameters);
184 181
185 182
186 vardeferredResult; 183 vardeferredResult;
187 var proxy; 184 var proxy;
188 185
189 proxy = this; 186 proxy = this;
190 187
191 deferredResult = new MochiKit.Async.Deferred(); 188 deferredResult = new MochiKit.Async.Deferred();
192 deferredResult.addCallback(MochiKit.Base.method(proxy, 'sendRemoteMessage'), aFunctionName); 189 deferredResult.addCallback(MochiKit.Base.method(proxy, 'sendRemoteMessage'), aFunctionName);
193//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("x.3 Proxy.PHP.sendMessage - 3: " + res); return res;}); 190//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("x.3 Proxy.PHP.sendMessage - 3: " + res); return res;});
194//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("x.3 Proxy.PHP.sendMessage - 3.1: " + Clipperz.Base.serializeJSON(res)); return res;}); 191//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("x.3 Proxy.PHP.sendMessage - 3.1: " + Clipperz.Base.serializeJSON(res)); return res;});
195 192
196 deferredResult.callback(someParameters); 193 deferredResult.callback(someParameters);
197 194
198 return deferredResult; 195 return deferredResult;
199 }, 196 },
200 197
201 //========================================================================= 198 //=========================================================================
202 199
203 'sendRemoteMessage': function(aFunctionName, someParameters) { 200 'sendRemoteMessage': function(aFunctionName, someParameters) {
204/* 201/*
205 vardeferredResult; 202 vardeferredResult;
206 203
207//MochiKit.Logging.logDebug(">>> Proxy.DWR.sendRemoteMessage('" + aFunctionName + "', " + Clipperz.Base.serializeJSON(someParameters) + ") - " + this); 204//MochiKit.Logging.logDebug(">>> Proxy.DWR.sendRemoteMessage('" + aFunctionName + "', " + Clipperz.Base.serializeJSON(someParameters) + ") - " + this);
208 deferredResult = new MochiKit.Async.Deferred(); 205 deferredResult = new MochiKit.Async.Deferred();
209//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Proxy.DWR.sendRemoteMessage - 1: " + res); return res;}); 206//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Proxy.DWR.sendRemoteMessage - 1: " + res); return res;});
210 // deferredResult.addCallback(MochiKit.Base.method(this, 'setTollCallback')); 207 // deferredResult.addCallback(MochiKit.Base.method(this, 'setTollCallback'));
211//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Proxy.DWR.sendRemoteMessage - 2: " + res); return res;}); 208//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Proxy.DWR.sendRemoteMessage - 2: " + res); return res;});
212 209
213 com_clipperz_pm_Proxy[aFunctionName](Clipperz.Base.serializeJSON(someParameters), { 210 com_clipperz_pm_Proxy[aFunctionName](Clipperz.Base.serializeJSON(someParameters), {
214 callback:MochiKit.Base.method(deferredResult, 'callback'), 211 callback:MochiKit.Base.method(deferredResult, 'callback'),
215 errorHandler:MochiKit.Base.method(deferredResult, 'errback') 212 errorHandler:MochiKit.Base.method(deferredResult, 'errback')
216 }); 213 });
217//MochiKit.Logging.logDebug("<<< Proxy.PHP.sendRemoteMessage - result: " + deferredResult); 214//MochiKit.Logging.logDebug("<<< Proxy.PHP.sendRemoteMessage - result: " + deferredResult);
218 215
219 return deferredResult; 216 return deferredResult;
220*/ 217*/
221 218
222 vardeferredResult; 219 vardeferredResult;
223 var parameters; 220 var parameters;
224 221
225//MochiKit.Logging.logDebug(">>> Proxy.PHP.sendRemoteMessage('" + aFunctionName + "', " + Clipperz.Base.serializeJSON(someParameters) + ") - " + this); 222//MochiKit.Logging.logDebug(">>> Proxy.PHP.sendRemoteMessage('" + aFunctionName + "', " + Clipperz.Base.serializeJSON(someParameters) + ") - " + this);
226 parameters = {}; 223 parameters = {};
227 parameters['method'] = aFunctionName; 224 parameters['method'] = aFunctionName;
228 // parameters['version'] = someParameters['version']; 225 // parameters['version'] = someParameters['version'];
229 // parameters['message'] = someParameters['message']; 226 // parameters['message'] = someParameters['message'];
230 parameters['parameters'] = Clipperz.Base.serializeJSON(someParameters); 227 parameters['parameters'] = Clipperz.Base.serializeJSON(someParameters);
231//MochiKit.Logging.logDebug("--- Proxy.PHP.sendRemoteMessage('" + Clipperz.Base.serializeJSON(parameters) + ") - " + this); 228//MochiKit.Logging.logDebug("--- Proxy.PHP.sendRemoteMessage('" + Clipperz.Base.serializeJSON(parameters) + ") - " + this);
232 deferredResult = new MochiKit.Async.Deferred(); 229 deferredResult = new MochiKit.Async.Deferred();
233 deferredResult.addCallback(MochiKit.Async.doXHR, "./php/index.php", { 230 deferredResult.addCallback(MochiKit.Async.doXHR, "./php/index.php", {
234 method:'POST', 231 method:'POST',
235 sendContent:MochiKit.Base.queryString(parameters), 232 sendContent:MochiKit.Base.queryString(parameters),
236 headers:{"Content-Type":"application/x-www-form-urlencoded"} 233 headers:{"Content-Type":"application/x-www-form-urlencoded"}
237 }); 234 });
238//deferredResult.addCallback(function(res) {MochiKit.Logging.logDebug("Proxy.PHP.response - 2: " + res.responseText); return res;}); 235//deferredResult.addCallback(function(res) {MochiKit.Logging.logDebug("Proxy.PHP.response - 2: " + res.responseText); return res;});
239//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("Proxy.PHP.response - ERROR: " + res); return res;}); 236//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("Proxy.PHP.response - ERROR: " + res); return res;});
240 deferredResult.addCallback(MochiKit.Async.evalJSONRequest); 237 deferredResult.addCallback(MochiKit.Async.evalJSONRequest);
241 deferredResult.addCallback(function (someValues) { 238 deferredResult.addCallback(function (someValues) {
242 if (someValues['result'] == 'EXCEPTION') { 239 if (someValues['result'] == 'EXCEPTION') {
243 throw someValues['message']; 240 throw someValues['message'];
244 } 241 }
245 return someValues; 242 return someValues;
246 }) 243 })
247 deferredResult.callback(); 244 deferredResult.callback();
248 245
249 return deferredResult; 246 return deferredResult;
250 }, 247 },
251 248
252 //========================================================================= 249 //=========================================================================
253 250
254 'isReadOnly': function() { 251 'isReadOnly': function() {
255 return false; 252 return false;
256 }, 253 },
257 254
258 //========================================================================= 255 //=========================================================================
259 __syntaxFix__: "syntax fix" 256 __syntaxFix__: "syntax fix"
260 257
261}); 258});
262 259
263//============================================================================= 260//=============================================================================
264 261
265//Clipperz.PM.Proxy.defaultProxy = new Clipperz.PM.Proxy.PHP("Proxy.PHP - async test"); 262//Clipperz.PM.Proxy.defaultProxy = new Clipperz.PM.Proxy.PHP("Proxy.PHP - async test");
diff --git a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Test.js b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Test.js
index fd5bf8a..ce6e6d8 100644
--- a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Test.js
+++ b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Test.js
@@ -1,94 +1,91 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Proxy) == 'undefined') { Clipperz.PM.Proxy = {}; } 28if (typeof(Clipperz.PM.Proxy) == 'undefined') { Clipperz.PM.Proxy = {}; }
32 29
33//============================================================================= 30//=============================================================================
34 31
35Clipperz.PM.Proxy.Test = function(args) { 32Clipperz.PM.Proxy.Test = function(args) {
36 args = args || {}; 33 args = args || {};
37 34
38 Clipperz.PM.Proxy.Offline.call(this, args); 35 Clipperz.PM.Proxy.Offline.call(this, args);
39 36
40 37
41 38
42 return this; 39 return this;
43} 40}
44 41
45Clipperz.PM.Proxy.Test.prototype = MochiKit.Base.update(new Clipperz.PM.Proxy.Offline(), { 42Clipperz.PM.Proxy.Test.prototype = MochiKit.Base.update(new Clipperz.PM.Proxy.Offline(), {
46 43
47 'toString': function() { 44 'toString': function() {
48 return "Clipperz.PM.Proxy.Test"; 45 return "Clipperz.PM.Proxy.Test";
49 }, 46 },
50 47
51 //------------------------------------------------------------------------- 48 //-------------------------------------------------------------------------
52 49
53 'isTestData': function() { 50 'isTestData': function() {
54 return typeof(this.userData()['__masterkey_test_value__'] != 'undefined'); 51 return typeof(this.userData()['__masterkey_test_value__'] != 'undefined');
55 }, 52 },
56 53
57 //------------------------------------------------------------------------- 54 //-------------------------------------------------------------------------
58 55
59 'userDetails': function() { 56 'userDetails': function() {
60 var result; 57 var result;
61 58
62 if (this.isTestData()) { 59 if (this.isTestData()) {
63 var serializedHeader; 60 var serializedHeader;
64 var version; 61 var version;
65 62
66 version = this.userData()['version']; 63 version = this.userData()['version'];
67 serializedHeader = Clipperz.Base.serializeJSON(this.userData()['userDetails']); 64 serializedHeader = Clipperz.Base.serializeJSON(this.userData()['userDetails']);
68 result = Clipperz.PM.Crypto.encryptingFunctions.versions[version].encrypt(this.userData()['__masterkey_test_value__'], serializedHeader); 65 result = Clipperz.PM.Crypto.encryptingFunctions.versions[version].encrypt(this.userData()['__masterkey_test_value__'], serializedHeader);
69 } else { 66 } else {
70 result = Clipperz.PM.Proxy.Offline.prototype.userDetails.call(this); 67 result = Clipperz.PM.Proxy.Offline.prototype.userDetails.call(this);
71 } 68 }
72 69
73 return result; 70 return result;
74 }, 71 },
75 72
76 //------------------------------------------------------------------------- 73 //-------------------------------------------------------------------------
77 74
78 'statistics': function() { 75 'statistics': function() {
79 var result; 76 var result;
80 var serializedStatistics; 77 var serializedStatistics;
81 var version; 78 var version;
82 79
83 version = this.userData()['version']; 80 version = this.userData()['version'];
84 serializedStatistics = Clipperz.Base.serializeJSON(this.userData()['statistics']); 81 serializedStatistics = Clipperz.Base.serializeJSON(this.userData()['statistics']);
85 result = Clipperz.PM.Crypto.encryptingFunctions.versions[version].encrypt(this.userData()['__masterkey_test_value__'], serializedStatistics); 82 result = Clipperz.PM.Crypto.encryptingFunctions.versions[version].encrypt(this.userData()['__masterkey_test_value__'], serializedStatistics);
86 83
87 return result; 84 return result;
88 }, 85 },
89 86
90 //------------------------------------------------------------------------- 87 //-------------------------------------------------------------------------
91 __syntaxFix__: "syntax fix" 88 __syntaxFix__: "syntax fix"
92 89
93}); 90});
94 91
diff --git a/frontend/beta/js/Clipperz/PM/Strings.js b/frontend/beta/js/Clipperz/PM/Strings.js
index c935c7f..24ef0ce 100644
--- a/frontend/beta/js/Clipperz/PM/Strings.js
+++ b/frontend/beta/js/Clipperz/PM/Strings.js
@@ -1,231 +1,228 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Strings) == 'undefined') { Clipperz.PM.Strings = {}; } 28if (typeof(Clipperz.PM.Strings) == 'undefined') { Clipperz.PM.Strings = {}; }
32if (typeof(Clipperz.PM.Strings.Languages) == 'undefined') { Clipperz.PM.Strings.Languages = {}; } 29if (typeof(Clipperz.PM.Strings.Languages) == 'undefined') { Clipperz.PM.Strings.Languages = {}; }
33 30
34Clipperz.PM.Strings.standardStrings = { 31Clipperz.PM.Strings.standardStrings = {
35 32
36 'loginPanelSwitchLanguageSelectOptions':[ 33 'loginPanelSwitchLanguageSelectOptions':[
37/* 34/*
38 {tag:'option', html:"Arabic (Oman) (العربية)", value:'ar-OM', disabled:true}, 35 {tag:'option', html:"Arabic (Oman) (العربية)", value:'ar-OM', disabled:true},
39 {tag:'option', html:"Arabic (Syria) (العربية)", value:'ar-SY', disabled:true}, 36 {tag:'option', html:"Arabic (Syria) (العربية)", value:'ar-SY', disabled:true},
40 {tag:'option', html:"Bahasa Indonesia", value:'id-ID', disabled:true}, 37 {tag:'option', html:"Bahasa Indonesia", value:'id-ID', disabled:true},
41 {tag:'option', html:"Bulgarian (Български)", value:'bg-BG', disabled:true}, 38 {tag:'option', html:"Bulgarian (Български)", value:'bg-BG', disabled:true},
42 {tag:'option', html:"Català", value:'ca-ES', disabled:true}, 39 {tag:'option', html:"Català", value:'ca-ES', disabled:true},
43 {tag:'option', html:"Chinese (Simplified) (简体中文)", value:'zh-CN', disabled:true}, 40 {tag:'option', html:"Chinese (Simplified) (简体中文)", value:'zh-CN', disabled:true},
44 {tag:'option', html:"Chinese (Traditional) (正體中文)", value:'zh-TW', disabled:true}, 41 {tag:'option', html:"Chinese (Traditional) (正體中文)", value:'zh-TW', disabled:true},
45 {tag:'option', html:"Czech (Česky)", value:'cs-CZ', disabled:true}, 42 {tag:'option', html:"Czech (Česky)", value:'cs-CZ', disabled:true},
46 {tag:'option', html:"Dansk", value:'da-DK', disabled:true}, 43 {tag:'option', html:"Dansk", value:'da-DK', disabled:true},
47 {tag:'option', html:"Deutsch", value:'de-DE'/ *, disabled:true* /}, 44 {tag:'option', html:"Deutsch", value:'de-DE'/ *, disabled:true* /},
48 {tag:'option', html:"English (American)", value:'en-US'/ *, disabled:true* /}, 45 {tag:'option', html:"English (American)", value:'en-US'/ *, disabled:true* /},
49 {tag:'option', html:"English (British)", value:'en-GB'/ *, disabled:true* /}, 46 {tag:'option', html:"English (British)", value:'en-GB'/ *, disabled:true* /},
50 {tag:'option', html:"English (Canadian)", value:'en-CA'/ *, disabled:true* /}, 47 {tag:'option', html:"English (Canadian)", value:'en-CA'/ *, disabled:true* /},
51 {tag:'option', html:"Español", value:'es-ES', disabled:true}, 48 {tag:'option', html:"Español", value:'es-ES', disabled:true},
52 {tag:'option', html:"Eesti", value:'et-EE', disabled:true}, 49 {tag:'option', html:"Eesti", value:'et-EE', disabled:true},
53 {tag:'option', html:"Français", value:'fr-FR', disabled:true}, 50 {tag:'option', html:"Français", value:'fr-FR', disabled:true},
54 {tag:'option', html:"Galego", value:'gl-ES', disabled:true}, 51 {tag:'option', html:"Galego", value:'gl-ES', disabled:true},
55 {tag:'option', html:"Greek (Ελληνικά)", value:'el-GR', disabled:true}, 52 {tag:'option', html:"Greek (Ελληνικά)", value:'el-GR', disabled:true},
56 {tag:'option', html:"Íslenska", value:'is-IS', disabled:true}, 53 {tag:'option', html:"Íslenska", value:'is-IS', disabled:true},
57 {tag:'option', html:"Italiano", value:'it-IT'/ *, disabled:true* /}, 54 {tag:'option', html:"Italiano", value:'it-IT'/ *, disabled:true* /},
58 {tag:'option', html:"Japanese (日本語)", value:'ja-JP', disabled:true}, 55 {tag:'option', html:"Japanese (日本語)", value:'ja-JP', disabled:true},
59 {tag:'option', html:"Korean (한국어)", value:'ko-KR', disabled:true}, 56 {tag:'option', html:"Korean (한국어)", value:'ko-KR', disabled:true},
60 {tag:'option', html:"Latviešu", value:'lv-LV', disabled:true}, 57 {tag:'option', html:"Latviešu", value:'lv-LV', disabled:true},
61 {tag:'option', html:"Lietuvių", value:'lt-LT', disabled:true}, 58 {tag:'option', html:"Lietuvių", value:'lt-LT', disabled:true},
62 {tag:'option', html:"Macedonian (Македонски)", value:'mk-MK', disabled:true}, 59 {tag:'option', html:"Macedonian (Македонски)", value:'mk-MK', disabled:true},
63 {tag:'option', html:"Magyar", value:'hu-HU', disabled:true}, 60 {tag:'option', html:"Magyar", value:'hu-HU', disabled:true},
64 {tag:'option', html:"Nederlands", value:'nl-NL', disabled:true}, 61 {tag:'option', html:"Nederlands", value:'nl-NL', disabled:true},
65 {tag:'option', html:"Norsk bokmål", value:'nb-NO', disabled:true}, 62 {tag:'option', html:"Norsk bokmål", value:'nb-NO', disabled:true},
66 {tag:'option', html:"Norsk nynorsk", value:'nn-NO', disabled:true}, 63 {tag:'option', html:"Norsk nynorsk", value:'nn-NO', disabled:true},
67 {tag:'option', html:"Persian (Western) (فارسى)", value:'fa-IR', disabled:true}, 64 {tag:'option', html:"Persian (Western) (فارسى)", value:'fa-IR', disabled:true},
68 {tag:'option', html:"Polski", value:'pl-PL', disabled:true}, 65 {tag:'option', html:"Polski", value:'pl-PL', disabled:true},
69 {tag:'option', html:"Português", value:'pt-PT'/ *, disabled:true* /}, 66 {tag:'option', html:"Português", value:'pt-PT'/ *, disabled:true* /},
70 {tag:'option', html:"Português Brasileiro", value:'pt-BR'/ *, disabled:true* /}, 67 {tag:'option', html:"Português Brasileiro", value:'pt-BR'/ *, disabled:true* /},
71 {tag:'option', html:"Românä", value:'ro-RO', disabled:true}, 68 {tag:'option', html:"Românä", value:'ro-RO', disabled:true},
72 {tag:'option', html:"Russian (Русский)", value:'ru-RU', disabled:true}, 69 {tag:'option', html:"Russian (Русский)", value:'ru-RU', disabled:true},
73 {tag:'option', html:"Slovak (Slovenčina)", value:'sk-SK', disabled:true}, 70 {tag:'option', html:"Slovak (Slovenčina)", value:'sk-SK', disabled:true},
74 {tag:'option', html:"Slovenian (Slovenščina)", value:'sl-SI', disabled:true}, 71 {tag:'option', html:"Slovenian (Slovenščina)", value:'sl-SI', disabled:true},
75 {tag:'option', html:"Suomi", value:'fi-FI', disabled:true}, 72 {tag:'option', html:"Suomi", value:'fi-FI', disabled:true},
76 {tag:'option', html:"Svenska", value:'sv-SE', disabled:true}, 73 {tag:'option', html:"Svenska", value:'sv-SE', disabled:true},
77 {tag:'option', html:"Thai (ไทย)", value:'th-TH', disabled:true}, 74 {tag:'option', html:"Thai (ไทย)", value:'th-TH', disabled:true},
78 {tag:'option', html:"Türkçe", value:'tr-TR', disabled:true}, 75 {tag:'option', html:"Türkçe", value:'tr-TR', disabled:true},
79 {tag:'option', html:"Ukrainian (Українська)", value:'uk-UA', disabled:true} 76 {tag:'option', html:"Ukrainian (Українська)", value:'uk-UA', disabled:true}
80*/ 77*/
81 {tag:'option', html:"Arabic (العربية)", value:"ar", disabled:true, cls:'disabledOption'}, 78 {tag:'option', html:"Arabic (العربية)", value:"ar", disabled:true, cls:'disabledOption'},
82 // {tag:'option', html:"Chinese (中文)", value:"zh", disabled:true}, 79 // {tag:'option', html:"Chinese (中文)", value:"zh", disabled:true},
83 {tag:'option', html:"Chinese (Simplified) (简体中文)", value:'zh-CN'}, 80 {tag:'option', html:"Chinese (Simplified) (简体中文)", value:'zh-CN'},
84 {tag:'option', html:"Dutch (Nederlands)", value:"nl-NL", disabled:true, cls:'disabledOption'}, 81 {tag:'option', html:"Dutch (Nederlands)", value:"nl-NL", disabled:true, cls:'disabledOption'},
85 {tag:'option', html:"English", value:"en-US"}, 82 {tag:'option', html:"English", value:"en-US"},
86 {tag:'option', html:"French (Français)", value:"fr-FR"}, 83 {tag:'option', html:"French (Français)", value:"fr-FR"},
87 {tag:'option', html:"German (Deutsch)", value:"de-DE"/* -- */, disabled:true, cls:'disabledOption' /* */}, 84 {tag:'option', html:"German (Deutsch)", value:"de-DE"/* -- */, disabled:true, cls:'disabledOption' /* */},
88 {tag:'option', html:"Greek (Ελληνικά)", value:"el-GR"/* -- */, disabled:true, cls:'disabledOption' /* */}, 85 {tag:'option', html:"Greek (Ελληνικά)", value:"el-GR"/* -- */, disabled:true, cls:'disabledOption' /* */},
89 {tag:'option', html:"Hebrew (עברית)", value:"he-IL"/* -- */, disabled:true, cls:'disabledOption' /* */}, 86 {tag:'option', html:"Hebrew (עברית)", value:"he-IL"/* -- */, disabled:true, cls:'disabledOption' /* */},
90 {tag:'option', html:"Italian (Italiano)", value:"it-IT"}, 87 {tag:'option', html:"Italian (Italiano)", value:"it-IT"},
91 {tag:'option', html:"Japanese (日本語)", value:"ja-JP"}, 88 {tag:'option', html:"Japanese (日本語)", value:"ja-JP"},
92 {tag:'option', html:"Korean (한국어)", value:"ko-KR", disabled:true, cls:'disabledOption'}, 89 {tag:'option', html:"Korean (한국어)", value:"ko-KR", disabled:true, cls:'disabledOption'},
93 {tag:'option', html:"Norwegian (Norsk)", value:"no", disabled:true, cls:'disabledOption'}, 90 {tag:'option', html:"Norwegian (Norsk)", value:"no", disabled:true, cls:'disabledOption'},
94 {tag:'option', html:"Persian (فارسی)", value:"fa-IR", disabled:true, cls:'disabledOption'}, 91 {tag:'option', html:"Persian (فارسی)", value:"fa-IR", disabled:true, cls:'disabledOption'},
95 {tag:'option', html:"Polish (Polski)", value:"pl-PL", disabled:true, cls:'disabledOption'}, 92 {tag:'option', html:"Polish (Polski)", value:"pl-PL", disabled:true, cls:'disabledOption'},
96 {tag:'option', html:"Portuguese (Português)", value:"pt-BR"}, 93 {tag:'option', html:"Portuguese (Português)", value:"pt-BR"},
97 {tag:'option', html:"Russian (Русский)", value:"ru-RU"}, 94 {tag:'option', html:"Russian (Русский)", value:"ru-RU"},
98 {tag:'option', html:"Spanish (Español)", value:"es-ES"}, 95 {tag:'option', html:"Spanish (Español)", value:"es-ES"},
99 {tag:'option', html:"Swedish (Svenska)", value:"sv-SE", disabled:true, cls:'disabledOption'}, 96 {tag:'option', html:"Swedish (Svenska)", value:"sv-SE", disabled:true, cls:'disabledOption'},
100 {tag:'option', html:"Turkish (Türkçe)", value:"tr-TR", disabled:true, cls:'disabledOption'}, 97 {tag:'option', html:"Turkish (Türkçe)", value:"tr-TR", disabled:true, cls:'disabledOption'},
101 {tag:'option', html:"Vietnamese (Tiếng Việt)", value:"vi-VN", disabled:true, cls:'disabledOption'} 98 {tag:'option', html:"Vietnamese (Tiếng Việt)", value:"vi-VN", disabled:true, cls:'disabledOption'}
102 ] 99 ]
103} 100}
104 101
105Clipperz.PM.Strings.GeneralSettings = { 102Clipperz.PM.Strings.GeneralSettings = {
106 'en-us': { 103 'en-us': {
107 'loginFormAarghThatsBadUrl':"http://www.clipperz.com/support/faq/account_faq", 104 'loginFormAarghThatsBadUrl':"http://www.clipperz.com/support/faq/account_faq",
108 'loginFormVerifyTheCodeUrl':"http://www.clipperz.com/learn_more/reviewing_the_code", 105 'loginFormVerifyTheCodeUrl':"http://www.clipperz.com/learn_more/reviewing_the_code",
109 106
110 'donateHeaderLinkUrl': "http://www.clipperz.com/donations", 107 'donateHeaderLinkUrl': "http://www.clipperz.com/donations",
111 'creditsHeaderLinkUrl': "http://www.clipperz.com/credits", 108 'creditsHeaderLinkUrl': "http://www.clipperz.com/credits",
112 'feedbackHeaderLinkUrl': "http://www.clipperz.com/contact", 109 'feedbackHeaderLinkUrl': "http://www.clipperz.com/contact",
113 'helpHeaderLinkUrl': "http://www.clipperz.com/support/user_guide", 110 'helpHeaderLinkUrl': "http://www.clipperz.com/support/user_guide",
114 'forumHeaderLinkUrl': "http://www.clipperz.com/forum", 111 'forumHeaderLinkUrl': "http://www.clipperz.com/forum",
115 112
116 'httpAuthBookmarkletConfiguration':{tag:'textarea', id:'httpAuthDefaultConfiguration', html:"" + 113 'httpAuthBookmarkletConfiguration':{tag:'textarea', id:'httpAuthDefaultConfiguration', html:"" +
117 "{ \"page\":{\"title\":\"HTTP authentication\"}," + "\n" + 114 "{ \"page\":{\"title\":\"HTTP authentication\"}," + "\n" +
118 " \"form\":{\"attributes\": {" + "\n" + 115 " \"form\":{\"attributes\": {" + "\n" +
119 " \"action\":\"\"," + "\n" + 116 " \"action\":\"\"," + "\n" +
120 " \"type\":\"http_auth\"" + "\n" + 117 " \"type\":\"http_auth\"" + "\n" +
121 " }, \"inputs\": [" + "\n" + 118 " }, \"inputs\": [" + "\n" +
122 " {\"type\":\"text\",\"name\":\"url\",\"value\":\"\"}," + "\n" + 119 " {\"type\":\"text\",\"name\":\"url\",\"value\":\"\"}," + "\n" +
123 " {\"type\":\"text\",\"name\":\"username\",\"value\":\"\"}," + "\n" + 120 " {\"type\":\"text\",\"name\":\"username\",\"value\":\"\"}," + "\n" +
124 " {\"type\":\"password\",\"name\":\"password\",\"value\":\"\"}" + "\n" + 121 " {\"type\":\"password\",\"name\":\"password\",\"value\":\"\"}" + "\n" +
125 " ]}, \"version\":\"0.2.3\"}" 122 " ]}, \"version\":\"0.2.3\"}"
126 }, 123 },
127 124
128 'directLoginJumpPageUrl':"", 125 'directLoginJumpPageUrl':"",
129 'defaultFaviconUrl': "data:application/octet-stream;charset=utf-8;base64,AAABAAEAFxcAAAEAGAD8BgAAFgAAACgAAAAXAAAALgAAAAEAGAAAAAAAAAAAABIXAAASFwAAAAAAAAAAAAD///////////////////////////////////////////////////////////////////////////////////////////9zAC////////////////////////////////////////////////////////////////////////////////////////////9pAG////////////////////////////////////////////////////////////////////////////////////////////9rAC////////////////////////////////////////////////////////////////////////////////////////////9yAHP////////////////////////IyMizs7O6urrq6ur////////////Ozs6zs7Ozs7Pq6ur///////////////////////8AAAD////////////////////V1dWXl5eXl5eXl5elpaX4+Pj////Ozs6Xl5eXl5eXl5eenp7///////////////////////8AAAD////////////////////Ozs6Xl5eXl5eXl5eXl5fBwcHq6uqenp6Xl5eXl5eXl5eXl5f///////////////////////8AAAD////////////////////j4+OXl5eXl5eXl5eXl5eXl5elpaWXl5eXl5eXl5eXl5ezs7P///////////////////////8AAAD////////////////////////IyMiXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eenp7x8fH////////////////////////////////////////////////////4+PilpaWXl5eXl5eXl5eXl5eXl5eXl5eXl5fOzs7////////////////////////////////////////////////////////q6uq6urqXl5eXl5eXl5eXl5eXl5eXl5eenp7V1dX4+Pj///////////////////////8AAAD////////////4+PjOzs6lpaWXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5e6urrj4+P///////////////8AAAD////////////BwcGXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5fx8fH///////////8AAAD///////////+zs7OXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5fj4+P///////////8AAAD////////////IyMiXl5eXl5eXl5eXl5e6urqXl5eXl5eXl5eXl5esrKylpaWXl5eXl5eXl5eenp7x8fH///////////8AAAD////////////////Ozs7Ozs7V1dX4+Pj///+Xl5eXl5eXl5eXl5fOzs7////q6urOzs7Ozs7q6ur///////////////8AAAD///////////////////////////////////+Xl5eXl5eXl5eXl5fOzs7///////////////////////////////////8AAAD///////////////////////////////////+Xl5eXl5eXl5eXl5fOzs7///////////////////////////////////8AAAD///////////////////////////////////+Xl5eXl5eXl5eXl5fOzs7///////////////////////////////////8AAAD////////////////////////////////////IyMiXl5eXl5eenp7x8fH///////////////////////////////////8AAAD////////////////////////////////////////j4+Pj4+Px8fH///////////////////////////////////////8AAAD///////////////////////////////////////////////////////////////////////////////////////////8AAAD///////////////////////////////////////////////////////////////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAo=", 126 'defaultFaviconUrl': "data:application/octet-stream;charset=utf-8;base64,AAABAAEAFxcAAAEAGAD8BgAAFgAAACgAAAAXAAAALgAAAAEAGAAAAAAAAAAAABIXAAASFwAAAAAAAAAAAAD///////////////////////////////////////////////////////////////////////////////////////////9zAC////////////////////////////////////////////////////////////////////////////////////////////9pAG////////////////////////////////////////////////////////////////////////////////////////////9rAC////////////////////////////////////////////////////////////////////////////////////////////9yAHP////////////////////////IyMizs7O6urrq6ur////////////Ozs6zs7Ozs7Pq6ur///////////////////////8AAAD////////////////////V1dWXl5eXl5eXl5elpaX4+Pj////Ozs6Xl5eXl5eXl5eenp7///////////////////////8AAAD////////////////////Ozs6Xl5eXl5eXl5eXl5fBwcHq6uqenp6Xl5eXl5eXl5eXl5f///////////////////////8AAAD////////////////////j4+OXl5eXl5eXl5eXl5eXl5elpaWXl5eXl5eXl5eXl5ezs7P///////////////////////8AAAD////////////////////////IyMiXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eenp7x8fH////////////////////////////////////////////////////4+PilpaWXl5eXl5eXl5eXl5eXl5eXl5eXl5fOzs7////////////////////////////////////////////////////////q6uq6urqXl5eXl5eXl5eXl5eXl5eXl5eenp7V1dX4+Pj///////////////////////8AAAD////////////4+PjOzs6lpaWXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5e6urrj4+P///////////////8AAAD////////////BwcGXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5fx8fH///////////8AAAD///////////+zs7OXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5fj4+P///////////8AAAD////////////IyMiXl5eXl5eXl5eXl5e6urqXl5eXl5eXl5eXl5esrKylpaWXl5eXl5eXl5eenp7x8fH///////////8AAAD////////////////Ozs7Ozs7V1dX4+Pj///+Xl5eXl5eXl5eXl5fOzs7////q6urOzs7Ozs7q6ur///////////////8AAAD///////////////////////////////////+Xl5eXl5eXl5eXl5fOzs7///////////////////////////////////8AAAD///////////////////////////////////+Xl5eXl5eXl5eXl5fOzs7///////////////////////////////////8AAAD///////////////////////////////////+Xl5eXl5eXl5eXl5fOzs7///////////////////////////////////8AAAD////////////////////////////////////IyMiXl5eXl5eenp7x8fH///////////////////////////////////8AAAD////////////////////////////////////////j4+Pj4+Px8fH///////////////////////////////////////8AAAD///////////////////////////////////////////////////////////////////////////////////////////8AAAD///////////////////////////////////////////////////////////////////////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAo=",
130 'defaultFaviconUrl_IE': "https://www.clipperz.com/images/icons/misc/favicon.ico", 127 'defaultFaviconUrl_IE': "https://www.clipperz.com/images/icons/misc/favicon.ico",
131 128
132 'donateSplashPanelIconUrl':"./images/smiles_big.gif", 129 'donateSplashPanelIconUrl':"./images/smiles_big.gif",
133 130
134 'icons_baseUrl':"https://www.clipperz.com/images/icons", 131 'icons_baseUrl':"https://www.clipperz.com/images/icons",
135 132
136 'passwordGeneratorLowercaseCharset':"abcdefghijklmnopqrstuvwxyz", 133 'passwordGeneratorLowercaseCharset':"abcdefghijklmnopqrstuvwxyz",
137 'passwordGeneratorUppercaseCharset':"ABCDEFGHIJKLMNOPQRSTUVWXYZ", 134 'passwordGeneratorUppercaseCharset':"ABCDEFGHIJKLMNOPQRSTUVWXYZ",
138 'passwordGeneratorNumberCharset': "0123456789", 135 'passwordGeneratorNumberCharset': "0123456789",
139 'passwordGeneratorSymbolCharset': "!@#$%^&*+?[]{}/|\\<>,.;:~=-_", 136 'passwordGeneratorSymbolCharset': "!@#$%^&*+?[]{}/|\\<>,.;:~=-_",
140 137
141 '_': "" 138 '_': ""
142 } 139 }
143} 140}
144 141
145Clipperz.PM.Strings.defaultLanguages = { 142Clipperz.PM.Strings.defaultLanguages = {
146 'default':"en-us", 143 'default':"en-us",
147 144
148 // 'de':"de-de", 145 // 'de':"de-de",
149 // 'el':"el-gr", 146 // 'el':"el-gr",
150 // 'he':"he-il", 147 // 'he':"he-il",
151 // 'ru':"ru-ru", 148 // 'ru':"ru-ru",
152 149
153 150
154 'fr':"fr-fr", 151 'fr':"fr-fr",
155 'es':"es-es", 152 'es':"es-es",
156 'zh':"zh-cn", 153 'zh':"zh-cn",
157 'ja':"ja-jp", 154 'ja':"ja-jp",
158 'pt':"pt-br", 155 'pt':"pt-br",
159 'it':"it-it", 156 'it':"it-it",
160 'en': "en-us" 157 'en': "en-us"
161} 158}
162 159
163Clipperz.PM.Strings.inputTypeToRecordFieldType = { 160Clipperz.PM.Strings.inputTypeToRecordFieldType = {
164 'text': 'TXT', 161 'text': 'TXT',
165 'password': 'PWD', 162 'password': 'PWD',
166 'checkbox': 'CHECK', 163 'checkbox': 'CHECK',
167 'radio': 'RADIO', 164 'radio': 'RADIO',
168 'select': 'SELECT' 165 'select': 'SELECT'
169}; 166};
170 167
171Clipperz.PM.Strings.Languages.setSelectedLanguage = function(aLanguage) { 168Clipperz.PM.Strings.Languages.setSelectedLanguage = function(aLanguage) {
172 var language; 169 var language;
173 varselectedLanguage; 170 varselectedLanguage;
174 171
175 language = (aLanguage || Clipperz.PM.Strings.preferredLanguage || 'default').toLowerCase(); 172 language = (aLanguage || Clipperz.PM.Strings.preferredLanguage || 'default').toLowerCase();
176//MochiKit.Logging.logDebug("1 - language: " + language); 173//MochiKit.Logging.logDebug("1 - language: " + language);
177 if (typeof(Clipperz.PM.Strings.defaultLanguages[language]) != 'undefined') { 174 if (typeof(Clipperz.PM.Strings.defaultLanguages[language]) != 'undefined') {
178 language = Clipperz.PM.Strings.defaultLanguages[language]; 175 language = Clipperz.PM.Strings.defaultLanguages[language];
179//MochiKit.Logging.logDebug("2 - language: " + language); 176//MochiKit.Logging.logDebug("2 - language: " + language);
180 } 177 }
181 178
182 if (typeof(Clipperz.PM.Strings.Languages[language]) != 'undefined') { 179 if (typeof(Clipperz.PM.Strings.Languages[language]) != 'undefined') {
183 selectedLanguage = language; 180 selectedLanguage = language;
184//MochiKit.Logging.logDebug("### selectedLanguage full match: " + selectedLanguage); 181//MochiKit.Logging.logDebug("### selectedLanguage full match: " + selectedLanguage);
185 } else if (typeof(Clipperz.PM.Strings.defaultLanguages[language.substr(0,2)]) != 'undefined') { 182 } else if (typeof(Clipperz.PM.Strings.defaultLanguages[language.substr(0,2)]) != 'undefined') {
186 selectedLanguage = Clipperz.PM.Strings.defaultLanguages[language.substr(0,2)]; 183 selectedLanguage = Clipperz.PM.Strings.defaultLanguages[language.substr(0,2)];
187//MochiKit.Logging.logDebug("### selectedLanguage partial match: " + selectedLanguage); 184//MochiKit.Logging.logDebug("### selectedLanguage partial match: " + selectedLanguage);
188 } else { 185 } else {
189 selectedLanguage = Clipperz.PM.Strings.defaultLanguages['default']; 186 selectedLanguage = Clipperz.PM.Strings.defaultLanguages['default'];
190//MochiKit.Logging.logDebug("### selectedLanguage default match: " + selectedLanguage); 187//MochiKit.Logging.logDebug("### selectedLanguage default match: " + selectedLanguage);
191 } 188 }
192 189
193//MochiKit.Logging.logDebug("### selectedLanguage: " + selectedLanguage); 190//MochiKit.Logging.logDebug("### selectedLanguage: " + selectedLanguage);
194 if (selectedLanguage != Clipperz.PM.Strings.selectedLanguage) { 191 if (selectedLanguage != Clipperz.PM.Strings.selectedLanguage) {
195//MochiKit.Logging.logDebug(">>> setting Clipperz.PM.Strings.selectedLanguage: " + selectedLanguage); 192//MochiKit.Logging.logDebug(">>> setting Clipperz.PM.Strings.selectedLanguage: " + selectedLanguage);
196 Clipperz.PM.Strings.selectedLanguage = selectedLanguage; 193 Clipperz.PM.Strings.selectedLanguage = selectedLanguage;
197 194
198 MochiKit.Base.update(Clipperz.PM.Strings, Clipperz.PM.Strings.standardStrings) 195 MochiKit.Base.update(Clipperz.PM.Strings, Clipperz.PM.Strings.standardStrings)
199//MochiKit.Logging.logDebug("=== 1: " + Clipperz.PM.Strings['bookmarkletTabInstructions']); 196//MochiKit.Logging.logDebug("=== 1: " + Clipperz.PM.Strings['bookmarkletTabInstructions']);
200 MochiKit.Base.updatetree(Clipperz.PM.Strings, Clipperz.PM.Strings.Languages[Clipperz.PM.Strings.defaultLanguages['default']]); 197 MochiKit.Base.updatetree(Clipperz.PM.Strings, Clipperz.PM.Strings.Languages[Clipperz.PM.Strings.defaultLanguages['default']]);
201//MochiKit.Logging.logDebug("=== 2: " + Clipperz.PM.Strings['bookmarkletTabInstructions']); 198//MochiKit.Logging.logDebug("=== 2: " + Clipperz.PM.Strings['bookmarkletTabInstructions']);
202 MochiKit.Base.updatetree(Clipperz.PM.Strings, Clipperz.PM.Strings.GeneralSettings[Clipperz.PM.Strings.defaultLanguages['default']]); 199 MochiKit.Base.updatetree(Clipperz.PM.Strings, Clipperz.PM.Strings.GeneralSettings[Clipperz.PM.Strings.defaultLanguages['default']]);
203//MochiKit.Logging.logDebug("=== 3: " + Clipperz.PM.Strings['bookmarkletTabInstructions']); 200//MochiKit.Logging.logDebug("=== 3: " + Clipperz.PM.Strings['bookmarkletTabInstructions']);
204 MochiKit.Base.updatetree(Clipperz.PM.Strings, Clipperz.PM.Strings.Languages[selectedLanguage]); 201 MochiKit.Base.updatetree(Clipperz.PM.Strings, Clipperz.PM.Strings.Languages[selectedLanguage]);
205//MochiKit.Logging.logDebug("=== 4: " + Clipperz.PM.Strings['bookmarkletTabInstructions']); 202//MochiKit.Logging.logDebug("=== 4: " + Clipperz.PM.Strings['bookmarkletTabInstructions']);
206 MochiKit.Base.updatetree(Clipperz.PM.Strings, Clipperz.PM.Strings.GeneralSettings[selectedLanguage]); 203 MochiKit.Base.updatetree(Clipperz.PM.Strings, Clipperz.PM.Strings.GeneralSettings[selectedLanguage]);
207//MochiKit.Logging.logDebug("=== 5: " + Clipperz.PM.Strings['bookmarkletTabInstructions']); 204//MochiKit.Logging.logDebug("=== 5: " + Clipperz.PM.Strings['bookmarkletTabInstructions']);
208 205
209 Clipperz.NotificationCenter.notify(Clipperz.PM.Strings.Languages, 'switchLanguage', selectedLanguage); 206 Clipperz.NotificationCenter.notify(Clipperz.PM.Strings.Languages, 'switchLanguage', selectedLanguage);
210//MochiKit.Logging.logDebug("<<< setting Clipperz.PM.Strings.selectedLanguage. Done"); 207//MochiKit.Logging.logDebug("<<< setting Clipperz.PM.Strings.selectedLanguage. Done");
211 } 208 }
212} 209}
213 210
214Clipperz.PM.Strings.Languages.initSetup = function() { 211Clipperz.PM.Strings.Languages.initSetup = function() {
215 varlanguage; 212 varlanguage;
216 varlanguageParser; 213 varlanguageParser;
217 214
218 language = navigator.language || navigator.userLanguage; //en, en-US, .... "de", "nb-no" 215 language = navigator.language || navigator.userLanguage; //en, en-US, .... "de", "nb-no"
219 languageParser = new RegExp("language=([a-z]{2}(?:\-[a-z]{2})?)(\&|$)", "i"); 216 languageParser = new RegExp("language=([a-z]{2}(?:\-[a-z]{2})?)(\&|$)", "i");
220 if (languageParser.test(window.location.search)) { 217 if (languageParser.test(window.location.search)) {
221//MochiKit.Logging.logDebug("LANGUAGE specified in the query string"); 218//MochiKit.Logging.logDebug("LANGUAGE specified in the query string");
222 language = RegExp.$1; 219 language = RegExp.$1;
223 } 220 }
224 221
225//MochiKit.Logging.logDebug("+++ preferredLanguage: " + language); 222//MochiKit.Logging.logDebug("+++ preferredLanguage: " + language);
226 Clipperz.PM.Strings.preferredLanguage = language.toLowerCase(); 223 Clipperz.PM.Strings.preferredLanguage = language.toLowerCase();
227//MochiKit.Logging.logDebug("## preferredLanguage: " + Clipperz.PM.Strings.preferredLanguage); 224//MochiKit.Logging.logDebug("## preferredLanguage: " + Clipperz.PM.Strings.preferredLanguage);
228 Clipperz.PM.Strings.Languages.setSelectedLanguage(Clipperz.PM.Strings.preferredLanguage); 225 Clipperz.PM.Strings.Languages.setSelectedLanguage(Clipperz.PM.Strings.preferredLanguage);
229} 226}
230 227
231//MochiKit.DOM.addLoadEvent(Clipperz.PM.Strings.Languages.initSetup); 228//MochiKit.DOM.addLoadEvent(Clipperz.PM.Strings.Languages.initSetup);
diff --git a/frontend/beta/js/Clipperz/PM/Strings/MessagePanelConfigurations.js b/frontend/beta/js/Clipperz/PM/Strings/MessagePanelConfigurations.js
index 446e96c..7f6c52f 100644
--- a/frontend/beta/js/Clipperz/PM/Strings/MessagePanelConfigurations.js
+++ b/frontend/beta/js/Clipperz/PM/Strings/MessagePanelConfigurations.js
@@ -1,389 +1,386 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Strings) == 'undefined') { Clipperz.PM.Strings = {}; } 28if (typeof(Clipperz.PM.Strings) == 'undefined') { Clipperz.PM.Strings = {}; }
32 29
33Clipperz.PM.Strings.messagePanelConfigurations = { 30Clipperz.PM.Strings.messagePanelConfigurations = {
34 31
35 32
36 //------------------------------------------------------------------------- 33 //-------------------------------------------------------------------------
37 // 34 //
38 // Registration - connection 35 // Registration - connection
39 // 36 //
40 'registration_verify': function() { 37 'registration_verify': function() {
41 return { 38 return {
42 'title': null, 39 'title': null,
43 'text': Clipperz.PM.Strings['connectionRegistrationSendingRequestMessageText'] 40 'text': Clipperz.PM.Strings['connectionRegistrationSendingRequestMessageText']
44 } 41 }
45 }, 42 },
46 43
47 'registration_sendingCredentials': function() { 44 'registration_sendingCredentials': function() {
48 return { 45 return {
49 'title': null, 46 'title': null,
50 'text': Clipperz.PM.Strings['connectionRegistrationSendingCredentialsMessageText'] 47 'text': Clipperz.PM.Strings['connectionRegistrationSendingCredentialsMessageText']
51 } 48 }
52 }, 49 },
53 50
54 //------------------------------------------------------------------------- 51 //-------------------------------------------------------------------------
55 // 52 //
56 // One Time Password login message panel 53 // One Time Password login message panel
57 // 54 //
58 55
59 'OTP_login_start': function() { 56 'OTP_login_start': function() {
60 return { 57 return {
61 'title': Clipperz.PM.Strings['OTPloginMessagePanelInitialTitle'], 58 'title': Clipperz.PM.Strings['OTPloginMessagePanelInitialTitle'],
62 'text': Clipperz.PM.Strings['OTPloginMessagePanelInitialText'], 59 'text': Clipperz.PM.Strings['OTPloginMessagePanelInitialText'],
63 'steps': '+3', 60 'steps': '+3',
64 'buttons': {} 61 'buttons': {}
65 } 62 }
66 }, 63 },
67 64
68 'OTP_login_loadingOTP': function() { 65 'OTP_login_loadingOTP': function() {
69 return { 66 return {
70 'title': Clipperz.PM.Strings['OTPloginMessagePanelLoadingTitle'], 67 'title': Clipperz.PM.Strings['OTPloginMessagePanelLoadingTitle'],
71 'text': Clipperz.PM.Strings['OTPloginMessagePanelLoadingText'] 68 'text': Clipperz.PM.Strings['OTPloginMessagePanelLoadingText']
72 } 69 }
73 }, 70 },
74 71
75 'OTP_login_extractingPassphrase': function() { 72 'OTP_login_extractingPassphrase': function() {
76 return { 73 return {
77 'title': Clipperz.PM.Strings['OTPloginMessagePanelProcessingTitle'], 74 'title': Clipperz.PM.Strings['OTPloginMessagePanelProcessingTitle'],
78 'text': Clipperz.PM.Strings['OTPloginMessagePanelProcessingText'] 75 'text': Clipperz.PM.Strings['OTPloginMessagePanelProcessingText']
79 } 76 }
80 }, 77 },
81 78
82 79
83 //------------------------------------------------------------------------- 80 //-------------------------------------------------------------------------
84 // 81 //
85 // Login message panel 82 // Login message panel
86 // 83 //
87 'login_start': function() { 84 'login_start': function() {
88 return { 85 return {
89 'title': Clipperz.PM.Strings['loginMessagePanelInitialTitle'], 86 'title': Clipperz.PM.Strings['loginMessagePanelInitialTitle'],
90 'text': Clipperz.PM.Strings['loginMessagePanelInitialText'], 87 'text': Clipperz.PM.Strings['loginMessagePanelInitialText'],
91 'steps': '+7', 88 'steps': '+7',
92 'buttons': { 89 'buttons': {
93 'ok': Clipperz.PM.Strings['loginMessagePanelInitialButtonLabel'] 90 'ok': Clipperz.PM.Strings['loginMessagePanelInitialButtonLabel']
94 } 91 }
95 } 92 }
96 }, 93 },
97 94
98 'login_connected': function() { 95 'login_connected': function() {
99 return { 96 return {
100 'title': Clipperz.PM.Strings['loginMessagePanelConnectedTitle'], 97 'title': Clipperz.PM.Strings['loginMessagePanelConnectedTitle'],
101 'text': Clipperz.PM.Strings['loginMessagePanelConnectedText'], 98 'text': Clipperz.PM.Strings['loginMessagePanelConnectedText'],
102 'buttons': {} 99 'buttons': {}
103 } 100 }
104 }, 101 },
105 102
106 'login_failed':function() { 103 'login_failed':function() {
107 return { 104 return {
108 'title': Clipperz.PM.Strings['loginMessagePanelFailureTitle'], 105 'title': Clipperz.PM.Strings['loginMessagePanelFailureTitle'],
109 'text': Clipperz.PM.Strings['loginMessagePanelFailureText'], 106 'text': Clipperz.PM.Strings['loginMessagePanelFailureText'],
110 'button': Clipperz.PM.Strings['loginMessagePanelFailureButtonLabel'] 107 'button': Clipperz.PM.Strings['loginMessagePanelFailureButtonLabel']
111 } 108 }
112 }, 109 },
113 110
114 //------------------------------------------------------------------------- 111 //-------------------------------------------------------------------------
115 // 112 //
116 // Login message panel - connection 113 // Login message panel - connection
117 // 114 //
118 'connection_sendingCredentials': function() { 115 'connection_sendingCredentials': function() {
119 return { 116 return {
120 'title': Clipperz.PM.Strings['connectionLoginSendingCredentialsMessageTitle'], 117 'title': Clipperz.PM.Strings['connectionLoginSendingCredentialsMessageTitle'],
121 'text': Clipperz.PM.Strings['connectionLoginSendingCredentialsMessageText'] 118 'text': Clipperz.PM.Strings['connectionLoginSendingCredentialsMessageText']
122 } 119 }
123 }, 120 },
124 121
125 'connection_credentialVerification': function() { 122 'connection_credentialVerification': function() {
126 return { 123 return {
127 'title': Clipperz.PM.Strings['connectionLoginCredentialsVerificationMessageTitle'], 124 'title': Clipperz.PM.Strings['connectionLoginCredentialsVerificationMessageTitle'],
128 'text': Clipperz.PM.Strings['connectionLoginCredentialsVerificationMessageText'] 125 'text': Clipperz.PM.Strings['connectionLoginCredentialsVerificationMessageText']
129 } 126 }
130 }, 127 },
131 128
132 'connection_loggedIn': function() { 129 'connection_loggedIn': function() {
133 return { 130 return {
134 'title': Clipperz.PM.Strings['connectionLoginDoneMessageTitle'], 131 'title': Clipperz.PM.Strings['connectionLoginDoneMessageTitle'],
135 'text': Clipperz.PM.Strings['connectionLoginDoneMessageText'] 132 'text': Clipperz.PM.Strings['connectionLoginDoneMessageText']
136 } 133 }
137 }, 134 },
138 135
139 //------------------------------------------------------------------------- 136 //-------------------------------------------------------------------------
140 // 137 //
141 //Login message panel - user 138 //Login message panel - user
142 // 139 //
143 'connection_upgrading': function() { 140 'connection_upgrading': function() {
144 return { 141 return {
145 'title': Clipperz.PM.Strings['userLoginPanelUpgradingUserCredentialsMessageTitle'], 142 'title': Clipperz.PM.Strings['userLoginPanelUpgradingUserCredentialsMessageTitle'],
146 'text': Clipperz.PM.Strings['userLoginPanelUpgradingUserCredentialsMessageText'], 143 'text': Clipperz.PM.Strings['userLoginPanelUpgradingUserCredentialsMessageText'],
147 'steps': '+1' 144 'steps': '+1'
148 } 145 }
149 }, 146 },
150 147
151 'connection_done': function() { 148 'connection_done': function() {
152 return { 149 return {
153 'title': Clipperz.PM.Strings['userLoginPanelConnectedMessageTitle'], 150 'title': Clipperz.PM.Strings['userLoginPanelConnectedMessageTitle'],
154 'text': Clipperz.PM.Strings['userLoginPanelConnectedMessageText'] 151 'text': Clipperz.PM.Strings['userLoginPanelConnectedMessageText']
155 } 152 }
156 }, 153 },
157 154
158 'connection_tryOlderSchema': function() { 155 'connection_tryOlderSchema': function() {
159 return { 156 return {
160 'title': Clipperz.PM.Strings['userLoginPanelTryingAnOlderConnectionSchemaMessageTitle'], 157 'title': Clipperz.PM.Strings['userLoginPanelTryingAnOlderConnectionSchemaMessageTitle'],
161 'text': Clipperz.PM.Strings['userLoginPanelTryingAnOlderConnectionSchemaMessageText'], 158 'text': Clipperz.PM.Strings['userLoginPanelTryingAnOlderConnectionSchemaMessageText'],
162 'steps': '+4' 159 'steps': '+4'
163 } 160 }
164 }, 161 },
165 162
166 'connection_loadingUserData': function() { 163 'connection_loadingUserData': function() {
167 return { 164 return {
168 'title': Clipperz.PM.Strings['userLoginPanelLoadingUserDataMessageTitle'], 165 'title': Clipperz.PM.Strings['userLoginPanelLoadingUserDataMessageTitle'],
169 'text': Clipperz.PM.Strings['userLoginPanelLoadingUserDataMessageText'] 166 'text': Clipperz.PM.Strings['userLoginPanelLoadingUserDataMessageText']
170 } 167 }
171 }, 168 },
172 169
173 'connection_decryptingUserData': function() { 170 'connection_decryptingUserData': function() {
174 return { 171 return {
175 'title': Clipperz.PM.Strings['userLoginPanelDecryptingUserDataMessageTitle'], 172 'title': Clipperz.PM.Strings['userLoginPanelDecryptingUserDataMessageTitle'],
176 'text': Clipperz.PM.Strings['userLoginPanelDecryptingUserDataMessageText'], 173 'text': Clipperz.PM.Strings['userLoginPanelDecryptingUserDataMessageText'],
177 'steps': '+1' 174 'steps': '+1'
178 } 175 }
179 }, 176 },
180 177
181 'connection_decryptingUserStatistics': function() { 178 'connection_decryptingUserStatistics': function() {
182 return { 179 return {
183 'title': Clipperz.PM.Strings['userLoginPanelDecryptingUserStatisticsMessageTitle'], 180 'title': Clipperz.PM.Strings['userLoginPanelDecryptingUserStatisticsMessageTitle'],
184 'text': Clipperz.PM.Strings['userLoginPanelDecryptingUserStatisticsMessageText'] 181 'text': Clipperz.PM.Strings['userLoginPanelDecryptingUserStatisticsMessageText']
185 } 182 }
186 }, 183 },
187 184
188 'collectingEntropy': function() { 185 'collectingEntropy': function() {
189 return { 186 return {
190 'text': Clipperz.PM.Strings['panelCollectingEntryopyMessageText'], 187 'text': Clipperz.PM.Strings['panelCollectingEntryopyMessageText'],
191 'steps': '+1' 188 'steps': '+1'
192 } 189 }
193 }, 190 },
194 191
195 //------------------------------------------------------------------------- 192 //-------------------------------------------------------------------------
196 // 193 //
197 // Cards block - delete card panel 194 // Cards block - delete card panel
198 // 195 //
199 'deleteRecord_collectData': function() { 196 'deleteRecord_collectData': function() {
200 return { 197 return {
201 'title': Clipperz.PM.Strings['deleteRecordPanelCollectRecordDataMessageTitle'], 198 'title': Clipperz.PM.Strings['deleteRecordPanelCollectRecordDataMessageTitle'],
202 'text': Clipperz.PM.Strings['deleteRecordPanelCollectRecordDataMessageText'] 199 'text': Clipperz.PM.Strings['deleteRecordPanelCollectRecordDataMessageText']
203 } 200 }
204 }, 201 },
205 202
206 'deleteRecord_encryptData': function() { 203 'deleteRecord_encryptData': function() {
207 return { 204 return {
208 'title': Clipperz.PM.Strings['deleteRecordPanelEncryptUserDataMessageTitle'], 205 'title': Clipperz.PM.Strings['deleteRecordPanelEncryptUserDataMessageTitle'],
209 'text': Clipperz.PM.Strings['deleteRecordPanelEncryptUserDataMessageText'] 206 'text': Clipperz.PM.Strings['deleteRecordPanelEncryptUserDataMessageText']
210 } 207 }
211 }, 208 },
212 209
213 'deleteRecord_sendingData': function() { 210 'deleteRecord_sendingData': function() {
214 return { 211 return {
215 'title': Clipperz.PM.Strings['deleteRecordPanelSendingDataToTheServerMessageTitle'], 212 'title': Clipperz.PM.Strings['deleteRecordPanelSendingDataToTheServerMessageTitle'],
216 'text': Clipperz.PM.Strings['deleteRecordPanelSendingDataToTheServerMessageText'] 213 'text': Clipperz.PM.Strings['deleteRecordPanelSendingDataToTheServerMessageText']
217 } 214 }
218 }, 215 },
219 216
220 'deleteRecord_updatingInterface': function() { 217 'deleteRecord_updatingInterface': function() {
221 return { 218 return {
222 'title': Clipperz.PM.Strings['deleteRecordPanelUpdatingTheInterfaceMessageTitle'], 219 'title': Clipperz.PM.Strings['deleteRecordPanelUpdatingTheInterfaceMessageTitle'],
223 'text': Clipperz.PM.Strings['deleteRecordPanelUpdatingTheInterfaceMessageText'] 220 'text': Clipperz.PM.Strings['deleteRecordPanelUpdatingTheInterfaceMessageText']
224 } 221 }
225 }, 222 },
226 223
227 224
228 //------------------------------------------------------------------------- 225 //-------------------------------------------------------------------------
229 // 226 //
230 //Cards block - save card panel 227 //Cards block - save card panel
231 // 228 //
232 'saveCard_collectRecordInfo': function() { 229 'saveCard_collectRecordInfo': function() {
233 return { 230 return {
234 'title': Clipperz.PM.Strings['recordSaveChangesPanelCollectRecordInfoMessageTitle'], 231 'title': Clipperz.PM.Strings['recordSaveChangesPanelCollectRecordInfoMessageTitle'],
235 'text': Clipperz.PM.Strings['recordSaveChangesPanelCollectRecordInfoMessageText'] 232 'text': Clipperz.PM.Strings['recordSaveChangesPanelCollectRecordInfoMessageText']
236 } 233 }
237 }, 234 },
238 235
239 'saveCard_encryptUserData': function() { 236 'saveCard_encryptUserData': function() {
240 return { 237 return {
241 'title': Clipperz.PM.Strings['recordSaveChangesPanelEncryptUserDataMessageTitle'], 238 'title': Clipperz.PM.Strings['recordSaveChangesPanelEncryptUserDataMessageTitle'],
242 'text': Clipperz.PM.Strings['recordSaveChangesPanelEncryptUserDataMessageText'] 239 'text': Clipperz.PM.Strings['recordSaveChangesPanelEncryptUserDataMessageText']
243 } 240 }
244 }, 241 },
245 242
246 'saveCard_encryptRecordData': function() { 243 'saveCard_encryptRecordData': function() {
247 return { 244 return {
248 'title': Clipperz.PM.Strings['recordSaveChangesPanelEncryptRecordDataMessageTitle'], 245 'title': Clipperz.PM.Strings['recordSaveChangesPanelEncryptRecordDataMessageTitle'],
249 'text': Clipperz.PM.Strings['recordSaveChangesPanelEncryptRecordDataMessageText'] 246 'text': Clipperz.PM.Strings['recordSaveChangesPanelEncryptRecordDataMessageText']
250 } 247 }
251 }, 248 },
252 249
253 'saveCard_encryptRecordVersions': function() { 250 'saveCard_encryptRecordVersions': function() {
254 return { 251 return {
255 'title': Clipperz.PM.Strings['recordSaveChangesPanelEncryptRecordVersionDataMessageTitle'], 252 'title': Clipperz.PM.Strings['recordSaveChangesPanelEncryptRecordVersionDataMessageTitle'],
256 'text': Clipperz.PM.Strings['recordSaveChangesPanelEncryptRecordVersionDataMessageText'] 253 'text': Clipperz.PM.Strings['recordSaveChangesPanelEncryptRecordVersionDataMessageText']
257 } 254 }
258 }, 255 },
259 256
260 'saveCard_sendingData': function() { 257 'saveCard_sendingData': function() {
261 return { 258 return {
262 'title': Clipperz.PM.Strings['recordSaveChangesPanelSendingDataToTheServerMessageTitle'], 259 'title': Clipperz.PM.Strings['recordSaveChangesPanelSendingDataToTheServerMessageTitle'],
263 'text': Clipperz.PM.Strings['recordSaveChangesPanelSendingDataToTheServerMessageText'] 260 'text': Clipperz.PM.Strings['recordSaveChangesPanelSendingDataToTheServerMessageText']
264 } 261 }
265 }, 262 },
266 263
267 'saveCard_updatingInterface': function() { 264 'saveCard_updatingInterface': function() {
268 return { 265 return {
269 'title': Clipperz.PM.Strings['recordSaveChangesPanelUpdatingTheInterfaceMessageTitle'], 266 'title': Clipperz.PM.Strings['recordSaveChangesPanelUpdatingTheInterfaceMessageTitle'],
270 'text': Clipperz.PM.Strings['recordSaveChangesPanelUpdatingTheInterfaceMessageText'] 267 'text': Clipperz.PM.Strings['recordSaveChangesPanelUpdatingTheInterfaceMessageText']
271 } 268 }
272 }, 269 },
273 270
274 //------------------------------------------------------------------------- 271 //-------------------------------------------------------------------------
275 // 272 //
276 //Account panel - user preferences 273 //Account panel - user preferences
277 // 274 //
278 'account_savingPreferences_1': function() { 275 'account_savingPreferences_1': function() {
279 return { 276 return {
280 'title': Clipperz.PM.Strings['accountPreferencesSavingPanelTitle_Step1'], 277 'title': Clipperz.PM.Strings['accountPreferencesSavingPanelTitle_Step1'],
281 'text': Clipperz.PM.Strings['accountPreferencesSavingPanelText_Step1'], 278 'text': Clipperz.PM.Strings['accountPreferencesSavingPanelText_Step1'],
282 'steps': '+3' 279 'steps': '+3'
283 } 280 }
284 }, 281 },
285 282
286 'account_savingPreferences_2': function() { 283 'account_savingPreferences_2': function() {
287 return { 284 return {
288 'title': Clipperz.PM.Strings['accountPreferencesSavingPanelTitle_Step2'], 285 'title': Clipperz.PM.Strings['accountPreferencesSavingPanelTitle_Step2'],
289 'text': Clipperz.PM.Strings['accountPreferencesSavingPanelText_Step2'] 286 'text': Clipperz.PM.Strings['accountPreferencesSavingPanelText_Step2']
290 } 287 }
291 }, 288 },
292 289
293 290
294 //------------------------------------------------------------------------- 291 //-------------------------------------------------------------------------
295 // 292 //
296 //Account panel - change credentials 293 //Account panel - change credentials
297 // 294 //
298 'changeCredentials_encryptingData': function() { 295 'changeCredentials_encryptingData': function() {
299 return { 296 return {
300 'title': Clipperz.PM.Strings['changeCredentialsPanelEncryptingDataMessageTitle'], 297 'title': Clipperz.PM.Strings['changeCredentialsPanelEncryptingDataMessageTitle'],
301 'text': Clipperz.PM.Strings['changeCredentialsPanelEncryptingDataMessageText'] 298 'text': Clipperz.PM.Strings['changeCredentialsPanelEncryptingDataMessageText']
302 } 299 }
303 }, 300 },
304 301
305 'changeCredentials_creatingNewCredentials': function() { 302 'changeCredentials_creatingNewCredentials': function() {
306 return { 303 return {
307 'title': Clipperz.PM.Strings['changeCredentialsPanelCreatingNewCredentialsMessageTitle'], 304 'title': Clipperz.PM.Strings['changeCredentialsPanelCreatingNewCredentialsMessageTitle'],
308 'text': Clipperz.PM.Strings['changeCredentialsPanelCreatingNewCredentialsMessageText'] 305 'text': Clipperz.PM.Strings['changeCredentialsPanelCreatingNewCredentialsMessageText']
309 } 306 }
310 }, 307 },
311 308
312 'changeCredentials_sendingCredentials': function() { 309 'changeCredentials_sendingCredentials': function() {
313 return { 310 return {
314 'title': Clipperz.PM.Strings['changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle'], 311 'title': Clipperz.PM.Strings['changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle'],
315 'text': Clipperz.PM.Strings['changeCredentialsPanelSendingNewCredentialsToTheServerMessageText'] 312 'text': Clipperz.PM.Strings['changeCredentialsPanelSendingNewCredentialsToTheServerMessageText']
316 } 313 }
317 }, 314 },
318 315
319 'changeCredentials_done': function() { 316 'changeCredentials_done': function() {
320 return { 317 return {
321 'title': Clipperz.PM.Strings['changeCredentialsPanelDoneMessageTitle'], 318 'title': Clipperz.PM.Strings['changeCredentialsPanelDoneMessageTitle'],
322 'text': Clipperz.PM.Strings['changeCredentialsPanelDoneMessageText'] 319 'text': Clipperz.PM.Strings['changeCredentialsPanelDoneMessageText']
323 } 320 }
324 }, 321 },
325 322
326 323
327 //------------------------------------------------------------------------- 324 //-------------------------------------------------------------------------
328 // 325 //
329 //Account panel - change credentials 326 //Account panel - change credentials
330 // 327 //
331 'saveOTP_encryptUserData': function() { 328 'saveOTP_encryptUserData': function() {
332 return { 329 return {
333 'title': Clipperz.PM.Strings['saveOTP_encryptUserDataTitle'], 330 'title': Clipperz.PM.Strings['saveOTP_encryptUserDataTitle'],
334 'text': Clipperz.PM.Strings['saveOTP_encryptUserDataText'], 331 'text': Clipperz.PM.Strings['saveOTP_encryptUserDataText'],
335 'steps': '+4' 332 'steps': '+4'
336 } 333 }
337 }, 334 },
338 335
339 'saveOTP_encryptOTPData': function() { 336 'saveOTP_encryptOTPData': function() {
340 return { 337 return {
341 'title': Clipperz.PM.Strings['saveOTP_encryptOTPDataTitle'], 338 'title': Clipperz.PM.Strings['saveOTP_encryptOTPDataTitle'],
342 'text': Clipperz.PM.Strings['saveOTP_encryptOTPDataText'] 339 'text': Clipperz.PM.Strings['saveOTP_encryptOTPDataText']
343 } 340 }
344 }, 341 },
345 342
346 'saveOTP_sendingData': function() { 343 'saveOTP_sendingData': function() {
347 return { 344 return {
348 'title': Clipperz.PM.Strings['saveOTP_sendingDataTitle'], 345 'title': Clipperz.PM.Strings['saveOTP_sendingDataTitle'],
349 'text': Clipperz.PM.Strings['saveOTP_sendingDataText'] 346 'text': Clipperz.PM.Strings['saveOTP_sendingDataText']
350 } 347 }
351 }, 348 },
352 349
353 'saveOTP_updatingInterface': function() { 350 'saveOTP_updatingInterface': function() {
354 return { 351 return {
355 'title': Clipperz.PM.Strings['saveOTP_updatingInterfaceTitle'], 352 'title': Clipperz.PM.Strings['saveOTP_updatingInterfaceTitle'],
356 'text': Clipperz.PM.Strings['saveOTP_updatingInterfaceText'] 353 'text': Clipperz.PM.Strings['saveOTP_updatingInterfaceText']
357 } 354 }
358 }, 355 },
359 356
360 357
361 //------------------------------------------------------------------------- 358 //-------------------------------------------------------------------------
362 // 359 //
363 //Data panel - processingImportData 360 //Data panel - processingImportData
364 // 361 //
365 'parseImportData': function() { 362 'parseImportData': function() {
366 return { 363 return {
367 'title': Clipperz.PM.Strings['importData_parsingDataTitle'], 364 'title': Clipperz.PM.Strings['importData_parsingDataTitle'],
368 'text': Clipperz.PM.Strings['importData_parsingDataText'] 365 'text': Clipperz.PM.Strings['importData_parsingDataText']
369 } 366 }
370 }, 367 },
371 368
372 'previewImportData': function() { 369 'previewImportData': function() {
373 return { 370 return {
374 'title': Clipperz.PM.Strings['importData_previewingDataTitle'], 371 'title': Clipperz.PM.Strings['importData_previewingDataTitle'],
375 'text': Clipperz.PM.Strings['importData_previewingDataText'] 372 'text': Clipperz.PM.Strings['importData_previewingDataText']
376 } 373 }
377 }, 374 },
378 375
379 'processingImportData': function() { 376 'processingImportData': function() {
380 return { 377 return {
381 'title': Clipperz.PM.Strings['importData_processingDataTitle'], 378 'title': Clipperz.PM.Strings['importData_processingDataTitle'],
382 'text': Clipperz.PM.Strings['importData_processingDataText'] 379 'text': Clipperz.PM.Strings['importData_processingDataText']
383 } 380 }
384 }, 381 },
385 382
386 //------------------------------------------------------------------------- 383 //-------------------------------------------------------------------------
387 __syntaxFix__: "syntax fix" 384 __syntaxFix__: "syntax fix"
388 385
389} 386}
diff --git a/frontend/beta/js/Clipperz/PM/Strings/Strings_de-DE.js b/frontend/beta/js/Clipperz/PM/Strings/Strings_de-DE.js
index ecc8a36..6ccffa8 100644
--- a/frontend/beta/js/Clipperz/PM/Strings/Strings_de-DE.js
+++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_de-DE.js
@@ -1,352 +1,349 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29Clipperz.PM.Strings.Languages['de-DE'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 26Clipperz.PM.Strings.Languages['de-DE'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], {
30 'clipperzServiceDescription':"<h2>Privatsphäre für Deine Daten</h2> <ul> <li> <h3>Clipperz heißt:</h3> <ul> <li> <p>sichere und einfache zu bedienene Passwortverwaltung</p> </li> <li> <p>eine effektive Lösung des einmaligen Anmeldens</p> </li> <li> <p>eine digitale Brieftasche für Deine vertraulichen Daten</p> </li> </ul> </li> <li> <h3>Clipperz bietet Dir:</h3> <ul> <li> <p>einfaches Speichern und Verwalten von Passwörtern und Webzugangsdaten</p> </li> <li> <p>schnelles unkompliziertes einloggen, ohne Eingabe des Benutzernamen und Passworts, bei Webdiensten</p> </li> <li> <p>Schutz aller Deiner persönlichen Daten: Zutrittscodes, PINs, Benutzernamen, Passwörter, Kreditkartennummern, &hellip;</p> </li> <li> <p>Deine Geheimnisse mit Familienmitgliedern und Freunden zu teilen (mehr dazu in Kürze)</p> </li> </ul> </li> <li> <h3>Clipperz ist:</h3> <ul> <li> <p>kostenlos und absolut anonym</p> </li> <li> <p>unkomplizierter Zugriff zu jeder Zeit von jedem Rechner</p> </li> <li> <p>ohne Download und Installation verwendbar</p> </li> <li> <p>ein Schutz gegen das Speichern von Passwörtern auf Deinem PC oder das Notieren auf Papier</p> </li> </ul> </li> <li> <h3>Clipperz Sicherheit:</h3> <ul> <li> <p>Deine sensiblen persönlichen Informationen werden lokal durch Deinen Browser verschlüsselt, bevor sie an Clipperz über das Internet gesendet werden</p> </li> <li> <p>Der Schlüssel für diese Daten ist der Sicherheitssatz, den nur Du kennst</p> </li> <li> <p>Clipperz speichert Deine sensiblen Daten nur in verschlüsselter Form und kann zu keinem Zeitpunkt diese entschlüssel und in ihrer ursprünglichen Klartextform zugänglich machen</p> </li> <li> <p>Clipperz basiert auf standart Verschlüsselungsverfahren. Nichts ausergewöhnliches – oder hand gestricktes</p> </li> <li> <p>Du kannst den Quellcode zu jeder Zeit anschauen, aber Du brauchst nichts von Kryptographie zu verstehen um ein glücklicher Anwender zu sein!</p> </li> </ul> </li> <li> <a href=\"http://www.clipperz.com\" target=\"_blank\">Weitere Informationen</a> </li> </ul> ", 27 'clipperzServiceDescription':"<h2>Privatsphäre für Deine Daten</h2> <ul> <li> <h3>Clipperz heißt:</h3> <ul> <li> <p>sichere und einfache zu bedienene Passwortverwaltung</p> </li> <li> <p>eine effektive Lösung des einmaligen Anmeldens</p> </li> <li> <p>eine digitale Brieftasche für Deine vertraulichen Daten</p> </li> </ul> </li> <li> <h3>Clipperz bietet Dir:</h3> <ul> <li> <p>einfaches Speichern und Verwalten von Passwörtern und Webzugangsdaten</p> </li> <li> <p>schnelles unkompliziertes einloggen, ohne Eingabe des Benutzernamen und Passworts, bei Webdiensten</p> </li> <li> <p>Schutz aller Deiner persönlichen Daten: Zutrittscodes, PINs, Benutzernamen, Passwörter, Kreditkartennummern, &hellip;</p> </li> <li> <p>Deine Geheimnisse mit Familienmitgliedern und Freunden zu teilen (mehr dazu in Kürze)</p> </li> </ul> </li> <li> <h3>Clipperz ist:</h3> <ul> <li> <p>kostenlos und absolut anonym</p> </li> <li> <p>unkomplizierter Zugriff zu jeder Zeit von jedem Rechner</p> </li> <li> <p>ohne Download und Installation verwendbar</p> </li> <li> <p>ein Schutz gegen das Speichern von Passwörtern auf Deinem PC oder das Notieren auf Papier</p> </li> </ul> </li> <li> <h3>Clipperz Sicherheit:</h3> <ul> <li> <p>Deine sensiblen persönlichen Informationen werden lokal durch Deinen Browser verschlüsselt, bevor sie an Clipperz über das Internet gesendet werden</p> </li> <li> <p>Der Schlüssel für diese Daten ist der Sicherheitssatz, den nur Du kennst</p> </li> <li> <p>Clipperz speichert Deine sensiblen Daten nur in verschlüsselter Form und kann zu keinem Zeitpunkt diese entschlüssel und in ihrer ursprünglichen Klartextform zugänglich machen</p> </li> <li> <p>Clipperz basiert auf standart Verschlüsselungsverfahren. Nichts ausergewöhnliches – oder hand gestricktes</p> </li> <li> <p>Du kannst den Quellcode zu jeder Zeit anschauen, aber Du brauchst nichts von Kryptographie zu verstehen um ein glücklicher Anwender zu sein!</p> </li> </ul> </li> <li> <a href=\"http://www.clipperz.com\" target=\"_blank\">Weitere Informationen</a> </li> </ul> ",
31 'loginFormTitle':"Login zu Deinem Clipperz Konto", 28 'loginFormTitle':"Login zu Deinem Clipperz Konto",
32 'loginFormUsernameLabel':"Benutzernamen", 29 'loginFormUsernameLabel':"Benutzernamen",
33 'loginFormPassphraseLabel':"Sicherheitssatz", 30 'loginFormPassphraseLabel':"Sicherheitssatz",
34 'loginFormDontHaveAnAccountLabel':"Du hast noch kein Clipperz Konto?", 31 'loginFormDontHaveAnAccountLabel':"Du hast noch kein Clipperz Konto?",
35 'loginFormCreateOneLabel':"Konto erstellen", 32 'loginFormCreateOneLabel':"Konto erstellen",
36 'loginFormForgotYourCredentialsLabel':"Zugangsdaten vergessen?", 33 'loginFormForgotYourCredentialsLabel':"Zugangsdaten vergessen?",
37 'loginFormAarghThatsBadLabel':"Misst! Dass ist schlecht!", 34 'loginFormAarghThatsBadLabel':"Misst! Dass ist schlecht!",
38 'loginFormAfraidOfMaliciousScriptsLabel':"verängstigt von bösartigen Scripts?", 35 'loginFormAfraidOfMaliciousScriptsLabel':"verängstigt von bösartigen Scripts?",
39 'loginFormVerifyTheCodeLabel':"begutachte den Quellcode", 36 'loginFormVerifyTheCodeLabel':"begutachte den Quellcode",
40 'loginFormButtonLabel':"Einloggen", 37 'loginFormButtonLabel':"Einloggen",
41 'loginPanelSwithLanguageDescription':"<h5>Wechsel zu Deiner vervorzugten Sprache</h5> ", 38 'loginPanelSwithLanguageDescription':"<h5>Wechsel zu Deiner vervorzugten Sprache</h5> ",
42 'browserCompatibilityDescription':"<p>Bessere und sicherere Clipperz-Erfahrung mit Firefox. Clipperz funktioniert auch mit Safari, Opera und MS Internet Explorer!</p> ", 39 'browserCompatibilityDescription':"<p>Bessere und sicherere Clipperz-Erfahrung mit Firefox. Clipperz funktioniert auch mit Safari, Opera und MS Internet Explorer!</p> ",
43 'loginMessagePanelInitialTitle':"Du wirst eingeloggt…", 40 'loginMessagePanelInitialTitle':"Du wirst eingeloggt…",
44 'loginMessagePanelInitialButtonLabel':"Abbruch", 41 'loginMessagePanelInitialButtonLabel':"Abbruch",
45 'loginMessagePanelConnectedTitle':"Verbunden", 42 'loginMessagePanelConnectedTitle':"Verbunden",
46 'loginMessagePanelConnectedText':"Fertig", 43 'loginMessagePanelConnectedText':"Fertig",
47 'loginMessagePanelFailureTitle':"Fehler", 44 'loginMessagePanelFailureTitle':"Fehler",
48 'loginMessagePanelFailureText':"Login fehlgeschlagen", 45 'loginMessagePanelFailureText':"Login fehlgeschlagen",
49 'loginMessagePanelFailureButtonLabel':"Schließen", 46 'loginMessagePanelFailureButtonLabel':"Schließen",
50 'connectionLoginSendingCredentialsMessageTitle':"Prüfe Zugangsdaten", 47 'connectionLoginSendingCredentialsMessageTitle':"Prüfe Zugangsdaten",
51 'connectionLoginSendingCredentialsMessageText':"Sende Zugangsdaten", 48 'connectionLoginSendingCredentialsMessageText':"Sende Zugangsdaten",
52 'connectionLoginCredentialsVerificationMessageTitle':"Prüfe Zugangsdaten", 49 'connectionLoginCredentialsVerificationMessageTitle':"Prüfe Zugangsdaten",
53 'connectionLoginCredentialsVerificationMessageText':"Führe SRP Authentifizierung durch", 50 'connectionLoginCredentialsVerificationMessageText':"Führe SRP Authentifizierung durch",
54 'connectionLoginDoneMessageTitle':"Prüfe Zugangsdaten", 51 'connectionLoginDoneMessageTitle':"Prüfe Zugangsdaten",
55 'connectionLoginDoneMessageText':"Verbunden", 52 'connectionLoginDoneMessageText':"Verbunden",
56 'userLoginPanelUpgradingUserCredentialsMessageTitle':"Prüfe Zugangsdaten", 53 'userLoginPanelUpgradingUserCredentialsMessageTitle':"Prüfe Zugangsdaten",
57 'userLoginPanelUpgradingUserCredentialsMessageText':"Aktualisierung Deiner Zugangsdaten auf ein neues Authentifizierungsschema", 54 'userLoginPanelUpgradingUserCredentialsMessageText':"Aktualisierung Deiner Zugangsdaten auf ein neues Authentifizierungsschema",
58 'userLoginPanelConnectedMessageTitle':"Benutzer authentifiziert", 55 'userLoginPanelConnectedMessageTitle':"Benutzer authentifiziert",
59 'userLoginPanelConnectedMessageText':"Login erfolgreich", 56 'userLoginPanelConnectedMessageText':"Login erfolgreich",
60 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"Prüfe Zugangsdaten", 57 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"Prüfe Zugangsdaten",
61 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"Probiere älteres Authentifizierungsschema", 58 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"Probiere älteres Authentifizierungsschema",
62 'userLoginPanelLoadingUserDataMessageTitle':"Benutzer authentifiziert", 59 'userLoginPanelLoadingUserDataMessageTitle':"Benutzer authentifiziert",
63 'userLoginPanelLoadingUserDataMessageText':"Lade verschlüsselte Kartendaten von Clipperz", 60 'userLoginPanelLoadingUserDataMessageText':"Lade verschlüsselte Kartendaten von Clipperz",
64 'userLoginPanelDecryptingUserDataMessageTitle':"Benutzer authentifiziert", 61 'userLoginPanelDecryptingUserDataMessageTitle':"Benutzer authentifiziert",
65 'userLoginPanelDecryptingUserDataMessageText':"Lokale Entschlüsselung der Kartendaten", 62 'userLoginPanelDecryptingUserDataMessageText':"Lokale Entschlüsselung der Kartendaten",
66 'userLoginPanelDecryptingUserStatisticsMessageTitle':"Benutzer authentifiziert", 63 'userLoginPanelDecryptingUserStatisticsMessageTitle':"Benutzer authentifiziert",
67 'userLoginPanelDecryptingUserStatisticsMessageText':"Lokale Entschlüsselung der Benutzerstatisik", 64 'userLoginPanelDecryptingUserStatisticsMessageText':"Lokale Entschlüsselung der Benutzerstatisik",
68 'splashAlertTitle':"Willkommen bei Clipperz!", 65 'splashAlertTitle':"Willkommen bei Clipperz!",
69 'splashAlertText':"<p>Sicherheitshinweis</p> <ul> <li> <p>Die Speicherung von Informationen bei Clipperz ist so sicher, wie der Sicherheitssatz den Du zum Schutz gewählt hast. Ist der Sicherheitssatz nicht bekannt, können keine Informationen abgefragt werden.</p> </li> <li> <p>Solltest Du Clipperz nutzen, um sensible und kritische persönliche Daten abzuspeichern, so empfehlen wir in jedem Fall die Nutzung eines langen Sicherheitssatzes als Passwort und die Nutzung von Sonderzeichen, Zahlen, Groß- und Kleinbuchstaben.</p> </li> <li> <p>Clipperz kann einen verlorenen Sicherheitssatz nicht wiederherstellen!</p> </li> </ul> <p>Weitere Informationen findest Du bei <a href=\"http://www.clipperz.com\" target=\"_blank\">Clipperz</a>.</p> ", 66 'splashAlertText':"<p>Sicherheitshinweis</p> <ul> <li> <p>Die Speicherung von Informationen bei Clipperz ist so sicher, wie der Sicherheitssatz den Du zum Schutz gewählt hast. Ist der Sicherheitssatz nicht bekannt, können keine Informationen abgefragt werden.</p> </li> <li> <p>Solltest Du Clipperz nutzen, um sensible und kritische persönliche Daten abzuspeichern, so empfehlen wir in jedem Fall die Nutzung eines langen Sicherheitssatzes als Passwort und die Nutzung von Sonderzeichen, Zahlen, Groß- und Kleinbuchstaben.</p> </li> <li> <p>Clipperz kann einen verlorenen Sicherheitssatz nicht wiederherstellen!</p> </li> </ul> <p>Weitere Informationen findest Du bei <a href=\"http://www.clipperz.com\" target=\"_blank\">Clipperz</a>.</p> ",
70 'splashAlertCloseButtonLabel':"Ok", 67 'splashAlertCloseButtonLabel':"Ok",
71 'registrationFormTitle':"Erstelle Dein Konto", 68 'registrationFormTitle':"Erstelle Dein Konto",
72 'registrationFormUsernameLabel':"Benutzernamen", 69 'registrationFormUsernameLabel':"Benutzernamen",
73 'registrationFormPassphraseLabel':"Sicherheitssatz", 70 'registrationFormPassphraseLabel':"Sicherheitssatz",
74 'registrationFormRetypePassphraseLabel':"Wiederhole Sicherheitssatz", 71 'registrationFormRetypePassphraseLabel':"Wiederhole Sicherheitssatz",
75 'registrationFormSafetyCheckLabel':"Ich akzeptiere dass es Clipperz nicht möglich ist, einen verlorenen Sicherheitssatz wiederherzustellen.", 72 'registrationFormSafetyCheckLabel':"Ich akzeptiere dass es Clipperz nicht möglich ist, einen verlorenen Sicherheitssatz wiederherzustellen.",
76 'registrationFormTermsOfServiceCheckLabel':"Ich habe die <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Nutzungsbedingungen</a> gelesen, verstanden und akzeptiere diese.", 73 'registrationFormTermsOfServiceCheckLabel':"Ich habe die <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Nutzungsbedingungen</a> gelesen, verstanden und akzeptiere diese.",
77 'registrationFormDoYouAlreadyHaveAnAccountLabel':"Hast Du bereits einen Zugang?", 74 'registrationFormDoYouAlreadyHaveAnAccountLabel':"Hast Du bereits einen Zugang?",
78 'registrationFormSimplyLoginLabel':"Einloggen", 75 'registrationFormSimplyLoginLabel':"Einloggen",
79 'registrationFormButtonLabel':"Anmelden", 76 'registrationFormButtonLabel':"Anmelden",
80 'registrationFormWarningMessageNotMatchingPassphrases':"Deine Sicherheitssätze stimmen nicht überein. Bitte erneut eingeben.", 77 'registrationFormWarningMessageNotMatchingPassphrases':"Deine Sicherheitssätze stimmen nicht überein. Bitte erneut eingeben.",
81 'registrationFormWarningMessageSafetyCheckNotSelected':"Bitte lese die Bedingungen und akzeptiere die Auswahlboxen weiter unten.", 78 'registrationFormWarningMessageSafetyCheckNotSelected':"Bitte lese die Bedingungen und akzeptiere die Auswahlboxen weiter unten.",
82 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"Du musst die Nutzungsbedingungen akzeptieren.", 79 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"Du musst die Nutzungsbedingungen akzeptieren.",
83 'registrationMessagePanelInitialTitle':"Benutzer wird angelegt…", 80 'registrationMessagePanelInitialTitle':"Benutzer wird angelegt…",
84 'registrationMessagePanelInitialButtonLabel':"Abbruch", 81 'registrationMessagePanelInitialButtonLabel':"Abbruch",
85 'registrationMessagePanelRegistrationDoneTitle':"Anmeldung", 82 'registrationMessagePanelRegistrationDoneTitle':"Anmeldung",
86 'registrationMessagePanelRegistrationDoneText':"Fertig", 83 'registrationMessagePanelRegistrationDoneText':"Fertig",
87 'registrationMessagePanelFailureTitle':"Anmerldung fehlgeschlagen", 84 'registrationMessagePanelFailureTitle':"Anmerldung fehlgeschlagen",
88 'registrationMessagePanelFailureButtonLabel':"Schließen", 85 'registrationMessagePanelFailureButtonLabel':"Schließen",
89 'connectionRegistrationSendingRequestMessageText':"Zugangsdaten werden geprüft", 86 'connectionRegistrationSendingRequestMessageText':"Zugangsdaten werden geprüft",
90 'connectionRegistrationSendingCredentialsMessageText':"Sende Zugangsdaten", 87 'connectionRegistrationSendingCredentialsMessageText':"Sende Zugangsdaten",
91 'registrationSplashPanelTitle':"Sicherheitshinweis", 88 'registrationSplashPanelTitle':"Sicherheitshinweis",
92 'registrationSplashPanelDescription':"<p>Dies sind Deine Clipperz Zugangsdaten, pass sehr gut auf sie auf. Clipperz wird diese kein zweites und weiteres mal anzeigen!</p> ", 89 'registrationSplashPanelDescription':"<p>Dies sind Deine Clipperz Zugangsdaten, pass sehr gut auf sie auf. Clipperz wird diese kein zweites und weiteres mal anzeigen!</p> ",
93 'registrationSplashPanelUsernameLabel':"Benutzernamen", 90 'registrationSplashPanelUsernameLabel':"Benutzernamen",
94 'registrationSplashPanelPassphraseLabel':"Schlüsselsatz", 91 'registrationSplashPanelPassphraseLabel':"Schlüsselsatz",
95 'donateHeaderLinkLabel':"spende", 92 'donateHeaderLinkLabel':"spende",
96 'creditsHeaderLinkLabel':"credits", 93 'creditsHeaderLinkLabel':"credits",
97 'feedbackHeaderLinkLabel':"feedback", 94 'feedbackHeaderLinkLabel':"feedback",
98 'helpHeaderLinkLabel':"hilfe", 95 'helpHeaderLinkLabel':"hilfe",
99 'forumHeaderLinkLabel':"forum", 96 'forumHeaderLinkLabel':"forum",
100 'recordMenuLabel':"Karten", 97 'recordMenuLabel':"Karten",
101 'accountMenuLabel':"Benutzer", 98 'accountMenuLabel':"Benutzer",
102 'dataMenuLabel':"Daten", 99 'dataMenuLabel':"Daten",
103 'contactsMenuLabel':"Kontakt", 100 'contactsMenuLabel':"Kontakt",
104 'bookmarkletMenuLabel':"Bookmarklet", 101 'bookmarkletMenuLabel':"Bookmarklet",
105 'logoutMenuLabel':"Ausloggen", 102 'logoutMenuLabel':"Ausloggen",
106 'lockMenuLabel':"Sperren", 103 'lockMenuLabel':"Sperren",
107 'lockTitle':"Dieses Konto ist gesperrt", 104 'lockTitle':"Dieses Konto ist gesperrt",
108 'lockDescription':"<p>Bitte gebe Deinen Sicherheitssatz ein, um das Clipperz-Konto zu entsperren.</p> ", 105 'lockDescription':"<p>Bitte gebe Deinen Sicherheitssatz ein, um das Clipperz-Konto zu entsperren.</p> ",
109 'unlockButtonLabel':"Entsperren", 106 'unlockButtonLabel':"Entsperren",
110 'changePasswordTabLabel':"Sicherheitssatz ändern", 107 'changePasswordTabLabel':"Sicherheitssatz ändern",
111 'changePasswordTabTitle':"Sicherheitssatz ändern", 108 'changePasswordTabTitle':"Sicherheitssatz ändern",
112 'changePasswordFormUsernameLabel':"Benutzername", 109 'changePasswordFormUsernameLabel':"Benutzername",
113 'changePasswordFormOldPassphraseLabel':"Alter Sicherheitssatz", 110 'changePasswordFormOldPassphraseLabel':"Alter Sicherheitssatz",
114 'changePasswordFormNewPassphraseLabel':"Neuer Sicherheitssatz", 111 'changePasswordFormNewPassphraseLabel':"Neuer Sicherheitssatz",
115 'changePasswordFormRetypePassphraseLabel':"Wiederholdung neuen Sicherheitssatz", 112 'changePasswordFormRetypePassphraseLabel':"Wiederholdung neuen Sicherheitssatz",
116 'changePasswordFormSafetyCheckboxLabel':"Ich akzeptiere dass es Clipperz nicht möglich ist, einen verlorenen Sicherheitssatz wiederherzustellen.", 113 'changePasswordFormSafetyCheckboxLabel':"Ich akzeptiere dass es Clipperz nicht möglich ist, einen verlorenen Sicherheitssatz wiederherzustellen.",
117 'changePasswordFormSubmitLabel':"Sicherheitssatz ändern", 114 'changePasswordFormSubmitLabel':"Sicherheitssatz ändern",
118 'changePasswordFormWrongUsernameWarning':"Falscher Benutzername", 115 'changePasswordFormWrongUsernameWarning':"Falscher Benutzername",
119 'changePasswordFormWrongPassphraseWarning':"Falscher Sicherheitssatz", 116 'changePasswordFormWrongPassphraseWarning':"Falscher Sicherheitssatz",
120 'changePasswordFormWrongRetypePassphraseWarning':"Deine Sicherheitssätze stimmen nicht überein. Bitte erneut eingeben.", 117 'changePasswordFormWrongRetypePassphraseWarning':"Deine Sicherheitssätze stimmen nicht überein. Bitte erneut eingeben.",
121 'changePasswordFormSafetyCheckWarning':"Bitte ließ die folgenden Hinweise und akzeptiere diese.", 118 'changePasswordFormSafetyCheckWarning':"Bitte ließ die folgenden Hinweise und akzeptiere diese.",
122 'changePasswordFormProgressDialogTitle':"Ändere Zugangsdaten", 119 'changePasswordFormProgressDialogTitle':"Ändere Zugangsdaten",
123 'changePasswordFormProgressDialogConnectedMessageTitle':"Verbunden", 120 'changePasswordFormProgressDialogConnectedMessageTitle':"Verbunden",
124 'changePasswordFormProgressDialogConnectedMessageText':"Fertig", 121 'changePasswordFormProgressDialogConnectedMessageText':"Fertig",
125 'changePasswordFormProgressDialogErrorMessageTitle':"Fehler", 122 'changePasswordFormProgressDialogErrorMessageTitle':"Fehler",
126 'changePasswordFormProgressDialogErrorMessageText':"Ändern der Zugangsdaten fehlgeschlagen!", 123 'changePasswordFormProgressDialogErrorMessageText':"Ändern der Zugangsdaten fehlgeschlagen!",
127 'changeCredentialsPanelEncryptingDataMessageTitle':"Ändere Sicherheitssatz", 124 'changeCredentialsPanelEncryptingDataMessageTitle':"Ändere Sicherheitssatz",
128 'changeCredentialsPanelEncryptingDataMessageText':"Lokale Verschlüsselung der Kartendaten", 125 'changeCredentialsPanelEncryptingDataMessageText':"Lokale Verschlüsselung der Kartendaten",
129 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"Ändere Sicherheitssatz", 126 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"Ändere Sicherheitssatz",
130 'changeCredentialsPanelCreatingNewCredentialsMessageText':"Aktualisiere Zugangsdaten", 127 'changeCredentialsPanelCreatingNewCredentialsMessageText':"Aktualisiere Zugangsdaten",
131 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Ändere Sicherheitssatz", 128 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Ändere Sicherheitssatz",
132 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Sende verschlüsselte Zugangsdaten zu Clipperz", 129 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Sende verschlüsselte Zugangsdaten zu Clipperz",
133 'changeCredentialsPanelDoneMessageTitle':"Ändere Sicherheitssatz", 130 'changeCredentialsPanelDoneMessageTitle':"Ändere Sicherheitssatz",
134 'changeCredentialsPanelDoneMessageText':"Fertig", 131 'changeCredentialsPanelDoneMessageText':"Fertig",
135 'manageOTPTabLabel':"Verwaltung des Sicheitssatzes für einmaliges Anmelden", 132 'manageOTPTabLabel':"Verwaltung des Sicheitssatzes für einmaliges Anmelden",
136 'manageOTPTabTitle':"Verwaltung des Sicheitssatzes für einmaliges Anmelden", 133 'manageOTPTabTitle':"Verwaltung des Sicheitssatzes für einmaliges Anmelden",
137 'manageOTPTabDescription':"<p>Der Sicherheitssatz für einmaliges Anmelden funktoniert wie Dein regulärer Sicherheitssatz, nur dass er nur einmal verwendet werden kann.</p> <p>Sollte der gleiche Sicherheitssatz zu einem späteren Zeitpunkt nocheinmal genutzt werden, wird dieser automatisch zurückgewießen und der Einlogvorgang scheitert.</p> <p>Sofort nach einem erfolgreichen Login wird der Sicherheitssatz für einmaliges Anmelden gelöscht und somit verhindert dass er ungewollt verwendet wird.</p> <p>Die Nutzung von Sicherheitssätzen für einmaliges Anmelden sind eine ideale Möglichkeit wenn Du verunsichert bist ob Trojaner, Spyware oder ähnliches auf Deinem Rechner vorhanden ist.</p> <p> <b>Es wird empfohlen Sicherheitssätze für einmaliges Anmelden beim Zugiff auf Clipperz zu verwenden, wenn man sich an öffentlichen Rechnern befindet, wie in Internet Cafes oder Bücherreien.</b> </p> <p> </p> <p> <b>Mehr dazu in Kürze ...</b> </p> ", 134 'manageOTPTabDescription':"<p>Der Sicherheitssatz für einmaliges Anmelden funktoniert wie Dein regulärer Sicherheitssatz, nur dass er nur einmal verwendet werden kann.</p> <p>Sollte der gleiche Sicherheitssatz zu einem späteren Zeitpunkt nocheinmal genutzt werden, wird dieser automatisch zurückgewießen und der Einlogvorgang scheitert.</p> <p>Sofort nach einem erfolgreichen Login wird der Sicherheitssatz für einmaliges Anmelden gelöscht und somit verhindert dass er ungewollt verwendet wird.</p> <p>Die Nutzung von Sicherheitssätzen für einmaliges Anmelden sind eine ideale Möglichkeit wenn Du verunsichert bist ob Trojaner, Spyware oder ähnliches auf Deinem Rechner vorhanden ist.</p> <p> <b>Es wird empfohlen Sicherheitssätze für einmaliges Anmelden beim Zugiff auf Clipperz zu verwenden, wenn man sich an öffentlichen Rechnern befindet, wie in Internet Cafes oder Bücherreien.</b> </p> <p> </p> <p> <b>Mehr dazu in Kürze ...</b> </p> ",
138 'accountPreferencesLabel':"Einstellungen", 135 'accountPreferencesLabel':"Einstellungen",
139 'accountPreferencesTabTitle':"Einstellungen", 136 'accountPreferencesTabTitle':"Einstellungen",
140 'accountPreferencesLanguageTitle':"Sprachenauswahl", 137 'accountPreferencesLanguageTitle':"Sprachenauswahl",
141 'accountPreferencesLanguageDescription':"<p>Wähle Deine bevorzugte Sprache, aus der unten stehenden Liste.</p> ", 138 'accountPreferencesLanguageDescription':"<p>Wähle Deine bevorzugte Sprache, aus der unten stehenden Liste.</p> ",
142 'accountPreferencesInterfaceTitle':"Personalisiere Dein persönliches Clipperz-Erscheinungsbild", 139 'accountPreferencesInterfaceTitle':"Personalisiere Dein persönliches Clipperz-Erscheinungsbild",
143 'accountPreferencesInterfaceDescription':"<p>Passe dass Clipperz-Erscheinungsbild an Deine Wünsche an.</p> ", 140 'accountPreferencesInterfaceDescription':"<p>Passe dass Clipperz-Erscheinungsbild an Deine Wünsche an.</p> ",
144 'saveUserPreferencesFormSubmitLabel':"Speichern", 141 'saveUserPreferencesFormSubmitLabel':"Speichern",
145 'cancelUserPreferencesFormSubmitLabel':"Abbruch", 142 'cancelUserPreferencesFormSubmitLabel':"Abbruch",
146 'accountPreferencesSavingPanelTitle_Step1':"Speichere Einstellungen", 143 'accountPreferencesSavingPanelTitle_Step1':"Speichere Einstellungen",
147 'accountPreferencesSavingPanelText_Step1':"Lokale Verschlüsselung der Einstellungen", 144 'accountPreferencesSavingPanelText_Step1':"Lokale Verschlüsselung der Einstellungen",
148 'accountPreferencesSavingPanelTitle_Step2':"Speichere Einstellungen", 145 'accountPreferencesSavingPanelTitle_Step2':"Speichere Einstellungen",
149 'accountPreferencesSavingPanelText_Step2':"Sende verschlüsselte Einstellungen", 146 'accountPreferencesSavingPanelText_Step2':"Sende verschlüsselte Einstellungen",
150 'deleteAccountTabLabel':"Konto löschen", 147 'deleteAccountTabLabel':"Konto löschen",
151 'deleteAccountTabTitle':"Konto löschen", 148 'deleteAccountTabTitle':"Konto löschen",
152 'deleteAccountFormUsernameLabel':"Benutzername", 149 'deleteAccountFormUsernameLabel':"Benutzername",
153 'deleteAccountFormPassphraseLabel':"Sicherheitssatz", 150 'deleteAccountFormPassphraseLabel':"Sicherheitssatz",
154 'deleteAccountFormSafetyCheckboxLabel':"Ich bin mir bewusst, dass alle meine Daten gelöscht werden und dieser Vorgang in keinem Falle rückgängig gemacht werden kann.", 151 'deleteAccountFormSafetyCheckboxLabel':"Ich bin mir bewusst, dass alle meine Daten gelöscht werden und dieser Vorgang in keinem Falle rückgängig gemacht werden kann.",
155 'deleteAccountFormSubmitLabel':"Konto löschens", 152 'deleteAccountFormSubmitLabel':"Konto löschens",
156 'deleteAccountFormWrongUsernameWarning':"Falscher Benutzername", 153 'deleteAccountFormWrongUsernameWarning':"Falscher Benutzername",
157 'deleteAccountFormWrongPassphraseWarning':"Falscher Sicherheitssatz", 154 'deleteAccountFormWrongPassphraseWarning':"Falscher Sicherheitssatz",
158 'deleteAccountFormSafetyCheckWarning':"Bitte lese die Bedingungen und akzeptiere die Auswahlboxen weiter unten.", 155 'deleteAccountFormSafetyCheckWarning':"Bitte lese die Bedingungen und akzeptiere die Auswahlboxen weiter unten.",
159 'accountPanelDeletingAccountPanelConfirmationTitle':"ACHTUNG", 156 'accountPanelDeletingAccountPanelConfirmationTitle':"ACHTUNG",
160 'accountPanelDeleteAccountPanelConfirmationText':"Bist Du sicher, dass Du den Zugang löschen möchtest?", 157 'accountPanelDeleteAccountPanelConfirmationText':"Bist Du sicher, dass Du den Zugang löschen möchtest?",
161 'accountPanelDeleteAccountPanelConfirmButtonLabel':"Ja", 158 'accountPanelDeleteAccountPanelConfirmButtonLabel':"Ja",
162 'accountPanelDeleteAccountPanelDenyButtonLabel':"Nein", 159 'accountPanelDeleteAccountPanelDenyButtonLabel':"Nein",
163 'offlineCopyTabLabel':"Offline Kopie", 160 'offlineCopyTabLabel':"Offline Kopie",
164 'offlineCopyTabTitle':"Offline Kopie", 161 'offlineCopyTabTitle':"Offline Kopie",
165 'offlineCopyTabDescription':"<p>Mit nur einem Klick kannst Du alle Deine verschlüsselten Daten von dem Clipperz Server auf Deine Festplatte speichern und somit eine “nur lesbare” Offline Version anlegen. Diese Version ist auch dann verwendbar, wenn Du keine Verbindung ins Internet hast. (Zum Beispiel zum Speichern von Login-Informationen bei einem Hotspot)</p> <p>Die “nur lesbare” Version ist genauso sicher, wie die änderbare Version auf dem Server. Deine Daten werden niemals entschlüsselt gespeichert - beide Versionen verwenden die gleiche Art der Verschlüsselung und Entschlüsselung direkt im Browser.</p> <ol> <li> <p>Klicke auf den untenstehenden Link um die Offline Version herunterzuladen.</p> </li> <li> <p>Der Browser fragt Dich, was Du mit der Datei “Clipperz_YYYYMMDD.zip” machen möchtest. Speichere Sie auf Deine Festplatte.</p> </li> <li> <p>Unzip (dekomprimiere) die Datei. Du erhälst das Verzeichnis “Clipperz_YYYYMMDD”.</p> </li> <li> <p>Öffne das Verzeichnis “Clipperz_YYYYMMDD” und mache einen Doppelklick auf die Datei “index.html”.</p> </li> <li> <p>Gib Deinen Clipperz Benutzernamen und Sicherheitsschlüssel ein, um Zugriff auf Deine persönlichen Daten auch ohne Internetzugang zu erhalten.</p> </li> </ol> ", 162 'offlineCopyTabDescription':"<p>Mit nur einem Klick kannst Du alle Deine verschlüsselten Daten von dem Clipperz Server auf Deine Festplatte speichern und somit eine “nur lesbare” Offline Version anlegen. Diese Version ist auch dann verwendbar, wenn Du keine Verbindung ins Internet hast. (Zum Beispiel zum Speichern von Login-Informationen bei einem Hotspot)</p> <p>Die “nur lesbare” Version ist genauso sicher, wie die änderbare Version auf dem Server. Deine Daten werden niemals entschlüsselt gespeichert - beide Versionen verwenden die gleiche Art der Verschlüsselung und Entschlüsselung direkt im Browser.</p> <ol> <li> <p>Klicke auf den untenstehenden Link um die Offline Version herunterzuladen.</p> </li> <li> <p>Der Browser fragt Dich, was Du mit der Datei “Clipperz_YYYYMMDD.zip” machen möchtest. Speichere Sie auf Deine Festplatte.</p> </li> <li> <p>Unzip (dekomprimiere) die Datei. Du erhälst das Verzeichnis “Clipperz_YYYYMMDD”.</p> </li> <li> <p>Öffne das Verzeichnis “Clipperz_YYYYMMDD” und mache einen Doppelklick auf die Datei “index.html”.</p> </li> <li> <p>Gib Deinen Clipperz Benutzernamen und Sicherheitsschlüssel ein, um Zugriff auf Deine persönlichen Daten auch ohne Internetzugang zu erhalten.</p> </li> </ol> ",
166 'offlineCopyDownloadLinkLabel':"Download", 163 'offlineCopyDownloadLinkLabel':"Download",
167 'sharingTabLabel':"Freigabe für gemeinsame Nutzung", 164 'sharingTabLabel':"Freigabe für gemeinsame Nutzung",
168 'sharingTabTitle':"Freigabe für gemeinsame Nutzung", 165 'sharingTabTitle':"Freigabe für gemeinsame Nutzung",
169 'sharingTabDescription':"<p>Häufig muss eine vertrauenswürdige Information mit mehreren Personen geteilt werden.</p> <p>Dies sollte so einfach sein, wie einem Kollegen die PIN für den Anrufbeantworter zu geben, wenn Du im Urlaub bist; jedoch so schwierig, wie berechtigten Erben Zugriff auf das Ersparte bei der Bank zu geben.</p> <p>Clipperz ermöglicht die einfache Freigabe für gemeinsam genutzte Informationen, an berechtigte Personen, durch einen einfachen Prozess.</p> <p> </p> <p> <b>Mehr dazu in Kürze ...</b> </p> ", 166 'sharingTabDescription':"<p>Häufig muss eine vertrauenswürdige Information mit mehreren Personen geteilt werden.</p> <p>Dies sollte so einfach sein, wie einem Kollegen die PIN für den Anrufbeantworter zu geben, wenn Du im Urlaub bist; jedoch so schwierig, wie berechtigten Erben Zugriff auf das Ersparte bei der Bank zu geben.</p> <p>Clipperz ermöglicht die einfache Freigabe für gemeinsam genutzte Informationen, an berechtigte Personen, durch einen einfachen Prozess.</p> <p> </p> <p> <b>Mehr dazu in Kürze ...</b> </p> ",
170 'importTabLabel':"Import", 167 'importTabLabel':"Import",
171 'importTabTitle':"Import", 168 'importTabTitle':"Import",
172 'importTabDescription':"<p> <b>In Kürze ...</b> </p> ", 169 'importTabDescription':"<p> <b>In Kürze ...</b> </p> ",
173 'printingTabLabel':"Export", 170 'printingTabLabel':"Export",
174 'printingTabTitle':"Export", 171 'printingTabTitle':"Export",
175 'printingTabDescription':"<p> <b>Drucke deine Kartendaten</b> </p> <p>Klicke auf den untenstehenden Link. Es öffnet sich ein Fenster mit Deinen Kartendaten in einem druckerfreundlichen Format.</p> <p>Wenn Du den Ausdruck aus Absicherungsgründen nutzen möchtest, nutze lieber die Variante der sichereren “Offline Kopie”. Ein Ausdruck ist wie eine Notiz auf dem Scheibtisch und könnte von jedem ohne weiteres gelesen werden. Bewahre diesen an einem sicheren, für andere nicht zugänglichen Ort auf!</p> ", 172 'printingTabDescription':"<p> <b>Drucke deine Kartendaten</b> </p> <p>Klicke auf den untenstehenden Link. Es öffnet sich ein Fenster mit Deinen Kartendaten in einem druckerfreundlichen Format.</p> <p>Wenn Du den Ausdruck aus Absicherungsgründen nutzen möchtest, nutze lieber die Variante der sichereren “Offline Kopie”. Ein Ausdruck ist wie eine Notiz auf dem Scheibtisch und könnte von jedem ohne weiteres gelesen werden. Bewahre diesen an einem sicheren, für andere nicht zugänglichen Ort auf!</p> ",
176 'printingLinkLabel':"Druckerfreundliches Format", 173 'printingLinkLabel':"Druckerfreundliches Format",
177 'contactsTabLabel':"Kontakte", 174 'contactsTabLabel':"Kontakte",
178 'contactsTabTitle':"Kontakte", 175 'contactsTabTitle':"Kontakte",
179 'bookmarkletTabLabel':"Bookmarklet", 176 'bookmarkletTabLabel':"Bookmarklet",
180 'bookmarkletTabTitle':"Bookmarklet", 177 'bookmarkletTabTitle':"Bookmarklet",
181 'bookmarkletTabDescription':"<p>Ein Bookmarklet ist ein Werkezug, welches Dir mit einem Mausklick wichtige Funktionen ermöglicht. Es kann gespeichert und verwendet werden wie eine ganz normale Webseite, die Du in Deine Favoriten gespeichert hast.</p> <p>Das clipperz Bookmarklet ermöglicht Dir schnell und einfach neue Karten und Direkt-Logins für bestehende Karten anzulegen.</p> <p> <b>Bitte beachte: Das Bookmarklet enthält keine Informationen zu Deinem Zugang (wie Benutzernamen oder Passwort), das Bookmarklet ist ein generisches Werzeug, welches für jeden Clipperz Anwender den gleichen Code beinhaltet.</b> </p> <div> <p>Um das Bookmarklet zu installieren <b>ziehe</b> den unten stehenden Link in die Lesezeichen-Leiste Deines Browsers.</p> </div> ", 178 'bookmarkletTabDescription':"<p>Ein Bookmarklet ist ein Werkezug, welches Dir mit einem Mausklick wichtige Funktionen ermöglicht. Es kann gespeichert und verwendet werden wie eine ganz normale Webseite, die Du in Deine Favoriten gespeichert hast.</p> <p>Das clipperz Bookmarklet ermöglicht Dir schnell und einfach neue Karten und Direkt-Logins für bestehende Karten anzulegen.</p> <p> <b>Bitte beachte: Das Bookmarklet enthält keine Informationen zu Deinem Zugang (wie Benutzernamen oder Passwort), das Bookmarklet ist ein generisches Werzeug, welches für jeden Clipperz Anwender den gleichen Code beinhaltet.</b> </p> <div> <p>Um das Bookmarklet zu installieren <b>ziehe</b> den unten stehenden Link in die Lesezeichen-Leiste Deines Browsers.</p> </div> ",
182 'bookmarkletTabBookmarkletTitle':"Zu Clipperz hinzufügen", 179 'bookmarkletTabBookmarkletTitle':"Zu Clipperz hinzufügen",
183 'bookmarkletTabInstructions':"<h3>Anlegen einer neuen Karte für das Direkt Login bei einem Webservice</h3> <ol> <li> <p>Öffne die Webseite, auf der das Anmeldeforumlar vorhanden ist. (Das ist die Seite, auf der Du normal Deine Zugangsdaten einträgst)</p> </li> <li> <p>Öffne das Boormarklet durch anklicken: ein Pop-Up Fenster erscheint und bietet Dir die Karteninformationen an.</p> </li> <li> <p>Kopiere von diesem Fenster den Inhalt des größten Textfeldes durch in die Zwischenablage (Makieren und STRG+C)</p> </li> <li> <p>Öffne Deinen Clipperz Zugang und wähle <b>Neue Karte anlegen</b>.</p> </li> <li> <p>Füge den Inhalt Deiner Zwischenablage in das Textfeld ein (STRG+V) und ergänze optional einen <b>Titel</b>.</p> </li> <li> <p>Drücke die <b>Anlegen</b> Schaltfläche, kontrolliere nocheinmal die Details, und wähle anschließend <b>Speichern<b>.</p> </li> </ol> <h3>Direkt Login Funktionalität zu einer bestehenden Karte ergänzen</h3> <ol> <li> <p>Gleich wie oben.</p> </li> <li> <p>Gleich wie oben.</p> </li> <li> <p>Gleich wie oben.</p> </li> <li> <p>Öffne Deinen Clipperz Zugang und wähle die Karte, die Du ändern möchtest. Klicke anschließend auf <b>Bearbeiten</b>.</p> </li> <li> <p>Füge den Inhalt Deiner Zwischenablage in das Textfeld für “Direkt Login” ein (STRG+V).</p> </li> <li> <p>Drücke auf <b>Direkt Login hinzufügen</b>, kontrolliere die Angabgen und wähle <b>Speichern</b>.</p> </li> </ol> <p> </p> <p>Weitere Informationen über das Bookmarklet findest Du <a href=\"http://www.clipperz.com/support/user_guide/bookmarklet\" target=\"_blank\">hier</a>.</p> ", 180 'bookmarkletTabInstructions':"<h3>Anlegen einer neuen Karte für das Direkt Login bei einem Webservice</h3> <ol> <li> <p>Öffne die Webseite, auf der das Anmeldeforumlar vorhanden ist. (Das ist die Seite, auf der Du normal Deine Zugangsdaten einträgst)</p> </li> <li> <p>Öffne das Boormarklet durch anklicken: ein Pop-Up Fenster erscheint und bietet Dir die Karteninformationen an.</p> </li> <li> <p>Kopiere von diesem Fenster den Inhalt des größten Textfeldes durch in die Zwischenablage (Makieren und STRG+C)</p> </li> <li> <p>Öffne Deinen Clipperz Zugang und wähle <b>Neue Karte anlegen</b>.</p> </li> <li> <p>Füge den Inhalt Deiner Zwischenablage in das Textfeld ein (STRG+V) und ergänze optional einen <b>Titel</b>.</p> </li> <li> <p>Drücke die <b>Anlegen</b> Schaltfläche, kontrolliere nocheinmal die Details, und wähle anschließend <b>Speichern<b>.</p> </li> </ol> <h3>Direkt Login Funktionalität zu einer bestehenden Karte ergänzen</h3> <ol> <li> <p>Gleich wie oben.</p> </li> <li> <p>Gleich wie oben.</p> </li> <li> <p>Gleich wie oben.</p> </li> <li> <p>Öffne Deinen Clipperz Zugang und wähle die Karte, die Du ändern möchtest. Klicke anschließend auf <b>Bearbeiten</b>.</p> </li> <li> <p>Füge den Inhalt Deiner Zwischenablage in das Textfeld für “Direkt Login” ein (STRG+V).</p> </li> <li> <p>Drücke auf <b>Direkt Login hinzufügen</b>, kontrolliere die Angabgen und wähle <b>Speichern</b>.</p> </li> </ol> <p> </p> <p>Weitere Informationen über das Bookmarklet findest Du <a href=\"http://www.clipperz.com/support/user_guide/bookmarklet\" target=\"_blank\">hier</a>.</p> ",
184 'mainPanelDirectLoginBlockLabel':"Direktes Login", 181 'mainPanelDirectLoginBlockLabel':"Direktes Login",
185 'directLinkReferenceShowButtonLabel':"zeigen", 182 'directLinkReferenceShowButtonLabel':"zeigen",
186 'mainPanelDirectLoginBlockDescription':"<p>Add “direct logins” to sign in to your web accounts without typing usernames and passwords!</p> <p>“Direct logins” greatly enhance your password security since you can:</p> <ul> <li> <p>conveniently adopt and enter complex passwords;</p> </li> <li> <p>never re-use the same and easy-to-guess password.</p> </li> </ul> <p>Simple and quick configuration with the Clipperz <b>bookmarklet</b>.</p> <a href=\"http://www.clipperz.com/support/user_guide/direct_logins\" target=\"_blank\">Learn more about “direct logins”</a> ", 183 'mainPanelDirectLoginBlockDescription':"<p>Add “direct logins” to sign in to your web accounts without typing usernames and passwords!</p> <p>“Direct logins” greatly enhance your password security since you can:</p> <ul> <li> <p>conveniently adopt and enter complex passwords;</p> </li> <li> <p>never re-use the same and easy-to-guess password.</p> </li> </ul> <p>Simple and quick configuration with the Clipperz <b>bookmarklet</b>.</p> <a href=\"http://www.clipperz.com/support/user_guide/direct_logins\" target=\"_blank\">Learn more about “direct logins”</a> ",
187 'mainPanelRecordsBlockLabel':"Karten", 184 'mainPanelRecordsBlockLabel':"Karten",
188 'mainPanelAddRecordButtonLabel':"Neue Karte anlegen", 185 'mainPanelAddRecordButtonLabel':"Neue Karte anlegen",
189 'mainPanelRemoveRecordButtonLabel':"Karte löschen", 186 'mainPanelRemoveRecordButtonLabel':"Karte löschen",
190 'mainPanelRecordFilterBlockAllLabel':"all", 187 'mainPanelRecordFilterBlockAllLabel':"all",
191 'mainPanelRecordFilterBlockTagsLabel':"tags", 188 'mainPanelRecordFilterBlockTagsLabel':"tags",
192 'mainPanelRecordFilterBlockSearchLabel':"search", 189 'mainPanelRecordFilterBlockSearchLabel':"search",
193 'recordDetailNoRecordAtAllTitle':"Willkommen bei Clipperz!", 190 'recordDetailNoRecordAtAllTitle':"Willkommen bei Clipperz!",
194 'recordDetailNoRecordAtAllDescription':"<h5>Beginne mit dem Hinzufügen von Karten zu Deinem Zugang.</h5> <p>Karten sind einfache und flexible Formulare, bei denen Du Deine Passwörter und andere vertrauenswürde Daten speichern kannst.</p> <p>Karten können Zugangsinformationen für eine WebSite, die Kombination Deines Fahrradschlosses, oder Daten Deiner Kreditkarte enthalten, ...</p> <h5>Vergiss nicht das Bookmarklet</h5> <p>Bevor Du beginnst, installiere Dir das “Add to Clipperz” Bookmarklet: Es vereinfacht Dir das anlegen von Karten und verbessert somit den Komfor.</p> <p>Gehe zum “Bookmarklet” Tabulator um herauszufinden, wie es installiert und verwendet werden kann.</p> <p> </p> <p>Dann klicke einfach auf den <b>Neue Karte anlegen</b> Button und genieße Deinen Clipperz Zugang.</p> <p> </p> <a href=\"http://www.clipperz.com/support/user_guide/managing_cards\" target=\"_blank\">Näheres zum Erstellen und Verwalten von Karten lernen</a> ", 191 'recordDetailNoRecordAtAllDescription':"<h5>Beginne mit dem Hinzufügen von Karten zu Deinem Zugang.</h5> <p>Karten sind einfache und flexible Formulare, bei denen Du Deine Passwörter und andere vertrauenswürde Daten speichern kannst.</p> <p>Karten können Zugangsinformationen für eine WebSite, die Kombination Deines Fahrradschlosses, oder Daten Deiner Kreditkarte enthalten, ...</p> <h5>Vergiss nicht das Bookmarklet</h5> <p>Bevor Du beginnst, installiere Dir das “Add to Clipperz” Bookmarklet: Es vereinfacht Dir das anlegen von Karten und verbessert somit den Komfor.</p> <p>Gehe zum “Bookmarklet” Tabulator um herauszufinden, wie es installiert und verwendet werden kann.</p> <p> </p> <p>Dann klicke einfach auf den <b>Neue Karte anlegen</b> Button und genieße Deinen Clipperz Zugang.</p> <p> </p> <a href=\"http://www.clipperz.com/support/user_guide/managing_cards\" target=\"_blank\">Näheres zum Erstellen und Verwalten von Karten lernen</a> ",
195 'newRecordWizardTitleBox':"<h5>Bitte wähle eine Vorlage</h5> <p>Karten sind einfache und flexible Formulare, bei denen Du Passwörter oder jede Art von vertraulichen Informationen speichern kannst.</p> <p>Beginne mit der Auswahl einer der unten stehenden Vorlagen. Zu jeder Zeit kannst Du Deine Karten durch hinzufügen oder entfernen von Feldern verändern.</p> ", 192 'newRecordWizardTitleBox':"<h5>Bitte wähle eine Vorlage</h5> <p>Karten sind einfache und flexible Formulare, bei denen Du Passwörter oder jede Art von vertraulichen Informationen speichern kannst.</p> <p>Beginne mit der Auswahl einer der unten stehenden Vorlagen. Zu jeder Zeit kannst Du Deine Karten durch hinzufügen oder entfernen von Feldern verändern.</p> ",
196 'newRecordWizardBookmarkletConfigurationTitle':"Direktes Login", 193 'newRecordWizardBookmarkletConfigurationTitle':"Direktes Login",
197 'newRecordWizardBookmarkletConfigurationDescription':"<p>Füge bitte unten den Konfigurationscode ein, den das Clipperz Bookmarklet erzeugt hat.</p> <p>Eine neue Karte mit einem vollständigen Direkt Login zu dem gewählten Webzugang wird angelegt.</p> ", 194 'newRecordWizardBookmarkletConfigurationDescription':"<p>Füge bitte unten den Konfigurationscode ein, den das Clipperz Bookmarklet erzeugt hat.</p> <p>Eine neue Karte mit einem vollständigen Direkt Login zu dem gewählten Webzugang wird angelegt.</p> ",
198 'newRecordWizardCreateButtonLabel':"Anlegen", 195 'newRecordWizardCreateButtonLabel':"Anlegen",
199 'newRecordWizardCancelButtonLabel':"Abbruch", 196 'newRecordWizardCancelButtonLabel':"Abbruch",
200 'recordTemplates':{ 197 'recordTemplates':{
201 'WebAccount':{ 198 'WebAccount':{
202 'title':"Web Zugangsdaten", 199 'title':"Web Zugangsdaten",
203 'description':"<p>Eine einfache Karte, die die Login Informationen für einen Online Service speichert.</p> ", 200 'description':"<p>Eine einfache Karte, die die Login Informationen für einen Online Service speichert.</p> ",
204 'fields':{ 201 'fields':{
205 'URL':"Web Adresse", 202 'URL':"Web Adresse",
206 'TXT':"Benutzername / E-Mail", 203 'TXT':"Benutzername / E-Mail",
207 'PWD':"Passwort" 204 'PWD':"Passwort"
208 } 205 }
209 }, 206 },
210 'BankAccount':{ 207 'BankAccount':{
211 'title':"Bank Zugangsdaten", 208 'title':"Bank Zugangsdaten",
212 'description':"<p>Speichere geschützt Deine Online Banking Zugangsdaten.</p> ", 209 'description':"<p>Speichere geschützt Deine Online Banking Zugangsdaten.</p> ",
213 'fields':{ 210 'fields':{
214 'TXT':"Bank", 211 'TXT':"Bank",
215 'TXT':"Kontonummer", 212 'TXT':"Kontonummer",
216 'URL':"Web Adresse", 213 'URL':"Web Adresse",
217 'TXT':"Online Zugangsdaten", 214 'TXT':"Online Zugangsdaten",
218 'PWD':"Online Passwort" 215 'PWD':"Online Passwort"
219 } 216 }
220 }, 217 },
221 'CreditCard':{ 218 'CreditCard':{
222 'title':"Kreditkarte", 219 'title':"Kreditkarte",
223 'description':"<p>Kartennummer, CVV2, Ablaufdatum und PIN zu jeder Zeit abrufbar bei Clipperz.</p> ", 220 'description':"<p>Kartennummer, CVV2, Ablaufdatum und PIN zu jeder Zeit abrufbar bei Clipperz.</p> ",
224 'fields':{ 221 'fields':{
225 'TXT':"Art (Visa, AmEx, ...)", 222 'TXT':"Art (Visa, AmEx, ...)",
226 'TXT':"Nummer", 223 'TXT':"Nummer",
227 'TXT':"Inhaber", 224 'TXT':"Inhaber",
228 'TXT':"Ablaufdatum", 225 'TXT':"Ablaufdatum",
229 'TXT':"CVV2", 226 'TXT':"CVV2",
230 'PWD':"PIN", 227 'PWD':"PIN",
231 'URL':"Webseite", 228 'URL':"Webseite",
232 'TXT':"Online Zugangsdaten", 229 'TXT':"Online Zugangsdaten",
233 'PWD':"Passwort" 230 'PWD':"Passwort"
234 } 231 }
235 }, 232 },
236 'AddressBookEntry':{ 233 'AddressBookEntry':{
237 'title':"Adressbuch Eintrag", 234 'title':"Adressbuch Eintrag",
238 'description':"<p>Clipperz kann auch als Dein neues privates Adressbuch agieren. Nutze diese Vorlage um einfach eine neuen Eintrag anzulegen.</p> ", 235 'description':"<p>Clipperz kann auch als Dein neues privates Adressbuch agieren. Nutze diese Vorlage um einfach eine neuen Eintrag anzulegen.</p> ",
239 'fields':{ 236 'fields':{
240 'TXT':"Name", 237 'TXT':"Name",
241 'TXT':"Email", 238 'TXT':"Email",
242 'TXT':"Telefon", 239 'TXT':"Telefon",
243 'TXT':"Handy", 240 'TXT':"Handy",
244 'ADDR':"Adresse" 241 'ADDR':"Adresse"
245 } 242 }
246 }, 243 },
247 'Custom':{ 244 'Custom':{
248 'title':"Benutzerdefinierte Karte", 245 'title':"Benutzerdefinierte Karte",
249 'description':"<p>Egal welche Art von vertraulichen Informationen Du speichern musst, mit der benutzerdefinierten Karte kannst Du diese Informationen speichern.</p> ", 246 'description':"<p>Egal welche Art von vertraulichen Informationen Du speichern musst, mit der benutzerdefinierten Karte kannst Du diese Informationen speichern.</p> ",
250 'fields':{ 247 'fields':{
251 'TXT':"Feldname 1", 248 'TXT':"Feldname 1",
252 'TXT':"Feldname 2", 249 'TXT':"Feldname 2",
253 'TXT':"Feldname 3" 250 'TXT':"Feldname 3"
254 } 251 }
255 } 252 }
256}, 253},
257 'recordFieldTypologies':{ 254 'recordFieldTypologies':{
258 'TXT':{ 255 'TXT':{
259 'description':"simple text field", 256 'description':"simple text field",
260 'shortDescription':"Text" 257 'shortDescription':"Text"
261 }, 258 },
262 'PWD':{ 259 'PWD':{
263 'description':"simple text field, with default status set to hidden", 260 'description':"simple text field, with default status set to hidden",
264 'shortDescription':"Passwort" 261 'shortDescription':"Passwort"
265 }, 262 },
266 'URL':{ 263 'URL':{
267 'description':"simple text field in edit mode, that became an active url in view mode", 264 'description':"simple text field in edit mode, that became an active url in view mode",
268 'shortDescription':"Webadresse" 265 'shortDescription':"Webadresse"
269 }, 266 },
270 'DATE':{ 267 'DATE':{
271 'description':"a value set with a calendar helper", 268 'description':"a value set with a calendar helper",
272 'shortDescription':"Datum" 269 'shortDescription':"Datum"
273 }, 270 },
274 'ADDR':{ 271 'ADDR':{
275 'description':"just like the URL, but the active link points to Google Maps (or similar service) passing the address value as argument", 272 'description':"just like the URL, but the active link points to Google Maps (or similar service) passing the address value as argument",
276 'shortDescription':"Postanschrift" 273 'shortDescription':"Postanschrift"
277 }, 274 },
278 'CHECK':{ 275 'CHECK':{
279 'description':"check description", 276 'description':"check description",
280 'shortDescription':"check" 277 'shortDescription':"check"
281 }, 278 },
282 'RADIO':{ 279 'RADIO':{
283 'description':"radio description", 280 'description':"radio description",
284 'shortDescription':"radio" 281 'shortDescription':"radio"
285 }, 282 },
286 'SELECT':{ 283 'SELECT':{
287 'description':"select description", 284 'description':"select description",
288 'shortDescription':"select" 285 'shortDescription':"select"
289 } 286 }
290}, 287},
291 'newRecordPanelGeneralExceptionTitle':"Fehler", 288 'newRecordPanelGeneralExceptionTitle':"Fehler",
292 'newRecordPanelGeneralExceptionMessage':"Der Konfigurationstext ist nicht gültig. Stelle sicher, dass Du den Text des Bookmarket Pop-Up eingefügt hast und versuch es nocheinmal.", 289 'newRecordPanelGeneralExceptionMessage':"Der Konfigurationstext ist nicht gültig. Stelle sicher, dass Du den Text des Bookmarket Pop-Up eingefügt hast und versuch es nocheinmal.",
293 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"Fehler", 290 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"Fehler",
294 'newRecordPanelWrongBookmarkletVersionExceptionMessage':"Der Konfigurationstext wurde von einer älteren Version des Bookmarklets erstellt. Bitte aktualisiere Dein Bookmarklet und probiere es erneut.", 291 'newRecordPanelWrongBookmarkletVersionExceptionMessage':"Der Konfigurationstext wurde von einer älteren Version des Bookmarklets erstellt. Bitte aktualisiere Dein Bookmarklet und probiere es erneut.",
295 'newRecordPanelExceptionPanelCloseButtonLabel':"Abbruch", 292 'newRecordPanelExceptionPanelCloseButtonLabel':"Abbruch",
296 'mainPanelDeletingRecordPanelConfirmationTitle':"Lösche ausgewählte Karte", 293 'mainPanelDeletingRecordPanelConfirmationTitle':"Lösche ausgewählte Karte",
297 'mainPanelDeleteRecordPanelConfirmationText':"Möschtest Du wirklich die ausgewählte Karte löschen?", 294 'mainPanelDeleteRecordPanelConfirmationText':"Möschtest Du wirklich die ausgewählte Karte löschen?",
298 'mainPanelDeleteRecordPanelConfirmButtonLabel':"Ja", 295 'mainPanelDeleteRecordPanelConfirmButtonLabel':"Ja",
299 'mainPanelDeleteRecordPanelDenyButtonLabel':"Nein", 296 'mainPanelDeleteRecordPanelDenyButtonLabel':"Nein",
300 'mainPanelDeletingRecordPanelInitialTitle':"Lösche ausgewählte Karte", 297 'mainPanelDeletingRecordPanelInitialTitle':"Lösche ausgewählte Karte",
301 'mainPanelDeletingRecordPanelCompletedText':"Fertig", 298 'mainPanelDeletingRecordPanelCompletedText':"Fertig",
302 'deleteRecordPanelCollectRecordDataMessageTitle':"Karte löschen", 299 'deleteRecordPanelCollectRecordDataMessageTitle':"Karte löschen",
303 'deleteRecordPanelCollectRecordDataMessageText':"Aktualisiere Kartenliste", 300 'deleteRecordPanelCollectRecordDataMessageText':"Aktualisiere Kartenliste",
304 'deleteRecordPanelEncryptUserDataMessageTitle':"Karte löschen", 301 'deleteRecordPanelEncryptUserDataMessageTitle':"Karte löschen",
305 'deleteRecordPanelEncryptUserDataMessageText':"Lokale Verschlüsselung der Karten Kopfdaten", 302 'deleteRecordPanelEncryptUserDataMessageText':"Lokale Verschlüsselung der Karten Kopfdaten",
306 'deleteRecordPanelSendingDataToTheServerMessageTitle':"Karte löschen", 303 'deleteRecordPanelSendingDataToTheServerMessageTitle':"Karte löschen",
307 'deleteRecordPanelSendingDataToTheServerMessageText':"Lade verschlüsselte Karten Kopfdaten zu Clipperz hoch", 304 'deleteRecordPanelSendingDataToTheServerMessageText':"Lade verschlüsselte Karten Kopfdaten zu Clipperz hoch",
308 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"Karte löschen", 305 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"Karte löschen",
309 'deleteRecordPanelUpdatingTheInterfaceMessageText':"Aktualisiere Benutzerschnittstelle", 306 'deleteRecordPanelUpdatingTheInterfaceMessageText':"Aktualisiere Benutzerschnittstelle",
310 'recordDetailNoRecordSelectedTitle':"Keine Karte ausgewählt", 307 'recordDetailNoRecordSelectedTitle':"Keine Karte ausgewählt",
311 'recordDetailNoRecordSelectedDescription':"<p>Bitte wähle aus der linken Liste eine Karte aus.</p> ", 308 'recordDetailNoRecordSelectedDescription':"<p>Bitte wähle aus der linken Liste eine Karte aus.</p> ",
312 'recordDetailLoadingRecordMessage':"Lade verschlüsselte Karte von Clipperz runter", 309 'recordDetailLoadingRecordMessage':"Lade verschlüsselte Karte von Clipperz runter",
313 'recordDetailDecryptingRecordMessage':"Lokale entschlüsselung der Kartendaten", 310 'recordDetailDecryptingRecordMessage':"Lokale entschlüsselung der Kartendaten",
314 'recordDetailLoadingRecordVersionMessage':"Herunterladen der aktuellsten Kartenversion", 311 'recordDetailLoadingRecordVersionMessage':"Herunterladen der aktuellsten Kartenversion",
315 'recordDetailDecryptingRecordVersionMessage':"Lokale Entschlüsselung der aktuellen Version", 312 'recordDetailDecryptingRecordVersionMessage':"Lokale Entschlüsselung der aktuellen Version",
316 'recordDetailLoadingErrorMessageTitle':"Fehler beim Herunterladen der Karte", 313 'recordDetailLoadingErrorMessageTitle':"Fehler beim Herunterladen der Karte",
317 'recordDetailNotesLabel':"Notiz", 314 'recordDetailNotesLabel':"Notiz",
318 'recordDetailLabelFieldColumnLabel':"Feld Namen", 315 'recordDetailLabelFieldColumnLabel':"Feld Namen",
319 'recordDetailDataFieldColumnLabel':"Feld Daten", 316 'recordDetailDataFieldColumnLabel':"Feld Daten",
320 'recordDetailTypeFieldColumnLabel':"Art", 317 'recordDetailTypeFieldColumnLabel':"Art",
321 'recordDetailSavingChangesMessagePanelInitialTitle':"Speichere Karte", 318 'recordDetailSavingChangesMessagePanelInitialTitle':"Speichere Karte",
322 'recordDetailAddFieldButtonLabel':"Neues Feld hinzufügen", 319 'recordDetailAddFieldButtonLabel':"Neues Feld hinzufügen",
323 'recordDetailDirectLoginBlockTitle':"Direkt Logins", 320 'recordDetailDirectLoginBlockTitle':"Direkt Logins",
324 'recordDetailNewDirectLoginDescription':"<p>Direkt Login Konfiguration</p> ", 321 'recordDetailNewDirectLoginDescription':"<p>Direkt Login Konfiguration</p> ",
325 'recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription':"<p>Enthält diese Karte Informationen um Zugriff auf ein Online Service zu erhalten?</p> <p>Verwende das Bookmarklet um ein “Direkt Login” mit nur einem Klick von Clipperz zu konfigurieren.</p> ", 322 'recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription':"<p>Enthält diese Karte Informationen um Zugriff auf ein Online Service zu erhalten?</p> <p>Verwende das Bookmarklet um ein “Direkt Login” mit nur einem Klick von Clipperz zu konfigurieren.</p> ",
326 'recordDetailAddNewDirectLoginButtonLabel':"Neues Direktlogin hinzufügen", 323 'recordDetailAddNewDirectLoginButtonLabel':"Neues Direktlogin hinzufügen",
327 'recordDetailEditButtonLabel':"Bearbeiten", 324 'recordDetailEditButtonLabel':"Bearbeiten",
328 'recordDetailSaveButtonLabel':"Speichern", 325 'recordDetailSaveButtonLabel':"Speichern",
329 'recordDetailCancelButtonLabel':"Abbruch", 326 'recordDetailCancelButtonLabel':"Abbruch",
330 'newRecordTitleLabel':"_neue Karte_", 327 'newRecordTitleLabel':"_neue Karte_",
331 'newDirectLoginLabelSuffix':"", 328 'newDirectLoginLabelSuffix':"",
332 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"Karte speichern", 329 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"Karte speichern",
333 'recordSaveChangesPanelCollectRecordInfoMessageText':"Aktualisierung der Karten Kopfdaten", 330 'recordSaveChangesPanelCollectRecordInfoMessageText':"Aktualisierung der Karten Kopfdaten",
334 'recordSaveChangesPanelEncryptUserDataMessageTitle':"Karte speichern", 331 'recordSaveChangesPanelEncryptUserDataMessageTitle':"Karte speichern",
335 'recordSaveChangesPanelEncryptUserDataMessageText':"Lokale Verschlüsselung der Karten Kopfdaten", 332 'recordSaveChangesPanelEncryptUserDataMessageText':"Lokale Verschlüsselung der Karten Kopfdaten",
336 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"Karte speichern", 333 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"Karte speichern",
337 'recordSaveChangesPanelEncryptRecordDataMessageText':"Lokale Verschlüsselung der Karten Informationen", 334 'recordSaveChangesPanelEncryptRecordDataMessageText':"Lokale Verschlüsselung der Karten Informationen",
338 'recordSaveChangesPanelEncryptRecordVersionDataMessageTitle':"Karte speichern", 335 'recordSaveChangesPanelEncryptRecordVersionDataMessageTitle':"Karte speichern",
339 'recordSaveChangesPanelEncryptRecordVersionDataMessageText':"Lokale Verschlüsselung der Karten Versions Informationen", 336 'recordSaveChangesPanelEncryptRecordVersionDataMessageText':"Lokale Verschlüsselung der Karten Versions Informationen",
340 'recordSaveChangesPanelSendingDataToTheServerMessageTitle':"Karte speichern", 337 'recordSaveChangesPanelSendingDataToTheServerMessageTitle':"Karte speichern",
341 'recordSaveChangesPanelSendingDataToTheServerMessageText':"Verschlüsselte Karten Kopfdaten auf Clipperz hochladen", 338 'recordSaveChangesPanelSendingDataToTheServerMessageText':"Verschlüsselte Karten Kopfdaten auf Clipperz hochladen",
342 'recordSaveChangesPanelUpdatingTheInterfaceMessageTitle':"Karte speichern", 339 'recordSaveChangesPanelUpdatingTheInterfaceMessageTitle':"Karte speichern",
343 'recordSaveChangesPanelUpdatingTheInterfaceMessageText':"Aktualisierung der Benutzerschnittstelle", 340 'recordSaveChangesPanelUpdatingTheInterfaceMessageText':"Aktualisierung der Benutzerschnittstelle",
344 'exit':"<h2> <b>Auf Wiedersehen! Danke, dass Du Clipperz verwendet hast.</b> </h2> <ul> <li> <h3>Hinweis:</h3> <ul> <li> <p>Speichere diese Seite in Deine Favoriten, damit Du auch in Zukunft dich sicher mit Clipperz verbinden kannst (solltest Du dies nicht bereits getan haben)</p> </li> <li> <p>Clipperz wird Dir niemals eine E-Mail senden, weil wir Dich niemals nach Deiner E-Mail Anschrift gefragt haben (und dies auch nie werden) – öffne daher niemals eine Mail, die wvon Clipperz zu sein scheint</p> </li> </ul> </li> </ul> <p> </p> <p>In 10 Sekunden wirdst Du auf eine Seite von Wikipedia umgeleitet, wo Du über eine herausragende Sicherheitslücke informiert wirst.</p> ", 341 'exit':"<h2> <b>Auf Wiedersehen! Danke, dass Du Clipperz verwendet hast.</b> </h2> <ul> <li> <h3>Hinweis:</h3> <ul> <li> <p>Speichere diese Seite in Deine Favoriten, damit Du auch in Zukunft dich sicher mit Clipperz verbinden kannst (solltest Du dies nicht bereits getan haben)</p> </li> <li> <p>Clipperz wird Dir niemals eine E-Mail senden, weil wir Dich niemals nach Deiner E-Mail Anschrift gefragt haben (und dies auch nie werden) – öffne daher niemals eine Mail, die wvon Clipperz zu sein scheint</p> </li> </ul> </li> </ul> <p> </p> <p>In 10 Sekunden wirdst Du auf eine Seite von Wikipedia umgeleitet, wo Du über eine herausragende Sicherheitslücke informiert wirst.</p> ",
345 //'DWRUtilLoadingMessage':"Lade Daten ...", 342 //'DWRUtilLoadingMessage':"Lade Daten ...",
346 'comingSoon':"In Kürze ...", 343 'comingSoon':"In Kürze ...",
347 'panelCollectingEntryopyMessageText':"Sammlung", 344 'panelCollectingEntryopyMessageText':"Sammlung",
348 'directLoginConfigurationCheckBoxFieldSelectedValue':"Ja", 345 'directLoginConfigurationCheckBoxFieldSelectedValue':"Ja",
349 'directLoginConfigurationCheckBoxFieldNotSelectedValue':"Nein", 346 'directLoginConfigurationCheckBoxFieldNotSelectedValue':"Nein",
350 347
351__syntaxFix__: "syntax fix" 348__syntaxFix__: "syntax fix"
352}); 349});
diff --git a/frontend/beta/js/Clipperz/PM/Strings/Strings_el-GR.js b/frontend/beta/js/Clipperz/PM/Strings/Strings_el-GR.js
index 37e0a96..fc610d6 100644
--- a/frontend/beta/js/Clipperz/PM/Strings/Strings_el-GR.js
+++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_el-GR.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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//============================================================================= 26//=============================================================================
30// 27//
31 // G R E E K (el_GR) 28 // G R E E K (el_GR)
32// 29//
33//============================================================================= 30//=============================================================================
34 31
35Clipperz.PM.Strings.Languages['el-gr'] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 32Clipperz.PM.Strings.Languages['el-gr'] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], {
36 33
37//----------------------------------------------------- 34//-----------------------------------------------------
38 //Login page - description 35 //Login page - description
39 'clipperzServiceDescriptionConfig': [ 36 'clipperzServiceDescriptionConfig': [
40 {tag:'h2', html:'Κρατήστε το για τον Εαυτό Σας'}, 37 {tag:'h2', html:'Κρατήστε το για τον Εαυτό Σας'},
41 {tag:'ul', children:[ 38 {tag:'ul', children:[
42 {tag:'li', children:[ 39 {tag:'li', children:[
43 {tag:'h3', html:'Το Clipperz είναι:'}, 40 {tag:'h3', html:'Το Clipperz είναι:'},
44 {tag:'ul', children:[ 41 {tag:'ul', children:[
45 {tag:'li', children:[{tag:'span', html:'Ένας ασφαλής και απλός τρόπος διαχείρησης όλων των κωδικών πρόσβασης σας'}]}, 42 {tag:'li', children:[{tag:'span', html:'Ένας ασφαλής και απλός τρόπος διαχείρησης όλων των κωδικών πρόσβασης σας'}]},
46 {tag:'li', children:[{tag:'span', html:'Μια αποτελεσματική λύση πρόσβασης σε δεδομένα/εφαρμογές με μοναδικό κωδικό'}]}, 43 {tag:'li', children:[{tag:'span', html:'Μια αποτελεσματική λύση πρόσβασης σε δεδομένα/εφαρμογές με μοναδικό κωδικό'}]},
47 {tag:'li', children:[{tag:'span', html:'Μια ψηφιακή θυρίδα για τα απόρρητα δεδομένα σας'}]} 44 {tag:'li', children:[{tag:'span', html:'Μια ψηφιακή θυρίδα για τα απόρρητα δεδομένα σας'}]}
48 ]} 45 ]}
49 ]}, 46 ]},
50 {tag:'li', children:[ 47 {tag:'li', children:[
51 {tag:'h3', html:'Με το Clipperz μπορείτε:'}, 48 {tag:'h3', html:'Με το Clipperz μπορείτε:'},
52 {tag:'ul', children:[ 49 {tag:'ul', children:[
53 {tag:'li', children:[{tag:'span', html:'Να αποθηκεύσετε και να διαχειριστείτε όλους τους κωδικούς πρόσβασης και τα online πιστοποιητικά/διαπιστευτήρια σας'}]}, 50 {tag:'li', children:[{tag:'span', html:'Να αποθηκεύσετε και να διαχειριστείτε όλους τους κωδικούς πρόσβασης και τα online πιστοποιητικά/διαπιστευτήρια σας'}]},
54 {tag:'li', children:[{tag:'span', html:'Να έχετε πρόσβαση (login) στις υπηρεσίες διαδικτύου χωρίς την εισαγωγή oνομάτων λογαρισμών χρήστη (username),ή, κωδικών πρόσβασης (passwords)'}]}, 51 {tag:'li', children:[{tag:'span', html:'Να έχετε πρόσβαση (login) στις υπηρεσίες διαδικτύου χωρίς την εισαγωγή oνομάτων λογαρισμών χρήστη (username),ή, κωδικών πρόσβασης (passwords)'}]},
55 {tag:'li', children:[{tag:'span', html:'Να προστατεύσετε όλα τα προσωπικά δεδομένα σας: κωδικούς συναγερμών, PINs, αριθμούς πιστωτικών καρτών, ...'}]}, 52 {tag:'li', children:[{tag:'span', html:'Να προστατεύσετε όλα τα προσωπικά δεδομένα σας: κωδικούς συναγερμών, PINs, αριθμούς πιστωτικών καρτών, ...'}]},
56 {tag:'li', children:[{tag:'span', html:'Να μοιραστείτε δεδομένα με μέλη της οικογένεια σας και τους συνεργάτες σας (σύντομα στην διάθεση σας)'}]} 53 {tag:'li', children:[{tag:'span', html:'Να μοιραστείτε δεδομένα με μέλη της οικογένεια σας και τους συνεργάτες σας (σύντομα στην διάθεση σας)'}]}
57 ]} 54 ]}
58 ]}, 55 ]},
59 {tag:'li', children:[ 56 {tag:'li', children:[
60 {tag:'h3', html:'Τα πλεονεκτήματα του Clipperz είναι:'}, 57 {tag:'h3', html:'Τα πλεονεκτήματα του Clipperz είναι:'},
61 {tag:'ul', children:[ 58 {tag:'ul', children:[
62 {tag:'li', children:[{tag:'span', html:'Είναι δωρεάν και προσφέρει πρόσβαση ανώνυμα'}]}, 59 {tag:'li', children:[{tag:'span', html:'Είναι δωρεάν και προσφέρει πρόσβαση ανώνυμα'}]},
63 {tag:'li', children:[{tag:'span', html:'Μπορεί να χρησιμοποιηθεί οποαδήποτε ώρα και από οποιοδήποτε τερματικό'}]}, 60 {tag:'li', children:[{tag:'span', html:'Μπορεί να χρησιμοποιηθεί οποαδήποτε ώρα και από οποιοδήποτε τερματικό'}]},
64 {tag:'li', children:[{tag:'span', html:'Δεν απαιτεί την φόρτωση και εγκατάσταση οποιουδήποτε λογισμικού'}]}, 61 {tag:'li', children:[{tag:'span', html:'Δεν απαιτεί την φόρτωση και εγκατάσταση οποιουδήποτε λογισμικού'}]},
65 {tag:'li', children:[{tag:'span', html:'Αποφεύγετε την διατήριση απορρήτων στον υπολογιστή σας ή σε έντυπη μορφή'}]} 62 {tag:'li', children:[{tag:'span', html:'Αποφεύγετε την διατήριση απορρήτων στον υπολογιστή σας ή σε έντυπη μορφή'}]}
66 ]} 63 ]}
67 ]}, 64 ]},
68 {tag:'li', children:[ 65 {tag:'li', children:[
69 {tag:'h3', html:'Η ασφάλεια που παρέχει το Clipperz:'}, 66 {tag:'h3', html:'Η ασφάλεια που παρέχει το Clipperz:'},
70 {tag:'ul', children:[ 67 {tag:'ul', children:[
71 {tag:'li', children:[{tag:'span', html:'Τα απόρρητα δεδομένα σας κωδικοποιούνται τοπικά από τον διακομιστή σας (browser) πρίν να φορτωθούν στο Clipperz'}]}, 68 {tag:'li', children:[{tag:'span', html:'Τα απόρρητα δεδομένα σας κωδικοποιούνται τοπικά από τον διακομιστή σας (browser) πρίν να φορτωθούν στο Clipperz'}]},
72 {tag:'li', children:[{tag:'span', html:'Το κλειδί της κωδικοποίησης είναι μία φράση-κωδικός γνωστή μόνο σε εσάς'}]}, 69 {tag:'li', children:[{tag:'span', html:'Το κλειδί της κωδικοποίησης είναι μία φράση-κωδικός γνωστή μόνο σε εσάς'}]},
73 {tag:'li', children:[{tag:'span', html:'Το Clipperz φυλάσσει τα προσωπικά σας δεδομένα σε κωδικοποιημένη μορφή, και δεν μπορεί να έχει πρόσβαση σε αυτά στην αρχική τους μορφή'}]}, 70 {tag:'li', children:[{tag:'span', html:'Το Clipperz φυλάσσει τα προσωπικά σας δεδομένα σε κωδικοποιημένη μορφή, και δεν μπορεί να έχει πρόσβαση σε αυτά στην αρχική τους μορφή'}]},
74 {tag:'li', children:[{tag:'span', html:'Το Clipperz χρησιμοποιεί επίσημες /πρότυπες μεθόδους κωδικοποίησης, και όχι αόριστα και εφάνταστα μοντέλα'}]}, 71 {tag:'li', children:[{tag:'span', html:'Το Clipperz χρησιμοποιεί επίσημες /πρότυπες μεθόδους κωδικοποίησης, και όχι αόριστα και εφάνταστα μοντέλα'}]},
75 {tag:'li', children:[{tag:'span', html:'Έχετε πρόσβαση στον πηγαίο κώδικα οποτεδήποτε το θελήσετε, και δεν χρειάζετε να γνωρίζετε τίποτα από κρυπτογράφηση για να είστε ένας ευχαριστημένος χρήστης!'}]} 72 {tag:'li', children:[{tag:'span', html:'Έχετε πρόσβαση στον πηγαίο κώδικα οποτεδήποτε το θελήσετε, και δεν χρειάζετε να γνωρίζετε τίποτα από κρυπτογράφηση για να είστε ένας ευχαριστημένος χρήστης!'}]}
76 ]} 73 ]}
77 ]}, 74 ]},
78 {tag:'li', children:[ 75 {tag:'li', children:[
79 {tag:'a', href:"http://www.clipperz.com", target:'_blank', html:'Μάθετε περισσότερα'} 76 {tag:'a', href:"http://www.clipperz.com", target:'_blank', html:'Μάθετε περισσότερα'}
80 ]} 77 ]}
81 ]} 78 ]}
82 ], 79 ],
83 80
84 // Login page - form 81 // Login page - form
85 'loginFormTitle': "Συνδεθείτε με τον Clipperz λογαριασμό σας", 82 'loginFormTitle': "Συνδεθείτε με τον Clipperz λογαριασμό σας",
86 'loginFormUsernameLabel': "Όνομα χρήστη", 83 'loginFormUsernameLabel': "Όνομα χρήστη",
87 'loginFormPassphraseLabel': "Κωδική φράση", 84 'loginFormPassphraseLabel': "Κωδική φράση",
88 'loginFormDontHaveAnAccountLabel': "Δεν έχετε δημιουργήσει λογαριασμό?", 85 'loginFormDontHaveAnAccountLabel': "Δεν έχετε δημιουργήσει λογαριασμό?",
89 'loginFormCreateOneLabel': "Δημιουργήστε έναν", 86 'loginFormCreateOneLabel': "Δημιουργήστε έναν",
90 'loginFormForgotYourCredentialsLabel': "Ξεχάσατε τα διαπιστευτήριά σας?", 87 'loginFormForgotYourCredentialsLabel': "Ξεχάσατε τα διαπιστευτήριά σας?",
91 'loginFormAarghThatsBadLabel': "Ααααργκ! Αυτό είναι κακό!", 88 'loginFormAarghThatsBadLabel': "Ααααργκ! Αυτό είναι κακό!",
92 'loginFormAfraidOfMaliciousScriptsLabel':"φοβάστε κακόβουλα προγράμματα (scripts)?", 89 'loginFormAfraidOfMaliciousScriptsLabel':"φοβάστε κακόβουλα προγράμματα (scripts)?",
93 'loginFormVerifyTheCodeLabel': "Επαληθεύστε τον κωδικό", 90 'loginFormVerifyTheCodeLabel': "Επαληθεύστε τον κωδικό",
94 'loginFormButtonLabel': "Σύνδεση", 91 'loginFormButtonLabel': "Σύνδεση",
95 92
96// Login page - language selection 93// Login page - language selection
97 'loginPanelSwithLanguageDescriptionConfig':[ 94 'loginPanelSwithLanguageDescriptionConfig':[
98 {tag:'h5', html:"Αλλάξτε στην γλώσσα προτήμησης σας"} 95 {tag:'h5', html:"Αλλάξτε στην γλώσσα προτήμησης σας"}
99 ], 96 ],
100 97
101// Login page - browser compatibility 98// Login page - browser compatibility
102 'browserCompatibilityDescriptionConfig':[ 99 'browserCompatibilityDescriptionConfig':[
103 {tag:'p', html:"Έχετε μία καλύτερη και πιό ασφαλή Clipperz εμπειρία χρησιμοποιόντας τον Firefox. Ωστόσο το Clipperz συνεργάζετε άψογα με Opera και MS Internet Explorer!"} 100 {tag:'p', html:"Έχετε μία καλύτερη και πιό ασφαλή Clipperz εμπειρία χρησιμοποιόντας τον Firefox. Ωστόσο το Clipperz συνεργάζετε άψογα με Opera και MS Internet Explorer!"}
104 ], 101 ],
105 102
106// Login message panel 103// Login message panel
107 'loginMessagePanelInitialTitle': "Γίνεται σύνδεση ...", 104 'loginMessagePanelInitialTitle': "Γίνεται σύνδεση ...",
108 'loginMessagePanelInitialButtonLabel': "Ακύρωση", 105 'loginMessagePanelInitialButtonLabel': "Ακύρωση",
109 'loginMessagePanelConnectedTitle': "Συνδεθήκατε", 106 'loginMessagePanelConnectedTitle': "Συνδεθήκατε",
110 'loginMessagePanelConnectedText': "Ολοκληρώθηκε", 107 'loginMessagePanelConnectedText': "Ολοκληρώθηκε",
111 'loginMessagePanelFailureTitle': "Λάθος", 108 'loginMessagePanelFailureTitle': "Λάθος",
112 'loginMessagePanelFailureText': "Η σύνδεση χρήστη απέτυχε", 109 'loginMessagePanelFailureText': "Η σύνδεση χρήστη απέτυχε",
113 'loginMessagePanelFailureButtonLabel': "Κλείσιμο", 110 'loginMessagePanelFailureButtonLabel': "Κλείσιμο",
114 111
115// Login message panel - connection 112// Login message panel - connection
116 'connectionLoginSendingCredentialsMessageTitle': "Γίνεται επαλήθευση διαπιστευτηρίων", 113 'connectionLoginSendingCredentialsMessageTitle': "Γίνεται επαλήθευση διαπιστευτηρίων",
117 'connectionLoginSendingCredentialsMessageText': "Αποστέλλονται διαπιστευτήρια", 114 'connectionLoginSendingCredentialsMessageText': "Αποστέλλονται διαπιστευτήρια",
118 'connectionLoginCredentialsVerificationMessageTitle':"Γίνεται επαλήθευση διαπιστευτηρίων", 115 'connectionLoginCredentialsVerificationMessageTitle':"Γίνεται επαλήθευση διαπιστευτηρίων",
119 'connectionLoginCredentialsVerificationMessageText':"Εκτέλεση πιστοποίησης SRP ", 116 'connectionLoginCredentialsVerificationMessageText':"Εκτέλεση πιστοποίησης SRP ",
120 'connectionLoginDoneMessageTitle': "Γίνεται επαλήθευση διαπιστευτηρίων", 117 'connectionLoginDoneMessageTitle': "Γίνεται επαλήθευση διαπιστευτηρίων",
121 'connectionLoginDoneMessageText': "Συνδεδεμένος", 118 'connectionLoginDoneMessageText': "Συνδεδεμένος",
122 119
123 //Login message panel - user 120 //Login message panel - user
124 'userLoginPanelUpgradingUserCredentialsMessageTitle': "Γίνεται επαλήθευση διαπιστευτηρίων", 121 'userLoginPanelUpgradingUserCredentialsMessageTitle': "Γίνεται επαλήθευση διαπιστευτηρίων",
125 'userLoginPanelUpgradingUserCredentialsMessageText': "Αναβάθμηση των διαπιστευτηρίων σας σε ένα νέο σζήμα πιστοποίησης", 122 'userLoginPanelUpgradingUserCredentialsMessageText': "Αναβάθμηση των διαπιστευτηρίων σας σε ένα νέο σζήμα πιστοποίησης",
126 'userLoginPanelConnectedMessageTitle': "Χρήστης πιστοποιήθηκε ", 123 'userLoginPanelConnectedMessageTitle': "Χρήστης πιστοποιήθηκε ",
127 'userLoginPanelConnectedMessageText': "Συνδεθήκατε με επιτυχία", 124 'userLoginPanelConnectedMessageText': "Συνδεθήκατε με επιτυχία",
128 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle': "Γίνεται επαλήθευση διαπιστευτηρίων", 125 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle': "Γίνεται επαλήθευση διαπιστευτηρίων",
129 'userLoginPanelTryingAnOlderConnectionSchemaMessageText': "Trying an older authentication schema", 126 'userLoginPanelTryingAnOlderConnectionSchemaMessageText': "Trying an older authentication schema",
130 'userLoginPanelLoadingUserDataMessageTitle': "Χρήστης πιστοποιήθηκε ", 127 'userLoginPanelLoadingUserDataMessageTitle': "Χρήστης πιστοποιήθηκε ",
131 'userLoginPanelLoadingUserDataMessageText': "Downloading encrypted card headers from Clipperz", 128 'userLoginPanelLoadingUserDataMessageText': "Downloading encrypted card headers from Clipperz",
132 'userLoginPanelDecryptingUserDataMessageTitle': "Χρήστης πιστοποιήθηκε ", 129 'userLoginPanelDecryptingUserDataMessageTitle': "Χρήστης πιστοποιήθηκε ",
133 'userLoginPanelDecryptingUserDataMessageText': "Local decryption of card headers", 130 'userLoginPanelDecryptingUserDataMessageText': "Local decryption of card headers",
134 'userLoginPanelDecryptingUserStatisticsMessageTitle': "Χρήστης πιστοποιήθηκε ", 131 'userLoginPanelDecryptingUserStatisticsMessageTitle': "Χρήστης πιστοποιήθηκε ",
135 'userLoginPanelDecryptingUserStatisticsMessageText': "Local decryption of usage statistics", 132 'userLoginPanelDecryptingUserStatisticsMessageText': "Local decryption of usage statistics",
136 133
137 //----------------------------------------------------- 134 //-----------------------------------------------------
138 //Registration page - splash alert 135 //Registration page - splash alert
139 'splashAlertTitle':"Καλώς ήλθατε στο Clipperz!", 136 'splashAlertTitle':"Καλώς ήλθατε στο Clipperz!",
140 'splashAlertTextConfig': [ 137 'splashAlertTextConfig': [
141 {tag:'p', html:'Μερικές συμβουλές ασφαλείας'}, 138 {tag:'p', html:'Μερικές συμβουλές ασφαλείας'},
142 {tag:'ul', children:[ 139 {tag:'ul', children:[
143 {tag:'li', children:[{tag:'span', html:'Η αποθήκευση των δεδομένων σας στο Clipperz είναι τόσο ασφαλής, όσο η κωδική φράση που επιλέγετε για να τα προστατεύσετε. Κανένας δεν θα έχει πρόσβαση σε αυτά, εκτός αν γνωρίζει την κωδική φράση σας.'}]}, 140 {tag:'li', children:[{tag:'span', html:'Η αποθήκευση των δεδομένων σας στο Clipperz είναι τόσο ασφαλής, όσο η κωδική φράση που επιλέγετε για να τα προστατεύσετε. Κανένας δεν θα έχει πρόσβαση σε αυτά, εκτός αν γνωρίζει την κωδική φράση σας.'}]},
144 {tag:'li', children:[{tag:'span', html:'Αν πρόκειται να χρησιμοποιήσετε το Clipperz για ασφαλή προστασία ευαίσθητων ή σημαντικών πληροφοριών, βεβαιωθείτε ότι θα χρησιμοποιήσετε μία “γερή” κωδική φράση. Όσο μεγαλύτερη, τόσο καλύτερη!'}]}, 141 {tag:'li', children:[{tag:'span', html:'Αν πρόκειται να χρησιμοποιήσετε το Clipperz για ασφαλή προστασία ευαίσθητων ή σημαντικών πληροφοριών, βεβαιωθείτε ότι θα χρησιμοποιήσετε μία “γερή” κωδική φράση. Όσο μεγαλύτερη, τόσο καλύτερη!'}]},
145 {tag:'li', children:[{tag:'span', html:'Το Clipperz δεν θα έχει τη δυνατότητα να ανακτήσει μία χαμένη κωδική φράση!'}]} 142 {tag:'li', children:[{tag:'span', html:'Το Clipperz δεν θα έχει τη δυνατότητα να ανακτήσει μία χαμένη κωδική φράση!'}]}
146 ]}, 143 ]},
147 {tag:'p', html:'Για περισσότερες πληροφορίες, παρακαλώ ανατρέξτε στο <a href=\"http://www.clipperz.com\" target=\"_blank\">Clipperz</a>.'} 144 {tag:'p', html:'Για περισσότερες πληροφορίες, παρακαλώ ανατρέξτε στο <a href=\"http://www.clipperz.com\" target=\"_blank\">Clipperz</a>.'}
148 ], 145 ],
149 'splashAlertCloseButtonLabel':"Εντάξει", 146 'splashAlertCloseButtonLabel':"Εντάξει",
150 147
151 // Registration page - form 148 // Registration page - form
152 'registrationFormTitle': "Δημιουργήστε λογαριασμό", 149 'registrationFormTitle': "Δημιουργήστε λογαριασμό",
153 'registrationFormUsernameLabel': "Όνομα χρήστη", 150 'registrationFormUsernameLabel': "Όνομα χρήστη",
154 'registrationFormPassphraseLabel': "Κωδική φράση", 151 'registrationFormPassphraseLabel': "Κωδική φράση",
155 'registrationFormRetypePassphraseLabel': "Εισάγετε ξανά την κωδική φράση", 152 'registrationFormRetypePassphraseLabel': "Εισάγετε ξανά την κωδική φράση",
156 'registrationFormSafetyCheckLabel': "Κατανοώ πως το Clipperz δεν θα μπορεί να ανακτήσει μία χαμένη κωδική φράση.", 153 'registrationFormSafetyCheckLabel': "Κατανοώ πως το Clipperz δεν θα μπορεί να ανακτήσει μία χαμένη κωδική φράση.",
157 'registrationFormTermsOfServiceCheckLabel': "Έχω διαβάσει και αποδέχομαι τους Όρους Χρήσης <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Όρους Χρήσης</a>.", 154 'registrationFormTermsOfServiceCheckLabel': "Έχω διαβάσει και αποδέχομαι τους Όρους Χρήσης <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Όρους Χρήσης</a>.",
158 'registrationFormDoYouAlreadyHaveAnAccountLabel': "Έχετε ήδη έναν λογαριασμό?", 155 'registrationFormDoYouAlreadyHaveAnAccountLabel': "Έχετε ήδη έναν λογαριασμό?",
159 'registrationFormSimplyLoginLabel': "απλώς συνδεθείτε", 156 'registrationFormSimplyLoginLabel': "απλώς συνδεθείτε",
160 'registrationFormButtonLabel': "Εγγραφείτε", 157 'registrationFormButtonLabel': "Εγγραφείτε",
161 158
162// Registration page - warning messages 159// Registration page - warning messages
163 'registrationFormWarningMessageNotMatchingPassphrases':"Οι κωδικές φράσεις που εισάγατε δεν ταιριάζουν. Παρακαλώ ξαναπροσπαθήστε.", 160 'registrationFormWarningMessageNotMatchingPassphrases':"Οι κωδικές φράσεις που εισάγατε δεν ταιριάζουν. Παρακαλώ ξαναπροσπαθήστε.",
164 'registrationFormWarningMessageSafetyCheckNotSelected':"Παρακαλώ διαβάστε και επιλέξτε όλες τις παρακάτω επιλογές.", 161 'registrationFormWarningMessageSafetyCheckNotSelected':"Παρακαλώ διαβάστε και επιλέξτε όλες τις παρακάτω επιλογές.",
165 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"Πρέπει να αποδεχθείτε τους Όρους Χρήσης.", 162 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"Πρέπει να αποδεχθείτε τους Όρους Χρήσης.",
166 163
167 // Registration message panel 164 // Registration message panel
168 'registrationMessagePanelInitialTitle': "Δημιουργία λογαριασμού ...", 165 'registrationMessagePanelInitialTitle': "Δημιουργία λογαριασμού ...",
169 'registrationMessagePanelInitialButtonLabel': "Ακύρωση", 166 'registrationMessagePanelInitialButtonLabel': "Ακύρωση",
170 'registrationMessagePanelRegistrationDoneTitle': "Εγγραφή", 167 'registrationMessagePanelRegistrationDoneTitle': "Εγγραφή",
171 'registrationMessagePanelRegistrationDoneText': "Ολοκληρώθηκε", 168 'registrationMessagePanelRegistrationDoneText': "Ολοκληρώθηκε",
172 'registrationMessagePanelFailureTitle': "Η εγγραφή απέτυχε", 169 'registrationMessagePanelFailureTitle': "Η εγγραφή απέτυχε",
173 'registrationMessagePanelFailureButtonLabel': "Κλείσιμο", 170 'registrationMessagePanelFailureButtonLabel': "Κλείσιμο",
174 171
175// Registration - connection 172// Registration - connection
176 'connectionRegistrationSendingRequestMessageText': "Γίνεται επαλήθευση διαπιστευτηρίων", 173 'connectionRegistrationSendingRequestMessageText': "Γίνεται επαλήθευση διαπιστευτηρίων",
177 'connectionRegistrationSendingCredentialsMessageText':"Αποστέλλονται διαπιστευτήρια", 174 'connectionRegistrationSendingCredentialsMessageText':"Αποστέλλονται διαπιστευτήρια",
178 175
179 //----------------------------------------------------- 176 //-----------------------------------------------------
180// Registration splash panel 177// Registration splash panel
181 'registrationSplashPanelTitle':"Συμβουλές Ασφαλείας", 178 'registrationSplashPanelTitle':"Συμβουλές Ασφαλείας",
182 'registrationSplashPanelDescriptionConfig': [ 179 'registrationSplashPanelDescriptionConfig': [
183 {tag:'p', html:'Αυτά είναι τα διαπιστευτήριά σας στο Clipperz, δείτε τα προσεκτικά. Το Clipperz δεν θα απεικονίσει το όνομα χρήστη και την κωδική σας φράση δεύτερη φορά!'} 180 {tag:'p', html:'Αυτά είναι τα διαπιστευτήριά σας στο Clipperz, δείτε τα προσεκτικά. Το Clipperz δεν θα απεικονίσει το όνομα χρήστη και την κωδική σας φράση δεύτερη φορά!'}
184 ], 181 ],
185 'registrationSplashPanelUsernameLabel': "όνομα χρήστη", 182 'registrationSplashPanelUsernameLabel': "όνομα χρήστη",
186 'registrationSplashPanelPassphraseLabel':"κωδική φράση", 183 'registrationSplashPanelPassphraseLabel':"κωδική φράση",
187 184
188 //----------------------------------------------------- 185 //-----------------------------------------------------
189 //Header links 186 //Header links
190 'donateHeaderLinkLabel':"donate", 187 'donateHeaderLinkLabel':"donate",
191 'creditsHeaderLinkLabel':"credits", 188 'creditsHeaderLinkLabel':"credits",
192 'feedbackHeaderLinkLabel':"feedback", 189 'feedbackHeaderLinkLabel':"feedback",
193 'helpHeaderLinkLabel': "Βοήθεια", 190 'helpHeaderLinkLabel': "Βοήθεια",
194 'forumHeaderLinkLabel': "forum", 191 'forumHeaderLinkLabel': "forum",
195 192
196 //----------------------------------------------------- 193 //-----------------------------------------------------
197 //Menu labels 194 //Menu labels
198 'recordMenuLabel': "cards", 195 'recordMenuLabel': "cards",
199 'accountMenuLabel': "Λογαριασμός", 196 'accountMenuLabel': "Λογαριασμός",
200 'dataMenuLabel': "Δεδομένα", 197 'dataMenuLabel': "Δεδομένα",
201 'contactsMenuLabel':"Επαφές", 198 'contactsMenuLabel':"Επαφές",
202 'bookmarkletMenuLabel':"bookmarklet", 199 'bookmarkletMenuLabel':"bookmarklet",
203 'logoutMenuLabel': "Αποσύνδεση", 200 'logoutMenuLabel': "Αποσύνδεση",
204 'lockMenuLabel': "lock", 201 'lockMenuLabel': "lock",
205 202
206//----------------------------------------------------- 203//-----------------------------------------------------
207 //Lock dialog 204 //Lock dialog
208 'lockTitle': "The account is locked", 205 'lockTitle': "The account is locked",
209 'lockDescriptionConfig':[ 206 'lockDescriptionConfig':[
210 {tag:'p', html:'To unlock your account, please insert your passphrase'} 207 {tag:'p', html:'To unlock your account, please insert your passphrase'}
211 ], 208 ],
212 'unlockButtonLabel': "Unlock", 209 'unlockButtonLabel': "Unlock",
213 210
214//----------------------------------------------------- 211//-----------------------------------------------------
215 //Account panel - change passphrase 212 //Account panel - change passphrase
216 'changePasswordTabLabel':"Αλλάξτε την κωδική φράση σας", 213 'changePasswordTabLabel':"Αλλάξτε την κωδική φράση σας",
217 'changePasswordTabTitle':"Αλλάξτε την κωδική φράση σας", 214 'changePasswordTabTitle':"Αλλάξτε την κωδική φράση σας",
218 215
219 //Account panel - change passphrase - form 216 //Account panel - change passphrase - form
220 'changePasswordFormUsernameLabel': "όνομα χρήστη", 217 'changePasswordFormUsernameLabel': "όνομα χρήστη",
221 'changePasswordFormOldPassphraseLabel': "παλαιά κωδική φράση", 218 'changePasswordFormOldPassphraseLabel': "παλαιά κωδική φράση",
222 'changePasswordFormNewPassphraseLabel': "νέα κωδική φράση", 219 'changePasswordFormNewPassphraseLabel': "νέα κωδική φράση",
223 'changePasswordFormRetypePassphraseLabel':"Εισάγετε ξανά τη νέα κωδική φράση", 220 'changePasswordFormRetypePassphraseLabel':"Εισάγετε ξανά τη νέα κωδική φράση",
224 'changePasswordFormSafetyCheckboxLabel':"Κατανοώ πως το Clipperz δεν θα μπορεί να ανακτήσει μία χαμένη κωδική φράση.", 221 'changePasswordFormSafetyCheckboxLabel':"Κατανοώ πως το Clipperz δεν θα μπορεί να ανακτήσει μία χαμένη κωδική φράση.",
225 'changePasswordFormSubmitLabel': "Αλλάξτε την κωδική φράση σας", 222 'changePasswordFormSubmitLabel': "Αλλάξτε την κωδική φράση σας",
226 223
227 //Account panel - change passphrase - warnings 224 //Account panel - change passphrase - warnings
228 'changePasswordFormWrongUsernameWarning': "Λάθος όνομα χρήστη", 225 'changePasswordFormWrongUsernameWarning': "Λάθος όνομα χρήστη",
229 'changePasswordFormWrongPassphraseWarning': "Λάθος κωδική φράση", 226 'changePasswordFormWrongPassphraseWarning': "Λάθος κωδική φράση",
230 'changePasswordFormWrongRetypePassphraseWarning':"Οι κωδικές φράσεις που εισάγατε δεν ταιριάζουν. Παρακαλώ ξαναπροσπαθήστε.", 227 'changePasswordFormWrongRetypePassphraseWarning':"Οι κωδικές φράσεις που εισάγατε δεν ταιριάζουν. Παρακαλώ ξαναπροσπαθήστε.",
231 'changePasswordFormSafetyCheckWarning': "Παρακαλώ διαβάστε και επιλέξτε όλες τις παρακάτω επιλογές.", 228 'changePasswordFormSafetyCheckWarning': "Παρακαλώ διαβάστε και επιλέξτε όλες τις παρακάτω επιλογές.",
232 229
233 //Account panel - change passphrase - progress dialog 230 //Account panel - change passphrase - progress dialog
234 'changePasswordFormProgressDialogTitle': "Γίνεται αλλαγή διαπιστευτηρίων χρήστη", 231 'changePasswordFormProgressDialogTitle': "Γίνεται αλλαγή διαπιστευτηρίων χρήστη",
235 'changePasswordFormProgressDialogConnectedMessageTitle': "Συνδεδεμένος", 232 'changePasswordFormProgressDialogConnectedMessageTitle': "Συνδεδεμένος",
236 'changePasswordFormProgressDialogConnectedMessageText': "Ολοκληρώθηκε", 233 'changePasswordFormProgressDialogConnectedMessageText': "Ολοκληρώθηκε",
237 'changePasswordFormProgressDialogErrorMessageTitle': "Σφάλμα", 234 'changePasswordFormProgressDialogErrorMessageTitle': "Σφάλμα",
238 'changePasswordFormProgressDialogErrorMessageText': "Απέτυχε η αλλαγή διαπιστευτηρίων!", 235 'changePasswordFormProgressDialogErrorMessageText': "Απέτυχε η αλλαγή διαπιστευτηρίων!",
239 236
240 'changeCredentialsPanelEncryptingDataMessageTitle': "Γίνεται αλλαγή της κωδικής φράσης σας", 237 'changeCredentialsPanelEncryptingDataMessageTitle': "Γίνεται αλλαγή της κωδικής φράσης σας",
241 'changeCredentialsPanelEncryptingDataMessageText': "Local encryption of card headers", 238 'changeCredentialsPanelEncryptingDataMessageText': "Local encryption of card headers",
242 'changeCredentialsPanelCreatingNewCredentialsMessageTitle': "Γίνεται αλλαγή της κωδικής φράσης σας", 239 'changeCredentialsPanelCreatingNewCredentialsMessageTitle': "Γίνεται αλλαγή της κωδικής φράσης σας",
243 'changeCredentialsPanelCreatingNewCredentialsMessageText': "Γίνεται ανανέωση των διαπιστευτηρίων σας", 240 'changeCredentialsPanelCreatingNewCredentialsMessageText': "Γίνεται ανανέωση των διαπιστευτηρίων σας",
244 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Γίνεται αλλαγή της κωδικής φράσης σας", 241 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Γίνεται αλλαγή της κωδικής φράσης σας",
245 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Uploading your encrypted credentials to Clipperz", 242 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Uploading your encrypted credentials to Clipperz",
246 'changeCredentialsPanelDoneMessageTitle': "Γίνεται αλλαγή της κωδικής φράσης σας", 243 'changeCredentialsPanelDoneMessageTitle': "Γίνεται αλλαγή της κωδικής φράσης σας",
247 'changeCredentialsPanelDoneMessageText': "Ολοκληρώθηκε", 244 'changeCredentialsPanelDoneMessageText': "Ολοκληρώθηκε",
248 245
249//----------------------------------------------------- 246//-----------------------------------------------------
250 //Account panel - manage OTP 247 //Account panel - manage OTP
251 'manageOTPTabLabel': "Manage your one-time passphrases", 248 'manageOTPTabLabel': "Manage your one-time passphrases",
252 'manageOTPTabTitle': "Manage your one-time passphrases", 249 'manageOTPTabTitle': "Manage your one-time passphrases",
253 250
254 // Account panel - manage OTP - description 251 // Account panel - manage OTP - description
255 'manageOTPTabDescriptionConfig':[ 252 'manageOTPTabDescriptionConfig':[
256 {tag:'p', html:"A one-time passphrase works like your regular passphrase, but can be used only once."}, 253 {tag:'p', html:"A one-time passphrase works like your regular passphrase, but can be used only once."},
257 {tag:'p', html:"If the same passphrase is used again at a later stage in a login attempt it will be rejected and the login process will fail."}, 254 {tag:'p', html:"If the same passphrase is used again at a later stage in a login attempt it will be rejected and the login process will fail."},
258 {tag:'p', html:"Immediately after a successful login, your one-time passphrase will be deleted preventing any fraudulent access."}, 255 {tag:'p', html:"Immediately after a successful login, your one-time passphrase will be deleted preventing any fraudulent access."},
259 {tag:'p', html:"One-time passwords are an excellent choice if one is concerned about keyloggers or spyware infections that may be collecting data from compromised machines."}, 256 {tag:'p', html:"One-time passwords are an excellent choice if one is concerned about keyloggers or spyware infections that may be collecting data from compromised machines."},
260 {tag:'p', html:"<b>It's strongly advisable to use one-time passphrases when accessing Clipperz from public terminals, such as Internet cafes and libraries.</b>"}, 257 {tag:'p', html:"<b>It's strongly advisable to use one-time passphrases when accessing Clipperz from public terminals, such as Internet cafes and libraries.</b>"},
261 {tag:'p', html:""}, 258 {tag:'p', html:""},
262 {tag:'p', html:"<b>Coming soon ...</b>"} 259 {tag:'p', html:"<b>Coming soon ...</b>"}
263 ], 260 ],
264 261
265//----------------------------------------------------- 262//-----------------------------------------------------
266// Account panel - user preferences 263// Account panel - user preferences
267 'accountPreferencesLabel': "Προτιμήσεις", 264 'accountPreferencesLabel': "Προτιμήσεις",
268 'accountPreferencesTabTitle': "Προτιμήσεις", 265 'accountPreferencesTabTitle': "Προτιμήσεις",
269 266
270// Account panel - user preferences - description 267// Account panel - user preferences - description
271 'accountPreferencesLanguageTitle':"Επιλογή Γλώσσας", 268 'accountPreferencesLanguageTitle':"Επιλογή Γλώσσας",
272 'accountPreferencesLanguageDescriptionConfig': [ 269 'accountPreferencesLanguageDescriptionConfig': [
273 {tag:'p', html:"Choose your preferred language from the list below."} 270 {tag:'p', html:"Choose your preferred language from the list below."}
274 ], 271 ],
275 272
276 'accountPreferencesInterfaceTitle':"Interface customization", 273 'accountPreferencesInterfaceTitle':"Interface customization",
277 'accountPreferencesInterfaceDescriptionConfig': [ 274 'accountPreferencesInterfaceDescriptionConfig': [
278 {tag:'p', html:"Tune the Clipperz interface to your needs."} 275 {tag:'p', html:"Tune the Clipperz interface to your needs."}
279 ], 276 ],
280 277
281// Account panel - user preferences - form 278// Account panel - user preferences - form
282 'saveUserPreferencesFormSubmitLabel': "Αποθήκευση", 279 'saveUserPreferencesFormSubmitLabel': "Αποθήκευση",
283 'cancelUserPreferencesFormSubmitLabel': "Ακύρωση", 280 'cancelUserPreferencesFormSubmitLabel': "Ακύρωση",
284 281
285// Account panel - user preferences - panel 282// Account panel - user preferences - panel
286 'accountPreferencesSavingPanelTitle_Step1': "Saving preferences", 283 'accountPreferencesSavingPanelTitle_Step1': "Saving preferences",
287 'accountPreferencesSavingPanelText_Step1': "Local encryption of your preferences", 284 'accountPreferencesSavingPanelText_Step1': "Local encryption of your preferences",
288 'accountPreferencesSavingPanelTitle_Step2': "Saving preferences", 285 'accountPreferencesSavingPanelTitle_Step2': "Saving preferences",
289 'accountPreferencesSavingPanelText_Step2': "Sending encrypted preferences to Clipperz", 286 'accountPreferencesSavingPanelText_Step2': "Sending encrypted preferences to Clipperz",
290 287
291//----------------------------------------------------- 288//-----------------------------------------------------
292 //Account panel - delete account 289 //Account panel - delete account
293 'deleteAccountTabLabel': "Διαγράψτε τον λογαριασμό σας", 290 'deleteAccountTabLabel': "Διαγράψτε τον λογαριασμό σας",
294 'deleteAccountTabTitle':"Γίνεται διαγραφή του λογαριασμού σας", 291 'deleteAccountTabTitle':"Γίνεται διαγραφή του λογαριασμού σας",
295 292
296 //Account panel - delete account - form 293 //Account panel - delete account - form
297 'deleteAccountFormUsernameLabel': "όνομα χρήστη", 294 'deleteAccountFormUsernameLabel': "όνομα χρήστη",
298 'deleteAccountFormPassphraseLabel': "κωδική φράση", 295 'deleteAccountFormPassphraseLabel': "κωδική φράση",
299 'deleteAccountFormSafetyCheckboxLabel':"Κατανοώ πως όλα τα δεδομένα μου θα διαγραφούν και πως αυτή η πράξη είναι μη αναστρέψιμη.", 296 'deleteAccountFormSafetyCheckboxLabel':"Κατανοώ πως όλα τα δεδομένα μου θα διαγραφούν και πως αυτή η πράξη είναι μη αναστρέψιμη.",
300 'deleteAccountFormSubmitLabel': "Διαγράψτε τον λογαριασμό μου", 297 'deleteAccountFormSubmitLabel': "Διαγράψτε τον λογαριασμό μου",
301 298
302 //Account panel - delete account - warnings 299 //Account panel - delete account - warnings
303 'deleteAccountFormWrongUsernameWarning':"λάθος όνομα χρήστη", 300 'deleteAccountFormWrongUsernameWarning':"λάθος όνομα χρήστη",
304 'deleteAccountFormWrongPassphraseWarning':"λάθος κωδική φράση", 301 'deleteAccountFormWrongPassphraseWarning':"λάθος κωδική φράση",
305 'deleteAccountFormSafetyCheckWarning': "Παρακαλώ διαβάστε και επιλέξτε την παρακάτω επιλογή.", 302 'deleteAccountFormSafetyCheckWarning': "Παρακαλώ διαβάστε και επιλέξτε την παρακάτω επιλογή.",
306 303
307 //Account panel - delete account - confirmation 304 //Account panel - delete account - confirmation
308 'accountPanelDeletingAccountPanelConfirmationTitle':"ΠΡΟΣΟΧΗ", 305 'accountPanelDeletingAccountPanelConfirmationTitle':"ΠΡΟΣΟΧΗ",
309 'accountPanelDeleteAccountPanelConfirmationText': "Είστε σίγουρος/η ότι θέλετε να διαγράψετε αυτόν τον λογαριασμό?", 306 'accountPanelDeleteAccountPanelConfirmationText': "Είστε σίγουρος/η ότι θέλετε να διαγράψετε αυτόν τον λογαριασμό?",
310 'accountPanelDeleteAccountPanelConfirmButtonLabel': "Ναι", 307 'accountPanelDeleteAccountPanelConfirmButtonLabel': "Ναι",
311 'accountPanelDeleteAccountPanelDenyButtonLabel': "Όχι", 308 'accountPanelDeleteAccountPanelDenyButtonLabel': "Όχι",
312 309
313//----------------------------------------------------- 310//-----------------------------------------------------
314 //Data panel - offline copy 311 //Data panel - offline copy
315 'offlineCopyTabLabel':"Offline copy", 312 'offlineCopyTabLabel':"Offline copy",
316 'offlineCopyTabTitle':"Offline copy", 313 'offlineCopyTabTitle':"Offline copy",
317 314
318 // Data panel - offline copy - description 315 // Data panel - offline copy - description
319 'offlineCopyTabDescriptionConfig': [ 316 'offlineCopyTabDescriptionConfig': [
320 {tag:'p', html:"With just one click you can dump all your encrypted data from Clipperz servers to your hard disk and create a read-only offline version of Clipperz to be used when you are not connected to the Internet."}, 317 {tag:'p', html:"With just one click you can dump all your encrypted data from Clipperz servers to your hard disk and create a read-only offline version of Clipperz to be used when you are not connected to the Internet."},
321 {tag:'p', html:"The read-only version is as secure as the read-and-write one and will not expose your data to higher risks since they both share the same code and security architecture."}, 318 {tag:'p', html:"The read-only version is as secure as the read-and-write one and will not expose your data to higher risks since they both share the same code and security architecture."},
322 {tag:'ol', children:[ 319 {tag:'ol', children:[
323 {tag:'li', children:[{tag:'span', html:"Click the link below to download the offline copy."}]}, 320 {tag:'li', children:[{tag:'span', html:"Click the link below to download the offline copy."}]},
324 {tag:'li', children:[{tag:'span', html:"The browser will ask you what to do with the “Clipperz_YYYYMMDD.zip” file. Save it on your hard disk."}]}, 321 {tag:'li', children:[{tag:'span', html:"The browser will ask you what to do with the “Clipperz_YYYYMMDD.zip” file. Save it on your hard disk."}]},
325 {tag:'li', children:[{tag:'span', html:"Unzip the file to reveal the “Clipperz_YYYYMMDD” folder."}]}, 322 {tag:'li', children:[{tag:'span', html:"Unzip the file to reveal the “Clipperz_YYYYMMDD” folder."}]},
326 {tag:'li', children:[{tag:'span', html:"Open the “Clipperz_YYYYMMDD” folder and double click on the “index.html” file."}]}, 323 {tag:'li', children:[{tag:'span', html:"Open the “Clipperz_YYYYMMDD” folder and double click on the “index.html” file."}]},
327 {tag:'li', children:[{tag:'span', html:"Enter the usual username and passphrase and access your private data without an Internet connection."}]} 324 {tag:'li', children:[{tag:'span', html:"Enter the usual username and passphrase and access your private data without an Internet connection."}]}
328 ]} 325 ]}
329 ], 326 ],
330 'offlineCopyDownloadLinkLabel':"Download", 327 'offlineCopyDownloadLinkLabel':"Download",
331 328
332//----------------------------------------------------- 329//-----------------------------------------------------
333 //Data panel - sharing 330 //Data panel - sharing
334 'sharingTabLabel':"Sharing", 331 'sharingTabLabel':"Sharing",
335 'sharingTabTitle':"Sharing", 332 'sharingTabTitle':"Sharing",
336 333
337 //Data panel - sharing - description 334 //Data panel - sharing - description
338 'sharingTabDescriptionConfig':[ 335 'sharingTabDescriptionConfig':[
339 {tag:'p', html:"Quite often a confidential piece of information needs to be shared with one or more persons."}, 336 {tag:'p', html:"Quite often a confidential piece of information needs to be shared with one or more persons."},
340 {tag:'p', html:"This could be as simple as giving your colleague the access code of your voice mailbox when you are out of the office, or as complicated as enabling the entitled heirs to access your safe deposit box at the local bank when you pass on."}, 337 {tag:'p', html:"This could be as simple as giving your colleague the access code of your voice mailbox when you are out of the office, or as complicated as enabling the entitled heirs to access your safe deposit box at the local bank when you pass on."},
341 {tag:'p', html:"Clipperz can make sharing your secrets a secure and straightforward process."}, 338 {tag:'p', html:"Clipperz can make sharing your secrets a secure and straightforward process."},
342 {tag:'p', html:""}, 339 {tag:'p', html:""},
343 {tag:'p', html:"<b>Coming soon ...</b>"} 340 {tag:'p', html:"<b>Coming soon ...</b>"}
344 ], 341 ],
345 342
346//----------------------------------------------------- 343//-----------------------------------------------------
347 // Data panel - import 344 // Data panel - import
348 'importTabLabel':"Εισαγωγή", 345 'importTabLabel':"Εισαγωγή",
349 'importTabTitle':"Εισαγωγή", 346 'importTabTitle':"Εισαγωγή",
350 347
351 // Data panel - import - description 348 // Data panel - import - description
352 'importTabDescriptionConfig':[ 349 'importTabDescriptionConfig':[
353 {tag:'p', html:"<b>Σύντομα κοντά σας ...</b>"} 350 {tag:'p', html:"<b>Σύντομα κοντά σας ...</b>"}
354 ], 351 ],
355 352
356//----------------------------------------------------- 353//-----------------------------------------------------
357 //Data panel - export 354 //Data panel - export
358 'printingTabLabel':"Εξαγωγή", 355 'printingTabLabel':"Εξαγωγή",
359 'printingTabTitle':"Εξαγωγή", 356 'printingTabTitle':"Εξαγωγή",
360 357
361 //Data panel - export - description “” 358 //Data panel - export - description “”
362 'printingTabDescriptionConfig':[ 359 'printingTabDescriptionConfig':[
363 {tag:'p', html:"<b>Print your data</b>"}, 360 {tag:'p', html:"<b>Print your data</b>"},
364 {tag:'p', html:"Clicking on the link below will open a new window displaying all your cards in a printable format."}, 361 {tag:'p', html:"Clicking on the link below will open a new window displaying all your cards in a printable format."},
365 {tag:'p', html:"If you are going to print for backup purposes, please consider the more safe option provided by the creating an “offline copy”."} 362 {tag:'p', html:"If you are going to print for backup purposes, please consider the more safe option provided by the creating an “offline copy”."}
366 ], 363 ],
367 'printingLinkLabel':"Έκδοση Εκτύπωσης", 364 'printingLinkLabel':"Έκδοση Εκτύπωσης",
368 365
369//------------------------------------------------------------------- 366//-------------------------------------------------------------------
370 //Contacts panel 367 //Contacts panel
371 'contactsTabLabel':"Contacts", 368 'contactsTabLabel':"Contacts",
372 'contactsTabTitle':"Contacts", 369 'contactsTabTitle':"Contacts",
373 370
374//------------------------------------------------------------------- 371//-------------------------------------------------------------------
375 //Bookmarklet panel 372 //Bookmarklet panel
376 'bookmarkletTabLabel': "Bookmarklet", 373 'bookmarkletTabLabel': "Bookmarklet",
377 'bookmarkletTabTitle': "Bookmarklet", 374 'bookmarkletTabTitle': "Bookmarklet",
378 375
379 //Bookmarklet panel - description 376 //Bookmarklet panel - description
380 'bookmarkletTabDescriptionConfig':[ 377 'bookmarkletTabDescriptionConfig':[
381 {tag:'p', html:"A bookmarklet is a simple “one-click” tool that can perform very useful tasks. It can be saved and used like a normal web page bookmark."}, 378 {tag:'p', html:"A bookmarklet is a simple “one-click” tool that can perform very useful tasks. It can be saved and used like a normal web page bookmark."},
382 {tag:'p', html:"The Clipperz bookmarklet will help you to quickly create new cards and new “direct logins” within existing cards."}, 379 {tag:'p', html:"The Clipperz bookmarklet will help you to quickly create new cards and new “direct logins” within existing cards."},
383 {tag:'p', html:"<b>Please note that the bookmarklet does not include any information related to your account (e.g. your username or passphrase), the bookmarklet is a general tool containing the same code for every Clipperz user.</b>"}, 380 {tag:'p', html:"<b>Please note that the bookmarklet does not include any information related to your account (e.g. your username or passphrase), the bookmarklet is a general tool containing the same code for every Clipperz user.</b>"},
384 {tag:'div', children:[ 381 {tag:'div', children:[
385 {tag:'p', html:"To install the bookmarklet <b>drag</b> the link below to the bookmark bar of your browser."} 382 {tag:'p', html:"To install the bookmarklet <b>drag</b> the link below to the bookmark bar of your browser."}
386 ]} 383 ]}
387 ], 384 ],
388 'bookmarkletTabBookmarkletTitle':"Προσθήκη στο Clipperz", 385 'bookmarkletTabBookmarkletTitle':"Προσθήκη στο Clipperz",
389 386
390 //Bookmarklet panel - instructions 387 //Bookmarklet panel - instructions
391 'bookmarkletTabInstructionsConfig':[ 388 'bookmarkletTabInstructionsConfig':[
392 {tag:'h3', html:"How to create a new card inclusive of a “direct login” link to an online service"}, 389 {tag:'h3', html:"How to create a new card inclusive of a “direct login” link to an online service"},
393 {tag:'ol', children:[ 390 {tag:'ol', children:[
394 {tag:'li', children:[{tag:'span', html:"Open the web page where the login form is hosted. (this is the page where you usually enter your sign-in credentials)"}]}, 391 {tag:'li', children:[{tag:'span', html:"Open the web page where the login form is hosted. (this is the page where you usually enter your sign-in credentials)"}]},
395 {tag:'li', children:[{tag:'span', html:"Launch the bookmarklet by clicking on it: a pop-up window will appear over the web page."}]}, 392 {tag:'li', children:[{tag:'span', html:"Launch the bookmarklet by clicking on it: a pop-up window will appear over the web page."}]},
396 {tag:'li', children:[{tag:'span', html:"Copy to the clipboard the content of the large text area within the pop-up. (ctrl-C)"}]}, 393 {tag:'li', children:[{tag:'span', html:"Copy to the clipboard the content of the large text area within the pop-up. (ctrl-C)"}]},
397 {tag:'li', children:[{tag:'span', html:"Enter your Clipperz account and click on the <b>Add new card</b> button."}]}, 394 {tag:'li', children:[{tag:'span', html:"Enter your Clipperz account and click on the <b>Add new card</b> button."}]},
398 {tag:'li', children:[{tag:'span', html:"Select the “Direct login” template and paste the content of the clipboard to the large text area in the form. (ctrl-V)"}]}, 395 {tag:'li', children:[{tag:'span', html:"Select the “Direct login” template and paste the content of the clipboard to the large text area in the form. (ctrl-V)"}]},
399 {tag:'li', children:[{tag:'span', html:"Press the <b>Create</b> button, complete and review the details, then click <b>Save</b>."}]} 396 {tag:'li', children:[{tag:'span', html:"Press the <b>Create</b> button, complete and review the details, then click <b>Save</b>."}]}
400 ]}, 397 ]},
401 {tag:'h3', html:"How to add a “direct login” link to an existing card"}, 398 {tag:'h3', html:"How to add a “direct login” link to an existing card"},
402 {tag:'ol', children:[ 399 {tag:'ol', children:[
403 {tag:'li', children:[{tag:'span', html:"Same as above."}]}, 400 {tag:'li', children:[{tag:'span', html:"Same as above."}]},
404 {tag:'li', children:[{tag:'span', html:"Same as above."}]}, 401 {tag:'li', children:[{tag:'span', html:"Same as above."}]},
405 {tag:'li', children:[{tag:'span', html:"Same as above."}]}, 402 {tag:'li', children:[{tag:'span', html:"Same as above."}]},
406 {tag:'li', children:[{tag:'span', html:"Enter your Clipperz account and select the card containing the credentials for the web service you just visited and click the <b>Edit</b> button."}]}, 403 {tag:'li', children:[{tag:'span', html:"Enter your Clipperz account and select the card containing the credentials for the web service you just visited and click the <b>Edit</b> button."}]},
407 {tag:'li', children:[{tag:'span', html:"Paste the content of the clipboard to the large text area in the “Direct logins” section. (ctrl-V)"}]}, 404 {tag:'li', children:[{tag:'span', html:"Paste the content of the clipboard to the large text area in the “Direct logins” section. (ctrl-V)"}]},
408 {tag:'li', children:[{tag:'span', html:"Press the <b>Add direct login</b> button, review the details and then click <b>Save</b>."}]} 405 {tag:'li', children:[{tag:'span', html:"Press the <b>Add direct login</b> button, review the details and then click <b>Save</b>."}]}
diff --git a/frontend/beta/js/Clipperz/PM/Strings/Strings_en-CA.js b/frontend/beta/js/Clipperz/PM/Strings/Strings_en-CA.js
index 50fa7e5..6879c60 100644
--- a/frontend/beta/js/Clipperz/PM/Strings/Strings_en-CA.js
+++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_en-CA.js
@@ -1,43 +1,40 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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//============================================================================= 26//=============================================================================
30// 27//
31 // E N G L I S H C A N A D I A N ( en_CA ) 28 // E N G L I S H C A N A D I A N ( en_CA )
32// 29//
33//============================================================================= 30//=============================================================================
34 31
35Clipperz.PM.Strings.Languages['en-ca'] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 32Clipperz.PM.Strings.Languages['en-ca'] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], {
36 33
37 // 'forumHeaderLinkLabel': "forum-CA", 34 // 'forumHeaderLinkLabel': "forum-CA",
38 35
39 // 'recordMenuLabel': "cards-CA", 36 // 'recordMenuLabel': "cards-CA",
40 37
41 //------------------------------------------------------------------------- 38 //-------------------------------------------------------------------------
42 __syntaxFix__: "syntax fix" 39 __syntaxFix__: "syntax fix"
43}); \ No newline at end of file 40}); \ No newline at end of file
diff --git a/frontend/beta/js/Clipperz/PM/Strings/Strings_en-GB.js b/frontend/beta/js/Clipperz/PM/Strings/Strings_en-GB.js
index ea55650..f734c8e 100644
--- a/frontend/beta/js/Clipperz/PM/Strings/Strings_en-GB.js
+++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_en-GB.js
@@ -1,43 +1,40 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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//============================================================================= 26//=============================================================================
30// 27//
31 // E N G L I S H B R I T I S H ( en_GB ) 28 // E N G L I S H B R I T I S H ( en_GB )
32// 29//
33//============================================================================= 30//=============================================================================
34 31
35Clipperz.PM.Strings.Languages['en-gb'] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 32Clipperz.PM.Strings.Languages['en-gb'] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], {
36 33
37 // 'forumHeaderLinkLabel': "forum-GB", 34 // 'forumHeaderLinkLabel': "forum-GB",
38 35
39 // 'recordMenuLabel': "cards-GB", 36 // 'recordMenuLabel': "cards-GB",
40 37
41 //------------------------------------------------------------------------- 38 //-------------------------------------------------------------------------
42 __syntaxFix__: "syntax fix" 39 __syntaxFix__: "syntax fix"
43}); \ No newline at end of file 40}); \ No newline at end of file
diff --git a/frontend/beta/js/Clipperz/PM/Strings/Strings_en-US.js b/frontend/beta/js/Clipperz/PM/Strings/Strings_en-US.js
index c0dd6d0..9fa95e9 100644
--- a/frontend/beta/js/Clipperz/PM/Strings/Strings_en-US.js
+++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_en-US.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31if (typeof(Clipperz.PM.Strings) == 'undefined') { Clipperz.PM.Strings = {}; } 28if (typeof(Clipperz.PM.Strings) == 'undefined') { Clipperz.PM.Strings = {}; }
32if (typeof(Clipperz.PM.Strings.Languages) == 'undefined') { Clipperz.PM.Strings.Languages = {}; } 29if (typeof(Clipperz.PM.Strings.Languages) == 'undefined') { Clipperz.PM.Strings.Languages = {}; }
33 30
34//============================================================================= 31//=============================================================================
35// 32//
36 // E N G L I S H A M E R I C A N ( en_US ) 33 // E N G L I S H A M E R I C A N ( en_US )
37// 34//
38//============================================================================= 35//=============================================================================
39 36
40Clipperz.PM.Strings.Languages['en-us'] = { 37Clipperz.PM.Strings.Languages['en-us'] = {
41 38
42 //Login page - description 39 //Login page - description
43'clipperzServiceDescription': "\ 40'clipperzServiceDescription': "\
44 <!-- FIX CSS DONE -->\ 41 <!-- FIX CSS DONE -->\
45 <h2>Keep it to yourself!</h2>\ 42 <h2>Keep it to yourself!</h2>\
46 <ul>\ 43 <ul>\
47 <li>\ 44 <li>\
48 <h3>Clipperz is:</h3>\ 45 <h3>Clipperz is:</h3>\
49 <ul>\ 46 <ul>\
50 <li><p>a secure and simple password manager</p></li>\ 47 <li><p>a secure and simple password manager</p></li>\
51 <li><p>an effective single sign-on solution</p></li>\ 48 <li><p>an effective single sign-on solution</p></li>\
52 <li><p>a digital vault for your personal data</p></li>\ 49 <li><p>a digital vault for your personal data</p></li>\
53 </ul>\ 50 </ul>\
54 </li>\ 51 </li>\
55 <li>\ 52 <li>\
56 <h3>With Clipperz you can:</h3>\ 53 <h3>With Clipperz you can:</h3>\
57 <ul>\ 54 <ul>\
58 <li><p>store and manage your passwords and online credentials</p></li>\ 55 <li><p>store and manage your passwords and online credentials</p></li>\
59 <li><p>login to your web services without entering any username or password</p></li>\ 56 <li><p>login to your web services without entering any username or password</p></li>\
60 <li><p>protect all your sensitive data: codes for burglar alarms, PINs, credit card numbers, …</p></li>\ 57 <li><p>protect all your sensitive data: codes for burglar alarms, PINs, credit card numbers, …</p></li>\
61 <li><p>share secrets with family members and associates (coming soon)</p></li>\ 58 <li><p>share secrets with family members and associates (coming soon)</p></li>\
62 </ul>\ 59 </ul>\
63 </li>\ 60 </li>\
64 <li>\ 61 <li>\
65 <h3>Clipperz benefits:</h3>\ 62 <h3>Clipperz benefits:</h3>\
66 <ul>\ 63 <ul>\
67 <li><p>free and completely anonymous</p></li>\ 64 <li><p>free and completely anonymous</p></li>\
68 <li><p>access it any time from any computer</p></li>\ 65 <li><p>access it any time from any computer</p></li>\
69 <li><p>no software to download and nothing to install</p></li>\ 66 <li><p>no software to download and nothing to install</p></li>\
70 <li><p>avoid keeping secrets on your PC or on paper</p></li>\ 67 <li><p>avoid keeping secrets on your PC or on paper</p></li>\
71 </ul>\ 68 </ul>\
72 </li>\ 69 </li>\
73 <li>\ 70 <li>\
74 <h3>Clipperz security:</h3>\ 71 <h3>Clipperz security:</h3>\
75 <ul>\ 72 <ul>\
76 <li><p>your secrets are locally encrypted by your browser before being uploaded to Clipperz</p></li>\ 73 <li><p>your secrets are locally encrypted by your browser before being uploaded to Clipperz</p></li>\
77 <li><p>the encryption key is a passphrase known only to you</p></li>\ 74 <li><p>the encryption key is a passphrase known only to you</p></li>\
78 <li><p>Clipperz hosts your sensitive data in encrypted form and could never actually access the data in its plain form</p></li>\ 75 <li><p>Clipperz hosts your sensitive data in encrypted form and could never actually access the data in its plain form</p></li>\
79 <li><p>Clipperz is built upon standard encryption schemes, nothing fancies or homemade</p></li>\ 76 <li><p>Clipperz is built upon standard encryption schemes, nothing fancies or homemade</p></li>\
80 <li><p>you can review the source code anytime you like, but you need to know nothing about cryptography to be an happy user!</p></li>\ 77 <li><p>you can review the source code anytime you like, but you need to know nothing about cryptography to be an happy user!</p></li>\
81 </ul>\ 78 </ul>\
82 </li>\ 79 </li>\
83 <li>\ 80 <li>\
84 <a href=\"http://www.clipperz.com\" target=\"_blank\">Learn more</a>\ 81 <a href=\"http://www.clipperz.com\" target=\"_blank\">Learn more</a>\
85 </li>\ 82 </li>\
86 </ul>", 83 </ul>",
87 84
88 85
89 'loginFormTitle': "login with your Clipperz account", 86 'loginFormTitle': "login with your Clipperz account",
90 'loginFormUsernameLabel': "username", 87 'loginFormUsernameLabel': "username",
91 'loginFormPassphraseLabel': "passphrase", 88 'loginFormPassphraseLabel': "passphrase",
92 'loginFormDontHaveAnAccountLabel': "don\'t have an account?", 89 'loginFormDontHaveAnAccountLabel': "don\'t have an account?",
93 'loginFormCreateOneLabel': "create one", 90 'loginFormCreateOneLabel': "create one",
94 'loginFormForgotYourCredentialsLabel': "forgot your credentials?", 91 'loginFormForgotYourCredentialsLabel': "forgot your credentials?",
95 'loginFormAarghThatsBadLabel': "aargh! that\'s bad!", 92 'loginFormAarghThatsBadLabel': "aargh! that\'s bad!",
96 'loginFormAfraidOfMaliciousScriptsLabel': "afraid of malicious scripts?", 93 'loginFormAfraidOfMaliciousScriptsLabel': "afraid of malicious scripts?",
97 'loginFormVerifyTheCodeLabel': "verify the code", 94 'loginFormVerifyTheCodeLabel': "verify the code",
98 'loginFormButtonLabel': "Login", 95 'loginFormButtonLabel': "Login",
99 'loginFormOneTimePasswordCheckboxLabel': "use a one-time passphrase", 96 'loginFormOneTimePasswordCheckboxLabel': "use a one-time passphrase",
100'loginFormOneTimePasswordCheckboxDescription': "", 97'loginFormOneTimePasswordCheckboxDescription': "",
101 98
102// Login page - language selection 99// Login page - language selection
103 'loginPanelSwithLanguageDescription': "<h5>Switch to your preferred language</h5>", 100 'loginPanelSwithLanguageDescription': "<h5>Switch to your preferred language</h5>",
104 101
105// Login page - browser compatibility 102// Login page - browser compatibility
106 'browserCompatibilityDescription': "<p>Have a better and safer Clipperz experience with Firefox. However Clipperz works just fine also with Opera, Safari and MS Internet Explorer!</p>", 103 'browserCompatibilityDescription': "<p>Have a better and safer Clipperz experience with Firefox. However Clipperz works just fine also with Opera, Safari and MS Internet Explorer!</p>",
107 104
108// Login with OTP - message panel 105// Login with OTP - message panel
109 'OTPloginMessagePanelInitialTitle': "Logging in using a one-time passphrase", 106 'OTPloginMessagePanelInitialTitle': "Logging in using a one-time passphrase",
110 'OTPloginMessagePanelInitialText': "Sending OTP credentials …", 107 'OTPloginMessagePanelInitialText': "Sending OTP credentials …",
111 'OTPloginMessagePanelLoadingTitle': "Logging in using a one-time passphrase", 108 'OTPloginMessagePanelLoadingTitle': "Logging in using a one-time passphrase",
112 'OTPloginMessagePanelLoadingText': "Fetching encrypted authentication data from the server …", 109 'OTPloginMessagePanelLoadingText': "Fetching encrypted authentication data from the server …",
113 'OTPloginMessagePanelProcessingTitle': "Logging in using a one-time passphrase", 110 'OTPloginMessagePanelProcessingTitle': "Logging in using a one-time passphrase",
114 'OTPloginMessagePanelProcessingText': "Local decryption of authentication data", 111 'OTPloginMessagePanelProcessingText': "Local decryption of authentication data",
115 112
116// Regular login - message panel 113// Regular login - message panel
117 'loginMessagePanelInitialTitle': "Logging in …", 114 'loginMessagePanelInitialTitle': "Logging in …",
118 'loginMessagePanelInitialText': "---", 115 'loginMessagePanelInitialText': "---",
119 'loginMessagePanelInitialButtonLabel': "Cancel", 116 'loginMessagePanelInitialButtonLabel': "Cancel",
120 'loginMessagePanelConnectedTitle': "Connected", 117 'loginMessagePanelConnectedTitle': "Connected",
121 'loginMessagePanelConnectedText': "Done", 118 'loginMessagePanelConnectedText': "Done",
122 'loginMessagePanelFailureTitle': "Error", 119 'loginMessagePanelFailureTitle': "Error",
123 'loginMessagePanelFailureText': "Login failed", 120 'loginMessagePanelFailureText': "Login failed",
124 'loginMessagePanelFailureButtonLabel': "Close", 121 'loginMessagePanelFailureButtonLabel': "Close",
125 122
126// Regular login - message panel - connection 123// Regular login - message panel - connection
127 'connectionLoginSendingCredentialsMessageTitle': "Verifying credentials", 124 'connectionLoginSendingCredentialsMessageTitle': "Verifying credentials",
128 'connectionLoginSendingCredentialsMessageText': "Sending credentials", 125 'connectionLoginSendingCredentialsMessageText': "Sending credentials",
129 'connectionLoginCredentialsVerificationMessageTitle':"Verifying credentials", 126 'connectionLoginCredentialsVerificationMessageTitle':"Verifying credentials",
130 'connectionLoginCredentialsVerificationMessageText':"Performing SRP authentication", 127 'connectionLoginCredentialsVerificationMessageText':"Performing SRP authentication",
131 'connectionLoginDoneMessageTitle': "Verifying credentials", 128 'connectionLoginDoneMessageTitle': "Verifying credentials",
132 'connectionLoginDoneMessageText': "Connected", 129 'connectionLoginDoneMessageText': "Connected",
133 130
134 //Regular login - message panel - user 131 //Regular login - message panel - user
135 'userLoginPanelUpgradingUserCredentialsMessageTitle': "Verifying credentials", 132 'userLoginPanelUpgradingUserCredentialsMessageTitle': "Verifying credentials",
136 'userLoginPanelUpgradingUserCredentialsMessageText': "Upgrading your credentials to a new authentication schema", 133 'userLoginPanelUpgradingUserCredentialsMessageText': "Upgrading your credentials to a new authentication schema",
137 'userLoginPanelConnectedMessageTitle': "User authenticated", 134 'userLoginPanelConnectedMessageTitle': "User authenticated",
138 'userLoginPanelConnectedMessageText': "Successfully logged in", 135 'userLoginPanelConnectedMessageText': "Successfully logged in",
139 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle': "Verifying credentials", 136 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle': "Verifying credentials",
140 'userLoginPanelTryingAnOlderConnectionSchemaMessageText': "Trying an older authentication schema", 137 'userLoginPanelTryingAnOlderConnectionSchemaMessageText': "Trying an older authentication schema",
141 'userLoginPanelLoadingUserDataMessageTitle': "User authenticated", 138 'userLoginPanelLoadingUserDataMessageTitle': "User authenticated",
142 'userLoginPanelLoadingUserDataMessageText': "Downloading encrypted card headers from Clipperz", 139 'userLoginPanelLoadingUserDataMessageText': "Downloading encrypted card headers from Clipperz",
143 'userLoginPanelDecryptingUserDataMessageTitle': "User authenticated", 140 'userLoginPanelDecryptingUserDataMessageTitle': "User authenticated",
144 'userLoginPanelDecryptingUserDataMessageText': "Local decryption of card headers", 141 'userLoginPanelDecryptingUserDataMessageText': "Local decryption of card headers",
145 'userLoginPanelDecryptingUserStatisticsMessageTitle': "User authenticated", 142 'userLoginPanelDecryptingUserStatisticsMessageTitle': "User authenticated",
146 'userLoginPanelDecryptingUserStatisticsMessageText': "Local decryption of usage statistics", 143 'userLoginPanelDecryptingUserStatisticsMessageText': "Local decryption of usage statistics",
147 144
148 //Registration page - splash alert 145 //Registration page - splash alert
149 'splashAlertTitle':"Welcome to Clipperz!", 146 'splashAlertTitle':"Welcome to Clipperz!",
150'splashAlertText': "\ 147'splashAlertText': "\
151 <!-- FIX CSS DONE! -->\ 148 <!-- FIX CSS DONE! -->\
152 <p>Some security advice</p>\ 149 <p>Some security advice</p>\
153 <ul>\ 150 <ul>\
154 <li><p>Storing your data at Clipperz is as secure as the passphrase you choose to protect them. Nobody can access them unless they know your passphrase.</p></li>\ 151 <li><p>Storing your data at Clipperz is as secure as the passphrase you choose to protect them. Nobody can access them unless they know your passphrase.</p></li>\
155 <li><p>If you are going to use Clipperz for safeguarding sensitive and critical information please make sure to use a strong passphrase. The longer the better!</p></li>\ 152 <li><p>If you are going to use Clipperz for safeguarding sensitive and critical information please make sure to use a strong passphrase. The longer the better!</p></li>\
156 <li><p>Clipperz will not be able to recover a lost passphrase!</p></li>\ 153 <li><p>Clipperz will not be able to recover a lost passphrase!</p></li>\
157 </ul>\ 154 </ul>\
158 <p>For any further information, please refer to <a href=\"http://www.clipperz.com\" target=\"_blank\">Clipperz</a> website.</p>", 155 <p>For any further information, please refer to <a href=\"http://www.clipperz.com\" target=\"_blank\">Clipperz</a> website.</p>",
159 'splashAlertCloseButtonLabel':"Ok", 156 'splashAlertCloseButtonLabel':"Ok",
160 157
161 // Registration page - form 158 // Registration page - form
162 'registrationFormTitle': "create your account", 159 'registrationFormTitle': "create your account",
163 'registrationFormUsernameLabel': "username", 160 'registrationFormUsernameLabel': "username",
164 'registrationFormPassphraseLabel': "passphrase", 161 'registrationFormPassphraseLabel': "passphrase",
165 'registrationFormRetypePassphraseLabel': "re-enter passphrase", 162 'registrationFormRetypePassphraseLabel': "re-enter passphrase",
166 'registrationFormSafetyCheckLabel': "I understand that Clipperz will not be able to recover a lost passphrase.", 163 'registrationFormSafetyCheckLabel': "I understand that Clipperz will not be able to recover a lost passphrase.",
167 'registrationFormTermsOfServiceCheckLabel': "I have read and agreed to the <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Terms of Service</a>.", 164 'registrationFormTermsOfServiceCheckLabel': "I have read and agreed to the <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Terms of Service</a>.",
168 'registrationFormDoYouAlreadyHaveAnAccountLabel': "do you already have an account?", 165 'registrationFormDoYouAlreadyHaveAnAccountLabel': "do you already have an account?",
169 'registrationFormSimplyLoginLabel': "simply login", 166 'registrationFormSimplyLoginLabel': "simply login",
170 'registrationFormButtonLabel': "Register", 167 'registrationFormButtonLabel': "Register",
171 168
172// Registration page - warning messages 169// Registration page - warning messages
173 'registrationFormWarningMessageNotMatchingPassphrases':"Your passphrases don't match, please re-type them.", 170 'registrationFormWarningMessageNotMatchingPassphrases':"Your passphrases don't match, please re-type them.",
174 'registrationFormWarningMessageSafetyCheckNotSelected':"Please read and check all the boxes below.", 171 'registrationFormWarningMessageSafetyCheckNotSelected':"Please read and check all the boxes below.",
175 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"You need to agree to the Terms of Service.", 172 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"You need to agree to the Terms of Service.",
176 173
177 // Registration page - message panel 174 // Registration page - message panel
178 'registrationMessagePanelInitialTitle': "Creating account …", 175 'registrationMessagePanelInitialTitle': "Creating account …",
179 'registrationMessagePanelInitialText': "---", 176 'registrationMessagePanelInitialText': "---",
180 'registrationMessagePanelInitialButtonLabel': "Cancel", 177 'registrationMessagePanelInitialButtonLabel': "Cancel",
181 'registrationMessagePanelRegistrationDoneTitle': "Registration", 178 'registrationMessagePanelRegistrationDoneTitle': "Registration",
182 'registrationMessagePanelRegistrationDoneText': "Done", 179 'registrationMessagePanelRegistrationDoneText': "Done",
183 'registrationMessagePanelFailureTitle': "Registration failed", 180 'registrationMessagePanelFailureTitle': "Registration failed",
184 'registrationMessagePanelFailureButtonLabel': "Close", 181 'registrationMessagePanelFailureButtonLabel': "Close",
185 182
186// Registration page - message panel - connection 183// Registration page - message panel - connection
187 'connectionRegistrationSendingRequestMessageText': "Verifying credentials", 184 'connectionRegistrationSendingRequestMessageText': "Verifying credentials",
188 'connectionRegistrationSendingCredentialsMessageText':"Sending credentials", 185 'connectionRegistrationSendingCredentialsMessageText':"Sending credentials",
189 186
190// Registration page - splash panel 187// Registration page - splash panel
191 'registrationSplashPanelTitle': "Security advice", 188 'registrationSplashPanelTitle': "Security advice",
192 'registrationSplashPanelDescription': "<p>These are your Clipperz credentials, take good care of them. Clipperz will never display your username and passphrase a second time!</p>", 189 'registrationSplashPanelDescription': "<p>These are your Clipperz credentials, take good care of them. Clipperz will never display your username and passphrase a second time!</p>",
193 'registrationSplashPanelUsernameLabel': "username", 190 'registrationSplashPanelUsernameLabel': "username",
194 'registrationSplashPanelPassphraseLabel':"passphrase", 191 'registrationSplashPanelPassphraseLabel':"passphrase",
195 192
196 'registrationSplashPanelShowPassphraseButtonLabel':"show passphrase", 193 'registrationSplashPanelShowPassphraseButtonLabel':"show passphrase",
197 194
198 //Header links 195 //Header links
199 'donateHeaderLinkLabel': "donate", 196 'donateHeaderLinkLabel': "donate",
200 'creditsHeaderLinkLabel': "credits", 197 'creditsHeaderLinkLabel': "credits",
201 'feedbackHeaderLinkLabel': "feedback", 198 'feedbackHeaderLinkLabel': "feedback",
202 'helpHeaderLinkLabel': "help", 199 'helpHeaderLinkLabel': "help",
203 'forumHeaderLinkLabel': "forum", 200 'forumHeaderLinkLabel': "forum",
204 201
205 //Menu labels 202 //Menu labels
206 'recordMenuLabel': "cards", 203 'recordMenuLabel': "cards",
207 'accountMenuLabel': "account", 204 'accountMenuLabel': "account",
208 'dataMenuLabel': "data", 205 'dataMenuLabel': "data",
209 'contactsMenuLabel': "contacts", 206 'contactsMenuLabel': "contacts",
210 'toolsMenuLabel': "tools", 207 'toolsMenuLabel': "tools",
211 'logoutMenuLabel': "logout", 208 'logoutMenuLabel': "logout",
212 'lockMenuLabel': "lock", 209 'lockMenuLabel': "lock",
213 210
214 //Lock dialog 211 //Lock dialog
215 'lockTitle': "The account is locked", 212 'lockTitle': "The account is locked",
216 'lockDescription': "<p>To unlock your account, please enter your passphrase.</p>", 213 'lockDescription': "<p>To unlock your account, please enter your passphrase.</p>",
217 'unlockButtonLabel': "Unlock", 214 'unlockButtonLabel': "Unlock",
218 215
219 //Account panel - change passphrase 216 //Account panel - change passphrase
220 'changePasswordTabLabel': "Change your passphrase", 217 'changePasswordTabLabel': "Change your passphrase",
221 'changePasswordTabTitle': "Change your passphrase", 218 'changePasswordTabTitle': "Change your passphrase",
222 219
223 'changePasswordFormUsernameLabel': "username", 220 'changePasswordFormUsernameLabel': "username",
224 'changePasswordFormOldPassphraseLabel': "old passphrase", 221 'changePasswordFormOldPassphraseLabel': "old passphrase",
225 'changePasswordFormNewPassphraseLabel': "new passphrase", 222 'changePasswordFormNewPassphraseLabel': "new passphrase",
226 'changePasswordFormRetypePassphraseLabel':"re-enter new passphrase", 223 'changePasswordFormRetypePassphraseLabel':"re-enter new passphrase",
227 'changePasswordFormSafetyCheckboxLabel':"I understand that Clipperz will not be able to recover a lost passphrase.", 224 'changePasswordFormSafetyCheckboxLabel':"I understand that Clipperz will not be able to recover a lost passphrase.",
228 'changePasswordFormSubmitLabel': "Change passphrase", 225 'changePasswordFormSubmitLabel': "Change passphrase",
229 226
230 //Account panel - change passphrase - warning messages 227 //Account panel - change passphrase - warning messages
231 'changePasswordFormWrongUsernameWarning': "Wrong username", 228 'changePasswordFormWrongUsernameWarning': "Wrong username",
232 'changePasswordFormWrongPassphraseWarning': "Wrong passphrase", 229 'changePasswordFormWrongPassphraseWarning': "Wrong passphrase",
233 'changePasswordFormWrongRetypePassphraseWarning':"Your passphrases don't match, please re-type them.", 230 'changePasswordFormWrongRetypePassphraseWarning':"Your passphrases don't match, please re-type them.",
234 'changePasswordFormSafetyCheckWarning': "Please read and check the box below.", 231 'changePasswordFormSafetyCheckWarning': "Please read and check the box below.",
235 232
236 //Account panel - change passphrase - progress dialog 233 //Account panel - change passphrase - progress dialog
237 'changePasswordFormProgressDialogTitle': "Changing user credentials", 234 'changePasswordFormProgressDialogTitle': "Changing user credentials",
238 'changePasswordFormProgressDialogEmptyText': "---", 235 'changePasswordFormProgressDialogEmptyText': "---",
239 'changePasswordFormProgressDialogConnectedMessageTitle': "Connected", 236 'changePasswordFormProgressDialogConnectedMessageTitle': "Connected",
240 'changePasswordFormProgressDialogConnectedMessageText': "Done", 237 'changePasswordFormProgressDialogConnectedMessageText': "Done",
241 'changePasswordFormProgressDialogErrorMessageTitle': "Error", 238 'changePasswordFormProgressDialogErrorMessageTitle': "Error",
242 'changePasswordFormProgressDialogErrorMessageText': "Credentials change failed!", 239 'changePasswordFormProgressDialogErrorMessageText': "Credentials change failed!",
243 240
244 'changeCredentialsPanelEncryptingDataMessageTitle': "Changing your passphrase", 241 'changeCredentialsPanelEncryptingDataMessageTitle': "Changing your passphrase",
245 'changeCredentialsPanelEncryptingDataMessageText': "Local encryption of card headers", 242 'changeCredentialsPanelEncryptingDataMessageText': "Local encryption of card headers",
246 'changeCredentialsPanelCreatingNewCredentialsMessageTitle': "Changing your passphrase", 243 'changeCredentialsPanelCreatingNewCredentialsMessageTitle': "Changing your passphrase",
247 'changeCredentialsPanelCreatingNewCredentialsMessageText': "Updating your credentials", 244 'changeCredentialsPanelCreatingNewCredentialsMessageText': "Updating your credentials",
248 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Changing your passphrase", 245 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Changing your passphrase",
249 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Uploading your encrypted credentials to Clipperz", 246 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Uploading your encrypted credentials to Clipperz",
250 'changeCredentialsPanelDoneMessageTitle': "Changing your passphrase", 247 'changeCredentialsPanelDoneMessageTitle': "Changing your passphrase",
251 'changeCredentialsPanelDoneMessageText': "Done", 248 'changeCredentialsPanelDoneMessageText': "Done",
252 249
253 //Account panel - OTP 250 //Account panel - OTP
254 'manageOTPTabLabel': "Manage your one-time passphrases", 251 'manageOTPTabLabel': "Manage your one-time passphrases",
255 'manageOTPTabTitle': "Manage your one-time passphrases", 252 'manageOTPTabTitle': "Manage your one-time passphrases",
256 253
257 'manageOTPTabDescription':"\ 254 'manageOTPTabDescription':"\
258 <p>A one-time passphrase works like your regular passphrase, but can be used only once.</p>\ 255 <p>A one-time passphrase works like your regular passphrase, but can be used only once.</p>\
259 <p>If the same passphrase is used again at a later stage in a login attempt it will be rejected and the login process will fail.</p>\ 256 <p>If the same passphrase is used again at a later stage in a login attempt it will be rejected and the login process will fail.</p>\
260 <p>Immediately after a successful login, your one-time passphrase will be deleted preventing any fraudulent access.</p>\ 257 <p>Immediately after a successful login, your one-time passphrase will be deleted preventing any fraudulent access.</p>\
261 <p>One-time passphrases are an excellent choice if one is concerned about keyloggers or spyware infections that may be collecting data from compromised machines.</p>\ 258 <p>One-time passphrases are an excellent choice if one is concerned about keyloggers or spyware infections that may be collecting data from compromised machines.</p>\
262 <p><b>It's strongly advisable to use one-time passphrases when accessing Clipperz from public terminals, such as Internet cafes and libraries.</b></p>", 259 <p><b>It's strongly advisable to use one-time passphrases when accessing Clipperz from public terminals, such as Internet cafes and libraries.</b></p>",
263 260
264 //Account panel - OTP - OTP table 261 //Account panel - OTP - OTP table
265'oneTimePasswordReadOnlyMessage': "\ 262'oneTimePasswordReadOnlyMessage': "\
266 <h6>Sorry!</h6>\ 263 <h6>Sorry!</h6>\
267 <p>You cannot manage your one-time passphrases when using the offline version of Clipperz.</p>", 264 <p>You cannot manage your one-time passphrases when using the offline version of Clipperz.</p>",
268 265
269 'oneTimePasswordLoadingMessage':"\ 266 'oneTimePasswordLoadingMessage':"\
270 <h6>Loading data</h6>\ 267 <h6>Loading data</h6>\
271 <p>Please wait …</p>", 268 <p>Please wait …</p>",
272 269
273 'oneTimePasswordNoPasswordAvailable':"\ 270 'oneTimePasswordNoPasswordAvailable':"\
274 <h6>No one-time passphrase available</h6>\ 271 <h6>No one-time passphrase available</h6>\
275 <p>Click the “New” button above to add one-time passphrases to your account.</p>", 272 <p>Click the “New” button above to add one-time passphrases to your account.</p>",
276 273
277 'createNewOTPButtonLabel': "New", 274 'createNewOTPButtonLabel': "New",
278 'deleteOTPButtonLabel': "Delete", 275 'deleteOTPButtonLabel': "Delete",
279 'printOTPButtonLabel': "Print", 276 'printOTPButtonLabel': "Print",
280 277
281 'disabledOneTimePassword_warning': "disabled", 278 'disabledOneTimePassword_warning': "disabled",
282 279
283 'oneTimePasswordSelectionLink_selectLabel':"Select:", 280 'oneTimePasswordSelectionLink_selectLabel':"Select:",
284 'oneTimePasswordSelectionLink_all': "all", 281 'oneTimePasswordSelectionLink_all': "all",
285 'oneTimePasswordSelectionLink_none': "none", 282 'oneTimePasswordSelectionLink_none': "none",
286 'oneTimePasswordSelectionLink_used': "used", 283 'oneTimePasswordSelectionLink_used': "used",
287 'oneTimePasswordSelectionLink_unused': "unused", 284 'oneTimePasswordSelectionLink_unused': "unused",
288 285
289//Account panel - OTP - saving new OTP dialog 286//Account panel - OTP - saving new OTP dialog
290 'saveOTP_encryptUserDataTitle': "Saving one-time passphrase", 287 'saveOTP_encryptUserDataTitle': "Saving one-time passphrase",
291 'saveOTP_encryptUserDataText': "Processing new OTP credentials …", 288 'saveOTP_encryptUserDataText': "Processing new OTP credentials …",
292 'saveOTP_encryptOTPDataTitle': "Saving one-time passphrase", 289 'saveOTP_encryptOTPDataTitle': "Saving one-time passphrase",
293 'saveOTP_encryptOTPDataText': "Local encryption of authentication data …", 290 'saveOTP_encryptOTPDataText': "Local encryption of authentication data …",
294 'saveOTP_sendingDataTitle': "Saving one-time passphrase", 291 'saveOTP_sendingDataTitle': "Saving one-time passphrase",
295 'saveOTP_sendingDataText': "Sending authentication data to the server …", 292 'saveOTP_sendingDataText': "Sending authentication data to the server …",
296 'saveOTP_updatingInterfaceTitle': "Saving one-time passphrase", 293 'saveOTP_updatingInterfaceTitle': "Saving one-time passphrase",
297 'saveOTP_updatingInterfaceText': "Updating interface", 294 'saveOTP_updatingInterfaceText': "Updating interface",
298 295
299// Account panel - preferences 296// Account panel - preferences
300 'accountPreferencesLabel': "Preferences", 297 'accountPreferencesLabel': "Preferences",
301 'accountPreferencesTabTitle': "Preferences", 298 'accountPreferencesTabTitle': "Preferences",
302 299
303 'accountPreferencesLanguageTitle': "Language", 300 'accountPreferencesLanguageTitle': "Language",
304 'accountPreferencesLanguageDescription':"<p>Choose your preferred language from the list below.</p>", 301 'accountPreferencesLanguageDescription':"<p>Choose your preferred language from the list below.</p>",
305 302
306 'showDonationReminderPanelTitle': "Donation reminders", 303 'showDonationReminderPanelTitle': "Donation reminders",
307 'showDonationReminderPanelDescription': "<p>Show donation reminders</p>", 304 'showDonationReminderPanelDescription': "<p>Show donation reminders</p>",
308 305
309 'saveUserPreferencesFormSubmitLabel': "Save", 306 'saveUserPreferencesFormSubmitLabel': "Save",
310 'cancelUserPreferencesFormSubmitLabel': "Cancel", 307 'cancelUserPreferencesFormSubmitLabel': "Cancel",
311 308
312// Account panel - preferences - saving dialog 309// Account panel - preferences - saving dialog
313 'accountPreferencesSavingPanelTitle_Step1': "Saving preferences", 310 'accountPreferencesSavingPanelTitle_Step1': "Saving preferences",
314 'accountPreferencesSavingPanelText_Step1': "Local encryption of your preferences", 311 'accountPreferencesSavingPanelText_Step1': "Local encryption of your preferences",
315 'accountPreferencesSavingPanelTitle_Step2': "Saving preferences", 312 'accountPreferencesSavingPanelTitle_Step2': "Saving preferences",
316 'accountPreferencesSavingPanelText_Step2': "Sending encrypted preferences to Clipperz", 313 'accountPreferencesSavingPanelText_Step2': "Sending encrypted preferences to Clipperz",
317 314
318 //Account panel - login history 315 //Account panel - login history
319 'accountLoginHistoryLabel': "Login history", 316 'accountLoginHistoryLabel': "Login history",
320 'loginHistoryTabTitle': "Login history", 317 'loginHistoryTabTitle': "Login history",
321 318
322 'loginHistoryReadOnlyMessage': "\ 319 'loginHistoryReadOnlyMessage': "\
323 <h6>Sorry!</h6>\ 320 <h6>Sorry!</h6>\
324 <p>The login history is not available while using the offline version of Clipperz.</p>", 321 <p>The login history is not available while using the offline version of Clipperz.</p>",
325 322
326 'loginHistoryLoadingMessage': "\ 323 'loginHistoryLoadingMessage': "\
327 <h6>Loading data</h6>\ 324 <h6>Loading data</h6>\
328 <p>Please wait …</p>", 325 <p>Please wait …</p>",
329 326
330 'loginHistoryLoadedMessage': "\ 327 'loginHistoryLoadedMessage': "\
331 <h6>Your latest 10 logins</h6>\ 328 <h6>Your latest 10 logins</h6>\
332 <p></p>", 329 <p></p>",
333 330
334 'loginHistoryIPLabel': "IP", 331 'loginHistoryIPLabel': "IP",
335 'loginHistoryTimeLabel': "date", 332 'loginHistoryTimeLabel': "date",
336 'loginHistoryCurrentSessionText': "current session", 333 'loginHistoryCurrentSessionText': "current session",
337 'loginHistoryReloadButtonLabel': "Reload login history", 334 'loginHistoryReloadButtonLabel': "Reload login history",
338 335
339 //Account panel - delete account 336 //Account panel - delete account
340 'deleteAccountTabLabel': "Delete your account", 337 'deleteAccountTabLabel': "Delete your account",
341 'deleteAccountTabTitle': "Delete your account", 338 'deleteAccountTabTitle': "Delete your account",
342 339
343 'deleteAccountFormUsernameLabel': "username", 340 'deleteAccountFormUsernameLabel': "username",
344 'deleteAccountFormPassphraseLabel': "passphrase", 341 'deleteAccountFormPassphraseLabel': "passphrase",
345 'deleteAccountFormSafetyCheckboxLabel': "I understand that all my data will be deleted and that this action is irreversible.", 342 'deleteAccountFormSafetyCheckboxLabel': "I understand that all my data will be deleted and that this action is irreversible.",
346 'deleteAccountFormSubmitLabel': "Delete my account", 343 'deleteAccountFormSubmitLabel': "Delete my account",
347 344
348//Account panel - delete account - warnings 345//Account panel - delete account - warnings
349 'deleteAccountFormWrongUsernameWarning':"Wrong username", 346 'deleteAccountFormWrongUsernameWarning':"Wrong username",
350 'deleteAccountFormWrongPassphraseWarning':"Wrong passphrase", 347 'deleteAccountFormWrongPassphraseWarning':"Wrong passphrase",
351 'deleteAccountFormSafetyCheckWarning': "Please read and check the box below.", 348 'deleteAccountFormSafetyCheckWarning': "Please read and check the box below.",
352 349
353//Account panel - delete account - confirmation 350//Account panel - delete account - confirmation
354 'accountPanelDeletingAccountPanelConfirmationTitle':"ATTENTION", 351 'accountPanelDeletingAccountPanelConfirmationTitle':"ATTENTION",
355 'accountPanelDeleteAccountPanelConfirmationText': "Are your sure you want to delete your account?", 352 'accountPanelDeleteAccountPanelConfirmationText': "Are your sure you want to delete your account?",
356 'accountPanelDeleteAccountPanelConfirmButtonLabel': "Yes", 353 'accountPanelDeleteAccountPanelConfirmButtonLabel': "Yes",
357 'accountPanelDeleteAccountPanelDenyButtonLabel': "No", 354 'accountPanelDeleteAccountPanelDenyButtonLabel': "No",
358 355
359//Account panel - delete account - confirmation 356//Account panel - delete account - confirmation
360 'accountPanelDeletingAccountPanelProgressTitle': "Deleting the account data", 357 'accountPanelDeletingAccountPanelProgressTitle': "Deleting the account data",
361 'accountPanelDeletingAccountPanelProgressText': "The operation could take long, please be patient.", 358 'accountPanelDeletingAccountPanelProgressText': "The operation could take long, please be patient.",
362 359
363//Data panel - offline copy 360//Data panel - offline copy
364 'offlineCopyTabLabel': "Offline copy", 361 'offlineCopyTabLabel': "Offline copy",
365 'offlineCopyTabTitle': "Offline copy", 362 'offlineCopyTabTitle': "Offline copy",
366 363
367'offlineCopyTabDescription': "\ 364'offlineCopyTabDescription': "\
368 <!-- FIX CSS DONE! -->\ 365 <!-- FIX CSS DONE! -->\
369 <p>With just one click you can dump all your encrypted data from Clipperz servers to your hard disk and create a read-only offline version of Clipperz to be used when you are not connected to the Internet.</p>\ 366 <p>With just one click you can dump all your encrypted data from Clipperz servers to your hard disk and create a read-only offline version of Clipperz to be used when you are not connected to the Internet.</p>\
370 <p>The read-only version is as secure as the read-and-write one and will not expose your data to higher risks since they both share the same code and security architecture.</p>\ 367 <p>The read-only version is as secure as the read-and-write one and will not expose your data to higher risks since they both share the same code and security architecture.</p>\
371 <ol>\ 368 <ol>\
372 <li><p>Click the link below to start the download.</p></li>\ 369 <li><p>Click the link below to start the download.</p></li>\
373 <li><p>The browser will ask you what to do with the “Clipperz_YYYYMMDD.html” file. Save it on your hard disk.</p></li>\ 370 <li><p>The browser will ask you what to do with the “Clipperz_YYYYMMDD.html” file. Save it on your hard disk.</p></li>\
374 <li><p>Double click on the downloaded file to launch the offline version in your browser.</p></li>\ 371 <li><p>Double click on the downloaded file to launch the offline version in your browser.</p></li>\
375 <li><p>Enter the usual username and passphrase.</p></li>\ 372 <li><p>Enter the usual username and passphrase.</p></li>\
376 </ol>", 373 </ol>",
377 374
378 'offlineCopyDownloadLinkLabel': "Download", 375 'offlineCopyDownloadLinkLabel': "Download",
379 376
380 //Data panel - offline copy - not updated 377 //Data panel - offline copy - not updated
381 'offlineCopyDownloadWarning': "\ 378 'offlineCopyDownloadWarning': "\
382 <!-- FIX CSS DONE! -->\ 379 <!-- FIX CSS DONE! -->\
383 <h4><a href=\"#\" id=\"offlineCopyDownloadWarningLink\">Update your “offline copy”!</a></h4>\ 380 <h4><a href=\"#\" id=\"offlineCopyDownloadWarningLink\">Update your “offline copy”!</a></h4>\
384 <p>You have recently created or modified one or more cards, it would be wise to download a new copy of the offline version.</p>", 381 <p>You have recently created or modified one or more cards, it would be wise to download a new copy of the offline version.</p>",
385 382
386 'offlineCopyDownloadOk': "", 383 'offlineCopyDownloadOk': "",
387 384
388 //Data panel - sharing 385 //Data panel - sharing
389 'sharingTabLabel': "Sharing", 386 'sharingTabLabel': "Sharing",
390 'sharingTabTitle': "Sharing", 387 'sharingTabTitle': "Sharing",
391 388
392 'sharingTabDescription': "\ 389 'sharingTabDescription': "\
393 <p>Quite often a confidential piece of information needs to be shared with one or more persons.</p>\ 390 <p>Quite often a confidential piece of information needs to be shared with one or more persons.</p>\
394 <p>This could be as simple as giving your colleague the access code of your voice mailbox when you are out of the office, or as complicated as enabling the entitled heirs to access your safe deposit box at the local bank when you pass on.</p>\ 391 <p>This could be as simple as giving your colleague the access code of your voice mailbox when you are out of the office, or as complicated as enabling the entitled heirs to access your safe deposit box at the local bank when you pass on.</p>\
395 <p>Clipperz can make sharing your secrets a secure and straightforward process.</p>\ 392 <p>Clipperz can make sharing your secrets a secure and straightforward process.</p>\
396 <p></p>\ 393 <p></p>\
397 <p><b>Coming soon …</b></p>", 394 <p><b>Coming soon …</b></p>",
398 395
399 // Data panel - import 396 // Data panel - import
400 'importTabLabel': "Import", 397 'importTabLabel': "Import",
401 'importTabTitle': "Import", 398 'importTabTitle': "Import",
402 399
403 'importTabDescription': "<p>You can bulk import data to your Clipperz account from several file formats.</p>", 400 'importTabDescription': "<p>You can bulk import data to your Clipperz account from several file formats.</p>",
404 401
405 //Data panel - export 402 //Data panel - export
406 'printingTabLabel': "Export", 403 'printingTabLabel': "Export",
407 'printingTabTitle': "Export", 404 'printingTabTitle': "Export",
408 405
diff --git a/frontend/beta/js/Clipperz/PM/Strings/Strings_es-ES.js b/frontend/beta/js/Clipperz/PM/Strings/Strings_es-ES.js
index 1541d5f..57286fe 100644
--- a/frontend/beta/js/Clipperz/PM/Strings/Strings_es-ES.js
+++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_es-ES.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29Clipperz.PM.Strings.Languages['es-ES'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 26Clipperz.PM.Strings.Languages['es-ES'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], {
30 'clipperzServiceDescription':"<h2>Guárdelo usted mismo!</h2> <ul> <li> <h3>Clipperz es:</h3> <ul> <li> <p>un simple y seguro administrador de contraseñas</p> </li> <li> <p>una efectiva y simple solución de logueo</p> </li> <li> <p>un maletín digital para sus datos confidenciales</p> </li> </ul> </li> <li> <h3>Con Clipperz usted puede:</h3> <ul> <li> <p>administrar y almacenar en línea sus contraseñas y credenciales digitales</p> </li> <li> <p>ingresar en sus servicios web sin ningún nombre de usuario o contraseña</p> </li> <li> <p>protejer todos sus datos sensibles: códigos de alarmas, PINs y números de tarjetas de crédito, &hellip;</p> </li> <li> <p>compartir secretos con sus familiares y socios</p> </li> </ul> </li> <li> <h3>Beneficios de Clipperz:</h3> <ul> <li> <p>es gratis y completamente anónimo</p> </li> <li> <p>con acceso en cualquier momento y desde cualquier ordenador</p> </li> <li> <p>no necesita instalar o descargar ningún programa</p> </li> <li> <p>no necesita guardar secretos en papel o en el ordenador</p> </li> </ul> </li> <li> <h3>Seguridad de Clipperz:</h3> <ul> <li> <p>sus secretos son localmente encriptados por su navegador antes de ser almacenados en Clipperz</p> </li> <li> <p>la llave de encriptación es una frase clave conocida solo por usted</p> </li> <li> <p>Clipperz almacena sus datos de manera encriptada y nunca accede a ellos en forma de texto plano</p> </li> <li> <p>Clipperz esta basado en esquemas estándares de encriptación, no hemos inventado nada</p> </li> <li> <p>usted puede revisar el código todas las veces que lo desee, ¡ pero no necesita conocer algo de encriptación para ser un usuario feliz!</p> </li> </ul> </li> <li> <a href=\"http://www.clipperz.com\" target=\"_blank\">Aprender más</a> </li> </ul> ", 27 'clipperzServiceDescription':"<h2>Guárdelo usted mismo!</h2> <ul> <li> <h3>Clipperz es:</h3> <ul> <li> <p>un simple y seguro administrador de contraseñas</p> </li> <li> <p>una efectiva y simple solución de logueo</p> </li> <li> <p>un maletín digital para sus datos confidenciales</p> </li> </ul> </li> <li> <h3>Con Clipperz usted puede:</h3> <ul> <li> <p>administrar y almacenar en línea sus contraseñas y credenciales digitales</p> </li> <li> <p>ingresar en sus servicios web sin ningún nombre de usuario o contraseña</p> </li> <li> <p>protejer todos sus datos sensibles: códigos de alarmas, PINs y números de tarjetas de crédito, &hellip;</p> </li> <li> <p>compartir secretos con sus familiares y socios</p> </li> </ul> </li> <li> <h3>Beneficios de Clipperz:</h3> <ul> <li> <p>es gratis y completamente anónimo</p> </li> <li> <p>con acceso en cualquier momento y desde cualquier ordenador</p> </li> <li> <p>no necesita instalar o descargar ningún programa</p> </li> <li> <p>no necesita guardar secretos en papel o en el ordenador</p> </li> </ul> </li> <li> <h3>Seguridad de Clipperz:</h3> <ul> <li> <p>sus secretos son localmente encriptados por su navegador antes de ser almacenados en Clipperz</p> </li> <li> <p>la llave de encriptación es una frase clave conocida solo por usted</p> </li> <li> <p>Clipperz almacena sus datos de manera encriptada y nunca accede a ellos en forma de texto plano</p> </li> <li> <p>Clipperz esta basado en esquemas estándares de encriptación, no hemos inventado nada</p> </li> <li> <p>usted puede revisar el código todas las veces que lo desee, ¡ pero no necesita conocer algo de encriptación para ser un usuario feliz!</p> </li> </ul> </li> <li> <a href=\"http://www.clipperz.com\" target=\"_blank\">Aprender más</a> </li> </ul> ",
31 'loginFormTitle':"ingrese con su usuario Clipperz", 28 'loginFormTitle':"ingrese con su usuario Clipperz",
32 'loginFormUsernameLabel':"usuario", 29 'loginFormUsernameLabel':"usuario",
33 'loginFormPassphraseLabel':"frase clave", 30 'loginFormPassphraseLabel':"frase clave",
34 'loginFormDontHaveAnAccountLabel':"¿no tiene una cuenta?", 31 'loginFormDontHaveAnAccountLabel':"¿no tiene una cuenta?",
35 'loginFormCreateOneLabel':"crear una", 32 'loginFormCreateOneLabel':"crear una",
36 'loginFormForgotYourCredentialsLabel':"¿perdió sus credenciales?", 33 'loginFormForgotYourCredentialsLabel':"¿perdió sus credenciales?",
37 'loginFormAarghThatsBadLabel':"¡Ahhh! ¡eso es malo!", 34 'loginFormAarghThatsBadLabel':"¡Ahhh! ¡eso es malo!",
38 'loginFormAfraidOfMaliciousScriptsLabel':"¿evitar scripts maliciosos?", 35 'loginFormAfraidOfMaliciousScriptsLabel':"¿evitar scripts maliciosos?",
39 'loginFormVerifyTheCodeLabel':"verificar el código", 36 'loginFormVerifyTheCodeLabel':"verificar el código",
40 'loginFormButtonLabel':"Ingresar", 37 'loginFormButtonLabel':"Ingresar",
41 'loginFormOneTimePasswordCheckboxLabel':"usar una frase clave desechable", 38 'loginFormOneTimePasswordCheckboxLabel':"usar una frase clave desechable",
42 'loginPanelSwithLanguageDescription':"<h5>Cambiar a su lenguaje preferido</h5> ", 39 'loginPanelSwithLanguageDescription':"<h5>Cambiar a su lenguaje preferido</h5> ",
43 'browserCompatibilityDescription':"<p>Obtenga una mejor y más segura experiencia con Firefox. De todas maneras Clipperz funciona también con Opera y MS Explorer!</p> ", 40 'browserCompatibilityDescription':"<p>Obtenga una mejor y más segura experiencia con Firefox. De todas maneras Clipperz funciona también con Opera y MS Explorer!</p> ",
44 'OTPloginMessagePanelInitialTitle':"Ingresar usando una frase clave desechable", 41 'OTPloginMessagePanelInitialTitle':"Ingresar usando una frase clave desechable",
45 'OTPloginMessagePanelInitialText':"Enviando credenciales OTP ...", 42 'OTPloginMessagePanelInitialText':"Enviando credenciales OTP ...",
46 'OTPloginMessagePanelLoadingTitle':"Ingresar usando una frase clave desechable", 43 'OTPloginMessagePanelLoadingTitle':"Ingresar usando una frase clave desechable",
47 'OTPloginMessagePanelLoadingText':"Descargando datos de autenticación encriptados desde el servidor ...", 44 'OTPloginMessagePanelLoadingText':"Descargando datos de autenticación encriptados desde el servidor ...",
48 'OTPloginMessagePanelProcessingTitle':"Ingresar usando una frase clave desechable", 45 'OTPloginMessagePanelProcessingTitle':"Ingresar usando una frase clave desechable",
49 'OTPloginMessagePanelProcessingText':"Desencriptación local de datos de autenticación ...", 46 'OTPloginMessagePanelProcessingText':"Desencriptación local de datos de autenticación ...",
50 'loginMessagePanelInitialTitle':"Ingresando ...", 47 'loginMessagePanelInitialTitle':"Ingresando ...",
51 'loginMessagePanelInitialButtonLabel':"Cancelar", 48 'loginMessagePanelInitialButtonLabel':"Cancelar",
52 'loginMessagePanelConnectedTitle':"Conectado", 49 'loginMessagePanelConnectedTitle':"Conectado",
53 'loginMessagePanelConnectedText':"Hecho", 50 'loginMessagePanelConnectedText':"Hecho",
54 'loginMessagePanelFailureTitle':"Error", 51 'loginMessagePanelFailureTitle':"Error",
55 'loginMessagePanelFailureText':"Ingreso fallido", 52 'loginMessagePanelFailureText':"Ingreso fallido",
56 'loginMessagePanelFailureButtonLabel':"Cerrar", 53 'loginMessagePanelFailureButtonLabel':"Cerrar",
57 'connectionLoginSendingCredentialsMessageTitle':"Verificando credenciales", 54 'connectionLoginSendingCredentialsMessageTitle':"Verificando credenciales",
58 'connectionLoginSendingCredentialsMessageText':"Enviando credenciales", 55 'connectionLoginSendingCredentialsMessageText':"Enviando credenciales",
59 'connectionLoginCredentialsVerificationMessageTitle':"Verificando credenciales", 56 'connectionLoginCredentialsVerificationMessageTitle':"Verificando credenciales",
60 'connectionLoginCredentialsVerificationMessageText':"Realizando una autenticación SRP", 57 'connectionLoginCredentialsVerificationMessageText':"Realizando una autenticación SRP",
61 'connectionLoginDoneMessageTitle':"Verificando credenciales", 58 'connectionLoginDoneMessageTitle':"Verificando credenciales",
62 'connectionLoginDoneMessageText':"Conectado", 59 'connectionLoginDoneMessageText':"Conectado",
63 'userLoginPanelUpgradingUserCredentialsMessageTitle':"Verificando credenciales", 60 'userLoginPanelUpgradingUserCredentialsMessageTitle':"Verificando credenciales",
64 'userLoginPanelUpgradingUserCredentialsMessageText':"Actualizando sus credenciales al nuevo esquema de autenticación", 61 'userLoginPanelUpgradingUserCredentialsMessageText':"Actualizando sus credenciales al nuevo esquema de autenticación",
65 'userLoginPanelConnectedMessageTitle':"Usuario autenticado", 62 'userLoginPanelConnectedMessageTitle':"Usuario autenticado",
66 'userLoginPanelConnectedMessageText':"Exitosamente logueado", 63 'userLoginPanelConnectedMessageText':"Exitosamente logueado",
67 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"Verifying credentials", 64 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"Verifying credentials",
68 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"Probando un esquema de autenticación antiguo", 65 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"Probando un esquema de autenticación antiguo",
69 'userLoginPanelLoadingUserDataMessageTitle':"Usuario autenticado", 66 'userLoginPanelLoadingUserDataMessageTitle':"Usuario autenticado",
70 'userLoginPanelLoadingUserDataMessageText':"Descargando encabezamientos encriptados desde Clipperz", 67 'userLoginPanelLoadingUserDataMessageText':"Descargando encabezamientos encriptados desde Clipperz",
71 'userLoginPanelDecryptingUserDataMessageTitle':"Usuario autenticado", 68 'userLoginPanelDecryptingUserDataMessageTitle':"Usuario autenticado",
72 'userLoginPanelDecryptingUserDataMessageText':"Desencriptación local de datos", 69 'userLoginPanelDecryptingUserDataMessageText':"Desencriptación local de datos",
73 'userLoginPanelDecryptingUserStatisticsMessageTitle':"Usuario autenticado", 70 'userLoginPanelDecryptingUserStatisticsMessageTitle':"Usuario autenticado",
74 'userLoginPanelDecryptingUserStatisticsMessageText':"Desencriptación local de estadísticas de uso", 71 'userLoginPanelDecryptingUserStatisticsMessageText':"Desencriptación local de estadísticas de uso",
75 'splashAlertTitle':"¡Bienvenido a Clipperz!", 72 'splashAlertTitle':"¡Bienvenido a Clipperz!",
76 'splashAlertText':"<p>Algunas advertencias sobre seguridad</p> <ul> <li> <p>Almacenar sus datos en Clipperz es tan seguro como la frase clave que usted elija para protegerlos. Nadie puede acceder a ellos a no ser que conozca la frase clave.</p> </li> <li> <p>Si usted va a usar Clipperz para guardar información sensible y crítica, esté seguro de elegir una frase clave fuerte. ¡Cuanto más larga mejor!</p> </li> <li> <p>Clipperz no le permitirá recuperar una frase clave perdida.</p> </li> </ul> <p>Si necesita más información, por favor visite el sitio de <a href=\"http://www.clipperz.com\" target=\"_blank\">Clipperz</a>.</p> ", 73 'splashAlertText':"<p>Algunas advertencias sobre seguridad</p> <ul> <li> <p>Almacenar sus datos en Clipperz es tan seguro como la frase clave que usted elija para protegerlos. Nadie puede acceder a ellos a no ser que conozca la frase clave.</p> </li> <li> <p>Si usted va a usar Clipperz para guardar información sensible y crítica, esté seguro de elegir una frase clave fuerte. ¡Cuanto más larga mejor!</p> </li> <li> <p>Clipperz no le permitirá recuperar una frase clave perdida.</p> </li> </ul> <p>Si necesita más información, por favor visite el sitio de <a href=\"http://www.clipperz.com\" target=\"_blank\">Clipperz</a>.</p> ",
77 'splashAlertCloseButtonLabel':"Aceptar", 74 'splashAlertCloseButtonLabel':"Aceptar",
78 'registrationFormTitle':"Abrir su cuenta", 75 'registrationFormTitle':"Abrir su cuenta",
79 'registrationFormUsernameLabel':"usuario", 76 'registrationFormUsernameLabel':"usuario",
80 'registrationFormPassphraseLabel':"frase clave", 77 'registrationFormPassphraseLabel':"frase clave",
81 'registrationFormRetypePassphraseLabel':"reingrese la frase clave", 78 'registrationFormRetypePassphraseLabel':"reingrese la frase clave",
82 'registrationFormSafetyCheckLabel':"Yo entiendo que Clipperz no me permite recuperar frases clave perdidas", 79 'registrationFormSafetyCheckLabel':"Yo entiendo que Clipperz no me permite recuperar frases clave perdidas",
83 'registrationFormTermsOfServiceCheckLabel':"He leído y estoy de acuerdo con los <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Términos de Servicio</a>.", 80 'registrationFormTermsOfServiceCheckLabel':"He leído y estoy de acuerdo con los <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Términos de Servicio</a>.",
84 'registrationFormDoYouAlreadyHaveAnAccountLabel':"¿usted ya tiene una cuenta?", 81 'registrationFormDoYouAlreadyHaveAnAccountLabel':"¿usted ya tiene una cuenta?",
85 'registrationFormSimplyLoginLabel':"ingreso simple", 82 'registrationFormSimplyLoginLabel':"ingreso simple",
86 'registrationFormButtonLabel':"Registrarse", 83 'registrationFormButtonLabel':"Registrarse",
87 'registrationFormWarningMessageNotMatchingPassphrases':"Su frase clave no coincide, por favor reescríbala.", 84 'registrationFormWarningMessageNotMatchingPassphrases':"Su frase clave no coincide, por favor reescríbala.",
88 'registrationFormWarningMessageSafetyCheckNotSelected':"Por favor, lea y chequee todas las casillas debajo.", 85 'registrationFormWarningMessageSafetyCheckNotSelected':"Por favor, lea y chequee todas las casillas debajo.",
89 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"Usted necesita estar de acuerdo con los Términos de Servicio.", 86 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"Usted necesita estar de acuerdo con los Términos de Servicio.",
90 'registrationMessagePanelInitialTitle':"Creando cuenta ...", 87 'registrationMessagePanelInitialTitle':"Creando cuenta ...",
91 'registrationMessagePanelInitialButtonLabel':"Cancelar", 88 'registrationMessagePanelInitialButtonLabel':"Cancelar",
92 'registrationMessagePanelRegistrationDoneTitle':"Registración", 89 'registrationMessagePanelRegistrationDoneTitle':"Registración",
93 'registrationMessagePanelRegistrationDoneText':"Hecho", 90 'registrationMessagePanelRegistrationDoneText':"Hecho",
94 'registrationMessagePanelFailureTitle':"Registración fallada", 91 'registrationMessagePanelFailureTitle':"Registración fallada",
95 'registrationMessagePanelFailureButtonLabel':"Cerrar", 92 'registrationMessagePanelFailureButtonLabel':"Cerrar",
96 'connectionRegistrationSendingRequestMessageText':"Verificando credenciales", 93 'connectionRegistrationSendingRequestMessageText':"Verificando credenciales",
97 'connectionRegistrationSendingCredentialsMessageText':"Enviando credenciales", 94 'connectionRegistrationSendingCredentialsMessageText':"Enviando credenciales",
98 'registrationSplashPanelTitle':"Aviso de seguridad", 95 'registrationSplashPanelTitle':"Aviso de seguridad",
99 'registrationSplashPanelDescriptionConfig':"<p>Estas son sus credenciales de Clipperz, cuídelas. ¡Clipperz nunca más le mostrará su cuenta y frase clave por segunda vez!</p> ", 96 'registrationSplashPanelDescriptionConfig':"<p>Estas son sus credenciales de Clipperz, cuídelas. ¡Clipperz nunca más le mostrará su cuenta y frase clave por segunda vez!</p> ",
100 'registrationSplashPanelUsernameLabel':"usuario", 97 'registrationSplashPanelUsernameLabel':"usuario",
101 'registrationSplashPanelPassphraseLabel':"frase clave", 98 'registrationSplashPanelPassphraseLabel':"frase clave",
102 'registrationSplashPanelShowPassphraseButtonLabel':" mostrar frase clave", 99 'registrationSplashPanelShowPassphraseButtonLabel':" mostrar frase clave",
103 'donateHeaderLinkLabel':"donaciones", 100 'donateHeaderLinkLabel':"donaciones",
104 'creditsHeaderLinkLabel':"créditos", 101 'creditsHeaderLinkLabel':"créditos",
105 'feedbackHeaderLinkLabel':"contacto", 102 'feedbackHeaderLinkLabel':"contacto",
106 'helpHeaderLinkLabel':"ayuda", 103 'helpHeaderLinkLabel':"ayuda",
107 'forumHeaderLinkLabel':"foro", 104 'forumHeaderLinkLabel':"foro",
108 'recordMenuLabel':"tarjetas", 105 'recordMenuLabel':"tarjetas",
109 'accountMenuLabel':"cuenta", 106 'accountMenuLabel':"cuenta",
110 'dataMenuLabel':"datos", 107 'dataMenuLabel':"datos",
111 'contactsMenuLabel':"contactos", 108 'contactsMenuLabel':"contactos",
112 'toolsMenuLabel':"herramientas", 109 'toolsMenuLabel':"herramientas",
113 'logoutMenuLabel':"salir", 110 'logoutMenuLabel':"salir",
114 'lockMenuLabel':"bloquear", 111 'lockMenuLabel':"bloquear",
115 'lockTitle':"La cuenta está bloqueada", 112 'lockTitle':"La cuenta está bloqueada",
116 'lockDescriptionConfig':"<p>Para desbloquear su cuenta, por favor ingrese su frase clave</p> ", 113 'lockDescriptionConfig':"<p>Para desbloquear su cuenta, por favor ingrese su frase clave</p> ",
117 'unlockButtonLabel':"desbloquear", 114 'unlockButtonLabel':"desbloquear",
118 'changePasswordTabLabel':"Cambiar su frase clave", 115 'changePasswordTabLabel':"Cambiar su frase clave",
119 'changePasswordTabTitle':"Cambiar su frase clave", 116 'changePasswordTabTitle':"Cambiar su frase clave",
120 'changePasswordFormUsernameLabel':"usuario", 117 'changePasswordFormUsernameLabel':"usuario",
121 'changePasswordFormOldPassphraseLabel':"frase clave anterior", 118 'changePasswordFormOldPassphraseLabel':"frase clave anterior",
122 'changePasswordFormNewPassphraseLabel':"nueva frase clave", 119 'changePasswordFormNewPassphraseLabel':"nueva frase clave",
123 'changePasswordFormRetypePassphraseLabel':"reingrese su nueva frase clave", 120 'changePasswordFormRetypePassphraseLabel':"reingrese su nueva frase clave",
124 'changePasswordFormSafetyCheckboxLabel':"Yo entiendo que Clipperz no me permite recuperar una frase clave perdida.", 121 'changePasswordFormSafetyCheckboxLabel':"Yo entiendo que Clipperz no me permite recuperar una frase clave perdida.",
125 'changePasswordFormSubmitLabel':"Cambiar", 122 'changePasswordFormSubmitLabel':"Cambiar",
126 'changePasswordFormWrongUsernameWarning':"Usuario incorrecto", 123 'changePasswordFormWrongUsernameWarning':"Usuario incorrecto",
127 'changePasswordFormWrongPassphraseWarning':"Frase clave incorrecta", 124 'changePasswordFormWrongPassphraseWarning':"Frase clave incorrecta",
128 'changePasswordFormWrongRetypePassphraseWarning':"Sus frases claves no coinciden, por favor reescríbalas.", 125 'changePasswordFormWrongRetypePassphraseWarning':"Sus frases claves no coinciden, por favor reescríbalas.",
129 'changePasswordFormSafetyCheckWarning':"Por favor lea y seleccione la casilla de abajo.", 126 'changePasswordFormSafetyCheckWarning':"Por favor lea y seleccione la casilla de abajo.",
130 'changePasswordFormProgressDialogTitle':"Cambiando credenciales de usuario", 127 'changePasswordFormProgressDialogTitle':"Cambiando credenciales de usuario",
131 'changePasswordFormProgressDialogConnectedMessageTitle':"Conectado", 128 'changePasswordFormProgressDialogConnectedMessageTitle':"Conectado",
132 'changePasswordFormProgressDialogConnectedMessageText':"Hecho", 129 'changePasswordFormProgressDialogConnectedMessageText':"Hecho",
133 'changePasswordFormProgressDialogErrorMessageTitle':"Error", 130 'changePasswordFormProgressDialogErrorMessageTitle':"Error",
134 'changePasswordFormProgressDialogErrorMessageText':"¡Cambio de credenciales fallado!", 131 'changePasswordFormProgressDialogErrorMessageText':"¡Cambio de credenciales fallado!",
135 'changeCredentialsPanelEncryptingDataMessageTitle':"Cambiando su frase clave", 132 'changeCredentialsPanelEncryptingDataMessageTitle':"Cambiando su frase clave",
136 'changeCredentialsPanelEncryptingDataMessageText':"Encriptación local de encabezados de tarjetas", 133 'changeCredentialsPanelEncryptingDataMessageText':"Encriptación local de encabezados de tarjetas",
137 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"Cambiando su frase clave", 134 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"Cambiando su frase clave",
138 'changeCredentialsPanelCreatingNewCredentialsMessageText':"Actualizando su credenciales", 135 'changeCredentialsPanelCreatingNewCredentialsMessageText':"Actualizando su credenciales",
139 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Cambiando su frase clave", 136 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Cambiando su frase clave",
140 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Subiendo sus credenciales encriptadas a Clipperz", 137 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Subiendo sus credenciales encriptadas a Clipperz",
141 'changeCredentialsPanelDoneMessageTitle':"Cambiando su frase clave", 138 'changeCredentialsPanelDoneMessageTitle':"Cambiando su frase clave",
142 'changeCredentialsPanelDoneMessageText':"Hecho", 139 'changeCredentialsPanelDoneMessageText':"Hecho",
143 'manageOTPTabLabel':"Administrar su frases clave desechables", 140 'manageOTPTabLabel':"Administrar su frases clave desechables",
144 'manageOTPTabTitle':"Administrar su frases clave desechables", 141 'manageOTPTabTitle':"Administrar su frases clave desechables",
145 'manageOTPTabDescription':"<p>Una frase clave desechable uso funciona como una frase clave regular, pero puede ser usada solo una vez.</p> <p>Si las misma frase clave es usada nuevamente en un segundo intento de acceso, esta será rechazada y el proceso de acceso fallará.</p> <p>Inmediatamente después de un acceso exitoso, su on-time frase clave será borrada previniendo accesos fraudulentos.</p> <p>Frases claves desechables son una excelente elección para protegerse de keyloggers y spywares, que pueden recolectar datos desde máquinas comprometidas.</p> <p> <b>Le recomendamos muy fuertemente que use frases claves desechables uso cuando acceda a Clipperz desde terminales públicas, como Internet Cafés, Cybercafés y bibliotecas.</b> </p> ", 142 'manageOTPTabDescription':"<p>Una frase clave desechable uso funciona como una frase clave regular, pero puede ser usada solo una vez.</p> <p>Si las misma frase clave es usada nuevamente en un segundo intento de acceso, esta será rechazada y el proceso de acceso fallará.</p> <p>Inmediatamente después de un acceso exitoso, su on-time frase clave será borrada previniendo accesos fraudulentos.</p> <p>Frases claves desechables son una excelente elección para protegerse de keyloggers y spywares, que pueden recolectar datos desde máquinas comprometidas.</p> <p> <b>Le recomendamos muy fuertemente que use frases claves desechables uso cuando acceda a Clipperz desde terminales públicas, como Internet Cafés, Cybercafés y bibliotecas.</b> </p> ",
146 'oneTimePasswordReadOnlyMessage':"<h6>¡Disculpe!</h6> <p>Usted no puede usar su frases clave desechables mientras usa la versión fuera de línea de Clipperz.</p> ", 143 'oneTimePasswordReadOnlyMessage':"<h6>¡Disculpe!</h6> <p>Usted no puede usar su frases clave desechables mientras usa la versión fuera de línea de Clipperz.</p> ",
147 'oneTimePasswordLoadingMessage':"<h6>Cargando datos</h6> <p>Por favor espere ...</p> ", 144 'oneTimePasswordLoadingMessage':"<h6>Cargando datos</h6> <p>Por favor espere ...</p> ",
148 'oneTimePasswordNoPasswordAvailable':"<h6>No hay frase clave desechables disponible</h6> <p>Haga click en el botón “Nueva” para agregar una frase clave desechables a su cuenta.</p> ", 145 'oneTimePasswordNoPasswordAvailable':"<h6>No hay frase clave desechables disponible</h6> <p>Haga click en el botón “Nueva” para agregar una frase clave desechables a su cuenta.</p> ",
149 'createNewOTPButtonLabel':"Nueva", 146 'createNewOTPButtonLabel':"Nueva",
150 'deleteOTPButtonLabel':"Borrar", 147 'deleteOTPButtonLabel':"Borrar",
151 'printOTPButtonLabel':"Imprimir", 148 'printOTPButtonLabel':"Imprimir",
152 'disabledOneTimePassword_warning':"desabilitado", 149 'disabledOneTimePassword_warning':"desabilitado",
153 'oneTimePasswordSelectionLink_selectLabel':"Seleccionar:", 150 'oneTimePasswordSelectionLink_selectLabel':"Seleccionar:",
154 'oneTimePasswordSelectionLink_all':"todo", 151 'oneTimePasswordSelectionLink_all':"todo",
155 'oneTimePasswordSelectionLink_none':"ninguna", 152 'oneTimePasswordSelectionLink_none':"ninguna",
156 'oneTimePasswordSelectionLink_used':"usada", 153 'oneTimePasswordSelectionLink_used':"usada",
157 'oneTimePasswordSelectionLink_unused':"sin uso", 154 'oneTimePasswordSelectionLink_unused':"sin uso",
158 'saveOTP_encryptUserDataTitle':"Guardando frase clave desechable", 155 'saveOTP_encryptUserDataTitle':"Guardando frase clave desechable",
159 'saveOTP_encryptUserDataText':"Procesando nuevas credenciales OTP ...", 156 'saveOTP_encryptUserDataText':"Procesando nuevas credenciales OTP ...",
160 'saveOTP_encryptOTPDataTitle':"Guardando frase clave desechable", 157 'saveOTP_encryptOTPDataTitle':"Guardando frase clave desechable",
161 'saveOTP_encryptOTPDataText':"Encriptación local de datos de autenticación ...", 158 'saveOTP_encryptOTPDataText':"Encriptación local de datos de autenticación ...",
162 'saveOTP_sendingDataTitle':"Guardando frase clave desechable", 159 'saveOTP_sendingDataTitle':"Guardando frase clave desechable",
163 'saveOTP_sendingDataText':"Enviando datos de autenticación al servidor ...", 160 'saveOTP_sendingDataText':"Enviando datos de autenticación al servidor ...",
164 'saveOTP_updatingInterfaceTitle':"Guardando frase clave desechable", 161 'saveOTP_updatingInterfaceTitle':"Guardando frase clave desechable",
165 'saveOTP_updatingInterfaceText':"Actualizando interface ...", 162 'saveOTP_updatingInterfaceText':"Actualizando interface ...",
166 'accountPreferencesLabel':"Preferencias", 163 'accountPreferencesLabel':"Preferencias",
167 'accountPreferencesTabTitle':"Preferencias", 164 'accountPreferencesTabTitle':"Preferencias",
168 'accountPreferencesLanguageTitle':"Seleccione el lenguaje", 165 'accountPreferencesLanguageTitle':"Seleccione el lenguaje",
169 'accountPreferencesLanguageDescription':"<p>Elija su lenguaje preferido de la siguiente lista.<p> ", 166 'accountPreferencesLanguageDescription':"<p>Elija su lenguaje preferido de la siguiente lista.<p> ",
170 'showDonationReminderPanelTitle':"Recordatorios de donaciones", 167 'showDonationReminderPanelTitle':"Recordatorios de donaciones",
171 'showDonationReminderPanelDescription':"<p>Mostrar recordatorios de donaciones</p> ", 168 'showDonationReminderPanelDescription':"<p>Mostrar recordatorios de donaciones</p> ",
172 'accountPreferencesInterfaceTitle':"Personalización de la interface", 169 'accountPreferencesInterfaceTitle':"Personalización de la interface",
173 'accountPreferencesInterfaceDescription':"<p>Ajuste Clipperz a sus necesidades.</p> ", 170 'accountPreferencesInterfaceDescription':"<p>Ajuste Clipperz a sus necesidades.</p> ",
174 'saveUserPreferencesFormSubmitLabel':"Guardar", 171 'saveUserPreferencesFormSubmitLabel':"Guardar",
175 'cancelUserPreferencesFormSubmitLabel':"Cancelar", 172 'cancelUserPreferencesFormSubmitLabel':"Cancelar",
176 'accountPreferencesSavingPanelTitle_Step1':"Guardando preferencias", 173 'accountPreferencesSavingPanelTitle_Step1':"Guardando preferencias",
177 'accountPreferencesSavingPanelText_Step1':"Encriptación local de sus preferencias", 174 'accountPreferencesSavingPanelText_Step1':"Encriptación local de sus preferencias",
178 'accountPreferencesSavingPanelTitle_Step2':"Guardando preferencias", 175 'accountPreferencesSavingPanelTitle_Step2':"Guardando preferencias",
179 'accountPreferencesSavingPanelText_Step2':"Enviando preferencias encriptadas a Clipperz", 176 'accountPreferencesSavingPanelText_Step2':"Enviando preferencias encriptadas a Clipperz",
180 'accountLoginHistoryLabel':"Historial de accesos", 177 'accountLoginHistoryLabel':"Historial de accesos",
181 'loginHistoryTabTitle':"Historial de accesos", 178 'loginHistoryTabTitle':"Historial de accesos",
182 'loginHistoryReadOnlyMessage':"<h6>¡Perdón!</h6> <p>El historial de acceso no está disponible mientras usa la versión fuera de línea de Clipperz.</p> ", 179 'loginHistoryReadOnlyMessage':"<h6>¡Perdón!</h6> <p>El historial de acceso no está disponible mientras usa la versión fuera de línea de Clipperz.</p> ",
183 'loginHistoryLoadingMessage':"<h6>Cargando datos</h6> <p>Por favor espere ...</p> ", 180 'loginHistoryLoadingMessage':"<h6>Cargando datos</h6> <p>Por favor espere ...</p> ",
184 'loginHistoryLoadedMessage':"<h6>Sus últimos 10 accesos</h6> <p> </p> ", 181 'loginHistoryLoadedMessage':"<h6>Sus últimos 10 accesos</h6> <p> </p> ",
185 'loginHistoryIPLabel':"IP", 182 'loginHistoryIPLabel':"IP",
186 'loginHistoryTimeLabel':"fecha", 183 'loginHistoryTimeLabel':"fecha",
187 'loginHistoryCurrentSessionText':"sesión actual", 184 'loginHistoryCurrentSessionText':"sesión actual",
188 'loginHistoryReloadButtonLabel':"Refrescar historial de acceso", 185 'loginHistoryReloadButtonLabel':"Refrescar historial de acceso",
189 'deleteAccountTabLabel':"Borrar su cuenta", 186 'deleteAccountTabLabel':"Borrar su cuenta",
190 'deleteAccountTabTitle':"Borrar su cuenta", 187 'deleteAccountTabTitle':"Borrar su cuenta",
191 'deleteAccountFormUsernameLabel':"usuario", 188 'deleteAccountFormUsernameLabel':"usuario",
192 'deleteAccountFormPassphraseLabel':"frase clave", 189 'deleteAccountFormPassphraseLabel':"frase clave",
193 'deleteAccountFormSafetyCheckboxLabel':"Yo entiendo que todos mis datos serán borrados y que esta acción es irreversible.", 190 'deleteAccountFormSafetyCheckboxLabel':"Yo entiendo que todos mis datos serán borrados y que esta acción es irreversible.",
194 'deleteAccountFormSubmitLabel':"Borrar mi cuenta", 191 'deleteAccountFormSubmitLabel':"Borrar mi cuenta",
195 'deleteAccountFormWrongUsernameWarning':"Usuario incorrecto", 192 'deleteAccountFormWrongUsernameWarning':"Usuario incorrecto",
196 'deleteAccountFormWrongPassphraseWarning':"Frase clave incorrecta", 193 'deleteAccountFormWrongPassphraseWarning':"Frase clave incorrecta",
197 'deleteAccountFormSafetyCheckWarning':"Por favor, léa y marque la opción debajo.", 194 'deleteAccountFormSafetyCheckWarning':"Por favor, léa y marque la opción debajo.",
198 'accountPanelDeletingAccountPanelConfirmationTitle':"ATENCIÓN", 195 'accountPanelDeletingAccountPanelConfirmationTitle':"ATENCIÓN",
199 'accountPanelDeleteAccountPanelConfirmationText':"¿Esta Ud. seguro que desea borrar esta cuenta?", 196 'accountPanelDeleteAccountPanelConfirmationText':"¿Esta Ud. seguro que desea borrar esta cuenta?",
200 'accountPanelDeleteAccountPanelConfirmButtonLabel':"Sí", 197 'accountPanelDeleteAccountPanelConfirmButtonLabel':"Sí",
201 'accountPanelDeleteAccountPanelDenyButtonLabel':"No", 198 'accountPanelDeleteAccountPanelDenyButtonLabel':"No",
202 'offlineCopyTabLabel':"Copia fuera de línea", 199 'offlineCopyTabLabel':"Copia fuera de línea",
203 'offlineCopyTabTitle':"Copia fuera de línea", 200 'offlineCopyTabTitle':"Copia fuera de línea",
204 'offlineCopyTabDescription':"<p>Con solo un clik usted puede descargar todos sus datos encriptados desde los servidores de Clipperz a su disco rígido y crear una versión solo-lectura fuera de línea para ser usada cuando usted no está conectado a Internet.</p> <p>La versión solo-lectura es tan segura como la lectura-escritura y no expondrá sus datos a mayores riegos desde el momento que ambas comparten el mismo código y arquitectura de seguridad.</p> <ol> <li> <p>Haga click en el link debajo para comenzar la descarga.</p> </li> <li> <p>El navegador le preguntará que hacer con el archivo “Clipperz_YYYYMMDD.html”. Guárdelo en su disco rígido.</p> </li> <li> <p>Haga doble click en el archivo descargado para ejecutar la versión fuera de línea en su navegador.</p> </li> <li> <p>Ingrese el usuario y la frase clave habitual.</p> </li> </ol> ", 201 'offlineCopyTabDescription':"<p>Con solo un clik usted puede descargar todos sus datos encriptados desde los servidores de Clipperz a su disco rígido y crear una versión solo-lectura fuera de línea para ser usada cuando usted no está conectado a Internet.</p> <p>La versión solo-lectura es tan segura como la lectura-escritura y no expondrá sus datos a mayores riegos desde el momento que ambas comparten el mismo código y arquitectura de seguridad.</p> <ol> <li> <p>Haga click en el link debajo para comenzar la descarga.</p> </li> <li> <p>El navegador le preguntará que hacer con el archivo “Clipperz_YYYYMMDD.html”. Guárdelo en su disco rígido.</p> </li> <li> <p>Haga doble click en el archivo descargado para ejecutar la versión fuera de línea en su navegador.</p> </li> <li> <p>Ingrese el usuario y la frase clave habitual.</p> </li> </ol> ",
205 'offlineCopyDownloadLinkLabel':"Descargar", 202 'offlineCopyDownloadLinkLabel':"Descargar",
206 'offlineCopyDownloadWarning':"<h4> <a href=\"#\" id=\"offlineCopyDownloadWarningLink\">¡Actualize su “copia fuera de línea”!</a> </h4> <p>Usted ha recientemente creado o modificado una o más tarjetas, podría ser necesario que realize una nueva “copia fuera de línea”.</p> ", 203 'offlineCopyDownloadWarning':"<h4> <a href=\"#\" id=\"offlineCopyDownloadWarningLink\">¡Actualize su “copia fuera de línea”!</a> </h4> <p>Usted ha recientemente creado o modificado una o más tarjetas, podría ser necesario que realize una nueva “copia fuera de línea”.</p> ",
207 'sharingTabLabel':"Compartir", 204 'sharingTabLabel':"Compartir",
208 'sharingTabTitle':"Compartir", 205 'sharingTabTitle':"Compartir",
209 'sharingTabDescription':"<p>Muy frecuentemente una pieza de información confidencial necesita ser compartida con una o más personas.</p> <p>Esto debería ser tan simple como darle a sus colegas el accese al código de su casilla de voz cuando está fuera de la oficina, o tan complicado con habilitarles a sus herederos el derecho de acceder a su caja de seguridad en su banco.</p> <p>Clipperz puede permitirle compartir sus secretos de una forma segura y directa.</p> <p> </p> <p> <b>Proximamente ...</b> </p> ", 206 'sharingTabDescription':"<p>Muy frecuentemente una pieza de información confidencial necesita ser compartida con una o más personas.</p> <p>Esto debería ser tan simple como darle a sus colegas el accese al código de su casilla de voz cuando está fuera de la oficina, o tan complicado con habilitarles a sus herederos el derecho de acceder a su caja de seguridad en su banco.</p> <p>Clipperz puede permitirle compartir sus secretos de una forma segura y directa.</p> <p> </p> <p> <b>Proximamente ...</b> </p> ",
210 'importTabLabel':"Importar", 207 'importTabLabel':"Importar",
211 'importTabTitle':"Importar", 208 'importTabTitle':"Importar",
212 'importTabDescription':"<p> <b>Proximamente ...</b> </p> ", 209 'importTabDescription':"<p> <b>Proximamente ...</b> </p> ",
213 'printingTabLabel':"Exportar", 210 'printingTabLabel':"Exportar",
214 'printingTabTitle':"Exportar", 211 'printingTabTitle':"Exportar",
215 'printingTabDescription':"<p> <b>Imprima sus datos</b> </p> <p>Haciendo click en el enlace que sigue se abrirá una nueva ventana mostrando todas sus tarjetas en un formato imprimible.</p> <p>Si usted está imprimiendo con propósitos de respaldo, por favor considere la opción más segura provista por la creación de una “copia fuera de línea”.</p> ", 212 'printingTabDescription':"<p> <b>Imprima sus datos</b> </p> <p>Haciendo click en el enlace que sigue se abrirá una nueva ventana mostrando todas sus tarjetas en un formato imprimible.</p> <p>Si usted está imprimiendo con propósitos de respaldo, por favor considere la opción más segura provista por la creación de una “copia fuera de línea”.</p> ",
216 'printingLinkLabel':"Versión imprimible", 213 'printingLinkLabel':"Versión imprimible",
217 'contactsTabLabel':"Contactos", 214 'contactsTabLabel':"Contactos",
218 'contactsTabTitle':"Contactos", 215 'contactsTabTitle':"Contactos",
219 'passwordGeneratorTabLabel':"Generador de contraseñas", 216 'passwordGeneratorTabLabel':"Generador de contraseñas",
220 'passwordGeneratorTabTitle':"Generador de contraseñas", 217 'passwordGeneratorTabTitle':"Generador de contraseñas",
221 'paswordGeneratorTabDescriptionConfig':"<p> </p> ", 218 'paswordGeneratorTabDescriptionConfig':"<p> </p> ",
222 'passwordGeneratorTabButtonLabel':"Generar contraseña", 219 'passwordGeneratorTabButtonLabel':"Generar contraseña",
223 'bookmarkletTabLabel':"Bookmarklet", 220 'bookmarkletTabLabel':"Bookmarklet",
224 'bookmarkletTabTitle':"Bookmarklet", 221 'bookmarkletTabTitle':"Bookmarklet",
225 'bookmarkletTabDescription':"<p>Un bookmarklet es una simple herramienta de \"un click\" que puede realizar tareas muy útiles. Este puede ser grabado y usado como un marcador normal de una página web.</p> <p>El Clipperz bookmarklet le ayudará a usted a crear rapidamente tarjetas nuevas y accesos directos dentro de las tarjetas existentes.</p> <p> <b>Por favor tenga en cuenta que el bookmarklet no incluye ninguna información relacionadas con su cuenta (ej: su nombre de usuario o clave), el bookmarklet es una herramienta general que contiene el mismo código para todos los usuarios de Clipperz.</b> </p> <h3>How to install the bookmarklet</h3> <h5>Firefox, Camino, Opera, Safari</h5> <ol> <li> <p>Asegúrese que la “Barra de marcadores” está mostrada seleccionando “Ver > Barra de herramientas > Barra de marcadores”, menú similar, desde el menú del navegador.</p> </li> <li> <p>Arrastre el enlace “Agregar a Clipperz” sobre la barra de marcadores.</p> </li> </ol> <h5>Internet Explorer</h5> <ol> <li> <p>Asegúrese que la barra “Vínculos” es mostrada seleccionando “Ver > Barra de Herramientas > Herramientas > Vínculos” desde el menú del navegador.</p> </li> <li> <p>Haga click con el botón derecho del mouse en el link “Agregar a Clipperz”.</p> </li> <li> <p>Seleccione “Agregar a favoritos” desde el menú contextual.</p> </li> <li> <p>Haga click en “Si” o “Acepto” a cualquier advertencia de seguridad que le aparezca.</p> </li> <li> <p>Abra la carpeta “Vínculos” y haga click en “OK”</p> </li> </ol> ", 222 'bookmarkletTabDescription':"<p>Un bookmarklet es una simple herramienta de \"un click\" que puede realizar tareas muy útiles. Este puede ser grabado y usado como un marcador normal de una página web.</p> <p>El Clipperz bookmarklet le ayudará a usted a crear rapidamente tarjetas nuevas y accesos directos dentro de las tarjetas existentes.</p> <p> <b>Por favor tenga en cuenta que el bookmarklet no incluye ninguna información relacionadas con su cuenta (ej: su nombre de usuario o clave), el bookmarklet es una herramienta general que contiene el mismo código para todos los usuarios de Clipperz.</b> </p> <h3>How to install the bookmarklet</h3> <h5>Firefox, Camino, Opera, Safari</h5> <ol> <li> <p>Asegúrese que la “Barra de marcadores” está mostrada seleccionando “Ver > Barra de herramientas > Barra de marcadores”, menú similar, desde el menú del navegador.</p> </li> <li> <p>Arrastre el enlace “Agregar a Clipperz” sobre la barra de marcadores.</p> </li> </ol> <h5>Internet Explorer</h5> <ol> <li> <p>Asegúrese que la barra “Vínculos” es mostrada seleccionando “Ver > Barra de Herramientas > Herramientas > Vínculos” desde el menú del navegador.</p> </li> <li> <p>Haga click con el botón derecho del mouse en el link “Agregar a Clipperz”.</p> </li> <li> <p>Seleccione “Agregar a favoritos” desde el menú contextual.</p> </li> <li> <p>Haga click en “Si” o “Acepto” a cualquier advertencia de seguridad que le aparezca.</p> </li> <li> <p>Abra la carpeta “Vínculos” y haga click en “OK”</p> </li> </ol> ",
226 'bookmarkletTabBookmarkletTitle':"Agregar a Clipperz", 223 'bookmarkletTabBookmarkletTitle':"Agregar a Clipperz",
227 'bookmarkletTabInstructions':"<h3>Como crear una nueva tarjeta que incluya un enlace de “acceso directo” a un servicio en línea.</h3> <ol> <li> <p>Abra una página web dónde el formulario de logueo está almacenado (es la página donde usualmente ingresa sus credenciales firmadas)</p> </li> <li> <p>Ejecute el bookmarklet haciendo click en éste: una ventana emergente (pop-up) aparecerá sobre la página web.</p> </li> <li> <p>Copie al portapapeles el contenido de todo el texto dentro de la ventana emergente (pop-up) (Ctrl-C)</p> </li> <li> <p>Ingrese en su cuenta Clipperz y haga click en el botón <b>Agregar nueva tarjeta</b>.</p> </li> <li> <p>Seleccione la plantilla “Acceso directo” y pegue el contenido del portapapeles en el formulario (Ctrl-V)</p> </li> <li> <p>Haga click en el botón <b>Crear</b>, revise los datos y luego haga click en <b>Guardar</b>.</p> </li> </ol> <h3>Cómo agregar un enlace “acceso directo” a una tarjeta existente</h3> <ol> <li> <p>Igual que arriba.</p> </li> <li> <p>Igual que arriba.</p> </li> <li> <p>Igual que arriba.</p> </li> <li> <p>Ingrese en su cuenta Clipperz y seleccione una tarjeta conteniendo las credenciales de un servicio web que usted visitó y haga click en el botón <b>Editar</b>.</p> </li> <li> <p>Pegue el contenido del portapapeles en el área de texto de la sección “Acceso directo” (Ctrl-V)</p> </li> <li> <p>Haga click en el botón <b>Agregar acceso directo</b>, revise los detalles y luego haga click en <b>Guardar</b>.</p> </li> </ol> <p> </p> <p>Más información sobre bookmarklet está <a href=\"http://www.clipperz.com/support/user_guide/bookmarklet\" target=\"_blank\">disponible aquí</a>.</p> ", 224 'bookmarkletTabInstructions':"<h3>Como crear una nueva tarjeta que incluya un enlace de “acceso directo” a un servicio en línea.</h3> <ol> <li> <p>Abra una página web dónde el formulario de logueo está almacenado (es la página donde usualmente ingresa sus credenciales firmadas)</p> </li> <li> <p>Ejecute el bookmarklet haciendo click en éste: una ventana emergente (pop-up) aparecerá sobre la página web.</p> </li> <li> <p>Copie al portapapeles el contenido de todo el texto dentro de la ventana emergente (pop-up) (Ctrl-C)</p> </li> <li> <p>Ingrese en su cuenta Clipperz y haga click en el botón <b>Agregar nueva tarjeta</b>.</p> </li> <li> <p>Seleccione la plantilla “Acceso directo” y pegue el contenido del portapapeles en el formulario (Ctrl-V)</p> </li> <li> <p>Haga click en el botón <b>Crear</b>, revise los datos y luego haga click en <b>Guardar</b>.</p> </li> </ol> <h3>Cómo agregar un enlace “acceso directo” a una tarjeta existente</h3> <ol> <li> <p>Igual que arriba.</p> </li> <li> <p>Igual que arriba.</p> </li> <li> <p>Igual que arriba.</p> </li> <li> <p>Ingrese en su cuenta Clipperz y seleccione una tarjeta conteniendo las credenciales de un servicio web que usted visitó y haga click en el botón <b>Editar</b>.</p> </li> <li> <p>Pegue el contenido del portapapeles en el área de texto de la sección “Acceso directo” (Ctrl-V)</p> </li> <li> <p>Haga click en el botón <b>Agregar acceso directo</b>, revise los detalles y luego haga click en <b>Guardar</b>.</p> </li> </ol> <p> </p> <p>Más información sobre bookmarklet está <a href=\"http://www.clipperz.com/support/user_guide/bookmarklet\" target=\"_blank\">disponible aquí</a>.</p> ",
228 'mainPanelDirectLoginBlockLabel':"Accesos directos", 225 'mainPanelDirectLoginBlockLabel':"Accesos directos",
229 'directLinkReferenceShowButtonLabel':"ver", 226 'directLinkReferenceShowButtonLabel':"ver",
230 'mainPanelDirectLoginBlockDescription':"<p>¡ Agregar “accesos directos” para ingresar en sus cuentas de la web sin necesidad de escribir nombres de usuarios o claves!</p> <p>“Accesos directos” incrementa notablemente la seguridad de sus claves desde que ud. puede:</p> <ul> <li> <p>usar claves complejas con comodidad;</p> </li> <li> <p>nunca más reusar la misma clave simple.</p> </li> </ul> <p> </p> <a href=\"http://www.clipperz.com/support/user_guide/direct_logins\" target=\"_blank\">Apreender más sobre “accesos directos”</a> ", 227 'mainPanelDirectLoginBlockDescription':"<p>¡ Agregar “accesos directos” para ingresar en sus cuentas de la web sin necesidad de escribir nombres de usuarios o claves!</p> <p>“Accesos directos” incrementa notablemente la seguridad de sus claves desde que ud. puede:</p> <ul> <li> <p>usar claves complejas con comodidad;</p> </li> <li> <p>nunca más reusar la misma clave simple.</p> </li> </ul> <p> </p> <a href=\"http://www.clipperz.com/support/user_guide/direct_logins\" target=\"_blank\">Apreender más sobre “accesos directos”</a> ",
231 'mainPanelRecordsBlockLabel':"Tarjetas", 228 'mainPanelRecordsBlockLabel':"Tarjetas",
232 'mainPanelAddRecordButtonLabel':"Agregar tarjeta nueva", 229 'mainPanelAddRecordButtonLabel':"Agregar tarjeta nueva",
233 'mainPanelRemoveRecordButtonLabel':"Borrar tarjeta", 230 'mainPanelRemoveRecordButtonLabel':"Borrar tarjeta",
234 'mainPanelRecordFilterBlockAllLabel':"todo", 231 'mainPanelRecordFilterBlockAllLabel':"todo",
235 'mainPanelRecordFilterBlockTagsLabel':"tags", 232 'mainPanelRecordFilterBlockTagsLabel':"tags",
236 'mainPanelRecordFilterBlockSearchLabel':"buscar", 233 'mainPanelRecordFilterBlockSearchLabel':"buscar",
237 'recordDetailNoRecordAtAllTitle':"¡Bienvenido a Clipperz!", 234 'recordDetailNoRecordAtAllTitle':"¡Bienvenido a Clipperz!",
238 'recordDetailNoRecordAtAllDescription':"<h5>Comienze agregando tarjetas a su cuenta.</h5> <p>Tarjetas son formularios simples y flexibles donde Usted puede almacenar sus claves y cualquier otro dato confidencial.</p> <p>Tarjetas pueden contener credenciales para acceder a un sitio web, la conbinación del candado de su bicicleta, detalles de su tarjeta de crédito, ....</p> <h5>¡No olvide los bookmarklet!</h5> <p>Antes de comenzar, instale el “Agregar a Clipperz” bookmarklet: esta hará la creación de tarjetas más fácil y más divertida.</p> <p>Vaya al marcador “herramientas” para descubrir como instalar y usarlo.</p> <p> </p> <p>Luego simplemente haga click en el botón “Agregar nueva tarjeta” y disfrute su cuenta Clipperz.</p> <p> </p> <a href=\"http://www.clipperz.com/support/user_guide/managing_cards\" target=\"_blank\">Apreender más acerca de la creación y administración de las tarjetas</a> ", 235 'recordDetailNoRecordAtAllDescription':"<h5>Comienze agregando tarjetas a su cuenta.</h5> <p>Tarjetas son formularios simples y flexibles donde Usted puede almacenar sus claves y cualquier otro dato confidencial.</p> <p>Tarjetas pueden contener credenciales para acceder a un sitio web, la conbinación del candado de su bicicleta, detalles de su tarjeta de crédito, ....</p> <h5>¡No olvide los bookmarklet!</h5> <p>Antes de comenzar, instale el “Agregar a Clipperz” bookmarklet: esta hará la creación de tarjetas más fácil y más divertida.</p> <p>Vaya al marcador “herramientas” para descubrir como instalar y usarlo.</p> <p> </p> <p>Luego simplemente haga click en el botón “Agregar nueva tarjeta” y disfrute su cuenta Clipperz.</p> <p> </p> <a href=\"http://www.clipperz.com/support/user_guide/managing_cards\" target=\"_blank\">Apreender más acerca de la creación y administración de las tarjetas</a> ",
239 'newRecordWizardTitleBox':"<h5>Por favor seleccione una plantilla</h5> <p>Tarjetas son formularios simples y flexibles donde usted puede almacenar claves y cualquier otro dato confidencial.</p> <p>Comienze eligiendo una de las plantillas que se encuentran debajo. Usted siempre puede personalizar sus tarjetas más tarde agregando o borrando campos.</p> ", 236 'newRecordWizardTitleBox':"<h5>Por favor seleccione una plantilla</h5> <p>Tarjetas son formularios simples y flexibles donde usted puede almacenar claves y cualquier otro dato confidencial.</p> <p>Comienze eligiendo una de las plantillas que se encuentran debajo. Usted siempre puede personalizar sus tarjetas más tarde agregando o borrando campos.</p> ",
240 'newRecordWizardBookmarkletConfigurationTitle':"Acceso directo", 237 'newRecordWizardBookmarkletConfigurationTitle':"Acceso directo",
241 'newRecordWizardBookmarkletConfigurationDescription':"<p>Pegue debajo el código de configuración generado por el bookmarklet Clipperz.</p> <p>Una nueva tarjeta con un acceso directo a su cuenta web será creada.</p> ", 238 'newRecordWizardBookmarkletConfigurationDescription':"<p>Pegue debajo el código de configuración generado por el bookmarklet Clipperz.</p> <p>Una nueva tarjeta con un acceso directo a su cuenta web será creada.</p> ",
242 'newRecordWizardCreateButtonLabel':"Crear", 239 'newRecordWizardCreateButtonLabel':"Crear",
243 'newRecordWizardCancelButtonLabel':"Cancelar", 240 'newRecordWizardCancelButtonLabel':"Cancelar",
244 'donateSplashPanelTitle':"¡Apoye a Clipperz, haga una donación hoy!", 241 'donateSplashPanelTitle':"¡Apoye a Clipperz, haga una donación hoy!",
245 'donateSplashPanelDescription':"<p>Una pocas buenas razones para hacer una donación:</p> <ul> <li> <p>apoyar el desarrollo de nuevas utilidades</p> </li> <li> <p>mantener Clipperz gratuito</p> </li> <li> <p>mostrar su aprecio por nuestro duro trabajo</p> </li> </ul> <p>Por cualquier información adicional, por favor visite nuestra <a href=\"http://www.clipperz.com/donations\" target=\"_blank\">página de donaciones</a>.</p> <p> <b>¿Listo para hacer una donación?</b> </p> ", 242 'donateSplashPanelDescription':"<p>Una pocas buenas razones para hacer una donación:</p> <ul> <li> <p>apoyar el desarrollo de nuevas utilidades</p> </li> <li> <p>mantener Clipperz gratuito</p> </li> <li> <p>mostrar su aprecio por nuestro duro trabajo</p> </li> </ul> <p>Por cualquier información adicional, por favor visite nuestra <a href=\"http://www.clipperz.com/donations\" target=\"_blank\">página de donaciones</a>.</p> <p> <b>¿Listo para hacer una donación?</b> </p> ",
246 'donateCloseButtonLabel':"No todavía", 243 'donateCloseButtonLabel':"No todavía",
247 'donateDonateButtonLabel':"Si", 244 'donateDonateButtonLabel':"Si",
248 'recordTemplates':{ 245 'recordTemplates':{
249 'WebAccount':{ 246 'WebAccount':{
250 'title':"Contraseña web", 247 'title':"Contraseña web",
251 'description':"<p>Una simple tarjeta para almacenar sus credenciales de acceso a sus servicios online.</p> ", 248 'description':"<p>Una simple tarjeta para almacenar sus credenciales de acceso a sus servicios online.</p> ",
252 'fields':{ 249 'fields':{
253 'URL':"Dirección web", 250 'URL':"Dirección web",
254 'TXT':"Usuario o correo electrónico", 251 'TXT':"Usuario o correo electrónico",
255 'PWD':"Contraseña" 252 'PWD':"Contraseña"
256 } 253 }
257 }, 254 },
258 'BankAccount':{ 255 'BankAccount':{
259 'title':"Cuenta bancaria", 256 'title':"Cuenta bancaria",
260 'description':"<p>Almacene en forma segura su número de cuenta bancaria y credenciales de servicios bancarios en línea.</p> ", 257 'description':"<p>Almacene en forma segura su número de cuenta bancaria y credenciales de servicios bancarios en línea.</p> ",
261 'fields':{ 258 'fields':{
262 'TXT':"Banco", 259 'TXT':"Banco",
263 'TXT':"Número de cuenta", 260 'TXT':"Número de cuenta",
264 'URL':"Sitio web del Banco", 261 'URL':"Sitio web del Banco",
265 'TXT':"ID del servicio bancario en línea", 262 'TXT':"ID del servicio bancario en línea",
266 'PWD':"Contraseña del servicio bancario en línea" 263 'PWD':"Contraseña del servicio bancario en línea"
267 } 264 }
268 }, 265 },
269 'CreditCard':{ 266 'CreditCard':{
270 'title':"Tarjeta de crédito", 267 'title':"Tarjeta de crédito",
271 'description':"<p>Número de tarjeta, fecha de vencimiento, CVV2 y PIN siempre a mano con Clipperz.</p> ", 268 'description':"<p>Número de tarjeta, fecha de vencimiento, CVV2 y PIN siempre a mano con Clipperz.</p> ",
272 'fields':{ 269 'fields':{
273 'TXT':"Tipo (Visa, AmEx, ...)", 270 'TXT':"Tipo (Visa, AmEx, ...)",
274 'TXT':"Número", 271 'TXT':"Número",
275 'TXT':"Nombre del propietario", 272 'TXT':"Nombre del propietario",
276 'TXT':"Fecha de vencimiento", 273 'TXT':"Fecha de vencimiento",
277 'TXT':"CVV2", 274 'TXT':"CVV2",
278 'PWD':"PIN cajero automático", 275 'PWD':"PIN cajero automático",
279 'URL':"Sitio web tarjeta", 276 'URL':"Sitio web tarjeta",
280 'TXT':"Usuario", 277 'TXT':"Usuario",
281 'PWD':"Contraseña" 278 'PWD':"Contraseña"
282 } 279 }
283 }, 280 },
284 'AddressBookEntry':{ 281 'AddressBookEntry':{
285 'title':"Libreta de direcciones", 282 'title':"Libreta de direcciones",
286 'description':"<p>Clipperz puede también funcionar como su nueva libreta privada de direcciones. Use esta plantilla para crear fácilmente nuevas entradas.</p> ", 283 'description':"<p>Clipperz puede también funcionar como su nueva libreta privada de direcciones. Use esta plantilla para crear fácilmente nuevas entradas.</p> ",
287 'fields':{ 284 'fields':{
288 'TXT':"Nombre", 285 'TXT':"Nombre",
289 'TXT':"Correo electrónico", 286 'TXT':"Correo electrónico",
290 'TXT':"Teléfono", 287 'TXT':"Teléfono",
291 'TXT':"Móvil", 288 'TXT':"Móvil",
292 'ADDR':"Dirección" 289 'ADDR':"Dirección"
293 } 290 }
294 }, 291 },
295 'Custom':{ 292 'Custom':{
296 'title':" Tarjeta personalizada", 293 'title':" Tarjeta personalizada",
297 'description':"<p>No importa que tipo de dato confidencial usted necesita proteger, puede crear la tarjeta que necesite.</p> ", 294 'description':"<p>No importa que tipo de dato confidencial usted necesita proteger, puede crear la tarjeta que necesite.</p> ",
298 'fields':{ 295 'fields':{
299 'TXT':"Etiqueta 1", 296 'TXT':"Etiqueta 1",
300 'TXT':"Etiqueta 2", 297 'TXT':"Etiqueta 2",
301 'TXT':"Etiqueta 3" 298 'TXT':"Etiqueta 3"
302 } 299 }
303 } 300 }
304}, 301},
305 'recordFieldTypologies':{ 302 'recordFieldTypologies':{
306 'TXT':{ 303 'TXT':{
307 'description':"simple text field", 304 'description':"simple text field",
308 'shortDescription':"texto" 305 'shortDescription':"texto"
309 }, 306 },
310 'PWD':{ 307 'PWD':{
311 'description':"simple text field, with default status set to hidden", 308 'description':"simple text field, with default status set to hidden",
312 'shortDescription':"contraseña" 309 'shortDescription':"contraseña"
313 }, 310 },
314 'URL':{ 311 'URL':{
315 'description':"simple text field in edit mode, that became an active url in view mode", 312 'description':"simple text field in edit mode, that became an active url in view mode",
316 'shortDescription':"dirección web" 313 'shortDescription':"dirección web"
317 }, 314 },
318 'DATE':{ 315 'DATE':{
319 'description':"a value set with a calendar helper", 316 'description':"a value set with a calendar helper",
320 'shortDescription':"fecha" 317 'shortDescription':"fecha"
321 }, 318 },
322 'ADDR':{ 319 'ADDR':{
323 'description':"just like the URL, but the active link points to Google Maps (or similar service) passing the address value as argument", 320 'description':"just like the URL, but the active link points to Google Maps (or similar service) passing the address value as argument",
324 'shortDescription':"dirección postal" 321 'shortDescription':"dirección postal"
325 }, 322 },
326 'CHECK':{ 323 'CHECK':{
327 'description':"check description", 324 'description':"check description",
328 'shortDescription':"check" 325 'shortDescription':"check"
329 }, 326 },
330 'RADIO':{ 327 'RADIO':{
331 'description':"radio description", 328 'description':"radio description",
332 'shortDescription':"radio" 329 'shortDescription':"radio"
333 }, 330 },
334 'SELECT':{ 331 'SELECT':{
335 'description':"select description", 332 'description':"select description",
336 'shortDescription':"select" 333 'shortDescription':"select"
337 } 334 }
338}, 335},
339 'newRecordPanelGeneralExceptionTitle':"Error", 336 'newRecordPanelGeneralExceptionTitle':"Error",
340 'newRecordPanelGeneralExceptionMessage':"El texto de configuración no es válido. Asegúrese que toma su texto desde la ventana emergente del bookmarklet.", 337 'newRecordPanelGeneralExceptionMessage':"El texto de configuración no es válido. Asegúrese que toma su texto desde la ventana emergente del bookmarklet.",
341 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"Error", 338 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"Error",
342 'newRecordPanelWrongBookmarkletVersionExceptionMessage':"El texto de configuración ha sido generado por una versión anterior de bookmarklet. Por favor actualize su bookmarklet y pruebe nuevamente.", 339 'newRecordPanelWrongBookmarkletVersionExceptionMessage':"El texto de configuración ha sido generado por una versión anterior de bookmarklet. Por favor actualize su bookmarklet y pruebe nuevamente.",
343 'newRecordPanelExceptionPanelCloseButtonLabel':"Cancelar", 340 'newRecordPanelExceptionPanelCloseButtonLabel':"Cancelar",
344 'mainPanelDeletingRecordPanelConfirmationTitle':"Eliminando tarjeta seleccionada", 341 'mainPanelDeletingRecordPanelConfirmationTitle':"Eliminando tarjeta seleccionada",
345 'mainPanelDeleteRecordPanelConfirmationText':"¿Desea realmente eliminar la tarjeta seleccionada?", 342 'mainPanelDeleteRecordPanelConfirmationText':"¿Desea realmente eliminar la tarjeta seleccionada?",
346 'mainPanelDeleteRecordPanelConfirmButtonLabel':"Sí", 343 'mainPanelDeleteRecordPanelConfirmButtonLabel':"Sí",
347 'mainPanelDeleteRecordPanelDenyButtonLabel':"No", 344 'mainPanelDeleteRecordPanelDenyButtonLabel':"No",
348 'mainPanelDeletingRecordPanelInitialTitle':"Eliminando tarjeta seleccionada", 345 'mainPanelDeletingRecordPanelInitialTitle':"Eliminando tarjeta seleccionada",
349 'mainPanelDeletingRecordPanelCompletedText':"Hecho", 346 'mainPanelDeletingRecordPanelCompletedText':"Hecho",
350 'deleteRecordPanelCollectRecordDataMessageTitle':"Eliminar tarjeta", 347 'deleteRecordPanelCollectRecordDataMessageTitle':"Eliminar tarjeta",
351 'deleteRecordPanelCollectRecordDataMessageText':"Actualizando lista de tarjetas", 348 'deleteRecordPanelCollectRecordDataMessageText':"Actualizando lista de tarjetas",
352 'deleteRecordPanelEncryptUserDataMessageTitle':"Eliminar tarjeta", 349 'deleteRecordPanelEncryptUserDataMessageTitle':"Eliminar tarjeta",
353 'deleteRecordPanelEncryptUserDataMessageText':"Encriptación local de encabezamiento de tarjetas", 350 'deleteRecordPanelEncryptUserDataMessageText':"Encriptación local de encabezamiento de tarjetas",
354 'deleteRecordPanelSendingDataToTheServerMessageTitle':"Eliminar tarjeta", 351 'deleteRecordPanelSendingDataToTheServerMessageTitle':"Eliminar tarjeta",
355 'deleteRecordPanelSendingDataToTheServerMessageText':"Subiendo encabezamiento de tarjetas encriptadas a Clipperz", 352 'deleteRecordPanelSendingDataToTheServerMessageText':"Subiendo encabezamiento de tarjetas encriptadas a Clipperz",
356 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"Eliminar tarjeta", 353 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"Eliminar tarjeta",
357 'deleteRecordPanelUpdatingTheInterfaceMessageText':"Actualizando interface", 354 'deleteRecordPanelUpdatingTheInterfaceMessageText':"Actualizando interface",
358 'recordDetailNoRecordSelectedTitle':"No hay tarjetas seleccionadas", 355 'recordDetailNoRecordSelectedTitle':"No hay tarjetas seleccionadas",
359 'recordDetailNoRecordSelectedDescription':"<p>Por favor seleccione una tarjeta de la lista de la izquierda.</p> ", 356 'recordDetailNoRecordSelectedDescription':"<p>Por favor seleccione una tarjeta de la lista de la izquierda.</p> ",
360 'recordDetailLoadingRecordMessage':"Descargando tarjetas encriptadas desde Clipperz", 357 'recordDetailLoadingRecordMessage':"Descargando tarjetas encriptadas desde Clipperz",
361 'recordDetailDecryptingRecordMessage':"Desencriptación local de los datos de las tarjetas", 358 'recordDetailDecryptingRecordMessage':"Desencriptación local de los datos de las tarjetas",
362 'recordDetailLoadingRecordVersionMessage':"Descargando última versión de la tarjeta", 359 'recordDetailLoadingRecordVersionMessage':"Descargando última versión de la tarjeta",
363 'recordDetailDecryptingRecordVersionMessage':"Desencriptación local de la última versión", 360 'recordDetailDecryptingRecordVersionMessage':"Desencriptación local de la última versión",
364 'recordDetailLoadingErrorMessageTitle':"Error mientras descargaba la tarjeta", 361 'recordDetailLoadingErrorMessageTitle':"Error mientras descargaba la tarjeta",
365 'recordDetailNotesLabel':"Notas", 362 'recordDetailNotesLabel':"Notas",
366 'recordDetailLabelFieldColumnLabel':"Campo título", 363 'recordDetailLabelFieldColumnLabel':"Campo título",
367 'recordDetailDataFieldColumnLabel':"Campo de datos", 364 'recordDetailDataFieldColumnLabel':"Campo de datos",
368 'recordDetailTypeFieldColumnLabel':"Tipo", 365 'recordDetailTypeFieldColumnLabel':"Tipo",
369 'recordDetailSavingChangesMessagePanelInitialTitle':"Guardando tarjeta", 366 'recordDetailSavingChangesMessagePanelInitialTitle':"Guardando tarjeta",
370 'recordDetailAddFieldButtonLabel':"Agregar nuevo campo", 367 'recordDetailAddFieldButtonLabel':"Agregar nuevo campo",
371 'recordDetailPasswordFieldHelpLabel':"para copiar la contraseña al portapapeles, haga click en la estrella y luego Ctrl-C", 368 'recordDetailPasswordFieldHelpLabel':"para copiar la contraseña al portapapeles, haga click en la estrella y luego Ctrl-C",
372 'recordDetailPasswordFieldScrambleLabel':"ocultar", 369 'recordDetailPasswordFieldScrambleLabel':"ocultar",
373 'recordDetailPasswordFieldUnscrambleLabel':"mostrar", 370 'recordDetailPasswordFieldUnscrambleLabel':"mostrar",
374 'recordDetailDirectLoginBlockTitle':"Acceso directos", 371 'recordDetailDirectLoginBlockTitle':"Acceso directos",
375 'recordDetailNewDirectLoginDescription':"<p>Configuración de los accesos directos</p> ", 372 'recordDetailNewDirectLoginDescription':"<p>Configuración de los accesos directos</p> ",
376 'recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription':"<p>¿Esta tarjeta contiene credenciales para acceder a un servicio en línea?</p> <p>¡Use los bookmarklet para configurar un \"acceso directo\" desde Clpperz con solo un click!</p> ", 373 'recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription':"<p>¿Esta tarjeta contiene credenciales para acceder a un servicio en línea?</p> <p>¡Use los bookmarklet para configurar un \"acceso directo\" desde Clpperz con solo un click!</p> ",
377 'recordDetailAddNewDirectLoginButtonLabel':"Agregar nuevo acceso directo", 374 'recordDetailAddNewDirectLoginButtonLabel':"Agregar nuevo acceso directo",
378 'recordDetailEditButtonLabel':"Editar", 375 'recordDetailEditButtonLabel':"Editar",
379 'recordDetailSaveButtonLabel':"Guardar", 376 'recordDetailSaveButtonLabel':"Guardar",
380 'recordDetailCancelButtonLabel':"Cancelar", 377 'recordDetailCancelButtonLabel':"Cancelar",
381 'newRecordTitleLabel':"_nueva tarjeta_", 378 'newRecordTitleLabel':"_nueva tarjeta_",
382 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"Guardar tarjeta", 379 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"Guardar tarjeta",
383 'recordSaveChangesPanelCollectRecordInfoMessageText':"Actualizando encabezamiento de tarjetas", 380 'recordSaveChangesPanelCollectRecordInfoMessageText':"Actualizando encabezamiento de tarjetas",
384 'recordSaveChangesPanelEncryptUserDataMessageTitle':"Guardar tarjeta", 381 'recordSaveChangesPanelEncryptUserDataMessageTitle':"Guardar tarjeta",
385 'recordSaveChangesPanelEncryptUserDataMessageText':"Encriptación local de encabezamiento de tarjetas", 382 'recordSaveChangesPanelEncryptUserDataMessageText':"Encriptación local de encabezamiento de tarjetas",
386 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"Guardar tarjeta", 383 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"Guardar tarjeta",
387 'recordSaveChangesPanelEncryptRecordDataMessageText':"Encriptación local de los datos de la tarjeta", 384 'recordSaveChangesPanelEncryptRecordDataMessageText':"Encriptación local de los datos de la tarjeta",
388 'recordSaveChangesPanelEncryptRecordVersionDataMessageTitle':"Guardar tarjeta", 385 'recordSaveChangesPanelEncryptRecordVersionDataMessageTitle':"Guardar tarjeta",
389 'recordSaveChangesPanelEncryptRecordVersionDataMessageText':"Encriptación local de la versión de los datos de la tarjeta", 386 'recordSaveChangesPanelEncryptRecordVersionDataMessageText':"Encriptación local de la versión de los datos de la tarjeta",
390 'recordSaveChangesPanelSendingDataToTheServerMessageTitle':"Guardar tarjeta", 387 'recordSaveChangesPanelSendingDataToTheServerMessageTitle':"Guardar tarjeta",
391 'recordSaveChangesPanelSendingDataToTheServerMessageText':"Subiendo encabezamiento de tarjeta encriptada a Clipperz", 388 'recordSaveChangesPanelSendingDataToTheServerMessageText':"Subiendo encabezamiento de tarjeta encriptada a Clipperz",
392 'recordSaveChangesPanelUpdatingTheInterfaceMessageTitle':"Guardar tarjeta", 389 'recordSaveChangesPanelUpdatingTheInterfaceMessageTitle':"Guardar tarjeta",
393 'recordSaveChangesPanelUpdatingTheInterfaceMessageText':"Actualizando la interface", 390 'recordSaveChangesPanelUpdatingTheInterfaceMessageText':"Actualizando la interface",
394 'passwordGeneratorPanelTitle':"Generador de contraseñas", 391 'passwordGeneratorPanelTitle':"Generador de contraseñas",
395 'passwordGeneratorPanelOkLabel':"Ok", 392 'passwordGeneratorPanelOkLabel':"Ok",
396 'passwordGeneratorPanelCancelLabel':"Cancelar", 393 'passwordGeneratorPanelCancelLabel':"Cancelar",
397 'passwordGeneratorLengthLabel':"longitud:", 394 'passwordGeneratorLengthLabel':"longitud:",
398 //'DWRUtilLoadingMessage':"Cargando datos ...", 395 //'DWRUtilLoadingMessage':"Cargando datos ...",
399 'comingSoon':"próximamente ...", 396 'comingSoon':"próximamente ...",
400 'panelCollectingEntryopyMessageText':"Recogiendo entropía", 397 'panelCollectingEntryopyMessageText':"Recogiendo entropía",
401 'directLoginConfigurationCheckBoxFieldSelectedValue':"Sí", 398 'directLoginConfigurationCheckBoxFieldSelectedValue':"Sí",
402 'directLoginConfigurationCheckBoxFieldNotSelectedValue':"No", 399 'directLoginConfigurationCheckBoxFieldNotSelectedValue':"No",
403 'WELCOME_BACK':"¡Bienvenido!", 400 'WELCOME_BACK':"¡Bienvenido!",
404 'currentConnectionText':"Usted está ahora conectado desde ip&nbsp;__ip__, aparentemente desde __country__, usando __browser__ en __operatingSystem__.", 401 'currentConnectionText':"Usted está ahora conectado desde ip&nbsp;__ip__, aparentemente desde __country__, usando __browser__ en __operatingSystem__.",
405 'latestConnectionText':"Su última conexión fue __elapsedTimeDescription__ (__time__) desde ip&nbsp;__ip__, aparentemente desde __country__, usando __browser__ en __operatingSystem__.", 402 'latestConnectionText':"Su última conexión fue __elapsedTimeDescription__ (__time__) desde ip&nbsp;__ip__, aparentemente desde __country__, usando __browser__ en __operatingSystem__.",
406 'fullLoginHistoryLinkLabel':"mostrar historial de acceso", 403 'fullLoginHistoryLinkLabel':"mostrar historial de acceso",
407 'elapsedTimeDescriptions':{ 404 'elapsedTimeDescriptions':{
408 'MORE_THAN_A_MONTH_AGO':"más de un mes atrás", 405 'MORE_THAN_A_MONTH_AGO':"más de un mes atrás",
diff --git a/frontend/beta/js/Clipperz/PM/Strings/Strings_fr-FR.js b/frontend/beta/js/Clipperz/PM/Strings/Strings_fr-FR.js
index c137fb8..34467e9 100644
--- a/frontend/beta/js/Clipperz/PM/Strings/Strings_fr-FR.js
+++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_fr-FR.js
@@ -1,362 +1,359 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29Clipperz.PM.Strings.Languages['fr-FR'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 26Clipperz.PM.Strings.Languages['fr-FR'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], {
30 'clipperzServiceDescription':"<h2>Gardez le pour vous!</h2> <ul> <li> <h3>Clipperz est:</h3> <ul> <li> <p>un gestionnaire de mots de passe sécurisé</p> </li> <li> <p>une solution fiable d’authentification unique</p> </li> <li> <p>une chambre forte numérique pour vos données confidentielles</p> </li> </ul> </li> <li> <h3>Avec Clipperz vous pouvez:</h3> <ul> <li> <p>enregistrer et gérer vos mots de passe et autres informations d'identification en ligne</p> </li> <li> <p>vous identifier sur vos sites web sans avoir besoin de saisir votre nom d’utilisateur ou votre mot de passe</p> </li> <li> <p>protéger toutes vos données sensibles: codes d’alarmes, PINs (téléphone portable), carte de crédits, &hellip;</p> </li> <li> <p>partager certaines données confidentielles avec vos proches et vos associés (bientôt disponible!)</p> </li> </ul> </li> <li> <h3>Les avantages de Clipperz:</h3> <ul> <li> <p>c'est gratuit et totalement anonyme</p> </li> <li> <p>accéder à vos données depuis n’importe quel ordinateur</p> </li> <li> <p>vous n'avez besoin d'aucun logiciel et rien n'est à installer sur votre poste</p> </li> <li> <p>cela vous évite de garder des mots de passe sur votre PC ou sur des bouts de papier</p> </li> </ul> </li> <li> <h3>La sécurité de Clipperz:</h3> <ul> <li> <p>vos mots de passe sont localement chiffrés par votre navigateur avant d’être téléchargé à Clipperz</p> </li> <li> <p>la clé de cryptage est une phrase secrète détenue uniquement par vous même</p> </li> <li> <p>héberge vos données sensibles dans des formulaires cryptés et ne peuvent être consultées directement en clair</p> </li> <li> <p>est développé sur des standard de cryptage réputé sans aucune fantaisie ni de bricolage fait maison</p> </li> <li> <p>vous pouvez consulter le code source autant que vous le souhaitez</p> </li> </ul> </li> <li> <a href=\"http://www.clipperz.com\" target=\"_blank\">Plus d’informations</a> </li> </ul> ", 27 'clipperzServiceDescription':"<h2>Gardez le pour vous!</h2> <ul> <li> <h3>Clipperz est:</h3> <ul> <li> <p>un gestionnaire de mots de passe sécurisé</p> </li> <li> <p>une solution fiable d’authentification unique</p> </li> <li> <p>une chambre forte numérique pour vos données confidentielles</p> </li> </ul> </li> <li> <h3>Avec Clipperz vous pouvez:</h3> <ul> <li> <p>enregistrer et gérer vos mots de passe et autres informations d'identification en ligne</p> </li> <li> <p>vous identifier sur vos sites web sans avoir besoin de saisir votre nom d’utilisateur ou votre mot de passe</p> </li> <li> <p>protéger toutes vos données sensibles: codes d’alarmes, PINs (téléphone portable), carte de crédits, &hellip;</p> </li> <li> <p>partager certaines données confidentielles avec vos proches et vos associés (bientôt disponible!)</p> </li> </ul> </li> <li> <h3>Les avantages de Clipperz:</h3> <ul> <li> <p>c'est gratuit et totalement anonyme</p> </li> <li> <p>accéder à vos données depuis n’importe quel ordinateur</p> </li> <li> <p>vous n'avez besoin d'aucun logiciel et rien n'est à installer sur votre poste</p> </li> <li> <p>cela vous évite de garder des mots de passe sur votre PC ou sur des bouts de papier</p> </li> </ul> </li> <li> <h3>La sécurité de Clipperz:</h3> <ul> <li> <p>vos mots de passe sont localement chiffrés par votre navigateur avant d’être téléchargé à Clipperz</p> </li> <li> <p>la clé de cryptage est une phrase secrète détenue uniquement par vous même</p> </li> <li> <p>héberge vos données sensibles dans des formulaires cryptés et ne peuvent être consultées directement en clair</p> </li> <li> <p>est développé sur des standard de cryptage réputé sans aucune fantaisie ni de bricolage fait maison</p> </li> <li> <p>vous pouvez consulter le code source autant que vous le souhaitez</p> </li> </ul> </li> <li> <a href=\"http://www.clipperz.com\" target=\"_blank\">Plus d’informations</a> </li> </ul> ",
31 'loginFormTitle':"identifiez-vous avec votre compte Clipperz", 28 'loginFormTitle':"identifiez-vous avec votre compte Clipperz",
32 'loginFormUsernameLabel':"nom d’utilisateur", 29 'loginFormUsernameLabel':"nom d’utilisateur",
33 'loginFormPassphraseLabel':"phrase secrète", 30 'loginFormPassphraseLabel':"phrase secrète",
34 'loginFormDontHaveAnAccountLabel':"vous n’avez pas de compte?", 31 'loginFormDontHaveAnAccountLabel':"vous n’avez pas de compte?",
35 'loginFormCreateOneLabel':"créez votre compte", 32 'loginFormCreateOneLabel':"créez votre compte",
36 'loginFormForgotYourCredentialsLabel':"vous avez oublié votre certificat?", 33 'loginFormForgotYourCredentialsLabel':"vous avez oublié votre certificat?",
37 'loginFormAarghThatsBadLabel':"c’est fort dommage pour vous!", 34 'loginFormAarghThatsBadLabel':"c’est fort dommage pour vous!",
38 'loginFormAfraidOfMaliciousScriptsLabel':"vous avez peur des script malicieux?", 35 'loginFormAfraidOfMaliciousScriptsLabel':"vous avez peur des script malicieux?",
39 'loginFormVerifyTheCodeLabel':"vérifiez le code", 36 'loginFormVerifyTheCodeLabel':"vérifiez le code",
40 'loginFormButtonLabel':"S’identifer", 37 'loginFormButtonLabel':"S’identifer",
41 'loginPanelSwithLanguageDescription':"<p>Sélectionnez votre langue préféré</p> ", 38 'loginPanelSwithLanguageDescription':"<p>Sélectionnez votre langue préféré</p> ",
42 'browserCompatibilityDescription':"<p>Have a better and safer Clipperz experience with Firefox. However Clipperz works just fine also with Opera and MS Internet Explorer!</p> ", 39 'browserCompatibilityDescription':"<p>Have a better and safer Clipperz experience with Firefox. However Clipperz works just fine also with Opera and MS Internet Explorer!</p> ",
43 'loginMessagePanelInitialTitle':"En cours d’identification ...", 40 'loginMessagePanelInitialTitle':"En cours d’identification ...",
44 'loginMessagePanelInitialButtonLabel':"Annuler", 41 'loginMessagePanelInitialButtonLabel':"Annuler",
45 'loginMessagePanelConnectedTitle':"Connecté", 42 'loginMessagePanelConnectedTitle':"Connecté",
46 'loginMessagePanelConnectedText':"Terminé", 43 'loginMessagePanelConnectedText':"Terminé",
47 'loginMessagePanelFailureTitle':"Erreur", 44 'loginMessagePanelFailureTitle':"Erreur",
48 'loginMessagePanelFailureText':"Identification échoué", 45 'loginMessagePanelFailureText':"Identification échoué",
49 'loginMessagePanelFailureButtonLabel':"Fermer", 46 'loginMessagePanelFailureButtonLabel':"Fermer",
50 'connectionLoginSendingCredentialsMessageTitle':"Vérification des identifiants", 47 'connectionLoginSendingCredentialsMessageTitle':"Vérification des identifiants",
51 'connectionLoginSendingCredentialsMessageText':"Envoi des identifiants", 48 'connectionLoginSendingCredentialsMessageText':"Envoi des identifiants",
52 'connectionLoginCredentialsVerificationMessageTitle':"Vérification des identifiants", 49 'connectionLoginCredentialsVerificationMessageTitle':"Vérification des identifiants",
53 'connectionLoginCredentialsVerificationMessageText':"Authentification SRP en cours", 50 'connectionLoginCredentialsVerificationMessageText':"Authentification SRP en cours",
54 'connectionLoginDoneMessageTitle':"Vérification des identifiants", 51 'connectionLoginDoneMessageTitle':"Vérification des identifiants",
55 'connectionLoginDoneMessageText':"Connecté", 52 'connectionLoginDoneMessageText':"Connecté",
56 'userLoginPanelUpgradingUserCredentialsMessageTitle':"Vérification des identifiants", 53 'userLoginPanelUpgradingUserCredentialsMessageTitle':"Vérification des identifiants",
57 'userLoginPanelUpgradingUserCredentialsMessageText':"Mise à jour de vos identifiants à un nouveau schéma d’authentification", 54 'userLoginPanelUpgradingUserCredentialsMessageText':"Mise à jour de vos identifiants à un nouveau schéma d’authentification",
58 'userLoginPanelConnectedMessageTitle':"Utilisateur identifié", 55 'userLoginPanelConnectedMessageTitle':"Utilisateur identifié",
59 'userLoginPanelConnectedMessageText':"Vous vous êtes identifié avec succès", 56 'userLoginPanelConnectedMessageText':"Vous vous êtes identifié avec succès",
60 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"Vérification des identifiants", 57 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"Vérification des identifiants",
61 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"Nous essayons un ancien schéma d’authentification", 58 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"Nous essayons un ancien schéma d’authentification",
62 'userLoginPanelLoadingUserDataMessageTitle':"Utilisateur identifié", 59 'userLoginPanelLoadingUserDataMessageTitle':"Utilisateur identifié",
63 'userLoginPanelLoadingUserDataMessageText':"Téléchargement des cartes d’en-têtes chiffrés depuis Clipperz", 60 'userLoginPanelLoadingUserDataMessageText':"Téléchargement des cartes d’en-têtes chiffrés depuis Clipperz",
64 'userLoginPanelDecryptingUserDataMessageTitle':"Utilisateur identifié", 61 'userLoginPanelDecryptingUserDataMessageTitle':"Utilisateur identifié",
65 'userLoginPanelDecryptingUserDataMessageText':"Décryptage local des en-têtes chiffrés", 62 'userLoginPanelDecryptingUserDataMessageText':"Décryptage local des en-têtes chiffrés",
66 'userLoginPanelDecryptingUserStatisticsMessageTitle':"Utilisateur identifié", 63 'userLoginPanelDecryptingUserStatisticsMessageTitle':"Utilisateur identifié",
67 'userLoginPanelDecryptingUserStatisticsMessageText':"Décryptage local des statistiques", 64 'userLoginPanelDecryptingUserStatisticsMessageText':"Décryptage local des statistiques",
68 'splashAlertTitle':"Bienvenue sur Clipperz!", 65 'splashAlertTitle':"Bienvenue sur Clipperz!",
69 'splashAlertText':"<p>Conseils de sécurité</p> <ul> <li> <p>Le stockage de vos mots de passe sur Clipperz est aussi sécurisé que la phrase que vous avez sélectionnée pour les protéger. Personne ne peux y accéder tant que personne ne connait votre phrase secrète.</p> </li> <li> <p>Si vous allez utiliser Clipperz pour sauvegarder des informations sensibles et critiques assurez-vous d’utiliser une phrase secrète compliquée. Plus elle sera longue mieux ce sera!</p> </li> <li> <p>Clipperz ne sera pas capable de récupérer votre phrase secrète!</p> </li> </ul> <p>Pour toute autre information, veuillez vous référer au site <a href=\"http://www.clipperz.com\" target=\"_blank\">Clipperz</a>.</p> ", 66 'splashAlertText':"<p>Conseils de sécurité</p> <ul> <li> <p>Le stockage de vos mots de passe sur Clipperz est aussi sécurisé que la phrase que vous avez sélectionnée pour les protéger. Personne ne peux y accéder tant que personne ne connait votre phrase secrète.</p> </li> <li> <p>Si vous allez utiliser Clipperz pour sauvegarder des informations sensibles et critiques assurez-vous d’utiliser une phrase secrète compliquée. Plus elle sera longue mieux ce sera!</p> </li> <li> <p>Clipperz ne sera pas capable de récupérer votre phrase secrète!</p> </li> </ul> <p>Pour toute autre information, veuillez vous référer au site <a href=\"http://www.clipperz.com\" target=\"_blank\">Clipperz</a>.</p> ",
70 'splashAlertCloseButtonLabel':"Ok", 67 'splashAlertCloseButtonLabel':"Ok",
71 'registrationFormTitle':"créer votre compte", 68 'registrationFormTitle':"créer votre compte",
72 'registrationFormUsernameLabel':"nom d’utilisateur", 69 'registrationFormUsernameLabel':"nom d’utilisateur",
73 'registrationFormPassphraseLabel':"phrase secrète", 70 'registrationFormPassphraseLabel':"phrase secrète",
74 'registrationFormRetypePassphraseLabel':"re-saisissez votre phrase secrète", 71 'registrationFormRetypePassphraseLabel':"re-saisissez votre phrase secrète",
75 'registrationFormSafetyCheckLabel':"J’accepte que Clipperz ne pourra pas récupérer ma phrase secrète.", 72 'registrationFormSafetyCheckLabel':"J’accepte que Clipperz ne pourra pas récupérer ma phrase secrète.",
76 'registrationFormTermsOfServiceCheckLabel':"J’ai lu et j’accepte les <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Conditions d’Utilisation du Service</a>.", 73 'registrationFormTermsOfServiceCheckLabel':"J’ai lu et j’accepte les <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Conditions d’Utilisation du Service</a>.",
77 'registrationFormDoYouAlreadyHaveAnAccountLabel':"avez-vous déjà un compte?", 74 'registrationFormDoYouAlreadyHaveAnAccountLabel':"avez-vous déjà un compte?",
78 'registrationFormSimplyLoginLabel':"identifiez-vous", 75 'registrationFormSimplyLoginLabel':"identifiez-vous",
79 'registrationFormButtonLabel':"S’inscrire", 76 'registrationFormButtonLabel':"S’inscrire",
80 'registrationFormWarningMessageNotMatchingPassphrases':"Vos phrases secrètes ne correspondent pas, veuillez les saisir à nouveau.", 77 'registrationFormWarningMessageNotMatchingPassphrases':"Vos phrases secrètes ne correspondent pas, veuillez les saisir à nouveau.",
81 'registrationFormWarningMessageSafetyCheckNotSelected':"Veuillez lire et cocher les cases-à-cocher ci-dessous.", 78 'registrationFormWarningMessageSafetyCheckNotSelected':"Veuillez lire et cocher les cases-à-cocher ci-dessous.",
82 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"Vous devez accepter les “Conditions d’Utilisation du Service”.", 79 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"Vous devez accepter les “Conditions d’Utilisation du Service”.",
83 'registrationMessagePanelInitialTitle':"Création du compte en cours ...", 80 'registrationMessagePanelInitialTitle':"Création du compte en cours ...",
84 'registrationMessagePanelInitialButtonLabel':"Annuler", 81 'registrationMessagePanelInitialButtonLabel':"Annuler",
85 'registrationMessagePanelRegistrationDoneTitle':"Enregistrement", 82 'registrationMessagePanelRegistrationDoneTitle':"Enregistrement",
86 'registrationMessagePanelRegistrationDoneText':"Terminé", 83 'registrationMessagePanelRegistrationDoneText':"Terminé",
87 'registrationMessagePanelFailureTitle':"Enregistrement échoué", 84 'registrationMessagePanelFailureTitle':"Enregistrement échoué",
88 'registrationMessagePanelFailureButtonLabel':"Fermer", 85 'registrationMessagePanelFailureButtonLabel':"Fermer",
89 'connectionRegistrationSendingRequestMessageText':"Vérification en cours des identifiants", 86 'connectionRegistrationSendingRequestMessageText':"Vérification en cours des identifiants",
90 'connectionRegistrationSendingCredentialsMessageText':"Envoi des identifiants", 87 'connectionRegistrationSendingCredentialsMessageText':"Envoi des identifiants",
91 'registrationSplashPanelTitle':"Conseils de sécurité", 88 'registrationSplashPanelTitle':"Conseils de sécurité",
92 'registrationSplashPanelDescription':"<p>Ce sont vos identifiants Clipperz, gardez les biens. Clipperz ne va plus jamais vous montrer votre nom d’utilisateur et votre phrase secrète!</p> ", 89 'registrationSplashPanelDescription':"<p>Ce sont vos identifiants Clipperz, gardez les biens. Clipperz ne va plus jamais vous montrer votre nom d’utilisateur et votre phrase secrète!</p> ",
93 'registrationSplashPanelUsernameLabel':"nom d’utilisateur", 90 'registrationSplashPanelUsernameLabel':"nom d’utilisateur",
94 'registrationSplashPanelPassphraseLabel':"phrase secrète", 91 'registrationSplashPanelPassphraseLabel':"phrase secrète",
95 'registrationSplashPanelShowPassphraseButtonLabel':"afficher la phrase secrète", 92 'registrationSplashPanelShowPassphraseButtonLabel':"afficher la phrase secrète",
96 'donateHeaderLinkLabel':"faites un don", 93 'donateHeaderLinkLabel':"faites un don",
97 'creditsHeaderLinkLabel':"crédits", 94 'creditsHeaderLinkLabel':"crédits",
98 'feedbackHeaderLinkLabel':"votre avis", 95 'feedbackHeaderLinkLabel':"votre avis",
99 'helpHeaderLinkLabel':"aide", 96 'helpHeaderLinkLabel':"aide",
100 'forumHeaderLinkLabel':"forum", 97 'forumHeaderLinkLabel':"forum",
101 'recordMenuLabel':"cartes", 98 'recordMenuLabel':"cartes",
102 'accountMenuLabel':"compte", 99 'accountMenuLabel':"compte",
103 'dataMenuLabel':"données", 100 'dataMenuLabel':"données",
104 'contactsMenuLabel':"contacts", 101 'contactsMenuLabel':"contacts",
105 'toolsMenuLabel':"outils", 102 'toolsMenuLabel':"outils",
106 'logoutMenuLabel':"déconnexion", 103 'logoutMenuLabel':"déconnexion",
107 'lockMenuLabel':"verrouiller", 104 'lockMenuLabel':"verrouiller",
108 'lockTitle':"Le compte est verrouillé", 105 'lockTitle':"Le compte est verrouillé",
109 'lockDescription':"<p>Pour déverrouiller votre compte, veuillez saisir votre phrase secrète</p> ", 106 'lockDescription':"<p>Pour déverrouiller votre compte, veuillez saisir votre phrase secrète</p> ",
110 'unlockButtonLabel':"Déverrouiller", 107 'unlockButtonLabel':"Déverrouiller",
111 'changePasswordTabLabel':"Changer votre phrase secrète", 108 'changePasswordTabLabel':"Changer votre phrase secrète",
112 'changePasswordTabTitle':"Changer votre phrase secrète", 109 'changePasswordTabTitle':"Changer votre phrase secrète",
113 'changePasswordFormUsernameLabel':"nom d’utilisateur", 110 'changePasswordFormUsernameLabel':"nom d’utilisateur",
114 'changePasswordFormOldPassphraseLabel':"ancienne phrase secrète", 111 'changePasswordFormOldPassphraseLabel':"ancienne phrase secrète",
115 'changePasswordFormNewPassphraseLabel':"nouvelle phrase secrète", 112 'changePasswordFormNewPassphraseLabel':"nouvelle phrase secrète",
116 'changePasswordFormRetypePassphraseLabel':"re-saisissez phrase secrète", 113 'changePasswordFormRetypePassphraseLabel':"re-saisissez phrase secrète",
117 'changePasswordFormSafetyCheckboxLabel':"Je sais que Clipperz ne pourra pas récupérer ma phrase secrète.", 114 'changePasswordFormSafetyCheckboxLabel':"Je sais que Clipperz ne pourra pas récupérer ma phrase secrète.",
118 'changePasswordFormSubmitLabel':"Changer ma phrase secrète", 115 'changePasswordFormSubmitLabel':"Changer ma phrase secrète",
119 'changePasswordFormWrongUsernameWarning':"Nom d’utilisateur incorrect", 116 'changePasswordFormWrongUsernameWarning':"Nom d’utilisateur incorrect",
120 'changePasswordFormWrongPassphraseWarning':"Phrase secrète incorrect", 117 'changePasswordFormWrongPassphraseWarning':"Phrase secrète incorrect",
121 'changePasswordFormWrongRetypePassphraseWarning':"Votre phrase secrète ne correspond pas, veuillez la saisir à nouveau", 118 'changePasswordFormWrongRetypePassphraseWarning':"Votre phrase secrète ne correspond pas, veuillez la saisir à nouveau",
122 'changePasswordFormSafetyCheckWarning':"Veuillez lire et cocher la case-à-cocher ci-dessous", 119 'changePasswordFormSafetyCheckWarning':"Veuillez lire et cocher la case-à-cocher ci-dessous",
123 'changePasswordFormProgressDialogTitle':"Changement des identifiants utilisateurs", 120 'changePasswordFormProgressDialogTitle':"Changement des identifiants utilisateurs",
124 'changePasswordFormProgressDialogConnectedMessageTitle':"Connecté", 121 'changePasswordFormProgressDialogConnectedMessageTitle':"Connecté",
125 'changePasswordFormProgressDialogConnectedMessageText':"Terminé", 122 'changePasswordFormProgressDialogConnectedMessageText':"Terminé",
126 'changePasswordFormProgressDialogErrorMessageTitle':"Erreur", 123 'changePasswordFormProgressDialogErrorMessageTitle':"Erreur",
127 'changePasswordFormProgressDialogErrorMessageText':"Changement de identifiants échoué!", 124 'changePasswordFormProgressDialogErrorMessageText':"Changement de identifiants échoué!",
128 'changeCredentialsPanelEncryptingDataMessageTitle':"Changement de votre phrase secrète", 125 'changeCredentialsPanelEncryptingDataMessageTitle':"Changement de votre phrase secrète",
129 'changeCredentialsPanelEncryptingDataMessageText':"Cryptage local des identifiants", 126 'changeCredentialsPanelEncryptingDataMessageText':"Cryptage local des identifiants",
130 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"Modifier votre phrase secrète", 127 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"Modifier votre phrase secrète",
131 'changeCredentialsPanelCreatingNewCredentialsMessageText':"Mettre à jour vos identifiants", 128 'changeCredentialsPanelCreatingNewCredentialsMessageText':"Mettre à jour vos identifiants",
132 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Modifier votre phrase secrète", 129 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Modifier votre phrase secrète",
133 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Téléchargement de vos identifiants sur Clipperz.com", 130 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Téléchargement de vos identifiants sur Clipperz.com",
134 'changeCredentialsPanelDoneMessageTitle':"Modifier votre phrase secrète", 131 'changeCredentialsPanelDoneMessageTitle':"Modifier votre phrase secrète",
135 'changeCredentialsPanelDoneMessageText':"Terminé", 132 'changeCredentialsPanelDoneMessageText':"Terminé",
136 'manageOTPTabLabel':"Mettre à jour votre phrase secrète à usage unique", 133 'manageOTPTabLabel':"Mettre à jour votre phrase secrète à usage unique",
137 'manageOTPTabTitle':"Mettre à jour votre phrase secrète à usage unique", 134 'manageOTPTabTitle':"Mettre à jour votre phrase secrète à usage unique",
138 'manageOTPTabDescription':"<p>Une phrase secrète à usage unique fonctionne comme votre phrase secrète habituelle, mais elle ne peut être utilisé qu'une seule fois.</p> <p>Si la phrase secrète est utilisé de nouveau et que vous tenté de vous identifier à nouveau, vous serez rejeté et le processus d'identification échouera.</p> <p>Juste après une identification correcte, votre phrase secrète à usage unique sera effacée pour interdire tout accès frauduleux.</p> <p>Les phrases secrètes à usage unique sont un excellent choix si vous craignez qu'un logiciel espion ne vole vos données après avoir infecté votre machine.</p> <p> <b>Il est fortement recommandé d'utiliser des phrases secrètes à usage unique lorsque vous accédez à Clipperz depuis un terminal public, comme un cybercafé ou une borne Internet.</b> </p> ", 135 'manageOTPTabDescription':"<p>Une phrase secrète à usage unique fonctionne comme votre phrase secrète habituelle, mais elle ne peut être utilisé qu'une seule fois.</p> <p>Si la phrase secrète est utilisé de nouveau et que vous tenté de vous identifier à nouveau, vous serez rejeté et le processus d'identification échouera.</p> <p>Juste après une identification correcte, votre phrase secrète à usage unique sera effacée pour interdire tout accès frauduleux.</p> <p>Les phrases secrètes à usage unique sont un excellent choix si vous craignez qu'un logiciel espion ne vole vos données après avoir infecté votre machine.</p> <p> <b>Il est fortement recommandé d'utiliser des phrases secrètes à usage unique lorsque vous accédez à Clipperz depuis un terminal public, comme un cybercafé ou une borne Internet.</b> </p> ",
139 'accountPreferencesLabel':"Préférences", 136 'accountPreferencesLabel':"Préférences",
140 'accountPreferencesTabTitle':"Préférences", 137 'accountPreferencesTabTitle':"Préférences",
141 'accountPreferencesLanguageTitle':"Choix de la langue", 138 'accountPreferencesLanguageTitle':"Choix de la langue",
142 'accountPreferencesLanguageDescription':"<p>Choisissez la langue d'affichage de Clipperz dans la liste suivante.</p> ", 139 'accountPreferencesLanguageDescription':"<p>Choisissez la langue d'affichage de Clipperz dans la liste suivante.</p> ",
143 'accountPreferencesInterfaceTitle':"Personnalisation de l'interface", 140 'accountPreferencesInterfaceTitle':"Personnalisation de l'interface",
144 'accountPreferencesInterfaceDescription':"<p>Ajustez l'interface de Clipperz à vos besoins.</p> ", 141 'accountPreferencesInterfaceDescription':"<p>Ajustez l'interface de Clipperz à vos besoins.</p> ",
145 'saveUserPreferencesFormSubmitLabel':"Enregistrer", 142 'saveUserPreferencesFormSubmitLabel':"Enregistrer",
146 'cancelUserPreferencesFormSubmitLabel':"Annuler", 143 'cancelUserPreferencesFormSubmitLabel':"Annuler",
147 'accountPreferencesSavingPanelTitle_Step1':"Enregistrement des préférences", 144 'accountPreferencesSavingPanelTitle_Step1':"Enregistrement des préférences",
148 'accountPreferencesSavingPanelText_Step1':"Chiffrement local de vos préférences", 145 'accountPreferencesSavingPanelText_Step1':"Chiffrement local de vos préférences",
149 'accountPreferencesSavingPanelTitle_Step2':"Enregistrement des préférences", 146 'accountPreferencesSavingPanelTitle_Step2':"Enregistrement des préférences",
150 'accountPreferencesSavingPanelText_Step2':"Transmission des préférences chiffrées au serveur", 147 'accountPreferencesSavingPanelText_Step2':"Transmission des préférences chiffrées au serveur",
151 'deleteAccountTabLabel':"Supprimer votre compte", 148 'deleteAccountTabLabel':"Supprimer votre compte",
152 'deleteAccountTabTitle':"Supprimer votre compte", 149 'deleteAccountTabTitle':"Supprimer votre compte",
153 'deleteAccountFormUsernameLabel':"nom d’utilisateur", 150 'deleteAccountFormUsernameLabel':"nom d’utilisateur",
154 'deleteAccountFormPassphraseLabel':"phrase secrète", 151 'deleteAccountFormPassphraseLabel':"phrase secrète",
155 'deleteAccountFormSafetyCheckboxLabel':"Je sais que toute mes données seront supprimés et que cette action sera irréversible.", 152 'deleteAccountFormSafetyCheckboxLabel':"Je sais que toute mes données seront supprimés et que cette action sera irréversible.",
156 'deleteAccountFormSubmitLabel':"Supprimer mon compte", 153 'deleteAccountFormSubmitLabel':"Supprimer mon compte",
157 'deleteAccountFormWrongUsernameWarning':"Nom d’utilisateur incorrect", 154 'deleteAccountFormWrongUsernameWarning':"Nom d’utilisateur incorrect",
158 'deleteAccountFormWrongPassphraseWarning':"Phrase secrète incorrect", 155 'deleteAccountFormWrongPassphraseWarning':"Phrase secrète incorrect",
159 'deleteAccountFormSafetyCheckWarning':"Veuillez lire et cocher la case-à-cocher ci-dessous.", 156 'deleteAccountFormSafetyCheckWarning':"Veuillez lire et cocher la case-à-cocher ci-dessous.",
160 'accountPanelDeletingAccountPanelConfirmationTitle':"ATTENTION", 157 'accountPanelDeletingAccountPanelConfirmationTitle':"ATTENTION",
161 'accountPanelDeleteAccountPanelConfirmationText':"Êtes-vous sûr de vouloir supprimer ce compte?", 158 'accountPanelDeleteAccountPanelConfirmationText':"Êtes-vous sûr de vouloir supprimer ce compte?",
162 'accountPanelDeleteAccountPanelConfirmButtonLabel':"Oui", 159 'accountPanelDeleteAccountPanelConfirmButtonLabel':"Oui",
163 'accountPanelDeleteAccountPanelDenyButtonLabel':"Non", 160 'accountPanelDeleteAccountPanelDenyButtonLabel':"Non",
164 'offlineCopyTabLabel':"Copie locale", 161 'offlineCopyTabLabel':"Copie locale",
165 'offlineCopyTabTitle':"Copie locale", 162 'offlineCopyTabTitle':"Copie locale",
166 'offlineCopyTabDescription':"<p>D'un seul click, vous pouvez télécharger toutes vos données chiffrées des serveurs Clipperz sur votre disque dur, créant ainsi une version déconnecté de Clipperz utilisable lorsque vous n'êtes pas connectés à Internet.</p> <p>Cette version en lecture seule est aussi sécurisée que la version en lecture-écriture, et n'expose pas vos données à un risque plus élevé. Elles partagent en effet le même code et la même architecture de sécurité.</p> <ol> <li> <p>Cliquez sur le liens ci-dessous pour lancer le téléchargement.</p> </li> <li> <p>Votre navigateur vous demandera que faire du fichier “Clipperz_YYYYMMDD.html”. Sauvez le sur votre disque dur.</p> </li> <li> <p>Puis double-cliquez sur le fichier téléchargé pour lancer la version déconnectée dans votre navigateur.</p> </li> <li> <p>Utilisez vos nom d’utilisateur et phrase secrète habituels.</p> </li> </ol> ", 163 'offlineCopyTabDescription':"<p>D'un seul click, vous pouvez télécharger toutes vos données chiffrées des serveurs Clipperz sur votre disque dur, créant ainsi une version déconnecté de Clipperz utilisable lorsque vous n'êtes pas connectés à Internet.</p> <p>Cette version en lecture seule est aussi sécurisée que la version en lecture-écriture, et n'expose pas vos données à un risque plus élevé. Elles partagent en effet le même code et la même architecture de sécurité.</p> <ol> <li> <p>Cliquez sur le liens ci-dessous pour lancer le téléchargement.</p> </li> <li> <p>Votre navigateur vous demandera que faire du fichier “Clipperz_YYYYMMDD.html”. Sauvez le sur votre disque dur.</p> </li> <li> <p>Puis double-cliquez sur le fichier téléchargé pour lancer la version déconnectée dans votre navigateur.</p> </li> <li> <p>Utilisez vos nom d’utilisateur et phrase secrète habituels.</p> </li> </ol> ",
167 'offlineCopyDownloadLinkLabel':"Télécharger", 164 'offlineCopyDownloadLinkLabel':"Télécharger",
168 'sharingTabLabel':"Partager", 165 'sharingTabLabel':"Partager",
169 'sharingTabTitle':"Partager", 166 'sharingTabTitle':"Partager",
170 'sharingTabDescription':"<p>De temps en temps il est nécessaire de partager des parties de vos informations confidentiels avec une ou plusieurs personnes.</p> <p>Cela pourrait être aussi simple que l’octroi à un collègue de votre code d’accès à votre messagerie vocale quand vous êtes hors du bureau, ou aussi compliqués que la permission d’ayant droit aux héritiers pour avoir accès à votre boîte de coffre-fort à la banque locale.</p> <p>Clipperz vous permez donc de partager vos mots de passe grâce à un processe sûr et direct.</p> <p> </p> <p> <b>Prochainement disponible ...</b> </p> ", 167 'sharingTabDescription':"<p>De temps en temps il est nécessaire de partager des parties de vos informations confidentiels avec une ou plusieurs personnes.</p> <p>Cela pourrait être aussi simple que l’octroi à un collègue de votre code d’accès à votre messagerie vocale quand vous êtes hors du bureau, ou aussi compliqués que la permission d’ayant droit aux héritiers pour avoir accès à votre boîte de coffre-fort à la banque locale.</p> <p>Clipperz vous permez donc de partager vos mots de passe grâce à un processe sûr et direct.</p> <p> </p> <p> <b>Prochainement disponible ...</b> </p> ",
171 'importTabLabel':"Importer", 168 'importTabLabel':"Importer",
172 'importTabTitle':"Importer", 169 'importTabTitle':"Importer",
173 'importTabDescription':"<p> <b>Prochainement disponible ...</b> </p> ", 170 'importTabDescription':"<p> <b>Prochainement disponible ...</b> </p> ",
174 'printingTabLabel':"Exporter", 171 'printingTabLabel':"Exporter",
175 'printingTabTitle':"Exporter", 172 'printingTabTitle':"Exporter",
176 'printingTabDescription':"<p> <b>Version d’impression</b> </p> <p>En cliquant sur ce bouton vous ouvrirez une fenêtre contenant vos en-têtes cryptés dans un format d’impression.</p> <p>Si vous imprimez pour des raisons de sauvegarde personnel, veuillez vous tourner vers une solution plus sécurisé comme la version “Copie locale”.</p> ", 173 'printingTabDescription':"<p> <b>Version d’impression</b> </p> <p>En cliquant sur ce bouton vous ouvrirez une fenêtre contenant vos en-têtes cryptés dans un format d’impression.</p> <p>Si vous imprimez pour des raisons de sauvegarde personnel, veuillez vous tourner vers une solution plus sécurisé comme la version “Copie locale”.</p> ",
177 'printingLinkLabel':"Version imprimable", 174 'printingLinkLabel':"Version imprimable",
178 'contactsTabLabel':"Contacts", 175 'contactsTabLabel':"Contacts",
179 'contactsTabTitle':"Contacts", 176 'contactsTabTitle':"Contacts",
180 'passwordGeneratorTabLabel':"Générateur de mot de passe", 177 'passwordGeneratorTabLabel':"Générateur de mot de passe",
181 'bookmarkletTabLabel':"Bookmarklet", 178 'bookmarkletTabLabel':"Bookmarklet",
182 'passwordGeneratorTabTitle':"Générateur de mot de passe", 179 'passwordGeneratorTabTitle':"Générateur de mot de passe",
183 'bookmarkletTabTitle':"Bookmarklet", 180 'bookmarkletTabTitle':"Bookmarklet",
184 'paswordGeneratorTabDescription':"<p> </p> ", 181 'paswordGeneratorTabDescription':"<p> </p> ",
185 'passwordGeneratorTabButtonLabel':" Générer un mot de passe", 182 'passwordGeneratorTabButtonLabel':" Générer un mot de passe",
186 'bookmarkletTabDescription':"<p>Un bookmarklet est un outil “clique unique” simple qui peut exécuter des tâches très utiles. Il peut être sauvegardé et utilisé comme un signet de page Web normal.</p> <p>Le bookmarklet Clipperz vous aidera à rapidement créer de nouvelles cartes et des nouveaux “accès directs” avec vos cartes existantes.</p> <p> <b>Notez s’il vous plaît que le bookmarklet n’inclut pas d’informations liées à votre compte (par exemple votre nom d’utilisateur ou votre phrase secrète), le bookmarklet est un outil général contenant le même code pour chaque utilisateur Clipperz.</b> </p> <div> <p>Pour installer le bookmarklet <b>glissez & déposez</b> le lien ci-dessous dans votre bar de navigation.</p> </div> ", 183 'bookmarkletTabDescription':"<p>Un bookmarklet est un outil “clique unique” simple qui peut exécuter des tâches très utiles. Il peut être sauvegardé et utilisé comme un signet de page Web normal.</p> <p>Le bookmarklet Clipperz vous aidera à rapidement créer de nouvelles cartes et des nouveaux “accès directs” avec vos cartes existantes.</p> <p> <b>Notez s’il vous plaît que le bookmarklet n’inclut pas d’informations liées à votre compte (par exemple votre nom d’utilisateur ou votre phrase secrète), le bookmarklet est un outil général contenant le même code pour chaque utilisateur Clipperz.</b> </p> <div> <p>Pour installer le bookmarklet <b>glissez & déposez</b> le lien ci-dessous dans votre bar de navigation.</p> </div> ",
187 'bookmarkletTabBookmarkletTitle':"Ajouter à Clipperz", 184 'bookmarkletTabBookmarkletTitle':"Ajouter à Clipperz",
188 'bookmarkletTabInstructions':"<h3>Comment créer une carte comprenant un lien de “accès direct” à un service en ligne</h3> <ol> <li> <p>Ouvrir la page Web où le site affiche un formulaire d’identification. (C’est la page où vous entrez d’habitude vos informations d'identification)</p> </li> <li> <p>Lancer le bookmarklet en cliquant dessus : une fenêtre contextuelle apparait alors sur la page Web.</p> </li> <li> <p>Copier dans le presse-papiers le contenu du grand secteur de texte dans le menu contextuel. (Ctrl-C)</p> </li> <li> <p>Entrer dans votre compte Clipperz et cliquer sur <b>“Ajouter une nouvelle carte”</b>.</p> </li> <li> <p>Coller le presse-papiers dans la zone de texte et rajouter un titre (facultatif). (Ctrl-V)</p> </li> <li> <p>Cliquer sur le bouton <b>“Créer”</b>, repassez en revu les détails et cliquer <b>“Sauver”</b>. De plus amples informations sont disponibles <a href=\"http://www.clipperz.com/support/user_guide/bookmarklet\" target=\"_blank\">ici</a>.</p> </li> </ol> <h3>Comment ajouter un lien de “accès direct” à une carte existante</h3> <ol> <li> <p>Idem que précédemment.</p> </li> <li> <p>Idem que précédemment..</p> </li> <li> <p>Idem que précédemment.</p> </li> <li> <p>Entrer dans votre compte Clipperz et sélectionner la carte crypté qui contient les identifiants pour le service web que vous venez tout juste de visiter et cliquer sur <b>“Modifier”</b>.</p> </li> <li> <p>Coller le presse-papier dans la zone de texte <b>“Accès directs”</b>. (ctrl-V)</p> </li> <li> <p>Cliquer sur <b>“Ajouter un accès direct”</b>, repassez en revu les détails et cliquer <b>“Sauver”</b>.</p> </li> </ol> ", 185 'bookmarkletTabInstructions':"<h3>Comment créer une carte comprenant un lien de “accès direct” à un service en ligne</h3> <ol> <li> <p>Ouvrir la page Web où le site affiche un formulaire d’identification. (C’est la page où vous entrez d’habitude vos informations d'identification)</p> </li> <li> <p>Lancer le bookmarklet en cliquant dessus : une fenêtre contextuelle apparait alors sur la page Web.</p> </li> <li> <p>Copier dans le presse-papiers le contenu du grand secteur de texte dans le menu contextuel. (Ctrl-C)</p> </li> <li> <p>Entrer dans votre compte Clipperz et cliquer sur <b>“Ajouter une nouvelle carte”</b>.</p> </li> <li> <p>Coller le presse-papiers dans la zone de texte et rajouter un titre (facultatif). (Ctrl-V)</p> </li> <li> <p>Cliquer sur le bouton <b>“Créer”</b>, repassez en revu les détails et cliquer <b>“Sauver”</b>. De plus amples informations sont disponibles <a href=\"http://www.clipperz.com/support/user_guide/bookmarklet\" target=\"_blank\">ici</a>.</p> </li> </ol> <h3>Comment ajouter un lien de “accès direct” à une carte existante</h3> <ol> <li> <p>Idem que précédemment.</p> </li> <li> <p>Idem que précédemment..</p> </li> <li> <p>Idem que précédemment.</p> </li> <li> <p>Entrer dans votre compte Clipperz et sélectionner la carte crypté qui contient les identifiants pour le service web que vous venez tout juste de visiter et cliquer sur <b>“Modifier”</b>.</p> </li> <li> <p>Coller le presse-papier dans la zone de texte <b>“Accès directs”</b>. (ctrl-V)</p> </li> <li> <p>Cliquer sur <b>“Ajouter un accès direct”</b>, repassez en revu les détails et cliquer <b>“Sauver”</b>.</p> </li> </ol> ",
189 'mainPanelDirectLoginBlockLabel':"Accès directs", 186 'mainPanelDirectLoginBlockLabel':"Accès directs",
190 'directLinkReferenceShowButtonLabel':"voir", 187 'directLinkReferenceShowButtonLabel':"voir",
191 'mainPanelDirectLoginBlockDescription':"<p>Ajouter une “accès direct” pour vous identifier sans avoir besoin de taper vos identifiants de connexions!</p> <p>Les “accès directs” augmente considérablement la sécurité de vos mots passes dans la mesure où vous pouvez:</p> <ul> <li> <p>adopter et saisir des mots de passe complexes;</p> </li> <li> <p>ne réutilisez le même mot de passe et ne mettez plus de mots de passe facile à deviner.</p> </li> </ul> <p>Simple et rapide à configurer avec le Clipperz <b>bookmarklet</b>.</p> <a href=\"http://www.clipperz.com/support/user_guide/direct_logins\" target=\"_blank\">Pour en savoir plus sur les “accès directs”</a> ", 188 'mainPanelDirectLoginBlockDescription':"<p>Ajouter une “accès direct” pour vous identifier sans avoir besoin de taper vos identifiants de connexions!</p> <p>Les “accès directs” augmente considérablement la sécurité de vos mots passes dans la mesure où vous pouvez:</p> <ul> <li> <p>adopter et saisir des mots de passe complexes;</p> </li> <li> <p>ne réutilisez le même mot de passe et ne mettez plus de mots de passe facile à deviner.</p> </li> </ul> <p>Simple et rapide à configurer avec le Clipperz <b>bookmarklet</b>.</p> <a href=\"http://www.clipperz.com/support/user_guide/direct_logins\" target=\"_blank\">Pour en savoir plus sur les “accès directs”</a> ",
192 'mainPanelRecordsBlockLabel':"Cartes", 189 'mainPanelRecordsBlockLabel':"Cartes",
193 'mainPanelAddRecordButtonLabel':"Ajouter une nouvelle carte", 190 'mainPanelAddRecordButtonLabel':"Ajouter une nouvelle carte",
194 'mainPanelRemoveRecordButtonLabel':"Supprimer une carte", 191 'mainPanelRemoveRecordButtonLabel':"Supprimer une carte",
195 'mainPanelRecordFilterBlockAllLabel':"tous", 192 'mainPanelRecordFilterBlockAllLabel':"tous",
196 'mainPanelRecordFilterBlockTagsLabel':"tags", 193 'mainPanelRecordFilterBlockTagsLabel':"tags",
197 'mainPanelRecordFilterBlockSearchLabel':"chercher", 194 'mainPanelRecordFilterBlockSearchLabel':"chercher",
198 'recordDetailNoRecordAtAllTitle':"Bienvenue sur Clipperz!", 195 'recordDetailNoRecordAtAllTitle':"Bienvenue sur Clipperz!",
199 'recordDetailNoRecordAtAllDescription':"<h5>Commencez par ajouter des cartes à votre compte.</h5> <p>Les cartes sont des formulaires flexibles ou vous pouvez enregistrer vos mots de passe et autres informations confidentielles.</p> <p>Par exemple, une carte peut contenir les informations d\"identification pour un site web, la combinaison de votre antivol de bicyclette, les détails de votre carte bancaire, ...</p> <h5>N'oubliez pas le bookmarklet!</h5> <p>Avant de commencer, installez le bookmarklet “Ajouter à Clipperz”: il rends la création de carte plus facile et amusante.</p> <p>Allez à l'onglet “outils” pour découvrir comment l'installer et l'utiliser.</p> <p> </p> <p>Ensuite, cliquez tout simplement sur le bouton “Ajouter une nouvelle carte” et profitez de votre compte Clipperz.</p> <p> </p> <a href=\"http://www.clipperz.com/support/user_guide/managing_cards\" target=\"_blank\">En savoir plus sur la création et la gestion des cartes.</a> ", 196 'recordDetailNoRecordAtAllDescription':"<h5>Commencez par ajouter des cartes à votre compte.</h5> <p>Les cartes sont des formulaires flexibles ou vous pouvez enregistrer vos mots de passe et autres informations confidentielles.</p> <p>Par exemple, une carte peut contenir les informations d\"identification pour un site web, la combinaison de votre antivol de bicyclette, les détails de votre carte bancaire, ...</p> <h5>N'oubliez pas le bookmarklet!</h5> <p>Avant de commencer, installez le bookmarklet “Ajouter à Clipperz”: il rends la création de carte plus facile et amusante.</p> <p>Allez à l'onglet “outils” pour découvrir comment l'installer et l'utiliser.</p> <p> </p> <p>Ensuite, cliquez tout simplement sur le bouton “Ajouter une nouvelle carte” et profitez de votre compte Clipperz.</p> <p> </p> <a href=\"http://www.clipperz.com/support/user_guide/managing_cards\" target=\"_blank\">En savoir plus sur la création et la gestion des cartes.</a> ",
200 'newRecordWizardTitleBox':"<h5>Choisissez un modèle</h5> <p>Les cartes sont des formulaires flexibles ou vous pouvez enregistrer vos mots de passe et autres informations confidentielles.</p> <p>Commencez par choisir un des modèles ci-dessous. Vous pourrez toujours adapter vos cartes plus tard en ajoutant ou supprimant des champs.</p> ", 197 'newRecordWizardTitleBox':"<h5>Choisissez un modèle</h5> <p>Les cartes sont des formulaires flexibles ou vous pouvez enregistrer vos mots de passe et autres informations confidentielles.</p> <p>Commencez par choisir un des modèles ci-dessous. Vous pourrez toujours adapter vos cartes plus tard en ajoutant ou supprimant des champs.</p> ",
201 'newRecordWizardBookmarkletConfigurationTitle':"Accès directs", 198 'newRecordWizardBookmarkletConfigurationTitle':"Accès directs",
202 'newRecordWizardBookmarkletConfigurationDescriptionConfig':"<p>Collez ici le code de configuration généré par le bookmarlet Clipperz.</p> <p>Cela créera une nouvelle carte avec un accès direct à votre site web.</p> ", 199 'newRecordWizardBookmarkletConfigurationDescriptionConfig':"<p>Collez ici le code de configuration généré par le bookmarlet Clipperz.</p> <p>Cela créera une nouvelle carte avec un accès direct à votre site web.</p> ",
203 'newRecordWizardCreateButtonLabel':"Créer", 200 'newRecordWizardCreateButtonLabel':"Créer",
204 'newRecordWizardCancelButtonLabel':"Annuler", 201 'newRecordWizardCancelButtonLabel':"Annuler",
205 'recordTemplates':{ 202 'recordTemplates':{
206 'WebAccount':{ 203 'WebAccount':{
207 'title':"Mot de passe web", 204 'title':"Mot de passe web",
208 'description':"<p>Une carte toute simple pour enregistrer les informations d'identification de vos services en ligne.</p> ", 205 'description':"<p>Une carte toute simple pour enregistrer les informations d'identification de vos services en ligne.</p> ",
209 'fields':{ 206 'fields':{
210 'URL':"Adresse web", 207 'URL':"Adresse web",
211 'TXT':"Nom d'utilisateur ou email", 208 'TXT':"Nom d'utilisateur ou email",
212 'PWD':"Mot de passe" 209 'PWD':"Mot de passe"
213 } 210 }
214 }, 211 },
215 'BankAccount':{ 212 'BankAccount':{
216 'title':"Compte bancaire", 213 'title':"Compte bancaire",
217 'description':"<p>Enregistrer de façon sécurisée vos numéros de compte bancaire et vos identifiants de service bancaire en ligne.</p> ", 214 'description':"<p>Enregistrer de façon sécurisée vos numéros de compte bancaire et vos identifiants de service bancaire en ligne.</p> ",
218 'fields':{ 215 'fields':{
219 'TXT':"Banque", 216 'TXT':"Banque",
220 'TXT':"N° de compte", 217 'TXT':"N° de compte",
221 'URL':"Adresse web du site", 218 'URL':"Adresse web du site",
222 'TXT':"Identifiant", 219 'TXT':"Identifiant",
223 'PWD':"Mot de passe" 220 'PWD':"Mot de passe"
224 } 221 }
225 }, 222 },
226 'CreditCard':{ 223 'CreditCard':{
227 'title':"Carte bancaire", 224 'title':"Carte bancaire",
228 'description':"<p>Ayez toujours sous la main votre numéro de carte, la date d'expiration, le code de contrôle et le code secret avec Clipperz</p> ", 225 'description':"<p>Ayez toujours sous la main votre numéro de carte, la date d'expiration, le code de contrôle et le code secret avec Clipperz</p> ",
229 'fields':{ 226 'fields':{
230 'TXT':"Type (Visa, AmEx, ...)", 227 'TXT':"Type (Visa, AmEx, ...)",
231 'TXT':"Numéro", 228 'TXT':"Numéro",
232 'TXT':"Nom du porteur", 229 'TXT':"Nom du porteur",
233 'TXT':"Date de validité", 230 'TXT':"Date de validité",
234 'TXT':"Code de contrôle", 231 'TXT':"Code de contrôle",
235 'PWD':"Code secret", 232 'PWD':"Code secret",
236 'URL':"Site web", 233 'URL':"Site web",
237 'TXT':"Identifiant", 234 'TXT':"Identifiant",
238 'PWD':"Mot de passe" 235 'PWD':"Mot de passe"
239 } 236 }
240 }, 237 },
241 'AddressBookEntry':{ 238 'AddressBookEntry':{
242 'title':"Carnet d'adresse", 239 'title':"Carnet d'adresse",
243 'description':"<p>Clipperz peux aussi être utilisé comme un nouveau carnet d'adresse privé. Utilisez ce modèle pour ajouter des contacts facilement.</p> ", 240 'description':"<p>Clipperz peux aussi être utilisé comme un nouveau carnet d'adresse privé. Utilisez ce modèle pour ajouter des contacts facilement.</p> ",
244 'fields':{ 241 'fields':{
245 'TXT':"Nom", 242 'TXT':"Nom",
246 'TXT':"Adresse eMail", 243 'TXT':"Adresse eMail",
247 'TXT':"Téléphone", 244 'TXT':"Téléphone",
248 'TXT':"Mobile", 245 'TXT':"Mobile",
249 'ADDR':"Adresse" 246 'ADDR':"Adresse"
250 } 247 }
251 }, 248 },
252 'Custom':{ 249 'Custom':{
253 'title':"Carte personnalisée", 250 'title':"Carte personnalisée",
254 'description':"<p>Quelles que soient les données confidentielles que vous souhaitez protéger, créez une carte personnalisée adaptée à vos besoins.</p> ", 251 'description':"<p>Quelles que soient les données confidentielles que vous souhaitez protéger, créez une carte personnalisée adaptée à vos besoins.</p> ",
255 'fields':{ 252 'fields':{
256 'TXT':"Titre du champ 1", 253 'TXT':"Titre du champ 1",
257 'TXT':"Titre du champ 2", 254 'TXT':"Titre du champ 2",
258 'TXT':"Titre du champ 3" 255 'TXT':"Titre du champ 3"
259 } 256 }
260 } 257 }
261}, 258},
262 'recordFieldTypologies':{ 259 'recordFieldTypologies':{
263 'TXT':{ 260 'TXT':{
264 'description':"simple text field", 261 'description':"simple text field",
265 'shortDescription':"texte" 262 'shortDescription':"texte"
266 }, 263 },
267 'PWD':{ 264 'PWD':{
268 'description':"simple text field, with default status set to hidden", 265 'description':"simple text field, with default status set to hidden",
269 'shortDescription':"mot de passe" 266 'shortDescription':"mot de passe"
270 }, 267 },
271 'URL':{ 268 'URL':{
272 'description':"simple text field in edit mode, that became an active url in view mode", 269 'description':"simple text field in edit mode, that became an active url in view mode",
273 'shortDescription':"adresse de site web" 270 'shortDescription':"adresse de site web"
274 }, 271 },
275 'DATE':{ 272 'DATE':{
276 'description':"a value set with a calendar helper", 273 'description':"a value set with a calendar helper",
277 'shortDescription':"date" 274 'shortDescription':"date"
278 }, 275 },
279 'ADDR':{ 276 'ADDR':{
280 'description':"just like the URL, but the active link points to Google Maps (or similar service) passing the address value as argument", 277 'description':"just like the URL, but the active link points to Google Maps (or similar service) passing the address value as argument",
281 'shortDescription':"adresse" 278 'shortDescription':"adresse"
282 }, 279 },
283 'CHECK':{ 280 'CHECK':{
284 'description':"check description", 281 'description':"check description",
285 'shortDescription':"check" 282 'shortDescription':"check"
286 }, 283 },
287 'RADIO':{ 284 'RADIO':{
288 'description':"radio description", 285 'description':"radio description",
289 'shortDescription':"radio" 286 'shortDescription':"radio"
290 }, 287 },
291 'SELECT':{ 288 'SELECT':{
292 'description':"select description", 289 'description':"select description",
293 'shortDescription':"select" 290 'shortDescription':"select"
294 } 291 }
295}, 292},
296 'newRecordPanelGeneralExceptionTitle':"Erreur", 293 'newRecordPanelGeneralExceptionTitle':"Erreur",
297 'newRecordPanelGeneralExceptionMessage':"Le code de configuration n'est pas valide. Copiez le depuis la fenêtre du bookmarklet, et essayez à nouveau.", 294 'newRecordPanelGeneralExceptionMessage':"Le code de configuration n'est pas valide. Copiez le depuis la fenêtre du bookmarklet, et essayez à nouveau.",
298 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"Erreur", 295 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"Erreur",
299 'newRecordPanelWrongBookmarkletVersionExceptionMessage':"Ce code de configuration provient d'un ancien bookmarklet. Mettez votre bookmarklet à jour, puis essayez de nouveau.", 296 'newRecordPanelWrongBookmarkletVersionExceptionMessage':"Ce code de configuration provient d'un ancien bookmarklet. Mettez votre bookmarklet à jour, puis essayez de nouveau.",
300 'newRecordPanelExceptionPanelCloseButtonLabel':"Annuler", 297 'newRecordPanelExceptionPanelCloseButtonLabel':"Annuler",
301 'mainPanelDeletingRecordPanelConfirmationTitle':"Suppression de la carte sélectionnée", 298 'mainPanelDeletingRecordPanelConfirmationTitle':"Suppression de la carte sélectionnée",
302 'mainPanelDeleteRecordPanelConfirmationText':"Voulez vous vraiment supprimer la carte sélectionnée?", 299 'mainPanelDeleteRecordPanelConfirmationText':"Voulez vous vraiment supprimer la carte sélectionnée?",
303 'mainPanelDeleteRecordPanelConfirmButtonLabel':"Oui", 300 'mainPanelDeleteRecordPanelConfirmButtonLabel':"Oui",
304 'mainPanelDeleteRecordPanelDenyButtonLabel':"Non", 301 'mainPanelDeleteRecordPanelDenyButtonLabel':"Non",
305 'mainPanelDeletingRecordPanelInitialTitle':"Suppression de la carte", 302 'mainPanelDeletingRecordPanelInitialTitle':"Suppression de la carte",
306 'mainPanelDeletingRecordPanelCompletedText':"Terminé", 303 'mainPanelDeletingRecordPanelCompletedText':"Terminé",
307 'deleteRecordPanelCollectRecordDataMessageTitle':"Supprimer la carte", 304 'deleteRecordPanelCollectRecordDataMessageTitle':"Supprimer la carte",
308 'deleteRecordPanelCollectRecordDataMessageText':"Mise à jour de la liste des cartes", 305 'deleteRecordPanelCollectRecordDataMessageText':"Mise à jour de la liste des cartes",
309 'deleteRecordPanelEncryptUserDataMessageTitle':"Supprimer la carte", 306 'deleteRecordPanelEncryptUserDataMessageTitle':"Supprimer la carte",
310 'deleteRecordPanelEncryptUserDataMessageText':"Chiffrement local des en-têtes de carte", 307 'deleteRecordPanelEncryptUserDataMessageText':"Chiffrement local des en-têtes de carte",
311 'deleteRecordPanelSendingDataToTheServerMessageTitle':"Supprimer la carteDelete card", 308 'deleteRecordPanelSendingDataToTheServerMessageTitle':"Supprimer la carteDelete card",
312 'deleteRecordPanelSendingDataToTheServerMessageText':"Transmission des en-têtes chiffrées à Clipperz", 309 'deleteRecordPanelSendingDataToTheServerMessageText':"Transmission des en-têtes chiffrées à Clipperz",
313 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"Supprimer la carte", 310 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"Supprimer la carte",
314 'deleteRecordPanelUpdatingTheInterfaceMessageText':"Mise à jour de l'interface", 311 'deleteRecordPanelUpdatingTheInterfaceMessageText':"Mise à jour de l'interface",
315 'recordDetailNoRecordSelectedTitle':"Aucune carte sélectionnée", 312 'recordDetailNoRecordSelectedTitle':"Aucune carte sélectionnée",
316 'recordDetailNoRecordSelectedDescription':"<p>Veuillez selectionner une carte dans la liste de gauche.</p> ", 313 'recordDetailNoRecordSelectedDescription':"<p>Veuillez selectionner une carte dans la liste de gauche.</p> ",
317 'recordDetailLoadingRecordMessage':"Téléchargement de la carte chiffrée depuis Clipperz", 314 'recordDetailLoadingRecordMessage':"Téléchargement de la carte chiffrée depuis Clipperz",
318 'recordDetailDecryptingRecordMessage':"Déchiffrement local des informations de la carte", 315 'recordDetailDecryptingRecordMessage':"Déchiffrement local des informations de la carte",
319 'recordDetailLoadingRecordVersionMessage':"Téléchargement de la dernière version de la carte", 316 'recordDetailLoadingRecordVersionMessage':"Téléchargement de la dernière version de la carte",
320 'recordDetailDecryptingRecordVersionMessage':"Déchiffrement local de la dernière version", 317 'recordDetailDecryptingRecordVersionMessage':"Déchiffrement local de la dernière version",
321 'recordDetailLoadingErrorMessageTitle':"Erreur lors du téléchargement de la carte", 318 'recordDetailLoadingErrorMessageTitle':"Erreur lors du téléchargement de la carte",
322 'recordDetailNotesLabel':"Notes", 319 'recordDetailNotesLabel':"Notes",
323 'recordDetailLabelFieldColumnLabel':"Titre du champ", 320 'recordDetailLabelFieldColumnLabel':"Titre du champ",
324 'recordDetailDataFieldColumnLabel':"Données du champ", 321 'recordDetailDataFieldColumnLabel':"Données du champ",
325 'recordDetailTypeFieldColumnLabel':"Type", 322 'recordDetailTypeFieldColumnLabel':"Type",
326 'recordDetailSavingChangesMessagePanelInitialTitle':"Enregistrement de la carte", 323 'recordDetailSavingChangesMessagePanelInitialTitle':"Enregistrement de la carte",
327 'recordDetailAddFieldButtonLabel':"Ajouter un champ", 324 'recordDetailAddFieldButtonLabel':"Ajouter un champ",
328 'recordDetailPasswordFieldHelpLabel':"pour copier le mot de passe, cliquez sur les étoiles, puis Ctrl-C", 325 'recordDetailPasswordFieldHelpLabel':"pour copier le mot de passe, cliquez sur les étoiles, puis Ctrl-C",
329 'recordDetailPasswordFieldScrambleLabel':"dissimuler", 326 'recordDetailPasswordFieldScrambleLabel':"dissimuler",
330 'recordDetailPasswordFieldUnscrambleLabel':"en clair", 327 'recordDetailPasswordFieldUnscrambleLabel':"en clair",
331 'recordDetailDirectLoginBlockTitle':"Accès directs", 328 'recordDetailDirectLoginBlockTitle':"Accès directs",
332 'recordDetailNewDirectLoginDescription':"<p>Configuration de l'accès direct</p> ", 329 'recordDetailNewDirectLoginDescription':"<p>Configuration de l'accès direct</p> ",
333 'recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription':"<p>Cette carte contient-elle des informations d'identification pour un service en ligne?</p> <p>Utilisez le bookmarklet pour configurer un “accès direct” depuis Clipperz en un seul click!</p> ", 330 'recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription':"<p>Cette carte contient-elle des informations d'identification pour un service en ligne?</p> <p>Utilisez le bookmarklet pour configurer un “accès direct” depuis Clipperz en un seul click!</p> ",
334 'recordDetailAddNewDirectLoginButtonLabel':"Ajouter un accès direct", 331 'recordDetailAddNewDirectLoginButtonLabel':"Ajouter un accès direct",
335 'recordDetailEditButtonLabel':"Modifier", 332 'recordDetailEditButtonLabel':"Modifier",
336 'recordDetailSaveButtonLabel':"Sauver", 333 'recordDetailSaveButtonLabel':"Sauver",
337 'recordDetailCancelButtonLabel':"Annuler", 334 'recordDetailCancelButtonLabel':"Annuler",
338 'newRecordTitleLabel':"_nouvelle carte_", 335 'newRecordTitleLabel':"_nouvelle carte_",
339 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"Enregistrement de la carte", 336 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"Enregistrement de la carte",
340 'recordSaveChangesPanelCollectRecordInfoMessageText':"Updating card headers", 337 'recordSaveChangesPanelCollectRecordInfoMessageText':"Updating card headers",
341 'recordSaveChangesPanelEncryptUserDataMessageTitle':"Sauvegarde de la carte", 338 'recordSaveChangesPanelEncryptUserDataMessageTitle':"Sauvegarde de la carte",
342 'recordSaveChangesPanelEncryptUserDataMessageText':"Cryptage local des en-têtes chiffrés", 339 'recordSaveChangesPanelEncryptUserDataMessageText':"Cryptage local des en-têtes chiffrés",
343 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"Sauvegarde de la carte", 340 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"Sauvegarde de la carte",
344 'recordSaveChangesPanelEncryptRecordDataMessageText':"Cryptage local des en-têtes chiffrés", 341 'recordSaveChangesPanelEncryptRecordDataMessageText':"Cryptage local des en-têtes chiffrés",
345 'recordSaveChangesPanelEncryptRecordVersionDataMessageTitle':"Sauvegarde de la carte", 342 'recordSaveChangesPanelEncryptRecordVersionDataMessageTitle':"Sauvegarde de la carte",
346 'recordSaveChangesPanelEncryptRecordVersionDataMessageText':"Cryptage local des données de version de la carte", 343 'recordSaveChangesPanelEncryptRecordVersionDataMessageText':"Cryptage local des données de version de la carte",
347 'recordSaveChangesPanelSendingDataToTheServerMessageTitle':"Sauvegarde de la carte", 344 'recordSaveChangesPanelSendingDataToTheServerMessageTitle':"Sauvegarde de la carte",
348 'recordSaveChangesPanelSendingDataToTheServerMessageText':"Téléchargement des cartes d’en-têtes chiffrés depuis Clipperz", 345 'recordSaveChangesPanelSendingDataToTheServerMessageText':"Téléchargement des cartes d’en-têtes chiffrés depuis Clipperz",
349 'recordSaveChangesPanelUpdatingTheInterfaceMessageTitle':"Sauvegarde de la carte", 346 'recordSaveChangesPanelUpdatingTheInterfaceMessageTitle':"Sauvegarde de la carte",
350 'recordSaveChangesPanelUpdatingTheInterfaceMessageText':"Mise à jour de l'interface", 347 'recordSaveChangesPanelUpdatingTheInterfaceMessageText':"Mise à jour de l'interface",
351 'passwordGeneratorPanelTitle':"Générateur de mot de passe", 348 'passwordGeneratorPanelTitle':"Générateur de mot de passe",
352 'passwordGeneratorPanelOkLabel':"Ok", 349 'passwordGeneratorPanelOkLabel':"Ok",
353 'passwordGeneratorPanelCancelLabel':"Annuler", 350 'passwordGeneratorPanelCancelLabel':"Annuler",
354 'passwordGeneratorLengthLabel':"longueur:", 351 'passwordGeneratorLengthLabel':"longueur:",
355 //'DWRUtilLoadingMessage':"Chargement des données ...", 352 //'DWRUtilLoadingMessage':"Chargement des données ...",
356 'comingSoon':"Bientôt en ligne ...", 353 'comingSoon':"Bientôt en ligne ...",
357 'panelCollectingEntryopyMessageText':"Rassemblement d'entropie", 354 'panelCollectingEntryopyMessageText':"Rassemblement d'entropie",
358 'directLoginConfigurationCheckBoxFieldSelectedValue':"Oui", 355 'directLoginConfigurationCheckBoxFieldSelectedValue':"Oui",
359 'directLoginConfigurationCheckBoxFieldNotSelectedValue':"Non", 356 'directLoginConfigurationCheckBoxFieldNotSelectedValue':"Non",
360 357
361__syntaxFix__: "syntax fix" 358__syntaxFix__: "syntax fix"
362}); 359});
diff --git a/frontend/beta/js/Clipperz/PM/Strings/Strings_he-IL.js b/frontend/beta/js/Clipperz/PM/Strings/Strings_he-IL.js
index 3bdfe19..70a59c8 100644
--- a/frontend/beta/js/Clipperz/PM/Strings/Strings_he-IL.js
+++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_he-IL.js
@@ -1,40 +1,37 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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//============================================================================= 26//=============================================================================
30// 27//
31 // H E B R E W (he_IL) 28 // H E B R E W (he_IL)
32// 29//
33//============================================================================= 30//=============================================================================
34 31
35Clipperz.PM.Strings.Languages['he-il'] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 32Clipperz.PM.Strings.Languages['he-il'] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], {
36 33
37 //------------------------------------------------------------------------- 34 //-------------------------------------------------------------------------
38 __syntaxFix__: "syntax fix" 35 __syntaxFix__: "syntax fix"
39}); 36});
40 37
diff --git a/frontend/beta/js/Clipperz/PM/Strings/Strings_it-IT.js b/frontend/beta/js/Clipperz/PM/Strings/Strings_it-IT.js
index 51c0d03..acf6acd 100644
--- a/frontend/beta/js/Clipperz/PM/Strings/Strings_it-IT.js
+++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_it-IT.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29Clipperz.PM.Strings.Languages['it-IT'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 26Clipperz.PM.Strings.Languages['it-IT'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], {
30 'clipperzServiceDescription':"<h2>Tienilo per te!</h2> <ul> <li> <h3>Clipperz è:</h3> <ul> <li> <p>un archivio semplice e sicuro per le tue password</p> </li> <li> <p>un canale di accesso unificato a tutti i tuoi servizi online</p> </li> <li> <p>una cassaforte digitale per tutti i tuoi dati riservati</p> </li> </ul> </li> <li> <h3>Con Clipperz puoi:</h3> <ul> <li> <p>memorizzare e gestire le password e le credenziali di accesso dei tuoi servizi online</p> </li> <li> <p>accedere ai tuoi servizi online con un solo click senza bisogno di inserire username o password</p> </li> <li> <p>proteggere tutte le tue informazioni confidenziali: codice dell&#x27;allarme di casa, dati delle carte di credito, …</p> </li> <li> <p>condividere dati riservati con i tuoi familiari o colleghi (disponibile a breve)</p> </li> </ul> </li> <li> <h3>I vantaggi di Clipperz:</h3> <ul> <li> <p>gratuito e completamente anonimo</p> </li> <li> <p>accessibile da qualsiasi computer</p> </li> <li> <p>nessun software da scaricare e niente da installare</p> </li> <li> <p>mai più informazioni riservate sul tuo PC o sulla carta!</p> </li> </ul> </li> <li> <h3>La sicurezza di Clipperz:</h3> <ul> <li> <p>i dati sono criptati dal tuo browser prima di essere inviati a Clipperz</p> </li> <li> <p>la chiave per decriptare i dati è conosciuta soltanto da te</p> </li> <li> <p>Clipperz riceve e memorizza solo i tuoi dati criptati e non ha nessuna possibilità di accedere alla versione in chiaro</p> </li> <li> <p>Clipperz utilizza solo sistemi crittografici standard, senza nessuna velleità di inventare e proporre nuovi algoritmi non validati dalla comunità scientifica</p> </li> <li> <p>tutto il codice di Clipperz è disponibile e può essere analizzato in qualsiasi momento, ma non serve essere un esperto di crittografia per apprezzare la sicurezza e la comodità di Clipperz!</p> </li> </ul> </li> <li><a href=\"http://www.clipperz.com\" target=\"_blank\">Maggiori informazioni su Clipperz (in inglese)</a> </li> </ul> ", 27 'clipperzServiceDescription':"<h2>Tienilo per te!</h2> <ul> <li> <h3>Clipperz è:</h3> <ul> <li> <p>un archivio semplice e sicuro per le tue password</p> </li> <li> <p>un canale di accesso unificato a tutti i tuoi servizi online</p> </li> <li> <p>una cassaforte digitale per tutti i tuoi dati riservati</p> </li> </ul> </li> <li> <h3>Con Clipperz puoi:</h3> <ul> <li> <p>memorizzare e gestire le password e le credenziali di accesso dei tuoi servizi online</p> </li> <li> <p>accedere ai tuoi servizi online con un solo click senza bisogno di inserire username o password</p> </li> <li> <p>proteggere tutte le tue informazioni confidenziali: codice dell&#x27;allarme di casa, dati delle carte di credito, …</p> </li> <li> <p>condividere dati riservati con i tuoi familiari o colleghi (disponibile a breve)</p> </li> </ul> </li> <li> <h3>I vantaggi di Clipperz:</h3> <ul> <li> <p>gratuito e completamente anonimo</p> </li> <li> <p>accessibile da qualsiasi computer</p> </li> <li> <p>nessun software da scaricare e niente da installare</p> </li> <li> <p>mai più informazioni riservate sul tuo PC o sulla carta!</p> </li> </ul> </li> <li> <h3>La sicurezza di Clipperz:</h3> <ul> <li> <p>i dati sono criptati dal tuo browser prima di essere inviati a Clipperz</p> </li> <li> <p>la chiave per decriptare i dati è conosciuta soltanto da te</p> </li> <li> <p>Clipperz riceve e memorizza solo i tuoi dati criptati e non ha nessuna possibilità di accedere alla versione in chiaro</p> </li> <li> <p>Clipperz utilizza solo sistemi crittografici standard, senza nessuna velleità di inventare e proporre nuovi algoritmi non validati dalla comunità scientifica</p> </li> <li> <p>tutto il codice di Clipperz è disponibile e può essere analizzato in qualsiasi momento, ma non serve essere un esperto di crittografia per apprezzare la sicurezza e la comodità di Clipperz!</p> </li> </ul> </li> <li><a href=\"http://www.clipperz.com\" target=\"_blank\">Maggiori informazioni su Clipperz (in inglese)</a> </li> </ul> ",
31 'loginFormTitle':"accedi a Clipperz", 28 'loginFormTitle':"accedi a Clipperz",
32 'loginFormUsernameLabel':"Utente", 29 'loginFormUsernameLabel':"Utente",
33 'loginFormPassphraseLabel':"frase segreta", 30 'loginFormPassphraseLabel':"frase segreta",
34 'loginFormDontHaveAnAccountLabel':"non ti sei ancora registrato?", 31 'loginFormDontHaveAnAccountLabel':"non ti sei ancora registrato?",
35 'loginFormCreateOneLabel':"registrati adesso", 32 'loginFormCreateOneLabel':"registrati adesso",
36 'loginFormForgotYourCredentialsLabel':"hai perso i dati di accesso?", 33 'loginFormForgotYourCredentialsLabel':"hai perso i dati di accesso?",
37 'loginFormAarghThatsBadLabel':"aargh! questo non è bello!", 34 'loginFormAarghThatsBadLabel':"aargh! questo non è bello!",
38 'loginFormAfraidOfMaliciousScriptsLabel':"non ti fidi?", 35 'loginFormAfraidOfMaliciousScriptsLabel':"non ti fidi?",
39 'loginFormVerifyTheCodeLabel':"controlla il codice", 36 'loginFormVerifyTheCodeLabel':"controlla il codice",
40 'loginFormButtonLabel':"Accedi", 37 'loginFormButtonLabel':"Accedi",
41 'loginFormOneTimePasswordCheckboxLabel':"usa un codice “usa e getta”", 38 'loginFormOneTimePasswordCheckboxLabel':"usa un codice “usa e getta”",
42 'loginFormOneTimePasswordCheckboxDescription':"", 39 'loginFormOneTimePasswordCheckboxDescription':"",
43 'loginPanelSwithLanguageDescription':"<h5>Seleziona la tua lingua preferita</h5> ", 40 'loginPanelSwithLanguageDescription':"<h5>Seleziona la tua lingua preferita</h5> ",
44 'browserCompatibilityDescription':"<p>Clipperz consiglia Firefox per una maggiore sicurezza. Clipperz supporta anche Opera ed Internet Explorer.</p> ", 41 'browserCompatibilityDescription':"<p>Clipperz consiglia Firefox per una maggiore sicurezza. Clipperz supporta anche Opera ed Internet Explorer.</p> ",
45 'OTPloginMessagePanelInitialTitle':"Accesso con codice “usa e getta”", 42 'OTPloginMessagePanelInitialTitle':"Accesso con codice “usa e getta”",
46 'OTPloginMessagePanelInitialText':"Invio delle credenziali OTP ...", 43 'OTPloginMessagePanelInitialText':"Invio delle credenziali OTP ...",
47 'OTPloginMessagePanelLoadingTitle':"Accesso con codice “usa e getta”", 44 'OTPloginMessagePanelLoadingTitle':"Accesso con codice “usa e getta”",
48 'OTPloginMessagePanelLoadingText':"Caricamento dei dati di autenticazione criptati ...", 45 'OTPloginMessagePanelLoadingText':"Caricamento dei dati di autenticazione criptati ...",
49 'OTPloginMessagePanelProcessingTitle':"Accesso con codice “usa e getta”", 46 'OTPloginMessagePanelProcessingTitle':"Accesso con codice “usa e getta”",
50 'OTPloginMessagePanelProcessingText':"Decodifica locale dei dati di autenticazione ...", 47 'OTPloginMessagePanelProcessingText':"Decodifica locale dei dati di autenticazione ...",
51 'loginMessagePanelInitialTitle':"Connessione in corso ...", 48 'loginMessagePanelInitialTitle':"Connessione in corso ...",
52 'loginMessagePanelInitialText':"---", 49 'loginMessagePanelInitialText':"---",
53 'loginMessagePanelInitialButtonLabel':"Annulla", 50 'loginMessagePanelInitialButtonLabel':"Annulla",
54 'loginMessagePanelConnectedTitle':"Connesso", 51 'loginMessagePanelConnectedTitle':"Connesso",
55 'loginMessagePanelConnectedText':"Fatto", 52 'loginMessagePanelConnectedText':"Fatto",
56 'loginMessagePanelFailureTitle':"Errore", 53 'loginMessagePanelFailureTitle':"Errore",
57 'loginMessagePanelFailureText':"Connessione fallita", 54 'loginMessagePanelFailureText':"Connessione fallita",
58 'loginMessagePanelFailureButtonLabel':"Chiudi", 55 'loginMessagePanelFailureButtonLabel':"Chiudi",
59 'connectionLoginSendingCredentialsMessageTitle':"Verifica delle credenziali", 56 'connectionLoginSendingCredentialsMessageTitle':"Verifica delle credenziali",
60 'connectionLoginSendingCredentialsMessageText':"Invio delle credenziali", 57 'connectionLoginSendingCredentialsMessageText':"Invio delle credenziali",
61 'connectionLoginCredentialsVerificationMessageTitle':"Verifica delle credenziali", 58 'connectionLoginCredentialsVerificationMessageTitle':"Verifica delle credenziali",
62 'connectionLoginCredentialsVerificationMessageText':"Esecuzione dell&#x27;autenticazione SRP ...", 59 'connectionLoginCredentialsVerificationMessageText':"Esecuzione dell&#x27;autenticazione SRP ...",
63 'connectionLoginDoneMessageTitle':"Verifica delle credenziali", 60 'connectionLoginDoneMessageTitle':"Verifica delle credenziali",
64 'connectionLoginDoneMessageText':"Connesso", 61 'connectionLoginDoneMessageText':"Connesso",
65 'userLoginPanelUpgradingUserCredentialsMessageTitle':"Verifica delle credenziali", 62 'userLoginPanelUpgradingUserCredentialsMessageTitle':"Verifica delle credenziali",
66 'userLoginPanelUpgradingUserCredentialsMessageText':"Aggiornamento delle credenziali ad un nuovo schema di autenticazione", 63 'userLoginPanelUpgradingUserCredentialsMessageText':"Aggiornamento delle credenziali ad un nuovo schema di autenticazione",
67 'userLoginPanelConnectedMessageTitle':"Utente autenticato", 64 'userLoginPanelConnectedMessageTitle':"Utente autenticato",
68 'userLoginPanelConnectedMessageText':"Autenticazione eseguita con successo", 65 'userLoginPanelConnectedMessageText':"Autenticazione eseguita con successo",
69 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"Verifica delle credenziali", 66 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"Verifica delle credenziali",
70 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"Tentativo con vecchio schema di autenticazione", 67 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"Tentativo con vecchio schema di autenticazione",
71 'userLoginPanelLoadingUserDataMessageTitle':"Utente autenticato", 68 'userLoginPanelLoadingUserDataMessageTitle':"Utente autenticato",
72 'userLoginPanelLoadingUserDataMessageText':"Scarica le intestazioni criptate delle schede da Clipperz", 69 'userLoginPanelLoadingUserDataMessageText':"Scarica le intestazioni criptate delle schede da Clipperz",
73 'userLoginPanelDecryptingUserDataMessageTitle':"Utente autenticato", 70 'userLoginPanelDecryptingUserDataMessageTitle':"Utente autenticato",
74 'userLoginPanelDecryptingUserDataMessageText':"Decodifica locale dell&#x27;intestazione delle schede", 71 'userLoginPanelDecryptingUserDataMessageText':"Decodifica locale dell&#x27;intestazione delle schede",
75 'userLoginPanelDecryptingUserStatisticsMessageTitle':"Utente autenticato", 72 'userLoginPanelDecryptingUserStatisticsMessageTitle':"Utente autenticato",
76 'userLoginPanelDecryptingUserStatisticsMessageText':"Decodifica locale delle statistiche d&#x27;uso", 73 'userLoginPanelDecryptingUserStatisticsMessageText':"Decodifica locale delle statistiche d&#x27;uso",
77 'splashAlertTitle':"Benvenuto a Clipperz!", 74 'splashAlertTitle':"Benvenuto a Clipperz!",
78 'splashAlertText':"<p>Alcuni consigli per la sicurezza</p> <ul> <li> <p>La sicurezza dei tuoi dati dipende da quanto è sicura la frase segreta che usi per proteggerli. Nessuno può accedervi a meno che non conosca la frase segreta.</p> </li> <li> <p>Se hai intenzione di usare Clipperz per conservare informazioni sensibili e riservate, scegli attentamente una frase segreta complessa. Più è lunga, maggiore è la sicurezza!</p> </li> <li> <p>E non dimenticare che Clipperz non è in grado di recuperare la tua frase segreta in caso di smarrimento!</p> </li> </ul> <p>Per maggiori informazioni sulla sicurezza, consulta il sito <a href=\"http://www.clipperz.com\" target=\"_blank\">Clipperz</a> (in lingua inglese).</p> ", 75 'splashAlertText':"<p>Alcuni consigli per la sicurezza</p> <ul> <li> <p>La sicurezza dei tuoi dati dipende da quanto è sicura la frase segreta che usi per proteggerli. Nessuno può accedervi a meno che non conosca la frase segreta.</p> </li> <li> <p>Se hai intenzione di usare Clipperz per conservare informazioni sensibili e riservate, scegli attentamente una frase segreta complessa. Più è lunga, maggiore è la sicurezza!</p> </li> <li> <p>E non dimenticare che Clipperz non è in grado di recuperare la tua frase segreta in caso di smarrimento!</p> </li> </ul> <p>Per maggiori informazioni sulla sicurezza, consulta il sito <a href=\"http://www.clipperz.com\" target=\"_blank\">Clipperz</a> (in lingua inglese).</p> ",
79 'splashAlertCloseButtonLabel':"Ok", 76 'splashAlertCloseButtonLabel':"Ok",
80 'registrationFormTitle':"crea il tuo utente", 77 'registrationFormTitle':"crea il tuo utente",
81 'registrationFormUsernameLabel':"Utente", 78 'registrationFormUsernameLabel':"Utente",
82 'registrationFormPassphraseLabel':"frase segreta", 79 'registrationFormPassphraseLabel':"frase segreta",
83 'registrationFormRetypePassphraseLabel':"ripeti frase segreta", 80 'registrationFormRetypePassphraseLabel':"ripeti frase segreta",
84 'registrationFormSafetyCheckLabel':"Sono consapevole che Clipperz non è in grado di recuperare una frase segreta dimenticata.", 81 'registrationFormSafetyCheckLabel':"Sono consapevole che Clipperz non è in grado di recuperare una frase segreta dimenticata.",
85 'registrationFormTermsOfServiceCheckLabel':"Dichiaro di aver letto e di accettare i <a href=\"http://www.clipperz.com/terms_of_service\" target=\"_blank\">Termini del Servizio</a> .", 82 'registrationFormTermsOfServiceCheckLabel':"Dichiaro di aver letto e di accettare i <a href=\"http://www.clipperz.com/terms_of_service\" target=\"_blank\">Termini del Servizio</a> .",
86 'registrationFormDoYouAlreadyHaveAnAccountLabel':"sei già un utente registrato?", 83 'registrationFormDoYouAlreadyHaveAnAccountLabel':"sei già un utente registrato?",
87 'registrationFormSimplyLoginLabel':"accedi subito", 84 'registrationFormSimplyLoginLabel':"accedi subito",
88 'registrationFormButtonLabel':"Registrati", 85 'registrationFormButtonLabel':"Registrati",
89 'registrationFormWarningMessageNotMatchingPassphrases':"Le frasi segrete non corrispondono, ripeti l&#x27;inserimento.", 86 'registrationFormWarningMessageNotMatchingPassphrases':"Le frasi segrete non corrispondono, ripeti l&#x27;inserimento.",
90 'registrationFormWarningMessageSafetyCheckNotSelected':"Leggi e spunta le condizioni sotto riportate.", 87 'registrationFormWarningMessageSafetyCheckNotSelected':"Leggi e spunta le condizioni sotto riportate.",
91 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"Per procedere devi accettare i Termini del Servizio.", 88 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"Per procedere devi accettare i Termini del Servizio.",
92 'registrationMessagePanelInitialTitle':"Registrazione in corso ...", 89 'registrationMessagePanelInitialTitle':"Registrazione in corso ...",
93 'registrationMessagePanelInitialText':"---", 90 'registrationMessagePanelInitialText':"---",
94 'registrationMessagePanelInitialButtonLabel':"Annulla", 91 'registrationMessagePanelInitialButtonLabel':"Annulla",
95 'registrationMessagePanelRegistrationDoneTitle':"Registrazione", 92 'registrationMessagePanelRegistrationDoneTitle':"Registrazione",
96 'registrationMessagePanelRegistrationDoneText':"Fatto", 93 'registrationMessagePanelRegistrationDoneText':"Fatto",
97 'registrationMessagePanelFailureTitle':"Registrazione fallita", 94 'registrationMessagePanelFailureTitle':"Registrazione fallita",
98 'registrationMessagePanelFailureButtonLabel':"Chiudi", 95 'registrationMessagePanelFailureButtonLabel':"Chiudi",
99 'connectionRegistrationSendingRequestMessageText':"Verifica delle credenziali", 96 'connectionRegistrationSendingRequestMessageText':"Verifica delle credenziali",
100 'connectionRegistrationSendingCredentialsMessageText':"Invio delle credenziali", 97 'connectionRegistrationSendingCredentialsMessageText':"Invio delle credenziali",
101 'registrationSplashPanelTitle':"Avviso di sicurezza", 98 'registrationSplashPanelTitle':"Avviso di sicurezza",
102 'registrationSplashPanelDescription':"<p>Queste sono le tue credenziali di accesso a Clipperz, conservale con cura. Il tuo utente ed la tua frase segreta non ti verranno mostrati una seconda volta!</p> ", 99 'registrationSplashPanelDescription':"<p>Queste sono le tue credenziali di accesso a Clipperz, conservale con cura. Il tuo utente ed la tua frase segreta non ti verranno mostrati una seconda volta!</p> ",
103 'registrationSplashPanelUsernameLabel':"Utente", 100 'registrationSplashPanelUsernameLabel':"Utente",
104 'registrationSplashPanelPassphraseLabel':"frase segreta", 101 'registrationSplashPanelPassphraseLabel':"frase segreta",
105 'registrationSplashPanelShowPassphraseButtonLabel':"mostra la frase segreta", 102 'registrationSplashPanelShowPassphraseButtonLabel':"mostra la frase segreta",
106 'donateHeaderLinkLabel':"donazioni", 103 'donateHeaderLinkLabel':"donazioni",
107 'creditsHeaderLinkLabel':"credits", 104 'creditsHeaderLinkLabel':"credits",
108 'feedbackHeaderLinkLabel':"scrivici", 105 'feedbackHeaderLinkLabel':"scrivici",
109 'helpHeaderLinkLabel':"aiuto", 106 'helpHeaderLinkLabel':"aiuto",
110 'forumHeaderLinkLabel':"forum", 107 'forumHeaderLinkLabel':"forum",
111 'recordMenuLabel':"Schede", 108 'recordMenuLabel':"Schede",
112 'accountMenuLabel':"profilo", 109 'accountMenuLabel':"profilo",
113 'dataMenuLabel':"dati", 110 'dataMenuLabel':"dati",
114 'contactsMenuLabel':"Contatti", 111 'contactsMenuLabel':"Contatti",
115 'toolsMenuLabel':"strumenti", 112 'toolsMenuLabel':"strumenti",
116 'logoutMenuLabel':"esci", 113 'logoutMenuLabel':"esci",
117 'lockMenuLabel':"blocca", 114 'lockMenuLabel':"blocca",
118 'lockTitle':"Utente bloccato", 115 'lockTitle':"Utente bloccato",
119 'lockDescription':"<p>Per sbloccare il tuo utente inserisci la frase segreta</p> ", 116 'lockDescription':"<p>Per sbloccare il tuo utente inserisci la frase segreta</p> ",
120 'unlockButtonLabel':"Sblocca", 117 'unlockButtonLabel':"Sblocca",
121 'changePasswordTabLabel':"Cambia la tua frase segreta", 118 'changePasswordTabLabel':"Cambia la tua frase segreta",
122 'changePasswordTabTitle':"Cambia la tua frase segreta", 119 'changePasswordTabTitle':"Cambia la tua frase segreta",
123 'changePasswordFormUsernameLabel':"Utente", 120 'changePasswordFormUsernameLabel':"Utente",
124 'changePasswordFormOldPassphraseLabel':"attuale frase segreta", 121 'changePasswordFormOldPassphraseLabel':"attuale frase segreta",
125 'changePasswordFormNewPassphraseLabel':"nuova frase segreta", 122 'changePasswordFormNewPassphraseLabel':"nuova frase segreta",
126 'changePasswordFormRetypePassphraseLabel':"ripeti nuova frase segreta", 123 'changePasswordFormRetypePassphraseLabel':"ripeti nuova frase segreta",
127 'changePasswordFormSafetyCheckboxLabel':"Sono consapevole che Clipperz non è in grado di recuperare una frase segreta dimenticata.", 124 'changePasswordFormSafetyCheckboxLabel':"Sono consapevole che Clipperz non è in grado di recuperare una frase segreta dimenticata.",
128 'changePasswordFormSubmitLabel':"Cambia frase segreta", 125 'changePasswordFormSubmitLabel':"Cambia frase segreta",
129 'changePasswordFormWrongUsernameWarning':"Utente errato", 126 'changePasswordFormWrongUsernameWarning':"Utente errato",
130 'changePasswordFormWrongPassphraseWarning':"Frase segreta errata", 127 'changePasswordFormWrongPassphraseWarning':"Frase segreta errata",
131 'changePasswordFormWrongRetypePassphraseWarning':"Le frasi segrete non corrispondono, ripeti l&#x27;inserimento.", 128 'changePasswordFormWrongRetypePassphraseWarning':"Le frasi segrete non corrispondono, ripeti l&#x27;inserimento.",
132 'changePasswordFormSafetyCheckWarning':"Leggi e spunta le condizioni sotto riportate.", 129 'changePasswordFormSafetyCheckWarning':"Leggi e spunta le condizioni sotto riportate.",
133 'changePasswordFormProgressDialogTitle':"Aggiornamento credenziali", 130 'changePasswordFormProgressDialogTitle':"Aggiornamento credenziali",
134 'changePasswordFormProgressDialogEmptyText':"---", 131 'changePasswordFormProgressDialogEmptyText':"---",
135 'changePasswordFormProgressDialogConnectedMessageTitle':"Connesso", 132 'changePasswordFormProgressDialogConnectedMessageTitle':"Connesso",
136 'changePasswordFormProgressDialogConnectedMessageText':"Fatto", 133 'changePasswordFormProgressDialogConnectedMessageText':"Fatto",
137 'changePasswordFormProgressDialogErrorMessageTitle':"Errore", 134 'changePasswordFormProgressDialogErrorMessageTitle':"Errore",
138 'changePasswordFormProgressDialogErrorMessageText':"Aggiornamento credenziali fallito!", 135 'changePasswordFormProgressDialogErrorMessageText':"Aggiornamento credenziali fallito!",
139 'changeCredentialsPanelEncryptingDataMessageTitle':"Cambio della frase segreta", 136 'changeCredentialsPanelEncryptingDataMessageTitle':"Cambio della frase segreta",
140 'changeCredentialsPanelEncryptingDataMessageText':"Cripta localmente l&#x27;intestazione delle schede", 137 'changeCredentialsPanelEncryptingDataMessageText':"Cripta localmente l&#x27;intestazione delle schede",
141 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"Cambio della frase segreta", 138 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"Cambio della frase segreta",
142 'changeCredentialsPanelCreatingNewCredentialsMessageText':"Aggiornamento delle credenziali", 139 'changeCredentialsPanelCreatingNewCredentialsMessageText':"Aggiornamento delle credenziali",
143 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Cambio della frase segreta", 140 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Cambio della frase segreta",
144 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Carica le intestazioni criptate delle schede su Clipperz", 141 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Carica le intestazioni criptate delle schede su Clipperz",
145 'changeCredentialsPanelDoneMessageTitle':"Cambio della frase segreta", 142 'changeCredentialsPanelDoneMessageTitle':"Cambio della frase segreta",
146 'changeCredentialsPanelDoneMessageText':"Fatto", 143 'changeCredentialsPanelDoneMessageText':"Fatto",
147 'manageOTPTabLabel':"Codici di accesso “usa e getta”", 144 'manageOTPTabLabel':"Codici di accesso “usa e getta”",
148 'manageOTPTabTitle':"Codici di accesso “usa e getta”", 145 'manageOTPTabTitle':"Codici di accesso “usa e getta”",
149 'manageOTPTabDescription':"<p>I codici di accesso e “usa e getta” funzionano come la tua normale frase segreta, ma possono essere utilizzate una sola volta.</p> <p>Se lo stesso codice “usa e getta” viene utilizzato per tentare ulteriori accessi il processo di autenticazione fallirà.</p> <p>Infatti, dopo il primo utilizzo, il codice “usa e getta” verrà immediatamente disattivato e cancellato prevenendo così eventuali accessi non autorizzati.</p> <p>L&#x27;utilizzo di codici “usa e getta” è una scelta consigliata per chi teme che il computer dal quale sta accedendo a Clipperz non sia sicuro a causa di software quali keyloggers e spyware che potrebbero registrare le proprie credenziali di accesso.</p> <p><b>E&#x27; caldamente consigliato l&#x27;utilizzo di codici “usa e getta” quando ci si collega a Clipperz da terminali pubblici quali Internet Cafe e biblioteche.</b> </p> ", 146 'manageOTPTabDescription':"<p>I codici di accesso e “usa e getta” funzionano come la tua normale frase segreta, ma possono essere utilizzate una sola volta.</p> <p>Se lo stesso codice “usa e getta” viene utilizzato per tentare ulteriori accessi il processo di autenticazione fallirà.</p> <p>Infatti, dopo il primo utilizzo, il codice “usa e getta” verrà immediatamente disattivato e cancellato prevenendo così eventuali accessi non autorizzati.</p> <p>L&#x27;utilizzo di codici “usa e getta” è una scelta consigliata per chi teme che il computer dal quale sta accedendo a Clipperz non sia sicuro a causa di software quali keyloggers e spyware che potrebbero registrare le proprie credenziali di accesso.</p> <p><b>E&#x27; caldamente consigliato l&#x27;utilizzo di codici “usa e getta” quando ci si collega a Clipperz da terminali pubblici quali Internet Cafe e biblioteche.</b> </p> ",
150 'oneTimePasswordReadOnlyMessage':"<h6>Attenzione!</h6> <p>Non è possibilie accedere ai propri codici “usa e getta” quando si utilizza la versione offline di Clipperz.</p> ", 147 'oneTimePasswordReadOnlyMessage':"<h6>Attenzione!</h6> <p>Non è possibilie accedere ai propri codici “usa e getta” quando si utilizza la versione offline di Clipperz.</p> ",
151 'oneTimePasswordLoadingMessage':"<h6>Caricamento dati</h6> <p>Si prega di attendere ...</p> ", 148 'oneTimePasswordLoadingMessage':"<h6>Caricamento dati</h6> <p>Si prega di attendere ...</p> ",
152 'oneTimePasswordNoPasswordAvailable':"<h6>Nessun codice “usa e getta” disponibile</h6> <p>Per creare codici “usa e getta” clicca sul pulsante “Nuovo” che trovi qui sopra.</p> ", 149 'oneTimePasswordNoPasswordAvailable':"<h6>Nessun codice “usa e getta” disponibile</h6> <p>Per creare codici “usa e getta” clicca sul pulsante “Nuovo” che trovi qui sopra.</p> ",
153 'deleteOTPButtonLabel':"Elimina", 150 'deleteOTPButtonLabel':"Elimina",
154 'printOTPButtonLabel':"Stampa", 151 'printOTPButtonLabel':"Stampa",
155 'disabledOneTimePassword_warning':"disabilitato", 152 'disabledOneTimePassword_warning':"disabilitato",
156 'oneTimePasswordSelectionLink_selectLabel':"Seleziona:", 153 'oneTimePasswordSelectionLink_selectLabel':"Seleziona:",
157 'oneTimePasswordSelectionLink_none':"nessuno", 154 'oneTimePasswordSelectionLink_none':"nessuno",
158 'oneTimePasswordSelectionLink_used':"utilizzati", 155 'oneTimePasswordSelectionLink_used':"utilizzati",
159 'oneTimePasswordSelectionLink_unused':"disponibili", 156 'oneTimePasswordSelectionLink_unused':"disponibili",
160 'saveOTP_encryptUserDataTitle':"Registrazione del nuovo codice “usa e getta”", 157 'saveOTP_encryptUserDataTitle':"Registrazione del nuovo codice “usa e getta”",
161 'saveOTP_encryptUserDataText':"Elaborazione delle credenziali OTP ...", 158 'saveOTP_encryptUserDataText':"Elaborazione delle credenziali OTP ...",
162 'saveOTP_encryptOTPDataTitle':"Registrazione del nuovo codice “usa e getta”", 159 'saveOTP_encryptOTPDataTitle':"Registrazione del nuovo codice “usa e getta”",
163 'saveOTP_encryptOTPDataText':"Codifica locale dei dati di autenticazione ...", 160 'saveOTP_encryptOTPDataText':"Codifica locale dei dati di autenticazione ...",
164 'saveOTP_sendingDataTitle':"Registrazione del nuovo codice “usa e getta”", 161 'saveOTP_sendingDataTitle':"Registrazione del nuovo codice “usa e getta”",
165 'saveOTP_sendingDataText':"Invio dei dati di autenticazione criptati ...", 162 'saveOTP_sendingDataText':"Invio dei dati di autenticazione criptati ...",
166 'saveOTP_updatingInterfaceTitle':"Registrazione del nuovo codice “usa e getta”", 163 'saveOTP_updatingInterfaceTitle':"Registrazione del nuovo codice “usa e getta”",
167 'saveOTP_updatingInterfaceText':"Aggiornamento dell&#x27;interfaccia", 164 'saveOTP_updatingInterfaceText':"Aggiornamento dell&#x27;interfaccia",
168 'accountPreferencesLabel':"Preferenze", 165 'accountPreferencesLabel':"Preferenze",
169 'accountPreferencesTabTitle':"Preferenze", 166 'accountPreferencesTabTitle':"Preferenze",
170 'accountPreferencesLanguageTitle':"Selezione della lingua", 167 'accountPreferencesLanguageTitle':"Selezione della lingua",
171 'accountPreferencesLanguageDescription':"<p>Scegli la lingua preferita dall&#x27;elenco sottostante.</p> ", 168 'accountPreferencesLanguageDescription':"<p>Scegli la lingua preferita dall&#x27;elenco sottostante.</p> ",
172 'showDonationReminderPanelTitle':"Promemoria donazioni", 169 'showDonationReminderPanelTitle':"Promemoria donazioni",
173 'showDonationReminderPanelDescription':"<p>Mostra i promemopria per le donazioni</p> ", 170 'showDonationReminderPanelDescription':"<p>Mostra i promemopria per le donazioni</p> ",
174 'saveUserPreferencesFormSubmitLabel':"Salva", 171 'saveUserPreferencesFormSubmitLabel':"Salva",
175 'cancelUserPreferencesFormSubmitLabel':"Annulla", 172 'cancelUserPreferencesFormSubmitLabel':"Annulla",
176 'accountPreferencesSavingPanelTitle_Step1':"Salvataggio preferenze", 173 'accountPreferencesSavingPanelTitle_Step1':"Salvataggio preferenze",
177 'accountPreferencesSavingPanelText_Step1':"Cripta localmente le preferenze", 174 'accountPreferencesSavingPanelText_Step1':"Cripta localmente le preferenze",
178 'accountPreferencesSavingPanelTitle_Step2':"Salvataggio preferenze", 175 'accountPreferencesSavingPanelTitle_Step2':"Salvataggio preferenze",
179 'accountPreferencesSavingPanelText_Step2':"Carica preferenze criptate su Clipperz", 176 'accountPreferencesSavingPanelText_Step2':"Carica preferenze criptate su Clipperz",
180 'accountLoginHistoryLabel':"Registro degli accessi", 177 'accountLoginHistoryLabel':"Registro degli accessi",
181 'loginHistoryTabTitle':"Registro degli accessi", 178 'loginHistoryTabTitle':"Registro degli accessi",
182 'loginHistoryReadOnlyMessage':"<h6>Attenzione!</h6> <p>Il registro degli accessi non è disponibile quando si utilizza la versione offline di Clipperz</p> ", 179 'loginHistoryReadOnlyMessage':"<h6>Attenzione!</h6> <p>Il registro degli accessi non è disponibile quando si utilizza la versione offline di Clipperz</p> ",
183 'loginHistoryLoadingMessage':"<h6>Caricamento dati</h6> <p>Si prega di attendere ...</p> ", 180 'loginHistoryLoadingMessage':"<h6>Caricamento dati</h6> <p>Si prega di attendere ...</p> ",
184 'loginHistoryLoadedMessage':"<h6>I tuoi ultimi 10 accessi</h6> <p> </p> ", 181 'loginHistoryLoadedMessage':"<h6>I tuoi ultimi 10 accessi</h6> <p> </p> ",
185 'loginHistoryIPLabel':"IP", 182 'loginHistoryIPLabel':"IP",
186 'loginHistoryTimeLabel':"data", 183 'loginHistoryTimeLabel':"data",
187 'loginHistoryCurrentSessionText':"sessione corrente", 184 'loginHistoryCurrentSessionText':"sessione corrente",
188 'loginHistoryReloadButtonLabel':"Aggiorna il registro degli accessi", 185 'loginHistoryReloadButtonLabel':"Aggiorna il registro degli accessi",
189 'deleteAccountTabLabel':"Cancella il tuo utente", 186 'deleteAccountTabLabel':"Cancella il tuo utente",
190 'deleteAccountTabTitle':"Cancella il tuo utente", 187 'deleteAccountTabTitle':"Cancella il tuo utente",
191 'deleteAccountFormUsernameLabel':"Utente", 188 'deleteAccountFormUsernameLabel':"Utente",
192 'deleteAccountFormPassphraseLabel':"frase segreta", 189 'deleteAccountFormPassphraseLabel':"frase segreta",
193 'deleteAccountFormSafetyCheckboxLabel':"Sono consapevole che tutti miei dati verranno cancellati e che questa azione è irreversibile.", 190 'deleteAccountFormSafetyCheckboxLabel':"Sono consapevole che tutti miei dati verranno cancellati e che questa azione è irreversibile.",
194 'deleteAccountFormSubmitLabel':"Cancella il mio utente", 191 'deleteAccountFormSubmitLabel':"Cancella il mio utente",
195 'deleteAccountFormWrongUsernameWarning':"Utente errato", 192 'deleteAccountFormWrongUsernameWarning':"Utente errato",
196 'deleteAccountFormWrongPassphraseWarning':"Frase segreta errata", 193 'deleteAccountFormWrongPassphraseWarning':"Frase segreta errata",
197 'deleteAccountFormSafetyCheckWarning':"Leggi e spunta le condizioni sotto riportate.", 194 'deleteAccountFormSafetyCheckWarning':"Leggi e spunta le condizioni sotto riportate.",
198 'accountPanelDeletingAccountPanelConfirmationTitle':"ATTENZIONE", 195 'accountPanelDeletingAccountPanelConfirmationTitle':"ATTENZIONE",
199 'accountPanelDeleteAccountPanelConfirmationText':"Sei sicuro di voler cancellare il tuo utente?", 196 'accountPanelDeleteAccountPanelConfirmationText':"Sei sicuro di voler cancellare il tuo utente?",
200 'offlineCopyTabLabel':"Copia offline", 197 'offlineCopyTabLabel':"Copia offline",
201 'offlineCopyTabTitle':"Copia offline", 198 'offlineCopyTabTitle':"Copia offline",
202 'offlineCopyTabDescription':"<p>Con un solo clic puoi trasferire tutti i tuoi dati dai server di Clipperz al tuo PC, creando una versione offline di Clipperz a cui potrai accedere quando non è disponibile un collegamento ad Internet.</p> <p>La versione offline in sola lettura è sicura quanto quella online e non espone i tuoi dati a livelli di rischio superiore in quanto entrambe condividono la medesima architettura di sicurezza.</p> <ol> <li> <p>Clicca sul link sottostante per scaricare la copia offline dei tuoi dati.</p> </li> <li> <p>Il browser ti chiederà cosa fare del file “Clipperz_YYYYMMDD.html”. Scegli di salvarlo su un disco locale.</p> </li> <li> <p>Basta un doppio click sul file appena scaricato per lanciare la versione offline di Clipperz.</p> </li> <li> <p>Accedi utilizzando le normali credenziali di accesso.</p> </li> </ol> ", 199 'offlineCopyTabDescription':"<p>Con un solo clic puoi trasferire tutti i tuoi dati dai server di Clipperz al tuo PC, creando una versione offline di Clipperz a cui potrai accedere quando non è disponibile un collegamento ad Internet.</p> <p>La versione offline in sola lettura è sicura quanto quella online e non espone i tuoi dati a livelli di rischio superiore in quanto entrambe condividono la medesima architettura di sicurezza.</p> <ol> <li> <p>Clicca sul link sottostante per scaricare la copia offline dei tuoi dati.</p> </li> <li> <p>Il browser ti chiederà cosa fare del file “Clipperz_YYYYMMDD.html”. Scegli di salvarlo su un disco locale.</p> </li> <li> <p>Basta un doppio click sul file appena scaricato per lanciare la versione offline di Clipperz.</p> </li> <li> <p>Accedi utilizzando le normali credenziali di accesso.</p> </li> </ol> ",
203 'offlineCopyDownloadLinkLabel':"Scarica copia offline", 200 'offlineCopyDownloadLinkLabel':"Scarica copia offline",
204 'offlineCopyDownloadWarning':"<h4><a href=\"#\" id=\"offlineCopyDownloadWarningLink\">Aggiorna la tua “copia offline”!</a> </h4> <p>Una o più schede sono state recentemente create o modificate, ti consigliamo di scaricare nuovamente la tua “copia offline”.</p> ", 201 'offlineCopyDownloadWarning':"<h4><a href=\"#\" id=\"offlineCopyDownloadWarningLink\">Aggiorna la tua “copia offline”!</a> </h4> <p>Una o più schede sono state recentemente create o modificate, ti consigliamo di scaricare nuovamente la tua “copia offline”.</p> ",
205 'offlineCopyDownloadOk':"", 202 'offlineCopyDownloadOk':"",
206 'sharingTabLabel':"Condividi", 203 'sharingTabLabel':"Condividi",
207 'sharingTabTitle':"Condividi", 204 'sharingTabTitle':"Condividi",
208 'sharingTabDescription':"<p>Spesso è necessario condividere alcune delle proprie informazioni riservate con una o più persone.</p> <p>Può trattarsi di situazioni semplici come dare ad un collega il codice di accesso alla propria segreteria telefonica quando si va in vacanza, oppure complesse come regolare l&#x27;accesso dei legittimi eredi ai servizi di online banking utilizzati dal defunto.</p> <p>Con Clipperz la condivisione di segreti diviene un processo semplice e sicuro.</p> <p> </p> <p><b>Presto disponibile ...</b> </p> ", 205 'sharingTabDescription':"<p>Spesso è necessario condividere alcune delle proprie informazioni riservate con una o più persone.</p> <p>Può trattarsi di situazioni semplici come dare ad un collega il codice di accesso alla propria segreteria telefonica quando si va in vacanza, oppure complesse come regolare l&#x27;accesso dei legittimi eredi ai servizi di online banking utilizzati dal defunto.</p> <p>Con Clipperz la condivisione di segreti diviene un processo semplice e sicuro.</p> <p> </p> <p><b>Presto disponibile ...</b> </p> ",
209 'importTabLabel':"Importa", 206 'importTabLabel':"Importa",
210 'importTabTitle':"Importa", 207 'importTabTitle':"Importa",
211 'importTabDescription':"<p>Presto disponibile ...</p> ", 208 'importTabDescription':"<p>Presto disponibile ...</p> ",
212 'printingTabLabel':"Esporta", 209 'printingTabLabel':"Esporta",
213 'printingTabTitle':"Esporta", 210 'printingTabTitle':"Esporta",
214 'printingTabDescription':"<h5>Stampa i tuoi dati</h5> <p>Cliccando sul link sottostante si aprirà una nuova finestra in cui verranno visualizzate tutte le tue schede in un formato idoneo alla stampa.</p> <p>Se intendi utilizzare la stampa per creare una copia di sicurezza dei tuoi dati, ti suggeriamo di considerare l&#x27;opzione più sicura fornita della “copia offline”.</p> ", 211 'printingTabDescription':"<h5>Stampa i tuoi dati</h5> <p>Cliccando sul link sottostante si aprirà una nuova finestra in cui verranno visualizzate tutte le tue schede in un formato idoneo alla stampa.</p> <p>Se intendi utilizzare la stampa per creare una copia di sicurezza dei tuoi dati, ti suggeriamo di considerare l&#x27;opzione più sicura fornita della “copia offline”.</p> ",
215 'printingLinkLabel':"Versione stampabile", 212 'printingLinkLabel':"Versione stampabile",
216 'contactsTabLabel':"Contatti", 213 'contactsTabLabel':"Contatti",
217 'contactsTabTitle':"Contatti", 214 'contactsTabTitle':"Contatti",
218 'passwordGeneratorTabLabel':"Generatore di password", 215 'passwordGeneratorTabLabel':"Generatore di password",
219 'bookmarkletTabLabel':"Bookmarklet", 216 'bookmarkletTabLabel':"Bookmarklet",
220 'passwordGeneratorTabTitle':"Generatore di password", 217 'passwordGeneratorTabTitle':"Generatore di password",
221 'bookmarkletTabTitle':"Bookmarklet", 218 'bookmarkletTabTitle':"Bookmarklet",
222 'paswordGeneratorTabDescription':"<p> </p> ", 219 'paswordGeneratorTabDescription':"<p> </p> ",
223 'passwordGeneratorTabButtonLabel':"Genera password", 220 'passwordGeneratorTabButtonLabel':"Genera password",
224 'bookmarkletTabLabel':"Bookmarklet", 221 'bookmarkletTabLabel':"Bookmarklet",
225 'bookmarkletTabTitle':"Bookmarklet", 222 'bookmarkletTabTitle':"Bookmarklet",
226 'bookmarkletTabBookmarkletTitle':"Aggiungi a Clipperz", 223 'bookmarkletTabBookmarkletTitle':"Aggiungi a Clipperz",
227 'bookmarkletTabInstructions':"<h3>Come creare una scheda con “login diretto” ad un servizio online</h3> <ol> <li> <p>Aprire la pagina web che contiene la maschera di login. (ovvero la pagina dove usualmente si inseriscono nome utente e password)</p> </li> <li> <p>Cliccare sulla bookmarklet: una nuova finestrella si visualizzerà sopra la pagina.</p> </li> <li> <p>Copiare il testo di configurazione del “login diretto” contenuto nella finestrella. (ctrl-C)</p> </li> <li> <p>Accedere a Clipperz e cliccare sul pulsante <b>Aggiungi nuova scheda</b> .</p> </li> <li> <p>Selezionare il modello “Login diretto” ed incollare il testo precedentemente copiato. (ctrl-V)</p> </li> <li> <p>Cliccare sul pulsante <b>Crea</b> , completare e verificare i dettagli della scheda, quindi cliccare su <b>Salva</b> .</p> </li> </ol> <h3>Come aggiungere un “login diretto” ad una scheda esistente</h3> <ol> <li> <p>Come sopra.</p> </li> <li> <p>Come sopra.</p> </li> <li> <p>Come sopra.</p> </li> <li> <p>Accedere a Clipperz e selezionare la scheda contenente le credenziali del servizio a cui si vuole accedere con il “login diretto” e cliccare su <b>Modifica</b> .</p> </li> <li> <p>Incollare il testo precedentemente copiato nell&#x27;apposito campo presente nella sezione “Login diretti”. (ctrl-V)</p> </li> <li> <p>Cliccare il pulsante <b>Aggiungi nuovo login diretto</b> , completare e verificare i dettagli della scheda, quindi cliccare su <b>Salva</b> .</p> </li> </ol> <p> </p> <p>Ulteriori informazioni sull&#x27;utilizzo della bookmarklet sono <a href=\"http://www.clipperz.com/support/user_guide/bookmarklet\" target=\"_blank\">disponibili qui</a> .</p> ", 224 'bookmarkletTabInstructions':"<h3>Come creare una scheda con “login diretto” ad un servizio online</h3> <ol> <li> <p>Aprire la pagina web che contiene la maschera di login. (ovvero la pagina dove usualmente si inseriscono nome utente e password)</p> </li> <li> <p>Cliccare sulla bookmarklet: una nuova finestrella si visualizzerà sopra la pagina.</p> </li> <li> <p>Copiare il testo di configurazione del “login diretto” contenuto nella finestrella. (ctrl-C)</p> </li> <li> <p>Accedere a Clipperz e cliccare sul pulsante <b>Aggiungi nuova scheda</b> .</p> </li> <li> <p>Selezionare il modello “Login diretto” ed incollare il testo precedentemente copiato. (ctrl-V)</p> </li> <li> <p>Cliccare sul pulsante <b>Crea</b> , completare e verificare i dettagli della scheda, quindi cliccare su <b>Salva</b> .</p> </li> </ol> <h3>Come aggiungere un “login diretto” ad una scheda esistente</h3> <ol> <li> <p>Come sopra.</p> </li> <li> <p>Come sopra.</p> </li> <li> <p>Come sopra.</p> </li> <li> <p>Accedere a Clipperz e selezionare la scheda contenente le credenziali del servizio a cui si vuole accedere con il “login diretto” e cliccare su <b>Modifica</b> .</p> </li> <li> <p>Incollare il testo precedentemente copiato nell&#x27;apposito campo presente nella sezione “Login diretti”. (ctrl-V)</p> </li> <li> <p>Cliccare il pulsante <b>Aggiungi nuovo login diretto</b> , completare e verificare i dettagli della scheda, quindi cliccare su <b>Salva</b> .</p> </li> </ol> <p> </p> <p>Ulteriori informazioni sull&#x27;utilizzo della bookmarklet sono <a href=\"http://www.clipperz.com/support/user_guide/bookmarklet\" target=\"_blank\">disponibili qui</a> .</p> ",
228 'mainPanelDirectLoginBlockLabel':"Login diretti", 225 'mainPanelDirectLoginBlockLabel':"Login diretti",
229 'directLinkReferenceShowButtonLabel':"mostra", 226 'directLinkReferenceShowButtonLabel':"mostra",
230 'mainPanelDirectLoginBlockDescription':"<p>Crea “login diretti” per accedere ai tuoi servizi web senza bisogno di inserire username e password!</p> <p>I “login diretti” migliorano la tua sicurezza permettendoti di:</p> <ul> <li> <p>adottare comodamente password complesse;</p> </li> <li> <p>non riutilizzare mai la stessa password.</p> </li> </ul> <p>Semplice e rapido grazie alla <b>Clipperz bookmarklet</b> .</p><a href=\"http://www.clipperz.com/support/user_guide/direct_logins\" target=\"_blank\">Ulteriori informazioni</a> ", 227 'mainPanelDirectLoginBlockDescription':"<p>Crea “login diretti” per accedere ai tuoi servizi web senza bisogno di inserire username e password!</p> <p>I “login diretti” migliorano la tua sicurezza permettendoti di:</p> <ul> <li> <p>adottare comodamente password complesse;</p> </li> <li> <p>non riutilizzare mai la stessa password.</p> </li> </ul> <p>Semplice e rapido grazie alla <b>Clipperz bookmarklet</b> .</p><a href=\"http://www.clipperz.com/support/user_guide/direct_logins\" target=\"_blank\">Ulteriori informazioni</a> ",
231 'mainPanelRecordsBlockLabel':"Schede", 228 'mainPanelRecordsBlockLabel':"Schede",
232 'mainPanelAddRecordButtonLabel':"Aggiungi nuova scheda", 229 'mainPanelAddRecordButtonLabel':"Aggiungi nuova scheda",
233 'mainPanelRemoveRecordButtonLabel':"Elimina scheda", 230 'mainPanelRemoveRecordButtonLabel':"Elimina scheda",
234 'mainPanelRecordFilterBlockTagsLabel':"tags", 231 'mainPanelRecordFilterBlockTagsLabel':"tags",
235 'recordDetailNoRecordAtAllTitle':"Benvenuto a Clipperz!", 232 'recordDetailNoRecordAtAllTitle':"Benvenuto a Clipperz!",
236 'recordDetailNoRecordAtAllDescription':"<h5>Ora puoi iniziare ad aggiungere schede con le tue informazioni riservate.</h5> <p>Le schede sono semplici moduli in cui organizzare le tue password ed ogni altro tipo di dato confidenziale.</p> <p>Le schede hanno una struttura flessibile e si adattano a contenere le informazioni più diverse: dalle password ai dettagli delle tue carte di credito!</p> <h5>Non dimenticarti di installare la bookmarklet!</h5> <p>Prima di iniziare ti consigliamo di installare la bookmarklet “Aggiungi a Clipperz”: creare nuove schede diventerà più rapido e divertente.</p> <p>Vai alla sezione “bookmarklet” per scoprire come installarla ed utilizzarla.</p> <p> </p> <p>Quando sei pronto, clicca sul pulsante <b>Aggiungi nuova scheda</b> e metti al sicuro tutte le tue informazioni più preziose.</p> <p> </p><a href=\"http://www.clipperz.com/support/user_guide/managing_cards\" target=\"_blank\">Maggiori informazioni sulla creazione e gestione delle schede (in inglese)</a> ", 233 'recordDetailNoRecordAtAllDescription':"<h5>Ora puoi iniziare ad aggiungere schede con le tue informazioni riservate.</h5> <p>Le schede sono semplici moduli in cui organizzare le tue password ed ogni altro tipo di dato confidenziale.</p> <p>Le schede hanno una struttura flessibile e si adattano a contenere le informazioni più diverse: dalle password ai dettagli delle tue carte di credito!</p> <h5>Non dimenticarti di installare la bookmarklet!</h5> <p>Prima di iniziare ti consigliamo di installare la bookmarklet “Aggiungi a Clipperz”: creare nuove schede diventerà più rapido e divertente.</p> <p>Vai alla sezione “bookmarklet” per scoprire come installarla ed utilizzarla.</p> <p> </p> <p>Quando sei pronto, clicca sul pulsante <b>Aggiungi nuova scheda</b> e metti al sicuro tutte le tue informazioni più preziose.</p> <p> </p><a href=\"http://www.clipperz.com/support/user_guide/managing_cards\" target=\"_blank\">Maggiori informazioni sulla creazione e gestione delle schede (in inglese)</a> ",
237 'newRecordWizardTitleBox':"<h5>Seleziona un modello di scheda</h5> <p>Le schede sono semplici moduli in cui organizzare le tue password ed ogni altro tipo di dato confidenziale.</p> <p>Scegli un modello dall&#x27;elenco sottostante. In seguito potrai sempre modificare la tua scheda aggiungendo o rimuovendo campi.</p> ", 234 'newRecordWizardTitleBox':"<h5>Seleziona un modello di scheda</h5> <p>Le schede sono semplici moduli in cui organizzare le tue password ed ogni altro tipo di dato confidenziale.</p> <p>Scegli un modello dall&#x27;elenco sottostante. In seguito potrai sempre modificare la tua scheda aggiungendo o rimuovendo campi.</p> ",
238 'newRecordWizardBookmarkletConfigurationTitle':"Login diretto", 235 'newRecordWizardBookmarkletConfigurationTitle':"Login diretto",
239 'newRecordWizardBookmarkletConfigurationDescription':"<p>Incolla qui sotto il codice generato dalla bookmarklet di Clipperz.</p> <p>Verrà creata una nuova scheda già completa con le informazioni per il “login diretto” al tuo servizio web.</p> ", 236 'newRecordWizardBookmarkletConfigurationDescription':"<p>Incolla qui sotto il codice generato dalla bookmarklet di Clipperz.</p> <p>Verrà creata una nuova scheda già completa con le informazioni per il “login diretto” al tuo servizio web.</p> ",
240 'newRecordWizardCreateButtonLabel':"Crea", 237 'newRecordWizardCreateButtonLabel':"Crea",
241 'newRecordWizardCancelButtonLabel':"Annulla", 238 'newRecordWizardCancelButtonLabel':"Annulla",
242 'donateSplashPanelTitle':"Supporta Clipperz, fai una donazione oggi!", 239 'donateSplashPanelTitle':"Supporta Clipperz, fai una donazione oggi!",
243 'donateSplashPanelDescription':"<p>Alcune buone ragioni per fare una donazione:</p> <ul> <li> <p>supportare lo sviluppo di nuove funzionalità</p> </li> <li> <p>mantenere il servizio gratuito per tutti</p> </li> <li> <p>mostrare la tua gratitudine per il nostro duro lavoro</p> </li> </ul> <p>Per qualunque ulteriore informazione visita la <a href=\"http://www.clipperz.com/donations\" target=\"_blank\">pagina delle donazioni</a> .</p> <p><b>Pronto a donare?</b> </p> ", 240 'donateSplashPanelDescription':"<p>Alcune buone ragioni per fare una donazione:</p> <ul> <li> <p>supportare lo sviluppo di nuove funzionalità</p> </li> <li> <p>mantenere il servizio gratuito per tutti</p> </li> <li> <p>mostrare la tua gratitudine per il nostro duro lavoro</p> </li> </ul> <p>Per qualunque ulteriore informazione visita la <a href=\"http://www.clipperz.com/donations\" target=\"_blank\">pagina delle donazioni</a> .</p> <p><b>Pronto a donare?</b> </p> ",
244 'donateCloseButtonLabel':"Non ancora", 241 'donateCloseButtonLabel':"Non ancora",
245 'recordTemplates':{ 242 'recordTemplates':{
246 'WebAccount':{ 243 'WebAccount':{
247 'title':"Password", 244 'title':"Password",
248 'description':"<p>Una scheda molto semplice per conservare le credenziali di accesso ai tuoi servizi web.</p> ", 245 'description':"<p>Una scheda molto semplice per conservare le credenziali di accesso ai tuoi servizi web.</p> ",
249 'fields':{ 246 'fields':{
250 'URL':"Indirizzo web", 247 'URL':"Indirizzo web",
251 'TXT':"Utente o email", 248 'TXT':"Utente o email",
252 'PWD':"Password" 249 'PWD':"Password"
253 } 250 }
254 }, 251 },
255 'BankAccount':{ 252 'BankAccount':{
256 'title':"Conto corrente bancario", 253 'title':"Conto corrente bancario",
257 'description':"<p>Proteggi il tuo numero di conto corrente ed i codici di accesso ai servizi di online banking.</p> ", 254 'description':"<p>Proteggi il tuo numero di conto corrente ed i codici di accesso ai servizi di online banking.</p> ",
258 'fields':{ 255 'fields':{
259 'TXT':"Banca", 256 'TXT':"Banca",
260 'TXT':"Conto corrente n.", 257 'TXT':"Conto corrente n.",
261 'URL':"Sito web della banca", 258 'URL':"Sito web della banca",
262 'TXT':"Online banking ID", 259 'TXT':"Online banking ID",
263 'PWD':"Online banking password" 260 'PWD':"Online banking password"
264 } 261 }
265 }, 262 },
266 'CreditCard':{ 263 'CreditCard':{
267 'title':"Carta di credito", 264 'title':"Carta di credito",
268 'description':"<p>Numero della carta, data di scadenza, codici CVV2 e PIN sempre a portata di mano con Clipperz.</p> ", 265 'description':"<p>Numero della carta, data di scadenza, codici CVV2 e PIN sempre a portata di mano con Clipperz.</p> ",
269 'fields':{ 266 'fields':{
270 'TXT':"Tipo (Visa, AmEx, ...)", 267 'TXT':"Tipo (Visa, AmEx, ...)",
271 'TXT':"Numero", 268 'TXT':"Numero",
272 'TXT':"Titolare", 269 'TXT':"Titolare",
273 'TXT':"Data di scadenza", 270 'TXT':"Data di scadenza",
274 'TXT':"CVV2", 271 'TXT':"CVV2",
275 'PWD':"PIN", 272 'PWD':"PIN",
276 'URL':"Sito web della carta", 273 'URL':"Sito web della carta",
277 'TXT':"Utente", 274 'TXT':"Utente",
278 'PWD':"Password" 275 'PWD':"Password"
279 } 276 }
280 }, 277 },
281 'AddressBookEntry':{ 278 'AddressBookEntry':{
282 'title':"Voce della rubrica", 279 'title':"Voce della rubrica",
283 'description':"<p>Fai di Clipperz la tua rubrica segreta. Usa questo modello per creare una nuova voce.</p> ", 280 'description':"<p>Fai di Clipperz la tua rubrica segreta. Usa questo modello per creare una nuova voce.</p> ",
284 'fields':{ 281 'fields':{
285 'TXT':"Nome", 282 'TXT':"Nome",
286 'TXT':"Email", 283 'TXT':"Email",
287 'TXT':"Telefono", 284 'TXT':"Telefono",
288 'TXT':"Cellulare", 285 'TXT':"Cellulare",
289 'ADDR':"Indirizzo" 286 'ADDR':"Indirizzo"
290 } 287 }
291 }, 288 },
292 'Custom':{ 289 'Custom':{
293 'title':"Scheda personalizzata", 290 'title':"Scheda personalizzata",
294 'description':"<p>Qualunque sia il tipo di informazione che desideri proteggere, Clipperz ti consente di creare una scheda su misura per i tuoi bisogni.</p> ", 291 'description':"<p>Qualunque sia il tipo di informazione che desideri proteggere, Clipperz ti consente di creare una scheda su misura per i tuoi bisogni.</p> ",
295 'fields':{ 292 'fields':{
296 'TXT':"Nome del campo 1", 293 'TXT':"Nome del campo 1",
297 'TXT':"Nome del campo 2", 294 'TXT':"Nome del campo 2",
298 'TXT':"Nome del campo 3" 295 'TXT':"Nome del campo 3"
299 } 296 }
300 } 297 }
301}, 298},
302 'recordFieldTypologies':{ 299 'recordFieldTypologies':{
303 'TXT':{ 300 'TXT':{
304 'description':"simple text field" 301 'description':"simple text field"
305 }, 302 },
306 'PWD':{ 303 'PWD':{
307 'description':"simple text field, with default status set to hidden", 304 'description':"simple text field, with default status set to hidden",
308 'shortDescription':"Password" 305 'shortDescription':"Password"
309 }, 306 },
310 'URL':{ 307 'URL':{
311 'description':"simple text field in edit mode, that became an active url in view mode", 308 'description':"simple text field in edit mode, that became an active url in view mode",
312 'shortDescription':"Indirizzo web" 309 'shortDescription':"Indirizzo web"
313 }, 310 },
314 'DATE':{ 311 'DATE':{
315 'description':"a value set with a calendar helper", 312 'description':"a value set with a calendar helper",
316 'shortDescription':"data" 313 'shortDescription':"data"
317 }, 314 },
318 'ADDR':{ 315 'ADDR':{
319 'description':"just like the URL, but the active link points to Google Maps (or similar service) passing the address value as argument", 316 'description':"just like the URL, but the active link points to Google Maps (or similar service) passing the address value as argument",
320 'shortDescription':"indirizzo stradale" 317 'shortDescription':"indirizzo stradale"
321 }, 318 },
322 'CHECK':{ 319 'CHECK':{
323 'description':"check description", 320 'description':"check description",
324 'shortDescription':"check" 321 'shortDescription':"check"
325 }, 322 },
326 'RADIO':{ 323 'RADIO':{
327 'description':"radio description", 324 'description':"radio description",
328 'shortDescription':"radio" 325 'shortDescription':"radio"
329 }, 326 },
330 'SELECT':{ 327 'SELECT':{
331 'description':"select description", 328 'description':"select description",
332 'shortDescription':"Seleziona:" 329 'shortDescription':"Seleziona:"
333 } 330 }
334}, 331},
335 'newRecordPanelGeneralExceptionTitle':"Errore", 332 'newRecordPanelGeneralExceptionTitle':"Errore",
336 'newRecordPanelGeneralExceptionMessage':"Configurazione non valida. Accertati di aver utilizzato il codice quello generato dalla bookmarklet.", 333 'newRecordPanelGeneralExceptionMessage':"Configurazione non valida. Accertati di aver utilizzato il codice quello generato dalla bookmarklet.",
337 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"Errore", 334 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"Errore",
338 'newRecordPanelWrongBookmarkletVersionExceptionMessage':"La configurazione è stato generata da una vecchia versione della bookmarklet. Sei pregato di aggiornare subito la tua bookmarklet.", 335 'newRecordPanelWrongBookmarkletVersionExceptionMessage':"La configurazione è stato generata da una vecchia versione della bookmarklet. Sei pregato di aggiornare subito la tua bookmarklet.",
339 'newRecordPanelExceptionPanelCloseButtonLabel':"Annulla", 336 'newRecordPanelExceptionPanelCloseButtonLabel':"Annulla",
340 'mainPanelDeletingRecordPanelConfirmationTitle':"Eliminazione della scheda in corso", 337 'mainPanelDeletingRecordPanelConfirmationTitle':"Eliminazione della scheda in corso",
341 'mainPanelDeleteRecordPanelConfirmationText':"Vuoi veramente eliminare la scheda selezionata?", 338 'mainPanelDeleteRecordPanelConfirmationText':"Vuoi veramente eliminare la scheda selezionata?",
342 'mainPanelDeletingRecordPanelInitialTitle':"Eliminazione della scheda in corso", 339 'mainPanelDeletingRecordPanelInitialTitle':"Eliminazione della scheda in corso",
343 'mainPanelDeletingRecordPanelInitialText':"---", 340 'mainPanelDeletingRecordPanelInitialText':"---",
344 'mainPanelDeletingRecordPanelCompletedText':"Fatto", 341 'mainPanelDeletingRecordPanelCompletedText':"Fatto",
345 'deleteRecordPanelCollectRecordDataMessageTitle':"Elimina scheda", 342 'deleteRecordPanelCollectRecordDataMessageTitle':"Elimina scheda",
346 'deleteRecordPanelCollectRecordDataMessageText':"Aggiorna elenco delle schede", 343 'deleteRecordPanelCollectRecordDataMessageText':"Aggiorna elenco delle schede",
347 'deleteRecordPanelEncryptUserDataMessageTitle':"Elimina scheda", 344 'deleteRecordPanelEncryptUserDataMessageTitle':"Elimina scheda",
348 'deleteRecordPanelEncryptUserDataMessageText':"Cripta localmente l&#x27;intestazione delle schede", 345 'deleteRecordPanelEncryptUserDataMessageText':"Cripta localmente l&#x27;intestazione delle schede",
349 'deleteRecordPanelSendingDataToTheServerMessageTitle':"Elimina scheda", 346 'deleteRecordPanelSendingDataToTheServerMessageTitle':"Elimina scheda",
350 'deleteRecordPanelSendingDataToTheServerMessageText':"Carica le intestazioni criptate delle schede su Clipperz", 347 'deleteRecordPanelSendingDataToTheServerMessageText':"Carica le intestazioni criptate delle schede su Clipperz",
351 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"Elimina scheda", 348 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"Elimina scheda",
352 'deleteRecordPanelUpdatingTheInterfaceMessageText':"Aggiornamento dell&#x27;interfaccia", 349 'deleteRecordPanelUpdatingTheInterfaceMessageText':"Aggiornamento dell&#x27;interfaccia",
353 'recordDetailNoRecordSelectedTitle':"Nessuna scheda selezionata", 350 'recordDetailNoRecordSelectedTitle':"Nessuna scheda selezionata",
354 'recordDetailNoRecordSelectedDescription':"<p>Selezionare una scheda dall&#x27;elenco a sinistra.</p> ", 351 'recordDetailNoRecordSelectedDescription':"<p>Selezionare una scheda dall&#x27;elenco a sinistra.</p> ",
355 'recordDetailLoadingRecordMessage':"Scarica scheda criptata da Clipperz", 352 'recordDetailLoadingRecordMessage':"Scarica scheda criptata da Clipperz",
356 'recordDetailDecryptingRecordMessage':"Decodifica locale dei dati della scheda", 353 'recordDetailDecryptingRecordMessage':"Decodifica locale dei dati della scheda",
357 'recordDetailLoadingRecordVersionMessage':"Scarica l&#x27;ultima versione della scheda", 354 'recordDetailLoadingRecordVersionMessage':"Scarica l&#x27;ultima versione della scheda",
358 'recordDetailDecryptingRecordVersionMessage':"Decodifica locale dell&#x27;ultima versione", 355 'recordDetailDecryptingRecordVersionMessage':"Decodifica locale dell&#x27;ultima versione",
359 'recordDetailLoadingErrorMessageTitle':"Errore nello scaricamento della scheda", 356 'recordDetailLoadingErrorMessageTitle':"Errore nello scaricamento della scheda",
360 'recordDetailNotesLabel':"Note", 357 'recordDetailNotesLabel':"Note",
361 'recordDetailLabelFieldColumnLabel':"Nome del campo", 358 'recordDetailLabelFieldColumnLabel':"Nome del campo",
362 'recordDetailDataFieldColumnLabel':"Dati del campo", 359 'recordDetailDataFieldColumnLabel':"Dati del campo",
363 'recordDetailTypeFieldColumnLabel':"Tipo", 360 'recordDetailTypeFieldColumnLabel':"Tipo",
364 'recordDetailSavingChangesMessagePanelInitialTitle':"Salvataggio scheda", 361 'recordDetailSavingChangesMessagePanelInitialTitle':"Salvataggio scheda",
365 'recordDetailSavingChangesMessagePanelInitialText':"---", 362 'recordDetailSavingChangesMessagePanelInitialText':"---",
366 'recordDetailRemoveFieldButtonLabel':"-", 363 'recordDetailRemoveFieldButtonLabel':"-",
367 'recordDetailAddFieldButtonLabel':"Aggiungi nuovo campo", 364 'recordDetailAddFieldButtonLabel':"Aggiungi nuovo campo",
368 'recordDetailPasswordFieldHelpLabel':"clicca le stelline per copiare la password e poi Ctrl-C", 365 'recordDetailPasswordFieldHelpLabel':"clicca le stelline per copiare la password e poi Ctrl-C",
369 'recordDetailPasswordFieldScrambleLabel':"nascondi", 366 'recordDetailPasswordFieldScrambleLabel':"nascondi",
370 'recordDetailPasswordFieldUnscrambleLabel':"mostra", 367 'recordDetailPasswordFieldUnscrambleLabel':"mostra",
371 'recordDetailDirectLoginBlockTitle':"Login diretti", 368 'recordDetailDirectLoginBlockTitle':"Login diretti",
372 'recordDetailNewDirectLoginDescription':"<p>Configurazione del login diretto</p> ", 369 'recordDetailNewDirectLoginDescription':"<p>Configurazione del login diretto</p> ",
373 'recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription':"<p>Questa scheda contiene credenziali di accesso ad un servizio online?</p> <p>In tal caso puoi utilizzare la bookmarklet per configurare un “login diretto” da Clipperz con un solo clic!</p> ", 370 'recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription':"<p>Questa scheda contiene credenziali di accesso ad un servizio online?</p> <p>In tal caso puoi utilizzare la bookmarklet per configurare un “login diretto” da Clipperz con un solo clic!</p> ",
374 'recordDetailDeleteDirectLoginButtonLabel':"-", 371 'recordDetailDeleteDirectLoginButtonLabel':"-",
375 'recordDetailAddNewDirectLoginButtonLabel':"Aggiungi nuovo login diretto", 372 'recordDetailAddNewDirectLoginButtonLabel':"Aggiungi nuovo login diretto",
376 'recordDetailEditButtonLabel':"Modifica", 373 'recordDetailEditButtonLabel':"Modifica",
377 'recordDetailSaveButtonLabel':"Salva", 374 'recordDetailSaveButtonLabel':"Salva",
378 'recordDetailCancelButtonLabel':"Annulla", 375 'recordDetailCancelButtonLabel':"Annulla",
379 'newRecordTitleLabel':"_nuova scheda_", 376 'newRecordTitleLabel':"_nuova scheda_",
380 'newDirectLoginLabelSuffix':"", 377 'newDirectLoginLabelSuffix':"",
381 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"Salva scheda", 378 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"Salva scheda",
382 'recordSaveChangesPanelCollectRecordInfoMessageText':"Aggiorna elenco delle schede", 379 'recordSaveChangesPanelCollectRecordInfoMessageText':"Aggiorna elenco delle schede",
383 'recordSaveChangesPanelEncryptUserDataMessageTitle':"Salva scheda", 380 'recordSaveChangesPanelEncryptUserDataMessageTitle':"Salva scheda",
384 'recordSaveChangesPanelEncryptUserDataMessageText':"Cripta localmente l&#x27;intestazione delle schede", 381 'recordSaveChangesPanelEncryptUserDataMessageText':"Cripta localmente l&#x27;intestazione delle schede",
385 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"Salva scheda", 382 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"Salva scheda",
386 'recordSaveChangesPanelEncryptRecordDataMessageText':"Cripta localmente i dati della scheda", 383 'recordSaveChangesPanelEncryptRecordDataMessageText':"Cripta localmente i dati della scheda",
387 'recordSaveChangesPanelEncryptRecordVersionDataMessageTitle':"Salva scheda", 384 'recordSaveChangesPanelEncryptRecordVersionDataMessageTitle':"Salva scheda",
388 'recordSaveChangesPanelEncryptRecordVersionDataMessageText':"Cripta localmente la versione della scheda", 385 'recordSaveChangesPanelEncryptRecordVersionDataMessageText':"Cripta localmente la versione della scheda",
389 'recordSaveChangesPanelSendingDataToTheServerMessageTitle':"Salva scheda", 386 'recordSaveChangesPanelSendingDataToTheServerMessageTitle':"Salva scheda",
390 'recordSaveChangesPanelSendingDataToTheServerMessageText':"Carica le intestazioni criptate delle schede su Clipperz", 387 'recordSaveChangesPanelSendingDataToTheServerMessageText':"Carica le intestazioni criptate delle schede su Clipperz",
391 'recordSaveChangesPanelUpdatingTheInterfaceMessageTitle':"Salva scheda", 388 'recordSaveChangesPanelUpdatingTheInterfaceMessageTitle':"Salva scheda",
392 'recordSaveChangesPanelUpdatingTheInterfaceMessageText':"Aggiornamento dell&#x27;interfaccia", 389 'recordSaveChangesPanelUpdatingTheInterfaceMessageText':"Aggiornamento dell&#x27;interfaccia",
393 'passwordGeneratorPanelTitle':"Generatore di password", 390 'passwordGeneratorPanelTitle':"Generatore di password",
394 'passwordGeneratorPanelOkLabel':"Ok", 391 'passwordGeneratorPanelOkLabel':"Ok",
395 'passwordGeneratorPanelCancelLabel':"Annulla", 392 'passwordGeneratorPanelCancelLabel':"Annulla",
396 'passwordGeneratorLengthLabel':"lung . :", 393 'passwordGeneratorLengthLabel':"lung . :",
397 //'DWRUtilLoadingMessage':"Caricamento dati", 394 //'DWRUtilLoadingMessage':"Caricamento dati",
398 'comingSoon':"Presto disponibile ...", 395 'comingSoon':"Presto disponibile ...",
399 'panelCollectingEntryopyMessageText':"Raccolta entropia", 396 'panelCollectingEntryopyMessageText':"Raccolta entropia",
400 'importData_parsingDataTitle':"Importa", 397 'importData_parsingDataTitle':"Importa",
401 'importData_previewingDataTitle':"Importa", 398 'importData_previewingDataTitle':"Importa",
402 'importData_processingDataTitle':"Importa", 399 'importData_processingDataTitle':"Importa",
403 'ImportWizard':{ 400 'ImportWizard':{
404 'EDIT':"Modifica", 401 'EDIT':"Modifica",
405 'IMPORT':"Importa", 402 'IMPORT':"Importa",
406 'CSV_NOTES':"Note", 403 'CSV_NOTES':"Note",
407 'EXCEL_EDIT':"Modifica" 404 'EXCEL_EDIT':"Modifica"
408}, 405},
diff --git a/frontend/beta/js/Clipperz/PM/Strings/Strings_ja-JP.js b/frontend/beta/js/Clipperz/PM/Strings/Strings_ja-JP.js
index 2b571b7..42993b3 100644
--- a/frontend/beta/js/Clipperz/PM/Strings/Strings_ja-JP.js
+++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_ja-JP.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29Clipperz.PM.Strings.Languages['ja-JP'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 26Clipperz.PM.Strings.Languages['ja-JP'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], {
30 'clipperzServiceDescription':"<h2>自分で管理しよう!</h2> <ul> <li> <h3>Clipperz は</h3> <ul> <li> <p>安全でシンプルなパスワードマネージャです</p> </li> <li> <p>シングルサインオンを提供します</p> </li> <li> <p>機密情報のデジタル格納庫です</p> </li> </ul> </li> <li> <h3>Clipperz でできること</h3> <ul> <li> <p>パスワードを保管して管理できます</p> </li> <li> <p>ユーザー名やパスワードを入力せずに登録したウェブサービスにログインできます</p> </li> <li> <p>暗証番号やクレジットカード番号などあらゆる機密情報を守ります</p> </li> <li> <p>家族や信用できる相手と機密情報を共有できます(提供予定)</p> </li> </ul> </li> <li> <h3>Clipperz のよいところ</h3> <ul> <li> <p>無料で匿名利用できます</p> </li> <li> <p>いつでもどのコンピュータからでもアクセスできます</p> </li> <li> <p>ソフトウェアのダウンロードやインストールは不要です</p> </li> <li> <p>PC や紙に機密情報を残す必要がありません</p> </li> </ul> </li> <li> <h3>Clipperz のセキュリティ</h3> <ul> <li> <p>データはブラウザで暗号化されてから Clipprez に送信されます</p> </li> <li> <p>暗号化のキーはあなただけが知っているパスフレーズです</p> </li> <li> <p>保管したデータは暗号化されていて、保管中には決して中身を見ることができません</p> </li> <li> <p>標準が確立された暗号化手順を採用しています</p> </li> <li> <p>ソースコードはいつでも参照できますが、暗号化について何も知らなくても使えます</p> </li> </ul> </li> <li><a href=\"http://www.clipperz.com\" target=\"_blank\">もっと見る</a> </li> </ul> ", 27 'clipperzServiceDescription':"<h2>自分で管理しよう!</h2> <ul> <li> <h3>Clipperz は</h3> <ul> <li> <p>安全でシンプルなパスワードマネージャです</p> </li> <li> <p>シングルサインオンを提供します</p> </li> <li> <p>機密情報のデジタル格納庫です</p> </li> </ul> </li> <li> <h3>Clipperz でできること</h3> <ul> <li> <p>パスワードを保管して管理できます</p> </li> <li> <p>ユーザー名やパスワードを入力せずに登録したウェブサービスにログインできます</p> </li> <li> <p>暗証番号やクレジットカード番号などあらゆる機密情報を守ります</p> </li> <li> <p>家族や信用できる相手と機密情報を共有できます(提供予定)</p> </li> </ul> </li> <li> <h3>Clipperz のよいところ</h3> <ul> <li> <p>無料で匿名利用できます</p> </li> <li> <p>いつでもどのコンピュータからでもアクセスできます</p> </li> <li> <p>ソフトウェアのダウンロードやインストールは不要です</p> </li> <li> <p>PC や紙に機密情報を残す必要がありません</p> </li> </ul> </li> <li> <h3>Clipperz のセキュリティ</h3> <ul> <li> <p>データはブラウザで暗号化されてから Clipprez に送信されます</p> </li> <li> <p>暗号化のキーはあなただけが知っているパスフレーズです</p> </li> <li> <p>保管したデータは暗号化されていて、保管中には決して中身を見ることができません</p> </li> <li> <p>標準が確立された暗号化手順を採用しています</p> </li> <li> <p>ソースコードはいつでも参照できますが、暗号化について何も知らなくても使えます</p> </li> </ul> </li> <li><a href=\"http://www.clipperz.com\" target=\"_blank\">もっと見る</a> </li> </ul> ",
31 'loginFormTitle':"Clipperz のアカウントでログイン", 28 'loginFormTitle':"Clipperz のアカウントでログイン",
32 'loginFormUsernameLabel':"ユーザー名", 29 'loginFormUsernameLabel':"ユーザー名",
33 'loginFormPassphraseLabel':"パスフレーズ", 30 'loginFormPassphraseLabel':"パスフレーズ",
34 'loginFormDontHaveAnAccountLabel':"アカウントを持っていない?", 31 'loginFormDontHaveAnAccountLabel':"アカウントを持っていない?",
35 'loginFormCreateOneLabel':"新規作成", 32 'loginFormCreateOneLabel':"新規作成",
36 'loginFormForgotYourCredentialsLabel':"パスフレーズを忘れた?", 33 'loginFormForgotYourCredentialsLabel':"パスフレーズを忘れた?",
37 'loginFormAarghThatsBadLabel':"それは困った!", 34 'loginFormAarghThatsBadLabel':"それは困った!",
38 'loginFormAfraidOfMaliciousScriptsLabel':"偽サイトかも?", 35 'loginFormAfraidOfMaliciousScriptsLabel':"偽サイトかも?",
39 'loginFormVerifyTheCodeLabel':"確認する", 36 'loginFormVerifyTheCodeLabel':"確認する",
40 'loginFormButtonLabel':"ログイン", 37 'loginFormButtonLabel':"ログイン",
41 'loginFormOneTimePasswordCheckboxLabel':"ワンタイムパスフレーズ使用", 38 'loginFormOneTimePasswordCheckboxLabel':"ワンタイムパスフレーズ使用",
42 'loginFormOneTimePasswordCheckboxDescription':"", 39 'loginFormOneTimePasswordCheckboxDescription':"",
43 'loginPanelSwithLanguageDescription':"<h5>言語設定の変更</h5> ", 40 'loginPanelSwithLanguageDescription':"<h5>言語設定の変更</h5> ",
44 'browserCompatibilityDescription':"<p>Clipperz は Firefox に最適化されています。 しかし Clipperz は Opera や Safari そしてインターネットエクスプローラでも十分動作します。</p> ", 41 'browserCompatibilityDescription':"<p>Clipperz は Firefox に最適化されています。 しかし Clipperz は Opera や Safari そしてインターネットエクスプローラでも十分動作します。</p> ",
45 'OTPloginMessagePanelInitialTitle':"ワンタイムパスフレーズでログイン中", 42 'OTPloginMessagePanelInitialTitle':"ワンタイムパスフレーズでログイン中",
46 'OTPloginMessagePanelInitialText':"OTP 情報送信中 ...", 43 'OTPloginMessagePanelInitialText':"OTP 情報送信中 ...",
47 'OTPloginMessagePanelLoadingTitle':"ワンタイムパスフレーズでログイン中", 44 'OTPloginMessagePanelLoadingTitle':"ワンタイムパスフレーズでログイン中",
48 'OTPloginMessagePanelLoadingText':"認証情報を取得中 ...", 45 'OTPloginMessagePanelLoadingText':"認証情報を取得中 ...",
49 'OTPloginMessagePanelProcessingTitle':"ワンタイムパスフレーズでログイン中", 46 'OTPloginMessagePanelProcessingTitle':"ワンタイムパスフレーズでログイン中",
50 'OTPloginMessagePanelProcessingText':"認証情報を復号中 ...", 47 'OTPloginMessagePanelProcessingText':"認証情報を復号中 ...",
51 'loginMessagePanelInitialTitle':"ログイン中 ...", 48 'loginMessagePanelInitialTitle':"ログイン中 ...",
52 'loginMessagePanelInitialText':"---", 49 'loginMessagePanelInitialText':"---",
53 'loginMessagePanelInitialButtonLabel':"キャンセル", 50 'loginMessagePanelInitialButtonLabel':"キャンセル",
54 'loginMessagePanelConnectedTitle':"接続完了", 51 'loginMessagePanelConnectedTitle':"接続完了",
55 'loginMessagePanelConnectedText':"完了", 52 'loginMessagePanelConnectedText':"完了",
56 'loginMessagePanelFailureTitle':"エラー", 53 'loginMessagePanelFailureTitle':"エラー",
57 'loginMessagePanelFailureText':"ログインに失敗しました", 54 'loginMessagePanelFailureText':"ログインに失敗しました",
58 'loginMessagePanelFailureButtonLabel':"閉じる", 55 'loginMessagePanelFailureButtonLabel':"閉じる",
59 'connectionLoginSendingCredentialsMessageTitle':"認証確認中", 56 'connectionLoginSendingCredentialsMessageTitle':"認証確認中",
60 'connectionLoginSendingCredentialsMessageText':"認証送信中", 57 'connectionLoginSendingCredentialsMessageText':"認証送信中",
61 'connectionLoginCredentialsVerificationMessageTitle':"認証確認中", 58 'connectionLoginCredentialsVerificationMessageTitle':"認証確認中",
62 'connectionLoginCredentialsVerificationMessageText':"SRP 認証中", 59 'connectionLoginCredentialsVerificationMessageText':"SRP 認証中",
63 'connectionLoginDoneMessageTitle':"認証確認中", 60 'connectionLoginDoneMessageTitle':"認証確認中",
64 'connectionLoginDoneMessageText':"接続完了", 61 'connectionLoginDoneMessageText':"接続完了",
65 'userLoginPanelUpgradingUserCredentialsMessageTitle':"認証確認中", 62 'userLoginPanelUpgradingUserCredentialsMessageTitle':"認証確認中",
66 'userLoginPanelUpgradingUserCredentialsMessageText':"認証更新中", 63 'userLoginPanelUpgradingUserCredentialsMessageText':"認証更新中",
67 'userLoginPanelConnectedMessageTitle':"認証完了", 64 'userLoginPanelConnectedMessageTitle':"認証完了",
68 'userLoginPanelConnectedMessageText':"ログイン完了", 65 'userLoginPanelConnectedMessageText':"ログイン完了",
69 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"認証確認中", 66 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"認証確認中",
70 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"認証復元中", 67 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"認証復元中",
71 'userLoginPanelLoadingUserDataMessageTitle':"認証完了", 68 'userLoginPanelLoadingUserDataMessageTitle':"認証完了",
72 'userLoginPanelLoadingUserDataMessageText':"暗号化データを受信中", 69 'userLoginPanelLoadingUserDataMessageText':"暗号化データを受信中",
73 'userLoginPanelDecryptingUserDataMessageTitle':"認証完了", 70 'userLoginPanelDecryptingUserDataMessageTitle':"認証完了",
74 'userLoginPanelDecryptingUserDataMessageText':"復号中", 71 'userLoginPanelDecryptingUserDataMessageText':"復号中",
75 'userLoginPanelDecryptingUserStatisticsMessageTitle':"認証完了", 72 'userLoginPanelDecryptingUserStatisticsMessageTitle':"認証完了",
76 'userLoginPanelDecryptingUserStatisticsMessageText':"復号中", 73 'userLoginPanelDecryptingUserStatisticsMessageText':"復号中",
77 'splashAlertTitle':"Clipperz へようこそ", 74 'splashAlertTitle':"Clipperz へようこそ",
78 'splashAlertText':"<p>セキュリティアドバイス</p> <ul> <li> <p>Clipperz に保管したデータはパスフレーズによって保護されます。 パスフレーズを知らない人はデータにアクセスできません。</p> </li> <li> <p>Clipperz に重要なデータを保管するためにパスフレーズを類推されにくいものにしてください。 長いほど安全です。</p> </li> <li> <p>パスフレーズを忘れてしまったら Clipperz ではデータを復元できません。</p> </li> </ul> <p>さらに詳しくは Clipperz のサイトをごらんください。</p> ", 75 'splashAlertText':"<p>セキュリティアドバイス</p> <ul> <li> <p>Clipperz に保管したデータはパスフレーズによって保護されます。 パスフレーズを知らない人はデータにアクセスできません。</p> </li> <li> <p>Clipperz に重要なデータを保管するためにパスフレーズを類推されにくいものにしてください。 長いほど安全です。</p> </li> <li> <p>パスフレーズを忘れてしまったら Clipperz ではデータを復元できません。</p> </li> </ul> <p>さらに詳しくは Clipperz のサイトをごらんください。</p> ",
79 'splashAlertCloseButtonLabel':"OK", 76 'splashAlertCloseButtonLabel':"OK",
80 'registrationFormTitle':"新規アカウント作成", 77 'registrationFormTitle':"新規アカウント作成",
81 'registrationFormUsernameLabel':"ユーザー名", 78 'registrationFormUsernameLabel':"ユーザー名",
82 'registrationFormPassphraseLabel':"パスフレーズ", 79 'registrationFormPassphraseLabel':"パスフレーズ",
83 'registrationFormRetypePassphraseLabel':"パスフレーズをもう一度", 80 'registrationFormRetypePassphraseLabel':"パスフレーズをもう一度",
84 'registrationFormSafetyCheckLabel':"パスフレーズを忘れたら復活できないことを了承します。", 81 'registrationFormSafetyCheckLabel':"パスフレーズを忘れたら復活できないことを了承します。",
85 'registrationFormTermsOfServiceCheckLabel':"利用許諾に同意します 。", 82 'registrationFormTermsOfServiceCheckLabel':"利用許諾に同意します 。",
86 'registrationFormDoYouAlreadyHaveAnAccountLabel':"アカウントを持っている?", 83 'registrationFormDoYouAlreadyHaveAnAccountLabel':"アカウントを持っている?",
87 'registrationFormSimplyLoginLabel':"すぐにログイン", 84 'registrationFormSimplyLoginLabel':"すぐにログイン",
88 'registrationFormButtonLabel':"登録", 85 'registrationFormButtonLabel':"登録",
89 'registrationFormWarningMessageNotMatchingPassphrases':"パスフレーズの入力に誤りがあります。 再入力してください。", 86 'registrationFormWarningMessageNotMatchingPassphrases':"パスフレーズの入力に誤りがあります。 再入力してください。",
90 'registrationFormWarningMessageSafetyCheckNotSelected':"説明を読んで下のボックスを全てチェックしてください。", 87 'registrationFormWarningMessageSafetyCheckNotSelected':"説明を読んで下のボックスを全てチェックしてください。",
91 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"利用許諾に同意してください。", 88 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"利用許諾に同意してください。",
92 'registrationMessagePanelInitialTitle':"アカウント作成中 ...", 89 'registrationMessagePanelInitialTitle':"アカウント作成中 ...",
93 'registrationMessagePanelInitialText':"---", 90 'registrationMessagePanelInitialText':"---",
94 'registrationMessagePanelInitialButtonLabel':"キャンセル", 91 'registrationMessagePanelInitialButtonLabel':"キャンセル",
95 'registrationMessagePanelRegistrationDoneTitle':"登録", 92 'registrationMessagePanelRegistrationDoneTitle':"登録",
96 'registrationMessagePanelRegistrationDoneText':"完了", 93 'registrationMessagePanelRegistrationDoneText':"完了",
97 'registrationMessagePanelFailureTitle':"登録失敗", 94 'registrationMessagePanelFailureTitle':"登録失敗",
98 'registrationMessagePanelFailureButtonLabel':"閉じる", 95 'registrationMessagePanelFailureButtonLabel':"閉じる",
99 'connectionRegistrationSendingRequestMessageText':"認証確認中", 96 'connectionRegistrationSendingRequestMessageText':"認証確認中",
100 'connectionRegistrationSendingCredentialsMessageText':"認証送信中", 97 'connectionRegistrationSendingCredentialsMessageText':"認証送信中",
101 'registrationSplashPanelTitle':"セキュリティアドバイス", 98 'registrationSplashPanelTitle':"セキュリティアドバイス",
102 'registrationSplashPanelDescription':"<p>Clipperz の認証情報です。 大切に保管してください。 ユーザー名とパスフレーズは二度と表示されません。</p> ", 99 'registrationSplashPanelDescription':"<p>Clipperz の認証情報です。 大切に保管してください。 ユーザー名とパスフレーズは二度と表示されません。</p> ",
103 'registrationSplashPanelUsernameLabel':"ユーザー名", 100 'registrationSplashPanelUsernameLabel':"ユーザー名",
104 'registrationSplashPanelPassphraseLabel':"パスフレーズ", 101 'registrationSplashPanelPassphraseLabel':"パスフレーズ",
105 'registrationSplashPanelShowPassphraseButtonLabel':"パスフレーズを表示", 102 'registrationSplashPanelShowPassphraseButtonLabel':"パスフレーズを表示",
106 'donateHeaderLinkLabel':"寄付", 103 'donateHeaderLinkLabel':"寄付",
107 'creditsHeaderLinkLabel':"クレジット", 104 'creditsHeaderLinkLabel':"クレジット",
108 'feedbackHeaderLinkLabel':"フィードバック", 105 'feedbackHeaderLinkLabel':"フィードバック",
109 'helpHeaderLinkLabel':"ヘルプ", 106 'helpHeaderLinkLabel':"ヘルプ",
110 'forumHeaderLinkLabel':"フォーラム", 107 'forumHeaderLinkLabel':"フォーラム",
111 'recordMenuLabel':"カード", 108 'recordMenuLabel':"カード",
112 'accountMenuLabel':"アカウント", 109 'accountMenuLabel':"アカウント",
113 'dataMenuLabel':"データ", 110 'dataMenuLabel':"データ",
114 'contactsMenuLabel':"コンタクト", 111 'contactsMenuLabel':"コンタクト",
115 'toolsMenuLabel':"ツール", 112 'toolsMenuLabel':"ツール",
116 'logoutMenuLabel':"ログアウト", 113 'logoutMenuLabel':"ログアウト",
117 'lockMenuLabel':"ロック", 114 'lockMenuLabel':"ロック",
118 'lockTitle':"アカウントはロックされました", 115 'lockTitle':"アカウントはロックされました",
119 'lockDescription':"<p>ロックを解除するにはパスフレーズを入力してください。</p> ", 116 'lockDescription':"<p>ロックを解除するにはパスフレーズを入力してください。</p> ",
120 'unlockButtonLabel':"解除", 117 'unlockButtonLabel':"解除",
121 'changePasswordTabLabel':"パスフレーズの変更", 118 'changePasswordTabLabel':"パスフレーズの変更",
122 'changePasswordTabTitle':"パスフレーズの変更", 119 'changePasswordTabTitle':"パスフレーズの変更",
123 'changePasswordFormUsernameLabel':"ユーザー名", 120 'changePasswordFormUsernameLabel':"ユーザー名",
124 'changePasswordFormOldPassphraseLabel':"今のパスフレーズ", 121 'changePasswordFormOldPassphraseLabel':"今のパスフレーズ",
125 'changePasswordFormNewPassphraseLabel':"新しいパスフレーズ", 122 'changePasswordFormNewPassphraseLabel':"新しいパスフレーズ",
126 'changePasswordFormRetypePassphraseLabel':"パスフレーズをもう一度", 123 'changePasswordFormRetypePassphraseLabel':"パスフレーズをもう一度",
127 'changePasswordFormSafetyCheckboxLabel':"パスフレーズを忘れたら復活できないことを了承します。", 124 'changePasswordFormSafetyCheckboxLabel':"パスフレーズを忘れたら復活できないことを了承します。",
128 'changePasswordFormSubmitLabel':"変更", 125 'changePasswordFormSubmitLabel':"変更",
129 'changePasswordFormWrongUsernameWarning':"ユーザー名が違います", 126 'changePasswordFormWrongUsernameWarning':"ユーザー名が違います",
130 'changePasswordFormWrongPassphraseWarning':"パスフレーズが違います", 127 'changePasswordFormWrongPassphraseWarning':"パスフレーズが違います",
131 'changePasswordFormWrongRetypePassphraseWarning':"パスフレーズの入力に誤りがあります。 再入力してください。", 128 'changePasswordFormWrongRetypePassphraseWarning':"パスフレーズの入力に誤りがあります。 再入力してください。",
132 'changePasswordFormSafetyCheckWarning':"説明を読んでボックスをチェックしてください。", 129 'changePasswordFormSafetyCheckWarning':"説明を読んでボックスをチェックしてください。",
133 'changePasswordFormProgressDialogTitle':"認証情報を変更中", 130 'changePasswordFormProgressDialogTitle':"認証情報を変更中",
134 'changePasswordFormProgressDialogEmptyText':"---", 131 'changePasswordFormProgressDialogEmptyText':"---",
135 'changePasswordFormProgressDialogConnectedMessageTitle':"接続完了", 132 'changePasswordFormProgressDialogConnectedMessageTitle':"接続完了",
136 'changePasswordFormProgressDialogConnectedMessageText':"完了", 133 'changePasswordFormProgressDialogConnectedMessageText':"完了",
137 'changePasswordFormProgressDialogErrorMessageTitle':"エラー", 134 'changePasswordFormProgressDialogErrorMessageTitle':"エラー",
138 'changePasswordFormProgressDialogErrorMessageText':"変更に失敗しました", 135 'changePasswordFormProgressDialogErrorMessageText':"変更に失敗しました",
139 'changeCredentialsPanelEncryptingDataMessageTitle':"パスフレーズを変更中", 136 'changeCredentialsPanelEncryptingDataMessageTitle':"パスフレーズを変更中",
140 'changeCredentialsPanelEncryptingDataMessageText':"カードヘッダ暗号化", 137 'changeCredentialsPanelEncryptingDataMessageText':"カードヘッダ暗号化",
141 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"パスフレーズを変更中", 138 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"パスフレーズを変更中",
142 'changeCredentialsPanelCreatingNewCredentialsMessageText':"認証情報を送信中", 139 'changeCredentialsPanelCreatingNewCredentialsMessageText':"認証情報を送信中",
143 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"パスフレーズを変更中", 140 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"パスフレーズを変更中",
144 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"暗号化データを送信中", 141 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"暗号化データを送信中",
145 'changeCredentialsPanelDoneMessageTitle':"パスフレーズを変更中", 142 'changeCredentialsPanelDoneMessageTitle':"パスフレーズを変更中",
146 'changeCredentialsPanelDoneMessageText':"完了", 143 'changeCredentialsPanelDoneMessageText':"完了",
147 'manageOTPTabLabel':"ワンタイムパスフレーズ管理", 144 'manageOTPTabLabel':"ワンタイムパスフレーズ管理",
148 'manageOTPTabTitle':"ワンタイムパスフレーズ管理", 145 'manageOTPTabTitle':"ワンタイムパスフレーズ管理",
149 'manageOTPTabDescription':"<p>ワンタイムパスフレーズは通常のパスフレームと同様に機能しますが、一回限りの使い捨てパスフレーズです。</p> <p>同じパスフレーズで再度ログインすることはできません。</p> <p>不正アクセス防止のためにログインに成功したら直ちにワンタイムパスフレーズは削除されます</p> <p>ワンタイムパスフレーズはキーロガーやスパイウェアからパスフレーズを守るすばらしい機能です</p> <p><b>インターネットカフェや図書館などから Clipperz にアクセする場合にはワンタイムパスフレーズを利用することを強くお薦めします。</b> </p> ", 146 'manageOTPTabDescription':"<p>ワンタイムパスフレーズは通常のパスフレームと同様に機能しますが、一回限りの使い捨てパスフレーズです。</p> <p>同じパスフレーズで再度ログインすることはできません。</p> <p>不正アクセス防止のためにログインに成功したら直ちにワンタイムパスフレーズは削除されます</p> <p>ワンタイムパスフレーズはキーロガーやスパイウェアからパスフレーズを守るすばらしい機能です</p> <p><b>インターネットカフェや図書館などから Clipperz にアクセする場合にはワンタイムパスフレーズを利用することを強くお薦めします。</b> </p> ",
150 'oneTimePasswordReadOnlyMessage':"<h6>ごめんなさい</h6> <p>ローカルコピー使用中はワンタイムパスフレーズを利用できません。</p> ", 147 'oneTimePasswordReadOnlyMessage':"<h6>ごめんなさい</h6> <p>ローカルコピー使用中はワンタイムパスフレーズを利用できません。</p> ",
151 'oneTimePasswordLoadingMessage':"<h6>ロード中</h6> <p>お待ちください ...</p> ", 148 'oneTimePasswordLoadingMessage':"<h6>ロード中</h6> <p>お待ちください ...</p> ",
152 'oneTimePasswordNoPasswordAvailable':"<h6>有効なワンタイムパスフレーズがありません</h6> <p>「新規」ボタンをクリックしてワンタイムパスフレーズを作成してください。</p> ", 149 'oneTimePasswordNoPasswordAvailable':"<h6>有効なワンタイムパスフレーズがありません</h6> <p>「新規」ボタンをクリックしてワンタイムパスフレーズを作成してください。</p> ",
153 'createNewOTPButtonLabel':"新規", 150 'createNewOTPButtonLabel':"新規",
154 'deleteOTPButtonLabel':"削除", 151 'deleteOTPButtonLabel':"削除",
155 'printOTPButtonLabel':"印刷", 152 'printOTPButtonLabel':"印刷",
156 'disabledOneTimePassword_warning':"無効", 153 'disabledOneTimePassword_warning':"無効",
157 'oneTimePasswordSelectionLink_selectLabel':"選択:", 154 'oneTimePasswordSelectionLink_selectLabel':"選択:",
158 'oneTimePasswordSelectionLink_all':"すべて", 155 'oneTimePasswordSelectionLink_all':"すべて",
159 'oneTimePasswordSelectionLink_none':"解除", 156 'oneTimePasswordSelectionLink_none':"解除",
160 'oneTimePasswordSelectionLink_used':"使用済", 157 'oneTimePasswordSelectionLink_used':"使用済",
161 'oneTimePasswordSelectionLink_unused':"未使用", 158 'oneTimePasswordSelectionLink_unused':"未使用",
162 'saveOTP_encryptUserDataTitle':"ワンタイムパスフレーズを保存中", 159 'saveOTP_encryptUserDataTitle':"ワンタイムパスフレーズを保存中",
163 'saveOTP_encryptUserDataText':"OTP 認証譲歩を作成中 ...", 160 'saveOTP_encryptUserDataText':"OTP 認証譲歩を作成中 ...",
164 'saveOTP_encryptOTPDataTitle':"ワンタイムパスフレーズを保存中", 161 'saveOTP_encryptOTPDataTitle':"ワンタイムパスフレーズを保存中",
165 'saveOTP_encryptOTPDataText':"暗号化データを作成中 ...", 162 'saveOTP_encryptOTPDataText':"暗号化データを作成中 ...",
166 'saveOTP_sendingDataTitle':"ワンタイムパスフレーズを保存中", 163 'saveOTP_sendingDataTitle':"ワンタイムパスフレーズを保存中",
167 'saveOTP_sendingDataText':"暗号化データを送信中 ...", 164 'saveOTP_sendingDataText':"暗号化データを送信中 ...",
168 'saveOTP_updatingInterfaceTitle':"ワンタイムパスフレーズを保存中", 165 'saveOTP_updatingInterfaceTitle':"ワンタイムパスフレーズを保存中",
169 'saveOTP_updatingInterfaceText':"インターフェイスを更新中 ...", 166 'saveOTP_updatingInterfaceText':"インターフェイスを更新中 ...",
170 'accountPreferencesLabel':"設定", 167 'accountPreferencesLabel':"設定",
171 'accountPreferencesTabTitle':"設定", 168 'accountPreferencesTabTitle':"設定",
172 'accountPreferencesLanguageTitle':"言語設定", 169 'accountPreferencesLanguageTitle':"言語設定",
173 'accountPreferencesLanguageDescription':"<p>リストから使用する言語を選択してください。</p> ", 170 'accountPreferencesLanguageDescription':"<p>リストから使用する言語を選択してください。</p> ",
174 'showDonationReminderPanelTitle':"ドネーションリマインダ", 171 'showDonationReminderPanelTitle':"ドネーションリマインダ",
175 'showDonationReminderPanelDescription':"<p>ドネーションリマインダを表示</p> ", 172 'showDonationReminderPanelDescription':"<p>ドネーションリマインダを表示</p> ",
176 'saveUserPreferencesFormSubmitLabel':"保存", 173 'saveUserPreferencesFormSubmitLabel':"保存",
177 'cancelUserPreferencesFormSubmitLabel':"キャンセル", 174 'cancelUserPreferencesFormSubmitLabel':"キャンセル",
178 'accountPreferencesSavingPanelTitle_Step1':"保存中", 175 'accountPreferencesSavingPanelTitle_Step1':"保存中",
179 'accountPreferencesSavingPanelText_Step1':"暗号化中", 176 'accountPreferencesSavingPanelText_Step1':"暗号化中",
180 'accountPreferencesSavingPanelTitle_Step2':"保存中", 177 'accountPreferencesSavingPanelTitle_Step2':"保存中",
181 'accountPreferencesSavingPanelText_Step2':"送信中", 178 'accountPreferencesSavingPanelText_Step2':"送信中",
182 'accountLoginHistoryLabel':"ログイン履歴", 179 'accountLoginHistoryLabel':"ログイン履歴",
183 'loginHistoryTabTitle':"ログイン履歴", 180 'loginHistoryTabTitle':"ログイン履歴",
184 'loginHistoryReadOnlyMessage':"<h6>ごめんなさい</h6> <p>ローカルコピー使用中はログイン履歴を利用できません。</p> ", 181 'loginHistoryReadOnlyMessage':"<h6>ごめんなさい</h6> <p>ローカルコピー使用中はログイン履歴を利用できません。</p> ",
185 'loginHistoryLoadingMessage':"<h6>ロード中</h6> <p>お待ちください ...</p> ", 182 'loginHistoryLoadingMessage':"<h6>ロード中</h6> <p>お待ちください ...</p> ",
186 'loginHistoryLoadedMessage':"<h6>最近 10 回のログイン</h6> <p> </p> ", 183 'loginHistoryLoadedMessage':"<h6>最近 10 回のログイン</h6> <p> </p> ",
187 'loginHistoryIPLabel':"IP", 184 'loginHistoryIPLabel':"IP",
188 'loginHistoryTimeLabel':"日付", 185 'loginHistoryTimeLabel':"日付",
189 'loginHistoryCurrentSessionText':"現在のログイン", 186 'loginHistoryCurrentSessionText':"現在のログイン",
190 'loginHistoryReloadButtonLabel':"ログイン履歴を更新", 187 'loginHistoryReloadButtonLabel':"ログイン履歴を更新",
191 'deleteAccountTabLabel':"アカウント削除", 188 'deleteAccountTabLabel':"アカウント削除",
192 'deleteAccountTabTitle':"アカウント削除", 189 'deleteAccountTabTitle':"アカウント削除",
193 'deleteAccountFormUsernameLabel':"ユーザー名", 190 'deleteAccountFormUsernameLabel':"ユーザー名",
194 'deleteAccountFormPassphraseLabel':"パスフレーズ", 191 'deleteAccountFormPassphraseLabel':"パスフレーズ",
195 'deleteAccountFormSafetyCheckboxLabel':"全てのデータが消去されて復元不可能になることを了承します。", 192 'deleteAccountFormSafetyCheckboxLabel':"全てのデータが消去されて復元不可能になることを了承します。",
196 'deleteAccountFormSubmitLabel':"アカウント削除", 193 'deleteAccountFormSubmitLabel':"アカウント削除",
197 'deleteAccountFormWrongUsernameWarning':"ユーザー名が違います", 194 'deleteAccountFormWrongUsernameWarning':"ユーザー名が違います",
198 'deleteAccountFormWrongPassphraseWarning':"パスフレーズが違います", 195 'deleteAccountFormWrongPassphraseWarning':"パスフレーズが違います",
199 'deleteAccountFormSafetyCheckWarning':"説明を読んでボックスをチェックしてください。", 196 'deleteAccountFormSafetyCheckWarning':"説明を読んでボックスをチェックしてください。",
200 'accountPanelDeletingAccountPanelConfirmationTitle':"確認", 197 'accountPanelDeletingAccountPanelConfirmationTitle':"確認",
201 'accountPanelDeleteAccountPanelConfirmationText':"本当にアカウントを削除しますか?", 198 'accountPanelDeleteAccountPanelConfirmationText':"本当にアカウントを削除しますか?",
202 'accountPanelDeleteAccountPanelConfirmButtonLabel':"はい", 199 'accountPanelDeleteAccountPanelConfirmButtonLabel':"はい",
203 'accountPanelDeleteAccountPanelDenyButtonLabel':"いいえ", 200 'accountPanelDeleteAccountPanelDenyButtonLabel':"いいえ",
204 'accountPanelDeletingAccountPanelProgressTitle':"アカウント情報削除中", 201 'accountPanelDeletingAccountPanelProgressTitle':"アカウント情報削除中",
205 'accountPanelDeletingAccountPanelProgressText':"しばらくお待ちください", 202 'accountPanelDeletingAccountPanelProgressText':"しばらくお待ちください",
206 'offlineCopyTabLabel':"ローカルコピー", 203 'offlineCopyTabLabel':"ローカルコピー",
207 'offlineCopyTabTitle':"ローカルコピー", 204 'offlineCopyTabTitle':"ローカルコピー",
208 'offlineCopyTabDescription':"<p>ダウンロードのリンクをクリクするとインターネットに接続していないときでも利用できる読み取り専用のローカル版をダウンロードできます。</p> <p>ローカル版はオンライン版と同じ暗号化処理がされているため、編集可能なオンライン版と同じ安全性があります。</p> <ol> <li> <p>下の「ダウンロード」をクリックします。</p> </li> <li> <p>ブラウザーが &quot;Clipperz_YYYYMMDD.html&quot; をダウンロードするか確認します。 ファイルをハードディスクに保存してください。</p> </li> <li> <p>ローカルコピーをダブルクリックして起動してください。</p> </li> <li> <p>オンライン版と同じユーザー名とパスフレーズを入力してください。</p> </li> </ol> ", 205 'offlineCopyTabDescription':"<p>ダウンロードのリンクをクリクするとインターネットに接続していないときでも利用できる読み取り専用のローカル版をダウンロードできます。</p> <p>ローカル版はオンライン版と同じ暗号化処理がされているため、編集可能なオンライン版と同じ安全性があります。</p> <ol> <li> <p>下の「ダウンロード」をクリックします。</p> </li> <li> <p>ブラウザーが &quot;Clipperz_YYYYMMDD.html&quot; をダウンロードするか確認します。 ファイルをハードディスクに保存してください。</p> </li> <li> <p>ローカルコピーをダブルクリックして起動してください。</p> </li> <li> <p>オンライン版と同じユーザー名とパスフレーズを入力してください。</p> </li> </ol> ",
209 'offlineCopyDownloadLinkLabel':"ダウンロード", 206 'offlineCopyDownloadLinkLabel':"ダウンロード",
210 'offlineCopyDownloadWarning':"<h4><a href=\"#\" id=\"offlineCopyDownloadWarningLink\">ローカルコピーを更新してください</a> </h4> <p>ローカルコピーを作成後に新しいカードを追加または編集しています。 最新の情報を保つためローカルコピーを更新してください。</p> ", 207 'offlineCopyDownloadWarning':"<h4><a href=\"#\" id=\"offlineCopyDownloadWarningLink\">ローカルコピーを更新してください</a> </h4> <p>ローカルコピーを作成後に新しいカードを追加または編集しています。 最新の情報を保つためローカルコピーを更新してください。</p> ",
211 'offlineCopyDownloadOk':"", 208 'offlineCopyDownloadOk':"",
212 'sharingTabLabel':"共有", 209 'sharingTabLabel':"共有",
213 'sharingTabTitle':"共有", 210 'sharingTabTitle':"共有",
214 'sharingTabDescription':"<p>暗証番号などを他人に教える必要があることは日常生活で往々にして発生します。</p> <p>同僚に留守番電話のメッセージを代わりに聞いてもらうために暗証番号を教えたり、秘書に代わりに銀行に行ってもらうために暗証番号を教えたりということはよくあることです。</p> <p>Clipperz では機密情報を安全に、そして簡単に共有できます。</p> <p> </p> <p><b>近日登場 ...</b> </p> ", 211 'sharingTabDescription':"<p>暗証番号などを他人に教える必要があることは日常生活で往々にして発生します。</p> <p>同僚に留守番電話のメッセージを代わりに聞いてもらうために暗証番号を教えたり、秘書に代わりに銀行に行ってもらうために暗証番号を教えたりということはよくあることです。</p> <p>Clipperz では機密情報を安全に、そして簡単に共有できます。</p> <p> </p> <p><b>近日登場 ...</b> </p> ",
215 'importTabLabel':"インポート", 212 'importTabLabel':"インポート",
216 'importTabTitle':"インポート", 213 'importTabTitle':"インポート",
217 'importTabDescription':"<p>コンピュータから Clipperz にデータを一括インポートできます。</p> ", 214 'importTabDescription':"<p>コンピュータから Clipperz にデータを一括インポートできます。</p> ",
218 'printingTabLabel':"エクスポート", 215 'printingTabLabel':"エクスポート",
219 'printingTabTitle':"エクスポート", 216 'printingTabTitle':"エクスポート",
220 'printingTabDescription':"<h5>印刷</h5> <p>「印刷用データ」のリンクをクリックするとウィンドウが開いて全てのデータが印刷可能な状態で表示されます。</p> <p>バックアップが目的なら、誰でも見ることができる印刷版よりは安全なローカルコピーをお薦めします。</p> ", 217 'printingTabDescription':"<h5>印刷</h5> <p>「印刷用データ」のリンクをクリックするとウィンドウが開いて全てのデータが印刷可能な状態で表示されます。</p> <p>バックアップが目的なら、誰でも見ることができる印刷版よりは安全なローカルコピーをお薦めします。</p> ",
221 'printingLinkLabel':"印刷用データ", 218 'printingLinkLabel':"印刷用データ",
222 'exportTabDescription':"<h5>JSON エクスポート</h5> <p>JSON はすべてのデータをエクスポートできます。 ダイレクトログインを含むすべての情報が保存されます。</p> <p>このフォーマットはすべてのデータを別の Clipperz アカウントに移動するときに便利です。 トラブルが発生したときにデータを復旧するのにも役立ちます。</p> <p>「JSON 出力」のリンクをクリックするとエクスポートが開始されます。</p> ", 219 'exportTabDescription':"<h5>JSON エクスポート</h5> <p>JSON はすべてのデータをエクスポートできます。 ダイレクトログインを含むすべての情報が保存されます。</p> <p>このフォーマットはすべてのデータを別の Clipperz アカウントに移動するときに便利です。 トラブルが発生したときにデータを復旧するのにも役立ちます。</p> <p>「JSON 出力」のリンクをクリックするとエクスポートが開始されます。</p> ",
223 'exportLinkLabel':"JSON 出力", 220 'exportLinkLabel':"JSON 出力",
224 'exportDataInProgressDescription':"<h4>出力中。しばらくお待ちください ...</h4> ", 221 'exportDataInProgressDescription':"<h4>出力中。しばらくお待ちください ...</h4> ",
225 'exportDataDescription':"<h4>利用法</h4> <p>下のテキストを任意のエディターにコピーして保存します。 (例: 「clipperz_export_20071217.json」)</p> ", 222 'exportDataDescription':"<h4>利用法</h4> <p>下のテキストを任意のエディターにコピーして保存します。 (例: 「clipperz_export_20071217.json」)</p> ",
226 'contactsTabLabel':"コンタクト", 223 'contactsTabLabel':"コンタクト",
227 'contactsTabTitle':"コンタクト", 224 'contactsTabTitle':"コンタクト",
228 'passwordGeneratorTabLabel':"パスワードジェネレータ", 225 'passwordGeneratorTabLabel':"パスワードジェネレータ",
229 'bookmarkletTabLabel':"ブックマークレット", 226 'bookmarkletTabLabel':"ブックマークレット",
230 'compactTabLabel':"コンパクト版", 227 'compactTabLabel':"コンパクト版",
231 'httpAuthTabLabel':"HTTP 認証", 228 'httpAuthTabLabel':"HTTP 認証",
232 'passwordGeneratorTabTitle':"パスワードジェネレータ", 229 'passwordGeneratorTabTitle':"パスワードジェネレータ",
233 'bookmarkletTabTitle':"ブックマークレット", 230 'bookmarkletTabTitle':"ブックマークレット",
234 'compactTabTitle':"コンパクト版", 231 'compactTabTitle':"コンパクト版",
235 'httpAuthTabTitle':"HTTP 認証", 232 'httpAuthTabTitle':"HTTP 認証",
236 'paswordGeneratorTabDescription':"<p> </p> ", 233 'paswordGeneratorTabDescription':"<p> </p> ",
237 'passwordGeneratorTabButtonLabel':"パスワード生成", 234 'passwordGeneratorTabButtonLabel':"パスワード生成",
238 'bookmarkletTabLabel':"ブックマークレット", 235 'bookmarkletTabLabel':"ブックマークレット",
239 'bookmarkletTabTitle':"ブックマークレット", 236 'bookmarkletTabTitle':"ブックマークレット",
240 'bookmarkletTabDescription':"<p>ブックマークレットはブラウザのブックマークに登録して使う小さなプログラムです。 通常のウェブページのブックマークと同じようにブラウザに登録できます。</p> <p>Clipperz のブックマークレットを使えば簡単に新規カードを追加したり、既存のカードにダイレクトログインを追加したりできます。</p> <p><b>Clipperz のブックマークレットにはユーザー名やパスフレーズなどの個人情報は含まれていません。ブックマークレットは全ユーザー共通のものです。</b> </p> <h3>ブックマークレットの登録方法</h3> <h>Firefox, Camino, Opera, Safari <ol> <li> <p>ブックマークバー(パーソナルバー)が表示されていることを確認します。 (「表示」メニュー(「表示>ツールバー」サブメニューの場合もあり)から変更できます。)</p> </li> <li> <p>下の「Clipperz に追加」をブックマークバー(パーソナルバー)にドラッグします。</p> </li> </ol> <h5>インターネットエクスプローラー</h5> <ol> <li> <p>アドレスバーが表示されていることを確認します。 (「表示>ツールバー>アドレスバー」メニューから変更できます。)</p> </li> <li> <p>下の「Clipperz に追加」を右クリックします。</p> </li> <li> <p>コンテキストメニューから「お気に入りに追加」を選択します。</p> </li> <li> <p>セキュリティ警告が表示されますので「はい」をクリックします。</p> </li> <li> <p>保存先の「リンク」フォルダーを開き「OK」をクリックします。</p> </li> </ol> ", 237 'bookmarkletTabDescription':"<p>ブックマークレットはブラウザのブックマークに登録して使う小さなプログラムです。 通常のウェブページのブックマークと同じようにブラウザに登録できます。</p> <p>Clipperz のブックマークレットを使えば簡単に新規カードを追加したり、既存のカードにダイレクトログインを追加したりできます。</p> <p><b>Clipperz のブックマークレットにはユーザー名やパスフレーズなどの個人情報は含まれていません。ブックマークレットは全ユーザー共通のものです。</b> </p> <h3>ブックマークレットの登録方法</h3> <h>Firefox, Camino, Opera, Safari <ol> <li> <p>ブックマークバー(パーソナルバー)が表示されていることを確認します。 (「表示」メニュー(「表示>ツールバー」サブメニューの場合もあり)から変更できます。)</p> </li> <li> <p>下の「Clipperz に追加」をブックマークバー(パーソナルバー)にドラッグします。</p> </li> </ol> <h5>インターネットエクスプローラー</h5> <ol> <li> <p>アドレスバーが表示されていることを確認します。 (「表示>ツールバー>アドレスバー」メニューから変更できます。)</p> </li> <li> <p>下の「Clipperz に追加」を右クリックします。</p> </li> <li> <p>コンテキストメニューから「お気に入りに追加」を選択します。</p> </li> <li> <p>セキュリティ警告が表示されますので「はい」をクリックします。</p> </li> <li> <p>保存先の「リンク」フォルダーを開き「OK」をクリックします。</p> </li> </ol> ",
241 'bookmarkletTabBookmarkletTitle':"Clipperz に追加", 238 'bookmarkletTabBookmarkletTitle':"Clipperz に追加",
242 'bookmarkletTabInstructions':"<h3>ダイレクトログイン用の新規カードの作成方法</h3> <ol> <li> <p>保存したいサービスのログインページを開きます。 (パスワードなどを入力する画面があるところです)</p> </li> <li> <p>ブックマークレットをクリックします。 画面上にウィンドウがポップアップします。</p> </li> <li> <p>ポップアップしたウィンドウに表示された登録用コードをコピーします。 (ctrl-C)</p> </li> <li> <p>Clipperz にログインして 「新規カード追加」のボタンをクリックします。</p> </li> <li> <p>「ダイレクトログイン」のテンプレートを選んでコード入力用のスペースに先ほどコピーしたコードを貼り付けます。 (ctrl-V)</p> </li> <li> <p>「作成」ボタンをクリックして、内容を確認して「保存」ボタンをクリックします。</p> </li> </ol> <h3>既存カードへのダイレクトログインの追加方法</h3> <ol> <li> <p>上記と同じです。</p> </li> <li> <p>上記と同じです。</p> </li> <li> <p>上記と同じです。</p> </li> <li> <p>Clipperz にログインして変更したいカードを選択後「編集」ボタンをクリックします。</p> </li> <li> <p>ダイレクトログインコード用のスペースに先ほどコピーしたコードを貼り付けます。 (ctrl-V)</p> </li> <li> <p>「ダイレクトログイン追加」ボタンをクリックして、内容を確認して「保存」ボタンをクリックします。</p> </li> </ol> <p> </p> <p>ブックマークレットに関する詳しい情報はこちら。</p> ", 239 'bookmarkletTabInstructions':"<h3>ダイレクトログイン用の新規カードの作成方法</h3> <ol> <li> <p>保存したいサービスのログインページを開きます。 (パスワードなどを入力する画面があるところです)</p> </li> <li> <p>ブックマークレットをクリックします。 画面上にウィンドウがポップアップします。</p> </li> <li> <p>ポップアップしたウィンドウに表示された登録用コードをコピーします。 (ctrl-C)</p> </li> <li> <p>Clipperz にログインして 「新規カード追加」のボタンをクリックします。</p> </li> <li> <p>「ダイレクトログイン」のテンプレートを選んでコード入力用のスペースに先ほどコピーしたコードを貼り付けます。 (ctrl-V)</p> </li> <li> <p>「作成」ボタンをクリックして、内容を確認して「保存」ボタンをクリックします。</p> </li> </ol> <h3>既存カードへのダイレクトログインの追加方法</h3> <ol> <li> <p>上記と同じです。</p> </li> <li> <p>上記と同じです。</p> </li> <li> <p>上記と同じです。</p> </li> <li> <p>Clipperz にログインして変更したいカードを選択後「編集」ボタンをクリックします。</p> </li> <li> <p>ダイレクトログインコード用のスペースに先ほどコピーしたコードを貼り付けます。 (ctrl-V)</p> </li> <li> <p>「ダイレクトログイン追加」ボタンをクリックして、内容を確認して「保存」ボタンをクリックします。</p> </li> </ol> <p> </p> <p>ブックマークレットに関する詳しい情報はこちら。</p> ",
243 'compactTabDescription':"<p>Clipprez Compact は Firefox のサイドバーで利用するようデザインされた Clipperz の特別版です。</p> <p>ダイレクトログインを常時アクセス可能にします。 さらに詳しく </p> <h3>Clipperz Compact の利用法</h3> <ol> <li> <p>Firefox を入手します。 サイドバーは Firefox だけで利用できるため、 Clipperz Compact を利用するには Firefox が必須です。</p> </li> <li> <p>下の「Clipperz Compact」 URL を Firefox のブックマークに登録します。ブックマークバーにドラッグするのが簡単です。</p> <div id=\"compactLinkBox\"><a href=\"https://www.clipperz.com/beta/index.html?compact\" target=\"_search\">Clipperz Compact</a> </div> </li> <li> <p>ブックマークを右クリックして「情報を見る」を選択後、「このブックマークをサイドバーに読み込む」にチェックを入れます。</p> </li> </ol> <h5>追加情報:Clipperz Compact は Opera のパネルでも操作します。</h5> ", 240 'compactTabDescription':"<p>Clipprez Compact は Firefox のサイドバーで利用するようデザインされた Clipperz の特別版です。</p> <p>ダイレクトログインを常時アクセス可能にします。 さらに詳しく </p> <h3>Clipperz Compact の利用法</h3> <ol> <li> <p>Firefox を入手します。 サイドバーは Firefox だけで利用できるため、 Clipperz Compact を利用するには Firefox が必須です。</p> </li> <li> <p>下の「Clipperz Compact」 URL を Firefox のブックマークに登録します。ブックマークバーにドラッグするのが簡単です。</p> <div id=\"compactLinkBox\"><a href=\"https://www.clipperz.com/beta/index.html?compact\" target=\"_search\">Clipperz Compact</a> </div> </li> <li> <p>ブックマークを右クリックして「情報を見る」を選択後、「このブックマークをサイドバーに読み込む」にチェックを入れます。</p> </li> </ol> <h5>追加情報:Clipperz Compact は Opera のパネルでも操作します。</h5> ",
244 'httpAuthTabDescription':"<p>HTTP 認証は HTML の基本機能を使ってブラウザからユーザー名とパスワードでログインする方式です。</p> <p>すでに主流ではありませんが、またプライベートなサイトなどで使われています。 HTTP 認証が必要なサイトにアクセスしようとすると、ブラウザがポップアップウィンドウを開いてユーザー名とパスワードの入力を要求してきます。</p> <p>残念ながら、 Clipperz のブックマークレットは HTTP 認証には対応していません。 しかし、ダイレクトログインを設定する方法はあります。</p> <h3>HTTP 認証サイトでのダイレクトログイン設定方法</h3> <ol> <li> <p>サイトの URL とユーザー名、パスワードを新規カードに登録します。</p> </li> <li> <p>下記の設定をコピーして、カード編集画面の「ダイレクトログイン設定」のセクションに貼り付けます。</p> </li> <li> <p>「新規ダイレクトログイン追加」ボタンをクリックして、 URL とユーザー名、パスワードを入力して保存します。</p> </li> </ol> <h5><a href=\"http://support.microsoft.com/kb/834489\" target=\"_blank\">警告:インターネットエクスプローラは HTTP 認証に対応していません。</a> </h5> ", 241 'httpAuthTabDescription':"<p>HTTP 認証は HTML の基本機能を使ってブラウザからユーザー名とパスワードでログインする方式です。</p> <p>すでに主流ではありませんが、またプライベートなサイトなどで使われています。 HTTP 認証が必要なサイトにアクセスしようとすると、ブラウザがポップアップウィンドウを開いてユーザー名とパスワードの入力を要求してきます。</p> <p>残念ながら、 Clipperz のブックマークレットは HTTP 認証には対応していません。 しかし、ダイレクトログインを設定する方法はあります。</p> <h3>HTTP 認証サイトでのダイレクトログイン設定方法</h3> <ol> <li> <p>サイトの URL とユーザー名、パスワードを新規カードに登録します。</p> </li> <li> <p>下記の設定をコピーして、カード編集画面の「ダイレクトログイン設定」のセクションに貼り付けます。</p> </li> <li> <p>「新規ダイレクトログイン追加」ボタンをクリックして、 URL とユーザー名、パスワードを入力して保存します。</p> </li> </ol> <h5><a href=\"http://support.microsoft.com/kb/834489\" target=\"_blank\">警告:インターネットエクスプローラは HTTP 認証に対応していません。</a> </h5> ",
245 'mainPanelDirectLoginBlockLabel':"ダイレクトログイン", 242 'mainPanelDirectLoginBlockLabel':"ダイレクトログイン",
246 'directLinkReferenceShowButtonLabel':"表示", 243 'directLinkReferenceShowButtonLabel':"表示",
247 'mainPanelDirectLoginBlockDescription':"<p>ダイレクトログインを設定してユーザー名やパスワードを入力することなくログインできるようにしましょう。</p> <p>ダイレクトログインでさらにセキュリティを強化するために:</p> <ul> <li> <p>より複雑なパスワードを設定しましょう</p> </li> <li> <p>推測されやすい同じパスワードを複数のサイトで使わないようにしましょう。</p> </li> </ul> <p>ブックマークレットを使うと簡単に設定できます。</p><a href=\"http://www.clipperz.com/support/user_guide/direct_logins\" target=\"_blank\">ダイレクトログインに関する詳しい情報</a> ", 244 'mainPanelDirectLoginBlockDescription':"<p>ダイレクトログインを設定してユーザー名やパスワードを入力することなくログインできるようにしましょう。</p> <p>ダイレクトログインでさらにセキュリティを強化するために:</p> <ul> <li> <p>より複雑なパスワードを設定しましょう</p> </li> <li> <p>推測されやすい同じパスワードを複数のサイトで使わないようにしましょう。</p> </li> </ul> <p>ブックマークレットを使うと簡単に設定できます。</p><a href=\"http://www.clipperz.com/support/user_guide/direct_logins\" target=\"_blank\">ダイレクトログインに関する詳しい情報</a> ",
248 'mainPanelRecordsBlockLabel':"カード", 245 'mainPanelRecordsBlockLabel':"カード",
249 'mainPanelAddRecordButtonLabel':"新規カード追加", 246 'mainPanelAddRecordButtonLabel':"新規カード追加",
250 'mainPanelRemoveRecordButtonLabel':"カード削除", 247 'mainPanelRemoveRecordButtonLabel':"カード削除",
251 'mainPanelRecordFilterBlockAllLabel':"すべて", 248 'mainPanelRecordFilterBlockAllLabel':"すべて",
252 'mainPanelRecordFilterBlockTagsLabel':"タグ", 249 'mainPanelRecordFilterBlockTagsLabel':"タグ",
253 'mainPanelRecordFilterBlockSearchLabel':"検索", 250 'mainPanelRecordFilterBlockSearchLabel':"検索",
254 'recordDetailNoRecordAtAllTitle':"Clipperz へようこそ", 251 'recordDetailNoRecordAtAllTitle':"Clipperz へようこそ",
255 'recordDetailNoRecordAtAllDescription':"<h5>まず最初にカードを追加しましょう。</h5> <p>カードはパスワードやその他の重要な情報を保管するためのシンプルでフレキシブルなフォームです。</p> <p>カードにはウェブサイトのログインパスワード、自転車の鍵の番号、クレジットカードの番号など何でも記入できます。</p> <h5>ブックマークレットを活用しましょう。</h5> <p>まずは簡単にカードを追加できるブックマークレットをインストールしましょう。</p> <p>ブックマークレットのタブをクリックしてインストール方法と利用方法を確認しましょう。</p> <p> </p> <p>ブックマークレットをインストールしたら Clipperz を活用しましょう。</p> <p> </p><a href=\"http://www.clipperz.com/support/user_guide/managing_cards\" target=\"_blank\">カードに関する詳しい情報</a> ", 252 'recordDetailNoRecordAtAllDescription':"<h5>まず最初にカードを追加しましょう。</h5> <p>カードはパスワードやその他の重要な情報を保管するためのシンプルでフレキシブルなフォームです。</p> <p>カードにはウェブサイトのログインパスワード、自転車の鍵の番号、クレジットカードの番号など何でも記入できます。</p> <h5>ブックマークレットを活用しましょう。</h5> <p>まずは簡単にカードを追加できるブックマークレットをインストールしましょう。</p> <p>ブックマークレットのタブをクリックしてインストール方法と利用方法を確認しましょう。</p> <p> </p> <p>ブックマークレットをインストールしたら Clipperz を活用しましょう。</p> <p> </p><a href=\"http://www.clipperz.com/support/user_guide/managing_cards\" target=\"_blank\">カードに関する詳しい情報</a> ",
256 'newRecordWizardTitleBox':"<h5>テンプレート選択</h5> <p>カードはシンプルでパスワードや重要な情報を何でも保存できる柔軟性があります。</p> <p>まずはテンプレートを選んでください。  カードはいつでも自由に変更できます。</p> ", 253 'newRecordWizardTitleBox':"<h5>テンプレート選択</h5> <p>カードはシンプルでパスワードや重要な情報を何でも保存できる柔軟性があります。</p> <p>まずはテンプレートを選んでください。  カードはいつでも自由に変更できます。</p> ",
257 'newRecordWizardBookmarkletConfigurationTitle':"ダイレクトログイン", 254 'newRecordWizardBookmarkletConfigurationTitle':"ダイレクトログイン",
258 'newRecordWizardBookmarkletConfigurationDescription':"<p>ブックマークレットが生成したコードを下に貼り付けてください。</p> <p>ダイレクトログイン情報を含む新しいカードが作成されます。</p> ", 255 'newRecordWizardBookmarkletConfigurationDescription':"<p>ブックマークレットが生成したコードを下に貼り付けてください。</p> <p>ダイレクトログイン情報を含む新しいカードが作成されます。</p> ",
259 'newRecordWizardCreateButtonLabel':"作成", 256 'newRecordWizardCreateButtonLabel':"作成",
260 'newRecordWizardCancelButtonLabel':"キャンセル", 257 'newRecordWizardCancelButtonLabel':"キャンセル",
261 'donateSplashPanelTitle':"Clipperz のために今すぐ寄付しよう", 258 'donateSplashPanelTitle':"Clipperz のために今すぐ寄付しよう",
262 'donateSplashPanelDescription':"<p>寄付する理由:</p> <ul> <li> <p>新機能追加をサポートします</p> </li> <li> <p>Clipperz を無料に保ちます</p> </li> <li> <p>開発陣の仕事に感謝します</p> </li> </ul> <p>詳しくは寄付のページをごらんください .</p> <p><b>寄付しますか?</b> </p> ", 259 'donateSplashPanelDescription':"<p>寄付する理由:</p> <ul> <li> <p>新機能追加をサポートします</p> </li> <li> <p>Clipperz を無料に保ちます</p> </li> <li> <p>開発陣の仕事に感謝します</p> </li> </ul> <p>詳しくは寄付のページをごらんください .</p> <p><b>寄付しますか?</b> </p> ",
263 'donateCloseButtonLabel':"あとでする", 260 'donateCloseButtonLabel':"あとでする",
264 'donateDonateButtonLabel':"はい", 261 'donateDonateButtonLabel':"はい",
265 'recordTemplates':{ 262 'recordTemplates':{
266 'WebAccount':{ 263 'WebAccount':{
267 'title':"ウェブパスワード", 264 'title':"ウェブパスワード",
268 'description':"<p>ログイン情報用のシンプルなカードです。</p> ", 265 'description':"<p>ログイン情報用のシンプルなカードです。</p> ",
269 'fields':{ 266 'fields':{
270 'URL':"ウェブアドレス", 267 'URL':"ウェブアドレス",
271 'TXT':"ユーザー名またはメールアドレス", 268 'TXT':"ユーザー名またはメールアドレス",
272 'PWD':"パスワード" 269 'PWD':"パスワード"
273 } 270 }
274 }, 271 },
275 'BankAccount':{ 272 'BankAccount':{
276 'title':"銀行口座", 273 'title':"銀行口座",
277 'description':"<p>口座番号とオンラインバンキング情報用のカードです。</p> ", 274 'description':"<p>口座番号とオンラインバンキング情報用のカードです。</p> ",
278 'fields':{ 275 'fields':{
279 'TXT':"銀行", 276 'TXT':"銀行",
280 'TXT':"口座番号", 277 'TXT':"口座番号",
281 'URL':"銀行サイト", 278 'URL':"銀行サイト",
282 'TXT':"オンラインバンキング ID", 279 'TXT':"オンラインバンキング ID",
283 'PWD':"オンラインバンキングパスワード" 280 'PWD':"オンラインバンキングパスワード"
284 } 281 }
285 }, 282 },
286 'CreditCard':{ 283 'CreditCard':{
287 'title':"クレジットカード", 284 'title':"クレジットカード",
288 'description':"<p>クレジットカードに関するあらゆる情報を保管できます。</p> ", 285 'description':"<p>クレジットカードに関するあらゆる情報を保管できます。</p> ",
289 'fields':{ 286 'fields':{
290 'TXT':"種類(Visa 、 AMEX など)", 287 'TXT':"種類(Visa 、 AMEX など)",
291 'TXT':"番号", 288 'TXT':"番号",
292 'TXT':"所有者名", 289 'TXT':"所有者名",
293 'TXT':"有効期限", 290 'TXT':"有効期限",
294 'TXT':"CVV2 番号", 291 'TXT':"CVV2 番号",
295 'PWD':"暗証番号", 292 'PWD':"暗証番号",
296 'URL':"カード会社サイト", 293 'URL':"カード会社サイト",
297 'TXT':"ユーザー名", 294 'TXT':"ユーザー名",
298 'PWD':"パスワード" 295 'PWD':"パスワード"
299 } 296 }
300 }, 297 },
301 'AddressBookEntry':{ 298 'AddressBookEntry':{
302 'title':"アドレス帳", 299 'title':"アドレス帳",
303 'description':"<p>Clipperz はプライベートなアドレス帳としても機能します。 このテンプレートを利用して簡単に新しい住所を追加できます。</p> ", 300 'description':"<p>Clipperz はプライベートなアドレス帳としても機能します。 このテンプレートを利用して簡単に新しい住所を追加できます。</p> ",
304 'fields':{ 301 'fields':{
305 'TXT':"名前", 302 'TXT':"名前",
306 'TXT':"メールアドレス", 303 'TXT':"メールアドレス",
307 'TXT':"電話番号", 304 'TXT':"電話番号",
308 'TXT':"携帯電話", 305 'TXT':"携帯電話",
309 'ADDR':"住所" 306 'ADDR':"住所"
310 } 307 }
311 }, 308 },
312 'Custom':{ 309 'Custom':{
313 'title':"カスタムカード", 310 'title':"カスタムカード",
314 'description':"<p>カスタムカードを使えばどんな情報でも保管できます。</p> ", 311 'description':"<p>カスタムカードを使えばどんな情報でも保管できます。</p> ",
315 'fields':{ 312 'fields':{
316 'TXT':"ラベル 1", 313 'TXT':"ラベル 1",
317 'TXT':"ラベル 2", 314 'TXT':"ラベル 2",
318 'TXT':"ラベル 3" 315 'TXT':"ラベル 3"
319 } 316 }
320 } 317 }
321}, 318},
322 'recordFieldTypologies':{ 319 'recordFieldTypologies':{
323 'TXT':{ 320 'TXT':{
324 'description':"テキスト入力欄", 321 'description':"テキスト入力欄",
325 'shortDescription':"テキスト" 322 'shortDescription':"テキスト"
326 }, 323 },
327 'PWD':{ 324 'PWD':{
328 'description':"通常は非表示になるテキスト入力欄", 325 'description':"通常は非表示になるテキスト入力欄",
329 'shortDescription':"パスワード" 326 'shortDescription':"パスワード"
330 }, 327 },
331 'URL':{ 328 'URL':{
332 'description':"表示モードではクリックできる URL 入力欄", 329 'description':"表示モードではクリックできる URL 入力欄",
333 'shortDescription':"ウェブアドレス" 330 'shortDescription':"ウェブアドレス"
334 }, 331 },
335 'DATE':{ 332 'DATE':{
336 'description':"日付入力欄", 333 'description':"日付入力欄",
337 'shortDescription':"日付" 334 'shortDescription':"日付"
338 }, 335 },
339 'ADDR':{ 336 'ADDR':{
340 'description':"Google マップ用の URL に似た文字列", 337 'description':"Google マップ用の URL に似た文字列",
341 'shortDescription':"住所" 338 'shortDescription':"住所"
342 }, 339 },
343 'CHECK':{ 340 'CHECK':{
344 'description':"チェックボックスの詳細", 341 'description':"チェックボックスの詳細",
345 'shortDescription':"チェックボックス" 342 'shortDescription':"チェックボックス"
346 }, 343 },
347 'RADIO':{ 344 'RADIO':{
348 'description':"ラジオボタンの詳細", 345 'description':"ラジオボタンの詳細",
349 'shortDescription':"ラジオボタン" 346 'shortDescription':"ラジオボタン"
350 }, 347 },
351 'SELECT':{ 348 'SELECT':{
352 'description':"セレクトリストの詳細", 349 'description':"セレクトリストの詳細",
353 'shortDescription':"セレクトリスト" 350 'shortDescription':"セレクトリスト"
354 } 351 }
355}, 352},
356 'newRecordPanelGeneralExceptionTitle':"エラー", 353 'newRecordPanelGeneralExceptionTitle':"エラー",
357 'newRecordPanelGeneralExceptionMessage':"コードが不正です。 ブックマークレットを確認してもう一度やり直してください。", 354 'newRecordPanelGeneralExceptionMessage':"コードが不正です。 ブックマークレットを確認してもう一度やり直してください。",
358 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"エラー", 355 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"エラー",
359 'newRecordPanelWrongBookmarkletVersionExceptionMessage':"古いバージョンのブックマークレットで生成されたコードです。 ブックマークレットを更新してやり直してください。", 356 'newRecordPanelWrongBookmarkletVersionExceptionMessage':"古いバージョンのブックマークレットで生成されたコードです。 ブックマークレットを更新してやり直してください。",
360 'newRecordPanelExceptionPanelCloseButtonLabel':"キャンセル", 357 'newRecordPanelExceptionPanelCloseButtonLabel':"キャンセル",
361 'mainPanelDeletingRecordPanelConfirmationTitle':"カード削除中", 358 'mainPanelDeletingRecordPanelConfirmationTitle':"カード削除中",
362 'mainPanelDeleteRecordPanelConfirmationText':"本当に削除しますか?", 359 'mainPanelDeleteRecordPanelConfirmationText':"本当に削除しますか?",
363 'mainPanelDeleteRecordPanelConfirmButtonLabel':"はい", 360 'mainPanelDeleteRecordPanelConfirmButtonLabel':"はい",
364 'mainPanelDeleteRecordPanelDenyButtonLabel':"いいえ", 361 'mainPanelDeleteRecordPanelDenyButtonLabel':"いいえ",
365 'mainPanelDeletingRecordPanelInitialTitle':"カード削除中", 362 'mainPanelDeletingRecordPanelInitialTitle':"カード削除中",
366 'mainPanelDeletingRecordPanelInitialText':"---", 363 'mainPanelDeletingRecordPanelInitialText':"---",
367 'mainPanelDeletingRecordPanelCompletedText':"完了", 364 'mainPanelDeletingRecordPanelCompletedText':"完了",
368 'deleteRecordPanelCollectRecordDataMessageTitle':"カード削除", 365 'deleteRecordPanelCollectRecordDataMessageTitle':"カード削除",
369 'deleteRecordPanelCollectRecordDataMessageText':"カードリスト更新中", 366 'deleteRecordPanelCollectRecordDataMessageText':"カードリスト更新中",
370 'deleteRecordPanelEncryptUserDataMessageTitle':"カード削除", 367 'deleteRecordPanelEncryptUserDataMessageTitle':"カード削除",
371 'deleteRecordPanelEncryptUserDataMessageText':"カードヘッダ暗号化", 368 'deleteRecordPanelEncryptUserDataMessageText':"カードヘッダ暗号化",
372 'deleteRecordPanelSendingDataToTheServerMessageTitle':"カード削除", 369 'deleteRecordPanelSendingDataToTheServerMessageTitle':"カード削除",
373 'deleteRecordPanelSendingDataToTheServerMessageText':"送信中", 370 'deleteRecordPanelSendingDataToTheServerMessageText':"送信中",
374 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"カード削除", 371 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"カード削除",
375 'deleteRecordPanelUpdatingTheInterfaceMessageText':"更新中", 372 'deleteRecordPanelUpdatingTheInterfaceMessageText':"更新中",
376 'recordDetailNoRecordSelectedTitle':"カードが選択されていません", 373 'recordDetailNoRecordSelectedTitle':"カードが選択されていません",
377 'recordDetailNoRecordSelectedDescription':"<p>左のリストからカードを選択してください。</p> ", 374 'recordDetailNoRecordSelectedDescription':"<p>左のリストからカードを選択してください。</p> ",
378 'recordDetailLoadingRecordMessage':"データ受信中", 375 'recordDetailLoadingRecordMessage':"データ受信中",
379 'recordDetailDecryptingRecordMessage':"データ復元中", 376 'recordDetailDecryptingRecordMessage':"データ復元中",
380 'recordDetailLoadingRecordVersionMessage':"最新情報を受信中", 377 'recordDetailLoadingRecordVersionMessage':"最新情報を受信中",
381 'recordDetailDecryptingRecordVersionMessage':"最新情報を復元中", 378 'recordDetailDecryptingRecordVersionMessage':"最新情報を復元中",
382 'recordDetailLoadingErrorMessageTitle':"受信エラー", 379 'recordDetailLoadingErrorMessageTitle':"受信エラー",
383 'recordDetailNotesLabel':"ノート", 380 'recordDetailNotesLabel':"ノート",
384 'recordDetailLabelFieldColumnLabel':"ラベル", 381 'recordDetailLabelFieldColumnLabel':"ラベル",
385 'recordDetailDataFieldColumnLabel':"データ", 382 'recordDetailDataFieldColumnLabel':"データ",
386 'recordDetailTypeFieldColumnLabel':"タイプ", 383 'recordDetailTypeFieldColumnLabel':"タイプ",
387 'recordDetailSavingChangesMessagePanelInitialTitle':"保存中", 384 'recordDetailSavingChangesMessagePanelInitialTitle':"保存中",
388 'recordDetailSavingChangesMessagePanelInitialText':"---", 385 'recordDetailSavingChangesMessagePanelInitialText':"---",
389 'recordDetailRemoveFieldButtonLabel':"-", 386 'recordDetailRemoveFieldButtonLabel':"-",
390 'recordDetailAddFieldButtonLabel':"フィールド追加", 387 'recordDetailAddFieldButtonLabel':"フィールド追加",
391 'recordDetailPasswordFieldHelpLabel':"パスワードをコピーするには星マークをクリックして ctrl-C をタイプします", 388 'recordDetailPasswordFieldHelpLabel':"パスワードをコピーするには星マークをクリックして ctrl-C をタイプします",
392 'recordDetailPasswordFieldScrambleLabel':"隠す", 389 'recordDetailPasswordFieldScrambleLabel':"隠す",
393 'recordDetailPasswordFieldUnscrambleLabel':"可視化", 390 'recordDetailPasswordFieldUnscrambleLabel':"可視化",
394 'recordDetailDirectLoginBlockTitle':"ダイレクトログイン", 391 'recordDetailDirectLoginBlockTitle':"ダイレクトログイン",
395 'recordDetailNewDirectLoginDescription':"<p>ダイレクトログイン設定</p> ", 392 'recordDetailNewDirectLoginDescription':"<p>ダイレクトログイン設定</p> ",
396 'recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription':"<p>オンラインサービスのログイン情報を含んでいますか?</p> <p>ブックマークレットを使ってダイレクトログインを設定しましょう!</p> ", 393 'recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription':"<p>オンラインサービスのログイン情報を含んでいますか?</p> <p>ブックマークレットを使ってダイレクトログインを設定しましょう!</p> ",
397 'recordDetailDeleteDirectLoginButtonLabel':"-", 394 'recordDetailDeleteDirectLoginButtonLabel':"-",
398 'recordDetailAddNewDirectLoginButtonLabel':"新規ダイレクトログイン追加", 395 'recordDetailAddNewDirectLoginButtonLabel':"新規ダイレクトログイン追加",
399 'recordDetailEditButtonLabel':"編集", 396 'recordDetailEditButtonLabel':"編集",
400 'recordDetailSaveButtonLabel':"保存", 397 'recordDetailSaveButtonLabel':"保存",
401 'recordDetailCancelButtonLabel':"キャンセル", 398 'recordDetailCancelButtonLabel':"キャンセル",
402 'newRecordTitleLabel':"_新規カード_", 399 'newRecordTitleLabel':"_新規カード_",
403 'newDirectLoginLabelSuffix':"", 400 'newDirectLoginLabelSuffix':"",
404 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"カード保存", 401 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"カード保存",
405 'recordSaveChangesPanelCollectRecordInfoMessageText':"更新中", 402 'recordSaveChangesPanelCollectRecordInfoMessageText':"更新中",
406 'recordSaveChangesPanelEncryptUserDataMessageTitle':"カード保存", 403 'recordSaveChangesPanelEncryptUserDataMessageTitle':"カード保存",
407 'recordSaveChangesPanelEncryptUserDataMessageText':"カードヘッダ暗号化", 404 'recordSaveChangesPanelEncryptUserDataMessageText':"カードヘッダ暗号化",
408 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"カード保存", 405 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"カード保存",
diff --git a/frontend/beta/js/Clipperz/PM/Strings/Strings_pt-BR.js b/frontend/beta/js/Clipperz/PM/Strings/Strings_pt-BR.js
index db6c2f6..8fde63f 100644
--- a/frontend/beta/js/Clipperz/PM/Strings/Strings_pt-BR.js
+++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_pt-BR.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29Clipperz.PM.Strings.Languages['pt-BR'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 26Clipperz.PM.Strings.Languages['pt-BR'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], {
30 'clipperzServiceDescriptionConfig':"<h2>Guarde com você!</h2> <ul> <li> <h3>Clipperz é:</h3> <ul> <li> <p>um simples e seguro gerenciador de senhas</p> </li> <li> <p>uma efetiva solução com uma única assinatura</p> </li> <li> <p>um cofre digital para suas informações confidenciais</p> </li> </ul> </li> <li> <h3>Com Clipperz você pode:</h3> <ul> <li> <p>guardar e gerenciar suas senhas e credenciais online</p> </li> <li> <p>logar em seus serviços web sem precisar entrar com nenhum nome de usuário ou senha</p> </li> <li> <p>proteger todos os seus dados sensíveis: códigos de alarme, PINs, números de cartão de crédito, &hellip;</p> </li> <li> <p>compartilhar segredos com membros da família e associados (em breve)</p> </li> </ul> </li> <li> <h3>Clipperz proporciona:</h3> <ul> <li> <p>anonimato completo e gratuito</p> </li> <li> <p>acesso a qualquer hora em qualquer computador</p> </li> <li> <p>sem software ou download e nada que instalar</p> </li> <li> <p>evite guardar seus segredos em seu PC ou papel</p> </li> </ul> </li> <li> <h3>Segurança Clipperz:</h3> <ul> <li> <p>seus segredos são codificados localmente por seu navegador antes de ser enviado para Clipperz</p> </li> <li> <p>a chave de codificação é uma senha que só você conhece</p> </li> <li> <p>Clipperz armazena apenas seus dados confidenciais codificados, nunca acessando os dados originais</p> </li> <li> <p>Clipperz é construído a partir de esquemas de codificação padrão, ou seja, nada é exclusivo ou caseiro</p> </li> <li> <p>você pode revisar o código a qualquer momento, mas você não precisa conhecer nada sobre criptograia para ser um usuário feliz!</p> </li> </ul> </li> <li> <a href=\"http://www.clipperz.com\" target=\"_blank\">Saiba mais</a> </li> </ul> ", 27 'clipperzServiceDescriptionConfig':"<h2>Guarde com você!</h2> <ul> <li> <h3>Clipperz é:</h3> <ul> <li> <p>um simples e seguro gerenciador de senhas</p> </li> <li> <p>uma efetiva solução com uma única assinatura</p> </li> <li> <p>um cofre digital para suas informações confidenciais</p> </li> </ul> </li> <li> <h3>Com Clipperz você pode:</h3> <ul> <li> <p>guardar e gerenciar suas senhas e credenciais online</p> </li> <li> <p>logar em seus serviços web sem precisar entrar com nenhum nome de usuário ou senha</p> </li> <li> <p>proteger todos os seus dados sensíveis: códigos de alarme, PINs, números de cartão de crédito, &hellip;</p> </li> <li> <p>compartilhar segredos com membros da família e associados (em breve)</p> </li> </ul> </li> <li> <h3>Clipperz proporciona:</h3> <ul> <li> <p>anonimato completo e gratuito</p> </li> <li> <p>acesso a qualquer hora em qualquer computador</p> </li> <li> <p>sem software ou download e nada que instalar</p> </li> <li> <p>evite guardar seus segredos em seu PC ou papel</p> </li> </ul> </li> <li> <h3>Segurança Clipperz:</h3> <ul> <li> <p>seus segredos são codificados localmente por seu navegador antes de ser enviado para Clipperz</p> </li> <li> <p>a chave de codificação é uma senha que só você conhece</p> </li> <li> <p>Clipperz armazena apenas seus dados confidenciais codificados, nunca acessando os dados originais</p> </li> <li> <p>Clipperz é construído a partir de esquemas de codificação padrão, ou seja, nada é exclusivo ou caseiro</p> </li> <li> <p>você pode revisar o código a qualquer momento, mas você não precisa conhecer nada sobre criptograia para ser um usuário feliz!</p> </li> </ul> </li> <li> <a href=\"http://www.clipperz.com\" target=\"_blank\">Saiba mais</a> </li> </ul> ",
31 'loginFormTitle':"entre sua conta Clipperz", 28 'loginFormTitle':"entre sua conta Clipperz",
32 'loginFormUsernameLabel':"nome do usuário", 29 'loginFormUsernameLabel':"nome do usuário",
33 'loginFormPassphraseLabel':"frase chave", 30 'loginFormPassphraseLabel':"frase chave",
34 'loginFormDontHaveAnAccountLabel':"não tem uma conta?", 31 'loginFormDontHaveAnAccountLabel':"não tem uma conta?",
35 'loginFormCreateOneLabel':"criar uma", 32 'loginFormCreateOneLabel':"criar uma",
36 'loginFormForgotYourCredentialsLabel':"esqueceu suas credenciais?", 33 'loginFormForgotYourCredentialsLabel':"esqueceu suas credenciais?",
37 'loginFormAarghThatsBadLabel':"xiiiii! isso é não é bom!", 34 'loginFormAarghThatsBadLabel':"xiiiii! isso é não é bom!",
38 'loginFormAfraidOfMaliciousScriptsLabel':"medo de scripts maliciosos?", 35 'loginFormAfraidOfMaliciousScriptsLabel':"medo de scripts maliciosos?",
39 'loginFormVerifyTheCodeLabel':"verifique o código", 36 'loginFormVerifyTheCodeLabel':"verifique o código",
40 'loginFormButtonLabel':"Entrar", 37 'loginFormButtonLabel':"Entrar",
41 'loginFormOneTimePasswordCheckboxLabel':"use uma frase chave descartável", 38 'loginFormOneTimePasswordCheckboxLabel':"use uma frase chave descartável",
42 'loginPanelSwithLanguageDescription':"<h5>Mudar para sua linguagem preferida</h5> ", 39 'loginPanelSwithLanguageDescription':"<h5>Mudar para sua linguagem preferida</h5> ",
43 'browserCompatibilityDescription':"<p>Tenha uma experiência melhor e mais segura com Clipperz, utilizando o Firefox. No entanto, Clipperz funciona bem também em Opera e MS Internet Explorer!</p> ", 40 'browserCompatibilityDescription':"<p>Tenha uma experiência melhor e mais segura com Clipperz, utilizando o Firefox. No entanto, Clipperz funciona bem também em Opera e MS Internet Explorer!</p> ",
44 'OTPloginMessagePanelInitialTitle':"Acessando usando a frase chave descartável", 41 'OTPloginMessagePanelInitialTitle':"Acessando usando a frase chave descartável",
45 'OTPloginMessagePanelInitialText':"Enviando credenciais descartáveis ...", 42 'OTPloginMessagePanelInitialText':"Enviando credenciais descartáveis ...",
46 'OTPloginMessagePanelLoadingTitle':"Acessando usando a frase chave descartável", 43 'OTPloginMessagePanelLoadingTitle':"Acessando usando a frase chave descartável",
47 'OTPloginMessagePanelLoadingText':"Buscando informação de autenticação codificada no servidor ...", 44 'OTPloginMessagePanelLoadingText':"Buscando informação de autenticação codificada no servidor ...",
48 'OTPloginMessagePanelProcessingTitle':"Acessando usando a frase chave descartável", 45 'OTPloginMessagePanelProcessingTitle':"Acessando usando a frase chave descartável",
49 'OTPloginMessagePanelProcessingText':"Decodificação local da informação de autenticação ...", 46 'OTPloginMessagePanelProcessingText':"Decodificação local da informação de autenticação ...",
50 'loginMessagePanelInitialTitle':"Entrando ...", 47 'loginMessagePanelInitialTitle':"Entrando ...",
51 'loginMessagePanelInitialButtonLabel':"Cancelar", 48 'loginMessagePanelInitialButtonLabel':"Cancelar",
52 'loginMessagePanelConnectedTitle':"Conectado", 49 'loginMessagePanelConnectedTitle':"Conectado",
53 'loginMessagePanelConnectedText':"Concluído", 50 'loginMessagePanelConnectedText':"Concluído",
54 'loginMessagePanelFailureTitle':"Erro", 51 'loginMessagePanelFailureTitle':"Erro",
55 'loginMessagePanelFailureText':"Ocorreu uma falha", 52 'loginMessagePanelFailureText':"Ocorreu uma falha",
56 'loginMessagePanelFailureButtonLabel':"Fechar", 53 'loginMessagePanelFailureButtonLabel':"Fechar",
57 'connectionLoginSendingCredentialsMessageTitle':"Verificando credenciais", 54 'connectionLoginSendingCredentialsMessageTitle':"Verificando credenciais",
58 'connectionLoginSendingCredentialsMessageText':"Enviando credenciais", 55 'connectionLoginSendingCredentialsMessageText':"Enviando credenciais",
59 'connectionLoginCredentialsVerificationMessageTitle':"Verificando credenciais", 56 'connectionLoginCredentialsVerificationMessageTitle':"Verificando credenciais",
60 'connectionLoginCredentialsVerificationMessageText':"Realizando autenticação SRP", 57 'connectionLoginCredentialsVerificationMessageText':"Realizando autenticação SRP",
61 'connectionLoginDoneMessageTitle':"Verificando credenciais", 58 'connectionLoginDoneMessageTitle':"Verificando credenciais",
62 'connectionLoginDoneMessageText':"Conectado", 59 'connectionLoginDoneMessageText':"Conectado",
63 'userLoginPanelUpgradingUserCredentialsMessageTitle':"Verificando credenciais", 60 'userLoginPanelUpgradingUserCredentialsMessageTitle':"Verificando credenciais",
64 'userLoginPanelUpgradingUserCredentialsMessageText':"Upgrade de suas credenciais para um novo esquema de autenticação", 61 'userLoginPanelUpgradingUserCredentialsMessageText':"Upgrade de suas credenciais para um novo esquema de autenticação",
65 'userLoginPanelConnectedMessageTitle':"Usuário autenticado", 62 'userLoginPanelConnectedMessageTitle':"Usuário autenticado",
66 'userLoginPanelConnectedMessageText':"Logado com sucesso em", 63 'userLoginPanelConnectedMessageText':"Logado com sucesso em",
67 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"Verificando credenciais", 64 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"Verificando credenciais",
68 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"Tentando esquema antigo de autenticação", 65 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"Tentando esquema antigo de autenticação",
69 'userLoginPanelLoadingUserDataMessageTitle':"Usuário autenticado", 66 'userLoginPanelLoadingUserDataMessageTitle':"Usuário autenticado",
70 'userLoginPanelLoadingUserDataMessageText':"Baixando cabeçalhos de cartão codificados de Clipperz", 67 'userLoginPanelLoadingUserDataMessageText':"Baixando cabeçalhos de cartão codificados de Clipperz",
71 'userLoginPanelDecryptingUserDataMessageTitle':"Usuário autenticado", 68 'userLoginPanelDecryptingUserDataMessageTitle':"Usuário autenticado",
72 'userLoginPanelDecryptingUserDataMessageText':"Descrição local de cabeçalhos dos cartões", 69 'userLoginPanelDecryptingUserDataMessageText':"Descrição local de cabeçalhos dos cartões",
73 'userLoginPanelDecryptingUserStatisticsMessageTitle':"Usuário autenticado", 70 'userLoginPanelDecryptingUserStatisticsMessageTitle':"Usuário autenticado",
74 'userLoginPanelDecryptingUserStatisticsMessageText':"Descrição local de estatísticas de uso", 71 'userLoginPanelDecryptingUserStatisticsMessageText':"Descrição local de estatísticas de uso",
75 'splashAlertTitle':"Bem-vindo ao Clipperz!", 72 'splashAlertTitle':"Bem-vindo ao Clipperz!",
76 'splashAlertText':"<p>Alguns avisos de segurança</p> <ul> <li> <p>Guardar suas informações no Clipperz é tão seguro quanto a frase chave que você escolher para protege-los. Ninguém pode acessá-los sem essa frase chave.</p> </li> <li> <p>Se você vai utlizar Clipperz para armazenar suas informações confidenciais e críticas, escolha uma frase chave difícil de ser descoberta. Quanto mais longa, melhor!</p> </li> <li> <p>Clipperz não será capaz de recuperar frase chave perdidas!</p> </li> </ul> <p>Para mais informações, por favor vá até <a href=\"http://www.clipperz.com\" target=\"_blank\">Clipperz</a> website.</p> ", 73 'splashAlertText':"<p>Alguns avisos de segurança</p> <ul> <li> <p>Guardar suas informações no Clipperz é tão seguro quanto a frase chave que você escolher para protege-los. Ninguém pode acessá-los sem essa frase chave.</p> </li> <li> <p>Se você vai utlizar Clipperz para armazenar suas informações confidenciais e críticas, escolha uma frase chave difícil de ser descoberta. Quanto mais longa, melhor!</p> </li> <li> <p>Clipperz não será capaz de recuperar frase chave perdidas!</p> </li> </ul> <p>Para mais informações, por favor vá até <a href=\"http://www.clipperz.com\" target=\"_blank\">Clipperz</a> website.</p> ",
77 'splashAlertCloseButtonLabel':"Ok", 74 'splashAlertCloseButtonLabel':"Ok",
78 'registrationFormTitle':"crie sua conta", 75 'registrationFormTitle':"crie sua conta",
79 'registrationFormUsernameLabel':"nome do usuário", 76 'registrationFormUsernameLabel':"nome do usuário",
80 'registrationFormPassphraseLabel':"frase chave", 77 'registrationFormPassphraseLabel':"frase chave",
81 'registrationFormRetypePassphraseLabel':"entre novamente sua frase chave", 78 'registrationFormRetypePassphraseLabel':"entre novamente sua frase chave",
82 'registrationFormSafetyCheckLabel':"Eu compreendo que Clipperz não será capaz de recuperar senhas perdidas.", 79 'registrationFormSafetyCheckLabel':"Eu compreendo que Clipperz não será capaz de recuperar senhas perdidas.",
83 'registrationFormTermsOfServiceCheckLabel':"Eu li e concordo com os <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Termos do Serviço</a>.", 80 'registrationFormTermsOfServiceCheckLabel':"Eu li e concordo com os <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Termos do Serviço</a>.",
84 'registrationFormDoYouAlreadyHaveAnAccountLabel':"você já tem uma conta?", 81 'registrationFormDoYouAlreadyHaveAnAccountLabel':"você já tem uma conta?",
85 'registrationFormSimplyLoginLabel':"login simples", 82 'registrationFormSimplyLoginLabel':"login simples",
86 'registrationFormButtonLabel':"Registrar", 83 'registrationFormButtonLabel':"Registrar",
87 'registrationFormWarningMessageNotMatchingPassphrases':"Suas frases chaves não conferem, por favor tente novamente.", 84 'registrationFormWarningMessageNotMatchingPassphrases':"Suas frases chaves não conferem, por favor tente novamente.",
88 'registrationFormWarningMessageSafetyCheckNotSelected':"Por favor leia e confira todos os campos abaixo.", 85 'registrationFormWarningMessageSafetyCheckNotSelected':"Por favor leia e confira todos os campos abaixo.",
89 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"Você precisa concordar com os Termos do Serviço.", 86 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"Você precisa concordar com os Termos do Serviço.",
90 'registrationMessagePanelInitialTitle':"Criando conta ...", 87 'registrationMessagePanelInitialTitle':"Criando conta ...",
91 'registrationMessagePanelInitialText':"---", 88 'registrationMessagePanelInitialText':"---",
92 'registrationMessagePanelInitialButtonLabel':"Cancelar", 89 'registrationMessagePanelInitialButtonLabel':"Cancelar",
93 'registrationMessagePanelRegistrationDoneTitle':"Registro", 90 'registrationMessagePanelRegistrationDoneTitle':"Registro",
94 'registrationMessagePanelRegistrationDoneText':"Concluído", 91 'registrationMessagePanelRegistrationDoneText':"Concluído",
95 'registrationMessagePanelFailureTitle':"Registrou falhou", 92 'registrationMessagePanelFailureTitle':"Registrou falhou",
96 'registrationMessagePanelFailureButtonLabel':"Fechar", 93 'registrationMessagePanelFailureButtonLabel':"Fechar",
97 'connectionRegistrationSendingRequestMessageText':"Verificando credenciais", 94 'connectionRegistrationSendingRequestMessageText':"Verificando credenciais",
98 'connectionRegistrationSendingCredentialsMessageText':"Enviando credenciais", 95 'connectionRegistrationSendingCredentialsMessageText':"Enviando credenciais",
99 'registrationSplashPanelTitle':"Informe de segurança", 96 'registrationSplashPanelTitle':"Informe de segurança",
100 'registrationSplashPanelDescription':"<p>Essas são suas credenciais Clipperz, cuide delas com cuidado. Clipperz nunca vai mostrar seu nome de usuário e frase chave uma outra vez!</p> ", 97 'registrationSplashPanelDescription':"<p>Essas são suas credenciais Clipperz, cuide delas com cuidado. Clipperz nunca vai mostrar seu nome de usuário e frase chave uma outra vez!</p> ",
101 'registrationSplashPanelUsernameLabel':"nome de usuário", 98 'registrationSplashPanelUsernameLabel':"nome de usuário",
102 'registrationSplashPanelPassphraseLabel':"frase chave", 99 'registrationSplashPanelPassphraseLabel':"frase chave",
103 'registrationSplashPanelShowPassphraseButtonLabel':"mostrar frase chave", 100 'registrationSplashPanelShowPassphraseButtonLabel':"mostrar frase chave",
104 'donateHeaderLinkLabel':"doar", 101 'donateHeaderLinkLabel':"doar",
105 'creditsHeaderLinkLabel':"créditos", 102 'creditsHeaderLinkLabel':"créditos",
106 'feedbackHeaderLinkLabel':"feedback", 103 'feedbackHeaderLinkLabel':"feedback",
107 'helpHeaderLinkLabel':"ajuda", 104 'helpHeaderLinkLabel':"ajuda",
108 'forumHeaderLinkLabel':"fórum", 105 'forumHeaderLinkLabel':"fórum",
109 'recordMenuLabel':"cartões", 106 'recordMenuLabel':"cartões",
110 'accountMenuLabel':"conta", 107 'accountMenuLabel':"conta",
111 'dataMenuLabel':"dados", 108 'dataMenuLabel':"dados",
112 'contactsMenuLabel':"contatos", 109 'contactsMenuLabel':"contatos",
113 'toolsMenuLabel':"ferramentas", 110 'toolsMenuLabel':"ferramentas",
114 'logoutMenuLabel':"sair", 111 'logoutMenuLabel':"sair",
115 'lockMenuLabel':"bloquear", 112 'lockMenuLabel':"bloquear",
116 'lockTitle':"A conta está bloqueada", 113 'lockTitle':"A conta está bloqueada",
117 'lockDescription':"<p>Para desbloquear sua conta, por favor, entre com a frase chave</p> ", 114 'lockDescription':"<p>Para desbloquear sua conta, por favor, entre com a frase chave</p> ",
118 'unlockButtonLabel':"desbloquear", 115 'unlockButtonLabel':"desbloquear",
119 'changePasswordTabLabel':"Alterar sua frase chave", 116 'changePasswordTabLabel':"Alterar sua frase chave",
120 'changePasswordTabTitle':"Alterar sua frase chave", 117 'changePasswordTabTitle':"Alterar sua frase chave",
121 'changePasswordFormUsernameLabel':"nome de usuário", 118 'changePasswordFormUsernameLabel':"nome de usuário",
122 'changePasswordFormOldPassphraseLabel':"frase chave antiga", 119 'changePasswordFormOldPassphraseLabel':"frase chave antiga",
123 'changePasswordFormNewPassphraseLabel':"frase chave nova", 120 'changePasswordFormNewPassphraseLabel':"frase chave nova",
124 'changePasswordFormRetypePassphraseLabel':"re-inserir frase chave nova", 121 'changePasswordFormRetypePassphraseLabel':"re-inserir frase chave nova",
125 'changePasswordFormSafetyCheckboxLabel':"Eu compreendo que Clipperz não poderá recuperar a frase chave perdida.", 122 'changePasswordFormSafetyCheckboxLabel':"Eu compreendo que Clipperz não poderá recuperar a frase chave perdida.",
126 'changePasswordFormSubmitLabel':"Alterar frase chave", 123 'changePasswordFormSubmitLabel':"Alterar frase chave",
127 'changePasswordFormWrongUsernameWarning':"Nome de usuário errado", 124 'changePasswordFormWrongUsernameWarning':"Nome de usuário errado",
128 'changePasswordFormWrongPassphraseWarning':"Frase chave errada", 125 'changePasswordFormWrongPassphraseWarning':"Frase chave errada",
129 'changePasswordFormWrongRetypePassphraseWarning':"Suas frases chaves não conferem, por favor tente novamente.", 126 'changePasswordFormWrongRetypePassphraseWarning':"Suas frases chaves não conferem, por favor tente novamente.",
130 'changePasswordFormSafetyCheckWarning':"Por favor leia e confira todos os campos abaixo.", 127 'changePasswordFormSafetyCheckWarning':"Por favor leia e confira todos os campos abaixo.",
131 'changePasswordFormProgressDialogTitle':"Alterando credenciais do usuário", 128 'changePasswordFormProgressDialogTitle':"Alterando credenciais do usuário",
132 'changePasswordFormProgressDialogConnectedMessageTitle':"Conectado", 129 'changePasswordFormProgressDialogConnectedMessageTitle':"Conectado",
133 'changePasswordFormProgressDialogConnectedMessageText':"Concluído", 130 'changePasswordFormProgressDialogConnectedMessageText':"Concluído",
134 'changePasswordFormProgressDialogErrorMessageTitle':"Erro", 131 'changePasswordFormProgressDialogErrorMessageTitle':"Erro",
135 'changePasswordFormProgressDialogErrorMessageText':"Mudança de credenciais falhou!", 132 'changePasswordFormProgressDialogErrorMessageText':"Mudança de credenciais falhou!",
136 'changeCredentialsPanelEncryptingDataMessageTitle':"Alterando sua frase chave", 133 'changeCredentialsPanelEncryptingDataMessageTitle':"Alterando sua frase chave",
137 'changeCredentialsPanelEncryptingDataMessageText':"Codificação local de cabeçalho de cartões", 134 'changeCredentialsPanelEncryptingDataMessageText':"Codificação local de cabeçalho de cartões",
138 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"Alterando sua frase chave", 135 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"Alterando sua frase chave",
139 'changeCredentialsPanelCreatingNewCredentialsMessageText':"Atualizando suas credenciais", 136 'changeCredentialsPanelCreatingNewCredentialsMessageText':"Atualizando suas credenciais",
140 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Alterando sua frase chave", 137 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Alterando sua frase chave",
141 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Enviando suas credenciais codificadas para Clipperz", 138 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Enviando suas credenciais codificadas para Clipperz",
142 'changeCredentialsPanelDoneMessageTitle':"Alterando sua frase chave", 139 'changeCredentialsPanelDoneMessageTitle':"Alterando sua frase chave",
143 'changeCredentialsPanelDoneMessageText':"Concluído", 140 'changeCredentialsPanelDoneMessageText':"Concluído",
144 'manageOTPTabLabel':"Gerenciar suas frases chaves descartáveis", 141 'manageOTPTabLabel':"Gerenciar suas frases chaves descartáveis",
145 'manageOTPTabTitle':"Gerenciar suas frases chaves descartáveis", 142 'manageOTPTabTitle':"Gerenciar suas frases chaves descartáveis",
146 'manageOTPTabDescription':"<p>Uma frase chave descartável funciona como uma frase chave normal, mas só pode ser utilizada uma única vez.</p> <p>Se a mesma frase chave for utilizada novamente num próximo login, ela será rejeitada e o login não irá ocorrer.</p> <p>Imediatamente após um login com sucesso, sua frase chave descartável será apagada para evitar logins fraudulentos.</p> <p>Frases chaves descartáveis são uma excelente opção se você está preocupado com keyloggers ou spywares que podem estar coletando seus dados em determinadas máquinas.</p> <p> <b>É recomendável que você utilize frases chaves descartáveis sempre que utilizar terminais públicos como Internet cafés e bibliotecas.</b> </p> ", 143 'manageOTPTabDescription':"<p>Uma frase chave descartável funciona como uma frase chave normal, mas só pode ser utilizada uma única vez.</p> <p>Se a mesma frase chave for utilizada novamente num próximo login, ela será rejeitada e o login não irá ocorrer.</p> <p>Imediatamente após um login com sucesso, sua frase chave descartável será apagada para evitar logins fraudulentos.</p> <p>Frases chaves descartáveis são uma excelente opção se você está preocupado com keyloggers ou spywares que podem estar coletando seus dados em determinadas máquinas.</p> <p> <b>É recomendável que você utilize frases chaves descartáveis sempre que utilizar terminais públicos como Internet cafés e bibliotecas.</b> </p> ",
147 'oneTimePasswordReadOnlyMessage':"<h6>Desculpe!</h6> <p>Você não pode gerenciar sua frase chave descartável quando usando a versão offline do Clipperz.</p> ", 144 'oneTimePasswordReadOnlyMessage':"<h6>Desculpe!</h6> <p>Você não pode gerenciar sua frase chave descartável quando usando a versão offline do Clipperz.</p> ",
148 'oneTimePasswordLoadingMessage':"<h6>Carregando informação</h6> <p>Por favor, aguarde ...</p> ", 145 'oneTimePasswordLoadingMessage':"<h6>Carregando informação</h6> <p>Por favor, aguarde ...</p> ",
149 'oneTimePasswordNoPasswordAvailable':"<h6>Nenhuma frase chave descartável disponível</h6> <p>Clique o botão “Novo” acima para adicionar uma frase chave descartável em sua conta.</p> ", 146 'oneTimePasswordNoPasswordAvailable':"<h6>Nenhuma frase chave descartável disponível</h6> <p>Clique o botão “Novo” acima para adicionar uma frase chave descartável em sua conta.</p> ",
150 'createNewOTPButtonLabel':"Novo", 147 'createNewOTPButtonLabel':"Novo",
151 'deleteOTPButtonLabel':"Apagar", 148 'deleteOTPButtonLabel':"Apagar",
152 'printOTPButtonLabel':"Imprimir", 149 'printOTPButtonLabel':"Imprimir",
153 'disabledOneTimePassword_warning':"desativada", 150 'disabledOneTimePassword_warning':"desativada",
154 'oneTimePasswordSelectionLink_selectLabel':"Selecionar:", 151 'oneTimePasswordSelectionLink_selectLabel':"Selecionar:",
155 'oneTimePasswordSelectionLink_all':"tudo", 152 'oneTimePasswordSelectionLink_all':"tudo",
156 'oneTimePasswordSelectionLink_none':"nenhum", 153 'oneTimePasswordSelectionLink_none':"nenhum",
157 'oneTimePasswordSelectionLink_used':"usado", 154 'oneTimePasswordSelectionLink_used':"usado",
158 'oneTimePasswordSelectionLink_unused':"não usado", 155 'oneTimePasswordSelectionLink_unused':"não usado",
159 'saveOTP_encryptUserDataTitle':"Salvando a frase chave descartável", 156 'saveOTP_encryptUserDataTitle':"Salvando a frase chave descartável",
160 'saveOTP_encryptUserDataText':"Processando novas credenciais descartáveis ...", 157 'saveOTP_encryptUserDataText':"Processando novas credenciais descartáveis ...",
161 'saveOTP_encryptOTPDataTitle':"Salvando a frase chave descartável", 158 'saveOTP_encryptOTPDataTitle':"Salvando a frase chave descartável",
162 'saveOTP_encryptOTPDataText':"Codificação local da informação de autenticação ...", 159 'saveOTP_encryptOTPDataText':"Codificação local da informação de autenticação ...",
163 'saveOTP_sendingDataTitle':"Salvando a frase chave descartável", 160 'saveOTP_sendingDataTitle':"Salvando a frase chave descartável",
164 'saveOTP_sendingDataText':"Enviando informação de autenticação para o servidor ...", 161 'saveOTP_sendingDataText':"Enviando informação de autenticação para o servidor ...",
165 'saveOTP_updatingInterfaceTitle':"Salvando a frase chave descartável", 162 'saveOTP_updatingInterfaceTitle':"Salvando a frase chave descartável",
166 'saveOTP_updatingInterfaceText':"Atualizando interface ...", 163 'saveOTP_updatingInterfaceText':"Atualizando interface ...",
167 'accountPreferencesLabel':"Preferências", 164 'accountPreferencesLabel':"Preferências",
168 'accountPreferencesTabTitle':"Preferências", 165 'accountPreferencesTabTitle':"Preferências",
169 'accountPreferencesLanguageTitle':"Seleção de idioma", 166 'accountPreferencesLanguageTitle':"Seleção de idioma",
170 'accountPreferencesLanguageDescription':"<p>Escolha seu idioma preferido da lista abaixo.</p> ", 167 'accountPreferencesLanguageDescription':"<p>Escolha seu idioma preferido da lista abaixo.</p> ",
171 'showDonationReminderPanelTitle':"Lembretes de doação", 168 'showDonationReminderPanelTitle':"Lembretes de doação",
172 'showDonationReminderPanelDescription':"<p>Mostrar lembretes de doação</p> ", 169 'showDonationReminderPanelDescription':"<p>Mostrar lembretes de doação</p> ",
173 'saveUserPreferencesFormSubmitLabel':"Salvar", 170 'saveUserPreferencesFormSubmitLabel':"Salvar",
174 'cancelUserPreferencesFormSubmitLabel':"Cancelar", 171 'cancelUserPreferencesFormSubmitLabel':"Cancelar",
175 'accountPreferencesSavingPanelTitle_Step1':"Salvando preferências", 172 'accountPreferencesSavingPanelTitle_Step1':"Salvando preferências",
176 'accountPreferencesSavingPanelText_Step1':"Codificação local de suas preferências", 173 'accountPreferencesSavingPanelText_Step1':"Codificação local de suas preferências",
177 'accountPreferencesSavingPanelTitle_Step2':"Salvando preferências", 174 'accountPreferencesSavingPanelTitle_Step2':"Salvando preferências",
178 'accountPreferencesSavingPanelText_Step2':"Enviando informação codificada para o servidor", 175 'accountPreferencesSavingPanelText_Step2':"Enviando informação codificada para o servidor",
179 'accountLoginHistoryLabel':"Histórico de conexão", 176 'accountLoginHistoryLabel':"Histórico de conexão",
180 'loginHistoryTabTitle':"Histórico de conexão", 177 'loginHistoryTabTitle':"Histórico de conexão",
181 'loginHistoryReadOnlyMessage':"<h6>Desculpe!</h6> <p>Seu histórico de conexão não está disponível quando usando uma versão offline do Clipperz.</p> ", 178 'loginHistoryReadOnlyMessage':"<h6>Desculpe!</h6> <p>Seu histórico de conexão não está disponível quando usando uma versão offline do Clipperz.</p> ",
182 'loginHistoryLoadingMessage':"<h6>Carregando informação</h6> <p>Por favor, aguarde ...</p> ", 179 'loginHistoryLoadingMessage':"<h6>Carregando informação</h6> <p>Por favor, aguarde ...</p> ",
183 'loginHistoryLoadedMessageConfig':"<h6>Suas 10 últimas conexões</h6> <p> </p> ", 180 'loginHistoryLoadedMessageConfig':"<h6>Suas 10 últimas conexões</h6> <p> </p> ",
184 'loginHistoryIPLabel':"IP", 181 'loginHistoryIPLabel':"IP",
185 'loginHistoryTimeLabel':"data", 182 'loginHistoryTimeLabel':"data",
186 'loginHistoryCurrentSessionText':"sessão atual", 183 'loginHistoryCurrentSessionText':"sessão atual",
187 'loginHistoryReloadButtonLabel':"Recarregar histórico de conexão", 184 'loginHistoryReloadButtonLabel':"Recarregar histórico de conexão",
188 'deleteAccountTabLabel':"Apagar sua conta", 185 'deleteAccountTabLabel':"Apagar sua conta",
189 'deleteAccountTabTitle':"Apagar sua conta", 186 'deleteAccountTabTitle':"Apagar sua conta",
190 'deleteAccountFormUsernameLabel':"nome de usuário", 187 'deleteAccountFormUsernameLabel':"nome de usuário",
191 'deleteAccountFormPassphraseLabel':"frase chave", 188 'deleteAccountFormPassphraseLabel':"frase chave",
192 'deleteAccountFormSafetyCheckboxLabel':"Eu compreendo que toda minha informação será apagada e que esta ação é irreversível.", 189 'deleteAccountFormSafetyCheckboxLabel':"Eu compreendo que toda minha informação será apagada e que esta ação é irreversível.",
193 'deleteAccountFormSubmitLabel':"Apagar minha conta", 190 'deleteAccountFormSubmitLabel':"Apagar minha conta",
194 'deleteAccountFormWrongUsernameWarning':"Nome de usuário errado", 191 'deleteAccountFormWrongUsernameWarning':"Nome de usuário errado",
195 'deleteAccountFormWrongPassphraseWarning':"Frase chave errada", 192 'deleteAccountFormWrongPassphraseWarning':"Frase chave errada",
196 'deleteAccountFormSafetyCheckWarning':"Por favor leia e confira os campos abaixo.", 193 'deleteAccountFormSafetyCheckWarning':"Por favor leia e confira os campos abaixo.",
197 'accountPanelDeletingAccountPanelConfirmationTitle':"ATENÇÃO", 194 'accountPanelDeletingAccountPanelConfirmationTitle':"ATENÇÃO",
198 'accountPanelDeleteAccountPanelConfirmationText':"Você tem certeza que quer apagar esta conta?", 195 'accountPanelDeleteAccountPanelConfirmationText':"Você tem certeza que quer apagar esta conta?",
199 'accountPanelDeleteAccountPanelConfirmButtonLabel':"Sim", 196 'accountPanelDeleteAccountPanelConfirmButtonLabel':"Sim",
200 'accountPanelDeleteAccountPanelDenyButtonLabel':"Não", 197 'accountPanelDeleteAccountPanelDenyButtonLabel':"Não",
201 'offlineCopyTabLabel':"Cópia offline", 198 'offlineCopyTabLabel':"Cópia offline",
202 'offlineCopyTabTitle':"Cópia offline", 199 'offlineCopyTabTitle':"Cópia offline",
203 'offlineCopyTabDescription':"<p>Com apenas um click você pode passar toda sua informação codificada dos servidores Clipperz para seu hard disk e criar uma versão read-only offline do Clipperz para ser utilizada quando você não estiver conectado na Internet.</p> <p>Essa versão read-only é tão segura quanto a versão online e não vai expor suas informações a riscos maiores já que ambas tem a mesma arquitetura de código e segurança.</p> <ol> <li> <p>Clique no link abaixo para iniciar o download.</p> </li> <li> <p>O navegador vai perguntar o que fazer com o arquivo “Clipperz_YYYYMMDD.html”. Grave-o em seu hard disk.</p> </li> <li> <p>Clique duas vezes no arquivo baixado para abrir a versão offline em seu navegador.</p> </li> <li> <p>Entre sua frase chave e nome de usuário como sempre faz.</p> </li> </ol> ", 200 'offlineCopyTabDescription':"<p>Com apenas um click você pode passar toda sua informação codificada dos servidores Clipperz para seu hard disk e criar uma versão read-only offline do Clipperz para ser utilizada quando você não estiver conectado na Internet.</p> <p>Essa versão read-only é tão segura quanto a versão online e não vai expor suas informações a riscos maiores já que ambas tem a mesma arquitetura de código e segurança.</p> <ol> <li> <p>Clique no link abaixo para iniciar o download.</p> </li> <li> <p>O navegador vai perguntar o que fazer com o arquivo “Clipperz_YYYYMMDD.html”. Grave-o em seu hard disk.</p> </li> <li> <p>Clique duas vezes no arquivo baixado para abrir a versão offline em seu navegador.</p> </li> <li> <p>Entre sua frase chave e nome de usuário como sempre faz.</p> </li> </ol> ",
204 'offlineCopyDownloadLinkLabel':"Baixar", 201 'offlineCopyDownloadLinkLabel':"Baixar",
205 'offlineCopyDownloadWarningConfig':"<h4> <a href=\"#\" id=\"offlineCopyDownloadWarningLink\">Atualize sua “cópia offline”!</a> </h4> <p>Vocie recentemente criou ou modificou um ou mais cartões, seria inteligente baixar uma nova “cópia offline”.</p> ", 202 'offlineCopyDownloadWarningConfig':"<h4> <a href=\"#\" id=\"offlineCopyDownloadWarningLink\">Atualize sua “cópia offline”!</a> </h4> <p>Vocie recentemente criou ou modificou um ou mais cartões, seria inteligente baixar uma nova “cópia offline”.</p> ",
206 'sharingTabLabel':"Compartilhar", 203 'sharingTabLabel':"Compartilhar",
207 'sharingTabTitle':"Compartilhar", 204 'sharingTabTitle':"Compartilhar",
208 'sharingTabDescriptionConfig':"<p>Frequentemente uma informação confidencial precisa ser compartilhada com uma ou mais pessoas.</p> <p>Isso pode ser tão simples quanto permitir o acesso de seus colegas ao seu voice mail quando você está fora do escritório, ou tão complicado quanto permitir que seus herdeiros acessem seu caixa num banco quando você morrer.</p> <p>Clipperz pode fazer o processo de compartilhamento simples e seguro.</p> <p> </p> <p> <b>Em breve ...</b> </p> ", 205 'sharingTabDescriptionConfig':"<p>Frequentemente uma informação confidencial precisa ser compartilhada com uma ou mais pessoas.</p> <p>Isso pode ser tão simples quanto permitir o acesso de seus colegas ao seu voice mail quando você está fora do escritório, ou tão complicado quanto permitir que seus herdeiros acessem seu caixa num banco quando você morrer.</p> <p>Clipperz pode fazer o processo de compartilhamento simples e seguro.</p> <p> </p> <p> <b>Em breve ...</b> </p> ",
209 'importTabLabel':"Importar", 206 'importTabLabel':"Importar",
210 'importTabTitle':"Importar", 207 'importTabTitle':"Importar",
211 'importTabDescription':"<p> <b>Em breve ...</b> <p> ", 208 'importTabDescription':"<p> <b>Em breve ...</b> <p> ",
212 'printingTabLabel':"Exportar", 209 'printingTabLabel':"Exportar",
213 'printingTabTitle':"Exportar", 210 'printingTabTitle':"Exportar",
214 'printingTabDescription':"<p> <b>Versão para impressão</b> </p> <p>Clicando no link abaixo você abre uma nova janela contendo todos os seus cartões em formato de impressão.</p> <p>Se você vai impriir para backup, considere a opção mais segura criando uma “cópia offline”.</p> ", 211 'printingTabDescription':"<p> <b>Versão para impressão</b> </p> <p>Clicando no link abaixo você abre uma nova janela contendo todos os seus cartões em formato de impressão.</p> <p>Se você vai impriir para backup, considere a opção mais segura criando uma “cópia offline”.</p> ",
215 'printingLinkLabel':"Versão para impressão", 212 'printingLinkLabel':"Versão para impressão",
216 'contactsTabLabel':"Contatos", 213 'contactsTabLabel':"Contatos",
217 'contactsTabTitle':"Contatos", 214 'contactsTabTitle':"Contatos",
218 'passwordGeneratorTabLabel':"Gerador de senhas", 215 'passwordGeneratorTabLabel':"Gerador de senhas",
219 'passwordGeneratorTabTitle':"Gerador de senhas", 216 'passwordGeneratorTabTitle':"Gerador de senhas",
220 'passwordGeneratorTabButtonLabel':"Gerar senha", 217 'passwordGeneratorTabButtonLabel':"Gerar senha",
221 'bookmarkletTabLabel':"Bookmarklet", 218 'bookmarkletTabLabel':"Bookmarklet",
222 'bookmarkletTabTitle':"Bookmarklet", 219 'bookmarkletTabTitle':"Bookmarklet",
223 'bookmarkletTabDescription':"<p>Um bookmarklet é uma ferramenta “one-click” que pode executar diversas tarefas úteis. Pode ser salva e utilizada como uma página web preferida normal.</p> <p>Os bookmarklet Clipperz vão ajudar você a a rapidamente criar novos cartões e novos logins diretos a partir dos cartões existentes.</p> <p> <b>Por favor, note que o bookmarklet não inclui nenhuma informação relacionada à sua conta (e.g. seu nome de usuário ou frase chave), o bookmarklet é um ferramenta contendo o mesmo código para todos ois usuários Clipperz.</b> </p> <h3>Como instalar o bookmarlet</h3> <h5>Firefox, Camino, Opera, Safari</h5> <ol> <li> <p>Assegure-se que a “Barra de Bookmarks” está visível, selecionando “View > Toolbars > Bookmarks”, ou menu similar no menu do navegador</p> </li> <li> <p>Arraste o link “Adicionar ao Clipperz” abaixo para a barra de bookmark.</p> </li> </ol> <h5>Internet Explorer</h5> <ol> <li> <p>Assegure-se que o barra de “Links” está visível selecionando “View > Toolbar > Links” no menu do navegador.</p> </li> <li> <p>Clique com o botão direito no link “Adicionar ao Clipperz” abaixo.</p> </li> <li> <p>Select “Selecione “Add to favorites” no menu contextual.</p> </li> <li> <p>Clique “Yes” para qualquer mensagem de segurança que surgir em pop-up.</p> </li> <li> <p>Abra o folder “Links” e clique “OK”.</p> </li> </ol> ", 220 'bookmarkletTabDescription':"<p>Um bookmarklet é uma ferramenta “one-click” que pode executar diversas tarefas úteis. Pode ser salva e utilizada como uma página web preferida normal.</p> <p>Os bookmarklet Clipperz vão ajudar você a a rapidamente criar novos cartões e novos logins diretos a partir dos cartões existentes.</p> <p> <b>Por favor, note que o bookmarklet não inclui nenhuma informação relacionada à sua conta (e.g. seu nome de usuário ou frase chave), o bookmarklet é um ferramenta contendo o mesmo código para todos ois usuários Clipperz.</b> </p> <h3>Como instalar o bookmarlet</h3> <h5>Firefox, Camino, Opera, Safari</h5> <ol> <li> <p>Assegure-se que a “Barra de Bookmarks” está visível, selecionando “View > Toolbars > Bookmarks”, ou menu similar no menu do navegador</p> </li> <li> <p>Arraste o link “Adicionar ao Clipperz” abaixo para a barra de bookmark.</p> </li> </ol> <h5>Internet Explorer</h5> <ol> <li> <p>Assegure-se que o barra de “Links” está visível selecionando “View > Toolbar > Links” no menu do navegador.</p> </li> <li> <p>Clique com o botão direito no link “Adicionar ao Clipperz” abaixo.</p> </li> <li> <p>Select “Selecione “Add to favorites” no menu contextual.</p> </li> <li> <p>Clique “Yes” para qualquer mensagem de segurança que surgir em pop-up.</p> </li> <li> <p>Abra o folder “Links” e clique “OK”.</p> </li> </ol> ",
224 'bookmarkletTabBookmarkletTitle':"Adicionar ao Clipperz", 221 'bookmarkletTabBookmarkletTitle':"Adicionar ao Clipperz",
225 'bookmarkletTabInstructions':"<h3>Como criar um novo cartão para acessar diretamente um serviço online</h3> <ol> <li> <p>Abra a página web onde o formulário de login está. (é a página onde você usualmente entra com suas credenciais)</p> </li> <li> <p>Dispare a preferência clicando nela: um pop-up vai aparecer sobre a página.</p> </li> <li> <p>Copie para o clipboard o conteúdo da área de texto do pop-up. (ctrl-C)</p> </li> <li> <p>Entre em sua conta Clipperz e clique no botão <b>Adicionar novo cartão</b>.</p> </li> <li> <p>Selecione o template de \"Login Direto\" e cole o conteúdo do clipboard para a grande área de texto do formulário. (ctrl-V)</p> </li> <li> <p>Pressione o botão <b>Criar</b>, reveja os detalhes e clique <b>Save</b>.</p> </li> </ol> <h3>Como adicionar login direto a um cartão existente</h3> <ol> <li> <p>Idem acima.</p> </li> <li> <p>Idem acima.</p> </li> <li> <p>Idem acima.</p> </li> <li> <p>Entre em sua conta Clipperz e selecione o cartão contendo as credenciais para o serviço web que você visitou e clique no botão <b>Editar</b>.</p> </li> <li> <p>Cole o conteúdo do clipboard para a grande área de texto da sessão “Logins diretos”. (ctrl-V)</p> </li> <li> <p>Pressione o botão <b>Adicionar login direto</b>, reveja os detalhes e clique <b>Salvar</b>.</p> </li> </ol> <p> </p> <p>Mais informações sobre as preferências estão <a href=\"http://www.clipperz.com/support/user_guide/bookmarklet\" target=\"_blank\">disponíveis aqui</a>.</p> ", 222 'bookmarkletTabInstructions':"<h3>Como criar um novo cartão para acessar diretamente um serviço online</h3> <ol> <li> <p>Abra a página web onde o formulário de login está. (é a página onde você usualmente entra com suas credenciais)</p> </li> <li> <p>Dispare a preferência clicando nela: um pop-up vai aparecer sobre a página.</p> </li> <li> <p>Copie para o clipboard o conteúdo da área de texto do pop-up. (ctrl-C)</p> </li> <li> <p>Entre em sua conta Clipperz e clique no botão <b>Adicionar novo cartão</b>.</p> </li> <li> <p>Selecione o template de \"Login Direto\" e cole o conteúdo do clipboard para a grande área de texto do formulário. (ctrl-V)</p> </li> <li> <p>Pressione o botão <b>Criar</b>, reveja os detalhes e clique <b>Save</b>.</p> </li> </ol> <h3>Como adicionar login direto a um cartão existente</h3> <ol> <li> <p>Idem acima.</p> </li> <li> <p>Idem acima.</p> </li> <li> <p>Idem acima.</p> </li> <li> <p>Entre em sua conta Clipperz e selecione o cartão contendo as credenciais para o serviço web que você visitou e clique no botão <b>Editar</b>.</p> </li> <li> <p>Cole o conteúdo do clipboard para a grande área de texto da sessão “Logins diretos”. (ctrl-V)</p> </li> <li> <p>Pressione o botão <b>Adicionar login direto</b>, reveja os detalhes e clique <b>Salvar</b>.</p> </li> </ol> <p> </p> <p>Mais informações sobre as preferências estão <a href=\"http://www.clipperz.com/support/user_guide/bookmarklet\" target=\"_blank\">disponíveis aqui</a>.</p> ",
226 'mainPanelDirectLoginBlockLabel':"Logins diretos", 223 'mainPanelDirectLoginBlockLabel':"Logins diretos",
227 'directLinkReferenceShowButtonLabel':"mostrar", 224 'directLinkReferenceShowButtonLabel':"mostrar",
228 'mainPanelDirectLoginBlockDescription':"<p>Adicionar “logins diretos” para entrar em páginas web sem ter que digitar nome de usuário e senhas!</p> <p>“Logins diretos” ampliam a segurança de sus senha já que você pode:</p> <ul> <li> <p>utilizar senhas mais complexas;</p> </li> <li> <p>nunca re-utilizar a mesma senha fácil-de-lembrar.</p> </li> </ul> <p>Configuração simples e rápida com os <b>bookmarklet</b> Clipperz.</p> <a href=\"http://www.clipperz.com/support/user_guide/direct_logins\" target=\"_blank\">Saiba mais sobre “logins diretos”</a> ", 225 'mainPanelDirectLoginBlockDescription':"<p>Adicionar “logins diretos” para entrar em páginas web sem ter que digitar nome de usuário e senhas!</p> <p>“Logins diretos” ampliam a segurança de sus senha já que você pode:</p> <ul> <li> <p>utilizar senhas mais complexas;</p> </li> <li> <p>nunca re-utilizar a mesma senha fácil-de-lembrar.</p> </li> </ul> <p>Configuração simples e rápida com os <b>bookmarklet</b> Clipperz.</p> <a href=\"http://www.clipperz.com/support/user_guide/direct_logins\" target=\"_blank\">Saiba mais sobre “logins diretos”</a> ",
229 'mainPanelRecordsBlockLabel':"Cartões", 226 'mainPanelRecordsBlockLabel':"Cartões",
230 'mainPanelAddRecordButtonLabel':"Adicionar novo cartão", 227 'mainPanelAddRecordButtonLabel':"Adicionar novo cartão",
231 'mainPanelRemoveRecordButtonLabel':"Apagar cartão", 228 'mainPanelRemoveRecordButtonLabel':"Apagar cartão",
232 'mainPanelRecordFilterBlockAllLabel':"todos", 229 'mainPanelRecordFilterBlockAllLabel':"todos",
233 'mainPanelRecordFilterBlockTagsLabel':"tags", 230 'mainPanelRecordFilterBlockTagsLabel':"tags",
234 'mainPanelRecordFilterBlockSearchLabel':"buscar", 231 'mainPanelRecordFilterBlockSearchLabel':"buscar",
235 'recordDetailNoRecordAtAllTitle':"Bem-vindo ao Clipperz!", 232 'recordDetailNoRecordAtAllTitle':"Bem-vindo ao Clipperz!",
236 'recordDetailNoRecordAtAllDescription':"<h5>Inicie criando cartões para sua conta.</h5> <p>Cartões são formulários simples e flexíveis onde você guarda senhas e outras informações confidenciais.</p> <p>Cartões podem conter credenciais de login a sites, a combinação do seu cadeado da bicicleta, detalhes do seu cartão de crédito, ...</p> <h5>Não esqueça o bookmarklet</h5> <p>Antes de começar, instale o bookmarklet “Adicionar ao Clipperz”: ele vai tornar o processo de criar cartões mais fácil e divertido.</p> <p> </p> <p>Depois, apenas click no botão <b>Adicionar novo cartão</b> e aproveite sua conta Clipperz.</p> <p> </p> <a href=\"http://www.clipperz.com/support/user_guide/managing_cards\" target=\"_blank\">Saiba mais sobre criar e gerenciar cartões</a> ", 233 'recordDetailNoRecordAtAllDescription':"<h5>Inicie criando cartões para sua conta.</h5> <p>Cartões são formulários simples e flexíveis onde você guarda senhas e outras informações confidenciais.</p> <p>Cartões podem conter credenciais de login a sites, a combinação do seu cadeado da bicicleta, detalhes do seu cartão de crédito, ...</p> <h5>Não esqueça o bookmarklet</h5> <p>Antes de começar, instale o bookmarklet “Adicionar ao Clipperz”: ele vai tornar o processo de criar cartões mais fácil e divertido.</p> <p> </p> <p>Depois, apenas click no botão <b>Adicionar novo cartão</b> e aproveite sua conta Clipperz.</p> <p> </p> <a href=\"http://www.clipperz.com/support/user_guide/managing_cards\" target=\"_blank\">Saiba mais sobre criar e gerenciar cartões</a> ",
237 'newRecordWizardTitleBox':"<h5>Por favor selecione um template</h5> <p>Cartões são formulários simples e flexíveis onde você pode arquivar suas senhas ou outras informações confidenciais.</p> <p>Comece escolhendo um dos templates abaixo. Você poderá customizar seus cartões mais tarde, adicionando e removendo campos.</p> ", 234 'newRecordWizardTitleBox':"<h5>Por favor selecione um template</h5> <p>Cartões são formulários simples e flexíveis onde você pode arquivar suas senhas ou outras informações confidenciais.</p> <p>Comece escolhendo um dos templates abaixo. Você poderá customizar seus cartões mais tarde, adicionando e removendo campos.</p> ",
238 'newRecordWizardBookmarkletConfigurationTitle':"Login direto", 235 'newRecordWizardBookmarkletConfigurationTitle':"Login direto",
239 'newRecordWizardBookmarkletConfigurationDescription':"<p>Coloque abaixo o código de configuração gerado pelo bookmarklet Clipperz.</p> <p>Um novo cartão completo com login direto para sua conta web será criado.</p> ", 236 'newRecordWizardBookmarkletConfigurationDescription':"<p>Coloque abaixo o código de configuração gerado pelo bookmarklet Clipperz.</p> <p>Um novo cartão completo com login direto para sua conta web será criado.</p> ",
240 'newRecordWizardCreateButtonLabel':"Criar", 237 'newRecordWizardCreateButtonLabel':"Criar",
241 'newRecordWizardCancelButtonLabel':"Cancelar", 238 'newRecordWizardCancelButtonLabel':"Cancelar",
242 'donateSplashPanelTitle':"Apoie Clipperz, faça uma doação hoje!", 239 'donateSplashPanelTitle':"Apoie Clipperz, faça uma doação hoje!",
243 'donateSplashPanelDescription':"<p>Algumas boas razões para doar:</p> <ul> <li> <p>apoie o desenvolvimento de novas funcionalidades</p> </li> <li> <p>mantenha Clipperz gratuito</p> </li> <li> <p>mostrar apreciação por trabalho duro</p> </li> </ul> <p>Para qualquer informação adicional, por favor visite nossa <a href=\"http://www.clipperz.com/donations\" target=\"_blank\">página de Doações</a>.</p> <p> <b>Pronto para doar?</b> </p> ", 240 'donateSplashPanelDescription':"<p>Algumas boas razões para doar:</p> <ul> <li> <p>apoie o desenvolvimento de novas funcionalidades</p> </li> <li> <p>mantenha Clipperz gratuito</p> </li> <li> <p>mostrar apreciação por trabalho duro</p> </li> </ul> <p>Para qualquer informação adicional, por favor visite nossa <a href=\"http://www.clipperz.com/donations\" target=\"_blank\">página de Doações</a>.</p> <p> <b>Pronto para doar?</b> </p> ",
244 'donateCloseButtonLabel':"Não ainda", 241 'donateCloseButtonLabel':"Não ainda",
245 'donateDonateButtonLabel':"Sim", 242 'donateDonateButtonLabel':"Sim",
246 'recordTemplates':{ 243 'recordTemplates':{
247 'WebAccount':{ 244 'WebAccount':{
248 'title':"Senha web", 245 'title':"Senha web",
249 'description':"<p>Um cartão simples para arquivar credenciais de login para seus serviços online.</p> ", 246 'description':"<p>Um cartão simples para arquivar credenciais de login para seus serviços online.</p> ",
250 'fields':{ 247 'fields':{
251 'URL':"Endereço web", 248 'URL':"Endereço web",
252 'TXT':"Nome de usuário ou email", 249 'TXT':"Nome de usuário ou email",
253 'PWD':"Senha" 250 'PWD':"Senha"
254 } 251 }
255 }, 252 },
256 'BankAccount':{ 253 'BankAccount':{
257 'title':"Conta bancária", 254 'title':"Conta bancária",
258 'description':"<p>Arquive com segurança o número de sua conta corrente e suas credenciais de online banking.</p> ", 255 'description':"<p>Arquive com segurança o número de sua conta corrente e suas credenciais de online banking.</p> ",
259 'fields':{ 256 'fields':{
260 'TXT':"Banco", 257 'TXT':"Banco",
261 'TXT':"Número da conta", 258 'TXT':"Número da conta",
262 'URL':"Website do banco", 259 'URL':"Website do banco",
263 'TXT':"ID de online banking", 260 'TXT':"ID de online banking",
264 'PWD':"Senha de online banking" 261 'PWD':"Senha de online banking"
265 } 262 }
266 }, 263 },
267 'CreditCard':{ 264 'CreditCard':{
268 'title':"Cartão de crédito", 265 'title':"Cartão de crédito",
269 'description':"<p>Número do cartão, validade, CVV2 e PIN sempre disponíveis no Clipperz</p> ", 266 'description':"<p>Número do cartão, validade, CVV2 e PIN sempre disponíveis no Clipperz</p> ",
270 'fields':{ 267 'fields':{
271 'TXT':"Tipo (Visa, AmEx, ...)", 268 'TXT':"Tipo (Visa, AmEx, ...)",
272 'TXT':"Número", 269 'TXT':"Número",
273 'TXT':"Nome do proprietário", 270 'TXT':"Nome do proprietário",
274 'TXT':"Prazo de validade", 271 'TXT':"Prazo de validade",
275 'TXT':"CVV2", 272 'TXT':"CVV2",
276 'PWD':"PIN", 273 'PWD':"PIN",
277 'URL':"Website do cartão", 274 'URL':"Website do cartão",
278 'TXT':"Nome do usuário", 275 'TXT':"Nome do usuário",
279 'PWD':"Senha" 276 'PWD':"Senha"
280 } 277 }
281 }, 278 },
282 'AddressBookEntry':{ 279 'AddressBookEntry':{
283 'title':"Agenda de endereços", 280 'title':"Agenda de endereços",
284 'description':"<p>Clipperz pode também funcionar como sua agenda de endereços particular. Use esse template para facilmente adicionar novas entradas.</p> ", 281 'description':"<p>Clipperz pode também funcionar como sua agenda de endereços particular. Use esse template para facilmente adicionar novas entradas.</p> ",
285 'fields':{ 282 'fields':{
286 'TXT':"Nome", 283 'TXT':"Nome",
287 'TXT':"Email", 284 'TXT':"Email",
288 'TXT':"Fone", 285 'TXT':"Fone",
289 'TXT':"Mobile", 286 'TXT':"Mobile",
290 'ADDR':"Endereço" 287 'ADDR':"Endereço"
291 } 288 }
292 }, 289 },
293 'Custom':{ 290 'Custom':{
294 'title':"Cartão customizado", 291 'title':"Cartão customizado",
295 'description':"<p>Não importa o tipo de informação confidencial você precisa proteger, crie um cartão customizado para sua necessidade.</p> ", 292 'description':"<p>Não importa o tipo de informação confidencial você precisa proteger, crie um cartão customizado para sua necessidade.</p> ",
296 'fields':{ 293 'fields':{
297 'TXT':"Label 1", 294 'TXT':"Label 1",
298 'TXT':"Label 2", 295 'TXT':"Label 2",
299 'TXT':"Label 3" 296 'TXT':"Label 3"
300 } 297 }
301 } 298 }
302}, 299},
303 'recordFieldTypologies':{ 300 'recordFieldTypologies':{
304 'TXT':{ 301 'TXT':{
305 'description':"simple text field", 302 'description':"simple text field",
306 'shortDescription':"texto" 303 'shortDescription':"texto"
307 }, 304 },
308 'PWD':{ 305 'PWD':{
309 'description':"simple text field, with default status set to hidden", 306 'description':"simple text field, with default status set to hidden",
310 'shortDescription':"senha" 307 'shortDescription':"senha"
311 }, 308 },
312 'URL':{ 309 'URL':{
313 'description':"simple text field in edit mode, that became an active url in view mode", 310 'description':"simple text field in edit mode, that became an active url in view mode",
314 'shortDescription':"endereço web" 311 'shortDescription':"endereço web"
315 }, 312 },
316 'DATE':{ 313 'DATE':{
317 'description':"a value set with a calendar helper", 314 'description':"a value set with a calendar helper",
318 'shortDescription':"data" 315 'shortDescription':"data"
319 }, 316 },
320 'ADDR':{ 317 'ADDR':{
321 'description':"just like the URL, but the active link points to Google Maps (or similar service) passing the address value as argument", 318 'description':"just like the URL, but the active link points to Google Maps (or similar service) passing the address value as argument",
322 'shortDescription':"endereço" 319 'shortDescription':"endereço"
323 }, 320 },
324 'CHECK':{ 321 'CHECK':{
325 'description':"check description", 322 'description':"check description",
326 'shortDescription':"check" 323 'shortDescription':"check"
327 }, 324 },
328 'RADIO':{ 325 'RADIO':{
329 'description':"radio description", 326 'description':"radio description",
330 'shortDescription':"radio" 327 'shortDescription':"radio"
331 }, 328 },
332 'SELECT':{ 329 'SELECT':{
333 'description':"select description", 330 'description':"select description",
334 'shortDescription':"select" 331 'shortDescription':"select"
335 } 332 }
336}, 333},
337 'newRecordPanelGeneralExceptionTitle':"Erro", 334 'newRecordPanelGeneralExceptionTitle':"Erro",
338 'newRecordPanelGeneralExceptionMessage':"O texto de configuração não é válido. Certifique-se do texto no pop-up de bookmarklet e tente novamente.", 335 'newRecordPanelGeneralExceptionMessage':"O texto de configuração não é válido. Certifique-se do texto no pop-up de bookmarklet e tente novamente.",
339 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"Erro", 336 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"Erro",
340 'newRecordPanelWrongBookmarkletVersionExceptionMessage':"O texto de configuração foi gerado por uma velha versão de bookmarklet. Por favor, atualize seus preferidos e tente novamente.", 337 'newRecordPanelWrongBookmarkletVersionExceptionMessage':"O texto de configuração foi gerado por uma velha versão de bookmarklet. Por favor, atualize seus preferidos e tente novamente.",
341 'newRecordPanelExceptionPanelCloseButtonLabel':"Cancelar", 338 'newRecordPanelExceptionPanelCloseButtonLabel':"Cancelar",
342 'mainPanelDeletingRecordPanelConfirmationTitle':"Apagando o cartão selecionado", 339 'mainPanelDeletingRecordPanelConfirmationTitle':"Apagando o cartão selecionado",
343 'mainPanelDeleteRecordPanelConfirmationText':"Você quer mesmo apagar o cartão selecionado?", 340 'mainPanelDeleteRecordPanelConfirmationText':"Você quer mesmo apagar o cartão selecionado?",
344 'mainPanelDeleteRecordPanelConfirmButtonLabel':"Sim", 341 'mainPanelDeleteRecordPanelConfirmButtonLabel':"Sim",
345 'mainPanelDeleteRecordPanelDenyButtonLabel':"Não", 342 'mainPanelDeleteRecordPanelDenyButtonLabel':"Não",
346 'mainPanelDeletingRecordPanelInitialTitle':"Apagando o cartão selecionado", 343 'mainPanelDeletingRecordPanelInitialTitle':"Apagando o cartão selecionado",
347 'mainPanelDeletingRecordPanelCompletedText':"Concluído", 344 'mainPanelDeletingRecordPanelCompletedText':"Concluído",
348 'deleteRecordPanelCollectRecordDataMessageTitle':"Apagar cartão", 345 'deleteRecordPanelCollectRecordDataMessageTitle':"Apagar cartão",
349 'deleteRecordPanelCollectRecordDataMessageText':"Atualizando lista de cartões", 346 'deleteRecordPanelCollectRecordDataMessageText':"Atualizando lista de cartões",
350 'deleteRecordPanelEncryptUserDataMessageTitle':"Apagar cartão", 347 'deleteRecordPanelEncryptUserDataMessageTitle':"Apagar cartão",
351 'deleteRecordPanelEncryptUserDataMessageText':"Codificação local de cabeçalhos de cartão", 348 'deleteRecordPanelEncryptUserDataMessageText':"Codificação local de cabeçalhos de cartão",
352 'deleteRecordPanelSendingDataToTheServerMessageTitle':"Apagar cartão", 349 'deleteRecordPanelSendingDataToTheServerMessageTitle':"Apagar cartão",
353 'deleteRecordPanelSendingDataToTheServerMessageText':"Enviando os cabeçalhos de cartão codificados para Clipperz", 350 'deleteRecordPanelSendingDataToTheServerMessageText':"Enviando os cabeçalhos de cartão codificados para Clipperz",
354 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"Apagar cartão", 351 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"Apagar cartão",
355 'deleteRecordPanelUpdatingTheInterfaceMessageText':"Atualizando a interface", 352 'deleteRecordPanelUpdatingTheInterfaceMessageText':"Atualizando a interface",
356 'recordDetailNoRecordSelectedTitle':"Nenhum cartão selecionado", 353 'recordDetailNoRecordSelectedTitle':"Nenhum cartão selecionado",
357 'recordDetailNoRecordSelectedDescription':"<p>Por favor selecione um cartão da lista na esquerda.</p> ", 354 'recordDetailNoRecordSelectedDescription':"<p>Por favor selecione um cartão da lista na esquerda.</p> ",
358 'recordDetailLoadingRecordMessage':"Baixando cartão codificados do Clipperz", 355 'recordDetailLoadingRecordMessage':"Baixando cartão codificados do Clipperz",
359 'recordDetailDecryptingRecordMessage':"Descrição local dos dados do cartão", 356 'recordDetailDecryptingRecordMessage':"Descrição local dos dados do cartão",
360 'recordDetailLoadingRecordVersionMessage':"Baixando a versão mais recente do cartão", 357 'recordDetailLoadingRecordVersionMessage':"Baixando a versão mais recente do cartão",
361 'recordDetailDecryptingRecordVersionMessage':"Descrição local da versão mais recente", 358 'recordDetailDecryptingRecordVersionMessage':"Descrição local da versão mais recente",
362 'recordDetailLoadingErrorMessageTitle':"Erro enquanto baixando o cartão", 359 'recordDetailLoadingErrorMessageTitle':"Erro enquanto baixando o cartão",
363 'recordDetailNotesLabel':"Notas", 360 'recordDetailNotesLabel':"Notas",
364 'recordDetailLabelFieldColumnLabel':"Legenda do campo", 361 'recordDetailLabelFieldColumnLabel':"Legenda do campo",
365 'recordDetailDataFieldColumnLabel':"Dados do campo", 362 'recordDetailDataFieldColumnLabel':"Dados do campo",
366 'recordDetailTypeFieldColumnLabel':"Tipo", 363 'recordDetailTypeFieldColumnLabel':"Tipo",
367 'recordDetailSavingChangesMessagePanelInitialTitle':"Salvando cartão", 364 'recordDetailSavingChangesMessagePanelInitialTitle':"Salvando cartão",
368 'recordDetailAddFieldButtonLabel':"Adicionar novo campo", 365 'recordDetailAddFieldButtonLabel':"Adicionar novo campo",
369 'recordDetailPasswordFieldHelpLabel':"para copiar a senha para o clipboard clique nas estrelas e em seguida Ctrl-C", 366 'recordDetailPasswordFieldHelpLabel':"para copiar a senha para o clipboard clique nas estrelas e em seguida Ctrl-C",
370 'recordDetailPasswordFieldScrambleLabel':"misturar", 367 'recordDetailPasswordFieldScrambleLabel':"misturar",
371 'recordDetailPasswordFieldUnscrambleLabel':"mostrar", 368 'recordDetailPasswordFieldUnscrambleLabel':"mostrar",
372 'recordDetailDirectLoginBlockTitle':"Logins diretos", 369 'recordDetailDirectLoginBlockTitle':"Logins diretos",
373 'recordDetailNewDirectLoginDescription':"<p>Configuração de login direto</p> ", 370 'recordDetailNewDirectLoginDescription':"<p>Configuração de login direto</p> ",
374 'recordDetailDirectLoginBlockNoDirectLoginConfiguredDescriptionConfig':"<p>Este cartão contém credenciais para acessar um serviço online?</p> <p>Use o bookmarklet para configurar um “login direto” desde o Clipperz com apenas um click!</p> ", 371 'recordDetailDirectLoginBlockNoDirectLoginConfiguredDescriptionConfig':"<p>Este cartão contém credenciais para acessar um serviço online?</p> <p>Use o bookmarklet para configurar um “login direto” desde o Clipperz com apenas um click!</p> ",
375 'recordDetailAddNewDirectLoginButtonLabel':"Adicionar novo login direto", 372 'recordDetailAddNewDirectLoginButtonLabel':"Adicionar novo login direto",
376 'recordDetailEditButtonLabel':"Editar", 373 'recordDetailEditButtonLabel':"Editar",
377 'recordDetailSaveButtonLabel':"Salvar", 374 'recordDetailSaveButtonLabel':"Salvar",
378 'recordDetailCancelButtonLabel':"Cancelar", 375 'recordDetailCancelButtonLabel':"Cancelar",
379 'newRecordTitleLabel':"_novo cartão_", 376 'newRecordTitleLabel':"_novo cartão_",
380 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"Salvar cartão", 377 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"Salvar cartão",
381 'recordSaveChangesPanelCollectRecordInfoMessageText':"Subindo cabeçalhos de cartão", 378 'recordSaveChangesPanelCollectRecordInfoMessageText':"Subindo cabeçalhos de cartão",
382 'recordSaveChangesPanelEncryptUserDataMessageTitle':"Salvar cartão", 379 'recordSaveChangesPanelEncryptUserDataMessageTitle':"Salvar cartão",
383 'recordSaveChangesPanelEncryptUserDataMessageText':"Codificação local do cabeçalho do cartão", 380 'recordSaveChangesPanelEncryptUserDataMessageText':"Codificação local do cabeçalho do cartão",
384 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"Salvar cartão", 381 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"Salvar cartão",
385 'recordSaveChangesPanelEncryptRecordDataMessageText':"Codificação local da informação do cartão", 382 'recordSaveChangesPanelEncryptRecordDataMessageText':"Codificação local da informação do cartão",
386 'recordSaveChangesPanelEncryptRecordVersionDataMessageTitle':"Salvar cartão", 383 'recordSaveChangesPanelEncryptRecordVersionDataMessageTitle':"Salvar cartão",
387 'recordSaveChangesPanelEncryptRecordVersionDataMessageText':"Codificação local da informação de versão do cartão", 384 'recordSaveChangesPanelEncryptRecordVersionDataMessageText':"Codificação local da informação de versão do cartão",
388 'recordSaveChangesPanelSendingDataToTheServerMessageTitle':"Salvar cartão", 385 'recordSaveChangesPanelSendingDataToTheServerMessageTitle':"Salvar cartão",
389 'recordSaveChangesPanelSendingDataToTheServerMessageText':"Subindo o cabeçalho do cartão codificado para Clipperz", 386 'recordSaveChangesPanelSendingDataToTheServerMessageText':"Subindo o cabeçalho do cartão codificado para Clipperz",
390 'recordSaveChangesPanelUpdatingTheInterfaceMessageTitle':"Salvar cartão", 387 'recordSaveChangesPanelUpdatingTheInterfaceMessageTitle':"Salvar cartão",
391 'recordSaveChangesPanelUpdatingTheInterfaceMessageText':"Atualizando a interface", 388 'recordSaveChangesPanelUpdatingTheInterfaceMessageText':"Atualizando a interface",
392 'passwordGeneratorPanelTitle':"Gerador de senhas", 389 'passwordGeneratorPanelTitle':"Gerador de senhas",
393 'passwordGeneratorPanelOkLabel':"Ok", 390 'passwordGeneratorPanelOkLabel':"Ok",
394 'passwordGeneratorPanelCancelLabel':"Cancelar", 391 'passwordGeneratorPanelCancelLabel':"Cancelar",
395 'passwordGeneratorLengthLabel':"compr.:", 392 'passwordGeneratorLengthLabel':"compr.:",
396 //'DWRUtilLoadingMessage':"Carregando ...", 393 //'DWRUtilLoadingMessage':"Carregando ...",
397 'comingSoon':"em breve ...", 394 'comingSoon':"em breve ...",
398 'panelCollectingEntryopyMessageText':"Coletando entropia", 395 'panelCollectingEntryopyMessageText':"Coletando entropia",
399 'directLoginConfigurationCheckBoxFieldSelectedValue':"Sim", 396 'directLoginConfigurationCheckBoxFieldSelectedValue':"Sim",
400 'directLoginConfigurationCheckBoxFieldNotSelectedValue':"Não", 397 'directLoginConfigurationCheckBoxFieldNotSelectedValue':"Não",
401 'WELCOME_BACK':"Welcome back!", 398 'WELCOME_BACK':"Welcome back!",
402 'currentConnectionText':"Você está conectado do ip&nbsp;__ip__, aparentemente desde __country__, usando __browser__ num __operatingSystem__.", 399 'currentConnectionText':"Você está conectado do ip&nbsp;__ip__, aparentemente desde __country__, usando __browser__ num __operatingSystem__.",
403 'latestConnectionText':"Sua úlitima conexão foi __elapsedTimeDescription__ (__time__) do ip&nbsp;__ip__, aparentemente desde __country__, usando __browser__ num __operatingSystem__.", 400 'latestConnectionText':"Sua úlitima conexão foi __elapsedTimeDescription__ (__time__) do ip&nbsp;__ip__, aparentemente desde __country__, usando __browser__ num __operatingSystem__.",
404 'fullLoginHistoryLinkLabel':"mostrar o histórico de logins completos", 401 'fullLoginHistoryLinkLabel':"mostrar o histórico de logins completos",
405 'elapsedTimeDescriptions':{ 402 'elapsedTimeDescriptions':{
406 'MORE_THAN_A_MONTH_AGO':"mais de um mês atrás", 403 'MORE_THAN_A_MONTH_AGO':"mais de um mês atrás",
407 'MORE_THAN_A_WEEK_AGO':"mais de uma semana atrás", 404 'MORE_THAN_A_WEEK_AGO':"mais de uma semana atrás",
408 'MORE_THAN_*_WEEKS_AGO':"mais de __elapsed__ semanas atrás", 405 'MORE_THAN_*_WEEKS_AGO':"mais de __elapsed__ semanas atrás",
diff --git a/frontend/beta/js/Clipperz/PM/Strings/Strings_pt-PT.js b/frontend/beta/js/Clipperz/PM/Strings/Strings_pt-PT.js
index 5284683..7930852 100644
--- a/frontend/beta/js/Clipperz/PM/Strings/Strings_pt-PT.js
+++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_pt-PT.js
@@ -1,42 +1,39 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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//============================================================================= 26//=============================================================================
30// 27//
31 // P O R T U G U Ê S ( pt_PT ) 28 // P O R T U G U Ê S ( pt_PT )
32// 29//
33//============================================================================= 30//=============================================================================
34 31
35Clipperz.PM.Strings.Languages['pt-pt'] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['pt-br'], { 32Clipperz.PM.Strings.Languages['pt-pt'] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['pt-br'], {
36 33
37 34
38 35
39 //------------------------------------------------------------------------- 36 //-------------------------------------------------------------------------
40 __syntaxFix__: "syntax fix" 37 __syntaxFix__: "syntax fix"
41}); 38});
42 39
diff --git a/frontend/beta/js/Clipperz/PM/Strings/Strings_ru-RU.js b/frontend/beta/js/Clipperz/PM/Strings/Strings_ru-RU.js
index 36975d3..547dcc8 100644
--- a/frontend/beta/js/Clipperz/PM/Strings/Strings_ru-RU.js
+++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_ru-RU.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29Clipperz.PM.Strings.Languages['ru-RU'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 26Clipperz.PM.Strings.Languages['ru-RU'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], {
30 'clipperzServiceDescription':"<h2>Держи всегда при себе!</h2> <ul> <li> <h3>Clipperz - это:</h3> <ul> <li> <p>безопасный и простой менеджер паролей</p> </li> <li> <p>эффективное решение для единой регистрации</p> </li> <li> <p>цифровое хранилище ваших конфиденциальных данных</p> </li> </ul> </li> <li>\ 27 'clipperzServiceDescription':"<h2>Держи всегда при себе!</h2> <ul> <li> <h3>Clipperz - это:</h3> <ul> <li> <p>безопасный и простой менеджер паролей</p> </li> <li> <p>эффективное решение для единой регистрации</p> </li> <li> <p>цифровое хранилище ваших конфиденциальных данных</p> </li> </ul> </li> <li>\
31 <h3>C помощью Clipperz вы можете:</h3> <ul>\ 28 <h3>C помощью Clipperz вы можете:</h3> <ul>\
32 <li> <p>хранить и управлять вашими паролями</p> </li> <li> <p>входить в любые веб-сервисы без ввода логина и пароля</p> </li> <li> <p>защитить все важные данные: коды охранной сигнализации, PINы, номера кредитных карт, и пр.</p> </li> <li> <p>открыть доступ к паролям вашим членам семьи, друзьям, коллегам</p> </li> </ul> </li> <li>\ 29 <li> <p>хранить и управлять вашими паролями</p> </li> <li> <p>входить в любые веб-сервисы без ввода логина и пароля</p> </li> <li> <p>защитить все важные данные: коды охранной сигнализации, PINы, номера кредитных карт, и пр.</p> </li> <li> <p>открыть доступ к паролям вашим членам семьи, друзьям, коллегам</p> </li> </ul> </li> <li>\
33 <h3>Преимущества Clipperz:</h3> <ul>\ 30 <h3>Преимущества Clipperz:</h3> <ul>\
34 <li> <p>бесплатный и абсолютно анонимный</p> </li> <li> <p>доступен в любое время и с любого компьютера</p> </li> <li> <p>не нужно ничего устанавливать</p> </li> <li> <p>не надо хранить секреты на компьютере или бумаге</p> </li> </ul> </li> <li>\ 31 <li> <p>бесплатный и абсолютно анонимный</p> </li> <li> <p>доступен в любое время и с любого компьютера</p> </li> <li> <p>не нужно ничего устанавливать</p> </li> <li> <p>не надо хранить секреты на компьютере или бумаге</p> </li> </ul> </li> <li>\
35 <h3>Безопасность Clipperz:</h3> <ul>\ 32 <h3>Безопасность Clipperz:</h3> <ul>\
36 <li> <p>все данные перед отправкой в Clipperz шифруются в браузере</p> </li> <li> <p>пароль знаете только вы</p> </li> <li> <p>Clipperz управляет важными данными в зашифрованном виде и никогда не получит доступ к ним в открытом виде</p> </li> <li> <p>Clipperz основан на стандартных криптографических протоколах: без каких-либо самоделок</p> </li> <li> <p>вы можете просмотреть исходный код, но вам ничего не надо знать о криптографии, чтобы просто использовать его!</p> </li> </ul> </li> <li>\ 33 <li> <p>все данные перед отправкой в Clipperz шифруются в браузере</p> </li> <li> <p>пароль знаете только вы</p> </li> <li> <p>Clipperz управляет важными данными в зашифрованном виде и никогда не получит доступ к ним в открытом виде</p> </li> <li> <p>Clipperz основан на стандартных криптографических протоколах: без каких-либо самоделок</p> </li> <li> <p>вы можете просмотреть исходный код, но вам ничего не надо знать о криптографии, чтобы просто использовать его!</p> </li> </ul> </li> <li>\
37 <a href=\"http://www.clipperz.com\" target=\"_blank\">Подробнее</a> </li> </ul> ", 34 <a href=\"http://www.clipperz.com\" target=\"_blank\">Подробнее</a> </li> </ul> ",
38 'loginFormTitle':"войти в аккаунт Clipperz", 35 'loginFormTitle':"войти в аккаунт Clipperz",
39 'loginFormUsernameLabel':"логин", 36 'loginFormUsernameLabel':"логин",
40 'loginFormPassphraseLabel':"пароль", 37 'loginFormPassphraseLabel':"пароль",
41 'loginFormDontHaveAnAccountLabel':"у вас еще нет аккаунта?", 38 'loginFormDontHaveAnAccountLabel':"у вас еще нет аккаунта?",
42 'loginFormCreateOneLabel':"создать сейчас", 39 'loginFormCreateOneLabel':"создать сейчас",
43 'loginFormForgotYourCredentialsLabel':"забыли пароль?", 40 'loginFormForgotYourCredentialsLabel':"забыли пароль?",
44 'loginFormAarghThatsBadLabel':"это плохо!", 41 'loginFormAarghThatsBadLabel':"это плохо!",
45 'loginFormAfraidOfMaliciousScriptsLabel':"опасаетесь вредоносных скриптов?", 42 'loginFormAfraidOfMaliciousScriptsLabel':"опасаетесь вредоносных скриптов?",
46 'loginFormVerifyTheCodeLabel':"проверить", 43 'loginFormVerifyTheCodeLabel':"проверить",
47 'loginFormButtonLabel':"Войти", 44 'loginFormButtonLabel':"Войти",
48 'loginFormOneTimePasswordCheckboxLabel':"использовать одноразовый пароль", 45 'loginFormOneTimePasswordCheckboxLabel':"использовать одноразовый пароль",
49 'loginPanelSwithLanguageDescription':"<h5>Переключить язык</h5> ", 46 'loginPanelSwithLanguageDescription':"<h5>Переключить язык</h5> ",
50 'browserCompatibilityDescription':"<p>Clipperz адаптирован для Firefox. Но также совместим с Opera и MS Internet Explorer!</p> ", 47 'browserCompatibilityDescription':"<p>Clipperz адаптирован для Firefox. Но также совместим с Opera и MS Internet Explorer!</p> ",
51 'OTPloginMessagePanelInitialTitle':"Вход", 48 'OTPloginMessagePanelInitialTitle':"Вход",
52 'OTPloginMessagePanelInitialText':"Передача данных учетной записи ...", 49 'OTPloginMessagePanelInitialText':"Передача данных учетной записи ...",
53 'OTPloginMessagePanelLoadingTitle':"Вход", 50 'OTPloginMessagePanelLoadingTitle':"Вход",
54 'OTPloginMessagePanelLoadingText':"Запрос аутентификационных данных с сервера ...", 51 'OTPloginMessagePanelLoadingText':"Запрос аутентификационных данных с сервера ...",
55 'OTPloginMessagePanelProcessingTitle':"Вход", 52 'OTPloginMessagePanelProcessingTitle':"Вход",
56 'OTPloginMessagePanelProcessingText':"Расшифровка аутентификационных данных", 53 'OTPloginMessagePanelProcessingText':"Расшифровка аутентификационных данных",
57 'loginMessagePanelInitialTitle':"Вход ...", 54 'loginMessagePanelInitialTitle':"Вход ...",
58 'loginMessagePanelInitialButtonLabel':"Отмена", 55 'loginMessagePanelInitialButtonLabel':"Отмена",
59 'loginMessagePanelConnectedTitle':"Соединен", 56 'loginMessagePanelConnectedTitle':"Соединен",
60 'loginMessagePanelConnectedText':"Выполнен", 57 'loginMessagePanelConnectedText':"Выполнен",
61 'loginMessagePanelFailureTitle':"Ошибка", 58 'loginMessagePanelFailureTitle':"Ошибка",
62 'loginMessagePanelFailureText':"Ошибка при попытке входа", 59 'loginMessagePanelFailureText':"Ошибка при попытке входа",
63 'loginMessagePanelFailureButtonLabel':"Закрыть", 60 'loginMessagePanelFailureButtonLabel':"Закрыть",
64 'connectionLoginSendingCredentialsMessageTitle':"Проверка учетной записи", 61 'connectionLoginSendingCredentialsMessageTitle':"Проверка учетной записи",
65 'connectionLoginSendingCredentialsMessageText':"Передача данных ...", 62 'connectionLoginSendingCredentialsMessageText':"Передача данных ...",
66 'connectionLoginCredentialsVerificationMessageTitle':"Проверка учетной записи", 63 'connectionLoginCredentialsVerificationMessageTitle':"Проверка учетной записи",
67 'connectionLoginCredentialsVerificationMessageText':"Выполняем SRP-аутентификацию ...", 64 'connectionLoginCredentialsVerificationMessageText':"Выполняем SRP-аутентификацию ...",
68 'connectionLoginDoneMessageTitle':"Проверка учетной записи", 65 'connectionLoginDoneMessageTitle':"Проверка учетной записи",
69 'connectionLoginDoneMessageText':"Соединено", 66 'connectionLoginDoneMessageText':"Соединено",
70 'userLoginPanelUpgradingUserCredentialsMessageTitle':"Проверка учетной записи", 67 'userLoginPanelUpgradingUserCredentialsMessageTitle':"Проверка учетной записи",
71 'userLoginPanelUpgradingUserCredentialsMessageText':"Обновляем полномочия к новой схеме аутентификации", 68 'userLoginPanelUpgradingUserCredentialsMessageText':"Обновляем полномочия к новой схеме аутентификации",
72 'userLoginPanelConnectedMessageTitle':"Пользователь аутентифицирован", 69 'userLoginPanelConnectedMessageTitle':"Пользователь аутентифицирован",
73 'userLoginPanelConnectedMessageText':"Успешный вход", 70 'userLoginPanelConnectedMessageText':"Успешный вход",
74 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"Проверка учетной записи", 71 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"Проверка учетной записи",
75 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"Пробуем войти по старой схеме", 72 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"Пробуем войти по старой схеме",
76 'userLoginPanelLoadingUserDataMessageTitle':"Пользователь аутентифицирован", 73 'userLoginPanelLoadingUserDataMessageTitle':"Пользователь аутентифицирован",
77 'userLoginPanelLoadingUserDataMessageText':"Загрузка зашифрованных заголовков карточек", 74 'userLoginPanelLoadingUserDataMessageText':"Загрузка зашифрованных заголовков карточек",
78 'userLoginPanelDecryptingUserDataMessageTitle':"Пользователь аутентифицирован", 75 'userLoginPanelDecryptingUserDataMessageTitle':"Пользователь аутентифицирован",
79 'userLoginPanelDecryptingUserDataMessageText':"Расшифровка заголовков карточек", 76 'userLoginPanelDecryptingUserDataMessageText':"Расшифровка заголовков карточек",
80 'userLoginPanelDecryptingUserStatisticsMessageTitle':"Пользователь аутентифицирован", 77 'userLoginPanelDecryptingUserStatisticsMessageTitle':"Пользователь аутентифицирован",
81 'userLoginPanelDecryptingUserStatisticsMessageText':"Расшифровка статистики", 78 'userLoginPanelDecryptingUserStatisticsMessageText':"Расшифровка статистики",
82 'splashAlertTitle':"Добро пожаловать в Clipperz!", 79 'splashAlertTitle':"Добро пожаловать в Clipperz!",
83 'splashAlertText':"<p>Несколько советов по безопасности:</p> <ul> <li> <p>Хранение данных в Clipperz зависит от того, насколько безопасен выбранный вами пароль</p> </li> <li> <p>Если собираетесь использовать Clipperz для защиты важных или критических данных, то убедитесь, что выбрали сложный пароль</p> </li> <li> <p>Clipperz не сможет восстановить забытый пароль</p> </li> </ul> <p>За дополнительной информацией обратитесь на <a href=\"http://www.clipperz.com\" target=\"_blank\">сайт</a> Clipperz.</p> ", 80 'splashAlertText':"<p>Несколько советов по безопасности:</p> <ul> <li> <p>Хранение данных в Clipperz зависит от того, насколько безопасен выбранный вами пароль</p> </li> <li> <p>Если собираетесь использовать Clipperz для защиты важных или критических данных, то убедитесь, что выбрали сложный пароль</p> </li> <li> <p>Clipperz не сможет восстановить забытый пароль</p> </li> </ul> <p>За дополнительной информацией обратитесь на <a href=\"http://www.clipperz.com\" target=\"_blank\">сайт</a> Clipperz.</p> ",
84 'splashAlertCloseButtonLabel':"OK", 81 'splashAlertCloseButtonLabel':"OK",
85 'registrationFormTitle':"создать аккаунт", 82 'registrationFormTitle':"создать аккаунт",
86 'registrationFormUsernameLabel':"имя пользователя", 83 'registrationFormUsernameLabel':"имя пользователя",
87 'registrationFormPassphraseLabel':"пароль", 84 'registrationFormPassphraseLabel':"пароль",
88 'registrationFormRetypePassphraseLabel':"повторите пароль", 85 'registrationFormRetypePassphraseLabel':"повторите пароль",
89 'registrationFormSafetyCheckLabel':"Я понимаю, что Clipperz не сможет восстановить забытый пароль", 86 'registrationFormSafetyCheckLabel':"Я понимаю, что Clipperz не сможет восстановить забытый пароль",
90 'registrationFormTermsOfServiceCheckLabel':"Я прочитал и согласен с <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Условиями предоставления услуг</a>.", 87 'registrationFormTermsOfServiceCheckLabel':"Я прочитал и согласен с <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Условиями предоставления услуг</a>.",
91 'registrationFormDoYouAlreadyHaveAnAccountLabel':"у вас уже есть аккаунт?", 88 'registrationFormDoYouAlreadyHaveAnAccountLabel':"у вас уже есть аккаунт?",
92 'registrationFormSimplyLoginLabel':"просто авторизируйтесь", 89 'registrationFormSimplyLoginLabel':"просто авторизируйтесь",
93 'registrationFormButtonLabel':"Зарегистрировать", 90 'registrationFormButtonLabel':"Зарегистрировать",
94 'registrationFormWarningMessageNotMatchingPassphrases':"Пароли не совпадают, пожайлуста, повторите ввод", 91 'registrationFormWarningMessageNotMatchingPassphrases':"Пароли не совпадают, пожайлуста, повторите ввод",
95 'registrationFormWarningMessageSafetyCheckNotSelected':"Прочитайте и проверьте все поля ниже", 92 'registrationFormWarningMessageSafetyCheckNotSelected':"Прочитайте и проверьте все поля ниже",
96 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"Вы должны принять Условия предоставления услуг", 93 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"Вы должны принять Условия предоставления услуг",
97 'registrationMessagePanelInitialTitle':"Создание аккаунта", 94 'registrationMessagePanelInitialTitle':"Создание аккаунта",
98 'registrationMessagePanelInitialButtonLabel':"Отмена", 95 'registrationMessagePanelInitialButtonLabel':"Отмена",
99 'registrationMessagePanelRegistrationDoneTitle':"Регистрация", 96 'registrationMessagePanelRegistrationDoneTitle':"Регистрация",
100 'registrationMessagePanelRegistrationDoneText':"Выполнено", 97 'registrationMessagePanelRegistrationDoneText':"Выполнено",
101 'registrationMessagePanelFailureTitle':"Ошибка регистрации", 98 'registrationMessagePanelFailureTitle':"Ошибка регистрации",
102 'registrationMessagePanelFailureButtonLabel':"Закрыть", 99 'registrationMessagePanelFailureButtonLabel':"Закрыть",
103 'connectionRegistrationSendingRequestMessageText':"Проверка учетной записи", 100 'connectionRegistrationSendingRequestMessageText':"Проверка учетной записи",
104 'connectionRegistrationSendingCredentialsMessageText':"Передача данных", 101 'connectionRegistrationSendingCredentialsMessageText':"Передача данных",
105 'registrationSplashPanelTitle':"Совет", 102 'registrationSplashPanelTitle':"Совет",
106 'registrationSplashPanelDescription':"<p>Это ваши данные учетной записи, позаботесь об их безопасности. Clipperz никогда больше не покажет ваш логин и пароль!</p> ", 103 'registrationSplashPanelDescription':"<p>Это ваши данные учетной записи, позаботесь об их безопасности. Clipperz никогда больше не покажет ваш логин и пароль!</p> ",
107 'registrationSplashPanelUsernameLabel':"имя пользователя", 104 'registrationSplashPanelUsernameLabel':"имя пользователя",
108 'registrationSplashPanelPassphraseLabel':"пароль", 105 'registrationSplashPanelPassphraseLabel':"пароль",
109 'registrationSplashPanelShowPassphraseButtonLabel':"показать пароль", 106 'registrationSplashPanelShowPassphraseButtonLabel':"показать пароль",
110 'donateHeaderLinkLabel':"помочь проекту", 107 'donateHeaderLinkLabel':"помочь проекту",
111 'creditsHeaderLinkLabel':"авторы", 108 'creditsHeaderLinkLabel':"авторы",
112 'feedbackHeaderLinkLabel':"обратная связь", 109 'feedbackHeaderLinkLabel':"обратная связь",
113 'helpHeaderLinkLabel':"помощь", 110 'helpHeaderLinkLabel':"помощь",
114 'forumHeaderLinkLabel':"форум", 111 'forumHeaderLinkLabel':"форум",
115 'recordMenuLabel':"карточки", 112 'recordMenuLabel':"карточки",
116 'accountMenuLabel':"аккаунт", 113 'accountMenuLabel':"аккаунт",
117 'dataMenuLabel':"данные", 114 'dataMenuLabel':"данные",
118 'contactsMenuLabel':"контакты", 115 'contactsMenuLabel':"контакты",
119 'toolsMenuLabel':"инструменты", 116 'toolsMenuLabel':"инструменты",
120 'logoutMenuLabel':"выход", 117 'logoutMenuLabel':"выход",
121 'lockMenuLabel':"заблокировать", 118 'lockMenuLabel':"заблокировать",
122 'lockTitle':"Аккаунт заблокирован", 119 'lockTitle':"Аккаунт заблокирован",
123 'lockDescription':"<p>Введите пароль для разблокировки</p> ", 120 'lockDescription':"<p>Введите пароль для разблокировки</p> ",
124 'unlockButtonLabel':"разблокировать", 121 'unlockButtonLabel':"разблокировать",
125 'changePasswordTabLabel':"Изменить пароль", 122 'changePasswordTabLabel':"Изменить пароль",
126 'changePasswordTabTitle':"Изменить пароль", 123 'changePasswordTabTitle':"Изменить пароль",
127 'changePasswordFormUsernameLabel':"логин", 124 'changePasswordFormUsernameLabel':"логин",
128 'changePasswordFormOldPassphraseLabel':"старый пароль", 125 'changePasswordFormOldPassphraseLabel':"старый пароль",
129 'changePasswordFormNewPassphraseLabel':"новый пароль", 126 'changePasswordFormNewPassphraseLabel':"новый пароль",
130 'changePasswordFormRetypePassphraseLabel':"повторите пароль", 127 'changePasswordFormRetypePassphraseLabel':"повторите пароль",
131 'changePasswordFormSafetyCheckboxLabel':"Я понимаю, что Clipperz не сможет восстановить забытый пароль.", 128 'changePasswordFormSafetyCheckboxLabel':"Я понимаю, что Clipperz не сможет восстановить забытый пароль.",
132 'changePasswordFormSubmitLabel':"Изменить", 129 'changePasswordFormSubmitLabel':"Изменить",
133 'changePasswordFormWrongUsernameWarning':"Неправильный логин", 130 'changePasswordFormWrongUsernameWarning':"Неправильный логин",
134 'changePasswordFormWrongPassphraseWarning':"Неверный пароль", 131 'changePasswordFormWrongPassphraseWarning':"Неверный пароль",
135 'changePasswordFormWrongRetypePassphraseWarning':"Пароли не совпадают, пожайлуста, повторите ввод.", 132 'changePasswordFormWrongRetypePassphraseWarning':"Пароли не совпадают, пожайлуста, повторите ввод.",
136 'changePasswordFormSafetyCheckWarning':"Прочитайте и проверьте все поля ниже.", 133 'changePasswordFormSafetyCheckWarning':"Прочитайте и проверьте все поля ниже.",
137 'changePasswordFormProgressDialogTitle':"Изменение учетной записи", 134 'changePasswordFormProgressDialogTitle':"Изменение учетной записи",
138 'changePasswordFormProgressDialogConnectedMessageTitle':"Соединено", 135 'changePasswordFormProgressDialogConnectedMessageTitle':"Соединено",
139 'changePasswordFormProgressDialogConnectedMessageText':"Выполнено", 136 'changePasswordFormProgressDialogConnectedMessageText':"Выполнено",
140 'changePasswordFormProgressDialogErrorMessageTitle':"Ошибка", 137 'changePasswordFormProgressDialogErrorMessageTitle':"Ошибка",
141 'changePasswordFormProgressDialogErrorMessageText':"Ошибка изменения учетной записи!", 138 'changePasswordFormProgressDialogErrorMessageText':"Ошибка изменения учетной записи!",
142 'changeCredentialsPanelEncryptingDataMessageTitle':"Изменение пароля", 139 'changeCredentialsPanelEncryptingDataMessageTitle':"Изменение пароля",
143 'changeCredentialsPanelEncryptingDataMessageText':"Шифрование заголовков карточек", 140 'changeCredentialsPanelEncryptingDataMessageText':"Шифрование заголовков карточек",
144 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"Изменение пароля", 141 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"Изменение пароля",
145 'changeCredentialsPanelCreatingNewCredentialsMessageText':"Обновление учетной записи", 142 'changeCredentialsPanelCreatingNewCredentialsMessageText':"Обновление учетной записи",
146 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Изменение пароля", 143 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Изменение пароля",
147 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Загрузка данных учетной записи в Clipperz", 144 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Загрузка данных учетной записи в Clipperz",
148 'changeCredentialsPanelDoneMessageTitle':"Изменение пароля", 145 'changeCredentialsPanelDoneMessageTitle':"Изменение пароля",
149 'changeCredentialsPanelDoneMessageText':"Выполнено", 146 'changeCredentialsPanelDoneMessageText':"Выполнено",
150 'manageOTPTabLabel':"Управление одноразовыми паролями", 147 'manageOTPTabLabel':"Управление одноразовыми паролями",
151 'manageOTPTabTitle':"Управление одноразовыми паролями", 148 'manageOTPTabTitle':"Управление одноразовыми паролями",
152 'manageOTPTabDescription':"<p>Одноразовый пароль работает так же, как ваш обычный пароль, но может быть использован только один раз.</p> <p>Если один и тот же пароль будет использоваться снова, он будет отклонен при попытке войти.</p> <p>Сразу после входа одноразовый пароль будет удален, чтобы предотвратить любую несанкционированную попытку доступа.</p> <p>Одноразовые пароли - удачный выбор для тех, кто обеспокоен кейлоггерами или spyware, которые могут украсть пароль.</p> <p> <b>Строго рекомендуется использовать одноразовые пароли для доступа к Clipperz с чужих компьютеров, интернет-кафе и компьютеров общего пользования.</b> </p> ", 149 'manageOTPTabDescription':"<p>Одноразовый пароль работает так же, как ваш обычный пароль, но может быть использован только один раз.</p> <p>Если один и тот же пароль будет использоваться снова, он будет отклонен при попытке войти.</p> <p>Сразу после входа одноразовый пароль будет удален, чтобы предотвратить любую несанкционированную попытку доступа.</p> <p>Одноразовые пароли - удачный выбор для тех, кто обеспокоен кейлоггерами или spyware, которые могут украсть пароль.</p> <p> <b>Строго рекомендуется использовать одноразовые пароли для доступа к Clipperz с чужих компьютеров, интернет-кафе и компьютеров общего пользования.</b> </p> ",
153 'oneTimePasswordReadOnlyMessage':"<h6>Извините!</h6> <p>Вы не можете управлять одноразовыми паролями в автономной версии Clipperz.</p> ", 150 'oneTimePasswordReadOnlyMessage':"<h6>Извините!</h6> <p>Вы не можете управлять одноразовыми паролями в автономной версии Clipperz.</p> ",
154 'oneTimePasswordLoadingMessage':"<h6>Загрузка данных</h6> <p>Подождите, пожайлуста ...</p> ", 151 'oneTimePasswordLoadingMessage':"<h6>Загрузка данных</h6> <p>Подождите, пожайлуста ...</p> ",
155 'oneTimePasswordNoPasswordAvailable':"<h6>Нет доступных одноразовых паролей.</h6> <p>Нажмите кнопку “Создать”, чтобы создать одноразовый пароль.</p> ", 152 'oneTimePasswordNoPasswordAvailable':"<h6>Нет доступных одноразовых паролей.</h6> <p>Нажмите кнопку “Создать”, чтобы создать одноразовый пароль.</p> ",
156 'createNewOTPButtonLabel':"создать", 153 'createNewOTPButtonLabel':"создать",
157 'deleteOTPButtonLabel':"удалить", 154 'deleteOTPButtonLabel':"удалить",
158 'printOTPButtonLabel':"печать", 155 'printOTPButtonLabel':"печать",
159 'disabledOneTimePassword_warning':"запрещено", 156 'disabledOneTimePassword_warning':"запрещено",
160 'oneTimePasswordSelectionLink_selectLabel':"Выбрать:", 157 'oneTimePasswordSelectionLink_selectLabel':"Выбрать:",
161 'oneTimePasswordSelectionLink_all':"все", 158 'oneTimePasswordSelectionLink_all':"все",
162 'oneTimePasswordSelectionLink_none':"ни одного", 159 'oneTimePasswordSelectionLink_none':"ни одного",
163 'oneTimePasswordSelectionLink_used':"использованные", 160 'oneTimePasswordSelectionLink_used':"использованные",
164 'oneTimePasswordSelectionLink_unused':"неиспользованные", 161 'oneTimePasswordSelectionLink_unused':"неиспользованные",
165 'saveOTP_encryptUserDataTitle':"Сохранение одноразовых паролей", 162 'saveOTP_encryptUserDataTitle':"Сохранение одноразовых паролей",
166 'saveOTP_encryptUserDataText':"Обработка новых данных учетной записи ...", 163 'saveOTP_encryptUserDataText':"Обработка новых данных учетной записи ...",
167 'saveOTP_encryptOTPDataTitle':"одноразовыми паролями", 164 'saveOTP_encryptOTPDataTitle':"одноразовыми паролями",
168 'saveOTP_encryptOTPDataText':"Шифрование аутентификационных данных ...", 165 'saveOTP_encryptOTPDataText':"Шифрование аутентификационных данных ...",
169 'saveOTP_sendingDataTitle':"одноразовыми паролями", 166 'saveOTP_sendingDataTitle':"одноразовыми паролями",
170 'saveOTP_sendingDataText':"Передача аутентификационных данных на сервер ...", 167 'saveOTP_sendingDataText':"Передача аутентификационных данных на сервер ...",
171 'saveOTP_updatingInterfaceTitle':"одноразовыми паролями", 168 'saveOTP_updatingInterfaceTitle':"одноразовыми паролями",
172 'saveOTP_updatingInterfaceText':"Обновление интерфейса ...", 169 'saveOTP_updatingInterfaceText':"Обновление интерфейса ...",
173 'accountPreferencesLabel':"Настройки", 170 'accountPreferencesLabel':"Настройки",
174 'accountPreferencesTabTitle':"Настройки", 171 'accountPreferencesTabTitle':"Настройки",
175 'accountPreferencesLanguageTitle':"Выбор языка", 172 'accountPreferencesLanguageTitle':"Выбор языка",
176 'accountPreferencesLanguageDescription':"<p>Выберите ваш язык из списка.</p> ", 173 'accountPreferencesLanguageDescription':"<p>Выберите ваш язык из списка.</p> ",
177 'showDonationReminderPanelTitle':"Напоминания о пожертвованиях", 174 'showDonationReminderPanelTitle':"Напоминания о пожертвованиях",
178 'showDonationReminderPanelDescription':"<p>Показывать напоминания о пожертвованиях</p> ", 175 'showDonationReminderPanelDescription':"<p>Показывать напоминания о пожертвованиях</p> ",
179 'saveUserPreferencesFormSubmitLabel':"Сохранить", 176 'saveUserPreferencesFormSubmitLabel':"Сохранить",
180 'cancelUserPreferencesFormSubmitLabel':"Отмена", 177 'cancelUserPreferencesFormSubmitLabel':"Отмена",
181 'accountPreferencesSavingPanelTitle_Step1':"Сохранение настроек", 178 'accountPreferencesSavingPanelTitle_Step1':"Сохранение настроек",
182 'accountPreferencesSavingPanelText_Step1':"Шифрование настроек", 179 'accountPreferencesSavingPanelText_Step1':"Шифрование настроек",
183 'accountPreferencesSavingPanelTitle_Step2':"Сохранение настроек", 180 'accountPreferencesSavingPanelTitle_Step2':"Сохранение настроек",
184 'accountPreferencesSavingPanelText_Step2':"Передача зашифрованных настроек в Clipperz", 181 'accountPreferencesSavingPanelText_Step2':"Передача зашифрованных настроек в Clipperz",
185 'accountLoginHistoryLabel':"История входов", 182 'accountLoginHistoryLabel':"История входов",
186 'loginHistoryTabTitle':"История входов", 183 'loginHistoryTabTitle':"История входов",
187 'loginHistoryReadOnlyMessage':"<h6>Извините!</h6> <p>История входов не доступна в автономной версии Clipperz.</p> ", 184 'loginHistoryReadOnlyMessage':"<h6>Извините!</h6> <p>История входов не доступна в автономной версии Clipperz.</p> ",
188 'loginHistoryLoadingMessage':"<h6>Загрузка данных</h6> <p>Подождите, пожайлуста ...</p> ", 185 'loginHistoryLoadingMessage':"<h6>Загрузка данных</h6> <p>Подождите, пожайлуста ...</p> ",
189 'loginHistoryLoadedMessage':"<h6>Здесь можно посмотреть информацию о последних авторизациях в Clipperz</h6> <p> </p> ", 186 'loginHistoryLoadedMessage':"<h6>Здесь можно посмотреть информацию о последних авторизациях в Clipperz</h6> <p> </p> ",
190 'loginHistoryIPLabel':"IP", 187 'loginHistoryIPLabel':"IP",
191 'loginHistoryTimeLabel':"дата", 188 'loginHistoryTimeLabel':"дата",
192 'loginHistoryCurrentSessionText':"текущая сессия", 189 'loginHistoryCurrentSessionText':"текущая сессия",
193 'loginHistoryReloadButtonLabel':"Обновить историю", 190 'loginHistoryReloadButtonLabel':"Обновить историю",
194 'deleteAccountTabLabel':"Удалить аккаунт", 191 'deleteAccountTabLabel':"Удалить аккаунт",
195 'deleteAccountTabTitle':"Удалить аккаунт", 192 'deleteAccountTabTitle':"Удалить аккаунт",
196 'deleteAccountFormUsernameLabel':"логин", 193 'deleteAccountFormUsernameLabel':"логин",
197 'deleteAccountFormPassphraseLabel':"пароль", 194 'deleteAccountFormPassphraseLabel':"пароль",
198 'deleteAccountFormSafetyCheckboxLabel':"Я понимаю, что все данные этого аккаунта будут безвозвратно удалены.", 195 'deleteAccountFormSafetyCheckboxLabel':"Я понимаю, что все данные этого аккаунта будут безвозвратно удалены.",
199 'deleteAccountFormSubmitLabel':"Удалить аккаунт", 196 'deleteAccountFormSubmitLabel':"Удалить аккаунт",
200 'deleteAccountFormWrongUsernameWarning':"Неверный логин", 197 'deleteAccountFormWrongUsernameWarning':"Неверный логин",
201 'deleteAccountFormWrongPassphraseWarning':"Неверный пароль", 198 'deleteAccountFormWrongPassphraseWarning':"Неверный пароль",
202 'deleteAccountFormSafetyCheckWarning':"Прочтите и отметьте все поля ниже.", 199 'deleteAccountFormSafetyCheckWarning':"Прочтите и отметьте все поля ниже.",
203 'accountPanelDeletingAccountPanelConfirmationTitle':"ВНИМАНИЕ", 200 'accountPanelDeletingAccountPanelConfirmationTitle':"ВНИМАНИЕ",
204 'accountPanelDeleteAccountPanelConfirmationText':"Вы уверены, что хотите удалить аккаунт? Операция необратима.", 201 'accountPanelDeleteAccountPanelConfirmationText':"Вы уверены, что хотите удалить аккаунт? Операция необратима.",
205 'accountPanelDeleteAccountPanelConfirmButtonLabel':"Да", 202 'accountPanelDeleteAccountPanelConfirmButtonLabel':"Да",
206 'accountPanelDeleteAccountPanelDenyButtonLabel':"Нет", 203 'accountPanelDeleteAccountPanelDenyButtonLabel':"Нет",
207 'offlineCopyTabLabel':"Автономная копия", 204 'offlineCopyTabLabel':"Автономная копия",
208 'offlineCopyTabTitle':"Автономная копия", 205 'offlineCopyTabTitle':"Автономная копия",
209 'offlineCopyTabDescription':"<p>Одним кликом вы можете сохранить все зашифрованные данные с серверов Clipperz на жесткий диск и создать автономную версию, которую будете использовать при отсутствии подключения к Интернету.</p> <p>Версия доступна только для чтения. Она так же безопасна, как и онлайн версия, и не подвергает ваши данные риску, так как использует тот же код и архитектуру.</p> <ol> <li> <p>Нажмите на ссылку ниже, чтобы загрузить ее.</p> </li> <li> <p>Браузер спросит вас, что сделать с файлом “Clipperz_YYYYMMDD.html”. Сохраните его на ваш жесткий диск.</p> </li> <li> <p>Запустите загруженную автономную версию в вашем браузере.</p> </li> <li> <p>Введите, как обычно, свой логин и пароль.</p> </li> </ol> ", 206 'offlineCopyTabDescription':"<p>Одним кликом вы можете сохранить все зашифрованные данные с серверов Clipperz на жесткий диск и создать автономную версию, которую будете использовать при отсутствии подключения к Интернету.</p> <p>Версия доступна только для чтения. Она так же безопасна, как и онлайн версия, и не подвергает ваши данные риску, так как использует тот же код и архитектуру.</p> <ol> <li> <p>Нажмите на ссылку ниже, чтобы загрузить ее.</p> </li> <li> <p>Браузер спросит вас, что сделать с файлом “Clipperz_YYYYMMDD.html”. Сохраните его на ваш жесткий диск.</p> </li> <li> <p>Запустите загруженную автономную версию в вашем браузере.</p> </li> <li> <p>Введите, как обычно, свой логин и пароль.</p> </li> </ol> ",
210 'offlineCopyDownloadLinkLabel':"Скачать", 207 'offlineCopyDownloadLinkLabel':"Скачать",
211 'offlineCopyDownloadWarning':"<h4> <a href=\"#\" id=\"offlineCopyDownloadWarningLink\">Обновите вашу автономную копию!</a> </h4> <p>Вы недавно создали или изменили одну или более карточек: рекомендуется скачать новую автономную копию.</p> ", 208 'offlineCopyDownloadWarning':"<h4> <a href=\"#\" id=\"offlineCopyDownloadWarningLink\">Обновите вашу автономную копию!</a> </h4> <p>Вы недавно создали или изменили одну или более карточек: рекомендуется скачать новую автономную копию.</p> ",
212 'sharingTabLabel':"Совместное использование", 209 'sharingTabLabel':"Совместное использование",
213 'sharingTabTitle':"Совместное использование", 210 'sharingTabTitle':"Совместное использование",
214 'sharingTabDescription':"<p>Достаточно часто конфиденциальную информацию нужно предоставить другим людям.</p> <p>Может быть, просто дать коллеге ключ доступа к вашей почте, когда вас нету в офисе, или даже открыть доступ наследникам к вашему счету в местном банке, на случай, если с вами что-нибудь случится.</p> <p>Clipperz поможет сделать совместное использование ваших секретов безопасной и простой процедурой.</p> <p> </p> <p> <b>Раздел в разработке...</b> </p> ", 211 'sharingTabDescription':"<p>Достаточно часто конфиденциальную информацию нужно предоставить другим людям.</p> <p>Может быть, просто дать коллеге ключ доступа к вашей почте, когда вас нету в офисе, или даже открыть доступ наследникам к вашему счету в местном банке, на случай, если с вами что-нибудь случится.</p> <p>Clipperz поможет сделать совместное использование ваших секретов безопасной и простой процедурой.</p> <p> </p> <p> <b>Раздел в разработке...</b> </p> ",
215 'importTabLabel':"Импорт", 212 'importTabLabel':"Импорт",
216 'importTabTitle':"Импорт", 213 'importTabTitle':"Импорт",
217 'importTabDescription':"<p>Вы можете импортировать данные целиком, в ваш аккаунт Clipperz, из файлов различных форматов.</p>", 214 'importTabDescription':"<p>Вы можете импортировать данные целиком, в ваш аккаунт Clipperz, из файлов различных форматов.</p>",
218 'printingTabLabel':"Экспорт", 215 'printingTabLabel':"Экспорт",
219 'printingTabTitle':"Экспорт", 216 'printingTabTitle':"Экспорт",
220 'printingTabDescription':"<p> <b>Печать ваших данных</b> </p> <p>Нажмите по ссылке, чтобы открыть новое окно со всеми вашими карточками для печати.</p> <p>Если вы собираетесь распечатать в резервных целях, пожалуйста, рассмотрите более безопасный вариант, как создание “автономной копии”.</p> ", 217 'printingTabDescription':"<p> <b>Печать ваших данных</b> </p> <p>Нажмите по ссылке, чтобы открыть новое окно со всеми вашими карточками для печати.</p> <p>Если вы собираетесь распечатать в резервных целях, пожалуйста, рассмотрите более безопасный вариант, как создание “автономной копии”.</p> ",
221 'printingLinkLabel':"Версия для печати", 218 'printingLinkLabel':"Версия для печати",
222 'contactsTabLabel':"Контакты", 219 'contactsTabLabel':"Контакты",
223 'contactsTabTitle':"Контакты", 220 'contactsTabTitle':"Контакты",
224 'passwordGeneratorTabLabel':"Генератор паролей", 221 'passwordGeneratorTabLabel':"Генератор паролей",
225 'passwordGeneratorTabTitle':"Генератор паролей", 222 'passwordGeneratorTabTitle':"Генератор паролей",
226 'passwordGeneratorTabButtonLabel':"сгенерировать", 223 'passwordGeneratorTabButtonLabel':"сгенерировать",
227 'bookmarkletTabLabel':"Букмарклет", 224 'bookmarkletTabLabel':"Букмарклет",
228 'bookmarkletTabTitle':"Букмарклет", 225 'bookmarkletTabTitle':"Букмарклет",
229 'bookmarkletTabDescription':"<p>Букмарклет - это простой инструмент, который помещается в браузер, как обычная закладка, и может выполнять различные действия на текущей странице.</p> <p>Букмарклет от Clipperz поможет вам быстро создать новые карточки и быстрый вход внутри существующих карточек, на основе страницы с формой авторизации вашего ресурса.</p> <p> <b>Учтите, что закладка букмарклета не содержит какой-либо информации, связанной с аккаунтом (например, имя или пароль), букмарклет содержит один и тот же код для каждого пользователя.</b> </p> <h3>Как установить букмарклет</h3> <h5>Firefox, Camino, Opera, Safari</h5> <ol> <li> <p>Убедитесь, что панель закладок отображается в вашем браузере.</p> </li> <li> <p>Перетащите ссылку “Добавить в Clipperz” на панель закладок.</p> </li> </ol> <h5>Internet Explorer</h5> <ol> <li> <p>Убедитесь, что отображается панель избранного.</p> </li> <li> <p>Нажмите правой кнопкой на ссылку “Добавить в Clipperz”.</p> </li> <li> <p>Выберите “Добавить в избранное...” из контекстного меню.</p> </li> <li> <p>Нажмите “Да”, для любых сообщений, которые появятся.</p> </li> <li> <p>Выберите папку “Панель избранного” и нажмите “Добавить”.</p> </li> </ol> ", 226 'bookmarkletTabDescription':"<p>Букмарклет - это простой инструмент, который помещается в браузер, как обычная закладка, и может выполнять различные действия на текущей странице.</p> <p>Букмарклет от Clipperz поможет вам быстро создать новые карточки и быстрый вход внутри существующих карточек, на основе страницы с формой авторизации вашего ресурса.</p> <p> <b>Учтите, что закладка букмарклета не содержит какой-либо информации, связанной с аккаунтом (например, имя или пароль), букмарклет содержит один и тот же код для каждого пользователя.</b> </p> <h3>Как установить букмарклет</h3> <h5>Firefox, Camino, Opera, Safari</h5> <ol> <li> <p>Убедитесь, что панель закладок отображается в вашем браузере.</p> </li> <li> <p>Перетащите ссылку “Добавить в Clipperz” на панель закладок.</p> </li> </ol> <h5>Internet Explorer</h5> <ol> <li> <p>Убедитесь, что отображается панель избранного.</p> </li> <li> <p>Нажмите правой кнопкой на ссылку “Добавить в Clipperz”.</p> </li> <li> <p>Выберите “Добавить в избранное...” из контекстного меню.</p> </li> <li> <p>Нажмите “Да”, для любых сообщений, которые появятся.</p> </li> <li> <p>Выберите папку “Панель избранного” и нажмите “Добавить”.</p> </li> </ol> ",
230 'bookmarkletTabBookmarkletTitle':"Добавить в Clipperz", 227 'bookmarkletTabBookmarkletTitle':"Добавить в Clipperz",
231 'bookmarkletTabInstructions':"<h3>Как создать новую карточку с ссылками “прямого подключения” в онлайновый сервис</h3> <ol> <li> <p>Откройте веб-страницу с формой входа. (обычно на этой страницы вы вводите данные вашей учетной записи)</p> </li> <li> <p>Запустите закладку, нажав на нее: появится всплывающее окно.</p> </li> <li> <p>Скопируйте в буфер обмена содержимое текстового поля из всплывающего окна. (ctrl-C)</p> </li> <li> <p>Войдите в ваш аккаунт и нажмите “Добавить новую карточку”.</p> </li> <li> <p>Выберите шаблон “Прямого подключения” и вставьте в текстовое поле содержимое буфера обмена. (ctrl-V)</p> </li> <li> <p>Нажмите кнопку “Создать”, проверьте правильность и нажмите “Сохранить”.</p> </li> </ol> <h3>Как создать ссылку “Быстрого входа” в существующей карточке</h3> <ol> <li> <p>Тоже самое, как и выше.</p> </li> <li> <p>Тоже самое, как и выше.</p> </li> <li> <p>Тоже самое, как и выше.</p> </li> <li> <p>Войдите в ваш аккаунт и выберите карточку с данными учетной записи для только что посещенного веб-сервиса и нажмите “Редактировать”.</p> </li> <li> <p>Вставьте содержимое буфера обмена в текстовое поле в разделе “Быстрого входа”. (ctrl-V)</p> </li> <li> <p>Нажмите «Добавить новый Быстрый вход», проверьте правильность и нажмите “Сохранить”.</p> </li> </ol> <p> </p> <p>Подробнее о букмарклете <a href=\"http://www.clipperz.com/support/user_guide/bookmarklet\" target=\"_blank\">здесь</a>.</p> ", 228 'bookmarkletTabInstructions':"<h3>Как создать новую карточку с ссылками “прямого подключения” в онлайновый сервис</h3> <ol> <li> <p>Откройте веб-страницу с формой входа. (обычно на этой страницы вы вводите данные вашей учетной записи)</p> </li> <li> <p>Запустите закладку, нажав на нее: появится всплывающее окно.</p> </li> <li> <p>Скопируйте в буфер обмена содержимое текстового поля из всплывающего окна. (ctrl-C)</p> </li> <li> <p>Войдите в ваш аккаунт и нажмите “Добавить новую карточку”.</p> </li> <li> <p>Выберите шаблон “Прямого подключения” и вставьте в текстовое поле содержимое буфера обмена. (ctrl-V)</p> </li> <li> <p>Нажмите кнопку “Создать”, проверьте правильность и нажмите “Сохранить”.</p> </li> </ol> <h3>Как создать ссылку “Быстрого входа” в существующей карточке</h3> <ol> <li> <p>Тоже самое, как и выше.</p> </li> <li> <p>Тоже самое, как и выше.</p> </li> <li> <p>Тоже самое, как и выше.</p> </li> <li> <p>Войдите в ваш аккаунт и выберите карточку с данными учетной записи для только что посещенного веб-сервиса и нажмите “Редактировать”.</p> </li> <li> <p>Вставьте содержимое буфера обмена в текстовое поле в разделе “Быстрого входа”. (ctrl-V)</p> </li> <li> <p>Нажмите «Добавить новый Быстрый вход», проверьте правильность и нажмите “Сохранить”.</p> </li> </ol> <p> </p> <p>Подробнее о букмарклете <a href=\"http://www.clipperz.com/support/user_guide/bookmarklet\" target=\"_blank\">здесь</a>.</p> ",
232 'mainPanelDirectLoginBlockLabel':"Быстрый вход", 229 'mainPanelDirectLoginBlockLabel':"Быстрый вход",
233 'directLinkReferenceShowButtonLabel':"показать", 230 'directLinkReferenceShowButtonLabel':"показать",
234 'mainPanelDirectLoginBlockDescription':"<p>Добавьте «Быстрый вход», чтобы срау заходить на веб-сервисы без ввода имени и пароля!</p> <p>«Быстрый вход» значительно усиливает безопасность, так как:</p> <ul> <li> <p>можно удобно использовать большие и сложные пароли.</p> </li> <li> <p>легко пользоваться уникальными паролями на разных ресурсах.</p> </li> </ul> <p>Легко и быстро их можно создать с помощью букмарклета Clipperz.</p> <a href=\"http://www.clipperz.com/support/user_guide/direct_logins\" target=\"_blank\">Подробнее о быстром входе</a> ", 231 'mainPanelDirectLoginBlockDescription':"<p>Добавьте «Быстрый вход», чтобы срау заходить на веб-сервисы без ввода имени и пароля!</p> <p>«Быстрый вход» значительно усиливает безопасность, так как:</p> <ul> <li> <p>можно удобно использовать большие и сложные пароли.</p> </li> <li> <p>легко пользоваться уникальными паролями на разных ресурсах.</p> </li> </ul> <p>Легко и быстро их можно создать с помощью букмарклета Clipperz.</p> <a href=\"http://www.clipperz.com/support/user_guide/direct_logins\" target=\"_blank\">Подробнее о быстром входе</a> ",
235 'mainPanelRecordsBlockLabel':"Карточки", 232 'mainPanelRecordsBlockLabel':"Карточки",
236 'mainPanelAddRecordButtonLabel':"Добавить новую карточку", 233 'mainPanelAddRecordButtonLabel':"Добавить новую карточку",
237 'mainPanelRemoveRecordButtonLabel':"Удалить карточку", 234 'mainPanelRemoveRecordButtonLabel':"Удалить карточку",
238 'mainPanelRecordFilterBlockAllLabel':"все", 235 'mainPanelRecordFilterBlockAllLabel':"все",
239 'mainPanelRecordFilterBlockTagsLabel':"теги", 236 'mainPanelRecordFilterBlockTagsLabel':"теги",
240 'mainPanelRecordFilterBlockSearchLabel':"поиск", 237 'mainPanelRecordFilterBlockSearchLabel':"поиск",
241 'recordDetailNoRecordAtAllTitle':"Добро пожаловать в Clipperz!", 238 'recordDetailNoRecordAtAllTitle':"Добро пожаловать в Clipperz!",
242 'recordDetailNoRecordAtAllDescription':"<h5>Начните работать, добавив карточку.</h5> <p>Карточки - это простой и гибкий инструмент, с помощью которого вы можете хранить пароли и любую другую информацию.</p> <p>Карточки могут содержать учетные записи для доступа к веб-сайтам, код для замка от велосипеда, данные кредитной карточки и т.д.</p> <h5>Не забывайте о букмарклете!</h5> <p>Перед началом работы установите букмарклет от Clipperz: создание карточек станет простым и быстрым.</p> <p>Откройте раздел \"Инструменты\"->\"Букмарклет\", чтобы узнать, как установить и использовать его.</p> <p> </p> <a href=\"http://www.clipperz.com/support/user_guide/managing_cards\" target=\"_blank\">Подробнее о создании и управлении закладками</a> ", 239 'recordDetailNoRecordAtAllDescription':"<h5>Начните работать, добавив карточку.</h5> <p>Карточки - это простой и гибкий инструмент, с помощью которого вы можете хранить пароли и любую другую информацию.</p> <p>Карточки могут содержать учетные записи для доступа к веб-сайтам, код для замка от велосипеда, данные кредитной карточки и т.д.</p> <h5>Не забывайте о букмарклете!</h5> <p>Перед началом работы установите букмарклет от Clipperz: создание карточек станет простым и быстрым.</p> <p>Откройте раздел \"Инструменты\"->\"Букмарклет\", чтобы узнать, как установить и использовать его.</p> <p> </p> <a href=\"http://www.clipperz.com/support/user_guide/managing_cards\" target=\"_blank\">Подробнее о создании и управлении закладками</a> ",
243 'newRecordWizardTitleBox':"<h5>Пожайлуста, выберите шаблон</h5> <p>Карточки - это простой и гибкий инструмент, с помощью которого вы можете хранить пароли и любую другую информацию.</p> <p>Выберите один из шаблонов. Вы всегда сможете настроить ваши карточки, добавляя или удаляя поля.</p> ", 240 'newRecordWizardTitleBox':"<h5>Пожайлуста, выберите шаблон</h5> <p>Карточки - это простой и гибкий инструмент, с помощью которого вы можете хранить пароли и любую другую информацию.</p> <p>Выберите один из шаблонов. Вы всегда сможете настроить ваши карточки, добавляя или удаляя поля.</p> ",
244 'newRecordWizardBookmarkletConfigurationTitle':"Быстрый вход", 241 'newRecordWizardBookmarkletConfigurationTitle':"Быстрый вход",
245 'newRecordWizardBookmarkletConfigurationDescription':"<p>Вставьте конфигурационный код, сгенерированный с помощью букмарклета</p> <p>Будет создана новая карточка с поддержкой быстрого входа.</p> ", 242 'newRecordWizardBookmarkletConfigurationDescription':"<p>Вставьте конфигурационный код, сгенерированный с помощью букмарклета</p> <p>Будет создана новая карточка с поддержкой быстрого входа.</p> ",
246 'newRecordWizardCreateButtonLabel':"Создать", 243 'newRecordWizardCreateButtonLabel':"Создать",
247 'newRecordWizardCancelButtonLabel':"Отмена", 244 'newRecordWizardCancelButtonLabel':"Отмена",
248 'donateSplashPanelTitle':"Поддержите Clipperz, сделайте пожертвование сегодня!", 245 'donateSplashPanelTitle':"Поддержите Clipperz, сделайте пожертвование сегодня!",
249 'donateSplashPanelDescription':"<p>Несколько причин сделать пожертвование:</p> <ul> <li> <p>поддержка развития новых функций</p> </li> <li> <p>оставить Clipperz бесплатным</p> </li> <li> <p>показать признательность нашей упорной работе</p> </li> </ul> <p>Для дополнительной информации посетите нашу <a href=\"http://www.clipperz.com/donations\" target=\"_blank\">страницу пожертвований</a>.</p> <p> <b>Готовы пожертвовать?</b> </p> ", 246 'donateSplashPanelDescription':"<p>Несколько причин сделать пожертвование:</p> <ul> <li> <p>поддержка развития новых функций</p> </li> <li> <p>оставить Clipperz бесплатным</p> </li> <li> <p>показать признательность нашей упорной работе</p> </li> </ul> <p>Для дополнительной информации посетите нашу <a href=\"http://www.clipperz.com/donations\" target=\"_blank\">страницу пожертвований</a>.</p> <p> <b>Готовы пожертвовать?</b> </p> ",
250 'donateCloseButtonLabel':"Еще нет", 247 'donateCloseButtonLabel':"Еще нет",
251 'donateDonateButtonLabel':"Да", 248 'donateDonateButtonLabel':"Да",
252 'recordTemplates':{ 249 'recordTemplates':{
253 'WebAccount':{ 250 'WebAccount':{
254 'title':"Интернет аккаунт", 251 'title':"Интернет аккаунт",
255 'description':"Простая форма для хранения учетной записи в онлайн сервисе." 252 'description':"Простая форма для хранения учетной записи в онлайн сервисе."
256 }, 253 },
257 'BankAccount':{ 254 'BankAccount':{
258 'title':"Счет банка", 255 'title':"Счет банка",
259 'description':"Безопасное хранение номера вашего счета и учетной записи для онлайн доступа." 256 'description':"Безопасное хранение номера вашего счета и учетной записи для онлайн доступа."
260 }, 257 },
261 'CreditCard':{ 258 'CreditCard':{
262 'title':"Кредитная карта", 259 'title':"Кредитная карта",
263 'description':"Номер карты, срок действия, CCV2 и PIN будут всегда при вас." 260 'description':"Номер карты, срок действия, CCV2 и PIN будут всегда при вас."
264 }, 261 },
265 'AddressBookEntry':{ 262 'AddressBookEntry':{
266 'title':"Запись адресной книги", 263 'title':"Запись адресной книги",
267 'description':"Clipperz может также работать, как записная книга. Используйте этот шаблон, чтобы легко добавить новую запись." 264 'description':"Clipperz может также работать, как записная книга. Используйте этот шаблон, чтобы легко добавить новую запись."
268 }, 265 },
269 'Custom':{ 266 'Custom':{
270 'title':"Пользовательская карточка", 267 'title':"Пользовательская карточка",
271 'description':"Не важно, какие данные нужно защитить, просто создайте карточку." 268 'description':"Не важно, какие данные нужно защитить, просто создайте карточку."
272 } 269 }
273 }, 270 },
274 'recordFieldTypologies':{ 271 'recordFieldTypologies':{
275 'TXT':{ 272 'TXT':{
276 'description':"simple text field", 273 'description':"simple text field",
277 'shortDescription':"текст" 274 'shortDescription':"текст"
278 }, 275 },
279 'PWD':{ 276 'PWD':{
280 'description':"simple text field, with default status set to hidden", 277 'description':"simple text field, with default status set to hidden",
281 'shortDescription':"пароль" 278 'shortDescription':"пароль"
282 }, 279 },
283 'URL':{ 280 'URL':{
284 'description':"simple text field in edit mode, that became an active url in view mode", 281 'description':"simple text field in edit mode, that became an active url in view mode",
285 'shortDescription':"URL" 282 'shortDescription':"URL"
286 }, 283 },
287 'DATE':{ 284 'DATE':{
288 'description':"a value set with a calendar helper", 285 'description':"a value set with a calendar helper",
289 'shortDescription':"дата" 286 'shortDescription':"дата"
290 }, 287 },
291 'ADDR':{ 288 'ADDR':{
292 'description':"just like the URL, but the active link points to Google Maps (or similar service) passing the address value as argument", 289 'description':"just like the URL, but the active link points to Google Maps (or similar service) passing the address value as argument",
293 'shortDescription':"адрес" 290 'shortDescription':"адрес"
294 }, 291 },
295 'CHECK':{ 292 'CHECK':{
296 'description':"check description", 293 'description':"check description",
297 'shortDescription':"check" 294 'shortDescription':"check"
298 }, 295 },
299 'RADIO':{ 296 'RADIO':{
300 'description':"radio description", 297 'description':"radio description",
301 'shortDescription':"radio" 298 'shortDescription':"radio"
302 }, 299 },
303 'SELECT':{ 300 'SELECT':{
304 'description':"select description", 301 'description':"select description",
305 'shortDescription':"select" 302 'shortDescription':"select"
306 } 303 }
307 }, 304 },
308 'newRecordPanelGeneralExceptionTitle':"Ошибка", 305 'newRecordPanelGeneralExceptionTitle':"Ошибка",
309 'newRecordPanelGeneralExceptionMessage':"Конфигурационный текст неверен. Убедитесь, что вы взяли его из окна закладки и попробуйте снова.", 306 'newRecordPanelGeneralExceptionMessage':"Конфигурационный текст неверен. Убедитесь, что вы взяли его из окна закладки и попробуйте снова.",
310 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"Ошибка", 307 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"Ошибка",
311 'newRecordPanelWrongBookmarkletVersionExceptionMessage':"Конфигурационный текст был сгенерирован с помощью старой весии закладок. Пожайлуста, обновите вашу закладку и попробуйте снова.", 308 'newRecordPanelWrongBookmarkletVersionExceptionMessage':"Конфигурационный текст был сгенерирован с помощью старой весии закладок. Пожайлуста, обновите вашу закладку и попробуйте снова.",
312 'newRecordPanelExceptionPanelCloseButtonLabel':"Отмена", 309 'newRecordPanelExceptionPanelCloseButtonLabel':"Отмена",
313 'mainPanelDeletingRecordPanelConfirmationTitle':"Удаление выбранной карточки", 310 'mainPanelDeletingRecordPanelConfirmationTitle':"Удаление выбранной карточки",
314 'mainPanelDeleteRecordPanelConfirmationText':"Вы действительно хотите удалить эту карточку?", 311 'mainPanelDeleteRecordPanelConfirmationText':"Вы действительно хотите удалить эту карточку?",
315 'mainPanelDeleteRecordPanelConfirmButtonLabel':"Да", 312 'mainPanelDeleteRecordPanelConfirmButtonLabel':"Да",
316 'mainPanelDeleteRecordPanelDenyButtonLabel':"Нет", 313 'mainPanelDeleteRecordPanelDenyButtonLabel':"Нет",
317 'mainPanelDeletingRecordPanelInitialTitle':"Удаление выбранной карточки", 314 'mainPanelDeletingRecordPanelInitialTitle':"Удаление выбранной карточки",
318 'mainPanelDeletingRecordPanelCompletedText':"Выполнено", 315 'mainPanelDeletingRecordPanelCompletedText':"Выполнено",
319 'deleteRecordPanelCollectRecordDataMessageTitle':"Удаление карточки", 316 'deleteRecordPanelCollectRecordDataMessageTitle':"Удаление карточки",
320 'deleteRecordPanelCollectRecordDataMessageText':"Обновление списка карточек", 317 'deleteRecordPanelCollectRecordDataMessageText':"Обновление списка карточек",
321 'deleteRecordPanelEncryptUserDataMessageTitle':"Удаление карточки", 318 'deleteRecordPanelEncryptUserDataMessageTitle':"Удаление карточки",
322 'deleteRecordPanelEncryptUserDataMessageText':"Шифрование заголовков карточек", 319 'deleteRecordPanelEncryptUserDataMessageText':"Шифрование заголовков карточек",
323 'deleteRecordPanelSendingDataToTheServerMessageTitle':"Удаление карточки", 320 'deleteRecordPanelSendingDataToTheServerMessageTitle':"Удаление карточки",
324 'deleteRecordPanelSendingDataToTheServerMessageText':"Передача зашифрованных заголовков карчточек в Clipperz", 321 'deleteRecordPanelSendingDataToTheServerMessageText':"Передача зашифрованных заголовков карчточек в Clipperz",
325 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"Удаление карточки", 322 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"Удаление карточки",
326 'deleteRecordPanelUpdatingTheInterfaceMessageText':"Обновление интерфейса", 323 'deleteRecordPanelUpdatingTheInterfaceMessageText':"Обновление интерфейса",
327 'recordDetailNoRecordSelectedTitle':"Не выбрана карточка", 324 'recordDetailNoRecordSelectedTitle':"Не выбрана карточка",
328 'recordDetailNoRecordSelectedDescription':"<p>Пожайлуста, выберите карточку из списка слева.</p> ", 325 'recordDetailNoRecordSelectedDescription':"<p>Пожайлуста, выберите карточку из списка слева.</p> ",
329 'recordDetailLoadingRecordMessage':"Загрузка зашифрованных карточек из Clipperz", 326 'recordDetailLoadingRecordMessage':"Загрузка зашифрованных карточек из Clipperz",
330 'recordDetailDecryptingRecordMessage':"Расшифровка данных карточек", 327 'recordDetailDecryptingRecordMessage':"Расшифровка данных карточек",
331 'recordDetailLoadingRecordVersionMessage':"Загрузка последней версии карточкиn", 328 'recordDetailLoadingRecordVersionMessage':"Загрузка последней версии карточкиn",
332 'recordDetailDecryptingRecordVersionMessage':"Расшифровка", 329 'recordDetailDecryptingRecordVersionMessage':"Расшифровка",
333 'recordDetailLoadingErrorMessageTitle':"Ошибка при загрузку", 330 'recordDetailLoadingErrorMessageTitle':"Ошибка при загрузку",
334 'recordDetailNotesLabel':"Примечания", 331 'recordDetailNotesLabel':"Примечания",
335 'recordDetailLabelFieldColumnLabel':"Название поля", 332 'recordDetailLabelFieldColumnLabel':"Название поля",
336 'recordDetailDataFieldColumnLabel':"Значение поля", 333 'recordDetailDataFieldColumnLabel':"Значение поля",
337 'recordDetailTypeFieldColumnLabel':"Тип", 334 'recordDetailTypeFieldColumnLabel':"Тип",
338 'recordDetailSavingChangesMessagePanelInitialTitle':"Сохранение карточки", 335 'recordDetailSavingChangesMessagePanelInitialTitle':"Сохранение карточки",
339 'recordDetailAddFieldButtonLabel':"Добавить новое поле", 336 'recordDetailAddFieldButtonLabel':"Добавить новое поле",
340 'recordDetailPasswordFieldHelpLabel':"чтобы скопировать пароль в буфер обмена, нажмите на звездочку, затем Ctrl-C", 337 'recordDetailPasswordFieldHelpLabel':"чтобы скопировать пароль в буфер обмена, нажмите на звездочку, затем Ctrl-C",
341 'recordDetailPasswordFieldScrambleLabel':"спрятать", 338 'recordDetailPasswordFieldScrambleLabel':"спрятать",
342 'recordDetailPasswordFieldUnscrambleLabel':"показать", 339 'recordDetailPasswordFieldUnscrambleLabel':"показать",
343 'recordDetailDirectLoginBlockTitle':"Быстрый вход", 340 'recordDetailDirectLoginBlockTitle':"Быстрый вход",
344 'recordDetailNewDirectLoginDescription':"<p>Настройка быстрого входа</p> ", 341 'recordDetailNewDirectLoginDescription':"<p>Настройка быстрого входа</p> ",
345 'recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription':"<p>В этой карточке есть данные для доступа в онлайн сервис?</p> <p>Используйте букмарклет, чтобы добавить «Быстрый вход»!</p> ", 342 'recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription':"<p>В этой карточке есть данные для доступа в онлайн сервис?</p> <p>Используйте букмарклет, чтобы добавить «Быстрый вход»!</p> ",
346 'recordDetailAddNewDirectLoginButtonLabel':"Добавить новый «Быстрый вход»", 343 'recordDetailAddNewDirectLoginButtonLabel':"Добавить новый «Быстрый вход»",
347 'recordDetailEditButtonLabel':"Изменить", 344 'recordDetailEditButtonLabel':"Изменить",
348 'recordDetailSaveButtonLabel':"Сохранить", 345 'recordDetailSaveButtonLabel':"Сохранить",
349 'recordDetailCancelButtonLabel':"Отмена", 346 'recordDetailCancelButtonLabel':"Отмена",
350 'newRecordTitleLabel':"_новую карточку_", 347 'newRecordTitleLabel':"_новую карточку_",
351 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"Сохранение карточки", 348 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"Сохранение карточки",
352 'recordSaveChangesPanelCollectRecordInfoMessageText':"Обновление заголовков карточек", 349 'recordSaveChangesPanelCollectRecordInfoMessageText':"Обновление заголовков карточек",
353 'recordSaveChangesPanelEncryptUserDataMessageTitle':"Сохранение карточки", 350 'recordSaveChangesPanelEncryptUserDataMessageTitle':"Сохранение карточки",
354 'recordSaveChangesPanelEncryptUserDataMessageText':"Шифрование заголовков карточки", 351 'recordSaveChangesPanelEncryptUserDataMessageText':"Шифрование заголовков карточки",
355 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"Сохранение карточки", 352 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"Сохранение карточки",
356 'recordSaveChangesPanelEncryptRecordDataMessageText':"Шифровани данных карточки", 353 'recordSaveChangesPanelEncryptRecordDataMessageText':"Шифровани данных карточки",
357 'recordSaveChangesPanelEncryptRecordVersionDataMessageTitle':"Сохранение карточки", 354 'recordSaveChangesPanelEncryptRecordVersionDataMessageTitle':"Сохранение карточки",
358 'recordSaveChangesPanelEncryptRecordVersionDataMessageText':"Шифрование данных версии карточки", 355 'recordSaveChangesPanelEncryptRecordVersionDataMessageText':"Шифрование данных версии карточки",
359 'recordSaveChangesPanelSendingDataToTheServerMessageTitle':"Сохранение карточки", 356 'recordSaveChangesPanelSendingDataToTheServerMessageTitle':"Сохранение карточки",
360 'recordSaveChangesPanelSendingDataToTheServerMessageText':"Передача зашифрованного заголовка карточки в Clipperz", 357 'recordSaveChangesPanelSendingDataToTheServerMessageText':"Передача зашифрованного заголовка карточки в Clipperz",
361 'recordSaveChangesPanelUpdatingTheInterfaceMessageTitle':"Сохранение карточки", 358 'recordSaveChangesPanelUpdatingTheInterfaceMessageTitle':"Сохранение карточки",
362 'recordSaveChangesPanelUpdatingTheInterfaceMessageText':"Обновление интерфейса", 359 'recordSaveChangesPanelUpdatingTheInterfaceMessageText':"Обновление интерфейса",
363 'passwordGeneratorPanelTitle':"Генератор паролей", 360 'passwordGeneratorPanelTitle':"Генератор паролей",
364 'passwordGeneratorPanelOkLabel':"OK", 361 'passwordGeneratorPanelOkLabel':"OK",
365 'passwordGeneratorPanelCancelLabel':"Отмена", 362 'passwordGeneratorPanelCancelLabel':"Отмена",
366 'passwordGeneratorLengthLabel':"длина:", 363 'passwordGeneratorLengthLabel':"длина:",
367 'DWRUtilLoadingMessage':"Загрузка данных ...", 364 'DWRUtilLoadingMessage':"Загрузка данных ...",
368 'comingSoon':"вскоре ...", 365 'comingSoon':"вскоре ...",
369 'panelCollectingEntryopyMessageText':"Определение энтропии", 366 'panelCollectingEntryopyMessageText':"Определение энтропии",
370 'directLoginConfigurationCheckBoxFieldSelectedValue':"Да", 367 'directLoginConfigurationCheckBoxFieldSelectedValue':"Да",
371 'directLoginConfigurationCheckBoxFieldNotSelectedValue':"Нет", 368 'directLoginConfigurationCheckBoxFieldNotSelectedValue':"Нет",
372 'WELCOME_BACK':"Добро пожаловать снова!", 369 'WELCOME_BACK':"Добро пожаловать снова!",
373 'currentConnectionText':"Сейчас вы подключились с ip&nbsp;__ip__, очевидно __country__, используя __browser__ на __operatingSystem__.", 370 'currentConnectionText':"Сейчас вы подключились с ip&nbsp;__ip__, очевидно __country__, используя __browser__ на __operatingSystem__.",
374 'latestConnectionText':"Последнее соединение было __elapsedTimeDescription__ (__time__) с ip&nbsp;__ip__, очевидно __country__, используя __browser__ на __operatingSystem__.", 371 'latestConnectionText':"Последнее соединение было __elapsedTimeDescription__ (__time__) с ip&nbsp;__ip__, очевидно __country__, используя __browser__ на __operatingSystem__.",
375 'fullLoginHistoryLinkLabel':"показать полную историю входов", 372 'fullLoginHistoryLinkLabel':"показать полную историю входов",
376 373
377'exportTabDescription': 374'exportTabDescription':
378 "<h5>JSON экспорт</h5>\ 375 "<h5>JSON экспорт</h5>\
379 <p>JSON включает в себя полную информацию про ваши карты, в том числе и конфигурации быстрого входа.</p>\ 376 <p>JSON включает в себя полную информацию про ваши карты, в том числе и конфигурации быстрого входа.</p>\
380 <p>Это формат, разработанный для Clipperz, и наиболее удобен для работы с ним. Например, если вам нужно переместить все свои карты на другую учетную запись Clipperz, или если вы хотите восстановить карточку, которая была случайно удалена.</p>\ 377 <p>Это формат, разработанный для Clipperz, и наиболее удобен для работы с ним. Например, если вам нужно переместить все свои карты на другую учетную запись Clipperz, или если вы хотите восстановить карточку, которая была случайно удалена.</p>\
381 <p>Нажмите на ссылку ниже, чтобы начать экспорт.</p>", 378 <p>Нажмите на ссылку ниже, чтобы начать экспорт.</p>",
382 379
383 'exportLinkLabel': "JSON экспорт", 380 'exportLinkLabel': "JSON экспорт",
384 381
385 'exportDataInProgressDescription':"<h4>Экспорт, пожалуста, подождите, пока обрабатываются ваши данные…</h4>", 382 'exportDataInProgressDescription':"<h4>Экспорт, пожалуста, подождите, пока обрабатываются ваши данные…</h4>",
386 383
387 'exportDataDescription': 384 'exportDataDescription':
388 "<h4>Инструкция</h4>\ 385 "<h4>Инструкция</h4>\
389 <p>Скопируйте текст ниже в любой текстовый редактор и сохраните его. (напр. “clipperz_export_20071217.json”)</p>", 386 <p>Скопируйте текст ниже в любой текстовый редактор и сохраните его. (напр. “clipperz_export_20071217.json”)</p>",
390 387
391 388
392 'elapsedTimeDescriptions':{ 389 'elapsedTimeDescriptions':{
393 'MORE_THAN_A_MONTH_AGO':"за месяц", 390 'MORE_THAN_A_MONTH_AGO':"за месяц",
394 'MORE_THAN_A_WEEK_AGO':"за неделю", 391 'MORE_THAN_A_WEEK_AGO':"за неделю",
395 'MORE_THAN_*_WEEKS_AGO':"за несколько __elapsed__ недель", 392 'MORE_THAN_*_WEEKS_AGO':"за несколько __elapsed__ недель",
396 'YESTERDAY':"вчера", 393 'YESTERDAY':"вчера",
397 '*_DAYS_AGO':"__elapsed__ дней(-я)", 394 '*_DAYS_AGO':"__elapsed__ дней(-я)",
398 'ABOUT_AN_HOUR_AGO':"за час", 395 'ABOUT_AN_HOUR_AGO':"за час",
399 '*_HOURS_AGO':"__elapsed__ часов(-а)", 396 '*_HOURS_AGO':"__elapsed__ часов(-а)",
400 'JUST_A_FEW_MINUTES_AGO':"несколько минут", 397 'JUST_A_FEW_MINUTES_AGO':"несколько минут",
401 'ABOUT_*_MINUTES_AGO':"около __elapsed__ минут" 398 'ABOUT_*_MINUTES_AGO':"около __elapsed__ минут"
402}, 399},
403 'unknown_ip':"неизвестный", 400 'unknown_ip':"неизвестный",
404 401
405// NEW - Import panel 402// NEW - Import panel
406 'importFormats':{ 403 'importFormats':{
407 'CSV': { 404 'CSV': {
408 'label': "CSV", 405 'label': "CSV",
diff --git a/frontend/beta/js/Clipperz/PM/Strings/Strings_zh-CN.js b/frontend/beta/js/Clipperz/PM/Strings/Strings_zh-CN.js
index a1d09f1..1a9caed 100644
--- a/frontend/beta/js/Clipperz/PM/Strings/Strings_zh-CN.js
+++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_zh-CN.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29Clipperz.PM.Strings.Languages['zh-CN'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 26Clipperz.PM.Strings.Languages['zh-CN'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], {
30 'clipperzServiceDescription':"<h2>只有你知道</h2> <ul> <li> <h3>Clipperz 是:</h3> <ul> <li> <p>一个简单而又安全的密码管理员</p> </li> <li> <p>一个有效的单一登录解决方案</p> </li> <li> <p>一个您保密的资料数据库</p> </li> </ul> </li> <li> <h3> 使用 Clipperz 你能:</h3> <ul> <li> <p>储存和管理你的密码和网上证书</p> </li> <li> <p>无需输入密码自动帮助你登录网站服务</p> </li> <li> <p>保护你的敏感数据:通讯录,口令,信用卡号码, ...</p> </li> <li> <p>与家人和伙伴分享秘密(将要上线)</p> </li> </ul> </li> <li> <h3>Clipperz 的特点:</h3> <ul> <li> <p>免费,彻底匿名</p> </li> <li> <p>在任何时间 任何电脑都可以轻松获取你的密码</p> </li> <li> <p>无需下载和安装任何软件</p> </li> <li> <p>再也无需在电脑或者纸上记录密码了</p> </li> </ul> </li> <li> <h3>Clipperz 的安全性:</h3> <ul> <li> <p>密码将在本地浏览器加密,然后上传至 Clipperz</p> </li> <li> <p>加密密钥是一个只有你知道的密码短语</p> </li> <li> <p>Clipperz 服务会加密你的敏感数据,并不会出现数据的原始形式</p> </li> <li> <p>Clipperz 基于加密标准,没有任何的花哨</p> </li> <li> <p>只要你愿意,你随时都可以查看源代码,但是做为一个使用者来说完全没有去必要去了解那些繁琐的加密原理</p> </li> </ul> </li> <li> <a href=\"http://www.clipperz.com\" target=\"_blank\">更多</a> </li> </ul> ", 27 'clipperzServiceDescription':"<h2>只有你知道</h2> <ul> <li> <h3>Clipperz 是:</h3> <ul> <li> <p>一个简单而又安全的密码管理员</p> </li> <li> <p>一个有效的单一登录解决方案</p> </li> <li> <p>一个您保密的资料数据库</p> </li> </ul> </li> <li> <h3> 使用 Clipperz 你能:</h3> <ul> <li> <p>储存和管理你的密码和网上证书</p> </li> <li> <p>无需输入密码自动帮助你登录网站服务</p> </li> <li> <p>保护你的敏感数据:通讯录,口令,信用卡号码, ...</p> </li> <li> <p>与家人和伙伴分享秘密(将要上线)</p> </li> </ul> </li> <li> <h3>Clipperz 的特点:</h3> <ul> <li> <p>免费,彻底匿名</p> </li> <li> <p>在任何时间 任何电脑都可以轻松获取你的密码</p> </li> <li> <p>无需下载和安装任何软件</p> </li> <li> <p>再也无需在电脑或者纸上记录密码了</p> </li> </ul> </li> <li> <h3>Clipperz 的安全性:</h3> <ul> <li> <p>密码将在本地浏览器加密,然后上传至 Clipperz</p> </li> <li> <p>加密密钥是一个只有你知道的密码短语</p> </li> <li> <p>Clipperz 服务会加密你的敏感数据,并不会出现数据的原始形式</p> </li> <li> <p>Clipperz 基于加密标准,没有任何的花哨</p> </li> <li> <p>只要你愿意,你随时都可以查看源代码,但是做为一个使用者来说完全没有去必要去了解那些繁琐的加密原理</p> </li> </ul> </li> <li> <a href=\"http://www.clipperz.com\" target=\"_blank\">更多</a> </li> </ul> ",
31 'loginFormTitle':"用你的 Clipperz 帐户登录", 28 'loginFormTitle':"用你的 Clipperz 帐户登录",
32 'loginFormUsernameLabel':"用户名", 29 'loginFormUsernameLabel':"用户名",
33 'loginFormPassphraseLabel':"密码短语", 30 'loginFormPassphraseLabel':"密码短语",
34 'loginFormDontHaveAnAccountLabel':"还未建立帐户?", 31 'loginFormDontHaveAnAccountLabel':"还未建立帐户?",
35 'loginFormCreateOneLabel':"创建一个新帐户", 32 'loginFormCreateOneLabel':"创建一个新帐户",
36 'loginFormForgotYourCredentialsLabel':"忘记你的证书?", 33 'loginFormForgotYourCredentialsLabel':"忘记你的证书?",
37 'loginFormAarghThatsBadLabel':"呃?这下糟糕了", 34 'loginFormAarghThatsBadLabel':"呃?这下糟糕了",
38 'loginFormAfraidOfMaliciousScriptsLabel':"害怕有恶意脚本?", 35 'loginFormAfraidOfMaliciousScriptsLabel':"害怕有恶意脚本?",
39 'loginFormVerifyTheCodeLabel':"验证代码", 36 'loginFormVerifyTheCodeLabel':"验证代码",
40 'loginFormButtonLabel':"登录", 37 'loginFormButtonLabel':"登录",
41 'loginFormOneTimePasswordCheckboxLabel':"使用一次性密码短语", 38 'loginFormOneTimePasswordCheckboxLabel':"使用一次性密码短语",
42 'loginPanelSwithLanguageDescription':"<h5>选择你的第一语言</h5> ", 39 'loginPanelSwithLanguageDescription':"<h5>选择你的第一语言</h5> ",
43 'browserCompatibilityDescription':"<p>使用 Firefox 将得到更快更安全的 Clipperz 服务。不过 Clipperz 同样可以很好的工作在 Opera 和 微软的 IE 中。</p> ", 40 'browserCompatibilityDescription':"<p>使用 Firefox 将得到更快更安全的 Clipperz 服务。不过 Clipperz 同样可以很好的工作在 Opera 和 微软的 IE 中。</p> ",
44 'OTPloginMessagePanelInitialTitle':"用一次性密码短语登录", 41 'OTPloginMessagePanelInitialTitle':"用一次性密码短语登录",
45 'OTPloginMessagePanelInitialText':"发送 OTP 证书 ...", 42 'OTPloginMessagePanelInitialText':"发送 OTP 证书 ...",
46 'OTPloginMessagePanelLoadingTitle':"用一次性密码短语登录", 43 'OTPloginMessagePanelLoadingTitle':"用一次性密码短语登录",
47 'OTPloginMessagePanelLoadingText':"从服务器读取加密认证数据 ...", 44 'OTPloginMessagePanelLoadingText':"从服务器读取加密认证数据 ...",
48 'OTPloginMessagePanelProcessingTitle':"用一次性密码短语登录", 45 'OTPloginMessagePanelProcessingTitle':"用一次性密码短语登录",
49 'OTPloginMessagePanelProcessingText':"本地解密认证数据", 46 'OTPloginMessagePanelProcessingText':"本地解密认证数据",
50 'loginMessagePanelInitialTitle':"登录中...", 47 'loginMessagePanelInitialTitle':"登录中...",
51 'loginMessagePanelInitialButtonLabel':"取消", 48 'loginMessagePanelInitialButtonLabel':"取消",
52 'loginMessagePanelConnectedTitle':"连接成功", 49 'loginMessagePanelConnectedTitle':"连接成功",
53 'loginMessagePanelConnectedText':"完成", 50 'loginMessagePanelConnectedText':"完成",
54 'loginMessagePanelFailureTitle':"错误", 51 'loginMessagePanelFailureTitle':"错误",
55 'loginMessagePanelFailureText':"登录失败", 52 'loginMessagePanelFailureText':"登录失败",
56 'loginMessagePanelFailureButtonLabel':"取消", 53 'loginMessagePanelFailureButtonLabel':"取消",
57 'connectionLoginSendingCredentialsMessageTitle':"验证证书", 54 'connectionLoginSendingCredentialsMessageTitle':"验证证书",
58 'connectionLoginSendingCredentialsMessageText':"传送证书", 55 'connectionLoginSendingCredentialsMessageText':"传送证书",
59 'connectionLoginCredentialsVerificationMessageTitle':"验证证书", 56 'connectionLoginCredentialsVerificationMessageTitle':"验证证书",
60 'connectionLoginCredentialsVerificationMessageText':"进行 SRP 认证", 57 'connectionLoginCredentialsVerificationMessageText':"进行 SRP 认证",
61 'connectionLoginDoneMessageTitle':"验证证书", 58 'connectionLoginDoneMessageTitle':"验证证书",
62 'connectionLoginDoneMessageText':"已连接", 59 'connectionLoginDoneMessageText':"已连接",
63 'userLoginPanelUpgradingUserCredentialsMessageTitle':"验证证书", 60 'userLoginPanelUpgradingUserCredentialsMessageTitle':"验证证书",
64 'userLoginPanelUpgradingUserCredentialsMessageText':"升级证书到新的认证模式", 61 'userLoginPanelUpgradingUserCredentialsMessageText':"升级证书到新的认证模式",
65 'userLoginPanelConnectedMessageTitle':"用户识别", 62 'userLoginPanelConnectedMessageTitle':"用户识别",
66 'userLoginPanelConnectedMessageText':"成功登录", 63 'userLoginPanelConnectedMessageText':"成功登录",
67 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"验证证书", 64 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"验证证书",
68 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"旧认证模式失效", 65 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"旧认证模式失效",
69 'userLoginPanelLoadingUserDataMessageTitle':"用户识别", 66 'userLoginPanelLoadingUserDataMessageTitle':"用户识别",
70 'userLoginPanelLoadingUserDataMessageText':"正在从 Clipperz 下载加密卡报头", 67 'userLoginPanelLoadingUserDataMessageText':"正在从 Clipperz 下载加密卡报头",
71 'userLoginPanelDecryptingUserDataMessageTitle':"用户识别", 68 'userLoginPanelDecryptingUserDataMessageTitle':"用户识别",
72 'userLoginPanelDecryptingUserDataMessageText':"加密卡报头本地解密", 69 'userLoginPanelDecryptingUserDataMessageText':"加密卡报头本地解密",
73 'userLoginPanelDecryptingUserStatisticsMessageTitle':"用户识别", 70 'userLoginPanelDecryptingUserStatisticsMessageTitle':"用户识别",
74 'userLoginPanelDecryptingUserStatisticsMessageText':"本地解密使用统计", 71 'userLoginPanelDecryptingUserStatisticsMessageText':"本地解密使用统计",
75 'splashAlertTitle':"Clipperz 欢迎您", 72 'splashAlertTitle':"Clipperz 欢迎您",
76 'splashAlertText':"<p>安全忠告</p> <ul> <li> <p>在 Clipperz ,用你选择的密码短语保存数据是安全的。没有人能够得到这些数据,除非他们有你的密码。</p> </li> <li> <p> 如果你决定使用 Clipperz 保护敏感数据和关键资料,请务必选用一个复杂的密码短语。越长越好</p> </li> <li> <p>注意:Clipperz将无法找回忘记的密码码短语!</p> </li> </ul> <p>获得更多的说明,请前往 <a href=\"http://www.clipperz.com\" target=\"_blank\">Clipperz</a> 网站.</p> ", 73 'splashAlertText':"<p>安全忠告</p> <ul> <li> <p>在 Clipperz ,用你选择的密码短语保存数据是安全的。没有人能够得到这些数据,除非他们有你的密码。</p> </li> <li> <p> 如果你决定使用 Clipperz 保护敏感数据和关键资料,请务必选用一个复杂的密码短语。越长越好</p> </li> <li> <p>注意:Clipperz将无法找回忘记的密码码短语!</p> </li> </ul> <p>获得更多的说明,请前往 <a href=\"http://www.clipperz.com\" target=\"_blank\">Clipperz</a> 网站.</p> ",
77 'splashAlertCloseButtonLabel':"确定", 74 'splashAlertCloseButtonLabel':"确定",
78 'registrationFormTitle':"创建你的帐户", 75 'registrationFormTitle':"创建你的帐户",
79 'registrationFormUsernameLabel':"用户名", 76 'registrationFormUsernameLabel':"用户名",
80 'registrationFormPassphraseLabel':"密码短语", 77 'registrationFormPassphraseLabel':"密码短语",
81 'registrationFormRetypePassphraseLabel':"确认密码短语", 78 'registrationFormRetypePassphraseLabel':"确认密码短语",
82 'registrationFormSafetyCheckLabel':"我明白 Clipperz 无法找回忘记的密码短语.", 79 'registrationFormSafetyCheckLabel':"我明白 Clipperz 无法找回忘记的密码短语.",
83 'registrationFormTermsOfServiceCheckLabel':"我同意接受 <a href='http://www.clipperz.com/terms_of_service' target='_blank'>服务条款</a> 款.", 80 'registrationFormTermsOfServiceCheckLabel':"我同意接受 <a href='http://www.clipperz.com/terms_of_service' target='_blank'>服务条款</a> 款.",
84 'registrationFormDoYouAlreadyHaveAnAccountLabel':"如果已有一个 Clipperz 帐户", 81 'registrationFormDoYouAlreadyHaveAnAccountLabel':"如果已有一个 Clipperz 帐户",
85 'registrationFormSimplyLoginLabel':"在此登录", 82 'registrationFormSimplyLoginLabel':"在此登录",
86 'registrationFormButtonLabel':"注册", 83 'registrationFormButtonLabel':"注册",
87 'registrationFormWarningMessageNotMatchingPassphrases':"两次密码短语不同,请重新输入", 84 'registrationFormWarningMessageNotMatchingPassphrases':"两次密码短语不同,请重新输入",
88 'registrationFormWarningMessageSafetyCheckNotSelected':"请阅读并检查下面的选项框", 85 'registrationFormWarningMessageSafetyCheckNotSelected':"请阅读并检查下面的选项框",
89 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"您需要同意服务条款", 86 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"您需要同意服务条款",
90 'registrationMessagePanelInitialTitle':"创建账户...", 87 'registrationMessagePanelInitialTitle':"创建账户...",
91 'registrationMessagePanelInitialButtonLabel':"取消", 88 'registrationMessagePanelInitialButtonLabel':"取消",
92 'registrationMessagePanelRegistrationDoneTitle':"注册", 89 'registrationMessagePanelRegistrationDoneTitle':"注册",
93 'registrationMessagePanelRegistrationDoneText':"完成", 90 'registrationMessagePanelRegistrationDoneText':"完成",
94 'registrationMessagePanelFailureTitle':"注册失败", 91 'registrationMessagePanelFailureTitle':"注册失败",
95 'registrationMessagePanelFailureButtonLabel':"关闭", 92 'registrationMessagePanelFailureButtonLabel':"关闭",
96 'connectionRegistrationSendingRequestMessageText':"验证证书", 93 'connectionRegistrationSendingRequestMessageText':"验证证书",
97 'connectionRegistrationSendingCredentialsMessageText':"传送证书", 94 'connectionRegistrationSendingCredentialsMessageText':"传送证书",
98 'registrationSplashPanelTitle':"安全忠告", 95 'registrationSplashPanelTitle':"安全忠告",
99 'registrationSplashPanelDescription':"<p>这是你的 Clipperz 证书,请保存好。Clipperz 永远不会第二次显示你的用户名和密码短语</p> ", 96 'registrationSplashPanelDescription':"<p>这是你的 Clipperz 证书,请保存好。Clipperz 永远不会第二次显示你的用户名和密码短语</p> ",
100 'registrationSplashPanelUsernameLabel':"用户名", 97 'registrationSplashPanelUsernameLabel':"用户名",
101 'registrationSplashPanelPassphraseLabel':"密码短语", 98 'registrationSplashPanelPassphraseLabel':"密码短语",
102 'registrationSplashPanelShowPassphraseButtonLabel':"显示密码短语", 99 'registrationSplashPanelShowPassphraseButtonLabel':"显示密码短语",
103 'donateHeaderLinkLabel':"捐赠", 100 'donateHeaderLinkLabel':"捐赠",
104 'creditsHeaderLinkLabel':"致谢", 101 'creditsHeaderLinkLabel':"致谢",
105 'feedbackHeaderLinkLabel':"反馈", 102 'feedbackHeaderLinkLabel':"反馈",
106 'helpHeaderLinkLabel':"帮助", 103 'helpHeaderLinkLabel':"帮助",
107 'forumHeaderLinkLabel':"论坛", 104 'forumHeaderLinkLabel':"论坛",
108 'recordMenuLabel':"密码卡片", 105 'recordMenuLabel':"密码卡片",
109 'accountMenuLabel':"账户", 106 'accountMenuLabel':"账户",
110 'dataMenuLabel':"资料", 107 'dataMenuLabel':"资料",
111 'contactsMenuLabel':"联系", 108 'contactsMenuLabel':"联系",
112 'toolsMenuLabel':"工具", 109 'toolsMenuLabel':"工具",
113 'logoutMenuLabel':"暂时离开", 110 'logoutMenuLabel':"暂时离开",
114 'lockMenuLabel':"安全锁", 111 'lockMenuLabel':"安全锁",
115 'lockTitle':"账户被锁定", 112 'lockTitle':"账户被锁定",
116 'lockDescription':"<p>请输入你的密码短语解开账户</p> ", 113 'lockDescription':"<p>请输入你的密码短语解开账户</p> ",
117 'unlockButtonLabel':"解锁", 114 'unlockButtonLabel':"解锁",
118 'changePasswordTabLabel':"修改密码短语", 115 'changePasswordTabLabel':"修改密码短语",
119 'changePasswordTabTitle':"修改密码短语", 116 'changePasswordTabTitle':"修改密码短语",
120 'changePasswordFormUsernameLabel':"用户名", 117 'changePasswordFormUsernameLabel':"用户名",
121 'changePasswordFormOldPassphraseLabel':"旧密码短语", 118 'changePasswordFormOldPassphraseLabel':"旧密码短语",
122 'changePasswordFormNewPassphraseLabel':"新密码短语", 119 'changePasswordFormNewPassphraseLabel':"新密码短语",
123 'changePasswordFormRetypePassphraseLabel':"确认密码短语", 120 'changePasswordFormRetypePassphraseLabel':"确认密码短语",
124 'changePasswordFormSafetyCheckboxLabel':"我知道 Clipperz 不能找回丢失的密码短语", 121 'changePasswordFormSafetyCheckboxLabel':"我知道 Clipperz 不能找回丢失的密码短语",
125 'changePasswordFormSubmitLabel':"修改密码短语", 122 'changePasswordFormSubmitLabel':"修改密码短语",
126 'changePasswordFormWrongUsernameWarning':"用户名错误", 123 'changePasswordFormWrongUsernameWarning':"用户名错误",
127 'changePasswordFormWrongPassphraseWarning':"旧密码短语错误", 124 'changePasswordFormWrongPassphraseWarning':"旧密码短语错误",
128 'changePasswordFormWrongRetypePassphraseWarning':"两次密码短语不同,请重新输入", 125 'changePasswordFormWrongRetypePassphraseWarning':"两次密码短语不同,请重新输入",
129 'changePasswordFormSafetyCheckWarning':"请阅读并检查下面的选项框", 126 'changePasswordFormSafetyCheckWarning':"请阅读并检查下面的选项框",
130 'changePasswordFormProgressDialogTitle':"正在修改密码短语", 127 'changePasswordFormProgressDialogTitle':"正在修改密码短语",
131 'changePasswordFormProgressDialogConnectedMessageTitle':"连接", 128 'changePasswordFormProgressDialogConnectedMessageTitle':"连接",
132 'changePasswordFormProgressDialogConnectedMessageText':"完成", 129 'changePasswordFormProgressDialogConnectedMessageText':"完成",
133 'changePasswordFormProgressDialogErrorMessageTitle':"错误", 130 'changePasswordFormProgressDialogErrorMessageTitle':"错误",
134 'changePasswordFormProgressDialogErrorMessageText':"证书修改失败", 131 'changePasswordFormProgressDialogErrorMessageText':"证书修改失败",
135 'changeCredentialsPanelEncryptingDataMessageTitle':"正在修改你的密码短语", 132 'changeCredentialsPanelEncryptingDataMessageTitle':"正在修改你的密码短语",
136 'changeCredentialsPanelEncryptingDataMessageText':"加密卡报头本地解密", 133 'changeCredentialsPanelEncryptingDataMessageText':"加密卡报头本地解密",
137 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"正在修改你的密码短语", 134 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"正在修改你的密码短语",
138 'changeCredentialsPanelCreatingNewCredentialsMessageText':"更新你的证书", 135 'changeCredentialsPanelCreatingNewCredentialsMessageText':"更新你的证书",
139 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"正在修改你的密码短语", 136 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"正在修改你的密码短语",
140 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"正在上传本地证书到 Clipperz", 137 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"正在上传本地证书到 Clipperz",
141 'changeCredentialsPanelDoneMessageTitle':"正在修改你的密码短语", 138 'changeCredentialsPanelDoneMessageTitle':"正在修改你的密码短语",
142 'changeCredentialsPanelDoneMessageText':"完成", 139 'changeCredentialsPanelDoneMessageText':"完成",
143 'manageOTPTabLabel':"管理你的一次性密码短语", 140 'manageOTPTabLabel':"管理你的一次性密码短语",
144 'manageOTPTabTitle':"管理你的一次性密码短语", 141 'manageOTPTabTitle':"管理你的一次性密码短语",
145 'manageOTPTabDescription':"<p>一次性密码短语工作起来和一般的密码短语一样,但是只可以使用一次</p> <p>如果同样的密码短语在一段时间以内再次登录,会被拒绝。登录进程将会失败。</p> <p>为了防止任何欺诈登录,在成功登陆之后,你的一次性密码将会立即被删除,</p> <p>如果一次性密码被键盘记录程序或者间谍软件得到,可能会从被感染的机器上收集数据,这样的话,一次性密码绝对是个很好的选择。</p> <p> <b>强烈建议在公共场合登录 Clipperz 时,使用一次性密码。比如公关计算机,网吧,图书馆等</b> </p> ", 142 'manageOTPTabDescription':"<p>一次性密码短语工作起来和一般的密码短语一样,但是只可以使用一次</p> <p>如果同样的密码短语在一段时间以内再次登录,会被拒绝。登录进程将会失败。</p> <p>为了防止任何欺诈登录,在成功登陆之后,你的一次性密码将会立即被删除,</p> <p>如果一次性密码被键盘记录程序或者间谍软件得到,可能会从被感染的机器上收集数据,这样的话,一次性密码绝对是个很好的选择。</p> <p> <b>强烈建议在公共场合登录 Clipperz 时,使用一次性密码。比如公关计算机,网吧,图书馆等</b> </p> ",
146 'oneTimePasswordReadOnlyMessage':"<h6>对不起!</h6> <p>你不能从离线版本管理你的一次性密码短语</p> ", 143 'oneTimePasswordReadOnlyMessage':"<h6>对不起!</h6> <p>你不能从离线版本管理你的一次性密码短语</p> ",
147 'oneTimePasswordLoadingMessage':"<h6>加载数据</h6> <p>请等待 ...</p> ", 144 'oneTimePasswordLoadingMessage':"<h6>加载数据</h6> <p>请等待 ...</p> ",
148 'oneTimePasswordNoPasswordAvailable':"<h6>一次性密码短语没有激活</h6> <p>点击“新建”按钮添加一次性密码短语到你的帐户</p> ", 145 'oneTimePasswordNoPasswordAvailable':"<h6>一次性密码短语没有激活</h6> <p>点击“新建”按钮添加一次性密码短语到你的帐户</p> ",
149 'createNewOTPButtonLabel':"新建", 146 'createNewOTPButtonLabel':"新建",
150 'deleteOTPButtonLabel':"删除", 147 'deleteOTPButtonLabel':"删除",
151 'printOTPButtonLabel':"打印", 148 'printOTPButtonLabel':"打印",
152 'disabledOneTimePassword_warning':"禁用", 149 'disabledOneTimePassword_warning':"禁用",
153 'oneTimePasswordSelectionLink_selectLabel':"选择:", 150 'oneTimePasswordSelectionLink_selectLabel':"选择:",
154 'oneTimePasswordSelectionLink_all':"所有", 151 'oneTimePasswordSelectionLink_all':"所有",
155 'oneTimePasswordSelectionLink_none':"没有", 152 'oneTimePasswordSelectionLink_none':"没有",
156 'oneTimePasswordSelectionLink_used':"被使用", 153 'oneTimePasswordSelectionLink_used':"被使用",
157 'oneTimePasswordSelectionLink_unused':"未使用", 154 'oneTimePasswordSelectionLink_unused':"未使用",
158 'saveOTP_encryptUserDataTitle':"保存一次性密码短语", 155 'saveOTP_encryptUserDataTitle':"保存一次性密码短语",
159 'saveOTP_encryptUserDataText':"处理新的 OTP 证书 ...", 156 'saveOTP_encryptUserDataText':"处理新的 OTP 证书 ...",
160 'saveOTP_encryptOTPDataTitle':"保存一次性密码短语", 157 'saveOTP_encryptOTPDataTitle':"保存一次性密码短语",
161 'saveOTP_encryptOTPDataText':"本地解密认证数据 ...", 158 'saveOTP_encryptOTPDataText':"本地解密认证数据 ...",
162 'saveOTP_sendingDataTitle':"保存一次性密码短语", 159 'saveOTP_sendingDataTitle':"保存一次性密码短语",
163 'saveOTP_sendingDataText':"发送信任数据到服务器 ...", 160 'saveOTP_sendingDataText':"发送信任数据到服务器 ...",
164 'saveOTP_updatingInterfaceTitle':"保存一次性密码短语", 161 'saveOTP_updatingInterfaceTitle':"保存一次性密码短语",
165 'saveOTP_updatingInterfaceText':"更新界面...", 162 'saveOTP_updatingInterfaceText':"更新界面...",
166 'accountPreferencesLabel':"使用偏好", 163 'accountPreferencesLabel':"使用偏好",
167 'accountPreferencesTabTitle':"使用偏好", 164 'accountPreferencesTabTitle':"使用偏好",
168 'accountPreferencesLanguageTitle':"界面语言选择", 165 'accountPreferencesLanguageTitle':"界面语言选择",
169 'accountPreferencesLanguageDescription':"<p>在下拉菜单中选择你的首选语言</p> ", 166 'accountPreferencesLanguageDescription':"<p>在下拉菜单中选择你的首选语言</p> ",
170 'showDonationReminderPanelTitle':"捐赠提示", 167 'showDonationReminderPanelTitle':"捐赠提示",
171 'showDonationReminderPanelDescription':"<p>显示捐赠提示</p> ", 168 'showDonationReminderPanelDescription':"<p>显示捐赠提示</p> ",
172 'saveUserPreferencesFormSubmitLabel':"保存", 169 'saveUserPreferencesFormSubmitLabel':"保存",
173 'cancelUserPreferencesFormSubmitLabel':"取消", 170 'cancelUserPreferencesFormSubmitLabel':"取消",
174 'accountPreferencesSavingPanelTitle_Step1':"保存使用偏好", 171 'accountPreferencesSavingPanelTitle_Step1':"保存使用偏好",
175 'accountPreferencesSavingPanelText_Step1':"本地加密你的使用偏好", 172 'accountPreferencesSavingPanelText_Step1':"本地加密你的使用偏好",
176 'accountPreferencesSavingPanelTitle_Step2':"保存使用偏好", 173 'accountPreferencesSavingPanelTitle_Step2':"保存使用偏好",
177 'accountPreferencesSavingPanelText_Step2':"正在向 Clipperz 传送加密后的使用偏好", 174 'accountPreferencesSavingPanelText_Step2':"正在向 Clipperz 传送加密后的使用偏好",
178 'accountLoginHistoryLabel':"登录历史", 175 'accountLoginHistoryLabel':"登录历史",
179 'loginHistoryTabTitle':"登录历史", 176 'loginHistoryTabTitle':"登录历史",
180 'loginHistoryReadOnlyMessage':"<h6>对不起!</h6> <p>当你使用离线版本时登录历史是无法显示的</p> ", 177 'loginHistoryReadOnlyMessage':"<h6>对不起!</h6> <p>当你使用离线版本时登录历史是无法显示的</p> ",
181 'loginHistoryLoadingMessage':"<h6>加载数据</h6> <p>请等待 ...</p> ", 178 'loginHistoryLoadingMessage':"<h6>加载数据</h6> <p>请等待 ...</p> ",
182 'loginHistoryLoadedMessage':"<h6>您的最近 10 次登陆</h6> <p> </p> ", 179 'loginHistoryLoadedMessage':"<h6>您的最近 10 次登陆</h6> <p> </p> ",
183 'loginHistoryIPLabel':"IP", 180 'loginHistoryIPLabel':"IP",
184 'loginHistoryTimeLabel':"时间", 181 'loginHistoryTimeLabel':"时间",
185 'loginHistoryCurrentSessionText':"当前登录信息", 182 'loginHistoryCurrentSessionText':"当前登录信息",
186 'loginHistoryReloadButtonLabel':"刷新登录历史", 183 'loginHistoryReloadButtonLabel':"刷新登录历史",
187 'deleteAccountTabLabel':"删除你的账户", 184 'deleteAccountTabLabel':"删除你的账户",
188 'deleteAccountTabTitle':"删除你的账户", 185 'deleteAccountTabTitle':"删除你的账户",
189 'deleteAccountFormUsernameLabel':"用户名", 186 'deleteAccountFormUsernameLabel':"用户名",
190 'deleteAccountFormPassphraseLabel':"密码短语", 187 'deleteAccountFormPassphraseLabel':"密码短语",
191 'deleteAccountFormSafetyCheckboxLabel':"我知道我的所有数据将被删除,并且是不可回复的.", 188 'deleteAccountFormSafetyCheckboxLabel':"我知道我的所有数据将被删除,并且是不可回复的.",
192 'deleteAccountFormSubmitLabel':"删除我的账户", 189 'deleteAccountFormSubmitLabel':"删除我的账户",
193 'deleteAccountFormWrongUsernameWarning':"用户名错误", 190 'deleteAccountFormWrongUsernameWarning':"用户名错误",
194 'deleteAccountFormWrongPassphraseWarning':"密码短语错误", 191 'deleteAccountFormWrongPassphraseWarning':"密码短语错误",
195 'deleteAccountFormSafetyCheckWarning':"请阅读并检查下面的选项框", 192 'deleteAccountFormSafetyCheckWarning':"请阅读并检查下面的选项框",
196 'accountPanelDeletingAccountPanelConfirmationTitle':"注意", 193 'accountPanelDeletingAccountPanelConfirmationTitle':"注意",
197 'accountPanelDeleteAccountPanelConfirmationText':"你确认要删除你的帐户", 194 'accountPanelDeleteAccountPanelConfirmationText':"你确认要删除你的帐户",
198 'accountPanelDeleteAccountPanelConfirmButtonLabel':"是", 195 'accountPanelDeleteAccountPanelConfirmButtonLabel':"是",
199 'accountPanelDeleteAccountPanelDenyButtonLabel':"否", 196 'accountPanelDeleteAccountPanelDenyButtonLabel':"否",
200 'offlineCopyTabLabel':"离线拷贝", 197 'offlineCopyTabLabel':"离线拷贝",
201 'offlineCopyTabTitle':"离线拷贝", 198 'offlineCopyTabTitle':"离线拷贝",
202 'offlineCopyTabDescription':"<p>只需点击一次就可以从 Clipperz 服务器下载所有加密数据到你的硬盘,让你在不能连接互联网的时候使用离线只读版本的 Clipperz。</p> <p>你下载的离线数据和登陆我们网站在线使用是一样安全的,它们使用了同样的密码和安全体系,都不会有暴露数据的风险。</p> <ol> <li> <p>点击链接后开始下载。</p> </li> <li> <p>浏览器会问你如何处理 “Clipperz_YYYYMMDD.html” 文件。保存这个文件到你的硬盘。</p> </li> <li> <p>双击下载的文件在浏览器运行离线版本。</p> </li> <li> <p>输入你的用户名和密码短语。</p> </li> </ol> ", 199 'offlineCopyTabDescription':"<p>只需点击一次就可以从 Clipperz 服务器下载所有加密数据到你的硬盘,让你在不能连接互联网的时候使用离线只读版本的 Clipperz。</p> <p>你下载的离线数据和登陆我们网站在线使用是一样安全的,它们使用了同样的密码和安全体系,都不会有暴露数据的风险。</p> <ol> <li> <p>点击链接后开始下载。</p> </li> <li> <p>浏览器会问你如何处理 “Clipperz_YYYYMMDD.html” 文件。保存这个文件到你的硬盘。</p> </li> <li> <p>双击下载的文件在浏览器运行离线版本。</p> </li> <li> <p>输入你的用户名和密码短语。</p> </li> </ol> ",
203 'offlineCopyDownloadLinkLabel':"下载", 200 'offlineCopyDownloadLinkLabel':"下载",
204 'offlineCopyDownloadWarning':"<h4> <a href=\"#\" id=\"offlineCopyDownloadWarningLink\">更新你的“离线版本”!</a> </h4> <p>你最近创建或修改了卡片,需要下载新的“离线版本”</p> ", 201 'offlineCopyDownloadWarning':"<h4> <a href=\"#\" id=\"offlineCopyDownloadWarningLink\">更新你的“离线版本”!</a> </h4> <p>你最近创建或修改了卡片,需要下载新的“离线版本”</p> ",
205 'sharingTabLabel':"共享", 202 'sharingTabLabel':"共享",
206 'sharingTabTitle':"共享", 203 'sharingTabTitle':"共享",
207 'sharingTabDescription':"<p>往往一个机密的资料需要另外一个人或者多人共同使用</p> <p>你可以在这里设置一个简单的授权码,以便在离开办公室的时候你的同事可以访问你的邮箱,或者设置一个复杂的,当你去世后子孙可以在这里找到取得银行保险箱的方法。</p> <p>Clipperz 可以安全并且简单的分享你的密码</p> <p> </p> <p> <b>即将发布...</b> </p> ", 204 'sharingTabDescription':"<p>往往一个机密的资料需要另外一个人或者多人共同使用</p> <p>你可以在这里设置一个简单的授权码,以便在离开办公室的时候你的同事可以访问你的邮箱,或者设置一个复杂的,当你去世后子孙可以在这里找到取得银行保险箱的方法。</p> <p>Clipperz 可以安全并且简单的分享你的密码</p> <p> </p> <p> <b>即将发布...</b> </p> ",
208 'importTabLabel':"导入", 205 'importTabLabel':"导入",
209 'importTabTitle':"导入", 206 'importTabTitle':"导入",
210 'importTabDescription':"<p> <b>即将发布 ...</b> </p> ", 207 'importTabDescription':"<p> <b>即将发布 ...</b> </p> ",
211 'printingTabLabel':"导出", 208 'printingTabLabel':"导出",
212 'printingTabTitle':"导出", 209 'printingTabTitle':"导出",
213 'printingTabDescription':"<p> <b>打印你的数据</b> </p> <p>点击下面的链接,将会打开一个新窗口,以打印格式显示你的密码卡片</p> <p>如果你打印下来是为了备份,请考虑使用我们提供的\"离线版本\",这比打印更安全。</p> ", 210 'printingTabDescription':"<p> <b>打印你的数据</b> </p> <p>点击下面的链接,将会打开一个新窗口,以打印格式显示你的密码卡片</p> <p>如果你打印下来是为了备份,请考虑使用我们提供的\"离线版本\",这比打印更安全。</p> ",
214 'printingLinkLabel':"打印版本", 211 'printingLinkLabel':"打印版本",
215 'contactsTabLabel':"联系", 212 'contactsTabLabel':"联系",
216 'contactsTabTitle':"联系", 213 'contactsTabTitle':"联系",
217 'passwordGeneratorTabLabel':"随机密码生成器", 214 'passwordGeneratorTabLabel':"随机密码生成器",
218 'passwordGeneratorTabTitle':"随机密码生成器", 215 'passwordGeneratorTabTitle':"随机密码生成器",
219 'passwordGeneratorTabButtonLabel':"生成随机密码", 216 'passwordGeneratorTabButtonLabel':"生成随机密码",
220 'bookmarkletTabLabel':"书签按钮", 217 'bookmarkletTabLabel':"书签按钮",
221 'bookmarkletTabTitle':"书签按钮", 218 'bookmarkletTabTitle':"书签按钮",
222 'bookmarkletTabDescription':"<p>这个书签按钮是一个简单的非常有用的“一键”工具,它能像一般网站一样储存并且使用</p> <p>Clipperz 按钮书签可以帮助你快速建立密码卡片并且用存在的密码卡片直接登录</p> <p> <b>请注意,这个书签按钮不包含你账户中的任何信息(例如你的用户名和密码),对所有的 Clipperz 使用者,这个书签按钮是大家的工具,代码都是相同的。</b> </p> <h3>怎样安装书签按钮</h3> <h5>Firefox, Camino, Opera, Safari</h5> <ol> <li> <p>选择 “查看 > 工具栏 > 书签工具栏” 确认 “书签工具栏” 显示在浏览器菜单上。</p> </li> <li> <p>拖动 “添加到 Clipperz” 链接到书签工具栏。</p> </li> </ol> <h5>Internet Explorer</h5> <ol> <li> <p>选择 “查看 > 工具栏 > 链接” 确认 “链接” 显示在浏览器菜单上。</p> </li> <li> <p>右键 “添加到 Clipperz”</p> </li> <li> <p>选择 “添加到收藏夹”</p> </li> <li> <p>如果弹出安全提示选择 “是”</p> </li> <li> <p>打开 “链接” 文件夹后单击 “添加”</p> </li> </ol> ", 219 'bookmarkletTabDescription':"<p>这个书签按钮是一个简单的非常有用的“一键”工具,它能像一般网站一样储存并且使用</p> <p>Clipperz 按钮书签可以帮助你快速建立密码卡片并且用存在的密码卡片直接登录</p> <p> <b>请注意,这个书签按钮不包含你账户中的任何信息(例如你的用户名和密码),对所有的 Clipperz 使用者,这个书签按钮是大家的工具,代码都是相同的。</b> </p> <h3>怎样安装书签按钮</h3> <h5>Firefox, Camino, Opera, Safari</h5> <ol> <li> <p>选择 “查看 > 工具栏 > 书签工具栏” 确认 “书签工具栏” 显示在浏览器菜单上。</p> </li> <li> <p>拖动 “添加到 Clipperz” 链接到书签工具栏。</p> </li> </ol> <h5>Internet Explorer</h5> <ol> <li> <p>选择 “查看 > 工具栏 > 链接” 确认 “链接” 显示在浏览器菜单上。</p> </li> <li> <p>右键 “添加到 Clipperz”</p> </li> <li> <p>选择 “添加到收藏夹”</p> </li> <li> <p>如果弹出安全提示选择 “是”</p> </li> <li> <p>打开 “链接” 文件夹后单击 “添加”</p> </li> </ol> ",
223 'bookmarkletTabBookmarkletTitle':"添加到 Clipperz", 220 'bookmarkletTabBookmarkletTitle':"添加到 Clipperz",
224 'bookmarkletTabInstructions':"<h3>如何在一个在线服务中创建可以直接登录的新的密码卡片</h3> <ol> <li> <p>打开你要登录的页面(这个页面通常就是你输入登录信息的页面)</p> </li> <li> <p>点击书签按钮,会出现一个新的弹出窗口</p> </li> <li> <p>复制弹出窗口中的所有文本到剪贴板(ctrl+c)</p> </li> <li> <p>登录你的 Clipperz 账户,然后点击 <b>新建密码卡片</b> 按钮</p> </li> <li> <p>选择“直接登录”模板,之后粘贴剪贴板中的内容到大文本框(ctrl+v)</p> </li> <li> <p>按下 <b>创建</b> 按钮,检查细节并且点击 <b>保存</b>.</p> </li> </ol> <h3>对于已经存在的密码卡片如何添加直接登陆</h3> <ol> <li> <p>与上面的步骤相同</p> </li> <li> <p>与上面的步骤相同</p> </li> <li> <p>与上面的步骤相同</p> </li> <li> <p>输入你的 Clipperz 帐号,选择你刚刚访问的网络服务的密码卡片然后点击 <b>编辑</b> 按钮.</p> </li> <li> <p>将剪贴板中的内容粘贴到“直接登录”区域的大文本框中 (ctrl-V)</p> </li> <li> <p>点击添加 <b>自动登录</b> 按钮,检查细节并且点击k <b>保存</b>.</p> </li> </ol> <p> </p> <p>如果需要关于书签按钮的进一步资料可以在 <a href=\"http://www.clipperz.com/support/user_guide/bookmarklet\" target=\"_blank\">这里获得</a>.</p> ", 221 'bookmarkletTabInstructions':"<h3>如何在一个在线服务中创建可以直接登录的新的密码卡片</h3> <ol> <li> <p>打开你要登录的页面(这个页面通常就是你输入登录信息的页面)</p> </li> <li> <p>点击书签按钮,会出现一个新的弹出窗口</p> </li> <li> <p>复制弹出窗口中的所有文本到剪贴板(ctrl+c)</p> </li> <li> <p>登录你的 Clipperz 账户,然后点击 <b>新建密码卡片</b> 按钮</p> </li> <li> <p>选择“直接登录”模板,之后粘贴剪贴板中的内容到大文本框(ctrl+v)</p> </li> <li> <p>按下 <b>创建</b> 按钮,检查细节并且点击 <b>保存</b>.</p> </li> </ol> <h3>对于已经存在的密码卡片如何添加直接登陆</h3> <ol> <li> <p>与上面的步骤相同</p> </li> <li> <p>与上面的步骤相同</p> </li> <li> <p>与上面的步骤相同</p> </li> <li> <p>输入你的 Clipperz 帐号,选择你刚刚访问的网络服务的密码卡片然后点击 <b>编辑</b> 按钮.</p> </li> <li> <p>将剪贴板中的内容粘贴到“直接登录”区域的大文本框中 (ctrl-V)</p> </li> <li> <p>点击添加 <b>自动登录</b> 按钮,检查细节并且点击k <b>保存</b>.</p> </li> </ol> <p> </p> <p>如果需要关于书签按钮的进一步资料可以在 <a href=\"http://www.clipperz.com/support/user_guide/bookmarklet\" target=\"_blank\">这里获得</a>.</p> ",
225 'mainPanelDirectLoginBlockLabel':"直接登录", 222 'mainPanelDirectLoginBlockLabel':"直接登录",
226 'directLinkReferenceShowButtonLabel':"显示", 223 'directLinkReferenceShowButtonLabel':"显示",
227 'mainPanelDirectLoginBlockDescription':"<p>添加 “直接登录” 可以让你不用输入用户名和密码即可登录网络账户</p> <p>“直接登录” 可以大大提高你的密码安全性,因为你可以:</p> <ul> <li> <p>方便选择和输入复杂的密码</p> </li> <li> <p>永远不再使用相同的,容易猜测的密码</p> </li> </ul> <p>用 Clipperz 书签按钮简单快速的配置</p> <a href=\"http://www.clipperz.com/support/user_guide/direct_logins\" target=\"_blank\">关于 “直接登录” 的更多信息</a> ", 224 'mainPanelDirectLoginBlockDescription':"<p>添加 “直接登录” 可以让你不用输入用户名和密码即可登录网络账户</p> <p>“直接登录” 可以大大提高你的密码安全性,因为你可以:</p> <ul> <li> <p>方便选择和输入复杂的密码</p> </li> <li> <p>永远不再使用相同的,容易猜测的密码</p> </li> </ul> <p>用 Clipperz 书签按钮简单快速的配置</p> <a href=\"http://www.clipperz.com/support/user_guide/direct_logins\" target=\"_blank\">关于 “直接登录” 的更多信息</a> ",
228 'mainPanelRecordsBlockLabel':"密码卡片", 225 'mainPanelRecordsBlockLabel':"密码卡片",
229 'mainPanelAddRecordButtonLabel':"添加新密码卡片", 226 'mainPanelAddRecordButtonLabel':"添加新密码卡片",
230 'mainPanelRemoveRecordButtonLabel':"删除密码卡片", 227 'mainPanelRemoveRecordButtonLabel':"删除密码卡片",
231 'mainPanelRecordFilterBlockAllLabel':"所有", 228 'mainPanelRecordFilterBlockAllLabel':"所有",
232 'mainPanelRecordFilterBlockTagsLabel':"标签", 229 'mainPanelRecordFilterBlockTagsLabel':"标签",
233 'mainPanelRecordFilterBlockSearchLabel':"搜索", 230 'mainPanelRecordFilterBlockSearchLabel':"搜索",
234 'recordDetailNoRecordAtAllTitle':"欢迎来到 Clipperz!", 231 'recordDetailNoRecordAtAllTitle':"欢迎来到 Clipperz!",
235 'recordDetailNoRecordAtAllDescription':"<h5>从你的账户添加密码卡片开始</h5> <p>密码卡片是简单灵活的方式,在这里你可以保存你的密码和其他机密资料.</p> <p>密码卡片含有一个全权访问网站的证书,你的通讯录,你的信用卡信息,……</p> <h5>不要忘记书签按钮</h5> <p>在你开始前,安装 “添加到 Clipperz” 书签按钮:它将使创建密码卡片变得简单并且有趣</p> <p>去书签按钮标签了解如何安装并使用它</p> <p> </p> <p>然后只需单击 “添加密码卡片” 按钮,即可尽情享受 Clipperz 帐户.</p> <p> <a href=\"http://www.clipperz.com/support/user_guide/managing_cards\" target=\"_blank\">关于创建和管理密码卡片的更多信息</a> </p> ", 232 'recordDetailNoRecordAtAllDescription':"<h5>从你的账户添加密码卡片开始</h5> <p>密码卡片是简单灵活的方式,在这里你可以保存你的密码和其他机密资料.</p> <p>密码卡片含有一个全权访问网站的证书,你的通讯录,你的信用卡信息,……</p> <h5>不要忘记书签按钮</h5> <p>在你开始前,安装 “添加到 Clipperz” 书签按钮:它将使创建密码卡片变得简单并且有趣</p> <p>去书签按钮标签了解如何安装并使用它</p> <p> </p> <p>然后只需单击 “添加密码卡片” 按钮,即可尽情享受 Clipperz 帐户.</p> <p> <a href=\"http://www.clipperz.com/support/user_guide/managing_cards\" target=\"_blank\">关于创建和管理密码卡片的更多信息</a> </p> ",
236 'newRecordWizardTitleBox':"<h5>请选择一个模板</h5> <p>密码卡片是简单灵活的方式,在这里你可以保存你的密码和其他机密资料.</p> <p>首先选择下面的一个模板。在添加或者删除以后,可以随时定制你的密码卡片.</p> ", 233 'newRecordWizardTitleBox':"<h5>请选择一个模板</h5> <p>密码卡片是简单灵活的方式,在这里你可以保存你的密码和其他机密资料.</p> <p>首先选择下面的一个模板。在添加或者删除以后,可以随时定制你的密码卡片.</p> ",
237 'newRecordWizardBookmarkletConfigurationTitle':"直接登陆", 234 'newRecordWizardBookmarkletConfigurationTitle':"直接登陆",
238 'newRecordWizardBookmarkletConfigurationDescription':"<p>将从 Clipperz 书签按钮得到的代码粘贴到下面的文本框中</p> <p>一个直接登陆你的网络账户的新密码卡片将要被创建完成</p> ", 235 'newRecordWizardBookmarkletConfigurationDescription':"<p>将从 Clipperz 书签按钮得到的代码粘贴到下面的文本框中</p> <p>一个直接登陆你的网络账户的新密码卡片将要被创建完成</p> ",
239 'newRecordWizardCreateButtonLabel':"创建", 236 'newRecordWizardCreateButtonLabel':"创建",
240 'newRecordWizardCancelButtonLabel':"取消", 237 'newRecordWizardCancelButtonLabel':"取消",
241 'donateSplashPanelTitle':"今天就捐赠支持 Clipperz!", 238 'donateSplashPanelTitle':"今天就捐赠支持 Clipperz!",
242 'donateSplashPanelDescription':"<p>捐赠我们的原因:</p> <ul> <li> <p>支持新特性的开发</p> </li> <li> <p>保持 Clipperz 的免费</p> </li> <li> <p>对我们的辛勤工作表示感谢</p> </li> </ul> <p> <a href=\"http://www.clipperz.com/donations\" target=\"_blank\">进一步资料,请浏览我们的捐款页</a>.</p> <p> <b>愿意捐款?</b> </p> ", 239 'donateSplashPanelDescription':"<p>捐赠我们的原因:</p> <ul> <li> <p>支持新特性的开发</p> </li> <li> <p>保持 Clipperz 的免费</p> </li> <li> <p>对我们的辛勤工作表示感谢</p> </li> </ul> <p> <a href=\"http://www.clipperz.com/donations\" target=\"_blank\">进一步资料,请浏览我们的捐款页</a>.</p> <p> <b>愿意捐款?</b> </p> ",
243 'donateCloseButtonLabel':"不必了", 240 'donateCloseButtonLabel':"不必了",
244 'donateDonateButtonLabel':"是", 241 'donateDonateButtonLabel':"是",
245 'recordTemplates':{ 242 'recordTemplates':{
246 'WebAccount':{ 243 'WebAccount':{
247 'title':"网站密码", 244 'title':"网站密码",
248 'description':"<p>为您的网上服务提供简单的密码储存,自动登录服务.</p> ", 245 'description':"<p>为您的网上服务提供简单的密码储存,自动登录服务.</p> ",
249 'fields':{ 246 'fields':{
250 'URL':"网址", 247 'URL':"网址",
251 'TXT':"用户名或者电子邮件地址", 248 'TXT':"用户名或者电子邮件地址",
252 'PWD':"密码" 249 'PWD':"密码"
253 } 250 }
254 }, 251 },
255 'BankAccount':{ 252 'BankAccount':{
256 'title':"银行帐户", 253 'title':"银行帐户",
257 'description':"<p>安全储存你的银行账号和网上银行证书.</p> ", 254 'description':"<p>安全储存你的银行账号和网上银行证书.</p> ",
258 'fields':{ 255 'fields':{
259 'TXT':"银行", 256 'TXT':"银行",
260 'TXT':"帐号", 257 'TXT':"帐号",
261 'URL':"银行网站", 258 'URL':"银行网站",
262 'TXT':"在线银行 ID", 259 'TXT':"在线银行 ID",
263 'PWD':"在线银行密码" 260 'PWD':"在线银行密码"
264 } 261 }
265 }, 262 },
266 'CreditCard':{ 263 'CreditCard':{
267 'title':"信用卡", 264 'title':"信用卡",
268 'description':"<p>信用卡号码,有效日期,CVV2和PIN 都由 Clipperz 管理</p> ", 265 'description':"<p>信用卡号码,有效日期,CVV2和PIN 都由 Clipperz 管理</p> ",
269 'fields':{ 266 'fields':{
270 'TXT':"类型(VISA, AmEx, ...)", 267 'TXT':"类型(VISA, AmEx, ...)",
271 'TXT':"号码", 268 'TXT':"号码",
272 'TXT':"持卡人姓名", 269 'TXT':"持卡人姓名",
273 'TXT':"有效日期", 270 'TXT':"有效日期",
274 'TXT':"CVV2", 271 'TXT':"CVV2",
275 'PWD':"PIN", 272 'PWD':"PIN",
276 'URL':"信用卡网站", 273 'URL':"信用卡网站",
277 'TXT':"用户名", 274 'TXT':"用户名",
278 'PWD':"密码" 275 'PWD':"密码"
279 } 276 }
280 }, 277 },
281 'AddressBookEntry':{ 278 'AddressBookEntry':{
282 'title':"通讯录条目", 279 'title':"通讯录条目",
283 'description':"<p>Clipperz 同样可以为你的私人通讯录服务. 使用这个模板,轻易添加新的条目.</p> ", 280 'description':"<p>Clipperz 同样可以为你的私人通讯录服务. 使用这个模板,轻易添加新的条目.</p> ",
284 'fields':{ 281 'fields':{
285 'TXT':"姓名", 282 'TXT':"姓名",
286 'TXT':"电子邮件", 283 'TXT':"电子邮件",
287 'TXT':"电话", 284 'TXT':"电话",
288 'TXT':"手机", 285 'TXT':"手机",
289 'ADDR':"地址" 286 'ADDR':"地址"
290 } 287 }
291 }, 288 },
292 'Custom':{ 289 'Custom':{
293 'title':"定制密码卡片", 290 'title':"定制密码卡片",
294 'description':"<p>无论你需要保护哪种类型的机密数据,创建定制密码卡片便可满足你的需求</p> ", 291 'description':"<p>无论你需要保护哪种类型的机密数据,创建定制密码卡片便可满足你的需求</p> ",
295 'fields':{ 292 'fields':{
296 'TXT':"标签 1", 293 'TXT':"标签 1",
297 'TXT':"标签 2", 294 'TXT':"标签 2",
298 'TXT':"标签 3" 295 'TXT':"标签 3"
299 } 296 }
300 } 297 }
301}, 298},
302 'recordFieldTypologies':{ 299 'recordFieldTypologies':{
303 'TXT':{ 300 'TXT':{
304 'description':"simple text field", 301 'description':"simple text field",
305 'shortDescription':"文字" 302 'shortDescription':"文字"
306 }, 303 },
307 'PWD':{ 304 'PWD':{
308 'description':"simple text field, with default status set to hidden", 305 'description':"simple text field, with default status set to hidden",
309 'shortDescription':"密码" 306 'shortDescription':"密码"
310 }, 307 },
311 'URL':{ 308 'URL':{
312 'description':"simple text field in edit mode, that became an active url in view mode", 309 'description':"simple text field in edit mode, that became an active url in view mode",
313 'shortDescription':"网址" 310 'shortDescription':"网址"
314 }, 311 },
315 'DATE':{ 312 'DATE':{
316 'description':"a value set with a calendar helper", 313 'description':"a value set with a calendar helper",
317 'shortDescription':"数据" 314 'shortDescription':"数据"
318 }, 315 },
319 'ADDR':{ 316 'ADDR':{
320 'description':"just like the URL, but the active link points to Google Maps (or similar service) passing the address value as argument", 317 'description':"just like the URL, but the active link points to Google Maps (or similar service) passing the address value as argument",
321 'shortDescription':"地址" 318 'shortDescription':"地址"
322 }, 319 },
323 'CHECK':{ 320 'CHECK':{
324 'description':"check description", 321 'description':"check description",
325 'shortDescription':"check" 322 'shortDescription':"check"
326 }, 323 },
327 'RADIO':{ 324 'RADIO':{
328 'description':"radio description", 325 'description':"radio description",
329 'shortDescription':"radio" 326 'shortDescription':"radio"
330 }, 327 },
331 'SELECT':{ 328 'SELECT':{
332 'description':"select description", 329 'description':"select description",
333 'shortDescription':"select" 330 'shortDescription':"select"
334 } 331 }
335}, 332},
336 'newRecordPanelGeneralExceptionTitle':"错误", 333 'newRecordPanelGeneralExceptionTitle':"错误",
337 'newRecordPanelGeneralExceptionMessage':"配置文本不正确,请从书签中确认你的文本并且再试一次", 334 'newRecordPanelGeneralExceptionMessage':"配置文本不正确,请从书签中确认你的文本并且再试一次",
338 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"错误", 335 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"错误",
339 'newRecordPanelWrongBookmarkletVersionExceptionMessage':"配置文本已经产生了一个旧版本书签,请更新你的书签然后再试试。", 336 'newRecordPanelWrongBookmarkletVersionExceptionMessage':"配置文本已经产生了一个旧版本书签,请更新你的书签然后再试试。",
340 'newRecordPanelExceptionPanelCloseButtonLabel':"取消", 337 'newRecordPanelExceptionPanelCloseButtonLabel':"取消",
341 'mainPanelDeletingRecordPanelConfirmationTitle':"删除所选密码卡片", 338 'mainPanelDeletingRecordPanelConfirmationTitle':"删除所选密码卡片",
342 'mainPanelDeleteRecordPanelConfirmationText':"确认要删除选定的密码卡片?", 339 'mainPanelDeleteRecordPanelConfirmationText':"确认要删除选定的密码卡片?",
343 'mainPanelDeleteRecordPanelConfirmButtonLabel':"是", 340 'mainPanelDeleteRecordPanelConfirmButtonLabel':"是",
344 'mainPanelDeleteRecordPanelDenyButtonLabel':"否", 341 'mainPanelDeleteRecordPanelDenyButtonLabel':"否",
345 'mainPanelDeletingRecordPanelInitialTitle':"删除选定的密码卡片", 342 'mainPanelDeletingRecordPanelInitialTitle':"删除选定的密码卡片",
346 'mainPanelDeletingRecordPanelCompletedText':"完成", 343 'mainPanelDeletingRecordPanelCompletedText':"完成",
347 'deleteRecordPanelCollectRecordDataMessageTitle':"删除密码卡片", 344 'deleteRecordPanelCollectRecordDataMessageTitle':"删除密码卡片",
348 'deleteRecordPanelCollectRecordDataMessageText':"更新密码卡片列表", 345 'deleteRecordPanelCollectRecordDataMessageText':"更新密码卡片列表",
349 'deleteRecordPanelEncryptUserDataMessageTitle':"删除密码卡片", 346 'deleteRecordPanelEncryptUserDataMessageTitle':"删除密码卡片",
350 'deleteRecordPanelEncryptUserDataMessageText':"加密卡报头本地解密", 347 'deleteRecordPanelEncryptUserDataMessageText':"加密卡报头本地解密",
351 'deleteRecordPanelSendingDataToTheServerMessageTitle':"删除密码卡片", 348 'deleteRecordPanelSendingDataToTheServerMessageTitle':"删除密码卡片",
352 'deleteRecordPanelSendingDataToTheServerMessageText':"从 Clipperz 更新加密卡报头", 349 'deleteRecordPanelSendingDataToTheServerMessageText':"从 Clipperz 更新加密卡报头",
353 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"删除密码卡片", 350 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"删除密码卡片",
354 'deleteRecordPanelUpdatingTheInterfaceMessageText':"更新界面", 351 'deleteRecordPanelUpdatingTheInterfaceMessageText':"更新界面",
355 'recordDetailNoRecordSelectedTitle':"未选择密码卡片", 352 'recordDetailNoRecordSelectedTitle':"未选择密码卡片",
356 'recordDetailNoRecordSelectedDescription':"<p>从左边的列表中选择一个密码卡片</p> ", 353 'recordDetailNoRecordSelectedDescription':"<p>从左边的列表中选择一个密码卡片</p> ",
357 'recordDetailLoadingRecordMessage':"正在从 Clipperz 下载加密卡片", 354 'recordDetailLoadingRecordMessage':"正在从 Clipperz 下载加密卡片",
358 'recordDetailDecryptingRecordMessage':"密码卡片数据本地解密", 355 'recordDetailDecryptingRecordMessage':"密码卡片数据本地解密",
359 'recordDetailLoadingRecordVersionMessage':"下载最新版本的密码卡片", 356 'recordDetailLoadingRecordVersionMessage':"下载最新版本的密码卡片",
360 'recordDetailDecryptingRecordVersionMessage':"本地解密最新版本密码卡片", 357 'recordDetailDecryptingRecordVersionMessage':"本地解密最新版本密码卡片",
361 'recordDetailLoadingErrorMessageTitle':"密码卡片下载错误", 358 'recordDetailLoadingErrorMessageTitle':"密码卡片下载错误",
362 'recordDetailNotesLabel':"注释", 359 'recordDetailNotesLabel':"注释",
363 'recordDetailLabelFieldColumnLabel':"标签区域", 360 'recordDetailLabelFieldColumnLabel':"标签区域",
364 'recordDetailDataFieldColumnLabel':"数据区域", 361 'recordDetailDataFieldColumnLabel':"数据区域",
365 'recordDetailTypeFieldColumnLabel':"类型", 362 'recordDetailTypeFieldColumnLabel':"类型",
366 'recordDetailSavingChangesMessagePanelInitialTitle':"保存密码卡片", 363 'recordDetailSavingChangesMessagePanelInitialTitle':"保存密码卡片",
367 'recordDetailAddFieldButtonLabel':"添加新区域", 364 'recordDetailAddFieldButtonLabel':"添加新区域",
368 'recordDetailPasswordFieldHelpLabel':"点击星星复制密码到剪贴板,然后用 Ctrl+V 使用", 365 'recordDetailPasswordFieldHelpLabel':"点击星星复制密码到剪贴板,然后用 Ctrl+V 使用",
369 'recordDetailPasswordFieldScrambleLabel':"隐藏密码", 366 'recordDetailPasswordFieldScrambleLabel':"隐藏密码",
370 'recordDetailPasswordFieldUnscrambleLabel':"显示密码", 367 'recordDetailPasswordFieldUnscrambleLabel':"显示密码",
371 'recordDetailDirectLoginBlockTitle':"直接登录", 368 'recordDetailDirectLoginBlockTitle':"直接登录",
372 'recordDetailNewDirectLoginDescription':"<p>直接登录配置</p> ", 369 'recordDetailNewDirectLoginDescription':"<p>直接登录配置</p> ",
373 'recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription':"<p>这个密码卡片包含在线服务证书吗?</p> <p>仅仅单击就可以从 Clipperz 使用书签配置 “直接登录”</p> ", 370 'recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription':"<p>这个密码卡片包含在线服务证书吗?</p> <p>仅仅单击就可以从 Clipperz 使用书签配置 “直接登录”</p> ",
374 'recordDetailAddNewDirectLoginButtonLabel':"添加新的直接登录", 371 'recordDetailAddNewDirectLoginButtonLabel':"添加新的直接登录",
375 'recordDetailEditButtonLabel':"编辑", 372 'recordDetailEditButtonLabel':"编辑",
376 'recordDetailSaveButtonLabel':"保存", 373 'recordDetailSaveButtonLabel':"保存",
377 'recordDetailCancelButtonLabel':"取消", 374 'recordDetailCancelButtonLabel':"取消",
378 'newRecordTitleLabel':"_新密码卡片_", 375 'newRecordTitleLabel':"_新密码卡片_",
379 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"保存密码卡片", 376 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"保存密码卡片",
380 'recordSaveChangesPanelCollectRecordInfoMessageText':"更新密码卡片报头", 377 'recordSaveChangesPanelCollectRecordInfoMessageText':"更新密码卡片报头",
381 'recordSaveChangesPanelEncryptUserDataMessageTitle':"保存密码卡片", 378 'recordSaveChangesPanelEncryptUserDataMessageTitle':"保存密码卡片",
382 'recordSaveChangesPanelEncryptUserDataMessageText':"本地加密卡片报头", 379 'recordSaveChangesPanelEncryptUserDataMessageText':"本地加密卡片报头",
383 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"保存密码卡片", 380 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"保存密码卡片",
384 'recordSaveChangesPanelEncryptRecordDataMessageText':"本地加密卡片数据", 381 'recordSaveChangesPanelEncryptRecordDataMessageText':"本地加密卡片数据",
385 'recordSaveChangesPanelEncryptRecordVersionDataMessageTitle':"保存密码卡片", 382 'recordSaveChangesPanelEncryptRecordVersionDataMessageTitle':"保存密码卡片",
386 'recordSaveChangesPanelEncryptRecordVersionDataMessageText':"本地加密密码卡片版本数据", 383 'recordSaveChangesPanelEncryptRecordVersionDataMessageText':"本地加密密码卡片版本数据",
387 'recordSaveChangesPanelSendingDataToTheServerMessageTitle':"保存密码卡片", 384 'recordSaveChangesPanelSendingDataToTheServerMessageTitle':"保存密码卡片",
388 'recordSaveChangesPanelSendingDataToTheServerMessageText':"从 Clipperz 更新加密卡报头", 385 'recordSaveChangesPanelSendingDataToTheServerMessageText':"从 Clipperz 更新加密卡报头",
389 'recordSaveChangesPanelUpdatingTheInterfaceMessageTitle':"保存密码卡片", 386 'recordSaveChangesPanelUpdatingTheInterfaceMessageTitle':"保存密码卡片",
390 'recordSaveChangesPanelUpdatingTheInterfaceMessageText':"更新界面", 387 'recordSaveChangesPanelUpdatingTheInterfaceMessageText':"更新界面",
391 'passwordGeneratorPanelTitle':"密码生成器", 388 'passwordGeneratorPanelTitle':"密码生成器",
392 'passwordGeneratorPanelOkLabel':"确认", 389 'passwordGeneratorPanelOkLabel':"确认",
393 'passwordGeneratorPanelCancelLabel':"取消", 390 'passwordGeneratorPanelCancelLabel':"取消",
394 'passwordGeneratorLengthLabel':"长度:", 391 'passwordGeneratorLengthLabel':"长度:",
395 //'DWRUtilLoadingMessage':"加载数据。。。", 392 //'DWRUtilLoadingMessage':"加载数据。。。",
396 'comingSoon':"即将到来。。。", 393 'comingSoon':"即将到来。。。",
397 'panelCollectingEntryopyMessageText':"收集平均信息", 394 'panelCollectingEntryopyMessageText':"收集平均信息",
398 'directLoginConfigurationCheckBoxFieldSelectedValue':"是", 395 'directLoginConfigurationCheckBoxFieldSelectedValue':"是",
399 'directLoginConfigurationCheckBoxFieldNotSelectedValue':"否", 396 'directLoginConfigurationCheckBoxFieldNotSelectedValue':"否",
400 'WELCOME_BACK':"欢迎回来!", 397 'WELCOME_BACK':"欢迎回来!",
401 'currentConnectionText':"你的连接 IP 地址是&nbsp;__ip__; 来自 __country__, 在 __browser__ 上使用 __operatingSystem__。", 398 'currentConnectionText':"你的连接 IP 地址是&nbsp;__ip__; 来自 __country__, 在 __browser__ 上使用 __operatingSystem__。",
402 'latestConnectionText':"你上次的登录 IP 是&nbsp;__ip__ 在 __elapsedTimeDescription__ (__time__); 来自 __country__, 在 __browser__ 上使用 __operatingSystem__。", 399 'latestConnectionText':"你上次的登录 IP 是&nbsp;__ip__ 在 __elapsedTimeDescription__ (__time__); 来自 __country__, 在 __browser__ 上使用 __operatingSystem__。",
403 'fullLoginHistoryLinkLabel':"显示所有登录历史", 400 'fullLoginHistoryLinkLabel':"显示所有登录历史",
404 'elapsedTimeDescriptions':{ 401 'elapsedTimeDescriptions':{
405 'MORE_THAN_A_MONTH_AGO':"一个月之前", 402 'MORE_THAN_A_MONTH_AGO':"一个月之前",
406 'MORE_THAN_A_WEEK_AGO':"一周之前", 403 'MORE_THAN_A_WEEK_AGO':"一周之前",
407 'MORE_THAN_*_WEEKS_AGO':"__elapsed__ 周以前", 404 'MORE_THAN_*_WEEKS_AGO':"__elapsed__ 周以前",
408 'YESTERDAY':"昨天", 405 'YESTERDAY':"昨天",
diff --git a/frontend/beta/js/Clipperz/PM/Toll.js b/frontend/beta/js/Clipperz/PM/Toll.js
index 6d412c1..3a9b48f 100644
--- a/frontend/beta/js/Clipperz/PM/Toll.js
+++ b/frontend/beta/js/Clipperz/PM/Toll.js
@@ -1,193 +1,190 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
31 28
32//============================================================================= 29//=============================================================================
33 30
34Clipperz.PM.Toll = function(args) { 31Clipperz.PM.Toll = function(args) {
35 this._requestType = args.requestType; 32 this._requestType = args.requestType;
36 this._targetValue = args.targetValue; 33 this._targetValue = args.targetValue;
37 this._cost = args.cost; 34 this._cost = args.cost;
38 this._toll = null; 35 this._toll = null;
39 36
40 return this; 37 return this;
41} 38}
42 39
43Clipperz.PM.Toll.prototype = MochiKit.Base.update(null, { 40Clipperz.PM.Toll.prototype = MochiKit.Base.update(null, {
44 41
45 'toString': function() { 42 'toString': function() {
46 return "Clipperz.PM.Toll (" + this.requestType() + ": " + this.cost() + " - " + ((this.toll() == null)? 'UNPAID' : 'PAID') + ")"; 43 return "Clipperz.PM.Toll (" + this.requestType() + ": " + this.cost() + " - " + ((this.toll() == null)? 'UNPAID' : 'PAID') + ")";
47 }, 44 },
48 45
49 //------------------------------------------------------------------------- 46 //-------------------------------------------------------------------------
50 47
51 'requestType': function() { 48 'requestType': function() {
52 return this._requestType; 49 return this._requestType;
53 }, 50 },
54 51
55 //------------------------------------------------------------------------- 52 //-------------------------------------------------------------------------
56 53
57 'targetValue': function() { 54 'targetValue': function() {
58 return this._targetValue; 55 return this._targetValue;
59 }, 56 },
60 57
61 //------------------------------------------------------------------------- 58 //-------------------------------------------------------------------------
62 59
63 'cost': function() { 60 'cost': function() {
64 return this._cost; 61 return this._cost;
65 }, 62 },
66 63
67 //------------------------------------------------------------------------- 64 //-------------------------------------------------------------------------
68 65
69 'toll': function() { 66 'toll': function() {
70 return this._toll; 67 return this._toll;
71 }, 68 },
72 69
73 //========================================================================= 70 //=========================================================================
74 71
75 'prefixMatchingBits': function(aValue1, aValue2) { 72 'prefixMatchingBits': function(aValue1, aValue2) {
76 varresult; 73 varresult;
77 var i,c; 74 var i,c;
78 75
79 result = 0; 76 result = 0;
80 77
81 c = Math.min(aValue1.length(), aValue2.length()); 78 c = Math.min(aValue1.length(), aValue2.length());
82 i = 0; 79 i = 0;
83 while (i<c && (aValue1.byteAtIndex(i) == aValue2.byteAtIndex(i))) { 80 while (i<c && (aValue1.byteAtIndex(i) == aValue2.byteAtIndex(i))) {
84 result += 8; 81 result += 8;
85 i++; 82 i++;
86 } 83 }
87 84
88 if (i<c) { 85 if (i<c) {
89 varxorValue; 86 varxorValue;
90 87
91 xorValue = (aValue1.byteAtIndex(i) ^ aValue2.byteAtIndex(i)); 88 xorValue = (aValue1.byteAtIndex(i) ^ aValue2.byteAtIndex(i));
92 89
93 if (xorValue >= 128) { 90 if (xorValue >= 128) {
94 result += 0; 91 result += 0;
95 } else if (xorValue >= 64) { 92 } else if (xorValue >= 64) {
96 result += 1; 93 result += 1;
97 } else if (xorValue >= 32) { 94 } else if (xorValue >= 32) {
98 result += 2; 95 result += 2;
99 } else if (xorValue >= 16) { 96 } else if (xorValue >= 16) {
100 result += 3; 97 result += 3;
101 } else if (xorValue >= 8) { 98 } else if (xorValue >= 8) {
102 result += 4; 99 result += 4;
103 } else if (xorValue >= 4) { 100 } else if (xorValue >= 4) {
104 result += 5; 101 result += 5;
105 } else if (xorValue >= 2) { 102 } else if (xorValue >= 2) {
106 result += 6; 103 result += 6;
107 } else if (xorValue >= 1) { 104 } else if (xorValue >= 1) {
108 result += 7; 105 result += 7;
109 } 106 }
110 } 107 }
111 108
112 return result; 109 return result;
113 }, 110 },
114 111
115 //========================================================================= 112 //=========================================================================
116 113
117 'pay': function() { 114 'pay': function() {
118 varresult; 115 varresult;
119 vartargetData; 116 vartargetData;
120 vartargetMatchSize; 117 vartargetMatchSize;
121 var prefixMatchingBits; 118 var prefixMatchingBits;
122 varpayment; 119 varpayment;
123 var i; 120 var i;
124 121
125//MochiKit.Logging.logDebug(">>> Toll.pay"); 122//MochiKit.Logging.logDebug(">>> Toll.pay");
126 if (this.toll() == null) { 123 if (this.toll() == null) {
127 i = 0; 124 i = 0;
128//MochiKit.Logging.logDebug("--- Proxy.payToll - 1"); 125//MochiKit.Logging.logDebug("--- Proxy.payToll - 1");
129 targetData = new Clipperz.ByteArray("0x" + this.targetValue()); 126 targetData = new Clipperz.ByteArray("0x" + this.targetValue());
130//MochiKit.Logging.logDebug("--- Proxy.payToll - 2"); 127//MochiKit.Logging.logDebug("--- Proxy.payToll - 2");
131 targetMatchSize = this.cost(); 128 targetMatchSize = this.cost();
132//MochiKit.Logging.logDebug("--- Proxy.payToll - 3"); 129//MochiKit.Logging.logDebug("--- Proxy.payToll - 3");
133 130
134 payment = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32); 131 payment = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32);
135//MochiKit.Logging.logDebug("--- Proxy.payToll - 4"); 132//MochiKit.Logging.logDebug("--- Proxy.payToll - 4");
136 133
137 do { 134 do {
138 varpaymentData; 135 varpaymentData;
139 136
140//MochiKit.Logging.logDebug("--- Proxy.payToll - 5"); 137//MochiKit.Logging.logDebug("--- Proxy.payToll - 5");
141 //payment = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32); 138 //payment = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32);
142 payment.increment(); 139 payment.increment();
143//MochiKit.Logging.logDebug("--- Proxy.payToll - 6"); 140//MochiKit.Logging.logDebug("--- Proxy.payToll - 6");
144 paymentData = Clipperz.Crypto.SHA.sha256(payment); 141 paymentData = Clipperz.Crypto.SHA.sha256(payment);
145//MochiKit.Logging.logDebug("--- Proxy.payToll - 7"); 142//MochiKit.Logging.logDebug("--- Proxy.payToll - 7");
146 prefixMatchingBits = this.prefixMatchingBits(targetData, paymentData); 143 prefixMatchingBits = this.prefixMatchingBits(targetData, paymentData);
147//MochiKit.Logging.logDebug("--- Proxy.payToll - 8"); 144//MochiKit.Logging.logDebug("--- Proxy.payToll - 8");
148 i++; 145 i++;
149//MochiKit.Logging.logDebug("--- Proxy.payToll - 9"); 146//MochiKit.Logging.logDebug("--- Proxy.payToll - 9");
150 } while (prefixMatchingBits < targetMatchSize); 147 } while (prefixMatchingBits < targetMatchSize);
151//MochiKit.Logging.logDebug("--- Proxy.payToll - 10"); 148//MochiKit.Logging.logDebug("--- Proxy.payToll - 10");
152 149
153 this._toll = payment.toHexString().substring(2) 150 this._toll = payment.toHexString().substring(2)
154 } 151 }
155//MochiKit.Logging.logDebug("<<< Toll.pay"); 152//MochiKit.Logging.logDebug("<<< Toll.pay");
156 153
157 return this; 154 return this;
158 }, 155 },
159 156
160 //------------------------------------------------------------------------- 157 //-------------------------------------------------------------------------
161 158
162 'deferredPay': function() { 159 'deferredPay': function() {
163 vardeferredResult; 160 vardeferredResult;
164 vartoll; 161 vartoll;
165 162
166//MochiKit.Logging.logDebug(">>> Toll.deferredPay"); 163//MochiKit.Logging.logDebug(">>> Toll.deferredPay");
167 toll = this; 164 toll = this;
168 deferredResult = new MochiKit.Async.Deferred(); 165 deferredResult = new MochiKit.Async.Deferred();
169//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("y.1 - Proxy.deferredPayToll - 1: " + res); return res;}); 166//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("y.1 - Proxy.deferredPayToll - 1: " + res); return res;});
170 deferredResult.addCallback(MochiKit.Base.method(toll, 'pay')); 167 deferredResult.addCallback(MochiKit.Base.method(toll, 'pay'));
171//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("y.2 - Proxy.deferredPayToll - 2: " + res); return res;}); 168//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("y.2 - Proxy.deferredPayToll - 2: " + res); return res;});
172 deferredResult.addCallback(function(aToll) { 169 deferredResult.addCallback(function(aToll) {
173 var result; 170 var result;
174 171
175 result = { 172 result = {
176 targetValue:aToll.targetValue(), 173 targetValue:aToll.targetValue(),
177 toll:aToll.toll() 174 toll:aToll.toll()
178 }; 175 };
179 176
180 return result; 177 return result;
181 }); 178 });
182//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("y.3 - Proxy.deferredPayToll - 3: " + res); return res;}); 179//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("y.3 - Proxy.deferredPayToll - 3: " + res); return res;});
183 deferredResult.callback(); 180 deferredResult.callback();
184//MochiKit.Logging.logDebug("<<< Toll.deferredPay"); 181//MochiKit.Logging.logDebug("<<< Toll.deferredPay");
185 182
186 return deferredResult; 183 return deferredResult;
187 }, 184 },
188 185
189 //========================================================================= 186 //=========================================================================
190 __syntaxFix__: "syntax fix" 187 __syntaxFix__: "syntax fix"
191 188
192}); 189});
193 190
diff --git a/frontend/beta/js/Clipperz/Profile.js b/frontend/beta/js/Clipperz/Profile.js
index 31888a9..fb12417 100644
--- a/frontend/beta/js/Clipperz/Profile.js
+++ b/frontend/beta/js/Clipperz/Profile.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29addEvent(window, "load", sortables_init); 26addEvent(window, "load", sortables_init);
30 27
31var SORT_COLUMN_INDEX; 28var SORT_COLUMN_INDEX;
32 29
33function sortables_init() { 30function sortables_init() {
34 // Find all tables with class sortable and make them sortable 31 // Find all tables with class sortable and make them sortable
35 if (!document.getElementsByTagName) return; 32 if (!document.getElementsByTagName) return;
36 tbls = document.getElementsByTagName("table"); 33 tbls = document.getElementsByTagName("table");
37 for (ti=0;ti<tbls.length;ti++) { 34 for (ti=0;ti<tbls.length;ti++) {
38 thisTbl = tbls[ti]; 35 thisTbl = tbls[ti];
39 if (((' '+thisTbl.className+' ').indexOf("sortable") != -1) && (thisTbl.id)) { 36 if (((' '+thisTbl.className+' ').indexOf("sortable") != -1) && (thisTbl.id)) {
40 //initTable(thisTbl.id); 37 //initTable(thisTbl.id);
41 ts_makeSortable(thisTbl); 38 ts_makeSortable(thisTbl);
42 } 39 }
43 } 40 }
44} 41}
45 42
46function ts_makeSortable(table) { 43function ts_makeSortable(table) {
47 if (table.rows && table.rows.length > 0) { 44 if (table.rows && table.rows.length > 0) {
48 var firstRow = table.rows[0]; 45 var firstRow = table.rows[0];
49 } 46 }
50 if (!firstRow) return; 47 if (!firstRow) return;
51 48
52 // We have a first row: assume it's the header, and make its contents clickable links 49 // We have a first row: assume it's the header, and make its contents clickable links
53 for (var i=0;i<firstRow.cells.length;i++) { 50 for (var i=0;i<firstRow.cells.length;i++) {
54 var cell = firstRow.cells[i]; 51 var cell = firstRow.cells[i];
55 var txt = ts_getInnerText(cell); 52 var txt = ts_getInnerText(cell);
56 cell.innerHTML = '<a href="#" class="sortheader" '+ 53 cell.innerHTML = '<a href="#" class="sortheader" '+
57 'onclick="ts_resortTable(this, '+i+');return false;">' + 54 'onclick="ts_resortTable(this, '+i+');return false;">' +
58 txt+'<span class="sortarrow">&nbsp;&nbsp;&nbsp;</span></a>'; 55 txt+'<span class="sortarrow">&nbsp;&nbsp;&nbsp;</span></a>';
59 } 56 }
60} 57}
61 58
62function ts_getInnerText(el) { 59function ts_getInnerText(el) {
63 if (typeof el == "string") return el; 60 if (typeof el == "string") return el;
64 if (typeof el == "undefined") { return el }; 61 if (typeof el == "undefined") { return el };
65 if (el.innerText) return el.innerText;//Not needed but it is faster 62 if (el.innerText) return el.innerText;//Not needed but it is faster
66 var str = ""; 63 var str = "";
67 64
68 var cs = el.childNodes; 65 var cs = el.childNodes;
69 var l = cs.length; 66 var l = cs.length;
70 for (var i = 0; i < l; i++) { 67 for (var i = 0; i < l; i++) {
71 switch (cs[i].nodeType) { 68 switch (cs[i].nodeType) {
72 case 1: //ELEMENT_NODE 69 case 1: //ELEMENT_NODE
73 str += ts_getInnerText(cs[i]); 70 str += ts_getInnerText(cs[i]);
74 break; 71 break;
75 case 3://TEXT_NODE 72 case 3://TEXT_NODE
76 str += cs[i].nodeValue; 73 str += cs[i].nodeValue;
77 break; 74 break;
78 } 75 }
79 } 76 }
80 return str; 77 return str;
81} 78}
82 79
83function ts_resortTable(lnk,clid) { 80function ts_resortTable(lnk,clid) {
84 // get the span 81 // get the span
85 var span; 82 var span;
86 for (var ci=0;ci<lnk.childNodes.length;ci++) { 83 for (var ci=0;ci<lnk.childNodes.length;ci++) {
87 if (lnk.childNodes[ci].tagName && lnk.childNodes[ci].tagName.toLowerCase() == 'span') span = lnk.childNodes[ci]; 84 if (lnk.childNodes[ci].tagName && lnk.childNodes[ci].tagName.toLowerCase() == 'span') span = lnk.childNodes[ci];
88 } 85 }
89 var spantext = ts_getInnerText(span); 86 var spantext = ts_getInnerText(span);
90 var td = lnk.parentNode; 87 var td = lnk.parentNode;
91 var column = clid || td.cellIndex; 88 var column = clid || td.cellIndex;
92 var table = getParent(td,'TABLE'); 89 var table = getParent(td,'TABLE');
93 90
94 // Work out a type for the column 91 // Work out a type for the column
95 if (table.rows.length <= 1) return; 92 if (table.rows.length <= 1) return;
96 var itm = ts_getInnerText(table.rows[1].cells[column]); 93 var itm = ts_getInnerText(table.rows[1].cells[column]);
97 sortfn = ts_sort_caseinsensitive; 94 sortfn = ts_sort_caseinsensitive;
98 if (itm.match(/^\d\d[\/-]\d\d[\/-]\d\d\d\d$/)) { 95 if (itm.match(/^\d\d[\/-]\d\d[\/-]\d\d\d\d$/)) {
99 sortfn = ts_sort_date; 96 sortfn = ts_sort_date;
100 } 97 }
101 if (itm.match(/^\d\d[\/-]\d\d[\/-]\d\d$/)) { 98 if (itm.match(/^\d\d[\/-]\d\d[\/-]\d\d$/)) {
102 sortfn = ts_sort_date; 99 sortfn = ts_sort_date;
103 } 100 }
104 if (itm.match(/^[£$]/)) { 101 if (itm.match(/^[£$]/)) {
105 sortfn = ts_sort_currency; 102 sortfn = ts_sort_currency;
106 } 103 }
107 if (itm.match(/^[\d\.]+$/)) { 104 if (itm.match(/^[\d\.]+$/)) {
108 sortfn = ts_sort_numeric; 105 sortfn = ts_sort_numeric;
109 } 106 }
110 SORT_COLUMN_INDEX = column; 107 SORT_COLUMN_INDEX = column;
111 var firstRow = new Array(); 108 var firstRow = new Array();
112 var newRows = new Array(); 109 var newRows = new Array();
113 for (i=0;i<table.rows[0].length;i++) { 110 for (i=0;i<table.rows[0].length;i++) {
114 firstRow[i] = table.rows[0][i]; 111 firstRow[i] = table.rows[0][i];
115 } 112 }
116 113
117 for (j=1;j<table.rows.length;j++) { 114 for (j=1;j<table.rows.length;j++) {
118 newRows[j-1] = table.rows[j]; 115 newRows[j-1] = table.rows[j];
119 } 116 }
120 newRows.sort(sortfn); 117 newRows.sort(sortfn);
121 118
122 if (span.getAttribute("sortdir") == 'down') { 119 if (span.getAttribute("sortdir") == 'down') {
123 ARROW = '&nbsp;&nbsp;&uarr;'; 120 ARROW = '&nbsp;&nbsp;&uarr;';
124 newRows.reverse(); 121 newRows.reverse();
125 span.setAttribute('sortdir','up'); 122 span.setAttribute('sortdir','up');
126 } else { 123 } else {
127 ARROW = '&nbsp;&nbsp;&darr;'; 124 ARROW = '&nbsp;&nbsp;&darr;';
128 span.setAttribute('sortdir','down'); 125 span.setAttribute('sortdir','down');
129 } 126 }
130 127
131 // We appendChild rows that already exist to the tbody, so it moves them rather than creating new ones 128 // We appendChild rows that already exist to the tbody, so it moves them rather than creating new ones
132 // don't do sortbottom rows 129 // don't do sortbottom rows
133 for (i=0;i<newRows.length;i++) { 130 for (i=0;i<newRows.length;i++) {
134 if (!newRows[i].className || (newRows[i].className && (newRows[i].className.indexOf('sortbottom') == -1))) { 131 if (!newRows[i].className || (newRows[i].className && (newRows[i].className.indexOf('sortbottom') == -1))) {
135 table.tBodies[0].appendChild(newRows[i]); 132 table.tBodies[0].appendChild(newRows[i]);
136 } 133 }
137 } 134 }
138 // do sortbottom rows only 135 // do sortbottom rows only
139 for (i=0;i<newRows.length;i++) { 136 for (i=0;i<newRows.length;i++) {
140 if (newRows[i].className && (newRows[i].className.indexOf('sortbottom') != -1)) { 137 if (newRows[i].className && (newRows[i].className.indexOf('sortbottom') != -1)) {
141 table.tBodies[0].appendChild(newRows[i]); 138 table.tBodies[0].appendChild(newRows[i]);
142 } 139 }
143 } 140 }
144 141
145 // Delete any other arrows there may be showing 142 // Delete any other arrows there may be showing
146 var allspans = document.getElementsByTagName("span"); 143 var allspans = document.getElementsByTagName("span");
147 for (var ci=0;ci<allspans.length;ci++) { 144 for (var ci=0;ci<allspans.length;ci++) {
148 if (allspans[ci].className == 'sortarrow') { 145 if (allspans[ci].className == 'sortarrow') {
149 if (getParent(allspans[ci],"table") == getParent(lnk,"table")) { // in the same table as us? 146 if (getParent(allspans[ci],"table") == getParent(lnk,"table")) { // in the same table as us?
150 allspans[ci].innerHTML = '&nbsp;&nbsp;&nbsp;'; 147 allspans[ci].innerHTML = '&nbsp;&nbsp;&nbsp;';
151 } 148 }
152 } 149 }
153 } 150 }
154 151
155 span.innerHTML = ARROW; 152 span.innerHTML = ARROW;
156} 153}
157 154
158function getParent(el, pTagName) { 155function getParent(el, pTagName) {
159 if (el == null) return null; 156 if (el == null) return null;
160 else if (el.nodeType == 1 && el.tagName.toLowerCase() == pTagName.toLowerCase())// Gecko bug, supposed to be uppercase 157 else if (el.nodeType == 1 && el.tagName.toLowerCase() == pTagName.toLowerCase())// Gecko bug, supposed to be uppercase
161 return el; 158 return el;
162 else 159 else
163 return getParent(el.parentNode, pTagName); 160 return getParent(el.parentNode, pTagName);
164} 161}
165function ts_sort_date(a,b) { 162function ts_sort_date(a,b) {
166 // y2k notes: two digit years less than 50 are treated as 20XX, greater than 50 are treated as 19XX 163 // y2k notes: two digit years less than 50 are treated as 20XX, greater than 50 are treated as 19XX
167 aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]); 164 aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]);
168 bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]); 165 bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]);
169 if (aa.length == 10) { 166 if (aa.length == 10) {
170 dt1 = aa.substr(6,4)+aa.substr(3,2)+aa.substr(0,2); 167 dt1 = aa.substr(6,4)+aa.substr(3,2)+aa.substr(0,2);
171 } else { 168 } else {
172 yr = aa.substr(6,2); 169 yr = aa.substr(6,2);
173 if (parseInt(yr) < 50) { yr = '20'+yr; } else { yr = '19'+yr; } 170 if (parseInt(yr) < 50) { yr = '20'+yr; } else { yr = '19'+yr; }
174 dt1 = yr+aa.substr(3,2)+aa.substr(0,2); 171 dt1 = yr+aa.substr(3,2)+aa.substr(0,2);
175 } 172 }
176 if (bb.length == 10) { 173 if (bb.length == 10) {
177 dt2 = bb.substr(6,4)+bb.substr(3,2)+bb.substr(0,2); 174 dt2 = bb.substr(6,4)+bb.substr(3,2)+bb.substr(0,2);
178 } else { 175 } else {
179 yr = bb.substr(6,2); 176 yr = bb.substr(6,2);
180 if (parseInt(yr) < 50) { yr = '20'+yr; } else { yr = '19'+yr; } 177 if (parseInt(yr) < 50) { yr = '20'+yr; } else { yr = '19'+yr; }
181 dt2 = yr+bb.substr(3,2)+bb.substr(0,2); 178 dt2 = yr+bb.substr(3,2)+bb.substr(0,2);
182 } 179 }
183 if (dt1==dt2) return 0; 180 if (dt1==dt2) return 0;
184 if (dt1<dt2) return -1; 181 if (dt1<dt2) return -1;
185 return 1; 182 return 1;
186} 183}
187 184
188function ts_sort_currency(a,b) { 185function ts_sort_currency(a,b) {
189 aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]).replace(/[^0-9.]/g,''); 186 aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]).replace(/[^0-9.]/g,'');
190 bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]).replace(/[^0-9.]/g,''); 187 bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]).replace(/[^0-9.]/g,'');
191 return parseFloat(aa) - parseFloat(bb); 188 return parseFloat(aa) - parseFloat(bb);
192} 189}
193 190
194function ts_sort_numeric(a,b) { 191function ts_sort_numeric(a,b) {
195 aa = parseFloat(ts_getInnerText(a.cells[SORT_COLUMN_INDEX])); 192 aa = parseFloat(ts_getInnerText(a.cells[SORT_COLUMN_INDEX]));
196 if (isNaN(aa)) aa = 0; 193 if (isNaN(aa)) aa = 0;
197 bb = parseFloat(ts_getInnerText(b.cells[SORT_COLUMN_INDEX])); 194 bb = parseFloat(ts_getInnerText(b.cells[SORT_COLUMN_INDEX]));
198 if (isNaN(bb)) bb = 0; 195 if (isNaN(bb)) bb = 0;
199 return aa-bb; 196 return aa-bb;
200} 197}
201 198
202function ts_sort_caseinsensitive(a,b) { 199function ts_sort_caseinsensitive(a,b) {
203 aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]).toLowerCase(); 200 aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]).toLowerCase();
204 bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]).toLowerCase(); 201 bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]).toLowerCase();
205 if (aa==bb) return 0; 202 if (aa==bb) return 0;
206 if (aa<bb) return -1; 203 if (aa<bb) return -1;
207 return 1; 204 return 1;
208} 205}
209 206
210function ts_sort_default(a,b) { 207function ts_sort_default(a,b) {
211 aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]); 208 aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]);
212 bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]); 209 bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]);
213 if (aa==bb) return 0; 210 if (aa==bb) return 0;
214 if (aa<bb) return -1; 211 if (aa<bb) return -1;
215 return 1; 212 return 1;
216} 213}
217 214
218 215
219function addEvent(elm, evType, fn, useCapture) 216function addEvent(elm, evType, fn, useCapture)
220// addEvent and removeEvent 217// addEvent and removeEvent
221// cross-browser event handling for IE5+, NS6 and Mozilla 218// cross-browser event handling for IE5+, NS6 and Mozilla
222// By Scott Andrew 219// By Scott Andrew
223{ 220{
224 if (elm.addEventListener){ 221 if (elm.addEventListener){
225 elm.addEventListener(evType, fn, useCapture); 222 elm.addEventListener(evType, fn, useCapture);
226 return true; 223 return true;
227 } else if (elm.attachEvent){ 224 } else if (elm.attachEvent){
228 var r = elm.attachEvent("on"+evType, fn); 225 var r = elm.attachEvent("on"+evType, fn);
229 return r; 226 return r;
230 } else { 227 } else {
231 alert("Handler could not be removed"); 228 alert("Handler could not be removed");
232 } 229 }
233} 230}
234 231
235 232
236 233
237 234
238if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 235if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
239if (typeof(Clipperz.Profile) == 'undefined') { Clipperz.Profile = {}; } 236if (typeof(Clipperz.Profile) == 'undefined') { Clipperz.Profile = {}; }
240 237
241Clipperz.Profile.VERSION = "0.1"; 238Clipperz.Profile.VERSION = "0.1";
242Clipperz.Profile.NAME = "Clipperz.Profile"; 239Clipperz.Profile.NAME = "Clipperz.Profile";
243 240
244MochiKit.Base.update(Clipperz.Profile, { 241MochiKit.Base.update(Clipperz.Profile, {
245 242
246 //------------------------------------------------------------------------- 243 //-------------------------------------------------------------------------
247 244
248 '__repr__': function () { 245 '__repr__': function () {
249 varstatus; 246 varstatus;
250 247
251 if (Clipperz.Profile.isEnabled == true) { 248 if (Clipperz.Profile.isEnabled == true) {
252 status = ENABLED; 249 status = ENABLED;
253 } else { 250 } else {
254 status = DISABLED; 251 status = DISABLED;
255 } 252 }
256 253
257 return "[" + this.NAME + " " + this.VERSION + " - " + status + "]"; 254 return "[" + this.NAME + " " + this.VERSION + " - " + status + "]";
258 }, 255 },
259 256
260 //------------------------------------------------------------------------- 257 //-------------------------------------------------------------------------
261 258
262 'toString': function () { 259 'toString': function () {
263 return this.__repr__(); 260 return this.__repr__();
264 }, 261 },
265 262
266 //------------------------------------------------------------------------- 263 //-------------------------------------------------------------------------
267 264
268 'isEnabled': function() { 265 'isEnabled': function() {
269 return false; 266 return false;
270 }, 267 },
271 268
272 //------------------------------------------------------------------------- 269 //-------------------------------------------------------------------------
273 270
274 'initialValues': function() { 271 'initialValues': function() {
275 return {iters:0, total:0, min:Number.MAX_VALUE, max:0} 272 return {iters:0, total:0, min:Number.MAX_VALUE, max:0}
276 }, 273 },
277 274
278 //------------------------------------------------------------------------- 275 //-------------------------------------------------------------------------
279 276
280 'start': function(aName) {}, 277 'start': function(aName) {},
281 'stop': function(aName) {}, 278 'stop': function(aName) {},
282 'dump': function(aName) {}, 279 'dump': function(aName) {},
283 'profileData': function(aName, aKey) { 280 'profileData': function(aName, aKey) {
284 varresult; 281 varresult;
285 282
286 if (typeof(aName) != 'undefined') { 283 if (typeof(aName) != 'undefined') {
287 result = this.initialValues(); 284 result = this.initialValues();
288 285
289 if (typeof(aKey) != 'undefined') { 286 if (typeof(aKey) != 'undefined') {
290 result = result[aKey]; 287 result = result[aKey];
291 } 288 }
292 } else { 289 } else {
293 result = null; 290 result = null;
294 } 291 }
295 292
296 return result; 293 return result;
297 294
298 }, 295 },
299 'resetProfileData': function() {}, 296 'resetProfileData': function() {},
300 //------------------------------------------------------------------------- 297 //-------------------------------------------------------------------------
301 298
302 'end': function(aName) { 299 'end': function(aName) {
303 Clipperz.Profile.stop(aName); 300 Clipperz.Profile.stop(aName);
304 }, 301 },
305 302
306 //------------------------------------------------------------------------- 303 //-------------------------------------------------------------------------
307 304
308 __syntaxFix__: "syntax fix" 305 __syntaxFix__: "syntax fix"
309}); 306});
310 307
311 308
312 309
313if ((typeof(clipperz_profiling_enabled) != 'undefined') && (clipperz_profiling_enabled == true)) { 310if ((typeof(clipperz_profiling_enabled) != 'undefined') && (clipperz_profiling_enabled == true)) {
314 311
315var _clipperz_profile_profiles = {}; 312var _clipperz_profile_profiles = {};
316var _clipperz_profile_pns = []; 313var _clipperz_profile_pns = [];
317 314
318 315
319MochiKit.Base.update(Clipperz.Profile, { 316MochiKit.Base.update(Clipperz.Profile, {
320 317
321 //------------------------------------------------------------------------- 318 //-------------------------------------------------------------------------
322 319
323 'isEnabled': function() { 320 'isEnabled': function() {
324 return true; 321 return true;
325 }, 322 },
326 323
327 //------------------------------------------------------------------------- 324 //-------------------------------------------------------------------------
328 325
329 'start': function(aName) { 326 'start': function(aName) {
330 if (!_clipperz_profile_profiles[aName]) { 327 if (!_clipperz_profile_profiles[aName]) {
331 _clipperz_profile_profiles[aName] = this.initialValues(); 328 _clipperz_profile_profiles[aName] = this.initialValues();
332 _clipperz_profile_pns[_clipperz_profile_pns.length] = aName; 329 _clipperz_profile_pns[_clipperz_profile_pns.length] = aName;
333 } else { 330 } else {
334 if (_clipperz_profile_profiles[aName]["start"]) { 331 if (_clipperz_profile_profiles[aName]["start"]) {
335 Clipperz.Profile.stop(aName); 332 Clipperz.Profile.stop(aName);
336 } 333 }
337 } 334 }
338 335
339 _clipperz_profile_profiles[aName].end = null; 336 _clipperz_profile_profiles[aName].end = null;
340 _clipperz_profile_profiles[aName].start = new Date(); 337 _clipperz_profile_profiles[aName].start = new Date();
341 }, 338 },
342 339
343 //------------------------------------------------------------------------- 340 //-------------------------------------------------------------------------
344 341
345 'stop': function(aName) { 342 'stop': function(aName) {
346 if ((_clipperz_profile_profiles[aName]) && (_clipperz_profile_profiles[aName]["start"])) { 343 if ((_clipperz_profile_profiles[aName]) && (_clipperz_profile_profiles[aName]["start"])) {
347 with(_clipperz_profile_profiles[aName]) { 344 with(_clipperz_profile_profiles[aName]) {
348 var now; 345 var now;
349 varelapsedTime; 346 varelapsedTime;
350 347
351 now = new Date(); 348 now = new Date();
352 elapsedTime = (now - start); 349 elapsedTime = (now - start);
353 350
354 end = now; 351 end = now;
355 min = Math.min(min, elapsedTime); 352 min = Math.min(min, elapsedTime);
356 max = Math.max(max, elapsedTime); 353 max = Math.max(max, elapsedTime);
357 total += elapsedTime; 354 total += elapsedTime;
358 start = null; 355 start = null;
359 iters++; 356 iters++;
360 } 357 }
361 } else { 358 } else {
362 // oops! bad call to end(), what should we do here? 359 // oops! bad call to end(), what should we do here?
363 return true; 360 return true;
364 } 361 }
365 }, 362 },
366 363
367 //------------------------------------------------------------------------- 364 //-------------------------------------------------------------------------
368 365
369 'dump': function(appendToDoc) { 366 'dump': function(appendToDoc) {
370 // var tbl = document.createElement("table"); 367 // var tbl = document.createElement("table");
371 var tbl = MochiKit.DOM.TABLE(null, MochiKit.DOM.TBODY()); 368 var tbl = MochiKit.DOM.TABLE(null, MochiKit.DOM.TBODY());
372 tbl.className = 'sortable'; 369 tbl.className = 'sortable';
373 tbl.id = "profileOutputTable_table"; 370 tbl.id = "profileOutputTable_table";
374 with(tbl.style){ 371 with(tbl.style){
375 border = "1px solid black"; 372 border = "1px solid black";
376 borderCollapse = "collapse"; 373 borderCollapse = "collapse";
377 } 374 }
378 var hdr = tbl.createTHead(); 375 var hdr = tbl.createTHead();
379 var hdrtr = hdr.insertRow(0); 376 var hdrtr = hdr.insertRow(0);
380 // document.createElement("tr"); 377 // document.createElement("tr");
381 var cols = ["Identifier","#","Min", "Avg","Max","Total"]; 378 var cols = ["Identifier","#","Min", "Avg","Max","Total"];
382 for(var x=0; x<cols.length; x++){ 379 for(var x=0; x<cols.length; x++){
383 var ntd = hdrtr.insertCell(x); 380 var ntd = hdrtr.insertCell(x);
384 with(ntd.style){ 381 with(ntd.style){
385 backgroundColor = "#225d94"; 382 backgroundColor = "#225d94";
386 color = "white"; 383 color = "white";
387 borderBottom = "1px solid black"; 384 borderBottom = "1px solid black";
388 borderRight = "1px solid black"; 385 borderRight = "1px solid black";
389 fontFamily = "tahoma"; 386 fontFamily = "tahoma";
390 fontWeight = "bolder"; 387 fontWeight = "bolder";
391 paddingLeft = paddingRight = "5px"; 388 paddingLeft = paddingRight = "5px";
392 } 389 }
393 ntd.appendChild(document.createTextNode(cols[x])); 390 ntd.appendChild(document.createTextNode(cols[x]));
394 } 391 }
395 392
396 for(var x=0; x < _clipperz_profile_pns.length; x++){ 393 for(var x=0; x < _clipperz_profile_pns.length; x++){
397 var prf = _clipperz_profile_profiles[_clipperz_profile_pns[x]]; 394 var prf = _clipperz_profile_profiles[_clipperz_profile_pns[x]];
398 this.end(_clipperz_profile_pns[x]); 395 this.end(_clipperz_profile_pns[x]);
399 if(prf.iters>0){ 396 if(prf.iters>0){
400 var bdytr = tbl.insertRow(true); 397 var bdytr = tbl.insertRow(true);
401 var vals = [_clipperz_profile_pns[x], prf.iters, prf.min, parseInt(Math.round(prf.total/prf.iters)), prf.max, prf.total]; 398 var vals = [_clipperz_profile_pns[x], prf.iters, prf.min, parseInt(Math.round(prf.total/prf.iters)), prf.max, prf.total];
402 for(var y=0; y<vals.length; y++){ 399 for(var y=0; y<vals.length; y++){
403 var cc = bdytr.insertCell(y); 400 var cc = bdytr.insertCell(y);
404 cc.appendChild(document.createTextNode(vals[y])); 401 cc.appendChild(document.createTextNode(vals[y]));
405 with(cc.style){ 402 with(cc.style){
406 borderBottom = "1px solid gray"; 403 borderBottom = "1px solid gray";
407 paddingLeft = paddingRight = "5px"; 404 paddingLeft = paddingRight = "5px";
408 if(x%2){ 405 if(x%2){
diff --git a/frontend/beta/js/Clipperz/Set.js b/frontend/beta/js/Clipperz/Set.js
index 61e0769..7023888 100644
--- a/frontend/beta/js/Clipperz/Set.js
+++ b/frontend/beta/js/Clipperz/Set.js
@@ -1,167 +1,164 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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 26
30if (typeof(Clipperz) == 'undefined') { 27if (typeof(Clipperz) == 'undefined') {
31 Clipperz = {}; 28 Clipperz = {};
32} 29}
33 30
34//############################################################################# 31//#############################################################################
35 32
36Clipperz.Set = function(args) { 33Clipperz.Set = function(args) {
37 args = args || {}; 34 args = args || {};
38 //MochiKit.Base.bindMethods(this); 35 //MochiKit.Base.bindMethods(this);
39 36
40 if (args.items != null) { 37 if (args.items != null) {
41 this._items = args.items.slice(); 38 this._items = args.items.slice();
42 } else { 39 } else {
43 this._items = []; 40 this._items = [];
44 } 41 }
45 42
46 return this; 43 return this;
47} 44}
48 45
49//============================================================================= 46//=============================================================================
50 47
51Clipperz.Set.prototype = MochiKit.Base.update(null, { 48Clipperz.Set.prototype = MochiKit.Base.update(null, {
52 49
53 //------------------------------------------------------------------------- 50 //-------------------------------------------------------------------------
54 51
55 'toString': function() { 52 'toString': function() {
56 return "Clipperz.Set"; 53 return "Clipperz.Set";
57 }, 54 },
58 55
59 //------------------------------------------------------------------------- 56 //-------------------------------------------------------------------------
60 57
61 'items': function() { 58 'items': function() {
62 return this._items; 59 return this._items;
63 }, 60 },
64 61
65 //------------------------------------------------------------------------- 62 //-------------------------------------------------------------------------
66 63
67 'popAnItem': function() { 64 'popAnItem': function() {
68 var result; 65 var result;
69 66
70 if (this.size() > 0) { 67 if (this.size() > 0) {
71 result = this.items().pop(); 68 result = this.items().pop();
72 } else { 69 } else {
73 result = null; 70 result = null;
74 } 71 }
75 72
76 return result; 73 return result;
77 }, 74 },
78 75
79 //------------------------------------------------------------------------- 76 //-------------------------------------------------------------------------
80 77
81 'allItems': function() { 78 'allItems': function() {
82 return this.items(); 79 return this.items();
83 }, 80 },
84 81
85 //------------------------------------------------------------------------- 82 //-------------------------------------------------------------------------
86 83
87 'contains': function(anItem) { 84 'contains': function(anItem) {
88 return (this.indexOf(anItem) != -1); 85 return (this.indexOf(anItem) != -1);
89 }, 86 },
90 87
91 //------------------------------------------------------------------------- 88 //-------------------------------------------------------------------------
92 89
93 'indexOf': function(anItem) { 90 'indexOf': function(anItem) {
94 varresult; 91 varresult;
95 vari, c; 92 vari, c;
96 93
97 result = -1; 94 result = -1;
98 95
99 c = this.items().length; 96 c = this.items().length;
100 for (i=0; (i<c) && (result == -1); i++) { 97 for (i=0; (i<c) && (result == -1); i++) {
101 if (this.items()[i] === anItem) { 98 if (this.items()[i] === anItem) {
102 result = i; 99 result = i;
103 } 100 }
104 } 101 }
105 102
106 return result; 103 return result;
107 }, 104 },
108 105
109 //------------------------------------------------------------------------- 106 //-------------------------------------------------------------------------
110 107
111 'add': function(anItem) { 108 'add': function(anItem) {
112 if (anItem.constructor == Array) { 109 if (anItem.constructor == Array) {
113 MochiKit.Base.map(MochiKit.Base.bind(this,add, this), anItem); 110 MochiKit.Base.map(MochiKit.Base.bind(this,add, this), anItem);
114 } else { 111 } else {
115 if (! this.contains(anItem)) { 112 if (! this.contains(anItem)) {
116 this.items().push(anItem); 113 this.items().push(anItem);
117 } 114 }
118 } 115 }
119 }, 116 },
120 117
121 //------------------------------------------------------------------------- 118 //-------------------------------------------------------------------------
122 119
123 'debug': function() { 120 'debug': function() {
124 vari, c; 121 vari, c;
125 122
126 result = -1; 123 result = -1;
127 124
128 c = this.items().length; 125 c = this.items().length;
129 for (i=0; i<c; i++) { 126 for (i=0; i<c; i++) {
130 alert("[" + i + "] " + this.items()[i].label); 127 alert("[" + i + "] " + this.items()[i].label);
131 } 128 }
132 }, 129 },
133 130
134 //------------------------------------------------------------------------- 131 //-------------------------------------------------------------------------
135 132
136 'remove': function(anItem) { 133 'remove': function(anItem) {
137 if (anItem.constructor == Array) { 134 if (anItem.constructor == Array) {
138 MochiKit.Base.map(MochiKit.Base.bind(this.remove, this), anItem); 135 MochiKit.Base.map(MochiKit.Base.bind(this.remove, this), anItem);
139 } else { 136 } else {
140 varitemIndex; 137 varitemIndex;
141 138
142 itemIndex = this.indexOf(anItem); 139 itemIndex = this.indexOf(anItem);
143 if (itemIndex != -1) { 140 if (itemIndex != -1) {
144 this.items().splice(itemIndex, 1); 141 this.items().splice(itemIndex, 1);
145 } 142 }
146 } 143 }
147 }, 144 },
148 145
149 //------------------------------------------------------------------------- 146 //-------------------------------------------------------------------------
150 147
151 'size': function() { 148 'size': function() {
152 return this.items().length; 149 return this.items().length;
153 }, 150 },
154 151
155 //------------------------------------------------------------------------- 152 //-------------------------------------------------------------------------
156 153
157 'empty': function() { 154 'empty': function() {
158 this.items().splice(0, this.items().length); 155 this.items().splice(0, this.items().length);
159 }, 156 },
160 157
161 //------------------------------------------------------------------------- 158 //-------------------------------------------------------------------------
162 159
163 __syntaxFix__: "syntax fix" 160 __syntaxFix__: "syntax fix"
164 161
165 //------------------------------------------------------------------------- 162 //-------------------------------------------------------------------------
166}); 163});
167 164
diff --git a/frontend/beta/js/Clipperz/Signal.js b/frontend/beta/js/Clipperz/Signal.js
index 1d3c9eb..8ed37cc 100644
--- a/frontend/beta/js/Clipperz/Signal.js
+++ b/frontend/beta/js/Clipperz/Signal.js
@@ -1,71 +1,68 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.Signal) == 'undefined') { Clipperz.Signal = {}; } 27if (typeof(Clipperz.Signal) == 'undefined') { Clipperz.Signal = {}; }
31 28
32Clipperz.Signal.VERSION = "0.1"; 29Clipperz.Signal.VERSION = "0.1";
33Clipperz.Signal.NAME = "Clipperz.Signal"; 30Clipperz.Signal.NAME = "Clipperz.Signal";
34 31
35MochiKit.Base.update(Clipperz.Signal, { 32MochiKit.Base.update(Clipperz.Signal, {
36 33
37 //------------------------------------------------------------------------- 34 //-------------------------------------------------------------------------
38 35
39 '__repr__': function () { 36 '__repr__': function () {
40 return "[" + this.NAME + " " + this.VERSION + "]"; 37 return "[" + this.NAME + " " + this.VERSION + "]";
41 }, 38 },
42 39
43 //------------------------------------------------------------------------- 40 //-------------------------------------------------------------------------
44 41
45 'toString': function () { 42 'toString': function () {
46 return this.__repr__(); 43 return this.__repr__();
47 }, 44 },
48 45
49 //------------------------------------------------------------------------- 46 //-------------------------------------------------------------------------
50 47
51 'fireNativeEvent': function(element, eventName) { 48 'fireNativeEvent': function(element, eventName) {
52 if (element.fireEvent) { 49 if (element.fireEvent) {
53 // MSIE 50 // MSIE
54 element.fireEvent(eventName); 51 element.fireEvent(eventName);
55 } else { 52 } else {
56 // W3C 53 // W3C
57 var event; 54 var event;
58 55
59 event = document.createEvent("HTMLEvents"); 56 event = document.createEvent("HTMLEvents");
60 event.initEvent(eventName.replace(/^on/, ""), true, true); 57 event.initEvent(eventName.replace(/^on/, ""), true, true);
61 element.dispatchEvent(event); 58 element.dispatchEvent(event);
62 } 59 }
63 }, 60 },
64 61
65 //------------------------------------------------------------------------- 62 //-------------------------------------------------------------------------
66 __syntaxFix__: "syntax fix" 63 __syntaxFix__: "syntax fix"
67 64
68}); 65});
69 66
70 67
71 68
diff --git a/frontend/beta/js/Clipperz/Style.js b/frontend/beta/js/Clipperz/Style.js
index 9762b1c..1eecdd1 100644
--- a/frontend/beta/js/Clipperz/Style.js
+++ b/frontend/beta/js/Clipperz/Style.js
@@ -1,73 +1,70 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.Style) == 'undefined') { Clipperz.Style = {}; } 27if (typeof(Clipperz.Style) == 'undefined') { Clipperz.Style = {}; }
31 28
32Clipperz.Style.VERSION = "0.1"; 29Clipperz.Style.VERSION = "0.1";
33Clipperz.Style.NAME = "Clipperz.DOM"; 30Clipperz.Style.NAME = "Clipperz.DOM";
34 31
35MochiKit.Base.update(Clipperz.Style, { 32MochiKit.Base.update(Clipperz.Style, {
36 33
37 //------------------------------------------------------------------------- 34 //-------------------------------------------------------------------------
38 35
39 '__repr__': function () { 36 '__repr__': function () {
40 return "[" + this.NAME + " " + this.VERSION + "]"; 37 return "[" + this.NAME + " " + this.VERSION + "]";
41 }, 38 },
42 39
43 //------------------------------------------------------------------------- 40 //-------------------------------------------------------------------------
44 41
45 'toString': function () { 42 'toString': function () {
46 return this.__repr__(); 43 return this.__repr__();
47 }, 44 },
48 45
49 //------------------------------------------------------------------------- 46 //-------------------------------------------------------------------------
50 47
51 'applyZebraStylesToTable': function(aTable) { 48 'applyZebraStylesToTable': function(aTable) {
52 var tbody; 49 var tbody;
53 var tbodyRows; 50 var tbodyRows;
54 var i,c; 51 var i,c;
55 52
56 tbody = MochiKit.DOM.getFirstElementByTagAndClassName('tbody', null, aTable); 53 tbody = MochiKit.DOM.getFirstElementByTagAndClassName('tbody', null, aTable);
57 tbodyRows = tbody.childNodes; 54 tbodyRows = tbody.childNodes;
58 // tbodyRows = MochiKit.DOM.getElementsByTagAndClassName('tr', null, tbody) 55 // tbodyRows = MochiKit.DOM.getElementsByTagAndClassName('tr', null, tbody)
59 c = tbodyRows.length; 56 c = tbodyRows.length;
60 for (i=0; i<c; i++) { 57 for (i=0; i<c; i++) {
61 var element; 58 var element;
62 59
63 element = YAHOO.ext.Element.get(tbodyRows[i]); 60 element = YAHOO.ext.Element.get(tbodyRows[i]);
64 element.addClass(((i%2 == 0) ? "zebra_odd": "zebra_even")); 61 element.addClass(((i%2 == 0) ? "zebra_odd": "zebra_even"));
65 element.removeClass(((i%2 == 1) ? "zebra_odd": "zebra_even")); 62 element.removeClass(((i%2 == 1) ? "zebra_odd": "zebra_even"));
66 } 63 }
67 }, 64 },
68 65
69 //------------------------------------------------------------------------- 66 //-------------------------------------------------------------------------
70 __syntaxFix__: "syntax fix" 67 __syntaxFix__: "syntax fix"
71 68
72}); 69});
73 70
diff --git a/frontend/beta/js/Clipperz/YUI/Collapser.js b/frontend/beta/js/Clipperz/YUI/Collapser.js
index 5c0ac0f..b104877 100644
--- a/frontend/beta/js/Clipperz/YUI/Collapser.js
+++ b/frontend/beta/js/Clipperz/YUI/Collapser.js
@@ -1,73 +1,70 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; } 27if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; }
31 28
32 //found on YUI-EXT forum (http://www.yui-ext.com/forum/viewtopic.php?t=683&highlight=accordion) 29 //found on YUI-EXT forum (http://www.yui-ext.com/forum/viewtopic.php?t=683&highlight=accordion)
33Clipperz.YUI.Collapser = function(clickEl, collapseEl, initiallyCollapsed) { 30Clipperz.YUI.Collapser = function(clickEl, collapseEl, initiallyCollapsed) {
34 this.clickEl = getEl(clickEl); 31 this.clickEl = getEl(clickEl);
35 this.collapseEl = getEl(collapseEl); 32 this.collapseEl = getEl(collapseEl);
36 this.clickEl.addClass('collapser-expanded'); 33 this.clickEl.addClass('collapser-expanded');
37 if (initiallyCollapsed == true) { 34 if (initiallyCollapsed == true) {
38 this.afterCollapse(); 35 this.afterCollapse();
39 } 36 }
40 this.clickEl.mon('click', function(){ 37 this.clickEl.mon('click', function(){
41 this.collapsed === true ? this.expand() : this.collapse(); 38 this.collapsed === true ? this.expand() : this.collapse();
42 }, this, true); 39 }, this, true);
43}; 40};
44 41
45Clipperz.YUI.Collapser.prototype = { 42Clipperz.YUI.Collapser.prototype = {
46 'collapse': function(){ 43 'collapse': function(){
47 this.collapseEl.clip(); 44 this.collapseEl.clip();
48 this.collapseEl.setHeight(1, true, .35, this.afterCollapse.createDelegate(this), YAHOO.util.Easing.easeOut); 45 this.collapseEl.setHeight(1, true, .35, this.afterCollapse.createDelegate(this), YAHOO.util.Easing.easeOut);
49 this.clickEl.replaceClass('collapser-expanded','collapser-collapsed'); 46 this.clickEl.replaceClass('collapser-expanded','collapser-collapsed');
50 }, 47 },
51 48
52 'afterCollapse': function(){ 49 'afterCollapse': function(){
53 this.collapsed = true; 50 this.collapsed = true;
54 this.collapseEl.setDisplayed(false); 51 this.collapseEl.setDisplayed(false);
55 this.clickEl.replaceClass('collapser-expanded','collapser-collapsed'); 52 this.clickEl.replaceClass('collapser-expanded','collapser-collapsed');
56 }, 53 },
57 54
58 'expand': function(){ 55 'expand': function(){
59 this.collapseEl.setDisplayed(true); 56 this.collapseEl.setDisplayed(true);
60 this.collapseEl.autoHeight(true, .35, this.afterExpand.createDelegate(this), YAHOO.util.Easing.easeOut); 57 this.collapseEl.autoHeight(true, .35, this.afterExpand.createDelegate(this), YAHOO.util.Easing.easeOut);
61 this.clickEl.replaceClass('collapser-collapsed','collapser-expanded'); 58 this.clickEl.replaceClass('collapser-collapsed','collapser-expanded');
62 }, 59 },
63 60
64 'afterExpand': function(){ 61 'afterExpand': function(){
65 this.collapsed = false; 62 this.collapsed = false;
66 this.collapseEl.unclip(); 63 this.collapseEl.unclip();
67 this.collapseEl.setStyle('height', ''); 64 this.collapseEl.setStyle('height', '');
68 this.clickEl.replaceClass('collapser-collapsed','collapser-expanded'); 65 this.clickEl.replaceClass('collapser-collapsed','collapser-expanded');
69 }, 66 },
70 67
71 //----------------------------------------------------- 68 //-----------------------------------------------------
72 __syntaxFix__: '__syntaxFix__' 69 __syntaxFix__: '__syntaxFix__'
73}; 70};
diff --git a/frontend/beta/js/Clipperz/YUI/DomHelper.js b/frontend/beta/js/Clipperz/YUI/DomHelper.js
index 4f8acde..05edc49 100644
--- a/frontend/beta/js/Clipperz/YUI/DomHelper.js
+++ b/frontend/beta/js/Clipperz/YUI/DomHelper.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.ext) == 'undefined') { Clipperz.ext = {}; } 27if (typeof(Clipperz.ext) == 'undefined') { Clipperz.ext = {}; }
31 28
32/** 29/**
33 * @class Clipperz.YUI.DomHelper 30 * @class Clipperz.YUI.DomHelper
34 * Utility class for working with DOM and/or Templates. It transparently supports using HTML fragments or DOM. 31 * Utility class for working with DOM and/or Templates. It transparently supports using HTML fragments or DOM.
35 * For more information see <a href="http://www.jackslocum.com/yui/2006/10/06/domhelper-create-elements-using-dom-html-fragments-or-templates/">this blog post with examples</a>. 32 * For more information see <a href="http://www.jackslocum.com/yui/2006/10/06/domhelper-create-elements-using-dom-html-fragments-or-templates/">this blog post with examples</a>.
36 * @singleton 33 * @singleton
37 */ 34 */
38Clipperz.YUI.DomHelper = new function(){ 35Clipperz.YUI.DomHelper = new function(){
39 /**@private*/ 36 /**@private*/
40 var d = document; 37 var d = document;
41 var tempTableEl = null; 38 var tempTableEl = null;
42 /** True to force the use of DOM instead of html fragments @type Boolean */ 39 /** True to force the use of DOM instead of html fragments @type Boolean */
43 this.useDom = false; 40 this.useDom = false;
44 var emptyTags = /^(?:base|basefont|br|frame|hr|img|input|isindex|link|meta|nextid|range|spacer|wbr|audioscope|area|param|keygen|col|limittext|spot|tab|over|right|left|choose|atop|of)$/i; 41 var emptyTags = /^(?:base|basefont|br|frame|hr|img|input|isindex|link|meta|nextid|range|spacer|wbr|audioscope|area|param|keygen|col|limittext|spot|tab|over|right|left|choose|atop|of)$/i;
45 /** 42 /**
46 * Applies a style specification to an element 43 * Applies a style specification to an element
47 * @param {String/HTMLElement} el The element to apply styles to 44 * @param {String/HTMLElement} el The element to apply styles to
48 * @param {String/Object/Function} styles A style specification string eg "width:100px", or object in the form {width:"100px"}, or 45 * @param {String/Object/Function} styles A style specification string eg "width:100px", or object in the form {width:"100px"}, or
49 * a function which returns such a specification. 46 * a function which returns such a specification.
50 */ 47 */
51 this.applyStyles = function(el, styles){ 48 this.applyStyles = function(el, styles){
52 if(styles){ 49 if(styles){
53 var D = YAHOO.util.Dom; 50 var D = YAHOO.util.Dom;
54 if (typeof styles == "string"){ 51 if (typeof styles == "string"){
55 var re = /\s?([a-z\-]*)\:([^;]*);?/gi; 52 var re = /\s?([a-z\-]*)\:([^;]*);?/gi;
56 var matches; 53 var matches;
57 while ((matches = re.exec(styles)) != null){ 54 while ((matches = re.exec(styles)) != null){
58 D.setStyle(el, matches[1], matches[2]); 55 D.setStyle(el, matches[1], matches[2]);
59 } 56 }
60 }else if (typeof styles == "object"){ 57 }else if (typeof styles == "object"){
61 for (var style in styles){ 58 for (var style in styles){
62 D.setStyle(el, style, styles[style]); 59 D.setStyle(el, style, styles[style]);
63 } 60 }
64 }else if (typeof styles == "function"){ 61 }else if (typeof styles == "function"){
65 Clipperz.YUI.DomHelper.applyStyles(el, styles.call()); 62 Clipperz.YUI.DomHelper.applyStyles(el, styles.call());
66 } 63 }
67 } 64 }
68 }; 65 };
69 66
70 // build as innerHTML where available 67 // build as innerHTML where available
71 /** @ignore */ 68 /** @ignore */
72 var createHtml = function(o){ 69 var createHtml = function(o){
73 var b = ''; 70 var b = '';
74 71
75 if(typeof(o['html']) != 'undefined') { 72 if(typeof(o['html']) != 'undefined') {
76 o['html'] = Clipperz.Base.sanitizeString(o['html']); 73 o['html'] = Clipperz.Base.sanitizeString(o['html']);
77 } else if (typeof(o['htmlString']) != 'undefined') { 74 } else if (typeof(o['htmlString']) != 'undefined') {
78 o['html'] = o['htmlString']; 75 o['html'] = o['htmlString'];
79 delete o.htmlString; 76 delete o.htmlString;
80 } 77 }
81 78
82 b += '<' + o.tag; 79 b += '<' + o.tag;
83 for(var attr in o){ 80 for(var attr in o){
84 if(attr == 'tag' || attr == 'children' || attr == 'html' || typeof o[attr] == 'function') continue; 81 if(attr == 'tag' || attr == 'children' || attr == 'html' || typeof o[attr] == 'function') continue;
85 if(attr == 'style'){ 82 if(attr == 'style'){
86 var s = o['style']; 83 var s = o['style'];
87 if(typeof s == 'function'){ 84 if(typeof s == 'function'){
88 s = s.call(); 85 s = s.call();
89 } 86 }
90 if(typeof s == 'string'){ 87 if(typeof s == 'string'){
91 b += ' style="' + s + '"'; 88 b += ' style="' + s + '"';
92 }else if(typeof s == 'object'){ 89 }else if(typeof s == 'object'){
93 b += ' style="'; 90 b += ' style="';
94 for(var key in s){ 91 for(var key in s){
95 if(typeof s[key] != 'function'){ 92 if(typeof s[key] != 'function'){
96 b += key + ':' + s[key] + ';'; 93 b += key + ':' + s[key] + ';';
97 } 94 }
98 } 95 }
99 b += '"'; 96 b += '"';
100 } 97 }
101 }else{ 98 }else{
102 if(attr == 'cls'){ 99 if(attr == 'cls'){
103 b += ' class="' + o['cls'] + '"'; 100 b += ' class="' + o['cls'] + '"';
104 }else if(attr == 'htmlFor'){ 101 }else if(attr == 'htmlFor'){
105 b += ' for="' + o['htmlFor'] + '"'; 102 b += ' for="' + o['htmlFor'] + '"';
106 }else{ 103 }else{
107 b += ' ' + attr + '="' + o[attr] + '"'; 104 b += ' ' + attr + '="' + o[attr] + '"';
108 } 105 }
109 } 106 }
110 } 107 }
111 if(emptyTags.test(o.tag)){ 108 if(emptyTags.test(o.tag)){
112 b += ' />'; 109 b += ' />';
113 }else{ 110 }else{
114 b += '>'; 111 b += '>';
115 if(o.children){ 112 if(o.children){
116 for(var i = 0, len = o.children.length; i < len; i++) { 113 for(var i = 0, len = o.children.length; i < len; i++) {
117 b += createHtml(o.children[i], b); 114 b += createHtml(o.children[i], b);
118 } 115 }
119 } 116 }
120 if(o.html){ 117 if(o.html){
121 b += o.html; 118 b += o.html;
122 } 119 }
123 b += '</' + o.tag + '>'; 120 b += '</' + o.tag + '>';
124 } 121 }
125 return b; 122 return b;
126 } 123 }
127 124
128 // build as dom 125 // build as dom
129 /** @ignore */ 126 /** @ignore */
130 var createDom = function(o, parentNode){ 127 var createDom = function(o, parentNode){
131 var el = d.createElement(o.tag); 128 var el = d.createElement(o.tag);
132 var useSet = el.setAttribute ? true : false; // In IE some elements don't have setAttribute 129 var useSet = el.setAttribute ? true : false; // In IE some elements don't have setAttribute
133 for(var attr in o){ 130 for(var attr in o){
134 if(attr == 'tag' || attr == 'children' || attr == 'html' || attr == 'style' || typeof o[attr] == 'function') continue; 131 if(attr == 'tag' || attr == 'children' || attr == 'html' || attr == 'style' || typeof o[attr] == 'function') continue;
135 if(attr=='cls'){ 132 if(attr=='cls'){
136 el.className = o['cls']; 133 el.className = o['cls'];
137 }else{ 134 }else{
138 if(useSet) el.setAttribute(attr, o[attr]); 135 if(useSet) el.setAttribute(attr, o[attr]);
139 else el[attr] = o[attr]; 136 else el[attr] = o[attr];
140 } 137 }
141 } 138 }
142 Clipperz.YUI.DomHelper.applyStyles(el, o.style); 139 Clipperz.YUI.DomHelper.applyStyles(el, o.style);
143 if(o.children){ 140 if(o.children){
144 for(var i = 0, len = o.children.length; i < len; i++) { 141 for(var i = 0, len = o.children.length; i < len; i++) {
145 createDom(o.children[i], el); 142 createDom(o.children[i], el);
146 } 143 }
147 } 144 }
148 if(o.html){ 145 if(o.html){
149 el.innerHTML = o.html; 146 el.innerHTML = o.html;
150 } 147 }
151 if(parentNode){ 148 if(parentNode){
152 parentNode.appendChild(el); 149 parentNode.appendChild(el);
153 } 150 }
154 return el; 151 return el;
155 }; 152 };
156 153
157 /** 154 /**
158 * @ignore 155 * @ignore
159 * Nasty code for IE's broken table implementation 156 * Nasty code for IE's broken table implementation
160 */ 157 */
161 var insertIntoTable = function(tag, where, el, html){ 158 var insertIntoTable = function(tag, where, el, html){
162 if(!tempTableEl){ 159 if(!tempTableEl){
163 tempTableEl = document.createElement('div'); 160 tempTableEl = document.createElement('div');
164 } 161 }
165 var node; 162 var node;
166 if(tag == 'table' || tag == 'tbody'){ 163 if(tag == 'table' || tag == 'tbody'){
167 tempTableEl.innerHTML = '<table><tbody>'+html+'</tbody></table>'; 164 tempTableEl.innerHTML = '<table><tbody>'+html+'</tbody></table>';
168 node = tempTableEl.firstChild.firstChild.firstChild; 165 node = tempTableEl.firstChild.firstChild.firstChild;
169 }else{ 166 }else{
170 tempTableEl.innerHTML = '<table><tbody><tr>'+html+'</tr></tbody></table>'; 167 tempTableEl.innerHTML = '<table><tbody><tr>'+html+'</tr></tbody></table>';
171 node = tempTableEl.firstChild.firstChild.firstChild.firstChild; 168 node = tempTableEl.firstChild.firstChild.firstChild.firstChild;
172 } 169 }
173 if(where == 'beforebegin'){ 170 if(where == 'beforebegin'){
174 el.parentNode.insertBefore(node, el); 171 el.parentNode.insertBefore(node, el);
175 return node; 172 return node;
176 }else if(where == 'afterbegin'){ 173 }else if(where == 'afterbegin'){
177 el.insertBefore(node, el.firstChild); 174 el.insertBefore(node, el.firstChild);
178 return node; 175 return node;
179 }else if(where == 'beforeend'){ 176 }else if(where == 'beforeend'){
180 el.appendChild(node); 177 el.appendChild(node);
181 return node; 178 return node;
182 }else if(where == 'afterend'){ 179 }else if(where == 'afterend'){
183 el.parentNode.insertBefore(node, el.nextSibling); 180 el.parentNode.insertBefore(node, el.nextSibling);
184 return node; 181 return node;
185 } 182 }
186 } 183 }
187 184
188 /** 185 /**
189 * Inserts an HTML fragment into the Dom 186 * Inserts an HTML fragment into the Dom
190 * @param {String} where Where to insert the html in relation to el - beforeBegin, afterBegin, beforeEnd, afterEnd. 187 * @param {String} where Where to insert the html in relation to el - beforeBegin, afterBegin, beforeEnd, afterEnd.
191 * @param {HTMLElement} el The context element 188 * @param {HTMLElement} el The context element
192 * @param {String} html The HTML fragmenet 189 * @param {String} html The HTML fragmenet
193 * @return {HTMLElement} The new node 190 * @return {HTMLElement} The new node
194 */ 191 */
195 this.insertHtml = function(where, el, html){ 192 this.insertHtml = function(where, el, html){
196 where = where.toLowerCase(); 193 where = where.toLowerCase();
197 if(el.insertAdjacentHTML){ 194 if(el.insertAdjacentHTML){
198 var tag = el.tagName.toLowerCase(); 195 var tag = el.tagName.toLowerCase();
199 if(tag == 'table' || tag == 'tbody' || tag == 'tr'){ 196 if(tag == 'table' || tag == 'tbody' || tag == 'tr'){
200 return insertIntoTable(tag, where, el, html); 197 return insertIntoTable(tag, where, el, html);
201 } 198 }
202 switch(where){ 199 switch(where){
203 case 'beforebegin': 200 case 'beforebegin':
204 el.insertAdjacentHTML(where, html); 201 el.insertAdjacentHTML(where, html);
205 return el.previousSibling; 202 return el.previousSibling;
206 case 'afterbegin': 203 case 'afterbegin':
207 el.insertAdjacentHTML(where, html); 204 el.insertAdjacentHTML(where, html);
208 return el.firstChild; 205 return el.firstChild;
209 case 'beforeend': 206 case 'beforeend':
210 el.insertAdjacentHTML(where, html); 207 el.insertAdjacentHTML(where, html);
211 return el.lastChild; 208 return el.lastChild;
212 case 'afterend': 209 case 'afterend':
213 el.insertAdjacentHTML(where, html); 210 el.insertAdjacentHTML(where, html);
214 return el.nextSibling; 211 return el.nextSibling;
215 } 212 }
216 throw 'Illegal insertion point -> "' + where + '"'; 213 throw 'Illegal insertion point -> "' + where + '"';
217 } 214 }
218 var range = el.ownerDocument.createRange(); 215 var range = el.ownerDocument.createRange();
219 var frag; 216 var frag;
220 switch(where){ 217 switch(where){
221 case 'beforebegin': 218 case 'beforebegin':
222 range.setStartBefore(el); 219 range.setStartBefore(el);
223 frag = range.createContextualFragment(html); 220 frag = range.createContextualFragment(html);
224 el.parentNode.insertBefore(frag, el); 221 el.parentNode.insertBefore(frag, el);
225 return el.previousSibling; 222 return el.previousSibling;
226 case 'afterbegin': 223 case 'afterbegin':
227 if(el.firstChild){ // faster 224 if(el.firstChild){ // faster
228 range.setStartBefore(el.firstChild); 225 range.setStartBefore(el.firstChild);
229 }else{ 226 }else{
230 range.selectNodeContents(el); 227 range.selectNodeContents(el);
231 range.collapse(true); 228 range.collapse(true);
232 } 229 }
233 frag = range.createContextualFragment(html); 230 frag = range.createContextualFragment(html);
234 el.insertBefore(frag, el.firstChild); 231 el.insertBefore(frag, el.firstChild);
235 return el.firstChild; 232 return el.firstChild;
236 case 'beforeend': 233 case 'beforeend':
237 if(el.lastChild){ 234 if(el.lastChild){
238 range.setStartAfter(el.lastChild); // faster 235 range.setStartAfter(el.lastChild); // faster
239 }else{ 236 }else{
240 range.selectNodeContents(el); 237 range.selectNodeContents(el);
241 range.collapse(false); 238 range.collapse(false);
242 } 239 }
243 frag = range.createContextualFragment(html); 240 frag = range.createContextualFragment(html);
244 el.appendChild(frag); 241 el.appendChild(frag);
245 return el.lastChild; 242 return el.lastChild;
246 case 'afterend': 243 case 'afterend':
247 range.setStartAfter(el); 244 range.setStartAfter(el);
248 frag = range.createContextualFragment(html); 245 frag = range.createContextualFragment(html);
249 el.parentNode.insertBefore(frag, el.nextSibling); 246 el.parentNode.insertBefore(frag, el.nextSibling);
250 return el.nextSibling; 247 return el.nextSibling;
251 } 248 }
252 throw 'Illegal insertion point -> "' + where + '"'; 249 throw 'Illegal insertion point -> "' + where + '"';
253 }; 250 };
254 251
255 /** 252 /**
256 * Creates new Dom element(s) and inserts them before el 253 * Creates new Dom element(s) and inserts them before el
257 * @param {String/HTMLElement/Element} el The context element 254 * @param {String/HTMLElement/Element} el The context element
258 * @param {Object} o The Dom object spec (and children) 255 * @param {Object} o The Dom object spec (and children)
259 * @param {<i>Boolean</i>} returnElement (optional) true to return a YAHOO.ext.Element 256 * @param {<i>Boolean</i>} returnElement (optional) true to return a YAHOO.ext.Element
260 * @return {HTMLElement} The new node 257 * @return {HTMLElement} The new node
261 */ 258 */
262 this.insertBefore = function(el, o, returnElement){ 259 this.insertBefore = function(el, o, returnElement){
263 el = el.dom ? el.dom : YAHOO.util.Dom.get(el); 260 el = el.dom ? el.dom : YAHOO.util.Dom.get(el);
264 var newNode; 261 var newNode;
265 if(this.useDom){ 262 if(this.useDom){
266 newNode = createDom(o, null); 263 newNode = createDom(o, null);
267 el.parentNode.insertBefore(newNode, el); 264 el.parentNode.insertBefore(newNode, el);
268 }else{ 265 }else{
269 var html = createHtml(o); 266 var html = createHtml(o);
270 newNode = this.insertHtml('beforeBegin', el, html); 267 newNode = this.insertHtml('beforeBegin', el, html);
271 } 268 }
272 return returnElement ? YAHOO.ext.Element.get(newNode, true) : newNode; 269 return returnElement ? YAHOO.ext.Element.get(newNode, true) : newNode;
273 }; 270 };
274 271
275 /** 272 /**
276 * Creates new Dom element(s) and inserts them after el 273 * Creates new Dom element(s) and inserts them after el
277 * @param {String/HTMLElement/Element} el The context element 274 * @param {String/HTMLElement/Element} el The context element
278 * @param {Object} o The Dom object spec (and children) 275 * @param {Object} o The Dom object spec (and children)
279 * @param {<i>Boolean</i>} returnElement (optional) true to return a YAHOO.ext.Element 276 * @param {<i>Boolean</i>} returnElement (optional) true to return a YAHOO.ext.Element
280 * @return {HTMLElement} The new node 277 * @return {HTMLElement} The new node
281 */ 278 */
282 this.insertAfter = function(el, o, returnElement){ 279 this.insertAfter = function(el, o, returnElement){
283 el = el.dom ? el.dom : YAHOO.util.Dom.get(el); 280 el = el.dom ? el.dom : YAHOO.util.Dom.get(el);
284 var newNode; 281 var newNode;
285 if(this.useDom){ 282 if(this.useDom){
286 newNode = createDom(o, null); 283 newNode = createDom(o, null);
287 el.parentNode.insertBefore(newNode, el.nextSibling); 284 el.parentNode.insertBefore(newNode, el.nextSibling);
288 }else{ 285 }else{
289 var html = createHtml(o); 286 var html = createHtml(o);
290 newNode = this.insertHtml('afterEnd', el, html); 287 newNode = this.insertHtml('afterEnd', el, html);
291 } 288 }
292 return returnElement ? YAHOO.ext.Element.get(newNode, true) : newNode; 289 return returnElement ? YAHOO.ext.Element.get(newNode, true) : newNode;
293 }; 290 };
294 291
295 /** 292 /**
296 * Creates new Dom element(s) and appends them to el 293 * Creates new Dom element(s) and appends them to el
297 * @param {String/HTMLElement/Element} el The context element 294 * @param {String/HTMLElement/Element} el The context element
298 * @param {Object} o The Dom object spec (and children) 295 * @param {Object} o The Dom object spec (and children)
299 * @param {<i>Boolean</i>} returnElement (optional) true to return a YAHOO.ext.Element 296 * @param {<i>Boolean</i>} returnElement (optional) true to return a YAHOO.ext.Element
300 * @return {HTMLElement} The new node 297 * @return {HTMLElement} The new node
301 */ 298 */
302 this.append = function(el, o, returnElement){ 299 this.append = function(el, o, returnElement){
303 el = el.dom ? el.dom : YAHOO.util.Dom.get(el); 300 el = el.dom ? el.dom : YAHOO.util.Dom.get(el);
304 var newNode; 301 var newNode;
305 if(this.useDom){ 302 if(this.useDom){
306 newNode = createDom(o, null); 303 newNode = createDom(o, null);
307 el.appendChild(newNode); 304 el.appendChild(newNode);
308 }else{ 305 }else{
309 var html = createHtml(o); 306 var html = createHtml(o);
310 newNode = this.insertHtml('beforeEnd', el, html); 307 newNode = this.insertHtml('beforeEnd', el, html);
311 } 308 }
312 return returnElement ? YAHOO.ext.Element.get(newNode, true) : newNode; 309 return returnElement ? YAHOO.ext.Element.get(newNode, true) : newNode;
313 }; 310 };
314 311
315 /** 312 /**
316 * Creates new Dom element(s) and overwrites the contents of el with them 313 * Creates new Dom element(s) and overwrites the contents of el with them
317 * @param {String/HTMLElement/Element} el The context element 314 * @param {String/HTMLElement/Element} el The context element
318 * @param {Object} o The Dom object spec (and children) 315 * @param {Object} o The Dom object spec (and children)
319 * @param {<i>Boolean</i>} returnElement (optional) true to return a YAHOO.ext.Element 316 * @param {<i>Boolean</i>} returnElement (optional) true to return a YAHOO.ext.Element
320 * @return {HTMLElement} The new node 317 * @return {HTMLElement} The new node
321 */ 318 */
322 this.overwrite = function(el, o, returnElement){ 319 this.overwrite = function(el, o, returnElement){
323 el = el.dom ? el.dom : YAHOO.util.Dom.get(el); 320 el = el.dom ? el.dom : YAHOO.util.Dom.get(el);
324 el.innerHTML = createHtml(o); 321 el.innerHTML = createHtml(o);
325 return returnElement ? YAHOO.ext.Element.get(el.firstChild, true) : el.firstChild; 322 return returnElement ? YAHOO.ext.Element.get(el.firstChild, true) : el.firstChild;
326 }; 323 };
327 324
328 /** 325 /**
329 * Creates a new Clipperz.YUI.DomHelper.Template from the Dom object spec 326 * Creates a new Clipperz.YUI.DomHelper.Template from the Dom object spec
330 * @param {Object} o The Dom object spec (and children) 327 * @param {Object} o The Dom object spec (and children)
331 * @return {Clipperz.YUI.DomHelper.Template} The new template 328 * @return {Clipperz.YUI.DomHelper.Template} The new template
332 */ 329 */
333 this.createTemplate = function(o){ 330 this.createTemplate = function(o){
334 var html = createHtml(o); 331 var html = createHtml(o);
335 return new Clipperz.YUI.DomHelper.Template(html); 332 return new Clipperz.YUI.DomHelper.Template(html);
336 }; 333 };
337}(); 334}();
338 335
339/** 336/**
340* @class Clipperz.YUI.DomHelper.Template 337* @class Clipperz.YUI.DomHelper.Template
341* Represents an HTML fragment template. 338* Represents an HTML fragment template.
342* For more information see <a href="http://www.jackslocum.com/yui/2006/10/06/domhelper-create-elements-using-dom-html-fragments-or-templates/">this blog post with examples</a>. 339* For more information see <a href="http://www.jackslocum.com/yui/2006/10/06/domhelper-create-elements-using-dom-html-fragments-or-templates/">this blog post with examples</a>.
343* <br> 340* <br>
344* <b>This class is also available as YAHOO.ext.Template</b>. 341* <b>This class is also available as YAHOO.ext.Template</b>.
345* @constructor 342* @constructor
346* @param {String/Array} html The HTML fragment or an array of fragments to join('') or multiple arguments to join('') 343* @param {String/Array} html The HTML fragment or an array of fragments to join('') or multiple arguments to join('')
347*/ 344*/
348Clipperz.YUI.DomHelper.Template = function(html){ 345Clipperz.YUI.DomHelper.Template = function(html){
349 if(html instanceof Array){ 346 if(html instanceof Array){
350 html = html.join(''); 347 html = html.join('');
351 }else if(arguments.length > 1){ 348 }else if(arguments.length > 1){
352 html = Array.prototype.join.call(arguments, ''); 349 html = Array.prototype.join.call(arguments, '');
353 } 350 }
354 /**@private*/ 351 /**@private*/
355 this.html = html; 352 this.html = html;
356}; 353};
357Clipperz.YUI.DomHelper.Template.prototype = { 354Clipperz.YUI.DomHelper.Template.prototype = {
358 /** 355 /**
359 * Returns an HTML fragment of this template with the specified values applied 356 * Returns an HTML fragment of this template with the specified values applied
360 * @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}) 357 * @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
361 * @return {String} 358 * @return {String}
362 */ 359 */
363 applyTemplate : function(values){ 360 applyTemplate : function(values){
364 if(this.compiled){ 361 if(this.compiled){
365 return this.compiled(values); 362 return this.compiled(values);
366 } 363 }
367 var empty = ''; 364 var empty = '';
368 var fn = function(match, index){ 365 var fn = function(match, index){
369 if(typeof values[index] != 'undefined'){ 366 if(typeof values[index] != 'undefined'){
370 return values[index]; 367 return values[index];
371 }else{ 368 }else{
372 return empty; 369 return empty;
373 } 370 }
374 } 371 }
375 return this.html.replace(this.re, fn); 372 return this.html.replace(this.re, fn);
376 }, 373 },
377 374
378 /** 375 /**
379 * The regular expression used to match template variables 376 * The regular expression used to match template variables
380 * @type RegExp 377 * @type RegExp
381 * @property 378 * @property
382 */ 379 */
383 re : /\{([\w|-]+)\}/g, 380 re : /\{([\w|-]+)\}/g,
384 381
385 /** 382 /**
386 * Compiles the template into an internal function, eliminating the RegEx overhead 383 * Compiles the template into an internal function, eliminating the RegEx overhead
387 */ 384 */
388 compile : function(){ 385 compile : function(){
389 var body = ["this.compiled = function(values){ return ['"]; 386 var body = ["this.compiled = function(values){ return ['"];
390 body.push(this.html.replace(this.re, "', values['$1'], '")); 387 body.push(this.html.replace(this.re, "', values['$1'], '"));
391 body.push("'].join('');};"); 388 body.push("'].join('');};");
392 eval(body.join('')); 389 eval(body.join(''));
393 return this; 390 return this;
394 }, 391 },
395 392
396 /** 393 /**
397 * Applies the supplied values to the template and inserts the new node(s) before el 394 * Applies the supplied values to the template and inserts the new node(s) before el
398 * @param {String/HTMLElement/Element} el The context element 395 * @param {String/HTMLElement/Element} el The context element
399 * @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}) 396 * @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
400 * @param {<i>Boolean</i>} returnElement (optional) true to return a YAHOO.ext.Element 397 * @param {<i>Boolean</i>} returnElement (optional) true to return a YAHOO.ext.Element
401 * @return {HTMLElement} The new node 398 * @return {HTMLElement} The new node
402 */ 399 */
403 insertBefore: function(el, values, returnElement){ 400 insertBefore: function(el, values, returnElement){
404 el = el.dom ? el.dom : YAHOO.util.Dom.get(el); 401 el = el.dom ? el.dom : YAHOO.util.Dom.get(el);
405 var newNode = Clipperz.YUI.DomHelper.insertHtml('beforeBegin', el, this.applyTemplate(values)); 402 var newNode = Clipperz.YUI.DomHelper.insertHtml('beforeBegin', el, this.applyTemplate(values));
406 return returnElement ? YAHOO.ext.Element.get(newNode, true) : newNode; 403 return returnElement ? YAHOO.ext.Element.get(newNode, true) : newNode;
407 }, 404 },
408 405
diff --git a/frontend/beta/js/Clipperz/YUI/DomQuery.js b/frontend/beta/js/Clipperz/YUI/DomQuery.js
index 84aac08..4ad4193 100644
--- a/frontend/beta/js/Clipperz/YUI/DomQuery.js
+++ b/frontend/beta/js/Clipperz/YUI/DomQuery.js
@@ -1,408 +1,405 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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/* 26/*
30 * yui-ext 0.40 27 * yui-ext 0.40
31 * Copyright(c) 2006, Jack Slocum. 28 * Copyright(c) 2006, Jack Slocum.
32 */ 29 */
33 30
34/** 31/**
35 * @class Ext.DomQuery 32 * @class Ext.DomQuery
36 * Provides high performance selector/xpath processing by compiling queries into reusable functions. 33 * Provides high performance selector/xpath processing by compiling queries into reusable functions.
37 * New pseudo classes and matchers can be plugged. It works on HTML and XML documents (if a content node is passed in). 34 * New pseudo classes and matchers can be plugged. It works on HTML and XML documents (if a content node is passed in).
38 * @singleton 35 * @singleton
39 */ 36 */
40Ext.DomQuery = function(){ 37Ext.DomQuery = function(){
41 var cache = {}, simpleCache = {}, valueCache = {}; 38 var cache = {}, simpleCache = {}, valueCache = {};
42 var nonSpace = /\S/; 39 var nonSpace = /\S/;
43 var trimRe = /^\s*(.*?)\s*$/; 40 var trimRe = /^\s*(.*?)\s*$/;
44 var tplRe = /\{(\d+)\}/g; 41 var tplRe = /\{(\d+)\}/g;
45 var modeRe = /^(\s?[\/>]\s?|\s|$)/; 42 var modeRe = /^(\s?[\/>]\s?|\s|$)/;
46 var clsRes = {}; 43 var clsRes = {};
47 44
48 function child(p, index){ 45 function child(p, index){
49 var i = 0; 46 var i = 0;
50 var n = p.firstChild; 47 var n = p.firstChild;
51 while(n){ 48 while(n){
52 if(n.nodeType == 1){ 49 if(n.nodeType == 1){
53 i++; 50 i++;
54 if(i == index){ 51 if(i == index){
55 return n; 52 return n;
56 } 53 }
57 } 54 }
58 n = n.nextSibling; 55 n = n.nextSibling;
59 } 56 }
60 return null; 57 return null;
61 }; 58 };
62 59
63 function next(d){ 60 function next(d){
64 var n = d.nextSibling; 61 var n = d.nextSibling;
65 while(n && n.nodeType != 1){ 62 while(n && n.nodeType != 1){
66 n = n.nextSibling; 63 n = n.nextSibling;
67 } 64 }
68 return n; 65 return n;
69 }; 66 };
70 67
71 function prev(d){ 68 function prev(d){
72 var n = d.previousSibling; 69 var n = d.previousSibling;
73 while(n && n.nodeType != 1){ 70 while(n && n.nodeType != 1){
74 n = n.previousSibling; 71 n = n.previousSibling;
75 } 72 }
76 return n; 73 return n;
77 }; 74 };
78 75
79 function clean(d){ 76 function clean(d){
80 var n = d.firstChild, ni = -1; 77 var n = d.firstChild, ni = -1;
81 while(n){ 78 while(n){
82 var nx = n.nextSibling; 79 var nx = n.nextSibling;
83 if(n.nodeType == 3 && !nonSpace.test(n.nodeValue)){ 80 if(n.nodeType == 3 && !nonSpace.test(n.nodeValue)){
84 d.removeChild(n); 81 d.removeChild(n);
85 }else{ 82 }else{
86 n.nodeIndex = ++ni; 83 n.nodeIndex = ++ni;
87 } 84 }
88 n = nx; 85 n = nx;
89 } 86 }
90 return this; 87 return this;
91 }; 88 };
92 89
93 function byClassName(c, a, v){ 90 function byClassName(c, a, v){
94 if(!v){ 91 if(!v){
95 return c; 92 return c;
96 } 93 }
97 var re = clsRes[v]; 94 var re = clsRes[v];
98 if(!re){ 95 if(!re){
99 re = new RegExp('(?:^|\\s)(?:' + v + ')(?:\\s|$)'); 96 re = new RegExp('(?:^|\\s)(?:' + v + ')(?:\\s|$)');
100 clsRes[v] = re; 97 clsRes[v] = re;
101 } 98 }
102 var r = []; 99 var r = [];
103 for(var i = 0, ci; ci = c[i]; i++){ 100 for(var i = 0, ci; ci = c[i]; i++){
104 if(re.test(ci.className)){ 101 if(re.test(ci.className)){
105 r[r.length] = ci; 102 r[r.length] = ci;
106 } 103 }
107 } 104 }
108 return r; 105 return r;
109 }; 106 };
110 107
111 function convert(c){ 108 function convert(c){
112 if(c.slice){ 109 if(c.slice){
113 return c; 110 return c;
114 } 111 }
115 var r = []; 112 var r = [];
116 for(var i = 0, l = c.length; i < l; i++){ 113 for(var i = 0, l = c.length; i < l; i++){
117 r[r.length] = c[i]; 114 r[r.length] = c[i];
118 } 115 }
119 return r; 116 return r;
120 }; 117 };
121 118
122 function attrValue(n, attr){ 119 function attrValue(n, attr){
123 if(!n.tagName && typeof n.length != 'undefined'){ 120 if(!n.tagName && typeof n.length != 'undefined'){
124 n = n[0]; 121 n = n[0];
125 } 122 }
126 if(!n){ 123 if(!n){
127 return null; 124 return null;
128 } 125 }
129 if(attr == 'for'){ 126 if(attr == 'for'){
130 return n.htmlFor; 127 return n.htmlFor;
131 } 128 }
132 if(attr == 'class' || attr == 'className'){ 129 if(attr == 'class' || attr == 'className'){
133 return n.className; 130 return n.className;
134 } 131 }
135 return n.getAttribute(attr) || n[attr]; 132 return n.getAttribute(attr) || n[attr];
136 133
137 }; 134 };
138 135
139 function getNodes(ns, mode, tagName){ 136 function getNodes(ns, mode, tagName){
140 var result = [], cs; 137 var result = [], cs;
141 if(!ns){ 138 if(!ns){
142 return result; 139 return result;
143 } 140 }
144 mode = mode ? mode.replace(trimRe, '$1') : ''; 141 mode = mode ? mode.replace(trimRe, '$1') : '';
145 tagName = tagName || '*'; 142 tagName = tagName || '*';
146 if(ns.tagName || ns == document){ 143 if(ns.tagName || ns == document){
147 ns = [ns]; 144 ns = [ns];
148 } 145 }
149 if(mode != '/' && mode != '>'){ 146 if(mode != '/' && mode != '>'){
150 for(var i = 0, ni; ni = ns[i]; i++){ 147 for(var i = 0, ni; ni = ns[i]; i++){
151 cs = ni.getElementsByTagName(tagName); 148 cs = ni.getElementsByTagName(tagName);
152 result = concat(result, cs); 149 result = concat(result, cs);
153 } 150 }
154 }else{ 151 }else{
155 for(var i = 0, ni; ni = ns[i]; i++){ 152 for(var i = 0, ni; ni = ns[i]; i++){
156 var cn = ni.getElementsByTagName(tagName); 153 var cn = ni.getElementsByTagName(tagName);
157 for(var j = 0, cj; cj = cn[j]; j++){ 154 for(var j = 0, cj; cj = cn[j]; j++){
158 if(cj.parentNode == ni){ 155 if(cj.parentNode == ni){
159 result[result.length] = cj; 156 result[result.length] = cj;
160 } 157 }
161 } 158 }
162 } 159 }
163 160
164 } 161 }
165 return result; 162 return result;
166 }; 163 };
167 164
168 function concat(a, b){ 165 function concat(a, b){
169 if(b.slice){ 166 if(b.slice){
170 return a.concat(b); 167 return a.concat(b);
171 } 168 }
172 for(var i = 0, l = b.length; i < l; i++){ 169 for(var i = 0, l = b.length; i < l; i++){
173 a[a.length] = b[i]; 170 a[a.length] = b[i];
174 } 171 }
175 return a; 172 return a;
176 } 173 }
177 174
178 function byTag(cs, tagName){ 175 function byTag(cs, tagName){
179 if(cs.tagName || cs == document){ 176 if(cs.tagName || cs == document){
180 cs = [cs]; 177 cs = [cs];
181 } 178 }
182 if(!tagName){ 179 if(!tagName){
183 return cs; 180 return cs;
184 } 181 }
185 var r = []; tagName = tagName.toLowerCase(); 182 var r = []; tagName = tagName.toLowerCase();
186 for(var i = 0, ci; ci = cs[i]; i++){ 183 for(var i = 0, ci; ci = cs[i]; i++){
187 if(ci.nodeType == 1 && ci.tagName.toLowerCase()==tagName){ 184 if(ci.nodeType == 1 && ci.tagName.toLowerCase()==tagName){
188 r[r.length] = ci; 185 r[r.length] = ci;
189 } 186 }
190 } 187 }
191 return r; 188 return r;
192 }; 189 };
193 190
194 function byId(cs, attr, id){ 191 function byId(cs, attr, id){
195 if(cs.tagName || cs == document){ 192 if(cs.tagName || cs == document){
196 cs = [cs]; 193 cs = [cs];
197 } 194 }
198 if(!id){ 195 if(!id){
199 return cs; 196 return cs;
200 } 197 }
201 var r = []; 198 var r = [];
202 for(var i = 0, l = cs.length; i < l; i++){ 199 for(var i = 0, l = cs.length; i < l; i++){
203 var ci = cs[i]; 200 var ci = cs[i];
204 if(ci && ci.id == id){ 201 if(ci && ci.id == id){
205 r[r.length] = ci; 202 r[r.length] = ci;
206 } 203 }
207 } 204 }
208 return r; 205 return r;
209 }; 206 };
210 207
211 function byAttribute(cs, attr, value, op, custom){ 208 function byAttribute(cs, attr, value, op, custom){
212 var r = [], st = custom=='{'; 209 var r = [], st = custom=='{';
213 var f = Ext.DomQuery.operators[op]; 210 var f = Ext.DomQuery.operators[op];
214 for(var i = 0, l = cs.length; i < l; i++){ 211 for(var i = 0, l = cs.length; i < l; i++){
215 var a; 212 var a;
216 if(st){ 213 if(st){
217 a = Ext.DomQuery.getStyle(cs[i], attr); 214 a = Ext.DomQuery.getStyle(cs[i], attr);
218 } 215 }
219 else if(attr == 'class' || attr == 'className'){ 216 else if(attr == 'class' || attr == 'className'){
220 a = cs[i].className; 217 a = cs[i].className;
221 }else if(attr == 'for'){ 218 }else if(attr == 'for'){
222 a = cs[i].htmlFor; 219 a = cs[i].htmlFor;
223 }else{ 220 }else{
224 a = cs[i].getAttribute(attr); 221 a = cs[i].getAttribute(attr);
225 } 222 }
226 if((f && f(a, value)) || (!f && a)){ 223 if((f && f(a, value)) || (!f && a)){
227 r[r.length] = cs[i]; 224 r[r.length] = cs[i];
228 } 225 }
229 } 226 }
230 return r; 227 return r;
231 }; 228 };
232 229
233 function byPseudo(cs, name, value){ 230 function byPseudo(cs, name, value){
234 return Ext.DomQuery.pseudos[name](cs, value); 231 return Ext.DomQuery.pseudos[name](cs, value);
235 }; 232 };
236 233
237 // This is for IE MSXML which does not support expandos. 234 // This is for IE MSXML which does not support expandos.
238 // IE runs the same speed using setAttribute, however FF slows way down 235 // IE runs the same speed using setAttribute, however FF slows way down
239 // and Safari completely fails so they need to continue to use expandos. 236 // and Safari completely fails so they need to continue to use expandos.
240 // Branched at load time for faster execution. 237 // Branched at load time for faster execution.
241 var isIE = window.ActiveXObject; 238 var isIE = window.ActiveXObject;
242 var addAttr = isIE ? 239 var addAttr = isIE ?
243 function(n, a, v){ 240 function(n, a, v){
244 n.setAttribute(a, v); 241 n.setAttribute(a, v);
245 } : 242 } :
246 function(n, a, v){ 243 function(n, a, v){
247 n[a] = v; 244 n[a] = v;
248 }; 245 };
249 var getAttr = isIE ? 246 var getAttr = isIE ?
250 function(n, a){ 247 function(n, a){
251 return n.getAttribute(a); 248 return n.getAttribute(a);
252 } : 249 } :
253 function(n, a){ 250 function(n, a){
254 return n[a]; 251 return n[a];
255 }; 252 };
256 var clearAttr = isIE ? 253 var clearAttr = isIE ?
257 function(n, a){ 254 function(n, a){
258 n.removeAttribute(a); 255 n.removeAttribute(a);
259 } : 256 } :
260 function(n, a, v){ 257 function(n, a, v){
261 delete n[a]; 258 delete n[a];
262 }; 259 };
263 260
264 function nodup(cs){ 261 function nodup(cs){
265 if(!cs.length){ 262 if(!cs.length){
266 return cs; 263 return cs;
267 } 264 }
268 addAttr(cs[0], '_nodup', true); 265 addAttr(cs[0], '_nodup', true);
269 var r = [cs[0]]; 266 var r = [cs[0]];
270 for(var i = 1, len = cs.length; i < len; i++){ 267 for(var i = 1, len = cs.length; i < len; i++){
271 var c = cs[i]; 268 var c = cs[i];
272 if(!getAttr(c, '_nodup')){ 269 if(!getAttr(c, '_nodup')){
273 addAttr(c, '_nodup', true); 270 addAttr(c, '_nodup', true);
274 r[r.length] = c; 271 r[r.length] = c;
275 } 272 }
276 } 273 }
277 for(var i = 0, len = cs.length; i < len; i++){ 274 for(var i = 0, len = cs.length; i < len; i++){
278 clearAttr(cs[i], '_nodup'); 275 clearAttr(cs[i], '_nodup');
279 } 276 }
280 return r; 277 return r;
281 } 278 }
282 279
283 function quickDiff(c1, c2){ 280 function quickDiff(c1, c2){
284 if(!c1.length){ 281 if(!c1.length){
285 return c2; 282 return c2;
286 } 283 }
287 for(var i = 0, len = c1.length; i < len; i++){ 284 for(var i = 0, len = c1.length; i < len; i++){
288 addAttr(c1[i], '_qdiff', true); 285 addAttr(c1[i], '_qdiff', true);
289 } 286 }
290 var r = []; 287 var r = [];
291 for(var i = 0, len = c2.length; i < len; i++){ 288 for(var i = 0, len = c2.length; i < len; i++){
292 if(!getAttr(c2[i], '_qdiff')){ 289 if(!getAttr(c2[i], '_qdiff')){
293 r[r.length] = c2[i]; 290 r[r.length] = c2[i];
294 } 291 }
295 } 292 }
296 for(var i = 0, len = c1.length; i < len; i++){ 293 for(var i = 0, len = c1.length; i < len; i++){
297 clearAttr(c1[i], '_qdiff'); 294 clearAttr(c1[i], '_qdiff');
298 } 295 }
299 return r; 296 return r;
300 } 297 }
301 298
302 function quickId(ns, mode, root, id){ 299 function quickId(ns, mode, root, id){
303 if(ns == root){ 300 if(ns == root){
304 var d = root.ownerDocument || root; 301 var d = root.ownerDocument || root;
305 return d.getElementById(id); 302 return d.getElementById(id);
306 } 303 }
307 ns = getNodes(ns, mode, '*'); 304 ns = getNodes(ns, mode, '*');
308 return byId(ns, null, id); 305 return byId(ns, null, id);
309 } 306 }
310 307
311 return { 308 return {
312 getStyle : function(el, name){ 309 getStyle : function(el, name){
313 return YAHOO.util.Dom.getStyle(el, name); 310 return YAHOO.util.Dom.getStyle(el, name);
314 }, 311 },
315 /** 312 /**
316 * Compiles a selector/xpath query into a reusable function. The returned function 313 * Compiles a selector/xpath query into a reusable function. The returned function
317 * takes one parameter "root" (optional), which is the context node from where the query should start. 314 * takes one parameter "root" (optional), which is the context node from where the query should start.
318 * @param {String} selector The selector/xpath query 315 * @param {String} selector The selector/xpath query
319 * @param {String} type (optional) Either 'select' (the default) or 'simple' for a simple selector match 316 * @param {String} type (optional) Either 'select' (the default) or 'simple' for a simple selector match
320 * @return {Function} 317 * @return {Function}
321 */ 318 */
322 compile : function(path, type){ 319 compile : function(path, type){
323 // strip leading slashes 320 // strip leading slashes
324 while(path.substr(0, 1)=='/'){ 321 while(path.substr(0, 1)=='/'){
325 path = path.substr(1); 322 path = path.substr(1);
326 } 323 }
327 type = type || 'select'; 324 type = type || 'select';
328 325
329 var fn = ['var f = function(root){\n var mode; var n = root || document;\n']; 326 var fn = ['var f = function(root){\n var mode; var n = root || document;\n'];
330 var q = path, mode, lq; 327 var q = path, mode, lq;
331 var tk = Ext.DomQuery.matchers; 328 var tk = Ext.DomQuery.matchers;
332 var tklen = tk.length; 329 var tklen = tk.length;
333 var mm; 330 var mm;
334 while(q && lq != q){ 331 while(q && lq != q){
335 lq = q; 332 lq = q;
336 var tm = q.match(/^(#)?([\w-\*]+)/); 333 var tm = q.match(/^(#)?([\w-\*]+)/);
337 if(type == 'select'){ 334 if(type == 'select'){
338 if(tm){ 335 if(tm){
339 if(tm[1] == '#'){ 336 if(tm[1] == '#'){
340 fn[fn.length] = 'n = quickId(n, mode, root, "'+tm[2]+'");'; 337 fn[fn.length] = 'n = quickId(n, mode, root, "'+tm[2]+'");';
341 }else{ 338 }else{
342 fn[fn.length] = 'n = getNodes(n, mode, "'+tm[2]+'");'; 339 fn[fn.length] = 'n = getNodes(n, mode, "'+tm[2]+'");';
343 } 340 }
344 q = q.replace(tm[0], ''); 341 q = q.replace(tm[0], '');
345 }else{ 342 }else{
346 fn[fn.length] = 'n = getNodes(n, mode, "*");'; 343 fn[fn.length] = 'n = getNodes(n, mode, "*");';
347 } 344 }
348 }else{ 345 }else{
349 if(tm){ 346 if(tm){
350 if(tm[1] == '#'){ 347 if(tm[1] == '#'){
351 fn[fn.length] = 'n = byId(n, null, "'+tm[2]+'");'; 348 fn[fn.length] = 'n = byId(n, null, "'+tm[2]+'");';
352 }else{ 349 }else{
353 fn[fn.length] = 'n = byTag(n, "'+tm[2]+'");'; 350 fn[fn.length] = 'n = byTag(n, "'+tm[2]+'");';
354 } 351 }
355 q = q.replace(tm[0], ''); 352 q = q.replace(tm[0], '');
356 } 353 }
357 } 354 }
358 while(!(mm = q.match(modeRe))){ 355 while(!(mm = q.match(modeRe))){
359 var matched = false; 356 var matched = false;
360 for(var j = 0; j < tklen; j++){ 357 for(var j = 0; j < tklen; j++){
361 var t = tk[j]; 358 var t = tk[j];
362 var m = q.match(t.re); 359 var m = q.match(t.re);
363 if(m){ 360 if(m){
364 fn[fn.length] = t.select.replace(tplRe, function(x, i){ 361 fn[fn.length] = t.select.replace(tplRe, function(x, i){
365 return m[i]; 362 return m[i];
366 }); 363 });
367 q = q.replace(m[0], ''); 364 q = q.replace(m[0], '');
368 matched = true; 365 matched = true;
369 break; 366 break;
370 } 367 }
371 } 368 }
372 // prevent infinite loop on bad selector 369 // prevent infinite loop on bad selector
373 if(!matched){ 370 if(!matched){
374 throw 'Error parsing selector, parsing failed at "' + q + '"'; 371 throw 'Error parsing selector, parsing failed at "' + q + '"';
375 } 372 }
376 } 373 }
377 if(mm[1]){ 374 if(mm[1]){
378 fn[fn.length] = 'mode="'+mm[1]+'";'; 375 fn[fn.length] = 'mode="'+mm[1]+'";';
379 q = q.replace(mm[1], ''); 376 q = q.replace(mm[1], '');
380 } 377 }
381 } 378 }
382 fn[fn.length] = 'return nodup(n);\n}'; 379 fn[fn.length] = 'return nodup(n);\n}';
383 eval(fn.join('')); 380 eval(fn.join(''));
384 return f; 381 return f;
385 }, 382 },
386 383
387 /** 384 /**
388 * Selects a group of elements. 385 * Selects a group of elements.
389 * @param {String} selector The selector/xpath query 386 * @param {String} selector The selector/xpath query
390 * @param {Node} root (optional) The start of the query (defaults to document). 387 * @param {Node} root (optional) The start of the query (defaults to document).
391 * @return {Array} 388 * @return {Array}
392 */ 389 */
393 select : function(path, root, type){ 390 select : function(path, root, type){
394 if(!root || root == document){ 391 if(!root || root == document){
395 root = document; 392 root = document;
396 } 393 }
397 if(typeof root == 'string'){ 394 if(typeof root == 'string'){
398 root = document.getElementById(root); 395 root = document.getElementById(root);
399 } 396 }
400 var paths = path.split(','); 397 var paths = path.split(',');
401 var results = []; 398 var results = [];
402 for(var i = 0, len = paths.length; i < len; i++){ 399 for(var i = 0, len = paths.length; i < len; i++){
403 var p = paths[i].replace(trimRe, '$1'); 400 var p = paths[i].replace(trimRe, '$1');
404 if(!cache[p]){ 401 if(!cache[p]){
405 cache[p] = Ext.DomQuery.compile(p); 402 cache[p] = Ext.DomQuery.compile(p);
406 if(!cache[p]){ 403 if(!cache[p]){
407 throw p + ' is not a valid selector'; 404 throw p + ' is not a valid selector';
408 } 405 }
diff --git a/frontend/beta/js/Clipperz/YUI/Drawer.js b/frontend/beta/js/Clipperz/YUI/Drawer.js
index 394912e..508bfe5 100644
--- a/frontend/beta/js/Clipperz/YUI/Drawer.js
+++ b/frontend/beta/js/Clipperz/YUI/Drawer.js
@@ -1,238 +1,235 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; } 27if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; }
31 28
32 29
33Clipperz.YUI.Drawer = function(anElement, aRegion) { 30Clipperz.YUI.Drawer = function(anElement, aRegion) {
34 this._status = 'slideIn'; 31 this._status = 'slideIn';
35 32
36 this._element = YAHOO.ext.Element.get(anElement); 33 this._element = YAHOO.ext.Element.get(anElement);
37 this._region = aRegion || null; 34 this._region = aRegion || null;
38 35
39 this._collapsedElement = this.element().getChildrenByClassName("drawer-collapsed")[0]; 36 this._collapsedElement = this.element().getChildrenByClassName("drawer-collapsed")[0];
40 this._contentElement = this.element().getChildrenByClassName("drawer-content")[0]; 37 this._contentElement = this.element().getChildrenByClassName("drawer-content")[0];
41 38
42 39
43 this._wholeCollapedElement = this.enhanceCollapsedElement(); 40 this._wholeCollapedElement = this.enhanceCollapsedElement();
44 this._wholeCollapedElement.setWidth(this.region().element().getWidth()); 41 this._wholeCollapedElement.setWidth(this.region().element().getWidth());
45 this._wholeCollapedElement.setHeight(this.region().element().getHeight()); 42 this._wholeCollapedElement.setHeight(this.region().element().getHeight());
46 43
47 this._contentWrapper = this.enhanceContentElement(); 44 this._contentWrapper = this.enhanceContentElement();
48 this._contentElementActor = new YAHOO.ext.Actor(this.contentWrapper().dom); 45 this._contentElementActor = new YAHOO.ext.Actor(this.contentWrapper().dom);
49 this.contentElementActor().hide(); 46 this.contentElementActor().hide();
50 47
51 this._contentWidth = 200; 48 this._contentWidth = 200;
52}; 49};
53 50
54YAHOO.extendX(Clipperz.YUI.Drawer, YAHOO.ext.util.Observable, { 51YAHOO.extendX(Clipperz.YUI.Drawer, YAHOO.ext.util.Observable, {
55 52
56 'element': function() { 53 'element': function() {
57 return this._element; 54 return this._element;
58 }, 55 },
59 56
60 //----------------------------------------------------- 57 //-----------------------------------------------------
61 58
62 'status': function() { 59 'status': function() {
63 return this._status; 60 return this._status;
64 }, 61 },
65 62
66 'setStatus': function(aValue) { 63 'setStatus': function(aValue) {
67 this._status = aValue; 64 this._status = aValue;
68 }, 65 },
69 66
70 //----------------------------------------------------- 67 //-----------------------------------------------------
71 68
72 'collapsedElement': function() { 69 'collapsedElement': function() {
73 return this._collapsedElement; 70 return this._collapsedElement;
74 }, 71 },
75 72
76 //----------------------------------------------------- 73 //-----------------------------------------------------
77 74
78 'contentElement': function() { 75 'contentElement': function() {
79 return this._contentElement; 76 return this._contentElement;
80 }, 77 },
81 78
82 //----------------------------------------------------- 79 //-----------------------------------------------------
83 80
84 'contentElementActor': function() { 81 'contentElementActor': function() {
85 return this._contentElementActor; 82 return this._contentElementActor;
86 }, 83 },
87 84
88 //----------------------------------------------------- 85 //-----------------------------------------------------
89 86
90 'contentWrapper': function() { 87 'contentWrapper': function() {
91 return this._contentWrapper; 88 return this._contentWrapper;
92 }, 89 },
93 90
94 //----------------------------------------------------- 91 //-----------------------------------------------------
95 92
96 'contentWidth': function() { 93 'contentWidth': function() {
97 return this._contentWidth; 94 return this._contentWidth;
98 }, 95 },
99 96
100 //----------------------------------------------------- 97 //-----------------------------------------------------
101 98
102 'region': function() { 99 'region': function() {
103 return this._region; 100 return this._region;
104 }, 101 },
105 102
106 //----------------------------------------------------- 103 //-----------------------------------------------------
107 104
108 'enhanceCollapsedElement': function() { 105 'enhanceCollapsedElement': function() {
109 varwrapper; 106 varwrapper;
110 var link; 107 var link;
111 108
112 wrapper = this.collapsedElement().wrap({tag:'div', cls:'drawer-collapsedElement-wrapper', children:[ 109 wrapper = this.collapsedElement().wrap({tag:'div', cls:'drawer-collapsedElement-wrapper', children:[
113 {tag:'div', cls:'drawer-pin-button', children:[ 110 {tag:'div', cls:'drawer-pin-button', children:[
114 {tag:'a', cls:'drawer-pin-button', href:"#", children:[ 111 {tag:'a', cls:'drawer-pin-button', href:"#", children:[
115 {tag:'img', src:'./images/directLogins/drawer/mm-expand.gif'} 112 {tag:'img', src:'./images/directLogins/drawer/mm-expand.gif'}
116 ]} 113 ]}
117 ]} 114 ]}
118 ]}); 115 ]});
119 116
120 link = wrapper.getChildrenByClassName('drawer-pin-button', 'a')[0]; 117 link = wrapper.getChildrenByClassName('drawer-pin-button', 'a')[0];
121 MochiKit.Signal.connect(link.dom, 'onclick', this, 'pinDrawer'); 118 MochiKit.Signal.connect(link.dom, 'onclick', this, 'pinDrawer');
122 119
123 this.collapsedElement().setHeight('100%'); 120 this.collapsedElement().setHeight('100%');
124 this.collapsedElement().setStyle('cursor', 'pointer'); 121 this.collapsedElement().setStyle('cursor', 'pointer');
125 MochiKit.Signal.connect(this.collapsedElement().dom, 'onclick', this, 'showDrawer'); 122 MochiKit.Signal.connect(this.collapsedElement().dom, 'onclick', this, 'showDrawer');
126 123
127 return wrapper; 124 return wrapper;
128 }, 125 },
129 126
130 //----------------------------------------------------- 127 //-----------------------------------------------------
131 128
132 'enhanceContentElement': function() { 129 'enhanceContentElement': function() {
133 var wrapper; 130 var wrapper;
134 131
135 wrapper = this.contentElement().wrap({tag:'div', cls:'drawer-content-wrapper', children:[ 132 wrapper = this.contentElement().wrap({tag:'div', cls:'drawer-content-wrapper', children:[
136 {tag:'div', cls:'drawer-content-header', html:'direct login', style:'width:100%;'} 133 {tag:'div', cls:'drawer-content-header', html:'direct login', style:'width:100%;'}
137 ]}); 134 ]});
138 135
139 MochiKit.Signal.connect(wrapper.dom, 'onclick', this, 'hideDrawer'); 136 MochiKit.Signal.connect(wrapper.dom, 'onclick', this, 'hideDrawer');
140 return wrapper; 137 return wrapper;
141 }, 138 },
142 139
143 //----------------------------------------------------- 140 //-----------------------------------------------------
144 141
145 'pinDrawer': function() { 142 'pinDrawer': function() {
146 alert("pin drawer"); 143 alert("pin drawer");
147 }, 144 },
148 145
149 //----------------------------------------------------- 146 //-----------------------------------------------------
150 147
151 'showDrawer': function() { 148 'showDrawer': function() {
152 if (this.status() == 'slideIn') { 149 if (this.status() == 'slideIn') {
153 var actor; 150 var actor;
154 151
155 this.setStatus('slidingOut'); 152 this.setStatus('slidingOut');
156 actor = this.contentElementActor(); 153 actor = this.contentElementActor();
157 actor.setHeight(this.region().element().getHeight()); 154 actor.setHeight(this.region().element().getHeight());
158 155
159 actor.startCapture(true); 156 actor.startCapture(true);
160 actor.alignTo(this.element(), 'tr'); 157 actor.alignTo(this.element(), 'tr');
161 actor.blindShow('left', this.contentWidth(), .35); 158 actor.blindShow('left', this.contentWidth(), .35);
162 actor.play(this.onSlideOut.createDelegate(this)); 159 actor.play(this.onSlideOut.createDelegate(this));
163 } 160 }
164 }, 161 },
165 162
166 //----------------------------------------------------- 163 //-----------------------------------------------------
167 164
168 'onSlideOut': function() { 165 'onSlideOut': function() {
169 this.setStatus('slideOut'); 166 this.setStatus('slideOut');
170MochiKit.Logging.logDebug(">>> onSlideOut"); 167MochiKit.Logging.logDebug(">>> onSlideOut");
171 // alert("done"); 168 // alert("done");
172 }, 169 },
173 170
174 //----------------------------------------------------- 171 //-----------------------------------------------------
175/* 172/*
176 'showContentElement': function() { 173 'showContentElement': function() {
177 var top, left, width, height; 174 var top, left, width, height;
178 175
179MochiKit.Logging.logDebug(">>> showContentElement"); 176MochiKit.Logging.logDebug(">>> showContentElement");
180 177
181 178
182 top = this.element().getTop(true); 179 top = this.element().getTop(true);
183 left = this.element().getRight(); 180 left = this.element().getRight();
184 width = this.contentWidth(); 181 width = this.contentWidth();
185 height = this.element().getHeight(); 182 height = this.element().getHeight();
186 183
187 this.contentWrapper().setStyle('position', 'absolute'); 184 this.contentWrapper().setStyle('position', 'absolute');
188 this.contentWrapper().setStyle('overflow', 'none'); 185 this.contentWrapper().setStyle('overflow', 'none');
189 this.contentWrapper().setStyle('visibility', 'visible'); 186 this.contentWrapper().setStyle('visibility', 'visible');
190 this.contentWrapper().setStyle('z-index', '10'); 187 this.contentWrapper().setStyle('z-index', '10');
191 188
192 this.contentWrapper().setLeft(left); 189 this.contentWrapper().setLeft(left);
193 this.contentWrapper().setTop(top); 190 this.contentWrapper().setTop(top);
194 this.contentWrapper().setHeight(height); 191 this.contentWrapper().setHeight(height);
195 this.contentWrapper().setWidth(width); 192 this.contentWrapper().setWidth(width);
196 193
197 this.contentWrapper().show(); 194 this.contentWrapper().show();
198 }, 195 },
199 */ 196 */
200 //----------------------------------------------------- 197 //-----------------------------------------------------
201 198
202 'hideDrawer': function() { 199 'hideDrawer': function() {
203 if (this.status() == 'slideOut') { 200 if (this.status() == 'slideOut') {
204 var actor; 201 var actor;
205 202
206 this.setStatus('slidingIn'); 203 this.setStatus('slidingIn');
207 204
208 actor = this.contentElementActor(); 205 actor = this.contentElementActor();
209 actor.setHeight(this.region().element().getHeight()); 206 actor.setHeight(this.region().element().getHeight());
210 207
211 actor.startCapture(true); 208 actor.startCapture(true);
212 actor.alignTo(this.element(), 'tr'); 209 actor.alignTo(this.element(), 'tr');
213 actor.blindHide('left', .35); 210 actor.blindHide('left', .35);
214 actor.setVisible(false); 211 actor.setVisible(false);
215 actor.play(this.onSlideIn.createDelegate(this)); 212 actor.play(this.onSlideIn.createDelegate(this));
216 } 213 }
217 }, 214 },
218 215
219 //----------------------------------------------------- 216 //-----------------------------------------------------
220 217
221 'onSlideIn': function() { 218 'onSlideIn': function() {
222 this.setStatus('slideIn'); 219 this.setStatus('slideIn');
223MochiKit.Logging.logDebug(">>> onSlideIn"); 220MochiKit.Logging.logDebug(">>> onSlideIn");
224 // alert("done"); 221 // alert("done");
225 }, 222 },
226 223
227 //----------------------------------------------------- 224 //-----------------------------------------------------
228 225
229 'hideContentElement': function() { 226 'hideContentElement': function() {
230 this.contentWrapper().hide(); 227 this.contentWrapper().hide();
231 }, 228 },
232 229
233 //----------------------------------------------------- 230 //-----------------------------------------------------
234 //----------------------------------------------------- 231 //-----------------------------------------------------
235 232
236 //----------------------------------------------------- 233 //-----------------------------------------------------
237 __syntaxFix__: '__syntaxFix__' 234 __syntaxFix__: '__syntaxFix__'
238}); \ No newline at end of file 235}); \ No newline at end of file
diff --git a/frontend/beta/js/Clipperz/YUI/IBLayoutManager.js b/frontend/beta/js/Clipperz/YUI/IBLayoutManager.js
index 626b699..6e2138e 100644
--- a/frontend/beta/js/Clipperz/YUI/IBLayoutManager.js
+++ b/frontend/beta/js/Clipperz/YUI/IBLayoutManager.js
@@ -1,114 +1,111 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; } 27if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; }
31 28
32 29
33Clipperz.YUI.IBLayoutManager = function(container, config) { 30Clipperz.YUI.IBLayoutManager = function(container, config) {
34 var regionName; 31 var regionName;
35 varelement; 32 varelement;
36 33
37 config = config || {}; 34 config = config || {};
38 35
39 Clipperz.YUI.IBLayoutManager.superclass.constructor.call(this, container); 36 Clipperz.YUI.IBLayoutManager.superclass.constructor.call(this, container);
40 this.hideOnLayout = config.hideOnLayout || false; 37 this.hideOnLayout = config.hideOnLayout || false;
41 38
42 element = YAHOO.ext.Element.get(container); 39 element = YAHOO.ext.Element.get(container);
43 element.setStyle('position', 'absolute'); 40 element.setStyle('position', 'absolute');
44 element.setStyle('overflow', 'hidden'); 41 element.setStyle('overflow', 'hidden');
45 42
46 for (regionName in config.regions) { 43 for (regionName in config.regions) {
47 var newRegion; 44 var newRegion;
48 45
49 newRegion = new new Clipperz.YUI.IBLayoutRegion(this, regionName, config.regions[regionName]); 46 newRegion = new new Clipperz.YUI.IBLayoutRegion(this, regionName, config.regions[regionName]);
50 this.addRegion(regionName, newRegion); 47 this.addRegion(regionName, newRegion);
51 } 48 }
52 49
53 this.layout(); 50 this.layout();
54}; 51};
55 52
56YAHOO.extendX(Clipperz.YUI.IBLayoutManager, YAHOO.ext.LayoutManager, { 53YAHOO.extendX(Clipperz.YUI.IBLayoutManager, YAHOO.ext.LayoutManager, {
57 54
58 'toString': function() { 55 'toString': function() {
59 return "IBLayoutManager (" + this.el.id + ")"; 56 return "IBLayoutManager (" + this.el.id + ")";
60 }, 57 },
61 58
62 //----------------------------------------------------- 59 //-----------------------------------------------------
63 60
64 'add': function(aName, aPanel) { 61 'add': function(aName, aPanel) {
65 var regionName; 62 var regionName;
66 63
67 regionName = aName.toLowerCase(); 64 regionName = aName.toLowerCase();
68 return this.regions[regionName].add(aPanel); 65 return this.regions[regionName].add(aPanel);
69 }, 66 },
70 67
71 //----------------------------------------------------- 68 //-----------------------------------------------------
72 69
73 'addRegion': function(aRegion) { 70 'addRegion': function(aRegion) {
74 var regionName; 71 var regionName;
75 72
76 regionName = aRegion.name().toLowerCase(); 73 regionName = aRegion.name().toLowerCase();
77 if (!this.regions[regionName]) { 74 if (!this.regions[regionName]) {
78//MochiKit.Logging.logDebug("--- adding region with name: " + aRegion.name()); 75//MochiKit.Logging.logDebug("--- adding region with name: " + aRegion.name());
79 this.regions[regionName] = aRegion; 76 this.regions[regionName] = aRegion;
80 } else { 77 } else {
81 // ???? 78 // ????
82 } 79 }
83 80
84 return aRegion; 81 return aRegion;
85 }, 82 },
86 83
87 //----------------------------------------------------- 84 //-----------------------------------------------------
88 85
89 'getRegion': function(target){ 86 'getRegion': function(target){
90 return this.regions[target.toLowerCase()]; 87 return this.regions[target.toLowerCase()];
91 }, 88 },
92 89
93 //----------------------------------------------------- 90 //-----------------------------------------------------
94 91
95 'layout': function(){ 92 'layout': function(){
96 varregion; 93 varregion;
97 94
98//MochiKit.Logging.logDebug(">>> IBLayoutManager.layout - regions: " + Clipperz.Base.serializeJSON(MochiKit.Base.keys(this.regions))); 95//MochiKit.Logging.logDebug(">>> IBLayoutManager.layout - regions: " + Clipperz.Base.serializeJSON(MochiKit.Base.keys(this.regions)));
99 for (region in this.regions) { 96 for (region in this.regions) {
100//MochiKit.Logging.logDebug("--- IBLayoutManager.layout - region: " + region); 97//MochiKit.Logging.logDebug("--- IBLayoutManager.layout - region: " + region);
101 this.regions[region].layout(); 98 this.regions[region].layout();
102 } 99 }
103//MochiKit.Logging.logDebug("<<< IBLayoutManager.layout"); 100//MochiKit.Logging.logDebug("<<< IBLayoutManager.layout");
104 }, 101 },
105 102
106 //----------------------------------------------------- 103 //-----------------------------------------------------
107 104
108 'getSize': function() { 105 'getSize': function() {
109 return this.el.getSize(); 106 return this.el.getSize();
110 }, 107 },
111 108
112 //----------------------------------------------------- 109 //-----------------------------------------------------
113 __syntaxFix__: '__syntaxFix__' 110 __syntaxFix__: '__syntaxFix__'
114}); 111});
diff --git a/frontend/beta/js/Clipperz/YUI/IBLayoutRegion.js b/frontend/beta/js/Clipperz/YUI/IBLayoutRegion.js
index 2fd4377..f8e0cb1 100644
--- a/frontend/beta/js/Clipperz/YUI/IBLayoutRegion.js
+++ b/frontend/beta/js/Clipperz/YUI/IBLayoutRegion.js
@@ -1,249 +1,246 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
30if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; } 27if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; }
31 28
32 29
33Clipperz.YUI.IBLayoutRegion = function(aManager, aName, aConfig) { 30Clipperz.YUI.IBLayoutRegion = function(aManager, aName, aConfig) {
34 this._configuration = aConfig; 31 this._configuration = aConfig;
35 32
36 //Clipperz.YUI.IBLayoutRegion.superclass.constructor.call(); 33 //Clipperz.YUI.IBLayoutRegion.superclass.constructor.call();
37 Clipperz.YUI.IBLayoutRegion.superclass.constructor.call(this, aManager, aConfig, aName); 34 Clipperz.YUI.IBLayoutRegion.superclass.constructor.call(this, aManager, aConfig, aName);
38}; 35};
39 36
40YAHOO.extendX(Clipperz.YUI.IBLayoutRegion, YAHOO.ext.LayoutRegion, { 37YAHOO.extendX(Clipperz.YUI.IBLayoutRegion, YAHOO.ext.LayoutRegion, {
41 38
42 'toString': function() { 39 'toString': function() {
43 return "IBLayoutRegion (" + this.name() + ")"; 40 return "IBLayoutRegion (" + this.name() + ")";
44 }, 41 },
45 42
46 //----------------------------------------------------- 43 //-----------------------------------------------------
47 44
48 'name': function() { 45 'name': function() {
49 return this.position; 46 return this.position;
50 }, 47 },
51 48
52 //----------------------------------------------------- 49 //-----------------------------------------------------
53 50
54 'manager': function() { 51 'manager': function() {
55 return this.mgr; 52 return this.mgr;
56 }, 53 },
57 54
58 'configuration': function() { 55 'configuration': function() {
59 return this._configuration; 56 return this._configuration;
60 }, 57 },
61 58
62 //----------------------------------------------------- 59 //-----------------------------------------------------
63 60
64 'getAttributeValue': function(anAttribute) { 61 'getAttributeValue': function(anAttribute) {
65 var result; 62 var result;
66 63
67 switch(anAttribute) { 64 switch(anAttribute) {
68 case "top": 65 case "top":
69 result = this.element().getTop(); 66 result = this.element().getTop();
70 break; 67 break;
71 case "left": 68 case "left":
72 result = this.element().getLeft(); 69 result = this.element().getLeft();
73 break; 70 break;
74 case "bottom": 71 case "bottom":
75 result = this.element().getBottom(); 72 result = this.element().getBottom();
76 break; 73 break;
77 case "right": 74 case "right":
78 result = this.element().getRight(); 75 result = this.element().getRight();
79 break; 76 break;
80 case "height": 77 case "height":
81 result = this.element().getHeight(); 78 result = this.element().getHeight();
82 break; 79 break;
83 case "width": 80 case "width":
84 result = this.element().getWidth(); 81 result = this.element().getWidth();
85 break; 82 break;
86 } 83 }
87//MochiKit.Logging.logDebug("--- " + this.name() + " [" + anAttribute + "] = " + result); 84//MochiKit.Logging.logDebug("--- " + this.name() + " [" + anAttribute + "] = " + result);
88 85
89 return result; 86 return result;
90 }, 87 },
91 88
92 //----------------------------------------------------- 89 //-----------------------------------------------------
93 90
94 'normalizeConfigureValue': function(aConfigurationValue) { 91 'normalizeConfigureValue': function(aConfigurationValue) {
95 var result; 92 var result;
96 93
97//MochiKit.Logging.logDebug("--- normalizeConfigureValue - " + aConfigurationValue); 94//MochiKit.Logging.logDebug("--- normalizeConfigureValue - " + aConfigurationValue);
98 if (typeof(aConfigurationValue) == 'number') { 95 if (typeof(aConfigurationValue) == 'number') {
99 result = aConfigurationValue; 96 result = aConfigurationValue;
100 } else if (aConfigurationValue == 'auto') { 97 } else if (aConfigurationValue == 'auto') {
101 result = aConfigurationValue; 98 result = aConfigurationValue;
102 } else { 99 } else {
103 var splitValues; 100 var splitValues;
104 var referenceValue; 101 var referenceValue;
105 var deltaValue; 102 var deltaValue;
106 var targetRegion; 103 var targetRegion;
107 var targetAttribute; 104 var targetAttribute;
108 105
109 splitValues = aConfigurationValue.split('+'); 106 splitValues = aConfigurationValue.split('+');
110 referenceValue = Clipperz.Base.trim(splitValues[0]); 107 referenceValue = Clipperz.Base.trim(splitValues[0]);
111 deltaValue = Clipperz.Base.trim(splitValues[1] || ""); 108 deltaValue = Clipperz.Base.trim(splitValues[1] || "");
112 109
113 splitValues = referenceValue.split('.'); 110 splitValues = referenceValue.split('.');
114 targetRegion = splitValues[0]; 111 targetRegion = splitValues[0];
115 targetAttribute = splitValues[1]; 112 targetAttribute = splitValues[1];
116 113
117//MochiKit.Logging.logDebug("> " + aConfigurationValue); 114//MochiKit.Logging.logDebug("> " + aConfigurationValue);
118//MochiKit.Logging.logDebug(">> manager: " + this.manager()); 115//MochiKit.Logging.logDebug(">> manager: " + this.manager());
119//MochiKit.Logging.logDebug(">> targetRegion: " + targetRegion); 116//MochiKit.Logging.logDebug(">> targetRegion: " + targetRegion);
120//MochiKit.Logging.logDebug(">>> " + this.manager().getRegion(targetRegion)); 117//MochiKit.Logging.logDebug(">>> " + this.manager().getRegion(targetRegion));
121 targetValue = this.manager().getRegion(targetRegion).getAttributeValue(targetAttribute); 118 targetValue = this.manager().getRegion(targetRegion).getAttributeValue(targetAttribute);
122//MochiKit.Logging.logDebug(">>>> " + targetRegion + "." + targetAttribute + " + " + deltaValue + " = " + targetValue); 119//MochiKit.Logging.logDebug(">>>> " + targetRegion + "." + targetAttribute + " + " + deltaValue + " = " + targetValue);
123 120
124 result = targetValue + (deltaValue - 0); 121 result = targetValue + (deltaValue - 0);
125 122
126//MochiKit.Logging.logDebug("<<< " + aConfigurationValue + " = " + result); 123//MochiKit.Logging.logDebug("<<< " + aConfigurationValue + " = " + result);
127 } 124 }
128 125
129 return result; 126 return result;
130 }, 127 },
131 128
132 'normalizedConfiguration': function(aConfiguration) { 129 'normalizedConfiguration': function(aConfiguration) {
133 varresult; 130 varresult;
134 varkey; 131 varkey;
135 132
136 result = {}; 133 result = {};
137 134
138//MochiKit.Logging.logDebug("--- normalizedConfiguration - keys: " + Clipperz.Base.serializeJSON(MochiKit.Base.keys(aConfiguration))); 135//MochiKit.Logging.logDebug("--- normalizedConfiguration - keys: " + Clipperz.Base.serializeJSON(MochiKit.Base.keys(aConfiguration)));
139 for (key in aConfiguration) { 136 for (key in aConfiguration) {
140 if ((key == 'top') || (key == 'bottom') || (key == 'left') || (key == 'rigth') || (key == 'width') || (key == 'height')) { 137 if ((key == 'top') || (key == 'bottom') || (key == 'left') || (key == 'rigth') || (key == 'width') || (key == 'height')) {
141 result[key] = this.normalizeConfigureValue(aConfiguration[key]); 138 result[key] = this.normalizeConfigureValue(aConfiguration[key]);
142 } else { 139 } else {
143 result[key] = aConfiguration[key]; 140 result[key] = aConfiguration[key];
144 } 141 }
145 } 142 }
146 143
147 return result; 144 return result;
148 }, 145 },
149 146
150 //----------------------------------------------------- 147 //-----------------------------------------------------
151 148
152 'element': function() { 149 'element': function() {
153 return this.el; 150 return this.el;
154 }, 151 },
155 152
156 //----------------------------------------------------- 153 //-----------------------------------------------------
157/* 154/*
158 'hide': function() { 155 'hide': function() {
159MochiKit.Logging.logDebug(">>> IBLayoutManager.hide()") 156MochiKit.Logging.logDebug(">>> IBLayoutManager.hide()")
160 Clipperz.YUI.IBLayoutRegion.superclass.hide.call(this); 157 Clipperz.YUI.IBLayoutRegion.superclass.hide.call(this);
161 }, 158 },
162*/ 159*/
163 //----------------------------------------------------- 160 //-----------------------------------------------------
164/* 161/*
165 'add': function(aPanel) { 162 'add': function(aPanel) {
166 Clipperz.YUI.IBLayoutRegion.superclass.add.call(this, aPanel); 163 Clipperz.YUI.IBLayoutRegion.superclass.add.call(this, aPanel);
167 aPanel.el.fitToParent(true); 164 aPanel.el.fitToParent(true);
168 }, 165 },
169*/ 166*/
170 //----------------------------------------------------- 167 //-----------------------------------------------------
171 168
172 'updateBox': function(aBox) { 169 'updateBox': function(aBox) {
173//MochiKit.Logging.logDebug(">>> IBLayoutRegion.updateBox - " + aBox); 170//MochiKit.Logging.logDebug(">>> IBLayoutRegion.updateBox - " + aBox);
174 Clipperz.YUI.IBLayoutRegion.superclass.updateBox.call(this, aBox); 171 Clipperz.YUI.IBLayoutRegion.superclass.updateBox.call(this, aBox);
175 }, 172 },
176 173
177 //----------------------------------------------------- 174 //-----------------------------------------------------
178 175
179 'layout': function() { 176 'layout': function() {
180 vartop, left, bottom, right, width, height; 177 vartop, left, bottom, right, width, height;
181 varelement; 178 varelement;
182 var config; 179 var config;
183 var windowSize; 180 var windowSize;
184 var containerSize; 181 var containerSize;
185 182
186//MochiKit.Logging.logDebug(">>> IBLayoutRegion.layout - " + this); 183//MochiKit.Logging.logDebug(">>> IBLayoutRegion.layout - " + this);
187 config = this.normalizedConfiguration(this.configuration()); 184 config = this.normalizedConfiguration(this.configuration());
188 element = this.element(); 185 element = this.element();
189 // containerSize = this.manager().getSize(true); 186 // containerSize = this.manager().getSize(true);
190 containerSize = this.manager().getSize(false); 187 containerSize = this.manager().getSize(false);
191 windowSize = {width: YAHOO.util.Dom.getViewportWidth(), height: YAHOO.util.Dom.getViewportHeight()}; 188 windowSize = {width: YAHOO.util.Dom.getViewportWidth(), height: YAHOO.util.Dom.getViewportHeight()};
192 189
193 // element.setStyle("position", "absolute"); 190 // element.setStyle("position", "absolute");
194 // element.setStyle("overflow", "none"); 191 // element.setStyle("overflow", "none");
195 192
196 if (typeof(config.top) == 'number') { 193 if (typeof(config.top) == 'number') {
197 top = config.top; 194 top = config.top;
198 195
199 if (typeof(config.bottom) == 'number') { 196 if (typeof(config.bottom) == 'number') {
200 height = containerSize.height - top - config.bottom; 197 height = containerSize.height - top - config.bottom;
201 } else if (typeof(config.height) == 'number') { 198 } else if (typeof(config.height) == 'number') {
202 height = config.height; 199 height = config.height;
203 } else { 200 } else {
204 //??? 201 //???
205 } 202 }
206 } else { 203 } else {
207 if ((typeof(config.bottom) == 'number') && (typeof(config.height) == 'number')) { 204 if ((typeof(config.bottom) == 'number') && (typeof(config.height) == 'number')) {
208 top = containerSize.height - (config.height + config.bottom); 205 top = containerSize.height - (config.height + config.bottom);
209 height = config.height; 206 height = config.height;
210 } else if ((config.bottom == 'auto') && (typeof(config.height) == 'number')) { 207 } else if ((config.bottom == 'auto') && (typeof(config.height) == 'number')) {
211 top = ((containerSize.height - config.height) / 2); 208 top = ((containerSize.height - config.height) / 2);
212 height = config.height; 209 height = config.height;
213 } 210 }
214 } 211 }
215 212
216 if (typeof(config.left) == 'number') { 213 if (typeof(config.left) == 'number') {
217 left = config.left; 214 left = config.left;
218 215
219 if (typeof(config.right) == 'number') { 216 if (typeof(config.right) == 'number') {
220 width = (containerSize.width - left - config.right); 217 width = (containerSize.width - left - config.right);
221 } else if (typeof(config.width) == 'number') { 218 } else if (typeof(config.width) == 'number') {
222 width = config.width; 219 width = config.width;
223 } else { 220 } else {
224 //??? 221 //???
225 } 222 }
226 } else { 223 } else {
227 if ((typeof(config.right) == 'number') && (typeof(config.width) == 'number')) { 224 if ((typeof(config.right) == 'number') && (typeof(config.width) == 'number')) {
228 left = containerSize.width - (config.width + config.right); 225 left = containerSize.width - (config.width + config.right);
229 width = config.width; 226 width = config.width;
230 } else if ((config.right == 'auto') && (typeof(config.width) == 'number')) { 227 } else if ((config.right == 'auto') && (typeof(config.width) == 'number')) {
231 left = ((containerSize.width - config.width) / 2); 228 left = ((containerSize.width - config.width) / 2);
232 width = config.width; 229 width = config.width;
233 } 230 }
234 } 231 }
235//MochiKit.Logging.logDebug("--- setting position (top: " + top + ", left: " + left + ", width: " + width + ", height: " + height + ")"); 232//MochiKit.Logging.logDebug("--- setting position (top: " + top + ", left: " + left + ", width: " + width + ", height: " + height + ")");
236 element.setTop(top); 233 element.setTop(top);
237 element.setLeft(left); 234 element.setLeft(left);
238 element.setWidth(width); 235 element.setWidth(width);
239 element.setHeight(height); 236 element.setHeight(height);
240 237
241 if (this.activePanel != null) { 238 if (this.activePanel != null) {
242 this.activePanel.setSize(width, height); 239 this.activePanel.setSize(width, height);
243 } 240 }
244//MochiKit.Logging.logDebug("<<< IBLayoutRegion.layout"); 241//MochiKit.Logging.logDebug("<<< IBLayoutRegion.layout");
245 }, 242 },
246 243
247 //----------------------------------------------------- 244 //-----------------------------------------------------
248 __syntaxFix__: '__syntaxFix__' 245 __syntaxFix__: '__syntaxFix__'
249}); 246});
diff --git a/frontend/beta/js/Clipperz/YUI/MessageBox.js b/frontend/beta/js/Clipperz/YUI/MessageBox.js
index ec33d7d..c7b4702 100644
--- a/frontend/beta/js/Clipperz/YUI/MessageBox.js
+++ b/frontend/beta/js/Clipperz/YUI/MessageBox.js
@@ -1,265 +1,262 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29Clipperz.YUI.MessageBox = function(){ 26Clipperz.YUI.MessageBox = function(){
30 var dlg, opt, mask; 27 var dlg, opt, mask;
31 var bodyEl, msgEl, textboxEl, textareaEl, progressEl, pp; 28 var bodyEl, msgEl, textboxEl, textareaEl, progressEl, pp;
32 var buttons, activeTextEl, bwidth; 29 var buttons, activeTextEl, bwidth;
33 30
34 var handleButton = function(button){ 31 var handleButton = function(button){
35 if(typeof opt.fn == 'function'){ 32 if(typeof opt.fn == 'function'){
36 if(opt.fn.call(opt.scope||window, button, activeTextEl.dom.value) !== false){ 33 if(opt.fn.call(opt.scope||window, button, activeTextEl.dom.value) !== false){
37 dlg.hide(); 34 dlg.hide();
38 } 35 }
39 }else{ 36 }else{
40 dlg.hide(); 37 dlg.hide();
41 } 38 }
42 }; 39 };
43 40
44 return { 41 return {
45 updateButtons: function(b){ 42 updateButtons: function(b){
46 var width = 0; 43 var width = 0;
47 if(!b){ 44 if(!b){
48 buttons['ok'].hide(); 45 buttons['ok'].hide();
49 buttons['cancel'].hide(); 46 buttons['cancel'].hide();
50 buttons['yes'].hide(); 47 buttons['yes'].hide();
51 buttons['no'].hide(); 48 buttons['no'].hide();
52 return width; 49 return width;
53 } 50 }
54 for(var k in buttons){ 51 for(var k in buttons){
55 if(typeof buttons[k] != 'function'){ 52 if(typeof buttons[k] != 'function'){
56 if(b[k]){ 53 if(b[k]){
57 buttons[k].show(); 54 buttons[k].show();
58 buttons[k].setText(typeof b[k] == 'string' ? b[k] : YAHOO.ext.MessageBox.buttonText[k]); 55 buttons[k].setText(typeof b[k] == 'string' ? b[k] : YAHOO.ext.MessageBox.buttonText[k]);
59 width += buttons[k].el.getWidth()+15; 56 width += buttons[k].el.getWidth()+15;
60 }else{ 57 }else{
61 buttons[k].hide(); 58 buttons[k].hide();
62 } 59 }
63 } 60 }
64 } 61 }
65 return width; 62 return width;
66 }, 63 },
67 64
68 getDialog : function(){ 65 getDialog : function(){
69 if(!dlg){ 66 if(!dlg){
70 dlg = new YAHOO.ext.BasicDialog('mb-dlg', { 67 dlg = new YAHOO.ext.BasicDialog('mb-dlg', {
71 autoCreate:true, 68 autoCreate:true,
72 shadow:true, 69 shadow:true,
73 draggable:true, 70 draggable:true,
74 resizable:false, 71 resizable:false,
75 constraintoviewport:true, 72 constraintoviewport:true,
76 fixedcenter:true, 73 fixedcenter:true,
77 shim:true, 74 shim:true,
78 modal:true, 75 modal:true,
79 width:400, height:100, 76 width:400, height:100,
80 buttonAlign:'center', 77 buttonAlign:'center',
81 closeClick : function(){ 78 closeClick : function(){
82 if(opt && opt.buttons && opt.buttons.no && !opt.buttons.cancel){ 79 if(opt && opt.buttons && opt.buttons.no && !opt.buttons.cancel){
83 handleButton('no'); 80 handleButton('no');
84 }else{ 81 }else{
85 handleButton('cancel'); 82 handleButton('cancel');
86 } 83 }
87 } 84 }
88 }); 85 });
89 dlg.closeClick = function(){ 86 dlg.closeClick = function(){
90 alert('wtf'); 87 alert('wtf');
91 }; 88 };
92 mask = dlg.mask; 89 mask = dlg.mask;
93 dlg.addKeyListener(27, dlg.hide, dlg); 90 dlg.addKeyListener(27, dlg.hide, dlg);
94 buttons = {}; 91 buttons = {};
95 buttons['ok'] = dlg.addButton(this.buttonText['ok'], handleButton.createCallback('ok')); 92 buttons['ok'] = dlg.addButton(this.buttonText['ok'], handleButton.createCallback('ok'));
96 buttons['yes'] = dlg.addButton(this.buttonText['yes'], handleButton.createCallback('yes')); 93 buttons['yes'] = dlg.addButton(this.buttonText['yes'], handleButton.createCallback('yes'));
97 buttons['no'] = dlg.addButton(this.buttonText['no'], handleButton.createCallback('no')); 94 buttons['no'] = dlg.addButton(this.buttonText['no'], handleButton.createCallback('no'));
98 buttons['cancel'] = dlg.addButton(this.buttonText['cancel'], handleButton.createCallback('cancel')); 95 buttons['cancel'] = dlg.addButton(this.buttonText['cancel'], handleButton.createCallback('cancel'));
99 bodyEl = dlg.body.createChild({ 96 bodyEl = dlg.body.createChild({
100 tag:'div', 97 tag:'div',
101 html:'<span class="ext-mb-text"></span><br /><input type="text" class="ext-mb-input"><textarea class="ext-mb-textarea"></textarea><div class="ext-mb-progress-wrap"><div class="ext-mb-progress"><div class="ext-mb-progress-bar">&#160;</div></div></div>' 98 html:'<span class="ext-mb-text"></span><br /><input type="text" class="ext-mb-input"><textarea class="ext-mb-textarea"></textarea><div class="ext-mb-progress-wrap"><div class="ext-mb-progress"><div class="ext-mb-progress-bar">&#160;</div></div></div>'
102 }); 99 });
103 msgEl = bodyEl.dom.firstChild; 100 msgEl = bodyEl.dom.firstChild;
104 textboxEl = getEl(bodyEl.dom.childNodes[2]); 101 textboxEl = getEl(bodyEl.dom.childNodes[2]);
105 textboxEl.enableDisplayMode(); 102 textboxEl.enableDisplayMode();
106 textboxEl.addKeyListener([10,13], function(){ 103 textboxEl.addKeyListener([10,13], function(){
107 if(dlg.isVisible() && opt && opt.buttons){ 104 if(dlg.isVisible() && opt && opt.buttons){
108 if(opt.buttons.ok){ 105 if(opt.buttons.ok){
109 handleButton('ok'); 106 handleButton('ok');
110 }else if(opt.buttons.yes){ 107 }else if(opt.buttons.yes){
111 handleButton('yes'); 108 handleButton('yes');
112 } 109 }
113 } 110 }
114 }); 111 });
115 textareaEl = getEl(bodyEl.dom.childNodes[3]); 112 textareaEl = getEl(bodyEl.dom.childNodes[3]);
116 textareaEl.enableDisplayMode(); 113 textareaEl.enableDisplayMode();
117 progressEl = getEl(bodyEl.dom.childNodes[4]); 114 progressEl = getEl(bodyEl.dom.childNodes[4]);
118 progressEl.enableDisplayMode(); 115 progressEl.enableDisplayMode();
119 pp = getEl(progressEl.dom.firstChild.firstChild); 116 pp = getEl(progressEl.dom.firstChild.firstChild);
120 } 117 }
121 return dlg; 118 return dlg;
122 }, 119 },
123 120
124 updateText : function(text){ 121 updateText : function(text){
125 if(!dlg.isVisible() && !opt.width){ 122 if(!dlg.isVisible() && !opt.width){
126 dlg.resizeTo(this.maxWidth, 100); // resize first so content is never clipped from previous shows 123 dlg.resizeTo(this.maxWidth, 100); // resize first so content is never clipped from previous shows
127 } 124 }
128 msgEl.innerHTML = text; 125 msgEl.innerHTML = text;
129 var w = Math.max(Math.min(opt.width || msgEl.offsetWidth, this.maxWidth), 126 var w = Math.max(Math.min(opt.width || msgEl.offsetWidth, this.maxWidth),
130 Math.max(opt.minWidth || this.minWidth, bwidth)); 127 Math.max(opt.minWidth || this.minWidth, bwidth));
131 if(opt.prompt){ 128 if(opt.prompt){
132 activeTextEl.setWidth(w); 129 activeTextEl.setWidth(w);
133 } 130 }
134 dlg.setContentSize(w, bodyEl.getHeight()); 131 dlg.setContentSize(w, bodyEl.getHeight());
135 }, 132 },
136 133
137 updateProgress : function(value, text){ 134 updateProgress : function(value, text){
138 if(text){ 135 if(text){
139 this.updateText(text); 136 this.updateText(text);
140 } 137 }
141 pp.setWidth(value*progressEl.dom.firstChild.offsetWidth); 138 pp.setWidth(value*progressEl.dom.firstChild.offsetWidth);
142 }, 139 },
143 140
144 isVisible : function(){ 141 isVisible : function(){
145 return dlg && dlg.isVisible(); 142 return dlg && dlg.isVisible();
146 }, 143 },
147 144
148 hide : function(){ 145 hide : function(){
149 if(this.isVisible()){ 146 if(this.isVisible()){
150 dlg.hide(); 147 dlg.hide();
151 } 148 }
152 }, 149 },
153 150
154 show : function(options){ 151 show : function(options){
155 var d = this.getDialog(); 152 var d = this.getDialog();
156 opt = options; 153 opt = options;
157 d.setTitle(opt.title || '&#160;'); 154 d.setTitle(opt.title || '&#160;');
158 d.close.setDisplayed(opt.closable !== false); 155 d.close.setDisplayed(opt.closable !== false);
159 activeTextEl = textboxEl; 156 activeTextEl = textboxEl;
160 opt.prompt = opt.prompt || (opt.multiline ? true : false) 157 opt.prompt = opt.prompt || (opt.multiline ? true : false)
161 if(opt.prompt){ 158 if(opt.prompt){
162 if(opt.multiline){ 159 if(opt.multiline){
163 textboxEl.hide(); 160 textboxEl.hide();
164 textareaEl.show(); 161 textareaEl.show();
165 textareaEl.setHeight(typeof opt.multiline == 'number' ? 162 textareaEl.setHeight(typeof opt.multiline == 'number' ?
166 opt.multiline : this.defaultTextHeight); 163 opt.multiline : this.defaultTextHeight);
167 activeTextEl = textareaEl; 164 activeTextEl = textareaEl;
168 }else{ 165 }else{
169 textboxEl.show(); 166 textboxEl.show();
170 textareaEl.hide(); 167 textareaEl.hide();
171 } 168 }
172 }else{ 169 }else{
173 textboxEl.hide(); 170 textboxEl.hide();
174 textareaEl.hide(); 171 textareaEl.hide();
175 } 172 }
176 progressEl.setDisplayed(opt.progress === true); 173 progressEl.setDisplayed(opt.progress === true);
177 this.updateProgress(0); 174 this.updateProgress(0);
178 activeTextEl.dom.value = opt.value || ''; 175 activeTextEl.dom.value = opt.value || '';
179 if(opt.prompt){ 176 if(opt.prompt){
180 dlg.setDefaultButton(activeTextEl); 177 dlg.setDefaultButton(activeTextEl);
181 }else{ 178 }else{
182 var bs = opt.buttons; 179 var bs = opt.buttons;
183 var db = null; 180 var db = null;
184 if(bs && bs.ok){ 181 if(bs && bs.ok){
185 db = buttons['ok']; 182 db = buttons['ok'];
186 }else if(bs && bs.yes){ 183 }else if(bs && bs.yes){
187 db = buttons['yes']; 184 db = buttons['yes'];
188 } 185 }
189 dlg.setDefaultButton(db); 186 dlg.setDefaultButton(db);
190 } 187 }
191 bwidth = this.updateButtons(opt.buttons); 188 bwidth = this.updateButtons(opt.buttons);
192 this.updateText(opt.msg); 189 this.updateText(opt.msg);
193 d.modal = opt.modal !== false; 190 d.modal = opt.modal !== false;
194 d.mask = opt.modal !== false ? mask : false; 191 d.mask = opt.modal !== false ? mask : false;
195 d.animateTarget = null; 192 d.animateTarget = null;
196 d.show(options.animEl); 193 d.show(options.animEl);
197 }, 194 },
198 195
199 progress : function(title, msg){ 196 progress : function(title, msg){
200 this.show({ 197 this.show({
201 title : title, 198 title : title,
202 msg : msg, 199 msg : msg,
203 buttons: false, 200 buttons: false,
204 progress:true, 201 progress:true,
205 closable:false 202 closable:false
206 }); 203 });
207 }, 204 },
208 205
209 progressElement : function() { 206 progressElement : function() {
210 return progressEl; 207 return progressEl;
211 }, 208 },
212 209
213 opt: function() { 210 opt: function() {
214 return opt; 211 return opt;
215 }, 212 },
216 213
217 alert : function(title, msg, fn, scope){ 214 alert : function(title, msg, fn, scope){
218 this.show({ 215 this.show({
219 title : title, 216 title : title,
220 msg : msg, 217 msg : msg,
221 buttons: this.OK, 218 buttons: this.OK,
222 fn: fn, 219 fn: fn,
223 scope : scope 220 scope : scope
224 }); 221 });
225 }, 222 },
226 223
227 confirm : function(title, msg, fn, scope){ 224 confirm : function(title, msg, fn, scope){
228 this.show({ 225 this.show({
229 title : title, 226 title : title,
230 msg : msg, 227 msg : msg,
231 buttons: this.YESNO, 228 buttons: this.YESNO,
232 fn: fn, 229 fn: fn,
233 scope : scope 230 scope : scope
234 }); 231 });
235 }, 232 },
236 233
237 prompt : function(title, msg, fn, scope, multiline){ 234 prompt : function(title, msg, fn, scope, multiline){
238 this.show({ 235 this.show({
239 title : title, 236 title : title,
240 msg : msg, 237 msg : msg,
241 buttons: this.OKCANCEL, 238 buttons: this.OKCANCEL,
242 fn: fn, 239 fn: fn,
243 minWidth:250, 240 minWidth:250,
244 scope : scope, 241 scope : scope,
245 prompt:true, 242 prompt:true,
246 multiline: multiline 243 multiline: multiline
247 }); 244 });
248 }, 245 },
249 246
250 OK : {ok:true}, 247 OK : {ok:true},
251 YESNO : {yes:true, no:true}, 248 YESNO : {yes:true, no:true},
252 OKCANCEL : {ok:true, cancel:true}, 249 OKCANCEL : {ok:true, cancel:true},
253 YESNOCANCEL : {yes:true, no:true, cancel:true}, 250 YESNOCANCEL : {yes:true, no:true, cancel:true},
254 251
255 defaultTextHeight:75, 252 defaultTextHeight:75,
256 maxWidth : 500, 253 maxWidth : 500,
257 minWidth : 100, 254 minWidth : 100,
258 buttonText : { 255 buttonText : {
259 ok : 'OK', 256 ok : 'OK',
260 cancel : 'Cancel', 257 cancel : 'Cancel',
261 yes : 'Yes', 258 yes : 'Yes',
262 no : 'No' 259 no : 'No'
263 } 260 }
264 }; 261 };
265}(); 262}();