summaryrefslogtreecommitdiff
path: root/frontend/beta/js/Clipperz
Unidiff
Diffstat (limited to 'frontend/beta/js/Clipperz') (more/less context) (ignore whitespace changes)
-rw-r--r--frontend/beta/js/Clipperz/Base.js22
-rw-r--r--frontend/beta/js/Clipperz/ByteArray.js22
-rw-r--r--frontend/beta/js/Clipperz/CSVProcessor.js22
-rw-r--r--frontend/beta/js/Clipperz/Crypto/AES.js22
-rw-r--r--frontend/beta/js/Clipperz/Crypto/Base.js22
-rw-r--r--frontend/beta/js/Clipperz/Crypto/BigInt.js22
-rw-r--r--frontend/beta/js/Clipperz/Crypto/BigInt_scoped.js22
-rw-r--r--frontend/beta/js/Clipperz/Crypto/ECC.js22
-rw-r--r--frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Curve.js22
-rw-r--r--frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js22
-rw-r--r--frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Point.js22
-rw-r--r--frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Value.js22
-rw-r--r--frontend/beta/js/Clipperz/Crypto/PRNG.js22
-rw-r--r--frontend/beta/js/Clipperz/Crypto/RSA.js22
-rw-r--r--frontend/beta/js/Clipperz/Crypto/SHA.js22
-rw-r--r--frontend/beta/js/Clipperz/Crypto/SRP.js22
-rw-r--r--frontend/beta/js/Clipperz/DOM.js22
-rw-r--r--frontend/beta/js/Clipperz/Date.js22
-rw-r--r--frontend/beta/js/Clipperz/KeePassExportProcessor.js22
-rw-r--r--frontend/beta/js/Clipperz/NotificationCenter.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/BookmarkletProcessor.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/BaseComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Compact/CompactHeader.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Compact/CompactInterface.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Compact/LoginForm.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/CSVImportComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/ClipperzImportComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/ExcelImportComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/KeePassImportComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/PasswordPlusImportComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/RoboFormImportComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/MessageBox.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/OTP/MainComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Panels/BasePanel.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Panels/ContactsPanel.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Panels/DataPanel.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Panels/LoginPanel.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Panels/LogoutPanel.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Panels/ToolsPanel.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/PasswordEntropyDisplay.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/PasswordGenerator.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Printing/Footer.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Printing/Header.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Printing/Record.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/TabPanel/TabPanelController.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/TextFormField.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Connection.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Crypto.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/DataModel/DirectLogin.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/DataModel/DirectLoginBinding.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/DataModel/DirectLoginInput.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/DataModel/DirectLoginReference.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/DataModel/Header.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/DataModel/OneTimePassword.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/DataModel/OneTimePasswordManager.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/DataModel/Record.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/DataModel/RecordField.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/DataModel/RecordVersion.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/DataModel/Statistics.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/DataModel/User.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/DataModel/UserPreferences.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Date.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Main.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Proxy.js22
-rwxr-xr-xfrontend/beta/js/Clipperz/PM/Proxy/Proxy.JSON.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Proxy/Proxy.Test.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings/MessagePanelConfigurations.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings/Strings_de-DE.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings/Strings_el-GR.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings/Strings_en-CA.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings/Strings_en-GB.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings/Strings_en-US.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings/Strings_es-ES.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings/Strings_fr-FR.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings/Strings_he-IL.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings/Strings_it-IT.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings/Strings_ja-JP.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings/Strings_pt-BR.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings/Strings_pt-PT.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings/Strings_ru-RU.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Strings/Strings_zh-CN.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Toll.js22
-rw-r--r--frontend/beta/js/Clipperz/Profile.js22
-rw-r--r--frontend/beta/js/Clipperz/Set.js22
-rw-r--r--frontend/beta/js/Clipperz/Signal.js22
-rw-r--r--frontend/beta/js/Clipperz/Style.js22
-rw-r--r--frontend/beta/js/Clipperz/YUI/Collapser.js22
-rw-r--r--frontend/beta/js/Clipperz/YUI/DomHelper.js22
-rw-r--r--frontend/beta/js/Clipperz/YUI/DomQuery.js22
-rw-r--r--frontend/beta/js/Clipperz/YUI/Drawer.js22
-rw-r--r--frontend/beta/js/Clipperz/YUI/IBLayoutManager.js22
-rw-r--r--frontend/beta/js/Clipperz/YUI/IBLayoutRegion.js22
-rw-r--r--frontend/beta/js/Clipperz/YUI/MessageBox.js22
122 files changed, 1220 insertions, 1464 deletions
diff --git a/frontend/beta/js/Clipperz/Base.js b/frontend/beta/js/Clipperz/Base.js
index 1c0504b..cf40314 100644
--- a/frontend/beta/js/Clipperz/Base.js
+++ b/frontend/beta/js/Clipperz/Base.js
@@ -1,305 +1,303 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.Base) == 'undefined') { Clipperz.Base = {}; } 25if (typeof(Clipperz.Base) == 'undefined') { Clipperz.Base = {}; }
28 26
29Clipperz.Base.VERSION = "0.1"; 27Clipperz.Base.VERSION = "0.1";
30Clipperz.Base.NAME = "Clipperz.Base"; 28Clipperz.Base.NAME = "Clipperz.Base";
31 29
32MochiKit.Base.update(Clipperz.Base, { 30MochiKit.Base.update(Clipperz.Base, {
33 31
34 //------------------------------------------------------------------------- 32 //-------------------------------------------------------------------------
35 33
36 '__repr__': function () { 34 '__repr__': function () {
37 return "[" + this.NAME + " " + this.VERSION + "]"; 35 return "[" + this.NAME + " " + this.VERSION + "]";
38 }, 36 },
39 37
40 //------------------------------------------------------------------------- 38 //-------------------------------------------------------------------------
41 39
42 'toString': function () { 40 'toString': function () {
43 return this.__repr__(); 41 return this.__repr__();
44 }, 42 },
45 43
46 //------------------------------------------------------------------------- 44 //-------------------------------------------------------------------------
47 45
48 'trim': function (aValue) { 46 'trim': function (aValue) {
49 return aValue.replace(/^\s+|\s+$/g, ""); 47 return aValue.replace(/^\s+|\s+$/g, "");
50 }, 48 },
51 49
52 //------------------------------------------------------------------------- 50 //-------------------------------------------------------------------------
53 51
54 'stringToByteArray': function (aValue) { 52 'stringToByteArray': function (aValue) {
55 varresult; 53 varresult;
56 var i, c; 54 var i, c;
57 55
58 result = []; 56 result = [];
59 57
60 c = aValue.length; 58 c = aValue.length;
61 for (i=0; i<c; i++) { 59 for (i=0; i<c; i++) {
62 result[i] = aValue.charCodeAt(i); 60 result[i] = aValue.charCodeAt(i);
63 } 61 }
64 62
65 return result; 63 return result;
66 }, 64 },
67 65
68 //......................................................................... 66 //.........................................................................
69 67
70 'byteArrayToString': function (anArrayOfBytes) { 68 'byteArrayToString': function (anArrayOfBytes) {
71 varresult; 69 varresult;
72 var i, c; 70 var i, c;
73 71
74 result = ""; 72 result = "";
75 73
76 c = anArrayOfBytes.length; 74 c = anArrayOfBytes.length;
77 for (i=0; i<c; i++) { 75 for (i=0; i<c; i++) {
78 result += String.fromCharCode(anArrayOfBytes[i]); 76 result += String.fromCharCode(anArrayOfBytes[i]);
79 } 77 }
80 78
81 return result; 79 return result;
82 }, 80 },
83 81
84 //------------------------------------------------------------------------- 82 //-------------------------------------------------------------------------
85 83
86 'getValueForKeyInFormContent': function (aFormContent, aKey) { 84 'getValueForKeyInFormContent': function (aFormContent, aKey) {
87 return aFormContent[1][MochiKit.Base.find(aFormContent[0], aKey)]; 85 return aFormContent[1][MochiKit.Base.find(aFormContent[0], aKey)];
88 }, 86 },
89 87
90 //------------------------------------------------------------------------- 88 //-------------------------------------------------------------------------
91 89
92 'indexOfObjectInArray': function(anObject, anArray) { 90 'indexOfObjectInArray': function(anObject, anArray) {
93 varresult; 91 varresult;
94 vari, c; 92 vari, c;
95 93
96 result = -1; 94 result = -1;
97 95
98 c = anArray.length; 96 c = anArray.length;
99 for (i=0; ((i<c) && (result < 0)); i++) { 97 for (i=0; ((i<c) && (result < 0)); i++) {
100 if (anArray[i] === anObject) { 98 if (anArray[i] === anObject) {
101 result = i; 99 result = i;
102 } 100 }
103 } 101 }
104 102
105 return result; 103 return result;
106 }, 104 },
107 105
108 'removeObjectAtIndexFromArray': function(anIndex, anArray) { 106 'removeObjectAtIndexFromArray': function(anIndex, anArray) {
109 anArray.splice(anIndex, 1); 107 anArray.splice(anIndex, 1);
110 }, 108 },
111 109
112 'removeObjectFromArray': function(anObject, anArray) { 110 'removeObjectFromArray': function(anObject, anArray) {
113 varobjectIndex; 111 varobjectIndex;
114 112
115 objectIndex = Clipperz.Base.indexOfObjectInArray(anObject, anArray); 113 objectIndex = Clipperz.Base.indexOfObjectInArray(anObject, anArray);
116 if (objectIndex > -1) { 114 if (objectIndex > -1) {
117 Clipperz.Base.removeObjectAtIndexFromArray(objectIndex, anArray); 115 Clipperz.Base.removeObjectAtIndexFromArray(objectIndex, anArray);
118 } else { 116 } else {
119 // jslog.error("Trying to remove an object not present in the array"); 117 // jslog.error("Trying to remove an object not present in the array");
120 //TODO: raise an exception 118 //TODO: raise an exception
121 } 119 }
122 }, 120 },
123 121
124 'removeFromArray': function(anArray, anObject) { 122 'removeFromArray': function(anArray, anObject) {
125 return Clipperz.Base.removeObjectFromArray(anObject, anArray); 123 return Clipperz.Base.removeObjectFromArray(anObject, anArray);
126 }, 124 },
127 125
128 //------------------------------------------------------------------------- 126 //-------------------------------------------------------------------------
129 127
130 'splitStringAtFixedTokenSize': function(aString, aTokenSize) { 128 'splitStringAtFixedTokenSize': function(aString, aTokenSize) {
131 var result; 129 var result;
132 varstringToProcess; 130 varstringToProcess;
133 131
134 stringToProcess = aString; 132 stringToProcess = aString;
135 result = []; 133 result = [];
136 if (stringToProcess != null) { 134 if (stringToProcess != null) {
137 while (stringToProcess.length > aTokenSize) { 135 while (stringToProcess.length > aTokenSize) {
138 result.push(stringToProcess.substring(0, aTokenSize)); 136 result.push(stringToProcess.substring(0, aTokenSize));
139 stringToProcess = stringToProcess.substring(aTokenSize); 137 stringToProcess = stringToProcess.substring(aTokenSize);
140 } 138 }
141 139
142 result.push(stringToProcess); 140 result.push(stringToProcess);
143 } 141 }
144 142
145 return result; 143 return result;
146 }, 144 },
147 145
148 //------------------------------------------------------------------------- 146 //-------------------------------------------------------------------------
149 147
150 'objectType': function(anObject) { 148 'objectType': function(anObject) {
151 var result; 149 var result;
152 150
153 if (anObject == null) { 151 if (anObject == null) {
154 result = null; 152 result = null;
155 } else { 153 } else {
156 result = typeof(anObject); 154 result = typeof(anObject);
157 155
158 if (result == "object") { 156 if (result == "object") {
159 if (anObject instanceof Array) { 157 if (anObject instanceof Array) {
160 result = 'array' 158 result = 'array'
161 } else if (anObject.constructor == Boolean) { 159 } else if (anObject.constructor == Boolean) {
162 result = 'boolean' 160 result = 'boolean'
163 } else if (anObject instanceof Date) { 161 } else if (anObject instanceof Date) {
164 result = 'date' 162 result = 'date'
165 } else if (anObject instanceof Error) { 163 } else if (anObject instanceof Error) {
166 result = 'error' 164 result = 'error'
167 } else if (anObject instanceof Function) { 165 } else if (anObject instanceof Function) {
168 result = 'function' 166 result = 'function'
169 } else if (anObject.constructor == Number) { 167 } else if (anObject.constructor == Number) {
170 result = 'number' 168 result = 'number'
171 } else if (anObject.constructor == String) { 169 } else if (anObject.constructor == String) {
172 result = 'string' 170 result = 'string'
173 } else if (anObject instanceof Object) { 171 } else if (anObject instanceof Object) {
174 result = 'object' 172 result = 'object'
175 } else { 173 } else {
176 throw Clipperz.Base.exception.UnknownType; 174 throw Clipperz.Base.exception.UnknownType;
177 } 175 }
178 } 176 }
179 } 177 }
180 178
181 return result; 179 return result;
182 }, 180 },
183 181
184 //------------------------------------------------------------------------- 182 //-------------------------------------------------------------------------
185 183
186 'escapeHTML': function(aValue) { 184 'escapeHTML': function(aValue) {
187 var result; 185 var result;
188 186
189 result = aValue; 187 result = aValue;
190 result = result.replace(/</g, "&lt;"); 188 result = result.replace(/</g, "&lt;");
191 result = result.replace(/>/g, "&gt;"); 189 result = result.replace(/>/g, "&gt;");
192 190
193 return result; 191 return result;
194 }, 192 },
195 193
196 //------------------------------------------------------------------------- 194 //-------------------------------------------------------------------------
197 195
198 'deepClone': function(anObject) { 196 'deepClone': function(anObject) {
199 var result; 197 var result;
200 198
201 result = Clipperz.Base.evalJSON(Clipperz.Base.serializeJSON(anObject)); 199 result = Clipperz.Base.evalJSON(Clipperz.Base.serializeJSON(anObject));
202 200
203 return result; 201 return result;
204 }, 202 },
205 203
206 //------------------------------------------------------------------------- 204 //-------------------------------------------------------------------------
207 205
208 'evalJSON': function(aString) { 206 'evalJSON': function(aString) {
209/* 207/*
210 var result; 208 var result;
211 209
212 //check for XSS injection 210 //check for XSS injection
213 if (/<script>/.test(aString)) { 211 if (/<script>/.test(aString)) {
214 throw "error"; 212 throw "error";
215 } 213 }
216 214
217 if (/<iframe>/.test(aString)) { 215 if (/<iframe>/.test(aString)) {
218 throw "error"; 216 throw "error";
219 } 217 }
220 218
221 result = MochiKit.Base.evalJSON(aString); 219 result = MochiKit.Base.evalJSON(aString);
222 220
223 return result; 221 return result;
224*/ 222*/
225 223
226 // return MochiKit.Base.evalJSON(aString); 224 // return MochiKit.Base.evalJSON(aString);
227 return JSON2.parse(aString); 225 return JSON2.parse(aString);
228 }, 226 },
229 227
230 'serializeJSON': function(anObject) { 228 'serializeJSON': function(anObject) {
231 // return MochiKit.Base.serializeJSON(anObject); 229 // return MochiKit.Base.serializeJSON(anObject);
232 return JSON2.stringify(anObject); 230 return JSON2.stringify(anObject);
233 }, 231 },
234 232
235 //------------------------------------------------------------------------- 233 //-------------------------------------------------------------------------
236 234
237 'sanitizeString': function(aValue) { 235 'sanitizeString': function(aValue) {
238 var result; 236 var result;
239 237
240 if (Clipperz.Base.objectType(aValue) == 'string') { 238 if (Clipperz.Base.objectType(aValue) == 'string') {
241 result = aValue; 239 result = aValue;
242 result = result.replace(/</img,"&lt;"); 240 result = result.replace(/</img,"&lt;");
243 result = result.replace(/>/img,"&gt;"); 241 result = result.replace(/>/img,"&gt;");
244 } else { 242 } else {
245 result = aValue; 243 result = aValue;
246 } 244 }
247 245
248 return result; 246 return result;
249 }, 247 },
250 248
251 //------------------------------------------------------------------------- 249 //-------------------------------------------------------------------------
252 250
253 'exception': { 251 'exception': {
254 'AbstractMethod': new MochiKit.Base.NamedError("Clipperz.Base.exception.AbstractMethod"), 252 'AbstractMethod': new MochiKit.Base.NamedError("Clipperz.Base.exception.AbstractMethod"),
255 'UnknownType': new MochiKit.Base.NamedError("Clipperz.Base.exception.UnknownType"), 253 'UnknownType': new MochiKit.Base.NamedError("Clipperz.Base.exception.UnknownType"),
256 'VulnerabilityIssue':new MochiKit.Base.NamedError("Clipperz.Base.exception.VulnerabilityIssue") 254 'VulnerabilityIssue':new MochiKit.Base.NamedError("Clipperz.Base.exception.VulnerabilityIssue")
257 }, 255 },
258 256
259 //------------------------------------------------------------------------- 257 //-------------------------------------------------------------------------
260 __syntaxFix__: "syntax fix" 258 __syntaxFix__: "syntax fix"
261 259
262}); 260});
263 261
264 262
265 263
266MochiKit.Base.registerComparator('Object dummy comparator', 264MochiKit.Base.registerComparator('Object dummy comparator',
267 function(a, b) { 265 function(a, b) {
268 return ((a.constructor == Object) && (b.constructor == Object)); 266 return ((a.constructor == Object) && (b.constructor == Object));
269 }, 267 },
270 function(a, b) { 268 function(a, b) {
271 var result; 269 var result;
272 var aKeys; 270 var aKeys;
273 var bKeys; 271 var bKeys;
274 272
275//MochiKit.Logging.logDebug(">>> comparator"); 273//MochiKit.Logging.logDebug(">>> comparator");
276//MochiKit.Logging.logDebug("- a: " + Clipperz.Base.serializeJSON(a)); 274//MochiKit.Logging.logDebug("- a: " + Clipperz.Base.serializeJSON(a));
277//MochiKit.Logging.logDebug("- b: " + Clipperz.Base.serializeJSON(a)); 275//MochiKit.Logging.logDebug("- b: " + Clipperz.Base.serializeJSON(a));
278 aKeys = MochiKit.Base.keys(a).sort(); 276 aKeys = MochiKit.Base.keys(a).sort();
279 bKeys = MochiKit.Base.keys(b).sort(); 277 bKeys = MochiKit.Base.keys(b).sort();
280 278
281 result = MochiKit.Base.compare(aKeys, bKeys); 279 result = MochiKit.Base.compare(aKeys, bKeys);
282//if (result != 0) { 280//if (result != 0) {
283 //MochiKit.Logging.logDebug("- comparator 'keys':"); 281 //MochiKit.Logging.logDebug("- comparator 'keys':");
284 //MochiKit.Logging.logDebug("- comparator aKeys: " + Clipperz.Base.serializeJSON(aKeys)); 282 //MochiKit.Logging.logDebug("- comparator aKeys: " + Clipperz.Base.serializeJSON(aKeys));
285 //MochiKit.Logging.logDebug("- comparator bKeys: " + Clipperz.Base.serializeJSON(bKeys)); 283 //MochiKit.Logging.logDebug("- comparator bKeys: " + Clipperz.Base.serializeJSON(bKeys));
286//} 284//}
287 if (result == 0) { 285 if (result == 0) {
288 vari, c; 286 vari, c;
289 287
290 c = aKeys.length; 288 c = aKeys.length;
291 for (i=0; (i<c) && (result == 0); i++) { 289 for (i=0; (i<c) && (result == 0); i++) {
292 result = MochiKit.Base.compare(a[aKeys[i]], b[bKeys[i]]); 290 result = MochiKit.Base.compare(a[aKeys[i]], b[bKeys[i]]);
293//if (result != 0) { 291//if (result != 0) {
294 //MochiKit.Logging.logDebug("- comparator 'values':"); 292 //MochiKit.Logging.logDebug("- comparator 'values':");
295 //MochiKit.Logging.logDebug("- comparator a[aKeys[i]]: " + Clipperz.Base.serializeJSON(a[aKeys[i]])); 293 //MochiKit.Logging.logDebug("- comparator a[aKeys[i]]: " + Clipperz.Base.serializeJSON(a[aKeys[i]]));
296 //MochiKit.Logging.logDebug("- comparator b[bKeys[i]]: " + Clipperz.Base.serializeJSON(b[bKeys[i]])); 294 //MochiKit.Logging.logDebug("- comparator b[bKeys[i]]: " + Clipperz.Base.serializeJSON(b[bKeys[i]]));
297//} 295//}
298 } 296 }
299 } 297 }
300 298
301//MochiKit.Logging.logDebug("<<< comparator - result: " + result); 299//MochiKit.Logging.logDebug("<<< comparator - result: " + result);
302 return result; 300 return result;
303 }, 301 },
304 true 302 true
305); 303);
diff --git a/frontend/beta/js/Clipperz/ByteArray.js b/frontend/beta/js/Clipperz/ByteArray.js
index a69aa43..540563f 100644
--- a/frontend/beta/js/Clipperz/ByteArray.js
+++ b/frontend/beta/js/Clipperz/ByteArray.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27 25
28//============================================================================= 26//=============================================================================
29 27
30Clipperz.ByteArray_abstract = function(args) { 28Clipperz.ByteArray_abstract = function(args) {
31 return this; 29 return this;
32} 30}
33 31
34Clipperz.ByteArray_abstract.prototype = MochiKit.Base.update(null, { 32Clipperz.ByteArray_abstract.prototype = MochiKit.Base.update(null, {
35 33
36 //------------------------------------------------------------------------- 34 //-------------------------------------------------------------------------
37 35
38 'toString': function() { 36 'toString': function() {
39 return "Clipperz.ByteArray_abstract"; 37 return "Clipperz.ByteArray_abstract";
40 }, 38 },
41 39
42 //------------------------------------------------------------------------- 40 //-------------------------------------------------------------------------
43 41
44 'equals': function(aValue) { 42 'equals': function(aValue) {
45 return (this.compare(aValue) == 0); 43 return (this.compare(aValue) == 0);
46 }, 44 },
47 45
48 //------------------------------------------------------------------------- 46 //-------------------------------------------------------------------------
49 47
50 'compare': function(aValue) { 48 'compare': function(aValue) {
51 var result; 49 var result;
52 var i; 50 var i;
53 51
54 result = MochiKit.Base.compare(this.length(), aValue.length()); 52 result = MochiKit.Base.compare(this.length(), aValue.length());
55 i = this.length(); 53 i = this.length();
56 54
57 while ((result == 0) && (i>0)) { 55 while ((result == 0) && (i>0)) {
58 i--; 56 i--;
59 result = MochiKit.Base.compare(this.byteAtIndex(i), aValue.byteAtIndex(i)); 57 result = MochiKit.Base.compare(this.byteAtIndex(i), aValue.byteAtIndex(i));
60 } 58 }
61 59
62 return result; 60 return result;
63 }, 61 },
64 62
65 //------------------------------------------------------------------------- 63 //-------------------------------------------------------------------------
66 64
67 'clone': function() { 65 'clone': function() {
68 throw Clipperz.Base.exception.AbstractMethod; 66 throw Clipperz.Base.exception.AbstractMethod;
69 }, 67 },
70 68
71 //------------------------------------------------------------------------- 69 //-------------------------------------------------------------------------
72 70
73 'newInstance': function() { 71 'newInstance': function() {
74 throw Clipperz.Base.exception.AbstractMethod; 72 throw Clipperz.Base.exception.AbstractMethod;
75 }, 73 },
76 74
77 //------------------------------------------------------------------------- 75 //-------------------------------------------------------------------------
78 76
79 'reset': function() { 77 'reset': function() {
80 throw Clipperz.Base.exception.AbstractMethod; 78 throw Clipperz.Base.exception.AbstractMethod;
81 }, 79 },
82 80
83 //------------------------------------------------------------------------- 81 //-------------------------------------------------------------------------
84 82
85 'length': function() { 83 'length': function() {
86 throw Clipperz.Base.exception.AbstractMethod; 84 throw Clipperz.Base.exception.AbstractMethod;
87 }, 85 },
88 86
89 //------------------------------------------------------------------------- 87 //-------------------------------------------------------------------------
90 88
91 'checkValue': function(aValue) { 89 'checkValue': function(aValue) {
92 if ((aValue & 0xff) != aValue) { 90 if ((aValue & 0xff) != aValue) {
93 MochiKit.Logging.logError("Clipperz.ByteArray.appendByte: the provided value (0x" + aValue.toString(16) + ") is not a byte value."); 91 MochiKit.Logging.logError("Clipperz.ByteArray.appendByte: the provided value (0x" + aValue.toString(16) + ") is not a byte value.");
94 throw Clipperz.ByteArray.exception.InvalidValue; 92 throw Clipperz.ByteArray.exception.InvalidValue;
95 } 93 }
96 }, 94 },
97 95
98 //------------------------------------------------------------------------- 96 //-------------------------------------------------------------------------
99 97
100 'xorMergeWithBlock': function(aBlock, anAllignment, paddingMode) { 98 'xorMergeWithBlock': function(aBlock, anAllignment, paddingMode) {
101 var result; 99 var result;
102 var a, b; 100 var a, b;
103 var aLength; 101 var aLength;
104 var bLength; 102 var bLength;
105 var i, c; 103 var i, c;
106 104
107 if (this.length() > aBlock.length()) { 105 if (this.length() > aBlock.length()) {
108 a = this; 106 a = this;
109 b = aBlock; 107 b = aBlock;
110 } else { 108 } else {
111 a = aBlock; 109 a = aBlock;
112 b = this; 110 b = this;
113 } 111 }
114 112
115 aLength = a.length(); 113 aLength = a.length();
116 bLength = b.length(); 114 bLength = b.length();
117 115
118 if (aLength != bLength) { 116 if (aLength != bLength) {
119 if (paddingMode == 'truncate') { 117 if (paddingMode == 'truncate') {
120 if (anAllignment == 'left') { 118 if (anAllignment == 'left') {
121 a = a.split(0, bLength); 119 a = a.split(0, bLength);
122 } else { 120 } else {
123 a = a.split(aLength - bLength); 121 a = a.split(aLength - bLength);
124 } 122 }
125 } else { 123 } else {
126 var ii, cc; 124 var ii, cc;
127 var padding; 125 var padding;
128 126
129 // padding = new Clipperz.ByteArray(); 127 // padding = new Clipperz.ByteArray();
130 padding = this.newInstance(); 128 padding = this.newInstance();
131 cc = aLength - bLength; 129 cc = aLength - bLength;
132 for (ii=0; ii<cc; ii++) { 130 for (ii=0; ii<cc; ii++) {
133 padding.appendByte(0); 131 padding.appendByte(0);
134 } 132 }
135 133
136 if (anAllignment == 'left') { 134 if (anAllignment == 'left') {
137 b = b.appendBlock(padding); 135 b = b.appendBlock(padding);
138 } else { 136 } else {
139 b = padding.appendBlock(b); 137 b = padding.appendBlock(b);
140 } 138 }
141 } 139 }
142 } 140 }
143 141
144 142
145 // result = new Clipperz.ByteArray(); 143 // result = new Clipperz.ByteArray();
146 result = this.newInstance(); 144 result = this.newInstance();
147 c = a.length(); 145 c = a.length();
148 for (i=0; i<c; i++) { 146 for (i=0; i<c; i++) {
149 result.appendByte(a.byteAtIndex(i) ^ b.byteAtIndex(i)); 147 result.appendByte(a.byteAtIndex(i) ^ b.byteAtIndex(i));
150 } 148 }
151 149
152 return result; 150 return result;
153 }, 151 },
154 152
155 //------------------------------------------------------------------------- 153 //-------------------------------------------------------------------------
156/* 154/*
157 'shiftLeft': function(aNumberOfBitsToShift) { 155 'shiftLeft': function(aNumberOfBitsToShift) {
158 var result; 156 var result;
159 157
160 result = this.clone(); //??????????? 158 result = this.clone(); //???????????
161 159
162 return result; 160 return result;
163 }, 161 },
164 */ 162 */
165 //------------------------------------------------------------------------- 163 //-------------------------------------------------------------------------
166 164
167 'appendBlock': function(aBlock) { 165 'appendBlock': function(aBlock) {
168 throw Clipperz.Base.exception.AbstractMethod; 166 throw Clipperz.Base.exception.AbstractMethod;
169 }, 167 },
170 168
171 //------------------------------------------------------------------------- 169 //-------------------------------------------------------------------------
172 170
173 'appendByte': function(aValue) { 171 'appendByte': function(aValue) {
174 throw Clipperz.Base.exception.AbstractMethod; 172 throw Clipperz.Base.exception.AbstractMethod;
175 }, 173 },
176 174
177 'appendBytes': function(args) { 175 'appendBytes': function(args) {
178 varvalues; 176 varvalues;
179 vari,c; 177 vari,c;
180 178
181 if (args.constructor == Array) { 179 if (args.constructor == Array) {
182 values = args; 180 values = args;
183 } else { 181 } else {
184 values = arguments; 182 values = arguments;
185 } 183 }
186 184
187 c = values.length; 185 c = values.length;
188 for (i=0; i<c; i++) { 186 for (i=0; i<c; i++) {
189 this.appendByte(values[i]); 187 this.appendByte(values[i]);
190 } 188 }
191 189
192 return this; 190 return this;
193 }, 191 },
194 192
195 //------------------------------------------------------------------------- 193 //-------------------------------------------------------------------------
196 194
197 'appendWord': function(aValue, isLittleEndian) { 195 'appendWord': function(aValue, isLittleEndian) {
198 var result; 196 var result;
199 var processAsLittleEndian; 197 var processAsLittleEndian;
200 198
201 processAsLittleEndian = isLittleEndian === true ? true : false; 199 processAsLittleEndian = isLittleEndian === true ? true : false;
202 200
203 if (processAsLittleEndian) { 201 if (processAsLittleEndian) {
204 result = this.appendBytes( (aValue) & 0xff, (aValue >> 8) & 0xff, (aValue >> 16) & 0xff, (aValue >> 24) & 0xff ); //little endian 202 result = this.appendBytes( (aValue) & 0xff, (aValue >> 8) & 0xff, (aValue >> 16) & 0xff, (aValue >> 24) & 0xff ); //little endian
205 } else { 203 } else {
206 result = this.appendBytes( (aValue >> 24) & 0xff, (aValue >> 16) & 0xff, (aValue >> 8) & 0xff, (aValue) & 0xff ); //big endian - DEFAULT 204 result = this.appendBytes( (aValue >> 24) & 0xff, (aValue >> 16) & 0xff, (aValue >> 8) & 0xff, (aValue) & 0xff ); //big endian - DEFAULT
207 } 205 }
208 206
209 return result; 207 return result;
210 }, 208 },
211 209
212 'appendWords': function(args) { 210 'appendWords': function(args) {
213 varvalues; 211 varvalues;
214 vari,c; 212 vari,c;
215 213
216 if (args.constructor == Array) { 214 if (args.constructor == Array) {
217 values = args; 215 values = args;
218 } else { 216 } else {
219 values = arguments; 217 values = arguments;
220 } 218 }
221 219
222 c = values.length; 220 c = values.length;
223 for (i=0; i<c; i++) { 221 for (i=0; i<c; i++) {
224 this.appendWord(values[i], false); 222 this.appendWord(values[i], false);
225 } 223 }
226 224
227 return this; 225 return this;
228 }, 226 },
229 227
230 //------------------------------------------------------------------------- 228 //-------------------------------------------------------------------------
231 229
232 'appendBigEndianWords': function(args) { 230 'appendBigEndianWords': function(args) {
233 varvalues; 231 varvalues;
234 vari,c; 232 vari,c;
235 233
236 if (args.constructor == Array) { 234 if (args.constructor == Array) {
237 values = args; 235 values = args;
238 } else { 236 } else {
239 values = arguments; 237 values = arguments;
240 } 238 }
241 239
242 c = values.length; 240 c = values.length;
243 for (i=0; i<c; i++) { 241 for (i=0; i<c; i++) {
244 this.appendWord(values[i], true); 242 this.appendWord(values[i], true);
245 } 243 }
246 244
247 return this; 245 return this;
248 }, 246 },
249 247
250 //------------------------------------------------------------------------- 248 //-------------------------------------------------------------------------
251 249
252 'byteAtIndex': function(anIndex) { 250 'byteAtIndex': function(anIndex) {
253 throw Clipperz.Base.exception.AbstractMethod; 251 throw Clipperz.Base.exception.AbstractMethod;
254 }, 252 },
255 253
256 'setByteAtIndex': function(aValue, anIndex) { 254 'setByteAtIndex': function(aValue, anIndex) {
257 throw Clipperz.Base.exception.AbstractMethod; 255 throw Clipperz.Base.exception.AbstractMethod;
258 }, 256 },
259 257
260 //------------------------------------------------------------------------- 258 //-------------------------------------------------------------------------
261 259
262 'bitAtIndex': function(aBitPosition) { 260 'bitAtIndex': function(aBitPosition) {
263 var result; 261 var result;
264 varbytePosition; 262 varbytePosition;
265 var bitPositionInSelectedByte; 263 var bitPositionInSelectedByte;
266 var selectedByte; 264 var selectedByte;
267 var selectedByteMask; 265 var selectedByteMask;
268 266
269 bytePosition = this.length() - Math.ceil((aBitPosition + 1)/ 8); 267 bytePosition = this.length() - Math.ceil((aBitPosition + 1)/ 8);
270 bitPositionInSelectedByte = aBitPosition % 8; 268 bitPositionInSelectedByte = aBitPosition % 8;
271 selectedByte = this.byteAtIndex(bytePosition); 269 selectedByte = this.byteAtIndex(bytePosition);
272 270
273 if (bitPositionInSelectedByte > 0) { 271 if (bitPositionInSelectedByte > 0) {
274 selectedByteMask = (1 << bitPositionInSelectedByte); 272 selectedByteMask = (1 << bitPositionInSelectedByte);
275 } else { 273 } else {
276 selectedByteMask = 1; 274 selectedByteMask = 1;
277 } 275 }
278 result = selectedByte & selectedByteMask ? 1 : 0; 276 result = selectedByte & selectedByteMask ? 1 : 0;
279//console.log("aBitPosition: " + aBitPosition + ", length: " + this.length() + ", bytePosition: " + bytePosition + ", bitPositionInSelectedByte: " + bitPositionInSelectedByte + ", selectedByteMask: " + selectedByteMask); 277//console.log("aBitPosition: " + aBitPosition + ", length: " + this.length() + ", bytePosition: " + bytePosition + ", bitPositionInSelectedByte: " + bitPositionInSelectedByte + ", selectedByteMask: " + selectedByteMask);
280 278
281 return result; 279 return result;
282 }, 280 },
283 281
284 //------------------------------------------------------------------------- 282 //-------------------------------------------------------------------------
285 283
286 'bitBlockAtIndexWithSize': function(aBitPosition, aSize) { 284 'bitBlockAtIndexWithSize': function(aBitPosition, aSize) {
287 var result; 285 var result;
288 var bitValue; 286 var bitValue;
289 var i,c; 287 var i,c;
290 288
291 result = 0; 289 result = 0;
292 c = aSize; 290 c = aSize;
293 for (i=0; i<c; i++) { 291 for (i=0; i<c; i++) {
294 bitValue = this.bitAtIndex(aBitPosition + i); 292 bitValue = this.bitAtIndex(aBitPosition + i);
295 result = result | bitValue << i; 293 result = result | bitValue << i;
296 } 294 }
297 295
298 return result; 296 return result;
299 }, 297 },
300 298
301 //------------------------------------------------------------------------- 299 //-------------------------------------------------------------------------
302 300
303 'asString': function() { 301 'asString': function() {
304 varresult; 302 varresult;
305 varlength; 303 varlength;
306 vari; 304 vari;
307 305
308//var startTime = new Date(); 306//var startTime = new Date();
309 307
310 //# result = ""; 308 //# result = "";
311 result = []; 309 result = [];
312 310
313 i = 0; 311 i = 0;
314 length = this.length(); 312 length = this.length();
315 313
316 while (i < length) { 314 while (i < length) {
317 varcurrentCharacter; 315 varcurrentCharacter;
318 varcurrentByte; 316 varcurrentByte;
319 varunicode; 317 varunicode;
320 318
321 currentByte = this.byteAtIndex(i); 319 currentByte = this.byteAtIndex(i);
322 320
323 if ((currentByte & 0x80) == 0x00 ) { //0xxxxxxx 321 if ((currentByte & 0x80) == 0x00 ) { //0xxxxxxx
324 unicode = currentByte; 322 unicode = currentByte;
325 currentCharacter = String.fromCharCode(unicode); 323 currentCharacter = String.fromCharCode(unicode);
326 } else if ((currentByte & 0xe0) == 0xc0 ) { //110xxxxx 10xxxxxx 324 } else if ((currentByte & 0xe0) == 0xc0 ) { //110xxxxx 10xxxxxx
327 unicode = (currentByte & 0x1f) << 6; 325 unicode = (currentByte & 0x1f) << 6;
328 i++; currentByte = this.byteAtIndex(i); 326 i++; currentByte = this.byteAtIndex(i);
329 unicode = unicode | (currentByte & 0x3f); 327 unicode = unicode | (currentByte & 0x3f);
330 328
331 currentCharacter = String.fromCharCode(unicode); 329 currentCharacter = String.fromCharCode(unicode);
332 } else if ((currentByte & 0xf0) == 0xe0 ) { //1110xxxx 10xxxxxx 10xxxxxx 330 } else if ((currentByte & 0xf0) == 0xe0 ) { //1110xxxx 10xxxxxx 10xxxxxx
333 unicode = (currentByte & 0x0f) << (6+6); 331 unicode = (currentByte & 0x0f) << (6+6);
334 i++; currentByte = this.byteAtIndex(i); 332 i++; currentByte = this.byteAtIndex(i);
335 unicode = unicode | ((currentByte & 0x3f) << 6); 333 unicode = unicode | ((currentByte & 0x3f) << 6);
336 i++; currentByte = this.byteAtIndex(i); 334 i++; currentByte = this.byteAtIndex(i);
337 unicode = unicode | (currentByte & 0x3f); 335 unicode = unicode | (currentByte & 0x3f);
338 336
339 currentCharacter = String.fromCharCode(unicode); 337 currentCharacter = String.fromCharCode(unicode);
340 } else { //11110xxx 10xxxxxx 10xxxxxx 10xxxxxx 338 } else { //11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
341 unicode = (currentByte & 0x07) << (6+6+6); 339 unicode = (currentByte & 0x07) << (6+6+6);
342 i++; currentByte = this.byteAtIndex(i); 340 i++; currentByte = this.byteAtIndex(i);
343 unicode = unicode | ((currentByte & 0x3f) << (6+6)); 341 unicode = unicode | ((currentByte & 0x3f) << (6+6));
344 i++; currentByte = this.byteAtIndex(i); 342 i++; currentByte = this.byteAtIndex(i);
345 unicode = unicode | ((currentByte & 0x3f) << 6); 343 unicode = unicode | ((currentByte & 0x3f) << 6);
346 i++; currentByte = this.byteAtIndex(i); 344 i++; currentByte = this.byteAtIndex(i);
347 unicode = unicode | (currentByte & 0x3f); 345 unicode = unicode | (currentByte & 0x3f);
348 346
349 currentCharacter = String.fromCharCode(unicode); 347 currentCharacter = String.fromCharCode(unicode);
350 } 348 }
351 349
352 // result += currentCharacter; 350 // result += currentCharacter;
353 result.push(currentCharacter); 351 result.push(currentCharacter);
354 i++; 352 i++;
355 } 353 }
356 354
357//MochiKit.Logging.logDebug("[" + (new Date() - startTime) + "] ByteArray.asString"); 355//MochiKit.Logging.logDebug("[" + (new Date() - startTime) + "] ByteArray.asString");
358 356
359 // return result; 357 // return result;
360 return result.join(""); 358 return result.join("");
361 }, 359 },
362 360
363 //------------------------------------------------------------------------- 361 //-------------------------------------------------------------------------
364 362
365 'toHexString': function() { 363 'toHexString': function() {
366 throw Clipperz.Base.exception.AbstractMethod; 364 throw Clipperz.Base.exception.AbstractMethod;
367 }, 365 },
368 366
369 //------------------------------------------------------------------------- 367 //-------------------------------------------------------------------------
370 368
371 'base64map': "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", 369 'base64map': "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
372 'base64mapIndex': "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(''), 370 'base64mapIndex': "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(''),
373 //'base64mapInvertedIndex': { 371 //'base64mapInvertedIndex': {
374 // 'A': 0, 'B': 1, 'C': 2, 'D': 3, 'E': 4, 'F': 5, 'G': 6, 'H': 7, 'I': 8, 'J': 9, 372 // 'A': 0, 'B': 1, 'C': 2, 'D': 3, 'E': 4, 'F': 5, 'G': 6, 'H': 7, 'I': 8, 'J': 9,
375 // 'K': 10, 'L': 11, 'M': 12, 'N': 13, 'O': 14, 'P': 15, 'Q': 16, 'R': 17, 'S': 18, 'T': 19, 373 // 'K': 10, 'L': 11, 'M': 12, 'N': 13, 'O': 14, 'P': 15, 'Q': 16, 'R': 17, 'S': 18, 'T': 19,
376 // 'U': 20, 'V': 21, 'W': 22, 'X': 23, 'Y': 24, 'Z': 25, 'a': 26, 'b': 27, 'c': 28, 'd': 29, 374 // 'U': 20, 'V': 21, 'W': 22, 'X': 23, 'Y': 24, 'Z': 25, 'a': 26, 'b': 27, 'c': 28, 'd': 29,
377 // 'e': 30, 'f': 31, 'g': 32, 'h': 33, 'i': 34, 'j': 35, 'k': 36, 'l': 37, 'm': 38, 'n': 39, 375 // 'e': 30, 'f': 31, 'g': 32, 'h': 33, 'i': 34, 'j': 35, 'k': 36, 'l': 37, 'm': 38, 'n': 39,
378 // 'o': 40, 'p': 41, 'q': 42, 'r': 43, 's': 44, 't': 45, 'u': 46, 'v': 47, 'w': 48, 'x': 49, 376 // 'o': 40, 'p': 41, 'q': 42, 'r': 43, 's': 44, 't': 45, 'u': 46, 'v': 47, 'w': 48, 'x': 49,
379 // 'y': 50, 'z': 51, '0': 52, '1': 53, '2': 54, '3': 55, '4': 56, '5': 57, '6': 58, '7': 59, 377 // 'y': 50, 'z': 51, '0': 52, '1': 53, '2': 54, '3': 55, '4': 56, '5': 57, '6': 58, '7': 59,
380 // '8': 60, '9': 61, '+': 62, '/': 63, 378 // '8': 60, '9': 61, '+': 62, '/': 63,
381 // "=": -1}, 379 // "=": -1},
382 380
383 //------------------------------------------------------------------------- 381 //-------------------------------------------------------------------------
384 382
385 'appendBase64String': function(aValue) { 383 'appendBase64String': function(aValue) {
386 var i; 384 var i;
387 var length; 385 var length;
388 386
389 length = aValue.length; 387 length = aValue.length;
390 388
391 if ((length % 4) != 0) { 389 if ((length % 4) != 0) {
392 MochiKit.Logging.logError("the value passed to the 'ByteArray.setBase64Value' is not correct"); 390 MochiKit.Logging.logError("the value passed to the 'ByteArray.setBase64Value' is not correct");
393 throw Clipperz.ByteArray.exception.InvalidValue; 391 throw Clipperz.ByteArray.exception.InvalidValue;
394 } 392 }
395 393
396 i = 0; 394 i = 0;
397 while (i<length) { 395 while (i<length) {
398 var value1, value2, value3, value4; 396 var value1, value2, value3, value4;
399 var byte1, byte2, byte3; 397 var byte1, byte2, byte3;
400 398
401 value1 = this.base64map.indexOf(aValue.charAt(i)); 399 value1 = this.base64map.indexOf(aValue.charAt(i));
402 value2 = this.base64map.indexOf(aValue.charAt(i+1)); 400 value2 = this.base64map.indexOf(aValue.charAt(i+1));
403 value3 = this.base64map.indexOf(aValue.charAt(i+2)); 401 value3 = this.base64map.indexOf(aValue.charAt(i+2));
404 value4 = this.base64map.indexOf(aValue.charAt(i+3)); 402 value4 = this.base64map.indexOf(aValue.charAt(i+3));
405 403
406 // value1 = this.base64mapInvertedIndex[aValue.charAt(i)]; 404 // value1 = this.base64mapInvertedIndex[aValue.charAt(i)];
diff --git a/frontend/beta/js/Clipperz/CSVProcessor.js b/frontend/beta/js/Clipperz/CSVProcessor.js
index ec94206..f429468 100644
--- a/frontend/beta/js/Clipperz/CSVProcessor.js
+++ b/frontend/beta/js/Clipperz/CSVProcessor.js
@@ -1,345 +1,343 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27 25
28 26
29Clipperz.CSVProcessor = function(args) { 27Clipperz.CSVProcessor = function(args) {
30 args = args || {}; 28 args = args || {};
31 29
32 // this._status = undefined; 30 // this._status = undefined;
33 // this._error_input= undefined; 31 // this._error_input= undefined;
34 // this._string = undefined; 32 // this._string = undefined;
35 // this._fields = undefined; 33 // this._fields = undefined;
36 34
37 this._quoteChar = args['quoteChar'] ||"\042"; 35 this._quoteChar = args['quoteChar'] ||"\042";
38 this._eol = args['eol'] ||""; 36 this._eol = args['eol'] ||"";
39 this._escapeChar = args['escapeChar'] ||"\042"; 37 this._escapeChar = args['escapeChar'] ||"\042";
40 this._separatorChar = args['separatorChar'] ||","; 38 this._separatorChar = args['separatorChar'] ||",";
41 this._binary = args['binary'] ||false; 39 this._binary = args['binary'] ||false;
42 this._alwaysQuote = args['alwaysQuote'] ||false; 40 this._alwaysQuote = args['alwaysQuote'] ||false;
43 41
44 return this; 42 return this;
45} 43}
46 44
47//============================================================================= 45//=============================================================================
48 46
49Clipperz.CSVProcessor.prototype = MochiKit.Base.update(null, { 47Clipperz.CSVProcessor.prototype = MochiKit.Base.update(null, {
50 48
51 //------------------------------------------------------------------------- 49 //-------------------------------------------------------------------------
52 50
53 'quoteChar': function() { 51 'quoteChar': function() {
54 return this._quoteChar; 52 return this._quoteChar;
55 }, 53 },
56 54
57 //------------------------------------------------------------------------- 55 //-------------------------------------------------------------------------
58 56
59 'eol': function() { 57 'eol': function() {
60 return this._eol; 58 return this._eol;
61 }, 59 },
62 60
63 //------------------------------------------------------------------------- 61 //-------------------------------------------------------------------------
64 62
65 'escapeChar': function() { 63 'escapeChar': function() {
66 return this._escapeChar; 64 return this._escapeChar;
67 }, 65 },
68 66
69 //------------------------------------------------------------------------- 67 //-------------------------------------------------------------------------
70 68
71 'separatorChar': function() { 69 'separatorChar': function() {
72 return this._separatorChar; 70 return this._separatorChar;
73 }, 71 },
74 72
75 'setSeparatorChar': function(aValue) { 73 'setSeparatorChar': function(aValue) {
76 this._separatorChar = aValue; 74 this._separatorChar = aValue;
77 }, 75 },
78 76
79 //------------------------------------------------------------------------- 77 //-------------------------------------------------------------------------
80 78
81 'binary': function() { 79 'binary': function() {
82 return this._binary; 80 return this._binary;
83 }, 81 },
84 82
85 //------------------------------------------------------------------------- 83 //-------------------------------------------------------------------------
86 84
87 'alwaysQuote': function() { 85 'alwaysQuote': function() {
88 return this._alwaysQuote; 86 return this._alwaysQuote;
89 }, 87 },
90 88
91 //------------------------------------------------------------------------- 89 //-------------------------------------------------------------------------
92/* 90/*
93 'parse': function(aValue) { 91 'parse': function(aValue) {
94 var result; 92 var result;
95 var lines; 93 var lines;
96 var parameter; 94 var parameter;
97 95
98//MochiKit.Logging.logDebug(">>> CSVProcessor.parse"); 96//MochiKit.Logging.logDebug(">>> CSVProcessor.parse");
99 result = []; 97 result = [];
100 98
101 lines = aValue.replace(/\r?\n/g, "\n").replace(/^\n* /g, "").replace(/\n$/g, "");; 99 lines = aValue.replace(/\r?\n/g, "\n").replace(/^\n* /g, "").replace(/\n$/g, "");;
102 parameter = { 100 parameter = {
103 line: lines 101 line: lines
104 } 102 }
105 103
106 do { 104 do {
107 var fields; 105 var fields;
108 106
109 fields = this.parseLine(parameter); 107 fields = this.parseLine(parameter);
110 108
111 if (fields != null) { 109 if (fields != null) {
112 result.push(fields); 110 result.push(fields);
113 } 111 }
114 112
115 parameter.line = parameter.line.replace(/^\n* /g, "").replace(/\n$/g, ""); 113 parameter.line = parameter.line.replace(/^\n* /g, "").replace(/\n$/g, "");
116 114
117//MochiKit.Logging.logDebug("line: '" + parameter.line + "'"); 115//MochiKit.Logging.logDebug("line: '" + parameter.line + "'");
118 } while (parameter.line != ""); 116 } while (parameter.line != "");
119//MochiKit.Logging.logDebug("--- CSVProcessor.parse - result: " + Clipperz.Base.serializeJSON(result)); 117//MochiKit.Logging.logDebug("--- CSVProcessor.parse - result: " + Clipperz.Base.serializeJSON(result));
120//MochiKit.Logging.logDebug("<<< CSVProcessor.parse"); 118//MochiKit.Logging.logDebug("<<< CSVProcessor.parse");
121 119
122 return result; 120 return result;
123 }, 121 },
124*/ 122*/
125 //------------------------------------------------------------------------- 123 //-------------------------------------------------------------------------
126 124
127 'deferredParse_core': function(aContext) { 125 'deferredParse_core': function(aContext) {
128 var deferredResult; 126 var deferredResult;
129 127
130 if (aContext.line == "") { 128 if (aContext.line == "") {
131 deferredResult = MochiKit.Async.succeed(aContext.result); 129 deferredResult = MochiKit.Async.succeed(aContext.result);
132 } else { 130 } else {
133 var fields; 131 var fields;
134 132
135 fields = this.parseLine(aContext); 133 fields = this.parseLine(aContext);
136 if (fields != null) { 134 if (fields != null) {
137 aContext.result.push(fields); 135 aContext.result.push(fields);
138 } 136 }
139 137
140 aContext.line = aContext.line.replace(/^\n*/g, "").replace(/\n$/g, ""); 138 aContext.line = aContext.line.replace(/^\n*/g, "").replace(/\n$/g, "");
141 139
142 deferredResult = new MochiKit.Async.Deferred(); 140 deferredResult = new MochiKit.Async.Deferred();
143 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'importProcessorProgressUpdate', {status:'processing', size:aContext.size, progress:(aContext.size - aContext.line.length)}); 141 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'importProcessorProgressUpdate', {status:'processing', size:aContext.size, progress:(aContext.size - aContext.line.length)});
144 deferredResult.addCallback(MochiKit.Async.wait, 0.2); 142 deferredResult.addCallback(MochiKit.Async.wait, 0.2);
145 deferredResult.addCallback(MochiKit.Base.method(this, 'deferredParse_core')) 143 deferredResult.addCallback(MochiKit.Base.method(this, 'deferredParse_core'))
146 deferredResult.callback(aContext); 144 deferredResult.callback(aContext);
147 } 145 }
148 146
149 return deferredResult; 147 return deferredResult;
150 }, 148 },
151 149
152 //......................................................................... 150 //.........................................................................
153 151
154 'deferredParse': function(aValue) { 152 'deferredParse': function(aValue) {
155 var deferredResult; 153 var deferredResult;
156 var lines; 154 var lines;
157 var context; 155 var context;
158 156
159 lines = aValue.replace(/\r?\n/g, "\n").replace(/^\n*/g, "").replace(/\n$/g, ""); 157 lines = aValue.replace(/\r?\n/g, "\n").replace(/^\n*/g, "").replace(/\n$/g, "");
160 158
161 context = { 159 context = {
162 line: lines, 160 line: lines,
163 size: lines.length, 161 size: lines.length,
164 result: [] 162 result: []
165 } 163 }
166 164
167 deferredResult = new MochiKit.Async.Deferred(); 165 deferredResult = new MochiKit.Async.Deferred();
168 deferredResult.addCallback(MochiKit.Base.method(this, 'deferredParse_core')); 166 deferredResult.addCallback(MochiKit.Base.method(this, 'deferredParse_core'));
169 deferredResult.callback(context); 167 deferredResult.callback(context);
170 168
171 return deferredResult; 169 return deferredResult;
172 }, 170 },
173 171
174 //------------------------------------------------------------------------- 172 //-------------------------------------------------------------------------
175 173
176 'parseLine': function(aParameter) { 174 'parseLine': function(aParameter) {
177 var result; 175 var result;
178 var palatable; 176 var palatable;
179 var line; 177 var line;
180 var processedField; 178 var processedField;
181 179
182 result = []; 180 result = [];
183 181
184 do { 182 do {
185 processedField = this.parseField(aParameter); 183 processedField = this.parseField(aParameter);
186 if (processedField != null) { 184 if (processedField != null) {
187 result.push(processedField) 185 result.push(processedField)
188 }; 186 };
189 } while (processedField != null); 187 } while (processedField != null);
190 188
191 return result; 189 return result;
192 }, 190 },
193 191
194 //------------------------------------------------------------------------- 192 //-------------------------------------------------------------------------
195 193
196 'parseField': function(aParameter) { 194 'parseField': function(aParameter) {
197 var result; 195 var result;
198 196
199 var inQuotes; 197 var inQuotes;
200 var validRegExp; 198 var validRegExp;
201 var singleQuoteBeginRegexp; 199 var singleQuoteBeginRegexp;
202 var escapedQuoteBeginRegexp; 200 var escapedQuoteBeginRegexp;
203 var singleQuoteCommaEndRegexp; 201 var singleQuoteCommaEndRegexp;
204 var singleQuoteNewLineEndRegexp; 202 var singleQuoteNewLineEndRegexp;
205 var commaBeginRegexp; 203 var commaBeginRegexp;
206 var newlineRegexp; 204 var newlineRegexp;
207 205
208 206
209 singleQuoteBeginRegexp = new RegExp("^" + '\\' + this.quoteChar()); 207 singleQuoteBeginRegexp = new RegExp("^" + '\\' + this.quoteChar());
210 escapedQuoteBeginRegexp = new RegExp("^" + '\\' + this.escapeChar() + '\\' + this.quoteChar()); 208 escapedQuoteBeginRegexp = new RegExp("^" + '\\' + this.escapeChar() + '\\' + this.quoteChar());
211 singleQuoteCommaEndRegexp= new RegExp("^" + '\\' + this.quoteChar() + '\\' + this.separatorChar()); 209 singleQuoteCommaEndRegexp= new RegExp("^" + '\\' + this.quoteChar() + '\\' + this.separatorChar());
212 singleQuoteNewLineEndRegexp= new RegExp("^" + '\\' + this.quoteChar() + "\n"); 210 singleQuoteNewLineEndRegexp= new RegExp("^" + '\\' + this.quoteChar() + "\n");
213 commaBeginRegexp = new RegExp("^" + '\\' + this.separatorChar()); 211 commaBeginRegexp = new RegExp("^" + '\\' + this.separatorChar());
214 newlineRegexp = new RegExp("^\n"); 212 newlineRegexp = new RegExp("^\n");
215 213
216 inQuotes = false; 214 inQuotes = false;
217 215
218//MochiKit.Logging.logDebug("#################################### '" + aParameter.line + "'"); 216//MochiKit.Logging.logDebug("#################################### '" + aParameter.line + "'");
219 if (aParameter.line == "") { 217 if (aParameter.line == "") {
220 if (aParameter.isThereAnEmptyFinalField == true) { 218 if (aParameter.isThereAnEmptyFinalField == true) {
221 aParameter.isThereAnEmptyFinalField = false; 219 aParameter.isThereAnEmptyFinalField = false;
222 result = ""; 220 result = "";
223 } else { 221 } else {
224 result = null; 222 result = null;
225 } 223 }
226 } else { 224 } else {
227 if (this.binary()) { 225 if (this.binary()) {
228 validRegexp = /^./; 226 validRegexp = /^./;
229 // validRegexp = /^[^\\]/; 227 // validRegexp = /^[^\\]/;
230 } else { 228 } else {
231 validRegexp = /^[\t\040-\176]/; 229 validRegexp = /^[\t\040-\176]/;
232 } 230 }
233 231
234 try { 232 try {
235 var done; 233 var done;
236 234
237 done = false; 235 done = false;
238 result = ""; 236 result = "";
239 237
240 while (!done) { 238 while (!done) {
241 if (aParameter.line.length < 1) { 239 if (aParameter.line.length < 1) {
242//MochiKit.Logging.logDebug("---> 1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 240//MochiKit.Logging.logDebug("---> 1: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
243 if (inQuotes == true) { 241 if (inQuotes == true) {
244//MochiKit.Logging.logDebug("---> 1.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 242//MochiKit.Logging.logDebug("---> 1.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
245 throw new Error("CSV Parsing error; end of string, missing closing double-quote..."); 243 throw new Error("CSV Parsing error; end of string, missing closing double-quote...");
246 } else { 244 } else {
247//MochiKit.Logging.logDebug("---> 1.2: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 245//MochiKit.Logging.logDebug("---> 1.2: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
248 done = true; 246 done = true;
249 } 247 }
250 } else if (escapedQuoteBeginRegexp.test(aParameter.line)) { 248 } else if (escapedQuoteBeginRegexp.test(aParameter.line)) {
251//MochiKit.Logging.logDebug("---> 2.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 249//MochiKit.Logging.logDebug("---> 2.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
252 result += this.quoteChar(); 250 result += this.quoteChar();
253 aParameter.line = aParameter.line.substr(2, aParameter.line.length - 1); 251 aParameter.line = aParameter.line.substr(2, aParameter.line.length - 1);
254//MochiKit.Logging.logDebug("<--- 2.2: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 252//MochiKit.Logging.logDebug("<--- 2.2: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
255 } else if (singleQuoteBeginRegexp.test(aParameter.line)) { 253 } else if (singleQuoteBeginRegexp.test(aParameter.line)) {
256//MochiKit.Logging.logDebug("---> 3: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 254//MochiKit.Logging.logDebug("---> 3: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
257 if (inQuotes == true) { 255 if (inQuotes == true) {
258 if (aParameter.line.length == 1) { 256 if (aParameter.line.length == 1) {
259//MochiKit.Logging.logDebug("---> 3.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 257//MochiKit.Logging.logDebug("---> 3.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
260 aParameter.line = ''; 258 aParameter.line = '';
261 done = true; 259 done = true;
262 } else if (singleQuoteCommaEndRegexp.test(aParameter.line)) { 260 } else if (singleQuoteCommaEndRegexp.test(aParameter.line)) {
263//MochiKit.Logging.logDebug("---> 3.3: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 261//MochiKit.Logging.logDebug("---> 3.3: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
264 aParameter.line = aParameter.line.substr(2, aParameter.line.length - 1); 262 aParameter.line = aParameter.line.substr(2, aParameter.line.length - 1);
265 done = true; 263 done = true;
266//MochiKit.Logging.logDebug("<--- 3.3: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 264//MochiKit.Logging.logDebug("<--- 3.3: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
267 } else if (singleQuoteNewLineEndRegexp.test(aParameter.line)) { 265 } else if (singleQuoteNewLineEndRegexp.test(aParameter.line)) {
268 aParameter.line = aParameter.line.substr(1, aParameter.line.length - 1); 266 aParameter.line = aParameter.line.substr(1, aParameter.line.length - 1);
269 done = true; 267 done = true;
270 } else { 268 } else {
271 throw new Error("CSV Parsing error; double-quote, followed by undesirable character (bad character sequence)... " + aParameter.line); 269 throw new Error("CSV Parsing error; double-quote, followed by undesirable character (bad character sequence)... " + aParameter.line);
272 } 270 }
273 } else { 271 } else {
274//MochiKit.Logging.logDebug("---> 4: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 272//MochiKit.Logging.logDebug("---> 4: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
275 if (result == "") { 273 if (result == "") {
276//MochiKit.Logging.logDebug("---> 4.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 274//MochiKit.Logging.logDebug("---> 4.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
277 inQuotes = true; 275 inQuotes = true;
278 aParameter.line = aParameter.line.substr(1, aParameter.line.length - 1); 276 aParameter.line = aParameter.line.substr(1, aParameter.line.length - 1);
279//MochiKit.Logging.logDebug("<--- 4.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 277//MochiKit.Logging.logDebug("<--- 4.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
280 } else { 278 } else {
281 throw new Error("CSV Parsing error; double-quote, outside of double-quotes (bad character sequence)..."); 279 throw new Error("CSV Parsing error; double-quote, outside of double-quotes (bad character sequence)...");
282 } 280 }
283 } 281 }
284 } else if (commaBeginRegexp.test(aParameter.line)) { 282 } else if (commaBeginRegexp.test(aParameter.line)) {
285//MochiKit.Logging.logDebug("---> 5: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 283//MochiKit.Logging.logDebug("---> 5: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
286 if (inQuotes) { 284 if (inQuotes) {
287//MochiKit.Logging.logDebug("---> 5.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 285//MochiKit.Logging.logDebug("---> 5.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
288 result += aParameter.line.substr(0 ,1); 286 result += aParameter.line.substr(0 ,1);
289 aParameter.line = aParameter.line.substr(1, aParameter.line.length - 1); 287 aParameter.line = aParameter.line.substr(1, aParameter.line.length - 1);
290//MochiKit.Logging.logDebug("<--- 5.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 288//MochiKit.Logging.logDebug("<--- 5.1: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
291 } else { 289 } else {
292//MochiKit.Logging.logDebug("---> 5.2: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 290//MochiKit.Logging.logDebug("---> 5.2: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
293 aParameter.line = aParameter.line.substr(1, aParameter.line.length - 1); 291 aParameter.line = aParameter.line.substr(1, aParameter.line.length - 1);
294 if (newlineRegexp.test(aParameter.line) || aParameter.line == "") { 292 if (newlineRegexp.test(aParameter.line) || aParameter.line == "") {
295//MochiKit.Logging.logDebug("######"); 293//MochiKit.Logging.logDebug("######");
296 aParameter.isThereAnEmptyFinalField = true; 294 aParameter.isThereAnEmptyFinalField = true;
297 }; 295 };
298 done = true; 296 done = true;
299//MochiKit.Logging.logDebug("<--- 5.2: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 297//MochiKit.Logging.logDebug("<--- 5.2: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
300 } 298 }
301 } else if (validRegexp.test(aParameter.line)) { 299 } else if (validRegexp.test(aParameter.line)) {
302//MochiKit.Logging.logDebug("---> 6: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 300//MochiKit.Logging.logDebug("---> 6: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
303 result += aParameter.line.substr(0, 1); 301 result += aParameter.line.substr(0, 1);
304 aParameter.line = aParameter.line.substr(1, aParameter.line.length - 1); 302 aParameter.line = aParameter.line.substr(1, aParameter.line.length - 1);
305//MochiKit.Logging.logDebug("<--- 6: '" + aParameter.line.replace(/\n/g, "\\n") + "'"); 303//MochiKit.Logging.logDebug("<--- 6: '" + aParameter.line.replace(/\n/g, "\\n") + "'");
306 } else if (newlineRegexp.test(aParameter.line)) { 304 } else if (newlineRegexp.test(aParameter.line)) {
307 if (inQuotes == true) { 305 if (inQuotes == true) {
308 result += aParameter.line.substr(0 ,1); 306 result += aParameter.line.substr(0 ,1);
309 aParameter.line = aParameter.line.substr(1, aParameter.line.length - 1); 307 aParameter.line = aParameter.line.substr(1, aParameter.line.length - 1);
310 } else { 308 } else {
311 if (result == "") { 309 if (result == "") {
312 if (aParameter.isThereAnEmptyFinalField == true) { 310 if (aParameter.isThereAnEmptyFinalField == true) {
313 aParameter.isThereAnEmptyFinalField = false; 311 aParameter.isThereAnEmptyFinalField = false;
314 } else { 312 } else {
315 result = null; 313 result = null;
316 } 314 }
317 } 315 }
318 316
319 done = true; 317 done = true;
320 } 318 }
321 } else { 319 } else {
322 throw new Error("CSV Parsing error; an undesirable character... '" + aParameter.line.substr(0,1) + "'"); 320 throw new Error("CSV Parsing error; an undesirable character... '" + aParameter.line.substr(0,1) + "'");
323 } 321 }
324 } 322 }
325 } catch(exception) { 323 } catch(exception) {
326 MochiKit.Logging.logError(exception.message); 324 MochiKit.Logging.logError(exception.message);
327 // result = null; 325 // result = null;
328 throw exception; 326 throw exception;
329 } 327 }
330 } 328 }
331 329
332//if (result != null) { 330//if (result != null) {
333 //MochiKit.Logging.logDebug("<=== result: '" + result.replace(/\n/g, "\\n") + "'"); 331 //MochiKit.Logging.logDebug("<=== result: '" + result.replace(/\n/g, "\\n") + "'");
334//} else { 332//} else {
335 //MochiKit.Logging.logDebug("<=== result: NULL"); 333 //MochiKit.Logging.logDebug("<=== result: NULL");
336//} 334//}
337 335
338 return result; 336 return result;
339 }, 337 },
340 338
341 //------------------------------------------------------------------------- 339 //-------------------------------------------------------------------------
342 __syntaxFix__: "syntax fix" 340 __syntaxFix__: "syntax fix"
343}); 341});
344 342
345 343
diff --git a/frontend/beta/js/Clipperz/Crypto/AES.js b/frontend/beta/js/Clipperz/Crypto/AES.js
index 7ddda3e..a5c63fb 100644
--- a/frontend/beta/js/Clipperz/Crypto/AES.js
+++ b/frontend/beta/js/Clipperz/Crypto/AES.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { 24try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) {
27 throw "Clipperz.Crypto.AES depends on Clipperz.ByteArray!"; 25 throw "Clipperz.Crypto.AES depends on Clipperz.ByteArray!";
28} 26}
29 27
30 //Dependency commented to avoid a circular reference 28 //Dependency commented to avoid a circular reference
31//try { if (typeof(Clipperz.Crypto.PRNG) == 'undefined') { throw ""; }} catch (e) { 29//try { if (typeof(Clipperz.Crypto.PRNG) == 'undefined') { throw ""; }} catch (e) {
32 //throw "Clipperz.Crypto.AES depends on Clipperz.Crypto.PRNG!"; 30 //throw "Clipperz.Crypto.AES depends on Clipperz.Crypto.PRNG!";
33//} 31//}
34 32
35if (typeof(Clipperz.Crypto.AES) == 'undefined') { Clipperz.Crypto.AES = {}; } 33if (typeof(Clipperz.Crypto.AES) == 'undefined') { Clipperz.Crypto.AES = {}; }
36 34
37//############################################################################# 35//#############################################################################
38 36
39Clipperz.Crypto.AES.DeferredExecutionContext = function(args) { 37Clipperz.Crypto.AES.DeferredExecutionContext = function(args) {
40 args = args || {}; 38 args = args || {};
41 39
42 this._key = args.key; 40 this._key = args.key;
43 this._message = args.message; 41 this._message = args.message;
44 this._result = args.message.clone(); 42 this._result = args.message.clone();
45 this._nonce = args.nonce; 43 this._nonce = args.nonce;
46 this._messageLength = this._message.length(); 44 this._messageLength = this._message.length();
47 45
48 this._messageArray = this._message.arrayValues(); 46 this._messageArray = this._message.arrayValues();
49 this._resultArray = this._result.arrayValues(); 47 this._resultArray = this._result.arrayValues();
50 this._nonceArray = this._nonce.arrayValues(); 48 this._nonceArray = this._nonce.arrayValues();
51 49
52 this._executionStep = 0; 50 this._executionStep = 0;
53 51
54 return this; 52 return this;
55} 53}
56 54
57Clipperz.Crypto.AES.DeferredExecutionContext.prototype = MochiKit.Base.update(null, { 55Clipperz.Crypto.AES.DeferredExecutionContext.prototype = MochiKit.Base.update(null, {
58 56
59 'key': function() { 57 'key': function() {
60 return this._key; 58 return this._key;
61 }, 59 },
62 60
63 'message': function() { 61 'message': function() {
64 return this._message; 62 return this._message;
65 }, 63 },
66 64
67 'messageLength': function() { 65 'messageLength': function() {
68 return this._messageLength; 66 return this._messageLength;
69 }, 67 },
70 68
71 'result': function() { 69 'result': function() {
72 return new Clipperz.ByteArray(this.resultArray()); 70 return new Clipperz.ByteArray(this.resultArray());
73 }, 71 },
74 72
75 'nonce': function() { 73 'nonce': function() {
76 return this._nonce; 74 return this._nonce;
77 }, 75 },
78 76
79 'messageArray': function() { 77 'messageArray': function() {
80 return this._messageArray; 78 return this._messageArray;
81 }, 79 },
82 80
83 'resultArray': function() { 81 'resultArray': function() {
84 return this._resultArray; 82 return this._resultArray;
85 }, 83 },
86 84
87 'nonceArray': function() { 85 'nonceArray': function() {
88 return this._nonceArray; 86 return this._nonceArray;
89 }, 87 },
90 88
91 'elaborationChunkSize': function() { 89 'elaborationChunkSize': function() {
92 return Clipperz.Crypto.AES.DeferredExecution.chunkSize; 90 return Clipperz.Crypto.AES.DeferredExecution.chunkSize;
93 }, 91 },
94 92
95 'executionStep': function() { 93 'executionStep': function() {
96 return this._executionStep; 94 return this._executionStep;
97 }, 95 },
98 96
99 'setExecutionStep': function(aValue) { 97 'setExecutionStep': function(aValue) {
100 this._executionStep = aValue; 98 this._executionStep = aValue;
101 }, 99 },
102 100
103 'pause': function(aValue) { 101 'pause': function(aValue) {
104 return MochiKit.Async.wait(Clipperz.Crypto.AES.DeferredExecution.pauseTime, aValue); 102 return MochiKit.Async.wait(Clipperz.Crypto.AES.DeferredExecution.pauseTime, aValue);
105 }, 103 },
106 104
107 //----------------------------------------------------------------------------- 105 //-----------------------------------------------------------------------------
108 __syntaxFix__: "syntax fix" 106 __syntaxFix__: "syntax fix"
109 107
110}); 108});
111 109
112//############################################################################# 110//#############################################################################
113 111
114Clipperz.Crypto.AES.Key = function(args) { 112Clipperz.Crypto.AES.Key = function(args) {
115 args = args || {}; 113 args = args || {};
116 114
117 this._key = args.key; 115 this._key = args.key;
118 this._keySize = args.keySize || this.key().length(); 116 this._keySize = args.keySize || this.key().length();
119 117
120 if (this.keySize() == 128/8) { 118 if (this.keySize() == 128/8) {
121 this._b = 176; 119 this._b = 176;
122 this._numberOfRounds = 10; 120 this._numberOfRounds = 10;
123 } else if (this.keySize() == 256/8) { 121 } else if (this.keySize() == 256/8) {
124 this._b = 240; 122 this._b = 240;
125 this._numberOfRounds = 14; 123 this._numberOfRounds = 14;
126 } else { 124 } else {
127 MochiKit.Logging.logError("AES unsupported key size: " + (this.keySize() * 8) + " bits"); 125 MochiKit.Logging.logError("AES unsupported key size: " + (this.keySize() * 8) + " bits");
128 throw Clipperz.Crypto.AES.exception.UnsupportedKeySize; 126 throw Clipperz.Crypto.AES.exception.UnsupportedKeySize;
129 } 127 }
130 128
131 this._stretchedKey = null; 129 this._stretchedKey = null;
132 130
133 return this; 131 return this;
134} 132}
135 133
136Clipperz.Crypto.AES.Key.prototype = MochiKit.Base.update(null, { 134Clipperz.Crypto.AES.Key.prototype = MochiKit.Base.update(null, {
137 135
138 'asString': function() { 136 'asString': function() {
139 return "Clipperz.Crypto.AES.Key (" + this.key().toHexString() + ")"; 137 return "Clipperz.Crypto.AES.Key (" + this.key().toHexString() + ")";
140 }, 138 },
141 139
142 //----------------------------------------------------------------------------- 140 //-----------------------------------------------------------------------------
143 141
144 'key': function() { 142 'key': function() {
145 return this._key; 143 return this._key;
146 }, 144 },
147 145
148 'keySize': function() { 146 'keySize': function() {
149 return this._keySize; 147 return this._keySize;
150 }, 148 },
151 149
152 'b': function() { 150 'b': function() {
153 return this._b; 151 return this._b;
154 }, 152 },
155 153
156 'numberOfRounds': function() { 154 'numberOfRounds': function() {
157 return this._numberOfRounds; 155 return this._numberOfRounds;
158 }, 156 },
159 //========================================================================= 157 //=========================================================================
160 158
161 'keyScheduleCore': function(aWord, aRoundConstantsIndex) { 159 'keyScheduleCore': function(aWord, aRoundConstantsIndex) {
162 varresult; 160 varresult;
163 var sbox; 161 var sbox;
164 162
165 sbox = Clipperz.Crypto.AES.sbox(); 163 sbox = Clipperz.Crypto.AES.sbox();
166 164
167 result = [sbox[aWord[1]] ^ Clipperz.Crypto.AES.roundConstants()[aRoundConstantsIndex], 165 result = [sbox[aWord[1]] ^ Clipperz.Crypto.AES.roundConstants()[aRoundConstantsIndex],
168 sbox[aWord[2]], 166 sbox[aWord[2]],
169 sbox[aWord[3]], 167 sbox[aWord[3]],
170 sbox[aWord[0]]]; 168 sbox[aWord[0]]];
171 169
172 return result; 170 return result;
173 }, 171 },
174 172
175 //----------------------------------------------------------------------------- 173 //-----------------------------------------------------------------------------
176 174
177 'xorWithPreviousStretchValues': function(aKey, aWord, aPreviousWordIndex) { 175 'xorWithPreviousStretchValues': function(aKey, aWord, aPreviousWordIndex) {
178 varresult; 176 varresult;
179 var i,c; 177 var i,c;
180 178
181 result = []; 179 result = [];
182 c = 4; 180 c = 4;
183 for (i=0; i<c; i++) { 181 for (i=0; i<c; i++) {
184 result[i] = aWord[i] ^ aKey.byteAtIndex(aPreviousWordIndex + i); 182 result[i] = aWord[i] ^ aKey.byteAtIndex(aPreviousWordIndex + i);
185 } 183 }
186 184
187 return result; 185 return result;
188 }, 186 },
189 187
190 //----------------------------------------------------------------------------- 188 //-----------------------------------------------------------------------------
191 189
192 'sboxShakeup': function(aWord) { 190 'sboxShakeup': function(aWord) {
193 var result; 191 var result;
194 var sbox; 192 var sbox;
195 var i,c; 193 var i,c;
196 194
197 result = []; 195 result = [];
198 sbox = Clipperz.Crypto.AES.sbox(); 196 sbox = Clipperz.Crypto.AES.sbox();
199 c =4; 197 c =4;
200 for (i=0; i<c; i++) { 198 for (i=0; i<c; i++) {
201 result[i] = sbox[aWord[i]]; 199 result[i] = sbox[aWord[i]];
202 } 200 }
203 201
204 return result; 202 return result;
205 }, 203 },
206 204
207 //----------------------------------------------------------------------------- 205 //-----------------------------------------------------------------------------
208 206
209 'stretchKey': function(aKey) { 207 'stretchKey': function(aKey) {
210 varcurrentWord; 208 varcurrentWord;
211 varkeyLength; 209 varkeyLength;
212 varpreviousStretchIndex; 210 varpreviousStretchIndex;
213 var i,c; 211 var i,c;
214 212
215 keyLength = aKey.length(); 213 keyLength = aKey.length();
216 previousStretchIndex = keyLength - this.keySize(); 214 previousStretchIndex = keyLength - this.keySize();
217 215
218 currentWord = [aKey.byteAtIndex(keyLength - 4), 216 currentWord = [aKey.byteAtIndex(keyLength - 4),
219 aKey.byteAtIndex(keyLength - 3), 217 aKey.byteAtIndex(keyLength - 3),
220 aKey.byteAtIndex(keyLength - 2), 218 aKey.byteAtIndex(keyLength - 2),
221 aKey.byteAtIndex(keyLength - 1)]; 219 aKey.byteAtIndex(keyLength - 1)];
222 currentWord = this.keyScheduleCore(currentWord, keyLength / this.keySize()); 220 currentWord = this.keyScheduleCore(currentWord, keyLength / this.keySize());
223 221
224 if (this.keySize() == 256/8) { 222 if (this.keySize() == 256/8) {
225 c = 8; 223 c = 8;
226 } else if (this.keySize() == 128/8){ 224 } else if (this.keySize() == 128/8){
227 c = 4; 225 c = 4;
228 } 226 }
229 227
230 for (i=0; i<c; i++) { 228 for (i=0; i<c; i++) {
231 if (i == 4) { 229 if (i == 4) {
232 //fifth streatch word 230 //fifth streatch word
233 currentWord = this.sboxShakeup(currentWord); 231 currentWord = this.sboxShakeup(currentWord);
234 } 232 }
235 233
236 currentWord = this.xorWithPreviousStretchValues(aKey, currentWord, previousStretchIndex + (i*4)); 234 currentWord = this.xorWithPreviousStretchValues(aKey, currentWord, previousStretchIndex + (i*4));
237 aKey.appendBytes(currentWord); 235 aKey.appendBytes(currentWord);
238 } 236 }
239 237
240 return aKey; 238 return aKey;
241 }, 239 },
242 240
243 //----------------------------------------------------------------------------- 241 //-----------------------------------------------------------------------------
244 242
245 'stretchedKey': function() { 243 'stretchedKey': function() {
246 if (this._stretchedKey == null) { 244 if (this._stretchedKey == null) {
247 var stretchedKey; 245 var stretchedKey;
248 246
249 stretchedKey = this.key().clone(); 247 stretchedKey = this.key().clone();
250 248
251 while (stretchedKey.length() < this.keySize()) { 249 while (stretchedKey.length() < this.keySize()) {
252 stretchedKey.appendByte(0); 250 stretchedKey.appendByte(0);
253 } 251 }
254 252
255 while (stretchedKey.length() < this.b()) { 253 while (stretchedKey.length() < this.b()) {
256 stretchedKey = this.stretchKey(stretchedKey); 254 stretchedKey = this.stretchKey(stretchedKey);
257 } 255 }
258 256
259 this._stretchedKey = stretchedKey.split(0, this.b()); 257 this._stretchedKey = stretchedKey.split(0, this.b());
260 } 258 }
261 259
262 return this._stretchedKey; 260 return this._stretchedKey;
263 }, 261 },
264 262
265 //========================================================================= 263 //=========================================================================
266 __syntaxFix__: "syntax fix" 264 __syntaxFix__: "syntax fix"
267}); 265});
268 266
269//############################################################################# 267//#############################################################################
270 268
271Clipperz.Crypto.AES.State = function(args) { 269Clipperz.Crypto.AES.State = function(args) {
272 args = args || {}; 270 args = args || {};
273 271
274 this._data = args.block; 272 this._data = args.block;
275 this._key = args.key; 273 this._key = args.key;
276 274
277 return this; 275 return this;
278} 276}
279 277
280Clipperz.Crypto.AES.State.prototype = MochiKit.Base.update(null, { 278Clipperz.Crypto.AES.State.prototype = MochiKit.Base.update(null, {
281 279
282 'key': function() { 280 'key': function() {
283 return this._key; 281 return this._key;
284 }, 282 },
285 283
286 //----------------------------------------------------------------------------- 284 //-----------------------------------------------------------------------------
287 285
288 'data': function() { 286 'data': function() {
289 return this._data; 287 return this._data;
290 }, 288 },
291 289
292 'setData': function(aValue) { 290 'setData': function(aValue) {
293 this._data = aValue; 291 this._data = aValue;
294 }, 292 },
295 293
296 //========================================================================= 294 //=========================================================================
297 295
298 'addRoundKey': function(aRoundNumber) { 296 'addRoundKey': function(aRoundNumber) {
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. 297 //each byte of the state is combined with the round key; each round key is derived from the cipher key using a key schedule.
300 vardata; 298 vardata;
301 varstretchedKey; 299 varstretchedKey;
302 varfirstStretchedKeyIndex; 300 varfirstStretchedKeyIndex;
303 var i,c; 301 var i,c;
304 302
305 data = this.data(); 303 data = this.data();
306 stretchedKey = this.key().stretchedKey(); 304 stretchedKey = this.key().stretchedKey();
307 firstStretchedKeyIndex = aRoundNumber * (128/8); 305 firstStretchedKeyIndex = aRoundNumber * (128/8);
308 c = 128/8; 306 c = 128/8;
309 for (i=0; i<c; i++) { 307 for (i=0; i<c; i++) {
310 data[i] = data[i] ^ stretchedKey.byteAtIndex(firstStretchedKeyIndex + i); 308 data[i] = data[i] ^ stretchedKey.byteAtIndex(firstStretchedKeyIndex + i);
311 } 309 }
312 }, 310 },
313 311
314 //----------------------------------------------------------------------------- 312 //-----------------------------------------------------------------------------
315 313
316 'subBytes': function() { 314 'subBytes': function() {
317 // a non-linear substitution step where each byte is replaced with another according to a lookup table. 315 // a non-linear substitution step where each byte is replaced with another according to a lookup table.
318 var i,c; 316 var i,c;
319 vardata; 317 vardata;
320 var sbox; 318 var sbox;
321 319
322 data = this.data(); 320 data = this.data();
323 sbox = Clipperz.Crypto.AES.sbox(); 321 sbox = Clipperz.Crypto.AES.sbox();
324 322
325 c = 16; 323 c = 16;
326 for (i=0; i<c; i++) { 324 for (i=0; i<c; i++) {
327 data[i] = sbox[data[i]]; 325 data[i] = sbox[data[i]];
328 } 326 }
329 }, 327 },
330 328
331 //----------------------------------------------------------------------------- 329 //-----------------------------------------------------------------------------
332 330
333 'shiftRows': function() { 331 'shiftRows': function() {
334 //a transposition step where each row of the state is shifted cyclically a certain number of steps. 332 //a transposition step where each row of the state is shifted cyclically a certain number of steps.
335 varnewValue; 333 varnewValue;
336 vardata; 334 vardata;
337 varshiftMapping; 335 varshiftMapping;
338 vari,c; 336 vari,c;
339 337
340 newValue = new Array(16); 338 newValue = new Array(16);
341 data = this.data(); 339 data = this.data();
342 shiftMapping = Clipperz.Crypto.AES.shiftRowMapping(); 340 shiftMapping = Clipperz.Crypto.AES.shiftRowMapping();
343 // [0, 5, 10, 15, 4, 9, 14, 3, 8, 13, 2, 7, 12, 1, 6, 11]; 341 // [0, 5, 10, 15, 4, 9, 14, 3, 8, 13, 2, 7, 12, 1, 6, 11];
344 c = 16; 342 c = 16;
345 for (i=0; i<c; i++) { 343 for (i=0; i<c; i++) {
346 newValue[i] = data[shiftMapping[i]]; 344 newValue[i] = data[shiftMapping[i]];
347 } 345 }
348 for (i=0; i<c; i++) { 346 for (i=0; i<c; i++) {
349 data[i] = newValue[i]; 347 data[i] = newValue[i];
350 } 348 }
351 }, 349 },
352 350
353 //----------------------------------------------------------------------------- 351 //-----------------------------------------------------------------------------
354/* 352/*
355 'mixColumnsWithValues': function(someValues) { 353 'mixColumnsWithValues': function(someValues) {
356 varresult; 354 varresult;
357 vara; 355 vara;
358 var i,c; 356 var i,c;
359 357
360 c = 4; 358 c = 4;
361 result = []; 359 result = [];
362 a = []; 360 a = [];
363 for (i=0; i<c; i++) { 361 for (i=0; i<c; i++) {
364 a[i] = []; 362 a[i] = [];
365 a[i][1] = someValues[i] 363 a[i][1] = someValues[i]
366 if ((a[i][1] & 0x80) == 0x80) { 364 if ((a[i][1] & 0x80) == 0x80) {
367 a[i][2] = (a[i][1] << 1) ^ 0x11b; 365 a[i][2] = (a[i][1] << 1) ^ 0x11b;
368 } else { 366 } else {
369 a[i][2] = a[i][1] << 1; 367 a[i][2] = a[i][1] << 1;
370 } 368 }
371 369
372 a[i][3] = a[i][2] ^ a[i][1]; 370 a[i][3] = a[i][2] ^ a[i][1];
373 } 371 }
374 372
375 for (i=0; i<c; i++) { 373 for (i=0; i<c; i++) {
376 varx; 374 varx;
377 375
378 x = Clipperz.Crypto.AES.mixColumnsMatrix()[i]; 376 x = Clipperz.Crypto.AES.mixColumnsMatrix()[i];
379 result[i] = a[0][x[0]] ^ a[1][x[1]] ^ a[2][x[2]] ^ a[3][x[3]]; 377 result[i] = a[0][x[0]] ^ a[1][x[1]] ^ a[2][x[2]] ^ a[3][x[3]];
380 } 378 }
381 379
382 return result; 380 return result;
383 }, 381 },
384 382
385 'mixColumns': function() { 383 'mixColumns': function() {
386 //a mixing operation which operates on the columns of the state, combining the four bytes in each column using a linear transformation. 384 //a mixing operation which operates on the columns of the state, combining the four bytes in each column using a linear transformation.
387 var data; 385 var data;
388 var i, c; 386 var i, c;
389 387
390 data = this.data(); 388 data = this.data();
391 c = 4; 389 c = 4;
392 for(i=0; i<c; i++) { 390 for(i=0; i<c; i++) {
393 varblockIndex; 391 varblockIndex;
394 var mixedValues; 392 var mixedValues;
395 393
396 blockIndex = i * 4; 394 blockIndex = i * 4;
397 mixedValues = this.mixColumnsWithValues([data[blockIndex + 0], 395 mixedValues = this.mixColumnsWithValues([data[blockIndex + 0],
398 data[blockIndex + 1], 396 data[blockIndex + 1],
399 data[blockIndex + 2], 397 data[blockIndex + 2],
400 data[blockIndex + 3]]); 398 data[blockIndex + 3]]);
401 data[blockIndex + 0] = mixedValues[0]; 399 data[blockIndex + 0] = mixedValues[0];
402 data[blockIndex + 1] = mixedValues[1]; 400 data[blockIndex + 1] = mixedValues[1];
403 data[blockIndex + 2] = mixedValues[2]; 401 data[blockIndex + 2] = mixedValues[2];
404 data[blockIndex + 3] = mixedValues[3]; 402 data[blockIndex + 3] = mixedValues[3];
405 } 403 }
406 }, 404 },
diff --git a/frontend/beta/js/Clipperz/Crypto/Base.js b/frontend/beta/js/Clipperz/Crypto/Base.js
index d3a8e36..9acfc49 100644
--- a/frontend/beta/js/Clipperz/Crypto/Base.js
+++ b/frontend/beta/js/Clipperz/Crypto/Base.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26try { if (typeof(Clipperz.Base) == 'undefined') { throw ""; }} catch (e) { 24try { if (typeof(Clipperz.Base) == 'undefined') { throw ""; }} catch (e) {
27 throw "Clipperz.Crypto.Base depends on Clipperz.Base!"; 25 throw "Clipperz.Crypto.Base depends on Clipperz.Base!";
28} 26}
29 27
30if (typeof(Clipperz.Crypto) == 'undefined') { Clipperz.Crypto = {}; } 28if (typeof(Clipperz.Crypto) == 'undefined') { Clipperz.Crypto = {}; }
31if (typeof(Clipperz.Crypto.Base) == 'undefined') { Clipperz.Crypto.Base = {}; } 29if (typeof(Clipperz.Crypto.Base) == 'undefined') { Clipperz.Crypto.Base = {}; }
32 30
33Clipperz.Crypto.Base.VERSION = "0.1"; 31Clipperz.Crypto.Base.VERSION = "0.1";
34Clipperz.Crypto.Base.NAME = "Clipperz.Crypto.Base"; 32Clipperz.Crypto.Base.NAME = "Clipperz.Crypto.Base";
35 33
36//############################################################################# 34//#############################################################################
37 //Downloaded on March 30, 2006 from http://anmar.eu.org/projects/jssha2/files/jssha2-0.3.zip (jsSha2/sha256.js) 35 //Downloaded on March 30, 2006 from http://anmar.eu.org/projects/jssha2/files/jssha2-0.3.zip (jsSha2/sha256.js)
38//############################################################################# 36//#############################################################################
39 37
40/* A JavaScript implementation of the Secure Hash Algorithm, SHA-256 38/* A JavaScript implementation of the Secure Hash Algorithm, SHA-256
41 * Version 0.3 Copyright Angel Marin 2003-2004 - http://anmar.eu.org/ 39 * Version 0.3 Copyright Angel Marin 2003-2004 - http://anmar.eu.org/
42 * Distributed under the BSD License 40 * Distributed under the BSD License
43 * Some bits taken from Paul Johnston's SHA-1 implementation 41 * Some bits taken from Paul Johnston's SHA-1 implementation
44 */ 42 */
45var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */ 43var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */
46function safe_add (x, y) { 44function safe_add (x, y) {
47 var lsw = (x & 0xFFFF) + (y & 0xFFFF); 45 var lsw = (x & 0xFFFF) + (y & 0xFFFF);
48 var msw = (x >> 16) + (y >> 16) + (lsw >> 16); 46 var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
49 return (msw << 16) | (lsw & 0xFFFF); 47 return (msw << 16) | (lsw & 0xFFFF);
50} 48}
51function S (X, n) {return ( X >>> n ) | (X << (32 - n));} 49function S (X, n) {return ( X >>> n ) | (X << (32 - n));}
52function R (X, n) {return ( X >>> n );} 50function R (X, n) {return ( X >>> n );}
53function Ch(x, y, z) {return ((x & y) ^ ((~x) & z));} 51function Ch(x, y, z) {return ((x & y) ^ ((~x) & z));}
54function Maj(x, y, z) {return ((x & y) ^ (x & z) ^ (y & z));} 52function Maj(x, y, z) {return ((x & y) ^ (x & z) ^ (y & z));}
55function Sigma0256(x) {return (S(x, 2) ^ S(x, 13) ^ S(x, 22));} 53function Sigma0256(x) {return (S(x, 2) ^ S(x, 13) ^ S(x, 22));}
56function Sigma1256(x) {return (S(x, 6) ^ S(x, 11) ^ S(x, 25));} 54function Sigma1256(x) {return (S(x, 6) ^ S(x, 11) ^ S(x, 25));}
57function Gamma0256(x) {return (S(x, 7) ^ S(x, 18) ^ R(x, 3));} 55function Gamma0256(x) {return (S(x, 7) ^ S(x, 18) ^ R(x, 3));}
58function Gamma1256(x) {return (S(x, 17) ^ S(x, 19) ^ R(x, 10));} 56function Gamma1256(x) {return (S(x, 17) ^ S(x, 19) ^ R(x, 10));}
59function core_sha256 (m, l) { 57function core_sha256 (m, l) {
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); 58 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);
61 var HASH = new Array(0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19); 59 var HASH = new Array(0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19);
62 var W = new Array(64); 60 var W = new Array(64);
63 var a, b, c, d, e, f, g, h, i, j; 61 var a, b, c, d, e, f, g, h, i, j;
64 var T1, T2; 62 var T1, T2;
65 /* append padding */ 63 /* append padding */
66 m[l >> 5] |= 0x80 << (24 - l % 32); 64 m[l >> 5] |= 0x80 << (24 - l % 32);
67 m[((l + 64 >> 9) << 4) + 15] = l; 65 m[((l + 64 >> 9) << 4) + 15] = l;
68 for ( var i = 0; i<m.length; i+=16 ) { 66 for ( var i = 0; i<m.length; i+=16 ) {
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]; 67 a = HASH[0]; b = HASH[1]; c = HASH[2]; d = HASH[3]; e = HASH[4]; f = HASH[5]; g = HASH[6]; h = HASH[7];
70 for ( var j = 0; j<64; j++) { 68 for ( var j = 0; j<64; j++) {
71 if (j < 16) W[j] = m[j + i]; 69 if (j < 16) W[j] = m[j + i];
72 else W[j] = safe_add(safe_add(safe_add(Gamma1256(W[j - 2]), W[j - 7]), Gamma0256(W[j - 15])), W[j - 16]); 70 else W[j] = safe_add(safe_add(safe_add(Gamma1256(W[j - 2]), W[j - 7]), Gamma0256(W[j - 15])), W[j - 16]);
73 T1 = safe_add(safe_add(safe_add(safe_add(h, Sigma1256(e)), Ch(e, f, g)), K[j]), W[j]); 71 T1 = safe_add(safe_add(safe_add(safe_add(h, Sigma1256(e)), Ch(e, f, g)), K[j]), W[j]);
74 T2 = safe_add(Sigma0256(a), Maj(a, b, c)); 72 T2 = safe_add(Sigma0256(a), Maj(a, b, c));
75 h = g; g = f; f = e; e = safe_add(d, T1); d = c; c = b; b = a; a = safe_add(T1, T2); 73 h = g; g = f; f = e; e = safe_add(d, T1); d = c; c = b; b = a; a = safe_add(T1, T2);
76 } 74 }
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]); 75 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]);
78 } 76 }
79 return HASH; 77 return HASH;
80} 78}
81function str2binb (str) { 79function str2binb (str) {
82 var bin = Array(); 80 var bin = Array();
83 var mask = (1 << chrsz) - 1; 81 var mask = (1 << chrsz) - 1;
84 for(var i = 0; i < str.length * chrsz; i += chrsz) 82 for(var i = 0; i < str.length * chrsz; i += chrsz)
85 bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (24 - i%32); 83 bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (24 - i%32);
86 return bin; 84 return bin;
87} 85}
88function binb2hex (binarray) { 86function binb2hex (binarray) {
89 var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */ 87 var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */
90 var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; 88 var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
91 var str = ""; 89 var str = "";
92 for (var i = 0; i < binarray.length * 4; i++) { 90 for (var i = 0; i < binarray.length * 4; i++) {
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); 91 str += hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8+4)) & 0xF) + hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8 )) & 0xF);
94 } 92 }
95 return str; 93 return str;
96} 94}
97function hex_sha256(s){return binb2hex(core_sha256(str2binb(s),s.length * chrsz));} 95function hex_sha256(s){return binb2hex(core_sha256(str2binb(s),s.length * chrsz));}
98 96
99 97
100 98
101//############################################################################# 99//#############################################################################
102 //Downloaded on March 30, 2006 from http://www.fourmilab.ch/javascrypt/javascrypt.zip (entropy.js) 100 //Downloaded on March 30, 2006 from http://www.fourmilab.ch/javascrypt/javascrypt.zip (entropy.js)
103//############################################################################# 101//#############################################################################
104 102
105 // Entropy collection utilities 103 // Entropy collection utilities
106 104
107 /*Start by declaring static storage and initialise 105 /*Start by declaring static storage and initialise
108 the entropy vector from the time we come through 106 the entropy vector from the time we come through
109 here. */ 107 here. */
110 108
111 var entropyData = new Array(); // Collected entropy data 109 var entropyData = new Array(); // Collected entropy data
112 var edlen = 0; // Keyboard array data length 110 var edlen = 0; // Keyboard array data length
113 111
114 addEntropyTime(); // Start entropy collection with page load time 112 addEntropyTime(); // Start entropy collection with page load time
115 ce(); // Roll milliseconds into initial entropy 113 ce(); // Roll milliseconds into initial entropy
116 114
117 //Add a byte to the entropy vector 115 //Add a byte to the entropy vector
118 116
119 function addEntropyByte(b) { 117 function addEntropyByte(b) {
120 entropyData[edlen++] = b; 118 entropyData[edlen++] = b;
121 } 119 }
122 120
123 /*Capture entropy. When the user presses a key or performs 121 /*Capture entropy. When the user presses a key or performs
124 various other events for which we can request 122 various other events for which we can request
125 notification, add the time in 255ths of a second to the 123 notification, add the time in 255ths of a second to the
126 entropyData array. The name of the function is short 124 entropyData array. The name of the function is short
127 so it doesn't bloat the form object declarations in 125 so it doesn't bloat the form object declarations in
128 which it appears in various "onXXX" events. */ 126 which it appears in various "onXXX" events. */
129 127
130 function ce() { 128 function ce() {
131 addEntropyByte(Math.floor((((new Date).getMilliseconds()) * 255) / 999)); 129 addEntropyByte(Math.floor((((new Date).getMilliseconds()) * 255) / 999));
132 } 130 }
133 131
134 //Add a 32 bit quantity to the entropy vector 132 //Add a 32 bit quantity to the entropy vector
135 133
136 function addEntropy32(w) { 134 function addEntropy32(w) {
137 var i; 135 var i;
138 136
139 for (i = 0; i < 4; i++) { 137 for (i = 0; i < 4; i++) {
140 addEntropyByte(w & 0xFF); 138 addEntropyByte(w & 0xFF);
141 w >>= 8; 139 w >>= 8;
142 } 140 }
143 } 141 }
144 142
145 /*Add the current time and date (milliseconds since the epoch, 143 /*Add the current time and date (milliseconds since the epoch,
146 truncated to 32 bits) to the entropy vector. */ 144 truncated to 32 bits) to the entropy vector. */
147 145
148 function addEntropyTime() { 146 function addEntropyTime() {
149 addEntropy32((new Date()).getTime()); 147 addEntropy32((new Date()).getTime());
150 } 148 }
151 149
152 /* Start collection of entropy from mouse movements. The 150 /* Start collection of entropy from mouse movements. The
153 argument specifies the number of entropy items to be 151 argument specifies the number of entropy items to be
154 obtained from mouse motion, after which mouse motion 152 obtained from mouse motion, after which mouse motion
155 will be ignored. Note that you can re-enable mouse 153 will be ignored. Note that you can re-enable mouse
156 motion collection at any time if not already underway. */ 154 motion collection at any time if not already underway. */
157 155
158 var mouseMotionCollect = 0; 156 var mouseMotionCollect = 0;
159 var oldMoveHandler; // For saving and restoring mouse move handler in IE4 157 var oldMoveHandler; // For saving and restoring mouse move handler in IE4
160 158
161 function mouseMotionEntropy(maxsamp) { 159 function mouseMotionEntropy(maxsamp) {
162 if (mouseMotionCollect <= 0) { 160 if (mouseMotionCollect <= 0) {
163 mouseMotionCollect = maxsamp; 161 mouseMotionCollect = maxsamp;
164 if ((document.implementation.hasFeature("Events", "2.0")) && 162 if ((document.implementation.hasFeature("Events", "2.0")) &&
165 document.addEventListener) { 163 document.addEventListener) {
166 // Browser supports Document Object Model (DOM) 2 events 164 // Browser supports Document Object Model (DOM) 2 events
167 document.addEventListener("mousemove", mouseMoveEntropy, false); 165 document.addEventListener("mousemove", mouseMoveEntropy, false);
168 } else { 166 } else {
169 if (document.attachEvent) { 167 if (document.attachEvent) {
170 // Internet Explorer 5 and above event model 168 // Internet Explorer 5 and above event model
171 document.attachEvent("onmousemove", mouseMoveEntropy); 169 document.attachEvent("onmousemove", mouseMoveEntropy);
172 } else { 170 } else {
173 //Internet Explorer 4 event model 171 //Internet Explorer 4 event model
174 oldMoveHandler = document.onmousemove; 172 oldMoveHandler = document.onmousemove;
175 document.onmousemove = mouseMoveEntropy; 173 document.onmousemove = mouseMoveEntropy;
176 } 174 }
177 } 175 }
178//dump("Mouse enable", mouseMotionCollect); 176//dump("Mouse enable", mouseMotionCollect);
179 } 177 }
180 } 178 }
181 179
182 /*Collect entropy from mouse motion events. Note that 180 /*Collect entropy from mouse motion events. Note that
183 this is craftily coded to work with either DOM2 or Internet 181 this is craftily coded to work with either DOM2 or Internet
184 Explorer style events. Note that we don't use every successive 182 Explorer style events. Note that we don't use every successive
185 mouse movement event. Instead, we XOR the three bytes collected 183 mouse movement event. Instead, we XOR the three bytes collected
186 from the mouse and use that to determine how many subsequent 184 from the mouse and use that to determine how many subsequent
187 mouse movements we ignore before capturing the next one. */ 185 mouse movements we ignore before capturing the next one. */
188 186
189 var mouseEntropyTime = 0; // Delay counter for mouse entropy collection 187 var mouseEntropyTime = 0; // Delay counter for mouse entropy collection
190 188
191 function mouseMoveEntropy(e) { 189 function mouseMoveEntropy(e) {
192 if (!e) { 190 if (!e) {
193 e = window.event; // Internet Explorer event model 191 e = window.event; // Internet Explorer event model
194 } 192 }
195 if (mouseMotionCollect > 0) { 193 if (mouseMotionCollect > 0) {
196 if (mouseEntropyTime-- <= 0) { 194 if (mouseEntropyTime-- <= 0) {
197 addEntropyByte(e.screenX & 0xFF); 195 addEntropyByte(e.screenX & 0xFF);
198 addEntropyByte(e.screenY & 0xFF); 196 addEntropyByte(e.screenY & 0xFF);
199 ce(); 197 ce();
200 mouseMotionCollect--; 198 mouseMotionCollect--;
201 mouseEntropyTime = (entropyData[edlen - 3] ^ entropyData[edlen - 2] ^ 199 mouseEntropyTime = (entropyData[edlen - 3] ^ entropyData[edlen - 2] ^
202 entropyData[edlen - 1]) % 19; 200 entropyData[edlen - 1]) % 19;
203//dump("Mouse Move", byteArrayToHex(entropyData.slice(-3))); 201//dump("Mouse Move", byteArrayToHex(entropyData.slice(-3)));
204 } 202 }
205 if (mouseMotionCollect <= 0) { 203 if (mouseMotionCollect <= 0) {
206 if (document.removeEventListener) { 204 if (document.removeEventListener) {
207 document.removeEventListener("mousemove", mouseMoveEntropy, false); 205 document.removeEventListener("mousemove", mouseMoveEntropy, false);
208 } else if (document.detachEvent) { 206 } else if (document.detachEvent) {
209 document.detachEvent("onmousemove", mouseMoveEntropy); 207 document.detachEvent("onmousemove", mouseMoveEntropy);
210 } else { 208 } else {
211 document.onmousemove = oldMoveHandler; 209 document.onmousemove = oldMoveHandler;
212 } 210 }
213//dump("Spung!", 0); 211//dump("Spung!", 0);
214 } 212 }
215 } 213 }
216 } 214 }
217 215
218 /*Compute a 32 byte key value from the entropy vector. 216 /*Compute a 32 byte key value from the entropy vector.
219 We compute the value by taking the MD5 sum of the even 217 We compute the value by taking the MD5 sum of the even
220 and odd bytes respectively of the entropy vector, then 218 and odd bytes respectively of the entropy vector, then
221 concatenating the two MD5 sums. */ 219 concatenating the two MD5 sums. */
222 220
223 function keyFromEntropy() { 221 function keyFromEntropy() {
224 var i, k = new Array(32); 222 var i, k = new Array(32);
225 223
226 if (edlen == 0) { 224 if (edlen == 0) {
227 alert("Blooie! Entropy vector void at call to keyFromEntropy."); 225 alert("Blooie! Entropy vector void at call to keyFromEntropy.");
228 } 226 }
229//dump("Entropy bytes", edlen); 227//dump("Entropy bytes", edlen);
230 228
231 md5_init(); 229 md5_init();
232 for (i = 0; i < edlen; i += 2) { 230 for (i = 0; i < edlen; i += 2) {
233 md5_update(entropyData[i]); 231 md5_update(entropyData[i]);
234 } 232 }
235 md5_finish(); 233 md5_finish();
236 for (i = 0; i < 16; i++) { 234 for (i = 0; i < 16; i++) {
237 k[i] = digestBits[i]; 235 k[i] = digestBits[i];
238 } 236 }
239 237
240 md5_init(); 238 md5_init();
241 for (i = 1; i < edlen; i += 2) { 239 for (i = 1; i < edlen; i += 2) {
242 md5_update(entropyData[i]); 240 md5_update(entropyData[i]);
243 } 241 }
244 md5_finish(); 242 md5_finish();
245 for (i = 0; i < 16; i++) { 243 for (i = 0; i < 16; i++) {
246 k[i + 16] = digestBits[i]; 244 k[i + 16] = digestBits[i];
247 } 245 }
248 246
249//dump("keyFromEntropy", byteArrayToHex(k)); 247//dump("keyFromEntropy", byteArrayToHex(k));
250 return k; 248 return k;
251 } 249 }
252 250
253//############################################################################# 251//#############################################################################
254 //Downloaded on March 30, 2006 from http://www.fourmilab.ch/javascrypt/javascrypt.zip (aesprng.js) 252 //Downloaded on March 30, 2006 from http://www.fourmilab.ch/javascrypt/javascrypt.zip (aesprng.js)
255//############################################################################# 253//#############################################################################
256 254
257 255
258 // AES based pseudorandom number generator 256 // AES based pseudorandom number generator
259 257
260 /* Constructor. Called with an array of 32 byte (0-255) values 258 /* Constructor. Called with an array of 32 byte (0-255) values
261 containing the initial seed. */ 259 containing the initial seed. */
262 260
263 function AESprng(seed) { 261 function AESprng(seed) {
264 this.key = new Array(); 262 this.key = new Array();
265 this.key = seed; 263 this.key = seed;
266 this.itext = hexToByteArray("9F489613248148F9C27945C6AE62EECA3E3367BB14064E4E6DC67A9F28AB3BD1"); 264 this.itext = hexToByteArray("9F489613248148F9C27945C6AE62EECA3E3367BB14064E4E6DC67A9F28AB3BD1");
267 this.nbytes = 0; // Bytes left in buffer 265 this.nbytes = 0; // Bytes left in buffer
268 266
269 this.next = AESprng_next; 267 this.next = AESprng_next;
270 this.nextbits = AESprng_nextbits; 268 this.nextbits = AESprng_nextbits;
271 this.nextInt = AESprng_nextInt; 269 this.nextInt = AESprng_nextInt;
272 this.round = AESprng_round; 270 this.round = AESprng_round;
273 271
274 /* Encrypt the initial text with the seed key 272 /* Encrypt the initial text with the seed key
275 three times, feeding the output of the encryption 273 three times, feeding the output of the encryption
276 back into the key for the next round. */ 274 back into the key for the next round. */
277 275
278 bsb = blockSizeInBits; 276 bsb = blockSizeInBits;
279 blockSizeInBits = 256; 277 blockSizeInBits = 256;
280 var i, ct; 278 var i, ct;
281 for (i = 0; i < 3; i++) { 279 for (i = 0; i < 3; i++) {
282 this.key = rijndaelEncrypt(this.itext, this.key, "ECB"); 280 this.key = rijndaelEncrypt(this.itext, this.key, "ECB");
283 } 281 }
284 282
285 /* Now make between one and four additional 283 /* Now make between one and four additional
286 key-feedback rounds, with the number determined 284 key-feedback rounds, with the number determined
287 by bits from the result of the first three 285 by bits from the result of the first three
288 rounds. */ 286 rounds. */
289 287
290 var n = 1 + (this.key[3] & 2) + (this.key[9] & 1); 288 var n = 1 + (this.key[3] & 2) + (this.key[9] & 1);
291 for (i = 0; i < n; i++) { 289 for (i = 0; i < n; i++) {
292 this.key = rijndaelEncrypt(this.itext, this.key, "ECB"); 290 this.key = rijndaelEncrypt(this.itext, this.key, "ECB");
293 } 291 }
294 blockSizeInBits = bsb; 292 blockSizeInBits = bsb;
295 } 293 }
296 294
297 function AESprng_round() { 295 function AESprng_round() {
298 bsb = blockSizeInBits; 296 bsb = blockSizeInBits;
299 blockSizeInBits = 256; 297 blockSizeInBits = 256;
300 this.key = rijndaelEncrypt(this.itext, this.key, "ECB"); 298 this.key = rijndaelEncrypt(this.itext, this.key, "ECB");
301 this.nbytes = 32; 299 this.nbytes = 32;
302 blockSizeInBits = bsb; 300 blockSizeInBits = bsb;
303 } 301 }
304 302
305 //Return next byte from the generator 303 //Return next byte from the generator
306 304
307 function AESprng_next() { 305 function AESprng_next() {
308 if (this.nbytes <= 0) { 306 if (this.nbytes <= 0) {
309 this.round(); 307 this.round();
310 } 308 }
311 return(this.key[--this.nbytes]); 309 return(this.key[--this.nbytes]);
312 } 310 }
313 311
314 //Return n bit integer value (up to maximum integer size) 312 //Return n bit integer value (up to maximum integer size)
315 313
316 function AESprng_nextbits(n) { 314 function AESprng_nextbits(n) {
317 var i, w = 0, nbytes = Math.floor((n + 7) / 8); 315 var i, w = 0, nbytes = Math.floor((n + 7) / 8);
318 316
319 for (i = 0; i < nbytes; i++) { 317 for (i = 0; i < nbytes; i++) {
320 w = (w << 8) | this.next(); 318 w = (w << 8) | this.next();
321 } 319 }
322 return w & ((1 << n) - 1); 320 return w & ((1 << n) - 1);
323 } 321 }
324 322
325 // Return integer between 0 and n inclusive 323 // Return integer between 0 and n inclusive
326 324
327 function AESprng_nextInt(n) { 325 function AESprng_nextInt(n) {
328 var p = 1, nb = 0; 326 var p = 1, nb = 0;
329 327
330 // Determine smallest p, 2^p > n 328 // Determine smallest p, 2^p > n
331 // nb = log_2 p 329 // nb = log_2 p
332 330
333 while (n >= p) { 331 while (n >= p) {
334 p <<= 1; 332 p <<= 1;
335 nb++; 333 nb++;
336 } 334 }
337 p--; 335 p--;
338 336
339 /* Generate values from 0 through n by first generating 337 /* Generate values from 0 through n by first generating
340 values v from 0 to (2^p)-1, then discarding any results v > n. 338 values v from 0 to (2^p)-1, then discarding any results v > n.
341 For the rationale behind this (and why taking 339 For the rationale behind this (and why taking
342 values mod (n + 1) is biased toward smaller values, see 340 values mod (n + 1) is biased toward smaller values, see
343 Ferguson and Schneier, "Practical Cryptography", 341 Ferguson and Schneier, "Practical Cryptography",
344 ISBN 0-471-22357-3, section 10.8). */ 342 ISBN 0-471-22357-3, section 10.8). */
345 343
346 while (true) { 344 while (true) {
347 var v = this.nextbits(nb) & p; 345 var v = this.nextbits(nb) & p;
348 346
349 if (v <= n) { 347 if (v <= n) {
350 return v; 348 return v;
351 } 349 }
352 } 350 }
353 } 351 }
354 352
355//############################################################################# 353//#############################################################################
356 //Downloaded on March 30, 2006 from http://www.fourmilab.ch/javascrypt/javascrypt.zip (md5.js) 354 //Downloaded on March 30, 2006 from http://www.fourmilab.ch/javascrypt/javascrypt.zip (md5.js)
357//############################################################################# 355//#############################################################################
358 356
359/* 357/*
360 * md5.jvs 1.0b 27/06/96 358 * md5.jvs 1.0b 27/06/96
361 * 359 *
362 * Javascript implementation of the RSA Data Security, Inc. MD5 360 * Javascript implementation of the RSA Data Security, Inc. MD5
363 * Message-Digest Algorithm. 361 * Message-Digest Algorithm.
364 * 362 *
365 * Copyright (c) 1996 Henri Torgemane. All Rights Reserved. 363 * Copyright (c) 1996 Henri Torgemane. All Rights Reserved.
366 * 364 *
367 * Permission to use, copy, modify, and distribute this software 365 * Permission to use, copy, modify, and distribute this software
368 * and its documentation for any purposes and without 366 * and its documentation for any purposes and without
369 * fee is hereby granted provided that this copyright notice 367 * fee is hereby granted provided that this copyright notice
370 * appears in all copies. 368 * appears in all copies.
371 * 369 *
372 * Of course, this soft is provided "as is" without express or implied 370 * Of course, this soft is provided "as is" without express or implied
373 * warranty of any kind. 371 * warranty of any kind.
374 372
375 This version contains some trivial reformatting modifications 373 This version contains some trivial reformatting modifications
376 by John Walker. 374 by John Walker.
377 375
378 */ 376 */
379 377
380function array(n) { 378function array(n) {
381 for (i = 0; i < n; i++) { 379 for (i = 0; i < n; i++) {
382 this[i] = 0; 380 this[i] = 0;
383 } 381 }
384 this.length = n; 382 this.length = n;
385} 383}
386 384
387/* Some basic logical functions had to be rewritten because of a bug in 385/* Some basic logical functions had to be rewritten because of a bug in
388 * Javascript.. Just try to compute 0xffffffff >> 4 with it.. 386 * Javascript.. Just try to compute 0xffffffff >> 4 with it..
389 * Of course, these functions are slower than the original would be, but 387 * Of course, these functions are slower than the original would be, but
390 * at least, they work! 388 * at least, they work!
391 */ 389 */
392 390
393function integer(n) { 391function integer(n) {
394 return n % (0xffffffff + 1); 392 return n % (0xffffffff + 1);
395} 393}
396 394
397function shr(a, b) { 395function shr(a, b) {
398 a = integer(a); 396 a = integer(a);
399 b = integer(b); 397 b = integer(b);
400 if (a - 0x80000000 >= 0) { 398 if (a - 0x80000000 >= 0) {
401 a = a % 0x80000000; 399 a = a % 0x80000000;
402 a >>= b; 400 a >>= b;
403 a += 0x40000000 >> (b - 1); 401 a += 0x40000000 >> (b - 1);
404 } else { 402 } else {
405 a >>= b; 403 a >>= b;
406 } 404 }
diff --git a/frontend/beta/js/Clipperz/Crypto/BigInt.js b/frontend/beta/js/Clipperz/Crypto/BigInt.js
index 41483a3..197cd9a 100644
--- a/frontend/beta/js/Clipperz/Crypto/BigInt.js
+++ b/frontend/beta/js/Clipperz/Crypto/BigInt.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.Crypto) == 'undefined') { Clipperz.Crypto = {}; } 25if (typeof(Clipperz.Crypto) == 'undefined') { Clipperz.Crypto = {}; }
28 26
29//############################################################################# 27//#############################################################################
30 //Downloaded on March 05, 2007 from http://www.leemon.com/crypto/BigInt.js 28 //Downloaded on March 05, 2007 from http://www.leemon.com/crypto/BigInt.js
31//############################################################################# 29//#############################################################################
32 30
33 31
34//////////////////////////////////////////////////////////////////////////////////////// 32////////////////////////////////////////////////////////////////////////////////////////
35// Big Integer Library v. 5.0 33// Big Integer Library v. 5.0
36// Created 2000, last modified 2006 34// Created 2000, last modified 2006
37// Leemon Baird 35// Leemon Baird
38// www.leemon.com 36// www.leemon.com
39// 37//
40// This file is public domain. You can use it for any purpose without restriction. 38// This file is public domain. You can use it for any purpose without restriction.
41// I do not guarantee that it is correct, so use it at your own risk. If you use 39// I do not guarantee that it is correct, so use it at your own risk. If you use
42// it for something interesting, I'd appreciate hearing about it. If you find 40// it for something interesting, I'd appreciate hearing about it. If you find
43// any bugs or make any improvements, I'd appreciate hearing about those too. 41// any bugs or make any improvements, I'd appreciate hearing about those too.
44// It would also be nice if my name and address were left in the comments. 42// It would also be nice if my name and address were left in the comments.
45// But none of that is required. 43// But none of that is required.
46// 44//
47// This code defines a bigInt library for arbitrary-precision integers. 45// This code defines a bigInt library for arbitrary-precision integers.
48// A bigInt is an array of integers storing the value in chunks of bpe bits, 46// A bigInt is an array of integers storing the value in chunks of bpe bits,
49// little endian (buff[0] is the least significant word). 47// little endian (buff[0] is the least significant word).
50// Negative bigInts are stored two's complement. 48// Negative bigInts are stored two's complement.
51// Some functions assume their parameters have at least one leading zero element. 49// Some functions assume their parameters have at least one leading zero element.
52// Functions with an underscore at the end of the name have unpredictable behavior in case of overflow, 50// Functions with an underscore at the end of the name have unpredictable behavior in case of overflow,
53// so the caller must make sure overflow won't happen. 51// so the caller must make sure overflow won't happen.
54// For each function where a parameter is modified, that same 52// For each function where a parameter is modified, that same
55// variable must not be used as another argument too. 53// variable must not be used as another argument too.
56// So, you cannot square x by doing multMod_(x,x,n). 54// So, you cannot square x by doing multMod_(x,x,n).
57// You must use squareMod_(x,n) instead, or do y=dup(x); multMod_(x,y,n). 55// You must use squareMod_(x,n) instead, or do y=dup(x); multMod_(x,y,n).
58// 56//
59// These functions are designed to avoid frequent dynamic memory allocation in the inner loop. 57// These functions are designed to avoid frequent dynamic memory allocation in the inner loop.
60// For most functions, if it needs a BigInt as a local variable it will actually use 58// For most functions, if it needs a BigInt as a local variable it will actually use
61// a global, and will only allocate to it when it's not the right size. This ensures 59// a global, and will only allocate to it when it's not the right size. This ensures
62// that when a function is called repeatedly with same-sized parameters, it only allocates 60// that when a function is called repeatedly with same-sized parameters, it only allocates
63// memory on the first call. 61// memory on the first call.
64// 62//
65// Note that for cryptographic purposes, the calls to Math.random() must 63// Note that for cryptographic purposes, the calls to Math.random() must
66// be replaced with calls to a better pseudorandom number generator. 64// be replaced with calls to a better pseudorandom number generator.
67// 65//
68// In the following, "bigInt" means a bigInt with at least one leading zero element, 66// In the following, "bigInt" means a bigInt with at least one leading zero element,
69// and "integer" means a nonnegative integer less than radix. In some cases, integer 67// and "integer" means a nonnegative integer less than radix. In some cases, integer
70// can be negative. Negative bigInts are 2s complement. 68// can be negative. Negative bigInts are 2s complement.
71// 69//
72// The following functions do not modify their inputs, but dynamically allocate memory every time they are called: 70// The following functions do not modify their inputs, but dynamically allocate memory every time they are called:
73// 71//
74// function bigInt2str(x,base) //convert a bigInt into a string in a given base, from base 2 up to base 95 72// function bigInt2str(x,base) //convert a bigInt into a string in a given base, from base 2 up to base 95
75// function dup(x) //returns a copy of bigInt x 73// function dup(x) //returns a copy of bigInt x
76// function findPrimes(n) //return array of all primes less than integer n 74// function findPrimes(n) //return array of all primes less than integer n
77// function int2bigInt(t,n,m) //convert integer t to a bigInt with at least n bits and m array elements 75// function int2bigInt(t,n,m) //convert integer t 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 76// function int2bigInt(s,b,n,m) //convert string s in base b to a bigInt with at least n bits and m array elements
79// function trim(x,k) //return a copy of x with exactly k leading zero elements 77// function trim(x,k) //return a copy of x with exactly k leading zero elements
80// 78//
81// The following functions do not modify their inputs, so there is never a problem with the result being too big: 79// The following functions do not modify their inputs, so there is never a problem with the result being too big:
82// 80//
83// function bitSize(x) //returns how many bits long the bigInt x is, not counting leading zeros 81// function bitSize(x) //returns how many bits long the bigInt x is, not counting leading zeros
84// function equals(x,y) //is the bigInt x equal to the bigint y? 82// function equals(x,y) //is the bigInt x equal to the bigint y?
85// function equalsInt(x,y) //is bigint x equal to integer y? 83// function equalsInt(x,y) //is bigint x equal to integer y?
86// function greater(x,y) //is x>y? (x and y are nonnegative bigInts) 84// function greater(x,y) //is x>y? (x and y are nonnegative bigInts)
87// function greaterShift(x,y,shift)//is (x <<(shift*bpe)) > y? 85// function greaterShift(x,y,shift)//is (x <<(shift*bpe)) > y?
88// function isZero(x) //is the bigInt x equal to zero? 86// function isZero(x) //is the bigInt x equal to zero?
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)? 87// 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)?
90// function modInt(x,n) //return x mod n for bigInt x and integer n. 88// function modInt(x,n) //return x mod n for bigInt x and integer n.
91// function negative(x) //is bigInt x negative? 89// function negative(x) //is bigInt x negative?
92// 90//
93// The following functions do not modify their inputs, but allocate memory and call functions with underscores 91// The following functions do not modify their inputs, but allocate memory and call functions with underscores
94// 92//
95// function add(x,y) //return (x+y) for bigInts x and y. 93// function add(x,y) //return (x+y) for bigInts x and y.
96// function addInt(x,n) //return (x+n) where x is a bigInt and n is an integer. 94// function addInt(x,n) //return (x+n) where x is a bigInt and n is an integer.
97// function expand(x,n) //return a copy of x with at least n elements, adding leading zeros if needed 95// function expand(x,n) //return a copy of x with at least n elements, adding leading zeros if needed
98// function inverseMod(x,n) //return (x**(-1) mod n) for bigInts x and n. If no inverse exists, it returns null 96// function inverseMod(x,n) //return (x**(-1) mod n) for bigInts x and n. If no inverse exists, it returns null
99// function mod(x,n) //return a new bigInt equal to (x mod n) for bigInts x and n. 97// function mod(x,n) //return a new bigInt equal to (x mod n) for bigInts x and n.
100// function mult(x,y) //return x*y for bigInts x and y. This is faster when y<x. 98// function mult(x,y) //return x*y for bigInts x and y. This is faster when y<x.
101// function multMod(x,y,n) //return (x*y mod n) for bigInts x,y,n. For greater speed, let y<x. 99// function multMod(x,y,n) //return (x*y mod n) for bigInts x,y,n. For greater speed, let y<x.
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. 100// 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.
103// function randTruePrime(k) //return a new, random, k-bit, true prime using Maurer's algorithm. 101// function randTruePrime(k) //return a new, random, k-bit, true prime using Maurer's algorithm.
104// function sub(x,y) //return (x-y) for bigInts x and y. Negative answers will be 2s complement 102// function sub(x,y) //return (x-y) for bigInts x and y. Negative answers will be 2s complement
105// 103//
106// The following functions write a bigInt result to one of the parameters, but 104// The following functions write a bigInt result to one of the parameters, but
107// the result is never bigger than the original, so there can't be overflow problems: 105// the result is never bigger than the original, so there can't be overflow problems:
108// 106//
109// function divInt_(x,n) //do x=floor(x/n) for bigInt x and integer n, and return the remainder 107// function divInt_(x,n) //do x=floor(x/n) for bigInt x and integer n, and return the remainder
110// function GCD_(x,y) //set x to the greatest common divisor of bigInts x and y, (y is destroyed). 108// function GCD_(x,y) //set x to the greatest common divisor of bigInts x and y, (y is destroyed).
111// function halve_(x) //do x=floor(|x|/2)*sgn(x) for bigInt x in 2's complement 109// function halve_(x) //do x=floor(|x|/2)*sgn(x) for bigInt x in 2's complement
112// function mod_(x,n) //do x=x mod n for bigInts x and n. 110// function mod_(x,n) //do x=x mod n for bigInts x and n.
113// function rightShift_(x,n) //right shift bigInt x by n bits. 0 <= n < bpe. 111// function rightShift_(x,n) //right shift bigInt x by n bits. 0 <= n < bpe.
114// 112//
115// The following functions write a bigInt result to one of the parameters. The caller is responsible for 113// The following functions write a bigInt result to one of the parameters. The caller is responsible for
116// ensuring it is large enough to hold the result. 114// ensuring it is large enough to hold the result.
117// 115//
118// function addInt_(x,n) //do x=x+n where x is a bigInt and n is an integer 116// function addInt_(x,n) //do x=x+n where x is a bigInt and n is an integer
119// function add_(x,y) //do x=x+y for bigInts x and y 117// function add_(x,y) //do x=x+y for bigInts x and y
120// function addShift_(x,y,ys) //do x=x+(y<<(ys*bpe)) 118// function addShift_(x,y,ys) //do x=x+(y<<(ys*bpe))
121// function copy_(x,y) //do x=y on bigInts x and y 119// function copy_(x,y) //do x=y on bigInts x and y
122// function copyInt_(x,n) //do x=n on bigInt x and integer n 120// function copyInt_(x,n) //do x=n on bigInt x and integer n
123// function carry_(x) //do carries and borrows so each element of the bigInt x fits in bpe bits. 121// function carry_(x) //do carries and borrows so each element of the bigInt x fits in bpe bits.
124// function divide_(x,y,q,r) //divide_ x by y giving quotient q and remainder r 122// function divide_(x,y,q,r) //divide_ x by y giving quotient q and remainder r
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 123// 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
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 124// function inverseMod_(x,n) //do x=x**(-1) mod n, for bigInts x and n. Returns 1 (0) if inverse does (doesn't) exist
127// function inverseModInt_(x,n) //return x**(-1) mod n, for integers x and n. Return 0 if there is no inverse 125// function inverseModInt_(x,n) //return x**(-1) mod n, for integers x and n. Return 0 if there is no inverse
128// function leftShift_(x,n) //left shift bigInt x by n bits. n<bpe. 126// function leftShift_(x,n) //left shift bigInt x by n bits. n<bpe.
129// function linComb_(x,y,a,b) //do x=a*x+b*y for bigInts x and y and integers a and b 127// function linComb_(x,y,a,b) //do x=a*x+b*y for bigInts x and y and integers a and b
130// function linCombShift_(x,y,b,ys) //do x=x+b*(y<<(ys*bpe)) for bigInts x and y, and integers b and ys 128// function linCombShift_(x,y,b,ys) //do x=x+b*(y<<(ys*bpe)) for bigInts x and y, and integers b and ys
131// function mont_(x,y,n,np) //Montgomery multiplication (see comments where the function is defined) 129// function mont_(x,y,n,np) //Montgomery multiplication (see comments where the function is defined)
132// function mult_(x,y) //do x=x*y for bigInts x and y. 130// function mult_(x,y) //do x=x*y for bigInts x and y.
133// function multInt_(x,n) //do x=x*n where x is a bigInt and n is an integer. 131// function multInt_(x,n) //do x=x*n where x is a bigInt and n is an integer.
134// function multMod_(x,y,n) //do x=x*y mod n for bigInts x,y,n. 132// function multMod_(x,y,n) //do x=x*y mod n for bigInts x,y,n.
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. 133// 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.
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. 134// 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.
137// function randTruePrime_(ans,k) //do ans = a random k-bit true random prime (not just probable prime) with 1 in the msb. 135// function randTruePrime_(ans,k) //do ans = a random k-bit true random prime (not just probable prime) with 1 in the msb.
138// function squareMod_(x,n) //do x=x*x mod n for bigInts x,n 136// function squareMod_(x,n) //do x=x*x mod n for bigInts x,n
139// function sub_(x,y) //do x=x-y for bigInts x and y. Negative answers will be 2s complement. 137// function sub_(x,y) //do x=x-y for bigInts x and y. Negative answers will be 2s complement.
140// function subShift_(x,y,ys) //do x=x-(y<<(ys*bpe)). Negative answers will be 2s complement. 138// function subShift_(x,y,ys) //do x=x-(y<<(ys*bpe)). Negative answers will be 2s complement.
141// 139//
142// The following functions are based on algorithms from the _Handbook of Applied Cryptography_ 140// The following functions are based on algorithms from the _Handbook of Applied Cryptography_
143// powMod_() = algorithm 14.94, Montgomery exponentiation 141// powMod_() = algorithm 14.94, Montgomery exponentiation
144// eGCD_,inverseMod_() = algorithm 14.61, Binary extended GCD_ 142// eGCD_,inverseMod_() = algorithm 14.61, Binary extended GCD_
145// GCD_() = algorothm 14.57, Lehmer's algorithm 143// GCD_() = algorothm 14.57, Lehmer's algorithm
146// mont_() = algorithm 14.36, Montgomery multiplication 144// mont_() = algorithm 14.36, Montgomery multiplication
147// divide_() = algorithm 14.20 Multiple-precision division 145// divide_() = algorithm 14.20 Multiple-precision division
148// squareMod_() = algorithm 14.16 Multiple-precision squaring 146// squareMod_() = algorithm 14.16 Multiple-precision squaring
149// randTruePrime_() = algorithm 4.62, Maurer's algorithm 147// randTruePrime_() = algorithm 4.62, Maurer's algorithm
150// millerRabin() = algorithm 4.24, Miller-Rabin algorithm 148// millerRabin() = algorithm 4.24, Miller-Rabin algorithm
151// 149//
152// Profiling shows: 150// Profiling shows:
153// randTruePrime_() spends: 151// randTruePrime_() spends:
154// 10% of its time in calls to powMod_() 152// 10% of its time in calls to powMod_()
155// 85% of its time in calls to millerRabin() 153// 85% of its time in calls to millerRabin()
156// millerRabin() spends: 154// millerRabin() spends:
157// 99% of its time in calls to powMod_() (always with a base of 2) 155// 99% of its time in calls to powMod_() (always with a base of 2)
158// powMod_() spends: 156// powMod_() spends:
159// 94% of its time in calls to mont_() (almost always with x==y) 157// 94% of its time in calls to mont_() (almost always with x==y)
160// 158//
161// This suggests there are several ways to speed up this library slightly: 159// This suggests there are several ways to speed up this library slightly:
162// - convert powMod_ to use a Montgomery form of k-ary window (or maybe a Montgomery form of sliding window) 160// - convert powMod_ to use a Montgomery form of k-ary window (or maybe a Montgomery form of sliding window)
163// -- this should especially focus on being fast when raising 2 to a power mod n 161// -- this should especially focus on being fast when raising 2 to a power mod n
164// - convert randTruePrime_() to use a minimum r of 1/3 instead of 1/2 with the appropriate change to the test 162// - convert randTruePrime_() to use a minimum r of 1/3 instead of 1/2 with the appropriate change to the test
165// - tune the parameters in randTruePrime_(), including c, m, and recLimit 163// - tune the parameters in randTruePrime_(), including c, m, and recLimit
166// - speed up the single loop in mont_() that takes 95% of the runtime, perhaps by reducing checking 164// - speed up the single loop in mont_() that takes 95% of the runtime, perhaps by reducing checking
167// within the loop when all the parameters are the same length. 165// within the loop when all the parameters are the same length.
168// 166//
169// There are several ideas that look like they wouldn't help much at all: 167// There are several ideas that look like they wouldn't help much at all:
170// - replacing trial division in randTruePrime_() with a sieve (that speeds up something taking almost no time anyway) 168// - replacing trial division in randTruePrime_() with a sieve (that speeds up something taking almost no time anyway)
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) 169// - 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)
172// - speeding up mont_(x,y,n,np) when x==y by doing a non-modular, non-Montgomery square 170// - speeding up mont_(x,y,n,np) when x==y by doing a non-modular, non-Montgomery square
173// followed by a Montgomery reduction. The intermediate answer will be twice as long as x, so that 171// followed by a Montgomery reduction. The intermediate answer will be twice as long as x, so that
174// method would be slower. This is unfortunate because the code currently spends almost all of its time 172// method would be slower. This is unfortunate because the code currently spends almost all of its time
175// doing mont_(x,x,...), both for randTruePrime_() and powMod_(). A faster method for Montgomery squaring 173// doing mont_(x,x,...), both for randTruePrime_() and powMod_(). A faster method for Montgomery squaring
176// would have a large impact on the speed of randTruePrime_() and powMod_(). HAC has a couple of poorly-worded 174// would have a large impact on the speed of randTruePrime_() and powMod_(). HAC has a couple of poorly-worded
177// sentences that seem to imply it's faster to do a non-modular square followed by a single 175// sentences that seem to imply it's faster to do a non-modular square followed by a single
178// Montgomery reduction, but that's obviously wrong. 176// Montgomery reduction, but that's obviously wrong.
179//////////////////////////////////////////////////////////////////////////////////////// 177////////////////////////////////////////////////////////////////////////////////////////
180 178
181//globals 179//globals
182bpe=0; //bits stored per array element 180bpe=0; //bits stored per array element
183mask=0; //AND this with an array element to chop it down to bpe bits 181mask=0; //AND this with an array element to chop it down to bpe bits
184radix=mask+1; //equals 2^bpe. A single 1 bit to the left of the last bit of mask. 182radix=mask+1; //equals 2^bpe. A single 1 bit to the left of the last bit of mask.
185 183
186//the digits for converting to different bases 184//the digits for converting to different bases
187digitsStr='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_=!@#$%^&*()[]{}|;:,.<>/?`~ \\\'\"+-'; 185digitsStr='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_=!@#$%^&*()[]{}|;:,.<>/?`~ \\\'\"+-';
188 186
189//initialize the global variables 187//initialize the global variables
190for (bpe=0; (1<<(bpe+1)) > (1<<bpe); bpe++); //bpe=number of bits in the mantissa on this platform 188for (bpe=0; (1<<(bpe+1)) > (1<<bpe); bpe++); //bpe=number of bits in the mantissa on this platform
191bpe>>=1; //bpe=number of bits in one element of the array representing the bigInt 189bpe>>=1; //bpe=number of bits in one element of the array representing the bigInt
192mask=(1<<bpe)-1; //AND the mask with an integer to get its bpe least significant bits 190mask=(1<<bpe)-1; //AND the mask with an integer to get its bpe least significant bits
193radix=mask+1; //2^bpe. a single 1 bit to the left of the first bit of mask 191radix=mask+1; //2^bpe. a single 1 bit to the left of the first bit of mask
194one=int2bigInt(1,1,1); //constant used in powMod_() 192one=int2bigInt(1,1,1); //constant used in powMod_()
195 193
196//the following global variables are scratchpad memory to 194//the following global variables are scratchpad memory to
197//reduce dynamic memory allocation in the inner loop 195//reduce dynamic memory allocation in the inner loop
198t=new Array(0); 196t=new Array(0);
199ss=t; //used in mult_() 197ss=t; //used in mult_()
200s0=t; //used in multMod_(), squareMod_() 198s0=t; //used in multMod_(), squareMod_()
201s1=t; //used in powMod_(), multMod_(), squareMod_() 199s1=t; //used in powMod_(), multMod_(), squareMod_()
202s2=t; //used in powMod_(), multMod_() 200s2=t; //used in powMod_(), multMod_()
203s3=t; //used in powMod_() 201s3=t; //used in powMod_()
204s4=t; s5=t; //used in mod_() 202s4=t; s5=t; //used in mod_()
205s6=t; //used in bigInt2str() 203s6=t; //used in bigInt2str()
206s7=t; //used in powMod_() 204s7=t; //used in powMod_()
207T=t; //used in GCD_() 205T=t; //used in GCD_()
208sa=t; //used in mont_() 206sa=t; //used in mont_()
209mr_x1=t; mr_r=t; mr_a=t; //used in millerRabin() 207mr_x1=t; mr_r=t; mr_a=t; //used in millerRabin()
210eg_v=t; eg_u=t; eg_A=t; eg_B=t; eg_C=t; eg_D=t; //used in eGCD_(), inverseMod_() 208eg_v=t; eg_u=t; eg_A=t; eg_B=t; eg_C=t; eg_D=t; //used in eGCD_(), inverseMod_()
211md_q1=t; md_q2=t; md_q3=t; md_r=t; md_r1=t; md_r2=t; md_tt=t; //used in mod_() 209md_q1=t; md_q2=t; md_q3=t; md_r=t; md_r1=t; md_r2=t; md_tt=t; //used in mod_()
212 210
213primes=t; pows=t; s_i=t; s_i2=t; s_R=t; s_rm=t; s_q=t; s_n1=t; 211primes=t; pows=t; s_i=t; s_i2=t; s_R=t; s_rm=t; s_q=t; s_n1=t;
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_() 212 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_()
215 213
216//////////////////////////////////////////////////////////////////////////////////////// 214////////////////////////////////////////////////////////////////////////////////////////
217 215
218//return array of all primes less than integer n 216//return array of all primes less than integer n
219function findPrimes(n) { 217function findPrimes(n) {
220 var i,s,p,ans; 218 var i,s,p,ans;
221 s=new Array(n); 219 s=new Array(n);
222 for (i=0;i<n;i++) 220 for (i=0;i<n;i++)
223 s[i]=0; 221 s[i]=0;
224 s[0]=2; 222 s[0]=2;
225 p=0; //first p elements of s are primes, the rest are a sieve 223 p=0; //first p elements of s are primes, the rest are a sieve
226 for(;s[p]<n;) { //s[p] is the pth prime 224 for(;s[p]<n;) { //s[p] is the pth prime
227 for(i=s[p]*s[p]; i<n; i+=s[p]) //mark multiples of s[p] 225 for(i=s[p]*s[p]; i<n; i+=s[p]) //mark multiples of s[p]
228 s[i]=1; 226 s[i]=1;
229 p++; 227 p++;
230 s[p]=s[p-1]+1; 228 s[p]=s[p-1]+1;
231 for(; s[p]<n && s[s[p]]; s[p]++); //find next prime (where s[p]==0) 229 for(; s[p]<n && s[s[p]]; s[p]++); //find next prime (where s[p]==0)
232 } 230 }
233 ans=new Array(p); 231 ans=new Array(p);
234 for(i=0;i<p;i++) 232 for(i=0;i<p;i++)
235 ans[i]=s[i]; 233 ans[i]=s[i];
236 return ans; 234 return ans;
237} 235}
238 236
239//does a single round of Miller-Rabin base b consider x to be a possible prime? 237//does a single round of Miller-Rabin base b consider x to be a possible prime?
240//x is a bigInt, and b is an integer 238//x is a bigInt, and b is an integer
241function millerRabin(x,b) { 239function millerRabin(x,b) {
242 var i,j,k,s; 240 var i,j,k,s;
243 241
244 if (mr_x1.length!=x.length) { 242 if (mr_x1.length!=x.length) {
245 mr_x1=dup(x); 243 mr_x1=dup(x);
246 mr_r=dup(x); 244 mr_r=dup(x);
247 mr_a=dup(x); 245 mr_a=dup(x);
248 } 246 }
249 247
250 copyInt_(mr_a,b); 248 copyInt_(mr_a,b);
251 copy_(mr_r,x); 249 copy_(mr_r,x);
252 copy_(mr_x1,x); 250 copy_(mr_x1,x);
253 251
254 addInt_(mr_r,-1); 252 addInt_(mr_r,-1);
255 addInt_(mr_x1,-1); 253 addInt_(mr_x1,-1);
256 254
257 //s=the highest power of two that divides mr_r 255 //s=the highest power of two that divides mr_r
258 k=0; 256 k=0;
259 for (i=0;i<mr_r.length;i++) 257 for (i=0;i<mr_r.length;i++)
260 for (j=1;j<mask;j<<=1) 258 for (j=1;j<mask;j<<=1)
261 if (x[i] & j) { 259 if (x[i] & j) {
262 s=(k<mr_r.length+bpe ? k : 0); 260 s=(k<mr_r.length+bpe ? k : 0);
263 i=mr_r.length; 261 i=mr_r.length;
264 j=mask; 262 j=mask;
265 } else 263 } else
266 k++; 264 k++;
267 265
268 if (s) 266 if (s)
269 rightShift_(mr_r,s); 267 rightShift_(mr_r,s);
270 268
271 powMod_(mr_a,mr_r,x); 269 powMod_(mr_a,mr_r,x);
272 270
273 if (!equalsInt(mr_a,1) && !equals(mr_a,mr_x1)) { 271 if (!equalsInt(mr_a,1) && !equals(mr_a,mr_x1)) {
274 j=1; 272 j=1;
275 while (j<=s-1 && !equals(mr_a,mr_x1)) { 273 while (j<=s-1 && !equals(mr_a,mr_x1)) {
276 squareMod_(mr_a,x); 274 squareMod_(mr_a,x);
277 if (equalsInt(mr_a,1)) { 275 if (equalsInt(mr_a,1)) {
278 return 0; 276 return 0;
279 } 277 }
280 j++; 278 j++;
281 } 279 }
282 if (!equals(mr_a,mr_x1)) { 280 if (!equals(mr_a,mr_x1)) {
283 return 0; 281 return 0;
284 } 282 }
285 } 283 }
286 return 1; 284 return 1;
287} 285}
288 286
289//returns how many bits long the bigInt is, not counting leading zeros. 287//returns how many bits long the bigInt is, not counting leading zeros.
290function bitSize(x) { 288function bitSize(x) {
291 var j,z,w; 289 var j,z,w;
292 for (j=x.length-1; (x[j]==0) && (j>0); j--); 290 for (j=x.length-1; (x[j]==0) && (j>0); j--);
293 for (z=0,w=x[j]; w; (w>>=1),z++); 291 for (z=0,w=x[j]; w; (w>>=1),z++);
294 z+=bpe*j; 292 z+=bpe*j;
295 return z; 293 return z;
296} 294}
297 295
298//return a copy of x with at least n elements, adding leading zeros if needed 296//return a copy of x with at least n elements, adding leading zeros if needed
299function expand(x,n) { 297function expand(x,n) {
300 var ans=int2bigInt(0,(x.length>n ? x.length : n)*bpe,0); 298 var ans=int2bigInt(0,(x.length>n ? x.length : n)*bpe,0);
301 copy_(ans,x); 299 copy_(ans,x);
302 return ans; 300 return ans;
303} 301}
304 302
305//return a k-bit true random prime using Maurer's algorithm. 303//return a k-bit true random prime using Maurer's algorithm.
306function randTruePrime(k) { 304function randTruePrime(k) {
307 var ans=int2bigInt(0,k,0); 305 var ans=int2bigInt(0,k,0);
308 randTruePrime_(ans,k); 306 randTruePrime_(ans,k);
309 return trim(ans,1); 307 return trim(ans,1);
310} 308}
311 309
312//return a new bigInt equal to (x mod n) for bigInts x and n. 310//return a new bigInt equal to (x mod n) for bigInts x and n.
313function mod(x,n) { 311function mod(x,n) {
314 var ans=dup(x); 312 var ans=dup(x);
315 mod_(ans,n); 313 mod_(ans,n);
316 return trim(ans,1); 314 return trim(ans,1);
317} 315}
318 316
319//return (x+n) where x is a bigInt and n is an integer. 317//return (x+n) where x is a bigInt and n is an integer.
320function addInt(x,n) { 318function addInt(x,n) {
321 var ans=expand(x,x.length+1); 319 var ans=expand(x,x.length+1);
322 addInt_(ans,n); 320 addInt_(ans,n);
323 return trim(ans,1); 321 return trim(ans,1);
324} 322}
325 323
326//return x*y for bigInts x and y. This is faster when y<x. 324//return x*y for bigInts x and y. This is faster when y<x.
327function mult(x,y) { 325function mult(x,y) {
328 var ans=expand(x,x.length+y.length); 326 var ans=expand(x,x.length+y.length);
329 mult_(ans,y); 327 mult_(ans,y);
330 return trim(ans,1); 328 return trim(ans,1);
331} 329}
332 330
333//return (x**y mod n) where x,y,n are bigInts and ** is exponentiation. 0**0=1. Faster for odd n. 331//return (x**y mod n) where x,y,n are bigInts and ** is exponentiation. 0**0=1. Faster for odd n.
334function powMod(x,y,n) { 332function powMod(x,y,n) {
335 var ans=expand(x,n.length); 333 var ans=expand(x,n.length);
336 powMod_(ans,trim(y,2),trim(n,2),0); //this should work without the trim, but doesn't 334 powMod_(ans,trim(y,2),trim(n,2),0); //this should work without the trim, but doesn't
337 return trim(ans,1); 335 return trim(ans,1);
338} 336}
339 337
340//return (x-y) for bigInts x and y. Negative answers will be 2s complement 338//return (x-y) for bigInts x and y. Negative answers will be 2s complement
341function sub(x,y) { 339function sub(x,y) {
342 var ans=expand(x,(x.length>y.length ? x.length+1 : y.length+1)); 340 var ans=expand(x,(x.length>y.length ? x.length+1 : y.length+1));
343 sub_(ans,y); 341 sub_(ans,y);
344 return trim(ans,1); 342 return trim(ans,1);
345} 343}
346 344
347//return (x+y) for bigInts x and y. 345//return (x+y) for bigInts x and y.
348function add(x,y) { 346function add(x,y) {
349 var ans=expand(x,(x.length>y.length ? x.length+1 : y.length+1)); 347 var ans=expand(x,(x.length>y.length ? x.length+1 : y.length+1));
350 add_(ans,y); 348 add_(ans,y);
351 return trim(ans,1); 349 return trim(ans,1);
352} 350}
353 351
354//return (x**(-1) mod n) for bigInts x and n. If no inverse exists, it returns null 352//return (x**(-1) mod n) for bigInts x and n. If no inverse exists, it returns null
355function inverseMod(x,n) { 353function inverseMod(x,n) {
356 var ans=expand(x,n.length); 354 var ans=expand(x,n.length);
357 var s; 355 var s;
358 s=inverseMod_(ans,n); 356 s=inverseMod_(ans,n);
359 return s ? trim(ans,1) : null; 357 return s ? trim(ans,1) : null;
360} 358}
361 359
362//return (x*y mod n) for bigInts x,y,n. For greater speed, let y<x. 360//return (x*y mod n) for bigInts x,y,n. For greater speed, let y<x.
363function multMod(x,y,n) { 361function multMod(x,y,n) {
364 var ans=expand(x,n.length); 362 var ans=expand(x,n.length);
365 multMod_(ans,y,n); 363 multMod_(ans,y,n);
366 return trim(ans,1); 364 return trim(ans,1);
367} 365}
368 366
369//generate a k-bit true random prime using Maurer's algorithm, 367//generate a k-bit true random prime using Maurer's algorithm,
370//and put it into ans. The bigInt ans must be large enough to hold it. 368//and put it into ans. The bigInt ans must be large enough to hold it.
371function randTruePrime_(ans,k) { 369function randTruePrime_(ans,k) {
372 var c,m,pm,dd,j,r,B,divisible,z,zz,recSize; 370 var c,m,pm,dd,j,r,B,divisible,z,zz,recSize;
373 371
374 if (primes.length==0) 372 if (primes.length==0)
375 primes=findPrimes(30000); //check for divisibility by primes <=30000 373 primes=findPrimes(30000); //check for divisibility by primes <=30000
376 374
377 if (pows.length==0) { 375 if (pows.length==0) {
378 pows=new Array(512); 376 pows=new Array(512);
379 for (j=0;j<512;j++) { 377 for (j=0;j<512;j++) {
380 pows[j]=Math.pow(2,j/511.-1.); 378 pows[j]=Math.pow(2,j/511.-1.);
381 } 379 }
382 } 380 }
383 381
384 //c and m should be tuned for a particular machine and value of k, to maximize speed 382 //c and m should be tuned for a particular machine and value of k, to maximize speed
385 //this was: c=primes[primes.length-1]/k/k; //check using all the small primes. (c=0.1 in HAC) 383 //this was: c=primes[primes.length-1]/k/k; //check using all the small primes. (c=0.1 in HAC)
386 c=0.1; 384 c=0.1;
387 m=20; //generate this k-bit number by first recursively generating a number that has between k/2 and k-m bits 385 m=20; //generate this k-bit number by first recursively generating a number that has between k/2 and k-m bits
388 recLimit=20; /*must be at least 2 (was 29)*/ //stop recursion when k <=recLimit 386 recLimit=20; /*must be at least 2 (was 29)*/ //stop recursion when k <=recLimit
389 387
390 if (s_i2.length!=ans.length) { 388 if (s_i2.length!=ans.length) {
391 s_i2=dup(ans); 389 s_i2=dup(ans);
392 s_R =dup(ans); 390 s_R =dup(ans);
393 s_n1=dup(ans); 391 s_n1=dup(ans);
394 s_r2=dup(ans); 392 s_r2=dup(ans);
395 s_d =dup(ans); 393 s_d =dup(ans);
396 s_x1=dup(ans); 394 s_x1=dup(ans);
397 s_x2=dup(ans); 395 s_x2=dup(ans);
398 s_b =dup(ans); 396 s_b =dup(ans);
399 s_n =dup(ans); 397 s_n =dup(ans);
400 s_i =dup(ans); 398 s_i =dup(ans);
401 s_rm=dup(ans); 399 s_rm=dup(ans);
402 s_q =dup(ans); 400 s_q =dup(ans);
403 s_a =dup(ans); 401 s_a =dup(ans);
404 s_aa=dup(ans); 402 s_aa=dup(ans);
405 } 403 }
406 404
diff --git a/frontend/beta/js/Clipperz/Crypto/BigInt_scoped.js b/frontend/beta/js/Clipperz/Crypto/BigInt_scoped.js
index f91c7e9..bc60330 100644
--- a/frontend/beta/js/Clipperz/Crypto/BigInt_scoped.js
+++ b/frontend/beta/js/Clipperz/Crypto/BigInt_scoped.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.Crypto) == 'undefined') { Clipperz.Crypto = {}; } 25if (typeof(Clipperz.Crypto) == 'undefined') { Clipperz.Crypto = {}; }
28 26
29if (typeof(Leemon) == 'undefined') { Leemon = {}; } 27if (typeof(Leemon) == 'undefined') { Leemon = {}; }
30if (typeof(Baird.Crypto) == 'undefined') { Baird.Crypto = {}; } 28if (typeof(Baird.Crypto) == 'undefined') { Baird.Crypto = {}; }
31if (typeof(Baird.Crypto.BigInt) == 'undefined') { Baird.Crypto.BigInt = {}; } 29if (typeof(Baird.Crypto.BigInt) == 'undefined') { Baird.Crypto.BigInt = {}; }
32 30
33 31
34//############################################################################# 32//#############################################################################
35 //Downloaded on March 05, 2007 from http://www.leemon.com/crypto/BigInt.js 33 //Downloaded on March 05, 2007 from http://www.leemon.com/crypto/BigInt.js
36//############################################################################# 34//#############################################################################
37 35
38//////////////////////////////////////////////////////////////////////////////////////// 36////////////////////////////////////////////////////////////////////////////////////////
39// Big Integer Library v. 5.0 37// Big Integer Library v. 5.0
40// Created 2000, last modified 2006 38// Created 2000, last modified 2006
41// Leemon Baird 39// Leemon Baird
42// www.leemon.com 40// www.leemon.com
43// 41//
44// This file is public domain. You can use it for any purpose without restriction. 42// This file is public domain. You can use it for any purpose without restriction.
45// I do not guarantee that it is correct, so use it at your own risk. If you use 43// I do not guarantee that it is correct, so use it at your own risk. If you use
46// it for something interesting, I'd appreciate hearing about it. If you find 44// it for something interesting, I'd appreciate hearing about it. If you find
47// any bugs or make any improvements, I'd appreciate hearing about those too. 45// any bugs or make any improvements, I'd appreciate hearing about those too.
48// It would also be nice if my name and address were left in the comments. 46// It would also be nice if my name and address were left in the comments.
49// But none of that is required. 47// But none of that is required.
50// 48//
51// This code defines a bigInt library for arbitrary-precision integers. 49// This code defines a bigInt library for arbitrary-precision integers.
52// A bigInt is an array of integers storing the value in chunks of bpe bits, 50// A bigInt is an array of integers storing the value in chunks of bpe bits,
53// little endian (buff[0] is the least significant word). 51// little endian (buff[0] is the least significant word).
54// Negative bigInts are stored two's complement. 52// Negative bigInts are stored two's complement.
55// Some functions assume their parameters have at least one leading zero element. 53// Some functions assume their parameters have at least one leading zero element.
56// Functions with an underscore at the end of the name have unpredictable behavior in case of overflow, 54// Functions with an underscore at the end of the name have unpredictable behavior in case of overflow,
57// so the caller must make sure overflow won't happen. 55// so the caller must make sure overflow won't happen.
58// For each function where a parameter is modified, that same 56// For each function where a parameter is modified, that same
59// variable must not be used as another argument too. 57// variable must not be used as another argument too.
60// So, you cannot square x by doing multMod_(x,x,n). 58// So, you cannot square x by doing multMod_(x,x,n).
61// You must use squareMod_(x,n) instead, or do y=dup(x); multMod_(x,y,n). 59// You must use squareMod_(x,n) instead, or do y=dup(x); multMod_(x,y,n).
62// 60//
63// These functions are designed to avoid frequent dynamic memory allocation in the inner loop. 61// These functions are designed to avoid frequent dynamic memory allocation in the inner loop.
64// For most functions, if it needs a BigInt as a local variable it will actually use 62// For most functions, if it needs a BigInt as a local variable it will actually use
65// a global, and will only allocate to it when it's not the right size. This ensures 63// a global, and will only allocate to it when it's not the right size. This ensures
66// that when a function is called repeatedly with same-sized parameters, it only allocates 64// that when a function is called repeatedly with same-sized parameters, it only allocates
67// memory on the first call. 65// memory on the first call.
68// 66//
69// Note that for cryptographic purposes, the calls to Math.random() must 67// Note that for cryptographic purposes, the calls to Math.random() must
70// be replaced with calls to a better pseudorandom number generator. 68// be replaced with calls to a better pseudorandom number generator.
71// 69//
72// In the following, "bigInt" means a bigInt with at least one leading zero element, 70// In the following, "bigInt" means a bigInt with at least one leading zero element,
73// and "integer" means a nonnegative integer less than radix. In some cases, integer 71// and "integer" means a nonnegative integer less than radix. In some cases, integer
74// can be negative. Negative bigInts are 2s complement. 72// can be negative. Negative bigInts are 2s complement.
75// 73//
76// The following functions do not modify their inputs, but dynamically allocate memory every time they are called: 74// The following functions do not modify their inputs, but dynamically allocate memory every time they are called:
77// 75//
78// function bigInt2str(x,base) //convert a bigInt into a string in a given base, from base 2 up to base 95 76// function bigInt2str(x,base) //convert a bigInt into a string in a given base, from base 2 up to base 95
79// function dup(x) //returns a copy of bigInt x 77// function dup(x) //returns a copy of bigInt x
80// function findPrimes(n) //return array of all primes less than integer n 78// function findPrimes(n) //return array of all primes less than integer n
81// function int2bigInt(t,n,m) //convert integer t to a bigInt with at least n bits and m array elements 79// function int2bigInt(t,n,m) //convert integer t 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 80// function str2bigInt(s,b,n,m) //convert string s in base b to a bigInt with at least n bits and m array elements
83// function trim(x,k) //return a copy of x with exactly k leading zero elements 81// function trim(x,k) //return a copy of x with exactly k leading zero elements
84// 82//
85// The following functions do not modify their inputs, so there is never a problem with the result being too big: 83// The following functions do not modify their inputs, so there is never a problem with the result being too big:
86// 84//
87// function bitSize(x) //returns how many bits long the bigInt x is, not counting leading zeros 85// function bitSize(x) //returns how many bits long the bigInt x is, not counting leading zeros
88// function equals(x,y) //is the bigInt x equal to the bigint y? 86// function equals(x,y) //is the bigInt x equal to the bigint y?
89// function equalsInt(x,y) //is bigint x equal to integer y? 87// function equalsInt(x,y) //is bigint x equal to integer y?
90// function greater(x,y) //is x>y? (x and y are nonnegative bigInts) 88// function greater(x,y) //is x>y? (x and y are nonnegative bigInts)
91// function greaterShift(x,y,shift)//is (x <<(shift*bpe)) > y? 89// function greaterShift(x,y,shift)//is (x <<(shift*bpe)) > y?
92// function isZero(x) //is the bigInt x equal to zero? 90// function isZero(x) //is the bigInt x equal to zero?
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)? 91// 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)?
94// function modInt(x,n) //return x mod n for bigInt x and integer n. 92// function modInt(x,n) //return x mod n for bigInt x and integer n.
95// function negative(x) //is bigInt x negative? 93// function negative(x) //is bigInt x negative?
96// 94//
97// The following functions do not modify their inputs, but allocate memory and call functions with underscores 95// The following functions do not modify their inputs, but allocate memory and call functions with underscores
98// 96//
99// function add(x,y) //return (x+y) for bigInts x and y. 97// function add(x,y) //return (x+y) for bigInts x and y.
100// function addInt(x,n) //return (x+n) where x is a bigInt and n is an integer. 98// function addInt(x,n) //return (x+n) where x is a bigInt and n is an integer.
101// function expand(x,n) //return a copy of x with at least n elements, adding leading zeros if needed 99// function expand(x,n) //return a copy of x with at least n elements, adding leading zeros if needed
102// function inverseMod(x,n) //return (x**(-1) mod n) for bigInts x and n. If no inverse exists, it returns null 100// function inverseMod(x,n) //return (x**(-1) mod n) for bigInts x and n. If no inverse exists, it returns null
103// function mod(x,n) //return a new bigInt equal to (x mod n) for bigInts x and n. 101// function mod(x,n) //return a new bigInt equal to (x mod n) for bigInts x and n.
104// function mult(x,y) //return x*y for bigInts x and y. This is faster when y<x. 102// function mult(x,y) //return x*y for bigInts x and y. This is faster when y<x.
105// function multMod(x,y,n) //return (x*y mod n) for bigInts x,y,n. For greater speed, let y<x. 103// function multMod(x,y,n) //return (x*y mod n) for bigInts x,y,n. For greater speed, let y<x.
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. 104// 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.
107// function randTruePrime(k) //return a new, random, k-bit, true prime using Maurer's algorithm. 105// function randTruePrime(k) //return a new, random, k-bit, true prime using Maurer's algorithm.
108// function sub(x,y) //return (x-y) for bigInts x and y. Negative answers will be 2s complement 106// function sub(x,y) //return (x-y) for bigInts x and y. Negative answers will be 2s complement
109// 107//
110// The following functions write a bigInt result to one of the parameters, but 108// The following functions write a bigInt result to one of the parameters, but
111// the result is never bigger than the original, so there can't be overflow problems: 109// the result is never bigger than the original, so there can't be overflow problems:
112// 110//
113// function divInt_(x,n) //do x=floor(x/n) for bigInt x and integer n, and return the remainder 111// function divInt_(x,n) //do x=floor(x/n) for bigInt x and integer n, and return the remainder
114// function GCD_(x,y) //set x to the greatest common divisor of bigInts x and y, (y is destroyed). 112// function GCD_(x,y) //set x to the greatest common divisor of bigInts x and y, (y is destroyed).
115// function halve_(x) //do x=floor(|x|/2)*sgn(x) for bigInt x in 2's complement 113// function halve_(x) //do x=floor(|x|/2)*sgn(x) for bigInt x in 2's complement
116// function mod_(x,n) //do x=x mod n for bigInts x and n. 114// function mod_(x,n) //do x=x mod n for bigInts x and n.
117// function rightShift_(x,n) //right shift bigInt x by n bits. 0 <= n < bpe. 115// function rightShift_(x,n) //right shift bigInt x by n bits. 0 <= n < bpe.
118// 116//
119// The following functions write a bigInt result to one of the parameters. The caller is responsible for 117// The following functions write a bigInt result to one of the parameters. The caller is responsible for
120// ensuring it is large enough to hold the result. 118// ensuring it is large enough to hold the result.
121// 119//
122// function addInt_(x,n) //do x=x+n where x is a bigInt and n is an integer 120// function addInt_(x,n) //do x=x+n where x is a bigInt and n is an integer
123// function add_(x,y) //do x=x+y for bigInts x and y 121// function add_(x,y) //do x=x+y for bigInts x and y
124// function addShift_(x,y,ys) //do x=x+(y<<(ys*bpe)) 122// function addShift_(x,y,ys) //do x=x+(y<<(ys*bpe))
125// function copy_(x,y) //do x=y on bigInts x and y 123// function copy_(x,y) //do x=y on bigInts x and y
126// function copyInt_(x,n) //do x=n on bigInt x and integer n 124// function copyInt_(x,n) //do x=n on bigInt x and integer n
127// function carry_(x) //do carries and borrows so each element of the bigInt x fits in bpe bits. 125// function carry_(x) //do carries and borrows so each element of the bigInt x fits in bpe bits.
128// function divide_(x,y,q,r) //divide_ x by y giving quotient q and remainder r 126// function divide_(x,y,q,r) //divide_ x by y giving quotient q and remainder r
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 127// 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
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 128// function inverseMod_(x,n) //do x=x**(-1) mod n, for bigInts x and n. Returns 1 (0) if inverse does (doesn't) exist
131// function inverseModInt_(x,n) //return x**(-1) mod n, for integers x and n. Return 0 if there is no inverse 129// function inverseModInt_(x,n) //return x**(-1) mod n, for integers x and n. Return 0 if there is no inverse
132// function leftShift_(x,n) //left shift bigInt x by n bits. n<bpe. 130// function leftShift_(x,n) //left shift bigInt x by n bits. n<bpe.
133// function linComb_(x,y,a,b) //do x=a*x+b*y for bigInts x and y and integers a and b 131// function linComb_(x,y,a,b) //do x=a*x+b*y for bigInts x and y and integers a and b
134// function linCombShift_(x,y,b,ys) //do x=x+b*(y<<(ys*bpe)) for bigInts x and y, and integers b and ys 132// function linCombShift_(x,y,b,ys) //do x=x+b*(y<<(ys*bpe)) for bigInts x and y, and integers b and ys
135// function mont_(x,y,n,np) //Montgomery multiplication (see comments where the function is defined) 133// function mont_(x,y,n,np) //Montgomery multiplication (see comments where the function is defined)
136// function mult_(x,y) //do x=x*y for bigInts x and y. 134// function mult_(x,y) //do x=x*y for bigInts x and y.
137// function multInt_(x,n) //do x=x*n where x is a bigInt and n is an integer. 135// function multInt_(x,n) //do x=x*n where x is a bigInt and n is an integer.
138// function multMod_(x,y,n) //do x=x*y mod n for bigInts x,y,n. 136// function multMod_(x,y,n) //do x=x*y mod n for bigInts x,y,n.
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. 137// 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.
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. 138// 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.
141// function randTruePrime_(ans,k) //do ans = a random k-bit true random prime (not just probable prime) with 1 in the msb. 139// function randTruePrime_(ans,k) //do ans = a random k-bit true random prime (not just probable prime) with 1 in the msb.
142// function squareMod_(x,n) //do x=x*x mod n for bigInts x,n 140// function squareMod_(x,n) //do x=x*x mod n for bigInts x,n
143// function sub_(x,y) //do x=x-y for bigInts x and y. Negative answers will be 2s complement. 141// function sub_(x,y) //do x=x-y for bigInts x and y. Negative answers will be 2s complement.
144// function subShift_(x,y,ys) //do x=x-(y<<(ys*bpe)). Negative answers will be 2s complement. 142// function subShift_(x,y,ys) //do x=x-(y<<(ys*bpe)). Negative answers will be 2s complement.
145// 143//
146// The following functions are based on algorithms from the _Handbook of Applied Cryptography_ 144// The following functions are based on algorithms from the _Handbook of Applied Cryptography_
147// powMod_() = algorithm 14.94, Montgomery exponentiation 145// powMod_() = algorithm 14.94, Montgomery exponentiation
148// eGCD_,inverseMod_() = algorithm 14.61, Binary extended GCD_ 146// eGCD_,inverseMod_() = algorithm 14.61, Binary extended GCD_
149// GCD_() = algorothm 14.57, Lehmer's algorithm 147// GCD_() = algorothm 14.57, Lehmer's algorithm
150// mont_() = algorithm 14.36, Montgomery multiplication 148// mont_() = algorithm 14.36, Montgomery multiplication
151// divide_() = algorithm 14.20 Multiple-precision division 149// divide_() = algorithm 14.20 Multiple-precision division
152// squareMod_() = algorithm 14.16 Multiple-precision squaring 150// squareMod_() = algorithm 14.16 Multiple-precision squaring
153// randTruePrime_() = algorithm 4.62, Maurer's algorithm 151// randTruePrime_() = algorithm 4.62, Maurer's algorithm
154// millerRabin() = algorithm 4.24, Miller-Rabin algorithm 152// millerRabin() = algorithm 4.24, Miller-Rabin algorithm
155// 153//
156// Profiling shows: 154// Profiling shows:
157// randTruePrime_() spends: 155// randTruePrime_() spends:
158// 10% of its time in calls to powMod_() 156// 10% of its time in calls to powMod_()
159// 85% of its time in calls to millerRabin() 157// 85% of its time in calls to millerRabin()
160// millerRabin() spends: 158// millerRabin() spends:
161// 99% of its time in calls to powMod_() (always with a base of 2) 159// 99% of its time in calls to powMod_() (always with a base of 2)
162// powMod_() spends: 160// powMod_() spends:
163// 94% of its time in calls to mont_() (almost always with x==y) 161// 94% of its time in calls to mont_() (almost always with x==y)
164// 162//
165// This suggests there are several ways to speed up this library slightly: 163// This suggests there are several ways to speed up this library slightly:
166// - convert powMod_ to use a Montgomery form of k-ary window (or maybe a Montgomery form of sliding window) 164// - convert powMod_ to use a Montgomery form of k-ary window (or maybe a Montgomery form of sliding window)
167// -- this should especially focus on being fast when raising 2 to a power mod n 165// -- this should especially focus on being fast when raising 2 to a power mod n
168// - convert randTruePrime_() to use a minimum r of 1/3 instead of 1/2 with the appropriate change to the test 166// - convert randTruePrime_() to use a minimum r of 1/3 instead of 1/2 with the appropriate change to the test
169// - tune the parameters in randTruePrime_(), including c, m, and recLimit 167// - tune the parameters in randTruePrime_(), including c, m, and recLimit
170// - speed up the single loop in mont_() that takes 95% of the runtime, perhaps by reducing checking 168// - speed up the single loop in mont_() that takes 95% of the runtime, perhaps by reducing checking
171// within the loop when all the parameters are the same length. 169// within the loop when all the parameters are the same length.
172// 170//
173// There are several ideas that look like they wouldn't help much at all: 171// There are several ideas that look like they wouldn't help much at all:
174// - replacing trial division in randTruePrime_() with a sieve (that speeds up something taking almost no time anyway) 172// - replacing trial division in randTruePrime_() with a sieve (that speeds up something taking almost no time anyway)
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) 173// - 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)
176// - speeding up mont_(x,y,n,np) when x==y by doing a non-modular, non-Montgomery square 174// - speeding up mont_(x,y,n,np) when x==y by doing a non-modular, non-Montgomery square
177// followed by a Montgomery reduction. The intermediate answer will be twice as long as x, so that 175// followed by a Montgomery reduction. The intermediate answer will be twice as long as x, so that
178// method would be slower. This is unfortunate because the code currently spends almost all of its time 176// method would be slower. This is unfortunate because the code currently spends almost all of its time
179// doing mont_(x,x,...), both for randTruePrime_() and powMod_(). A faster method for Montgomery squaring 177// doing mont_(x,x,...), both for randTruePrime_() and powMod_(). A faster method for Montgomery squaring
180// would have a large impact on the speed of randTruePrime_() and powMod_(). HAC has a couple of poorly-worded 178// would have a large impact on the speed of randTruePrime_() and powMod_(). HAC has a couple of poorly-worded
181// sentences that seem to imply it's faster to do a non-modular square followed by a single 179// sentences that seem to imply it's faster to do a non-modular square followed by a single
182// Montgomery reduction, but that's obviously wrong. 180// Montgomery reduction, but that's obviously wrong.
183//////////////////////////////////////////////////////////////////////////////////////// 181////////////////////////////////////////////////////////////////////////////////////////
184 182
185// 183//
186 //The whole library has been moved into the Baird.Crypto.BigInt scope by Giulio Cesare Solaroli <giulio.cesare@clipperz.com> 184 //The whole library has been moved into the Baird.Crypto.BigInt scope by Giulio Cesare Solaroli <giulio.cesare@clipperz.com>
187// 185//
188Baird.Crypto.BigInt.VERSION = "5.0"; 186Baird.Crypto.BigInt.VERSION = "5.0";
189Baird.Crypto.BigInt.NAME = "Baird.Crypto.BigInt"; 187Baird.Crypto.BigInt.NAME = "Baird.Crypto.BigInt";
190 188
191MochiKit.Base.update(Baird.Crypto.BigInt, { 189MochiKit.Base.update(Baird.Crypto.BigInt, {
192 //globals 190 //globals
193 'bpe': 0, //bits stored per array element 191 'bpe': 0, //bits stored per array element
194 'mask': 0, //AND this with an array element to chop it down to bpe bits 192 'mask': 0, //AND this with an array element to chop it down to bpe bits
195 'radix': Baird.Crypto.BigInt.mask + 1,//equals 2^bpe. A single 1 bit to the left of the last bit of mask. 193 'radix': Baird.Crypto.BigInt.mask + 1,//equals 2^bpe. A single 1 bit to the left of the last bit of mask.
196 194
197 //the digits for converting to different bases 195 //the digits for converting to different bases
198 'digitsStr': '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_=!@#$%^&*()[]{}|;:,.<>/?`~ \\\'\"+-', 196 'digitsStr': '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_=!@#$%^&*()[]{}|;:,.<>/?`~ \\\'\"+-',
199 197
200//initialize the global variables 198//initialize the global variables
201for (bpe=0; (1<<(bpe+1)) > (1<<bpe); bpe++); //bpe=number of bits in the mantissa on this platform 199for (bpe=0; (1<<(bpe+1)) > (1<<bpe); bpe++); //bpe=number of bits in the mantissa on this platform
202bpe>>=1; //bpe=number of bits in one element of the array representing the bigInt 200bpe>>=1; //bpe=number of bits in one element of the array representing the bigInt
203mask=(1<<bpe)-1; //AND the mask with an integer to get its bpe least significant bits 201mask=(1<<bpe)-1; //AND the mask with an integer to get its bpe least significant bits
204radix=mask+1; //2^bpe. a single 1 bit to the left of the first bit of mask 202radix=mask+1; //2^bpe. a single 1 bit to the left of the first bit of mask
205one=int2bigInt(1,1,1); //constant used in powMod_() 203one=int2bigInt(1,1,1); //constant used in powMod_()
206 204
207//the following global variables are scratchpad memory to 205//the following global variables are scratchpad memory to
208//reduce dynamic memory allocation in the inner loop 206//reduce dynamic memory allocation in the inner loop
209t=new Array(0); 207t=new Array(0);
210ss=t; //used in mult_() 208ss=t; //used in mult_()
211s0=t; //used in multMod_(), squareMod_() 209s0=t; //used in multMod_(), squareMod_()
212s1=t; //used in powMod_(), multMod_(), squareMod_() 210s1=t; //used in powMod_(), multMod_(), squareMod_()
213s2=t; //used in powMod_(), multMod_() 211s2=t; //used in powMod_(), multMod_()
214s3=t; //used in powMod_() 212s3=t; //used in powMod_()
215s4=t; s5=t; //used in mod_() 213s4=t; s5=t; //used in mod_()
216s6=t; //used in bigInt2str() 214s6=t; //used in bigInt2str()
217s7=t; //used in powMod_() 215s7=t; //used in powMod_()
218T=t; //used in GCD_() 216T=t; //used in GCD_()
219sa=t; //used in mont_() 217sa=t; //used in mont_()
220mr_x1=t; mr_r=t; mr_a=t; //used in millerRabin() 218mr_x1=t; mr_r=t; mr_a=t; //used in millerRabin()
221eg_v=t; eg_u=t; eg_A=t; eg_B=t; eg_C=t; eg_D=t; //used in eGCD_(), inverseMod_() 219eg_v=t; eg_u=t; eg_A=t; eg_B=t; eg_C=t; eg_D=t; //used in eGCD_(), inverseMod_()
222md_q1=t; md_q2=t; md_q3=t; md_r=t; md_r1=t; md_r2=t; md_tt=t; //used in mod_() 220md_q1=t; md_q2=t; md_q3=t; md_r=t; md_r1=t; md_r2=t; md_tt=t; //used in mod_()
223 221
224primes=t; pows=t; s_i=t; s_i2=t; s_R=t; s_rm=t; s_q=t; s_n1=t; 222primes=t; pows=t; s_i=t; s_i2=t; s_R=t; s_rm=t; s_q=t; s_n1=t;
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_() 223 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_()
226 224
227//////////////////////////////////////////////////////////////////////////////////////// 225////////////////////////////////////////////////////////////////////////////////////////
228 226
229 //return array of all primes less than integer n 227 //return array of all primes less than integer n
230 'findPrimes': function(n) { 228 'findPrimes': function(n) {
231 var i,s,p,ans; 229 var i,s,p,ans;
232 s=new Array(n); 230 s=new Array(n);
233 for (i=0;i<n;i++) 231 for (i=0;i<n;i++)
234 s[i]=0; 232 s[i]=0;
235 s[0]=2; 233 s[0]=2;
236 p=0; //first p elements of s are primes, the rest are a sieve 234 p=0; //first p elements of s are primes, the rest are a sieve
237 for(;s[p]<n;) { //s[p] is the pth prime 235 for(;s[p]<n;) { //s[p] is the pth prime
238 for(i=s[p]*s[p]; i<n; i+=s[p]) //mark multiples of s[p] 236 for(i=s[p]*s[p]; i<n; i+=s[p]) //mark multiples of s[p]
239 s[i]=1; 237 s[i]=1;
240 p++; 238 p++;
241 s[p]=s[p-1]+1; 239 s[p]=s[p-1]+1;
242 for(; s[p]<n && s[s[p]]; s[p]++); //find next prime (where s[p]==0) 240 for(; s[p]<n && s[s[p]]; s[p]++); //find next prime (where s[p]==0)
243 } 241 }
244 ans=new Array(p); 242 ans=new Array(p);
245 for(i=0;i<p;i++) 243 for(i=0;i<p;i++)
246 ans[i]=s[i]; 244 ans[i]=s[i];
247 return ans; 245 return ans;
248 }, 246 },
249 247
250 //does a single round of Miller-Rabin base b consider x to be a possible prime? 248 //does a single round of Miller-Rabin base b consider x to be a possible prime?
251 //x is a bigInt, and b is an integer 249 //x is a bigInt, and b is an integer
252 'millerRabin': function(x,b) { 250 'millerRabin': function(x,b) {
253 var i,j,k,s; 251 var i,j,k,s;
254 252
255 if (mr_x1.length!=x.length) { 253 if (mr_x1.length!=x.length) {
256 mr_x1=dup(x); 254 mr_x1=dup(x);
257 mr_r=dup(x); 255 mr_r=dup(x);
258 mr_a=dup(x); 256 mr_a=dup(x);
259 } 257 }
260 258
261 copyInt_(mr_a,b); 259 copyInt_(mr_a,b);
262 copy_(mr_r,x); 260 copy_(mr_r,x);
263 copy_(mr_x1,x); 261 copy_(mr_x1,x);
264 262
265 addInt_(mr_r,-1); 263 addInt_(mr_r,-1);
266 addInt_(mr_x1,-1); 264 addInt_(mr_x1,-1);
267 265
268 //s=the highest power of two that divides mr_r 266 //s=the highest power of two that divides mr_r
269 k=0; 267 k=0;
270 for (i=0;i<mr_r.length;i++) 268 for (i=0;i<mr_r.length;i++)
271 for (j=1;j<mask;j<<=1) 269 for (j=1;j<mask;j<<=1)
272 if (x[i] & j) { 270 if (x[i] & j) {
273 s=(k<mr_r.length+bpe ? k : 0); 271 s=(k<mr_r.length+bpe ? k : 0);
274 i=mr_r.length; 272 i=mr_r.length;
275 j=mask; 273 j=mask;
276 } else 274 } else
277 k++; 275 k++;
278 276
279 if (s) 277 if (s)
280 rightShift_(mr_r,s); 278 rightShift_(mr_r,s);
281 279
282 powMod_(mr_a,mr_r,x); 280 powMod_(mr_a,mr_r,x);
283 281
284 if (!equalsInt(mr_a,1) && !equals(mr_a,mr_x1)) { 282 if (!equalsInt(mr_a,1) && !equals(mr_a,mr_x1)) {
285 j=1; 283 j=1;
286 while (j<=s-1 && !equals(mr_a,mr_x1)) { 284 while (j<=s-1 && !equals(mr_a,mr_x1)) {
287 squareMod_(mr_a,x); 285 squareMod_(mr_a,x);
288 if (equalsInt(mr_a,1)) { 286 if (equalsInt(mr_a,1)) {
289 return 0; 287 return 0;
290 } 288 }
291 j++; 289 j++;
292 } 290 }
293 if (!equals(mr_a,mr_x1)) { 291 if (!equals(mr_a,mr_x1)) {
294 return 0; 292 return 0;
295 } 293 }
296 } 294 }
297 295
298 return 1; 296 return 1;
299 }, 297 },
300 298
301 //returns how many bits long the bigInt is, not counting leading zeros. 299 //returns how many bits long the bigInt is, not counting leading zeros.
302 'bitSize': function(x) { 300 'bitSize': function(x) {
303 var j,z,w; 301 var j,z,w;
304 for (j=x.length-1; (x[j]==0) && (j>0); j--); 302 for (j=x.length-1; (x[j]==0) && (j>0); j--);
305 for (z=0,w=x[j]; w; (w>>=1),z++); 303 for (z=0,w=x[j]; w; (w>>=1),z++);
306 z+=bpe*j; 304 z+=bpe*j;
307 return z; 305 return z;
308 }, 306 },
309 307
310 //return a copy of x with at least n elements, adding leading zeros if needed 308 //return a copy of x with at least n elements, adding leading zeros if needed
311 'expand': function(x,n) { 309 'expand': function(x,n) {
312 var ans=int2bigInt(0,(x.length>n ? x.length : n)*bpe,0); 310 var ans=int2bigInt(0,(x.length>n ? x.length : n)*bpe,0);
313 copy_(ans,x); 311 copy_(ans,x);
314 return ans; 312 return ans;
315 }, 313 },
316 314
317 //return a k-bit true random prime using Maurer's algorithm. 315 //return a k-bit true random prime using Maurer's algorithm.
318 'randTruePrime': function(k) { 316 'randTruePrime': function(k) {
319 var ans=int2bigInt(0,k,0); 317 var ans=int2bigInt(0,k,0);
320 randTruePrime_(ans,k); 318 randTruePrime_(ans,k);
321 return trim(ans,1); 319 return trim(ans,1);
322 }, 320 },
323 321
324 //return a new bigInt equal to (x mod n) for bigInts x and n. 322 //return a new bigInt equal to (x mod n) for bigInts x and n.
325 'mod': function(x,n) { 323 'mod': function(x,n) {
326 var ans=dup(x); 324 var ans=dup(x);
327 mod_(ans,n); 325 mod_(ans,n);
328 return trim(ans,1); 326 return trim(ans,1);
329 }, 327 },
330 328
331 //return (x+n) where x is a bigInt and n is an integer. 329 //return (x+n) where x is a bigInt and n is an integer.
332 'addInt': function(x,n) { 330 'addInt': function(x,n) {
333 var ans=expand(x,x.length+1); 331 var ans=expand(x,x.length+1);
334 addInt_(ans,n); 332 addInt_(ans,n);
335 return trim(ans,1); 333 return trim(ans,1);
336 }, 334 },
337 335
338 //return x*y for bigInts x and y. This is faster when y<x. 336 //return x*y for bigInts x and y. This is faster when y<x.
339 'mult': function(x,y) { 337 'mult': function(x,y) {
340 var ans=expand(x,x.length+y.length); 338 var ans=expand(x,x.length+y.length);
341 mult_(ans,y); 339 mult_(ans,y);
342 return trim(ans,1); 340 return trim(ans,1);
343 }, 341 },
344 342
345 //return (x**y mod n) where x,y,n are bigInts and ** is exponentiation. 0**0=1. Faster for odd n. 343 //return (x**y mod n) where x,y,n are bigInts and ** is exponentiation. 0**0=1. Faster for odd n.
346 'powMod': function(x,y,n) { 344 'powMod': function(x,y,n) {
347 var ans=expand(x,n.length); 345 var ans=expand(x,n.length);
348 powMod_(ans,trim(y,2),trim(n,2),0); //this should work without the trim, but doesn't 346 powMod_(ans,trim(y,2),trim(n,2),0); //this should work without the trim, but doesn't
349 return trim(ans,1); 347 return trim(ans,1);
350 }, 348 },
351 349
352 //return (x-y) for bigInts x and y. Negative answers will be 2s complement 350 //return (x-y) for bigInts x and y. Negative answers will be 2s complement
353 'sub': function(x,y) { 351 'sub': function(x,y) {
354 var ans=expand(x,(x.length>y.length ? x.length+1 : y.length+1)); 352 var ans=expand(x,(x.length>y.length ? x.length+1 : y.length+1));
355 sub_(ans,y); 353 sub_(ans,y);
356 return trim(ans,1); 354 return trim(ans,1);
357 }, 355 },
358 356
359 //return (x+y) for bigInts x and y. 357 //return (x+y) for bigInts x and y.
360 'add': function(x,y) { 358 'add': function(x,y) {
361 var ans=expand(x,(x.length>y.length ? x.length+1 : y.length+1)); 359 var ans=expand(x,(x.length>y.length ? x.length+1 : y.length+1));
362 add_(ans,y); 360 add_(ans,y);
363 return trim(ans,1); 361 return trim(ans,1);
364 }, 362 },
365 363
366 //return (x**(-1) mod n) for bigInts x and n. If no inverse exists, it returns null 364 //return (x**(-1) mod n) for bigInts x and n. If no inverse exists, it returns null
367 'inverseMod': function(x,n) { 365 'inverseMod': function(x,n) {
368 var ans=expand(x,n.length); 366 var ans=expand(x,n.length);
369 var s; 367 var s;
370 s=inverseMod_(ans,n); 368 s=inverseMod_(ans,n);
371 return s ? trim(ans,1) : null; 369 return s ? trim(ans,1) : null;
372 }, 370 },
373 371
374 //return (x*y mod n) for bigInts x,y,n. For greater speed, let y<x. 372 //return (x*y mod n) for bigInts x,y,n. For greater speed, let y<x.
375 'multMod': function(x,y,n) { 373 'multMod': function(x,y,n) {
376 var ans=expand(x,n.length); 374 var ans=expand(x,n.length);
377 multMod_(ans,y,n); 375 multMod_(ans,y,n);
378 return trim(ans,1); 376 return trim(ans,1);
379 }, 377 },
380 378
381 //generate a k-bit true random prime using Maurer's algorithm, 379 //generate a k-bit true random prime using Maurer's algorithm,
382 //and put it into ans. The bigInt ans must be large enough to hold it. 380 //and put it into ans. The bigInt ans must be large enough to hold it.
383 'randTruePrime_': function(ans,k) { 381 'randTruePrime_': function(ans,k) {
384 var c,m,pm,dd,j,r,B,divisible,z,zz,recSize; 382 var c,m,pm,dd,j,r,B,divisible,z,zz,recSize;
385 383
386 if (primes.length==0) 384 if (primes.length==0)
387 primes=findPrimes(30000); //check for divisibility by primes <=30000 385 primes=findPrimes(30000); //check for divisibility by primes <=30000
388 386
389 if (pows.length==0) { 387 if (pows.length==0) {
390 pows=new Array(512); 388 pows=new Array(512);
391 for (j=0;j<512;j++) { 389 for (j=0;j<512;j++) {
392 pows[j]=Math.pow(2,j/511.-1.); 390 pows[j]=Math.pow(2,j/511.-1.);
393 } 391 }
394 } 392 }
395 393
396 //c and m should be tuned for a particular machine and value of k, to maximize speed 394 //c and m should be tuned for a particular machine and value of k, to maximize speed
397 //this was: c=primes[primes.length-1]/k/k; //check using all the small primes. (c=0.1 in HAC) 395 //this was: c=primes[primes.length-1]/k/k; //check using all the small primes. (c=0.1 in HAC)
398 c=0.1; 396 c=0.1;
399 m=20; //generate this k-bit number by first recursively generating a number that has between k/2 and k-m bits 397 m=20; //generate this k-bit number by first recursively generating a number that has between k/2 and k-m bits
400 recLimit=20; /*must be at least 2 (was 29)*/ //stop recursion when k <=recLimit 398 recLimit=20; /*must be at least 2 (was 29)*/ //stop recursion when k <=recLimit
401 399
402 if (s_i2.length!=ans.length) { 400 if (s_i2.length!=ans.length) {
403 s_i2=dup(ans); 401 s_i2=dup(ans);
404 s_R =dup(ans); 402 s_R =dup(ans);
405 s_n1=dup(ans); 403 s_n1=dup(ans);
406 s_r2=dup(ans); 404 s_r2=dup(ans);
diff --git a/frontend/beta/js/Clipperz/Crypto/ECC.js b/frontend/beta/js/Clipperz/Crypto/ECC.js
index bdfd9be..74eb02f 100644
--- a/frontend/beta/js/Clipperz/Crypto/ECC.js
+++ b/frontend/beta/js/Clipperz/Crypto/ECC.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26/* 24/*
27try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { 25try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) {
28 throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!"; 26 throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!";
29} 27}
30 28
31if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; } 29if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; }
32 30
33 31
34//############################################################################# 32//#############################################################################
35 33
36Clipperz.Crypto.ECC.BinaryField = {}; 34Clipperz.Crypto.ECC.BinaryField = {};
37 35
38//############################################################################# 36//#############################################################################
39 37
40Clipperz.Crypto.ECC.BinaryField.AbstractValue = function(aValue, aBase) { 38Clipperz.Crypto.ECC.BinaryField.AbstractValue = function(aValue, aBase) {
41 return this; 39 return this;
42} 40}
43 41
44Clipperz.Crypto.ECC.BinaryField.AbstractValue.prototype = MochiKit.Base.update(null, { 42Clipperz.Crypto.ECC.BinaryField.AbstractValue.prototype = MochiKit.Base.update(null, {
45 43
46 'asString': function(aBase) { 44 'asString': function(aBase) {
47 throw Clipperz.Base.exception.AbstractMethod; 45 throw Clipperz.Base.exception.AbstractMethod;
48 }, 46 },
49 47
50 'isZero': function() { 48 'isZero': function() {
51 throw Clipperz.Base.exception.AbstractMethod; 49 throw Clipperz.Base.exception.AbstractMethod;
52 }, 50 },
53 51
54 'shiftLeft': function(aNumberOfBitsToShift) { 52 'shiftLeft': function(aNumberOfBitsToShift) {
55 throw Clipperz.Base.exception.AbstractMethod; 53 throw Clipperz.Base.exception.AbstractMethod;
56 }, 54 },
57 55
58 'bitSize': function() { 56 'bitSize': function() {
59 throw Clipperz.Base.exception.AbstractMethod; 57 throw Clipperz.Base.exception.AbstractMethod;
60 }, 58 },
61 59
62 'isBitSet': function(aBitPosition) { 60 'isBitSet': function(aBitPosition) {
63 throw Clipperz.Base.exception.AbstractMethod; 61 throw Clipperz.Base.exception.AbstractMethod;
64 }, 62 },
65 63
66 'xor': function(aValue) { 64 'xor': function(aValue) {
67 throw Clipperz.Base.exception.AbstractMethod; 65 throw Clipperz.Base.exception.AbstractMethod;
68 }, 66 },
69 67
70 'compare': function(aValue) { 68 'compare': function(aValue) {
71 throw Clipperz.Base.exception.AbstractMethod; 69 throw Clipperz.Base.exception.AbstractMethod;
72 }, 70 },
73 71
74 //----------------------------------------------------------------------------- 72 //-----------------------------------------------------------------------------
75 __syntaxFix__: "syntax fix" 73 __syntaxFix__: "syntax fix"
76}); 74});
77 75
78//***************************************************************************** 76//*****************************************************************************
79/ * 77/ *
80Clipperz.Crypto.ECC.BinaryField.BigIntValue = function(aValue, aBase) { 78Clipperz.Crypto.ECC.BinaryField.BigIntValue = function(aValue, aBase) {
81 this._value = new Clipperz.Crypto.BigInt(aValue, aBase); 79 this._value = new Clipperz.Crypto.BigInt(aValue, aBase);
82 return this; 80 return this;
83} 81}
84 82
85Clipperz.Crypto.ECC.BinaryField.BigIntValue.prototype = MochiKit.Base.update(new Clipperz.Crypto.ECC.BinaryField.AbstractValue(), { 83Clipperz.Crypto.ECC.BinaryField.BigIntValue.prototype = MochiKit.Base.update(new Clipperz.Crypto.ECC.BinaryField.AbstractValue(), {
86 84
87 'value': function() { 85 'value': function() {
88 return this._value; 86 return this._value;
89 }, 87 },
90 88
91 //----------------------------------------------------------------------------- 89 //-----------------------------------------------------------------------------
92 90
93 'isZero': function() { 91 'isZero': function() {
94 return (this.value().compare(Clipperz.Crypto.ECC.BinaryField.BigIntValue.O) == 0); 92 return (this.value().compare(Clipperz.Crypto.ECC.BinaryField.BigIntValue.O) == 0);
95 }, 93 },
96 94
97 //----------------------------------------------------------------------------- 95 //-----------------------------------------------------------------------------
98 96
99 'asString': function(aBase) { 97 'asString': function(aBase) {
100 return this.value().asString(aBase); 98 return this.value().asString(aBase);
101 }, 99 },
102 100
103 //----------------------------------------------------------------------------- 101 //-----------------------------------------------------------------------------
104 102
105 'shiftLeft': function(aNumberOfBitsToShift) { 103 'shiftLeft': function(aNumberOfBitsToShift) {
106 return new Clipperz.Crypto.ECC.BinaryField.BigIntValue(this.value().shiftLeft(aNumberOfBitsToShift)); 104 return new Clipperz.Crypto.ECC.BinaryField.BigIntValue(this.value().shiftLeft(aNumberOfBitsToShift));
107 }, 105 },
108 106
109 //----------------------------------------------------------------------------- 107 //-----------------------------------------------------------------------------
110 108
111 'bitSize': function() { 109 'bitSize': function() {
112 return this.value().bitSize(); 110 return this.value().bitSize();
113 }, 111 },
114 112
115 //----------------------------------------------------------------------------- 113 //-----------------------------------------------------------------------------
116 114
117 'isBitSet': function(aBitPosition) { 115 'isBitSet': function(aBitPosition) {
118 return this.value().isBitSet(aBitPosition); 116 return this.value().isBitSet(aBitPosition);
119 }, 117 },
120 118
121 //----------------------------------------------------------------------------- 119 //-----------------------------------------------------------------------------
122 120
123 'xor': function(aValue) { 121 'xor': function(aValue) {
124 return new Clipperz.Crypto.ECC.BinaryField.BigIntValue(this.value().xor(aValue.value())); 122 return new Clipperz.Crypto.ECC.BinaryField.BigIntValue(this.value().xor(aValue.value()));
125 }, 123 },
126 124
127 //----------------------------------------------------------------------------- 125 //-----------------------------------------------------------------------------
128 126
129 'compare': function(aValue) { 127 'compare': function(aValue) {
130 return this.value().compare(aValue.value()); 128 return this.value().compare(aValue.value());
131 }, 129 },
132 130
133 //----------------------------------------------------------------------------- 131 //-----------------------------------------------------------------------------
134 __syntaxFix__: "syntax fix" 132 __syntaxFix__: "syntax fix"
135}); 133});
136 134
137Clipperz.Crypto.ECC.BinaryField.BigIntValue.O = new Clipperz.Crypto.BigInt(0); 135Clipperz.Crypto.ECC.BinaryField.BigIntValue.O = new Clipperz.Crypto.BigInt(0);
138Clipperz.Crypto.ECC.BinaryField.BigIntValue.I = new Clipperz.Crypto.BigInt(1); 136Clipperz.Crypto.ECC.BinaryField.BigIntValue.I = new Clipperz.Crypto.BigInt(1);
139* / 137* /
140//***************************************************************************** 138//*****************************************************************************
141 139
142Clipperz.Crypto.ECC.BinaryField.WordArrayValue = function(aValue, aBase) { 140Clipperz.Crypto.ECC.BinaryField.WordArrayValue = function(aValue, aBase) {
143 if (aValue.constructor == String) { 141 if (aValue.constructor == String) {
144 varvalue; 142 varvalue;
145 varstringLength; 143 varstringLength;
146 var numberOfWords; 144 var numberOfWords;
147 vari,c; 145 vari,c;
148 146
149 if (aBase != 16) { 147 if (aBase != 16) {
150 throw Clipperz.Crypto.ECC.BinaryField.WordArrayValue.exception.UnsupportedBase; 148 throw Clipperz.Crypto.ECC.BinaryField.WordArrayValue.exception.UnsupportedBase;
151 } 149 }
152 150
153 value = aValue.replace(/ /g, ''); 151 value = aValue.replace(/ /g, '');
154 stringLength = value.length; 152 stringLength = value.length;
155 numberOfWords = Math.ceil(stringLength / 8); 153 numberOfWords = Math.ceil(stringLength / 8);
156 this._value = new Array(numberOfWords); 154 this._value = new Array(numberOfWords);
157 155
158 c = numberOfWords; 156 c = numberOfWords;
159 for (i=0; i<c; i++) { 157 for (i=0; i<c; i++) {
160 varword; 158 varword;
161 159
162 if (i < (c-1)) { 160 if (i < (c-1)) {
163 word = parseInt(value.substr(stringLength-((i+1)*8), 8), 16); 161 word = parseInt(value.substr(stringLength-((i+1)*8), 8), 16);
164 } else { 162 } else {
165 word = parseInt(value.substr(0, stringLength-(i*8)), 16); 163 word = parseInt(value.substr(0, stringLength-(i*8)), 16);
166 } 164 }
167 165
168 this._value[i] = word; 166 this._value[i] = word;
169 } 167 }
170 } else if (aValue.constructor == Array) { 168 } else if (aValue.constructor == Array) {
171 var itemsToCopy; 169 var itemsToCopy;
172 170
173 itemsToCopy = aValue.length; 171 itemsToCopy = aValue.length;
174 while (aValue[itemsToCopy - 1] == 0) { 172 while (aValue[itemsToCopy - 1] == 0) {
175 itemsToCopy --; 173 itemsToCopy --;
176 } 174 }
177 175
178 this._value = aValue.slice(0, itemsToCopy); 176 this._value = aValue.slice(0, itemsToCopy);
179 } else if (aValue.constructor == Number) { 177 } else if (aValue.constructor == Number) {
180 this._value = [aValue]; 178 this._value = [aValue];
181 } else { 179 } else {
182 // throw Clipperz.Crypto.ECC.BinaryField.WordArrayValue.exception.UnsupportedConstructorValueType; 180 // throw Clipperz.Crypto.ECC.BinaryField.WordArrayValue.exception.UnsupportedConstructorValueType;
183 } 181 }
184 182
185 return this; 183 return this;
186} 184}
187 185
188Clipperz.Crypto.ECC.BinaryField.WordArrayValue.prototype = MochiKit.Base.update(new Clipperz.Crypto.ECC.BinaryField.AbstractValue(), { 186Clipperz.Crypto.ECC.BinaryField.WordArrayValue.prototype = MochiKit.Base.update(new Clipperz.Crypto.ECC.BinaryField.AbstractValue(), {
189 187
190 'value': function() { 188 'value': function() {
191 return this._value; 189 return this._value;
192 }, 190 },
193 191
194 //----------------------------------------------------------------------------- 192 //-----------------------------------------------------------------------------
195 193
196 'wordSize': function() { 194 'wordSize': function() {
197 return this._value.length 195 return this._value.length
198 }, 196 },
199 197
200 //----------------------------------------------------------------------------- 198 //-----------------------------------------------------------------------------
201 199
202 'clone': function() { 200 'clone': function() {
203 return new Clipperz.Crypto.ECC.BinaryField.WordArrayValue(this._value.slice(0)); 201 return new Clipperz.Crypto.ECC.BinaryField.WordArrayValue(this._value.slice(0));
204 }, 202 },
205 203
206 //----------------------------------------------------------------------------- 204 //-----------------------------------------------------------------------------
207 205
208 'isZero': function() { 206 'isZero': function() {
209 return (this.compare(Clipperz.Crypto.ECC.BinaryField.WordArrayValue.O) == 0); 207 return (this.compare(Clipperz.Crypto.ECC.BinaryField.WordArrayValue.O) == 0);
210 }, 208 },
211 209
212 //----------------------------------------------------------------------------- 210 //-----------------------------------------------------------------------------
213 211
214 'asString': function(aBase) { 212 'asString': function(aBase) {
215 varresult; 213 varresult;
216 var i,c; 214 var i,c;
217 215
218 if (aBase != 16) { 216 if (aBase != 16) {
219 throw Clipperz.Crypto.ECC.BinaryField.WordArrayValue.exception.UnsupportedBase; 217 throw Clipperz.Crypto.ECC.BinaryField.WordArrayValue.exception.UnsupportedBase;
220 } 218 }
221 219
222 result = ""; 220 result = "";
223 c = this.wordSize(); 221 c = this.wordSize();
224 for (i=0; i<c; i++) { 222 for (i=0; i<c; i++) {
225 varwordAsString; 223 varwordAsString;
226 224
227 // wordAsString = ("00000000" + this.value()[i].toString(16)); 225 // wordAsString = ("00000000" + this.value()[i].toString(16));
228 wordAsString = ("00000000" + this._value[i].toString(16)); 226 wordAsString = ("00000000" + this._value[i].toString(16));
229 wordAsString = wordAsString.substring(wordAsString.length - 8); 227 wordAsString = wordAsString.substring(wordAsString.length - 8);
230 result = wordAsString + result; 228 result = wordAsString + result;
231 } 229 }
232 230
233 result = result.replace(/^(00)* SPACEs THAT SHOULD BE REMOVED TO FIX THIS REGEX /, ""); 231 result = result.replace(/^(00)* SPACEs THAT SHOULD BE REMOVED TO FIX THIS REGEX /, "");
234 232
235 if (result == "") { 233 if (result == "") {
236 result = "0"; 234 result = "0";
237 } 235 }
238 236
239 return result; 237 return result;
240 }, 238 },
241 239
242 //----------------------------------------------------------------------------- 240 //-----------------------------------------------------------------------------
243 241
244 'shiftLeft': function(aNumberOfBitsToShift) { 242 'shiftLeft': function(aNumberOfBitsToShift) {
245 return new Clipperz.Crypto.ECC.BinaryField.WordArrayValue(Clipperz.Crypto.ECC.BinaryField.WordArrayValue.shiftLeft(this._value, aNumberOfBitsToShift)); 243 return new Clipperz.Crypto.ECC.BinaryField.WordArrayValue(Clipperz.Crypto.ECC.BinaryField.WordArrayValue.shiftLeft(this._value, aNumberOfBitsToShift));
246 }, 244 },
247 245
248 //----------------------------------------------------------------------------- 246 //-----------------------------------------------------------------------------
249 247
250 'bitSize': function() { 248 'bitSize': function() {
251 return Clipperz.Crypto.ECC.BinaryField.WordArrayValue.bitSize(this._value); 249 return Clipperz.Crypto.ECC.BinaryField.WordArrayValue.bitSize(this._value);
252 }, 250 },
253 251
254 //----------------------------------------------------------------------------- 252 //-----------------------------------------------------------------------------
255 253
256 'isBitSet': function(aBitPosition) { 254 'isBitSet': function(aBitPosition) {
257 return Clipperz.Crypto.ECC.BinaryField.WordArrayValue.isBitSet(this._value, aBitPosition); 255 return Clipperz.Crypto.ECC.BinaryField.WordArrayValue.isBitSet(this._value, aBitPosition);
258 }, 256 },
259 257
260 //----------------------------------------------------------------------------- 258 //-----------------------------------------------------------------------------
261 259
262 'xor': function(aValue) { 260 'xor': function(aValue) {
263 return new Clipperz.Crypto.ECC.BinaryField.WordArrayValue(Clipperz.Crypto.ECC.BinaryField.WordArrayValue.xor(this._value, aValue._value)); 261 return new Clipperz.Crypto.ECC.BinaryField.WordArrayValue(Clipperz.Crypto.ECC.BinaryField.WordArrayValue.xor(this._value, aValue._value));
264 }, 262 },
265 263
266 //----------------------------------------------------------------------------- 264 //-----------------------------------------------------------------------------
267 265
268 'compare': function(aValue) { 266 'compare': function(aValue) {
269 return Clipperz.Crypto.ECC.BinaryField.WordArrayValue.compare(this._value, aValue._value); 267 return Clipperz.Crypto.ECC.BinaryField.WordArrayValue.compare(this._value, aValue._value);
270 }, 268 },
271 269
272 //----------------------------------------------------------------------------- 270 //-----------------------------------------------------------------------------
273 __syntaxFix__: "syntax fix" 271 __syntaxFix__: "syntax fix"
274}); 272});
275 273
276Clipperz.Crypto.ECC.BinaryField.WordArrayValue.O = new Clipperz.Crypto.ECC.BinaryField.WordArrayValue('0', 16); 274Clipperz.Crypto.ECC.BinaryField.WordArrayValue.O = new Clipperz.Crypto.ECC.BinaryField.WordArrayValue('0', 16);
277Clipperz.Crypto.ECC.BinaryField.WordArrayValue.I = new Clipperz.Crypto.ECC.BinaryField.WordArrayValue('1', 16); 275Clipperz.Crypto.ECC.BinaryField.WordArrayValue.I = new Clipperz.Crypto.ECC.BinaryField.WordArrayValue('1', 16);
278 276
279Clipperz.Crypto.ECC.BinaryField.WordArrayValue.xor = function(a, b) { 277Clipperz.Crypto.ECC.BinaryField.WordArrayValue.xor = function(a, b) {
280 var result; 278 var result;
281 var resultSize; 279 var resultSize;
282 var i,c; 280 var i,c;
283 281
284 resultSize = Math.max(a.length, b.length); 282 resultSize = Math.max(a.length, b.length);
285 283
286 result = new Array(resultSize); 284 result = new Array(resultSize);
287 c = resultSize; 285 c = resultSize;
288 for (i=0; i<c; i++) { 286 for (i=0; i<c; i++) {
289 // resultValue[i] = (((this.value()[i] || 0) ^ (aValue.value()[i] || 0)) >>> 0); 287 // resultValue[i] = (((this.value()[i] || 0) ^ (aValue.value()[i] || 0)) >>> 0);
290 result[i] = (((a[i] || 0) ^ (b[i] || 0)) >>> 0); 288 result[i] = (((a[i] || 0) ^ (b[i] || 0)) >>> 0);
291 } 289 }
292 290
293 return result; 291 return result;
294}; 292};
295 293
296Clipperz.Crypto.ECC.BinaryField.WordArrayValue.shiftLeft = function(aWordArray, aNumberOfBitsToShift) { 294Clipperz.Crypto.ECC.BinaryField.WordArrayValue.shiftLeft = function(aWordArray, aNumberOfBitsToShift) {
297 var numberOfWordsToShift; 295 var numberOfWordsToShift;
298 varnumberOfBitsToShift; 296 varnumberOfBitsToShift;
299 var result; 297 var result;
300 varoverflowValue; 298 varoverflowValue;
301 vari,c; 299 vari,c;
302 300
303 numberOfWordsToShift = Math.floor(aNumberOfBitsToShift / 32); 301 numberOfWordsToShift = Math.floor(aNumberOfBitsToShift / 32);
304 numberOfBitsToShift = aNumberOfBitsToShift % 32; 302 numberOfBitsToShift = aNumberOfBitsToShift % 32;
305 303
306 result = new Array(aWordArray.length + numberOfWordsToShift); 304 result = new Array(aWordArray.length + numberOfWordsToShift);
307 305
308 c = numberOfWordsToShift; 306 c = numberOfWordsToShift;
309 for (i=0; i<c; i++) { 307 for (i=0; i<c; i++) {
310 result[i] = 0; 308 result[i] = 0;
311 } 309 }
312 310
313 overflowValue = 0; 311 overflowValue = 0;
314 nextOverflowValue = 0; 312 nextOverflowValue = 0;
315 313
316 c = aWordArray.length; 314 c = aWordArray.length;
317 for (i=0; i<c; i++) { 315 for (i=0; i<c; i++) {
318 varvalue; 316 varvalue;
319 varresultWord; 317 varresultWord;
320 318
321 // value = this.value()[i]; 319 // value = this.value()[i];
322 value = aWordArray[i]; 320 value = aWordArray[i];
323 321
324 if (numberOfBitsToShift > 0) { 322 if (numberOfBitsToShift > 0) {
325 var nextOverflowValue; 323 var nextOverflowValue;
326 324
327 nextOverflowValue = (value >>> (32 - numberOfBitsToShift)); 325 nextOverflowValue = (value >>> (32 - numberOfBitsToShift));
328 value = value & (0xffffffff >>> numberOfBitsToShift); 326 value = value & (0xffffffff >>> numberOfBitsToShift);
329 resultWord = (((value << numberOfBitsToShift) | overflowValue) >>> 0); 327 resultWord = (((value << numberOfBitsToShift) | overflowValue) >>> 0);
330 } else { 328 } else {
331 resultWord = value; 329 resultWord = value;
332 } 330 }
333 331
334 result[i+numberOfWordsToShift] = resultWord; 332 result[i+numberOfWordsToShift] = resultWord;
335 overflowValue = nextOverflowValue; 333 overflowValue = nextOverflowValue;
336 } 334 }
337 335
338 if (overflowValue != 0) { 336 if (overflowValue != 0) {
339 result[aWordArray.length + numberOfWordsToShift] = overflowValue; 337 result[aWordArray.length + numberOfWordsToShift] = overflowValue;
340 } 338 }
341 339
342 return result; 340 return result;
343}; 341};
344 342
345Clipperz.Crypto.ECC.BinaryField.WordArrayValue.bitSize = function(aWordArray) { 343Clipperz.Crypto.ECC.BinaryField.WordArrayValue.bitSize = function(aWordArray) {
346 varresult; 344 varresult;
347 varnotNullElements; 345 varnotNullElements;
348 var mostValuableWord; 346 var mostValuableWord;
349 var matchingBitsInMostImportantWord; 347 var matchingBitsInMostImportantWord;
350 var mask; 348 var mask;
351 var i,c; 349 var i,c;
352 350
353 notNullElements = aWordArray.length; 351 notNullElements = aWordArray.length;
354 352
355 if ((aWordArray.length == 1) && (aWordArray[0] == 0)) { 353 if ((aWordArray.length == 1) && (aWordArray[0] == 0)) {
356 result = 0; 354 result = 0;
357 } else { 355 } else {
358 while((aWordArray[notNullElements - 1] == 0) && (notNullElements > 0)) { 356 while((aWordArray[notNullElements - 1] == 0) && (notNullElements > 0)) {
359 notNullElements --; 357 notNullElements --;
360 } 358 }
361 359
362 result = (notNullElements - 1) * 32; 360 result = (notNullElements - 1) * 32;
363 mostValuableWord = aWordArray[notNullElements - 1]; 361 mostValuableWord = aWordArray[notNullElements - 1];
364 362
365 matchingBits = 32; 363 matchingBits = 32;
366 mask = 0x80000000; 364 mask = 0x80000000;
367 365
368 while ((matchingBits > 0) && ((mostValuableWord & mask) == 0)) { 366 while ((matchingBits > 0) && ((mostValuableWord & mask) == 0)) {
369 matchingBits --; 367 matchingBits --;
370 mask >>>= 1; 368 mask >>>= 1;
371 } 369 }
372 370
373 result += matchingBits; 371 result += matchingBits;
374 } 372 }
375 373
376 return result; 374 return result;
377}; 375};
378 376
379Clipperz.Crypto.ECC.BinaryField.WordArrayValue.isBitSet = function(aWordArray, aBitPosition) { 377Clipperz.Crypto.ECC.BinaryField.WordArrayValue.isBitSet = function(aWordArray, aBitPosition) {
380 var result; 378 var result;
381 varbyteIndex; 379 varbyteIndex;
382 var bitIndexInSelectedByte; 380 var bitIndexInSelectedByte;
383 381
384 byteIndex = Math.floor(aBitPosition / 32); 382 byteIndex = Math.floor(aBitPosition / 32);
385 bitIndexInSelectedByte = aBitPosition % 32; 383 bitIndexInSelectedByte = aBitPosition % 32;
386 384
387 if (byteIndex <= aWordArray.length) { 385 if (byteIndex <= aWordArray.length) {
388 result = ((aWordArray[byteIndex] & (1 << bitIndexInSelectedByte)) != 0); 386 result = ((aWordArray[byteIndex] & (1 << bitIndexInSelectedByte)) != 0);
389 } else { 387 } else {
390 result = false; 388 result = false;
391 } 389 }
392 390
393 return result; 391 return result;
394}; 392};
395 393
396Clipperz.Crypto.ECC.BinaryField.WordArrayValue.compare = function(a,b) { 394Clipperz.Crypto.ECC.BinaryField.WordArrayValue.compare = function(a,b) {
397 varresult; 395 varresult;
398 var i,c; 396 var i,c;
399 397
400 result = MochiKit.Base.compare(a.length, b.length); 398 result = MochiKit.Base.compare(a.length, b.length);
401 399
402 c = a.length; 400 c = a.length;
403 for (i=0; (i<c) && (result==0); i++) { 401 for (i=0; (i<c) && (result==0); i++) {
404//console.log("compare[" + c + " - " + i + " - 1] " + this.value()[c-i-1] + ", " + aValue.value()[c-i-1]); 402//console.log("compare[" + c + " - " + i + " - 1] " + 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]); 403 // result = MochiKit.Base.compare(this.value()[c-i-1], aValue.value()[c-i-1]);
406 result = MochiKit.Base.compare(a[c-i-1], b[c-i-1]); 404 result = MochiKit.Base.compare(a[c-i-1], b[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 01127c3..c39a075 100644
--- a/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Curve.js
+++ b/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Curve.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { 24try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) {
27 throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!"; 25 throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!";
28} 26}
29if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; } 27if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; }
30if (typeof(Clipperz.Crypto.ECC.BinaryField) == 'undefined') { Clipperz.Crypto.ECC.BinaryField = {}; } 28if (typeof(Clipperz.Crypto.ECC.BinaryField) == 'undefined') { Clipperz.Crypto.ECC.BinaryField = {}; }
31 29
32Clipperz.Crypto.ECC.BinaryField.Curve = function(args) { 30Clipperz.Crypto.ECC.BinaryField.Curve = function(args) {
33 args = args || {}; 31 args = args || {};
34 32
35 this._modulus = args.modulus; 33 this._modulus = args.modulus;
36 34
37 this._a = args.a; 35 this._a = args.a;
38 this._b = args.b; 36 this._b = args.b;
39 this._G = args.G; 37 this._G = args.G;
40 this._r = args.r; 38 this._r = args.r;
41 this._h = args.h; 39 this._h = args.h;
42 40
43 this._finiteField = null; 41 this._finiteField = null;
44 42
45 return this; 43 return this;
46} 44}
47 45
48Clipperz.Crypto.ECC.BinaryField.Curve.prototype = MochiKit.Base.update(null, { 46Clipperz.Crypto.ECC.BinaryField.Curve.prototype = MochiKit.Base.update(null, {
49 47
50 'asString': function() { 48 'asString': function() {
51 return "Clipperz.Crypto.ECC.BinaryField.Curve"; 49 return "Clipperz.Crypto.ECC.BinaryField.Curve";
52 }, 50 },
53 51
54 //----------------------------------------------------------------------------- 52 //-----------------------------------------------------------------------------
55 53
56 'modulus': function() { 54 'modulus': function() {
57 return this._modulus; 55 return this._modulus;
58 }, 56 },
59 57
60 'a': function() { 58 'a': function() {
61 return this._a; 59 return this._a;
62 }, 60 },
63 61
64 'b': function() { 62 'b': function() {
65 return this._b; 63 return this._b;
66 }, 64 },
67 65
68 'G': function() { 66 'G': function() {
69 return this._G; 67 return this._G;
70 }, 68 },
71 69
72 'r': function() { 70 'r': function() {
73 return this._r; 71 return this._r;
74 }, 72 },
75 73
76 'h': function() { 74 'h': function() {
77 return this._h; 75 return this._h;
78 }, 76 },
79 77
80 //----------------------------------------------------------------------------- 78 //-----------------------------------------------------------------------------
81 79
82 'finiteField': function() { 80 'finiteField': function() {
83 if (this._finiteField == null) { 81 if (this._finiteField == null) {
84 this._finiteField = new Clipperz.Crypto.ECC.BinaryField.FiniteField({modulus:this.modulus()}) 82 this._finiteField = new Clipperz.Crypto.ECC.BinaryField.FiniteField({modulus:this.modulus()})
85 } 83 }
86 84
87 return this._finiteField; 85 return this._finiteField;
88 }, 86 },
89 87
90 //----------------------------------------------------------------------------- 88 //-----------------------------------------------------------------------------
91 89
92 'negate': function(aPointA) { 90 'negate': function(aPointA) {
93 var result; 91 var result;
94 92
95 result = new Clipperz.Crypto.ECC.Point({x:aPointA.x(), y:this.finiteField().add(aPointA.y(), aPointA.x())}) 93 result = new Clipperz.Crypto.ECC.Point({x:aPointA.x(), y:this.finiteField().add(aPointA.y(), aPointA.x())})
96 94
97 return result; 95 return result;
98 }, 96 },
99 97
100 //----------------------------------------------------------------------------- 98 //-----------------------------------------------------------------------------
101 99
102 'add': function(aPointA, aPointB) { 100 'add': function(aPointA, aPointB) {
103 var result; 101 var result;
104 102
105//console.log(">>> ECC.BinaryField.Curve.add"); 103//console.log(">>> ECC.BinaryField.Curve.add");
106 if (aPointA.isZero()) { 104 if (aPointA.isZero()) {
107//console.log("--- pointA == zero"); 105//console.log("--- pointA == zero");
108 result = aPointB; 106 result = aPointB;
109 } else if (aPointB.isZero()) { 107 } else if (aPointB.isZero()) {
110//console.log("--- pointB == zero"); 108//console.log("--- pointB == zero");
111 result = aPointA; 109 result = aPointA;
112 } else if ((aPointA.x().compare(aPointB.x()) == 0) && ((aPointA.y().compare(aPointB.y()) != 0) || aPointB.x().isZero())) { 110 } else if ((aPointA.x().compare(aPointB.x()) == 0) && ((aPointA.y().compare(aPointB.y()) != 0) || aPointB.x().isZero())) {
113//console.log("compare A.x - B.x: ", aPointA.x().compare(aPointB.x())); 111//console.log("compare A.x - B.x: ", aPointA.x().compare(aPointB.x()));
114//console.log("compare A.y - B.y: ", (aPointA.y().compare(aPointB.y()) != 0)); 112//console.log("compare A.y - B.y: ", (aPointA.y().compare(aPointB.y()) != 0));
115//console.log("compare B.x.isZero(): ", aPointB.x().isZero()); 113//console.log("compare B.x.isZero(): ", aPointB.x().isZero());
116 114
117//console.log("--- result = zero"); 115//console.log("--- result = zero");
118 result = new Clipperz.Crypto.ECC.BinaryField.Point({x:Clipperz.Crypto.ECC.BinaryField.Value.O, y:Clipperz.Crypto.ECC.BinaryField.Value.O}); 116 result = new Clipperz.Crypto.ECC.BinaryField.Point({x:Clipperz.Crypto.ECC.BinaryField.Value.O, y:Clipperz.Crypto.ECC.BinaryField.Value.O});
119 } else { 117 } else {
120//console.log("--- result = ELSE"); 118//console.log("--- result = ELSE");
121 varf2m; 119 varf2m;
122 var x, y; 120 var x, y;
123 var lambda; 121 var lambda;
124 var aX, aY, bX, bY; 122 var aX, aY, bX, bY;
125 123
126 aX = aPointA.x()._value; 124 aX = aPointA.x()._value;
127 aY = aPointA.y()._value; 125 aY = aPointA.y()._value;
128 bX = aPointB.x()._value; 126 bX = aPointB.x()._value;
129 bY = aPointB.y()._value; 127 bY = aPointB.y()._value;
130 128
131 f2m = this.finiteField(); 129 f2m = this.finiteField();
132 130
133 if (aPointA.x().compare(aPointB.x()) != 0) { 131 if (aPointA.x().compare(aPointB.x()) != 0) {
134//console.log(" a.x != b.x"); 132//console.log(" a.x != b.x");
135 lambda =f2m._fastMultiply( 133 lambda =f2m._fastMultiply(
136 f2m._add(aY, bY), 134 f2m._add(aY, bY),
137 f2m._inverse(f2m._add(aX, bX)) 135 f2m._inverse(f2m._add(aX, bX))
138 ); 136 );
139 x = f2m._add(this.a()._value, f2m._square(lambda)); 137 x = f2m._add(this.a()._value, f2m._square(lambda));
140 f2m._overwriteAdd(x, lambda); 138 f2m._overwriteAdd(x, lambda);
141 f2m._overwriteAdd(x, aX); 139 f2m._overwriteAdd(x, aX);
142 f2m._overwriteAdd(x, bX); 140 f2m._overwriteAdd(x, bX);
143 } else { 141 } else {
144//console.log(" a.x == b.x"); 142//console.log(" a.x == b.x");
145 lambda = f2m._add(bX, f2m._fastMultiply(bY, f2m._inverse(bX))); 143 lambda = f2m._add(bX, f2m._fastMultiply(bY, f2m._inverse(bX)));
146//console.log(" lambda: " + lambda.asString(16)); 144//console.log(" lambda: " + lambda.asString(16));
147 x = f2m._add(this.a()._value, f2m._square(lambda)); 145 x = f2m._add(this.a()._value, f2m._square(lambda));
148//console.log(" x (step 1): " + x.asString(16)); 146//console.log(" x (step 1): " + x.asString(16));
149 f2m._overwriteAdd(x, lambda); 147 f2m._overwriteAdd(x, lambda);
150//console.log(" x (step 2): " + x.asString(16)); 148//console.log(" x (step 2): " + x.asString(16));
151 } 149 }
152 150
153 y = f2m._fastMultiply(f2m._add(bX, x), lambda); 151 y = f2m._fastMultiply(f2m._add(bX, x), lambda);
154//console.log(" y (step 1): " + y.asString(16)); 152//console.log(" y (step 1): " + y.asString(16));
155 f2m._overwriteAdd(y, x); 153 f2m._overwriteAdd(y, x);
156//console.log(" y (step 2): " + y.asString(16)); 154//console.log(" y (step 2): " + y.asString(16));
157 f2m._overwriteAdd(y, bY); 155 f2m._overwriteAdd(y, bY);
158//console.log(" y (step 3): " + y.asString(16)); 156//console.log(" y (step 3): " + y.asString(16));
159 157
160 result = new Clipperz.Crypto.ECC.BinaryField.Point({x:new Clipperz.Crypto.ECC.BinaryField.Value(x), y:new Clipperz.Crypto.ECC.BinaryField.Value(y)}) 158 result = new Clipperz.Crypto.ECC.BinaryField.Point({x:new Clipperz.Crypto.ECC.BinaryField.Value(x), y:new Clipperz.Crypto.ECC.BinaryField.Value(y)})
161 } 159 }
162//console.log("<<< ECC.BinaryField.Curve.add"); 160//console.log("<<< ECC.BinaryField.Curve.add");
163 161
164 return result; 162 return result;
165 }, 163 },
166 164
167 //----------------------------------------------------------------------------- 165 //-----------------------------------------------------------------------------
168 166
169 'overwriteAdd': function(aPointA, aPointB) { 167 'overwriteAdd': function(aPointA, aPointB) {
170 if (aPointA.isZero()) { 168 if (aPointA.isZero()) {
171 // result = aPointB; 169 // result = aPointB;
172 aPointA._x._value = aPointB._x._value; 170 aPointA._x._value = aPointB._x._value;
173 aPointA._y._value = aPointB._y._value; 171 aPointA._y._value = aPointB._y._value;
174 } else if (aPointB.isZero()) { 172 } else if (aPointB.isZero()) {
175 // result = aPointA; 173 // result = aPointA;
176 } else if ((aPointA.x().compare(aPointB.x()) == 0) && ((aPointA.y().compare(aPointB.y()) != 0) || aPointB.x().isZero())) { 174 } else if ((aPointA.x().compare(aPointB.x()) == 0) && ((aPointA.y().compare(aPointB.y()) != 0) || aPointB.x().isZero())) {
177 // result = new Clipperz.Crypto.ECC.BinaryField.Point({x:Clipperz.Crypto.ECC.BinaryField.Value.O, y:Clipperz.Crypto.ECC.BinaryField.Value.O}); 175 // result = new Clipperz.Crypto.ECC.BinaryField.Point({x:Clipperz.Crypto.ECC.BinaryField.Value.O, y:Clipperz.Crypto.ECC.BinaryField.Value.O});
178 aPointA._x = Clipperz.Crypto.ECC.BinaryField.Value.O; 176 aPointA._x = Clipperz.Crypto.ECC.BinaryField.Value.O;
179 aPointA._y = Clipperz.Crypto.ECC.BinaryField.Value.O; 177 aPointA._y = Clipperz.Crypto.ECC.BinaryField.Value.O;
180 } else { 178 } else {
181 varf2m; 179 varf2m;
182 var x, y; 180 var x, y;
183 var lambda; 181 var lambda;
184 var aX, aY, bX, bY; 182 var aX, aY, bX, bY;
185 183
186 aX = aPointA.x()._value; 184 aX = aPointA.x()._value;
187 aY = aPointA.y()._value; 185 aY = aPointA.y()._value;
188 bX = aPointB.x()._value; 186 bX = aPointB.x()._value;
189 bY = aPointB.y()._value; 187 bY = aPointB.y()._value;
190 188
191 f2m = this.finiteField(); 189 f2m = this.finiteField();
192 190
193 if (aPointA.x().compare(aPointB.x()) != 0) { 191 if (aPointA.x().compare(aPointB.x()) != 0) {
194//console.log(" a.x != b.x"); 192//console.log(" a.x != b.x");
195 lambda =f2m._fastMultiply( 193 lambda =f2m._fastMultiply(
196 f2m._add(aY, bY), 194 f2m._add(aY, bY),
197 f2m._inverse(f2m._add(aX, bX)) 195 f2m._inverse(f2m._add(aX, bX))
198 ); 196 );
199 x = f2m._add(this.a()._value, f2m._square(lambda)); 197 x = f2m._add(this.a()._value, f2m._square(lambda));
200 f2m._overwriteAdd(x, lambda); 198 f2m._overwriteAdd(x, lambda);
201 f2m._overwriteAdd(x, aX); 199 f2m._overwriteAdd(x, aX);
202 f2m._overwriteAdd(x, bX); 200 f2m._overwriteAdd(x, bX);
203 } else { 201 } else {
204//console.log(" a.x == b.x"); 202//console.log(" a.x == b.x");
205 lambda = f2m._add(bX, f2m._fastMultiply(bY, f2m._inverse(bX))); 203 lambda = f2m._add(bX, f2m._fastMultiply(bY, f2m._inverse(bX)));
206//console.log(" lambda: " + lambda.asString(16)); 204//console.log(" lambda: " + lambda.asString(16));
207 x = f2m._add(this.a()._value, f2m._square(lambda)); 205 x = f2m._add(this.a()._value, f2m._square(lambda));
208//console.log(" x (step 1): " + x.asString(16)); 206//console.log(" x (step 1): " + x.asString(16));
209 f2m._overwriteAdd(x, lambda); 207 f2m._overwriteAdd(x, lambda);
210//console.log(" x (step 2): " + x.asString(16)); 208//console.log(" x (step 2): " + x.asString(16));
211 } 209 }
212 210
213 y = f2m._fastMultiply(f2m._add(bX, x), lambda); 211 y = f2m._fastMultiply(f2m._add(bX, x), lambda);
214//console.log(" y (step 1): " + y.asString(16)); 212//console.log(" y (step 1): " + y.asString(16));
215 f2m._overwriteAdd(y, x); 213 f2m._overwriteAdd(y, x);
216//console.log(" y (step 2): " + y.asString(16)); 214//console.log(" y (step 2): " + y.asString(16));
217 f2m._overwriteAdd(y, bY); 215 f2m._overwriteAdd(y, bY);
218//console.log(" y (step 3): " + y.asString(16)); 216//console.log(" y (step 3): " + y.asString(16));
219 217
220 // result = new Clipperz.Crypto.ECC.BinaryField.Point({x:new Clipperz.Crypto.ECC.BinaryField.Value(x), y:new Clipperz.Crypto.ECC.BinaryField.Value(y)}) 218 // result = new Clipperz.Crypto.ECC.BinaryField.Point({x:new Clipperz.Crypto.ECC.BinaryField.Value(x), y:new Clipperz.Crypto.ECC.BinaryField.Value(y)})
221 aPointA._x._value = x; 219 aPointA._x._value = x;
222 aPointA._y._value = y; 220 aPointA._y._value = y;
223 221
224 } 222 }
225//console.log("<<< ECC.BinaryField.Curve.add"); 223//console.log("<<< ECC.BinaryField.Curve.add");
226 224
227 return result; 225 return result;
228 }, 226 },
229 227
230 //----------------------------------------------------------------------------- 228 //-----------------------------------------------------------------------------
231 229
232 'multiply': function(aValue, aPoint) { 230 'multiply': function(aValue, aPoint) {
233 var result; 231 var result;
234 232
235//console.profile(); 233//console.profile();
236 result = new Clipperz.Crypto.ECC.BinaryField.Point({x:Clipperz.Crypto.ECC.BinaryField.Value.O, y:Clipperz.Crypto.ECC.BinaryField.Value.O}); 234 result = new Clipperz.Crypto.ECC.BinaryField.Point({x:Clipperz.Crypto.ECC.BinaryField.Value.O, y:Clipperz.Crypto.ECC.BinaryField.Value.O});
237 235
238 if (aValue.isZero() == false) { 236 if (aValue.isZero() == false) {
239 var k, Q; 237 var k, Q;
240 var i; 238 var i;
241 var countIndex; countIndex = 0; 239 var countIndex; countIndex = 0;
242 240
243 if (aValue.compare(Clipperz.Crypto.ECC.BinaryField.Value.O) > 0) { 241 if (aValue.compare(Clipperz.Crypto.ECC.BinaryField.Value.O) > 0) {
244 k = aValue; 242 k = aValue;
245 Q = aPoint; 243 Q = aPoint;
246 } else { 244 } else {
247MochiKit.Logging.logError("The Clipperz.Crypto.ECC.BinaryFields.Value does not work with negative values!!!!"); 245MochiKit.Logging.logError("The Clipperz.Crypto.ECC.BinaryFields.Value does not work with negative values!!!!");
248 k = aValue.negate(); 246 k = aValue.negate();
249 Q = this.negate(aPoint); 247 Q = this.negate(aPoint);
250 } 248 }
251 249
252//console.log("k: " + k.toString(16)); 250//console.log("k: " + k.toString(16));
253//console.log("k.bitSize: " + k.bitSize()); 251//console.log("k.bitSize: " + k.bitSize());
254 for (i=k.bitSize()-1; i>=0; i--) { 252 for (i=k.bitSize()-1; i>=0; i--) {
255 result = this.add(result, result); 253 result = this.add(result, result);
256 // this.overwriteAdd(result, result); 254 // this.overwriteAdd(result, result);
257 if (k.isBitSet(i)) { 255 if (k.isBitSet(i)) {
258 result = this.add(result, Q); 256 result = this.add(result, Q);
259 // this.overwriteAdd(result, Q); 257 // this.overwriteAdd(result, Q);
260 } 258 }
261 259
262 // if (countIndex==100) {console.log("multiply.break"); break;} else countIndex++; 260 // if (countIndex==100) {console.log("multiply.break"); break;} else countIndex++;
263 } 261 }
264 } 262 }
265//console.profileEnd(); 263//console.profileEnd();
266 264
267 return result; 265 return result;
268 }, 266 },
269 267
270 //----------------------------------------------------------------------------- 268 //-----------------------------------------------------------------------------
271 __syntaxFix__: "syntax fix" 269 __syntaxFix__: "syntax fix"
272}); 270});
273 271
274 272
275//############################################################################# 273//#############################################################################
276 274
277Clipperz.Crypto.ECC.StandardCurves = {}; 275Clipperz.Crypto.ECC.StandardCurves = {};
278 276
279MochiKit.Base.update(Clipperz.Crypto.ECC.StandardCurves, { 277MochiKit.Base.update(Clipperz.Crypto.ECC.StandardCurves, {
280/* 278/*
281 '_K571': null, 279 '_K571': null,
282 'K571': function() { 280 'K571': function() {
283 if (Clipperz.Crypto.ECC.StandardCurves._K571 == null) { 281 if (Clipperz.Crypto.ECC.StandardCurves._K571 == null) {
284 Clipperz.Crypto.ECC.StandardCurves._K571 = new Clipperz.Crypto.ECC.Curve.Koblitz({ 282 Clipperz.Crypto.ECC.StandardCurves._K571 = new Clipperz.Crypto.ECC.Curve.Koblitz({
285 exadecimalForm: '80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425', 283 exadecimalForm: '80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425',
286 a: new Clipperz.Crypto.BigInt(0), 284 a: new Clipperz.Crypto.BigInt(0),
287 G: new Clipperz.Crypto.ECC.Point({ 285 G: new Clipperz.Crypto.ECC.Point({
288 x: new Clipperz.Crypto.BigInt('26eb7a859923fbc82189631f8103fe4ac9ca2970012d5d46024804801841ca44370958493b205e647da304db4ceb08cbbd1ba39494776fb988b47174dca88c7e2945283a01c8972', 16), 286 x: new Clipperz.Crypto.BigInt('26eb7a859923fbc82189631f8103fe4ac9ca2970012d5d46024804801841ca44370958493b205e647da304db4ceb08cbbd1ba39494776fb988b47174dca88c7e2945283a01c8972', 16),
289 y: new Clipperz.Crypto.BigInt('349dc807f4fbf374f4aeade3bca95314dd58cec9f307a54ffc61efc006d8a2c9d4979c0ac44aea74fbebbb9f772aedcb620b01a7ba7af1b320430c8591984f601cd4c143ef1c7a3', 16) 287 y: new Clipperz.Crypto.BigInt('349dc807f4fbf374f4aeade3bca95314dd58cec9f307a54ffc61efc006d8a2c9d4979c0ac44aea74fbebbb9f772aedcb620b01a7ba7af1b320430c8591984f601cd4c143ef1c7a3', 16)
290 }), 288 }),
291 n: new Clipperz.Crypto.BigInt('1932268761508629172347675945465993672149463664853217499328617625725759571144780212268133978522706711834706712800825351461273674974066617311929682421617092503555733685276673', 16), 289 n: new Clipperz.Crypto.BigInt('1932268761508629172347675945465993672149463664853217499328617625725759571144780212268133978522706711834706712800825351461273674974066617311929682421617092503555733685276673', 16),
292 h: new Clipperz.Crypto.BigInt(4) 290 h: new Clipperz.Crypto.BigInt(4)
293 }); 291 });
294 } 292 }
295 293
296 return Clipperz.Crypto.ECC.StandardCurves._K571; 294 return Clipperz.Crypto.ECC.StandardCurves._K571;
297 }, 295 },
298*/ 296*/
299 //----------------------------------------------------------------------------- 297 //-----------------------------------------------------------------------------
300 298
301 '_B571': null, 299 '_B571': null,
302 'B571': function() { //f(z) = z^571 + z^10 + z^5 + z^2 + 1 300 'B571': function() { //f(z) = z^571 + z^10 + z^5 + z^2 + 1
303 if (Clipperz.Crypto.ECC.StandardCurves._B571 == null) { 301 if (Clipperz.Crypto.ECC.StandardCurves._B571 == null) {
304 Clipperz.Crypto.ECC.StandardCurves._B571 = new Clipperz.Crypto.ECC.BinaryField.Curve({ 302 Clipperz.Crypto.ECC.StandardCurves._B571 = new Clipperz.Crypto.ECC.BinaryField.Curve({
305 modulus: new Clipperz.Crypto.ECC.BinaryField.Value('80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425', 16), 303 modulus: new Clipperz.Crypto.ECC.BinaryField.Value('80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425', 16),
306 a: new Clipperz.Crypto.ECC.BinaryField.Value('1', 16), 304 a: new Clipperz.Crypto.ECC.BinaryField.Value('1', 16),
307 b: new Clipperz.Crypto.ECC.BinaryField.Value('02f40e7e2221f295de297117b7f3d62f5c6a97ffcb8ceff1cd6ba8ce4a9a18ad84ffabbd8efa59332be7ad6756a66e294afd185a78ff12aa520e4de739baca0c7ffeff7f2955727a', 16), 305 b: new Clipperz.Crypto.ECC.BinaryField.Value('02f40e7e2221f295de297117b7f3d62f5c6a97ffcb8ceff1cd6ba8ce4a9a18ad84ffabbd8efa59332be7ad6756a66e294afd185a78ff12aa520e4de739baca0c7ffeff7f2955727a', 16),
308 G: new Clipperz.Crypto.ECC.BinaryField.Point({ 306 G: new Clipperz.Crypto.ECC.BinaryField.Point({
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), 307 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),
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) 308 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)
311 }), 309 }),
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), 310 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),
313 h: new Clipperz.Crypto.ECC.BinaryField.Value('2', 16) 311 h: new Clipperz.Crypto.ECC.BinaryField.Value('2', 16)
314 312
315 // S: new Clipperz.Crypto.ECC.BinaryField.Value('2aa058f73a0e33ab486b0f610410c53a7f132310', 10), 313 // S: new Clipperz.Crypto.ECC.BinaryField.Value('2aa058f73a0e33ab486b0f610410c53a7f132310', 10),
316 // n: new Clipperz.Crypto.ECC.BinaryField.Value('03ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe661ce18ff55987308059b186823851ec7dd9ca1161de93d5174d66e8382e9bb2fe84e47', 16), 314 // n: new Clipperz.Crypto.ECC.BinaryField.Value('03ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe661ce18ff55987308059b186823851ec7dd9ca1161de93d5174d66e8382e9bb2fe84e47', 16),
317 }); 315 });
318 316
319 //----------------------------------------------------------------------------- 317 //-----------------------------------------------------------------------------
320 // 318 //
321 //Guide to Elliptic Curve Cryptography 319 //Guide to Elliptic Curve Cryptography
322 //Darrel Hankerson, Alfred Menezes, Scott Vanstone 320 //Darrel Hankerson, Alfred Menezes, Scott Vanstone
323 //- Pag: 56, Alorithm 2.45 (with a typo!!!) 321 //- Pag: 56, Alorithm 2.45 (with a typo!!!)
324 // 322 //
325 //----------------------------------------------------------------------------- 323 //-----------------------------------------------------------------------------
326 // 324 //
327 // http://www.milw0rm.com/papers/136 325 // http://www.milw0rm.com/papers/136
328 // 326 //
329 // ------------------------------------------------------------------------- 327 // -------------------------------------------------------------------------
330 // Polynomial Reduction Algorithm Modulo f571 328 // Polynomial Reduction Algorithm Modulo f571
331 // ------------------------------------------------------------------------- 329 // -------------------------------------------------------------------------
332 // 330 //
333 // Input: Polynomial p(x) of degree 1140 or less, stored as 331 // Input: Polynomial p(x) of degree 1140 or less, stored as
334 // an array of 2T machinewords. 332 // an array of 2T machinewords.
335 // Output: p(x) mod f571(x) 333 // Output: p(x) mod f571(x)
336 // 334 //
337 // FOR i = T-1, ..., 0 DO 335 // FOR i = T-1, ..., 0 DO
338 // SET X := P[i+T] 336 // SET X := P[i+T]
339 // P[i] := P[i] ^ (X<<5) ^ (X<<7) ^ (X<<10) ^ (X<<15) 337 // P[i] := P[i] ^ (X<<5) ^ (X<<7) ^ (X<<10) ^ (X<<15)
340 // P[i+1] := P[i+1] ^ (X>>17) ^ (X>>22) ^ (X>>25) ^ (X>>27) 338 // P[i+1] := P[i+1] ^ (X>>17) ^ (X>>22) ^ (X>>25) ^ (X>>27)
341 // 339 //
342 // SET X := P[T-1] >> 27 340 // SET X := P[T-1] >> 27
343 // P[0] := P[0] ^ X ^ (X<<2) ^ (X<<5) ^ (X<<10) 341 // P[0] := P[0] ^ X ^ (X<<2) ^ (X<<5) ^ (X<<10)
344 // P[T-1] := P[T-1] & 0x07ffffff 342 // P[T-1] := P[T-1] & 0x07ffffff
345 // 343 //
346 // RETURN P[T-1],...,P[0] 344 // RETURN P[T-1],...,P[0]
347 // 345 //
348 // ------------------------------------------------------------------------- 346 // -------------------------------------------------------------------------
349 // 347 //
350 Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().slowModule = Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().module; 348 Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().slowModule = Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().module;
351 Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().module = function(aValue) { 349 Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().module = function(aValue) {
352 varresult; 350 varresult;
353 351
354 if (aValue.bitSize() > 1140) { 352 if (aValue.bitSize() > 1140) {
355 MochiKit.Logging.logWarning("ECC.StandarCurves.B571.finiteField().module: falling back to default implementation"); 353 MochiKit.Logging.logWarning("ECC.StandarCurves.B571.finiteField().module: falling back to default implementation");
356 result = Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().slowModule(aValue); 354 result = Clipperz.Crypto.ECC.StandardCurves._B571.finiteField().slowModule(aValue);
357 } else { 355 } else {
358 varC, T; 356 varC, T;
359 var i; 357 var i;
360 358
361//console.log(">>> binaryField.finiteField.(improved)module"); 359//console.log(">>> binaryField.finiteField.(improved)module");
362 // C = aValue.value().slice(0); 360 // C = aValue.value().slice(0);
363 C = aValue._value.slice(0); 361 C = aValue._value.slice(0);
364 for (i=35; i>=18; i--) { 362 for (i=35; i>=18; i--) {
365 T = C[i]; 363 T = C[i];
366 C[i-18] = (((C[i-18] ^ (T<<5) ^ (T<<7) ^ (T<<10) ^ (T<<15)) & 0xffffffff) >>> 0); 364 C[i-18] = (((C[i-18] ^ (T<<5) ^ (T<<7) ^ (T<<10) ^ (T<<15)) & 0xffffffff) >>> 0);
367 C[i-17] = ((C[i-17] ^ (T>>>27) ^ (T>>>25) ^ (T>>>22) ^ (T>>>17)) >>> 0); 365 C[i-17] = ((C[i-17] ^ (T>>>27) ^ (T>>>25) ^ (T>>>22) ^ (T>>>17)) >>> 0);
368 } 366 }
369 T = (C[17] >>> 27); 367 T = (C[17] >>> 27);
370 C[0] = ((C[0] ^ T ^ ((T<<2) ^ (T<<5) ^ (T<<10)) & 0xffffffff) >>> 0); 368 C[0] = ((C[0] ^ T ^ ((T<<2) ^ (T<<5) ^ (T<<10)) & 0xffffffff) >>> 0);
371 C[17] = (C[17] & 0x07ffffff); 369 C[17] = (C[17] & 0x07ffffff);
372 370
373 for(i=18; i<=35; i++) { 371 for(i=18; i<=35; i++) {
374 C[i] = 0; 372 C[i] = 0;
375 } 373 }
376 374
377 result = new Clipperz.Crypto.ECC.BinaryField.Value(C); 375 result = new Clipperz.Crypto.ECC.BinaryField.Value(C);
378//console.log("<<< binaryField.finiteField.(improved)module"); 376//console.log("<<< binaryField.finiteField.(improved)module");
379 } 377 }
380 378
381 return result; 379 return result;
382 }; 380 };
383 } 381 }
384 382
385 return Clipperz.Crypto.ECC.StandardCurves._B571; 383 return Clipperz.Crypto.ECC.StandardCurves._B571;
386 }, 384 },
387 385
388 //----------------------------------------------------------------------------- 386 //-----------------------------------------------------------------------------
389 387
390 '_B283': null, 388 '_B283': null,
391 'B283': function() { //f(z) = z^283 + z^12 + z^7 + z^5 + 1 389 'B283': function() { //f(z) = z^283 + z^12 + z^7 + z^5 + 1
392 if (Clipperz.Crypto.ECC.StandardCurves._B283 == null) { 390 if (Clipperz.Crypto.ECC.StandardCurves._B283 == null) {
393 Clipperz.Crypto.ECC.StandardCurves._B283 = new Clipperz.Crypto.ECC.BinaryField.Curve({ 391 Clipperz.Crypto.ECC.StandardCurves._B283 = new Clipperz.Crypto.ECC.BinaryField.Curve({
394 // modulus: new Clipperz.Crypto.ECC.BinaryField.Value('10000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 000010a1', 16), 392 // modulus: new Clipperz.Crypto.ECC.BinaryField.Value('10000000 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), 393 modulus: new Clipperz.Crypto.ECC.BinaryField.Value('08000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 000010a1', 16),
396 a: new Clipperz.Crypto.ECC.BinaryField.Value('1', 16), 394 a: new Clipperz.Crypto.ECC.BinaryField.Value('1', 16),
397 b: new Clipperz.Crypto.ECC.BinaryField.Value('027b680a c8b8596d a5a4af8a 19a0303f ca97fd76 45309fa2 a581485a f6263e31 3b79a2f5', 16), 395 b: new Clipperz.Crypto.ECC.BinaryField.Value('027b680a c8b8596d a5a4af8a 19a0303f ca97fd76 45309fa2 a581485a f6263e31 3b79a2f5', 16),
398 G: new Clipperz.Crypto.ECC.BinaryField.Point({ 396 G: new Clipperz.Crypto.ECC.BinaryField.Point({
399 x: new Clipperz.Crypto.ECC.BinaryField.Value('05f93925 8db7dd90 e1934f8c 70b0dfec 2eed25b8 557eac9c 80e2e198 f8cdbecd 86b12053', 16), 397 x: new Clipperz.Crypto.ECC.BinaryField.Value('05f93925 8db7dd90 e1934f8c 70b0dfec 2eed25b8 557eac9c 80e2e198 f8cdbecd 86b12053', 16),
400 y: new Clipperz.Crypto.ECC.BinaryField.Value('03676854 fe24141c b98fe6d4 b20d02b4 516ff702 350eddb0 826779c8 13f0df45 be8112f4', 16) 398 y: new Clipperz.Crypto.ECC.BinaryField.Value('03676854 fe24141c b98fe6d4 b20d02b4 516ff702 350eddb0 826779c8 13f0df45 be8112f4', 16)
401 }), 399 }),
402 r: new Clipperz.Crypto.ECC.BinaryField.Value('03ffffff ffffffff ffffffff ffffffff ffffef90 399660fc 938a9016 5b042a7c efadb307', 16), 400 r: new Clipperz.Crypto.ECC.BinaryField.Value('03ffffff ffffffff ffffffff ffffffff ffffef90 399660fc 938a9016 5b042a7c efadb307', 16),
403 h: new Clipperz.Crypto.ECC.BinaryField.Value('2', 16) 401 h: new Clipperz.Crypto.ECC.BinaryField.Value('2', 16)
404 402
405 // S: new Clipperz.Crypto.ECC.BinaryField.Value('2aa058f73a0e33ab486b0f610410c53a7f132310', 10), 403 // S: new Clipperz.Crypto.ECC.BinaryField.Value('2aa058f73a0e33ab486b0f610410c53a7f132310', 10),
406 // n: new Clipperz.Crypto.ECC.BinaryField.Value('03ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe661ce18ff55987308059b186823851ec7dd9ca1161de93d5174d66e8382e9bb2fe84e47', 16), 404 // n: new Clipperz.Crypto.ECC.BinaryField.Value('03ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe661ce18ff55987308059b186823851ec7dd9ca1161de93d5174d66e8382e9bb2fe84e47', 16),
diff --git a/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js b/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js
index 650b479..de1e6a8 100644
--- a/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js
+++ b/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/FiniteField.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { 24try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) {
27 throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!"; 25 throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!";
28} 26}
29if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; } 27if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; }
30if (typeof(Clipperz.Crypto.ECC.BinaryField) == 'undefined') { Clipperz.Crypto.ECC.BinaryField = {}; } 28if (typeof(Clipperz.Crypto.ECC.BinaryField) == 'undefined') { Clipperz.Crypto.ECC.BinaryField = {}; }
31 29
32Clipperz.Crypto.ECC.BinaryField.FiniteField = function(args) { 30Clipperz.Crypto.ECC.BinaryField.FiniteField = function(args) {
33 args = args || {}; 31 args = args || {};
34 this._modulus = args.modulus; 32 this._modulus = args.modulus;
35 33
36 return this; 34 return this;
37} 35}
38 36
39Clipperz.Crypto.ECC.BinaryField.FiniteField.prototype = MochiKit.Base.update(null, { 37Clipperz.Crypto.ECC.BinaryField.FiniteField.prototype = MochiKit.Base.update(null, {
40 38
41 'asString': function() { 39 'asString': function() {
42 return "Clipperz.Crypto.ECC.BinaryField.FiniteField (" + this.modulus().asString() + ")"; 40 return "Clipperz.Crypto.ECC.BinaryField.FiniteField (" + this.modulus().asString() + ")";
43 }, 41 },
44 42
45 //----------------------------------------------------------------------------- 43 //-----------------------------------------------------------------------------
46 44
47 'modulus': function() { 45 'modulus': function() {
48 return this._modulus; 46 return this._modulus;
49 }, 47 },
50 48
51 //----------------------------------------------------------------------------- 49 //-----------------------------------------------------------------------------
52 50
53 '_module': function(aValue) { 51 '_module': function(aValue) {
54 varresult; 52 varresult;
55 var modulusComparison; 53 var modulusComparison;
56//console.log(">>> binaryField.finiteField.(standard)module"); 54//console.log(">>> binaryField.finiteField.(standard)module");
57 55
58 modulusComparison = Clipperz.Crypto.ECC.BinaryField.Value._compare(aValue, this.modulus()._value); 56 modulusComparison = Clipperz.Crypto.ECC.BinaryField.Value._compare(aValue, this.modulus()._value);
59 57
60 if (modulusComparison < 0) { 58 if (modulusComparison < 0) {
61 result = aValue; 59 result = aValue;
62 } else if (modulusComparison == 0) { 60 } else if (modulusComparison == 0) {
63 result = [0]; 61 result = [0];
64 } else { 62 } else {
65 var modulusBitSize; 63 var modulusBitSize;
66 var resultBitSize; 64 var resultBitSize;
67 65
68 result = aValue; 66 result = aValue;
69 67
70 modulusBitSize = this.modulus().bitSize(); 68 modulusBitSize = this.modulus().bitSize();
71 resultBitSize = Clipperz.Crypto.ECC.BinaryField.Value._bitSize(result); 69 resultBitSize = Clipperz.Crypto.ECC.BinaryField.Value._bitSize(result);
72 while (resultBitSize >= modulusBitSize) { 70 while (resultBitSize >= modulusBitSize) {
73 Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor(result, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(this.modulus()._value, resultBitSize - modulusBitSize)); 71 Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor(result, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(this.modulus()._value, resultBitSize - modulusBitSize));
74 resultBitSize = Clipperz.Crypto.ECC.BinaryField.Value._bitSize(result); 72 resultBitSize = Clipperz.Crypto.ECC.BinaryField.Value._bitSize(result);
75 } 73 }
76 } 74 }
77//console.log("<<< binaryField.finiteField.(standard)module"); 75//console.log("<<< binaryField.finiteField.(standard)module");
78 76
79 return result; 77 return result;
80 }, 78 },
81 79
82 'module': function(aValue) { 80 'module': function(aValue) {
83 return new Clipperz.Crypto.ECC.BinaryField.Value(this._module(aValue._value.slice(0))); 81 return new Clipperz.Crypto.ECC.BinaryField.Value(this._module(aValue._value.slice(0)));
84 }, 82 },
85 83
86 //----------------------------------------------------------------------------- 84 //-----------------------------------------------------------------------------
87 85
88 '_add': function(a, b) { 86 '_add': function(a, b) {
89 return Clipperz.Crypto.ECC.BinaryField.Value._xor(a, b); 87 return Clipperz.Crypto.ECC.BinaryField.Value._xor(a, b);
90 }, 88 },
91 89
92 '_overwriteAdd': function(a, b) { 90 '_overwriteAdd': function(a, b) {
93 Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor(a, b); 91 Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor(a, b);
94 }, 92 },
95 93
96 'add': function(a, b) { 94 'add': function(a, b) {
97 return new Clipperz.Crypto.ECC.BinaryField.Value(this._add(a._value, b._value)); 95 return new Clipperz.Crypto.ECC.BinaryField.Value(this._add(a._value, b._value));
98 }, 96 },
99 97
100 //----------------------------------------------------------------------------- 98 //-----------------------------------------------------------------------------
101 99
102 'negate': function(aValue) { 100 'negate': function(aValue) {
103 return aValue.clone(); 101 return aValue.clone();
104 }, 102 },
105 103
106 //----------------------------------------------------------------------------- 104 //-----------------------------------------------------------------------------
107 105
108 '_multiply': function(a, b) { 106 '_multiply': function(a, b) {
109 var result; 107 var result;
110 var valueToXor; 108 var valueToXor;
111 var i,c; 109 var i,c;
112 110
113 result = [0]; 111 result = [0];
114 valueToXor = b; 112 valueToXor = b;
115 c = Clipperz.Crypto.ECC.BinaryField.Value._bitSize(a); 113 c = Clipperz.Crypto.ECC.BinaryField.Value._bitSize(a);
116 for (i=0; i<c; i++) { 114 for (i=0; i<c; i++) {
117 if (Clipperz.Crypto.ECC.BinaryField.Value._isBitSet(a, i) === true) { 115 if (Clipperz.Crypto.ECC.BinaryField.Value._isBitSet(a, i) === true) {
118 Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor(result, valueToXor); 116 Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor(result, valueToXor);
119 } 117 }
120 valueToXor = Clipperz.Crypto.ECC.BinaryField.Value._overwriteShiftLeft(valueToXor, 1); 118 valueToXor = Clipperz.Crypto.ECC.BinaryField.Value._overwriteShiftLeft(valueToXor, 1);
121 } 119 }
122 result = this._module(result); 120 result = this._module(result);
123 121
124 return result; 122 return result;
125 }, 123 },
126 124
127 'multiply': function(a, b) { 125 'multiply': function(a, b) {
128 return new Clipperz.Crypto.ECC.BinaryField.Value(this._multiply(a._value, b._value)); 126 return new Clipperz.Crypto.ECC.BinaryField.Value(this._multiply(a._value, b._value));
129 }, 127 },
130 128
131 //----------------------------------------------------------------------------- 129 //-----------------------------------------------------------------------------
132 130
133 '_fastMultiply': function(a, b) { 131 '_fastMultiply': function(a, b) {
134 var result; 132 var result;
135 var B; 133 var B;
136 var i,c; 134 var i,c;
137 135
138 result = [0]; 136 result = [0];
139 B = b.slice(0); //Is this array copy avoidable? 137 B = b.slice(0); //Is this array copy avoidable?
140 c = 32; 138 c = 32;
141 for (i=0; i<c; i++) { 139 for (i=0; i<c; i++) {
142 var ii, cc; 140 var ii, cc;
143 141
144 cc = a.length; 142 cc = a.length;
145 for (ii=0; ii<cc; ii++) { 143 for (ii=0; ii<cc; ii++) {
146 if (((a[ii] >>> i) & 0x01) == 1) { 144 if (((a[ii] >>> i) & 0x01) == 1) {
147 Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor(result, B, ii); 145 Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor(result, B, ii);
148 } 146 }
149 } 147 }
150 148
151 if (i < (c-1)) { 149 if (i < (c-1)) {
152 B = Clipperz.Crypto.ECC.BinaryField.Value._overwriteShiftLeft(B, 1); 150 B = Clipperz.Crypto.ECC.BinaryField.Value._overwriteShiftLeft(B, 1);
153 } 151 }
154 } 152 }
155 result = this._module(result); 153 result = this._module(result);
156 154
157 return result; 155 return result;
158 }, 156 },
159 157
160 'fastMultiply': function(a, b) { 158 'fastMultiply': function(a, b) {
161 return new Clipperz.Crypto.ECC.BinaryField.Value(this._fastMultiply(a._value, b._value)); 159 return new Clipperz.Crypto.ECC.BinaryField.Value(this._fastMultiply(a._value, b._value));
162 }, 160 },
163 161
164 //----------------------------------------------------------------------------- 162 //-----------------------------------------------------------------------------
165 // 163 //
166 //Guide to Elliptic Curve Cryptography 164 //Guide to Elliptic Curve Cryptography
167 //Darrel Hankerson, Alfred Menezes, Scott Vanstone 165 //Darrel Hankerson, Alfred Menezes, Scott Vanstone
168 //- Pag: 49, Alorithm 2.34 166 //- Pag: 49, Alorithm 2.34
169 // 167 //
170 //----------------------------------------------------------------------------- 168 //-----------------------------------------------------------------------------
171 169
172 '_square': function(aValue) { 170 '_square': function(aValue) {
173 var result; 171 var result;
174 var value; 172 var value;
175 var c,i; 173 var c,i;
176 var precomputedValues; 174 var precomputedValues;
177 175
178 value = aValue; 176 value = aValue;
179 result = new Array(value.length * 2); 177 result = new Array(value.length * 2);
180 precomputedValues = Clipperz.Crypto.ECC.BinaryField.FiniteField.squarePrecomputedBytes; 178 precomputedValues = Clipperz.Crypto.ECC.BinaryField.FiniteField.squarePrecomputedBytes;
181 179
182 c = value.length; 180 c = value.length;
183 for (i=0; i<c; i++) { 181 for (i=0; i<c; i++) {
184 result[i*2] = precomputedValues[(value[i] & 0x000000ff)]; 182 result[i*2] = precomputedValues[(value[i] & 0x000000ff)];
185 result[i*2] |= ((precomputedValues[(value[i] & 0x0000ff00) >>> 8]) << 16); 183 result[i*2] |= ((precomputedValues[(value[i] & 0x0000ff00) >>> 8]) << 16);
186 184
187 result[i*2 + 1] = precomputedValues[(value[i] & 0x00ff0000) >>> 16]; 185 result[i*2 + 1] = precomputedValues[(value[i] & 0x00ff0000) >>> 16];
188 result[i*2 + 1] |= ((precomputedValues[(value[i] & 0xff000000) >>> 24]) << 16); 186 result[i*2 + 1] |= ((precomputedValues[(value[i] & 0xff000000) >>> 24]) << 16);
189 } 187 }
190 188
191 return this._module(result); 189 return this._module(result);
192 }, 190 },
193 191
194 'square': function(aValue) { 192 'square': function(aValue) {
195 return new Clipperz.Crypto.ECC.BinaryField.Value(this._square(aValue._value)); 193 return new Clipperz.Crypto.ECC.BinaryField.Value(this._square(aValue._value));
196 }, 194 },
197 195
198 //----------------------------------------------------------------------------- 196 //-----------------------------------------------------------------------------
199 197
200 '_inverse': function(aValue) { 198 '_inverse': function(aValue) {
201 varresult; 199 varresult;
202 var b, c; 200 var b, c;
203 var u, v; 201 var u, v;
204 202
205 // b = Clipperz.Crypto.ECC.BinaryField.Value.I._value; 203 // b = Clipperz.Crypto.ECC.BinaryField.Value.I._value;
206 b = [1]; 204 b = [1];
207 // c = Clipperz.Crypto.ECC.BinaryField.Value.O._value; 205 // c = Clipperz.Crypto.ECC.BinaryField.Value.O._value;
208 c = [0]; 206 c = [0];
209 u = this._module(aValue); 207 u = this._module(aValue);
210 v = this.modulus()._value.slice(0); 208 v = this.modulus()._value.slice(0);
211 209
212 while (Clipperz.Crypto.ECC.BinaryField.Value._bitSize(u) > 1) { 210 while (Clipperz.Crypto.ECC.BinaryField.Value._bitSize(u) > 1) {
213 varbitDifferenceSize; 211 varbitDifferenceSize;
214 212
215 bitDifferenceSize = Clipperz.Crypto.ECC.BinaryField.Value._bitSize(u) - Clipperz.Crypto.ECC.BinaryField.Value._bitSize(v); 213 bitDifferenceSize = Clipperz.Crypto.ECC.BinaryField.Value._bitSize(u) - Clipperz.Crypto.ECC.BinaryField.Value._bitSize(v);
216 if (bitDifferenceSize < 0) { 214 if (bitDifferenceSize < 0) {
217 var swap; 215 var swap;
218 216
219 swap = u; 217 swap = u;
220 u = v; 218 u = v;
221 v = swap; 219 v = swap;
222 220
223 swap = c; 221 swap = c;
224 c = b; 222 c = b;
225 b = swap; 223 b = swap;
226 224
227 bitDifferenceSize = -bitDifferenceSize; 225 bitDifferenceSize = -bitDifferenceSize;
228 } 226 }
229 227
230 u = this._add(u, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(v, bitDifferenceSize)); 228 u = this._add(u, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(v, bitDifferenceSize));
231 b = this._add(b, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(c, bitDifferenceSize)); 229 b = this._add(b, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(c, bitDifferenceSize));
232 // this._overwriteAdd(u, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(v, bitDifferenceSize)); 230 // this._overwriteAdd(u, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(v, bitDifferenceSize));
233 // this._overwriteAdd(b, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(c, bitDifferenceSize)); 231 // this._overwriteAdd(b, Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(c, bitDifferenceSize));
234 } 232 }
235 233
236 result = this._module(b); 234 result = this._module(b);
237 235
238 return result; 236 return result;
239 }, 237 },
240 238
241 'inverse': function(aValue) { 239 'inverse': function(aValue) {
242 return new Clipperz.Crypto.ECC.BinaryField.Value(this._inverse(aValue._value)); 240 return new Clipperz.Crypto.ECC.BinaryField.Value(this._inverse(aValue._value));
243 }, 241 },
244 242
245 //----------------------------------------------------------------------------- 243 //-----------------------------------------------------------------------------
246 __syntaxFix__: "syntax fix" 244 __syntaxFix__: "syntax fix"
247}); 245});
248 246
249 247
250Clipperz.Crypto.ECC.BinaryField.FiniteField.squarePrecomputedBytes = [ 248Clipperz.Crypto.ECC.BinaryField.FiniteField.squarePrecomputedBytes = [
251 0x0000, // 0 = 0000 0000 -> 0000 0000 0000 0000 249 0x0000, // 0 = 0000 0000 -> 0000 0000 0000 0000
252 0x0001, // 1 = 0000 0001 -> 0000 0000 0000 0001 250 0x0001, // 1 = 0000 0001 -> 0000 0000 0000 0001
253 0x0004, // 2 = 0000 0010 -> 0000 0000 0000 0100 251 0x0004, // 2 = 0000 0010 -> 0000 0000 0000 0100
254 0x0005, // 3 = 0000 0011 -> 0000 0000 0000 0101 252 0x0005, // 3 = 0000 0011 -> 0000 0000 0000 0101
255 0x0010, // 4 = 0000 0100 -> 0000 0000 0001 0000 253 0x0010, // 4 = 0000 0100 -> 0000 0000 0001 0000
256 0x0011, // 5 = 0000 0101 -> 0000 0000 0001 0001 254 0x0011, // 5 = 0000 0101 -> 0000 0000 0001 0001
257 0x0014, // 6 = 0000 0110 -> 0000 0000 0001 0100 255 0x0014, // 6 = 0000 0110 -> 0000 0000 0001 0100
258 0x0015, // 7 = 0000 0111 -> 0000 0000 0001 0101 256 0x0015, // 7 = 0000 0111 -> 0000 0000 0001 0101
259 0x0040, // 8 = 0000 1000 -> 0000 0000 0100 0000 257 0x0040, // 8 = 0000 1000 -> 0000 0000 0100 0000
260 0x0041, // 9 = 0000 1001 -> 0000 0000 0100 0001 258 0x0041, // 9 = 0000 1001 -> 0000 0000 0100 0001
261 0x0044, // 10 = 0000 1010 -> 0000 0000 0100 0100 259 0x0044, // 10 = 0000 1010 -> 0000 0000 0100 0100
262 0x0045, // 11 = 0000 1011 -> 0000 0000 0100 0101 260 0x0045, // 11 = 0000 1011 -> 0000 0000 0100 0101
263 0x0050, // 12 = 0000 1100 -> 0000 0000 0101 0000 261 0x0050, // 12 = 0000 1100 -> 0000 0000 0101 0000
264 0x0051, // 13 = 0000 1101 -> 0000 0000 0101 0001 262 0x0051, // 13 = 0000 1101 -> 0000 0000 0101 0001
265 0x0054, // 14 = 0000 1110 -> 0000 0000 0101 0100 263 0x0054, // 14 = 0000 1110 -> 0000 0000 0101 0100
266 0x0055, // 15 = 0000 1111 -> 0000 0000 0101 0101 264 0x0055, // 15 = 0000 1111 -> 0000 0000 0101 0101
267 265
268 0x0100, // 16 = 0001 0000 -> 0000 0001 0000 0000 266 0x0100, // 16 = 0001 0000 -> 0000 0001 0000 0000
269 0x0101, // 17 = 0001 0001 -> 0000 0001 0000 0001 267 0x0101, // 17 = 0001 0001 -> 0000 0001 0000 0001
270 0x0104, // 18 = 0001 0010 -> 0000 0001 0000 0100 268 0x0104, // 18 = 0001 0010 -> 0000 0001 0000 0100
271 0x0105, // 19 = 0001 0011 -> 0000 0001 0000 0101 269 0x0105, // 19 = 0001 0011 -> 0000 0001 0000 0101
272 0x0110, // 20 = 0001 0100 -> 0000 0001 0001 0000 270 0x0110, // 20 = 0001 0100 -> 0000 0001 0001 0000
273 0x0111, // 21 = 0001 0101 -> 0000 0001 0001 0001 271 0x0111, // 21 = 0001 0101 -> 0000 0001 0001 0001
274 0x0114, // 22 = 0001 0110 -> 0000 0001 0001 0100 272 0x0114, // 22 = 0001 0110 -> 0000 0001 0001 0100
275 0x0115, // 23 = 0001 0111 -> 0000 0001 0001 0101 273 0x0115, // 23 = 0001 0111 -> 0000 0001 0001 0101
276 0x0140, // 24 = 0001 1000 -> 0000 0001 0100 0000 274 0x0140, // 24 = 0001 1000 -> 0000 0001 0100 0000
277 0x0141, // 25 = 0001 1001 -> 0000 0001 0100 0001 275 0x0141, // 25 = 0001 1001 -> 0000 0001 0100 0001
278 0x0144, // 26 = 0001 1010 -> 0000 0001 0100 0100 276 0x0144, // 26 = 0001 1010 -> 0000 0001 0100 0100
279 0x0145, // 27 = 0001 1011 -> 0000 0001 0100 0101 277 0x0145, // 27 = 0001 1011 -> 0000 0001 0100 0101
280 0x0150, // 28 = 0001 1100 -> 0000 0001 0101 0000 278 0x0150, // 28 = 0001 1100 -> 0000 0001 0101 0000
281 0x0151, // 28 = 0001 1101 -> 0000 0001 0101 0001 279 0x0151, // 28 = 0001 1101 -> 0000 0001 0101 0001
282 0x0154, // 30 = 0001 1110 -> 0000 0001 0101 0100 280 0x0154, // 30 = 0001 1110 -> 0000 0001 0101 0100
283 0x0155, // 31 = 0001 1111 -> 0000 0001 0101 0101 281 0x0155, // 31 = 0001 1111 -> 0000 0001 0101 0101
284 282
285 0x0400, // 32 = 0010 0000 -> 0000 0100 0000 0000 283 0x0400, // 32 = 0010 0000 -> 0000 0100 0000 0000
286 0x0401, // 33 = 0010 0001 -> 0000 0100 0000 0001 284 0x0401, // 33 = 0010 0001 -> 0000 0100 0000 0001
287 0x0404, // 34 = 0010 0010 -> 0000 0100 0000 0100 285 0x0404, // 34 = 0010 0010 -> 0000 0100 0000 0100
288 0x0405, // 35 = 0010 0011 -> 0000 0100 0000 0101 286 0x0405, // 35 = 0010 0011 -> 0000 0100 0000 0101
289 0x0410, // 36 = 0010 0100 -> 0000 0100 0001 0000 287 0x0410, // 36 = 0010 0100 -> 0000 0100 0001 0000
290 0x0411, // 37 = 0010 0101 -> 0000 0100 0001 0001 288 0x0411, // 37 = 0010 0101 -> 0000 0100 0001 0001
291 0x0414, // 38 = 0010 0110 -> 0000 0100 0001 0100 289 0x0414, // 38 = 0010 0110 -> 0000 0100 0001 0100
292 0x0415, // 39 = 0010 0111 -> 0000 0100 0001 0101 290 0x0415, // 39 = 0010 0111 -> 0000 0100 0001 0101
293 0x0440, // 40 = 0010 1000 -> 0000 0100 0100 0000 291 0x0440, // 40 = 0010 1000 -> 0000 0100 0100 0000
294 0x0441, // 41 = 0010 1001 -> 0000 0100 0100 0001 292 0x0441, // 41 = 0010 1001 -> 0000 0100 0100 0001
295 0x0444, // 42 = 0010 1010 -> 0000 0100 0100 0100 293 0x0444, // 42 = 0010 1010 -> 0000 0100 0100 0100
296 0x0445, // 43 = 0010 1011 -> 0000 0100 0100 0101 294 0x0445, // 43 = 0010 1011 -> 0000 0100 0100 0101
297 0x0450, // 44 = 0010 1100 -> 0000 0100 0101 0000 295 0x0450, // 44 = 0010 1100 -> 0000 0100 0101 0000
298 0x0451, // 45 = 0010 1101 -> 0000 0100 0101 0001 296 0x0451, // 45 = 0010 1101 -> 0000 0100 0101 0001
299 0x0454, // 46 = 0010 1110 -> 0000 0100 0101 0100 297 0x0454, // 46 = 0010 1110 -> 0000 0100 0101 0100
300 0x0455, // 47 = 0010 1111 -> 0000 0100 0101 0101 298 0x0455, // 47 = 0010 1111 -> 0000 0100 0101 0101
301 299
302 0x0500, // 48 = 0011 0000 -> 0000 0101 0000 0000 300 0x0500, // 48 = 0011 0000 -> 0000 0101 0000 0000
303 0x0501, // 49 = 0011 0001 -> 0000 0101 0000 0001 301 0x0501, // 49 = 0011 0001 -> 0000 0101 0000 0001
304 0x0504, // 50 = 0011 0010 -> 0000 0101 0000 0100 302 0x0504, // 50 = 0011 0010 -> 0000 0101 0000 0100
305 0x0505, // 51 = 0011 0011 -> 0000 0101 0000 0101 303 0x0505, // 51 = 0011 0011 -> 0000 0101 0000 0101
306 0x0510, // 52 = 0011 0100 -> 0000 0101 0001 0000 304 0x0510, // 52 = 0011 0100 -> 0000 0101 0001 0000
307 0x0511, // 53 = 0011 0101 -> 0000 0101 0001 0001 305 0x0511, // 53 = 0011 0101 -> 0000 0101 0001 0001
308 0x0514, // 54 = 0011 0110 -> 0000 0101 0001 0100 306 0x0514, // 54 = 0011 0110 -> 0000 0101 0001 0100
309 0x0515, // 55 = 0011 0111 -> 0000 0101 0001 0101 307 0x0515, // 55 = 0011 0111 -> 0000 0101 0001 0101
310 0x0540, // 56 = 0011 1000 -> 0000 0101 0100 0000 308 0x0540, // 56 = 0011 1000 -> 0000 0101 0100 0000
311 0x0541, // 57 = 0011 1001 -> 0000 0101 0100 0001 309 0x0541, // 57 = 0011 1001 -> 0000 0101 0100 0001
312 0x0544, // 58 = 0011 1010 -> 0000 0101 0100 0100 310 0x0544, // 58 = 0011 1010 -> 0000 0101 0100 0100
313 0x0545, // 59 = 0011 1011 -> 0000 0101 0100 0101 311 0x0545, // 59 = 0011 1011 -> 0000 0101 0100 0101
314 0x0550, // 60 = 0011 1100 -> 0000 0101 0101 0000 312 0x0550, // 60 = 0011 1100 -> 0000 0101 0101 0000
315 0x0551, // 61 = 0011 1101 -> 0000 0101 0101 0001 313 0x0551, // 61 = 0011 1101 -> 0000 0101 0101 0001
316 0x0554, // 62 = 0011 1110 -> 0000 0101 0101 0100 314 0x0554, // 62 = 0011 1110 -> 0000 0101 0101 0100
317 0x0555, // 63 = 0011 1111 -> 0000 0101 0101 0101 315 0x0555, // 63 = 0011 1111 -> 0000 0101 0101 0101
318 316
319 0x1000, // 64 = 0100 0000 -> 0001 0000 0000 0000 317 0x1000, // 64 = 0100 0000 -> 0001 0000 0000 0000
320 0x1001, // 65 = 0100 0001 -> 0001 0000 0000 0001 318 0x1001, // 65 = 0100 0001 -> 0001 0000 0000 0001
321 0x1004, // 66 = 0100 0010 -> 0001 0000 0000 0100 319 0x1004, // 66 = 0100 0010 -> 0001 0000 0000 0100
322 0x1005, // 67 = 0100 0011 -> 0001 0000 0000 0101 320 0x1005, // 67 = 0100 0011 -> 0001 0000 0000 0101
323 0x1010, // 68 = 0100 0100 -> 0001 0000 0001 0000 321 0x1010, // 68 = 0100 0100 -> 0001 0000 0001 0000
324 0x1011, // 69 = 0100 0101 -> 0001 0000 0001 0001 322 0x1011, // 69 = 0100 0101 -> 0001 0000 0001 0001
325 0x1014, // 70 = 0100 0110 -> 0001 0000 0001 0100 323 0x1014, // 70 = 0100 0110 -> 0001 0000 0001 0100
326 0x1015, // 71 = 0100 0111 -> 0001 0000 0001 0101 324 0x1015, // 71 = 0100 0111 -> 0001 0000 0001 0101
327 0x1040, // 72 = 0100 1000 -> 0001 0000 0100 0000 325 0x1040, // 72 = 0100 1000 -> 0001 0000 0100 0000
328 0x1041, // 73 = 0100 1001 -> 0001 0000 0100 0001 326 0x1041, // 73 = 0100 1001 -> 0001 0000 0100 0001
329 0x1044, // 74 = 0100 1010 -> 0001 0000 0100 0100 327 0x1044, // 74 = 0100 1010 -> 0001 0000 0100 0100
330 0x1045, // 75 = 0100 1011 -> 0001 0000 0100 0101 328 0x1045, // 75 = 0100 1011 -> 0001 0000 0100 0101
331 0x1050, // 76 = 0100 1100 -> 0001 0000 0101 0000 329 0x1050, // 76 = 0100 1100 -> 0001 0000 0101 0000
332 0x1051, // 77 = 0100 1101 -> 0001 0000 0101 0001 330 0x1051, // 77 = 0100 1101 -> 0001 0000 0101 0001
333 0x1054, // 78 = 0100 1110 -> 0001 0000 0101 0100 331 0x1054, // 78 = 0100 1110 -> 0001 0000 0101 0100
334 0x1055, // 79 = 0100 1111 -> 0001 0000 0101 0101 332 0x1055, // 79 = 0100 1111 -> 0001 0000 0101 0101
335 333
336 0x1100, // 80 = 0101 0000 -> 0001 0001 0000 0000 334 0x1100, // 80 = 0101 0000 -> 0001 0001 0000 0000
337 0x1101, // 81 = 0101 0001 -> 0001 0001 0000 0001 335 0x1101, // 81 = 0101 0001 -> 0001 0001 0000 0001
338 0x1104, // 82 = 0101 0010 -> 0001 0001 0000 0100 336 0x1104, // 82 = 0101 0010 -> 0001 0001 0000 0100
339 0x1105, // 83 = 0101 0011 -> 0001 0001 0000 0101 337 0x1105, // 83 = 0101 0011 -> 0001 0001 0000 0101
340 0x1110, // 84 = 0101 0100 -> 0001 0001 0001 0000 338 0x1110, // 84 = 0101 0100 -> 0001 0001 0001 0000
341 0x1111, // 85 = 0101 0101 -> 0001 0001 0001 0001 339 0x1111, // 85 = 0101 0101 -> 0001 0001 0001 0001
342 0x1114, // 86 = 0101 0110 -> 0001 0001 0001 0100 340 0x1114, // 86 = 0101 0110 -> 0001 0001 0001 0100
343 0x1115, // 87 = 0101 0111 -> 0001 0001 0001 0101 341 0x1115, // 87 = 0101 0111 -> 0001 0001 0001 0101
344 0x1140, // 88 = 0101 1000 -> 0001 0001 0100 0000 342 0x1140, // 88 = 0101 1000 -> 0001 0001 0100 0000
345 0x1141, // 89 = 0101 1001 -> 0001 0001 0100 0001 343 0x1141, // 89 = 0101 1001 -> 0001 0001 0100 0001
346 0x1144, // 90 = 0101 1010 -> 0001 0001 0100 0100 344 0x1144, // 90 = 0101 1010 -> 0001 0001 0100 0100
347 0x1145, // 91 = 0101 1011 -> 0001 0001 0100 0101 345 0x1145, // 91 = 0101 1011 -> 0001 0001 0100 0101
348 0x1150, // 92 = 0101 1100 -> 0001 0001 0101 0000 346 0x1150, // 92 = 0101 1100 -> 0001 0001 0101 0000
349 0x1151, // 93 = 0101 1101 -> 0001 0001 0101 0001 347 0x1151, // 93 = 0101 1101 -> 0001 0001 0101 0001
350 0x1154, // 94 = 0101 1110 -> 0001 0001 0101 0100 348 0x1154, // 94 = 0101 1110 -> 0001 0001 0101 0100
351 0x1155, // 95 = 0101 1111 -> 0001 0001 0101 0101 349 0x1155, // 95 = 0101 1111 -> 0001 0001 0101 0101
352 350
353 0x1400, // 96 = 0110 0000 -> 0001 0100 0000 0000 351 0x1400, // 96 = 0110 0000 -> 0001 0100 0000 0000
354 0x1401, // 97 = 0110 0001 -> 0001 0100 0000 0001 352 0x1401, // 97 = 0110 0001 -> 0001 0100 0000 0001
355 0x1404, // 98 = 0110 0010 -> 0001 0100 0000 0100 353 0x1404, // 98 = 0110 0010 -> 0001 0100 0000 0100
356 0x1405, // 99 = 0110 0011 -> 0001 0100 0000 0101 354 0x1405, // 99 = 0110 0011 -> 0001 0100 0000 0101
357 0x1410, //100 = 0110 0100 -> 0001 0100 0001 0000 355 0x1410, //100 = 0110 0100 -> 0001 0100 0001 0000
358 0x1411, //101 = 0110 0101 -> 0001 0100 0001 0001 356 0x1411, //101 = 0110 0101 -> 0001 0100 0001 0001
359 0x1414, //102 = 0110 0110 -> 0001 0100 0001 0100 357 0x1414, //102 = 0110 0110 -> 0001 0100 0001 0100
360 0x1415, //103 = 0110 0111 -> 0001 0100 0001 0101 358 0x1415, //103 = 0110 0111 -> 0001 0100 0001 0101
361 0x1440, //104 = 0110 1000 -> 0001 0100 0100 0000 359 0x1440, //104 = 0110 1000 -> 0001 0100 0100 0000
362 0x1441, //105 = 0110 1001 -> 0001 0100 0100 0001 360 0x1441, //105 = 0110 1001 -> 0001 0100 0100 0001
363 0x1444, //106 = 0110 1010 -> 0001 0100 0100 0100 361 0x1444, //106 = 0110 1010 -> 0001 0100 0100 0100
364 0x1445, //107 = 0110 1011 -> 0001 0100 0100 0101 362 0x1445, //107 = 0110 1011 -> 0001 0100 0100 0101
365 0x1450, //108 = 0110 1100 -> 0001 0100 0101 0000 363 0x1450, //108 = 0110 1100 -> 0001 0100 0101 0000
366 0x1451, //109 = 0110 1101 -> 0001 0100 0101 0001 364 0x1451, //109 = 0110 1101 -> 0001 0100 0101 0001
367 0x1454, //110 = 0110 1110 -> 0001 0100 0101 0100 365 0x1454, //110 = 0110 1110 -> 0001 0100 0101 0100
368 0x1455, //111 = 0110 1111 -> 0001 0100 0101 0101 366 0x1455, //111 = 0110 1111 -> 0001 0100 0101 0101
369 367
370 0x1500, //112 = 0111 0000 -> 0001 0101 0000 0000 368 0x1500, //112 = 0111 0000 -> 0001 0101 0000 0000
371 0x1501, //113 = 0111 0001 -> 0001 0101 0000 0001 369 0x1501, //113 = 0111 0001 -> 0001 0101 0000 0001
372 0x1504, //114 = 0111 0010 -> 0001 0101 0000 0100 370 0x1504, //114 = 0111 0010 -> 0001 0101 0000 0100
373 0x1505, //115 = 0111 0011 -> 0001 0101 0000 0101 371 0x1505, //115 = 0111 0011 -> 0001 0101 0000 0101
374 0x1510, //116 = 0111 0100 -> 0001 0101 0001 0000 372 0x1510, //116 = 0111 0100 -> 0001 0101 0001 0000
375 0x1511, //117 = 0111 0101 -> 0001 0101 0001 0001 373 0x1511, //117 = 0111 0101 -> 0001 0101 0001 0001
376 0x1514, //118 = 0111 0110 -> 0001 0101 0001 0100 374 0x1514, //118 = 0111 0110 -> 0001 0101 0001 0100
377 0x1515, //119 = 0111 0111 -> 0001 0101 0001 0101 375 0x1515, //119 = 0111 0111 -> 0001 0101 0001 0101
378 0x1540, //120 = 0111 1000 -> 0001 0101 0100 0000 376 0x1540, //120 = 0111 1000 -> 0001 0101 0100 0000
379 0x1541, //121 = 0111 1001 -> 0001 0101 0100 0001 377 0x1541, //121 = 0111 1001 -> 0001 0101 0100 0001
380 0x1544, //122 = 0111 1010 -> 0001 0101 0100 0100 378 0x1544, //122 = 0111 1010 -> 0001 0101 0100 0100
381 0x1545, //123 = 0111 1011 -> 0001 0101 0100 0101 379 0x1545, //123 = 0111 1011 -> 0001 0101 0100 0101
382 0x1550, //124 = 0111 1100 -> 0001 0101 0101 0000 380 0x1550, //124 = 0111 1100 -> 0001 0101 0101 0000
383 0x1551, //125 = 0111 1101 -> 0001 0101 0101 0001 381 0x1551, //125 = 0111 1101 -> 0001 0101 0101 0001
384 0x1554, //126 = 0111 1110 -> 0001 0101 0101 0100 382 0x1554, //126 = 0111 1110 -> 0001 0101 0101 0100
385 0x1555, //127 = 0111 1111 -> 0001 0101 0101 0101 383 0x1555, //127 = 0111 1111 -> 0001 0101 0101 0101
386 384
387 0x4000, //128 = 1000 0000 -> 0100 0000 0000 0000 385 0x4000, //128 = 1000 0000 -> 0100 0000 0000 0000
388 0x4001, //129 = 1000 0001 -> 0100 0000 0000 0001 386 0x4001, //129 = 1000 0001 -> 0100 0000 0000 0001
389 0x4004, //130 = 1000 0010 -> 0100 0000 0000 0100 387 0x4004, //130 = 1000 0010 -> 0100 0000 0000 0100
390 0x4005, //131 = 1000 0011 -> 0100 0000 0000 0101 388 0x4005, //131 = 1000 0011 -> 0100 0000 0000 0101
391 0x4010, //132 = 1000 0100 -> 0100 0000 0001 0000 389 0x4010, //132 = 1000 0100 -> 0100 0000 0001 0000
392 0x4011, //133 = 1000 0101 -> 0100 0000 0001 0001 390 0x4011, //133 = 1000 0101 -> 0100 0000 0001 0001
393 0x4014, //134 = 1000 0110 -> 0100 0000 0001 0100 391 0x4014, //134 = 1000 0110 -> 0100 0000 0001 0100
394 0x4015, //135 = 1000 0111 -> 0100 0000 0001 0101 392 0x4015, //135 = 1000 0111 -> 0100 0000 0001 0101
395 0x4040, //136 = 1000 1000 -> 0100 0000 0100 0000 393 0x4040, //136 = 1000 1000 -> 0100 0000 0100 0000
396 0x4041, //137 = 1000 1001 -> 0100 0000 0100 0001 394 0x4041, //137 = 1000 1001 -> 0100 0000 0100 0001
397 0x4044, //138 = 1000 1010 -> 0100 0000 0100 0100 395 0x4044, //138 = 1000 1010 -> 0100 0000 0100 0100
398 0x4045, //139 = 1000 1011 -> 0100 0000 0100 0101 396 0x4045, //139 = 1000 1011 -> 0100 0000 0100 0101
399 0x4050, //140 = 1000 1100 -> 0100 0000 0101 0000 397 0x4050, //140 = 1000 1100 -> 0100 0000 0101 0000
400 0x4051, //141 = 1000 1101 -> 0100 0000 0101 0001 398 0x4051, //141 = 1000 1101 -> 0100 0000 0101 0001
401 0x4054, //142 = 1000 1110 -> 0100 0000 0101 0100 399 0x4054, //142 = 1000 1110 -> 0100 0000 0101 0100
402 0x4055, //143 = 1000 1111 -> 0100 0000 0101 0101 400 0x4055, //143 = 1000 1111 -> 0100 0000 0101 0101
403 401
404 0x4100, //144 = 1001 0000 -> 0100 0001 0000 0000 402 0x4100, //144 = 1001 0000 -> 0100 0001 0000 0000
405 0x4101, //145 = 1001 0001 -> 0100 0001 0000 0001 403 0x4101, //145 = 1001 0001 -> 0100 0001 0000 0001
406 0x4104, //146 = 1001 0010 -> 0100 0001 0000 0100 404 0x4104, //146 = 1001 0010 -> 0100 0001 0000 0100
diff --git a/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Point.js b/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Point.js
index 6661839..c5db6c6 100644
--- a/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Point.js
+++ b/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Point.js
@@ -1,64 +1,62 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { 24try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) {
27 throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!"; 25 throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!";
28} 26}
29if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; } 27if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; }
30if (typeof(Clipperz.Crypto.ECC.BinaryField) == 'undefined') { Clipperz.Crypto.ECC.BinaryField = {}; } 28if (typeof(Clipperz.Crypto.ECC.BinaryField) == 'undefined') { Clipperz.Crypto.ECC.BinaryField = {}; }
31 29
32Clipperz.Crypto.ECC.BinaryField.Point = function(args) { 30Clipperz.Crypto.ECC.BinaryField.Point = function(args) {
33 args = args || {}; 31 args = args || {};
34 this._x = args.x; 32 this._x = args.x;
35 this._y = args.y; 33 this._y = args.y;
36 34
37 return this; 35 return this;
38} 36}
39 37
40Clipperz.Crypto.ECC.BinaryField.Point.prototype = MochiKit.Base.update(null, { 38Clipperz.Crypto.ECC.BinaryField.Point.prototype = MochiKit.Base.update(null, {
41 39
42 'asString': function() { 40 'asString': function() {
43 return "Clipperz.Crypto.ECC.BinaryField.Point (" + this.x() + ", " + this.y() + ")"; 41 return "Clipperz.Crypto.ECC.BinaryField.Point (" + this.x() + ", " + this.y() + ")";
44 }, 42 },
45 43
46 //----------------------------------------------------------------------------- 44 //-----------------------------------------------------------------------------
47 45
48 'x': function() { 46 'x': function() {
49 return this._x; 47 return this._x;
50 }, 48 },
51 49
52 'y': function() { 50 'y': function() {
53 return this._y; 51 return this._y;
54 }, 52 },
55 53
56 //----------------------------------------------------------------------------- 54 //-----------------------------------------------------------------------------
57 55
58 'isZero': function() { 56 'isZero': function() {
59 return (this.x().isZero() && this.y().isZero()) 57 return (this.x().isZero() && this.y().isZero())
60 }, 58 },
61 59
62 //----------------------------------------------------------------------------- 60 //-----------------------------------------------------------------------------
63 __syntaxFix__: "syntax fix" 61 __syntaxFix__: "syntax fix"
64}); 62});
diff --git a/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Value.js b/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Value.js
index b5beafa..278c299 100644
--- a/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Value.js
+++ b/frontend/beta/js/Clipperz/Crypto/ECC/BinaryField/Value.js
@@ -1,374 +1,372 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { 24try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) {
27 throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!"; 25 throw "Clipperz.Crypto.ECC depends on Clipperz.ByteArray!";
28} 26}
29if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; } 27if (typeof(Clipperz.Crypto.ECC) == 'undefined') { Clipperz.Crypto.ECC = {}; }
30if (typeof(Clipperz.Crypto.ECC.BinaryField) == 'undefined') { Clipperz.Crypto.ECC.BinaryField = {}; } 28if (typeof(Clipperz.Crypto.ECC.BinaryField) == 'undefined') { Clipperz.Crypto.ECC.BinaryField = {}; }
31 29
32Clipperz.Crypto.ECC.BinaryField.Value = function(aValue, aBase) { 30Clipperz.Crypto.ECC.BinaryField.Value = function(aValue, aBase) {
33 if (aValue.constructor == String) { 31 if (aValue.constructor == String) {
34 varvalue; 32 varvalue;
35 varstringLength; 33 varstringLength;
36 var numberOfWords; 34 var numberOfWords;
37 vari,c; 35 vari,c;
38 36
39 if (aBase != 16) { 37 if (aBase != 16) {
40 throw Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedBase; 38 throw Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedBase;
41 } 39 }
42 40
43 value = aValue.replace(/ /g, ''); 41 value = aValue.replace(/ /g, '');
44 stringLength = value.length; 42 stringLength = value.length;
45 numberOfWords = Math.ceil(stringLength / 8); 43 numberOfWords = Math.ceil(stringLength / 8);
46 this._value = new Array(numberOfWords); 44 this._value = new Array(numberOfWords);
47 45
48 c = numberOfWords; 46 c = numberOfWords;
49 for (i=0; i<c; i++) { 47 for (i=0; i<c; i++) {
50 varword; 48 varword;
51 49
52 if (i < (c-1)) { 50 if (i < (c-1)) {
53 word = parseInt(value.substr(stringLength-((i+1)*8), 8), 16); 51 word = parseInt(value.substr(stringLength-((i+1)*8), 8), 16);
54 } else { 52 } else {
55 word = parseInt(value.substr(0, stringLength-(i*8)), 16); 53 word = parseInt(value.substr(0, stringLength-(i*8)), 16);
56 } 54 }
57 55
58 this._value[i] = word; 56 this._value[i] = word;
59 } 57 }
60 } else if (aValue.constructor == Array) { 58 } else if (aValue.constructor == Array) {
61 var itemsToCopy; 59 var itemsToCopy;
62 60
63 itemsToCopy = aValue.length; 61 itemsToCopy = aValue.length;
64 while (aValue[itemsToCopy - 1] == 0) { 62 while (aValue[itemsToCopy - 1] == 0) {
65 itemsToCopy --; 63 itemsToCopy --;
66 } 64 }
67 65
68 this._value = aValue.slice(0, itemsToCopy); 66 this._value = aValue.slice(0, itemsToCopy);
69 } else if (aValue.constructor == Number) { 67 } else if (aValue.constructor == Number) {
70 this._value = [aValue]; 68 this._value = [aValue];
71 } else { 69 } else {
72 // throw Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedConstructorValueType; 70 // throw Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedConstructorValueType;
73 } 71 }
74 72
75 return this; 73 return this;
76} 74}
77 75
78Clipperz.Crypto.ECC.BinaryField.Value.prototype = MochiKit.Base.update(null, { 76Clipperz.Crypto.ECC.BinaryField.Value.prototype = MochiKit.Base.update(null, {
79 77
80 'value': function() { 78 'value': function() {
81 return this._value; 79 return this._value;
82 }, 80 },
83 81
84 //----------------------------------------------------------------------------- 82 //-----------------------------------------------------------------------------
85 83
86 'wordSize': function() { 84 'wordSize': function() {
87 return this._value.length 85 return this._value.length
88 }, 86 },
89 87
90 //----------------------------------------------------------------------------- 88 //-----------------------------------------------------------------------------
91 89
92 'clone': function() { 90 'clone': function() {
93 return new Clipperz.Crypto.ECC.BinaryField.Value(this._value.slice(0)); 91 return new Clipperz.Crypto.ECC.BinaryField.Value(this._value.slice(0));
94 }, 92 },
95 93
96 //----------------------------------------------------------------------------- 94 //-----------------------------------------------------------------------------
97 95
98 'isZero': function() { 96 'isZero': function() {
99 return (this.compare(Clipperz.Crypto.ECC.BinaryField.Value.O) == 0); 97 return (this.compare(Clipperz.Crypto.ECC.BinaryField.Value.O) == 0);
100 }, 98 },
101 99
102 //----------------------------------------------------------------------------- 100 //-----------------------------------------------------------------------------
103 101
104 'asString': function(aBase) { 102 'asString': function(aBase) {
105 varresult; 103 varresult;
106 var i,c; 104 var i,c;
107 105
108 if (aBase != 16) { 106 if (aBase != 16) {
109 throw Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedBase; 107 throw Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedBase;
110 } 108 }
111 109
112 result = ""; 110 result = "";
113 c = this.wordSize(); 111 c = this.wordSize();
114 for (i=0; i<c; i++) { 112 for (i=0; i<c; i++) {
115 varwordAsString; 113 varwordAsString;
116 114
117 // wordAsString = ("00000000" + this.value()[i].toString(16)); 115 // wordAsString = ("00000000" + this.value()[i].toString(16));
118 wordAsString = ("00000000" + this._value[i].toString(16)); 116 wordAsString = ("00000000" + this._value[i].toString(16));
119 wordAsString = wordAsString.substring(wordAsString.length - 8); 117 wordAsString = wordAsString.substring(wordAsString.length - 8);
120 result = wordAsString + result; 118 result = wordAsString + result;
121 } 119 }
122 120
123 result = result.replace(/^(00)*/, ""); 121 result = result.replace(/^(00)*/, "");
124 122
125 if (result == "") { 123 if (result == "") {
126 result = "0"; 124 result = "0";
127 } 125 }
128 126
129 return result; 127 return result;
130 }, 128 },
131 129
132 //----------------------------------------------------------------------------- 130 //-----------------------------------------------------------------------------
133 131
134 'shiftLeft': function(aNumberOfBitsToShift) { 132 'shiftLeft': function(aNumberOfBitsToShift) {
135 return new Clipperz.Crypto.ECC.BinaryField.Value(Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(this._value, aNumberOfBitsToShift)); 133 return new Clipperz.Crypto.ECC.BinaryField.Value(Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft(this._value, aNumberOfBitsToShift));
136 }, 134 },
137 135
138 //----------------------------------------------------------------------------- 136 //-----------------------------------------------------------------------------
139 137
140 'bitSize': function() { 138 'bitSize': function() {
141 return Clipperz.Crypto.ECC.BinaryField.Value._bitSize(this._value); 139 return Clipperz.Crypto.ECC.BinaryField.Value._bitSize(this._value);
142 }, 140 },
143 141
144 //----------------------------------------------------------------------------- 142 //-----------------------------------------------------------------------------
145 143
146 'isBitSet': function(aBitPosition) { 144 'isBitSet': function(aBitPosition) {
147 return Clipperz.Crypto.ECC.BinaryField.Value._isBitSet(this._value, aBitPosition); 145 return Clipperz.Crypto.ECC.BinaryField.Value._isBitSet(this._value, aBitPosition);
148 }, 146 },
149 147
150 //----------------------------------------------------------------------------- 148 //-----------------------------------------------------------------------------
151 149
152 'xor': function(aValue) { 150 'xor': function(aValue) {
153 return new Clipperz.Crypto.ECC.BinaryField.Value(Clipperz.Crypto.ECC.BinaryField.Value._xor(this._value, aValue._value)); 151 return new Clipperz.Crypto.ECC.BinaryField.Value(Clipperz.Crypto.ECC.BinaryField.Value._xor(this._value, aValue._value));
154 }, 152 },
155 153
156 //----------------------------------------------------------------------------- 154 //-----------------------------------------------------------------------------
157 155
158 'compare': function(aValue) { 156 'compare': function(aValue) {
159 return Clipperz.Crypto.ECC.BinaryField.Value._compare(this._value, aValue._value); 157 return Clipperz.Crypto.ECC.BinaryField.Value._compare(this._value, aValue._value);
160 }, 158 },
161 159
162 //----------------------------------------------------------------------------- 160 //-----------------------------------------------------------------------------
163 __syntaxFix__: "syntax fix" 161 __syntaxFix__: "syntax fix"
164}); 162});
165 163
166Clipperz.Crypto.ECC.BinaryField.Value.O = new Clipperz.Crypto.ECC.BinaryField.Value('0', 16); 164Clipperz.Crypto.ECC.BinaryField.Value.O = new Clipperz.Crypto.ECC.BinaryField.Value('0', 16);
167Clipperz.Crypto.ECC.BinaryField.Value.I = new Clipperz.Crypto.ECC.BinaryField.Value('1', 16); 165Clipperz.Crypto.ECC.BinaryField.Value.I = new Clipperz.Crypto.ECC.BinaryField.Value('1', 16);
168 166
169Clipperz.Crypto.ECC.BinaryField.Value._xor = function(a, b, aFirstItemOffset) { 167Clipperz.Crypto.ECC.BinaryField.Value._xor = function(a, b, aFirstItemOffset) {
170 var result; 168 var result;
171 var resultSize; 169 var resultSize;
172 var i,c; 170 var i,c;
173 var firstItemOffset; 171 var firstItemOffset;
174 172
175 firstItemOffset = aFirstItemOffset || 0; 173 firstItemOffset = aFirstItemOffset || 0;
176 resultSize = Math.max((a.length - firstItemOffset), b.length) + firstItemOffset; 174 resultSize = Math.max((a.length - firstItemOffset), b.length) + firstItemOffset;
177 175
178 result = new Array(resultSize); 176 result = new Array(resultSize);
179 177
180 c = firstItemOffset; 178 c = firstItemOffset;
181 for (i=0; i<c; i++) { 179 for (i=0; i<c; i++) {
182 result[i] = a[i]; 180 result[i] = a[i];
183 } 181 }
184 182
185 c = resultSize; 183 c = resultSize;
186 for (i=firstItemOffset; i<c; i++) { 184 for (i=firstItemOffset; i<c; i++) {
187 result[i] = (((a[i] || 0) ^ (b[i - firstItemOffset] || 0)) >>> 0); 185 result[i] = (((a[i] || 0) ^ (b[i - firstItemOffset] || 0)) >>> 0);
188 } 186 }
189 187
190 return result; 188 return result;
191}; 189};
192 190
193Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor = function(a, b, aFirstItemOffset) { 191Clipperz.Crypto.ECC.BinaryField.Value._overwriteXor = function(a, b, aFirstItemOffset) {
194 var i,c; 192 var i,c;
195 var firstItemOffset; 193 var firstItemOffset;
196 194
197 firstItemOffset = aFirstItemOffset || 0; 195 firstItemOffset = aFirstItemOffset || 0;
198 196
199 c = Math.max((a.length - firstItemOffset), b.length) + firstItemOffset; 197 c = Math.max((a.length - firstItemOffset), b.length) + firstItemOffset;
200 for (i=firstItemOffset; i<c; i++) { 198 for (i=firstItemOffset; i<c; i++) {
201 a[i] = (((a[i] || 0) ^ (b[i - firstItemOffset] || 0)) >>> 0); 199 a[i] = (((a[i] || 0) ^ (b[i - firstItemOffset] || 0)) >>> 0);
202 } 200 }
203}; 201};
204 202
205Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft = function(aWordArray, aNumberOfBitsToShift) { 203Clipperz.Crypto.ECC.BinaryField.Value._shiftLeft = function(aWordArray, aNumberOfBitsToShift) {
206 var numberOfWordsToShift; 204 var numberOfWordsToShift;
207 varnumberOfBitsToShift; 205 varnumberOfBitsToShift;
208 var result; 206 var result;
209 varoverflowValue; 207 varoverflowValue;
210 vari,c; 208 vari,c;
211 209
212 numberOfWordsToShift = Math.floor(aNumberOfBitsToShift / 32); 210 numberOfWordsToShift = Math.floor(aNumberOfBitsToShift / 32);
213 numberOfBitsToShift = aNumberOfBitsToShift % 32; 211 numberOfBitsToShift = aNumberOfBitsToShift % 32;
214 212
215 result = new Array(aWordArray.length + numberOfWordsToShift); 213 result = new Array(aWordArray.length + numberOfWordsToShift);
216 214
217 c = numberOfWordsToShift; 215 c = numberOfWordsToShift;
218 for (i=0; i<c; i++) { 216 for (i=0; i<c; i++) {
219 result[i] = 0; 217 result[i] = 0;
220 } 218 }
221 219
222 overflowValue = 0; 220 overflowValue = 0;
223 nextOverflowValue = 0; 221 nextOverflowValue = 0;
224 222
225 c = aWordArray.length; 223 c = aWordArray.length;
226 for (i=0; i<c; i++) { 224 for (i=0; i<c; i++) {
227 varvalue; 225 varvalue;
228 varresultWord; 226 varresultWord;
229 227
230 // value = this.value()[i]; 228 // value = this.value()[i];
231 value = aWordArray[i]; 229 value = aWordArray[i];
232 230
233 if (numberOfBitsToShift > 0) { 231 if (numberOfBitsToShift > 0) {
234 var nextOverflowValue; 232 var nextOverflowValue;
235 233
236 nextOverflowValue = (value >>> (32 - numberOfBitsToShift)); 234 nextOverflowValue = (value >>> (32 - numberOfBitsToShift));
237 value = value & (0xffffffff >>> numberOfBitsToShift); 235 value = value & (0xffffffff >>> numberOfBitsToShift);
238 resultWord = (((value << numberOfBitsToShift) | overflowValue) >>> 0); 236 resultWord = (((value << numberOfBitsToShift) | overflowValue) >>> 0);
239 } else { 237 } else {
240 resultWord = value; 238 resultWord = value;
241 } 239 }
242 240
243 result[i+numberOfWordsToShift] = resultWord; 241 result[i+numberOfWordsToShift] = resultWord;
244 overflowValue = nextOverflowValue; 242 overflowValue = nextOverflowValue;
245 } 243 }
246 244
247 if (overflowValue != 0) { 245 if (overflowValue != 0) {
248 result[aWordArray.length + numberOfWordsToShift] = overflowValue; 246 result[aWordArray.length + numberOfWordsToShift] = overflowValue;
249 } 247 }
250 248
251 return result; 249 return result;
252}; 250};
253 251
254Clipperz.Crypto.ECC.BinaryField.Value._overwriteShiftLeft = function(aWordArray, aNumberOfBitsToShift) { 252Clipperz.Crypto.ECC.BinaryField.Value._overwriteShiftLeft = function(aWordArray, aNumberOfBitsToShift) {
255 var numberOfWordsToShift; 253 var numberOfWordsToShift;
256 varnumberOfBitsToShift; 254 varnumberOfBitsToShift;
257 var result; 255 var result;
258 varoverflowValue; 256 varoverflowValue;
259 vari,c; 257 vari,c;
260 258
261 numberOfWordsToShift = Math.floor(aNumberOfBitsToShift / 32); 259 numberOfWordsToShift = Math.floor(aNumberOfBitsToShift / 32);
262 numberOfBitsToShift = aNumberOfBitsToShift % 32; 260 numberOfBitsToShift = aNumberOfBitsToShift % 32;
263 261
264 result = new Array(aWordArray.length + numberOfWordsToShift); 262 result = new Array(aWordArray.length + numberOfWordsToShift);
265 263
266 c = numberOfWordsToShift; 264 c = numberOfWordsToShift;
267 for (i=0; i<c; i++) { 265 for (i=0; i<c; i++) {
268 result[i] = 0; 266 result[i] = 0;
269 } 267 }
270 268
271 overflowValue = 0; 269 overflowValue = 0;
272 nextOverflowValue = 0; 270 nextOverflowValue = 0;
273 271
274 c = aWordArray.length; 272 c = aWordArray.length;
275 for (i=0; i<c; i++) { 273 for (i=0; i<c; i++) {
276 varvalue; 274 varvalue;
277 varresultWord; 275 varresultWord;
278 276
279 // value = this.value()[i]; 277 // value = this.value()[i];
280 value = aWordArray[i]; 278 value = aWordArray[i];
281 279
282 if (numberOfBitsToShift > 0) { 280 if (numberOfBitsToShift > 0) {
283 var nextOverflowValue; 281 var nextOverflowValue;
284 282
285 nextOverflowValue = (value >>> (32 - numberOfBitsToShift)); 283 nextOverflowValue = (value >>> (32 - numberOfBitsToShift));
286 value = value & (0xffffffff >>> numberOfBitsToShift); 284 value = value & (0xffffffff >>> numberOfBitsToShift);
287 resultWord = (((value << numberOfBitsToShift) | overflowValue) >>> 0); 285 resultWord = (((value << numberOfBitsToShift) | overflowValue) >>> 0);
288 } else { 286 } else {
289 resultWord = value; 287 resultWord = value;
290 } 288 }
291 289
292 result[i+numberOfWordsToShift] = resultWord; 290 result[i+numberOfWordsToShift] = resultWord;
293 overflowValue = nextOverflowValue; 291 overflowValue = nextOverflowValue;
294 } 292 }
295 293
296 if (overflowValue != 0) { 294 if (overflowValue != 0) {
297 result[aWordArray.length + numberOfWordsToShift] = overflowValue; 295 result[aWordArray.length + numberOfWordsToShift] = overflowValue;
298 } 296 }
299 297
300 return result; 298 return result;
301}; 299};
302 300
303Clipperz.Crypto.ECC.BinaryField.Value._bitSize = function(aWordArray) { 301Clipperz.Crypto.ECC.BinaryField.Value._bitSize = function(aWordArray) {
304 varresult; 302 varresult;
305 varnotNullElements; 303 varnotNullElements;
306 var mostValuableWord; 304 var mostValuableWord;
307 var matchingBitsInMostImportantWord; 305 var matchingBitsInMostImportantWord;
308 var mask; 306 var mask;
309 var i,c; 307 var i,c;
310 308
311 notNullElements = aWordArray.length; 309 notNullElements = aWordArray.length;
312 310
313 if ((aWordArray.length == 1) && (aWordArray[0] == 0)) { 311 if ((aWordArray.length == 1) && (aWordArray[0] == 0)) {
314 result = 0; 312 result = 0;
315 } else { 313 } else {
316 while((aWordArray[notNullElements - 1] == 0) && (notNullElements > 0)) { 314 while((aWordArray[notNullElements - 1] == 0) && (notNullElements > 0)) {
317 notNullElements --; 315 notNullElements --;
318 } 316 }
319 317
320 result = (notNullElements - 1) * 32; 318 result = (notNullElements - 1) * 32;
321 mostValuableWord = aWordArray[notNullElements - 1]; 319 mostValuableWord = aWordArray[notNullElements - 1];
322 320
323 matchingBits = 32; 321 matchingBits = 32;
324 mask = 0x80000000; 322 mask = 0x80000000;
325 323
326 while ((matchingBits > 0) && ((mostValuableWord & mask) == 0)) { 324 while ((matchingBits > 0) && ((mostValuableWord & mask) == 0)) {
327 matchingBits --; 325 matchingBits --;
328 mask >>>= 1; 326 mask >>>= 1;
329 } 327 }
330 328
331 result += matchingBits; 329 result += matchingBits;
332 } 330 }
333 331
334 return result; 332 return result;
335}; 333};
336 334
337Clipperz.Crypto.ECC.BinaryField.Value._isBitSet = function(aWordArray, aBitPosition) { 335Clipperz.Crypto.ECC.BinaryField.Value._isBitSet = function(aWordArray, aBitPosition) {
338 var result; 336 var result;
339 varbyteIndex; 337 varbyteIndex;
340 var bitIndexInSelectedByte; 338 var bitIndexInSelectedByte;
341 339
342 byteIndex = Math.floor(aBitPosition / 32); 340 byteIndex = Math.floor(aBitPosition / 32);
343 bitIndexInSelectedByte = aBitPosition % 32; 341 bitIndexInSelectedByte = aBitPosition % 32;
344 342
345 if (byteIndex <= aWordArray.length) { 343 if (byteIndex <= aWordArray.length) {
346 result = ((aWordArray[byteIndex] & (1 << bitIndexInSelectedByte)) != 0); 344 result = ((aWordArray[byteIndex] & (1 << bitIndexInSelectedByte)) != 0);
347 } else { 345 } else {
348 result = false; 346 result = false;
349 } 347 }
350 348
351 return result; 349 return result;
352}; 350};
353 351
354Clipperz.Crypto.ECC.BinaryField.Value._compare = function(a,b) { 352Clipperz.Crypto.ECC.BinaryField.Value._compare = function(a,b) {
355 varresult; 353 varresult;
356 var i,c; 354 var i,c;
357 355
358 result = MochiKit.Base.compare(a.length, b.length); 356 result = MochiKit.Base.compare(a.length, b.length);
359 357
360 c = a.length; 358 c = a.length;
361 for (i=0; (i<c) && (result==0); i++) { 359 for (i=0; (i<c) && (result==0); i++) {
362//console.log("compare[" + c + " - " + i + " - 1] " + this.value()[c-i-1] + ", " + aValue.value()[c-i-1]); 360//console.log("compare[" + c + " - " + i + " - 1] " + 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]); 361 // result = MochiKit.Base.compare(this.value()[c-i-1], aValue.value()[c-i-1]);
364 result = MochiKit.Base.compare(a[c-i-1], b[c-i-1]); 362 result = MochiKit.Base.compare(a[c-i-1], b[c-i-1]);
365 } 363 }
366 364
367 return result; 365 return result;
368}; 366};
369 367
370 368
371Clipperz.Crypto.ECC.BinaryField.Value['exception']= { 369Clipperz.Crypto.ECC.BinaryField.Value['exception']= {
372 'UnsupportedBase': new MochiKit.Base.NamedError("Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedBase"), 370 'UnsupportedBase': new MochiKit.Base.NamedError("Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedBase"),
373 'UnsupportedConstructorValueType':new MochiKit.Base.NamedError("Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedConstructorValueType") 371 'UnsupportedConstructorValueType':new MochiKit.Base.NamedError("Clipperz.Crypto.ECC.BinaryField.Value.exception.UnsupportedConstructorValueType")
374}; 372};
diff --git a/frontend/beta/js/Clipperz/Crypto/PRNG.js b/frontend/beta/js/Clipperz/Crypto/PRNG.js
index 39d0045..b5c3f8a 100644
--- a/frontend/beta/js/Clipperz/Crypto/PRNG.js
+++ b/frontend/beta/js/Clipperz/Crypto/PRNG.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { 24try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) {
27 throw "Clipperz.Crypto.PRNG depends on Clipperz.ByteArray!"; 25 throw "Clipperz.Crypto.PRNG depends on Clipperz.ByteArray!";
28} 26}
29 27
30try { if (typeof(Clipperz.Crypto.SHA) == 'undefined') { throw ""; }} catch (e) { 28try { if (typeof(Clipperz.Crypto.SHA) == 'undefined') { throw ""; }} catch (e) {
31 throw "Clipperz.Crypto.PRNG depends on Clipperz.Crypto.SHA!"; 29 throw "Clipperz.Crypto.PRNG depends on Clipperz.Crypto.SHA!";
32} 30}
33 31
34try { if (typeof(Clipperz.Crypto.AES) == 'undefined') { throw ""; }} catch (e) { 32try { if (typeof(Clipperz.Crypto.AES) == 'undefined') { throw ""; }} catch (e) {
35 throw "Clipperz.Crypto.PRNG depends on Clipperz.Crypto.AES!"; 33 throw "Clipperz.Crypto.PRNG depends on Clipperz.Crypto.AES!";
36} 34}
37 35
38if (typeof(Clipperz.Crypto.PRNG) == 'undefined') { Clipperz.Crypto.PRNG = {}; } 36if (typeof(Clipperz.Crypto.PRNG) == 'undefined') { Clipperz.Crypto.PRNG = {}; }
39 37
40//############################################################################# 38//#############################################################################
41 39
42Clipperz.Crypto.PRNG.EntropyAccumulator = function(args) { 40Clipperz.Crypto.PRNG.EntropyAccumulator = function(args) {
43 args = args || {}; 41 args = args || {};
44 //MochiKit.Base.bindMethods(this); 42 //MochiKit.Base.bindMethods(this);
45 43
46 this._stack = new Clipperz.ByteArray(); 44 this._stack = new Clipperz.ByteArray();
47 this._maxStackLengthBeforeHashing = args.maxStackLengthBeforeHashing || 256; 45 this._maxStackLengthBeforeHashing = args.maxStackLengthBeforeHashing || 256;
48 return this; 46 return this;
49} 47}
50 48
51Clipperz.Crypto.PRNG.EntropyAccumulator.prototype = MochiKit.Base.update(null, { 49Clipperz.Crypto.PRNG.EntropyAccumulator.prototype = MochiKit.Base.update(null, {
52 50
53 'toString': function() { 51 'toString': function() {
54 return "Clipperz.Crypto.PRNG.EntropyAccumulator"; 52 return "Clipperz.Crypto.PRNG.EntropyAccumulator";
55 }, 53 },
56 54
57 //------------------------------------------------------------------------- 55 //-------------------------------------------------------------------------
58 56
59 'stack': function() { 57 'stack': function() {
60 return this._stack; 58 return this._stack;
61 }, 59 },
62 60
63 'setStack': function(aValue) { 61 'setStack': function(aValue) {
64 this._stack = aValue; 62 this._stack = aValue;
65 }, 63 },
66 64
67 'resetStack': function() { 65 'resetStack': function() {
68 this.stack().reset(); 66 this.stack().reset();
69 }, 67 },
70 68
71 'maxStackLengthBeforeHashing': function() { 69 'maxStackLengthBeforeHashing': function() {
72 return this._maxStackLengthBeforeHashing; 70 return this._maxStackLengthBeforeHashing;
73 }, 71 },
74 72
75 //------------------------------------------------------------------------- 73 //-------------------------------------------------------------------------
76 74
77 'addRandomByte': function(aValue) { 75 'addRandomByte': function(aValue) {
78 this.stack().appendByte(aValue); 76 this.stack().appendByte(aValue);
79 77
80 if (this.stack().length() > this.maxStackLengthBeforeHashing()) { 78 if (this.stack().length() > this.maxStackLengthBeforeHashing()) {
81 this.setStack(Clipperz.Crypto.SHA.sha_d256(this.stack())); 79 this.setStack(Clipperz.Crypto.SHA.sha_d256(this.stack()));
82 } 80 }
83 }, 81 },
84 82
85 //------------------------------------------------------------------------- 83 //-------------------------------------------------------------------------
86 __syntaxFix__: "syntax fix" 84 __syntaxFix__: "syntax fix"
87}); 85});
88 86
89//############################################################################# 87//#############################################################################
90 88
91Clipperz.Crypto.PRNG.RandomnessSource = function(args) { 89Clipperz.Crypto.PRNG.RandomnessSource = function(args) {
92 args = args || {}; 90 args = args || {};
93 MochiKit.Base.bindMethods(this); 91 MochiKit.Base.bindMethods(this);
94 92
95 this._generator = args.generator || null; 93 this._generator = args.generator || null;
96 this._sourceId = args.sourceId || null; 94 this._sourceId = args.sourceId || null;
97 this._boostMode = args.boostMode || false; 95 this._boostMode = args.boostMode || false;
98 96
99 this._nextPoolIndex = 0; 97 this._nextPoolIndex = 0;
100 98
101 return this; 99 return this;
102} 100}
103 101
104Clipperz.Crypto.PRNG.RandomnessSource.prototype = MochiKit.Base.update(null, { 102Clipperz.Crypto.PRNG.RandomnessSource.prototype = MochiKit.Base.update(null, {
105 103
106 'generator': function() { 104 'generator': function() {
107 return this._generator; 105 return this._generator;
108 }, 106 },
109 107
110 'setGenerator': function(aValue) { 108 'setGenerator': function(aValue) {
111 this._generator = aValue; 109 this._generator = aValue;
112 }, 110 },
113 111
114 //------------------------------------------------------------------------- 112 //-------------------------------------------------------------------------
115 113
116 'boostMode': function() { 114 'boostMode': function() {
117 return this._boostMode; 115 return this._boostMode;
118 }, 116 },
119 117
120 'setBoostMode': function(aValue) { 118 'setBoostMode': function(aValue) {
121 this._boostMode = aValue; 119 this._boostMode = aValue;
122 }, 120 },
123 121
124 //------------------------------------------------------------------------- 122 //-------------------------------------------------------------------------
125 123
126 'sourceId': function() { 124 'sourceId': function() {
127 return this._sourceId; 125 return this._sourceId;
128 }, 126 },
129 127
130 'setSourceId': function(aValue) { 128 'setSourceId': function(aValue) {
131 this._sourceId = aValue; 129 this._sourceId = aValue;
132 }, 130 },
133 131
134 //------------------------------------------------------------------------- 132 //-------------------------------------------------------------------------
135 133
136 'nextPoolIndex': function() { 134 'nextPoolIndex': function() {
137 return this._nextPoolIndex; 135 return this._nextPoolIndex;
138 }, 136 },
139 137
140 'incrementNextPoolIndex': function() { 138 'incrementNextPoolIndex': function() {
141 this._nextPoolIndex = ((this._nextPoolIndex + 1) % this.generator().numberOfEntropyAccumulators()); 139 this._nextPoolIndex = ((this._nextPoolIndex + 1) % this.generator().numberOfEntropyAccumulators());
142 }, 140 },
143 141
144 //------------------------------------------------------------------------- 142 //-------------------------------------------------------------------------
145 143
146 'updateGeneratorWithValue': function(aRandomValue) { 144 'updateGeneratorWithValue': function(aRandomValue) {
147 if (this.generator() != null) { 145 if (this.generator() != null) {
148 this.generator().addRandomByte(this.sourceId(), this.nextPoolIndex(), aRandomValue); 146 this.generator().addRandomByte(this.sourceId(), this.nextPoolIndex(), aRandomValue);
149 this.incrementNextPoolIndex(); 147 this.incrementNextPoolIndex();
150 } 148 }
151 }, 149 },
152 150
153 //------------------------------------------------------------------------- 151 //-------------------------------------------------------------------------
154 __syntaxFix__: "syntax fix" 152 __syntaxFix__: "syntax fix"
155}); 153});
156 154
157//############################################################################# 155//#############################################################################
158 156
159Clipperz.Crypto.PRNG.TimeRandomnessSource = function(args) { 157Clipperz.Crypto.PRNG.TimeRandomnessSource = function(args) {
160 args = args || {}; 158 args = args || {};
161 //MochiKit.Base.bindMethods(this); 159 //MochiKit.Base.bindMethods(this);
162 160
163 this._intervalTime = args.intervalTime || 1000; 161 this._intervalTime = args.intervalTime || 1000;
164 162
165 Clipperz.Crypto.PRNG.RandomnessSource.call(this, args); 163 Clipperz.Crypto.PRNG.RandomnessSource.call(this, args);
166 164
167 this.collectEntropy(); 165 this.collectEntropy();
168 return this; 166 return this;
169} 167}
170 168
171Clipperz.Crypto.PRNG.TimeRandomnessSource.prototype = MochiKit.Base.update(new Clipperz.Crypto.PRNG.RandomnessSource, { 169Clipperz.Crypto.PRNG.TimeRandomnessSource.prototype = MochiKit.Base.update(new Clipperz.Crypto.PRNG.RandomnessSource, {
172 170
173 'intervalTime': function() { 171 'intervalTime': function() {
174 return this._intervalTime; 172 return this._intervalTime;
175 }, 173 },
176 174
177 //------------------------------------------------------------------------- 175 //-------------------------------------------------------------------------
178 176
179 'collectEntropy': function() { 177 'collectEntropy': function() {
180 varnow; 178 varnow;
181 varentropyByte; 179 varentropyByte;
182 var intervalTime; 180 var intervalTime;
183 now = new Date(); 181 now = new Date();
184 entropyByte = (now.getTime() & 0xff); 182 entropyByte = (now.getTime() & 0xff);
185 183
186 intervalTime = this.intervalTime(); 184 intervalTime = this.intervalTime();
187 if (this.boostMode() == true) { 185 if (this.boostMode() == true) {
188 intervalTime = intervalTime / 9; 186 intervalTime = intervalTime / 9;
189 } 187 }
190 188
191 this.updateGeneratorWithValue(entropyByte); 189 this.updateGeneratorWithValue(entropyByte);
192 setTimeout(this.collectEntropy, intervalTime); 190 setTimeout(this.collectEntropy, intervalTime);
193 }, 191 },
194 192
195 //------------------------------------------------------------------------- 193 //-------------------------------------------------------------------------
196 194
197 'numberOfRandomBits': function() { 195 'numberOfRandomBits': function() {
198 return 5; 196 return 5;
199 }, 197 },
200 198
201 //------------------------------------------------------------------------- 199 //-------------------------------------------------------------------------
202 200
203 'pollingFrequency': function() { 201 'pollingFrequency': function() {
204 return 10; 202 return 10;
205 }, 203 },
206 204
207 //------------------------------------------------------------------------- 205 //-------------------------------------------------------------------------
208 __syntaxFix__: "syntax fix" 206 __syntaxFix__: "syntax fix"
209}); 207});
210 208
211//***************************************************************************** 209//*****************************************************************************
212 210
213Clipperz.Crypto.PRNG.MouseRandomnessSource = function(args) { 211Clipperz.Crypto.PRNG.MouseRandomnessSource = function(args) {
214 args = args || {}; 212 args = args || {};
215 213
216 Clipperz.Crypto.PRNG.RandomnessSource.call(this, args); 214 Clipperz.Crypto.PRNG.RandomnessSource.call(this, args);
217 215
218 this._numberOfBitsToCollectAtEachEvent = 4; 216 this._numberOfBitsToCollectAtEachEvent = 4;
219 this._randomBitsCollector = 0; 217 this._randomBitsCollector = 0;
220 this._numberOfRandomBitsCollected = 0; 218 this._numberOfRandomBitsCollected = 0;
221 219
222 MochiKit.Signal.connect(document, 'onmousemove', this, 'collectEntropy'); 220 MochiKit.Signal.connect(document, 'onmousemove', this, 'collectEntropy');
223 221
224 return this; 222 return this;
225} 223}
226 224
227Clipperz.Crypto.PRNG.MouseRandomnessSource.prototype = MochiKit.Base.update(new Clipperz.Crypto.PRNG.RandomnessSource, { 225Clipperz.Crypto.PRNG.MouseRandomnessSource.prototype = MochiKit.Base.update(new Clipperz.Crypto.PRNG.RandomnessSource, {
228 226
229 //------------------------------------------------------------------------- 227 //-------------------------------------------------------------------------
230 228
231 'numberOfBitsToCollectAtEachEvent': function() { 229 'numberOfBitsToCollectAtEachEvent': function() {
232 return this._numberOfBitsToCollectAtEachEvent; 230 return this._numberOfBitsToCollectAtEachEvent;
233 }, 231 },
234 232
235 //------------------------------------------------------------------------- 233 //-------------------------------------------------------------------------
236 234
237 'randomBitsCollector': function() { 235 'randomBitsCollector': function() {
238 return this._randomBitsCollector; 236 return this._randomBitsCollector;
239 }, 237 },
240 238
241 'setRandomBitsCollector': function(aValue) { 239 'setRandomBitsCollector': function(aValue) {
242 this._randomBitsCollector = aValue; 240 this._randomBitsCollector = aValue;
243 }, 241 },
244 242
245 'appendRandomBitsToRandomBitsCollector': function(aValue) { 243 'appendRandomBitsToRandomBitsCollector': function(aValue) {
246 var collectedBits; 244 var collectedBits;
247 var numberOfRandomBitsCollected; 245 var numberOfRandomBitsCollected;
248 246
249 numberOfRandomBitsCollected = this.numberOfRandomBitsCollected(); 247 numberOfRandomBitsCollected = this.numberOfRandomBitsCollected();
250 collectetBits = this.randomBitsCollector() | (aValue << numberOfRandomBitsCollected); 248 collectetBits = this.randomBitsCollector() | (aValue << numberOfRandomBitsCollected);
251 this.setRandomBitsCollector(collectetBits); 249 this.setRandomBitsCollector(collectetBits);
252 numberOfRandomBitsCollected += this.numberOfBitsToCollectAtEachEvent(); 250 numberOfRandomBitsCollected += this.numberOfBitsToCollectAtEachEvent();
253 251
254 if (numberOfRandomBitsCollected == 8) { 252 if (numberOfRandomBitsCollected == 8) {
255 this.updateGeneratorWithValue(collectetBits); 253 this.updateGeneratorWithValue(collectetBits);
256 numberOfRandomBitsCollected = 0; 254 numberOfRandomBitsCollected = 0;
257 this.setRandomBitsCollector(0); 255 this.setRandomBitsCollector(0);
258 } 256 }
259 257
260 this.setNumberOfRandomBitsCollected(numberOfRandomBitsCollected) 258 this.setNumberOfRandomBitsCollected(numberOfRandomBitsCollected)
261 }, 259 },
262 260
263 //------------------------------------------------------------------------- 261 //-------------------------------------------------------------------------
264 262
265 'numberOfRandomBitsCollected': function() { 263 'numberOfRandomBitsCollected': function() {
266 return this._numberOfRandomBitsCollected; 264 return this._numberOfRandomBitsCollected;
267 }, 265 },
268 266
269 'setNumberOfRandomBitsCollected': function(aValue) { 267 'setNumberOfRandomBitsCollected': function(aValue) {
270 this._numberOfRandomBitsCollected = aValue; 268 this._numberOfRandomBitsCollected = aValue;
271 }, 269 },
272 270
273 //------------------------------------------------------------------------- 271 //-------------------------------------------------------------------------
274 272
275 'collectEntropy': function(anEvent) { 273 'collectEntropy': function(anEvent) {
276 var mouseLocation; 274 var mouseLocation;
277 var randomBit; 275 var randomBit;
278 var mask; 276 var mask;
279 277
280 mask = 0xffffffff >>> (32 - this.numberOfBitsToCollectAtEachEvent()); 278 mask = 0xffffffff >>> (32 - this.numberOfBitsToCollectAtEachEvent());
281 279
282 mouseLocation = anEvent.mouse().client; 280 mouseLocation = anEvent.mouse().client;
283 randomBit = ((mouseLocation.x ^ mouseLocation.y) & mask); 281 randomBit = ((mouseLocation.x ^ mouseLocation.y) & mask);
284 this.appendRandomBitsToRandomBitsCollector(randomBit) 282 this.appendRandomBitsToRandomBitsCollector(randomBit)
285 }, 283 },
286 284
287 //------------------------------------------------------------------------- 285 //-------------------------------------------------------------------------
288 286
289 'numberOfRandomBits': function() { 287 'numberOfRandomBits': function() {
290 return 1; 288 return 1;
291 }, 289 },
292 290
293 //------------------------------------------------------------------------- 291 //-------------------------------------------------------------------------
294 292
295 'pollingFrequency': function() { 293 'pollingFrequency': function() {
296 return 10; 294 return 10;
297 }, 295 },
298 296
299 //------------------------------------------------------------------------- 297 //-------------------------------------------------------------------------
300 __syntaxFix__: "syntax fix" 298 __syntaxFix__: "syntax fix"
301}); 299});
302 300
303//***************************************************************************** 301//*****************************************************************************
304 302
305Clipperz.Crypto.PRNG.KeyboardRandomnessSource = function(args) { 303Clipperz.Crypto.PRNG.KeyboardRandomnessSource = function(args) {
306 args = args || {}; 304 args = args || {};
307 Clipperz.Crypto.PRNG.RandomnessSource.call(this, args); 305 Clipperz.Crypto.PRNG.RandomnessSource.call(this, args);
308 306
309 this._randomBitsCollector = 0; 307 this._randomBitsCollector = 0;
310 this._numberOfRandomBitsCollected = 0; 308 this._numberOfRandomBitsCollected = 0;
311 309
312 MochiKit.Signal.connect(document, 'onkeypress', this, 'collectEntropy'); 310 MochiKit.Signal.connect(document, 'onkeypress', this, 'collectEntropy');
313 311
314 return this; 312 return this;
315} 313}
316 314
317Clipperz.Crypto.PRNG.KeyboardRandomnessSource.prototype = MochiKit.Base.update(new Clipperz.Crypto.PRNG.RandomnessSource, { 315Clipperz.Crypto.PRNG.KeyboardRandomnessSource.prototype = MochiKit.Base.update(new Clipperz.Crypto.PRNG.RandomnessSource, {
318 316
319 //------------------------------------------------------------------------- 317 //-------------------------------------------------------------------------
320 318
321 'randomBitsCollector': function() { 319 'randomBitsCollector': function() {
322 return this._randomBitsCollector; 320 return this._randomBitsCollector;
323 }, 321 },
324 322
325 'setRandomBitsCollector': function(aValue) { 323 'setRandomBitsCollector': function(aValue) {
326 this._randomBitsCollector = aValue; 324 this._randomBitsCollector = aValue;
327 }, 325 },
328 326
329 'appendRandomBitToRandomBitsCollector': function(aValue) { 327 'appendRandomBitToRandomBitsCollector': function(aValue) {
330 var collectedBits; 328 var collectedBits;
331 var numberOfRandomBitsCollected; 329 var numberOfRandomBitsCollected;
332 330
333 numberOfRandomBitsCollected = this.numberOfRandomBitsCollected(); 331 numberOfRandomBitsCollected = this.numberOfRandomBitsCollected();
334 collectetBits = this.randomBitsCollector() | (aValue << numberOfRandomBitsCollected); 332 collectetBits = this.randomBitsCollector() | (aValue << numberOfRandomBitsCollected);
335 this.setRandomBitsCollector(collectetBits); 333 this.setRandomBitsCollector(collectetBits);
336 numberOfRandomBitsCollected ++; 334 numberOfRandomBitsCollected ++;
337 335
338 if (numberOfRandomBitsCollected == 8) { 336 if (numberOfRandomBitsCollected == 8) {
339 this.updateGeneratorWithValue(collectetBits); 337 this.updateGeneratorWithValue(collectetBits);
340 numberOfRandomBitsCollected = 0; 338 numberOfRandomBitsCollected = 0;
341 this.setRandomBitsCollector(0); 339 this.setRandomBitsCollector(0);
342 } 340 }
343 341
344 this.setNumberOfRandomBitsCollected(numberOfRandomBitsCollected) 342 this.setNumberOfRandomBitsCollected(numberOfRandomBitsCollected)
345 }, 343 },
346 344
347 //------------------------------------------------------------------------- 345 //-------------------------------------------------------------------------
348 346
349 'numberOfRandomBitsCollected': function() { 347 'numberOfRandomBitsCollected': function() {
350 return this._numberOfRandomBitsCollected; 348 return this._numberOfRandomBitsCollected;
351 }, 349 },
352 350
353 'setNumberOfRandomBitsCollected': function(aValue) { 351 'setNumberOfRandomBitsCollected': function(aValue) {
354 this._numberOfRandomBitsCollected = aValue; 352 this._numberOfRandomBitsCollected = aValue;
355 }, 353 },
356 354
357 //------------------------------------------------------------------------- 355 //-------------------------------------------------------------------------
358 356
359 'collectEntropy': function(anEvent) { 357 'collectEntropy': function(anEvent) {
360/* 358/*
361 var mouseLocation; 359 var mouseLocation;
362 var randomBit; 360 var randomBit;
363 361
364 mouseLocation = anEvent.mouse().client; 362 mouseLocation = anEvent.mouse().client;
365 363
366 randomBit = ((mouseLocation.x ^ mouseLocation.y) & 0x1); 364 randomBit = ((mouseLocation.x ^ mouseLocation.y) & 0x1);
367 this.appendRandomBitToRandomBitsCollector(randomBit); 365 this.appendRandomBitToRandomBitsCollector(randomBit);
368*/ 366*/
369 }, 367 },
370 368
371 //------------------------------------------------------------------------- 369 //-------------------------------------------------------------------------
372 370
373 'numberOfRandomBits': function() { 371 'numberOfRandomBits': function() {
374 return 1; 372 return 1;
375 }, 373 },
376 374
377 //------------------------------------------------------------------------- 375 //-------------------------------------------------------------------------
378 376
379 'pollingFrequency': function() { 377 'pollingFrequency': function() {
380 return 10; 378 return 10;
381 }, 379 },
382 380
383 //------------------------------------------------------------------------- 381 //-------------------------------------------------------------------------
384 __syntaxFix__: "syntax fix" 382 __syntaxFix__: "syntax fix"
385}); 383});
386 384
387//############################################################################# 385//#############################################################################
388 386
389Clipperz.Crypto.PRNG.Fortuna = function(args) { 387Clipperz.Crypto.PRNG.Fortuna = function(args) {
390 vari,c; 388 vari,c;
391 389
392 args = args || {}; 390 args = args || {};
393 391
394 this._key = args.seed || null; 392 this._key = args.seed || null;
395 if (this._key == null) { 393 if (this._key == null) {
396 this._counter = 0; 394 this._counter = 0;
397 this._key = new Clipperz.ByteArray(); 395 this._key = new Clipperz.ByteArray();
398 } else { 396 } else {
399 this._counter = 1; 397 this._counter = 1;
400 } 398 }
401 399
402 this._aesKey = null; 400 this._aesKey = null;
403 401
404 this._firstPoolReseedLevel = args.firstPoolReseedLevel || 32 || 64; 402 this._firstPoolReseedLevel = args.firstPoolReseedLevel || 32 || 64;
405 this._numberOfEntropyAccumulators = args.numberOfEntropyAccumulators || 32; 403 this._numberOfEntropyAccumulators = args.numberOfEntropyAccumulators || 32;
406 404
diff --git a/frontend/beta/js/Clipperz/Crypto/RSA.js b/frontend/beta/js/Clipperz/Crypto/RSA.js
index 6844dba..5a480f1 100644
--- a/frontend/beta/js/Clipperz/Crypto/RSA.js
+++ b/frontend/beta/js/Clipperz/Crypto/RSA.js
@@ -1,148 +1,146 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26try { if (typeof(Clipperz.Crypto.BigInt) == 'undefined') { throw ""; }} catch (e) { 24try { if (typeof(Clipperz.Crypto.BigInt) == 'undefined') { throw ""; }} catch (e) {
27 throw "Clipperz.Crypto.RSA depends on Clipperz.Crypto.BigInt!"; 25 throw "Clipperz.Crypto.RSA depends on Clipperz.Crypto.BigInt!";
28} 26}
29 27
30if (typeof(Clipperz.Crypto.RSA) == 'undefined') { Clipperz.Crypto.RSA = {}; } 28if (typeof(Clipperz.Crypto.RSA) == 'undefined') { Clipperz.Crypto.RSA = {}; }
31 29
32Clipperz.Crypto.RSA.VERSION = "0.1"; 30Clipperz.Crypto.RSA.VERSION = "0.1";
33Clipperz.Crypto.RSA.NAME = "Clipperz.RSA"; 31Clipperz.Crypto.RSA.NAME = "Clipperz.RSA";
34 32
35//############################################################################# 33//#############################################################################
36 34
37MochiKit.Base.update(Clipperz.Crypto.RSA, { 35MochiKit.Base.update(Clipperz.Crypto.RSA, {
38 36
39 //------------------------------------------------------------------------- 37 //-------------------------------------------------------------------------
40 38
41 'publicKeyWithValues': function (e, d, n) { 39 'publicKeyWithValues': function (e, d, n) {
42 varresult; 40 varresult;
43 41
44 result = {}; 42 result = {};
45 43
46 if (e.isBigInt) { 44 if (e.isBigInt) {
47 result.e = e; 45 result.e = e;
48 } else { 46 } else {
49 result.e = new Clipperz.Crypto.BigInt(e, 16); 47 result.e = new Clipperz.Crypto.BigInt(e, 16);
50 } 48 }
51 49
52 if (d.isBigInt) { 50 if (d.isBigInt) {
53 result.d = d; 51 result.d = d;
54 } else { 52 } else {
55 result.d = new Clipperz.Crypto.BigInt(d, 16); 53 result.d = new Clipperz.Crypto.BigInt(d, 16);
56 } 54 }
57 55
58 if (n.isBigInt) { 56 if (n.isBigInt) {
59 result.n = n; 57 result.n = n;
60 } else { 58 } else {
61 result.n = new Clipperz.Crypto.BigInt(n, 16); 59 result.n = new Clipperz.Crypto.BigInt(n, 16);
62 } 60 }
63 61
64 return result; 62 return result;
65 }, 63 },
66 64
67 'privateKeyWithValues': function(e, d, n) { 65 'privateKeyWithValues': function(e, d, n) {
68 return Clipperz.Crypto.RSA.publicKeyWithValues(e, d, n); 66 return Clipperz.Crypto.RSA.publicKeyWithValues(e, d, n);
69 }, 67 },
70 68
71 //----------------------------------------------------------------------------- 69 //-----------------------------------------------------------------------------
72 70
73 'encryptUsingPublicKey': function (aKey, aMessage) { 71 'encryptUsingPublicKey': function (aKey, aMessage) {
74 varmessageValue; 72 varmessageValue;
75 varresult; 73 varresult;
76 74
77 messageValue = new Clipperz.Crypto.BigInt(aMessage, 16); 75 messageValue = new Clipperz.Crypto.BigInt(aMessage, 16);
78 result = messageValue.powerModule(aKey.e, aKey.n); 76 result = messageValue.powerModule(aKey.e, aKey.n);
79 77
80 return result.asString(16); 78 return result.asString(16);
81 }, 79 },
82 80
83 //............................................................................. 81 //.............................................................................
84 82
85 'decryptUsingPublicKey': function (aKey, aMessage) { 83 'decryptUsingPublicKey': function (aKey, aMessage) {
86 return Clipperz.Crypto.RSA.encryptUsingPublicKey(aKey, aMessage); 84 return Clipperz.Crypto.RSA.encryptUsingPublicKey(aKey, aMessage);
87 }, 85 },
88 86
89 //----------------------------------------------------------------------------- 87 //-----------------------------------------------------------------------------
90 88
91 'encryptUsingPrivateKey': function (aKey, aMessage) { 89 'encryptUsingPrivateKey': function (aKey, aMessage) {
92 varmessageValue; 90 varmessageValue;
93 varresult; 91 varresult;
94 92
95 messageValue = new Clipperz.Crypto.BigInt(aMessage, 16); 93 messageValue = new Clipperz.Crypto.BigInt(aMessage, 16);
96 result = messageValue.powerModule(aKey.d, aKey.n); 94 result = messageValue.powerModule(aKey.d, aKey.n);
97 95
98 return result.asString(16); 96 return result.asString(16);
99 }, 97 },
100 98
101 //............................................................................. 99 //.............................................................................
102 100
103 'decryptUsingPrivateKey': function (aKey, aMessage) { 101 'decryptUsingPrivateKey': function (aKey, aMessage) {
104 return Clipperz.Crypto.RSA.encryptUsingPrivateKey(aKey, aMessage); 102 return Clipperz.Crypto.RSA.encryptUsingPrivateKey(aKey, aMessage);
105 }, 103 },
106 104
107 //----------------------------------------------------------------------------- 105 //-----------------------------------------------------------------------------
108 106
109 'generatePublicKey': function(aNumberOfBits) { 107 'generatePublicKey': function(aNumberOfBits) {
110 varresult; 108 varresult;
111 vare; 109 vare;
112 vard; 110 vard;
113 varn; 111 varn;
114 112
115 e = new Clipperz.Crypto.BigInt("10001", 16); 113 e = new Clipperz.Crypto.BigInt("10001", 16);
116 114
117 { 115 {
118 var p, q; 116 var p, q;
119 varphi; 117 varphi;
120 118
121 do { 119 do {
122 p = Clipperz.Crypto.BigInt.randomPrime(aNumberOfBits); 120 p = Clipperz.Crypto.BigInt.randomPrime(aNumberOfBits);
123 } while (p.module(e).equals(1)); 121 } while (p.module(e).equals(1));
124 122
125 do { 123 do {
126 q = Clipperz.Crypto.BigInt.randomPrime(aNumberOfBits); 124 q = Clipperz.Crypto.BigInt.randomPrime(aNumberOfBits);
127 } while ((q.equals(p)) || (q.module(e).equals(1))); 125 } while ((q.equals(p)) || (q.module(e).equals(1)));
128 126
129 n = p.multiply(q); 127 n = p.multiply(q);
130 phi = (p.subtract(1).multiply(q.subtract(1))); 128 phi = (p.subtract(1).multiply(q.subtract(1)));
131 d = e.powerModule(-1, phi); 129 d = e.powerModule(-1, phi);
132 } 130 }
133 131
134 result = Clipperz.Crypto.RSA.publicKeyWithValues(e, d, n); 132 result = Clipperz.Crypto.RSA.publicKeyWithValues(e, d, n);
135 133
136 return result; 134 return result;
137 }, 135 },
138 136
139 //------------------------------------------------------------------------- 137 //-------------------------------------------------------------------------
140 138
141 __syntaxFix__: "syntax fix" 139 __syntaxFix__: "syntax fix"
142 140
143 //------------------------------------------------------------------------- 141 //-------------------------------------------------------------------------
144 142
145}); 143});
146 144
147//############################################################################# 145//#############################################################################
148 146
diff --git a/frontend/beta/js/Clipperz/Crypto/SHA.js b/frontend/beta/js/Clipperz/Crypto/SHA.js
index 635eb90..9605d1c 100644
--- a/frontend/beta/js/Clipperz/Crypto/SHA.js
+++ b/frontend/beta/js/Clipperz/Crypto/SHA.js
@@ -1,293 +1,291 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { 24try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) {
27 throw "Clipperz.Crypto.PRNG depends on Clipperz.ByteArray!"; 25 throw "Clipperz.Crypto.PRNG depends on Clipperz.ByteArray!";
28} 26}
29 27
30if (typeof(Clipperz.Crypto) == 'undefined') { Clipperz.Crypto = {}; } 28if (typeof(Clipperz.Crypto) == 'undefined') { Clipperz.Crypto = {}; }
31if (typeof(Clipperz.Crypto.SHA) == 'undefined') { Clipperz.Crypto.SHA = {}; } 29if (typeof(Clipperz.Crypto.SHA) == 'undefined') { Clipperz.Crypto.SHA = {}; }
32 30
33Clipperz.Crypto.SHA.VERSION = "0.3"; 31Clipperz.Crypto.SHA.VERSION = "0.3";
34Clipperz.Crypto.SHA.NAME = "Clipperz.Crypto.SHA"; 32Clipperz.Crypto.SHA.NAME = "Clipperz.Crypto.SHA";
35 33
36MochiKit.Base.update(Clipperz.Crypto.SHA, { 34MochiKit.Base.update(Clipperz.Crypto.SHA, {
37 35
38 '__repr__': function () { 36 '__repr__': function () {
39 return "[" + this.NAME + " " + this.VERSION + "]"; 37 return "[" + this.NAME + " " + this.VERSION + "]";
40 }, 38 },
41 39
42 'toString': function () { 40 'toString': function () {
43 return this.__repr__(); 41 return this.__repr__();
44 }, 42 },
45 43
46 //----------------------------------------------------------------------------- 44 //-----------------------------------------------------------------------------
47 45
48 'rotateRight': function(aValue, aNumberOfBits) { 46 'rotateRight': function(aValue, aNumberOfBits) {
49//Clipperz.Profile.start("Clipperz.Crypto.SHA.rotateRight"); 47//Clipperz.Profile.start("Clipperz.Crypto.SHA.rotateRight");
50 var result; 48 var result;
51 49
52 result = (aValue >>> aNumberOfBits) | (aValue << (32 - aNumberOfBits)); 50 result = (aValue >>> aNumberOfBits) | (aValue << (32 - aNumberOfBits));
53 51
54//Clipperz.Profile.stop("Clipperz.Crypto.SHA.rotateRight"); 52//Clipperz.Profile.stop("Clipperz.Crypto.SHA.rotateRight");
55 return result; 53 return result;
56 }, 54 },
57 55
58 'shiftRight': function(aValue, aNumberOfBits) { 56 'shiftRight': function(aValue, aNumberOfBits) {
59//Clipperz.Profile.start("Clipperz.Crypto.SHA.shiftRight"); 57//Clipperz.Profile.start("Clipperz.Crypto.SHA.shiftRight");
60 var result; 58 var result;
61 59
62 result = aValue >>> aNumberOfBits; 60 result = aValue >>> aNumberOfBits;
63 61
64//Clipperz.Profile.stop("Clipperz.Crypto.SHA.shiftRight"); 62//Clipperz.Profile.stop("Clipperz.Crypto.SHA.shiftRight");
65 return result; 63 return result;
66 }, 64 },
67 65
68 //----------------------------------------------------------------------------- 66 //-----------------------------------------------------------------------------
69 67
70 'safeAdd': function() { 68 'safeAdd': function() {
71//Clipperz.Profile.start("Clipperz.Crypto.SHA.safeAdd"); 69//Clipperz.Profile.start("Clipperz.Crypto.SHA.safeAdd");
72 varresult; 70 varresult;
73 vari, c; 71 vari, c;
74 72
75 result = arguments[0]; 73 result = arguments[0];
76 c = arguments.length; 74 c = arguments.length;
77 for (i=1; i<c; i++) { 75 for (i=1; i<c; i++) {
78 varlowerBytesSum; 76 varlowerBytesSum;
79 77
80 lowerBytesSum = (result & 0xffff) + (arguments[i] & 0xffff); 78 lowerBytesSum = (result & 0xffff) + (arguments[i] & 0xffff);
81 result = (((result >> 16) + (arguments[i] >> 16) + (lowerBytesSum >> 16)) << 16) | (lowerBytesSum & 0xffff); 79 result = (((result >> 16) + (arguments[i] >> 16) + (lowerBytesSum >> 16)) << 16) | (lowerBytesSum & 0xffff);
82 } 80 }
83 81
84//Clipperz.Profile.stop("Clipperz.Crypto.SHA.safeAdd"); 82//Clipperz.Profile.stop("Clipperz.Crypto.SHA.safeAdd");
85 return result; 83 return result;
86 }, 84 },
87 85
88 //----------------------------------------------------------------------------- 86 //-----------------------------------------------------------------------------
89 87
90 'sha256_array': function(aValue) { 88 'sha256_array': function(aValue) {
91//Clipperz.Profile.start("Clipperz.Crypto.SHA.sha256_array"); 89//Clipperz.Profile.start("Clipperz.Crypto.SHA.sha256_array");
92 varresult; 90 varresult;
93 varmessage; 91 varmessage;
94 var h0, h1, h2, h3, h4, h5, h6, h7; 92 var h0, h1, h2, h3, h4, h5, h6, h7;
95 vark; 93 vark;
96 varmessageLength; 94 varmessageLength;
97 varmessageLengthInBits; 95 varmessageLengthInBits;
98 var_i, _c; 96 var_i, _c;
99 var charBits; 97 var charBits;
100 var rotateRight; 98 var rotateRight;
101 var shiftRight; 99 var shiftRight;
102 var safeAdd; 100 var safeAdd;
103 varbytesPerBlock; 101 varbytesPerBlock;
104 var currentMessageIndex; 102 var currentMessageIndex;
105 103
106 bytesPerBlock = 512/8; 104 bytesPerBlock = 512/8;
107 rotateRight = Clipperz.Crypto.SHA.rotateRight; 105 rotateRight = Clipperz.Crypto.SHA.rotateRight;
108 shiftRight = Clipperz.Crypto.SHA.shiftRight; 106 shiftRight = Clipperz.Crypto.SHA.shiftRight;
109 safeAdd = Clipperz.Crypto.SHA.safeAdd; 107 safeAdd = Clipperz.Crypto.SHA.safeAdd;
110 108
111 charBits = 8; 109 charBits = 8;
112 110
113 h0 = 0x6a09e667; 111 h0 = 0x6a09e667;
114 h1 = 0xbb67ae85; 112 h1 = 0xbb67ae85;
115 h2 = 0x3c6ef372; 113 h2 = 0x3c6ef372;
116 h3 = 0xa54ff53a; 114 h3 = 0xa54ff53a;
117 h4 = 0x510e527f; 115 h4 = 0x510e527f;
118 h5 = 0x9b05688c; 116 h5 = 0x9b05688c;
119 h6 = 0x1f83d9ab; 117 h6 = 0x1f83d9ab;
120 h7 = 0x5be0cd19; 118 h7 = 0x5be0cd19;
121 119
122 k = [0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 120 k = [0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
123 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 121 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
124 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 122 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
125 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, 123 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
126 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 124 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
127 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, 125 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
128 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, 126 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
129 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2]; 127 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2];
130 128
131 message = aValue; 129 message = aValue;
132 messageLength = message.length; 130 messageLength = message.length;
133 131
134 //Pre-processing: 132 //Pre-processing:
135 message.push(0x80); //append a single "1" bit to message 133 message.push(0x80); //append a single "1" bit to message
136 134
137 _c = (512 - (((messageLength + 1) * charBits) % 512) - 64) / charBits; 135 _c = (512 - (((messageLength + 1) * charBits) % 512) - 64) / charBits;
138 for (_i=0; _i<_c; _i++) { 136 for (_i=0; _i<_c; _i++) {
139 message.push(0x00); //append "0" bits until message length ≡ 448 ≡ -64 (mod 512) 137 message.push(0x00); //append "0" bits until message length ≡ 448 ≡ -64 (mod 512)
140 } 138 }
141 messageLengthInBits = messageLength * charBits; 139 messageLengthInBits = messageLength * charBits;
142 message.push(0x00); //the 4 most high byte are alway 0 as message length is represented with a 32bit value; 140 message.push(0x00); //the 4 most high byte are alway 0 as message length is represented with a 32bit value;
143 message.push(0x00); 141 message.push(0x00);
144 message.push(0x00); 142 message.push(0x00);
145 message.push(0x00); 143 message.push(0x00);
146 message.push((messageLengthInBits >> 24)& 0xff); 144 message.push((messageLengthInBits >> 24)& 0xff);
147 message.push((messageLengthInBits >> 16)& 0xff); 145 message.push((messageLengthInBits >> 16)& 0xff);
148 message.push((messageLengthInBits >> 8) & 0xff); 146 message.push((messageLengthInBits >> 8) & 0xff);
149 message.push( messageLengthInBits & 0xff); 147 message.push( messageLengthInBits & 0xff);
150 148
151 currentMessageIndex = 0; 149 currentMessageIndex = 0;
152 while(currentMessageIndex < message.length) { 150 while(currentMessageIndex < message.length) {
153 varw; 151 varw;
154 vara, b, c, d, e, f, g, h; 152 vara, b, c, d, e, f, g, h;
155 153
156 w = Array(64); 154 w = Array(64);
157 155
158 _c = 16; 156 _c = 16;
159 for (_i=0; _i<_c; _i++) { 157 for (_i=0; _i<_c; _i++) {
160 var _j; 158 var _j;
161 159
162 _j = currentMessageIndex + _i*4; 160 _j = currentMessageIndex + _i*4;
163 w[_i] = (message[_j] << 24) | (message[_j + 1] << 16) | (message[_j + 2] << 8) | (message[_j + 3] << 0); 161 w[_i] = (message[_j] << 24) | (message[_j + 1] << 16) | (message[_j + 2] << 8) | (message[_j + 3] << 0);
164 } 162 }
165 163
166 _c = 64; 164 _c = 64;
167 for (_i=16; _i<_c; _i++) { 165 for (_i=16; _i<_c; _i++) {
168 vars0, s1; 166 vars0, s1;
169 167
170 s0 = (rotateRight(w[_i-15], 7)) ^ (rotateRight(w[_i-15], 18)) ^ (shiftRight(w[_i-15], 3)); 168 s0 = (rotateRight(w[_i-15], 7)) ^ (rotateRight(w[_i-15], 18)) ^ (shiftRight(w[_i-15], 3));
171 s1 = (rotateRight(w[_i-2], 17)) ^ (rotateRight(w[_i-2], 19)) ^ (shiftRight(w[_i-2], 10)); 169 s1 = (rotateRight(w[_i-2], 17)) ^ (rotateRight(w[_i-2], 19)) ^ (shiftRight(w[_i-2], 10));
172 w[_i] = safeAdd(w[_i-16], s0, w[_i-7], s1); 170 w[_i] = safeAdd(w[_i-16], s0, w[_i-7], s1);
173 } 171 }
174 172
175 a=h0; b=h1; c=h2; d=h3; e=h4; f=h5; g=h6; h=h7; 173 a=h0; b=h1; c=h2; d=h3; e=h4; f=h5; g=h6; h=h7;
176 174
177 _c = 64; 175 _c = 64;
178 for (_i=0; _i<_c; _i++) { 176 for (_i=0; _i<_c; _i++) {
179 var s0, s1, ch, maj, t1, t2; 177 var s0, s1, ch, maj, t1, t2;
180 178
181 s0 = (rotateRight(a, 2)) ^ (rotateRight(a, 13)) ^ (rotateRight(a, 22)); 179 s0 = (rotateRight(a, 2)) ^ (rotateRight(a, 13)) ^ (rotateRight(a, 22));
182 maj = (a & b) ^ (a & c) ^ (b & c); 180 maj = (a & b) ^ (a & c) ^ (b & c);
183 t2 = safeAdd(s0, maj); 181 t2 = safeAdd(s0, maj);
184 s1 = (rotateRight(e, 6)) ^ (rotateRight(e, 11)) ^ (rotateRight(e, 25)); 182 s1 = (rotateRight(e, 6)) ^ (rotateRight(e, 11)) ^ (rotateRight(e, 25));
185 ch = (e & f) ^ ((~e) & g); 183 ch = (e & f) ^ ((~e) & g);
186 t1 = safeAdd(h, s1, ch, k[_i], w[_i]); 184 t1 = safeAdd(h, s1, ch, k[_i], w[_i]);
187 185
188 h = g; 186 h = g;
189 g = f; 187 g = f;
190 f = e; 188 f = e;
191 e = safeAdd(d, t1); 189 e = safeAdd(d, t1);
192 d = c; 190 d = c;
193 c = b; 191 c = b;
194 b = a; 192 b = a;
195 a = safeAdd(t1, t2); 193 a = safeAdd(t1, t2);
196 } 194 }
197 195
198 h0 = safeAdd(h0, a); 196 h0 = safeAdd(h0, a);
199 h1 = safeAdd(h1, b); 197 h1 = safeAdd(h1, b);
200 h2 = safeAdd(h2, c); 198 h2 = safeAdd(h2, c);
201 h3 = safeAdd(h3, d); 199 h3 = safeAdd(h3, d);
202 h4 = safeAdd(h4, e); 200 h4 = safeAdd(h4, e);
203 h5 = safeAdd(h5, f); 201 h5 = safeAdd(h5, f);
204 h6 = safeAdd(h6, g); 202 h6 = safeAdd(h6, g);
205 h7 = safeAdd(h7, h); 203 h7 = safeAdd(h7, h);
206 204
207 currentMessageIndex += bytesPerBlock; 205 currentMessageIndex += bytesPerBlock;
208 } 206 }
209 207
210 result = new Array(256/8); 208 result = new Array(256/8);
211 result[0] = (h0 >> 24)& 0xff; 209 result[0] = (h0 >> 24)& 0xff;
212 result[1] = (h0 >> 16)& 0xff; 210 result[1] = (h0 >> 16)& 0xff;
213 result[2] = (h0 >> 8)& 0xff; 211 result[2] = (h0 >> 8)& 0xff;
214 result[3] = h0 & 0xff; 212 result[3] = h0 & 0xff;
215 213
216 result[4] = (h1 >> 24)& 0xff; 214 result[4] = (h1 >> 24)& 0xff;
217 result[5] = (h1 >> 16)& 0xff; 215 result[5] = (h1 >> 16)& 0xff;
218 result[6] = (h1 >> 8)& 0xff; 216 result[6] = (h1 >> 8)& 0xff;
219 result[7] = h1 & 0xff; 217 result[7] = h1 & 0xff;
220 218
221 result[8] = (h2 >> 24)& 0xff; 219 result[8] = (h2 >> 24)& 0xff;
222 result[9] = (h2 >> 16)& 0xff; 220 result[9] = (h2 >> 16)& 0xff;
223 result[10] = (h2 >> 8)& 0xff; 221 result[10] = (h2 >> 8)& 0xff;
224 result[11] = h2 & 0xff; 222 result[11] = h2 & 0xff;
225 223
226 result[12] = (h3 >> 24)& 0xff; 224 result[12] = (h3 >> 24)& 0xff;
227 result[13] = (h3 >> 16)& 0xff; 225 result[13] = (h3 >> 16)& 0xff;
228 result[14] = (h3 >> 8)& 0xff; 226 result[14] = (h3 >> 8)& 0xff;
229 result[15] = h3 & 0xff; 227 result[15] = h3 & 0xff;
230 228
231 result[16] = (h4 >> 24)& 0xff; 229 result[16] = (h4 >> 24)& 0xff;
232 result[17] = (h4 >> 16)& 0xff; 230 result[17] = (h4 >> 16)& 0xff;
233 result[18] = (h4 >> 8)& 0xff; 231 result[18] = (h4 >> 8)& 0xff;
234 result[19] = h4 & 0xff; 232 result[19] = h4 & 0xff;
235 233
236 result[20] = (h5 >> 24)& 0xff; 234 result[20] = (h5 >> 24)& 0xff;
237 result[21] = (h5 >> 16)& 0xff; 235 result[21] = (h5 >> 16)& 0xff;
238 result[22] = (h5 >> 8)& 0xff; 236 result[22] = (h5 >> 8)& 0xff;
239 result[23] = h5 & 0xff; 237 result[23] = h5 & 0xff;
240 238
241 result[24] = (h6 >> 24)& 0xff; 239 result[24] = (h6 >> 24)& 0xff;
242 result[25] = (h6 >> 16)& 0xff; 240 result[25] = (h6 >> 16)& 0xff;
243 result[26] = (h6 >> 8)& 0xff; 241 result[26] = (h6 >> 8)& 0xff;
244 result[27] = h6 & 0xff; 242 result[27] = h6 & 0xff;
245 243
246 result[28] = (h7 >> 24)& 0xff; 244 result[28] = (h7 >> 24)& 0xff;
247 result[29] = (h7 >> 16)& 0xff; 245 result[29] = (h7 >> 16)& 0xff;
248 result[30] = (h7 >> 8)& 0xff; 246 result[30] = (h7 >> 8)& 0xff;
249 result[31] = h7 & 0xff; 247 result[31] = h7 & 0xff;
250 248
251//Clipperz.Profile.stop("Clipperz.Crypto.SHA.sha256_array"); 249//Clipperz.Profile.stop("Clipperz.Crypto.SHA.sha256_array");
252 return result; 250 return result;
253 }, 251 },
254 252
255 //----------------------------------------------------------------------------- 253 //-----------------------------------------------------------------------------
256 254
257 'sha256': function(aValue) { 255 'sha256': function(aValue) {
258//Clipperz.Profile.start("Clipperz.Crypto.SHA.sha256"); 256//Clipperz.Profile.start("Clipperz.Crypto.SHA.sha256");
259 var result; 257 var result;
260 var resultArray; 258 var resultArray;
261 varvalueArray; 259 varvalueArray;
262 260
263 valueArray = aValue.arrayValues(); 261 valueArray = aValue.arrayValues();
264 resultArray = Clipperz.Crypto.SHA.sha256_array(valueArray); 262 resultArray = Clipperz.Crypto.SHA.sha256_array(valueArray);
265 263
266 result = new Clipperz.ByteArray(resultArray); 264 result = new Clipperz.ByteArray(resultArray);
267 265
268//Clipperz.Profile.stop("Clipperz.Crypto.SHA.sha256"); 266//Clipperz.Profile.stop("Clipperz.Crypto.SHA.sha256");
269 return result; 267 return result;
270 }, 268 },
271 269
272 //----------------------------------------------------------------------------- 270 //-----------------------------------------------------------------------------
273 271
274 'sha_d256': function(aValue) { 272 'sha_d256': function(aValue) {
275//Clipperz.Profile.start("Clipperz.Crypto.SHA.sha_d256"); 273//Clipperz.Profile.start("Clipperz.Crypto.SHA.sha_d256");
276 var result; 274 var result;
277 var resultArray; 275 var resultArray;
278 varvalueArray; 276 varvalueArray;
279 277
280 valueArray = aValue.arrayValues(); 278 valueArray = aValue.arrayValues();
281 resultArray = Clipperz.Crypto.SHA.sha256_array(valueArray); 279 resultArray = Clipperz.Crypto.SHA.sha256_array(valueArray);
282 resultArray = Clipperz.Crypto.SHA.sha256_array(resultArray); 280 resultArray = Clipperz.Crypto.SHA.sha256_array(resultArray);
283 281
284 result = new Clipperz.ByteArray(resultArray); 282 result = new Clipperz.ByteArray(resultArray);
285 283
286//Clipperz.Profile.stop("Clipperz.Crypto.SHA.sha256"); 284//Clipperz.Profile.stop("Clipperz.Crypto.SHA.sha256");
287 return result; 285 return result;
288 }, 286 },
289 287
290 //----------------------------------------------------------------------------- 288 //-----------------------------------------------------------------------------
291 __syntaxFix__: "syntax fix" 289 __syntaxFix__: "syntax fix"
292 290
293}); 291});
diff --git a/frontend/beta/js/Clipperz/Crypto/SRP.js b/frontend/beta/js/Clipperz/Crypto/SRP.js
index 3b25275..8cc80ba 100644
--- a/frontend/beta/js/Clipperz/Crypto/SRP.js
+++ b/frontend/beta/js/Clipperz/Crypto/SRP.js
@@ -1,328 +1,326 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) { 24try { if (typeof(Clipperz.ByteArray) == 'undefined') { throw ""; }} catch (e) {
27 throw "Clipperz.Crypto.PRNG depends on Clipperz.ByteArray!"; 25 throw "Clipperz.Crypto.PRNG depends on Clipperz.ByteArray!";
28} 26}
29 27
30try { if (typeof(Clipperz.Crypto.BigInt) == 'undefined') { throw ""; }} catch (e) { 28try { if (typeof(Clipperz.Crypto.BigInt) == 'undefined') { throw ""; }} catch (e) {
31 throw "Clipperz.Crypto.SRP depends on Clipperz.Crypto.BigInt!"; 29 throw "Clipperz.Crypto.SRP depends on Clipperz.Crypto.BigInt!";
32} 30}
33 31
34try { if (typeof(Clipperz.Crypto.PRNG) == 'undefined') { throw ""; }} catch (e) { 32try { if (typeof(Clipperz.Crypto.PRNG) == 'undefined') { throw ""; }} catch (e) {
35 throw "Clipperz.Crypto.SRP depends on Clipperz.Crypto.PRNG!"; 33 throw "Clipperz.Crypto.SRP depends on Clipperz.Crypto.PRNG!";
36} 34}
37 35
38if (typeof(Clipperz.Crypto.SRP) == 'undefined') { Clipperz.Crypto.SRP = {}; } 36if (typeof(Clipperz.Crypto.SRP) == 'undefined') { Clipperz.Crypto.SRP = {}; }
39 37
40Clipperz.Crypto.SRP.VERSION = "0.1"; 38Clipperz.Crypto.SRP.VERSION = "0.1";
41Clipperz.Crypto.SRP.NAME = "Clipperz.Crypto.SRP"; 39Clipperz.Crypto.SRP.NAME = "Clipperz.Crypto.SRP";
42 40
43//############################################################################# 41//#############################################################################
44 42
45MochiKit.Base.update(Clipperz.Crypto.SRP, { 43MochiKit.Base.update(Clipperz.Crypto.SRP, {
46 44
47 '_n': null, 45 '_n': null,
48 '_g': null, 46 '_g': null,
49 //------------------------------------------------------------------------- 47 //-------------------------------------------------------------------------
50 48
51 'n': function() { 49 'n': function() {
52 if (Clipperz.Crypto.SRP._n == null) { 50 if (Clipperz.Crypto.SRP._n == null) {
53 Clipperz.Crypto.SRP._n = new Clipperz.Crypto.BigInt("115b8b692e0e045692cf280b436735c77a5a9e8a9e7ed56c965f87db5b2a2ece3", 16); 51 Clipperz.Crypto.SRP._n = new Clipperz.Crypto.BigInt("115b8b692e0e045692cf280b436735c77a5a9e8a9e7ed56c965f87db5b2a2ece3", 16);
54 } 52 }
55 53
56 return Clipperz.Crypto.SRP._n; 54 return Clipperz.Crypto.SRP._n;
57 }, 55 },
58 56
59 //------------------------------------------------------------------------- 57 //-------------------------------------------------------------------------
60 58
61 'g': function() { 59 'g': function() {
62 if (Clipperz.Crypto.SRP._g == null) { 60 if (Clipperz.Crypto.SRP._g == null) {
63 Clipperz.Crypto.SRP._g = new Clipperz.Crypto.BigInt(2); //eventually 5 (as suggested on the Diffi-Helmann documentation) 61 Clipperz.Crypto.SRP._g = new Clipperz.Crypto.BigInt(2); //eventually 5 (as suggested on the Diffi-Helmann documentation)
64 } 62 }
65 63
66 return Clipperz.Crypto.SRP._g; 64 return Clipperz.Crypto.SRP._g;
67 }, 65 },
68 66
69 //----------------------------------------------------------------------------- 67 //-----------------------------------------------------------------------------
70 68
71 'exception': { 69 'exception': {
72 'InvalidValue': new MochiKit.Base.NamedError("Clipperz.Crypto.SRP.exception.InvalidValue") 70 'InvalidValue': new MochiKit.Base.NamedError("Clipperz.Crypto.SRP.exception.InvalidValue")
73 }, 71 },
74 72
75 //------------------------------------------------------------------------- 73 //-------------------------------------------------------------------------
76 __syntaxFix__: "syntax fix" 74 __syntaxFix__: "syntax fix"
77 75
78}); 76});
79 77
80//############################################################################# 78//#############################################################################
81// 79//
82 // S R P C o n n e c t i o n version 1.0 80 // S R P C o n n e c t i o n version 1.0
83// 81//
84//============================================================================= 82//=============================================================================
85Clipperz.Crypto.SRP.Connection = function (args) { 83Clipperz.Crypto.SRP.Connection = function (args) {
86 args = args || {}; 84 args = args || {};
87 85
88 this._C = args.C; 86 this._C = args.C;
89 this._P = args.P; 87 this._P = args.P;
90 this.hash = args.hash; 88 this.hash = args.hash;
91 89
92 this._a = null; 90 this._a = null;
93 this._A = null; 91 this._A = null;
94 92
95 this._s = null; 93 this._s = null;
96 this._B = null; 94 this._B = null;
97 95
98 this._x = null; 96 this._x = null;
99 97
100 this._u = null; 98 this._u = null;
101 this._K = null; 99 this._K = null;
102 this._M1 = null; 100 this._M1 = null;
103 this._M2 = null; 101 this._M2 = null;
104 102
105 this._sessionKey = null; 103 this._sessionKey = null;
106 104
107 return this; 105 return this;
108} 106}
109 107
110Clipperz.Crypto.SRP.Connection.prototype = MochiKit.Base.update(null, { 108Clipperz.Crypto.SRP.Connection.prototype = MochiKit.Base.update(null, {
111 109
112 'toString': function () { 110 'toString': function () {
113 return "Clipperz.Crypto.SRP.Connection (username: " + this.username() + "). Status: " + this.statusDescription(); 111 return "Clipperz.Crypto.SRP.Connection (username: " + this.username() + "). Status: " + this.statusDescription();
114 }, 112 },
115 113
116 //------------------------------------------------------------------------- 114 //-------------------------------------------------------------------------
117 115
118 'C': function () { 116 'C': function () {
119 return this._C; 117 return this._C;
120 }, 118 },
121 119
122 //------------------------------------------------------------------------- 120 //-------------------------------------------------------------------------
123 121
124 'P': function () { 122 'P': function () {
125 return this._P; 123 return this._P;
126 }, 124 },
127 125
128 //------------------------------------------------------------------------- 126 //-------------------------------------------------------------------------
129 127
130 'a': function () { 128 'a': function () {
131 if (this._a == null) { 129 if (this._a == null) {
132 this._a = new Clipperz.Crypto.BigInt(Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32).toHexString().substring(2), 16); 130 this._a = new Clipperz.Crypto.BigInt(Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32).toHexString().substring(2), 16);
133 // this._a = new Clipperz.Crypto.BigInt("37532428169486597638072888476611365392249575518156687476805936694442691012367", 10); 131 // this._a = new Clipperz.Crypto.BigInt("37532428169486597638072888476611365392249575518156687476805936694442691012367", 10);
134//MochiKit.Logging.logDebug("SRP a: " + this._a); 132//MochiKit.Logging.logDebug("SRP a: " + this._a);
135 } 133 }
136 134
137 return this._a; 135 return this._a;
138 }, 136 },
139 137
140 //------------------------------------------------------------------------- 138 //-------------------------------------------------------------------------
141 139
142 'A': function () { 140 'A': function () {
143 if (this._A == null) { 141 if (this._A == null) {
144 //Warning: this value should be strictly greater than zero: how should we perform this check? 142 //Warning: this value should be strictly greater than zero: how should we perform this check?
145 this._A = Clipperz.Crypto.SRP.g().powerModule(this.a(), Clipperz.Crypto.SRP.n()); 143 this._A = Clipperz.Crypto.SRP.g().powerModule(this.a(), Clipperz.Crypto.SRP.n());
146 144
147 if (this._A.equals(0)) { 145 if (this._A.equals(0)) {
148MochiKit.Logging.logError("Clipperz.Crypto.SRP.Connection: trying to set 'A' to 0."); 146MochiKit.Logging.logError("Clipperz.Crypto.SRP.Connection: trying to set 'A' to 0.");
149 throw Clipperz.Crypto.SRP.exception.InvalidValue; 147 throw Clipperz.Crypto.SRP.exception.InvalidValue;
150 } 148 }
151//MochiKit.Logging.logDebug("SRP A: " + this._A); 149//MochiKit.Logging.logDebug("SRP A: " + this._A);
152 } 150 }
153 151
154 return this._A; 152 return this._A;
155 }, 153 },
156 154
157 //------------------------------------------------------------------------- 155 //-------------------------------------------------------------------------
158 156
159 's': function () { 157 's': function () {
160 return this._s; 158 return this._s;
161//MochiKit.Logging.logDebug("SRP s: " + this._S); 159//MochiKit.Logging.logDebug("SRP s: " + this._S);
162 }, 160 },
163 161
164 'set_s': function(aValue) { 162 'set_s': function(aValue) {
165 this._s = aValue; 163 this._s = aValue;
166 }, 164 },
167 165
168 //------------------------------------------------------------------------- 166 //-------------------------------------------------------------------------
169 167
170 'B': function () { 168 'B': function () {
171 return this._B; 169 return this._B;
172 }, 170 },
173 171
174 'set_B': function(aValue) { 172 'set_B': function(aValue) {
175 //Warning: this value should be strictly greater than zero: how should we perform this check? 173 //Warning: this value should be strictly greater than zero: how should we perform this check?
176 if (! aValue.equals(0)) { 174 if (! aValue.equals(0)) {
177 this._B = aValue; 175 this._B = aValue;
178//MochiKit.Logging.logDebug("SRP B: " + this._B); 176//MochiKit.Logging.logDebug("SRP B: " + this._B);
179 } else { 177 } else {
180MochiKit.Logging.logError("Clipperz.Crypto.SRP.Connection: trying to set 'B' to 0."); 178MochiKit.Logging.logError("Clipperz.Crypto.SRP.Connection: trying to set 'B' to 0.");
181 throw Clipperz.Crypto.SRP.exception.InvalidValue; 179 throw Clipperz.Crypto.SRP.exception.InvalidValue;
182 } 180 }
183 }, 181 },
184 182
185 //------------------------------------------------------------------------- 183 //-------------------------------------------------------------------------
186 184
187 'x': function () { 185 'x': function () {
188 if (this._x == null) { 186 if (this._x == null) {
189 this._x = new Clipperz.Crypto.BigInt(this.stringHash(this.s().asString(16, 64) + this.P()), 16); 187 this._x = new Clipperz.Crypto.BigInt(this.stringHash(this.s().asString(16, 64) + this.P()), 16);
190//MochiKit.Logging.logDebug("SRP x: " + this._x); 188//MochiKit.Logging.logDebug("SRP x: " + this._x);
191 } 189 }
192 190
193 return this._x; 191 return this._x;
194 }, 192 },
195 193
196 //------------------------------------------------------------------------- 194 //-------------------------------------------------------------------------
197 195
198 'u': function () { 196 'u': function () {
199 if (this._u == null) { 197 if (this._u == null) {
200 this._u = new Clipperz.Crypto.BigInt(this.stringHash(this.B().asString()), 16); 198 this._u = new Clipperz.Crypto.BigInt(this.stringHash(this.B().asString()), 16);
201//MochiKit.Logging.logDebug("SRP u: " + this._u); 199//MochiKit.Logging.logDebug("SRP u: " + this._u);
202 } 200 }
203 201
204 return this._u; 202 return this._u;
205 }, 203 },
206 204
207 //------------------------------------------------------------------------- 205 //-------------------------------------------------------------------------
208 206
209 'S': function () { 207 'S': function () {
210 if (this._S == null) { 208 if (this._S == null) {
211 var bigint; 209 var bigint;
212 varsrp; 210 varsrp;
213 211
214 bigint = Clipperz.Crypto.BigInt; 212 bigint = Clipperz.Crypto.BigInt;
215 srp = Clipperz.Crypto.SRP; 213 srp = Clipperz.Crypto.SRP;
216 214
217 this._S =bigint.powerModule( 215 this._S =bigint.powerModule(
218 bigint.subtract(this.B(), bigint.powerModule(srp.g(), this.x(), srp.n())), 216 bigint.subtract(this.B(), bigint.powerModule(srp.g(), this.x(), srp.n())),
219 bigint.add(this.a(), bigint.multiply(this.u(), this.x())), 217 bigint.add(this.a(), bigint.multiply(this.u(), this.x())),
220 srp.n() 218 srp.n()
221 ) 219 )
222//MochiKit.Logging.logDebug("SRP S: " + this._S); 220//MochiKit.Logging.logDebug("SRP S: " + this._S);
223 } 221 }
224 222
225 return this._S; 223 return this._S;
226 }, 224 },
227 225
228 //------------------------------------------------------------------------- 226 //-------------------------------------------------------------------------
229 227
230 'K': function () { 228 'K': function () {
231 if (this._K == null) { 229 if (this._K == null) {
232 this._K = this.stringHash(this.S().asString()); 230 this._K = this.stringHash(this.S().asString());
233//MochiKit.Logging.logDebug("SRP K: " + this._K); 231//MochiKit.Logging.logDebug("SRP K: " + this._K);
234 } 232 }
235 233
236 return this._K; 234 return this._K;
237 }, 235 },
238 236
239 //------------------------------------------------------------------------- 237 //-------------------------------------------------------------------------
240 238
241 'M1': function () { 239 'M1': function () {
242 if (this._M1 == null) { 240 if (this._M1 == null) {
243 this._M1 = this.stringHash(this.A().asString(10) + this.B().asString(10) + this.K()); 241 this._M1 = this.stringHash(this.A().asString(10) + this.B().asString(10) + this.K());
244//MochiKit.Logging.logDebug("SRP M1: " + this._M1); 242//MochiKit.Logging.logDebug("SRP M1: " + this._M1);
245 } 243 }
246 244
247 return this._M1; 245 return this._M1;
248 }, 246 },
249 247
250 //------------------------------------------------------------------------- 248 //-------------------------------------------------------------------------
251 249
252 'M2': function () { 250 'M2': function () {
253 if (this._M2 == null) { 251 if (this._M2 == null) {
254 this._M2 = this.stringHash(this.A().asString(10) + this.M1() + this.K()); 252 this._M2 = this.stringHash(this.A().asString(10) + this.M1() + this.K());
255//MochiKit.Logging.logDebug("SRP M2: " + this._M2); 253//MochiKit.Logging.logDebug("SRP M2: " + this._M2);
256 } 254 }
257 255
258 return this._M2; 256 return this._M2;
259 }, 257 },
260 258
261 //========================================================================= 259 //=========================================================================
262 260
263 'serverSideCredentialsWithSalt': function(aSalt) { 261 'serverSideCredentialsWithSalt': function(aSalt) {
264 var result; 262 var result;
265 var s, x, v; 263 var s, x, v;
266 264
267 s = aSalt; 265 s = aSalt;
268 x = this.stringHash(s + this.P()); 266 x = this.stringHash(s + this.P());
269 v = Clipperz.Crypto.SRP.g().powerModule(new Clipperz.Crypto.BigInt(x, 16), Clipperz.Crypto.SRP.n()); 267 v = Clipperz.Crypto.SRP.g().powerModule(new Clipperz.Crypto.BigInt(x, 16), Clipperz.Crypto.SRP.n());
270 268
271 result = {}; 269 result = {};
272 result['C'] = this.C(); 270 result['C'] = this.C();
273 result['s'] = s; 271 result['s'] = s;
274 result['v'] = v.asString(16); 272 result['v'] = v.asString(16);
275 273
276 return result; 274 return result;
277 }, 275 },
278 276
279 'serverSideCredentials': function() { 277 'serverSideCredentials': function() {
280 var result; 278 var result;
281 var s; 279 var s;
282 280
283 s = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32).toHexString().substring(2); 281 s = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32).toHexString().substring(2);
284 282
285 result = this.serverSideCredentialsWithSalt(s); 283 result = this.serverSideCredentialsWithSalt(s);
286 284
287 return result; 285 return result;
288 }, 286 },
289 287
290 //========================================================================= 288 //=========================================================================
291/* 289/*
292 'computeServerSide_S': function(b) { 290 'computeServerSide_S': function(b) {
293 var result; 291 var result;
294 var v; 292 var v;
295 var bigint; 293 var bigint;
296 varsrp; 294 varsrp;
297 295
298 bigint = Clipperz.Crypto.BigInt; 296 bigint = Clipperz.Crypto.BigInt;
299 srp = Clipperz.Crypto.SRP; 297 srp = Clipperz.Crypto.SRP;
300 298
301 v = new Clipperz.Crypto.BigInt(srpConnection.serverSideCredentialsWithSalt(this.s().asString(16, 64)).v, 16); 299 v = new Clipperz.Crypto.BigInt(srpConnection.serverSideCredentialsWithSalt(this.s().asString(16, 64)).v, 16);
302 // _S = (this.A().multiply(this.v().modPow(this.u(), this.n()))).modPow(this.b(), this.n()); 300 // _S = (this.A().multiply(this.v().modPow(this.u(), this.n()))).modPow(this.b(), this.n());
303 result = bigint.powerModule( 301 result = bigint.powerModule(
304 bigint.multiply( 302 bigint.multiply(
305 this.A(), 303 this.A(),
306 bigint.powerModule(v, this.u(), srp.n()) 304 bigint.powerModule(v, this.u(), srp.n())
307 ), new Clipperz.Crypto.BigInt(b, 10), srp.n() 305 ), new Clipperz.Crypto.BigInt(b, 10), srp.n()
308 ); 306 );
309 307
310 return result; 308 return result;
311 }, 309 },
312*/ 310*/
313 //========================================================================= 311 //=========================================================================
314 312
315 'stringHash': function(aValue) { 313 'stringHash': function(aValue) {
316 varresult; 314 varresult;
317 315
318 result = this.hash(new Clipperz.ByteArray(aValue)).toHexString().substring(2); 316 result = this.hash(new Clipperz.ByteArray(aValue)).toHexString().substring(2);
319 317
320 return result; 318 return result;
321 }, 319 },
322 320
323 //========================================================================= 321 //=========================================================================
324 __syntaxFix__: "syntax fix" 322 __syntaxFix__: "syntax fix"
325 323
326}); 324});
327 325
328//############################################################################# 326//#############################################################################
diff --git a/frontend/beta/js/Clipperz/DOM.js b/frontend/beta/js/Clipperz/DOM.js
index 7e230bc..10ed49b 100644
--- a/frontend/beta/js/Clipperz/DOM.js
+++ b/frontend/beta/js/Clipperz/DOM.js
@@ -1,128 +1,126 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.DOM) == 'undefined') { Clipperz.DOM = {}; } 25if (typeof(Clipperz.DOM) == 'undefined') { Clipperz.DOM = {}; }
28 26
29Clipperz.DOM.VERSION = "0.1"; 27Clipperz.DOM.VERSION = "0.1";
30Clipperz.DOM.NAME = "Clipperz.DOM"; 28Clipperz.DOM.NAME = "Clipperz.DOM";
31 29
32MochiKit.Base.update(Clipperz.DOM, { 30MochiKit.Base.update(Clipperz.DOM, {
33 31
34 //------------------------------------------------------------------------- 32 //-------------------------------------------------------------------------
35 33
36 '__repr__': function () { 34 '__repr__': function () {
37 return "[" + this.NAME + " " + this.VERSION + "]"; 35 return "[" + this.NAME + " " + this.VERSION + "]";
38 }, 36 },
39 37
40 //------------------------------------------------------------------------- 38 //-------------------------------------------------------------------------
41 39
42 'toString': function () { 40 'toString': function () {
43 return this.__repr__(); 41 return this.__repr__();
44 }, 42 },
45 43
46 //------------------------------------------------------------------------- 44 //-------------------------------------------------------------------------
47 45
48 'selectOptionMatchingValue': function (aSelectElement, aValue, shouldUseCaseInsensitiveTest) { 46 'selectOptionMatchingValue': function (aSelectElement, aValue, shouldUseCaseInsensitiveTest) {
49 var selectedOptionIndex; 47 var selectedOptionIndex;
50 var i, c; 48 var i, c;
51 49
52 selectedOptionIndex = -1; 50 selectedOptionIndex = -1;
53 51
54 c = aSelectElement.options.length; 52 c = aSelectElement.options.length;
55 for (i=0; (i<c) && (selectedOptionIndex == -1); i++) { 53 for (i=0; (i<c) && (selectedOptionIndex == -1); i++) {
56 if (shouldUseCaseInsensitiveTest == true) { 54 if (shouldUseCaseInsensitiveTest == true) {
57 if (aSelectElement.options[i].value.toLowerCase() == aValue.toLowerCase()) { 55 if (aSelectElement.options[i].value.toLowerCase() == aValue.toLowerCase()) {
58 selectedOptionIndex = i; 56 selectedOptionIndex = i;
59 } 57 }
60 } else { 58 } else {
61 if (aSelectElement.options[i].value == aValue) { 59 if (aSelectElement.options[i].value == aValue) {
62 selectedOptionIndex = i; 60 selectedOptionIndex = i;
63 } 61 }
64 } 62 }
65 } 63 }
66 64
67 if (selectedOptionIndex != -1) { 65 if (selectedOptionIndex != -1) {
68 aSelectElement.selectedIndex = selectedOptionIndex; 66 aSelectElement.selectedIndex = selectedOptionIndex;
69 } 67 }
70 }, 68 },
71 69
72 //------------------------------------------------------------------------- 70 //-------------------------------------------------------------------------
73 71
74 'setFormContents': function(aNode, someValues) { 72 'setFormContents': function(aNode, someValues) {
75 var node; 73 var node;
76 var values; 74 var values;
77 var i, c; 75 var i, c;
78 76
79 values = {}; 77 values = {};
80 c = someValues[0].length; 78 c = someValues[0].length;
81 for (i=0; i<c; i++) { 79 for (i=0; i<c; i++) {
82 values[someValues[0][i]] = someValues[1][i]; 80 values[someValues[0][i]] = someValues[1][i];
83 } 81 }
84 82
85 // var m = MochiKit.Base; 83 // var m = MochiKit.Base;
86 // var self = MochiKit.DOM; 84 // var self = MochiKit.DOM;
87 if (typeof(aNode) == "undefined" || aNode === null) { 85 if (typeof(aNode) == "undefined" || aNode === null) {
88 node = MochiKit.DOM._document.body; 86 node = MochiKit.DOM._document.body;
89 } else { 87 } else {
90 node = MochiKit.DOM.getElement(aNode); 88 node = MochiKit.DOM.getElement(aNode);
91 } 89 }
92 90
93 MochiKit.Base.nodeWalk(node, function(aNode) { 91 MochiKit.Base.nodeWalk(node, function(aNode) {
94 var result; 92 var result;
95 var name; 93 var name;
96 94
97 result = null; 95 result = null;
98 name = aNode.name; 96 name = aNode.name;
99 if (MochiKit.Base.isNotEmpty(name) && (typeof(values[name]) != 'undefined')) { 97 if (MochiKit.Base.isNotEmpty(name) && (typeof(values[name]) != 'undefined')) {
100 var tagName; 98 var tagName;
101 99
102 tagName = aNode.tagName.toUpperCase(); 100 tagName = aNode.tagName.toUpperCase();
103 if (tagName === "INPUT" && (aNode.type == "radio" || aNode.type == "checkbox")) { 101 if (tagName === "INPUT" && (aNode.type == "radio" || aNode.type == "checkbox")) {
104 aNode.checked = values[name]; 102 aNode.checked = values[name];
105 } else if (tagName === "SELECT") { 103 } else if (tagName === "SELECT") {
106 if (aNode.type == "select-one") { 104 if (aNode.type == "select-one") {
107 Clipperz.DOM.selectOptionMatchingValue(aNode, values[name]); 105 Clipperz.DOM.selectOptionMatchingValue(aNode, values[name]);
108 } else { //aNode.type == "select-multiple" 106 } else { //aNode.type == "select-multiple"
109MochiKit.Logging.logWarning("### unhandled Select.type = 'select-multiple' condition"); 107MochiKit.Logging.logWarning("### unhandled Select.type = 'select-multiple' condition");
110 } 108 }
111 } else if (tagName === "FORM" || tagName === "P" || tagName === "SPAN" || tagName === "DIV") { 109 } else if (tagName === "FORM" || tagName === "P" || tagName === "SPAN" || tagName === "DIV") {
112 result = aNode.childNodes; 110 result = aNode.childNodes;
113 } else { 111 } else {
114 aNode.value = values[name] 112 aNode.value = values[name]
115 } 113 }
116 } else { 114 } else {
117 result = aNode.childNodes; 115 result = aNode.childNodes;
118 } 116 }
119 117
120 return result; 118 return result;
121 }); 119 });
122 }, 120 },
123 121
124 //------------------------------------------------------------------------- 122 //-------------------------------------------------------------------------
125 __syntaxFix__: "syntax fix" 123 __syntaxFix__: "syntax fix"
126 124
127}); 125});
128 126
diff --git a/frontend/beta/js/Clipperz/Date.js b/frontend/beta/js/Clipperz/Date.js
index 020d77b..e8f7705 100644
--- a/frontend/beta/js/Clipperz/Date.js
+++ b/frontend/beta/js/Clipperz/Date.js
@@ -1,302 +1,300 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.Date) == 'undefined') { Clipperz.Date = {}; } 25if (typeof(Clipperz.Date) == 'undefined') { Clipperz.Date = {}; }
28 26
29Clipperz.Date.VERSION = "0.1"; 27Clipperz.Date.VERSION = "0.1";
30Clipperz.Date.NAME = "Clipperz.Date"; 28Clipperz.Date.NAME = "Clipperz.Date";
31 29
32MochiKit.Base.update(Clipperz.Date, { 30MochiKit.Base.update(Clipperz.Date, {
33 31
34 //------------------------------------------------------------------------- 32 //-------------------------------------------------------------------------
35 33
36 '__repr__': function () { 34 '__repr__': function () {
37 return "[" + this.NAME + " " + this.VERSION + "]"; 35 return "[" + this.NAME + " " + this.VERSION + "]";
38 }, 36 },
39 37
40 //------------------------------------------------------------------------- 38 //-------------------------------------------------------------------------
41 39
42 'toString': function () { 40 'toString': function () {
43 return this.__repr__(); 41 return this.__repr__();
44 }, 42 },
45 43
46 //------------------------------------------------------------------------- 44 //-------------------------------------------------------------------------
47 45
48 'daysInMonth': [31,28,31,30,31,30,31,31,30,31,30,31], 46 'daysInMonth': [31,28,31,30,31,30,31,31,30,31,30,31],
49 47
50 //------------------------------------------------------------------------- 48 //-------------------------------------------------------------------------
51 49
52 'englishOrdinalDaySuffixForDate': function(aDate) { 50 'englishOrdinalDaySuffixForDate': function(aDate) {
53 var result; 51 var result;
54 52
55 switch (aDate.getDate()) { 53 switch (aDate.getDate()) {
56 case 1: 54 case 1:
57 case 21: 55 case 21:
58 case 31: 56 case 31:
59 result = "st"; 57 result = "st";
60 break; 58 break;
61 case 2: 59 case 2:
62 case 22: 60 case 22:
63 result = "nd"; 61 result = "nd";
64 break; 62 break;
65 case 3: 63 case 3:
66 case 23: 64 case 23:
67 result = "rd"; 65 result = "rd";
68 break; 66 break;
69 default: 67 default:
70 result = "th"; 68 result = "th";
71 break; 69 break;
72 } 70 }
73 71
74 return result; 72 return result;
75 }, 73 },
76 74
77 //------------------------------------------------------------------------- 75 //-------------------------------------------------------------------------
78 76
79 'isLeapYear': function(aDate) { 77 'isLeapYear': function(aDate) {
80 var year; 78 var year;
81 var result; 79 var result;
82 80
83 year = aDate.getFullYear(); 81 year = aDate.getFullYear();
84 result = ((year & 0x03) == 0 && (year % 100 || (year % 400 == 0 && year))); 82 result = ((year & 0x03) == 0 && (year % 100 || (year % 400 == 0 && year)));
85 83
86 return result; 84 return result;
87 }, 85 },
88 86
89 //------------------------------------------------------------------------- 87 //-------------------------------------------------------------------------
90 88
91 'getDaysInMonth': function(aDate) { 89 'getDaysInMonth': function(aDate) {
92 var result; 90 var result;
93 91
94 if (aDate.getMonth() == 1) { 92 if (aDate.getMonth() == 1) {
95 Clipperz.Date.isLeapYear(aDate) 93 Clipperz.Date.isLeapYear(aDate)
96 result += Clipperz.Date.isLeapYear(aDate) ? 29 : 28; 94 result += Clipperz.Date.isLeapYear(aDate) ? 29 : 28;
97 } else { 95 } else {
98 result = Clipperz.Date.daysInMonth[aDate.getMonth()]; 96 result = Clipperz.Date.daysInMonth[aDate.getMonth()];
99 } 97 }
100 98
101 return result; 99 return result;
102 }, 100 },
103 101
104 //------------------------------------------------------------------------- 102 //-------------------------------------------------------------------------
105 103
106 'getTimezone': function(aDate) { 104 'getTimezone': function(aDate) {
107 var result; 105 var result;
108 106
109 result = aDate.toString(); 107 result = aDate.toString();
110 result = result.replace(/([A-Z]{3}) [0-9]{4}/, '$1'); 108 result = result.replace(/([A-Z]{3}) [0-9]{4}/, '$1');
111 result = result.replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/, "$1$2$3"); 109 result = result.replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/, "$1$2$3");
112 110
113 return result; 111 return result;
114 }, 112 },
115 113
116 'getGMTOffset': function(aDate) { 114 'getGMTOffset': function(aDate) {
117 return (aDate.getTimezoneOffset() > 0 ? "-" : "+")+ MochiKit.Format.numberFormatter('00')(Math.floor(this.getTimezoneOffset() / 60)) 115 return (aDate.getTimezoneOffset() > 0 ? "-" : "+")+ MochiKit.Format.numberFormatter('00')(Math.floor(this.getTimezoneOffset() / 60))
118 + MochiKit.Format.numberFormatter('00')(this.getTimezoneOffset() % 60); 116 + MochiKit.Format.numberFormatter('00')(this.getTimezoneOffset() % 60);
119 }, 117 },
120 118
121 //------------------------------------------------------------------------- 119 //-------------------------------------------------------------------------
122 120
123 'dayOfYear': function(aDate) { 121 'dayOfYear': function(aDate) {
124 var result; 122 var result;
125 var i,c; 123 var i,c;
126 124
127 result = 0; 125 result = 0;
128 c = aDate.getMonth(); 126 c = aDate.getMonth();
129 for (i=0; i<c; i++) { 127 for (i=0; i<c; i++) {
130 if (i == 1) { 128 if (i == 1) {
131 result += Clipperz.Date.isLeapYear(aDate) ? 29 : 28; 129 result += Clipperz.Date.isLeapYear(aDate) ? 29 : 28;
132 } else { 130 } else {
133 result += Clipperz.Date.daysInMonth[i]; 131 result += Clipperz.Date.daysInMonth[i];
134 } 132 }
135 } 133 }
136 return num + this.getDate() - 1; 134 return num + this.getDate() - 1;
137 }, 135 },
138 136
139 //------------------------------------------------------------------------- 137 //-------------------------------------------------------------------------
140 138
141 'getPHPLikeFormatCode': function(aCharacter) { 139 'getPHPLikeFormatCode': function(aCharacter) {
142 var result; 140 var result;
143 141
144 switch (aCharacter) { 142 switch (aCharacter) {
145 case "d": 143 case "d":
146 result = " + MochiKit.Format.numberFormatter('00')(aDate.getDate())"; 144 result = " + MochiKit.Format.numberFormatter('00')(aDate.getDate())";
147 break; 145 break;
148 case "D": 146 case "D":
149 result = " + aLocale['shortDays'][aDate.getDay()]"; 147 result = " + aLocale['shortDays'][aDate.getDay()]";
150 break; 148 break;
151 case "j": 149 case "j":
152 result = " + aDate.getDate()"; 150 result = " + aDate.getDate()";
153 break; 151 break;
154 case "l": 152 case "l":
155 result = " + aLocale['days'][aDate.getDay()]"; 153 result = " + aLocale['days'][aDate.getDay()]";
156 break; 154 break;
157 case "S": 155 case "S":
158 result = " + Clipperz.Date.englishOrdinalDaySuffixForDate(aDate)"; 156 result = " + Clipperz.Date.englishOrdinalDaySuffixForDate(aDate)";
159 break; 157 break;
160 case "w": 158 case "w":
161 result = " + aDate.getDay()"; 159 result = " + aDate.getDay()";
162 break; 160 break;
163 case "z": 161 case "z":
164 result = " + aDate.getDayOfYear()"; 162 result = " + aDate.getDayOfYear()";
165 break; 163 break;
166 case "W": 164 case "W":
167 result = " + aDate.getWeekOfYear()"; 165 result = " + aDate.getWeekOfYear()";
168 break; 166 break;
169 case "F": 167 case "F":
170 result = " + aLocale['months'][aDate.getMonth()]"; 168 result = " + aLocale['months'][aDate.getMonth()]";
171 break; 169 break;
172 case "m": 170 case "m":
173 result = " + MochiKit.Format.numberFormatter('00')(aDate.getMonth() + 1)"; 171 result = " + MochiKit.Format.numberFormatter('00')(aDate.getMonth() + 1)";
174 break; 172 break;
175 case "M": 173 case "M":
176 result = " + aLocale['shortMonths'][aDate.getMonth()]"; 174 result = " + aLocale['shortMonths'][aDate.getMonth()]";
177 break; 175 break;
178 case "n": 176 case "n":
179 result = " + (aDate.getMonth() + 1)"; 177 result = " + (aDate.getMonth() + 1)";
180 break; 178 break;
181 case "t": 179 case "t":
182 result = " + Clipperz.Date.getDaysInMonth(aDate)"; 180 result = " + Clipperz.Date.getDaysInMonth(aDate)";
183 break; 181 break;
184 case "L": 182 case "L":
185 result = " + (Clipperz.Date.isLeapYear(aDate) ? 1 : 0)"; 183 result = " + (Clipperz.Date.isLeapYear(aDate) ? 1 : 0)";
186 break; 184 break;
187 case "Y": 185 case "Y":
188 result = " + aDate.getFullYear()"; 186 result = " + aDate.getFullYear()";
189 break; 187 break;
190 case "y": 188 case "y":
191 result = " + ('' + aDate.getFullYear()).substring(2, 4)"; 189 result = " + ('' + aDate.getFullYear()).substring(2, 4)";
192 break; 190 break;
193 case "a": 191 case "a":
194 result = " + (aDate.getHours() < 12 ? aLocale['amDesignation'] : aLocale['pmDesignation'])"; 192 result = " + (aDate.getHours() < 12 ? aLocale['amDesignation'] : aLocale['pmDesignation'])";
195 break; 193 break;
196 case "A": 194 case "A":
197 result = " + (aDate.getHours() < 12 ? aLocale['amDesignation'].toUpperCase() : aLocale['pmDesignation'].toUpperCase())"; 195 result = " + (aDate.getHours() < 12 ? aLocale['amDesignation'].toUpperCase() : aLocale['pmDesignation'].toUpperCase())";
198 break; 196 break;
199 case "g": 197 case "g":
200 result = " + ((aDate.getHours() %12) ? aDate.getHours() % 12 : 12)"; 198 result = " + ((aDate.getHours() %12) ? aDate.getHours() % 12 : 12)";
201 break; 199 break;
202 case "G": 200 case "G":
203 result = " + aDate.getHours()"; 201 result = " + aDate.getHours()";
204 break; 202 break;
205 case "h": 203 case "h":
206 result = " + MochiKit.Format.numberFormatter('00')((aDate.getHours() %12) ? aDate.getHours() % 12 : 12)"; 204 result = " + MochiKit.Format.numberFormatter('00')((aDate.getHours() %12) ? aDate.getHours() % 12 : 12)";
207 break; 205 break;
208 case "H": 206 case "H":
209 result = " + MochiKit.Format.numberFormatter('00')(aDate.getHours())"; 207 result = " + MochiKit.Format.numberFormatter('00')(aDate.getHours())";
210 break; 208 break;
211 case "i": 209 case "i":
212 result = " + MochiKit.Format.numberFormatter('00')(aDate.getMinutes())"; 210 result = " + MochiKit.Format.numberFormatter('00')(aDate.getMinutes())";
213 break; 211 break;
214 case "s": 212 case "s":
215 result = " + MochiKit.Format.numberFormatter('00')(aDate.getSeconds())"; 213 result = " + MochiKit.Format.numberFormatter('00')(aDate.getSeconds())";
216 break; 214 break;
217 case "O": 215 case "O":
218 result = " + aDate.getGMTOffset()"; 216 result = " + aDate.getGMTOffset()";
219 break; 217 break;
220 case "T": 218 case "T":
221 result = " + Clipperz.Date.getTimezone(aDate)"; 219 result = " + Clipperz.Date.getTimezone(aDate)";
222 break; 220 break;
223 case "Z": 221 case "Z":
224 result = " + ( + aDate.getTimezoneOffset() * -60)"; 222 result = " + ( + aDate.getTimezoneOffset() * -60)";
225 break; 223 break;
226 default: 224 default:
227 result = " + '" + aCharacter + "'"; 225 result = " + '" + aCharacter + "'";
228 break; 226 break;
229 }; 227 };
230 228
231 return result; 229 return result;
232 }, 230 },
233 231
234 //========================================================================= 232 //=========================================================================
235 233
236 'formatDateWithPHPLikeTemplateAndLocale': function(aDate, aFormat, aLocale) { 234 'formatDateWithPHPLikeTemplateAndLocale': function(aDate, aFormat, aLocale) {
237 var result; 235 var result;
238 var formatterCode; 236 var formatterCode;
239 var formatter; 237 var formatter;
240 var i,c; 238 var i,c;
241 239
242//MochiKit.Logging.logDebug(">>> Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale"); 240//MochiKit.Logging.logDebug(">>> Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale");
243 formatterCode = "Clipperz.Date.__scratchFormatter = function(aDate, aLocale){return ''"; 241 formatterCode = "Clipperz.Date.__scratchFormatter = function(aDate, aLocale){return ''";
244 242
245 c = aFormat.length; 243 c = aFormat.length;
246 i = 0; 244 i = 0;
247 245
248 while (i<c) { 246 while (i<c) {
249 var character; 247 var character;
250 248
251 character = aFormat.charAt(i); 249 character = aFormat.charAt(i);
252 if (character == "\\") { 250 if (character == "\\") {
253 i++; 251 i++;
254 character = aFormat.charAt(i); 252 character = aFormat.charAt(i);
255 formatterCode += " + '" + character + "'" 253 formatterCode += " + '" + character + "'"
256 } else { 254 } else {
257 formatterCode += Clipperz.Date.getPHPLikeFormatCode(character); 255 formatterCode += Clipperz.Date.getPHPLikeFormatCode(character);
258 } 256 }
259 257
260 i++; 258 i++;
261 } 259 }
262 260
263 formatterCode += ";}"; 261 formatterCode += ";}";
264//MochiKit.Logging.logDebug("--- Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale - formatterCode: " + formatterCode); 262//MochiKit.Logging.logDebug("--- Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale - formatterCode: " + formatterCode);
265 eval(formatterCode); 263 eval(formatterCode);
266 264
267 result = Clipperz.Date.__scratchFormatter.call(this, aDate, aLocale); 265 result = Clipperz.Date.__scratchFormatter.call(this, aDate, aLocale);
268 delete Clipperz.Date.__scratchFormatter; 266 delete Clipperz.Date.__scratchFormatter;
269//MochiKit.Logging.logDebug("<<< Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale"); 267//MochiKit.Logging.logDebug("<<< Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale");
270 268
271 return result; 269 return result;
272 }, 270 },
273 271
274 //------------------------------------------------------------------------- 272 //-------------------------------------------------------------------------
275 273
276 'parseDateWithPHPLikeTemplateAndLocale': function(aString, aFormat, aLocale) { 274 'parseDateWithPHPLikeTemplateAndLocale': function(aString, aFormat, aLocale) {
277 return new Date(); 275 return new Date();
278 }, 276 },
279 277
280 //========================================================================= 278 //=========================================================================
281 279
282 'formatDateWithUTCFormatAndLocale': function(aDate, aLocale) { 280 'formatDateWithUTCFormatAndLocale': function(aDate, aLocale) {
283 // return Clipperz.Date.formatWithJavaLikeTemplateAndLocale(aDate, "EEE, dd MMMM yyyy HH:mm:ss zzz", aLocale); 281 // return Clipperz.Date.formatWithJavaLikeTemplateAndLocale(aDate, "EEE, dd MMMM yyyy HH:mm:ss zzz", aLocale);
284 return aDate.toString(); 282 return aDate.toString();
285 }, 283 },
286 284
287 'parseDateWithUTCFormatAndLocale': function(aValue, aLocale) { 285 'parseDateWithUTCFormatAndLocale': function(aValue, aLocale) {
288 return new Date(Date.parse(aValue)); 286 return new Date(Date.parse(aValue));
289 }, 287 },
290 288
291 //========================================================================= 289 //=========================================================================
292 290
293 'exception': { 291 'exception': {
294 // 'AbstractMethod': new MochiKit.Base.NamedError("Clipperz.Base.exception.AbstractMethod"), 292 // 'AbstractMethod': new MochiKit.Base.NamedError("Clipperz.Base.exception.AbstractMethod"),
295 // 'UnknownType': new MochiKit.Base.NamedError("Clipperz.Base.exception.UnknownType") 293 // 'UnknownType': new MochiKit.Base.NamedError("Clipperz.Base.exception.UnknownType")
296 }, 294 },
297 295
298 //------------------------------------------------------------------------- 296 //-------------------------------------------------------------------------
299 __syntaxFix__: "syntax fix" 297 __syntaxFix__: "syntax fix"
300 298
301}); 299});
302 300
diff --git a/frontend/beta/js/Clipperz/KeePassExportProcessor.js b/frontend/beta/js/Clipperz/KeePassExportProcessor.js
index 74d36ca..7a32f3f 100644
--- a/frontend/beta/js/Clipperz/KeePassExportProcessor.js
+++ b/frontend/beta/js/Clipperz/KeePassExportProcessor.js
@@ -1,248 +1,246 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27 25
28 26
29Clipperz.KeePassExportProcessor = function(args) { 27Clipperz.KeePassExportProcessor = function(args) {
30 args = args || {}; 28 args = args || {};
31 29
32 return this; 30 return this;
33} 31}
34 32
35//============================================================================= 33//=============================================================================
36 34
37Clipperz.KeePassExportProcessor.prototype = MochiKit.Base.update(null, { 35Clipperz.KeePassExportProcessor.prototype = MochiKit.Base.update(null, {
38 36
39 //------------------------------------------------------------------------- 37 //-------------------------------------------------------------------------
40/* 38/*
41 'parse': function(aValue) { 39 'parse': function(aValue) {
42 var result; 40 var result;
43 41
44//MochiKit.Logging.logDebug(">>> KeePassExportProcessor.parse"); 42//MochiKit.Logging.logDebug(">>> KeePassExportProcessor.parse");
45 result = []; 43 result = [];
46//MochiKit.Logging.logDebug("--- KeePassExportProcessor.parse - result: " + Clipperz.Base.serializeJSON(result)); 44//MochiKit.Logging.logDebug("--- KeePassExportProcessor.parse - result: " + Clipperz.Base.serializeJSON(result));
47//MochiKit.Logging.logDebug("<<< KeePassExportProcessor.parse"); 45//MochiKit.Logging.logDebug("<<< KeePassExportProcessor.parse");
48 46
49 return result; 47 return result;
50 }, 48 },
51*/ 49*/
52 //------------------------------------------------------------------------- 50 //-------------------------------------------------------------------------
53 51
54 'deferredParse_core': function(aContext) { 52 'deferredParse_core': function(aContext) {
55 var deferredResult; 53 var deferredResult;
56 54
57 //MochiKit.Logging.logDebug(">>> KeePassExportProcessor.deferredParse_core"); 55 //MochiKit.Logging.logDebug(">>> KeePassExportProcessor.deferredParse_core");
58 //MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse_core - (1) aContext.line: " + aContext.line.replace(/\n/g, "\\n").substring(0,50)); 56 //MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse_core - (1) aContext.line: " + aContext.line.replace(/\n/g, "\\n").substring(0,50));
59 //MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse_core - aContext: " + Clipperz.Base.serializeJSON(aContext).substring(0,50)); 57 //MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse_core - aContext: " + Clipperz.Base.serializeJSON(aContext).substring(0,50));
60 //MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse_core - (2) aContext.line: " + aContext.line.replace(/\n/g, "\\n").substring(0,50)); 58 //MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse_core - (2) aContext.line: " + aContext.line.replace(/\n/g, "\\n").substring(0,50));
61//console.log("deferredParse_core - aContext", aContext); 59//console.log("deferredParse_core - aContext", aContext);
62 //MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse_core - (3) aContext.line: " + aContext.line.replace(/\n/g, "\\n").substring(0,50)); 60 //MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse_core - (3) aContext.line: " + aContext.line.replace(/\n/g, "\\n").substring(0,50));
63 if (aContext.line == "") { 61 if (aContext.line == "") {
64 deferredResult = MochiKit.Async.succeed(aContext.result); 62 deferredResult = MochiKit.Async.succeed(aContext.result);
65 } else { 63 } else {
66 var record; 64 var record;
67 65
68 record = this.parseRecord(aContext); 66 record = this.parseRecord(aContext);
69 if (record != null) { 67 if (record != null) {
70 aContext.result.push(record); 68 aContext.result.push(record);
71 } 69 }
72 70
73 //MochiKit.Logging.logDebug("--> KeePassExportProcessor.deferredParse_core - aContext.line: " + aContext.line.replace(/\n/g, "\\n").substring(0,50)); 71 //MochiKit.Logging.logDebug("--> KeePassExportProcessor.deferredParse_core - aContext.line: " + aContext.line.replace(/\n/g, "\\n").substring(0,50));
74 aContext.line = aContext.line.replace(/^\n*/g, "").replace(/\n$/g, ""); 72 aContext.line = aContext.line.replace(/^\n*/g, "").replace(/\n$/g, "");
75 //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));
76 74
77 deferredResult = new MochiKit.Async.Deferred(); 75 deferredResult = new MochiKit.Async.Deferred();
78//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassExportProcessor.deferredParse_core - 1.1 " + res); return res;}); 76//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassExportProcessor.deferredParse_core - 1.1 " + res); return res;});
79 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'importProcessorProgressUpdate', {status:'processing', size:aContext.size, progress:(aContext.size - aContext.line.length)}); 77 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'importProcessorProgressUpdate', {status:'processing', size:aContext.size, progress:(aContext.size - aContext.line.length)});
80//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassExportProcessor.deferredParse_core - 1.2 " + res); return res;}); 78//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassExportProcessor.deferredParse_core - 1.2 " + res); return res;});
81 deferredResult.addCallback(MochiKit.Async.wait, 0.2); 79 deferredResult.addCallback(MochiKit.Async.wait, 0.2);
82//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassExportProcessor.deferredParse_core - 1.3 " + res); return res;}); 80//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassExportProcessor.deferredParse_core - 1.3 " + res); return res;});
83//deferredResult.addBoth(function(res) {console.log("KeePassExportProcessor.deferredParse_core - 1.3 ", res); return res;}); 81//deferredResult.addBoth(function(res) {console.log("KeePassExportProcessor.deferredParse_core - 1.3 ", res); return res;});
84 deferredResult.addCallback(MochiKit.Base.method(this, 'deferredParse_core')) 82 deferredResult.addCallback(MochiKit.Base.method(this, 'deferredParse_core'))
85//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassExportProcessor.deferredParse_core - 1.4 " + res); return res;}); 83//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassExportProcessor.deferredParse_core - 1.4 " + res); return res;});
86 deferredResult.callback(aContext); 84 deferredResult.callback(aContext);
87 } 85 }
88 //MochiKit.Logging.logDebug("<<< KeePassExportProcessor.deferredParse_core"); 86 //MochiKit.Logging.logDebug("<<< KeePassExportProcessor.deferredParse_core");
89 87
90 return deferredResult; 88 return deferredResult;
91 }, 89 },
92 90
93 //......................................................................... 91 //.........................................................................
94 92
95 'deferredParse': function(aValue) { 93 'deferredParse': function(aValue) {
96 var deferredResult; 94 var deferredResult;
97 var lines; 95 var lines;
98 var context; 96 var context;
99 97
100//MochiKit.Logging.logDebug(">>> KeePassExportProcessor.deferredParse"); 98//MochiKit.Logging.logDebug(">>> KeePassExportProcessor.deferredParse");
101//MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse - aValue: " + aValue.length); 99//MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse - aValue: " + aValue.length);
102 lines = aValue.replace(/\r?\n/g, "\n"); 100 lines = aValue.replace(/\r?\n/g, "\n");
103//MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse - lines: " + lines.length); 101//MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse - lines: " + lines.length);
104 context = { 102 context = {
105 line: lines, 103 line: lines,
106 size: lines.length, 104 size: lines.length,
107 result: [] 105 result: []
108 } 106 }
109//MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse - context: " + Clipperz.Base.serializeJSON(context).substring(0,50)); 107//MochiKit.Logging.logDebug("--- KeePassExportProcessor.deferredParse - context: " + Clipperz.Base.serializeJSON(context).substring(0,50));
110//console.log("--- KeePassExportProcessor.deferredParse - context: ", context); 108//console.log("--- KeePassExportProcessor.deferredParse - context: ", context);
111 109
112 deferredResult = new MochiKit.Async.Deferred(); 110 deferredResult = new MochiKit.Async.Deferred();
113//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassExportProcessor.deferredParse - 1 " + res); return res;}); 111//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassExportProcessor.deferredParse - 1 " + res); return res;});
114//deferredResult.addBoth(function(res) {console.log("KeePassExportProcessor.deferredParse - 1 ", res); return res;}); 112//deferredResult.addBoth(function(res) {console.log("KeePassExportProcessor.deferredParse - 1 ", res); return res;});
115 deferredResult.addCallback(MochiKit.Base.method(this, 'deferredParse_core')); 113 deferredResult.addCallback(MochiKit.Base.method(this, 'deferredParse_core'));
116//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassExportProcessor.deferredParse - 2 " + res); return res;}); 114//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassExportProcessor.deferredParse - 2 " + res); return res;});
117 deferredResult.callback(context); 115 deferredResult.callback(context);
118//MochiKit.Logging.logDebug("<<< KeePassExportProcessor.deferredParse"); 116//MochiKit.Logging.logDebug("<<< KeePassExportProcessor.deferredParse");
119 117
120 return deferredResult; 118 return deferredResult;
121 }, 119 },
122 120
123 //------------------------------------------------------------------------- 121 //-------------------------------------------------------------------------
124 122
125 'parseRecord': function(aContext) { 123 'parseRecord': function(aContext) {
126 var result; 124 var result;
127 var recordLabelRegexp; 125 var recordLabelRegexp;
128 varfieldLabelRegexp; 126 varfieldLabelRegexp;
129 var fieldValueRegexp; 127 var fieldValueRegexp;
130 var fullLineRegexp; 128 var fullLineRegexp;
131/* 129/*
132[Record name] 130[Record name]
133Group Tree: 131Group Tree:
134UserName: 132UserName:
135URL: 133URL:
136Password: 134Password:
137Notes: test 135Notes: test
138UUID: 525f62430079bae48b79ed2961924b05 136UUID: 525f62430079bae48b79ed2961924b05
139Icon: 0 137Icon: 0
140Creation Time: 2007-06-26 17:56:03 138Creation Time: 2007-06-26 17:56:03
141Last Access: 2007-10-25 16:23:51 139Last Access: 2007-10-25 16:23:51
142Last Modification: 2007-10-25 16:23:51 140Last Modification: 2007-10-25 16:23:51
143Expires: 2999-12-28 23:59:59 141Expires: 2999-12-28 23:59:59
144 142
145 [Record name] ==> Title 143 [Record name] ==> Title
146 Group: General ==> Group 144 Group: General ==> Group
147 Group Tree: ==> Group Tree 145 Group Tree: ==> Group Tree
148 UserName: ==> UserName 146 UserName: ==> UserName
149 URL: ==>URL 147 URL: ==>URL
150 Password: ==>Password 148 Password: ==>Password
151 Notes: test ==>Notes 149 Notes: test ==>Notes
152 UUID: 525f62430079bae48b79ed2961924b05 ==>UUID 150 UUID: 525f62430079bae48b79ed2961924b05 ==>UUID
153 Icon: 0 ==>Icon 151 Icon: 0 ==>Icon
154 Creation Time: 2007-06-26 17:56:03 ==>Creation Time 152 Creation Time: 2007-06-26 17:56:03 ==>Creation Time
155 Last Access: 2007-10-25 16:23:51 ==>Last Access 153 Last Access: 2007-10-25 16:23:51 ==>Last Access
156 Last Modification: 2007-10-25 16:23:51 ==>Last Modification 154 Last Modification: 2007-10-25 16:23:51 ==>Last Modification
157 Expires: 2999-12-28 23:59:59 ==> Expires 155 Expires: 2999-12-28 23:59:59 ==> Expires
158 Attachment Description: ==> Attachment Description 156 Attachment Description: ==> Attachment Description
159 Attachment: ==> Attachment 157 Attachment: ==> Attachment
160*/ 158*/
161 recordLabelRegexp = new RegExp("^\\[(.*)\\]\\n"); 159 recordLabelRegexp = new RegExp("^\\[(.*)\\]\\n");
162 // recordLabelRegexp = new RegExp("^\\[(.*)\\]$", "m"); 160 // recordLabelRegexp = new RegExp("^\\[(.*)\\]$", "m");
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): "); 161 fieldLabelRegexp = new RegExp("^(Group|Group Tree|UserName|URL|Password|Notes|UUID|Icon|Creation Time|Last Access|Last Modification|Expires|Attachment Description|Attachment|Valid until): ");
164 fieldValueRegexp = new RegExp("(.*)(\\n|$)"); 162 fieldValueRegexp = new RegExp("(.*)(\\n|$)");
165 fullLineRegexp = new RegExp("^(.*\\n)"); 163 fullLineRegexp = new RegExp("^(.*\\n)");
166 164
167 165
168 if (recordLabelRegexp.test(aContext.line) == true) { 166 if (recordLabelRegexp.test(aContext.line) == true) {
169 var line; 167 var line;
170 168
171//MochiKit.Logging.logDebug("1.0"); 169//MochiKit.Logging.logDebug("1.0");
172 line = aContext.line; 170 line = aContext.line;
173//MochiKit.Logging.logDebug("0 - line: " + line.replace(/\n/g, "\\n").substring(0,50)); 171//MochiKit.Logging.logDebug("0 - line: " + line.replace(/\n/g, "\\n").substring(0,50));
174 172
175 result = {}; 173 result = {};
176 result['Title'] = line.match(recordLabelRegexp)[1]; 174 result['Title'] = line.match(recordLabelRegexp)[1];
177//MochiKit.Logging.logDebug("1 - title: " + result['Title']); 175//MochiKit.Logging.logDebug("1 - title: " + result['Title']);
178 line = line.replace(/^.*\n/, ""); 176 line = line.replace(/^.*\n/, "");
179//MochiKit.Logging.logDebug("2 - line: " + line.replace(/\n/g, "\\n").substring(0,50)); 177//MochiKit.Logging.logDebug("2 - line: " + line.replace(/\n/g, "\\n").substring(0,50));
180//MochiKit.Logging.logDebug("======================================="); 178//MochiKit.Logging.logDebug("=======================================");
181 while (fieldLabelRegexp.test(line) == true) { 179 while (fieldLabelRegexp.test(line) == true) {
182 var fieldName; 180 var fieldName;
183 var fieldValue; 181 var fieldValue;
184 182
185 fieldName = RegExp.$1; 183 fieldName = RegExp.$1;
186//MochiKit.Logging.logDebug("3 - fieldName: " + fieldName); 184//MochiKit.Logging.logDebug("3 - fieldName: " + fieldName);
187 line = RegExp.rightContext; 185 line = RegExp.rightContext;
188//MochiKit.Logging.logDebug("4 - line: " + line.replace(/\n/g, "\\n").substring(0,50)); 186//MochiKit.Logging.logDebug("4 - line: " + line.replace(/\n/g, "\\n").substring(0,50));
189 187
190 fieldValue = line.match(fieldValueRegexp)[1]; 188 fieldValue = line.match(fieldValueRegexp)[1];
191//MochiKit.Logging.logDebug("5 - fieldValue: " + fieldValue); 189//MochiKit.Logging.logDebug("5 - fieldValue: " + fieldValue);
192 line = RegExp.rightContext; 190 line = RegExp.rightContext;
193//MochiKit.Logging.logDebug("6 - line: " + line.replace(/\n/g, "\\n").substring(0,50)); 191//MochiKit.Logging.logDebug("6 - line: " + line.replace(/\n/g, "\\n").substring(0,50));
194 192
195 if (fieldName == 'Notes') { 193 if (fieldName == 'Notes') {
196 var isMultiline; 194 var isMultiline;
197 195
198 isMultiline = false; 196 isMultiline = false;
199 197
200//MochiKit.Logging.logDebug("7 - fieldLabelRegexp.test(line): " + fieldLabelRegexp.test(line) + " - recordLabelRegexp.test(line): " + recordLabelRegexp.test(line)); 198//MochiKit.Logging.logDebug("7 - fieldLabelRegexp.test(line): " + fieldLabelRegexp.test(line) + " - recordLabelRegexp.test(line): " + recordLabelRegexp.test(line));
201 if ((line != "") && (fieldLabelRegexp.test(line) == false) && (recordLabelRegexp.test(line) == false)) { 199 if ((line != "") && (fieldLabelRegexp.test(line) == false) && (recordLabelRegexp.test(line) == false)) {
202 fieldValue += '\n'; 200 fieldValue += '\n';
203 } 201 }
204 202
205 while ((line != "") && (fieldLabelRegexp.test(line) == false) && (recordLabelRegexp.test(line) == false)) { 203 while ((line != "") && (fieldLabelRegexp.test(line) == false) && (recordLabelRegexp.test(line) == false)) {
206 var newLineValue; 204 var newLineValue;
207 205
208 newLineValue = line.match(fullLineRegexp)[1]; 206 newLineValue = line.match(fullLineRegexp)[1];
209 if (newLineValue != "\n") { 207 if (newLineValue != "\n") {
210 isMultiline = true; 208 isMultiline = true;
211 } 209 }
212 fieldValue += newLineValue; 210 fieldValue += newLineValue;
213//MochiKit.Logging.logDebug("8 - fieldValue: " + fieldValue); 211//MochiKit.Logging.logDebug("8 - fieldValue: " + fieldValue);
214 line = RegExp.rightContext; 212 line = RegExp.rightContext;
215//MochiKit.Logging.logDebug("9 - line: " + line.replace(/\n/g, "\\n").substring(0,50)); 213//MochiKit.Logging.logDebug("9 - line: " + line.replace(/\n/g, "\\n").substring(0,50));
216//MochiKit.Logging.logDebug("10 - fieldLabelRegexp.test(line): " + fieldLabelRegexp.test(line) + " - recordLabelRegexp.test(line): " + recordLabelRegexp.test(line)); 214//MochiKit.Logging.logDebug("10 - fieldLabelRegexp.test(line): " + fieldLabelRegexp.test(line) + " - recordLabelRegexp.test(line): " + recordLabelRegexp.test(line));
217 } 215 }
218 216
219 if (isMultiline) { 217 if (isMultiline) {
220 fieldValue = fieldValue.replace(/\n$/g, ""); 218 fieldValue = fieldValue.replace(/\n$/g, "");
221 } else { 219 } else {
222 fieldValue = fieldValue.replace(/\n\n$/g, ""); 220 fieldValue = fieldValue.replace(/\n\n$/g, "");
223 } 221 }
224 222
225 line = line.replace(/^\n/, ''); 223 line = line.replace(/^\n/, '');
226 } 224 }
227//MochiKit.Logging.logDebug("5 - fieldValue: " + fieldValue); 225//MochiKit.Logging.logDebug("5 - fieldValue: " + fieldValue);
228 226
229 result[fieldName] = fieldValue; 227 result[fieldName] = fieldValue;
230//MochiKit.Logging.logDebug("6 - line: " + line.replace(/\n/g, "\\n").substring(0,50)); 228//MochiKit.Logging.logDebug("6 - line: " + line.replace(/\n/g, "\\n").substring(0,50));
231//MochiKit.Logging.logDebug("---------------------------------------"); 229//MochiKit.Logging.logDebug("---------------------------------------");
232 } 230 }
233 } else { 231 } else {
234//MochiKit.Logging.logDebug("2.0"); 232//MochiKit.Logging.logDebug("2.0");
235 result = null; 233 result = null;
236 } 234 }
237 235
238 aContext.line = line; 236 aContext.line = line;
239//MochiKit.Logging.logDebug("#######################################"); 237//MochiKit.Logging.logDebug("#######################################");
240 238
241 return result; 239 return result;
242 }, 240 },
243 241
244 //------------------------------------------------------------------------- 242 //-------------------------------------------------------------------------
245 __syntaxFix__: "syntax fix" 243 __syntaxFix__: "syntax fix"
246}); 244});
247 245
248 246
diff --git a/frontend/beta/js/Clipperz/NotificationCenter.js b/frontend/beta/js/Clipperz/NotificationCenter.js
index e346b1c..a2e2fb6 100644
--- a/frontend/beta/js/Clipperz/NotificationCenter.js
+++ b/frontend/beta/js/Clipperz/NotificationCenter.js
@@ -1,322 +1,320 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.NotificationCenter) == 'undefined') { Clipperz.NotificationCenter = {}; } 25if (typeof(Clipperz.NotificationCenter) == 'undefined') { Clipperz.NotificationCenter = {}; }
28 26
29 27
30//############################################################################# 28//#############################################################################
31 29
32Clipperz.NotificationCenterEvent = function(args) { 30Clipperz.NotificationCenterEvent = function(args) {
33 args = args || {}; 31 args = args || {};
34 //MochiKit.Base.bindMethods(this); 32 //MochiKit.Base.bindMethods(this);
35 33
36 this._source = args.source || null; 34 this._source = args.source || null;
37 this._event = args.event || null; 35 this._event = args.event || null;
38 this._parameters = args.parameters || null; 36 this._parameters = args.parameters || null;
39 this._isSynchronous = args.isSynchronous || false; 37 this._isSynchronous = args.isSynchronous || false;
40 38
41 return this; 39 return this;
42} 40}
43 41
44//============================================================================= 42//=============================================================================
45 43
46Clipperz.NotificationCenterEvent.prototype = MochiKit.Base.update(null, { 44Clipperz.NotificationCenterEvent.prototype = MochiKit.Base.update(null, {
47 45
48 //------------------------------------------------------------------------- 46 //-------------------------------------------------------------------------
49 47
50 'toString': function() { 48 'toString': function() {
51 return "Clipperz.NotificationCenterEvent"; 49 return "Clipperz.NotificationCenterEvent";
52 //return "Clipperz.NotificationCenterEvent {source: " + this.source() + ", event: " + this.event() + ", parameters: " + this.parameters() + "}"; 50 //return "Clipperz.NotificationCenterEvent {source: " + this.source() + ", event: " + this.event() + ", parameters: " + this.parameters() + "}";
53 }, 51 },
54 52
55 //------------------------------------------------------------------------- 53 //-------------------------------------------------------------------------
56 54
57 'source': function() { 55 'source': function() {
58 return this._source; 56 return this._source;
59 }, 57 },
60 58
61 'setSource': function(aValue) { 59 'setSource': function(aValue) {
62 this._source = aValue; 60 this._source = aValue;
63 }, 61 },
64 62
65 //------------------------------------------------------------------------- 63 //-------------------------------------------------------------------------
66 64
67 'event': function() { 65 'event': function() {
68 return this._event; 66 return this._event;
69 }, 67 },
70 68
71 'setEvent': function(aValue) { 69 'setEvent': function(aValue) {
72 this._event = aValue; 70 this._event = aValue;
73 }, 71 },
74 72
75 //------------------------------------------------------------------------- 73 //-------------------------------------------------------------------------
76 74
77 'parameters': function() { 75 'parameters': function() {
78 return this._parameters; 76 return this._parameters;
79 }, 77 },
80 78
81 'setParameters': function(aValue) { 79 'setParameters': function(aValue) {
82 this._parameters = aValue; 80 this._parameters = aValue;
83 }, 81 },
84 82
85 //------------------------------------------------------------------------- 83 //-------------------------------------------------------------------------
86 84
87 'isSynchronous': function() { 85 'isSynchronous': function() {
88 return this._isSynchronous; 86 return this._isSynchronous;
89 }, 87 },
90 88
91 //------------------------------------------------------------------------- 89 //-------------------------------------------------------------------------
92 __syntaxFix__: "syntax fix" 90 __syntaxFix__: "syntax fix"
93}); 91});
94 92
95 93
96//############################################################################# 94//#############################################################################
97//############################################################################# 95//#############################################################################
98 96
99Clipperz.NotificationCenter = function(args) { 97Clipperz.NotificationCenter = function(args) {
100 args = args || {}; 98 args = args || {};
101 //MochiKit.Base.bindMethods(this); 99 //MochiKit.Base.bindMethods(this);
102 100
103 this._listeners = {}; 101 this._listeners = {};
104 this._useSynchronousListenerInvocation = args.useSynchronousListenerInvocation || false; 102 this._useSynchronousListenerInvocation = args.useSynchronousListenerInvocation || false;
105 this._timeoutDelay = args.timeoutDelay || 0.1; 103 this._timeoutDelay = args.timeoutDelay || 0.1;
106 104
107 return this; 105 return this;
108} 106}
109 107
110//============================================================================= 108//=============================================================================
111 109
112Clipperz.NotificationCenter.prototype = MochiKit.Base.update(null, { 110Clipperz.NotificationCenter.prototype = MochiKit.Base.update(null, {
113 111
114 //------------------------------------------------------------------------- 112 //-------------------------------------------------------------------------
115 113
116 'toString': function() { 114 'toString': function() {
117 return "Clipperz.NotificationCenter"; 115 return "Clipperz.NotificationCenter";
118 }, 116 },
119 117
120 //------------------------------------------------------------------------- 118 //-------------------------------------------------------------------------
121 119
122 'useSynchronousListenerInvocation': function() { 120 'useSynchronousListenerInvocation': function() {
123 return this._useSynchronousListenerInvocation; 121 return this._useSynchronousListenerInvocation;
124 }, 122 },
125 123
126 'setUseSynchronousListenerInvocation': function(aValue) { 124 'setUseSynchronousListenerInvocation': function(aValue) {
127 this._useSynchronousListenerInvocation = aValue; 125 this._useSynchronousListenerInvocation = aValue;
128 }, 126 },
129 127
130 //------------------------------------------------------------------------- 128 //-------------------------------------------------------------------------
131 129
132 'timeoutDelay': function() { 130 'timeoutDelay': function() {
133 return this._timeoutDelay; 131 return this._timeoutDelay;
134 }, 132 },
135 133
136 'setTimeoutDelay': function(aValue) { 134 'setTimeoutDelay': function(aValue) {
137 this._timeoutDelay = aValue; 135 this._timeoutDelay = aValue;
138 }, 136 },
139 137
140 //------------------------------------------------------------------------- 138 //-------------------------------------------------------------------------
141 139
142 'listeners': function() { 140 'listeners': function() {
143 return this._listeners; 141 return this._listeners;
144 }, 142 },
145 143
146 //------------------------------------------------------------------------- 144 //-------------------------------------------------------------------------
147 145
148 'register': function(aSource, anEvent, aListener, aMethod) { 146 'register': function(aSource, anEvent, aListener, aMethod) {
149 vareventListeners; 147 vareventListeners;
150 varlistenerInfo; 148 varlistenerInfo;
151 vareventKey; 149 vareventKey;
152 150
153 if (anEvent != null) { 151 if (anEvent != null) {
154 eventKey = anEvent; 152 eventKey = anEvent;
155 } else { 153 } else {
156 eventKey = '_notificationCenter_matchAnyEvent_key_'; 154 eventKey = '_notificationCenter_matchAnyEvent_key_';
157 } 155 }
158 156
159 eventListeners = this.listeners()[eventKey]; 157 eventListeners = this.listeners()[eventKey];
160 158
161 if (eventListeners == null) { 159 if (eventListeners == null) {
162 eventListeners = []; 160 eventListeners = [];
163 this.listeners()[eventKey] = eventListeners; 161 this.listeners()[eventKey] = eventListeners;
164 } 162 }
165 163
166 listenerInfo = {}; 164 listenerInfo = {};
167 if (aSource != null) { 165 if (aSource != null) {
168 listenerInfo['source'] = aSource; 166 listenerInfo['source'] = aSource;
169 } else { 167 } else {
170 listenerInfo['source'] = 'any'; 168 listenerInfo['source'] = 'any';
171 } 169 }
172 170
173 listenerInfo['listener'] = aListener; 171 listenerInfo['listener'] = aListener;
174 listenerInfo['method'] = aMethod; 172 listenerInfo['method'] = aMethod;
175 173
176 eventListeners.push(listenerInfo); 174 eventListeners.push(listenerInfo);
177 175
178 return listenerInfo; 176 return listenerInfo;
179 }, 177 },
180 178
181 //------------------------------------------------------------------------- 179 //-------------------------------------------------------------------------
182 180
183 'removeListenerInfoFromListeners': function(aListener, someListeners) { 181 'removeListenerInfoFromListeners': function(aListener, someListeners) {
184 varlistenerIndex; 182 varlistenerIndex;
185 vari,c; 183 vari,c;
186 184
187 if (someListeners != null) { 185 if (someListeners != null) {
188 listenerIndex = -1; 186 listenerIndex = -1;
189 c = someListeners.length; 187 c = someListeners.length;
190 for (i=0; i<c; i++) { 188 for (i=0; i<c; i++) {
191 varlistenerInfo; 189 varlistenerInfo;
192 190
193 listenerInfo = someListeners[i]; 191 listenerInfo = someListeners[i];
194 if (listenerInfo['listener'] === aListener) { 192 if (listenerInfo['listener'] === aListener) {
195 listenerIndex = i; 193 listenerIndex = i;
196 } 194 }
197 } 195 }
198 196
199 if (listenerIndex != -1) { 197 if (listenerIndex != -1) {
200 Clipperz.Base.removeObjectAtIndexFromArray(listenerIndex, someListeners); 198 Clipperz.Base.removeObjectAtIndexFromArray(listenerIndex, someListeners);
201 } 199 }
202 } 200 }
203 }, 201 },
204 202
205 //------------------------------------------------------------------------- 203 //-------------------------------------------------------------------------
206 204
207 'unregister': function(aListener, anEvent) { 205 'unregister': function(aListener, anEvent) {
208 if (anEvent == null) { 206 if (anEvent == null) {
209 varallListenerList; 207 varallListenerList;
210 vari, c; 208 vari, c;
211 209
212 // allListenerList = Clipperz.Base.values(this.listeners()); 210 // allListenerList = Clipperz.Base.values(this.listeners());
213 allListenerList = MochiKit.Base.values(this.listeners()); 211 allListenerList = MochiKit.Base.values(this.listeners());
214 c = allListenerList.length; 212 c = allListenerList.length;
215 for (i=0; i<c; i++) { 213 for (i=0; i<c; i++) {
216 this.removeListenerInfoFromListeners(aListener, allListenerList[i]); 214 this.removeListenerInfoFromListeners(aListener, allListenerList[i]);
217 } 215 }
218 } else { 216 } else {
219 this.removeListenerInfoFromListeners(aListener, this.listeners()[anEvent]); 217 this.removeListenerInfoFromListeners(aListener, this.listeners()[anEvent]);
220 } 218 }
221 }, 219 },
222 220
223 //------------------------------------------------------------------------- 221 //-------------------------------------------------------------------------
224 222
225 'asysnchronousListenerNotification': function(anEventInfo, aMethod, aListener) { 223 'asysnchronousListenerNotification': function(anEventInfo, aMethod, aListener) {
226 MochiKit.Async.callLater(this.timeoutDelay(), MochiKit.Base.partial(MochiKit.Base.methodcaller(aMethod, anEventInfo), aListener)); 224 MochiKit.Async.callLater(this.timeoutDelay(), MochiKit.Base.partial(MochiKit.Base.methodcaller(aMethod, anEventInfo), aListener));
227 // setTimeout(MochiKit.Base.partial(MochiKit.Base.methodcaller(aMethod, anEventInfo), aListener), this.timeoutDelay()); 225 // setTimeout(MochiKit.Base.partial(MochiKit.Base.methodcaller(aMethod, anEventInfo), aListener), this.timeoutDelay());
228 }, 226 },
229 227
230 //------------------------------------------------------------------------- 228 //-------------------------------------------------------------------------
231 229
232 'processListenerInfo': function(anEventInfo, aListenerInfo) { 230 'processListenerInfo': function(anEventInfo, aListenerInfo) {
233 varshouldInvokeListenerMethod; 231 varshouldInvokeListenerMethod;
234 232
235 if (aListenerInfo['source'] == 'any') { 233 if (aListenerInfo['source'] == 'any') {
236 shouldInvokeListenerMethod = true; 234 shouldInvokeListenerMethod = true;
237 } else { 235 } else {
238 if (aListenerInfo['source'] === anEventInfo.source()) { 236 if (aListenerInfo['source'] === anEventInfo.source()) {
239 shouldInvokeListenerMethod = true; 237 shouldInvokeListenerMethod = true;
240 } else { 238 } else {
241 shouldInvokeListenerMethod = false; 239 shouldInvokeListenerMethod = false;
242 } 240 }
243 } 241 }
244 242
245 if (shouldInvokeListenerMethod) { 243 if (shouldInvokeListenerMethod) {
246 if (this.useSynchronousListenerInvocation() || anEventInfo.isSynchronous()) { 244 if (this.useSynchronousListenerInvocation() || anEventInfo.isSynchronous()) {
247//MochiKit.Logging.logDebug("syncrhronous listener invocation"); 245//MochiKit.Logging.logDebug("syncrhronous listener invocation");
248 try { 246 try {
249 // MochiKit.Base.map(MochiKit.Base.methodcaller(aListenerInfo['method'], anEventInfo), [aListenerInfo['listener']]); 247 // MochiKit.Base.map(MochiKit.Base.methodcaller(aListenerInfo['method'], anEventInfo), [aListenerInfo['listener']]);
250//console.log("notification: ", aListenerInfo['listener'], aListenerInfo['method'], anEventInfo); 248//console.log("notification: ", aListenerInfo['listener'], aListenerInfo['method'], anEventInfo);
251 MochiKit.Base.method(aListenerInfo['listener'], aListenerInfo['method'], anEventInfo)(); 249 MochiKit.Base.method(aListenerInfo['listener'], aListenerInfo['method'], anEventInfo)();
252 } catch(exception) { 250 } catch(exception) {
253 MochiKit.Logging.logError('NotificationCenter ERROR: unable to invoke method \'' + aListenerInfo['method'] + '\' on object ' + aListenerInfo['listener']); 251 MochiKit.Logging.logError('NotificationCenter ERROR: unable to invoke method \'' + aListenerInfo['method'] + '\' on object ' + aListenerInfo['listener']);
254 } 252 }
255 } else { 253 } else {
256 var asyncMethod; 254 var asyncMethod;
257 255
258//MochiKit.Logging.logDebug("asyncrhronous listener invocation"); 256//MochiKit.Logging.logDebug("asyncrhronous listener invocation");
259 asyncMethod = MochiKit.Base.bind(this.asysnchronousListenerNotification, this) 257 asyncMethod = MochiKit.Base.bind(this.asysnchronousListenerNotification, this)
260 MochiKit.Base.map(MochiKit.Base.partial(asyncMethod, anEventInfo, aListenerInfo['method']), [aListenerInfo['listener']]); 258 MochiKit.Base.map(MochiKit.Base.partial(asyncMethod, anEventInfo, aListenerInfo['method']), [aListenerInfo['listener']]);
261 } 259 }
262 } 260 }
263 }, 261 },
264 262
265 //------------------------------------------------------------------------- 263 //-------------------------------------------------------------------------
266 264
267 'notify': function(aSource, anEvent, someEventParameters, isSynchronous) { 265 'notify': function(aSource, anEvent, someEventParameters, isSynchronous) {
268 vareventInfo; 266 vareventInfo;
269 var processInfoMethod; 267 var processInfoMethod;
270 268
271//MochiKit.Logging.logDebug(">>> NotificationCenter.notify"); 269//MochiKit.Logging.logDebug(">>> NotificationCenter.notify");
272 eventInfo = new Clipperz.NotificationCenterEvent({source:aSource, event:anEvent, parameters:someEventParameters, isSynchronous:isSynchronous}); 270 eventInfo = new Clipperz.NotificationCenterEvent({source:aSource, event:anEvent, parameters:someEventParameters, isSynchronous:isSynchronous});
273//MochiKit.Logging.logDebug("--- NotificationCenter.notify - 1"); 271//MochiKit.Logging.logDebug("--- NotificationCenter.notify - 1");
274 processInfoMethod = MochiKit.Base.bind(this.processListenerInfo, this); 272 processInfoMethod = MochiKit.Base.bind(this.processListenerInfo, this);
275//MochiKit.Logging.logDebug("--- NotificationCenter.notify - 2"); 273//MochiKit.Logging.logDebug("--- NotificationCenter.notify - 2");
276 274
277 MochiKit.Base.map(MochiKit.Base.partial(processInfoMethod, eventInfo), this.listeners()[anEvent] || []); 275 MochiKit.Base.map(MochiKit.Base.partial(processInfoMethod, eventInfo), this.listeners()[anEvent] || []);
278//MochiKit.Logging.logDebug("--- NotificationCenter.notify - 3"); 276//MochiKit.Logging.logDebug("--- NotificationCenter.notify - 3");
279 MochiKit.Base.map(MochiKit.Base.partial(processInfoMethod, eventInfo), this.listeners()['_notificationCenter_matchAnyEvent_key_'] || []); 277 MochiKit.Base.map(MochiKit.Base.partial(processInfoMethod, eventInfo), this.listeners()['_notificationCenter_matchAnyEvent_key_'] || []);
280//MochiKit.Logging.logDebug("<<< NotificationCenter.notify"); 278//MochiKit.Logging.logDebug("<<< NotificationCenter.notify");
281 }, 279 },
282 280
283 //------------------------------------------------------------------------- 281 //-------------------------------------------------------------------------
284 282
285 'deferredNotification': function(aSource, anEvent, someEventParameters, aDeferredResult) { 283 'deferredNotification': function(aSource, anEvent, someEventParameters, aDeferredResult) {
286 284
287 this.notify(aSource, anEvent, someEventParameters, true); 285 this.notify(aSource, anEvent, someEventParameters, true);
288 286
289 return aDeferredResult; 287 return aDeferredResult;
290 // return MochiKit.Async.wait(1, aDeferredResult); 288 // return MochiKit.Async.wait(1, aDeferredResult);
291 }, 289 },
292 290
293 //------------------------------------------------------------------------- 291 //-------------------------------------------------------------------------
294 292
295 'resetStatus': function() { 293 'resetStatus': function() {
296 this._listeners = {}; 294 this._listeners = {};
297 }, 295 },
298 296
299 //------------------------------------------------------------------------- 297 //-------------------------------------------------------------------------
300 __syntaxFix__: "syntax fix" 298 __syntaxFix__: "syntax fix"
301 299
302}); 300});
303 301
304//############################################################################# 302//#############################################################################
305 303
306Clipperz.NotificationCenter.defaultNotificationCenter = new Clipperz.NotificationCenter(); 304Clipperz.NotificationCenter.defaultNotificationCenter = new Clipperz.NotificationCenter();
307 305
308Clipperz.NotificationCenter.notify = MochiKit.Base.method(Clipperz.NotificationCenter.defaultNotificationCenter, 'notify'); 306Clipperz.NotificationCenter.notify = MochiKit.Base.method(Clipperz.NotificationCenter.defaultNotificationCenter, 'notify');
309Clipperz.NotificationCenter.register = MochiKit.Base.method(Clipperz.NotificationCenter.defaultNotificationCenter, 'register'); 307Clipperz.NotificationCenter.register = MochiKit.Base.method(Clipperz.NotificationCenter.defaultNotificationCenter, 'register');
310Clipperz.NotificationCenter.unregister = MochiKit.Base.method(Clipperz.NotificationCenter.defaultNotificationCenter, 'unregister'); 308Clipperz.NotificationCenter.unregister = MochiKit.Base.method(Clipperz.NotificationCenter.defaultNotificationCenter, 'unregister');
311Clipperz.NotificationCenter.deferredNotification = MochiKit.Base.method(Clipperz.NotificationCenter.defaultNotificationCenter, 'deferredNotification'); 309Clipperz.NotificationCenter.deferredNotification = MochiKit.Base.method(Clipperz.NotificationCenter.defaultNotificationCenter, 'deferredNotification');
312/* 310/*
313_clipperz_notificationCenter_defaultNotificationCenter = null; 311_clipperz_notificationCenter_defaultNotificationCenter = null;
314 312
315Clipperz.NotificationCenter.defaultNotificationCenter = function() { 313Clipperz.NotificationCenter.defaultNotificationCenter = function() {
316 if (_clipperz_notificationCenter_defaultNotificationCenter == null) { 314 if (_clipperz_notificationCenter_defaultNotificationCenter == null) {
317 _clipperz_notificationCenter_defaultNotificationCenter = new Clipperz.NotificationCenter(); 315 _clipperz_notificationCenter_defaultNotificationCenter = new Clipperz.NotificationCenter();
318 } 316 }
319 317
320 return _clipperz_notificationCenter_defaultNotificationCenter; 318 return _clipperz_notificationCenter_defaultNotificationCenter;
321}; 319};
322*/ 320*/
diff --git a/frontend/beta/js/Clipperz/PM/BookmarkletProcessor.js b/frontend/beta/js/Clipperz/PM/BookmarkletProcessor.js
index 83cbfe2..2295d3f 100644
--- a/frontend/beta/js/Clipperz/PM/BookmarkletProcessor.js
+++ b/frontend/beta/js/Clipperz/PM/BookmarkletProcessor.js
@@ -1,285 +1,283 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28//if (typeof(Clipperz.PM.BookmarkletProcessor) == 'undefined') { Clipperz.PM.BookmarkletProcessor = {}; } 26//if (typeof(Clipperz.PM.BookmarkletProcessor) == 'undefined') { Clipperz.PM.BookmarkletProcessor = {}; }
29//if (typeof(Clipperz.PM.BookmarkletProcessor.versions) == 'undefined') { Clipperz.PM.BookmarkletProcessor.versions = {}; } 27//if (typeof(Clipperz.PM.BookmarkletProcessor.versions) == 'undefined') { Clipperz.PM.BookmarkletProcessor.versions = {}; }
30 28
31/* 29/*
32Clipperz.PM.BookmarkletProcessor.versions['abstract'] = function(anUser, aConfiguration) { 30Clipperz.PM.BookmarkletProcessor.versions['abstract'] = function(anUser, aConfiguration) {
33 this._user = anUser; 31 this._user = anUser;
34 this._configuration = aConfiguration; 32 this._configuration = aConfiguration;
35 33
36 this._recordTitle = null; 34 this._recordTitle = null;
37 this._record = null; 35 this._record = null;
38 this._editableFields = null; 36 this._editableFields = null;
39 37
40 return this; 38 return this;
41} 39}
42 40
43 41
44Clipperz.PM.BookmarkletProcessor.versions['abstract'].prototype = MochiKit.Base.update(null, { 42Clipperz.PM.BookmarkletProcessor.versions['abstract'].prototype = MochiKit.Base.update(null, {
45 43
46 'toString': function() { 44 'toString': function() {
47 return "BookmarkletProcessor - " + this.user(); 45 return "BookmarkletProcessor - " + this.user();
48 }, 46 },
49 47
50 //------------------------------------------------------------------------- 48 //-------------------------------------------------------------------------
51 49
52 'user': function() { 50 'user': function() {
53 return this._user; 51 return this._user;
54 }, 52 },
55 53
56 //------------------------------------------------------------------------- 54 //-------------------------------------------------------------------------
57 55
58 'configuration': function() { 56 'configuration': function() {
59 return this._configuration; 57 return this._configuration;
60 }, 58 },
61 59
62 //------------------------------------------------------------------------- 60 //-------------------------------------------------------------------------
63 61
64 'record': function() { 62 'record': function() {
65 throw Clipperz.Base.exception.AbstractMethod; 63 throw Clipperz.Base.exception.AbstractMethod;
66 }, 64 },
67 65
68 //------------------------------------------------------------------------- 66 //-------------------------------------------------------------------------
69 __syntaxFix__: "syntax fix" 67 __syntaxFix__: "syntax fix"
70}); 68});
71*/ 69*/
72 70
73Clipperz.PM.BookmarkletProcessor = function(anUser, aConfiguration) { 71Clipperz.PM.BookmarkletProcessor = function(anUser, aConfiguration) {
74 this._user = anUser; 72 this._user = anUser;
75 this._configuration = aConfiguration; 73 this._configuration = aConfiguration;
76 74
77 this._recordTitle = null; 75 this._recordTitle = null;
78 this._record = null; 76 this._record = null;
79 this._editableFields = null; 77 this._editableFields = null;
80 this._favicon = null; 78 this._favicon = null;
81 79
82 return this; 80 return this;
83} 81}
84 82
85Clipperz.PM.BookmarkletProcessor.prototype = MochiKit.Base.update(null, { 83Clipperz.PM.BookmarkletProcessor.prototype = MochiKit.Base.update(null, {
86 84
87 'toString': function() { 85 'toString': function() {
88 return "BookmarkletProcessor - " + this.user(); 86 return "BookmarkletProcessor - " + this.user();
89 }, 87 },
90 88
91 //------------------------------------------------------------------------- 89 //-------------------------------------------------------------------------
92 90
93 'user': function() { 91 'user': function() {
94 return this._user; 92 return this._user;
95 }, 93 },
96 94
97 //------------------------------------------------------------------------- 95 //-------------------------------------------------------------------------
98 96
99 'configuration': function() { 97 'configuration': function() {
100 return this._configuration; 98 return this._configuration;
101 }, 99 },
102 100
103 //------------------------------------------------------------------------- 101 //-------------------------------------------------------------------------
104 102
105 'recordTitle': function() { 103 'recordTitle': function() {
106 if (this._recordTitle == null) { 104 if (this._recordTitle == null) {
107 this._recordTitle = this.configuration().page.title; 105 this._recordTitle = this.configuration().page.title;
108 } 106 }
109 107
110 return this._recordTitle; 108 return this._recordTitle;
111 }, 109 },
112 110
113 //------------------------------------------------------------------------- 111 //-------------------------------------------------------------------------
114 112
115 'fields': function() { 113 'fields': function() {
116 return this.configuration().form.inputs; 114 return this.configuration().form.inputs;
117 }, 115 },
118 116
119 //------------------------------------------------------------------------- 117 //-------------------------------------------------------------------------
120 118
121 'editableFields': function() { 119 'editableFields': function() {
122 if (this._editableFields == null) { 120 if (this._editableFields == null) {
123 this._editableFields = MochiKit.Base.filter(function(aField) { 121 this._editableFields = MochiKit.Base.filter(function(aField) {
124 var result; 122 var result;
125 var type; 123 var type;
126 124
127 type = aField['type'].toLowerCase(); 125 type = aField['type'].toLowerCase();
128 result = ((type != 'hidden') && (type != 'submit') && (type != 'checkbox') && (type != 'radio') && (type != 'select')); 126 result = ((type != 'hidden') && (type != 'submit') && (type != 'checkbox') && (type != 'radio') && (type != 'select'));
129 127
130 return result; 128 return result;
131 }, this.fields()) 129 }, this.fields())
132 } 130 }
133 131
134 return this._editableFields; 132 return this._editableFields;
135 }, 133 },
136 134
137 //------------------------------------------------------------------------- 135 //-------------------------------------------------------------------------
138 136
139 'hostname': function() { 137 'hostname': function() {
140 if (this._hostname == null) { 138 if (this._hostname == null) {
141 var actionUrl; 139 var actionUrl;
142 140
143 actionUrl = this.configuration()['form']['attributes']['action']; 141 actionUrl = this.configuration()['form']['attributes']['action'];
144//MochiKit.Logging.logDebug("+++ actionUrl: " + actionUrl); 142//MochiKit.Logging.logDebug("+++ actionUrl: " + actionUrl);
145 this._hostname = actionUrl.replace(/^https?:\/\/([^\/]*)\/.*/, '$1'); 143 this._hostname = actionUrl.replace(/^https?:\/\/([^\/]*)\/.*/, '$1');
146 } 144 }
147 145
148 return this._hostname; 146 return this._hostname;
149 }, 147 },
150 148
151 'favicon': function() { 149 'favicon': function() {
152 if (this._favicon == null) { 150 if (this._favicon == null) {
153 this._favicon = "http://" + this.hostname() + "/favicon.ico"; 151 this._favicon = "http://" + this.hostname() + "/favicon.ico";
154//MochiKit.Logging.logDebug("+++ favicon: " + this._favicon); 152//MochiKit.Logging.logDebug("+++ favicon: " + this._favicon);
155 } 153 }
156 154
157 return this._favicon; 155 return this._favicon;
158 }, 156 },
159 157
160 //------------------------------------------------------------------------- 158 //-------------------------------------------------------------------------
161 159
162 'record': function() { 160 'record': function() {
163 if (this._record == null) { 161 if (this._record == null) {
164 var record; 162 var record;
165 var recordVersion; 163 var recordVersion;
166 var directLogin; 164 var directLogin;
167 var bindings; 165 var bindings;
168 var i,c; 166 var i,c;
169 167
170 record = new Clipperz.PM.DataModel.Record({ 168 record = new Clipperz.PM.DataModel.Record({
171 label:this.recordTitle(), 169 label:this.recordTitle(),
172 notes:"", 170 notes:"",
173 user:this.user() 171 user:this.user()
174 }); 172 });
175 recordVersion = new Clipperz.PM.DataModel.RecordVersion(record, {}) 173 recordVersion = new Clipperz.PM.DataModel.RecordVersion(record, {})
176 record.setCurrentVersion(recordVersion); 174 record.setCurrentVersion(recordVersion);
177 175
178 bindings = {}; 176 bindings = {};
179 177
180 c = this.editableFields().length; 178 c = this.editableFields().length;
181 for (i=0; i<c; i++) { 179 for (i=0; i<c; i++) {
182 var formField; 180 var formField;
183 var recordField; 181 var recordField;
184 182
185//MochiKit.Logging.logDebug(">>> adding a field"); 183//MochiKit.Logging.logDebug(">>> adding a field");
186 formField = this.editableFields()[i]; 184 formField = this.editableFields()[i];
187 recordField = new Clipperz.PM.DataModel.RecordField({ 185 recordField = new Clipperz.PM.DataModel.RecordField({
188 recordVersion:recordVersion, 186 recordVersion:recordVersion,
189 label:formField['name'], 187 label:formField['name'],
190 value:formField['value'], 188 value:formField['value'],
191 type:Clipperz.PM.Strings.inputTypeToRecordFieldType[formField['type']], 189 type:Clipperz.PM.Strings.inputTypeToRecordFieldType[formField['type']],
192 hidden:false 190 hidden:false
193 }); 191 });
194 recordVersion.addField(recordField); 192 recordVersion.addField(recordField);
195 193
196 bindings[formField['name']] = recordField.key(); 194 bindings[formField['name']] = recordField.key();
197//MochiKit.Logging.logDebug("<<< adding a field"); 195//MochiKit.Logging.logDebug("<<< adding a field");
198 } 196 }
199 197
200 directLogin = new Clipperz.PM.DataModel.DirectLogin({ 198 directLogin = new Clipperz.PM.DataModel.DirectLogin({
201 record:record, 199 record:record,
202 label:this.recordTitle() + Clipperz.PM.Strings['newDirectLoginLabelSuffix'], 200 label:this.recordTitle() + Clipperz.PM.Strings['newDirectLoginLabelSuffix'],
203 // bookmarkletVersion:this.version(), 201 // bookmarkletVersion:this.version(),
204 bookmarkletVersion:'0.2', 202 bookmarkletVersion:'0.2',
205 favicon:this.favicon(), 203 favicon:this.favicon(),
206 formData:this.configuration()['form'], 204 formData:this.configuration()['form'],
207 bindingData:bindings 205 bindingData:bindings
208 }); 206 });
209 record.addDirectLogin(directLogin); 207 record.addDirectLogin(directLogin);
210 208
211 this.user().addRecord(record); 209 this.user().addRecord(record);
212 210
213 this._record = record; 211 this._record = record;
214 } 212 }
215 213
216 return this._record; 214 return this._record;
217 }, 215 },
218 216
219 //------------------------------------------------------------------------- 217 //-------------------------------------------------------------------------
220 __syntaxFix__: "syntax fix" 218 __syntaxFix__: "syntax fix"
221}); 219});
222 220
223//############################################################################# 221//#############################################################################
224 222
225Clipperz.PM.BookmarkletProcessor.createRecordFromBookmarkletConfiguration = function(anUser, aConfiguration) { 223Clipperz.PM.BookmarkletProcessor.createRecordFromBookmarkletConfiguration = function(anUser, aConfiguration) {
226 var processor; 224 var processor;
227 225
228 processor = new Clipperz.PM.BookmarkletProcessor(anUser, aConfiguration); 226 processor = new Clipperz.PM.BookmarkletProcessor(anUser, aConfiguration);
229 227
230 return processor.record(); 228 return processor.record();
231}; 229};
232 230
233//----------------------------------------------------------------------------- 231//-----------------------------------------------------------------------------
234 232
235Clipperz.PM.BookmarkletProcessor.sanitizeBookmarkletConfiguration = function(aConfiguration) { 233Clipperz.PM.BookmarkletProcessor.sanitizeBookmarkletConfiguration = function(aConfiguration) {
236 var result; 234 var result;
237 235
238 //throw "XSS Bookmarklet attempt"; 236 //throw "XSS Bookmarklet attempt";
239 237
240 result = aConfiguration; 238 result = aConfiguration;
241 239
242 return result; 240 return result;
243}; 241};
244 242
245//----------------------------------------------------------------------------- 243//-----------------------------------------------------------------------------
246 244
247Clipperz.PM.BookmarkletProcessor.checkBookmarkletConfiguration = function(aConfiguration, aButton, aCallback) { 245Clipperz.PM.BookmarkletProcessor.checkBookmarkletConfiguration = function(aConfiguration, aButton, aCallback) {
248 var result; 246 var result;
249 247
250 try { 248 try {
251 result = Clipperz.Base.evalJSON(aConfiguration); 249 result = Clipperz.Base.evalJSON(aConfiguration);
252 result = Clipperz.PM.BookmarkletProcessor.sanitizeBookmarkletConfiguration(result); 250 result = Clipperz.PM.BookmarkletProcessor.sanitizeBookmarkletConfiguration(result);
253 251
254 if (result['version'] != '0.2.3') { 252 if (result['version'] != '0.2.3') {
255 throw "WrongBookmarkletVersion"; 253 throw "WrongBookmarkletVersion";
256 } 254 }
257 } catch (exception) { 255 } catch (exception) {
258 var title; 256 var title;
259 var message; 257 var message;
260 258
261 if (exception == "WrongBookmarkletVersion") { 259 if (exception == "WrongBookmarkletVersion") {
262 title = Clipperz.PM.Strings['newRecordPanelWrongBookmarkletVersionExceptionTitle']; 260 title = Clipperz.PM.Strings['newRecordPanelWrongBookmarkletVersionExceptionTitle'];
263 message = Clipperz.PM.Strings['newRecordPanelWrongBookmarkletVersionExceptionMessage']; 261 message = Clipperz.PM.Strings['newRecordPanelWrongBookmarkletVersionExceptionMessage'];
264 } else { 262 } else {
265 title = Clipperz.PM.Strings['newRecordPanelGeneralExceptionTitle']; 263 title = Clipperz.PM.Strings['newRecordPanelGeneralExceptionTitle'];
266 message = Clipperz.PM.Strings['newRecordPanelGeneralExceptionMessage']; 264 message = Clipperz.PM.Strings['newRecordPanelGeneralExceptionMessage'];
267 } 265 }
268 Clipperz.PM.Components.MessageBox().show({ 266 Clipperz.PM.Components.MessageBox().show({
269 title:title, 267 title:title,
270 text:message, 268 text:message,
271 width:240, 269 width:240,
272 fn:aCallback, 270 fn:aCallback,
273 closable:false, 271 closable:false,
274 showProgressBar:false, 272 showProgressBar:false,
275 showCloseButton:false, 273 showCloseButton:false,
276 buttons:{'ok':Clipperz.PM.Strings['newRecordPanelExceptionPanelCloseButtonLabel']} 274 buttons:{'ok':Clipperz.PM.Strings['newRecordPanelExceptionPanelCloseButtonLabel']}
277 }, aButton); 275 }, aButton);
278 276
279 throw exception; 277 throw exception;
280 } 278 }
281 279
282 return result; 280 return result;
283}; 281};
284 282
285//----------------------------------------------------------------------------- 283//-----------------------------------------------------------------------------
diff --git a/frontend/beta/js/Clipperz/PM/Components/BaseComponent.js b/frontend/beta/js/Clipperz/PM/Components/BaseComponent.js
index f3a3902..07c0b97 100644
--- a/frontend/beta/js/Clipperz/PM/Components/BaseComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/BaseComponent.js
@@ -1,121 +1,119 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29 27
30//############################################################################# 28//#############################################################################
31 29
32var _Clipperz_PM_Components_Panels_base_id_ = 0; 30var _Clipperz_PM_Components_Panels_base_id_ = 0;
33 31
34//############################################################################# 32//#############################################################################
35 33
36Clipperz.PM.Components.BaseComponent = function(anElement, args) { 34Clipperz.PM.Components.BaseComponent = function(anElement, args) {
37 args = args || {}; 35 args = args || {};
38 //MochiKit.Base.bindMethods(this); 36 //MochiKit.Base.bindMethods(this);
39 //Clipperz.PM.Components.BaseComponent.superclass.constructor.call(this, args); 37 //Clipperz.PM.Components.BaseComponent.superclass.constructor.call(this, args);
40 38
41 this._element = anElement; 39 this._element = anElement;
42 this._ids = {}; 40 this._ids = {};
43 41
44 return this; 42 return this;
45} 43}
46 44
47//============================================================================= 45//=============================================================================
48 46
49//MochiKit.Base.update(Clipperz.PM.Components.BaseComponent.prototype, { 47//MochiKit.Base.update(Clipperz.PM.Components.BaseComponent.prototype, {
50YAHOO.extendX(Clipperz.PM.Components.BaseComponent, YAHOO.ext.util.Observable, { 48YAHOO.extendX(Clipperz.PM.Components.BaseComponent, YAHOO.ext.util.Observable, {
51 49
52 'isClipperzPMComponent': true, 50 'isClipperzPMComponent': true,
53 51
54 //------------------------------------------------------------------------- 52 //-------------------------------------------------------------------------
55 53
56 'toString': function () { 54 'toString': function () {
57 return "Clipperz.PM.Components.BaseComponent component"; 55 return "Clipperz.PM.Components.BaseComponent component";
58 }, 56 },
59 57
60 //------------------------------------------------------------------------- 58 //-------------------------------------------------------------------------
61 59
62 'domHelper': function() { 60 'domHelper': function() {
63 return Clipperz.YUI.DomHelper; 61 return Clipperz.YUI.DomHelper;
64 }, 62 },
65 63
66 //------------------------------------------------------------------------- 64 //-------------------------------------------------------------------------
67 65
68 'element': function() { 66 'element': function() {
69//MochiKit.Logging.logDebug(">>> BaseComponent.element"); 67//MochiKit.Logging.logDebug(">>> BaseComponent.element");
70 return this._element; 68 return this._element;
71 }, 69 },
72 70
73 'setElement': function(aValue) { 71 'setElement': function(aValue) {
74 this._element = aValue; 72 this._element = aValue;
75 }, 73 },
76 74
77 //----------------------------------------------------- 75 //-----------------------------------------------------
78 76
79 'remove': function() { 77 'remove': function() {
80//MochiKit.Logging.logDebug(">>> BaseComponent.remove"); 78//MochiKit.Logging.logDebug(">>> BaseComponent.remove");
81 Clipperz.NotificationCenter.unregister(this); 79 Clipperz.NotificationCenter.unregister(this);
82 MochiKit.Signal.disconnectAllTo(this); 80 MochiKit.Signal.disconnectAllTo(this);
83//MochiKit.Logging.logDebug("<<< BaseComponent.remove"); 81//MochiKit.Logging.logDebug("<<< BaseComponent.remove");
84 }, 82 },
85 83
86 //------------------------------------------------------------------------- 84 //-------------------------------------------------------------------------
87 85
88 'getId': function(aValue) { 86 'getId': function(aValue) {
89 varresult; 87 varresult;
90 88
91 result = this._ids[aValue]; 89 result = this._ids[aValue];
92 90
93 if (typeof(result) == 'undefined') { 91 if (typeof(result) == 'undefined') {
94 _Clipperz_PM_Components_Panels_base_id_ ++; 92 _Clipperz_PM_Components_Panels_base_id_ ++;
95 93
96 result = "Clipperz_PM_Components_Panels_" + aValue + "_" + _Clipperz_PM_Components_Panels_base_id_; 94 result = "Clipperz_PM_Components_Panels_" + aValue + "_" + _Clipperz_PM_Components_Panels_base_id_;
97 this._ids[aValue] = result; 95 this._ids[aValue] = result;
98//MochiKit.Logging.logDebug(">>> getId(" + aValue + ") = " + result); 96//MochiKit.Logging.logDebug(">>> getId(" + aValue + ") = " + result);
99 } else { 97 } else {
100//MochiKit.Logging.logDebug("<<< getId(" + aValue + ") = " + result); 98//MochiKit.Logging.logDebug("<<< getId(" + aValue + ") = " + result);
101 } 99 }
102 100
103 return result; 101 return result;
104 }, 102 },
105 103
106 'getDom': function(aValue) { 104 'getDom': function(aValue) {
107 return YAHOO.util.Dom.get(this.getId(aValue)); 105 return YAHOO.util.Dom.get(this.getId(aValue));
108 }, 106 },
109 107
110 'getElement': function(aValue) { 108 'getElement': function(aValue) {
111 return YAHOO.ext.Element.get(this.getId(aValue)); 109 return YAHOO.ext.Element.get(this.getId(aValue));
112 }, 110 },
113 111
114 'getActor': function(aValue, anAnimator) { 112 'getActor': function(aValue, anAnimator) {
115 return new YAHOO.ext.Actor(this.getDom(aValue), anAnimator); 113 return new YAHOO.ext.Actor(this.getDom(aValue), anAnimator);
116 }, 114 },
117 115
118 //------------------------------------------------------------------------- 116 //-------------------------------------------------------------------------
119 __syntaxFix__: "syntax fix" 117 __syntaxFix__: "syntax fix"
120 118
121}); 119});
diff --git a/frontend/beta/js/Clipperz/PM/Components/Compact/CompactHeader.js b/frontend/beta/js/Clipperz/PM/Components/Compact/CompactHeader.js
index 7a3b3a3..14e42a5 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Compact/CompactHeader.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Compact/CompactHeader.js
@@ -1,83 +1,81 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; } 27if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; }
30 28
31Clipperz.PM.Components.Compact.CompactHeader = function(anElement, args) { 29Clipperz.PM.Components.Compact.CompactHeader = function(anElement, args) {
32 30
33 Clipperz.PM.Components.Compact.CompactHeader.superclass.constructor.call(this, anElement, args); 31 Clipperz.PM.Components.Compact.CompactHeader.superclass.constructor.call(this, anElement, args);
34 32
35 this.render(); 33 this.render();
36 34
37 return this; 35 return this;
38}; 36};
39 37
40YAHOO.extendX(Clipperz.PM.Components.Compact.CompactHeader, Clipperz.PM.Components.BaseComponent, { 38YAHOO.extendX(Clipperz.PM.Components.Compact.CompactHeader, Clipperz.PM.Components.BaseComponent, {
41 39
42 'toString': function() { 40 'toString': function() {
43 return "Clipperz.PM.Components.Compact.CompactHeader"; 41 return "Clipperz.PM.Components.Compact.CompactHeader";
44 }, 42 },
45 43
46 //----------------------------------------------------- 44 //-----------------------------------------------------
47 45
48 'render': function() { 46 'render': function() {
49 this.element().update(""); 47 this.element().update("");
50 48
51 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', children:[ 49 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', children:[
52 {tag:'img', src:'./images/logo.gif'}, 50 {tag:'img', src:'./images/logo.gif'},
53 {tag:'div', id:'lockBlock', children:[ 51 {tag:'div', id:'lockBlock', children:[
54 {tag:'input', type:'checkbox', id:'autolock'}, 52 {tag:'input', type:'checkbox', id:'autolock'},
55 {tag:'span', html:'auto'}, 53 {tag:'span', html:'auto'},
56 {tag:'a', href:'#', htmlString:Clipperz.PM.Strings['lockMenuLabel'], id:'lock'} 54 {tag:'a', href:'#', htmlString:Clipperz.PM.Strings['lockMenuLabel'], id:'lock'}
57 ]} 55 ]}
58 ]}); 56 ]});
59 57
60 Clipperz.YUI.DomHelper.append(this.element().dom, 58 Clipperz.YUI.DomHelper.append(this.element().dom,
61 {tag:'div', id:'compactMiscLinks', children:[ 59 {tag:'div', id:'compactMiscLinks', children:[
62 {tag:'a', id:'donateHeaderIconLink', target:'_blank', href:Clipperz.PM.Strings['donateHeaderLinkUrl'], children:[ 60 {tag:'a', id:'donateHeaderIconLink', target:'_blank', href:Clipperz.PM.Strings['donateHeaderLinkUrl'], children:[
63 {tag:'img', id:'donateHeaderLinkIcon', src:'./images/smiles_small.gif'} 61 {tag:'img', id:'donateHeaderLinkIcon', src:'./images/smiles_small.gif'}
64 ]}, 62 ]},
65 {tag:'ul', children:[ 63 {tag:'ul', children:[
66 {tag:'li', children:[{tag:'a', id:'donateHeaderLink', html:'donate', target:'_blank'}]}, 64 {tag:'li', children:[{tag:'a', id:'donateHeaderLink', html:'donate', target:'_blank'}]},
67 {tag:'li', children:[{tag:'a', id:'creditsHeaderLink', html:'credits', target:'_blank'}]}, 65 {tag:'li', children:[{tag:'a', id:'creditsHeaderLink', html:'credits', target:'_blank'}]},
68 {tag:'li', children:[{tag:'a', id:'feedbackHeaderLink', html:'feedback', target:'_blank'}]}, 66 {tag:'li', children:[{tag:'a', id:'feedbackHeaderLink', html:'feedback', target:'_blank'}]},
69 {tag:'li', children:[{tag:'a', id:'helpHeaderLink', html:'help', target:'_blank'}]}, 67 {tag:'li', children:[{tag:'a', id:'helpHeaderLink', html:'help', target:'_blank'}]},
70 {tag:'li', children:[{tag:'a', id:'forumHeaderLink', html:'forum', target:'_blank'}]} 68 {tag:'li', children:[{tag:'a', id:'forumHeaderLink', html:'forum', target:'_blank'}]}
71 ]} 69 ]}
72 ]} 70 ]}
73 ); 71 );
74 72
75 YAHOO.ext.Element.get('lockBlock').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 73 YAHOO.ext.Element.get('lockBlock').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
76 Clipperz.NotificationCenter.notify(this, 'switchLanguage'); 74 Clipperz.NotificationCenter.notify(this, 'switchLanguage');
77 }, 75 },
78 76
79 //----------------------------------------------------- 77 //-----------------------------------------------------
80 __syntaxFix__: '__syntaxFix__' 78 __syntaxFix__: '__syntaxFix__'
81}); 79});
82 80
83 81
diff --git a/frontend/beta/js/Clipperz/PM/Components/Compact/CompactInterface.js b/frontend/beta/js/Clipperz/PM/Components/Compact/CompactInterface.js
index 0f6858a..1312967 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Compact/CompactInterface.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Compact/CompactInterface.js
@@ -1,309 +1,307 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; } 27if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; }
30 28
31Clipperz.PM.Components.Compact.CompactInterface = function(anElement, args) { 29Clipperz.PM.Components.Compact.CompactInterface = function(anElement, args) {
32 30
33 Clipperz.PM.Components.Compact.CompactInterface.superclass.constructor.call(this, anElement, args); 31 Clipperz.PM.Components.Compact.CompactInterface.superclass.constructor.call(this, anElement, args);
34 32
35 this._directLoginItemTemplate = null; 33 this._directLoginItemTemplate = null;
36 this._user = args.user; 34 this._user = args.user;
37 this._autoLockTimer = null; 35 this._autoLockTimer = null;
38 36
39 Clipperz.NotificationCenter.register(null, 'updatedProgressState', this, 'userNotificationHandler') 37 Clipperz.NotificationCenter.register(null, 'updatedProgressState', this, 'userNotificationHandler')
40 Clipperz.NotificationCenter.register(null, 'directLoginAdded', this, 'directLoginAddedHandler'); 38 Clipperz.NotificationCenter.register(null, 'directLoginAdded', this, 'directLoginAddedHandler');
41 39
42 this.render(); 40 this.render();
43 41
44 return this; 42 return this;
45}; 43};
46 44
47YAHOO.extendX(Clipperz.PM.Components.Compact.CompactInterface, Clipperz.PM.Components.BaseComponent, { 45YAHOO.extendX(Clipperz.PM.Components.Compact.CompactInterface, Clipperz.PM.Components.BaseComponent, {
48 46
49 'toString': function() { 47 'toString': function() {
50 return "Clipperz.PM.Components.Compact.CompactInterface"; 48 return "Clipperz.PM.Components.Compact.CompactInterface";
51 }, 49 },
52 50
53 //----------------------------------------------------- 51 //-----------------------------------------------------
54 52
55 'render': function() { 53 'render': function() {
56 var result; 54 var result;
57 varlayout; 55 varlayout;
58 var registerButton; 56 var registerButton;
59 57
60//MochiKit.Logging.logDebug(">>> CompactInterface.render"); 58//MochiKit.Logging.logDebug(">>> CompactInterface.render");
61 this.element().update(""); 59 this.element().update("");
62 60
63 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', children:[ 61 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', children:[
64 {tag:'div', id:this.getId('cantentPanel'), children:[ 62 {tag:'div', id:this.getId('cantentPanel'), children:[
65 {tag:'h4', id:this.getId('message')}, 63 {tag:'h4', id:this.getId('message')},
66 {tag:'ul', id:'directLogins', children:[]} 64 {tag:'ul', id:'directLogins', children:[]}
67 ]}, 65 ]},
68 {tag:'div', id:this.getId('lockPanel'), cls:'lockPanel', children:[ 66 {tag:'div', id:this.getId('lockPanel'), cls:'lockPanel', children:[
69 {tag:'div', htmlString:Clipperz.PM.Strings['lockDescription']}, 67 {tag:'div', htmlString:Clipperz.PM.Strings['lockDescription']},
70 {tag:'form', id:'lockDialogForm', children:[ 68 {tag:'form', id:'lockDialogForm', children:[
71 {tag:'input', type:'password', id:this.getId('lockPassphrase')} 69 {tag:'input', type:'password', id:this.getId('lockPassphrase')}
72 ]}, 70 ]},
73 {tag:'div', id:this.getId('unlock')} 71 {tag:'div', id:this.getId('unlock')}
74 ]} 72 ]}
75 ]}); 73 ]});
76 74
77 this.getElement('lockPanel').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 75 this.getElement('lockPanel').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
78 76
79 YAHOO.ext.Element.get('lockBlock').show(); 77 YAHOO.ext.Element.get('lockBlock').show();
80 MochiKit.Signal.connect(YAHOO.ext.Element.get('lock').dom, 'onclick', this, 'doLockEventHandler'); 78 MochiKit.Signal.connect(YAHOO.ext.Element.get('lock').dom, 'onclick', this, 'doLockEventHandler');
81 new YAHOO.ext.Button(this.getId('unlock'), {text:Clipperz.PM.Strings['unlockButtonLabel'], handler:this.doUnlockEventHandler, scope:this, minWidth:0}); 79 new YAHOO.ext.Button(this.getId('unlock'), {text:Clipperz.PM.Strings['unlockButtonLabel'], handler:this.doUnlockEventHandler, scope:this, minWidth:0});
82 this.getElement('unlock').swallowEvent('click', true); 80 this.getElement('unlock').swallowEvent('click', true);
83 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('lockPassphrase')); 81 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('lockPassphrase'));
84 MochiKit.Signal.connect('lockDialogForm', 'onsubmit', this, 'doUnlockEventHandler'); 82 MochiKit.Signal.connect('lockDialogForm', 'onsubmit', this, 'doUnlockEventHandler');
85 83
86 this.getElement('cantentPanel').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 84 this.getElement('cantentPanel').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
87//MochiKit.Logging.logDebug("<<< CompactInterface.render"); 85//MochiKit.Logging.logDebug("<<< CompactInterface.render");
88 86
89 return result; 87 return result;
90 }, 88 },
91 89
92 //----------------------------------------------------- 90 //-----------------------------------------------------
93 91
94 'directLoginAddedHandler': function(anEvent) { 92 'directLoginAddedHandler': function(anEvent) {
95 this.redrawDirectLoginItems(); 93 this.redrawDirectLoginItems();
96 }, 94 },
97 95
98 //----------------------------------------------------- 96 //-----------------------------------------------------
99 97
100 'compareDirectLogins': function(a, b) { 98 'compareDirectLogins': function(a, b) {
101 return MochiKit.Base.compare(a.label().toLowerCase(), b.label().toLowerCase()); 99 return MochiKit.Base.compare(a.label().toLowerCase(), b.label().toLowerCase());
102 }, 100 },
103 101
104 //----------------------------------------------------- 102 //-----------------------------------------------------
105 103
106 'redrawDirectLoginItems': function() { 104 'redrawDirectLoginItems': function() {
107 var template; 105 var template;
108 var allDirectLogins; 106 var allDirectLogins;
109 107
110 this.getElement('message').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 108 this.getElement('message').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
111//MochiKit.Logging.logDebug(">>> CompactInterface.redrawDirectLoginItems"); 109//MochiKit.Logging.logDebug(">>> CompactInterface.redrawDirectLoginItems");
112//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 0"); 110//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 0");
113 MochiKit.Iter.forEach(YAHOO.ext.Element.get('directLogins').getChildrenByTagName('li'), function(aDirectLoginElement) { 111 MochiKit.Iter.forEach(YAHOO.ext.Element.get('directLogins').getChildrenByTagName('li'), function(aDirectLoginElement) {
114 MochiKit.Signal.disconnectAll(aDirectLoginElement.dom); 112 MochiKit.Signal.disconnectAll(aDirectLoginElement.dom);
115//MochiKit.Logging.logDebug("disconnecting IMG " + aDirectLoginElement.getChildrenByTagName('img')[0].dom.src); 113//MochiKit.Logging.logDebug("disconnecting IMG " + aDirectLoginElement.getChildrenByTagName('img')[0].dom.src);
116 MochiKit.Signal.disconnectAll(aDirectLoginElement.getChildrenByTagName('img')[0].dom); 114 MochiKit.Signal.disconnectAll(aDirectLoginElement.getChildrenByTagName('img')[0].dom);
117 }) 115 })
118//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 1"); 116//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 1");
119 YAHOO.ext.Element.get('directLogins').update(""); 117 YAHOO.ext.Element.get('directLogins').update("");
120//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 2"); 118//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 2");
121 allDirectLogins = MochiKit.Base.values(this.user().directLoginReferences()); 119 allDirectLogins = MochiKit.Base.values(this.user().directLoginReferences());
122//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 3"); 120//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 3");
123 allDirectLogins.sort(this.compareDirectLogins); 121 allDirectLogins.sort(this.compareDirectLogins);
124 122
125//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 4"); 123//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 4");
126 template = this.directLoginItemTemplate(); 124 template = this.directLoginItemTemplate();
127//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 5"); 125//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 5");
128 MochiKit.Iter.forEach(allDirectLogins, MochiKit.Base.bind(function(aDirectLogin) { 126 MochiKit.Iter.forEach(allDirectLogins, MochiKit.Base.bind(function(aDirectLogin) {
129 vardirectLoginElement; 127 vardirectLoginElement;
130 varfaviconImageElementID; 128 varfaviconImageElementID;
131 129
132 faviconImageElementID = aDirectLogin.reference() + "_faviconIMG"; 130 faviconImageElementID = aDirectLogin.reference() + "_faviconIMG";
133 directLoginElement = template.append('directLogins', { 131 directLoginElement = template.append('directLogins', {
134 elementID:faviconImageElementID, 132 elementID:faviconImageElementID,
135 faviconUrl:aDirectLogin.fixedFavicon(), 133 faviconUrl:aDirectLogin.fixedFavicon(),
136 directLoginTitle:aDirectLogin.label(), 134 directLoginTitle:aDirectLogin.label(),
137 directLoginReference:aDirectLogin.reference() 135 directLoginReference:aDirectLogin.reference()
138 }, true); 136 }, true);
139//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 6: " + recordElement.dom); 137//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 6: " + recordElement.dom);
140 directLoginElement.addClassOnOver("hover"); 138 directLoginElement.addClassOnOver("hover");
141 MochiKit.Signal.connect(directLoginElement.dom, 'onclick', this, 'handleDirectLoginClick'); 139 MochiKit.Signal.connect(directLoginElement.dom, 'onclick', this, 'handleDirectLoginClick');
142 140
143 MochiKit.Signal.connect(faviconImageElementID, 'onload', this, 'handleLoadedFaviconImage'); 141 MochiKit.Signal.connect(faviconImageElementID, 'onload', this, 'handleLoadedFaviconImage');
144 MochiKit.Signal.connect(faviconImageElementID, 'onerror', aDirectLogin, 'handleMissingFaviconImage'); 142 MochiKit.Signal.connect(faviconImageElementID, 'onerror', aDirectLogin, 'handleMissingFaviconImage');
145 MochiKit.Signal.connect(faviconImageElementID, 'onabort', aDirectLogin, 'handleMissingFaviconImage'); 143 MochiKit.Signal.connect(faviconImageElementID, 'onabort', aDirectLogin, 'handleMissingFaviconImage');
146 144
147 // YAHOO.ext.Element.get(faviconImageElementID).dom.src = aDirectLogin.fixedFavicon(); 145 // YAHOO.ext.Element.get(faviconImageElementID).dom.src = aDirectLogin.fixedFavicon();
148 }, this)); 146 }, this));
149 147
150 this.resetAutoLockTimer(); 148 this.resetAutoLockTimer();
151//MochiKit.Logging.logDebug("<<< CompactInterface.redrawDirectLoginItems"); 149//MochiKit.Logging.logDebug("<<< CompactInterface.redrawDirectLoginItems");
152 }, 150 },
153 151
154 //----------------------------------------------------- 152 //-----------------------------------------------------
155 153
156 'directLoginItemTemplate': function() { 154 'directLoginItemTemplate': function() {
157 if (this._directLoginItemTemplate == null) { 155 if (this._directLoginItemTemplate == null) {
158 this._directLoginItemTemplate = Clipperz.YUI.DomHelper.createTemplate({tag:'li', id:'{directLoginReference}', children:[ 156 this._directLoginItemTemplate = Clipperz.YUI.DomHelper.createTemplate({tag:'li', id:'{directLoginReference}', children:[
159 {tag:'table', border:'0', cellpadding:'0', cellspacing:'0', children:[ 157 {tag:'table', border:'0', cellpadding:'0', cellspacing:'0', children:[
160 {tag:'tbody', children:[ 158 {tag:'tbody', children:[
161 {tag:'tr', children:[ 159 {tag:'tr', children:[
162 {tag:'td', width:'20', align:'center', valign:'top', children:[ 160 {tag:'td', width:'20', align:'center', valign:'top', children:[
163 {tag:'img', id:'{elementID}', src:'{faviconUrl}'} 161 {tag:'img', id:'{elementID}', src:'{faviconUrl}'}
164 ]}, 162 ]},
165 {tag:'td', valign:'top', children:[ 163 {tag:'td', valign:'top', children:[
166 {tag:'a', cls:'directLoginItemTitle', html:'{directLoginTitle}'} 164 {tag:'a', cls:'directLoginItemTitle', html:'{directLoginTitle}'}
167 ]} 165 ]}
168 ]} 166 ]}
169 ]} 167 ]}
170 ]} 168 ]}
171 ]}); 169 ]});
172 this._directLoginItemTemplate.compile(); 170 this._directLoginItemTemplate.compile();
173 } 171 }
174 172
175 return this._directLoginItemTemplate; 173 return this._directLoginItemTemplate;
176 }, 174 },
177 175
178 //------------------------------------------------------------------------- 176 //-------------------------------------------------------------------------
179 177
180 'handleDirectLoginClick': function(anEvent) { 178 'handleDirectLoginClick': function(anEvent) {
181 vardirectLoginReference; 179 vardirectLoginReference;
182//MochiKit.Logging.logDebug(">>> MainPanel.handleDirectLoginClick !!!"); 180//MochiKit.Logging.logDebug(">>> MainPanel.handleDirectLoginClick !!!");
183 181
184 directLoginReference = this.user().directLoginReferences()[anEvent.src().id]; 182 directLoginReference = this.user().directLoginReferences()[anEvent.src().id];
185 this.openDirectLogin(directLoginReference); 183 this.openDirectLogin(directLoginReference);
186 this.resetAutoLockTimer(); 184 this.resetAutoLockTimer();
187 //MochiKit.Logging.logDebug("<<< MainPanel.handleDirectLoginClick"); 185 //MochiKit.Logging.logDebug("<<< MainPanel.handleDirectLoginClick");
188 }, 186 },
189 187
190 //----------------------------------------------------- 188 //-----------------------------------------------------
191 189
192 'openDirectLogin': function(aDirectLoginReference) { 190 'openDirectLogin': function(aDirectLoginReference) {
193 vardeferredResult; 191 vardeferredResult;
194 varnewWindow; 192 varnewWindow;
195 193
196//MochiKit.Logging.logDebug(">>> MainPanel.openDirectLogin - " + aDirectLoginReference.label()); 194//MochiKit.Logging.logDebug(">>> MainPanel.openDirectLogin - " + aDirectLoginReference.label());
197 deferredResult = new MochiKit.Async.Deferred(); 195 deferredResult = new MochiKit.Async.Deferred();
198//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.openDirectLogin - 1: " + res); return res;}); 196//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.openDirectLogin - 1: " + res); return res;});
199 deferredResult.addCallback(MochiKit.Base.method(aDirectLoginReference, 'setupJumpPageWindow')); 197 deferredResult.addCallback(MochiKit.Base.method(aDirectLoginReference, 'setupJumpPageWindow'));
200 deferredResult.addCallback(MochiKit.Base.method(aDirectLoginReference, 'deferredDirectLogin')); 198 deferredResult.addCallback(MochiKit.Base.method(aDirectLoginReference, 'deferredDirectLogin'));
201 deferredResult.addCallback(function(aDirectLogin) { 199 deferredResult.addCallback(function(aDirectLogin) {
202 aDirectLogin.runDirectLogin(newWindow); 200 aDirectLogin.runDirectLogin(newWindow);
203 }); 201 });
204 202
205 newWindow = window.open(Clipperz.PM.Strings['directLoginJumpPageUrl'], ""); 203 newWindow = window.open(Clipperz.PM.Strings['directLoginJumpPageUrl'], "");
206 // MochiKit.Signal.connect(newWindow, 'onload', MochiKit.Base.method(deferredResult, 'callback', newWindow)) 204 // MochiKit.Signal.connect(newWindow, 'onload', MochiKit.Base.method(deferredResult, 'callback', newWindow))
207 // MochiKit.Signal.connect(newWindow, 'onload', MochiKit.Base.partial(alert, "done")); 205 // MochiKit.Signal.connect(newWindow, 'onload', MochiKit.Base.partial(alert, "done"));
208 deferredResult.callback(newWindow); 206 deferredResult.callback(newWindow);
209//MochiKit.Logging.logDebug("<<< MainPanel.openDirectLogin"); 207//MochiKit.Logging.logDebug("<<< MainPanel.openDirectLogin");
210 }, 208 },
211 209
212 //------------------------------------------------------------------------- 210 //-------------------------------------------------------------------------
213 211
214 'handleLoadedFaviconImage': function(anEvent) { 212 'handleLoadedFaviconImage': function(anEvent) {
215//MochiKit.Logging.logDebug(">>> MainPanel.handleLoadedFaviconImage"); 213//MochiKit.Logging.logDebug(">>> MainPanel.handleLoadedFaviconImage");
216 MochiKit.Signal.disconnectAll(anEvent.src()) 214 MochiKit.Signal.disconnectAll(anEvent.src())
217//MochiKit.Logging.logDebug("<<< MainPanel.handleLoadedFaviconImage"); 215//MochiKit.Logging.logDebug("<<< MainPanel.handleLoadedFaviconImage");
218 }, 216 },
219 217
220 //------------------------------------------------------------------------- 218 //-------------------------------------------------------------------------
221 219
222 'doLockEventHandler': function(anEvent) { 220 'doLockEventHandler': function(anEvent) {
223 anEvent.stop(); 221 anEvent.stop();
224 this.lock(); 222 this.lock();
225 }, 223 },
226 224
227 'doUnlockEventHandler': function(anEvent) { 225 'doUnlockEventHandler': function(anEvent) {
228 if (typeof(anEvent.stop) != 'undefined') { 226 if (typeof(anEvent.stop) != 'undefined') {
229 anEvent.stop(); 227 anEvent.stop();
230 } 228 }
231 this.unlock(); 229 this.unlock();
232 }, 230 },
233 231
234 //------------------------------------------------------------------------- 232 //-------------------------------------------------------------------------
235 233
236 'autolock': function() { 234 'autolock': function() {
237 varshouldAutoLock; 235 varshouldAutoLock;
238 236
239 shouldAutoLock = YAHOO.ext.Element.get('autolock').dom.checked; 237 shouldAutoLock = YAHOO.ext.Element.get('autolock').dom.checked;
240 238
241 if (shouldAutoLock) { 239 if (shouldAutoLock) {
242 this.lock(); 240 this.lock();
243 } else { 241 } else {
244 this.resetAutoLockTimer(); 242 this.resetAutoLockTimer();
245 } 243 }
246 }, 244 },
247 245
248 'lock': function() { 246 'lock': function() {
249//MochiKit.Logging.logDebug(">>> lock"); 247//MochiKit.Logging.logDebug(">>> lock");
250 this.getDom('lockPassphrase').value = ""; 248 this.getDom('lockPassphrase').value = "";
251 this.getElement('lockPanel').show(); 249 this.getElement('lockPanel').show();
252 this.getElement('cantentPanel').hide(); 250 this.getElement('cantentPanel').hide();
253 YAHOO.ext.Element.get('lockBlock').hide(); 251 YAHOO.ext.Element.get('lockBlock').hide();
254 //this.getElement('lockPassphrase').focus(); 252 //this.getElement('lockPassphrase').focus();
255//MochiKit.Logging.logDebug("<<< lock"); 253//MochiKit.Logging.logDebug("<<< lock");
256 }, 254 },
257 255
258 'unlock': function(anEvent) { 256 'unlock': function(anEvent) {
259//MochiKit.Logging.logDebug(">>> unlock"); 257//MochiKit.Logging.logDebug(">>> unlock");
260 if (this.getDom('lockPassphrase').value == this.user().passphrase()) { 258 if (this.getDom('lockPassphrase').value == this.user().passphrase()) {
261 this.getElement('lockPanel').hide(); 259 this.getElement('lockPanel').hide();
262 this.getElement('cantentPanel').show(); 260 this.getElement('cantentPanel').show();
263 YAHOO.ext.Element.get('lockBlock').show(); 261 YAHOO.ext.Element.get('lockBlock').show();
264 this.resetAutoLockTimer(); 262 this.resetAutoLockTimer();
265 } else { 263 } else {
266 this.getDom('lockPassphrase').value = ""; 264 this.getDom('lockPassphrase').value = "";
267 this.getElement('lockPassphrase').focus(); 265 this.getElement('lockPassphrase').focus();
268 } 266 }
269//MochiKit.Logging.logDebug("<<< unlock"); 267//MochiKit.Logging.logDebug("<<< unlock");
270 }, 268 },
271 269
272 //------------------------------------------------------------------------- 270 //-------------------------------------------------------------------------
273 271
274 'user': function() { 272 'user': function() {
275 return this._user; 273 return this._user;
276 }, 274 },
277 275
278 //----------------------------------------------------- 276 //-----------------------------------------------------
279 277
280 'autoLockTimer': function() { 278 'autoLockTimer': function() {
281 if (this._autoLockTimer == null) { 279 if (this._autoLockTimer == null) {
282//MochiKit.Logging.logDebug("--- timer started - 1"); 280//MochiKit.Logging.logDebug("--- timer started - 1");
283 this._autoLockTimer = MochiKit.Async.callLater(60, MochiKit.Base.method(this, 'autolock')); 281 this._autoLockTimer = MochiKit.Async.callLater(60, MochiKit.Base.method(this, 'autolock'));
284//MochiKit.Logging.logDebug("--- timer started - 2"); 282//MochiKit.Logging.logDebug("--- timer started - 2");
285 } 283 }
286 284
287 return this._autoLockTimer; 285 return this._autoLockTimer;
288 }, 286 },
289 287
290 'resetAutoLockTimer': function() { 288 'resetAutoLockTimer': function() {
291//MochiKit.Logging.logDebug(">>> timer resetted"); 289//MochiKit.Logging.logDebug(">>> timer resetted");
292 this.autoLockTimer().cancel(); 290 this.autoLockTimer().cancel();
293 this._autoLockTimer = null; 291 this._autoLockTimer = null;
294//MochiKit.Logging.logDebug("--- timer resetted - 1"); 292//MochiKit.Logging.logDebug("--- timer resetted - 1");
295 this.autoLockTimer(); 293 this.autoLockTimer();
296//MochiKit.Logging.logDebug("<<< timer resetted"); 294//MochiKit.Logging.logDebug("<<< timer resetted");
297 }, 295 },
298 296
299 //----------------------------------------------------- 297 //-----------------------------------------------------
300 298
301 'userNotificationHandler': function(anEvent) { 299 'userNotificationHandler': function(anEvent) {
302 this.getElement('message').update(anEvent.parameters().text); 300 this.getElement('message').update(anEvent.parameters().text);
303 }, 301 },
304 302
305 //----------------------------------------------------- 303 //-----------------------------------------------------
306 __syntaxFix__: '__syntaxFix__' 304 __syntaxFix__: '__syntaxFix__'
307}); 305});
308 306
309 307
diff --git a/frontend/beta/js/Clipperz/PM/Components/Compact/LoginForm.js b/frontend/beta/js/Clipperz/PM/Components/Compact/LoginForm.js
index a1e60d8..013dd0d 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Compact/LoginForm.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Compact/LoginForm.js
@@ -1,186 +1,184 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; } 27if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; }
30 28
31Clipperz.PM.Components.Compact.LoginForm = function(anElement, args) { 29Clipperz.PM.Components.Compact.LoginForm = function(anElement, args) {
32 30
33 Clipperz.PM.Components.Compact.LoginForm.superclass.constructor.call(this, anElement, args); 31 Clipperz.PM.Components.Compact.LoginForm.superclass.constructor.call(this, anElement, args);
34 32
35 this.render(); 33 this.render();
36 Clipperz.NotificationCenter.register(null, 'updatedProgressState', this, 'userNotificationHandler') 34 Clipperz.NotificationCenter.register(null, 'updatedProgressState', this, 'userNotificationHandler')
37 35
38 return this; 36 return this;
39}; 37};
40 38
41YAHOO.extendX(Clipperz.PM.Components.Compact.LoginForm, Clipperz.PM.Components.BaseComponent, { 39YAHOO.extendX(Clipperz.PM.Components.Compact.LoginForm, Clipperz.PM.Components.BaseComponent, {
42 40
43 'toString': function() { 41 'toString': function() {
44 return "Clipperz.PM.Components.Compact.LoginForm"; 42 return "Clipperz.PM.Components.Compact.LoginForm";
45 }, 43 },
46 44
47 //----------------------------------------------------- 45 //-----------------------------------------------------
48 46
49 'render': function() { 47 'render': function() {
50 var result; 48 var result;
51 varlayout; 49 varlayout;
52 50
53 MochiKit.Signal.disconnectAllTo(this); 51 MochiKit.Signal.disconnectAllTo(this);
54 this.element().update(""); 52 this.element().update("");
55 53
56 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('baseDiv'), cls:'LoginPanel', children:[ 54 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('baseDiv'), cls:'LoginPanel', children:[
57 {tag:'div', id:'compactHeader'}, 55 {tag:'div', id:'compactHeader'},
58 {tag:'div', id:'compactBody', children:[ 56 {tag:'div', id:'compactBody', children:[
59 {tag:'form', id:this.getId('loginForm_form'), children:[ 57 {tag:'form', id:this.getId('loginForm_form'), children:[
60 {tag:'dl', children:[ 58 {tag:'dl', children:[
61 {tag:'dt', htmlString:Clipperz.PM.Strings['loginFormUsernameLabel']}, 59 {tag:'dt', htmlString:Clipperz.PM.Strings['loginFormUsernameLabel']},
62 {tag:'dd', children:[ 60 {tag:'dd', children:[
63 {tag:'input', id:this.getId('login_username'), type:'text', size:'30', name:'username'} 61 {tag:'input', id:this.getId('login_username'), type:'text', size:'30', name:'username'}
64 ]}, 62 ]},
65 {tag:'dt', htmlString:Clipperz.PM.Strings['loginFormPassphraseLabel']}, 63 {tag:'dt', htmlString:Clipperz.PM.Strings['loginFormPassphraseLabel']},
66 {tag:'dd', children:[ 64 {tag:'dd', children:[
67 {tag:'input', id:this.getId('login_passphrase'), type:'password', size:'30', name:'passphrase'} 65 {tag:'input', id:this.getId('login_passphrase'), type:'password', size:'30', name:'passphrase'}
68 ]} 66 ]}
69 ]}, 67 ]},
70 {tag:'div', id:this.getId('login_submit')} 68 {tag:'div', id:this.getId('login_submit')}
71 ]}, 69 ]},
72 {tag:'h4', id:this.getId('message')} 70 {tag:'h4', id:this.getId('message')}
73 ]} 71 ]}
74 ]}); 72 ]});
75 73
76 new Clipperz.PM.Components.Compact.CompactHeader(YAHOO.ext.Element.get('compactHeader')); 74 new Clipperz.PM.Components.Compact.CompactHeader(YAHOO.ext.Element.get('compactHeader'));
77 75
78 MochiKit.Signal.connect(this.getId('loginForm_form'), 'onsubmit', this, 'stopFormSubmit'); 76 MochiKit.Signal.connect(this.getId('loginForm_form'), 'onsubmit', this, 'stopFormSubmit');
79 new YAHOO.ext.Button(this.getId('login_submit'), {text:Clipperz.PM.Strings['loginFormButtonLabel'], handler:this.doLogin, scope:this, minWidth:0}); 77 new YAHOO.ext.Button(this.getId('login_submit'), {text:Clipperz.PM.Strings['loginFormButtonLabel'], handler:this.doLogin, scope:this, minWidth:0});
80 this.getElement('login_submit').swallowEvent('click', true); 78 this.getElement('login_submit').swallowEvent('click', true);
81 79
82 MochiKit.Signal.connect(this.getId('loginForm_form'), 'onkeydown', this, 'onkeydown'); 80 MochiKit.Signal.connect(this.getId('loginForm_form'), 'onkeydown', this, 'onkeydown');
83 81
84 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('login_passphrase')); 82 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('login_passphrase'));
85 this.getElement('login_username').focus(); 83 this.getElement('login_username').focus();
86 84
87 return result; 85 return result;
88 }, 86 },
89 87
90 //----------------------------------------------------- 88 //-----------------------------------------------------
91 89
92 'doLogin': function(e) { 90 'doLogin': function(e) {
93//MochiKit.Logging.logDebug(">>> compact.LoginForm.doLogin"); 91//MochiKit.Logging.logDebug(">>> compact.LoginForm.doLogin");
94 if (this.checkLoginForm()) { 92 if (this.checkLoginForm()) {
95 this.doLoginWithUsernameAndPassphrase(this.getDom('login_username').value, this.getDom('login_passphrase').value); 93 this.doLoginWithUsernameAndPassphrase(this.getDom('login_username').value, this.getDom('login_passphrase').value);
96 } 94 }
97//MochiKit.Logging.logDebug("<<< compact.LoginForm.doLogin"); 95//MochiKit.Logging.logDebug("<<< compact.LoginForm.doLogin");
98 }, 96 },
99 97
100 //......................................................................... 98 //.........................................................................
101 99
102 'doLoginWithUsernameAndPassphrase': function(anUsername, aPassphrase) { 100 'doLoginWithUsernameAndPassphrase': function(anUsername, aPassphrase) {
103 var deferredResult; 101 var deferredResult;
104 var user; 102 var user;
105 103
106//MochiKit.Logging.logDebug(">>> compact.LoginForm.doLoginWithUsernameAndPassphrase"); 104//MochiKit.Logging.logDebug(">>> compact.LoginForm.doLoginWithUsernameAndPassphrase");
107 user = new Clipperz.PM.DataModel.User({username:anUsername, passphrase:aPassphrase}); 105 user = new Clipperz.PM.DataModel.User({username:anUsername, passphrase:aPassphrase});
108 106
109 deferredResult = new MochiKit.Async.Deferred(); 107 deferredResult = new MochiKit.Async.Deferred();
110 deferredResult.addCallback(MochiKit.Base.method(user, 'connect')); 108 deferredResult.addCallback(MochiKit.Base.method(user, 'connect'));
111 deferredResult.addCallback(MochiKit.Base.method(user, 'loadPreferences')); 109 deferredResult.addCallback(MochiKit.Base.method(user, 'loadPreferences'));
112 deferredResult.addCallback(MochiKit.Base.method(user, 'loadRecords')); 110 deferredResult.addCallback(MochiKit.Base.method(user, 'loadRecords'));
113 deferredResult.addCallback(MochiKit.Base.method(user, 'loadDirectLogins')); 111 deferredResult.addCallback(MochiKit.Base.method(user, 'loadDirectLogins'));
114 deferredResult.addErrback(MochiKit.Base.bind(function() { 112 deferredResult.addErrback(MochiKit.Base.bind(function() {
115 this.getElement('loginForm_form').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show(); 113 this.getElement('loginForm_form').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show();
116 this.getElement('message').update(Clipperz.PM.Strings['loginMessagePanelFailureText']); 114 this.getElement('message').update(Clipperz.PM.Strings['loginMessagePanelFailureText']);
117 this.getDom('login_passphrase').value = ""; 115 this.getDom('login_passphrase').value = "";
118 this.getElement('login_passphrase').focus(); 116 this.getElement('login_passphrase').focus();
119 }, this)) 117 }, this))
120//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("compact.LoginForm.doLogin - 6: " + res); return res;}); 118//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("compact.LoginForm.doLogin - 6: " + res); return res;});
121 deferredResult.callback("token"); 119 deferredResult.callback("token");
122//MochiKit.Logging.logDebug("<<< compact.LoginForm.doLoginWithUsernameAndPassphrase"); 120//MochiKit.Logging.logDebug("<<< compact.LoginForm.doLoginWithUsernameAndPassphrase");
123 121
124 return deferredResult; 122 return deferredResult;
125 }, 123 },
126 124
127 //......................................................................... 125 //.........................................................................
128 126
129 'checkLoginForm': function() { 127 'checkLoginForm': function() {
130 var result; 128 var result;
131 var username 129 var username
132 varpassphrase; 130 varpassphrase;
133 131
134//MochiKit.Logging.logDebug(">>> checkLoginForm"); 132//MochiKit.Logging.logDebug(">>> checkLoginForm");
135 username = this.getDom('login_username').value; 133 username = this.getDom('login_username').value;
136 passphrase = this.getDom('login_passphrase').value; 134 passphrase = this.getDom('login_passphrase').value;
137 135
138 if ((username != "") && (passphrase != "")) { 136 if ((username != "") && (passphrase != "")) {
139 result = true; 137 result = true;
140 } else { 138 } else {
141 if (username == "") { 139 if (username == "") {
142 this.getElement('login_username').focus(); 140 this.getElement('login_username').focus();
143 } else if (passphrase == "") { 141 } else if (passphrase == "") {
144 this.getElement('login_passphrase').focus(); 142 this.getElement('login_passphrase').focus();
145 } 143 }
146 144
147 result = false; 145 result = false;
148 } 146 }
149//MochiKit.Logging.logDebug("<<< checkLoginForm - " + result); 147//MochiKit.Logging.logDebug("<<< checkLoginForm - " + result);
150 148
151 return result; 149 return result;
152 }, 150 },
153 151
154 //------------------------------------------------------------------------- 152 //-------------------------------------------------------------------------
155 153
156 'stopFormSubmit': function(anEvent) { 154 'stopFormSubmit': function(anEvent) {
157 anEvent.stop(); 155 anEvent.stop();
158 }, 156 },
159 157
160 //------------------------------------------------------------------------- 158 //-------------------------------------------------------------------------
161 159
162 'onkeydown': function(anEvent) { 160 'onkeydown': function(anEvent) {
163//MochiKit.Logging.logDebug(">>> onkeydown - " + anEvent.src().id); 161//MochiKit.Logging.logDebug(">>> onkeydown - " + anEvent.src().id);
164 if (anEvent.key().code == 13) { 162 if (anEvent.key().code == 13) {
165 this.doLogin(); 163 this.doLogin();
166 anEvent.stop(); 164 anEvent.stop();
167 } 165 }
168 }, 166 },
169 167
170 //----------------------------------------------------- 168 //-----------------------------------------------------
171 169
172 'userNotificationHandler': function(anEvent) { 170 'userNotificationHandler': function(anEvent) {
173//MochiKit.Logging.logDebug(">>> compact.LoginForm.userNotificationHandler"); 171//MochiKit.Logging.logDebug(">>> compact.LoginForm.userNotificationHandler");
174//MochiKit.Logging.logDebug("userNotificationHandler - event: " + anEvent.event()); 172//MochiKit.Logging.logDebug("userNotificationHandler - event: " + anEvent.event());
175 this.getElement('loginForm_form').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 173 this.getElement('loginForm_form').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
176 if (this.getDom('message') != null) { 174 if (this.getDom('message') != null) {
177 this.getElement('message').update(Clipperz.PM.Strings.messagePanelConfigurations[anEvent.parameters()]()['text']); 175 this.getElement('message').update(Clipperz.PM.Strings.messagePanelConfigurations[anEvent.parameters()]()['text']);
178 } 176 }
179//MochiKit.Logging.logDebug("<<< compact.LoginForm.userNotificationHandler"); 177//MochiKit.Logging.logDebug("<<< compact.LoginForm.userNotificationHandler");
180 }, 178 },
181 179
182 //----------------------------------------------------- 180 //-----------------------------------------------------
183 __syntaxFix__: '__syntaxFix__' 181 __syntaxFix__: '__syntaxFix__'
184}); 182});
185 183
186 184
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 3f4952d..fef8e9e 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js
@@ -1,171 +1,169 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } 27if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
30if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } 28if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; }
31 29
32//############################################################################# 30//#############################################################################
33 31
34Clipperz.PM.Components.Import.CSVImport.CSVImportColumns = function(anElement, args) { 32Clipperz.PM.Components.Import.CSVImport.CSVImportColumns = function(anElement, args) {
35 args = args || {}; 33 args = args || {};
36 34
37 Clipperz.PM.Components.Import.CSVImport.CSVImportColumns.superclass.constructor.call(this, anElement, args); 35 Clipperz.PM.Components.Import.CSVImport.CSVImportColumns.superclass.constructor.call(this, anElement, args);
38 this._mainComponent = args.mainComponent; 36 this._mainComponent = args.mainComponent;
39 37
40 return this; 38 return this;
41} 39}
42 40
43//============================================================================= 41//=============================================================================
44 42
45YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportColumns, Clipperz.PM.Components.BaseComponent, { 43YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportColumns, Clipperz.PM.Components.BaseComponent, {
46 44
47 'toString': function() { 45 'toString': function() {
48 return "Clipperz.PM.Components.Import.CSVImport.CSVImportColumns component"; 46 return "Clipperz.PM.Components.Import.CSVImport.CSVImportColumns component";
49 }, 47 },
50 48
51 //------------------------------------------------------------------------- 49 //-------------------------------------------------------------------------
52 50
53 'mainComponent': function() { 51 'mainComponent': function() {
54 return this._mainComponent; 52 return this._mainComponent;
55 }, 53 },
56 54
57 //------------------------------------------------------------------------- 55 //-------------------------------------------------------------------------
58 56
59 'render': function() { 57 'render': function() {
60 var i,c; 58 var i,c;
61 var columnSelectorCheckboxCells; 59 var columnSelectorCheckboxCells;
62 var checkboxes; 60 var checkboxes;
63 var data; 61 var data;
64 62
65//MochiKit.Logging.logDebug(">>> CSVImportColumns.render"); 63//MochiKit.Logging.logDebug(">>> CSVImportColumns.render");
66 Clipperz.NotificationCenter.unregister(this); 64 Clipperz.NotificationCenter.unregister(this);
67 MochiKit.Signal.disconnectAllTo(this); 65 MochiKit.Signal.disconnectAllTo(this);
68 66
69 this.element().update(""); 67 this.element().update("");
70 68
71 data = this.mainComponent().parsedValues(); 69 data = this.mainComponent().parsedValues();
72 columnSelectorCheckboxCells = []; 70 columnSelectorCheckboxCells = [];
73 71
74 c =data[0].length; 72 c =data[0].length;
75 for (i=0; i<c; i++) { 73 for (i=0; i<c; i++) {
76 columnSelectorCheckboxCells.push({tag:'th', valign:'top', cls:(this.mainComponent().isColumnSelected(i) ? 'selectedColumn': 'skippedColumn'), children:[ 74 columnSelectorCheckboxCells.push({tag:'th', valign:'top', cls:(this.mainComponent().isColumnSelected(i) ? 'selectedColumn': 'skippedColumn'), children:[
77 {tag:'input', type:'checkbox', id:this.getId('columnCheckbox_' + i), value:i} 75 {tag:'input', type:'checkbox', id:this.getId('columnCheckbox_' + i), value:i}
78 ]}) 76 ]})
79 } 77 }
80 78
81 this.domHelper().append(this.element(), {tag:'div', children:[ 79 this.domHelper().append(this.element(), {tag:'div', children:[
82 {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Columns']}, 80 {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Columns']},
83 {tag:'div', id:this.getId('dataDiv'), cls:'csvImportPreview', children:[ 81 {tag:'div', id:this.getId('dataDiv'), cls:'csvImportPreview', children:[
84 {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview columns', cellspacing:'0', children:[ 82 {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview columns', cellspacing:'0', children:[
85 {tag:'thead', id:this.getId('previewData_thead'), children:[ 83 {tag:'thead', id:this.getId('previewData_thead'), children:[
86 {tag:'tr', children:columnSelectorCheckboxCells} 84 {tag:'tr', children:columnSelectorCheckboxCells}
87 ]}, 85 ]},
88 {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} 86 {tag:'tbody', id:this.getId('previewData_tbody'), children:[]}
89 ]} 87 ]}
90 ]} 88 ]}
91 ]}); 89 ]});
92 90
93 c =data[0].length; 91 c =data[0].length;
94 for (i=0; i<c; i++) { 92 for (i=0; i<c; i++) {
95 if (this.mainComponent().isColumnSelected(i)) { 93 if (this.mainComponent().isColumnSelected(i)) {
96 this.getDom('columnCheckbox_' + i).checked = true; 94 this.getDom('columnCheckbox_' + i).checked = true;
97 } 95 }
98 } 96 }
99 97
100 this.renderData(this.getElement('previewData_tbody'), data); 98 this.renderData(this.getElement('previewData_tbody'), data);
101 99
102 checkboxes = MochiKit.DOM.getElementsByTagAndClassName('input', null, this.getDom('previewData_thead')); 100 checkboxes = MochiKit.DOM.getElementsByTagAndClassName('input', null, this.getDom('previewData_thead'));
103 c = checkboxes.length; 101 c = checkboxes.length;
104 for (i=0; i<c; i++) { 102 for (i=0; i<c; i++) {
105 MochiKit.Signal.connect(checkboxes[i], 'onclick', this, 'renderDataHandler'); 103 MochiKit.Signal.connect(checkboxes[i], 'onclick', this, 'renderDataHandler');
106 } 104 }
107//MochiKit.Logging.logDebug("<<< CSVImportColumns.render"); 105//MochiKit.Logging.logDebug("<<< CSVImportColumns.render");
108 }, 106 },
109 107
110 //------------------------------------------------------------------------- 108 //-------------------------------------------------------------------------
111 109
112 'renderData': function(anElement, someData) { 110 'renderData': function(anElement, someData) {
113 var config; 111 var config;
114 var i,c; 112 var i,c;
115 113
116//MochiKit.Logging.logDebug(">>> CSVImportColumns.renderData"); 114//MochiKit.Logging.logDebug(">>> CSVImportColumns.renderData");
117 // anElement.update(""); 115 // anElement.update("");
118 MochiKit.DOM.replaceChildNodes(anElement.dom); 116 MochiKit.DOM.replaceChildNodes(anElement.dom);
119 117
120 config = MochiKit.Base.map(MochiKit.Base.bind(function(aRowData) { 118 config = MochiKit.Base.map(MochiKit.Base.bind(function(aRowData) {
121 var result; 119 var result;
122 var i,c; 120 var i,c;
123 121
124 result = {tag:'tr', children:[]}; 122 result = {tag:'tr', children:[]};
125 c = aRowData.length; 123 c = aRowData.length;
126 for (i=0; i<c; i++) { 124 for (i=0; i<c; i++) {
127 var field; 125 var field;
128 126
129 field = aRowData[i]; 127 field = aRowData[i];
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;')}); 128 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;')});
131 } 129 }
132 130
133 return result; 131 return result;
134 }, this), someData); 132 }, this), someData);
135 133
136 MochiKit.Base.map(function(aRowConfig) {Clipperz.YUI.DomHelper.append(anElement, aRowConfig);}, config); 134 MochiKit.Base.map(function(aRowConfig) {Clipperz.YUI.DomHelper.append(anElement, aRowConfig);}, config);
137 135
138 Clipperz.Style.applyZebraStylesToTable(this.getId('previewDada')); 136 Clipperz.Style.applyZebraStylesToTable(this.getId('previewDada'));
139//MochiKit.Logging.logDebug("<<< CSVImportColumns.renderData"); 137//MochiKit.Logging.logDebug("<<< CSVImportColumns.renderData");
140 }, 138 },
141 139
142 //------------------------------------------------------------------------- 140 //-------------------------------------------------------------------------
143 141
144 'renderDataHandler': function(anEvent) { 142 'renderDataHandler': function(anEvent) {
145 var thElement; 143 var thElement;
146 144
147 thElement = YAHOO.ext.Element.get(anEvent.src().parentNode); 145 thElement = YAHOO.ext.Element.get(anEvent.src().parentNode);
148 146
149 if (anEvent.src().checked == true) { 147 if (anEvent.src().checked == true) {
150 this.mainComponent().skippedColumns().remove(anEvent.src().value); 148 this.mainComponent().skippedColumns().remove(anEvent.src().value);
151 thElement.addClass('selectedColumn'); 149 thElement.addClass('selectedColumn');
152 thElement.removeClass('skippedColumn'); 150 thElement.removeClass('skippedColumn');
153 } else { 151 } else {
154 this.mainComponent().skippedColumns().add(anEvent.src().value); 152 this.mainComponent().skippedColumns().add(anEvent.src().value);
155 thElement.removeClass('selectedColumn'); 153 thElement.removeClass('selectedColumn');
156 thElement.addClass('skippedColumn'); 154 thElement.addClass('skippedColumn');
157 } 155 }
158 156
159 if (this.mainComponent().skippedColumns().allItems().length == this.mainComponent().parsedValues()[0].length) { 157 if (this.mainComponent().skippedColumns().allItems().length == this.mainComponent().parsedValues()[0].length) {
160 this.mainComponent().nextButton().disable(); 158 this.mainComponent().nextButton().disable();
161 } else { 159 } else {
162 this.mainComponent().nextButton().enable(); 160 this.mainComponent().nextButton().enable();
163 } 161 }
164 162
165 this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); 163 this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues());
166 }, 164 },
167 165
168 //------------------------------------------------------------------------- 166 //-------------------------------------------------------------------------
169 __syntaxFix__: "syntax fix" 167 __syntaxFix__: "syntax fix"
170}); 168});
171 169
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 f7dbd5d..e816380 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js
@@ -1,244 +1,242 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } 27if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
30if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } 28if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; }
31 29
32//############################################################################# 30//#############################################################################
33 31
34Clipperz.PM.Components.Import.CSVImport.CSVImportFields = function(anElement, args) { 32Clipperz.PM.Components.Import.CSVImport.CSVImportFields = function(anElement, args) {
35 args = args || {}; 33 args = args || {};
36 34
37 Clipperz.PM.Components.Import.CSVImport.CSVImportFields.superclass.constructor.call(this, anElement, args); 35 Clipperz.PM.Components.Import.CSVImport.CSVImportFields.superclass.constructor.call(this, anElement, args);
38 this._mainComponent = args.mainComponent; 36 this._mainComponent = args.mainComponent;
39 37
40 return this; 38 return this;
41} 39}
42 40
43//============================================================================= 41//=============================================================================
44 42
45YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportFields, Clipperz.PM.Components.BaseComponent, { 43YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportFields, Clipperz.PM.Components.BaseComponent, {
46 44
47 'toString': function() { 45 'toString': function() {
48 return "Clipperz.PM.Components.Import.CSVImport.CSVImportFields component"; 46 return "Clipperz.PM.Components.Import.CSVImport.CSVImportFields component";
49 }, 47 },
50 48
51 //------------------------------------------------------------------------- 49 //-------------------------------------------------------------------------
52 50
53 'mainComponent': function() { 51 'mainComponent': function() {
54 return this._mainComponent; 52 return this._mainComponent;
55 }, 53 },
56 54
57 //------------------------------------------------------------------------- 55 //-------------------------------------------------------------------------
58 56
59 'render': function() { 57 'render': function() {
60 varfieldsHeaderCells; 58 varfieldsHeaderCells;
61 var titleColumnIndex; 59 var titleColumnIndex;
62 var notesColumnIndex; 60 var notesColumnIndex;
63 var i,c; 61 var i,c;
64 62
65 Clipperz.NotificationCenter.unregister(this); 63 Clipperz.NotificationCenter.unregister(this);
66 MochiKit.Signal.disconnectAllTo(this); 64 MochiKit.Signal.disconnectAllTo(this);
67 65
68 this.element().update(""); 66 this.element().update("");
69 67
70 titleColumnIndex = this.mainComponent().titleColumnIndex() 68 titleColumnIndex = this.mainComponent().titleColumnIndex()
71 notesColumnIndex = this.mainComponent().notesColumnIndex() 69 notesColumnIndex = this.mainComponent().notesColumnIndex()
72 70
73 fieldsHeaderCells = []; 71 fieldsHeaderCells = [];
74 fieldsHeaderCells.push({tag:'td', valign:'top', cls:'title', html:this.mainComponent().labelForColumn(titleColumnIndex)}); 72 fieldsHeaderCells.push({tag:'td', valign:'top', cls:'title', html:this.mainComponent().labelForColumn(titleColumnIndex)});
75 73
76 c =this.mainComponent().parsedValues()[0].length; 74 c =this.mainComponent().parsedValues()[0].length;
77 for (i=0; i<c; i++) { 75 for (i=0; i<c; i++) {
78 if ((i != titleColumnIndex) && (i != notesColumnIndex) && (this.mainComponent().isColumnSelected(i))) { 76 if ((i != titleColumnIndex) && (i != notesColumnIndex) && (this.mainComponent().isColumnSelected(i))) {
79 var trimmedLabel; 77 var trimmedLabel;
80 78
81 trimmedLabel = Clipperz.Base.trim(this.mainComponent().labelForColumn(i)); 79 trimmedLabel = Clipperz.Base.trim(this.mainComponent().labelForColumn(i));
82 fieldsHeaderCells.push({tag:'td', valign:'top', id:this.getId('fieldHeaderTD_' + i), cls:((trimmedLabel == "") ? 'missingLabelWarning' : (this.isColumnSetup(i) ? 'configuredColumn': 'unconfiguredColumn')), children:[ 80 fieldsHeaderCells.push({tag:'td', valign:'top', id:this.getId('fieldHeaderTD_' + i), cls:((trimmedLabel == "") ? 'missingLabelWarning' : (this.isColumnSetup(i) ? 'configuredColumn': 'unconfiguredColumn')), children:[
83 {tag:'span', html:((trimmedLabel == "") ? Clipperz.PM.Strings['CSV_ImportWizard_Fields_MissingLabelWarning'] : trimmedLabel)/*, cls:((trimmedLabel == "") ? 'missingLabelWarning' : '')*/}, 81 {tag:'span', html:((trimmedLabel == "") ? Clipperz.PM.Strings['CSV_ImportWizard_Fields_MissingLabelWarning'] : trimmedLabel)/*, cls:((trimmedLabel == "") ? 'missingLabelWarning' : '')*/},
84 {tag:'select', id:this.getId('select_' + i), name:i, children:[ 82 {tag:'select', id:this.getId('select_' + i), name:i, children:[
85 {tag:'option', value:'UNDEFINED', html:"select data type", cls:'disabledOption'}, 83 {tag:'option', value:'UNDEFINED', html:"select data type", cls:'disabledOption'},
86 {tag:'option', value:'TXT', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['TXT']['shortDescription']}, 84 {tag:'option', value:'TXT', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['TXT']['shortDescription']},
87 {tag:'option', value:'PWD', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['PWD']['shortDescription']}, 85 {tag:'option', value:'PWD', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['PWD']['shortDescription']},
88 {tag:'option', value:'URL', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['URL']['shortDescription']}, 86 {tag:'option', value:'URL', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['URL']['shortDescription']},
89 {tag:'option', value:'DATE', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['DATE']['shortDescription']}, 87 {tag:'option', value:'DATE', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['DATE']['shortDescription']},
90 {tag:'option', value:'ADDR', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['ADDR']['shortDescription']} 88 {tag:'option', value:'ADDR', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['ADDR']['shortDescription']}
91 ]} 89 ]}
92 ]}) 90 ]})
93 } 91 }
94 } 92 }
95 93
96 if (notesColumnIndex != -1) { 94 if (notesColumnIndex != -1) {
97 fieldsHeaderCells.push({tag:'td', valign:'top', cls:'notes', html:this.mainComponent().labelForColumn(notesColumnIndex)}); 95 fieldsHeaderCells.push({tag:'td', valign:'top', cls:'notes', html:this.mainComponent().labelForColumn(notesColumnIndex)});
98 } 96 }
99 97
100 this.domHelper().append(this.element(), {tag:'div', children:[ 98 this.domHelper().append(this.element(), {tag:'div', children:[
101 {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Fields']}, 99 {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Fields']},
102 {tag:'div', id:this.getId('dataDiv'), children:[ 100 {tag:'div', id:this.getId('dataDiv'), children:[
103 {tag:'div', children:[ 101 {tag:'div', children:[
104 ]}, 102 ]},
105 {tag:'div', cls:'csvImportPreview', children:[ 103 {tag:'div', cls:'csvImportPreview', children:[
106 {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[ 104 {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[
107 {tag:'thead', id:this.getId('previewData_thead'), children:[ 105 {tag:'thead', id:this.getId('previewData_thead'), children:[
108 {tag:'tr', cls:'CSV_previewData_header', children:fieldsHeaderCells} 106 {tag:'tr', cls:'CSV_previewData_header', children:fieldsHeaderCells}
109 ]}, 107 ]},
110 {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} 108 {tag:'tbody', id:this.getId('previewData_tbody'), children:[]}
111 ]} 109 ]}
112 ]} 110 ]}
113 ]} 111 ]}
114 ]}); 112 ]});
115 113
116 for (i=0; i<c; i++) { 114 for (i=0; i<c; i++) {
117 if ((i != titleColumnIndex) && (i != notesColumnIndex) && (this.mainComponent().isColumnSelected(i))) { 115 if ((i != titleColumnIndex) && (i != notesColumnIndex) && (this.mainComponent().isColumnSelected(i))) {
118 Clipperz.DOM.selectOptionMatchingValue(this.getDom('select_' + i), this.mainComponent().typeForColumn(i)); 116 Clipperz.DOM.selectOptionMatchingValue(this.getDom('select_' + i), this.mainComponent().typeForColumn(i));
119 MochiKit.Signal.connect(this.getDom('select_' + i), 'onchange', this, 'renderDataRowsHandler'); 117 MochiKit.Signal.connect(this.getDom('select_' + i), 'onchange', this, 'renderDataRowsHandler');
120 } 118 }
121 } 119 }
122 120
123 this.renderDataRows(this.getElement('previewData_tbody')); 121 this.renderDataRows(this.getElement('previewData_tbody'));
124 // Clipperz.NotificationCenter.register(null, 'updatedCSVImportColumnHeader', this, 'renderDataRowsHandler'); 122 // Clipperz.NotificationCenter.register(null, 'updatedCSVImportColumnHeader', this, 'renderDataRowsHandler');
125 }, 123 },
126 124
127 //------------------------------------------------------------------------- 125 //-------------------------------------------------------------------------
128 126
129 'isColumnSetup': function(aColumnIndex) { 127 'isColumnSetup': function(aColumnIndex) {
130 return ((Clipperz.Base.trim(this.mainComponent().labelForColumn(aColumnIndex)) != "") && (this.mainComponent().typeForColumn(aColumnIndex) != 'UNDEFINED')); 128 return ((Clipperz.Base.trim(this.mainComponent().labelForColumn(aColumnIndex)) != "") && (this.mainComponent().typeForColumn(aColumnIndex) != 'UNDEFINED'));
131 }, 129 },
132 130
133 //------------------------------------------------------------------------- 131 //-------------------------------------------------------------------------
134 132
135 'renderDataRowsHandler': function(anEvent) { 133 'renderDataRowsHandler': function(anEvent) {
136 var columnIndex; 134 var columnIndex;
137 var tdElement; 135 var tdElement;
138 136
139//MochiKit.Logging.logDebug(">>> renderDataRowsHandler") 137//MochiKit.Logging.logDebug(">>> renderDataRowsHandler")
140 columnIndex = anEvent.src().name; 138 columnIndex = anEvent.src().name;
141 this.mainComponent().setTypeForColumn(anEvent.src().value, columnIndex); 139 this.mainComponent().setTypeForColumn(anEvent.src().value, columnIndex);
142 140
143 tdElement = this.getElement('fieldHeaderTD_' + columnIndex); 141 tdElement = this.getElement('fieldHeaderTD_' + columnIndex);
144 142
145 if (this.isColumnSetup(columnIndex)) { 143 if (this.isColumnSetup(columnIndex)) {
146 tdElement.removeClass('unconfiguredColumn'); 144 tdElement.removeClass('unconfiguredColumn');
147 tdElement.addClass('configuredColumn'); 145 tdElement.addClass('configuredColumn');
148 } else { 146 } else {
149 tdElement.addClass('unconfiguredColumn'); 147 tdElement.addClass('unconfiguredColumn');
150 tdElement.removeClass('configuredColumn'); 148 tdElement.removeClass('configuredColumn');
151 } 149 }
152 150
153 this.renderDataRows(this.getElement('previewData_tbody')); 151 this.renderDataRows(this.getElement('previewData_tbody'));
154 }, 152 },
155 153
156 //------------------------------------------------------------------------- 154 //-------------------------------------------------------------------------
157 155
158 'renderDataRows': function(anElement) { 156 'renderDataRows': function(anElement) {
159 var titleColumnIndex; 157 var titleColumnIndex;
160 var notesColumnIndex; 158 var notesColumnIndex;
161 var data 159 var data
162 var i,c; 160 var i,c;
163 161
164//MochiKit.Logging.logDebug("#### >> renderDataRows"); 162//MochiKit.Logging.logDebug("#### >> renderDataRows");
165 // anElement.update(""); 163 // anElement.update("");
166 MochiKit.DOM.replaceChildNodes(anElement.dom); 164 MochiKit.DOM.replaceChildNodes(anElement.dom);
167 165
168 if (this.mainComponent().isFirstRowHeader()) { 166 if (this.mainComponent().isFirstRowHeader()) {
169 data = this.mainComponent().parsedValues().slice(1); 167 data = this.mainComponent().parsedValues().slice(1);
170 } else { 168 } else {
171 data = this.mainComponent().parsedValues(); 169 data = this.mainComponent().parsedValues();
172 } 170 }
173 171
174 172
175 titleColumnIndex = this.mainComponent().titleColumnIndex(); 173 titleColumnIndex = this.mainComponent().titleColumnIndex();
176 notesColumnIndex = this.mainComponent().notesColumnIndex(); 174 notesColumnIndex = this.mainComponent().notesColumnIndex();
177 175
178 c = data.length; 176 c = data.length;
179 for (i=0; i<c; i++) { 177 for (i=0; i<c; i++) {
180 var rowData; 178 var rowData;
181 var rowConfig; 179 var rowConfig;
182 var ii, cc; 180 var ii, cc;
183 181
184 rowData = data[i]; 182 rowData = data[i];
185 183
186 rowConfig = {tag:'tr', children:[ 184 rowConfig = {tag:'tr', children:[
187 {tag:'td', valign:'top', cls:'title', html:(MochiKit.Base.isNotEmpty(rowData[titleColumnIndex]) ? rowData[titleColumnIndex].replace(/\n/g, '<br>') : '&nbsp;')} 185 {tag:'td', valign:'top', cls:'title', html:(MochiKit.Base.isNotEmpty(rowData[titleColumnIndex]) ? rowData[titleColumnIndex].replace(/\n/g, '<br>') : '&nbsp;')}
188 ]}; 186 ]};
189 187
190 cc = rowData.length; 188 cc = rowData.length;
191 for (ii=0; ii<cc; ii++) { 189 for (ii=0; ii<cc; ii++) {
192 // if ((ii != titleColumnIndex) && (ii != notesColumnIndex)) { 190 // if ((ii != titleColumnIndex) && (ii != notesColumnIndex)) {
193 if ((ii != titleColumnIndex) && (ii != notesColumnIndex) && (this.mainComponent().isColumnSelected(ii))) { 191 if ((ii != titleColumnIndex) && (ii != notesColumnIndex) && (this.mainComponent().isColumnSelected(ii))) {
194 rowConfig.children.push({ 192 rowConfig.children.push({
195 tag:'td', 193 tag:'td',
196 valign:'top', 194 valign:'top',
197 cls:(this.isColumnSetup(ii) ? 'configuredColumn' : 'unconfiguredColumn'), 195 cls:(this.isColumnSetup(ii) ? 'configuredColumn' : 'unconfiguredColumn'),
198 html:(MochiKit.Base.isNotEmpty(rowData[ii]) ? rowData[ii].replace(/\n/g, '<br>') : '&nbsp;') 196 html:(MochiKit.Base.isNotEmpty(rowData[ii]) ? rowData[ii].replace(/\n/g, '<br>') : '&nbsp;')
199 }); 197 });
200 } 198 }
201 } 199 }
202 if (notesColumnIndex != -1) { 200 if (notesColumnIndex != -1) {
203 rowConfig.children.push({tag:'td', valign:'top', cls:'notes', html:(MochiKit.Base.isNotEmpty(rowData[notesColumnIndex]) ? rowData[notesColumnIndex].replace(/\n/g, '<br>') : '&nbsp;')}); 201 rowConfig.children.push({tag:'td', valign:'top', cls:'notes', html:(MochiKit.Base.isNotEmpty(rowData[notesColumnIndex]) ? rowData[notesColumnIndex].replace(/\n/g, '<br>') : '&nbsp;')});
204 } 202 }
205 203
206 this.domHelper().append(anElement, rowConfig); 204 this.domHelper().append(anElement, rowConfig);
207 } 205 }
208 206
209 Clipperz.Style.applyZebraStylesToTable(this.getId('previewDada')); 207 Clipperz.Style.applyZebraStylesToTable(this.getId('previewDada'));
210 208
211 this.checkWetherToEnableNextButton(); 209 this.checkWetherToEnableNextButton();
212//MochiKit.Logging.logDebug("#### << renderDataRows"); 210//MochiKit.Logging.logDebug("#### << renderDataRows");
213 }, 211 },
214 212
215 //------------------------------------------------------------------------- 213 //-------------------------------------------------------------------------
216 214
217 'checkWetherToEnableNextButton': function() { 215 'checkWetherToEnableNextButton': function() {
218 var result; 216 var result;
219 var titleColumnIndex; 217 var titleColumnIndex;
220 var notesColumnIndex; 218 var notesColumnIndex;
221 var i,c; 219 var i,c;
222 220
223 titleColumnIndex = this.mainComponent().titleColumnIndex() 221 titleColumnIndex = this.mainComponent().titleColumnIndex()
224 notesColumnIndex = this.mainComponent().notesColumnIndex() 222 notesColumnIndex = this.mainComponent().notesColumnIndex()
225 223
226 result = true; 224 result = true;
227 c =this.mainComponent().parsedValues()[0].length; 225 c =this.mainComponent().parsedValues()[0].length;
228 for (i=0; i<c; i++) { 226 for (i=0; i<c; i++) {
229 if ((i != titleColumnIndex) && (i != notesColumnIndex) && (this.mainComponent().isColumnSelected(i))) { 227 if ((i != titleColumnIndex) && (i != notesColumnIndex) && (this.mainComponent().isColumnSelected(i))) {
230 result = result && this.isColumnSetup(i); 228 result = result && this.isColumnSetup(i);
231 } 229 }
232 } 230 }
233 231
234 if (result) { 232 if (result) {
235 this.mainComponent().nextButton().enable(); 233 this.mainComponent().nextButton().enable();
236 } else { 234 } else {
237 this.mainComponent().nextButton().disable(); 235 this.mainComponent().nextButton().disable();
238 } 236 }
239 }, 237 },
240 238
241 //------------------------------------------------------------------------- 239 //-------------------------------------------------------------------------
242 __syntaxFix__: "syntax fix" 240 __syntaxFix__: "syntax fix"
243}); 241});
244 242
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 5cb8679..dbde138 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js
@@ -1,237 +1,235 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } 27if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
30if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } 28if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; }
31 29
32//############################################################################# 30//#############################################################################
33 31
34Clipperz.PM.Components.Import.CSVImport.CSVImportHeader = function(anElement, args) { 32Clipperz.PM.Components.Import.CSVImport.CSVImportHeader = function(anElement, args) {
35 args = args || {}; 33 args = args || {};
36 34
37 Clipperz.PM.Components.Import.CSVImport.CSVImportHeader.superclass.constructor.call(this, anElement, args); 35 Clipperz.PM.Components.Import.CSVImport.CSVImportHeader.superclass.constructor.call(this, anElement, args);
38 this._mainComponent = args.mainComponent; 36 this._mainComponent = args.mainComponent;
39 37
40 this._pendingDeferredLabelFieldHandlerEvents = 0; 38 this._pendingDeferredLabelFieldHandlerEvents = 0;
41 39
42 return this; 40 return this;
43} 41}
44 42
45//============================================================================= 43//=============================================================================
46 44
47YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportHeader, Clipperz.PM.Components.BaseComponent, { 45YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportHeader, Clipperz.PM.Components.BaseComponent, {
48 46
49 'toString': function() { 47 'toString': function() {
50 return "Clipperz.PM.Components.Import.CSVImport.CSVImportHeader component"; 48 return "Clipperz.PM.Components.Import.CSVImport.CSVImportHeader component";
51 }, 49 },
52 50
53 //------------------------------------------------------------------------- 51 //-------------------------------------------------------------------------
54 52
55 'mainComponent': function() { 53 'mainComponent': function() {
56 return this._mainComponent; 54 return this._mainComponent;
57 }, 55 },
58 56
59 //------------------------------------------------------------------------- 57 //-------------------------------------------------------------------------
60 58
61 'render': function() { 59 'render': function() {
62 var thConfigs; 60 var thConfigs;
63 var i,c; 61 var i,c;
64 62
65//MochiKit.Logging.logDebug(">>> CSVImportHeader.render"); 63//MochiKit.Logging.logDebug(">>> CSVImportHeader.render");
66 Clipperz.NotificationCenter.unregister(this); 64 Clipperz.NotificationCenter.unregister(this);
67 MochiKit.Signal.disconnectAllTo(this); 65 MochiKit.Signal.disconnectAllTo(this);
68 66
69 thConfigs = []; 67 thConfigs = [];
70 c = this.mainComponent().parsedValues()[0].length; 68 c = this.mainComponent().parsedValues()[0].length;
71 for (i=0; i<c; i++) { 69 for (i=0; i<c; i++) {
72 if (this.mainComponent().isColumnSelected(i)) { 70 if (this.mainComponent().isColumnSelected(i)) {
73 // thConfigs.push({tag:'th', children:[{tag:'input', type:'text', id:this.getId('headerTextField_' + i), value:this.mainComponent().labelForColumn(i)}]}); 71 // thConfigs.push({tag:'th', children:[{tag:'input', type:'text', id:this.getId('headerTextField_' + i), value:this.mainComponent().labelForColumn(i)}]});
74 thConfigs.push({tag:'th', children:[{tag:'input', type:'text', id:this.getId('headerTextField_' + i), value:""}]}); 72 thConfigs.push({tag:'th', children:[{tag:'input', type:'text', id:this.getId('headerTextField_' + i), value:""}]});
75 } 73 }
76 } 74 }
77 75
78 this.element().update(""); 76 this.element().update("");
79 this.domHelper().append(this.element(), {tag:'div', children:[ 77 this.domHelper().append(this.element(), {tag:'div', children:[
80 {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Header']}, 78 {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Header']},
81 {tag:'div', cls:'importStepParameters', children:[ 79 {tag:'div', cls:'importStepParameters', children:[
82 {tag:'input', type:'checkbox', name:'isFistRowHeader', id:this.getId('isFirstRowHeader_checkbox')}, 80 {tag:'input', type:'checkbox', name:'isFistRowHeader', id:this.getId('isFirstRowHeader_checkbox')},
83 {tag:'span', id:this.getId('isFirstRowHeader_span'), cls:'clickableSpan', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Header_Settings_firstRowHeaderLabel']} 81 {tag:'span', id:this.getId('isFirstRowHeader_span'), cls:'clickableSpan', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Header_Settings_firstRowHeaderLabel']}
84 ]}, 82 ]},
85 {tag:'div', id:this.getId('dataDiv'), children:[ 83 {tag:'div', id:this.getId('dataDiv'), children:[
86 {tag:'div', cls:'csvImportPreview', children:[ 84 {tag:'div', cls:'csvImportPreview', children:[
87 {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview header', cellspacing:'0', children:[ 85 {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview header', cellspacing:'0', children:[
88 {tag:'thead', children:[{tag:'tr', children:thConfigs}]}, 86 {tag:'thead', children:[{tag:'tr', children:thConfigs}]},
89 {tag:'tbody', id:this.getId('previewData_tbody')} 87 {tag:'tbody', id:this.getId('previewData_tbody')}
90 ]} 88 ]}
91 ]} 89 ]}
92 ]} 90 ]}
93 ]}); 91 ]});
94 92
95 for (i=0; i<c; i++) { 93 for (i=0; i<c; i++) {
96 if (this.mainComponent().isColumnSelected(i)) { 94 if (this.mainComponent().isColumnSelected(i)) {
97 this.getElement('headerTextField_' + i).dom.value = this.mainComponent().labelForColumn(i); 95 this.getElement('headerTextField_' + i).dom.value = this.mainComponent().labelForColumn(i);
98 } 96 }
99 } 97 }
100 98
101 this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); 99 this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues());
102 100
103 if (this.mainComponent().isFirstRowHeader()) { 101 if (this.mainComponent().isFirstRowHeader()) {
104 this.getDom('isFirstRowHeader_checkbox').click(); 102 this.getDom('isFirstRowHeader_checkbox').click();
105 } 103 }
106 104
107 c = this.mainComponent().parsedValues()[0].length; 105 c = this.mainComponent().parsedValues()[0].length;
108 for (i=0; i<c; i++) { 106 for (i=0; i<c; i++) {
109 if (this.mainComponent().isColumnSelected(i)) { 107 if (this.mainComponent().isColumnSelected(i)) {
110 MochiKit.Signal.connect(this.getDom('headerTextField_' + i), 'onchange', MochiKit.Base.partial(MochiKit.Base.method(this, 'labelFieldHandler'), i)); 108 MochiKit.Signal.connect(this.getDom('headerTextField_' + i), 'onchange', MochiKit.Base.partial(MochiKit.Base.method(this, 'labelFieldHandler'), i));
111 MochiKit.Signal.connect(this.getDom('headerTextField_' + i), 'onkeypress', MochiKit.Base.partial(MochiKit.Base.method(this, 'deferredLabelFieldHandler'), i)); 109 MochiKit.Signal.connect(this.getDom('headerTextField_' + i), 'onkeypress', MochiKit.Base.partial(MochiKit.Base.method(this, 'deferredLabelFieldHandler'), i));
112 } 110 }
113 } 111 }
114 112
115 MochiKit.Signal.connect(this.getDom('isFirstRowHeader_checkbox'), 'onclick', this, 'toggleFirstRowHeaderCheckboxHandler'); 113 MochiKit.Signal.connect(this.getDom('isFirstRowHeader_checkbox'), 'onclick', this, 'toggleFirstRowHeaderCheckboxHandler');
116 if (Clipperz_IEisBroken != true) { 114 if (Clipperz_IEisBroken != true) {
117 MochiKit.Signal.connect(this.getDom('isFirstRowHeader_span'), 'onclick', this.getDom('isFirstRowHeader_checkbox'), 'click'); 115 MochiKit.Signal.connect(this.getDom('isFirstRowHeader_span'), 'onclick', this.getDom('isFirstRowHeader_checkbox'), 'click');
118 } 116 }
119//MochiKit.Logging.logDebug("<<< CSVImportHeader.render"); 117//MochiKit.Logging.logDebug("<<< CSVImportHeader.render");
120 }, 118 },
121 119
122 //------------------------------------------------------------------------- 120 //-------------------------------------------------------------------------
123 121
124 'renderData': function(anElement, someData) { 122 'renderData': function(anElement, someData) {
125 var trConfigs; 123 var trConfigs;
126 var data; 124 var data;
127 var i,c; 125 var i,c;
128 126
129 // anElement.update(""); 127 // anElement.update("");
130 MochiKit.DOM.replaceChildNodes(anElement.dom); 128 MochiKit.DOM.replaceChildNodes(anElement.dom);
131 129
132 if (this.mainComponent().isFirstRowHeader()) { 130 if (this.mainComponent().isFirstRowHeader()) {
133 data = someData.slice(1); 131 data = someData.slice(1);
134 } else { 132 } else {
135 data = someData; 133 data = someData;
136 } 134 }
137 135
138 trConfigs = MochiKit.Base.map(MochiKit.Base.bind(function(aRowData) { 136 trConfigs = MochiKit.Base.map(MochiKit.Base.bind(function(aRowData) {
139 var result; 137 var result;
140 var i,c; 138 var i,c;
141 139
142 result = {tag:'tr', children:[]}; 140 result = {tag:'tr', children:[]};
143 c = aRowData.length; 141 c = aRowData.length;
144 for (i=0; i<c; i++) { 142 for (i=0; i<c; i++) {
145 if (this.mainComponent().isColumnSelected(i)) { 143 if (this.mainComponent().isColumnSelected(i)) {
146 result.children.push({tag:'td', valign:'top', html:(MochiKit.Base.isNotEmpty(aRowData[i]) ? aRowData[i].replace(/\n/g, '<br>') : '&nbsp;')}); 144 result.children.push({tag:'td', valign:'top', html:(MochiKit.Base.isNotEmpty(aRowData[i]) ? aRowData[i].replace(/\n/g, '<br>') : '&nbsp;')});
147 } 145 }
148 } 146 }
149 147
150 return result; 148 return result;
151 }, this), data); 149 }, this), data);
152 150
153 MochiKit.Base.map(function(aRowConfig) {Clipperz.YUI.DomHelper.append(anElement, aRowConfig);}, trConfigs); 151 MochiKit.Base.map(function(aRowConfig) {Clipperz.YUI.DomHelper.append(anElement, aRowConfig);}, trConfigs);
154 152
155 Clipperz.Style.applyZebraStylesToTable(this.getId('previewDada')); 153 Clipperz.Style.applyZebraStylesToTable(this.getId('previewDada'));
156 }, 154 },
157 155
158 //------------------------------------------------------------------------- 156 //-------------------------------------------------------------------------
159 157
160 'toggleFirstRowHeaderCheckboxHandler': function() { 158 'toggleFirstRowHeaderCheckboxHandler': function() {
161 var firstRowData; 159 var firstRowData;
162 var i,c; 160 var i,c;
163 161
164//MochiKit.Logging.logDebug(">>> toggleFirstRowHeaderCheckboxHandler"); 162//MochiKit.Logging.logDebug(">>> toggleFirstRowHeaderCheckboxHandler");
165 this.mainComponent().setIsFirstRowHeader(this.getDom('isFirstRowHeader_checkbox').checked); 163 this.mainComponent().setIsFirstRowHeader(this.getDom('isFirstRowHeader_checkbox').checked);
166 164
167 firstRowData = this.mainComponent().parsedValues()[0]; 165 firstRowData = this.mainComponent().parsedValues()[0];
168 166
169 c = firstRowData.length; 167 c = firstRowData.length;
170 for (i=0; i<c; i++) { 168 for (i=0; i<c; i++) {
171 if (this.mainComponent().isColumnSelected(i)) { 169 if (this.mainComponent().isColumnSelected(i)) {
172 var label; 170 var label;
173 171
174 if (this.mainComponent().isFirstRowHeader()) { 172 if (this.mainComponent().isFirstRowHeader()) {
175 label = firstRowData[i]; 173 label = firstRowData[i];
176 } else { 174 } else {
177 label = null; 175 label = null;
178 } 176 }
179 177
180 this.mainComponent().setLabelForColumn(label, i); 178 this.mainComponent().setLabelForColumn(label, i);
181 } 179 }
182 }; 180 };
183 181
184 this.updateInputFieldValues(); 182 this.updateInputFieldValues();
185 this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); 183 this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues());
186//MochiKit.Logging.logDebug("<<< toggleFirstRowHeaderCheckboxHandler"); 184//MochiKit.Logging.logDebug("<<< toggleFirstRowHeaderCheckboxHandler");
187 }, 185 },
188 186
189 //------------------------------------------------------------------------- 187 //-------------------------------------------------------------------------
190 188
191 'updateInputFieldValues': function() { 189 'updateInputFieldValues': function() {
192 var i,c; 190 var i,c;
193 191
194//MochiKit.Logging.logDebug(">>> updateInputFieldValues"); 192//MochiKit.Logging.logDebug(">>> updateInputFieldValues");
195 c = this.mainComponent().parsedValues()[0].length; 193 c = this.mainComponent().parsedValues()[0].length;
196 for (i=0; i<c; i++) { 194 for (i=0; i<c; i++) {
197 if (this.mainComponent().isColumnSelected(i)) { 195 if (this.mainComponent().isColumnSelected(i)) {
198 this.getDom('headerTextField_' + i).value = this.mainComponent().labelForColumn(i); 196 this.getDom('headerTextField_' + i).value = this.mainComponent().labelForColumn(i);
199 } 197 }
200 } 198 }
201//console.log('[1] fieldSettings', fieldSettings); 199//console.log('[1] fieldSettings', fieldSettings);
202//MochiKit.Logging.logDebug("<<< updateInputFieldValues"); 200//MochiKit.Logging.logDebug("<<< updateInputFieldValues");
203 }, 201 },
204 202
205 //------------------------------------------------------------------------- 203 //-------------------------------------------------------------------------
206 204
207 'labelFieldHandler': function(aColumnIndex, anEvent) { 205 'labelFieldHandler': function(aColumnIndex, anEvent) {
208 var inputField; 206 var inputField;
209 207
210//MochiKit.Logging.logDebug(">>> labelFieldHandler"); 208//MochiKit.Logging.logDebug(">>> labelFieldHandler");
211 inputField = anEvent.src(); 209 inputField = anEvent.src();
212 210
213 this.mainComponent().setLabelForColumn(inputField.value, aColumnIndex); 211 this.mainComponent().setLabelForColumn(inputField.value, aColumnIndex);
214//MochiKit.Logging.logDebug("##### [" + anEvent.src().id + "] -> label[" + aColumnIndex + "]: '" + inputField.value + "'"); 212//MochiKit.Logging.logDebug("##### [" + anEvent.src().id + "] -> label[" + aColumnIndex + "]: '" + inputField.value + "'");
215//MochiKit.Logging.logDebug("<<< labelFieldHandler"); 213//MochiKit.Logging.logDebug("<<< labelFieldHandler");
216 }, 214 },
217 215
218 'deferredLabelFieldHandler': function(aColumnIndex, anEvent) { 216 'deferredLabelFieldHandler': function(aColumnIndex, anEvent) {
219//MochiKit.Logging.logDebug(">>> deferredLabelFieldHandler"); 217//MochiKit.Logging.logDebug(">>> deferredLabelFieldHandler");
220 this._pendingDeferredLabelFieldHandlerEvents ++; 218 this._pendingDeferredLabelFieldHandlerEvents ++;
221 MochiKit.Async.callLater(1, MochiKit.Base.partial(MochiKit.Base.method(this, 'deferredLabelFieldHandlerCatcher'), aColumnIndex, anEvent)); 219 MochiKit.Async.callLater(1, MochiKit.Base.partial(MochiKit.Base.method(this, 'deferredLabelFieldHandlerCatcher'), aColumnIndex, anEvent));
222//MochiKit.Logging.logDebug("<<< deferredLabelFieldHandler"); 220//MochiKit.Logging.logDebug("<<< deferredLabelFieldHandler");
223 }, 221 },
224 222
225 'deferredLabelFieldHandlerCatcher': function(aColumnIndex, anEvent) { 223 'deferredLabelFieldHandlerCatcher': function(aColumnIndex, anEvent) {
226//MochiKit.Logging.logDebug(">>> deferredLabelFieldHandlerCatcher"); 224//MochiKit.Logging.logDebug(">>> deferredLabelFieldHandlerCatcher");
227 this._pendingDeferredLabelFieldHandlerEvents --; 225 this._pendingDeferredLabelFieldHandlerEvents --;
228 if (this._pendingDeferredLabelFieldHandlerEvents == 0) { 226 if (this._pendingDeferredLabelFieldHandlerEvents == 0) {
229 this.labelFieldHandler(aColumnIndex, anEvent); 227 this.labelFieldHandler(aColumnIndex, anEvent);
230 } 228 }
231//MochiKit.Logging.logDebug("<<< deferredLabelFieldHandlerCatcher"); 229//MochiKit.Logging.logDebug("<<< deferredLabelFieldHandlerCatcher");
232 }, 230 },
233 231
234 //------------------------------------------------------------------------- 232 //-------------------------------------------------------------------------
235 __syntaxFix__: "syntax fix" 233 __syntaxFix__: "syntax fix"
236}); 234});
237 235
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 6344e06..ccfdeca 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js
@@ -1,209 +1,207 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } 27if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
30if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } 28if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; }
31 29
32//############################################################################# 30//#############################################################################
33 31
34Clipperz.PM.Components.Import.CSVImport.CSVImportNotes = function(anElement, args) { 32Clipperz.PM.Components.Import.CSVImport.CSVImportNotes = function(anElement, args) {
35 args = args || {}; 33 args = args || {};
36 34
37 Clipperz.PM.Components.Import.CSVImport.CSVImportNotes.superclass.constructor.call(this, anElement, args); 35 Clipperz.PM.Components.Import.CSVImport.CSVImportNotes.superclass.constructor.call(this, anElement, args);
38 this._mainComponent = args.mainComponent; 36 this._mainComponent = args.mainComponent;
39 37
40 return this; 38 return this;
41} 39}
42 40
43//============================================================================= 41//=============================================================================
44 42
45YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportNotes, Clipperz.PM.Components.BaseComponent, { 43YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportNotes, Clipperz.PM.Components.BaseComponent, {
46 44
47 'toString': function() { 45 'toString': function() {
48 return "Clipperz.PM.Components.Import.CSVImport.CSVImportNotes component"; 46 return "Clipperz.PM.Components.Import.CSVImport.CSVImportNotes component";
49 }, 47 },
50 48
51 //------------------------------------------------------------------------- 49 //-------------------------------------------------------------------------
52 50
53 'mainComponent': function() { 51 'mainComponent': function() {
54 return this._mainComponent; 52 return this._mainComponent;
55 }, 53 },
56 54
57 //------------------------------------------------------------------------- 55 //-------------------------------------------------------------------------
58 56
59 'render': function() { 57 'render': function() {
60 varnotesSelectorCheckboxCells; 58 varnotesSelectorCheckboxCells;
61 var totalNumberOfColumns; 59 var totalNumberOfColumns;
62 var titleColumnIndex; 60 var titleColumnIndex;
63 var notesColumnIndex; 61 var notesColumnIndex;
64 var i,c; 62 var i,c;
65 63
66 Clipperz.NotificationCenter.unregister(this); 64 Clipperz.NotificationCenter.unregister(this);
67 MochiKit.Signal.disconnectAllTo(this); 65 MochiKit.Signal.disconnectAllTo(this);
68 66
69 this.element().update(""); 67 this.element().update("");
70 68
71 titleColumnIndex = this.mainComponent().titleColumnIndex() 69 titleColumnIndex = this.mainComponent().titleColumnIndex()
72 notesColumnIndex = this.mainComponent().notesColumnIndex() 70 notesColumnIndex = this.mainComponent().notesColumnIndex()
73 71
74 totalNumberOfColumns = this.mainComponent().parsedValues()[0].length; 72 totalNumberOfColumns = this.mainComponent().parsedValues()[0].length;
75 73
76 notesSelectorCheckboxCells = [{tag:'th', cls:'title', html:this.mainComponent().labelForColumn(titleColumnIndex)}]; 74 notesSelectorCheckboxCells = [{tag:'th', cls:'title', html:this.mainComponent().labelForColumn(titleColumnIndex)}];
77 c =totalNumberOfColumns; 75 c =totalNumberOfColumns;
78 for (i=0; i<c; i++) { 76 for (i=0; i<c; i++) {
79 if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) { 77 if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) {
80 notesSelectorCheckboxCells.push({tag:'th', id:this.getId('th_' + i), valign:'top', children:[ 78 notesSelectorCheckboxCells.push({tag:'th', id:this.getId('th_' + i), valign:'top', children:[
81 {tag:'input', type:'radio', id:this.getId('radio_' + i), name:'CSVImportNotesColumn', value:i}, 79 {tag:'input', type:'radio', id:this.getId('radio_' + i), name:'CSVImportNotesColumn', value:i},
82 {tag:'span', cls:'clickableSpan', id:this.getId('columnLabel_' + i), html:this.mainComponent().labelForColumn(i)} 80 {tag:'span', cls:'clickableSpan', id:this.getId('columnLabel_' + i), html:this.mainComponent().labelForColumn(i)}
83 ]}) 81 ]})
84 } 82 }
85 } 83 }
86 84
87 this.domHelper().append(this.element(), {tag:'div', children:[ 85 this.domHelper().append(this.element(), {tag:'div', children:[
88 {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Notes']}, 86 {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Notes']},
89 {tag:'div', id:this.getId('dataDiv'), children:[ 87 {tag:'div', id:this.getId('dataDiv'), children:[
90 {tag:'div', cls:'importStepParameters', children:[ 88 {tag:'div', cls:'importStepParameters', children:[
91 {tag:'input', id:this.getId('doNotSetNotes_radio'), type:'radio', name:'CSVImportNotesColumn', value:-1}, 89 {tag:'input', id:this.getId('doNotSetNotes_radio'), type:'radio', name:'CSVImportNotesColumn', value:-1},
92 {tag:'span', id:this.getId('doNotSetNotes_span'), cls:'clickableSpan', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Notes_Settings_noSelectionLabel']} 90 {tag:'span', id:this.getId('doNotSetNotes_span'), cls:'clickableSpan', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Notes_Settings_noSelectionLabel']}
93 ]}, 91 ]},
94 {tag:'div', cls:'csvImportPreview', children:[ 92 {tag:'div', cls:'csvImportPreview', children:[
95 {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[ 93 {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[
96 {tag:'thead', id:this.getId('previewData_thead'), children:[ 94 {tag:'thead', id:this.getId('previewData_thead'), children:[
97 {tag:'tr', children:notesSelectorCheckboxCells} 95 {tag:'tr', children:notesSelectorCheckboxCells}
98 ]}, 96 ]},
99 {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} 97 {tag:'tbody', id:this.getId('previewData_tbody'), children:[]}
100 ]} 98 ]}
101 ]} 99 ]}
102 ]} 100 ]}
103 ]}); 101 ]});
104 102
105 this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); 103 this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues());
106 104
107 if ((notesColumnIndex >= totalNumberOfColumns) || (notesColumnIndex == titleColumnIndex) || !(this.mainComponent().isColumnSelected(notesColumnIndex))) { 105 if ((notesColumnIndex >= totalNumberOfColumns) || (notesColumnIndex == titleColumnIndex) || !(this.mainComponent().isColumnSelected(notesColumnIndex))) {
108 this.mainComponent().setNotesColumnIndex(-1); 106 this.mainComponent().setNotesColumnIndex(-1);
109 notesColumnIndex = -1; 107 notesColumnIndex = -1;
110 } 108 }
111 109
112 c =totalNumberOfColumns; 110 c =totalNumberOfColumns;
113 for (i=0; i<c; i++) { 111 for (i=0; i<c; i++) {
114 if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) { 112 if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) {
115 MochiKit.Signal.connect(this.getDom('radio_' + i), 'onclick', this, 'renderDataHandler'); 113 MochiKit.Signal.connect(this.getDom('radio_' + i), 'onclick', this, 'renderDataHandler');
116 if (Clipperz_IEisBroken != true) { 114 if (Clipperz_IEisBroken != true) {
117 MochiKit.Signal.connect(this.getDom('columnLabel_' + i), 'onclick', this.getDom('radio_' + i), 'click'); 115 MochiKit.Signal.connect(this.getDom('columnLabel_' + i), 'onclick', this.getDom('radio_' + i), 'click');
118 } 116 }
119 } 117 }
120 } 118 }
121 119
122 MochiKit.Signal.connect(this.getDom('doNotSetNotes_radio'), 'onclick', this, 'renderDataHandler'); 120 MochiKit.Signal.connect(this.getDom('doNotSetNotes_radio'), 'onclick', this, 'renderDataHandler');
123 if (Clipperz_IEisBroken != true) { 121 if (Clipperz_IEisBroken != true) {
124 MochiKit.Signal.connect(this.getDom('doNotSetNotes_span'), 'onclick', this.getDom('doNotSetNotes_radio'), 'click'); 122 MochiKit.Signal.connect(this.getDom('doNotSetNotes_span'), 'onclick', this.getDom('doNotSetNotes_radio'), 'click');
125 } 123 }
126 124
127 if (notesColumnIndex == -1) { 125 if (notesColumnIndex == -1) {
128 this.getDom('doNotSetNotes_radio').click(); 126 this.getDom('doNotSetNotes_radio').click();
129 } else { 127 } else {
130 this.getDom('radio_' + notesColumnIndex).click(); 128 this.getDom('radio_' + notesColumnIndex).click();
131 } 129 }
132 }, 130 },
133 131
134 //------------------------------------------------------------------------- 132 //-------------------------------------------------------------------------
135 133
136 'renderData': function(anElement, someData) { 134 'renderData': function(anElement, someData) {
137 var data; 135 var data;
138 var config; 136 var config;
139 var titleColumnIndex; 137 var titleColumnIndex;
140 var notesColumnIndex; 138 var notesColumnIndex;
141 var i,c; 139 var i,c;
142 140
143 // anElement.update(""); 141 // anElement.update("");
144 MochiKit.DOM.replaceChildNodes(anElement.dom); 142 MochiKit.DOM.replaceChildNodes(anElement.dom);
145 143
146 titleColumnIndex = this.mainComponent().titleColumnIndex(); 144 titleColumnIndex = this.mainComponent().titleColumnIndex();
147 notesColumnIndex = this.mainComponent().notesColumnIndex(); 145 notesColumnIndex = this.mainComponent().notesColumnIndex();
148 146
149 if (this.mainComponent().isFirstRowHeader()) { 147 if (this.mainComponent().isFirstRowHeader()) {
150 data = someData.slice(1); 148 data = someData.slice(1);
151 } else { 149 } else {
152 data = someData; 150 data = someData;
153 } 151 }
154 152
155 153
156 // config = [{tag:'tr', cls:'CSV_previewData_header', children:[{tag:'td', valign:'top', html:header[titleColumnIndex], cls:'title'}]}]; 154 // config = [{tag:'tr', cls:'CSV_previewData_header', children:[{tag:'td', valign:'top', html:header[titleColumnIndex], cls:'title'}]}];
157 // c = header.length; 155 // c = header.length;
158 // for (i=0; i<c; i++) { 156 // for (i=0; i<c; i++) {
159 // if (i != titleColumnIndex) { 157 // if (i != titleColumnIndex) {
160 // config[0].children.push({tag:'td', valign:'top', html:header[i], cls:((notesColumnIndex == i) ? 'notesColumn': '')}) 158 // config[0].children.push({tag:'td', valign:'top', html:header[i], cls:((notesColumnIndex == i) ? 'notesColumn': '')})
161 // } 159 // }
162 // } 160 // }
163 161
164 config = MochiKit.Base.map(MochiKit.Base.bind(function(aTitleColumnIndex, aRowData) { 162 config = MochiKit.Base.map(MochiKit.Base.bind(function(aTitleColumnIndex, aRowData) {
165 var result; 163 var result;
166 var i,c; 164 var i,c;
167 165
168 result = {tag:'tr', children:[{tag:'td', valign:'top', cls:'title', html:(MochiKit.Base.isNotEmpty(aRowData[aTitleColumnIndex]) ? aRowData[aTitleColumnIndex].replace(/\n/g, '<br>') : '&nbsp;')}]}; 166 result = {tag:'tr', children:[{tag:'td', valign:'top', cls:'title', html:(MochiKit.Base.isNotEmpty(aRowData[aTitleColumnIndex]) ? aRowData[aTitleColumnIndex].replace(/\n/g, '<br>') : '&nbsp;')}]};
169 c = aRowData.length; 167 c = aRowData.length;
170 for (i=0; i<c; i++) { 168 for (i=0; i<c; i++) {
171 if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) { 169 if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) {
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;')}); 170 result.children.push({tag:'td', valign:'top', cls:((notesColumnIndex == i) ? 'notesColumn': ''), html:(MochiKit.Base.isNotEmpty(aRowData[i]) ? aRowData[i].replace(/\n/g, '<br>') : '&nbsp;')});
173 } 171 }
174 } 172 }
175 173
176 return result; 174 return result;
177 }, this, titleColumnIndex), data); 175 }, this, titleColumnIndex), data);
178 176
179 MochiKit.Base.map(function(aRowConfig) {Clipperz.YUI.DomHelper.append(anElement, aRowConfig);}, config); 177 MochiKit.Base.map(function(aRowConfig) {Clipperz.YUI.DomHelper.append(anElement, aRowConfig);}, config);
180 178
181 Clipperz.Style.applyZebraStylesToTable(this.getId('previewDada')); 179 Clipperz.Style.applyZebraStylesToTable(this.getId('previewDada'));
182 }, 180 },
183 181
184 //------------------------------------------------------------------------- 182 //-------------------------------------------------------------------------
185 183
186 'renderDataHandler': function(anEvent) { 184 'renderDataHandler': function(anEvent) {
187 var titleColumnIndex; 185 var titleColumnIndex;
188 var i,c; 186 var i,c;
189 187
190 this.mainComponent().setNotesColumnIndex(anEvent.src().value); 188 this.mainComponent().setNotesColumnIndex(anEvent.src().value);
191 titleColumnIndex = this.mainComponent().titleColumnIndex(); 189 titleColumnIndex = this.mainComponent().titleColumnIndex();
192 190
193 c = this.mainComponent().parsedValues()[0].length; 191 c = this.mainComponent().parsedValues()[0].length;
194 for (i=0; i<c; i++) { 192 for (i=0; i<c; i++) {
195 if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) { 193 if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) {
196 this.getElement('th_' + i).removeClass('notesColumn'); 194 this.getElement('th_' + i).removeClass('notesColumn');
197 } 195 }
198 } 196 }
199 if (anEvent.src().value != -1) { 197 if (anEvent.src().value != -1) {
200 this.getElement('th_' + anEvent.src().value).addClass('notesColumn'); 198 this.getElement('th_' + anEvent.src().value).addClass('notesColumn');
201 } 199 }
202 200
203 this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); 201 this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues());
204 }, 202 },
205 203
206 //------------------------------------------------------------------------- 204 //-------------------------------------------------------------------------
207 __syntaxFix__: "syntax fix" 205 __syntaxFix__: "syntax fix"
208}); 206});
209 207
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 aa57580..4b2149a 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js
@@ -1,186 +1,184 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } 27if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
30if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; } 28if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; }
31 29
32//############################################################################# 30//#############################################################################
33 31
34Clipperz.PM.Components.Import.CSVImport.CSVImportTitle = function(anElement, args) { 32Clipperz.PM.Components.Import.CSVImport.CSVImportTitle = function(anElement, args) {
35 args = args || {}; 33 args = args || {};
36 34
37 Clipperz.PM.Components.Import.CSVImport.CSVImportTitle.superclass.constructor.call(this, anElement, args); 35 Clipperz.PM.Components.Import.CSVImport.CSVImportTitle.superclass.constructor.call(this, anElement, args);
38 this._mainComponent = args.mainComponent; 36 this._mainComponent = args.mainComponent;
39 37
40 return this; 38 return this;
41} 39}
42 40
43//============================================================================= 41//=============================================================================
44 42
45YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportTitle, Clipperz.PM.Components.BaseComponent, { 43YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportTitle, Clipperz.PM.Components.BaseComponent, {
46 44
47 'toString': function() { 45 'toString': function() {
48 return "Clipperz.PM.Components.Import.CSVImport.CSVImportTitle component"; 46 return "Clipperz.PM.Components.Import.CSVImport.CSVImportTitle component";
49 }, 47 },
50 48
51 //------------------------------------------------------------------------- 49 //-------------------------------------------------------------------------
52 50
53 'mainComponent': function() { 51 'mainComponent': function() {
54 return this._mainComponent; 52 return this._mainComponent;
55 }, 53 },
56 54
57 //------------------------------------------------------------------------- 55 //-------------------------------------------------------------------------
58 56
59 'render': function() { 57 'render': function() {
60 vartitleSelectorCheckboxCells; 58 vartitleSelectorCheckboxCells;
61 var titleColumnIndex; 59 var titleColumnIndex;
62 var i,c; 60 var i,c;
63 61
64 Clipperz.NotificationCenter.unregister(this); 62 Clipperz.NotificationCenter.unregister(this);
65 MochiKit.Signal.disconnectAllTo(this); 63 MochiKit.Signal.disconnectAllTo(this);
66 64
67 this.element().update(""); 65 this.element().update("");
68 66
69 titleColumnIndex = this.mainComponent().titleColumnIndex() 67 titleColumnIndex = this.mainComponent().titleColumnIndex()
70 titleSelectorCheckboxCells = []; 68 titleSelectorCheckboxCells = [];
71 c =this.mainComponent().parsedValues()[0].length; 69 c =this.mainComponent().parsedValues()[0].length;
72 for (i=0; i<c; i++) { 70 for (i=0; i<c; i++) {
73 if (this.mainComponent().isColumnSelected(i)) { 71 if (this.mainComponent().isColumnSelected(i)) {
74 titleSelectorCheckboxCells.push({tag:'th', valign:'top', id:this.getId('th_' + i), children:[ 72 titleSelectorCheckboxCells.push({tag:'th', valign:'top', id:this.getId('th_' + i), children:[
75 {tag:'input', type:'radio', id:this.getId('radio_' + i), name:'CSVImportTitleColumn', value:i}, 73 {tag:'input', type:'radio', id:this.getId('radio_' + i), name:'CSVImportTitleColumn', value:i},
76 {tag:'span', cls:'clickableSpan', id:this.getId('columnLabel_' + i), html:this.mainComponent().labelForColumn(i)} 74 {tag:'span', cls:'clickableSpan', id:this.getId('columnLabel_' + i), html:this.mainComponent().labelForColumn(i)}
77 ]}) 75 ]})
78 } 76 }
79 } 77 }
80 78
81 if (titleColumnIndex >= titleSelectorCheckboxCells.length) { 79 if (titleColumnIndex >= titleSelectorCheckboxCells.length) {
82 this.mainComponent().setTitleColumnIndex(-1); 80 this.mainComponent().setTitleColumnIndex(-1);
83 } 81 }
84 82
85 this.domHelper().append(this.element(), {tag:'div', children:[ 83 this.domHelper().append(this.element(), {tag:'div', children:[
86 {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Title']}, 84 {tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Title']},
87 {tag:'div', id:this.getId('dataDiv'), cls:'csvImportPreview', children:[ 85 {tag:'div', id:this.getId('dataDiv'), cls:'csvImportPreview', children:[
88 {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[ 86 {tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[
89 {tag:'thead', id:this.getId('previewData_thead'), children:[ 87 {tag:'thead', id:this.getId('previewData_thead'), children:[
90 {tag:'tr', children:titleSelectorCheckboxCells} 88 {tag:'tr', children:titleSelectorCheckboxCells}
91 ]}, 89 ]},
92 {tag:'tbody', id:this.getId('previewData_tbody'), children:[]} 90 {tag:'tbody', id:this.getId('previewData_tbody'), children:[]}
93 ]} 91 ]}
94 ]} 92 ]}
95 ]}); 93 ]});
96 94
97 this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); 95 this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues());
98 96
99 c =this.mainComponent().parsedValues()[0].length; 97 c =this.mainComponent().parsedValues()[0].length;
100 for (i=0; i<c; i++) { 98 for (i=0; i<c; i++) {
101 if (this.mainComponent().isColumnSelected(i)) { 99 if (this.mainComponent().isColumnSelected(i)) {
102 MochiKit.Signal.connect(this.getDom('radio_' + i), 'onclick', this, 'renderDataHandler'); 100 MochiKit.Signal.connect(this.getDom('radio_' + i), 'onclick', this, 'renderDataHandler');
103 if (Clipperz_IEisBroken != true) { 101 if (Clipperz_IEisBroken != true) {
104 MochiKit.Signal.connect(this.getDom('columnLabel_' + i), 'onclick', this.getDom('radio_' + i), 'click'); 102 MochiKit.Signal.connect(this.getDom('columnLabel_' + i), 'onclick', this.getDom('radio_' + i), 'click');
105 } 103 }
106 } 104 }
107 } 105 }
108 106
109 if (titleColumnIndex != -1) { 107 if (titleColumnIndex != -1) {
110 this.getDom('radio_' + titleColumnIndex).click(); 108 this.getDom('radio_' + titleColumnIndex).click();
111 } else { 109 } else {
112 this.mainComponent().nextButton().disable(); 110 this.mainComponent().nextButton().disable();
113 } 111 }
114 112
115 }, 113 },
116 114
117 //------------------------------------------------------------------------- 115 //-------------------------------------------------------------------------
118 116
119 'renderData': function(anElement, someData) { 117 'renderData': function(anElement, someData) {
120 var data; 118 var data;
121 var config; 119 var config;
122 var titleColumnIndex; 120 var titleColumnIndex;
123 var i,c; 121 var i,c;
124 122
125 // anElement.update(""); 123 // anElement.update("");
126 MochiKit.DOM.replaceChildNodes(anElement.dom); 124 MochiKit.DOM.replaceChildNodes(anElement.dom);
127 125
128 titleColumnIndex = this.mainComponent().titleColumnIndex() 126 titleColumnIndex = this.mainComponent().titleColumnIndex()
129 127
130 if (this.mainComponent().isFirstRowHeader()) { 128 if (this.mainComponent().isFirstRowHeader()) {
131 data = someData.slice(1); 129 data = someData.slice(1);
132 } else { 130 } else {
133 data = someData; 131 data = someData;
134 } 132 }
135 133
136 config = MochiKit.Base.map(MochiKit.Base.bind(function(aRowData) { 134 config = MochiKit.Base.map(MochiKit.Base.bind(function(aRowData) {
137 var result; 135 var result;
138 var i,c; 136 var i,c;
139 137
140 result = {tag:'tr', children:[]}; 138 result = {tag:'tr', children:[]};
141 c = aRowData.length; 139 c = aRowData.length;
142 for (i=0; i<c; i++) { 140 for (i=0; i<c; i++) {
143 if (this.mainComponent().isColumnSelected(i)) { 141 if (this.mainComponent().isColumnSelected(i)) {
144 var field; 142 var field;
145 143
146 field = aRowData[i]; 144 field = aRowData[i];
147 result.children.push({tag:'td', valign:'top', cls:((titleColumnIndex == i) ? 'titleColumn': ''), html:(MochiKit.Base.isNotEmpty(field) ? field.replace(/\n/g, '<br>') : '&nbsp;')}); 145 result.children.push({tag:'td', valign:'top', cls:((titleColumnIndex == i) ? 'titleColumn': ''), html:(MochiKit.Base.isNotEmpty(field) ? field.replace(/\n/g, '<br>') : '&nbsp;')});
148 } 146 }
149 } 147 }
150 148
151 return result; 149 return result;
152 }, this), data); 150 }, this), data);
153 151
154 MochiKit.Base.map(function(aRowConfig) {Clipperz.YUI.DomHelper.append(anElement, aRowConfig);}, config); 152 MochiKit.Base.map(function(aRowConfig) {Clipperz.YUI.DomHelper.append(anElement, aRowConfig);}, config);
155 153
156 Clipperz.Style.applyZebraStylesToTable(this.getId('previewDada')); 154 Clipperz.Style.applyZebraStylesToTable(this.getId('previewDada'));
157 }, 155 },
158 156
159 //------------------------------------------------------------------------- 157 //-------------------------------------------------------------------------
160 158
161 'renderDataHandler': function(anEvent) { 159 'renderDataHandler': function(anEvent) {
162 var i,c; 160 var i,c;
163 161
164 this.mainComponent().setTitleColumnIndex(anEvent.src().value); 162 this.mainComponent().setTitleColumnIndex(anEvent.src().value);
165 163
166 c = this.mainComponent().parsedValues()[0].length; 164 c = this.mainComponent().parsedValues()[0].length;
167 for (i=0; i<c; i++) { 165 for (i=0; i<c; i++) {
168 if (this.mainComponent().isColumnSelected(i)) { 166 if (this.mainComponent().isColumnSelected(i)) {
169 this.getElement('th_' + i).removeClass('titleColumn'); 167 this.getElement('th_' + i).removeClass('titleColumn');
170 } 168 }
171 } 169 }
172 this.getElement('th_' + anEvent.src().value).addClass('titleColumn'); 170 this.getElement('th_' + anEvent.src().value).addClass('titleColumn');
173 171
174 if (anEvent.src().value != -1) { 172 if (anEvent.src().value != -1) {
175 this.mainComponent().nextButton().enable(); 173 this.mainComponent().nextButton().enable();
176 } else { 174 } else {
177 this.mainComponent().nextButton().disable(); 175 this.mainComponent().nextButton().disable();
178 } 176 }
179 177
180 this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues()); 178 this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues());
181 }, 179 },
182 180
183 //------------------------------------------------------------------------- 181 //-------------------------------------------------------------------------
184 __syntaxFix__: "syntax fix" 182 __syntaxFix__: "syntax fix"
185}); 183});
186 184
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImportComponent.js
index c1dd1a9..bd305c3 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImportComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImportComponent.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } 27if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.Import.CSVImportComponent = function(anElement, args) { 31Clipperz.PM.Components.Import.CSVImportComponent = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 this._steps = this._steps || ['CSV_EDIT', 'CSV_COLUMNS', 'CSV_HEADER', 'CSV_TITLE', 'CSV_NOTES', 'CSV_FIELDS', 'PREVIEW', 'IMPORT']; 34 this._steps = this._steps || ['CSV_EDIT', 'CSV_COLUMNS', 'CSV_HEADER', 'CSV_TITLE', 'CSV_NOTES', 'CSV_FIELDS', 'PREVIEW', 'IMPORT'];
37 35
38 Clipperz.PM.Components.Import.CSVImportComponent.superclass.constructor.call(this, anElement, args); 36 Clipperz.PM.Components.Import.CSVImportComponent.superclass.constructor.call(this, anElement, args);
39 37
40 this._step1Component = null; 38 this._step1Component = null;
41 this._step2Component = null; 39 this._step2Component = null;
42 this._step3Component = null; 40 this._step3Component = null;
43 this._step4Component = null; 41 this._step4Component = null;
44 this._step5Component = null; 42 this._step5Component = null;
45 43
46 this._isFirstRowHeader = false; 44 this._isFirstRowHeader = false;
47 this._titleColumnIndex = -1; 45 this._titleColumnIndex = -1;
48 this._notesColumnIndex = -1; 46 this._notesColumnIndex = -1;
49 this._fieldSettings = {}; 47 this._fieldSettings = {};
50 this._skippedColumns = new Clipperz.Set(); 48 this._skippedColumns = new Clipperz.Set();
51 49
52 this.render(); 50 this.render();
53 51
54 return this; 52 return this;
55} 53}
56 54
57//============================================================================= 55//=============================================================================
58 56
59YAHOO.extendX(Clipperz.PM.Components.Import.CSVImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { 57YAHOO.extendX(Clipperz.PM.Components.Import.CSVImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, {
60 58
61 'toString': function() { 59 'toString': function() {
62 return "Clipperz.PM.Components.Import.CSVImportComponent component"; 60 return "Clipperz.PM.Components.Import.CSVImportComponent component";
63 }, 61 },
64 62
65 //------------------------------------------------------------------------- 63 //-------------------------------------------------------------------------
66 64
67 'render': function() { 65 'render': function() {
68 this.domHelper().append(this.element(), {tag:'div', cls:'csvImportWizard', children:[ 66 this.domHelper().append(this.element(), {tag:'div', cls:'csvImportWizard', children:[
69 {tag:'h3', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Title']}, 67 {tag:'h3', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Title']},
70 {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, 68 {tag:'div', cls:'importSteps', id:this.getId('importSteps')},
71 {tag:'div', cls:'importStepBlocks', children:[ 69 {tag:'div', cls:'importStepBlocks', children:[
72 {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ 70 {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[
73 {tag:'div', children:[ 71 {tag:'div', children:[
74 {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_csv_description']}, 72 {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_csv_description']},
75 {tag:'div', cls:'importOptionsParameters', children:[ 73 {tag:'div', cls:'importOptionsParameters', children:[
76 {tag:'div', cls:'CSVImportOptionsParameters', children:[ 74 {tag:'div', cls:'CSVImportOptionsParameters', children:[
77 {tag:'ul', children:[ 75 {tag:'ul', children:[
78 {tag:'li', children:[ 76 {tag:'li', children:[
79 {tag:'label', 'for':this.getId('CSV_inputOptions_separator'), html:"separator"}, 77 {tag:'label', 'for':this.getId('CSV_inputOptions_separator'), html:"separator"},
80 {tag:'select', name:this.getId('CSV_inputOptions_separator'), id:this.getId('CSV_inputOptions_separator'), children:[ 78 {tag:'select', name:this.getId('CSV_inputOptions_separator'), id:this.getId('CSV_inputOptions_separator'), children:[
81 {tag:'option', name:'comma', value:',', html:"comma (,)", selected:true}, 79 {tag:'option', name:'comma', value:',', html:"comma (,)", selected:true},
82 {tag:'option', name:'tab', value:'\t', html:"tab"} 80 {tag:'option', name:'tab', value:'\t', html:"tab"}
83 ]} 81 ]}
84 ]}, 82 ]},
85 83
86 {tag:'li', children:[ 84 {tag:'li', children:[
87 {tag:'label', 'for':this.getId('CSV_inputOptions_quote'), html:"quote"}, 85 {tag:'label', 'for':this.getId('CSV_inputOptions_quote'), html:"quote"},
88 {tag:'select', name:this.getId('CSV_inputOptions_quote'), id:this.getId('CSV_inputOptions_quote'), children:[ 86 {tag:'select', name:this.getId('CSV_inputOptions_quote'), id:this.getId('CSV_inputOptions_quote'), children:[
89 {tag:'option', name:'doubleQuote', value:'\"', html:"double quote (\")", selected:true}, 87 {tag:'option', name:'doubleQuote', value:'\"', html:"double quote (\")", selected:true},
90 {tag:'option', name:'singleQuote', value:'\'', html:"single quote (\')"} 88 {tag:'option', name:'singleQuote', value:'\'', html:"single quote (\')"}
91 ]} 89 ]}
92 ]}, 90 ]},
93 91
94 {tag:'li', children:[ 92 {tag:'li', children:[
95 {tag:'label', 'for':this.getId('CSV_inputOptions_escape'), html:"escape"}, 93 {tag:'label', 'for':this.getId('CSV_inputOptions_escape'), html:"escape"},
96 {tag:'select', name:this.getId('CSV_inputOptions_escape'), id:this.getId('CSV_inputOptions_escape'), children:[ 94 {tag:'select', name:this.getId('CSV_inputOptions_escape'), id:this.getId('CSV_inputOptions_escape'), children:[
97 {tag:'option', name:'doubleQuote', value:'\"', html:"double quote (\")", selected:true}, 95 {tag:'option', name:'doubleQuote', value:'\"', html:"double quote (\")", selected:true},
98 {tag:'option', name:'slash', value:'\/', html:"slash (\/)"}, 96 {tag:'option', name:'slash', value:'\/', html:"slash (\/)"},
99 {tag:'option', name:'backslash', value:'\\', html:"backslash (\\)"} 97 {tag:'option', name:'backslash', value:'\\', html:"backslash (\\)"}
100 ]} 98 ]}
101 ]} 99 ]}
102 ]} 100 ]}
103 ]} 101 ]}
104 ]}, 102 ]},
105 this.textAreaConfig() 103 this.textAreaConfig()
106 ]} 104 ]}
107 ]}, 105 ]},
108 {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[]}, 106 {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[]},
109 {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[]}, 107 {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[]},
110 {tag:'div', cls:'step_3', id:this.getId('step_3'), children:[]}, 108 {tag:'div', cls:'step_3', id:this.getId('step_3'), children:[]},
111 {tag:'div', cls:'step_4', id:this.getId('step_4'), children:[]}, 109 {tag:'div', cls:'step_4', id:this.getId('step_4'), children:[]},
112 {tag:'div', cls:'step_5', id:this.getId('step_5'), children:[]}, 110 {tag:'div', cls:'step_5', id:this.getId('step_5'), children:[]},
113 {tag:'div', cls:'step_6', id:this.getId('step_6'), children:[ 111 {tag:'div', cls:'step_6', id:this.getId('step_6'), children:[
114 {tag:'div', children:[ 112 {tag:'div', children:[
115 {tag:'div', id:this.getId('previewDiv'), html:"preview"} 113 {tag:'div', id:this.getId('previewDiv'), html:"preview"}
116 ]} 114 ]}
117 ]}, 115 ]},
118 {tag:'div', cls:'step_7', id:this.getId('step_7'), children:[ 116 {tag:'div', cls:'step_7', id:this.getId('step_7'), children:[
119 {tag:'div', children:[ 117 {tag:'div', children:[
120 {tag:'h4', html:"done"} 118 {tag:'h4', html:"done"}
121 ]} 119 ]}
122 ]} 120 ]}
123 ]}, 121 ]},
124 {tag:'div', cls:'importOptionsButtons', children:[ 122 {tag:'div', cls:'importOptionsButtons', children:[
125 {tag:'table', children:[ 123 {tag:'table', children:[
126 {tag:'tbody', children:[ 124 {tag:'tbody', children:[
127 {tag:'tr', children:[ 125 {tag:'tr', children:[
128 {tag:'td', html:'&nbsp;'}, 126 {tag:'td', html:'&nbsp;'},
129 {tag:'td', children:[ 127 {tag:'td', children:[
130 {tag:'div', id:this.getId('backActionButton')} 128 {tag:'div', id:this.getId('backActionButton')}
131 ]}, 129 ]},
132 {tag:'td', html:'&nbsp;'}, 130 {tag:'td', html:'&nbsp;'},
133 {tag:'td', children:[ 131 {tag:'td', children:[
134 {tag:'div', id:this.getId('nextActionButton')} 132 {tag:'div', id:this.getId('nextActionButton')}
135 ]}, 133 ]},
136 {tag:'td', html:'&nbsp;'} 134 {tag:'td', html:'&nbsp;'}
137 ]} 135 ]}
138 ]} 136 ]}
139 ]} 137 ]}
140 ]} 138 ]}
141 ]}); 139 ]});
142 140
143 this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); 141 this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this}));
144 this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); 142 this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this}));
145 143
146 this.updateSteps(); 144 this.updateSteps();
147 145
148 this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() 146 this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show()
149 this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 147 this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
150 this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 148 this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
151 this.getElement('step_3').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 149 this.getElement('step_3').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
152 this.getElement('step_4').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 150 this.getElement('step_4').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
153 this.getElement('step_5').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 151 this.getElement('step_5').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
154 this.getElement('step_6').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 152 this.getElement('step_6').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
155 this.getElement('step_7').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 153 this.getElement('step_7').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
156 154
157 // this.backButton().disable(); 155 // this.backButton().disable();
158 }, 156 },
159 157
160 //------------------------------------------------------------------------- 158 //-------------------------------------------------------------------------
161 159
162 'nextAction': function() { 160 'nextAction': function() {
163 switch (this.currentStep()) { 161 switch (this.currentStep()) {
164 case 0: //-> 1 162 case 0: //-> 1
165 Clipperz.PM.Components.MessageBox.showProgressPanel( 163 Clipperz.PM.Components.MessageBox.showProgressPanel(
166 MochiKit.Base.method(this, 'deferredParseValues'), 164 MochiKit.Base.method(this, 'deferredParseValues'),
167 MochiKit.Base.method(this, 'handleParseError'), 165 MochiKit.Base.method(this, 'handleParseError'),
168 this.getDom('nextActionButton') 166 this.getDom('nextActionButton')
169 ); 167 );
170 break; 168 break;
171 case 1: //-> 2 169 case 1: //-> 2
172 this.getElement('step_1').hide(); 170 this.getElement('step_1').hide();
173 this.step2Component().render(); 171 this.step2Component().render();
174 this.setCurrentStep(2); 172 this.setCurrentStep(2);
175 this.getElement('step_2').show(); 173 this.getElement('step_2').show();
176 break; 174 break;
177 case 2: //-> 3 175 case 2: //-> 3
178 this.getElement('step_2').hide(); 176 this.getElement('step_2').hide();
179 this.step3Component().render(); 177 this.step3Component().render();
180 this.setCurrentStep(3); 178 this.setCurrentStep(3);
181 this.getElement('step_3').show(); 179 this.getElement('step_3').show();
182 break; 180 break;
183 case 3: //-> 4 181 case 3: //-> 4
184 this.getElement('step_3').hide(); 182 this.getElement('step_3').hide();
185 this.step4Component().render(); 183 this.step4Component().render();
186 this.setCurrentStep(4); 184 this.setCurrentStep(4);
187 this.getElement('step_4').show(); 185 this.getElement('step_4').show();
188 break; 186 break;
189 case 4: //-> 5 187 case 4: //-> 5
190 this.getElement('step_4').hide(); 188 this.getElement('step_4').hide();
191 this.step5Component().render(); 189 this.step5Component().render();
192 this.setCurrentStep(5); 190 this.setCurrentStep(5);
193 this.getElement('step_5').show(); 191 this.getElement('step_5').show();
194 break; 192 break;
195 case 5: //-> 6 193 case 5: //-> 6
196 this.previewValues(); 194 this.previewValues();
197 break; 195 break;
198 case 6: //-> 7 196 case 6: //-> 7
199 this.importValues(); 197 this.importValues();
200 break; 198 break;
201 } 199 }
202 }, 200 },
203 201
204 //------------------------------------------------------------------------- 202 //-------------------------------------------------------------------------
205 203
206 'deferredParseValues': function() { 204 'deferredParseValues': function() {
207 var deferredResult; 205 var deferredResult;
208 206
209 deferredResult = new MochiKit.Async.Deferred(); 207 deferredResult = new MochiKit.Async.Deferred();
210//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("CSVImportComponent.deferredParseValues - 1 " + res.substring(0,50)); return res;}); 208//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("CSVImportComponent.deferredParseValues - 1 " + res.substring(0,50)); return res;});
211 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'parseImportData'); 209 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'parseImportData');
212//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("CSVImportComponent.deferredParseValues - 2 " + res.substring(0,50)); return res;}); 210//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("CSVImportComponent.deferredParseValues - 2 " + res.substring(0,50)); return res;});
213 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 211 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
214 this.startProcessing(); 212 this.startProcessing();
215 213
216 return res; 214 return res;
217 }, this)); 215 }, this));
218//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("CSVImportComponent.deferredParseValues - 3 " + res.substring(0,50)); return res;}); 216//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("CSVImportComponent.deferredParseValues - 3 " + res.substring(0,50)); return res;});
219 deferredResult.addCallback(MochiKit.Base.method(this, 'parseCSVValues')); 217 deferredResult.addCallback(MochiKit.Base.method(this, 'parseCSVValues'));
220//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("CSVImportComponent.deferredParseValues - 4 " + res); return res;}); 218//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("CSVImportComponent.deferredParseValues - 4 " + res); return res;});
221 deferredResult.addCallback(MochiKit.Base.method(this, 'setParsedValues')); 219 deferredResult.addCallback(MochiKit.Base.method(this, 'setParsedValues'));
222//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("CSVImportComponent.deferredParseValues - 5 " + res); return res;}); 220//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("CSVImportComponent.deferredParseValues - 5 " + res); return res;});
223 deferredResult.addCallback(MochiKit.Base.method(this.step1Component(), 'render')); 221 deferredResult.addCallback(MochiKit.Base.method(this.step1Component(), 'render'));
224//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("CSVImportComponent.deferredParseValues - 6 " + res); return res;}); 222//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("CSVImportComponent.deferredParseValues - 6 " + res); return res;});
225 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 223 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
226 this.processingDone(); 224 this.processingDone();
227 this.getElement('step_0').hide(); 225 this.getElement('step_0').hide();
228 this.getElement('step_1').show(); 226 this.getElement('step_1').show();
229 this.backButton().enable(); 227 this.backButton().enable();
230 228
231 return res; 229 return res;
232 }, this)); 230 }, this));
233//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("CSVImportComponent.deferredParseValues - 7 " + res); return res;}); 231//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("CSVImportComponent.deferredParseValues - 7 " + res); return res;});
234 deferredResult.callback(this.textAreaContent()); 232 deferredResult.callback(this.textAreaContent());
235 233
236 return deferredResult; 234 return deferredResult;
237 }, 235 },
238 236
239 //------------------------------------------------------------------------- 237 //-------------------------------------------------------------------------
240 238
241 'deferredPreviewValues': function() { 239 'deferredPreviewValues': function() {
242 var deferredResult; 240 var deferredResult;
243 241
244//MochiKit.Logging.logDebug(">>> CSVImportComponent.deferredPreviewValues"); 242//MochiKit.Logging.logDebug(">>> CSVImportComponent.deferredPreviewValues");
245 deferredResult = new MochiKit.Async.Deferred(); 243 deferredResult = new MochiKit.Async.Deferred();
246//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 1 " + res); return res;}); 244//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 1 " + res); return res;});
247 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'previewImportData'); 245 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'previewImportData');
248//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 2 " + res); return res;}); 246//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 2 " + res); return res;});
249 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 247 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
250 this.startProcessing(); 248 this.startProcessing();
251 249
252 return res; 250 return res;
253 }, this)); 251 }, this));
254//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 3 " + res); return res;}); 252//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 3 " + res); return res;});
255 deferredResult.addCallback(MochiKit.Base.method(this, 'processCSVParsedValues')); 253 deferredResult.addCallback(MochiKit.Base.method(this, 'processCSVParsedValues'));
256//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 4 " + res); return res;}); 254//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 4 " + res); return res;});
257 deferredResult.addCallback(MochiKit.Base.method(this, 'setProcessedValues')); 255 deferredResult.addCallback(MochiKit.Base.method(this, 'setProcessedValues'));
258//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 5 " + res); return res;}); 256//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 5 " + res); return res;});
259 deferredResult.addCallback(MochiKit.Base.method(this, 'previewRecordValues')); 257 deferredResult.addCallback(MochiKit.Base.method(this, 'previewRecordValues'));
260//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 6 " + res); return res;}); 258//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 6 " + res); return res;});
261 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 259 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
262 this.processingDone(); 260 this.processingDone();
263 this.getElement('step_5').hide(); 261 this.getElement('step_5').hide();
264 this.getElement('step_6').show(); 262 this.getElement('step_6').show();
265 this.backButton().enable(); 263 this.backButton().enable();
266 264
267 return res; 265 return res;
268 }, this)); 266 }, this));
269 deferredResult.callback(this.parsedValues()); 267 deferredResult.callback(this.parsedValues());
270//MochiKit.Logging.logDebug("<<< CSVImportComponent.deferredPreviewValues"); 268//MochiKit.Logging.logDebug("<<< CSVImportComponent.deferredPreviewValues");
271 269
272 return deferredResult; 270 return deferredResult;
273 }, 271 },
274 272
275 //------------------------------------------------------------------------- 273 //-------------------------------------------------------------------------
276 274
277 'csvProcessor': function() { 275 'csvProcessor': function() {
278 return new Clipperz.CSVProcessor({ 276 return new Clipperz.CSVProcessor({
279 quoteChar: this.getDom('CSV_inputOptions_quote').value, 277 quoteChar: this.getDom('CSV_inputOptions_quote').value,
280 escapeChar: this.getDom('CSV_inputOptions_escape').value, 278 escapeChar: this.getDom('CSV_inputOptions_escape').value,
281 separatorChar:this.getDom('CSV_inputOptions_separator').value, 279 separatorChar:this.getDom('CSV_inputOptions_separator').value,
282 binary:true 280 binary:true
283 }); 281 });
284 }, 282 },
285 283
286 //------------------------------------------------------------------------- 284 //-------------------------------------------------------------------------
287 285
288 'parseCSVValues': function(someData) { 286 'parseCSVValues': function(someData) {
289 var deferredResult; 287 var deferredResult;
290 var csvProcessor; 288 var csvProcessor;
291 289
292 csvProcessor = this.csvProcessor(); 290 csvProcessor = this.csvProcessor();
293 deferredResult = new MochiKit.Async.Deferred(); 291 deferredResult = new MochiKit.Async.Deferred();
294//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.parseKeePassValues - 1 " + res.substring(0,50)); return res;}); 292//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.parseKeePassValues - 1 " + res.substring(0,50)); return res;});
295 deferredResult.addCallback(function(res) { 293 deferredResult.addCallback(function(res) {
296 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:(res.length)}, res); 294 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:(res.length)}, res);
297 }) 295 })
298//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.parseKeePassValues - 2 " + res.substring(0,50)); return res;}); 296//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.parseKeePassValues - 2 " + res.substring(0,50)); return res;});
299 deferredResult.addCallback(MochiKit.Base.method(csvProcessor, 'deferredParse')); 297 deferredResult.addCallback(MochiKit.Base.method(csvProcessor, 'deferredParse'));
300//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.parseKeePassValues - 3 " + res); return res;}); 298//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.parseKeePassValues - 3 " + res); return res;});
301 deferredResult.callback(someData); 299 deferredResult.callback(someData);
302 300
303 return deferredResult; 301 return deferredResult;
304 }, 302 },
305 303
306 //------------------------------------------------------------------------- 304 //-------------------------------------------------------------------------
307 305
308 'processCSVParsedValues': function (someValues) { 306 'processCSVParsedValues': function (someValues) {
309 var deferredResult; 307 var deferredResult;
310 var records; 308 var records;
311 var titleColumnIndex; 309 var titleColumnIndex;
312 var notesColumnIndex; 310 var notesColumnIndex;
313 var i,c; 311 var i,c;
314 312
315 deferredResult = new MochiKit.Async.Deferred(); 313 deferredResult = new MochiKit.Async.Deferred();
316 records = []; 314 records = [];
317 315
318 titleColumnIndex = this.titleColumnIndex(); 316 titleColumnIndex = this.titleColumnIndex();
319 notesColumnIndex = this.notesColumnIndex(); 317 notesColumnIndex = this.notesColumnIndex();
320 318
321 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {steps:(someValues.length)}); 319 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {steps:(someValues.length)});
322 320
323 c = someValues.length; 321 c = someValues.length;
324 if (this.isFirstRowHeader()) { 322 if (this.isFirstRowHeader()) {
325 i = 1; 323 i = 1;
326 } else { 324 } else {
327 i = 0; 325 i = 0;
328 } 326 }
329 327
330 for( ; i<c; i++) { 328 for( ; i<c; i++) {
331 deferredResult.addCallback(MochiKit.Async.wait, 0.2); 329 deferredResult.addCallback(MochiKit.Async.wait, 0.2);
332 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {}); 330 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {});
333 deferredResult.addCallback(MochiKit.Base.bind(function(someRecords, someData) { 331 deferredResult.addCallback(MochiKit.Base.bind(function(someRecords, someData) {
334 var record; 332 var record;
335 var recordVersion; 333 var recordVersion;
336 var ii; 334 var ii;
337 335
338 record = new Clipperz.PM.DataModel.Record({user:this.user()}); 336 record = new Clipperz.PM.DataModel.Record({user:this.user()});
339 record.setLabel(someData[titleColumnIndex]); 337 record.setLabel(someData[titleColumnIndex]);
340 if (notesColumnIndex != -1) { 338 if (notesColumnIndex != -1) {
341 record.setNotes(someData[notesColumnIndex]); 339 record.setNotes(someData[notesColumnIndex]);
342 } 340 }
343 recordVersion = record.currentVersion() 341 recordVersion = record.currentVersion()
344 342
345 for (ii in someData) { 343 for (ii in someData) {
346 // if ((ii != titleColumnIndex) && (ii != notesColumnIndex) && (typeof(this.fieldSettings()[ii]) != 'undefined')) { 344 // if ((ii != titleColumnIndex) && (ii != notesColumnIndex) && (typeof(this.fieldSettings()[ii]) != 'undefined')) {
347 if ((ii != titleColumnIndex) && (ii != notesColumnIndex) && (this.isColumnSelected(ii))) { 345 if ((ii != titleColumnIndex) && (ii != notesColumnIndex) && (this.isColumnSelected(ii))) {
348 var recordField; 346 var recordField;
349 347
350 recordField = new Clipperz.PM.DataModel.RecordField({ 348 recordField = new Clipperz.PM.DataModel.RecordField({
351 recordVersion:recordVersion, 349 recordVersion:recordVersion,
352 label: this.labelForColumn(ii), 350 label: this.labelForColumn(ii),
353 value: someData[ii], 351 value: someData[ii],
354 type: this.typeForColumn(ii) 352 type: this.typeForColumn(ii)
355 }); 353 });
356 recordVersion.addField(recordField); 354 recordVersion.addField(recordField);
357 } 355 }
358 } 356 }
359 357
360 someRecords.push(record); 358 someRecords.push(record);
361 359
362 return someRecords; 360 return someRecords;
363 }, this), records, someValues[i]); 361 }, this), records, someValues[i]);
364 } 362 }
365 deferredResult.addCallback(MochiKit.Async.succeed, records); 363 deferredResult.addCallback(MochiKit.Async.succeed, records);
366 deferredResult.callback(); 364 deferredResult.callback();
367 365
368 return deferredResult; 366 return deferredResult;
369 }, 367 },
370 368
371 //------------------------------------------------------------------------- 369 //-------------------------------------------------------------------------
372 370
373 'step1Component': function() { 371 'step1Component': function() {
374 if (this._step1Component == null) { 372 if (this._step1Component == null) {
375 this._step1Component = new Clipperz.PM.Components.Import.CSVImport.CSVImportColumns(this.getElement('step_1'), {mainComponent:this}); 373 this._step1Component = new Clipperz.PM.Components.Import.CSVImport.CSVImportColumns(this.getElement('step_1'), {mainComponent:this});
376 } 374 }
377 375
378 return this._step1Component; 376 return this._step1Component;
379 }, 377 },
380 378
381 'step2Component': function() { 379 'step2Component': function() {
382 if (this._step2Component == null) { 380 if (this._step2Component == null) {
383 this._step2Component = new Clipperz.PM.Components.Import.CSVImport.CSVImportHeader(this.getElement('step_2'), {mainComponent:this}); 381 this._step2Component = new Clipperz.PM.Components.Import.CSVImport.CSVImportHeader(this.getElement('step_2'), {mainComponent:this});
384 } 382 }
385 383
386 return this._step2Component; 384 return this._step2Component;
387 }, 385 },
388 386
389 'step3Component': function() { 387 'step3Component': function() {
390 if (this._step3Component == null) { 388 if (this._step3Component == null) {
391 this._step3Component = new Clipperz.PM.Components.Import.CSVImport.CSVImportTitle(this.getElement('step_3'), {mainComponent:this}); 389 this._step3Component = new Clipperz.PM.Components.Import.CSVImport.CSVImportTitle(this.getElement('step_3'), {mainComponent:this});
392 } 390 }
393 391
394 return this._step3Component; 392 return this._step3Component;
395 }, 393 },
396 394
397 'step4Component': function() { 395 'step4Component': function() {
398 if (this._step4Component == null) { 396 if (this._step4Component == null) {
399 this._step4Component = new Clipperz.PM.Components.Import.CSVImport.CSVImportNotes(this.getElement('step_4'), {mainComponent:this}); 397 this._step4Component = new Clipperz.PM.Components.Import.CSVImport.CSVImportNotes(this.getElement('step_4'), {mainComponent:this});
400 } 398 }
401 399
402 return this._step4Component; 400 return this._step4Component;
403 }, 401 },
404 402
405 'step5Component': function() { 403 'step5Component': function() {
406 if (this._step5Component == null) { 404 if (this._step5Component == null) {
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/ClipperzImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/ClipperzImportComponent.js
index c3d2fac..d74961b 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/ClipperzImportComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/ClipperzImportComponent.js
@@ -1,209 +1,207 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } 27if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.Import.ClipperzImportComponent = function(anElement, args) { 31Clipperz.PM.Components.Import.ClipperzImportComponent = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.Import.ClipperzImportComponent.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.Import.ClipperzImportComponent.superclass.constructor.call(this, anElement, args);
37 35
38 this.render(); 36 this.render();
39 37
40 return this; 38 return this;
41} 39}
42 40
43//============================================================================= 41//=============================================================================
44 42
45YAHOO.extendX(Clipperz.PM.Components.Import.ClipperzImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { 43YAHOO.extendX(Clipperz.PM.Components.Import.ClipperzImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, {
46 44
47 'toString': function() { 45 'toString': function() {
48 return "Clipperz.PM.Components.Import.ClipperzImportComponent component"; 46 return "Clipperz.PM.Components.Import.ClipperzImportComponent component";
49 }, 47 },
50 48
51 //------------------------------------------------------------------------- 49 //-------------------------------------------------------------------------
52 50
53 'render': function() { 51 'render': function() {
54//MochiKit.Logging.logDebug(">>> Import.ClipperzImportComponent.render"); 52//MochiKit.Logging.logDebug(">>> Import.ClipperzImportComponent.render");
55 this.domHelper().append(this.element(), {tag:'div', cls:'clipperzImportWizard', children:[ 53 this.domHelper().append(this.element(), {tag:'div', cls:'clipperzImportWizard', children:[
56 {tag:'h3', htmlString:Clipperz.PM.Strings['Clipperz_ImportWizard_Title']}, 54 {tag:'h3', htmlString:Clipperz.PM.Strings['Clipperz_ImportWizard_Title']},
57 {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, 55 {tag:'div', cls:'importSteps', id:this.getId('importSteps')},
58 {tag:'div', cls:'importStepBlocks', children:[ 56 {tag:'div', cls:'importStepBlocks', children:[
59 {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ 57 {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[
60 {tag:'div', children:[ 58 {tag:'div', children:[
61 {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_clipperz_description']}, 59 {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_clipperz_description']},
62 {tag:'div', cls:'importOptionsParameters', children:[]}, 60 {tag:'div', cls:'importOptionsParameters', children:[]},
63 this.textAreaConfig() 61 this.textAreaConfig()
64 ]} 62 ]}
65 ]}, 63 ]},
66 {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ 64 {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[
67 {tag:'div', children:[ 65 {tag:'div', children:[
68 {tag:'div', id:this.getId('previewDiv'), html:"preview"} 66 {tag:'div', id:this.getId('previewDiv'), html:"preview"}
69 ]} 67 ]}
70 ]}, 68 ]},
71 {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[ 69 {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[
72 {tag:'div', children:[ 70 {tag:'div', children:[
73 {tag:'h4', html:"done"} 71 {tag:'h4', html:"done"}
74 ]} 72 ]}
75 ]} 73 ]}
76 ]}, 74 ]},
77 {tag:'div', cls:'importOptionsButtons', children:[ 75 {tag:'div', cls:'importOptionsButtons', children:[
78 {tag:'table', children:[ 76 {tag:'table', children:[
79 {tag:'tbody', children:[ 77 {tag:'tbody', children:[
80 {tag:'tr', children:[ 78 {tag:'tr', children:[
81 {tag:'td', html:'&nbsp;'}, 79 {tag:'td', html:'&nbsp;'},
82 {tag:'td', children:[ 80 {tag:'td', children:[
83 {tag:'div', id:this.getId('backActionButton')} 81 {tag:'div', id:this.getId('backActionButton')}
84 ]}, 82 ]},
85 {tag:'td', html:'&nbsp;'}, 83 {tag:'td', html:'&nbsp;'},
86 {tag:'td', children:[ 84 {tag:'td', children:[
87 {tag:'div', id:this.getId('nextActionButton')} 85 {tag:'div', id:this.getId('nextActionButton')}
88 ]}, 86 ]},
89 {tag:'td', html:'&nbsp;'} 87 {tag:'td', html:'&nbsp;'}
90 ]} 88 ]}
91 ]} 89 ]}
92 ]} 90 ]}
93 ]} 91 ]}
94 ]}); 92 ]});
95 93
96 this.updateSteps(); 94 this.updateSteps();
97 95
98 this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); 96 this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this}));
99 this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); 97 this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this}));
100 98
101 this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() 99 this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show()
102 this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 100 this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
103 this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 101 this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
104//MochiKit.Logging.logDebug("<<< Import.ClipperzImportComponent.render"); 102//MochiKit.Logging.logDebug("<<< Import.ClipperzImportComponent.render");
105 }, 103 },
106 104
107 //------------------------------------------------------------------------- 105 //-------------------------------------------------------------------------
108 106
109 'nextAction': function() { 107 'nextAction': function() {
110 switch (this.currentStep()) { 108 switch (this.currentStep()) {
111 case 0: //-> 1 109 case 0: //-> 1
112 this.previewValues(); 110 this.previewValues();
113 break; 111 break;
114 case 1: //-> 2 112 case 1: //-> 2
115 this.importValues(); 113 this.importValues();
116 break; 114 break;
117 } 115 }
118 }, 116 },
119 117
120 //------------------------------------------------------------------------- 118 //-------------------------------------------------------------------------
121 119
122 'deferredPreviewValues': function() { 120 'deferredPreviewValues': function() {
123 var deferredResult; 121 var deferredResult;
124 122
125 deferredResult = new MochiKit.Async.Deferred(); 123 deferredResult = new MochiKit.Async.Deferred();
126 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 124 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
127 this.startProcessing(); 125 this.startProcessing();
128 126
129 return res; 127 return res;
130 }, this)); 128 }, this));
131 deferredResult.addCallback(MochiKit.Base.method(this, 'processClipperzValues')); 129 deferredResult.addCallback(MochiKit.Base.method(this, 'processClipperzValues'));
132 deferredResult.addCallback(MochiKit.Base.method(this, 'setProcessedValues')); 130 deferredResult.addCallback(MochiKit.Base.method(this, 'setProcessedValues'));
133 deferredResult.addCallback(MochiKit.Base.method(this, 'previewRecordValues')); 131 deferredResult.addCallback(MochiKit.Base.method(this, 'previewRecordValues'));
134 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 132 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
135 this.processingDone(); 133 this.processingDone();
136 this.getElement('step_0').hide(); 134 this.getElement('step_0').hide();
137 this.getElement('step_1').show(); 135 this.getElement('step_1').show();
138 this.backButton().enable(); 136 this.backButton().enable();
139 137
140 return res; 138 return res;
141 }, this)); 139 }, this));
142 // deferredResult.addErrback(MochiKit.Base.bind(function() { 140 // deferredResult.addErrback(MochiKit.Base.bind(function() {
143 // this.processingAborted(); 141 // this.processingAborted();
144 // }, this)) 142 // }, this))
145 deferredResult.callback(this.textAreaContent()); 143 deferredResult.callback(this.textAreaContent());
146 144
147 return deferredResult; 145 return deferredResult;
148 }, 146 },
149 147
150 //------------------------------------------------------------------------- 148 //-------------------------------------------------------------------------
151 149
152 'processClipperzValues': function(someData) { 150 'processClipperzValues': function(someData) {
153 var deferredResult; 151 var deferredResult;
154 152
155 deferredResult = new MochiKit.Async.Deferred(); 153 deferredResult = new MochiKit.Async.Deferred();
156//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Record.processClipperzValues - 1: " + res); return res;}); 154//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Record.processClipperzValues - 1: " + res); return res;});
157 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'parseImportData'); 155 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'parseImportData');
158//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Record.processClipperzValues - 2: " + res); return res;}); 156//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Record.processClipperzValues - 2: " + res); return res;});
159 deferredResult.addCallback(Clipperz.Base.evalJSON); 157 deferredResult.addCallback(Clipperz.Base.evalJSON);
160//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Record.processClipperzValues - 3: " + res); return res;}); 158//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Record.processClipperzValues - 3: " + res); return res;});
161 deferredResult.addCallback(function(res) { 159 deferredResult.addCallback(function(res) {
162 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:(res.length)}, res); 160 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:(res.length)}, res);
163 }) 161 })
164//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Record.processClipperzValues - 4: " + res); return res;}); 162//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Record.processClipperzValues - 4: " + res); return res;});
165 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'previewImportData'); 163 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'previewImportData');
166//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Record.processClipperzValues - 5: " + res); return res;}); 164//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Record.processClipperzValues - 5: " + res); return res;});
167 deferredResult.addCallback(MochiKit.Base.bind(function(someClipperzValues) { 165 deferredResult.addCallback(MochiKit.Base.bind(function(someClipperzValues) {
168 var innerDeferredResult; 166 var innerDeferredResult;
169 var records; 167 var records;
170 var i,c; 168 var i,c;
171 169
172 innerDeferredResult = new MochiKit.Async.Deferred(); 170 innerDeferredResult = new MochiKit.Async.Deferred();
173 records = []; 171 records = [];
174 172
175 c = someClipperzValues.length; 173 c = someClipperzValues.length;
176 for(i=0; i<c; i++) { 174 for(i=0; i<c; i++) {
177 innerDeferredResult.addCallback(MochiKit.Async.wait, 0.2); 175 innerDeferredResult.addCallback(MochiKit.Async.wait, 0.2);
178 innerDeferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {}); 176 innerDeferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {});
179 innerDeferredResult.addCallback(MochiKit.Base.bind(function(someRecords, someData) { 177 innerDeferredResult.addCallback(MochiKit.Base.bind(function(someRecords, someData) {
180 var record; 178 var record;
181 var recordVersion; 179 var recordVersion;
182 180
183//MochiKit.Logging.logDebug("=== someData: " + Clipperz.Base.serializeJSON(someData)); 181//MochiKit.Logging.logDebug("=== someData: " + Clipperz.Base.serializeJSON(someData));
184 record = new Clipperz.PM.DataModel.Record({user:this.user()}); 182 record = new Clipperz.PM.DataModel.Record({user:this.user()});
185 record.setLabel(someData['label']); 183 record.setLabel(someData['label']);
186 record.setShouldProcessData(true); 184 record.setShouldProcessData(true);
187 record.processData(someData); 185 record.processData(someData);
188 186
189 someRecords.push(record); 187 someRecords.push(record);
190 188
191 return someRecords; 189 return someRecords;
192 }, this), records, someClipperzValues[i]); 190 }, this), records, someClipperzValues[i]);
193 } 191 }
194 innerDeferredResult.addCallback(MochiKit.Async.succeed, records); 192 innerDeferredResult.addCallback(MochiKit.Async.succeed, records);
195 innerDeferredResult.callback(); 193 innerDeferredResult.callback();
196 194
197 return innerDeferredResult; 195 return innerDeferredResult;
198 }, this)); 196 }, this));
199//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Record.processClipperzValues - 6: " + res); return res;}); 197//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Record.processClipperzValues - 6: " + res); return res;});
200 deferredResult.callback(someData); 198 deferredResult.callback(someData);
201 199
202 return deferredResult; 200 return deferredResult;
203 }, 201 },
204 202
205 203
206 //------------------------------------------------------------------------- 204 //-------------------------------------------------------------------------
207 __syntaxFix__: "syntax fix" 205 __syntaxFix__: "syntax fix"
208}); 206});
209 207
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/ExcelImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/ExcelImportComponent.js
index ad0d985..859c190 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/ExcelImportComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/ExcelImportComponent.js
@@ -1,131 +1,129 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } 27if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.Import.ExcelImportComponent = function(anElement, args) { 31Clipperz.PM.Components.Import.ExcelImportComponent = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 this._steps = ['EXCEL_EDIT', 'CSV_COLUMNS', 'CSV_HEADER', 'CSV_TITLE', 'CSV_NOTES', 'CSV_FIELDS', 'PREVIEW', 'IMPORT']; 34 this._steps = ['EXCEL_EDIT', 'CSV_COLUMNS', 'CSV_HEADER', 'CSV_TITLE', 'CSV_NOTES', 'CSV_FIELDS', 'PREVIEW', 'IMPORT'];
37 35
38 Clipperz.PM.Components.Import.ExcelImportComponent.superclass.constructor.call(this, anElement, args); 36 Clipperz.PM.Components.Import.ExcelImportComponent.superclass.constructor.call(this, anElement, args);
39 37
40 return this; 38 return this;
41} 39}
42 40
43//============================================================================= 41//=============================================================================
44 42
45YAHOO.extendX(Clipperz.PM.Components.Import.ExcelImportComponent, Clipperz.PM.Components.Import.CSVImportComponent, { 43YAHOO.extendX(Clipperz.PM.Components.Import.ExcelImportComponent, Clipperz.PM.Components.Import.CSVImportComponent, {
46 44
47 'toString': function() { 45 'toString': function() {
48 return "Clipperz.PM.Components.Import.ExcelImportComponent component"; 46 return "Clipperz.PM.Components.Import.ExcelImportComponent component";
49 }, 47 },
50 48
51 //------------------------------------------------------------------------- 49 //-------------------------------------------------------------------------
52 50
53 'render': function() { 51 'render': function() {
54//MochiKit.Logging.logDebug(">>> Import.ExcelImportComponent.render"); 52//MochiKit.Logging.logDebug(">>> Import.ExcelImportComponent.render");
55 this.domHelper().append(this.element(), {tag:'div', cls:'excelImportWizard', children:[ 53 this.domHelper().append(this.element(), {tag:'div', cls:'excelImportWizard', children:[
56 {tag:'h3', htmlString:Clipperz.PM.Strings['Excel_ImportWizard_Title']}, 54 {tag:'h3', htmlString:Clipperz.PM.Strings['Excel_ImportWizard_Title']},
57 {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, 55 {tag:'div', cls:'importSteps', id:this.getId('importSteps')},
58 {tag:'div', cls:'importStepBlocks', children:[ 56 {tag:'div', cls:'importStepBlocks', children:[
59 {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ 57 {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[
60 {tag:'div', children:[ 58 {tag:'div', children:[
61 {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_excel_description']}, 59 {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_excel_description']},
62 {tag:'div', cls:'importOptionsParameters', children:[]}, 60 {tag:'div', cls:'importOptionsParameters', children:[]},
63 this.textAreaConfig() 61 this.textAreaConfig()
64 ]} 62 ]}
65 ]}, 63 ]},
66 {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[]}, 64 {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[]},
67 {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[]}, 65 {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[]},
68 {tag:'div', cls:'step_3', id:this.getId('step_3'), children:[]}, 66 {tag:'div', cls:'step_3', id:this.getId('step_3'), children:[]},
69 {tag:'div', cls:'step_4', id:this.getId('step_4'), children:[]}, 67 {tag:'div', cls:'step_4', id:this.getId('step_4'), children:[]},
70 {tag:'div', cls:'step_5', id:this.getId('step_5'), children:[]}, 68 {tag:'div', cls:'step_5', id:this.getId('step_5'), children:[]},
71 {tag:'div', cls:'step_6', id:this.getId('step_6'), children:[ 69 {tag:'div', cls:'step_6', id:this.getId('step_6'), children:[
72 {tag:'div', children:[ 70 {tag:'div', children:[
73 {tag:'div', id:this.getId('previewDiv'), html:"preview"} 71 {tag:'div', id:this.getId('previewDiv'), html:"preview"}
74 ]} 72 ]}
75 ]}, 73 ]},
76 {tag:'div', cls:'step_7', id:this.getId('step_7'), children:[ 74 {tag:'div', cls:'step_7', id:this.getId('step_7'), children:[
77 {tag:'div', children:[ 75 {tag:'div', children:[
78 {tag:'h4', html:"done"} 76 {tag:'h4', html:"done"}
79 ]} 77 ]}
80 ]} 78 ]}
81 ]}, 79 ]},
82 {tag:'div', cls:'importOptionsButtons', children:[ 80 {tag:'div', cls:'importOptionsButtons', children:[
83 {tag:'table', children:[ 81 {tag:'table', children:[
84 {tag:'tbody', children:[ 82 {tag:'tbody', children:[
85 {tag:'tr', children:[ 83 {tag:'tr', children:[
86 {tag:'td', html:'&nbsp;'}, 84 {tag:'td', html:'&nbsp;'},
87 {tag:'td', children:[ 85 {tag:'td', children:[
88 {tag:'div', id:this.getId('backActionButton')} 86 {tag:'div', id:this.getId('backActionButton')}
89 ]}, 87 ]},
90 {tag:'td', html:'&nbsp;'}, 88 {tag:'td', html:'&nbsp;'},
91 {tag:'td', children:[ 89 {tag:'td', children:[
92 {tag:'div', id:this.getId('nextActionButton')} 90 {tag:'div', id:this.getId('nextActionButton')}
93 ]}, 91 ]},
94 {tag:'td', html:'&nbsp;'} 92 {tag:'td', html:'&nbsp;'}
95 ]} 93 ]}
96 ]} 94 ]}
97 ]} 95 ]}
98 ]} 96 ]}
99 ]}); 97 ]});
100 98
101 this.updateSteps(); 99 this.updateSteps();
102 100
103 this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); 101 this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this}));
104 this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); 102 this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this}));
105 103
106 this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() 104 this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show()
107 this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 105 this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
108 this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 106 this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
109 this.getElement('step_3').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 107 this.getElement('step_3').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
110 this.getElement('step_4').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 108 this.getElement('step_4').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
111 this.getElement('step_5').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 109 this.getElement('step_5').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
112 this.getElement('step_6').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 110 this.getElement('step_6').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
113 this.getElement('step_7').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 111 this.getElement('step_7').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
114//MochiKit.Logging.logDebug("<<< Import.ExcelImportComponent.render"); 112//MochiKit.Logging.logDebug("<<< Import.ExcelImportComponent.render");
115 }, 113 },
116 114
117 //------------------------------------------------------------------------- 115 //-------------------------------------------------------------------------
118 116
119 'csvProcessor': function() { 117 'csvProcessor': function() {
120 return new Clipperz.CSVProcessor({ 118 return new Clipperz.CSVProcessor({
121 // quoteChar: this.getDom('CSV_inputOptions_quote').value, 119 // quoteChar: this.getDom('CSV_inputOptions_quote').value,
122 // escapeChar: this.getDom('CSV_inputOptions_escape').value, 120 // escapeChar: this.getDom('CSV_inputOptions_escape').value,
123 separatorChar:'\t', 121 separatorChar:'\t',
124 binary:true 122 binary:true
125 }); 123 });
126 }, 124 },
127 125
128 //------------------------------------------------------------------------- 126 //-------------------------------------------------------------------------
129 __syntaxFix__: "syntax fix" 127 __syntaxFix__: "syntax fix"
130}); 128});
131 129
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js
index a55455a..3c23b1c 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } 27if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.Import.GenericImportComponent = function(anElement, args) { 31Clipperz.PM.Components.Import.GenericImportComponent = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 this._steps = this._steps || ['EDIT', 'PREVIEW', 'IMPORT']; 34 this._steps = this._steps || ['EDIT', 'PREVIEW', 'IMPORT'];
37 35
38 Clipperz.PM.Components.Import.GenericImportComponent.superclass.constructor.call(this, anElement, args); 36 Clipperz.PM.Components.Import.GenericImportComponent.superclass.constructor.call(this, anElement, args);
39 37
40 this._user = args['user']; 38 this._user = args['user'];
41 39
42 this._currentStep = 0; 40 this._currentStep = 0;
43 this._currentStatus = 'IDLE'; //'PROCESSING' 41 this._currentStatus = 'IDLE'; //'PROCESSING'
44 42
45 this._parsedValues = null; 43 this._parsedValues = null;
46 this._processedValues = null; 44 this._processedValues = null;
47 45
48 this._backButton = null; 46 this._backButton = null;
49 this._nextButton = null; 47 this._nextButton = null;
50 48
51 Clipperz.NotificationCenter.register(null, 'importProcessorProgressUpdate', this, 'updateProgressDialogStatus'); 49 Clipperz.NotificationCenter.register(null, 'importProcessorProgressUpdate', this, 'updateProgressDialogStatus');
52 50
53 return this; 51 return this;
54} 52}
55 53
56//============================================================================= 54//=============================================================================
57 55
58YAHOO.extendX(Clipperz.PM.Components.Import.GenericImportComponent, Clipperz.PM.Components.BaseComponent, { 56YAHOO.extendX(Clipperz.PM.Components.Import.GenericImportComponent, Clipperz.PM.Components.BaseComponent, {
59 57
60 'toString': function() { 58 'toString': function() {
61 return "Clipperz.PM.Components.Import.GenericImportComponent component"; 59 return "Clipperz.PM.Components.Import.GenericImportComponent component";
62 }, 60 },
63 61
64 //------------------------------------------------------------------------- 62 //-------------------------------------------------------------------------
65 63
66 'user': function() { 64 'user': function() {
67 return this._user; 65 return this._user;
68 }, 66 },
69 67
70 //------------------------------------------------------------------------- 68 //-------------------------------------------------------------------------
71 69
72 'textAreaConfig': function() { 70 'textAreaConfig': function() {
73 return {tag:'textarea', name:this.getId('importTextArea'), cls:'importTextArea', id:this.getId('importTextArea'), cols:60, rows:15, html:""}; 71 return {tag:'textarea', name:this.getId('importTextArea'), cls:'importTextArea', id:this.getId('importTextArea'), cols:60, rows:15, html:""};
74 }, 72 },
75 73
76 'textAreaContent': function() { 74 'textAreaContent': function() {
77 return this.getDom('importTextArea').value 75 return this.getDom('importTextArea').value
78 }, 76 },
79 77
80 //------------------------------------------------------------------------- 78 //-------------------------------------------------------------------------
81 79
82 'steps': function() { 80 'steps': function() {
83 return this._steps; 81 return this._steps;
84 }, 82 },
85 83
86 'currentStep': function() { 84 'currentStep': function() {
87 return this._currentStep; 85 return this._currentStep;
88 }, 86 },
89 87
90 'setCurrentStep': function(aValue) { 88 'setCurrentStep': function(aValue) {
91 this._currentStep = aValue; 89 this._currentStep = aValue;
92 this.updateSteps(); 90 this.updateSteps();
93 }, 91 },
94 92
95 //------------------------------------------------------------------------- 93 //-------------------------------------------------------------------------
96 94
97 'currentStatus': function() { 95 'currentStatus': function() {
98 return this._currentStatus; 96 return this._currentStatus;
99 }, 97 },
100 98
101 'startProcessing': function() { 99 'startProcessing': function() {
102 this._currentStatus = 'PROCESSING'; 100 this._currentStatus = 'PROCESSING';
103 this.updateSteps(); 101 this.updateSteps();
104 }, 102 },
105 103
106 'processingDone': function() { 104 'processingDone': function() {
107 this._currentStatus = 'IDLE'; 105 this._currentStatus = 'IDLE';
108 this.setCurrentStep(this.currentStep() + 1); 106 this.setCurrentStep(this.currentStep() + 1);
109 }, 107 },
110 108
111 'processingAborted': function() { 109 'processingAborted': function() {
112 this._currentStatus = 'IDLE'; 110 this._currentStatus = 'IDLE';
113 this.updateSteps(); 111 this.updateSteps();
114 }, 112 },
115 113
116 //------------------------------------------------------------------------- 114 //-------------------------------------------------------------------------
117 115
118 'stepsConfig': function() { 116 'stepsConfig': function() {
119 var result; 117 var result;
120 var i,c; 118 var i,c;
121 119
122 result = []; 120 result = [];
123 c = this.steps().length; 121 c = this.steps().length;
124 for (i=0; i<c; i++) { 122 for (i=0; i<c; i++) {
125 var cls; 123 var cls;
126 124
127 if (this.currentStep() == i) { 125 if (this.currentStep() == i) {
128 if (this.currentStatus() == 'IDLE') { 126 if (this.currentStatus() == 'IDLE') {
129 cls = 'current'; 127 cls = 'current';
130 } else { 128 } else {
131 cls = 'currentProcessing'; 129 cls = 'currentProcessing';
132 } 130 }
133 } else { 131 } else {
134 cls = ""; 132 cls = "";
135 } 133 }
136 134
137 result.push({tag:'td', cls:cls, children:[ 135 result.push({tag:'td', cls:cls, children:[
138 {tag:'div', children:[{tag:'span', htmlString:Clipperz.PM.Strings['ImportWizard'][this.steps()[i]]}]} 136 {tag:'div', children:[{tag:'span', htmlString:Clipperz.PM.Strings['ImportWizard'][this.steps()[i]]}]}
139 ]}) 137 ]})
140 if (i < (c-1)) { 138 if (i < (c-1)) {
141 if ((this.currentStep() == i) && (this.currentStatus() == 'PROCESSING')) { 139 if ((this.currentStep() == i) && (this.currentStatus() == 'PROCESSING')) {
142 cls = 'stepSeparatorProcessing'; 140 cls = 'stepSeparatorProcessing';
143 } else { 141 } else {
144 cls = 'stepSeparator'; 142 cls = 'stepSeparator';
145 } 143 }
146 144
147 result.push({tag:'td', cls:cls, children:[ 145 result.push({tag:'td', cls:cls, children:[
148 {tag:'div', children:[{tag:'span', html:">"}]} 146 {tag:'div', children:[{tag:'span', html:">"}]}
149 ]}); 147 ]});
150 } 148 }
151 } 149 }
152 150
153 result = [{tag:'div', cls:'importWizardStepsBox', children:[ 151 result = [{tag:'div', cls:'importWizardStepsBox', children:[
154 {tag:'div', cls:'importWizardStepsInnerBox', children:[ 152 {tag:'div', cls:'importWizardStepsInnerBox', children:[
155 {tag:'table', cls:'importWizardSteps', children:[ 153 {tag:'table', cls:'importWizardSteps', children:[
156 {tag:'tbody', children:[ 154 {tag:'tbody', children:[
157 {tag:'tr', children:result} 155 {tag:'tr', children:result}
158 ]} 156 ]}
159 ]} 157 ]}
160 ]}, 158 ]},
161 {tag:'div', cls:'importWizardStepsBoxFooter'} 159 {tag:'div', cls:'importWizardStepsBoxFooter'}
162 ]}]; 160 ]}];
163 161
164 return result; 162 return result;
165 }, 163 },
166 164
167 'updateSteps': function() { 165 'updateSteps': function() {
168 this.getElement('importSteps').update(""); 166 this.getElement('importSteps').update("");
169 Clipperz.YUI.DomHelper.append(this.getDom('importSteps'), {tag:'div', children:this.stepsConfig()}); 167 Clipperz.YUI.DomHelper.append(this.getDom('importSteps'), {tag:'div', children:this.stepsConfig()});
170 }, 168 },
171 169
172 //------------------------------------------------------------------------- 170 //-------------------------------------------------------------------------
173 171
174 'backAction': function() { 172 'backAction': function() {
175//MochiKit.Logging.logDebug(">>> backAction"); 173//MochiKit.Logging.logDebug(">>> backAction");
176 if (this.currentStep() == 0) { 174 if (this.currentStep() == 0) {
177 Clipperz.NotificationCenter.notify(this, 'importCancelled'); 175 Clipperz.NotificationCenter.notify(this, 'importCancelled');
178 } else { 176 } else {
179 this.getElement('step_' + this.currentStep()).hide(); 177 this.getElement('step_' + this.currentStep()).hide();
180 this.setCurrentStep(this.currentStep() - 1); 178 this.setCurrentStep(this.currentStep() - 1);
181 this.getElement('step_' + this.currentStep()).show(); 179 this.getElement('step_' + this.currentStep()).show();
182 180
183 this.nextButton().enable(); 181 this.nextButton().enable();
184 } 182 }
185//MochiKit.Logging.logDebug("<<< backAction"); 183//MochiKit.Logging.logDebug("<<< backAction");
186 }, 184 },
187 185
188 //------------------------------------------------------------------------- 186 //-------------------------------------------------------------------------
189 187
190 'backButton': function() { 188 'backButton': function() {
191 return this._backButton; 189 return this._backButton;
192 }, 190 },
193 191
194 'setBackButton': function(aValue) { 192 'setBackButton': function(aValue) {
195 this._backButton = aValue; 193 this._backButton = aValue;
196 }, 194 },
197 195
198 'nextButton': function() { 196 'nextButton': function() {
199 return this._nextButton; 197 return this._nextButton;
200 }, 198 },
201 199
202 'setNextButton': function(aValue) { 200 'setNextButton': function(aValue) {
203 this._nextButton = aValue; 201 this._nextButton = aValue;
204 }, 202 },
205 203
206 //------------------------------------------------------------------------- 204 //-------------------------------------------------------------------------
207 205
208 'render': function() { 206 'render': function() {
209//MochiKit.Logging.logDebug(">>> Import.GenericImportComponent.render"); 207//MochiKit.Logging.logDebug(">>> Import.GenericImportComponent.render");
210 this.domHelper().append(this.element(), {tag:'div', children:[ 208 this.domHelper().append(this.element(), {tag:'div', children:[
211 {tag:'h2', html:this.toString()} 209 {tag:'h2', html:this.toString()}
212 ]}); 210 ]});
213//MochiKit.Logging.logDebug("<<< Import.GenericImportComponent.render"); 211//MochiKit.Logging.logDebug("<<< Import.GenericImportComponent.render");
214 }, 212 },
215 213
216 //------------------------------------------------------------------------- 214 //-------------------------------------------------------------------------
217 215
218 'previewValues': function() { 216 'previewValues': function() {
219 Clipperz.PM.Components.MessageBox.showProgressPanel( 217 Clipperz.PM.Components.MessageBox.showProgressPanel(
220 MochiKit.Base.method(this, 'deferredPreviewValues'), 218 MochiKit.Base.method(this, 'deferredPreviewValues'),
221 MochiKit.Base.method(this, 'handlePreviewError'), 219 MochiKit.Base.method(this, 'handlePreviewError'),
222 this.getDom('nextActionButton') 220 this.getDom('nextActionButton')
223 ); 221 );
224 }, 222 },
225 223
226 'deferredPreviewValues': function() { 224 'deferredPreviewValues': function() {
227 throw Clipperz.Base.exception.AbstractMethod; 225 throw Clipperz.Base.exception.AbstractMethod;
228 }, 226 },
229 227
230 'handlePreviewError': function(anError) { 228 'handlePreviewError': function(anError) {
231console.log("anError", anError); 229console.log("anError", anError);
232 MochiKit.Logging.logError("An error occurred while previewing the data: " + anError); 230 MochiKit.Logging.logError("An error occurred while previewing the data: " + anError);
233 alert("An error occurred while previewing the data"); 231 alert("An error occurred while previewing the data");
234 Clipperz.PM.Components.MessageBox().hide(); 232 Clipperz.PM.Components.MessageBox().hide();
235 }, 233 },
236 234
237 //------------------------------------------------------------------------- 235 //-------------------------------------------------------------------------
238 236
239 'previewRecordValues': function(someProcessedRecords) { 237 'previewRecordValues': function(someProcessedRecords) {
240//MochiKit.Logging.logDebug(">>> previewRecordValues"); 238//MochiKit.Logging.logDebug(">>> previewRecordValues");
241 this.getElement('previewDiv').update(""); 239 this.getElement('previewDiv').update("");
242//MochiKit.Logging.logDebug("--- previewRecordValues - 1"); 240//MochiKit.Logging.logDebug("--- previewRecordValues - 1");
243 this.domHelper().append(this.getElement('previewDiv'), {tag:'div', cls:'importPreviewDiv', children:[{tag:'table', id:'importPreview', cellspacing:'0', children:[ 241 this.domHelper().append(this.getElement('previewDiv'), {tag:'div', cls:'importPreviewDiv', children:[{tag:'table', id:'importPreview', cellspacing:'0', children:[
244 {tag:'tbody', children: 242 {tag:'tbody', children:
245 MochiKit.Base.map(MochiKit.Base.bind(function(aRecord) { 243 MochiKit.Base.map(MochiKit.Base.bind(function(aRecord) {
246 var result; 244 var result;
247//MochiKit.Logging.logDebug("--- previewRecordValues - 1.1"); 245//MochiKit.Logging.logDebug("--- previewRecordValues - 1.1");
248//console.log("fields", aRecord.currentVersion().fields()); 246//console.log("fields", aRecord.currentVersion().fields());
249 result = {tag:'tr', children:[{tag:'td', children:[ 247 result = {tag:'tr', children:[{tag:'td', children:[
250 {tag:'table', cls:'importPreview_record', children:[ 248 {tag:'table', cls:'importPreview_record', children:[
251 {tag:'tbody', children:[ 249 {tag:'tbody', children:[
252 {tag:'tr', children:[ 250 {tag:'tr', children:[
253 {tag:'td', rowspan:'2', valign:'top', children:[ 251 {tag:'td', rowspan:'2', valign:'top', children:[
254 {tag:'input', type:'checkbox', id:this.getId(aRecord.reference()), value:"aRecord.reference()", checked:true} 252 {tag:'input', type:'checkbox', id:this.getId(aRecord.reference()), value:"aRecord.reference()", checked:true}
255 ]}, 253 ]},
256 {tag:'td', colspan:'2', children:[ 254 {tag:'td', colspan:'2', children:[
257 {tag:'span', cls:'importPreview_title', html:aRecord.label()} 255 {tag:'span', cls:'importPreview_title', html:aRecord.label()}
258 ]} 256 ]}
259 ]}, 257 ]},
260 {tag:'tr', children:[ 258 {tag:'tr', children:[
261 {tag:'td', valign:'top', children:[ 259 {tag:'td', valign:'top', children:[
262 {tag:'span', cls:'importPreview_notes', html:(MochiKit.Base.isNotEmpty(aRecord.notes()) ? aRecord.notes().replace(/\n/g, '<br>') : '&nbsp;')} 260 {tag:'span', cls:'importPreview_notes', html:(MochiKit.Base.isNotEmpty(aRecord.notes()) ? aRecord.notes().replace(/\n/g, '<br>') : '&nbsp;')}
263 ]}, 261 ]},
264 {tag:'td', valign:'top', cls:'importPreview_fieds', children:[ 262 {tag:'td', valign:'top', cls:'importPreview_fieds', children:[
265 {tag:'table', cls:'importPreview_fields', children:[ 263 {tag:'table', cls:'importPreview_fields', children:[
266 {tag:'tbody', children:MochiKit.Base.map(function(aField) { 264 {tag:'tbody', children:MochiKit.Base.map(function(aField) {
267 var result; 265 var result;
268//MochiKit.Logging.logDebug("--- previewRecordValues - 1.1.1"); 266//MochiKit.Logging.logDebug("--- previewRecordValues - 1.1.1");
269 result = {tag:'tr', children:[ 267 result = {tag:'tr', children:[
270 {tag:'td', valign:'top', children:[ 268 {tag:'td', valign:'top', children:[
271 {tag:'span', cls:'importPreview_fields_label', html:aField.label()} 269 {tag:'span', cls:'importPreview_fields_label', html:aField.label()}
272 ]}, 270 ]},
273 {tag:'td', valign:'top', children:[ 271 {tag:'td', valign:'top', children:[
274 {tag:'span', cls:'importPreview_fields_value', html:aField.value()} 272 {tag:'span', cls:'importPreview_fields_value', html:aField.value()}
275 ]} 273 ]}
276 ]}; 274 ]};
277//MochiKit.Logging.logDebug("--- previewRecordValues - 1.1.2"); 275//MochiKit.Logging.logDebug("--- previewRecordValues - 1.1.2");
278 return result; 276 return result;
279 }, MochiKit.Base.values(aRecord.currentVersion().fields()))} 277 }, MochiKit.Base.values(aRecord.currentVersion().fields()))}
280 ]} 278 ]}
281 ]} 279 ]}
282 ]} 280 ]}
283 ]} 281 ]}
284 ]} 282 ]}
285 ]}]}; 283 ]}]};
286//MochiKit.Logging.logDebug("--- previewRecordValues - 1.2"); 284//MochiKit.Logging.logDebug("--- previewRecordValues - 1.2");
287 return result; 285 return result;
288 }, this), someProcessedRecords) 286 }, this), someProcessedRecords)
289 } 287 }
290 ]}]}); 288 ]}]});
291//MochiKit.Logging.logDebug("--- previewRecordValues - 2"); 289//MochiKit.Logging.logDebug("--- previewRecordValues - 2");
292 290
293 MochiKit.Base.map(MochiKit.Base.bind(function(aRecord) { 291 MochiKit.Base.map(MochiKit.Base.bind(function(aRecord) {
294 this.getElement(aRecord.reference()).dom.value = aRecord.reference(); 292 this.getElement(aRecord.reference()).dom.value = aRecord.reference();
295 }, this), someProcessedRecords); 293 }, this), someProcessedRecords);
296 294
297 Clipperz.Style.applyZebraStylesToTable('importPreview'); 295 Clipperz.Style.applyZebraStylesToTable('importPreview');
298//MochiKit.Logging.logDebug("<<< previewRecordValues"); 296//MochiKit.Logging.logDebug("<<< previewRecordValues");
299 }, 297 },
300 298
301 //------------------------------------------------------------------------- 299 //-------------------------------------------------------------------------
302 300
303 'updateProgressDialogStatus': function(anEvent) { 301 'updateProgressDialogStatus': function(anEvent) {
304 Clipperz.PM.Components.MessageBox().update({step:anEvent.parameters().progress}); 302 Clipperz.PM.Components.MessageBox().update({step:anEvent.parameters().progress});
305 }, 303 },
306 304
307 //------------------------------------------------------------------------- 305 //-------------------------------------------------------------------------
308 306
309 'parsedValues': function() { 307 'parsedValues': function() {
310 return this._parsedValues; 308 return this._parsedValues;
311 }, 309 },
312 310
313 'setParsedValues': function(aValue) { 311 'setParsedValues': function(aValue) {
314 this._parsedValues = aValue; 312 this._parsedValues = aValue;
315 313
316 return this._parsedValues; 314 return this._parsedValues;
317 }, 315 },
318 316
319 //------------------------------------------------------------------------- 317 //-------------------------------------------------------------------------
320 318
321 'processedValues': function() { 319 'processedValues': function() {
322 return this._processedValues; 320 return this._processedValues;
323 }, 321 },
324 322
325 'setProcessedValues': function(aValue) { 323 'setProcessedValues': function(aValue) {
326 this._processedValues = aValue; 324 this._processedValues = aValue;
327 return this._processedValues; 325 return this._processedValues;
328 }, 326 },
329 327
330 //------------------------------------------------------------------------- 328 //-------------------------------------------------------------------------
331 329
332 'importValues': function() { 330 'importValues': function() {
333 var deferredResult; 331 var deferredResult;
334 332
335 deferredResult = new MochiKit.Async.Deferred(); 333 deferredResult = new MochiKit.Async.Deferred();
336 334
337 deferredResult.addCallback(MochiKit.Base.bind(function() { 335 deferredResult.addCallback(MochiKit.Base.bind(function() {
338 this.nextButton().disable(); 336 this.nextButton().disable();
339 this.startProcessing(); 337 this.startProcessing();
340 },this)); 338 },this));
341 deferredResult.addCallback(MochiKit.Base.method(this, 'importProcessedValues')); 339 deferredResult.addCallback(MochiKit.Base.method(this, 'importProcessedValues'));
342 deferredResult.addCallback(MochiKit.Base.method(this, 'processingDone')); 340 deferredResult.addCallback(MochiKit.Base.method(this, 'processingDone'));
343 deferredResult.addErrback (MochiKit.Base.method(this, 'processingAborted')); 341 deferredResult.addErrback (MochiKit.Base.method(this, 'processingAborted'));
344 deferredResult.callback(); 342 deferredResult.callback();
345 343
346 return deferredResult; 344 return deferredResult;
347 }, 345 },
348 346
349 //------------------------------------------------------------------------- 347 //-------------------------------------------------------------------------
350 348
351 'importProcessedValues': function() { 349 'importProcessedValues': function() {
352 var deferredResult; 350 var deferredResult;
353 var processedValues; 351 var processedValues;
354 var selectedRecords; 352 var selectedRecords;
355 var i,c; 353 var i,c;
356 354
357//MochiKit.Logging.logDebug(">>> GenericImportComponent.importProcessedValues"); 355//MochiKit.Logging.logDebug(">>> GenericImportComponent.importProcessedValues");
358 processedValues = this.processedValues(); 356 processedValues = this.processedValues();
359 selectedRecords = []; 357 selectedRecords = [];
360 358
361 c = processedValues.length; 359 c = processedValues.length;
362 for (i=0; i<c; i++) { 360 for (i=0; i<c; i++) {
363 var currentRecord; 361 var currentRecord;
364 362
365 currentRecord = processedValues[i]; 363 currentRecord = processedValues[i];
366 if (this.getDom(currentRecord.reference()).checked == true) { 364 if (this.getDom(currentRecord.reference()).checked == true) {
367 selectedRecords.push(currentRecord); 365 selectedRecords.push(currentRecord);
368 } 366 }
369 } 367 }
370 368
371 deferredResult = new MochiKit.Async.Deferred(); 369 deferredResult = new MochiKit.Async.Deferred();
372//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("GenericImportComponent - 1: " + res); return res;}); 370//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("GenericImportComponent - 1: " + res); return res;});
373 deferredResult.addCallback(function(someRecords) { 371 deferredResult.addCallback(function(someRecords) {
374 var innerDeferredResult; 372 var innerDeferredResult;
375 var text; 373 var text;
376 374
377 text = Clipperz.PM.Strings['importData_importConfirmation_text']; 375 text = Clipperz.PM.Strings['importData_importConfirmation_text'];
378 text = text.replace(/__numberOfRecords__/, someRecords.length); 376 text = text.replace(/__numberOfRecords__/, someRecords.length);
379 377
380 innerDeferredResult = new MochiKit.Async.Deferred(); 378 innerDeferredResult = new MochiKit.Async.Deferred();
381//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("GenericImportComponent - 1.1: " + res); return res;}); 379//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("GenericImportComponent - 1.1: " + res); return res;});
382 innerDeferredResult.addCallback(MochiKit.Async.succeed, someRecords); 380 innerDeferredResult.addCallback(MochiKit.Async.succeed, someRecords);
383//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("GenericImportComponent - 1.2: " + res); return res;}); 381//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("GenericImportComponent - 1.2: " + res); return res;});
384 382
385 Clipperz.PM.Components.MessageBox().deferredShow({ 383 Clipperz.PM.Components.MessageBox().deferredShow({
386 title:Clipperz.PM.Strings['importData_importConfirmation_title'], 384 title:Clipperz.PM.Strings['importData_importConfirmation_title'],
387 text:text, 385 text:text,
388 width:240, 386 width:240,
389 showProgressBar:false, 387 showProgressBar:false,
390 showCloseButton:false, 388 showCloseButton:false,
391 buttons:{ 389 buttons:{
392 'yes':"yes", //Clipperz.PM.Strings['mainPanelDeleteRecordPanelConfirmButtonLabel'], 390 'yes':"yes", //Clipperz.PM.Strings['mainPanelDeleteRecordPanelConfirmButtonLabel'],
393 'no':"no" //Clipperz.PM.Strings['mainPanelDeleteRecordPanelDenyButtonLabel'] 391 'no':"no" //Clipperz.PM.Strings['mainPanelDeleteRecordPanelDenyButtonLabel']
394 }, 392 },
395 fn:MochiKit.Base.partial(function(aDeferred, aResult) { 393 fn:MochiKit.Base.partial(function(aDeferred, aResult) {
396 if (aResult == 'yes') { 394 if (aResult == 'yes') {
397 aDeferred.callback(aResult); 395 aDeferred.callback(aResult);
398 } else { 396 } else {
399 aDeferred.errback(aResult); 397 aDeferred.errback(aResult);
400 } 398 }
401 }, innerDeferredResult) 399 }, innerDeferredResult)
402 }/*, this.getId('nextActionButton')*/); 400 }/*, this.getId('nextActionButton')*/);
403 401
404 return innerDeferredResult; 402 return innerDeferredResult;
405 }); 403 });
406 404
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/KeePassImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/KeePassImportComponent.js
index 5f4fe33..0570704 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/KeePassImportComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/KeePassImportComponent.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } 27if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.Import.KeePassImportComponent = function(anElement, args) { 31Clipperz.PM.Components.Import.KeePassImportComponent = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.Import.KeePassImportComponent.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.Import.KeePassImportComponent.superclass.constructor.call(this, anElement, args);
37 35
38 this._steps = ['EDIT', 'KEEPASS_SETTINGS', 'PREVIEW', 'IMPORT']; 36 this._steps = ['EDIT', 'KEEPASS_SETTINGS', 'PREVIEW', 'IMPORT'];
39 this._definedFields = ['Group', 'Group Tree', 'UserName', 'URL', 'Password', 'Notes', 'UUID', 'Icon', 'Creation Time', 'Last Access', 'Last Modification', 'Expires', 'Attachment Description', 'Attachment']; 37 this._definedFields = ['Group', 'Group Tree', 'UserName', 'URL', 'Password', 'Notes', 'UUID', 'Icon', 'Creation Time', 'Last Access', 'Last Modification', 'Expires', 'Attachment Description', 'Attachment'];
40 38
41 this.render(); 39 this.render();
42 40
43 return this; 41 return this;
44} 42}
45 43
46//============================================================================= 44//=============================================================================
47 45
48YAHOO.extendX(Clipperz.PM.Components.Import.KeePassImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { 46YAHOO.extendX(Clipperz.PM.Components.Import.KeePassImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, {
49 47
50 'toString': function() { 48 'toString': function() {
51 return "Clipperz.PM.Components.Import.KeePassImportComponent component"; 49 return "Clipperz.PM.Components.Import.KeePassImportComponent component";
52 }, 50 },
53 51
54 //------------------------------------------------------------------------- 52 //-------------------------------------------------------------------------
55 53
56 'render': function() { 54 'render': function() {
57//MochiKit.Logging.logDebug(">>> Import.KeePassImportComponent.render"); 55//MochiKit.Logging.logDebug(">>> Import.KeePassImportComponent.render");
58 this.domHelper().append(this.element(), {tag:'div', cls:'keePassImportWizard', children:[ 56 this.domHelper().append(this.element(), {tag:'div', cls:'keePassImportWizard', children:[
59 {tag:'h3', htmlString:Clipperz.PM.Strings['KeePass_ImportWizard_Title']}, 57 {tag:'h3', htmlString:Clipperz.PM.Strings['KeePass_ImportWizard_Title']},
60 {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, 58 {tag:'div', cls:'importSteps', id:this.getId('importSteps')},
61 {tag:'div', cls:'importStepBlocks', children:[ 59 {tag:'div', cls:'importStepBlocks', children:[
62 {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ 60 {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[
63 {tag:'div', children:[ 61 {tag:'div', children:[
64 {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_keePass_description']}, 62 {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_keePass_description']},
65 {tag:'div', cls:'importOptionsParameters', children:[]}, 63 {tag:'div', cls:'importOptionsParameters', children:[]},
66 this.textAreaConfig() 64 this.textAreaConfig()
67 ]} 65 ]}
68 ]}, 66 ]},
69 {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ 67 {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[
70 {tag:'div', children:[ 68 {tag:'div', children:[
71 {tag:'div', id:this.getId('settingsDiv'), children:[ 69 {tag:'div', id:this.getId('settingsDiv'), children:[
72 {tag:'table', id:'KeePassSettings', children:[ 70 {tag:'table', id:'KeePassSettings', children:[
73 {tag:'tbody', children:[ 71 {tag:'tbody', children:[
74 {tag:'tr', children:[ 72 {tag:'tr', children:[
75 {tag:'td', width:'50%', valign:'top', children:[ 73 {tag:'td', width:'50%', valign:'top', children:[
76 {tag:'table', children:[ 74 {tag:'table', children:[
77 {tag:'tbody', children:[ 75 {tag:'tbody', children:[
78 {tag:'tr', children:[ 76 {tag:'tr', children:[
79 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Group_checkbox'), name:'Group'/*, checked:true*/}]}, 77 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Group_checkbox'), name:'Group'/*, checked:true*/}]},
80 {tag:'td', width:'150', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Group_label'), html:"Group"}]} 78 {tag:'td', width:'150', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Group_label'), html:"Group"}]}
81 ]}, 79 ]},
82 {tag:'tr', children:[ 80 {tag:'tr', children:[
83 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Group Tree_checkbox'), name:'Group Tree'/*, checked:true*/}]}, 81 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Group Tree_checkbox'), name:'Group Tree'/*, checked:true*/}]},
84 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Group Tree_label'), html:"Group Tree"}]} 82 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Group Tree_label'), html:"Group Tree"}]}
85 ]}, 83 ]},
86 {tag:'tr', children:[ 84 {tag:'tr', children:[
87 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('UserName_checkbox'), name:'UserName', checked:true}]}, 85 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('UserName_checkbox'), name:'UserName', checked:true}]},
88 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('UserName_label'), html:"UserName"}]} 86 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('UserName_label'), html:"UserName"}]}
89 ]}, 87 ]},
90 {tag:'tr', children:[ 88 {tag:'tr', children:[
91 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('URL_checkbox'), name:'URL', checked:true}]}, 89 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('URL_checkbox'), name:'URL', checked:true}]},
92 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('URL_label'), html:"URL"}]} 90 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('URL_label'), html:"URL"}]}
93 ]}, 91 ]},
94 {tag:'tr', children:[ 92 {tag:'tr', children:[
95 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Password_checkbox'), name:'Password', checked:true}]}, 93 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Password_checkbox'), name:'Password', checked:true}]},
96 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Password_label'), html:"Password"}]} 94 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Password_label'), html:"Password"}]}
97 ]}, 95 ]},
98 {tag:'tr', children:[ 96 {tag:'tr', children:[
99 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Notes_checkbox'), name:'Notes', checked:true}]}, 97 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Notes_checkbox'), name:'Notes', checked:true}]},
100 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Notes_label'), html:"Notes"}]} 98 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Notes_label'), html:"Notes"}]}
101 ]}, 99 ]},
102 {tag:'tr', children:[ 100 {tag:'tr', children:[
103 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('UUID_checkbox'), name:'UUID'/*, checked:true*/}]}, 101 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('UUID_checkbox'), name:'UUID'/*, checked:true*/}]},
104 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('UUID_label'), html:"UUID"}]} 102 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('UUID_label'), html:"UUID"}]}
105 ]} 103 ]}
106 ]} 104 ]}
107 ]} 105 ]}
108 ]}, 106 ]},
109 {tag:'td', width:'50%', valign:'top', children:[ 107 {tag:'td', width:'50%', valign:'top', children:[
110 {tag:'table', children:[ 108 {tag:'table', children:[
111 {tag:'tbody', children:[ 109 {tag:'tbody', children:[
112 {tag:'tr', children:[ 110 {tag:'tr', children:[
113 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Icon_checkbox'), name:'Icon'/*, checked:true*/}]}, 111 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Icon_checkbox'), name:'Icon'/*, checked:true*/}]},
114 {tag:'td', width:'150', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Icon_label'), html:"Icon"}]} 112 {tag:'td', width:'150', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Icon_label'), html:"Icon"}]}
115 ]}, 113 ]},
116 {tag:'tr', children:[ 114 {tag:'tr', children:[
117 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Creation Time_checkbox'), name:'Creation Time'/*, checked:true*/}]}, 115 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Creation Time_checkbox'), name:'Creation Time'/*, checked:true*/}]},
118 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Creation Time_label'), html:"Creation Time"}]} 116 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Creation Time_label'), html:"Creation Time"}]}
119 ]}, 117 ]},
120 {tag:'tr', children:[ 118 {tag:'tr', children:[
121 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Last Access_checkbox'), name:'Last Access'/*, checked:true*/}]}, 119 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Last Access_checkbox'), name:'Last Access'/*, checked:true*/}]},
122 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Last Access_label'), html:"Last Access"}]} 120 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Last Access_label'), html:"Last Access"}]}
123 ]}, 121 ]},
124 {tag:'tr', children:[ 122 {tag:'tr', children:[
125 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Last Modification_checkbox'), name:'Last Modification'/*, checked:true*/}]}, 123 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Last Modification_checkbox'), name:'Last Modification'/*, checked:true*/}]},
126 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Last Modification_label'), html:"Last Modification"}]} 124 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Last Modification_label'), html:"Last Modification"}]}
127 ]}, 125 ]},
128 {tag:'tr', children:[ 126 {tag:'tr', children:[
129 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Expires_checkbox'), name:'Expires'/*, checked:true*/}]}, 127 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Expires_checkbox'), name:'Expires'/*, checked:true*/}]},
130 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Expires_label'), html:"Expires"}]} 128 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Expires_label'), html:"Expires"}]}
131 ]}, 129 ]},
132 {tag:'tr', children:[ 130 {tag:'tr', children:[
133 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Attachment Description_checkbox'), name:'Attachment Description', checked:true}]}, 131 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Attachment Description_checkbox'), name:'Attachment Description', checked:true}]},
134 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Attachment Description_label'), html:"Attachment Description"}]} 132 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Attachment Description_label'), html:"Attachment Description"}]}
135 ]}, 133 ]},
136 {tag:'tr', children:[ 134 {tag:'tr', children:[
137 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Attachment_checkbox'), name:'Attachment', checked:true}]}, 135 {tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Attachment_checkbox'), name:'Attachment', checked:true}]},
138 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Attachment_label'), html:"Attachment"}]} 136 {tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Attachment_label'), html:"Attachment"}]}
139 ]} 137 ]}
140 ]} 138 ]}
141 ]} 139 ]}
142 ]} 140 ]}
143 ]} 141 ]}
144 ]} 142 ]}
145 ]} 143 ]}
146 ]} 144 ]}
147 ]} 145 ]}
148 ]}, 146 ]},
149 {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[ 147 {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[
150 {tag:'div', children:[ 148 {tag:'div', children:[
151 {tag:'div', id:this.getId('previewDiv'), html:"preview"} 149 {tag:'div', id:this.getId('previewDiv'), html:"preview"}
152 ]} 150 ]}
153 ]}, 151 ]},
154 {tag:'div', cls:'step_3', id:this.getId('step_3'), children:[ 152 {tag:'div', cls:'step_3', id:this.getId('step_3'), children:[
155 {tag:'div', children:[ 153 {tag:'div', children:[
156 {tag:'h4', html:"done"} 154 {tag:'h4', html:"done"}
157 ]} 155 ]}
158 ]} 156 ]}
159 ]}, 157 ]},
160 {tag:'div', cls:'importOptionsButtons', children:[ 158 {tag:'div', cls:'importOptionsButtons', children:[
161 {tag:'table', children:[ 159 {tag:'table', children:[
162 {tag:'tbody', children:[ 160 {tag:'tbody', children:[
163 {tag:'tr', children:[ 161 {tag:'tr', children:[
164 {tag:'td', html:'&nbsp;'}, 162 {tag:'td', html:'&nbsp;'},
165 {tag:'td', children:[ 163 {tag:'td', children:[
166 {tag:'div', id:this.getId('backActionButton')} 164 {tag:'div', id:this.getId('backActionButton')}
167 ]}, 165 ]},
168 {tag:'td', html:'&nbsp;'}, 166 {tag:'td', html:'&nbsp;'},
169 {tag:'td', children:[ 167 {tag:'td', children:[
170 {tag:'div', id:this.getId('nextActionButton')} 168 {tag:'div', id:this.getId('nextActionButton')}
171 ]}, 169 ]},
172 {tag:'td', html:'&nbsp;'} 170 {tag:'td', html:'&nbsp;'}
173 ]} 171 ]}
174 ]} 172 ]}
175 ]} 173 ]}
176 ]} 174 ]}
177 ]}); 175 ]});
178 176
179 this.updateSteps(); 177 this.updateSteps();
180 178
181 this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); 179 this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this}));
182 this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); 180 this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this}));
183 181
184 this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() 182 this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show()
185 this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 183 this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
186 this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 184 this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
187 this.getElement('step_3').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 185 this.getElement('step_3').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
188//MochiKit.Logging.logDebug("<<< Import.KeePassImportComponent.render"); 186//MochiKit.Logging.logDebug("<<< Import.KeePassImportComponent.render");
189 }, 187 },
190 188
191 //------------------------------------------------------------------------- 189 //-------------------------------------------------------------------------
192 190
193 'nextAction': function() { 191 'nextAction': function() {
194 switch (this.currentStep()) { 192 switch (this.currentStep()) {
195 case 0: //-> 1 193 case 0: //-> 1
196 Clipperz.PM.Components.MessageBox.showProgressPanel( 194 Clipperz.PM.Components.MessageBox.showProgressPanel(
197 MochiKit.Base.method(this, 'deferredParseValues'), 195 MochiKit.Base.method(this, 'deferredParseValues'),
198 MochiKit.Base.method(this, 'handleParseError'), 196 MochiKit.Base.method(this, 'handleParseError'),
199 this.getDom('nextActionButton') 197 this.getDom('nextActionButton')
200 ); 198 );
201 break; 199 break;
202 case 1: //-> 2 200 case 1: //-> 2
203 this.previewValues(); 201 this.previewValues();
204 break; 202 break;
205 case 2: //-> 3 203 case 2: //-> 3
206 this.importValues(); 204 this.importValues();
207 break; 205 break;
208 } 206 }
209 }, 207 },
210 208
211 //------------------------------------------------------------------------- 209 //-------------------------------------------------------------------------
212 210
213 'deferredParseValues': function() { 211 'deferredParseValues': function() {
214 var deferredResult; 212 var deferredResult;
215 213
216 deferredResult = new MochiKit.Async.Deferred(); 214 deferredResult = new MochiKit.Async.Deferred();
217//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredParseValues - 1 " + res.substring(0,50)); return res;}); 215//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredParseValues - 1 " + res.substring(0,50)); return res;});
218 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'parseImportData'); 216 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'parseImportData');
219//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredParseValues - 2 " + res.substring(0,50)); return res;}); 217//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredParseValues - 2 " + res.substring(0,50)); return res;});
220 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 218 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
221 this.startProcessing(); 219 this.startProcessing();
222 220
223 return res; 221 return res;
224 }, this)); 222 }, this));
225//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredParseValues - 3 " + res.substring(0,50)); return res;}); 223//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredParseValues - 3 " + res.substring(0,50)); return res;});
226 deferredResult.addCallback(MochiKit.Base.method(this, 'parseKeePassValues')); //processPasswordPlusValues 224 deferredResult.addCallback(MochiKit.Base.method(this, 'parseKeePassValues')); //processPasswordPlusValues
227//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredParseValues - 4 " + res); return res;}); 225//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredParseValues - 4 " + res); return res;});
228 deferredResult.addCallback(MochiKit.Base.method(this, 'setParsedValues')); //setProcessedValues 226 deferredResult.addCallback(MochiKit.Base.method(this, 'setParsedValues')); //setProcessedValues
229//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredParseValues - 5 " + res); return res;}); 227//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredParseValues - 5 " + res); return res;});
230 deferredResult.addCallback(MochiKit.Base.method(this, 'showSettings')); //previewRecordValues 228 deferredResult.addCallback(MochiKit.Base.method(this, 'showSettings')); //previewRecordValues
231//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredParseValues - 6 " + res); return res;}); 229//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredParseValues - 6 " + res); return res;});
232 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 230 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
233 this.processingDone(); 231 this.processingDone();
234 this.getElement('step_0').hide(); 232 this.getElement('step_0').hide();
235 this.getElement('step_1').show(); 233 this.getElement('step_1').show();
236 this.backButton().enable(); 234 this.backButton().enable();
237 235
238 return res; 236 return res;
239 }, this)); 237 }, this));
240//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredParseValues - 7 " + res); return res;}); 238//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredParseValues - 7 " + res); return res;});
241 deferredResult.callback(this.textAreaContent()); 239 deferredResult.callback(this.textAreaContent());
242 240
243 return deferredResult; 241 return deferredResult;
244 }, 242 },
245 243
246 //------------------------------------------------------------------------- 244 //-------------------------------------------------------------------------
247 245
248 'deferredPreviewValues': function() { 246 'deferredPreviewValues': function() {
249 var deferredResult; 247 var deferredResult;
250 248
251//MochiKit.Logging.logDebug(">>> KeePassImportComonent.deferredPreviewValues"); 249//MochiKit.Logging.logDebug(">>> KeePassImportComonent.deferredPreviewValues");
252 deferredResult = new MochiKit.Async.Deferred(); 250 deferredResult = new MochiKit.Async.Deferred();
253//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 1 " + res); return res;}); 251//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 1 " + res); return res;});
254 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'previewImportData'); 252 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'previewImportData');
255//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 2 " + res); return res;}); 253//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 2 " + res); return res;});
256 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 254 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
257 this.startProcessing(); 255 this.startProcessing();
258 256
259 return res; 257 return res;
260 }, this)); 258 }, this));
261//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 3 " + res); return res;}); 259//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 3 " + res); return res;});
262 deferredResult.addCallback(MochiKit.Base.method(this, 'processKeePassParsedValues')); 260 deferredResult.addCallback(MochiKit.Base.method(this, 'processKeePassParsedValues'));
263//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 4 " + res); return res;}); 261//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 4 " + res); return res;});
264 deferredResult.addCallback(MochiKit.Base.method(this, 'setProcessedValues')); 262 deferredResult.addCallback(MochiKit.Base.method(this, 'setProcessedValues'));
265//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 5 " + res); return res;}); 263//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 5 " + res); return res;});
266 deferredResult.addCallback(MochiKit.Base.method(this, 'previewRecordValues')); 264 deferredResult.addCallback(MochiKit.Base.method(this, 'previewRecordValues'));
267//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 6 " + res); return res;}); 265//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 6 " + res); return res;});
268 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 266 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
269 this.processingDone(); 267 this.processingDone();
270 this.getElement('step_1').hide(); 268 this.getElement('step_1').hide();
271 this.getElement('step_2').show(); 269 this.getElement('step_2').show();
272 this.backButton().enable(); 270 this.backButton().enable();
273 271
274 return res; 272 return res;
275 }, this)); 273 }, this));
276//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 7 " + res); return res;}); 274//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 7 " + res); return res;});
277 // deferredResult.addErrback(MochiKit.Base.bind(function() { 275 // deferredResult.addErrback(MochiKit.Base.bind(function() {
278 // this.processingAborted(); 276 // this.processingAborted();
279 // }, this)) 277 // }, this))
280//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 8 " + res); return res;}); 278//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.deferredPreviewValues - 8 " + res); return res;});
281 deferredResult.callback(this.parsedValues()); 279 deferredResult.callback(this.parsedValues());
282//MochiKit.Logging.logDebug("<<< KeePassImportComonent.deferredPreviewValues"); 280//MochiKit.Logging.logDebug("<<< KeePassImportComonent.deferredPreviewValues");
283 281
284 return deferredResult; 282 return deferredResult;
285 }, 283 },
286 284
287 //------------------------------------------------------------------------- 285 //-------------------------------------------------------------------------
288 286
289 'definedFields': function() { 287 'definedFields': function() {
290 return this._definedFields; 288 return this._definedFields;
291 }, 289 },
292 290
293 //------------------------------------------------------------------------- 291 //-------------------------------------------------------------------------
294 292
295 'parseKeePassValues': function(someData) { 293 'parseKeePassValues': function(someData) {
296 var deferredResult; 294 var deferredResult;
297 var keePassProcessor; 295 var keePassProcessor;
298 296
299 keePassProcessor = new Clipperz.KeePassExportProcessor(); 297 keePassProcessor = new Clipperz.KeePassExportProcessor();
300 298
301 deferredResult = new MochiKit.Async.Deferred(); 299 deferredResult = new MochiKit.Async.Deferred();
302//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.parseKeePassValues - 1 " + res.substring(0,50)); return res;}); 300//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.parseKeePassValues - 1 " + res.substring(0,50)); return res;});
303 deferredResult.addCallback(function(res) { 301 deferredResult.addCallback(function(res) {
304 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:(res.length)}, res); 302 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:(res.length)}, res);
305 }) 303 })
306//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.parseKeePassValues - 2 " + res.substring(0,50)); return res;}); 304//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.parseKeePassValues - 2 " + res.substring(0,50)); return res;});
307 deferredResult.addCallback(MochiKit.Base.method(keePassProcessor, 'deferredParse')); 305 deferredResult.addCallback(MochiKit.Base.method(keePassProcessor, 'deferredParse'));
308//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.parseKeePassValues - 3 " + res); return res;}); 306//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("KeePassImportComponent.parseKeePassValues - 3 " + res); return res;});
309 deferredResult.callback(someData); 307 deferredResult.callback(someData);
310 308
311 return deferredResult; 309 return deferredResult;
312 }, 310 },
313 311
314 //------------------------------------------------------------------------- 312 //-------------------------------------------------------------------------
315 313
316 'showSettings': function(someValues) { 314 'showSettings': function(someValues) {
317 var availableFields; 315 var availableFields;
318 var i,c; 316 var i,c;
319 317
320//MochiKit.Logging.logDebug(">>> KeePassImportCOmponent.showSettings"); 318//MochiKit.Logging.logDebug(">>> KeePassImportCOmponent.showSettings");
321 availableFields = new Clipperz.Set(); 319 availableFields = new Clipperz.Set();
322 c = this.parsedValues().length; 320 c = this.parsedValues().length;
323 for (i=0; i<c; i++) { 321 for (i=0; i<c; i++) {
324 var fieldLabel; 322 var fieldLabel;
325 323
326 for (fieldLabel in this.parsedValues()[i]) { 324 for (fieldLabel in this.parsedValues()[i]) {
327 availableFields.add(fieldLabel); 325 availableFields.add(fieldLabel);
328 } 326 }
329 } 327 }
330 328
331 c = this.definedFields().length; 329 c = this.definedFields().length;
332 for (i=0; i<c; i++) { 330 for (i=0; i<c; i++) {
333 var definedField; 331 var definedField;
334 332
335 definedField = this.definedFields()[i]; 333 definedField = this.definedFields()[i];
336 if (availableFields.contains(definedField)) { 334 if (availableFields.contains(definedField)) {
337//MochiKit.Logging.logDebug("enabling field " + definedField); 335//MochiKit.Logging.logDebug("enabling field " + definedField);
338 this.getDom(definedField + '_checkbox').disabled = false; 336 this.getDom(definedField + '_checkbox').disabled = false;
339 this.getElement(definedField + '_label').removeClass('disabled'); 337 this.getElement(definedField + '_label').removeClass('disabled');
340 } else { 338 } else {
341//MochiKit.Logging.logDebug("disabling field " + definedField); 339//MochiKit.Logging.logDebug("disabling field " + definedField);
342 this.getDom(definedField + '_checkbox').disabled = true; 340 this.getDom(definedField + '_checkbox').disabled = true;
343 this.getDom(definedField + '_checkbox').checked = false; //???? 341 this.getDom(definedField + '_checkbox').checked = false; //????
344 this.getElement(definedField + '_label').addClass('disabled'); 342 this.getElement(definedField + '_label').addClass('disabled');
345 } 343 }
346 } 344 }
347//MochiKit.Logging.logDebug("<<< KeePassImportCOmponent.showSettings"); 345//MochiKit.Logging.logDebug("<<< KeePassImportCOmponent.showSettings");
348 346
349 return MochiKit.Async.succeed(someValues); 347 return MochiKit.Async.succeed(someValues);
350 }, 348 },
351 349
352 //------------------------------------------------------------------------- 350 //-------------------------------------------------------------------------
353 351
354 'shouldImportField': function(aFieldName) { 352 'shouldImportField': function(aFieldName) {
355 var fieldCheckbox; 353 var fieldCheckbox;
356 var result; 354 var result;
357 355
358//MochiKit.Logging.logDebug(">>> shouldImportField: " + aFieldName); 356//MochiKit.Logging.logDebug(">>> shouldImportField: " + aFieldName);
359 // fieldCheckbox = this.getDom(aFieldName + '_checkbox'); 357 // fieldCheckbox = this.getDom(aFieldName + '_checkbox');
360 fieldCheckbox = MochiKit.DOM.getElement(this.getId(aFieldName + '_checkbox')); 358 fieldCheckbox = MochiKit.DOM.getElement(this.getId(aFieldName + '_checkbox'));
361 if (fieldCheckbox != null) { 359 if (fieldCheckbox != null) {
362 result = fieldCheckbox.checked; 360 result = fieldCheckbox.checked;
363 } else { 361 } else {
364 result = false; 362 result = false;
365 } 363 }
366//MochiKit.Logging.logDebug("<<< shouldImportField: " + result); 364//MochiKit.Logging.logDebug("<<< shouldImportField: " + result);
367 365
368 return result; 366 return result;
369 }, 367 },
370 368
371 //------------------------------------------------------------------------- 369 //-------------------------------------------------------------------------
372 370
373 'processKeePassParsedValues': function(someValues) { 371 'processKeePassParsedValues': function(someValues) {
374 var deferredResult; 372 var deferredResult;
375 var records; 373 var records;
376 var i,c; 374 var i,c;
377 375
378//MochiKit.Logging.logDebug(">>> processKeePassParsedValues"); 376//MochiKit.Logging.logDebug(">>> processKeePassParsedValues");
379 deferredResult = new MochiKit.Async.Deferred(); 377 deferredResult = new MochiKit.Async.Deferred();
380 records = []; 378 records = [];
381 379
382//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("processKeePassParsedValues - 1: " + res); return res;}); 380//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("processKeePassParsedValues - 1: " + res); return res;});
383 c = someValues.length; 381 c = someValues.length;
384 deferredResult.addCallback(function(res) { 382 deferredResult.addCallback(function(res) {
385 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:c}, res); 383 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:c}, res);
386 }) 384 })
387 for(i=0; i<c; i++) { 385 for(i=0; i<c; i++) {
388//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + i + "] processKeePassParsedValues - 1.1: " + res); return res;}); 386//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + i + "] processKeePassParsedValues - 1.1: " + res); return res;});
389 deferredResult.addCallback(MochiKit.Async.wait, 0.2); 387 deferredResult.addCallback(MochiKit.Async.wait, 0.2);
390//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + i + "] processKeePassParsedValues - 1.2: " + res); return res;}); 388//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + i + "] processKeePassParsedValues - 1.2: " + res); return res;});
391 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {}); 389 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {});
392//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + i + "] processKeePassParsedValues - 1.3: " + res); return res;}); 390//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + i + "] processKeePassParsedValues - 1.3: " + res); return res;});
393 deferredResult.addCallback(MochiKit.Base.bind(function(someRecords, someData) { 391 deferredResult.addCallback(MochiKit.Base.bind(function(someRecords, someData) {
394 var record; 392 var record;
395 var recordVersion; 393 var recordVersion;
396 var ii; 394 var ii;
397 395
398 record = new Clipperz.PM.DataModel.Record({user:this.user()}); 396 record = new Clipperz.PM.DataModel.Record({user:this.user()});
399 record.setLabel(someData['Title']); 397 record.setLabel(someData['Title']);
400 if (this.shouldImportField('Notes')) { 398 if (this.shouldImportField('Notes')) {
401 record.setNotes(someData['Notes']); 399 record.setNotes(someData['Notes']);
402 } 400 }
403 recordVersion = record.currentVersion() 401 recordVersion = record.currentVersion()
404 402
405 for (ii in someData) { 403 for (ii in someData) {
406 if ((ii != 'Title') && (ii != 'Notes') && (typeof(someData[ii]) != "undefined") && (this.shouldImportField(ii))) { 404 if ((ii != 'Title') && (ii != 'Notes') && (typeof(someData[ii]) != "undefined") && (this.shouldImportField(ii))) {
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js
index 05baf46..f97ce78 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js
@@ -1,329 +1,327 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } 27if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.Import.MainComponent = function(anElement, args) { 31Clipperz.PM.Components.Import.MainComponent = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.Import.MainComponent.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.Import.MainComponent.superclass.constructor.call(this, anElement, args);
37 35
38 this._user = args.user; 36 this._user = args.user;
39 this._wizardComponent = null; 37 this._wizardComponent = null;
40 38
41 this._backButton = null; 39 this._backButton = null;
42 this._nextButton = null; 40 this._nextButton = null;
43 41
44 this._selectedComponent = null; 42 this._selectedComponent = null;
45 43
46 this.render(); 44 this.render();
47 45
48 return this; 46 return this;
49} 47}
50 48
51//============================================================================= 49//=============================================================================
52 50
53YAHOO.extendX(Clipperz.PM.Components.Import.MainComponent, Clipperz.PM.Components.BaseComponent, { 51YAHOO.extendX(Clipperz.PM.Components.Import.MainComponent, Clipperz.PM.Components.BaseComponent, {
54 52
55 'toString': function() { 53 'toString': function() {
56 return "Clipperz.PM.Components.Import.MainComponent component"; 54 return "Clipperz.PM.Components.Import.MainComponent component";
57 }, 55 },
58 56
59 //------------------------------------------------------------------------- 57 //-------------------------------------------------------------------------
60 58
61 'user': function() { 59 'user': function() {
62 return this._user; 60 return this._user;
63 }, 61 },
64 62
65 //------------------------------------------------------------------------- 63 //-------------------------------------------------------------------------
66 64
67 'wizardComponent': function() { 65 'wizardComponent': function() {
68 return this._wizardComponent; 66 return this._wizardComponent;
69 }, 67 },
70 68
71 'setWizardComponent': function(aValue) { 69 'setWizardComponent': function(aValue) {
72 if (this._wizardComponent != null) { 70 if (this._wizardComponent != null) {
73 this._wizardComponent.remove(); 71 this._wizardComponent.remove();
74 } 72 }
75 73
76 if (aValue != null) { 74 if (aValue != null) {
77 this.getElement('importCover').hide(); 75 this.getElement('importCover').hide();
78 this.getElement('importWizard').show(); 76 this.getElement('importWizard').show();
79 } 77 }
80 this._wizardComponent = aValue; 78 this._wizardComponent = aValue;
81 }, 79 },
82 80
83 'resetImportComponent': function() { 81 'resetImportComponent': function() {
84//MochiKit.Logging.logDebug(">>> resetImportComponent"); 82//MochiKit.Logging.logDebug(">>> resetImportComponent");
85 this.setWizardComponent(null); 83 this.setWizardComponent(null);
86 this.getElement('wizardComponent').update(""); 84 this.getElement('wizardComponent').update("");
87 85
88 this.getElement('importCover').show(); 86 this.getElement('importCover').show();
89 this.getElement('importWizard').hide(); 87 this.getElement('importWizard').hide();
90//MochiKit.Logging.logDebug("<<< resetImportComponent"); 88//MochiKit.Logging.logDebug("<<< resetImportComponent");
91 }, 89 },
92 90
93 //------------------------------------------------------------------------- 91 //-------------------------------------------------------------------------
94 92
95 'backButton': function() { 93 'backButton': function() {
96 return this._backButton; 94 return this._backButton;
97 }, 95 },
98 96
99 'setBackButton': function(aValue) { 97 'setBackButton': function(aValue) {
100 this._backButton = aValue; 98 this._backButton = aValue;
101 }, 99 },
102 100
103 'nextButton': function() { 101 'nextButton': function() {
104 return this._nextButton; 102 return this._nextButton;
105 }, 103 },
106 104
107 'setNextButton': function(aValue) { 105 'setNextButton': function(aValue) {
108 this._nextButton = aValue; 106 this._nextButton = aValue;
109 }, 107 },
110 108
111 //------------------------------------------------------------------------- 109 //-------------------------------------------------------------------------
112 110
113 'render': function() { 111 'render': function() {
114//MochiKit.Logging.logDebug(">>> Import.MainComponent.render"); 112//MochiKit.Logging.logDebug(">>> Import.MainComponent.render");
115 Clipperz.NotificationCenter.unregister(this); 113 Clipperz.NotificationCenter.unregister(this);
116 MochiKit.Signal.disconnectAllTo(this); 114 MochiKit.Signal.disconnectAllTo(this);
117 115
118 this.element().update(""); 116 this.element().update("");
119 this.domHelper().append(this.element(), {tag:'div', id:this.getId('mainDiv'), children:[ 117 this.domHelper().append(this.element(), {tag:'div', id:this.getId('mainDiv'), children:[
120 {tag:'div', id:this.getId('importCover'), children:[ 118 {tag:'div', id:this.getId('importCover'), children:[
121 {tag:'h5', htmlString:Clipperz.PM.Strings['importTabTitle']}, 119 {tag:'h5', htmlString:Clipperz.PM.Strings['importTabTitle']},
122 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['importTabDescription']}, 120 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['importTabDescription']},
123 {tag:'div', cls:'importFormats', children:[ 121 {tag:'div', cls:'importFormats', children:[
124 {tag:'ul', cls:'radioList', children:[ 122 {tag:'ul', cls:'radioList', children:[
125 {tag:'li', children:[ 123 {tag:'li', children:[
126 {tag:'table', children:[{tag:'tbody', children:[{tag:'tr', children:[ 124 {tag:'table', children:[{tag:'tbody', children:[{tag:'tr', children:[
127 {tag:'td', valign:'top', children:[ 125 {tag:'td', valign:'top', children:[
128 {tag:'input', id:this.getId('CSV_radio'), type:'radio', name:'importFormat', value:'CSV'} 126 {tag:'input', id:this.getId('CSV_radio'), type:'radio', name:'importFormat', value:'CSV'}
129 ]}, 127 ]},
130 {tag:'td', valign:'top', children:[ 128 {tag:'td', valign:'top', children:[
131 {tag:'h4', id:this.getId('CSV_title'), htmlString:Clipperz.PM.Strings['importFormats']['CSV']['label']}, 129 {tag:'h4', id:this.getId('CSV_title'), htmlString:Clipperz.PM.Strings['importFormats']['CSV']['label']},
132 {tag:'div', cls:'templateDescription', htmlString:Clipperz.PM.Strings['importFormats']['CSV']['description']} 130 {tag:'div', cls:'templateDescription', htmlString:Clipperz.PM.Strings['importFormats']['CSV']['description']}
133 ]} 131 ]}
134 ]}]}]} 132 ]}]}]}
135 ]}, 133 ]},
136 {tag:'li', children:[ 134 {tag:'li', children:[
137 {tag:'table', children:[{tag:'tbody', children:[{tag:'tr', children:[ 135 {tag:'table', children:[{tag:'tbody', children:[{tag:'tr', children:[
138 {tag:'td', valign:'top', children:[ 136 {tag:'td', valign:'top', children:[
139 {tag:'input', id:this.getId('Excel_radio'), type:'radio', name:'importFormat', value:'EXCEL'} 137 {tag:'input', id:this.getId('Excel_radio'), type:'radio', name:'importFormat', value:'EXCEL'}
140 ]}, 138 ]},
141 {tag:'td', valign:'top', children:[ 139 {tag:'td', valign:'top', children:[
142 {tag:'h4', id:this.getId('Excel_title'), htmlString:Clipperz.PM.Strings['importFormats']['Excel']['label']}, 140 {tag:'h4', id:this.getId('Excel_title'), htmlString:Clipperz.PM.Strings['importFormats']['Excel']['label']},
143 {tag:'div', cls:'templateDescription', htmlString:Clipperz.PM.Strings['importFormats']['Excel']['description']} 141 {tag:'div', cls:'templateDescription', htmlString:Clipperz.PM.Strings['importFormats']['Excel']['description']}
144 ]} 142 ]}
145 ]}]}]} 143 ]}]}]}
146 ]}, 144 ]},
147 {tag:'li', children:[ 145 {tag:'li', children:[
148 {tag:'table', children:[{tag:'tbody', children:[{tag:'tr', children:[ 146 {tag:'table', children:[{tag:'tbody', children:[{tag:'tr', children:[
149 {tag:'td', valign:'top', children:[ 147 {tag:'td', valign:'top', children:[
150 {tag:'input', id:this.getId('KeePass_radio'), type:'radio', name:'importFormat', value:'KEEPASS'} 148 {tag:'input', id:this.getId('KeePass_radio'), type:'radio', name:'importFormat', value:'KEEPASS'}
151 ]}, 149 ]},
152 {tag:'td', valign:'top', children:[ 150 {tag:'td', valign:'top', children:[
153 {tag:'h4', id:this.getId('KeePass_title'), htmlString:Clipperz.PM.Strings['importFormats']['KeePass']['label']}, 151 {tag:'h4', id:this.getId('KeePass_title'), htmlString:Clipperz.PM.Strings['importFormats']['KeePass']['label']},
154 {tag:'div', cls:'templateDescription', htmlString:Clipperz.PM.Strings['importFormats']['KeePass']['description']} 152 {tag:'div', cls:'templateDescription', htmlString:Clipperz.PM.Strings['importFormats']['KeePass']['description']}
155 ]} 153 ]}
156 ]}]}]} 154 ]}]}]}
157 ]}, 155 ]},
158 {tag:'li', children:[ 156 {tag:'li', children:[
159 {tag:'table', children:[{tag:'tbody', children:[{tag:'tr', children:[ 157 {tag:'table', children:[{tag:'tbody', children:[{tag:'tr', children:[
160 {tag:'td', valign:'top', children:[ 158 {tag:'td', valign:'top', children:[
161 {tag:'input', id:this.getId('Roboform_radio'), type:'radio', name:'importFormat', value:'ROBOFORM'} 159 {tag:'input', id:this.getId('Roboform_radio'), type:'radio', name:'importFormat', value:'ROBOFORM'}
162 ]}, 160 ]},
163 {tag:'td', valign:'top', children:[ 161 {tag:'td', valign:'top', children:[
164 {tag:'h4', id:this.getId('Roboform_title'), htmlString:Clipperz.PM.Strings['importFormats']['Roboform']['label']}, 162 {tag:'h4', id:this.getId('Roboform_title'), htmlString:Clipperz.PM.Strings['importFormats']['Roboform']['label']},
165 {tag:'div', cls:'templateDescription', htmlString:Clipperz.PM.Strings['importFormats']['Roboform']['description']} 163 {tag:'div', cls:'templateDescription', htmlString:Clipperz.PM.Strings['importFormats']['Roboform']['description']}
166 ]} 164 ]}
167 ]}]}]} 165 ]}]}]}
168 ]}, 166 ]},
169 {tag:'li', children:[ 167 {tag:'li', children:[
170 {tag:'table', children:[{tag:'tbody', children:[{tag:'tr', children:[ 168 {tag:'table', children:[{tag:'tbody', children:[{tag:'tr', children:[
171 {tag:'td', valign:'top', children:[ 169 {tag:'td', valign:'top', children:[
172 {tag:'input', id:this.getId('PasswordPlus_radio'), type:'radio', name:'importFormat', value:'PASSWORD_PLUS'} 170 {tag:'input', id:this.getId('PasswordPlus_radio'), type:'radio', name:'importFormat', value:'PASSWORD_PLUS'}
173 ]}, 171 ]},
174 {tag:'td', valign:'top', children:[ 172 {tag:'td', valign:'top', children:[
175 {tag:'h4', id:this.getId('PasswordPlus_title'), htmlString:Clipperz.PM.Strings['importFormats']['PasswordPlus']['label']}, 173 {tag:'h4', id:this.getId('PasswordPlus_title'), htmlString:Clipperz.PM.Strings['importFormats']['PasswordPlus']['label']},
176 {tag:'div', cls:'templateDescription', htmlString:Clipperz.PM.Strings['importFormats']['PasswordPlus']['description']} 174 {tag:'div', cls:'templateDescription', htmlString:Clipperz.PM.Strings['importFormats']['PasswordPlus']['description']}
177 ]} 175 ]}
178 ]}]}]} 176 ]}]}]}
179 ]}, 177 ]},
180 {tag:'li', children:[ 178 {tag:'li', children:[
181 {tag:'table', children:[{tag:'tbody', children:[{tag:'tr', children:[ 179 {tag:'table', children:[{tag:'tbody', children:[{tag:'tr', children:[
182 {tag:'td', valign:'top', children:[ 180 {tag:'td', valign:'top', children:[
183 {tag:'input', id:this.getId('ClipperzExport_radio'), type:'radio', name:'importFormat', value:'CLIPPERZ_EXPORT'} 181 {tag:'input', id:this.getId('ClipperzExport_radio'), type:'radio', name:'importFormat', value:'CLIPPERZ_EXPORT'}
184 ]}, 182 ]},
185 {tag:'td', valign:'top', children:[ 183 {tag:'td', valign:'top', children:[
186 {tag:'h4', id:this.getId('ClipperzExport_title'), htmlString:Clipperz.PM.Strings['importFormats']['ClipperzExport']['label']}, 184 {tag:'h4', id:this.getId('ClipperzExport_title'), htmlString:Clipperz.PM.Strings['importFormats']['ClipperzExport']['label']},
187 {tag:'div', cls:'templateDescription', htmlString:Clipperz.PM.Strings['importFormats']['ClipperzExport']['description']} 185 {tag:'div', cls:'templateDescription', htmlString:Clipperz.PM.Strings['importFormats']['ClipperzExport']['description']}
188 ]} 186 ]}
189 ]}]}]} 187 ]}]}]}
190 ]} 188 ]}
191 ]}, 189 ]},
192 190
193 {tag:'div', cls:'importOptionsButtons', children:[ 191 {tag:'div', cls:'importOptionsButtons', children:[
194 {tag:'table', children:[ 192 {tag:'table', children:[
195 {tag:'tbody', children:[ 193 {tag:'tbody', children:[
196 {tag:'tr', children:[ 194 {tag:'tr', children:[
197 {tag:'td', html:'&nbsp;'}, 195 {tag:'td', html:'&nbsp;'},
198 {tag:'td', children:[ 196 {tag:'td', children:[
199 {tag:'div', id:this.getId('backActionButton')} 197 {tag:'div', id:this.getId('backActionButton')}
200 ]}, 198 ]},
201 {tag:'td', html:'&nbsp;'}, 199 {tag:'td', html:'&nbsp;'},
202 {tag:'td', children:[ 200 {tag:'td', children:[
203 {tag:'div', id:this.getId('nextActionButton')} 201 {tag:'div', id:this.getId('nextActionButton')}
204 ]}, 202 ]},
205 {tag:'td', html:'&nbsp;'} 203 {tag:'td', html:'&nbsp;'}
206 ]} 204 ]}
207 ]} 205 ]}
208 ]} 206 ]}
209 ]} 207 ]}
210 ]} 208 ]}
211 ]}, 209 ]},
212 {tag:'div', id:this.getId('importWizard'), children:[ 210 {tag:'div', id:this.getId('importWizard'), children:[
213 {tag:'form', id:this.getId('importWizardForm'), children:[ 211 {tag:'form', id:this.getId('importWizardForm'), children:[
214 {tag:'div', cls:'wizardComponent', id:this.getId('wizardComponent'), children:[]} 212 {tag:'div', cls:'wizardComponent', id:this.getId('wizardComponent'), children:[]}
215 ]} 213 ]}
216 ]} 214 ]}
217 ]}); 215 ]});
218 216
219 this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); 217 this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this}));
220 this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); 218 this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this}));
221 219
222 this.backButton().disable(); 220 this.backButton().disable();
223 this.nextButton().disable(); 221 this.nextButton().disable();
224 222
225 this.getElement('importCover').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show(); 223 this.getElement('importCover').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show();
226 this.getElement('importWizard').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 224 this.getElement('importWizard').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
227 225
228 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { 226 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) {
229 this.getElement('mainDiv').addClass('read-only'); 227 this.getElement('mainDiv').addClass('read-only');
230 228
231 this.getDom('ClipperzExport_radio').disabled = true; 229 this.getDom('ClipperzExport_radio').disabled = true;
232 this.getDom('CSV_radio').disabled = true; 230 this.getDom('CSV_radio').disabled = true;
233 this.getDom('Excel_radio').disabled = true; 231 this.getDom('Excel_radio').disabled = true;
234 this.getDom('PasswordPlus_radio').disabled = true; 232 this.getDom('PasswordPlus_radio').disabled = true;
235 this.getDom('Roboform_radio').disabled = true; 233 this.getDom('Roboform_radio').disabled = true;
236 this.getDom('KeePass_radio').disabled = true; 234 this.getDom('KeePass_radio').disabled = true;
237 } else { 235 } else {
238 MochiKit.Signal.connect(this.getId('ClipperzExport_radio'), 'onclick', MochiKit.Base.method(this, 'selectComponent')); 236 MochiKit.Signal.connect(this.getId('ClipperzExport_radio'), 'onclick', MochiKit.Base.method(this, 'selectComponent'));
239 MochiKit.Signal.connect(this.getId('CSV_radio'), 'onclick', MochiKit.Base.method(this, 'selectComponent')); 237 MochiKit.Signal.connect(this.getId('CSV_radio'), 'onclick', MochiKit.Base.method(this, 'selectComponent'));
240 MochiKit.Signal.connect(this.getId('Excel_radio'), 'onclick', MochiKit.Base.method(this, 'selectComponent')); 238 MochiKit.Signal.connect(this.getId('Excel_radio'), 'onclick', MochiKit.Base.method(this, 'selectComponent'));
241 MochiKit.Signal.connect(this.getId('PasswordPlus_radio'), 'onclick', MochiKit.Base.method(this, 'selectComponent')); 239 MochiKit.Signal.connect(this.getId('PasswordPlus_radio'), 'onclick', MochiKit.Base.method(this, 'selectComponent'));
242 MochiKit.Signal.connect(this.getId('Roboform_radio'), 'onclick', MochiKit.Base.method(this, 'selectComponent')); 240 MochiKit.Signal.connect(this.getId('Roboform_radio'), 'onclick', MochiKit.Base.method(this, 'selectComponent'));
243 MochiKit.Signal.connect(this.getId('KeePass_radio'), 'onclick', MochiKit.Base.method(this, 'selectComponent')); 241 MochiKit.Signal.connect(this.getId('KeePass_radio'), 'onclick', MochiKit.Base.method(this, 'selectComponent'));
244 242
245 if (Clipperz_IEisBroken != true) { 243 if (Clipperz_IEisBroken != true) {
246 MochiKit.Signal.connect(this.getId('ClipperzExport_title'), 'onclick', this.getDom('ClipperzExport_radio'), 'click'); 244 MochiKit.Signal.connect(this.getId('ClipperzExport_title'), 'onclick', this.getDom('ClipperzExport_radio'), 'click');
247 MochiKit.Signal.connect(this.getId('CSV_title'), 'onclick', this.getDom('CSV_radio'), 'click'); 245 MochiKit.Signal.connect(this.getId('CSV_title'), 'onclick', this.getDom('CSV_radio'), 'click');
248 MochiKit.Signal.connect(this.getId('Excel_title'), 'onclick', this.getDom('Excel_radio'), 'click'); 246 MochiKit.Signal.connect(this.getId('Excel_title'), 'onclick', this.getDom('Excel_radio'), 'click');
249 MochiKit.Signal.connect(this.getId('PasswordPlus_title'), 'onclick', this.getDom('PasswordPlus_radio'), 'click'); 247 MochiKit.Signal.connect(this.getId('PasswordPlus_title'), 'onclick', this.getDom('PasswordPlus_radio'), 'click');
250 MochiKit.Signal.connect(this.getId('Roboform_title'), 'onclick', this.getDom('Roboform_radio'), 'click'); 248 MochiKit.Signal.connect(this.getId('Roboform_title'), 'onclick', this.getDom('Roboform_radio'), 'click');
251 MochiKit.Signal.connect(this.getId('KeePass_title'), 'onclick', this.getDom('KeePass_radio'), 'click'); 249 MochiKit.Signal.connect(this.getId('KeePass_title'), 'onclick', this.getDom('KeePass_radio'), 'click');
252 } 250 }
253 251
254 Clipperz.NotificationCenter.register(null, 'importCompleted', this, 'resetImportComponent'); 252 Clipperz.NotificationCenter.register(null, 'importCompleted', this, 'resetImportComponent');
255 Clipperz.NotificationCenter.register(null, 'importCancelled', this, 'resetImportComponent'); 253 Clipperz.NotificationCenter.register(null, 'importCancelled', this, 'resetImportComponent');
256 } 254 }
257 255
258//MochiKit.Logging.logDebug("<<< Import.MainComponent.render"); 256//MochiKit.Logging.logDebug("<<< Import.MainComponent.render");
259 }, 257 },
260 258
261 //------------------------------------------------------------------------- 259 //-------------------------------------------------------------------------
262/* 260/*
263 'selectedFormat': function() { 261 'selectedFormat': function() {
264 return this.getDom('importSelectionOptions').value; 262 return this.getDom('importSelectionOptions').value;
265 }, 263 },
266*/ 264*/
267 //------------------------------------------------------------------------- 265 //-------------------------------------------------------------------------
268 266
269 'updateSelectedImportWizardComponent': function(aComponent) { 267 'updateSelectedImportWizardComponent': function(aComponent) {
270 var newWizardComponent; 268 var newWizardComponent;
271 269
272//MochiKit.Logging.logDebug(">>> Import.MainComponent.updateSelectedImportWizardComponent"); 270//MochiKit.Logging.logDebug(">>> Import.MainComponent.updateSelectedImportWizardComponent");
273 this.getElement('wizardComponent').update(""); 271 this.getElement('wizardComponent').update("");
274 272
275 switch(aComponent) { 273 switch(aComponent) {
276 case 'CLIPPERZ_EXPORT': 274 case 'CLIPPERZ_EXPORT':
277 newWizardComponent = new Clipperz.PM.Components.Import.ClipperzImportComponent(this.getElement('wizardComponent'), {user:this.user()}); 275 newWizardComponent = new Clipperz.PM.Components.Import.ClipperzImportComponent(this.getElement('wizardComponent'), {user:this.user()});
278 break; 276 break;
279 case 'CSV': 277 case 'CSV':
280 newWizardComponent = new Clipperz.PM.Components.Import.CSVImportComponent(this.getElement('wizardComponent'), {user:this.user()}); 278 newWizardComponent = new Clipperz.PM.Components.Import.CSVImportComponent(this.getElement('wizardComponent'), {user:this.user()});
281 break; 279 break;
282 case 'EXCEL': 280 case 'EXCEL':
283 newWizardComponent = new Clipperz.PM.Components.Import.ExcelImportComponent(this.getElement('wizardComponent'), {user:this.user()}); 281 newWizardComponent = new Clipperz.PM.Components.Import.ExcelImportComponent(this.getElement('wizardComponent'), {user:this.user()});
284 break; 282 break;
285 case 'PASSWORD_PLUS': 283 case 'PASSWORD_PLUS':
286 newWizardComponent = new Clipperz.PM.Components.Import.PasswordPlusImportComponent(this.getElement('wizardComponent'), {user:this.user()}); 284 newWizardComponent = new Clipperz.PM.Components.Import.PasswordPlusImportComponent(this.getElement('wizardComponent'), {user:this.user()});
287 break; 285 break;
288 case 'ROBOFORM': 286 case 'ROBOFORM':
289 newWizardComponent = new Clipperz.PM.Components.Import.RoboFormImportComponent(this.getElement('wizardComponent'), {user:this.user()});; 287 newWizardComponent = new Clipperz.PM.Components.Import.RoboFormImportComponent(this.getElement('wizardComponent'), {user:this.user()});;
290 break; 288 break;
291 case 'KEEPASS': 289 case 'KEEPASS':
292 newWizardComponent = new Clipperz.PM.Components.Import.KeePassImportComponent(this.getElement('wizardComponent'), {user:this.user()}); 290 newWizardComponent = new Clipperz.PM.Components.Import.KeePassImportComponent(this.getElement('wizardComponent'), {user:this.user()});
293 break; 291 break;
294 } 292 }
295 293
296 this.setWizardComponent(newWizardComponent); 294 this.setWizardComponent(newWizardComponent);
297//MochiKit.Logging.logDebug("<<< Import.MainComponent.updateSelectedWizardComponent"); 295//MochiKit.Logging.logDebug("<<< Import.MainComponent.updateSelectedWizardComponent");
298 }, 296 },
299 297
300 //------------------------------------------------------------------------- 298 //-------------------------------------------------------------------------
301 299
302 'selectComponent': function(anEvent) { 300 'selectComponent': function(anEvent) {
303 this.setSelectedComponent(anEvent.src().value); 301 this.setSelectedComponent(anEvent.src().value);
304 this.nextButton().enable(); 302 this.nextButton().enable();
305 }, 303 },
306 304
307 'selectedComponent': function() { 305 'selectedComponent': function() {
308 return this._selectedComponent; 306 return this._selectedComponent;
309 }, 307 },
310 308
311 'setSelectedComponent': function(aValue) { 309 'setSelectedComponent': function(aValue) {
312 this._selectedComponent = aValue; 310 this._selectedComponent = aValue;
313 }, 311 },
314 312
315 //------------------------------------------------------------------------- 313 //-------------------------------------------------------------------------
316 314
317 'backAction': function() { 315 'backAction': function() {
318 }, 316 },
319 317
320 //------------------------------------------------------------------------- 318 //-------------------------------------------------------------------------
321 319
322 'nextAction': function() { 320 'nextAction': function() {
323 this.updateSelectedImportWizardComponent(this.selectedComponent()); 321 this.updateSelectedImportWizardComponent(this.selectedComponent());
324 }, 322 },
325 323
326 //------------------------------------------------------------------------- 324 //-------------------------------------------------------------------------
327 __syntaxFix__: "syntax fix" 325 __syntaxFix__: "syntax fix"
328}); 326});
329 327
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/PasswordPlusImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/PasswordPlusImportComponent.js
index 24dc785..f58d913 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/PasswordPlusImportComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/PasswordPlusImportComponent.js
@@ -1,312 +1,310 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } 27if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.Import.PasswordPlusImportComponent = function(anElement, args) { 31Clipperz.PM.Components.Import.PasswordPlusImportComponent = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.Import.PasswordPlusImportComponent.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.Import.PasswordPlusImportComponent.superclass.constructor.call(this, anElement, args);
37 35
38 this.render(); 36 this.render();
39 37
40 return this; 38 return this;
41} 39}
42 40
43//============================================================================= 41//=============================================================================
44 42
45YAHOO.extendX(Clipperz.PM.Components.Import.PasswordPlusImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { 43YAHOO.extendX(Clipperz.PM.Components.Import.PasswordPlusImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, {
46 44
47 'toString': function() { 45 'toString': function() {
48 return "Clipperz.PM.Components.Import.PasswordPlusImportComponent component"; 46 return "Clipperz.PM.Components.Import.PasswordPlusImportComponent component";
49 }, 47 },
50 48
51 //------------------------------------------------------------------------- 49 //-------------------------------------------------------------------------
52 50
53 'render': function() { 51 'render': function() {
54//MochiKit.Logging.logDebug(">>> Import.PasswordPlusImportComponent.render"); 52//MochiKit.Logging.logDebug(">>> Import.PasswordPlusImportComponent.render");
55 this.domHelper().append(this.element(), {tag:'div', cls:'passwordPlusImportWizard', children:[ 53 this.domHelper().append(this.element(), {tag:'div', cls:'passwordPlusImportWizard', children:[
56 {tag:'h3', htmlString:Clipperz.PM.Strings['PasswordPlus_ImportWizard_Title']}, 54 {tag:'h3', htmlString:Clipperz.PM.Strings['PasswordPlus_ImportWizard_Title']},
57 {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, 55 {tag:'div', cls:'importSteps', id:this.getId('importSteps')},
58 {tag:'div', cls:'importStepBlocks', children:[ 56 {tag:'div', cls:'importStepBlocks', children:[
59 {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ 57 {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[
60 {tag:'div', children:[ 58 {tag:'div', children:[
61 {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_passwordPlus_description']}, 59 {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_passwordPlus_description']},
62 {tag:'div', cls:'importOptionsParameters', children:[]}, 60 {tag:'div', cls:'importOptionsParameters', children:[]},
63 this.textAreaConfig() 61 this.textAreaConfig()
64 ]} 62 ]}
65 ]}, 63 ]},
66 {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ 64 {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[
67 {tag:'div', children:[ 65 {tag:'div', children:[
68 {tag:'div', id:this.getId('previewDiv'), html:"preview"} 66 {tag:'div', id:this.getId('previewDiv'), html:"preview"}
69 ]} 67 ]}
70 ]}, 68 ]},
71 {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[ 69 {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[
72 {tag:'div', children:[ 70 {tag:'div', children:[
73 {tag:'h4', html:"done"} 71 {tag:'h4', html:"done"}
74 ]} 72 ]}
75 ]} 73 ]}
76 ]}, 74 ]},
77 {tag:'div', cls:'importOptionsButtons', children:[ 75 {tag:'div', cls:'importOptionsButtons', children:[
78 {tag:'table', children:[ 76 {tag:'table', children:[
79 {tag:'tbody', children:[ 77 {tag:'tbody', children:[
80 {tag:'tr', children:[ 78 {tag:'tr', children:[
81 {tag:'td', html:'&nbsp;'}, 79 {tag:'td', html:'&nbsp;'},
82 {tag:'td', children:[ 80 {tag:'td', children:[
83 {tag:'div', id:this.getId('backActionButton')} 81 {tag:'div', id:this.getId('backActionButton')}
84 ]}, 82 ]},
85 {tag:'td', html:'&nbsp;'}, 83 {tag:'td', html:'&nbsp;'},
86 {tag:'td', children:[ 84 {tag:'td', children:[
87 {tag:'div', id:this.getId('nextActionButton')} 85 {tag:'div', id:this.getId('nextActionButton')}
88 ]}, 86 ]},
89 {tag:'td', html:'&nbsp;'} 87 {tag:'td', html:'&nbsp;'}
90 ]} 88 ]}
91 ]} 89 ]}
92 ]} 90 ]}
93 ]} 91 ]}
94 ]}); 92 ]});
95 93
96 this.updateSteps(); 94 this.updateSteps();
97 95
98 this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); 96 this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this}));
99 this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); 97 this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this}));
100 98
101 this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() 99 this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show()
102 this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 100 this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
103 this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 101 this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
104//MochiKit.Logging.logDebug("<<< Import.PasswordPlusImportComponent.render"); 102//MochiKit.Logging.logDebug("<<< Import.PasswordPlusImportComponent.render");
105 }, 103 },
106 104
107 //------------------------------------------------------------------------- 105 //-------------------------------------------------------------------------
108/* 106/*
109 'backAction': function() { 107 'backAction': function() {
110 switch (this.currentStep()) { 108 switch (this.currentStep()) {
111 case 1: //-> 0 109 case 1: //-> 0
112 this.backButton().disable(); 110 this.backButton().disable();
113 this.getElement('step_1').hide(); 111 this.getElement('step_1').hide();
114 this.setCurrentStep(0); 112 this.setCurrentStep(0);
115 this.getElement('step_0').show(); 113 this.getElement('step_0').show();
116 break; 114 break;
117 } 115 }
118 }, 116 },
119*/ 117*/
120 //------------------------------------------------------------------------- 118 //-------------------------------------------------------------------------
121 119
122 'nextAction': function() { 120 'nextAction': function() {
123 switch (this.currentStep()) { 121 switch (this.currentStep()) {
124 case 0: //-> 1 122 case 0: //-> 1
125 this.previewValues(); 123 this.previewValues();
126 break; 124 break;
127 case 1: //-> 2 125 case 1: //-> 2
128 this.importValues(); 126 this.importValues();
129 break; 127 break;
130 } 128 }
131 }, 129 },
132 130
133 //------------------------------------------------------------------------- 131 //-------------------------------------------------------------------------
134 132
135 'deferredPreviewValues': function() { 133 'deferredPreviewValues': function() {
136 var deferredResult; 134 var deferredResult;
137 135
138 // this.setFormValues(MochiKit.DOM.formContents(this.getDom('dataForm'))); 136 // this.setFormValues(MochiKit.DOM.formContents(this.getDom('dataForm')));
139 137
140 deferredResult = new MochiKit.Async.Deferred(); 138 deferredResult = new MochiKit.Async.Deferred();
141 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 139 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
142 this.startProcessing(); 140 this.startProcessing();
143 141
144 return res; 142 return res;
145 }, this)); 143 }, this));
146 deferredResult.addCallback(MochiKit.Base.method(this, 'processPasswordPlusValues')); 144 deferredResult.addCallback(MochiKit.Base.method(this, 'processPasswordPlusValues'));
147 deferredResult.addCallback(MochiKit.Base.method(this, 'setProcessedValues')); 145 deferredResult.addCallback(MochiKit.Base.method(this, 'setProcessedValues'));
148 deferredResult.addCallback(MochiKit.Base.method(this, 'previewRecordValues')); 146 deferredResult.addCallback(MochiKit.Base.method(this, 'previewRecordValues'));
149 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 147 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
150 this.processingDone(); 148 this.processingDone();
151 this.getElement('step_0').hide(); 149 this.getElement('step_0').hide();
152 this.getElement('step_1').show(); 150 this.getElement('step_1').show();
153 this.backButton().enable(); 151 this.backButton().enable();
154 152
155 return res; 153 return res;
156 }, this)); 154 }, this));
157 // deferredResult.addErrback(MochiKit.Base.bind(function() { 155 // deferredResult.addErrback(MochiKit.Base.bind(function() {
158 // this.processingAborted(); 156 // this.processingAborted();
159 // }, this)) 157 // }, this))
160 deferredResult.callback(this.textAreaContent()); 158 deferredResult.callback(this.textAreaContent());
161 159
162 return deferredResult; 160 return deferredResult;
163 }, 161 },
164 162
165 //------------------------------------------------------------------------- 163 //-------------------------------------------------------------------------
166 164
167 'processPasswordPlusValues': function(someData) { 165 'processPasswordPlusValues': function(someData) {
168 var deferredResult; 166 var deferredResult;
169 var csvProcessor; 167 var csvProcessor;
170 168
171 csvProcessor = new Clipperz.CSVProcessor({binary:true}); 169 csvProcessor = new Clipperz.CSVProcessor({binary:true});
172 170
173 deferredResult = new MochiKit.Async.Deferred(); 171 deferredResult = new MochiKit.Async.Deferred();
174 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'parseImportData'); 172 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'parseImportData');
175 deferredResult.addCallback(function(res) { 173 deferredResult.addCallback(function(res) {
176 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:(res.length * 2)}, res); 174 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:(res.length * 2)}, res);
177 }) 175 })
178 deferredResult.addCallback(MochiKit.Base.method(csvProcessor, 'deferredParse')); 176 deferredResult.addCallback(MochiKit.Base.method(csvProcessor, 'deferredParse'));
179 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'previewImportData'); 177 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'previewImportData');
180 deferredResult.addCallback(function(res) { 178 deferredResult.addCallback(function(res) {
181 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:(res.length * 2), step:res.length}, res); 179 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:(res.length * 2), step:res.length}, res);
182 }) 180 })
183 deferredResult.addCallback(MochiKit.Base.bind(function(someCSVValues) { 181 deferredResult.addCallback(MochiKit.Base.bind(function(someCSVValues) {
184 var innerDeferredResult; 182 var innerDeferredResult;
185 var records; 183 var records;
186 var i,c; 184 var i,c;
187 185
188 innerDeferredResult = new MochiKit.Async.Deferred(); 186 innerDeferredResult = new MochiKit.Async.Deferred();
189 records = []; 187 records = [];
190 188
191 c = someCSVValues.length; 189 c = someCSVValues.length;
192 i=0; 190 i=0;
193 i++; //Dataviz Passwords Plus Export, Version,1, Minimum Version To Read,1 191 i++; //Dataviz Passwords Plus Export, Version,1, Minimum Version To Read,1
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 192 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
195 193
196 for( ; i<c; i++) { 194 for( ; i<c; i++) {
197 innerDeferredResult.addCallback(MochiKit.Async.wait, 0.2); 195 innerDeferredResult.addCallback(MochiKit.Async.wait, 0.2);
198 innerDeferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {}); 196 innerDeferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {});
199 innerDeferredResult.addCallback(MochiKit.Base.bind(function(someRecords, someData) { 197 innerDeferredResult.addCallback(MochiKit.Base.bind(function(someRecords, someData) {
200 if (someData[0] == '0') { 198 if (someData[0] == '0') {
201 var record; 199 var record;
202 var recordVersion; 200 var recordVersion;
203 var ii, cc; 201 var ii, cc;
204 202
205 record = new Clipperz.PM.DataModel.Record({user:this.user()}); 203 record = new Clipperz.PM.DataModel.Record({user:this.user()});
206 if (someData[1] != "") { 204 if (someData[1] != "") {
207 record.setLabel(someData[1]); 205 record.setLabel(someData[1]);
208 } else { 206 } else {
209 record.setLabel("imported record [" + (i+1) + "]"); 207 record.setLabel("imported record [" + (i+1) + "]");
210 } 208 }
211 record.setNotes(someData[33]); 209 record.setNotes(someData[33]);
212 recordVersion = record.currentVersion() 210 recordVersion = record.currentVersion()
213 211
214 cc = 10; 212 cc = 10;
215 for (ii=0; ii<cc; ii++) { 213 for (ii=0; ii<cc; ii++) {
216 var currentFieldValueIndex; 214 var currentFieldValueIndex;
217 var currentType; 215 var currentType;
218 216
219 currentFieldValueIndex = (ii * 3) + 4; 217 currentFieldValueIndex = (ii * 3) + 4;
220 218
221 if (someData[currentFieldValueIndex] != "") { 219 if (someData[currentFieldValueIndex] != "") {
222 var recordField; 220 var recordField;
223 var recordFieldType; 221 var recordFieldType;
224 222
225 recordFieldType = 'TXT'; 223 recordFieldType = 'TXT';
226 if (someData[currentFieldValueIndex + 1] == 1) { 224 if (someData[currentFieldValueIndex + 1] == 1) {
227 recordFieldType = 'PWD'; 225 recordFieldType = 'PWD';
228 } else if (/^http/.test(someData[currentFieldValueIndex])) { 226 } else if (/^http/.test(someData[currentFieldValueIndex])) {
229 recordFieldType = 'URL'; 227 recordFieldType = 'URL';
230 } 228 }
231 229
232 recordField = new Clipperz.PM.DataModel.RecordField({ 230 recordField = new Clipperz.PM.DataModel.RecordField({
233 recordVersion:recordVersion, 231 recordVersion:recordVersion,
234 label: someData[currentFieldValueIndex - 1], 232 label: someData[currentFieldValueIndex - 1],
235 value: someData[currentFieldValueIndex], 233 value: someData[currentFieldValueIndex],
236 type: recordFieldType 234 type: recordFieldType
237 }); 235 });
238 recordVersion.addField(recordField); 236 recordVersion.addField(recordField);
239 } 237 }
240 } 238 }
241 239
242 // this.user().addRecord(record, true); 240 // this.user().addRecord(record, true);
243 241
244 someRecords.push(record); 242 someRecords.push(record);
245 } 243 }
246 244
247 return someRecords; 245 return someRecords;
248 }, this), records, someCSVValues[i]); 246 }, this), records, someCSVValues[i]);
249 } 247 }
250 innerDeferredResult.addCallback(MochiKit.Async.succeed, records); 248 innerDeferredResult.addCallback(MochiKit.Async.succeed, records);
251 innerDeferredResult.callback(); 249 innerDeferredResult.callback();
252 250
253 return innerDeferredResult; 251 return innerDeferredResult;
254 }, this)); 252 }, this));
255 deferredResult.callback(someData); 253 deferredResult.callback(someData);
256 254
257 return deferredResult; 255 return deferredResult;
258 256
259/* 257/*
260 0Is Template 258 0Is Template
261 1Title 259 1Title
262 2Category 260 2Category
263 261
264 3Field 1 Label 262 3Field 1 Label
265 4Field 1 Value 263 4Field 1 Value
266 5Field 1 Hidden 264 5Field 1 Hidden
267 265
268 6Field 2 Label 266 6Field 2 Label
269 7Field 2 Value 267 7Field 2 Value
270 8Field 2 Hidden 268 8Field 2 Hidden
271 269
272 9Field 3 Label 270 9Field 3 Label
273 10Field 3 Value 271 10Field 3 Value
274 11Field 3 Hidden 272 11Field 3 Hidden
275 273
276 12Field 4 Label 274 12Field 4 Label
277 13Field 4 Value 275 13Field 4 Value
278 14Field 4 Hidden 276 14Field 4 Hidden
279 277
280 15Field 5 Label 278 15Field 5 Label
281 16Field 5 Value 279 16Field 5 Value
282 17Field 5 Hidden 280 17Field 5 Hidden
283 281
284 18Field 6 Label 282 18Field 6 Label
285 19Field 6 Value 283 19Field 6 Value
286 20Field 6 Hidden 284 20Field 6 Hidden
287 285
288 21Field 7 Label 286 21Field 7 Label
289 22Field 7 Value 287 22Field 7 Value
290 23Field 7 Hidden 288 23Field 7 Hidden
291 289
292 24Field 8 Label 290 24Field 8 Label
293 25Field 8 Value 291 25Field 8 Value
294 26Field 8 Hidden 292 26Field 8 Hidden
295 293
296 27Field 9 Label 294 27Field 9 Label
297 28Field 9 Value 295 28Field 9 Value
298 29Field 9 Hidden 296 29Field 9 Hidden
299 297
300 30Field 10 Label 298 30Field 10 Label
301 31Field 10 Value 299 31Field 10 Value
302 32Field 10 Hidden 300 32Field 10 Hidden
303 301
304 33Note 302 33Note
305*/ 303*/
306 }, 304 },
307 305
308 306
309 //------------------------------------------------------------------------- 307 //-------------------------------------------------------------------------
310 __syntaxFix__: "syntax fix" 308 __syntaxFix__: "syntax fix"
311}); 309});
312 310
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/RoboFormImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/RoboFormImportComponent.js
index fe4d45c..443ee17 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/RoboFormImportComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/RoboFormImportComponent.js
@@ -1,389 +1,387 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; } 27if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.Import.RoboFormImportComponent = function(anElement, args) { 31Clipperz.PM.Components.Import.RoboFormImportComponent = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.Import.RoboFormImportComponent.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.Import.RoboFormImportComponent.superclass.constructor.call(this, anElement, args);
37 35
38 this.render(); 36 this.render();
39 37
40 return this; 38 return this;
41} 39}
42 40
43//============================================================================= 41//=============================================================================
44 42
45YAHOO.extendX(Clipperz.PM.Components.Import.RoboFormImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, { 43YAHOO.extendX(Clipperz.PM.Components.Import.RoboFormImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, {
46 44
47 'toString': function() { 45 'toString': function() {
48 return "Clipperz.PM.Components.Import.RoboFormImportComponent component"; 46 return "Clipperz.PM.Components.Import.RoboFormImportComponent component";
49 }, 47 },
50 48
51 //------------------------------------------------------------------------- 49 //-------------------------------------------------------------------------
52 50
53 'render': function() { 51 'render': function() {
54//MochiKit.Logging.logDebug(">>> Import.RoboFormImportComponent.render"); 52//MochiKit.Logging.logDebug(">>> Import.RoboFormImportComponent.render");
55 this.domHelper().append(this.element(), {tag:'div', cls:'roboFormImportWizard', children:[ 53 this.domHelper().append(this.element(), {tag:'div', cls:'roboFormImportWizard', children:[
56 {tag:'h3', htmlString:Clipperz.PM.Strings['RoboForm_ImportWizard_Title']}, 54 {tag:'h3', htmlString:Clipperz.PM.Strings['RoboForm_ImportWizard_Title']},
57 {tag:'div', cls:'importSteps', id:this.getId('importSteps')}, 55 {tag:'div', cls:'importSteps', id:this.getId('importSteps')},
58 {tag:'div', cls:'importStepBlocks', children:[ 56 {tag:'div', cls:'importStepBlocks', children:[
59 {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[ 57 {tag:'div', cls:'step_0', id:this.getId('step_0'), children:[
60 {tag:'div', children:[ 58 {tag:'div', children:[
61 {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_roboForm_description']}, 59 {tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_roboForm_description']},
62 {tag:'div', cls:'importOptionsParameters', children:[]}, 60 {tag:'div', cls:'importOptionsParameters', children:[]},
63 this.textAreaConfig() 61 this.textAreaConfig()
64 ]} 62 ]}
65 ]}, 63 ]},
66 {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[ 64 {tag:'div', cls:'step_1', id:this.getId('step_1'), children:[
67 {tag:'div', children:[ 65 {tag:'div', children:[
68 {tag:'div', id:this.getId('previewDiv'), html:"preview"} 66 {tag:'div', id:this.getId('previewDiv'), html:"preview"}
69 ]} 67 ]}
70 ]}, 68 ]},
71 {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[ 69 {tag:'div', cls:'step_2', id:this.getId('step_2'), children:[
72 {tag:'div', children:[ 70 {tag:'div', children:[
73 {tag:'h4', html:"done"} 71 {tag:'h4', html:"done"}
74 ]} 72 ]}
75 ]} 73 ]}
76 ]}, 74 ]},
77 {tag:'div', cls:'importOptionsButtons', children:[ 75 {tag:'div', cls:'importOptionsButtons', children:[
78 {tag:'table', children:[ 76 {tag:'table', children:[
79 {tag:'tbody', children:[ 77 {tag:'tbody', children:[
80 {tag:'tr', children:[ 78 {tag:'tr', children:[
81 {tag:'td', html:'&nbsp;'}, 79 {tag:'td', html:'&nbsp;'},
82 {tag:'td', children:[ 80 {tag:'td', children:[
83 {tag:'div', id:this.getId('backActionButton')} 81 {tag:'div', id:this.getId('backActionButton')}
84 ]}, 82 ]},
85 {tag:'td', html:'&nbsp;'}, 83 {tag:'td', html:'&nbsp;'},
86 {tag:'td', children:[ 84 {tag:'td', children:[
87 {tag:'div', id:this.getId('nextActionButton')} 85 {tag:'div', id:this.getId('nextActionButton')}
88 ]}, 86 ]},
89 {tag:'td', html:'&nbsp;'} 87 {tag:'td', html:'&nbsp;'}
90 ]} 88 ]}
91 ]} 89 ]}
92 ]} 90 ]}
93 ]} 91 ]}
94 ]}); 92 ]});
95 93
96 this.updateSteps(); 94 this.updateSteps();
97 95
98 this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this})); 96 this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this}));
99 this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this})); 97 this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this}));
100 98
101 this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show() 99 this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show()
102 this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 100 this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
103 this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 101 this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
104//MochiKit.Logging.logDebug("<<< Import.RoboFormImportComponent.render"); 102//MochiKit.Logging.logDebug("<<< Import.RoboFormImportComponent.render");
105 }, 103 },
106 104
107 //------------------------------------------------------------------------- 105 //-------------------------------------------------------------------------
108 106
109 'nextAction': function() { 107 'nextAction': function() {
110 switch (this.currentStep()) { 108 switch (this.currentStep()) {
111 case 0: //-> 1 109 case 0: //-> 1
112 this.previewValues(); 110 this.previewValues();
113 break; 111 break;
114 case 1: //-> 2 112 case 1: //-> 2
115 this.importValues(); 113 this.importValues();
116 break; 114 break;
117 } 115 }
118 }, 116 },
119 117
120 //------------------------------------------------------------------------- 118 //-------------------------------------------------------------------------
121 119
122 'deferredPreviewValues': function() { 120 'deferredPreviewValues': function() {
123 var deferredResult; 121 var deferredResult;
124 122
125 // this.setFormValues(MochiKit.DOM.formContents(this.getDom('dataForm'))); 123 // this.setFormValues(MochiKit.DOM.formContents(this.getDom('dataForm')));
126 124
127 deferredResult = new MochiKit.Async.Deferred(); 125 deferredResult = new MochiKit.Async.Deferred();
128 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 126 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
129 this.startProcessing(); 127 this.startProcessing();
130 128
131 return res; 129 return res;
132 }, this)); 130 }, this));
133 deferredResult.addCallback(MochiKit.Base.method(this, 'processRoboFormValues')); 131 deferredResult.addCallback(MochiKit.Base.method(this, 'processRoboFormValues'));
134 deferredResult.addCallback(MochiKit.Base.method(this, 'setProcessedValues')); 132 deferredResult.addCallback(MochiKit.Base.method(this, 'setProcessedValues'));
135 deferredResult.addCallback(MochiKit.Base.method(this, 'previewRecordValues')); 133 deferredResult.addCallback(MochiKit.Base.method(this, 'previewRecordValues'));
136 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 134 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
137 this.processingDone(); 135 this.processingDone();
138 this.getElement('step_0').hide(); 136 this.getElement('step_0').hide();
139 this.getElement('step_1').show(); 137 this.getElement('step_1').show();
140 this.backButton().enable(); 138 this.backButton().enable();
141 139
142 return res; 140 return res;
143 }, this)); 141 }, this));
144 // deferredResult.addErrback(MochiKit.Base.bind(function() { 142 // deferredResult.addErrback(MochiKit.Base.bind(function() {
145 // this.processingAborted(); 143 // this.processingAborted();
146 // }, this)) 144 // }, this))
147 deferredResult.callback(this.textAreaContent()); 145 deferredResult.callback(this.textAreaContent());
148 146
149 return deferredResult; 147 return deferredResult;
150 }, 148 },
151 149
152 //------------------------------------------------------------------------- 150 //-------------------------------------------------------------------------
153 151
154 'processRoboFormValues': function(someData) { 152 'processRoboFormValues': function(someData) {
155 var result; 153 var result;
156 154
157 if (someData.match(/^\<HTML\>\<HEAD\>\<TITLE\>RoboForm Passcards List /g)) { 155 if (someData.match(/^\<HTML\>\<HEAD\>\<TITLE\>RoboForm Passcards List /g)) {
158 result = this.processRoboFormPasscardsValues(someData); 156 result = this.processRoboFormPasscardsValues(someData);
159 } else if (someData.match(/\<HTML\>\<HEAD\>\<TITLE\>RoboForm Safenotes List /g)) { 157 } else if (someData.match(/\<HTML\>\<HEAD\>\<TITLE\>RoboForm Safenotes List /g)) {
160 result = this.processRoboFormSafenotesValues(someData); 158 result = this.processRoboFormSafenotesValues(someData);
161 } 159 }
162 160
163 return result; 161 return result;
164 }, 162 },
165 163
166 //......................................................................... 164 //.........................................................................
167 165
168 'processRoboFormPasscardsValues': function(someData) { 166 'processRoboFormPasscardsValues': function(someData) {
169 var deferredResult; 167 var deferredResult;
170 168
171 deferredResult = new MochiKit.Async.Deferred(); 169 deferredResult = new MochiKit.Async.Deferred();
172//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 1: "/* + res*/); return res;}); 170//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 1: "/* + res*/); return res;});
173 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'parseImportData'); 171 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'parseImportData');
174//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 2: "/* + res*/); return res;}); 172//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 2: "/* + res*/); return res;});
175 deferredResult.addCallback(function(someData) { 173 deferredResult.addCallback(function(someData) {
176 var result; 174 var result;
177 var data; 175 var data;
178 176
179 data = someData.replace(/\r?\n/g, ""); 177 data = someData.replace(/\r?\n/g, "");
180 result = data.match(/\<TABLE width\=\"100\%\"\>.*?\<\/TABLE\>/g); 178 result = data.match(/\<TABLE width\=\"100\%\"\>.*?\<\/TABLE\>/g);
181 179
182 return result; 180 return result;
183 }); 181 });
184//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 3: "/* + res*/); return res;}); 182//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 3: "/* + res*/); return res;});
185//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 3.1: " + res.length); return res;}); 183//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 3.1: " + res.length); return res;});
186 deferredResult.addCallback(function(res) { 184 deferredResult.addCallback(function(res) {
187 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:(res.length)}, res); 185 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:(res.length)}, res);
188 }) 186 })
189//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 4: "/* + res*/); return res;}); 187//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 4: "/* + res*/); return res;});
190 deferredResult.addCallback(MochiKit.Base.bind(function(someRecordValues) { 188 deferredResult.addCallback(MochiKit.Base.bind(function(someRecordValues) {
191 var innerDeferredResult; 189 var innerDeferredResult;
192 var records; 190 var records;
193 var i,c; 191 var i,c;
194 192
195 innerDeferredResult = new MochiKit.Async.Deferred(); 193 innerDeferredResult = new MochiKit.Async.Deferred();
196 records = []; 194 records = [];
197 195
198 c = someRecordValues.length; 196 c = someRecordValues.length;
199 for(i=0; i<c; i++) { 197 for(i=0; i<c; i++) {
200//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 1: " + res); return res;}); 198//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 1: " + res); return res;});
201 innerDeferredResult.addCallback(MochiKit.Async.wait, 0.2); 199 innerDeferredResult.addCallback(MochiKit.Async.wait, 0.2);
202//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 2: " + res); return res;}); 200//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 2: " + res); return res;});
203 innerDeferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {}); 201 innerDeferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {});
204//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 3: " + res); return res;}); 202//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 3: " + res); return res;});
205 innerDeferredResult.addCallback(MochiKit.Base.bind(function(someRecords, someData) { 203 innerDeferredResult.addCallback(MochiKit.Base.bind(function(someRecords, someData) {
206 var data; 204 var data;
207 var record; 205 var record;
208 var recordVersion; 206 var recordVersion;
209 var fields; 207 var fields;
210 var ii, cc; 208 var ii, cc;
211 var hasNotes; 209 var hasNotes;
212 210
213 var caption; 211 var caption;
214 var subcaption; 212 var subcaption;
215 213
216//MochiKit.Logging.logDebug("data: " + someData); 214//MochiKit.Logging.logDebug("data: " + someData);
217 data = someData.replace(/\<WBR\>/g, ""); 215 data = someData.replace(/\<WBR\>/g, "");
218 hasNotes = false; 216 hasNotes = false;
219 217
220 /\<TD class\=caption colSpan\=3\>(.*?)\<\/TD\>/.test(data); //<TD class=caption colSpan=3>110mb</TD> 218 /\<TD class\=caption colSpan\=3\>(.*?)\<\/TD\>/.test(data); //<TD class=caption colSpan=3>110mb</TD>
221 caption = RegExp.$1; 219 caption = RegExp.$1;
222//MochiKit.Logging.logDebug("caption: " + caption); 220//MochiKit.Logging.logDebug("caption: " + caption);
223 221
224 /\<TD class\=subcaption colSpan\=3\>(.*?)\<\/TD\>/.test(data); //<TD class=subcaption colSpan=3>110<WBR>mb.com</TD> 222 /\<TD class\=subcaption colSpan\=3\>(.*?)\<\/TD\>/.test(data); //<TD class=subcaption colSpan=3>110<WBR>mb.com</TD>
225 subcaption = RegExp.$1; 223 subcaption = RegExp.$1;
226//MochiKit.Logging.logDebug("subcaption: " + subcaption); 224//MochiKit.Logging.logDebug("subcaption: " + subcaption);
227 225
228 record = new Clipperz.PM.DataModel.Record({user:this.user()}); 226 record = new Clipperz.PM.DataModel.Record({user:this.user()});
229 recordVersion = record.currentVersion() 227 recordVersion = record.currentVersion()
230 228
231 record.setLabel(caption); 229 record.setLabel(caption);
232 // record.setNotes(subcaption); 230 // record.setNotes(subcaption);
233 if (subcaption != null) { 231 if (subcaption != null) {
234 var recordField; 232 var recordField;
235 233
236 recordField = new Clipperz.PM.DataModel.RecordField({ 234 recordField = new Clipperz.PM.DataModel.RecordField({
237 recordVersion:recordVersion, 235 recordVersion:recordVersion,
238 label: "url", 236 label: "url",
239 value: subcaption, 237 value: subcaption,
240 type: 'URL' 238 type: 'URL'
241 }); 239 });
242 recordVersion.addField(recordField); 240 recordVersion.addField(recordField);
243 } 241 }
244 242
245 fields = data.match(/\<TR\>.*?\<\/TR\>/g) || []; 243 fields = data.match(/\<TR\>.*?\<\/TR\>/g) || [];
246 cc = fields.length; 244 cc = fields.length;
247//MochiKit.Logging.logDebug("fields.length: " + cc); 245//MochiKit.Logging.logDebug("fields.length: " + cc);
248 for (ii=0; ii<cc; ii++) { 246 for (ii=0; ii<cc; ii++) {
249 var recordField; 247 var recordField;
250 var fieldString; 248 var fieldString;
251 var fieldName; 249 var fieldName;
252 var fieldValue; 250 var fieldValue;
253 251
254//MochiKit.Logging.logDebug("fieldString: " + fields[ii]); 252//MochiKit.Logging.logDebug("fieldString: " + fields[ii]);
255 fieldString = fields[ii]; 253 fieldString = fields[ii];
256//MochiKit.Logging.logDebug("fieldString (cleaned): " + fieldString); 254//MochiKit.Logging.logDebug("fieldString (cleaned): " + fieldString);
257 /\<TD class\=field vAlign\=top align\=left width\=\"40\%\"\>(.*?)\<\/TD\>/.test(fieldString); 255 /\<TD class\=field vAlign\=top align\=left width\=\"40\%\"\>(.*?)\<\/TD\>/.test(fieldString);
258 fieldName = RegExp.$1; 256 fieldName = RegExp.$1;
259 257
260 /\<TD class\=wordbreakfield vAlign\=top align\=left width\=\"55\%\"\>(.*?)\<\/TD\>/.test(fieldString); 258 /\<TD class\=wordbreakfield vAlign\=top align\=left width\=\"55\%\"\>(.*?)\<\/TD\>/.test(fieldString);
261 fieldValue = RegExp.$1; 259 fieldValue = RegExp.$1;
262 260
263 if (fieldName == "Note$") { 261 if (fieldName == "Note$") {
264 record.setNotes(fieldValue); 262 record.setNotes(fieldValue);
265 hasNotes = true; 263 hasNotes = true;
266 } else { 264 } else {
267 var fieldType; 265 var fieldType;
268 266
269 if (((ii == 1) && (hasNotes == false)) || ((ii == 2) && (hasNotes == true))) { 267 if (((ii == 1) && (hasNotes == false)) || ((ii == 2) && (hasNotes == true))) {
270 fieldType = 'PWD'; 268 fieldType = 'PWD';
271 } else { 269 } else {
272 fieldType = 'TXT'; 270 fieldType = 'TXT';
273 } 271 }
274 272
275 recordField = new Clipperz.PM.DataModel.RecordField({ 273 recordField = new Clipperz.PM.DataModel.RecordField({
276 recordVersion:recordVersion, 274 recordVersion:recordVersion,
277 label: fieldName, 275 label: fieldName,
278 value: fieldValue, 276 value: fieldValue,
279 type: fieldType 277 type: fieldType
280 }); 278 });
281 recordVersion.addField(recordField); 279 recordVersion.addField(recordField);
282 } 280 }
283 } 281 }
284 282
285 someRecords.push(record); 283 someRecords.push(record);
286 284
287 return someRecords; 285 return someRecords;
288 }, this), records, someRecordValues[i]); 286 }, this), records, someRecordValues[i]);
289 } 287 }
290//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 4: " + res); return res;}); 288//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 4: " + res); return res;});
291 innerDeferredResult.addCallback(MochiKit.Async.succeed, records); 289 innerDeferredResult.addCallback(MochiKit.Async.succeed, records);
292//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 5: " + res); return res;}); 290//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 5: " + res); return res;});
293 innerDeferredResult.callback(); 291 innerDeferredResult.callback();
294 292
295 return innerDeferredResult; 293 return innerDeferredResult;
296 }, this)); 294 }, this));
297 deferredResult.callback(someData); 295 deferredResult.callback(someData);
298 296
299 return deferredResult; 297 return deferredResult;
300 }, 298 },
301 299
302 300
303 //......................................................................... 301 //.........................................................................
304 302
305 'processRoboFormSafenotesValues': function(someData) { 303 'processRoboFormSafenotesValues': function(someData) {
306 var deferredResult; 304 var deferredResult;
307 305
308 deferredResult = new MochiKit.Async.Deferred(); 306 deferredResult = new MochiKit.Async.Deferred();
309//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 1: "/* + res*/); return res;}); 307//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 1: "/* + res*/); return res;});
310 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'parseImportData'); 308 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'parseImportData');
311//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 2: "/* + res*/); return res;}); 309//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 2: "/* + res*/); return res;});
312 deferredResult.addCallback(function(someData) { 310 deferredResult.addCallback(function(someData) {
313 var result; 311 var result;
314 var data; 312 var data;
315 313
316 data = someData.replace(/\r?\n/g, ""); 314 data = someData.replace(/\r?\n/g, "");
317 result = data.match(/\<TABLE width\=\"100\%\"\>.*?\<\/TABLE\>/g); 315 result = data.match(/\<TABLE width\=\"100\%\"\>.*?\<\/TABLE\>/g);
318 316
319 return result; 317 return result;
320 }); 318 });
321//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 3: "/* + res*/); return res;}); 319//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 3: "/* + res*/); return res;});
322//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 3.1: " + res.length); return res;}); 320//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 3.1: " + res.length); return res;});
323 deferredResult.addCallback(function(res) { 321 deferredResult.addCallback(function(res) {
324 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:(res.length)}, res); 322 return Clipperz.NotificationCenter.deferredNotification(this, 'updatedProgressState', {steps:(res.length)}, res);
325 }) 323 })
326//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 4: "/* + res*/); return res;}); 324//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues - 4: "/* + res*/); return res;});
327 deferredResult.addCallback(MochiKit.Base.bind(function(someRecordValues) { 325 deferredResult.addCallback(MochiKit.Base.bind(function(someRecordValues) {
328 var innerDeferredResult; 326 var innerDeferredResult;
329 var records; 327 var records;
330 var i,c; 328 var i,c;
331 329
332 innerDeferredResult = new MochiKit.Async.Deferred(); 330 innerDeferredResult = new MochiKit.Async.Deferred();
333 records = []; 331 records = [];
334 332
335 c = someRecordValues.length; 333 c = someRecordValues.length;
336 for(i=0; i<c; i++) { 334 for(i=0; i<c; i++) {
337//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 1: " + res); return res;}); 335//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 1: " + res); return res;});
338 innerDeferredResult.addCallback(MochiKit.Async.wait, 0.2); 336 innerDeferredResult.addCallback(MochiKit.Async.wait, 0.2);
339//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 2: " + res); return res;}); 337//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 2: " + res); return res;});
340 innerDeferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {}); 338 innerDeferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {});
341//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 3: " + res); return res;}); 339//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 3: " + res); return res;});
342 innerDeferredResult.addCallback(MochiKit.Base.bind(function(someRecords, someData) { 340 innerDeferredResult.addCallback(MochiKit.Base.bind(function(someRecords, someData) {
343 var data; 341 var data;
344 var record; 342 var record;
345 var recordVersion; 343 var recordVersion;
346 344
347 var caption; 345 var caption;
348 var wordbreakfield; 346 var wordbreakfield;
349 347
350//MochiKit.Logging.logDebug("data: " + someData); 348//MochiKit.Logging.logDebug("data: " + someData);
351 data = someData.replace(/\<WBR\>/g, ""); 349 data = someData.replace(/\<WBR\>/g, "");
352 hasNotes = false; 350 hasNotes = false;
353 351
354 /\<TD class\=caption colSpan\=3\>(.*?)\<\/TD\>/.test(data); //<TD class=caption colSpan=3>110mb</TD> 352 /\<TD class\=caption colSpan\=3\>(.*?)\<\/TD\>/.test(data); //<TD class=caption colSpan=3>110mb</TD>
355 caption = RegExp.$1; 353 caption = RegExp.$1;
356//MochiKit.Logging.logDebug("caption: " + caption); 354//MochiKit.Logging.logDebug("caption: " + caption);
357 355
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> 356 /\<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>
359 wordbreakfield = RegExp.$1; 357 wordbreakfield = RegExp.$1;
360//MochiKit.Logging.logDebug("subcaption: " + subcaption); 358//MochiKit.Logging.logDebug("subcaption: " + subcaption);
361 359
362 record = new Clipperz.PM.DataModel.Record({user:this.user()}); 360 record = new Clipperz.PM.DataModel.Record({user:this.user()});
363 recordVersion = record.currentVersion() 361 recordVersion = record.currentVersion()
364 362
365 record.setLabel(caption); 363 record.setLabel(caption);
366 record.setNotes(wordbreakfield); 364 record.setNotes(wordbreakfield);
367 365
368 someRecords.push(record); 366 someRecords.push(record);
369 367
370 return someRecords; 368 return someRecords;
371 }, this), records, someRecordValues[i]); 369 }, this), records, someRecordValues[i]);
372 } 370 }
373//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 4: " + res); return res;}); 371//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 4: " + res); return res;});
374 innerDeferredResult.addCallback(MochiKit.Async.succeed, records); 372 innerDeferredResult.addCallback(MochiKit.Async.succeed, records);
375//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 5: " + res); return res;}); 373//innerDeferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RoboFormImportComponent.processRoboFormValues __inner loop__ - 5: " + res); return res;});
376 innerDeferredResult.callback(); 374 innerDeferredResult.callback();
377 375
378 return innerDeferredResult; 376 return innerDeferredResult;
379 }, this)); 377 }, this));
380 deferredResult.callback(someData); 378 deferredResult.callback(someData);
381 379
382 return deferredResult; 380 return deferredResult;
383 }, 381 },
384 382
385 383
386 //------------------------------------------------------------------------- 384 //-------------------------------------------------------------------------
387 __syntaxFix__: "syntax fix" 385 __syntaxFix__: "syntax fix"
388}); 386});
389 387
diff --git a/frontend/beta/js/Clipperz/PM/Components/MessageBox.js b/frontend/beta/js/Clipperz/PM/Components/MessageBox.js
index cf9ec86..f9b845e 100644
--- a/frontend/beta/js/Clipperz/PM/Components/MessageBox.js
+++ b/frontend/beta/js/Clipperz/PM/Components/MessageBox.js
@@ -1,221 +1,219 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29 27
30 28
31 29
32Clipperz.PM.Components.MessageBoxImplementation = function() { 30Clipperz.PM.Components.MessageBoxImplementation = function() {
33 this._step = 0; 31 this._step = 0;
34 this._steps = 0; 32 this._steps = 0;
35 33
36 return this; 34 return this;
37}; 35};
38 36
39//YAHOO.extendX(Clipperz.PM.Components.MessageBoxImplementation, Clipperz.PM.Components.BaseComponent, { 37//YAHOO.extendX(Clipperz.PM.Components.MessageBoxImplementation, Clipperz.PM.Components.BaseComponent, {
40Clipperz.PM.Components.MessageBoxImplementation.prototype = MochiKit.Base.update(null, { 38Clipperz.PM.Components.MessageBoxImplementation.prototype = MochiKit.Base.update(null, {
41 39
42 'toString': function() { 40 'toString': function() {
43 return "Clipperz.PM.Components.MessageBox"; 41 return "Clipperz.PM.Components.MessageBox";
44 }, 42 },
45 43
46 //----------------------------------------------------- 44 //-----------------------------------------------------
47 45
48 'step': function() { 46 'step': function() {
49 return this._step; 47 return this._step;
50 }, 48 },
51 49
52 'setStep': function(aValue) { 50 'setStep': function(aValue) {
53 if (aValue == 'next') { 51 if (aValue == 'next') {
54 this._step = this._step + 1; 52 this._step = this._step + 1;
55 } else { 53 } else {
56 this._step = aValue; 54 this._step = aValue;
57 } 55 }
58 56
59 if (this._step > this.steps()) { 57 if (this._step > this.steps()) {
60//MochiKit.Logging.logDebug("overstepping: " + this._step + " (" + this.steps() + ")"); 58//MochiKit.Logging.logDebug("overstepping: " + this._step + " (" + this.steps() + ")");
61 this._step = this.steps(); 59 this._step = this.steps();
62 } 60 }
63 }, 61 },
64 62
65 //----------------------------------------------------- 63 //-----------------------------------------------------
66 64
67 'steps': function() { 65 'steps': function() {
68 return this._steps; 66 return this._steps;
69 }, 67 },
70 68
71 'setSteps': function(aValue) { 69 'setSteps': function(aValue) {
72 if (aValue.constructor == String) { 70 if (aValue.constructor == String) {
73 if (aValue.charAt(0) == '+') { 71 if (aValue.charAt(0) == '+') {
74 this._steps += aValue.substring(1)*1; 72 this._steps += aValue.substring(1)*1;
75 } else if (aValue.charAt(0) == '-') { 73 } else if (aValue.charAt(0) == '-') {
76 this._steps -= aValue.substring(1)*1; 74 this._steps -= aValue.substring(1)*1;
77 } else { 75 } else {
78 this._steps = aValue.substring(1)*1; 76 this._steps = aValue.substring(1)*1;
79 } 77 }
80 } else { 78 } else {
81 this._steps = aValue; 79 this._steps = aValue;
82 } 80 }
83 }, 81 },
84 82
85 //----------------------------------------------------- 83 //-----------------------------------------------------
86 84
87 'deferredShow': function(aConfiguration, anAnimationTargetElement, aValue) { 85 'deferredShow': function(aConfiguration, anAnimationTargetElement, aValue) {
88 this.show(aConfiguration, anAnimationTargetElement); 86 this.show(aConfiguration, anAnimationTargetElement);
89 87
90 return aValue; 88 return aValue;
91 }, 89 },
92 90
93 'show': function(aConfiguration, anAnimationTargetElement) { 91 'show': function(aConfiguration, anAnimationTargetElement) {
94 varmessageBoxConfiguration; 92 varmessageBoxConfiguration;
95 93
96 messageBoxConfiguration = MochiKit.Base.clone(aConfiguration); 94 messageBoxConfiguration = MochiKit.Base.clone(aConfiguration);
97 messageBoxConfiguration.msg = messageBoxConfiguration.text; 95 messageBoxConfiguration.msg = messageBoxConfiguration.text;
98 messageBoxConfiguration.animEl = anAnimationTargetElement; 96 messageBoxConfiguration.animEl = anAnimationTargetElement;
99 messageBoxConfiguration.progress = messageBoxConfiguration.showProgressBar; 97 messageBoxConfiguration.progress = messageBoxConfiguration.showProgressBar;
100 messageBoxConfiguration.closable = messageBoxConfiguration.showCloseButton; 98 messageBoxConfiguration.closable = messageBoxConfiguration.showCloseButton;
101 this.setSteps(aConfiguration.steps || 0); 99 this.setSteps(aConfiguration.steps || 0);
102 this.setStep(aConfiguration.step || 0); 100 this.setStep(aConfiguration.step || 0);
103 delete messageBoxConfiguration.buttons; 101 delete messageBoxConfiguration.buttons;
104 102
105 Clipperz.YUI.MessageBox.show(messageBoxConfiguration); 103 Clipperz.YUI.MessageBox.show(messageBoxConfiguration);
106 }, 104 },
107 105
108 //----------------------------------------------------- 106 //-----------------------------------------------------
109 107
110 'update': function(someValues) { 108 'update': function(someValues) {
111//MochiKit.Logging.logDebug(">>> MessageBox.update"); 109//MochiKit.Logging.logDebug(">>> MessageBox.update");
112 if (someValues.title) { 110 if (someValues.title) {
113 Clipperz.YUI.MessageBox.getDialog().setTitle(someValues.title); 111 Clipperz.YUI.MessageBox.getDialog().setTitle(someValues.title);
114 }; 112 };
115 113
116 if (someValues.text) { 114 if (someValues.text) {
117 Clipperz.YUI.MessageBox.updateText(someValues.text); 115 Clipperz.YUI.MessageBox.updateText(someValues.text);
118 }; 116 };
119 117
120 if (typeof(someValues.showProgressBar) != 'undefined') { 118 if (typeof(someValues.showProgressBar) != 'undefined') {
121 Clipperz.YUI.MessageBox.progressElement().setDisplayed(someValues.showProgressBar); 119 Clipperz.YUI.MessageBox.progressElement().setDisplayed(someValues.showProgressBar);
122 Clipperz.YUI.MessageBox.updateProgress(0); 120 Clipperz.YUI.MessageBox.updateProgress(0);
123 }; 121 };
124 122
125 if (typeof(someValues.steps) != 'undefined') { 123 if (typeof(someValues.steps) != 'undefined') {
126 this.setSteps(someValues.steps); 124 this.setSteps(someValues.steps);
127 }; 125 };
128 126
129 if (typeof(someValues.step) != 'undefined') { 127 if (typeof(someValues.step) != 'undefined') {
130 this.setStep(someValues.step); 128 this.setStep(someValues.step);
131 } else { 129 } else {
132 this.setStep('next'); 130 this.setStep('next');
133 } 131 }
134 Clipperz.YUI.MessageBox.updateProgress(this.step() / this.steps()); 132 Clipperz.YUI.MessageBox.updateProgress(this.step() / this.steps());
135 133
136 134
137 if (typeof(someValues.fn) != 'undefined') { 135 if (typeof(someValues.fn) != 'undefined') {
138 Clipperz.YUI.MessageBox.opt().fn = someValues.fn; 136 Clipperz.YUI.MessageBox.opt().fn = someValues.fn;
139 }; 137 };
140 138
141 if (typeof(someValues.scope) != 'undefined') { 139 if (typeof(someValues.scope) != 'undefined') {
142 Clipperz.YUI.MessageBox.opt().scope = someValues.scope; 140 Clipperz.YUI.MessageBox.opt().scope = someValues.scope;
143 }; 141 };
144 142
145 if (someValues.buttons) { 143 if (someValues.buttons) {
146 Clipperz.YUI.MessageBox.updateButtons(someValues.buttons); 144 Clipperz.YUI.MessageBox.updateButtons(someValues.buttons);
147 }; 145 };
148 146
149 // if (someValues.title) { 147 // if (someValues.title) {
150 // Clipperz.YUI.MessageBox.getDialog().setTitle(someValues.title + " [" + this.step() + " / " + this.steps() + "]"); 148 // Clipperz.YUI.MessageBox.getDialog().setTitle(someValues.title + " [" + this.step() + " / " + this.steps() + "]");
151 // }; 149 // };
152 150
153//MochiKit.Logging.logDebug("--- MessageBox.update - step: " + this.step() + " / " + this.steps() + " - " + someValues.text); 151//MochiKit.Logging.logDebug("--- MessageBox.update - step: " + this.step() + " / " + this.steps() + " - " + someValues.text);
154//MochiKit.Logging.logDebug("<<< MessageBox.update"); 152//MochiKit.Logging.logDebug("<<< MessageBox.update");
155 }, 153 },
156 154
157 //----------------------------------------------------- 155 //-----------------------------------------------------
158 156
159 'hide': function(anAnimationTargetElement) { 157 'hide': function(anAnimationTargetElement) {
160 if (anAnimationTargetElement) { 158 if (anAnimationTargetElement) {
161 Clipperz.YUI.MessageBox.getDialog().animateTarget = anAnimationTargetElement; 159 Clipperz.YUI.MessageBox.getDialog().animateTarget = anAnimationTargetElement;
162 } 160 }
163 161
164 Clipperz.YUI.MessageBox.hide(); 162 Clipperz.YUI.MessageBox.hide();
165 }, 163 },
166 164
167 //----------------------------------------------------- 165 //-----------------------------------------------------
168 __syntaxFix__: '__syntaxFix__' 166 __syntaxFix__: '__syntaxFix__'
169}); 167});
170 168
171 169
172//########################################################## 170//##########################################################
173 171
174_clipperz_pm_components_messageBox = null; 172_clipperz_pm_components_messageBox = null;
175 173
176Clipperz.PM.Components.MessageBox = function() { 174Clipperz.PM.Components.MessageBox = function() {
177 if (_clipperz_pm_components_messageBox == null) { 175 if (_clipperz_pm_components_messageBox == null) {
178 _clipperz_pm_components_messageBox = new Clipperz.PM.Components.MessageBoxImplementation(); 176 _clipperz_pm_components_messageBox = new Clipperz.PM.Components.MessageBoxImplementation();
179 } 177 }
180 178
181 return _clipperz_pm_components_messageBox; 179 return _clipperz_pm_components_messageBox;
182} 180}
183 181
184//--------------------------------------------------------- 182//---------------------------------------------------------
185 183
186Clipperz.PM.Components.MessageBox.showProgressPanel = function(aCallback, anErrback, anActivationItem) { 184Clipperz.PM.Components.MessageBox.showProgressPanel = function(aCallback, anErrback, anActivationItem) {
187 var deferredResult; 185 var deferredResult;
188 186
189 deferredResult = new MochiKit.Async.Deferred(); 187 deferredResult = new MochiKit.Async.Deferred();
190//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Components.MessageBox.showProgressPanel - 0: " + res); return res;}); 188//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Components.MessageBox.showProgressPanel - 0: " + res); return res;});
191 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Components.MessageBox(), 'deferredShow'), 189 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Components.MessageBox(), 'deferredShow'),
192 { 190 {
193 title: "", 191 title: "",
194 text: "", 192 text: "",
195 width:240, 193 width:240,
196 showProgressBar:true, 194 showProgressBar:true,
197 showCloseButton:false, 195 showCloseButton:false,
198 fn:MochiKit.Base.method(deferredResult, 'cancel'), 196 fn:MochiKit.Base.method(deferredResult, 'cancel'),
199 scope:this, 197 scope:this,
200 buttons:{ 198 buttons:{
201 //'ok':Clipperz.PM.Strings['loginMessagePanelInitialButtonLabel'] 199 //'ok':Clipperz.PM.Strings['loginMessagePanelInitialButtonLabel']
202 } 200 }
203 }, 201 },
204 anActivationItem 202 anActivationItem
205 ); 203 );
206//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Components.MessageBox.showProgressPanel - 1: " + res); return res;}); 204//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Components.MessageBox.showProgressPanel - 1: " + res); return res;});
207 deferredResult.addCallback(aCallback); 205 deferredResult.addCallback(aCallback);
208//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Components.MessageBox.showProgressPanel - 2: " + res); return res;}); 206//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Components.MessageBox.showProgressPanel - 2: " + res); return res;});
209 deferredResult.addCallback(MochiKit.Async.wait, 0.5); 207 deferredResult.addCallback(MochiKit.Async.wait, 0.5);
210 deferredResult.addCallback(function(res) { 208 deferredResult.addCallback(function(res) {
211 Clipperz.PM.Components.MessageBox().hide(YAHOO.ext.Element.get(anActivationItem)); 209 Clipperz.PM.Components.MessageBox().hide(YAHOO.ext.Element.get(anActivationItem));
212 return res; 210 return res;
213 }); 211 });
214//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Components.MessageBox.showProgressPanel - 3: " + res); return res;}); 212//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Components.MessageBox.showProgressPanel - 3: " + res); return res;});
215 deferredResult.addErrback(anErrback); 213 deferredResult.addErrback(anErrback);
216//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Components.MessageBox.showProgressPanel - 4: " + res); return res;}); 214//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Components.MessageBox.showProgressPanel - 4: " + res); return res;});
217 deferredResult.callback(); 215 deferredResult.callback();
218 216
219 return deferredResult; 217 return deferredResult;
220}; 218};
221 219
diff --git a/frontend/beta/js/Clipperz/PM/Components/OTP/MainComponent.js b/frontend/beta/js/Clipperz/PM/Components/OTP/MainComponent.js
index 7b0b12b..1e94c4b 100644
--- a/frontend/beta/js/Clipperz/PM/Components/OTP/MainComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/OTP/MainComponent.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.OTP) == 'undefined') { Clipperz.PM.Components.OTP = {}; } 27if (typeof(Clipperz.PM.Components.OTP) == 'undefined') { Clipperz.PM.Components.OTP = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.OTP.MainComponent = function(anElement, args) { 31Clipperz.PM.Components.OTP.MainComponent = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36//MochiKit.Logging.logDebug("new OTP.MainComponent"); 34//MochiKit.Logging.logDebug("new OTP.MainComponent");
37 Clipperz.PM.Components.OTP.MainComponent.superclass.constructor.call(this, anElement, args); 35 Clipperz.PM.Components.OTP.MainComponent.superclass.constructor.call(this, anElement, args);
38 36
39 this._user = args.user; 37 this._user = args.user;
40 this._shouldRender = true; 38 this._shouldRender = true;
41 39
42 this._deleteButton = null; 40 this._deleteButton = null;
43 this._printButton = null; 41 this._printButton = null;
44 42
45 Clipperz.NotificationCenter.register(null, 'tabSelected', this, 'tabSelectedHandler'); 43 Clipperz.NotificationCenter.register(null, 'tabSelected', this, 'tabSelectedHandler');
46 //Clipperz.NotificationCenter.register(null, 'oneTimePasswordAdded', this, 'render'); 44 //Clipperz.NotificationCenter.register(null, 'oneTimePasswordAdded', this, 'render');
47 45
48 return this; 46 return this;
49} 47}
50 48
51//============================================================================= 49//=============================================================================
52 50
53YAHOO.extendX(Clipperz.PM.Components.OTP.MainComponent, Clipperz.PM.Components.BaseComponent, { 51YAHOO.extendX(Clipperz.PM.Components.OTP.MainComponent, Clipperz.PM.Components.BaseComponent, {
54 52
55 'toString': function() { 53 'toString': function() {
56 return "Clipperz.PM.Components.OTP.MainComponent component"; 54 return "Clipperz.PM.Components.OTP.MainComponent component";
57 }, 55 },
58 56
59 //------------------------------------------------------------------------- 57 //-------------------------------------------------------------------------
60 58
61 'render': function() { 59 'render': function() {
62//MochiKit.Logging.logDebug("### OTP.MainComponent.render"); 60//MochiKit.Logging.logDebug("### OTP.MainComponent.render");
63 Clipperz.NotificationCenter.unregister(this); 61 Clipperz.NotificationCenter.unregister(this);
64 MochiKit.Signal.disconnectAllTo(this); 62 MochiKit.Signal.disconnectAllTo(this);
65 63
66 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { 64 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) {
67 this.element().update(""); 65 this.element().update("");
68 this.domHelper().append(this.element(), {tag:'div', cls:'oneTimePasswordReadOnlyMessage', htmlString:Clipperz.PM.Strings['oneTimePasswordReadOnlyMessage']}); 66 this.domHelper().append(this.element(), {tag:'div', cls:'oneTimePasswordReadOnlyMessage', htmlString:Clipperz.PM.Strings['oneTimePasswordReadOnlyMessage']});
69 } else { 67 } else {
70 var deferredResult; 68 var deferredResult;
71 69
72 deferredResult = new MochiKit.Async.Deferred(); 70 deferredResult = new MochiKit.Async.Deferred();
73 71
74//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 1: " + res); return res;}); 72//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 1: " + res); return res;});
75 deferredResult.addCallback(MochiKit.Base.bind(function() { 73 deferredResult.addCallback(MochiKit.Base.bind(function() {
76 this.element().update(""); 74 this.element().update("");
77 Clipperz.YUI.DomHelper.append(this.element(), {tag:'div', htmlString:Clipperz.PM.Strings['oneTimePasswordLoadingMessage']}); 75 Clipperz.YUI.DomHelper.append(this.element(), {tag:'div', htmlString:Clipperz.PM.Strings['oneTimePasswordLoadingMessage']});
78 }, this)); 76 }, this));
79//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 2: " + res); return res;}); 77//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 2: " + res); return res;});
80 deferredResult.addCallback(MochiKit.Base.method(this.user(), 'loadOneTimePasswords')); 78 deferredResult.addCallback(MochiKit.Base.method(this.user(), 'loadOneTimePasswords'));
81//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 3: " + res); return res;}); 79//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 3: " + res); return res;});
82//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 3.1: " + Clipperz.Base.serializeJSON(res.serializedData())); return res;}); 80//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 3.1: " + Clipperz.Base.serializeJSON(res.serializedData())); return res;});
83 deferredResult.addCallback(MochiKit.Base.bind(function(aResult) { 81 deferredResult.addCallback(MochiKit.Base.bind(function(aResult) {
84 vartbodyElement; 82 vartbodyElement;
85 varoneTimePasswordReferenceKeys; 83 varoneTimePasswordReferenceKeys;
86 var imageExtension; 84 var imageExtension;
87 var isThereAnyActiveOneTimePassword; 85 var isThereAnyActiveOneTimePassword;
88 86
89 isThereAnyActiveOneTimePassword = false; 87 isThereAnyActiveOneTimePassword = false;
90 88
91 this.element().update(""); 89 this.element().update("");
92 Clipperz.YUI.DomHelper.append(this.element(), {tag:'div', id:'oneTimePasswordList', children:[ 90 Clipperz.YUI.DomHelper.append(this.element(), {tag:'div', id:'oneTimePasswordList', children:[
93 {tag:'div', id:'oneTimePasswords_header', children:[ 91 {tag:'div', id:'oneTimePasswords_header', children:[
94 {tag:'table', width:'100%', children:[ 92 {tag:'table', width:'100%', children:[
95 {tag:'tbody', children:[ 93 {tag:'tbody', children:[
96 {tag:'tr', children:[ 94 {tag:'tr', children:[
97 {tag:'td', width:'10%', children:[ 95 {tag:'td', width:'10%', children:[
98 {tag:'div', id:this.getId('createNewOneTimePasswordButton')} 96 {tag:'div', id:this.getId('createNewOneTimePasswordButton')}
99 ]}, 97 ]},
100 {tag:'td', width:'40%', children:[ 98 {tag:'td', width:'40%', children:[
101 {tag:'div', id:this.getId('deleteSelectedOneTimePasswordButton')} 99 {tag:'div', id:this.getId('deleteSelectedOneTimePasswordButton')}
102 ]}, 100 ]},
103 {tag:'td', width:'50%', align:'right', children:[ 101 {tag:'td', width:'50%', align:'right', children:[
104 {tag:'div', id:this.getId('printOneTimePasswordButton')} 102 {tag:'div', id:this.getId('printOneTimePasswordButton')}
105 ]} 103 ]}
106 ]} 104 ]}
107 ]} 105 ]}
108 ]}, 106 ]},
109 {tag:'div', children:[ 107 {tag:'div', children:[
110 {tag:'ul', children:[ 108 {tag:'ul', children:[
111 {tag:'li', children:[ 109 {tag:'li', children:[
112 {tag:'span', htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_selectLabel']} 110 {tag:'span', htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_selectLabel']}
113 ]}, 111 ]},
114 {tag:'li', children:[ 112 {tag:'li', children:[
115 {tag:'a', href:'#', id:this.getId('selectAllOneTimePasswords_link'), htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_all']} 113 {tag:'a', href:'#', id:this.getId('selectAllOneTimePasswords_link'), htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_all']}
116 ]}, 114 ]},
117 {tag:'li', children:[ 115 {tag:'li', children:[
118 {tag:'a', href:'#', id:this.getId('selectNoneOneTimePasswords_link'), htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_none']} 116 {tag:'a', href:'#', id:this.getId('selectNoneOneTimePasswords_link'), htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_none']}
119 ]}, 117 ]},
120 {tag:'li', children:[ 118 {tag:'li', children:[
121 {tag:'a', href:'#', id:this.getId('selectUsedOneTimePasswords_link'), htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_used']} 119 {tag:'a', href:'#', id:this.getId('selectUsedOneTimePasswords_link'), htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_used']}
122 ]}, 120 ]},
123 {tag:'li', children:[ 121 {tag:'li', children:[
124 {tag:'a', href:'#', id:this.getId('selectUnusedOneTimePasswords_link'), htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_unused']} 122 {tag:'a', href:'#', id:this.getId('selectUnusedOneTimePasswords_link'), htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_unused']}
125 ]} 123 ]}
126 ]} 124 ]}
127 ]} 125 ]}
128 ]}, 126 ]},
129 {tag:'form', id:this.getId('oneTimePasswords_form'), children:[ 127 {tag:'form', id:this.getId('oneTimePasswords_form'), children:[
130 {tag:'table', cls:'oneTimePassword', cellspacing:'0', cellpadding:'2', children:[ 128 {tag:'table', cls:'oneTimePassword', cellspacing:'0', cellpadding:'2', children:[
131 {tag:'tbody', id:this.getId('oneTimePasswords_tbody'), children:[ 129 {tag:'tbody', id:this.getId('oneTimePasswords_tbody'), children:[
132 ]} 130 ]}
133 ]} 131 ]}
134 ]} 132 ]}
135 ]}); 133 ]});
136 134
137 imageExtension = (Clipperz_IEisBroken == true) ? 'gif': 'png'; 135 imageExtension = (Clipperz_IEisBroken == true) ? 'gif': 'png';
138 136
139 tbodyElement = this.getElement('oneTimePasswords_tbody'); 137 tbodyElement = this.getElement('oneTimePasswords_tbody');
140 oneTimePasswordReferenceKeys = MochiKit.Base.keys(this.user().oneTimePasswordManager().oneTimePasswords()).reverse(); 138 oneTimePasswordReferenceKeys = MochiKit.Base.keys(this.user().oneTimePasswordManager().oneTimePasswords()).reverse();
141 c = oneTimePasswordReferenceKeys.length; 139 c = oneTimePasswordReferenceKeys.length;
142 if (c>0) { 140 if (c>0) {
143 for (i=0; i<c; i++) { 141 for (i=0; i<c; i++) {
144 var otpReference; 142 var otpReference;
145 var currentOTP; 143 var currentOTP;
146 var loginSessionInfoConfig; 144 var loginSessionInfoConfig;
147 145
148 imageExtension = (Clipperz_IEisBroken == true) ? 'gif': 'png'; 146 imageExtension = (Clipperz_IEisBroken == true) ? 'gif': 'png';
149 147
150 otpReference = oneTimePasswordReferenceKeys[i]; 148 otpReference = oneTimePasswordReferenceKeys[i];
151 currentOTP = this.user().oneTimePasswordManager().oneTimePasswords()[otpReference]; 149 currentOTP = this.user().oneTimePasswordManager().oneTimePasswords()[otpReference];
152 150
153 switch (currentOTP.status()) { 151 switch (currentOTP.status()) {
154 case 'USED': 152 case 'USED':
155 var loginSessionInfo; 153 var loginSessionInfo;
156 154
157 loginSessionInfo = currentOTP.connectionInfo(); 155 loginSessionInfo = currentOTP.connectionInfo();
158 try { 156 try {
159 var ip; 157 var ip;
160 158
161 ip = (currentOTP.connectionInfo()['ip'].match(/^\d{1,3}(.\d{1,3}){3}$/)) ? currentOTP.connectionInfo()['ip'] : Clipperz.PM.Strings['unknown_ip']; 159 ip = (currentOTP.connectionInfo()['ip'].match(/^\d{1,3}(.\d{1,3}){3}$/)) ? currentOTP.connectionInfo()['ip'] : Clipperz.PM.Strings['unknown_ip'];
162 160
163 loginSessionInfoConfig = [ 161 loginSessionInfoConfig = [
164 {tag:'div', cls:'oneTimePassword_usageDateDescription', children:[ 162 {tag:'div', cls:'oneTimePassword_usageDateDescription', children:[
165 {tag:'span', cls:'value', html:Clipperz.PM.Date.getElapsedTimeDescription(currentOTP.usageDate())} 163 {tag:'span', cls:'value', html:Clipperz.PM.Date.getElapsedTimeDescription(currentOTP.usageDate())}
166 ]}, 164 ]},
167 {tag:'div', cls:'oneTimePassword_usageDetails', children:[ 165 {tag:'div', cls:'oneTimePassword_usageDetails', children:[
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'}, 166 {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'},
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'}, 167 {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'},
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'} 168 {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'}
171 ]}, 169 ]},
172 {tag:'div', cls:'oneTimePassword_usageDate', html:Clipperz.PM.Date.formatDateWithTemplate(currentOTP.usageDate(), Clipperz.PM.Strings['fullDate_format'])}, 170 {tag:'div', cls:'oneTimePassword_usageDate', html:Clipperz.PM.Date.formatDateWithTemplate(currentOTP.usageDate(), Clipperz.PM.Strings['fullDate_format'])},
173 {tag:'div', cls:'oneTimePassword_IP', children:[ 171 {tag:'div', cls:'oneTimePassword_IP', children:[
174 {tag:'span', cls:'oneTimePassword_IPLabel', htmlString:Clipperz.PM.Strings['loginHistoryIPLabel']}, 172 {tag:'span', cls:'oneTimePassword_IPLabel', htmlString:Clipperz.PM.Strings['loginHistoryIPLabel']},
175 {tag:'span', cls:'oneTimePassword_IPValue', html:ip} 173 {tag:'span', cls:'oneTimePassword_IPValue', html:ip}
176 ]} 174 ]}
177 ]; 175 ];
178 } catch(exception) { 176 } catch(exception) {
179 MochiKit.Logging.logWarning("an error occured while showing the One Time Password session details"); 177 MochiKit.Logging.logWarning("an error occured while showing the One Time Password session details");
180 loginSessionInfoConfig = []; 178 loginSessionInfoConfig = [];
181 } 179 }
182 break; 180 break;
183 case 'DISABLED': 181 case 'DISABLED':
184 loginSessionInfoConfig = [ 182 loginSessionInfoConfig = [
185 {tag:'span', cls:'disabledOneTimePassword', htmlString:Clipperz.PM.Strings['disabledOneTimePassword_warning']} 183 {tag:'span', cls:'disabledOneTimePassword', htmlString:Clipperz.PM.Strings['disabledOneTimePassword_warning']}
186 ]; 184 ];
187 break; 185 break;
188 case 'ACTIVE': 186 case 'ACTIVE':
189 default: 187 default:
190 loginSessionInfoConfig = []; 188 loginSessionInfoConfig = [];
191 break; 189 break;
192 } 190 }
193 191
194 192
195 if (currentOTP.isExpired() == false) { 193 if (currentOTP.isExpired() == false) {
196 isThereAnyActiveOneTimePassword = true; 194 isThereAnyActiveOneTimePassword = true;
197 }; 195 };
198 196
199 197
200 this.domHelper().append(tbodyElement, {tag:'tr', cls:(currentOTP.isExpired() ? 'oneTimePassword_used': 'oneTimePassword_new'), children:[ 198 this.domHelper().append(tbodyElement, {tag:'tr', cls:(currentOTP.isExpired() ? 'oneTimePassword_used': 'oneTimePassword_new'), children:[
201 {tag:'td', valign:'top', children:[ 199 {tag:'td', valign:'top', children:[
202 {tag:'input', type:'checkbox', cls:'otpCheckbox', name:currentOTP.reference()} 200 {tag:'input', type:'checkbox', cls:'otpCheckbox', name:currentOTP.reference()}
203 ]}, 201 ]},
204 {tag:'td', valign:'top', children:[ 202 {tag:'td', valign:'top', children:[
205 {tag:'span', cls:'oneTimePassword_value', html:currentOTP.password()} 203 {tag:'span', cls:'oneTimePassword_value', html:currentOTP.password()}
206 ]}, 204 ]},
207 {tag:'td', valign:'top', children:[ 205 {tag:'td', valign:'top', children:[
208 {tag:'div', cls:'oneTimePassword_usageStats', children:loginSessionInfoConfig} 206 {tag:'div', cls:'oneTimePassword_usageStats', children:loginSessionInfoConfig}
209 ]} 207 ]}
210 ]}); 208 ]});
211 } 209 }
212 } else { 210 } else {
213 this.domHelper().append(tbodyElement, {tag:'tr', children:[ 211 this.domHelper().append(tbodyElement, {tag:'tr', children:[
214 {tag:'td', children:[ 212 {tag:'td', children:[
215 {tag:'div', cls:'oneTimePassword_noPasswordPresent', htmlString:Clipperz.PM.Strings['oneTimePasswordNoPasswordAvailable']} 213 {tag:'div', cls:'oneTimePassword_noPasswordPresent', htmlString:Clipperz.PM.Strings['oneTimePasswordNoPasswordAvailable']}
216 ]} 214 ]}
217 ]}); 215 ]});
218 } 216 }
219 217
220 new YAHOO.ext.Button(this.getDom('createNewOneTimePasswordButton'), {text:Clipperz.PM.Strings['createNewOTPButtonLabel'], handler:this.createNewOneTimePassword, scope:this}); 218 new YAHOO.ext.Button(this.getDom('createNewOneTimePasswordButton'), {text:Clipperz.PM.Strings['createNewOTPButtonLabel'], handler:this.createNewOneTimePassword, scope:this});
221 this.setDeleteButton(new YAHOO.ext.Button(this.getDom('deleteSelectedOneTimePasswordButton'), {text:Clipperz.PM.Strings['deleteOTPButtonLabel'], handler:this.deleteSelectedOneTimePasswords, scope:this})); 219 this.setDeleteButton(new YAHOO.ext.Button(this.getDom('deleteSelectedOneTimePasswordButton'), {text:Clipperz.PM.Strings['deleteOTPButtonLabel'], handler:this.deleteSelectedOneTimePasswords, scope:this}));
222 this.setPrintButton(new YAHOO.ext.Button(this.getDom('printOneTimePasswordButton'), {text:Clipperz.PM.Strings['printOTPButtonLabel'], handler:this.printOneTimePasswords, scope:this})); 220 this.setPrintButton(new YAHOO.ext.Button(this.getDom('printOneTimePasswordButton'), {text:Clipperz.PM.Strings['printOTPButtonLabel'], handler:this.printOneTimePasswords, scope:this}));
223 221
224 MochiKit.Signal.connect(this.getId('selectAllOneTimePasswords_link'),'onclick', this, 'selectAllOneTimePasswords'); 222 MochiKit.Signal.connect(this.getId('selectAllOneTimePasswords_link'),'onclick', this, 'selectAllOneTimePasswords');
225 MochiKit.Signal.connect(this.getId('selectNoneOneTimePasswords_link'),'onclick', this, 'selectNoneOneTimePasswords'); 223 MochiKit.Signal.connect(this.getId('selectNoneOneTimePasswords_link'),'onclick', this, 'selectNoneOneTimePasswords');
226 MochiKit.Signal.connect(this.getId('selectUsedOneTimePasswords_link'),'onclick', this, 'selectUsedOneTimePasswords'); 224 MochiKit.Signal.connect(this.getId('selectUsedOneTimePasswords_link'),'onclick', this, 'selectUsedOneTimePasswords');
227 MochiKit.Signal.connect(this.getId('selectUnusedOneTimePasswords_link'),'onclick', this, 'selectUnusedOneTimePasswords'); 225 MochiKit.Signal.connect(this.getId('selectUnusedOneTimePasswords_link'),'onclick', this, 'selectUnusedOneTimePasswords');
228 226
229 MochiKit.Base.map(MochiKit.Base.bind(function(aCheckbox) { 227 MochiKit.Base.map(MochiKit.Base.bind(function(aCheckbox) {
230 MochiKit.Signal.connect(aCheckbox, 'onclick', this, 'handleCheckboxClick'); 228 MochiKit.Signal.connect(aCheckbox, 'onclick', this, 'handleCheckboxClick');
231 }, this), this.oneTimePasswordCheckboxes()); 229 }, this), this.oneTimePasswordCheckboxes());
232 230
233 this.updateDeleteButtonStatus(); 231 this.updateDeleteButtonStatus();
234 232
235 if (isThereAnyActiveOneTimePassword == true) { 233 if (isThereAnyActiveOneTimePassword == true) {
236 this.printButton().enable(); 234 this.printButton().enable();
237 } else { 235 } else {
238 this.printButton().disable(); 236 this.printButton().disable();
239 } 237 }
240 238
241 // Clipperz.NotificationCenter.register(null, 'oneTimePasswordAdded', this, 'render'); 239 // Clipperz.NotificationCenter.register(null, 'oneTimePasswordAdded', this, 'render');
242 Clipperz.NotificationCenter.register(null, 'oneTimePassword_saveChanges_done', this, 'render'); 240 Clipperz.NotificationCenter.register(null, 'oneTimePassword_saveChanges_done', this, 'render');
243 241
244 }, this)); 242 }, this));
245//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 4: " + res); return res;}); 243//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 4: " + res); return res;});
246 244
247 deferredResult.callback(); 245 deferredResult.callback();
248 } 246 }
249 }, 247 },
250 248
251 //------------------------------------------------------------------------- 249 //-------------------------------------------------------------------------
252 250
253 'printOneTimePasswords': function() { 251 'printOneTimePasswords': function() {
254 var newWindow; 252 var newWindow;
255 var activeOneTimePasswords; 253 var activeOneTimePasswords;
256 254
257//MochiKit.Logging.logDebug(">>> printAllData"); 255//MochiKit.Logging.logDebug(">>> printAllData");
258 newWindow = window.open("", ""); 256 newWindow = window.open("", "");
259 newWindow.document.write( 257 newWindow.document.write(
260"<html>" + 258"<html>" +
261"<header>" + 259"<header>" +
262 "<title>Clipperz One Time Password</title>" + 260 "<title>Clipperz One Time Password</title>" +
263"<style>" + 261"<style>" +
264"div.oneTimePassword_print h2 {" + 262"div.oneTimePassword_print h2 {" +
265 "font-family: monospace;" + 263 "font-family: monospace;" +
266 "font-weight: normal;" + 264 "font-weight: normal;" +
267 "padding: 10px 20px;" + 265 "padding: 10px 20px;" +
268"}" + 266"}" +
269"</style>" + 267"</style>" +
270"" + 268"" +
271"<!--[if IE]>" + 269"<!--[if IE]>" +
272"<style>" + 270"<style>" +
273"</style>" + 271"</style>" +
274"<![endif]-->" + 272"<![endif]-->" +
275"" + 273"" +
276"</header>" + 274"</header>" +
277"<body>" + 275"<body>" +
278"</body>" + 276"</body>" +
279"</html>" 277"</html>"
280 ); 278 );
281 279
282 activeOneTimePasswords = MochiKit.Base.filter(function(aOneTimePassword) {return (aOneTimePassword.isExpired() == false)}, MochiKit.Base.values(this.user().oneTimePasswordManager().oneTimePasswords()).reverse()); 280 activeOneTimePasswords = MochiKit.Base.filter(function(aOneTimePassword) {return (aOneTimePassword.isExpired() == false)}, MochiKit.Base.values(this.user().oneTimePasswordManager().oneTimePasswords()).reverse());
283 281
284 MochiKit.Iter.forEach(activeOneTimePasswords, MochiKit.Base.partial(function(aWindow, aOneTimePassword) { 282 MochiKit.Iter.forEach(activeOneTimePasswords, MochiKit.Base.partial(function(aWindow, aOneTimePassword) {
285 MochiKit.DOM.withWindow(aWindow, MochiKit.Base.partial(function(aOneTimePassword) { 283 MochiKit.DOM.withWindow(aWindow, MochiKit.Base.partial(function(aOneTimePassword) {
286 var newBlock; 284 var newBlock;
287 285
288 newBlock = MochiKit.DOM.DIV({'class': 'oneTimePassword_print'}, 286 newBlock = MochiKit.DOM.DIV({'class': 'oneTimePassword_print'},
289 MochiKit.DOM.H2(null, aOneTimePassword.password()) 287 MochiKit.DOM.H2(null, aOneTimePassword.password())
290 ); 288 );
291 MochiKit.DOM.appendChildNodes(MochiKit.DOM.currentDocument().body, newBlock); 289 MochiKit.DOM.appendChildNodes(MochiKit.DOM.currentDocument().body, newBlock);
292 290
293 }, aOneTimePassword)); 291 }, aOneTimePassword));
294 }, newWindow)); 292 }, newWindow));
295 }, 293 },
296 294
297 //------------------------------------------------------------------------- 295 //-------------------------------------------------------------------------
298 296
299 'generateRandomBase32OTPValue': function(aButton) { 297 'generateRandomBase32OTPValue': function(aButton) {
300 var randomValue; 298 var randomValue;
301 varresult; 299 varresult;
302 300
303 randomValue = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(160/8); 301 randomValue = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(160/8);
304 result = randomValue.toBase32String(); 302 result = randomValue.toBase32String();
305 result = result.replace(/.{4}\B/g, '$&' + ' '); 303 result = result.replace(/.{4}\B/g, '$&' + ' ');
306 result = result.replace(/(.{4} ){2}/g, '$&' + '- '); 304 result = result.replace(/(.{4} ){2}/g, '$&' + '- ');
307 305
308 return result; 306 return result;
309 }, 307 },
310 308
311 //------------------------------------------------------------------------- 309 //-------------------------------------------------------------------------
312 310
313 'createNewOneTimePassword': function() { 311 'createNewOneTimePassword': function() {
314 var newOneTimePassword; 312 var newOneTimePassword;
315 var password; 313 var password;
316 314
317 password = this.generateRandomBase32OTPValue(); 315 password = this.generateRandomBase32OTPValue();
318 newOneTimePassword = new Clipperz.PM.DataModel.OneTimePassword({ 316 newOneTimePassword = new Clipperz.PM.DataModel.OneTimePassword({
319 user:this.user(), 317 user:this.user(),
320 password:password 318 password:password
321 }); 319 });
322 this.user().oneTimePasswordManager().addOneTimePassword(newOneTimePassword); 320 this.user().oneTimePasswordManager().addOneTimePassword(newOneTimePassword);
323 Clipperz.PM.Components.MessageBox.showProgressPanel(MochiKit.Base.method(newOneTimePassword, 'saveChanges'), null, this.getDom('createNewOneTimePasswordButton')); 321 Clipperz.PM.Components.MessageBox.showProgressPanel(MochiKit.Base.method(newOneTimePassword, 'saveChanges'), null, this.getDom('createNewOneTimePasswordButton'));
324 }, 322 },
325 323
326 //------------------------------------------------------------------------- 324 //-------------------------------------------------------------------------
327 325
328 'oneTimePasswordCheckboxes': function() { 326 'oneTimePasswordCheckboxes': function() {
329 return MochiKit.DOM.getElementsByTagAndClassName('input', 'otpCheckbox', this.getId('oneTimePasswords_tbody')); 327 return MochiKit.DOM.getElementsByTagAndClassName('input', 'otpCheckbox', this.getId('oneTimePasswords_tbody'));
330 }, 328 },
331 329
332 'checkedOneTimePasswordCheckboxes': function() { 330 'checkedOneTimePasswordCheckboxes': function() {
333 return MochiKit.Base.filter(function(aCheckbox) {return (aCheckbox.checked == true)}, this.oneTimePasswordCheckboxes()); 331 return MochiKit.Base.filter(function(aCheckbox) {return (aCheckbox.checked == true)}, this.oneTimePasswordCheckboxes());
334 }, 332 },
335 333
336 //------------------------------------------------------------------------- 334 //-------------------------------------------------------------------------
337 335
338 'selectAllOneTimePasswords': function(anEvent) { 336 'selectAllOneTimePasswords': function(anEvent) {
339 var checkboxes; 337 var checkboxes;
340 var i,c; 338 var i,c;
341 339
342 anEvent.stop(); 340 anEvent.stop();
343 checkboxes = this.oneTimePasswordCheckboxes(); 341 checkboxes = this.oneTimePasswordCheckboxes();
344 c = checkboxes.length; 342 c = checkboxes.length;
345 for (i=0; i<c; i++) { 343 for (i=0; i<c; i++) {
346 checkboxes[i].checked = true; 344 checkboxes[i].checked = true;
347 } 345 }
348 346
349 this.updateDeleteButtonStatus(); 347 this.updateDeleteButtonStatus();
350 }, 348 },
351 349
352 'selectNoneOneTimePasswords': function(anEvent) { 350 'selectNoneOneTimePasswords': function(anEvent) {
353 var checkboxes; 351 var checkboxes;
354 var i,c; 352 var i,c;
355 353
356 anEvent.stop(); 354 anEvent.stop();
357 checkboxes = this.oneTimePasswordCheckboxes(); 355 checkboxes = this.oneTimePasswordCheckboxes();
358 c = checkboxes.length; 356 c = checkboxes.length;
359 for (i=0; i<c; i++) { 357 for (i=0; i<c; i++) {
360 checkboxes[i].checked = false; 358 checkboxes[i].checked = false;
361 } 359 }
362 360
363 this.updateDeleteButtonStatus(); 361 this.updateDeleteButtonStatus();
364 }, 362 },
365 363
366 'selectUsedOneTimePasswords': function(anEvent) { 364 'selectUsedOneTimePasswords': function(anEvent) {
367 var checkboxes; 365 var checkboxes;
368 var oneTimePasswordManager; 366 var oneTimePasswordManager;
369 var i,c; 367 var i,c;
370 368
371 anEvent.stop(); 369 anEvent.stop();
372 oneTimePasswordManager = this.user().oneTimePasswordManager(); 370 oneTimePasswordManager = this.user().oneTimePasswordManager();
373 checkboxes = this.oneTimePasswordCheckboxes(); 371 checkboxes = this.oneTimePasswordCheckboxes();
374 c = checkboxes.length; 372 c = checkboxes.length;
375 for (i=0; i<c; i++) { 373 for (i=0; i<c; i++) {
376 var matchingOneTimePassword; 374 var matchingOneTimePassword;
377 375
378 matchingOneTimePassword = oneTimePasswordManager.oneTimePasswordWithReference(checkboxes[i].name); 376 matchingOneTimePassword = oneTimePasswordManager.oneTimePasswordWithReference(checkboxes[i].name);
379 checkboxes[i].checked = matchingOneTimePassword.isExpired(); 377 checkboxes[i].checked = matchingOneTimePassword.isExpired();
380 } 378 }
381 379
382 this.updateDeleteButtonStatus(); 380 this.updateDeleteButtonStatus();
383 }, 381 },
384 382
385 'selectUnusedOneTimePasswords': function(anEvent) { 383 'selectUnusedOneTimePasswords': function(anEvent) {
386 var checkboxes; 384 var checkboxes;
387 var oneTimePasswordManager; 385 var oneTimePasswordManager;
388 var i,c; 386 var i,c;
389 387
390 anEvent.stop(); 388 anEvent.stop();
391 oneTimePasswordManager = this.user().oneTimePasswordManager(); 389 oneTimePasswordManager = this.user().oneTimePasswordManager();
392 checkboxes = this.oneTimePasswordCheckboxes(); 390 checkboxes = this.oneTimePasswordCheckboxes();
393 c = checkboxes.length; 391 c = checkboxes.length;
394 for (i=0; i<c; i++) { 392 for (i=0; i<c; i++) {
395 var matchingOneTimePassword; 393 var matchingOneTimePassword;
396 394
397 matchingOneTimePassword = oneTimePasswordManager.oneTimePasswordWithReference(checkboxes[i].name); 395 matchingOneTimePassword = oneTimePasswordManager.oneTimePasswordWithReference(checkboxes[i].name);
398 checkboxes[i].checked = !matchingOneTimePassword.isExpired(); 396 checkboxes[i].checked = !matchingOneTimePassword.isExpired();
399 } 397 }
400 398
401 this.updateDeleteButtonStatus(); 399 this.updateDeleteButtonStatus();
402 }, 400 },
403 401
404 //------------------------------------------------------------------------- 402 //-------------------------------------------------------------------------
405 403
406 'handleCheckboxClick': function(anEvent) { 404 'handleCheckboxClick': function(anEvent) {
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js
index f7991f1..defce91 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } 27if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.Panels.AccountPanel = function(anElement, args) { 31Clipperz.PM.Components.Panels.AccountPanel = function(anElement, args) {
34//MochiKit.Logging.logDebug(">>> new AccountPanel"); 32//MochiKit.Logging.logDebug(">>> new AccountPanel");
35 args = args || {}; 33 args = args || {};
36 34
37 Clipperz.PM.Components.Panels.AccountPanel.superclass.constructor.call(this, anElement, args); 35 Clipperz.PM.Components.Panels.AccountPanel.superclass.constructor.call(this, anElement, args);
38 36
39 Clipperz.NotificationCenter.register(null, 'setupDone', this, 'render'); 37 Clipperz.NotificationCenter.register(null, 'setupDone', this, 'render');
40 38
41 this._shouldLoadLoginHistory = true; 39 this._shouldLoadLoginHistory = true;
42 40
43 //this.render(); 41 //this.render();
44//MochiKit.Logging.logDebug("<<< new AccountPanel"); 42//MochiKit.Logging.logDebug("<<< new AccountPanel");
45 43
46 return this; 44 return this;
47} 45}
48 46
49//============================================================================= 47//=============================================================================
50 48
51YAHOO.extendX(Clipperz.PM.Components.Panels.AccountPanel, Clipperz.PM.Components.Panels.BasePanel, { 49YAHOO.extendX(Clipperz.PM.Components.Panels.AccountPanel, Clipperz.PM.Components.Panels.BasePanel, {
52 50
53 'toString': function() { 51 'toString': function() {
54 return "Clipperz.PM.Components.AccountPanel component"; 52 return "Clipperz.PM.Components.AccountPanel component";
55 }, 53 },
56 54
57 //------------------------------------------------------------------------- 55 //-------------------------------------------------------------------------
58 56
59 'render': function() { 57 'render': function() {
60 var errorMessageActor; 58 var errorMessageActor;
61 varchangePasswordButton; 59 varchangePasswordButton;
62 var deleteAccountButton; 60 var deleteAccountButton;
63 61
64try { 62try {
65//MochiKit.Logging.logDebug(">>> AccountPanel.render"); 63//MochiKit.Logging.logDebug(">>> AccountPanel.render");
66 Clipperz.NotificationCenter.unregister(this); 64 Clipperz.NotificationCenter.unregister(this);
67 MochiKit.Signal.disconnectAllTo(this); 65 MochiKit.Signal.disconnectAllTo(this);
68 66
69 this.element().update(""); 67 this.element().update("");
70 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ 68 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[
71 {tag:'tbody', children:[ 69 {tag:'tbody', children:[
72 {tag:'tr', children:[ 70 {tag:'tr', children:[
73 {tag:'td', valign:'top', width:'200', children:[ 71 {tag:'td', valign:'top', width:'200', children:[
74 {tag:'ul', id:"accountSubMenu", cls:'subMenu', children:[ 72 {tag:'ul', id:"accountSubMenu", cls:'subMenu', children:[
75 {tag:'li', id:'changePassphraseTab', htmlString:Clipperz.PM.Strings['changePasswordTabLabel']}, 73 {tag:'li', id:'changePassphraseTab', htmlString:Clipperz.PM.Strings['changePasswordTabLabel']},
76 {tag:'li', id:'manageOTPTab', htmlString:Clipperz.PM.Strings['manageOTPTabLabel']}, 74 {tag:'li', id:'manageOTPTab', htmlString:Clipperz.PM.Strings['manageOTPTabLabel']},
77 {tag:'li', id:'accountPreferencesTab', htmlString:Clipperz.PM.Strings['accountPreferencesLabel']}, 75 {tag:'li', id:'accountPreferencesTab', htmlString:Clipperz.PM.Strings['accountPreferencesLabel']},
78 {tag:'li', id:'loginHistoryTab', htmlString:Clipperz.PM.Strings['accountLoginHistoryLabel']}, 76 {tag:'li', id:'loginHistoryTab', htmlString:Clipperz.PM.Strings['accountLoginHistoryLabel']},
79 {tag:'li', id:'deleteAccountTab', htmlString:Clipperz.PM.Strings['deleteAccountTabLabel']} 77 {tag:'li', id:'deleteAccountTab', htmlString:Clipperz.PM.Strings['deleteAccountTabLabel']}
80 // {tag:'li', id:'paidAccountTab'), htmlString:Clipperz.PM.Strings['paidAccountTabLabel']} 78 // {tag:'li', id:'paidAccountTab'), htmlString:Clipperz.PM.Strings['paidAccountTabLabel']}
81 ]} 79 ]}
82 ]}, 80 ]},
83 {tag:'td', valign:'top', children:[ 81 {tag:'td', valign:'top', children:[
84 {tag:'ul', cls:'clipperzTabPanels', children:[ 82 {tag:'ul', cls:'clipperzTabPanels', children:[
85 {tag:'li', id:this.getId('changePassphrasePanel'), children:[ 83 {tag:'li', id:this.getId('changePassphrasePanel'), children:[
86 {tag:'div', cls:'clipperzSubPanel', children:[ 84 {tag:'div', cls:'clipperzSubPanel', children:[
87 {tag:'h5', htmlString:Clipperz.PM.Strings['changePasswordTabTitle']}, 85 {tag:'h5', htmlString:Clipperz.PM.Strings['changePasswordTabTitle']},
88 {tag:'div', cls:'panelBody', id:'changePassphraseBlock', children:[ 86 {tag:'div', cls:'panelBody', id:'changePassphraseBlock', children:[
89 {tag:'form', id:this.getId('changePassphraseForm'), children:[ 87 {tag:'form', id:this.getId('changePassphraseForm'), children:[
90 {tag:'h5', cls:'errorMessage', id:this.getId('changePassphrase_errorMessage')}, 88 {tag:'h5', cls:'errorMessage', id:this.getId('changePassphrase_errorMessage')},
91 {tag:'table', cls:'panelBody', children:[ 89 {tag:'table', cls:'panelBody', children:[
92 {tag:'tr', children:[ 90 {tag:'tr', children:[
93 {tag:'td', children:[ 91 {tag:'td', children:[
94 {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormUsernameLabel']} 92 {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormUsernameLabel']}
95 ]}, 93 ]},
96 {tag:'td', children:[ 94 {tag:'td', children:[
97 {tag:'input', type:'text', name:'username', id:this.getId('changePassphrase_username')} 95 {tag:'input', type:'text', name:'username', id:this.getId('changePassphrase_username')}
98 ]} 96 ]}
99 ]}, 97 ]},
100 {tag:'tr', children:[ 98 {tag:'tr', children:[
101 {tag:'td', children:[ 99 {tag:'td', children:[
102 {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormOldPassphraseLabel']} 100 {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormOldPassphraseLabel']}
103 ]}, 101 ]},
104 {tag:'td', children:[ 102 {tag:'td', children:[
105 {tag:'input', type:'password', name:'oldPassphrase', id:this.getId('changePassphrase_oldPassphrase')} 103 {tag:'input', type:'password', name:'oldPassphrase', id:this.getId('changePassphrase_oldPassphrase')}
106 ]} 104 ]}
107 ]}, 105 ]},
108 {tag:'tr', children:[ 106 {tag:'tr', children:[
109 {tag:'td', children:[ 107 {tag:'td', children:[
110 {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormNewPassphraseLabel']} 108 {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormNewPassphraseLabel']}
111 ]}, 109 ]},
112 {tag:'td', children:[ 110 {tag:'td', children:[
113 {tag:'input', type:'password', name:'newPassphrase', id:this.getId('changePassphrase_newPassphrase')} 111 {tag:'input', type:'password', name:'newPassphrase', id:this.getId('changePassphrase_newPassphrase')}
114 ]} 112 ]}
115 ]}, 113 ]},
116 {tag:'tr', children:[ 114 {tag:'tr', children:[
117 {tag:'td', children:[ 115 {tag:'td', children:[
118 {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormRetypePassphraseLabel']} 116 {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormRetypePassphraseLabel']}
119 ]}, 117 ]},
120 {tag:'td', children:[ 118 {tag:'td', children:[
121 {tag:'input', type:'password', name:'renewPassphrase', id:this.getId('changePassphrase_renewPassphrase')} 119 {tag:'input', type:'password', name:'renewPassphrase', id:this.getId('changePassphrase_renewPassphrase')}
122 ]} 120 ]}
123 ]}, 121 ]},
124 {tag:'tr', children:[ 122 {tag:'tr', children:[
125 {tag:'td', align:'right', children:[ 123 {tag:'td', align:'right', children:[
126 {tag:'input', type:'checkbox', id:this.getId('changePassphrase_safetyCheck')} 124 {tag:'input', type:'checkbox', id:this.getId('changePassphrase_safetyCheck')}
127 ]}, 125 ]},
128 {tag:'td', children:[ 126 {tag:'td', children:[
129 {tag:'span', htmlString:Clipperz.PM.Strings['changePasswordFormSafetyCheckboxLabel']} 127 {tag:'span', htmlString:Clipperz.PM.Strings['changePasswordFormSafetyCheckboxLabel']}
130 ]} 128 ]}
131 ]} 129 ]}
132 ]}, 130 ]},
133 {tag:'div', cls:'clipperzSubPanelButtonBox', children:[ 131 {tag:'div', cls:'clipperzSubPanelButtonBox', children:[
134 {tag:'div', id:this.getId('changePassphraseButton')} 132 {tag:'div', id:this.getId('changePassphraseButton')}
135 ]} 133 ]}
136 ]} 134 ]}
137 ]} 135 ]}
138 ]} 136 ]}
139 ]}, 137 ]},
140 {tag:'li', id:this.getId('manageOTPPanel'), children:[ 138 {tag:'li', id:this.getId('manageOTPPanel'), children:[
141 {tag:'div', cls:'clipperzSubPanel', children:[ 139 {tag:'div', cls:'clipperzSubPanel', children:[
142 {tag:'h5', htmlString:Clipperz.PM.Strings['manageOTPTabTitle']}, 140 {tag:'h5', htmlString:Clipperz.PM.Strings['manageOTPTabTitle']},
143 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['manageOTPTabDescription']}, 141 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['manageOTPTabDescription']},
144 {tag:'div', id:'OTPComponent'} 142 {tag:'div', id:'OTPComponent'}
145 ]} 143 ]}
146 ]}, 144 ]},
147 {tag:'li', id:this.getId('accountPreferencesPanel'), children:[ 145 {tag:'li', id:this.getId('accountPreferencesPanel'), children:[
148 {tag:'div', cls:'clipperzSubPanel', children:[ 146 {tag:'div', cls:'clipperzSubPanel', children:[
149 {tag:'h5', htmlString:Clipperz.PM.Strings['accountPreferencesTabTitle']}, 147 {tag:'h5', htmlString:Clipperz.PM.Strings['accountPreferencesTabTitle']},
150 {tag:'div', cls:'panelBody', id:this.getId('preferencesPanelBody')} 148 {tag:'div', cls:'panelBody', id:this.getId('preferencesPanelBody')}
151 ]} 149 ]}
152 ]}, 150 ]},
153 {tag:'li', id:this.getId('loginHistoryAccountPanel'), children:[ 151 {tag:'li', id:this.getId('loginHistoryAccountPanel'), children:[
154 {tag:'div', cls:'clipperzSubPanel', children:[ 152 {tag:'div', cls:'clipperzSubPanel', children:[
155 {tag:'h5', htmlString:Clipperz.PM.Strings['loginHistoryTabTitle']}, 153 {tag:'h5', htmlString:Clipperz.PM.Strings['loginHistoryTabTitle']},
156 {tag:'div', cls:'panelBody', id:'loginHistoryAccountBlock'} 154 {tag:'div', cls:'panelBody', id:'loginHistoryAccountBlock'}
157 ]} 155 ]}
158 ]}, 156 ]},
159 {tag:'li', id:this.getId('deleteAccountPanel'), children:[ 157 {tag:'li', id:this.getId('deleteAccountPanel'), children:[
160 {tag:'div', cls:'clipperzSubPanel', children:[ 158 {tag:'div', cls:'clipperzSubPanel', children:[
161 {tag:'h5', htmlString:Clipperz.PM.Strings['deleteAccountTabTitle']}, 159 {tag:'h5', htmlString:Clipperz.PM.Strings['deleteAccountTabTitle']},
162 160
163 {tag:'div', cls:'panelBody', id:'deleteAccountBlock', children:[ 161 {tag:'div', cls:'panelBody', id:'deleteAccountBlock', children:[
164 {tag:'form', id:this.getId('deleteAccountForm'), children:[ 162 {tag:'form', id:this.getId('deleteAccountForm'), children:[
165 {tag:'h5', cls:'errorMessage', id:this.getId('deleteAccount_errorMessage')}, 163 {tag:'h5', cls:'errorMessage', id:this.getId('deleteAccount_errorMessage')},
166 {tag:'table', cls:'panelBody', children:[ 164 {tag:'table', cls:'panelBody', children:[
167 {tag:'tr', children:[ 165 {tag:'tr', children:[
168 {tag:'td', children:[ 166 {tag:'td', children:[
169 {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['deleteAccountFormUsernameLabel']} 167 {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['deleteAccountFormUsernameLabel']}
170 ]}, 168 ]},
171 {tag:'td', children:[ 169 {tag:'td', children:[
172 {tag:'input', type:'text', name:'username', id:this.getId('deleteAccount_username')} 170 {tag:'input', type:'text', name:'username', id:this.getId('deleteAccount_username')}
173 ]} 171 ]}
174 ]}, 172 ]},
175 {tag:'tr', children:[ 173 {tag:'tr', children:[
176 {tag:'td', children:[ 174 {tag:'td', children:[
177 {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['deleteAccountFormPassphraseLabel']} 175 {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['deleteAccountFormPassphraseLabel']}
178 ]}, 176 ]},
179 {tag:'td', children:[ 177 {tag:'td', children:[
180 {tag:'input', type:'password', name:'passphrase', id:this.getId('deleteAccount_passphrase')} 178 {tag:'input', type:'password', name:'passphrase', id:this.getId('deleteAccount_passphrase')}
181 ]} 179 ]}
182 ]}, 180 ]},
183 {tag:'tr', children:[ 181 {tag:'tr', children:[
184 {tag:'td', align:'right', children:[ 182 {tag:'td', align:'right', children:[
185 {tag:'input', type:'checkbox', id:this.getId('deleteAccount_safetyCheck')} 183 {tag:'input', type:'checkbox', id:this.getId('deleteAccount_safetyCheck')}
186 ]}, 184 ]},
187 {tag:'td', children:[ 185 {tag:'td', children:[
188 {tag:'span', htmlString:Clipperz.PM.Strings['deleteAccountFormSafetyCheckboxLabel']} 186 {tag:'span', htmlString:Clipperz.PM.Strings['deleteAccountFormSafetyCheckboxLabel']}
189 ]} 187 ]}
190 ]} 188 ]}
191 ]}, 189 ]},
192 {tag:'div', cls:'clipperzSubPanelButtonBox', children:[ 190 {tag:'div', cls:'clipperzSubPanelButtonBox', children:[
193 {tag:'div', id:this.getId('deleteAccountButton')} 191 {tag:'div', id:this.getId('deleteAccountButton')}
194 ]} 192 ]}
195 ]} 193 ]}
196 ]} 194 ]}
197 ]} 195 ]}
198 ]} 196 ]}
199 /* 197 /*
200 {tag:'li', id:this.getId('paidAccountPanel'), children:[ 198 {tag:'li', id:this.getId('paidAccountPanel'), children:[
201 {tag:'div', cls:'clipperzSubPanel', children:[ 199 {tag:'div', cls:'clipperzSubPanel', children:[
202 {tag:'h5', htmlString:Clipperz.PM.Strings['upgradeAccountTabTitle']}, 200 {tag:'h5', htmlString:Clipperz.PM.Strings['upgradeAccountTabTitle']},
203 {tag:'div', htmlString:Clipperz.PM.Strings['comingSoon']} 201 {tag:'div', htmlString:Clipperz.PM.Strings['comingSoon']}
204 ]} 202 ]}
205 ]} 203 ]}
206*/ 204*/
207 ]} 205 ]}
208 ]} 206 ]}
209 ]} 207 ]}
210 ]} 208 ]}
211 ]}); 209 ]});
212 210
213//MochiKit.Logging.logDebug("--- AccountPanel.render - 1"); 211//MochiKit.Logging.logDebug("--- AccountPanel.render - 1");
214 MochiKit.Signal.connect(this.getId('changePassphraseForm'), 'onkeydown', this, 'onkeydown'); 212 MochiKit.Signal.connect(this.getId('changePassphraseForm'), 'onkeydown', this, 'onkeydown');
215 errorMessageActor = this.getActor('changePassphrase_errorMessage'); 213 errorMessageActor = this.getActor('changePassphrase_errorMessage');
216 errorMessageActor.setVisibilityMode(YAHOO.ext.Element.DISPLAY); 214 errorMessageActor.setVisibilityMode(YAHOO.ext.Element.DISPLAY);
217 errorMessageActor.update("---"); 215 errorMessageActor.update("---");
218 errorMessageActor.hide(); 216 errorMessageActor.hide();
219 changePasswordButton = new YAHOO.ext.Button(this.getDom('changePassphraseButton'), {text:Clipperz.PM.Strings['changePasswordFormSubmitLabel'], handler:this.doChangePassphrase, scope:this}); 217 changePasswordButton = new YAHOO.ext.Button(this.getDom('changePassphraseButton'), {text:Clipperz.PM.Strings['changePasswordFormSubmitLabel'], handler:this.doChangePassphrase, scope:this});
220 218
221//MochiKit.Logging.logDebug("--- AccountPanel.render - 2"); 219//MochiKit.Logging.logDebug("--- AccountPanel.render - 2");
222 220
223 MochiKit.Signal.connect(this.getId('deleteAccountForm'), 'onkeydown', this, 'onkeydown'); 221 MochiKit.Signal.connect(this.getId('deleteAccountForm'), 'onkeydown', this, 'onkeydown');
224 errorMessageActor = this.getActor('deleteAccount_errorMessage'); 222 errorMessageActor = this.getActor('deleteAccount_errorMessage');
225 errorMessageActor.setVisibilityMode(YAHOO.ext.Element.DISPLAY); 223 errorMessageActor.setVisibilityMode(YAHOO.ext.Element.DISPLAY);
226 errorMessageActor.update(Clipperz.PM.Strings['deleteAccountFormEmptyErrorMessage']); 224 errorMessageActor.update(Clipperz.PM.Strings['deleteAccountFormEmptyErrorMessage']);
227 errorMessageActor.hide(); 225 errorMessageActor.hide();
228 deleteAccountButton = new YAHOO.ext.Button(this.getDom('deleteAccountButton'), {text:Clipperz.PM.Strings['deleteAccountFormSubmitLabel'], handler:this.doDeleteAccount, scope:this}); 226 deleteAccountButton = new YAHOO.ext.Button(this.getDom('deleteAccountButton'), {text:Clipperz.PM.Strings['deleteAccountFormSubmitLabel'], handler:this.doDeleteAccount, scope:this});
229//MochiKit.Logging.logDebug("--- AccountPanel.render - 5"); 227//MochiKit.Logging.logDebug("--- AccountPanel.render - 5");
230 228
231 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { 229 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) {
232 this.getElement('changePassphraseForm').addClass('read-only'); 230 this.getElement('changePassphraseForm').addClass('read-only');
233 // this.getElement('accountPreferencesForm').addClass('read-only'); 231 // this.getElement('accountPreferencesForm').addClass('read-only');
234 this.getElement('deleteAccountForm').addClass('read-only'); 232 this.getElement('deleteAccountForm').addClass('read-only');
235 changePasswordButton.disable(); 233 changePasswordButton.disable();
236 deleteAccountButton.disable(); 234 deleteAccountButton.disable();
237 } 235 }
238//MochiKit.Logging.logDebug("--- AccountPanel.render - 6"); 236//MochiKit.Logging.logDebug("--- AccountPanel.render - 6");
239 237
240 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('changePassphrase_oldPassphrase')); 238 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('changePassphrase_oldPassphrase'));
241 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('changePassphrase_newPassphrase')); 239 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('changePassphrase_newPassphrase'));
242 240
243 new Clipperz.PM.Components.OTP.MainComponent(YAHOO.ext.Element.get('OTPComponent'), {user:this.user()}); 241 new Clipperz.PM.Components.OTP.MainComponent(YAHOO.ext.Element.get('OTPComponent'), {user:this.user()});
244 242
245 this.tabPanelController().setUp(); 243 this.tabPanelController().setUp();
246 Clipperz.NotificationCenter.register(null, 'tabSelected', this, 'tabSelectedHandler'); 244 Clipperz.NotificationCenter.register(null, 'tabSelected', this, 'tabSelectedHandler');
247 Clipperz.NotificationCenter.register(null, 'updatedPreferences', this, 'renderPreferences'); 245 Clipperz.NotificationCenter.register(null, 'updatedPreferences', this, 'renderPreferences');
248 Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler'); 246 Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler');
249//MochiKit.Logging.logDebug("<<< AccountPanel.render"); 247//MochiKit.Logging.logDebug("<<< AccountPanel.render");
250 248
251} catch(exception) { 249} catch(exception) {
252 MochiKit.Logging.logError("### " + exception); 250 MochiKit.Logging.logError("### " + exception);
253 throw exception; 251 throw exception;
254} 252}
255 }, 253 },
256 254
257 //------------------------------------------------------------------------- 255 //-------------------------------------------------------------------------
258 256
259 'tabPanelController': function() { 257 'tabPanelController': function() {
260 if (this._tabPanelController == null) { 258 if (this._tabPanelController == null) {
261 var tabPanelControllerConfig; 259 var tabPanelControllerConfig;
262 260
263 tabPanelControllerConfig = {} 261 tabPanelControllerConfig = {}
264 tabPanelControllerConfig['changePassphraseTab'] = this.getId('changePassphrasePanel'); 262 tabPanelControllerConfig['changePassphraseTab'] = this.getId('changePassphrasePanel');
265 tabPanelControllerConfig['manageOTPTab'] = this.getId('manageOTPPanel'); 263 tabPanelControllerConfig['manageOTPTab'] = this.getId('manageOTPPanel');
266 tabPanelControllerConfig['accountPreferencesTab'] = this.getId('accountPreferencesPanel'); 264 tabPanelControllerConfig['accountPreferencesTab'] = this.getId('accountPreferencesPanel');
267 tabPanelControllerConfig['loginHistoryTab'] = this.getId('loginHistoryAccountPanel'); 265 tabPanelControllerConfig['loginHistoryTab'] = this.getId('loginHistoryAccountPanel');
268 tabPanelControllerConfig['deleteAccountTab'] = this.getId('deleteAccountPanel'); 266 tabPanelControllerConfig['deleteAccountTab'] = this.getId('deleteAccountPanel');
269 // tabPanelControllerConfig['paidAccountTab'] = this.getId('paidAccountPanel'); 267 // tabPanelControllerConfig['paidAccountTab'] = this.getId('paidAccountPanel');
270 268
271 this._tabPanelController = new Clipperz.PM.Components.TabPanel.TabPanelController({ 269 this._tabPanelController = new Clipperz.PM.Components.TabPanel.TabPanelController({
272 name:'accountTabPanel', 270 name:'accountTabPanel',
273 config:tabPanelControllerConfig, 271 config:tabPanelControllerConfig,
274 selectedTab:'changePassphraseTab' 272 selectedTab:'changePassphraseTab'
275 }); 273 });
276 } 274 }
277 275
278 return this._tabPanelController; 276 return this._tabPanelController;
279 }, 277 },
280 278
281 //------------------------------------------------------------------------- 279 //-------------------------------------------------------------------------
282 280
283 'doChangePassphrase': function() { 281 'doChangePassphrase': function() {
284 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly() == false) { 282 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly() == false) {
285 varusername; 283 varusername;
286 varoldPassphrase; 284 varoldPassphrase;
287 var newPassphrase; 285 var newPassphrase;
288 var renewPassphrase; 286 var renewPassphrase;
289 var safetyCheck; 287 var safetyCheck;
290 varareThereAnyErrors; 288 varareThereAnyErrors;
291 var errorMessageActor; 289 var errorMessageActor;
292 290
293 errorMessageActor = this.getActor('changePassphrase_errorMessage'); 291 errorMessageActor = this.getActor('changePassphrase_errorMessage');
294 292
295 areThereAnyErrors = false; 293 areThereAnyErrors = false;
296 username = this.getDom('changePassphrase_username').value; 294 username = this.getDom('changePassphrase_username').value;
297 oldPassphrase= this.getDom('changePassphrase_oldPassphrase').value; 295 oldPassphrase= this.getDom('changePassphrase_oldPassphrase').value;
298 newPassphrase= this.getDom('changePassphrase_newPassphrase').value; 296 newPassphrase= this.getDom('changePassphrase_newPassphrase').value;
299 renewPassphrase= this.getDom('changePassphrase_renewPassphrase').value; 297 renewPassphrase= this.getDom('changePassphrase_renewPassphrase').value;
300 safetyCheck = this.getDom('changePassphrase_safetyCheck').checked; 298 safetyCheck = this.getDom('changePassphrase_safetyCheck').checked;
301 299
302 if (this.user().username() != username) { 300 if (this.user().username() != username) {
303 this.showFormErrorMessageAnimation(errorMessageActor, Clipperz.PM.Strings['changePasswordFormWrongUsernameWarning']); 301 this.showFormErrorMessageAnimation(errorMessageActor, Clipperz.PM.Strings['changePasswordFormWrongUsernameWarning']);
304 this.getElement('changePassphrase_username').focus().dom.select(); 302 this.getElement('changePassphrase_username').focus().dom.select();
305 areThereAnyErrors = true; 303 areThereAnyErrors = true;
306 } else if (this.user().passphrase() != oldPassphrase) { 304 } else if (this.user().passphrase() != oldPassphrase) {
307 this.showFormErrorMessageAnimation(errorMessageActor, Clipperz.PM.Strings['changePasswordFormWrongPassphraseWarning']); 305 this.showFormErrorMessageAnimation(errorMessageActor, Clipperz.PM.Strings['changePasswordFormWrongPassphraseWarning']);
308 this.getElement('changePassphrase_oldPassphrase').focus().dom.select(); 306 this.getElement('changePassphrase_oldPassphrase').focus().dom.select();
309 areThereAnyErrors = true; 307 areThereAnyErrors = true;
310 } else if (newPassphrase != renewPassphrase) { 308 } else if (newPassphrase != renewPassphrase) {
311 this.showFormErrorMessageAnimation(errorMessageActor, Clipperz.PM.Strings['changePasswordFormWrongRetypePassphraseWarning']); 309 this.showFormErrorMessageAnimation(errorMessageActor, Clipperz.PM.Strings['changePasswordFormWrongRetypePassphraseWarning']);
312 this.getElement('changePassphrase_renewPassphrase').focus().dom.select(); 310 this.getElement('changePassphrase_renewPassphrase').focus().dom.select();
313 areThereAnyErrors = true; 311 areThereAnyErrors = true;
314 } else if (safetyCheck != true) { 312 } else if (safetyCheck != true) {
315 this.showFormErrorMessageAnimation(errorMessageActor, Clipperz.PM.Strings['changePasswordFormSafetyCheckWarning']); 313 this.showFormErrorMessageAnimation(errorMessageActor, Clipperz.PM.Strings['changePasswordFormSafetyCheckWarning']);
316 this.getElement('changePassphrase_safetyCheck').focus(); 314 this.getElement('changePassphrase_safetyCheck').focus();
317 areThereAnyErrors = true; 315 areThereAnyErrors = true;
318 } 316 }
319 317
320 if (areThereAnyErrors == false) { 318 if (areThereAnyErrors == false) {
321 errorMessageActor.hide(); 319 errorMessageActor.hide();
322 this.doChangePassphraseWithUsernameAndPassphrase(username, newPassphrase); 320 this.doChangePassphraseWithUsernameAndPassphrase(username, newPassphrase);
323 } 321 }
324 } 322 }
325 }, 323 },
326 324
327 //------------------------------------------------------------------------- 325 //-------------------------------------------------------------------------
328 326
329 'doChangePassphraseWithUsernameAndPassphrase': function(anUsername, aPassphrase) { 327 'doChangePassphraseWithUsernameAndPassphrase': function(anUsername, aPassphrase) {
330 var deferredResult; 328 var deferredResult;
331 329
332//MochiKit.Logging.logDebug(">>> AccountPanel.doChangePassphraseWithUsernameAndPassphrase - this.user: " + this.user()); 330//MochiKit.Logging.logDebug(">>> AccountPanel.doChangePassphraseWithUsernameAndPassphrase - this.user: " + this.user());
333 deferredResult = new MochiKit.Async.Deferred(); 331 deferredResult = new MochiKit.Async.Deferred();
334//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 1: " + res); return res;}); 332//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 1: " + res); return res;});
335 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Components.MessageBox(), 'deferredShow'), 333 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Components.MessageBox(), 'deferredShow'),
336 { 334 {
337 title:Clipperz.PM.Strings['changePasswordFormProgressDialogTitle'], 335 title:Clipperz.PM.Strings['changePasswordFormProgressDialogTitle'],
338 text:Clipperz.PM.Strings['changePasswordFormProgressDialogEmptyText'], 336 text:Clipperz.PM.Strings['changePasswordFormProgressDialogEmptyText'],
339 width:240, 337 width:240,
340 showProgressBar:true, 338 showProgressBar:true,
341 showCloseButton:false, 339 showCloseButton:false,
342 steps:4 340 steps:4
343 }, 341 },
344 this.getDom('changePassphraseButton') 342 this.getDom('changePassphraseButton')
345 ); 343 );
346//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 2: " + res); return res;}); 344//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 2: " + res); return res;});
347 deferredResult.addCallback(MochiKit.Base.method(this.user(), 'changeCredentials'), anUsername, aPassphrase); 345 deferredResult.addCallback(MochiKit.Base.method(this.user(), 'changeCredentials'), anUsername, aPassphrase);
348//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 3: " + res); return res;}); 346//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 3: " + res); return res;});
349 deferredResult.addCallback(function() { 347 deferredResult.addCallback(function() {
350 Clipperz.PM.Components.MessageBox().update({ 348 Clipperz.PM.Components.MessageBox().update({
351 title:Clipperz.PM.Strings['changePasswordFormProgressDialogConnectedMessageTitle'], 349 title:Clipperz.PM.Strings['changePasswordFormProgressDialogConnectedMessageTitle'],
352 text:Clipperz.PM.Strings['changePasswordFormProgressDialogConnectedMessageText'], 350 text:Clipperz.PM.Strings['changePasswordFormProgressDialogConnectedMessageText'],
353 /*showProgressBar:false,*/ 351 /*showProgressBar:false,*/
354 step:'next' 352 step:'next'
355 }); 353 });
356 }); 354 });
357//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 4: " + res); return res;}); 355//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 4: " + res); return res;});
358 deferredResult.addCallback(MochiKit.Async.wait, 1); 356 deferredResult.addCallback(MochiKit.Async.wait, 1);
359//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 5: " + res); return res;}); 357//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 5: " + res); return res;});
360 deferredResult.addCallback(function(anAccountPanel, res) { 358 deferredResult.addCallback(function(anAccountPanel, res) {
361 Clipperz.PM.Components.MessageBox().hide(YAHOO.ext.Element.get('main')); 359 Clipperz.PM.Components.MessageBox().hide(YAHOO.ext.Element.get('main'));
362 360
363 anAccountPanel.getDom('changePassphrase_username').value = ""; 361 anAccountPanel.getDom('changePassphrase_username').value = "";
364 anAccountPanel.getDom('changePassphrase_oldPassphrase').value = ""; 362 anAccountPanel.getDom('changePassphrase_oldPassphrase').value = "";
365 anAccountPanel.getElement('changePassphrase_oldPassphrase').focus(); 363 anAccountPanel.getElement('changePassphrase_oldPassphrase').focus();
366 anAccountPanel.getDom('changePassphrase_newPassphrase').value = ""; 364 anAccountPanel.getDom('changePassphrase_newPassphrase').value = "";
367 anAccountPanel.getElement('changePassphrase_newPassphrase').focus(); 365 anAccountPanel.getElement('changePassphrase_newPassphrase').focus();
368 anAccountPanel.getDom('changePassphrase_renewPassphrase').value = ""; 366 anAccountPanel.getDom('changePassphrase_renewPassphrase').value = "";
369 anAccountPanel.getDom('changePassphrase_safetyCheck').checked = false; 367 anAccountPanel.getDom('changePassphrase_safetyCheck').checked = false;
370 368
371 anAccountPanel.getElement('changePassphrase_username').focus(); 369 anAccountPanel.getElement('changePassphrase_username').focus();
372 return res; 370 return res;
373 }, this); 371 }, this);
374//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 6: " + res); return res;}); 372//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 6: " + res); return res;});
375 deferredResult.addErrback(function() { 373 deferredResult.addErrback(function() {
376 Clipperz.PM.Components.MessageBox().update({ 374 Clipperz.PM.Components.MessageBox().update({
377 title:Clipperz.PM.Strings['changePasswordFormProgressDialogErrorMessageTitle'], 375 title:Clipperz.PM.Strings['changePasswordFormProgressDialogErrorMessageTitle'],
378 text:Clipperz.PM.Strings['changePasswordFormProgressDialogErrorMessageText'], 376 text:Clipperz.PM.Strings['changePasswordFormProgressDialogErrorMessageText'],
379 buttons:{'ok':"close"} 377 buttons:{'ok':"close"}
380 }); 378 });
381 }); 379 });
382//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 7: " + res); return res;}); 380//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug(" AccountPanel.doChangePassphraseWithUsernameAndPassphrase 7: " + res); return res;});
383 deferredResult.callback(); 381 deferredResult.callback();
384 382
385//MochiKit.Logging.logDebug("<<< AccountPanel.doChangePassphraseWithUsernameAndPassphrase"); 383//MochiKit.Logging.logDebug("<<< AccountPanel.doChangePassphraseWithUsernameAndPassphrase");
386 }, 384 },
387 385
388 //------------------------------------------------------------------------- 386 //-------------------------------------------------------------------------
389 387
390 'doDeleteAccount': function() { 388 'doDeleteAccount': function() {
391 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly() == false) { 389 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly() == false) {
392 varusername; 390 varusername;
393 varpassphrase; 391 varpassphrase;
394 var safetyCheck; 392 var safetyCheck;
395 varareThereAnyErrors; 393 varareThereAnyErrors;
396 var errorMessageActor; 394 var errorMessageActor;
397 395
398 errorMessageActor = this.getActor('deleteAccount_errorMessage'); 396 errorMessageActor = this.getActor('deleteAccount_errorMessage');
399 397
400 areThereAnyErrors = false; 398 areThereAnyErrors = false;
401 username = this.getDom('deleteAccount_username').value; 399 username = this.getDom('deleteAccount_username').value;
402 passphrase= this.getDom('deleteAccount_passphrase').value; 400 passphrase= this.getDom('deleteAccount_passphrase').value;
403 safetyCheck = this.getDom('deleteAccount_safetyCheck').checked; 401 safetyCheck = this.getDom('deleteAccount_safetyCheck').checked;
404 402
405 if (this.user().username() != username) { 403 if (this.user().username() != username) {
406 this.showFormErrorMessageAnimation(errorMessageActor, Clipperz.PM.Strings['deleteAccountFormWrongUsernameWarning']); 404 this.showFormErrorMessageAnimation(errorMessageActor, Clipperz.PM.Strings['deleteAccountFormWrongUsernameWarning']);
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/BasePanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/BasePanel.js
index 15dd622..f36e8b0 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Panels/BasePanel.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Panels/BasePanel.js
@@ -1,93 +1,91 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } 27if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; }
30 28
31//var _Clipperz_PM_Components_Panels_base_id_ = 0; 29//var _Clipperz_PM_Components_Panels_base_id_ = 0;
32 30
33//############################################################################# 31//#############################################################################
34 32
35Clipperz.PM.Components.Panels.BasePanel = function(anElement, args) { 33Clipperz.PM.Components.Panels.BasePanel = function(anElement, args) {
36 args = args || {}; 34 args = args || {};
37 35
38 Clipperz.PM.Components.Panels.BasePanel.superclass.constructor.call(this, anElement, args); 36 Clipperz.PM.Components.Panels.BasePanel.superclass.constructor.call(this, anElement, args);
39 37
40 this._user = args.user || null; 38 this._user = args.user || null;
41 this._delegate = args.delegate || null; 39 this._delegate = args.delegate || null;
42 this._tabPanelController = null; 40 this._tabPanelController = null;
43 //Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler'); 41 //Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler');
44 42
45 //this._ids = {}; 43 //this._ids = {};
46 44
47 return this; 45 return this;
48} 46}
49 47
50//============================================================================= 48//=============================================================================
51 49
52YAHOO.extendX(Clipperz.PM.Components.Panels.BasePanel, Clipperz.PM.Components.BaseComponent, { 50YAHOO.extendX(Clipperz.PM.Components.Panels.BasePanel, Clipperz.PM.Components.BaseComponent, {
53 51
54 'toString': function() { 52 'toString': function() {
55 return "Clipperz.PM.Components.Panels.BasePanel component"; 53 return "Clipperz.PM.Components.Panels.BasePanel component";
56 }, 54 },
57 55
58 //------------------------------------------------------------------------- 56 //-------------------------------------------------------------------------
59 57
60 'user': function() { 58 'user': function() {
61 return this._user; 59 return this._user;
62 }, 60 },
63 61
64 'setUser': function(aValue) { 62 'setUser': function(aValue) {
65 this._user = aValue; 63 this._user = aValue;
66 }, 64 },
67 65
68 //------------------------------------------------------------------------- 66 //-------------------------------------------------------------------------
69 67
70 'delegate': function() { 68 'delegate': function() {
71 return this._delegate; 69 return this._delegate;
72 }, 70 },
73 71
74 'setDelegate': function(aValue) { 72 'setDelegate': function(aValue) {
75 this._delegate = aValue; 73 this._delegate = aValue;
76 }, 74 },
77 75
78 //------------------------------------------------------------------------- 76 //-------------------------------------------------------------------------
79 77
80 'tabPanelController': function() { 78 'tabPanelController': function() {
81 return this._tabPanelController; 79 return this._tabPanelController;
82 }, 80 },
83 81
84 'switchLanguageHandler': function() { 82 'switchLanguageHandler': function() {
85//MochiKit.Logging.logDebug(">>> BasePanel.switchLanguageHandler [" + this.toString() + "]"); 83//MochiKit.Logging.logDebug(">>> BasePanel.switchLanguageHandler [" + this.toString() + "]");
86 this.render(); 84 this.render();
87//MochiKit.Logging.logDebug("<<< BasePanel.switchLanguageHandler [" + this.toString() + "]"); 85//MochiKit.Logging.logDebug("<<< BasePanel.switchLanguageHandler [" + this.toString() + "]");
88 }, 86 },
89 87
90 //------------------------------------------------------------------------- 88 //-------------------------------------------------------------------------
91 __syntaxFix__: "syntax fix" 89 __syntaxFix__: "syntax fix"
92 90
93}); 91});
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/ContactsPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/ContactsPanel.js
index 5a91d83..3feed3d 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Panels/ContactsPanel.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Panels/ContactsPanel.js
@@ -1,102 +1,100 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } 27if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.Panels.ContactsPanel = function(anElement, args) { 31Clipperz.PM.Components.Panels.ContactsPanel = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.Panels.ContactsPanel.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.Panels.ContactsPanel.superclass.constructor.call(this, anElement, args);
37 35
38 this.render(); 36 this.render();
39 37
40 return this; 38 return this;
41} 39}
42 40
43//============================================================================= 41//=============================================================================
44 42
45YAHOO.extendX(Clipperz.PM.Components.Panels.ContactsPanel, Clipperz.PM.Components.Panels.BasePanel, { 43YAHOO.extendX(Clipperz.PM.Components.Panels.ContactsPanel, Clipperz.PM.Components.Panels.BasePanel, {
46 44
47 'toString': function() { 45 'toString': function() {
48 return "Clipperz.PM.Components.ContactsPanel component"; 46 return "Clipperz.PM.Components.ContactsPanel component";
49 }, 47 },
50 48
51 //------------------------------------------------------------------------- 49 //-------------------------------------------------------------------------
52 50
53 'render': function() { 51 'render': function() {
54 // var tabPanelControllerConfig; 52 // var tabPanelControllerConfig;
55 53
56 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ 54 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[
57 {tag:'tbody', children:[ 55 {tag:'tbody', children:[
58 {tag:'tr', children:[ 56 {tag:'tr', children:[
59 {tag:'td', valign:'top', width:'200', children:[ 57 {tag:'td', valign:'top', width:'200', children:[
60 {tag:'ul', id:"dataSubMenu", cls:'subMenu', children:[ 58 {tag:'ul', id:"dataSubMenu", cls:'subMenu', children:[
61 {tag:'li', id:this.getId('contacts'), htmlString:Clipperz.PM.Strings['contactsTabLabel']}, 59 {tag:'li', id:this.getId('contacts'), htmlString:Clipperz.PM.Strings['contactsTabLabel']},
62 ]} 60 ]}
63 ]}, 61 ]},
64 {tag:'td', valign:'top', children:[ 62 {tag:'td', valign:'top', children:[
65 {tag:'ul', cls:'clipperzTabPanels', children:[ 63 {tag:'ul', cls:'clipperzTabPanels', children:[
66 {tag:'li', id:this.getId('contactsPanel'), children:[ 64 {tag:'li', id:this.getId('contactsPanel'), children:[
67 {tag:'div', cls:'clipperzSubPanel', children:[ 65 {tag:'div', cls:'clipperzSubPanel', children:[
68 {tag:'h5', htmlString:Clipperz.PM.Strings['contactsTabTitle']}, 66 {tag:'h5', htmlString:Clipperz.PM.Strings['contactsTabTitle']},
69 {tag:'div', htmlString:Clipperz.PM.Strings['comingSoon']} 67 {tag:'div', htmlString:Clipperz.PM.Strings['comingSoon']}
70 ]} 68 ]}
71 ]} 69 ]}
72 ]} 70 ]}
73 ]} 71 ]}
74 ]} 72 ]}
75 ]} 73 ]}
76 ]}); 74 ]});
77 75
78 // tabPanelControllerConfig = {} 76 // tabPanelControllerConfig = {}
79 // tabPanelControllerConfig[this.getId('contacts')] = this.getId('contactsPanel'); 77 // tabPanelControllerConfig[this.getId('contacts')] = this.getId('contactsPanel');
80 // new Clipperz.PM.Components.TabPanel.TabPanelController({ config:tabPanelControllerConfig, selectedTab:this.getId('contacts') }); 78 // new Clipperz.PM.Components.TabPanel.TabPanelController({ config:tabPanelControllerConfig, selectedTab:this.getId('contacts') });
81 this.tabPanelController().setUp(); 79 this.tabPanelController().setUp();
82 }, 80 },
83 81
84 //------------------------------------------------------------------------- 82 //-------------------------------------------------------------------------
85 83
86 'tabPanelController': function() { 84 'tabPanelController': function() {
87 if (this._tabPanelController == null) { 85 if (this._tabPanelController == null) {
88 var tabPanelControllerConfig; 86 var tabPanelControllerConfig;
89 87
90 tabPanelControllerConfig = {} 88 tabPanelControllerConfig = {}
91 tabPanelControllerConfig[this.getId('contacts')] = this.getId('contactsPanel'); 89 tabPanelControllerConfig[this.getId('contacts')] = this.getId('contactsPanel');
92 this._tabPanelController = new Clipperz.PM.Components.TabPanel.TabPanelController({ config:tabPanelControllerConfig, selectedTab:this.getId('contacts') }); 90 this._tabPanelController = new Clipperz.PM.Components.TabPanel.TabPanelController({ config:tabPanelControllerConfig, selectedTab:this.getId('contacts') });
93 } 91 }
94 92
95 return this._tabPanelController; 93 return this._tabPanelController;
96 }, 94 },
97 95
98 //------------------------------------------------------------------------- 96 //-------------------------------------------------------------------------
99 __syntaxFix__: "syntax fix" 97 __syntaxFix__: "syntax fix"
100 98
101}); 99});
102 100
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/DataPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/DataPanel.js
index 11d4bd7..520542c 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Panels/DataPanel.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Panels/DataPanel.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } 27if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.Panels.DataPanel = function(anElement, args) { 31Clipperz.PM.Components.Panels.DataPanel = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.Panels.DataPanel.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.Panels.DataPanel.superclass.constructor.call(this, anElement, args);
37 35
38 this._progressWidth = 400; 36 this._progressWidth = 400;
39 37
40 38
41 this.render(); 39 this.render();
42 40
43 return this; 41 return this;
44} 42}
45 43
46//============================================================================= 44//=============================================================================
47 45
48YAHOO.extendX(Clipperz.PM.Components.Panels.DataPanel, Clipperz.PM.Components.Panels.BasePanel, { 46YAHOO.extendX(Clipperz.PM.Components.Panels.DataPanel, Clipperz.PM.Components.Panels.BasePanel, {
49 47
50 'toString': function() { 48 'toString': function() {
51 return "Clipperz.PM.Components.DataPanel component"; 49 return "Clipperz.PM.Components.DataPanel component";
52 }, 50 },
53 51
54 //------------------------------------------------------------------------- 52 //-------------------------------------------------------------------------
55 53
56 'render': function() { 54 'render': function() {
57 MochiKit.Signal.disconnectAllTo(this); 55 MochiKit.Signal.disconnectAllTo(this);
58 Clipperz.NotificationCenter.unregister(this); 56 Clipperz.NotificationCenter.unregister(this);
59 this.element().update(""); 57 this.element().update("");
60 58
61 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ 59 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[
62 {tag:'tbody', children:[ 60 {tag:'tbody', children:[
63 {tag:'tr', children:[ 61 {tag:'tr', children:[
64 {tag:'td', valign:'top', width:'200', children:[ 62 {tag:'td', valign:'top', width:'200', children:[
65 {tag:'ul', id:"dataSubMenu", cls:'subMenu', children:[ 63 {tag:'ul', id:"dataSubMenu", cls:'subMenu', children:[
66 {tag:'li', id:'offlineCopyTab', htmlString:Clipperz.PM.Strings['offlineCopyTabLabel']}, 64 {tag:'li', id:'offlineCopyTab', htmlString:Clipperz.PM.Strings['offlineCopyTabLabel']},
67 {tag:'li', id:'sharingTab', htmlString:Clipperz.PM.Strings['sharingTabLabel']}, 65 {tag:'li', id:'sharingTab', htmlString:Clipperz.PM.Strings['sharingTabLabel']},
68 {tag:'li', id:'importTab', htmlString:Clipperz.PM.Strings['importTabLabel']}, 66 {tag:'li', id:'importTab', htmlString:Clipperz.PM.Strings['importTabLabel']},
69 {tag:'li', id:'printingTab', htmlString:Clipperz.PM.Strings['printingTabLabel']} 67 {tag:'li', id:'printingTab', htmlString:Clipperz.PM.Strings['printingTabLabel']}
70 ]} 68 ]}
71 ]}, 69 ]},
72 {tag:'td', valign:'top', children:[ 70 {tag:'td', valign:'top', children:[
73 {tag:'ul', cls:'clipperzTabPanels', children:[ 71 {tag:'ul', cls:'clipperzTabPanels', children:[
74 {tag:'li', id:this.getId('offlineCopyPanel'), children:[ 72 {tag:'li', id:this.getId('offlineCopyPanel'), children:[
75 {tag:'div', cls:'clipperzSubPanel', children:[ 73 {tag:'div', cls:'clipperzSubPanel', children:[
76 {tag:'h5', htmlString:Clipperz.PM.Strings['offlineCopyTabTitle']}, 74 {tag:'h5', htmlString:Clipperz.PM.Strings['offlineCopyTabTitle']},
77 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['offlineCopyTabDescription']}, 75 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['offlineCopyTabDescription']},
78 {tag:'div', id:this.getId('offlineCopyLinkBox'), children:[ 76 {tag:'div', id:this.getId('offlineCopyLinkBox'), children:[
79 {tag:'a', id:'offlineCopyLink', href:'#', htmlString:Clipperz.PM.Strings['offlineCopyDownloadLinkLabel']} 77 {tag:'a', id:'offlineCopyLink', href:'#', htmlString:Clipperz.PM.Strings['offlineCopyDownloadLinkLabel']}
80 ]}, 78 ]},
81 {tag:'div', id:this.getId('offlineCopyLinkBox_read-only'), children:[ 79 {tag:'div', id:this.getId('offlineCopyLinkBox_read-only'), children:[
82 {tag:'span', cls:'read-only', htmlString:Clipperz.PM.Strings['offlineCopyDownloadLinkLabel']} 80 {tag:'span', cls:'read-only', htmlString:Clipperz.PM.Strings['offlineCopyDownloadLinkLabel']}
83 ]} 81 ]}
84 ]} 82 ]}
85 ]}, 83 ]},
86 {tag:'li', id:this.getId('sharingPanel'), children:[ 84 {tag:'li', id:this.getId('sharingPanel'), children:[
87 {tag:'div', cls:'clipperzSubPanel', children:[ 85 {tag:'div', cls:'clipperzSubPanel', children:[
88 {tag:'h5', htmlString:Clipperz.PM.Strings['sharingTabTitle']}, 86 {tag:'h5', htmlString:Clipperz.PM.Strings['sharingTabTitle']},
89 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['sharingTabDescription']} 87 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['sharingTabDescription']}
90 ]} 88 ]}
91 ]}, 89 ]},
92 {tag:'li', id:this.getId('importPanel'), children:[ 90 {tag:'li', id:this.getId('importPanel'), children:[
93 {tag:'div', cls:'clipperzSubPanel', children:[ 91 {tag:'div', cls:'clipperzSubPanel', children:[
94 {tag:'div', id:this.getId('importPanelMainComponent')} 92 {tag:'div', id:this.getId('importPanelMainComponent')}
95 ]} 93 ]}
96 ]}, 94 ]},
97 {tag:'li', id:this.getId('printingPanel'), children:[ 95 {tag:'li', id:this.getId('printingPanel'), children:[
98 {tag:'div', cls:'clipperzSubPanel', children:[ 96 {tag:'div', cls:'clipperzSubPanel', children:[
99 {tag:'h5', htmlString:Clipperz.PM.Strings['printingTabTitle']}, 97 {tag:'h5', htmlString:Clipperz.PM.Strings['printingTabTitle']},
100 98
101 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['printingTabDescription']}, 99 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['printingTabDescription']},
102 {tag:'div', id:this.getId('printingLinkBox'), children:[ 100 {tag:'div', id:this.getId('printingLinkBox'), children:[
103 {tag:'a', id:'printingLink', href:'#', htmlString:Clipperz.PM.Strings['printingLinkLabel']} 101 {tag:'a', id:'printingLink', href:'#', htmlString:Clipperz.PM.Strings['printingLinkLabel']}
104 ]}, 102 ]},
105 103
106 {tag:'hr'}, 104 {tag:'hr'},
107 105
108 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['exportTabDescription']}, 106 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['exportTabDescription']},
109 {tag:'div', id:this.getId('exportLinkBox'), children:[ 107 {tag:'div', id:this.getId('exportLinkBox'), children:[
110 {tag:'a', id:'exportLink', href:'#', htmlString:Clipperz.PM.Strings['exportLinkLabel']} 108 {tag:'a', id:'exportLink', href:'#', htmlString:Clipperz.PM.Strings['exportLinkLabel']}
111 ]} 109 ]}
112 ]} 110 ]}
113 ]} 111 ]}
114 ]} 112 ]}
115 ]} 113 ]}
116 ]} 114 ]}
117 ]} 115 ]}
118 ]}); 116 ]});
119 117
120 this.tabPanelController().setUp(); 118 this.tabPanelController().setUp();
121 119
122 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { 120 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) {
123 this.getElement('offlineCopyLinkBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 121 this.getElement('offlineCopyLinkBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
124 } else { 122 } else {
125 this.getElement('offlineCopyLinkBox_read-only').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 123 this.getElement('offlineCopyLinkBox_read-only').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
126 MochiKit.Signal.connect('offlineCopyLink', 'onclick', this, 'downloadOfflineCopy'); 124 MochiKit.Signal.connect('offlineCopyLink', 'onclick', this, 'downloadOfflineCopy');
127 } 125 }
128 126
129 new Clipperz.PM.Components.Import.MainComponent(this.getElement('importPanelMainComponent'), {user:this.user()}); 127 new Clipperz.PM.Components.Import.MainComponent(this.getElement('importPanelMainComponent'), {user:this.user()});
130 128
131 MochiKit.Signal.connect('printingLink', 'onclick', this, 'printAllData'); 129 MochiKit.Signal.connect('printingLink', 'onclick', this, 'printAllData');
132 MochiKit.Signal.connect('exportLink', 'onclick', this, 'exportAllData'); 130 MochiKit.Signal.connect('exportLink', 'onclick', this, 'exportAllData');
133 131
134 Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler'); 132 Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler');
135 }, 133 },
136 134
137 //------------------------------------------------------------------------- 135 //-------------------------------------------------------------------------
138 136
139 'tabPanelController': function() { 137 'tabPanelController': function() {
140 if (this._tabPanelController == null) { 138 if (this._tabPanelController == null) {
141 var tabPanelControllerConfig; 139 var tabPanelControllerConfig;
142 140
143 tabPanelControllerConfig = {} 141 tabPanelControllerConfig = {}
144 tabPanelControllerConfig['offlineCopyTab'] = this.getId('offlineCopyPanel'); 142 tabPanelControllerConfig['offlineCopyTab'] = this.getId('offlineCopyPanel');
145 tabPanelControllerConfig['sharingTab'] = this.getId('sharingPanel'); 143 tabPanelControllerConfig['sharingTab'] = this.getId('sharingPanel');
146 tabPanelControllerConfig['importTab'] = this.getId('importPanel'); 144 tabPanelControllerConfig['importTab'] = this.getId('importPanel');
147 tabPanelControllerConfig['printingTab'] = this.getId('printingPanel'); 145 tabPanelControllerConfig['printingTab'] = this.getId('printingPanel');
148 this._tabPanelController = new Clipperz.PM.Components.TabPanel.TabPanelController({ 146 this._tabPanelController = new Clipperz.PM.Components.TabPanel.TabPanelController({
149 name: 'dataTabPanel', 147 name: 'dataTabPanel',
150 config:tabPanelControllerConfig, 148 config:tabPanelControllerConfig,
151 selectedTab:'offlineCopyTab' 149 selectedTab:'offlineCopyTab'
152 }); 150 });
153 } 151 }
154 152
155 return this._tabPanelController; 153 return this._tabPanelController;
156 }, 154 },
157 155
158 //------------------------------------------------------------------------- 156 //-------------------------------------------------------------------------
159 157
160 'downloadOfflineCopy': function(anEvent) { 158 'downloadOfflineCopy': function(anEvent) {
161 var downloadHref; 159 var downloadHref;
162 160
163 downloadHref = window.location.href.replace(/\/[^\/]*$/,'') + Clipperz_dumpUrl; 161 downloadHref = window.location.href.replace(/\/[^\/]*$/,'') + Clipperz_dumpUrl;
164 162
165 if (Clipperz_IEisBroken == true) { 163 if (Clipperz_IEisBroken == true) {
166 window.open(downloadHref, ""); 164 window.open(downloadHref, "");
167 } else { 165 } else {
168 vardeferredResult; 166 vardeferredResult;
169 var newWindow; 167 var newWindow;
170 168
171 newWindow = window.open("", ""); 169 newWindow = window.open("", "");
172 170
173 anEvent.preventDefault(); 171 anEvent.preventDefault();
174 172
175 deferredResult = new MochiKit.Async.Deferred(); 173 deferredResult = new MochiKit.Async.Deferred();
176 deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'echo', {'echo':"echo"}); 174 deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'echo', {'echo':"echo"});
177 deferredResult.addCallback(function(aWindow) { 175 deferredResult.addCallback(function(aWindow) {
178 aWindow.location.href = downloadHref; 176 aWindow.location.href = downloadHref;
179 }, newWindow); 177 }, newWindow);
180 deferredResult.callback(); 178 deferredResult.callback();
181 } 179 }
182 }, 180 },
183 181
184 //------------------------------------------------------------------------- 182 //-------------------------------------------------------------------------
185 183
186 'compareRecords': function(a, b) { 184 'compareRecords': function(a, b) {
187 return MochiKit.Base.compare(a.label().toLowerCase(), b.label().toLowerCase()); 185 return MochiKit.Base.compare(a.label().toLowerCase(), b.label().toLowerCase());
188 }, 186 },
189 187
190 'logo': function() { 188 'logo': function() {
191 var result; 189 var result;
192 190
193 if (Clipperz_IEisBroken == true) { 191 if (Clipperz_IEisBroken == true) {
194 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { 192 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) {
195 result = "<span><span class=\"clipperzLogoSpan\">clipper</span><span class=\"clipperzLoggoZSpan\">z</span></span>"; 193 result = "<span><span class=\"clipperzLogoSpan\">clipper</span><span class=\"clipperzLoggoZSpan\">z</span></span>";
196 } else { 194 } else {
197 result = "<img src=\"./images/exportLogo.png\" />"; 195 result = "<img src=\"./images/exportLogo.png\" />";
198 } 196 }
199 } else { 197 } else {
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\" />"; 198 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\" />";
201 } 199 }
202 200
203 return result; 201 return result;
204 }, 202 },
205 203
206 'progressWidth': function() { 204 'progressWidth': function() {
207 return this._progressWidth; 205 return this._progressWidth;
208 }, 206 },
209 207
210 'updateProgress': function(aProgressComponent, aPercentage) { 208 'updateProgress': function(aProgressComponent, aPercentage) {
211 209
212 210
213 }, 211 },
214 212
215 //------------------------------------------------------------------------- 213 //-------------------------------------------------------------------------
216 214
217 'printAllData': function(anEvent) { 215 'printAllData': function(anEvent) {
218 var newWindow; 216 var newWindow;
219 var allRecords; 217 var allRecords;
220 218
221//MochiKit.Logging.logDebug(">>> printAllData"); 219//MochiKit.Logging.logDebug(">>> printAllData");
222 newWindow = window.open("", ""); 220 newWindow = window.open("", "");
223 newWindow.document.write( 221 newWindow.document.write(
224"<html>" + 222"<html>" +
225"<header>" + 223"<header>" +
226 "<title>Clipperz export data</title>" + 224 "<title>Clipperz export data</title>" +
227"<style>" + 225"<style>" +
228"#exportedData {" + 226"#exportedData {" +
229 " width: 600px;"+ 227 " width: 600px;"+
230"}" + 228"}" +
231".ext-mb-progress-wrap {" + 229".ext-mb-progress-wrap {" +
232 "border:1px solid #6593cf;" + 230 "border:1px solid #6593cf;" +
233 "margin-bottom: 10px;" + 231 "margin-bottom: 10px;" +
234 "width: " + this.progressWidth() + "px;" + 232 "width: " + this.progressWidth() + "px;" +
235"}" + 233"}" +
236".ext-mb-progress {" + 234".ext-mb-progress {" +
237 "height:18px;" + 235 "height:18px;" +
238 "background:transparent url(./images/default/basic-dialog/progress2.gif) repeat-x 1px 1px;" + 236 "background:transparent url(./images/default/basic-dialog/progress2.gif) repeat-x 1px 1px;" +
239"}" + 237"}" +
240".ext-mb-progress-bar {" + 238".ext-mb-progress-bar {" +
241 "height:18px;" + 239 "height:18px;" +
242 "overflow:hidden;" + 240 "overflow:hidden;" +
243 "width:0;" + 241 "width:0;" +
244 "background:#8bb8f3;" + 242 "background:#8bb8f3;" +
245"}" + 243"}" +
246"body {" + 244"body {" +
247 "font-family: sans-serif;" + 245 "font-family: sans-serif;" +
248"}" + 246"}" +
249"div#logo {" + 247"div#logo {" +
250 "border-bottom: 1px dotted #aaaaaa;" + 248 "border-bottom: 1px dotted #aaaaaa;" +
251 "margin-bottom: 15px;" + 249 "margin-bottom: 15px;" +
252"}" + 250"}" +
253"div.recordBlock h2 {" + 251"div.recordBlock h2 {" +
254 "font-size: 14pt;" + 252 "font-size: 14pt;" +
255 "margin: 0px;" + 253 "margin: 0px;" +
256 "padding: 0px;" + 254 "padding: 0px;" +
257 "border: 0px;" + 255 "border: 0px;" +
258 "color: #666666;" + 256 "color: #666666;" +
259"}" + 257"}" +
260"div.recordBlock div.recordNotes p {" + 258"div.recordBlock div.recordNotes p {" +
261 "margin: 0px;" + 259 "margin: 0px;" +
262 "padding: 0px;" + 260 "padding: 0px;" +
263 "border: 0px;" + 261 "border: 0px;" +
264 "color: #aaaaaa;" + 262 "color: #aaaaaa;" +
265 "font-size: 10pt;" + 263 "font-size: 10pt;" +
266 "line-height: 18pt;" + 264 "line-height: 18pt;" +
267 "border-left: 1px solid #aaaaaa;" + 265 "border-left: 1px solid #aaaaaa;" +
268 "padding-left: 10px;" + 266 "padding-left: 10px;" +
269"}" + 267"}" +
270"div.recordBlock dl {" + 268"div.recordBlock dl {" +
271 "margin: 0px;" + 269 "margin: 0px;" +
272 "padding: 0px;" + 270 "padding: 0px;" +
273 "border: 0px;" + 271 "border: 0px;" +
274 "color: #999999;" + 272 "color: #999999;" +
275 "padding-bottom: 10px;" + 273 "padding-bottom: 10px;" +
276 "border-bottom: 1px dotted #aaaaaa;" + 274 "border-bottom: 1px dotted #aaaaaa;" +
277 "margin-top: 10px;" + 275 "margin-top: 10px;" +
278 "margin-bottom: 15px;" + 276 "margin-bottom: 15px;" +
279"}" + 277"}" +
280"div.recordBlock dl dt {" + 278"div.recordBlock dl dt {" +
281 "display: block;" + 279 "display: block;" +
282 "float: left;" + 280 "float: left;" +
283 "min-width: 100px;" + 281 "min-width: 100px;" +
284 "white-space: nowrap;" + 282 "white-space: nowrap;" +
285 "overflow: hidden;" + 283 "overflow: hidden;" +
286 "margin-right: 10px;" + 284 "margin-right: 10px;" +
287 "font-size: 10pt;" + 285 "font-size: 10pt;" +
288 "line-height: 18pt;" + 286 "line-height: 18pt;" +
289"}" + 287"}" +
290"div.recordBlock dl dd {" + 288"div.recordBlock dl dd {" +
291 "color: #666666;" + 289 "color: #666666;" +
292 "font-size: 10pt;" + 290 "font-size: 10pt;" +
293 "line-height: 18pt;" + 291 "line-height: 18pt;" +
294"}" + 292"}" +
295"" + 293"" +
296"</style>" + 294"</style>" +
297"" + 295"" +
298"<!--[if IE]>" + 296"<!--[if IE]>" +
299"<style>" + 297"<style>" +
300"div.recordBlock dl dt {" + 298"div.recordBlock dl dt {" +
301 "width: 100px;" + 299 "width: 100px;" +
302"}" + 300"}" +
303"</style>" + 301"</style>" +
304"<![endif]-->" + 302"<![endif]-->" +
305"" + 303"" +
306"</header>" + 304"</header>" +
307"<body>" + 305"<body>" +
308 "<div id=\"logo\">" + this.logo() + 306 "<div id=\"logo\">" + this.logo() +
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>" + 307 "<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>" +
310" </div>" + 308" </div>" +
311"</body>" + 309"</body>" +
312"</html>" 310"</html>"
313 ); 311 );
314 312
315 anEvent.preventDefault(); 313 anEvent.preventDefault();
316 314
317 allRecords = MochiKit.Base.values(this.user().records()); 315 allRecords = MochiKit.Base.values(this.user().records());
318 allRecords.sort(this.compareRecords); 316 allRecords.sort(this.compareRecords);
319 317
320/* 318/*
321 deferredResult = new MochiKit.Async.Deferred(); 319 deferredResult = new MochiKit.Async.Deferred();
322 MochiKit.Iter.forEach(allRecords, MochiKit.Base.partial(function(aDeferredResult, aWindow, aRecord) { 320 MochiKit.Iter.forEach(allRecords, MochiKit.Base.partial(function(aDeferredResult, aWindow, aRecord) {
323 var printerRecord; 321 var printerRecord;
324 322
325 printerRecord = new Clipperz.PM.Components.Printing.Record({record:aRecord}); 323 printerRecord = new Clipperz.PM.Components.Printing.Record({record:aRecord});
326 aDeferredResult.addCallback(MochiKit.Base.method(printerRecord, 'deferredDrawToWindow', aWindow)); 324 aDeferredResult.addCallback(MochiKit.Base.method(printerRecord, 'deferredDrawToWindow', aWindow));
327 }, deferredResult, newWindow)); 325 }, deferredResult, newWindow));
328 deferredResult.callback(); 326 deferredResult.callback();
329 327
330 return deferredResult; 328 return deferredResult;
331 */ 329 */
332 330
333 MochiKit.DOM.withWindow(newWindow, MochiKit.Base.bind(function(someRecords) { 331 MochiKit.DOM.withWindow(newWindow, MochiKit.Base.bind(function(someRecords) {
334 var currentWindow; 332 var currentWindow;
335 vardeferredResult; 333 vardeferredResult;
336 var progressBar; 334 var progressBar;
337 var progressWrapper; 335 var progressWrapper;
338 var i, c; 336 var i, c;
339 337
340 currentWindow = MochiKit.DOM.currentWindow(); 338 currentWindow = MochiKit.DOM.currentWindow();
341 progressBar = MochiKit.DOM.getElement('progress'); 339 progressBar = MochiKit.DOM.getElement('progress');
342 progressWrapper = MochiKit.DOM.getElement('progressWrapper'); 340 progressWrapper = MochiKit.DOM.getElement('progressWrapper');
343 341
344 deferredResult = new MochiKit.Async.Deferred(); 342 deferredResult = new MochiKit.Async.Deferred();
345 c = someRecords.length; 343 c = someRecords.length;
346 for (i=0; i<c; i++) { 344 for (i=0; i<c; i++) {
347 deferredResult.addCallback(function(aWindow, aRecord) { 345 deferredResult.addCallback(function(aWindow, aRecord) {
348 var printerRecord; 346 var printerRecord;
349 347
350 printerRecord = new Clipperz.PM.Components.Printing.Record({record:aRecord}); 348 printerRecord = new Clipperz.PM.Components.Printing.Record({record:aRecord});
351 return printerRecord.deferredDrawToWindow(aWindow); 349 return printerRecord.deferredDrawToWindow(aWindow);
352 }, currentWindow, someRecords[i]) 350 }, currentWindow, someRecords[i])
353 deferredResult.addCallback(MochiKit.Base.bind(function(aProgressBar, aProgress) { 351 deferredResult.addCallback(MochiKit.Base.bind(function(aProgressBar, aProgress) {
354 MochiKit.Style.setElementDimensions(aProgressBar, {w:aProgress * this.progressWidth()}); 352 MochiKit.Style.setElementDimensions(aProgressBar, {w:aProgress * this.progressWidth()});
355 }, this, progressBar, ((i+1)/c))); 353 }, this, progressBar, ((i+1)/c)));
356 deferredResult.addCallback(MochiKit.Async.wait, 0.2); 354 deferredResult.addCallback(MochiKit.Async.wait, 0.2);
357 } 355 }
358 356
359 deferredResult.addCallback(function(aWindow, aProgressWrapper) { 357 deferredResult.addCallback(function(aWindow, aProgressWrapper) {
360 MochiKit.DOM.replaceChildNodes(aProgressWrapper); 358 MochiKit.DOM.replaceChildNodes(aProgressWrapper);
361 MochiKit.Style.hideElement(aProgressWrapper); 359 MochiKit.Style.hideElement(aProgressWrapper);
362 aWindow.stop(); 360 aWindow.stop();
363 }, currentWindow, progressWrapper); 361 }, currentWindow, progressWrapper);
364 362
365 363
366 deferredResult.callback(); 364 deferredResult.callback();
367 }, this, allRecords)); 365 }, this, allRecords));
368 }, 366 },
369 367
370 //------------------------------------------------------------------------- 368 //-------------------------------------------------------------------------
371 369
372 'exportAllData': function(anEvent) { 370 'exportAllData': function(anEvent) {
373 // vardeferredResult; 371 // vardeferredResult;
374 var newWindow; 372 var newWindow;
375 var allRecords; 373 var allRecords;
376 374
377//MochiKit.Logging.logDebug(">>> printAllData"); 375//MochiKit.Logging.logDebug(">>> printAllData");
378 newWindow = window.open("", ""); 376 newWindow = window.open("", "");
379 newWindow.document.write( 377 newWindow.document.write(
380"<html>" + 378"<html>" +
381"<header>" + 379"<header>" +
382 "<title>Clipperz export data</title>" + 380 "<title>Clipperz export data</title>" +
383"<style>" + 381"<style>" +
384"#exportedData {" + 382"#exportedData {" +
385 " width: 600px;"+ 383 " width: 600px;"+
386"}" + 384"}" +
387".ext-mb-progress-wrap {" + 385".ext-mb-progress-wrap {" +
388 "margin-top:4px;" + 386 "margin-top:4px;" +
389 "margin-bottom: 10px;" + 387 "margin-bottom: 10px;" +
390 "border:1px solid #6593cf;" + 388 "border:1px solid #6593cf;" +
391 "width: " + this.progressWidth() + "px;" + 389 "width: " + this.progressWidth() + "px;" +
392"}" + 390"}" +
393".ext-mb-progress {" + 391".ext-mb-progress {" +
394 "height:18px;" + 392 "height:18px;" +
395 "background:transparent url(./images/default/basic-dialog/progress2.gif) repeat-x 1px 1px;" + 393 "background:transparent url(./images/default/basic-dialog/progress2.gif) repeat-x 1px 1px;" +
396"}" + 394"}" +
397".ext-mb-progress-bar {" + 395".ext-mb-progress-bar {" +
398 "height:18px;" + 396 "height:18px;" +
399 "overflow:hidden;" + 397 "overflow:hidden;" +
400 "width:0;" + 398 "width:0;" +
401 "background:#8bb8f3;" + 399 "background:#8bb8f3;" +
402"}" + 400"}" +
403"</style>" + 401"</style>" +
404"" + 402"" +
405"<!--[if IE]>" + 403"<!--[if IE]>" +
406"<style>" + 404"<style>" +
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/LoginPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/LoginPanel.js
index ef2b91c..3081a9d 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Panels/LoginPanel.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Panels/LoginPanel.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } 27if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; }
30 28
31 29
32Clipperz.PM.Components.Panels.LoginPanel = function(anElement, args) { 30Clipperz.PM.Components.Panels.LoginPanel = function(anElement, args) {
33 args = args || {}; 31 args = args || {};
34 32
35 Clipperz.PM.Components.Panels.LoginPanel.superclass.constructor.call(this, anElement, args); 33 Clipperz.PM.Components.Panels.LoginPanel.superclass.constructor.call(this, anElement, args);
36 34
37 this._showLoginFormAnimator = null; 35 this._showLoginFormAnimator = null;
38 this._showRegistrationFormAnimator = null; 36 this._showRegistrationFormAnimator = null;
39 this._shouldShowRegistrationAlert = true; 37 this._shouldShowRegistrationAlert = true;
40 38
41 this._visibleForm = null; 39 this._visibleForm = null;
42 //this._isPassphraseVisible = true; 40 //this._isPassphraseVisible = true;
43 41
44 Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler'); 42 Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler');
45 43
46 this.render(); 44 this.render();
47 45
48 return this; 46 return this;
49} 47}
50 48
51//============================================================================= 49//=============================================================================
52 50
53//MochiKit.Base.update(Clipperz.PM.Components.Panels.LoginPanel.prototype, { 51//MochiKit.Base.update(Clipperz.PM.Components.Panels.LoginPanel.prototype, {
54YAHOO.extendX(Clipperz.PM.Components.Panels.LoginPanel, Clipperz.PM.Components.Panels.BasePanel, { 52YAHOO.extendX(Clipperz.PM.Components.Panels.LoginPanel, Clipperz.PM.Components.Panels.BasePanel, {
55 53
56 'toString': function() { 54 'toString': function() {
57 return "Clipperz.PM.Components.LoginPanel component"; 55 return "Clipperz.PM.Components.LoginPanel component";
58 }, 56 },
59 57
60 //------------------------------------------------------------------------- 58 //-------------------------------------------------------------------------
61 59
62 'render': function() { 60 'render': function() {
63 var result; 61 var result;
64 varlayout; 62 varlayout;
65 var registerButton; 63 var registerButton;
66 64
67 MochiKit.Signal.disconnectAllTo(this); 65 MochiKit.Signal.disconnectAllTo(this);
68 this.element().update(""); 66 this.element().update("");
69 67
70//MochiKit.Logging.logDebug(">>> LoginPanel.initPanel"); 68//MochiKit.Logging.logDebug(">>> LoginPanel.initPanel");
71 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('baseDiv'), cls:'LoginPanel', children:[ 69 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('baseDiv'), cls:'LoginPanel', children:[
72 {tag:'table', children:[ 70 {tag:'table', children:[
73 {tag:'thead'}, 71 {tag:'thead'},
74 {tag:'tbody', children:[ 72 {tag:'tbody', children:[
75 {tag:'tr', children:[ 73 {tag:'tr', children:[
76 {tag:'td', valign:'top', children:[ 74 {tag:'td', valign:'top', children:[
77 {tag:'div', cls:'clipperzServiceDescription', htmlString:Clipperz.PM.Strings['clipperzServiceDescription']} 75 {tag:'div', cls:'clipperzServiceDescription', htmlString:Clipperz.PM.Strings['clipperzServiceDescription']}
78 ]}, 76 ]},
79 {tag:'td', valign:'top', align:'right', children:[ 77 {tag:'td', valign:'top', align:'right', children:[
80{tag:'div', id:this.getId('forms'), cls:'clipperzLoginForm', children:[ 78{tag:'div', id:this.getId('forms'), cls:'clipperzLoginForm', children:[
81 {tag:'div', id:this.getId('loginForm'), cls:'loginForm', children:[ 79 {tag:'div', id:this.getId('loginForm'), cls:'loginForm', children:[
82 {tag:'div', cls:'loginFormHeaderBox', children:[{tag:'h3', htmlString:Clipperz.PM.Strings['loginFormTitle']}]}, 80 {tag:'div', cls:'loginFormHeaderBox', children:[{tag:'h3', htmlString:Clipperz.PM.Strings['loginFormTitle']}]},
83 {tag:'form', id:this.getId('loginForm_form'), autocomplete:'off', children:[ 81 {tag:'form', id:this.getId('loginForm_form'), autocomplete:'off', children:[
84 82
85 {tag:'table', cls:'formLayout', children:[ 83 {tag:'table', cls:'formLayout', children:[
86 {tag:'thead'}, 84 {tag:'thead'},
87 {tag:'tbody', children:[ 85 {tag:'tbody', children:[
88 {tag:'tr', cls:'formFieldTR', children:[ 86 {tag:'tr', cls:'formFieldTR', children:[
89 {tag:'td', width:'90', htmlString:Clipperz.PM.Strings['loginFormUsernameLabel']}, 87 {tag:'td', width:'90', htmlString:Clipperz.PM.Strings['loginFormUsernameLabel']},
90 {tag:'td', children:[ 88 {tag:'td', children:[
91 {tag:'input', id:this.getId('login_username'), cls:'loginFormField', type:'text', name:'username'} 89 {tag:'input', id:this.getId('login_username'), cls:'loginFormField', type:'text', name:'username'}
92 ]} 90 ]}
93 ]}, 91 ]},
94 {tag:'tr', cls:'formFieldTR', children:[ 92 {tag:'tr', cls:'formFieldTR', children:[
95 {tag:'td', htmlString:Clipperz.PM.Strings['loginFormPassphraseLabel']}, 93 {tag:'td', htmlString:Clipperz.PM.Strings['loginFormPassphraseLabel']},
96 {tag:'td', children:[ 94 {tag:'td', children:[
97 {tag:'div', id:this.getId('passphraseDIV'), children:[ 95 {tag:'div', id:this.getId('passphraseDIV'), children:[
98 {tag:'input', id:this.getId('login_passphrase'), cls:'loginFormField', type:'password', name:'passphrase'} 96 {tag:'input', id:this.getId('login_passphrase'), cls:'loginFormField', type:'password', name:'passphrase'}
99 ]}, 97 ]},
100 {tag:'div', cls:'oneTimePassword', id:this.getId('oneTimePasswordDIV'), children:[ 98 {tag:'div', cls:'oneTimePassword', id:this.getId('oneTimePasswordDIV'), children:[
101 {tag:'input', type:'text', id:this.getId('oneTimePassword_1'), name:'passphrase'}, 99 {tag:'input', type:'text', id:this.getId('oneTimePassword_1'), name:'passphrase'},
102 {tag:'span', html:'-'}, 100 {tag:'span', html:'-'},
103 {tag:'input', type:'text', id:this.getId('oneTimePassword_2'), name:'passphrase'}, 101 {tag:'input', type:'text', id:this.getId('oneTimePassword_2'), name:'passphrase'},
104 {tag:'span', html:'-'}, 102 {tag:'span', html:'-'},
105 {tag:'input', type:'text', id:this.getId('oneTimePassword_3'), name:'passphrase'}, 103 {tag:'input', type:'text', id:this.getId('oneTimePassword_3'), name:'passphrase'},
106 {tag:'span', html:'-'}, 104 {tag:'span', html:'-'},
107 {tag:'input', type:'text', id:this.getId('oneTimePassword_4'), name:'passphrase'} 105 {tag:'input', type:'text', id:this.getId('oneTimePassword_4'), name:'passphrase'}
108 ]} 106 ]}
109 ]} 107 ]}
110 ]}, 108 ]},
111 {tag:'tr', cls:'formFieldTR', id:this.getId('passwordTypeChooserTR'), children:[ 109 {tag:'tr', cls:'formFieldTR', id:this.getId('passwordTypeChooserTR'), children:[
112 {tag:'td', valign:'top', align:'right', children:[ 110 {tag:'td', valign:'top', align:'right', children:[
113 {tag:'input', type:'checkbox', cls:'passwordTypeCheckbox', id:this.getId('useOneTimePasswordCheckbox')} 111 {tag:'input', type:'checkbox', cls:'passwordTypeCheckbox', id:this.getId('useOneTimePasswordCheckbox')}
114 ]}, 112 ]},
115 {tag:'td', children:[ 113 {tag:'td', children:[
116 {tag:'div', cls:'passwordTypeChooser', children:[ 114 {tag:'div', cls:'passwordTypeChooser', children:[
117 {tag:'h4', htmlString:Clipperz.PM.Strings['loginFormOneTimePasswordCheckboxLabel']}, 115 {tag:'h4', htmlString:Clipperz.PM.Strings['loginFormOneTimePasswordCheckboxLabel']},
118 {tag:'span', htmlString:Clipperz.PM.Strings['loginFormOneTimePasswordCheckboxDescription']} 116 {tag:'span', htmlString:Clipperz.PM.Strings['loginFormOneTimePasswordCheckboxDescription']}
119 ]} 117 ]}
120 ]} 118 ]}
121 ]}, 119 ]},
122 {tag:'tr', children:[ 120 {tag:'tr', children:[
123 {tag:'td'}, 121 {tag:'td'},
124 {tag:'td', children:[ 122 {tag:'td', children:[
125 {tag:'div', id:this.getId('login_submit')} 123 {tag:'div', id:this.getId('login_submit')}
126 ]} 124 ]}
127 ]} 125 ]}
128 ]}, 126 ]},
129 {tag:'tfoot'} 127 {tag:'tfoot'}
130 ]} 128 ]}
131 ]}, 129 ]},
132 130
133 {tag:'div', cls:'loginFormFooterBox', children:[ 131 {tag:'div', cls:'loginFormFooterBox', children:[
134 {tag:'ul', children:[ 132 {tag:'ul', children:[
135 {tag:'li', id:this.getId('showRegistrationLI'), children:[ 133 {tag:'li', id:this.getId('showRegistrationLI'), children:[
136 {tag:'span', htmlString:Clipperz.PM.Strings['loginFormDontHaveAnAccountLabel']}, 134 {tag:'span', htmlString:Clipperz.PM.Strings['loginFormDontHaveAnAccountLabel']},
137 {tag:'a', href:'.', id:this.getId('showRegistration'), cls:'clipperzActionLink', htmlString:Clipperz.PM.Strings['loginFormCreateOneLabel']} 135 {tag:'a', href:'.', id:this.getId('showRegistration'), cls:'clipperzActionLink', htmlString:Clipperz.PM.Strings['loginFormCreateOneLabel']}
138 ]}, 136 ]},
139 {tag:'li', children:[ 137 {tag:'li', children:[
140 {tag:'span', htmlString:Clipperz.PM.Strings['loginFormForgotYourCredentialsLabel']}, 138 {tag:'span', htmlString:Clipperz.PM.Strings['loginFormForgotYourCredentialsLabel']},
141 {tag:'a', href:Clipperz.PM.Strings['loginFormAarghThatsBadUrl'], target:'Clipperz_Help', htmlString:Clipperz.PM.Strings['loginFormAarghThatsBadLabel']} 139 {tag:'a', href:Clipperz.PM.Strings['loginFormAarghThatsBadUrl'], target:'Clipperz_Help', htmlString:Clipperz.PM.Strings['loginFormAarghThatsBadLabel']}
142 ]}, 140 ]},
143 {tag:'li', children:[ 141 {tag:'li', children:[
144 {tag:'span', htmlString:Clipperz.PM.Strings['loginFormAfraidOfMaliciousScriptsLabel']}, 142 {tag:'span', htmlString:Clipperz.PM.Strings['loginFormAfraidOfMaliciousScriptsLabel']},
145 {tag:'a', href:Clipperz.PM.Strings['loginFormVerifyTheCodeUrl'], target:'Clipperz_Help', htmlString:Clipperz.PM.Strings['loginFormVerifyTheCodeLabel']} 143 {tag:'a', href:Clipperz.PM.Strings['loginFormVerifyTheCodeUrl'], target:'Clipperz_Help', htmlString:Clipperz.PM.Strings['loginFormVerifyTheCodeLabel']}
146 ]} 144 ]}
147 ]} 145 ]}
148 ]} 146 ]}
149 ]}, 147 ]},
150 148
151 149
152 150
153 {tag:'div', id:this.getId('registrationForm'), cls:'registrationForm', children:[ 151 {tag:'div', id:this.getId('registrationForm'), cls:'registrationForm', children:[
154 {tag:'div', cls:'loginFormHeaderBox', children:[{tag:'h3', htmlString:Clipperz.PM.Strings['registrationFormTitle']}]}, 152 {tag:'div', cls:'loginFormHeaderBox', children:[{tag:'h3', htmlString:Clipperz.PM.Strings['registrationFormTitle']}]},
155 {tag:'form', id:this.getId('registrationForm_form'), children:[ 153 {tag:'form', id:this.getId('registrationForm_form'), children:[
156 {tag:'h5', cls:'errorMessage', id:this.getId('registration_errorMessage')}, 154 {tag:'h5', cls:'errorMessage', id:this.getId('registration_errorMessage')},
157 {tag:'table', cls:'formLayout', children:[ 155 {tag:'table', cls:'formLayout', children:[
158 {tag:'thead'}, 156 {tag:'thead'},
159 {tag:'tbody', children:[ 157 {tag:'tbody', children:[
160 {tag:'tr', cls:'formFieldTR', children:[ 158 {tag:'tr', cls:'formFieldTR', children:[
161 {tag:'td', width:'90', htmlString:Clipperz.PM.Strings['registrationFormUsernameLabel']}, 159 {tag:'td', width:'90', htmlString:Clipperz.PM.Strings['registrationFormUsernameLabel']},
162 {tag:'td', children:[ 160 {tag:'td', children:[
163 {tag:'input', id:this.getId('registration_username'), cls:'loginFormField', type:'text', name:'username'} 161 {tag:'input', id:this.getId('registration_username'), cls:'loginFormField', type:'text', name:'username'}
164 ]} 162 ]}
165 ]}, 163 ]},
166 {tag:'tr', cls:'formFieldTR', children:[ 164 {tag:'tr', cls:'formFieldTR', children:[
167 {tag:'td', htmlString:Clipperz.PM.Strings['registrationFormPassphraseLabel']}, 165 {tag:'td', htmlString:Clipperz.PM.Strings['registrationFormPassphraseLabel']},
168 {tag:'td', children:[ 166 {tag:'td', children:[
169 {tag:'input', id:this.getId('registration_passphrase'), cls:'loginFormField', type:'password', name:'passphrase'} 167 {tag:'input', id:this.getId('registration_passphrase'), cls:'loginFormField', type:'password', name:'passphrase'}
170 ]} 168 ]}
171 ]}, 169 ]},
172 {tag:'tr', cls:'formFieldTR', children:[ 170 {tag:'tr', cls:'formFieldTR', children:[
173 {tag:'td', htmlString:Clipperz.PM.Strings['registrationFormRetypePassphraseLabel']}, 171 {tag:'td', htmlString:Clipperz.PM.Strings['registrationFormRetypePassphraseLabel']},
174 {tag:'td', children:[ 172 {tag:'td', children:[
175 {tag:'input', id:this.getId('registration_repassphrase'), cls:'loginFormField', type:'password', name:'repeat-passphrase'} 173 {tag:'input', id:this.getId('registration_repassphrase'), cls:'loginFormField', type:'password', name:'repeat-passphrase'}
176 ]} 174 ]}
177 ]}, 175 ]},
178 {tag:'tr', cls:'formFieldTR', children:[ 176 {tag:'tr', cls:'formFieldTR', children:[
179 {tag:'td', align:'right', valign:'top', children:[ 177 {tag:'td', align:'right', valign:'top', children:[
180 {tag:'input', id:this.getId('registration_check'), type:'checkbox', name:'safetyCheck'} 178 {tag:'input', id:this.getId('registration_check'), type:'checkbox', name:'safetyCheck'}
181 ]}, 179 ]},
182 {tag:'td', children:[ 180 {tag:'td', children:[
183 {tag:'span', htmlString:Clipperz.PM.Strings['registrationFormSafetyCheckLabel']} 181 {tag:'span', htmlString:Clipperz.PM.Strings['registrationFormSafetyCheckLabel']}
184 ]} 182 ]}
185 ]}, 183 ]},
186 {tag:'tr', cls:'formFieldTR', children:[ 184 {tag:'tr', cls:'formFieldTR', children:[
187 {tag:'td', align:'right', valign:'top', children:[ 185 {tag:'td', align:'right', valign:'top', children:[
188 {tag:'input', id:this.getId('registration_termsOfServiceCheck'), type:'checkbox', name:'termsOfServiceCheck'} 186 {tag:'input', id:this.getId('registration_termsOfServiceCheck'), type:'checkbox', name:'termsOfServiceCheck'}
189 ]}, 187 ]},
190 {tag:'td', children:[ 188 {tag:'td', children:[
191 {tag:'span', htmlString:Clipperz.PM.Strings['registrationFormTermsOfServiceCheckLabel']} 189 {tag:'span', htmlString:Clipperz.PM.Strings['registrationFormTermsOfServiceCheckLabel']}
192 ]} 190 ]}
193 ]}, 191 ]},
194 // {tag:'tr', cls:'formFieldTR', children:[ 192 // {tag:'tr', cls:'formFieldTR', children:[
195 // {tag:'td', htmlString:Clipperz.PM.Strings['registrationFormInvitationCodeLabel']}, 193 // {tag:'td', htmlString:Clipperz.PM.Strings['registrationFormInvitationCodeLabel']},
196 // {tag:'td', children:[ 194 // {tag:'td', children:[
197 // {tag:'input', id:this.getId('registration_invitationCode'), type:'text', size:'30', name:'invitationCode'} 195 // {tag:'input', id:this.getId('registration_invitationCode'), type:'text', size:'30', name:'invitationCode'}
198 // ]} 196 // ]}
199 // ]}, 197 // ]},
200 {tag:'tr', children:[ 198 {tag:'tr', children:[
201 {tag:'td'}, 199 {tag:'td'},
202 {tag:'td', children:[ 200 {tag:'td', children:[
203 {tag:'div', id:this.getId('registration_submit')} 201 {tag:'div', id:this.getId('registration_submit')}
204 ]} 202 ]}
205 ]} 203 ]}
206 ]}, 204 ]},
207 {tag:'tfoot'} 205 {tag:'tfoot'}
208 ]} 206 ]}
209 ]}, 207 ]},
210 {tag:'div', cls:'loginFormFooterBox', children:[ 208 {tag:'div', cls:'loginFormFooterBox', children:[
211 {tag:'ul', children:[ 209 {tag:'ul', children:[
212 {tag:'li', children:[ 210 {tag:'li', children:[
213 {tag:'span', htmlString:Clipperz.PM.Strings['registrationFormDoYouAlreadyHaveAnAccountLabel']}, 211 {tag:'span', htmlString:Clipperz.PM.Strings['registrationFormDoYouAlreadyHaveAnAccountLabel']},
214 {tag:'a', href:'.', id:this.getId('showLogin'), cls:'clipperzActionLink', htmlString:Clipperz.PM.Strings['registrationFormSimplyLoginLabel']} 212 {tag:'a', href:'.', id:this.getId('showLogin'), cls:'clipperzActionLink', htmlString:Clipperz.PM.Strings['registrationFormSimplyLoginLabel']}
215 ]} 213 ]}
216 ]} 214 ]}
217 ]} 215 ]}
218 ]} 216 ]}
219]}, 217]},
220 {tag:'div', cls:'loginPanelSwitchLanguageBox', children:[ 218 {tag:'div', cls:'loginPanelSwitchLanguageBox', children:[
221 {tag:'div', cls:'loginPanelSwitchLanguageDescription', htmlString:Clipperz.PM.Strings['loginPanelSwithLanguageDescription']}, 219 {tag:'div', cls:'loginPanelSwitchLanguageDescription', htmlString:Clipperz.PM.Strings['loginPanelSwithLanguageDescription']},
222 {tag:'div', cls:'loginPanelSwitchLanguageSelect', children:[ 220 {tag:'div', cls:'loginPanelSwitchLanguageSelect', children:[
223 {tag:'select', id:this.getId('languageSelector'), children:Clipperz.PM.Strings['loginPanelSwitchLanguageSelectOptions']} 221 {tag:'select', id:this.getId('languageSelector'), children:Clipperz.PM.Strings['loginPanelSwitchLanguageSelectOptions']}
224 ]} 222 ]}
225 ]}, 223 ]},
226 {tag:'div', cls:'browserCompatibilityBox', htmlString:Clipperz.PM.Strings['browserCompatibilityDescription']} 224 {tag:'div', cls:'browserCompatibilityBox', htmlString:Clipperz.PM.Strings['browserCompatibilityDescription']}
227 ]} 225 ]}
228 ]} 226 ]}
229 ]} 227 ]}
230 ]} 228 ]}
231 ]}); 229 ]});
232 230
233 MochiKit.Signal.connect(this.getId('loginForm_form'), 'onsubmit', function(e){e.stop();}); 231 MochiKit.Signal.connect(this.getId('loginForm_form'), 'onsubmit', function(e){e.stop();});
234 MochiKit.Signal.connect(this.getId('registrationForm_form'), 'onsubmit', function(e){e.stop();}); 232 MochiKit.Signal.connect(this.getId('registrationForm_form'), 'onsubmit', function(e){e.stop();});
235 233
236 MochiKit.Signal.connect(this.getId('showRegistration'), 'onclick', this, 'showRegistrationFormEventHandler'); 234 MochiKit.Signal.connect(this.getId('showRegistration'), 'onclick', this, 'showRegistrationFormEventHandler');
237 MochiKit.Signal.connect(this.getId('showLogin'), 'onclick', this, 'showLoginFormEventHandler'); 235 MochiKit.Signal.connect(this.getId('showLogin'), 'onclick', this, 'showLoginFormEventHandler');
238 236
239 new YAHOO.ext.Button(this.getId('login_submit'), {text:Clipperz.PM.Strings['loginFormButtonLabel'], handler:this.doLogin, scope:this, minWidth:0}); 237 new YAHOO.ext.Button(this.getId('login_submit'), {text:Clipperz.PM.Strings['loginFormButtonLabel'], handler:this.doLogin, 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}) 238 registerButton = new YAHOO.ext.Button(this.getId('registration_submit'), {text:Clipperz.PM.Strings['registrationFormButtonLabel'], handler:this.doRegister, scope:this, minWidth:0})
241 239
242 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { 240 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) {
243 // this.getElement('showRegistrationLI').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 241 // this.getElement('showRegistrationLI').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
244 this.getElement('registrationForm_form').addClass('read-only'); 242 this.getElement('registrationForm_form').addClass('read-only');
245 registerButton.disable(); 243 registerButton.disable();
246 this.getElement('passwordTypeChooserTR').addClass('read-only'); 244 this.getElement('passwordTypeChooserTR').addClass('read-only');
247 this.getDom('useOneTimePasswordCheckbox').disabled = true; 245 this.getDom('useOneTimePasswordCheckbox').disabled = true;
248 } 246 }
249 247
250 MochiKit.Signal.connect(this.getId('loginForm'), 'onkeydown', this, 'onkeydown'); 248 MochiKit.Signal.connect(this.getId('loginForm'), 'onkeydown', this, 'onkeydown');
251 MochiKit.Signal.connect(this.getId('registrationForm'), 'onkeydown', this, 'onkeydown'); 249 MochiKit.Signal.connect(this.getId('registrationForm'), 'onkeydown', this, 'onkeydown');
252 // MochiKit.Signal.connect(this.getId('useOneTimePasswordCheckbox'), 'onchange', this, 'renderPasswordField'); 250 // MochiKit.Signal.connect(this.getId('useOneTimePasswordCheckbox'), 'onchange', this, 'renderPasswordField');
253 MochiKit.Signal.connect(this.getId('useOneTimePasswordCheckbox'), 'onclick', this, 'renderPasswordField'); 251 MochiKit.Signal.connect(this.getId('useOneTimePasswordCheckbox'), 'onclick', this, 'renderPasswordField');
254 this.renderPasswordField(); 252 this.renderPasswordField();
255 253
256 this.selectSelectedLanguageOption(); 254 this.selectSelectedLanguageOption();
257 MochiKit.Signal.connect(this.getId('languageSelector'), 'onchange', this, 'switchLanguage'); 255 MochiKit.Signal.connect(this.getId('languageSelector'), 'onchange', this, 'switchLanguage');
258 256
259 MochiKit.Signal.connect(this.getId('oneTimePassword_1'), 'onkeypress', this, 'handleOneTimePasswordFieldKeyPress'); 257 MochiKit.Signal.connect(this.getId('oneTimePassword_1'), 'onkeypress', this, 'handleOneTimePasswordFieldKeyPress');
260 MochiKit.Signal.connect(this.getId('oneTimePassword_2'), 'onkeypress', this, 'handleOneTimePasswordFieldKeyPress'); 258 MochiKit.Signal.connect(this.getId('oneTimePassword_2'), 'onkeypress', this, 'handleOneTimePasswordFieldKeyPress');
261 MochiKit.Signal.connect(this.getId('oneTimePassword_3'), 'onkeypress', this, 'handleOneTimePasswordFieldKeyPress'); 259 MochiKit.Signal.connect(this.getId('oneTimePassword_3'), 'onkeypress', this, 'handleOneTimePasswordFieldKeyPress');
262 MochiKit.Signal.connect(this.getId('oneTimePassword_4'), 'onkeypress', this, 'handleOneTimePasswordFieldKeyPress'); 260 MochiKit.Signal.connect(this.getId('oneTimePassword_4'), 'onkeypress', this, 'handleOneTimePasswordFieldKeyPress');
263 261
264 MochiKit.Signal.connect(this.getId('oneTimePassword_1'), 'onkeyup', this, 'handleOneTimePasswordFieldKeyUp'); 262 MochiKit.Signal.connect(this.getId('oneTimePassword_1'), 'onkeyup', this, 'handleOneTimePasswordFieldKeyUp');
265 MochiKit.Signal.connect(this.getId('oneTimePassword_2'), 'onkeyup', this, 'handleOneTimePasswordFieldKeyUp'); 263 MochiKit.Signal.connect(this.getId('oneTimePassword_2'), 'onkeyup', this, 'handleOneTimePasswordFieldKeyUp');
266 MochiKit.Signal.connect(this.getId('oneTimePassword_3'), 'onkeyup', this, 'handleOneTimePasswordFieldKeyUp'); 264 MochiKit.Signal.connect(this.getId('oneTimePassword_3'), 'onkeyup', this, 'handleOneTimePasswordFieldKeyUp');
267 MochiKit.Signal.connect(this.getId('oneTimePassword_4'), 'onkeyup', this, 'handleOneTimePasswordFieldKeyUp'); 265 MochiKit.Signal.connect(this.getId('oneTimePassword_4'), 'onkeyup', this, 'handleOneTimePasswordFieldKeyUp');
268 266
269 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('login_passphrase')); 267 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('login_passphrase'));
270 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('registration_passphrase')); 268 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('registration_passphrase'));
271//MochiKit.Logging.logDebug("<<< LoginPanel.initPanel"); 269//MochiKit.Logging.logDebug("<<< LoginPanel.initPanel");
272 270
273 return result; 271 return result;
274 }, 272 },
275 273
276 //------------------------------------------------------------------------- 274 //-------------------------------------------------------------------------
277 275
278 'renderPasswordField': function() { 276 'renderPasswordField': function() {
279 if (this.getDom('useOneTimePasswordCheckbox').checked == false) { 277 if (this.getDom('useOneTimePasswordCheckbox').checked == false) {
280 this.getElement('oneTimePasswordDIV').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(false); 278 this.getElement('oneTimePasswordDIV').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(false);
281 this.getElement('passphraseDIV').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show(false); 279 this.getElement('passphraseDIV').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show(false);
282 this.getElement('login_passphrase').focus(); 280 this.getElement('login_passphrase').focus();
283 } else { 281 } else {
284 this.getElement('passphraseDIV').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 282 this.getElement('passphraseDIV').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
285 this.getElement('oneTimePasswordDIV').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show(); 283 this.getElement('oneTimePasswordDIV').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show();
286 this.getElement('oneTimePassword_1').focus(); 284 this.getElement('oneTimePassword_1').focus();
287 } 285 }
288 286
289 }, 287 },
290 288
291 //......................................................................... 289 //.........................................................................
292 290
293 'handleOneTimePasswordFieldKeyPress': function(anEvent) { 291 'handleOneTimePasswordFieldKeyPress': function(anEvent) {
294 if (anEvent.key().string == '-') { 292 if (anEvent.key().string == '-') {
295 switch (anEvent.src().id) { 293 switch (anEvent.src().id) {
296 case this.getId('oneTimePassword_1'): 294 case this.getId('oneTimePassword_1'):
297 this.getElement('oneTimePassword_2').focus(); 295 this.getElement('oneTimePassword_2').focus();
298 break; 296 break;
299 case this.getId('oneTimePassword_2'): 297 case this.getId('oneTimePassword_2'):
300 this.getElement('oneTimePassword_3').focus(); 298 this.getElement('oneTimePassword_3').focus();
301 break; 299 break;
302 case this.getId('oneTimePassword_3'): 300 case this.getId('oneTimePassword_3'):
303 this.getElement('oneTimePassword_4').focus(); 301 this.getElement('oneTimePassword_4').focus();
304 break; 302 break;
305 } 303 }
306 304
307 anEvent.stop(); 305 anEvent.stop();
308 } 306 }
309 }, 307 },
310 308
311/* 309/*
312 var ctrl = document.getElementById("txtTargetText"); 310 var ctrl = document.getElementById("txtTargetText");
313 var saveText = ctrl.value; 311 var saveText = ctrl.value;
314 ctrl.focus(); 312 ctrl.focus();
315 313
316 var range = document.selection.createRange(); 314 var range = document.selection.createRange();
317 var specialchar = String.fromCharCode(1); 315 var specialchar = String.fromCharCode(1);
318 range.text = specialchar; 316 range.text = specialchar;
319 var pos = ctrl.value.indexOf(specialchar); 317 var pos = ctrl.value.indexOf(specialchar);
320 ctrl.value = saveText; 318 ctrl.value = saveText;
321 range = ctrl.createTextRange(); 319 range = ctrl.createTextRange();
322 range.move('character', pos); 320 range.move('character', pos);
323 range.select(); 321 range.select();
324 range.text = 322 range.text =
325 document.getElementById("txtSourceText").value; 323 document.getElementById("txtSourceText").value;
326 document.getElementById("txtTargetText").focus(); 324 document.getElementById("txtTargetText").focus();
327 window.event.returnValue = false; 325 window.event.returnValue = false;
328*/ 326*/
329 327
330 'handleOneTimePasswordFieldKeyUp': function(anEvent) { 328 'handleOneTimePasswordFieldKeyUp': function(anEvent) {
331 varfield; 329 varfield;
332 varfieldValue; 330 varfieldValue;
333 var key; 331 var key;
334 332
335//console.log("keyUp", anEvent); 333//console.log("keyUp", anEvent);
336 field = anEvent.src(); 334 field = anEvent.src();
337 fieldValue = field.value; 335 fieldValue = field.value;
338 key = anEvent.key(); 336 key = anEvent.key();
339 337
340 // &&(key.string != 'KEY_TAB') 338 // &&(key.string != 'KEY_TAB')
341 // &&(key.string != 'KEY_SHIFT') 339 // &&(key.string != 'KEY_SHIFT')
342 // &&(key.string != 'KEY_BACKSPACE') 340 // &&(key.string != 'KEY_BACKSPACE')
343 // &&(key.string != 'KEY_DELETE') 341 // &&(key.string != 'KEY_DELETE')
344 // &&(key.string.indexOf('KEY_ARROW') != 0) 342 // &&(key.string.indexOf('KEY_ARROW') != 0)
345 343
346 344
347 if ((fieldValue.replace(/\s/g, '').length == 8) && (key.string == 'KEY_SPACEBAR')) { 345 if ((fieldValue.replace(/\s/g, '').length == 8) && (key.string == 'KEY_SPACEBAR')) {
348 // field.value = Clipperz.Base.trim(fieldValue).replace(/.{4}/g, '$&' + ' '); 346 // field.value = Clipperz.Base.trim(fieldValue).replace(/.{4}/g, '$&' + ' ');
349 347
350 switch (field.id) { 348 switch (field.id) {
351 case this.getId('oneTimePassword_1'): 349 case this.getId('oneTimePassword_1'):
352 this.getElement('oneTimePassword_2').focus(); 350 this.getElement('oneTimePassword_2').focus();
353 break; 351 break;
354 case this.getId('oneTimePassword_2'): 352 case this.getId('oneTimePassword_2'):
355 this.getElement('oneTimePassword_3').focus(); 353 this.getElement('oneTimePassword_3').focus();
356 break; 354 break;
357 case this.getId('oneTimePassword_3'): 355 case this.getId('oneTimePassword_3'):
358 this.getElement('oneTimePassword_4').focus(); 356 this.getElement('oneTimePassword_4').focus();
359 break; 357 break;
360 } 358 }
361 // } else if (fieldValue.replace(/\s/g, '').length > 8) { 359 // } else if (fieldValue.replace(/\s/g, '').length > 8) {
362 } 360 }
363 361
364//MochiKit.Logging.logDebug("-- fieldValue: " + fieldValue); 362//MochiKit.Logging.logDebug("-- fieldValue: " + fieldValue);
365 }, 363 },
366 364
367 //......................................................................... 365 //.........................................................................
368 366
369 'doLogin': function() { 367 'doLogin': function() {
370//MochiKit.Logging.logDebug(">>> LoginPanel.doLogin"); 368//MochiKit.Logging.logDebug(">>> LoginPanel.doLogin");
371 if (this.checkLoginForm()) { 369 if (this.checkLoginForm()) {
372 if (this.getDom('useOneTimePasswordCheckbox').checked == false) { 370 if (this.getDom('useOneTimePasswordCheckbox').checked == false) {
373 this.doLoginWithUsernameAndPassphrase(this.getDom('login_username').value, this.getDom('login_passphrase').value); 371 this.doLoginWithUsernameAndPassphrase(this.getDom('login_username').value, this.getDom('login_passphrase').value);
374 } else { 372 } else {
375 varoneTimePasswordValue; 373 varoneTimePasswordValue;
376 374
377 oneTimePasswordValue = this.getDom('oneTimePassword_1').value + this.getDom('oneTimePassword_2').value + this.getDom('oneTimePassword_3').value + this.getDom('oneTimePassword_4').value; 375 oneTimePasswordValue = this.getDom('oneTimePassword_1').value + this.getDom('oneTimePassword_2').value + this.getDom('oneTimePassword_3').value + this.getDom('oneTimePassword_4').value;
378 this.doLoginWithUsernameAndOneTimePassword(this.getDom('login_username').value, oneTimePasswordValue); 376 this.doLoginWithUsernameAndOneTimePassword(this.getDom('login_username').value, oneTimePasswordValue);
379 } 377 }
380 } 378 }
381//MochiKit.Logging.logDebug("<<< LoginPanel.doLogin"); 379//MochiKit.Logging.logDebug("<<< LoginPanel.doLogin");
382 }, 380 },
383 381
384 //......................................................................... 382 //.........................................................................
385 383
386 'doLoginWithUsernameAndPassphrase': function(anUsername, aPassphrase) { 384 'doLoginWithUsernameAndPassphrase': function(anUsername, aPassphrase) {
387 var deferredResult; 385 var deferredResult;
388 var user; 386 var user;
389 var loginPanel; 387 var loginPanel;
390 388
391//MochiKit.Logging.logDebug(">>> LoginPanel.doLoginWithUsernameAndPassphrase"); 389//MochiKit.Logging.logDebug(">>> LoginPanel.doLoginWithUsernameAndPassphrase");
392 user = new Clipperz.PM.DataModel.User({username:anUsername, passphrase:aPassphrase}); 390 user = new Clipperz.PM.DataModel.User({username:anUsername, passphrase:aPassphrase});
393 loginPanel = this; 391 loginPanel = this;
394 392
395 deferredResult = new MochiKit.Async.Deferred(); 393 deferredResult = new MochiKit.Async.Deferred();
396//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("0 - LoginPanel.doLogin - 0: "/* + res*/); return res;}); 394//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("0 - LoginPanel.doLogin - 0: "/* + res*/); return res;});
397//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 395//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
398 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Components.MessageBox(), 'deferredShow'), 396 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Components.MessageBox(), 'deferredShow'),
399 { 397 {
400 title: "", 398 title: "",
401 text: "", 399 text: "",
402 width:240, 400 width:240,
403 showProgressBar:true, 401 showProgressBar:true,
404 showCloseButton:false, 402 showCloseButton:false,
405 fn:MochiKit.Base.method(deferredResult, 'cancel'), 403 fn:MochiKit.Base.method(deferredResult, 'cancel'),
406 scope:this 404 scope:this
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/LogoutPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/LogoutPanel.js
index b8cc556..17ed8e4 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Panels/LogoutPanel.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Panels/LogoutPanel.js
@@ -1,70 +1,68 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } 27if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.Panels.LogoutPanel = function(args) { 31Clipperz.PM.Components.Panels.LogoutPanel = function(args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.Panels.LogoutPanel.superclass.constructor.call(this, args); 34 Clipperz.PM.Components.Panels.LogoutPanel.superclass.constructor.call(this, args);
37 35
38 return this; 36 return this;
39} 37}
40 38
41//============================================================================= 39//=============================================================================
42 40
43YAHOO.extendX(Clipperz.PM.Components.Panels.LogoutPanel, Clipperz.PM.Components.Panels.BasePanel, { 41YAHOO.extendX(Clipperz.PM.Components.Panels.LogoutPanel, Clipperz.PM.Components.Panels.BasePanel, {
44 42
45 'toString': function() { 43 'toString': function() {
46 return "Clipperz.PM.Components.LogoutPanel component"; 44 return "Clipperz.PM.Components.LogoutPanel component";
47 }, 45 },
48 46
49 //------------------------------------------------------------------------- 47 //-------------------------------------------------------------------------
50 48
51 'initPanel': function() { 49 'initPanel': function() {
52 var result; 50 var result;
53 varlayout; 51 varlayout;
54 52
55 result = new YAHOO.ext.ContentPanel(this.getId('panel'), {title:'logout', closable:false, autoCreate:true}); 53 result = new YAHOO.ext.ContentPanel(this.getId('panel'), {title:'logout', closable:false, autoCreate:true});
56 54
57 Clipperz.YUI.DomHelper.append(result.getEl().dom, 55 Clipperz.YUI.DomHelper.append(result.getEl().dom,
58 {tag:'div', children:[ 56 {tag:'div', children:[
59 {tag:'h2', html:'Logout panel'} 57 {tag:'h2', html:'Logout panel'}
60 ]} 58 ]}
61 ); 59 );
62 60
63 return result; 61 return result;
64 }, 62 },
65 63
66 //------------------------------------------------------------------------- 64 //-------------------------------------------------------------------------
67 __syntaxFix__: "syntax fix" 65 __syntaxFix__: "syntax fix"
68 66
69}); 67});
70 68
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js
index 29ef516..c19a8a3 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } 27if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.Panels.MainPanel = function(anElement, args) { 31Clipperz.PM.Components.Panels.MainPanel = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.Panels.MainPanel.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.Panels.MainPanel.superclass.constructor.call(this, anElement, args);
37 35
38 this._recordListDataModel = null; 36 this._recordListDataModel = null;
39 this._selectedRecord = null; 37 this._selectedRecord = null;
40 this._recordDetailComponent = null; 38 this._recordDetailComponent = null;
41 this._recordListGrid = null; 39 this._recordListGrid = null;
42 40
43 this._directLinkItemTemplate = null; 41 this._directLinkItemTemplate = null;
44 this._recordItemTemplate = null; 42 this._recordItemTemplate = null;
45 43
46 this._addNewRecordButton = null; 44 this._addNewRecordButton = null;
47 this._deleteRecordButton = null; 45 this._deleteRecordButton = null;
48 46
49 this._creationWizard = null; 47 this._creationWizard = null;
50 48
51 Clipperz.NotificationCenter.register(null, 'selectAndEnterEditMode', this, 'selectRecordAndEnterEditModeHandler'); 49 Clipperz.NotificationCenter.register(null, 'selectAndEnterEditMode', this, 'selectRecordAndEnterEditModeHandler');
52 50
53 Clipperz.NotificationCenter.register(null, 'recordAdded', this, 'recordAddedHandler'); 51 Clipperz.NotificationCenter.register(null, 'recordAdded', this, 'recordAddedHandler');
54 Clipperz.NotificationCenter.register(null, 'recordUpdated', this, 'recordUpdatedHandler'); 52 Clipperz.NotificationCenter.register(null, 'recordUpdated', this, 'recordUpdatedHandler');
55 Clipperz.NotificationCenter.register(null, 'recordRemoved', this, 'recordRemovedHandler'); 53 Clipperz.NotificationCenter.register(null, 'recordRemoved', this, 'recordRemovedHandler');
56 54
57 Clipperz.NotificationCenter.register(null, 'directLoginAdded', this, 'directLoginAddedHandler'); 55 Clipperz.NotificationCenter.register(null, 'directLoginAdded', this, 'directLoginAddedHandler');
58 Clipperz.NotificationCenter.register(null, 'directLoginUpdated', this, 'directLoginUpdatedHandler'); 56 Clipperz.NotificationCenter.register(null, 'directLoginUpdated', this, 'directLoginUpdatedHandler');
59 Clipperz.NotificationCenter.register(null, 'directLoginRemoved', this, 'directLoginRemovedHandler'); 57 Clipperz.NotificationCenter.register(null, 'directLoginRemoved', this, 'directLoginRemovedHandler');
60 58
61 Clipperz.NotificationCenter.register(null, 'accountLocked', this, 'accountLockedHandler'); 59 Clipperz.NotificationCenter.register(null, 'accountLocked', this, 'accountLockedHandler');
62 60
63 MochiKit.Signal.connect(MochiKit.DOM.currentWindow(), 'onresize', this, 'resizeModalMask'); 61 MochiKit.Signal.connect(MochiKit.DOM.currentWindow(), 'onresize', this, 'resizeModalMask');
64 this.render(); 62 this.render();
65 63
66 return this; 64 return this;
67} 65}
68 66
69//============================================================================= 67//=============================================================================
70 68
71YAHOO.extendX(Clipperz.PM.Components.Panels.MainPanel, Clipperz.PM.Components.Panels.BasePanel, { 69YAHOO.extendX(Clipperz.PM.Components.Panels.MainPanel, Clipperz.PM.Components.Panels.BasePanel, {
72 70
73 'toString': function() { 71 'toString': function() {
74 return "Clipperz.PM.Components.Panels.MainPanel component"; 72 return "Clipperz.PM.Components.Panels.MainPanel component";
75 }, 73 },
76 74
77 //------------------------------------------------------------------------- 75 //-------------------------------------------------------------------------
78 76
79 'render': function() { 77 'render': function() {
80 this.element().update(""); 78 this.element().update("");
81 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', id:'mainPanelTABLE', border:'0', cellspacing:'0', cellpadding:'0', children:[ 79 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', id:'mainPanelTABLE', border:'0', cellspacing:'0', cellpadding:'0', children:[
82 {tag:'tbody', children:[ 80 {tag:'tbody', children:[
83 {tag:'tr', children:[ 81 {tag:'tr', children:[
84 {tag:'td', width:'15', children:[ 82 {tag:'td', width:'15', children:[
85 {tag:'div', cls:'mainPanelMinHeightDiv'} 83 {tag:'div', cls:'mainPanelMinHeightDiv'}
86 ]}, 84 ]},
87 {tag:'td', valign:'top', id:'directLoginsTD', width:'200', children:[ 85 {tag:'td', valign:'top', id:'directLoginsTD', width:'200', children:[
88 {tag:'div', id:'directLoginsBlock', children:[ 86 {tag:'div', id:'directLoginsBlock', children:[
89 {tag:'div', cls:'directLoginsBlockHeaderBox', children:[{tag:'h3', id:'directLoginTitle', htmlString:Clipperz.PM.Strings['mainPanelDirectLoginBlockLabel']}]}, 87 {tag:'div', cls:'directLoginsBlockHeaderBox', children:[{tag:'h3', id:'directLoginTitle', htmlString:Clipperz.PM.Strings['mainPanelDirectLoginBlockLabel']}]},
90 {tag:'div', id:'directLoginsDescription', htmlString:Clipperz.PM.Strings['mainPanelDirectLoginBlockDescription']}, 88 {tag:'div', id:'directLoginsDescription', htmlString:Clipperz.PM.Strings['mainPanelDirectLoginBlockDescription']},
91 {tag:'ul', id:'directLogins'} 89 {tag:'ul', id:'directLogins'}
92 ]} 90 ]}
93 ]}, 91 ]},
94 {tag:'td', width:'15', children:[ 92 {tag:'td', width:'15', children:[
95 {tag:'div', cls:'mainPanelMinHeightDiv'} 93 {tag:'div', cls:'mainPanelMinHeightDiv'}
96 ]}, 94 ]},
97 {tag:'td', valign:'top', children:[ 95 {tag:'td', valign:'top', children:[
98 {tag:'div', id:'mainContent', children:[ 96 {tag:'div', id:'mainContent', children:[
99 {tag:'div', id:'recordListBlockHeader'}, 97 {tag:'div', id:'recordListBlockHeader'},
100 {tag:'div', id:'recordListAndDetailBlock', children:[ 98 {tag:'div', id:'recordListAndDetailBlock', children:[
101 {tag:'table', id:'recordListAndDetailBlockTABLE', border:'0', cellspacing:'0', cellpadding:'0', children:[ 99 {tag:'table', id:'recordListAndDetailBlockTABLE', border:'0', cellspacing:'0', cellpadding:'0', children:[
102 {tag:'tbody', children:[ 100 {tag:'tbody', children:[
103 {tag:'tr', children:[ 101 {tag:'tr', children:[
104 {tag:'td', valign:'top', width:'250', children:[ 102 {tag:'td', valign:'top', width:'250', children:[
105 {tag:'div', id:'recordListBlock', children:[ 103 {tag:'div', id:'recordListBlock', children:[
106 {tag:'div', id:'recordListFilterHeader'}, 104 {tag:'div', id:'recordListFilterHeader'},
107 {tag:'ul', id:'records'} 105 {tag:'ul', id:'records'}
108 ]} 106 ]}
109 ]}, 107 ]},
110 {tag:'td', id:'recordDetailSeparatorTD', rowspan:'2', valign:'top', bgcolor:'#ddddff', html:'&nbsp;'}, 108 {tag:'td', id:'recordDetailSeparatorTD', rowspan:'2', valign:'top', bgcolor:'#ddddff', html:'&nbsp;'},
111 {tag:'td', valign:'top', children:[ 109 {tag:'td', valign:'top', children:[
112 {tag:'div', id:'recordDetailMainBlock', children:[ 110 {tag:'div', id:'recordDetailMainBlock', children:[
113 {tag:'div', id:'recordTitleTopBlock'}, 111 {tag:'div', id:'recordTitleTopBlock'},
114 {tag:'div', id:'recordDetailBlock', children:[ 112 {tag:'div', id:'recordDetailBlock', children:[
115 {tag:'div', id:'recordDetail'} 113 {tag:'div', id:'recordDetail'}
116 ]} 114 ]}
117 ]}, 115 ]},
118 {tag:'div', id:'recordCreationWizardMainBlock', children:[ 116 {tag:'div', id:'recordCreationWizardMainBlock', children:[
119 {tag:'div', id:'recordCreationWizard', html:"WIZARD"} 117 {tag:'div', id:'recordCreationWizard', html:"WIZARD"}
120 ]} 118 ]}
121 ]} 119 ]}
122 ]}, 120 ]},
123 {tag:'tr', children:[ 121 {tag:'tr', children:[
124 {tag:'td', id:'cardBoxLowerLeftTD', html:'&nbsp;'}, 122 {tag:'td', id:'cardBoxLowerLeftTD', html:'&nbsp;'},
125 {tag:'td', id:'cardBoxLowerRightTD', html:'&nbsp;'} 123 {tag:'td', id:'cardBoxLowerRightTD', html:'&nbsp;'}
126 ]} 124 ]}
127 ]} 125 ]}
128 ]} 126 ]}
129 ]} 127 ]}
130 ]} 128 ]}
131 ]}, 129 ]},
132 {tag:'td', width:'15', html:"&nbsp;"} 130 {tag:'td', width:'15', html:"&nbsp;"}
133 ]} 131 ]}
134 ]} 132 ]}
135 ]}); 133 ]});
136 134
137 this.renderRecordListBlockHeader(); 135 this.renderRecordListBlockHeader();
138 // this.renderRecordListFilterHeader(); 136 // this.renderRecordListFilterHeader();
139 137
140 YAHOO.ext.Element.get('directLogins').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 138 YAHOO.ext.Element.get('directLogins').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
141 139
142 this.recordDetailComponent(); 140 this.recordDetailComponent();
143 141
144 YAHOO.ext.Element.get('recordDetailMainBlock').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show(); 142 YAHOO.ext.Element.get('recordDetailMainBlock').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show();
145 YAHOO.ext.Element.get('recordCreationWizardMainBlock').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); 143 YAHOO.ext.Element.get('recordCreationWizardMainBlock').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
146 }, 144 },
147 145
148 //------------------------------------------------------------------------- 146 //-------------------------------------------------------------------------
149 147
150 'addNewRecordButton': function() { 148 'addNewRecordButton': function() {
151 return this._addNewRecordButton; 149 return this._addNewRecordButton;
152 }, 150 },
153 151
154 'setAddNewRecordButton': function(aValue) { 152 'setAddNewRecordButton': function(aValue) {
155 this._addNewRecordButton = aValue; 153 this._addNewRecordButton = aValue;
156 }, 154 },
157 155
158 'deleteRecordButton': function() { 156 'deleteRecordButton': function() {
159 return this._deleteRecordButton; 157 return this._deleteRecordButton;
160 }, 158 },
161 159
162 'setDeleteRecordButton': function(aValue) { 160 'setDeleteRecordButton': function(aValue) {
163 this._deleteRecordButton = aValue; 161 this._deleteRecordButton = aValue;
164 }, 162 },
165 163
166 //------------------------------------------------------------------------- 164 //-------------------------------------------------------------------------
167 165
168 'addNewRecord': function(anEvent) { 166 'addNewRecord': function(anEvent) {
169 var deferredResult; 167 var deferredResult;
170 // var currentNumberOfRecords; 168 // var currentNumberOfRecords;
171 169
172 deferredResult = new MochiKit.Async.Deferred(); 170 deferredResult = new MochiKit.Async.Deferred();
173 171
174 // currentNumberOfRecords = MochiKit.Base.keys(this.user().records()).length; 172 // currentNumberOfRecords = MochiKit.Base.keys(this.user().records()).length;
175/* 173/*
176 // if ((this.user().preferences().shouldShowDonationPanel()) && (currentNumberOfRecords > 0) && ((currentNumberOfRecords%10) == 0)) { 174 // if ((this.user().preferences().shouldShowDonationPanel()) && (currentNumberOfRecords > 0) && ((currentNumberOfRecords%10) == 0)) {
177 // if (true) { 175 // if (true) {
178 if ((this.user().preferences().shouldShowDonationPanel()) && (currentNumberOfRecords >= 5)) { 176 if ((this.user().preferences().shouldShowDonationPanel()) && (currentNumberOfRecords >= 5)) {
179 deferredResult.addCallback(Clipperz.PM.showDonationSplashScreen, this.user(), 'recordListAddRecordButton'); 177 deferredResult.addCallback(Clipperz.PM.showDonationSplashScreen, this.user(), 'recordListAddRecordButton');
180 } 178 }
181*/ 179*/
182 deferredResult.addCallback(MochiKit.Base.bind(function() { 180 deferredResult.addCallback(MochiKit.Base.bind(function() {
183 var currentlySelectedRecord; 181 var currentlySelectedRecord;
184 182
185 currentlySelecedRecord = this.selectedRecord(); 183 currentlySelecedRecord = this.selectedRecord();
186 this.setSelectedRecord(null); 184 this.setSelectedRecord(null);
187 185
188 YAHOO.ext.Element.get('recordDetailMainBlock').hide(); 186 YAHOO.ext.Element.get('recordDetailMainBlock').hide();
189 YAHOO.ext.Element.get('recordCreationWizardMainBlock').show(); 187 YAHOO.ext.Element.get('recordCreationWizardMainBlock').show();
190 this.setCreationWizard(new Clipperz.PM.Components.RecordDetail.CreationWizard(YAHOO.ext.Element.get('recordCreationWizardMainBlock'), {previouslySelectedRecord:currentlySelecedRecord, mainComponent:this})); 188 this.setCreationWizard(new Clipperz.PM.Components.RecordDetail.CreationWizard(YAHOO.ext.Element.get('recordCreationWizardMainBlock'), {previouslySelectedRecord:currentlySelecedRecord, mainComponent:this}));
191 189
192 this.enterModalView(); 190 this.enterModalView();
193 }, this)); 191 }, this));
194 192
195 deferredResult.callback(); 193 deferredResult.callback();
196 }, 194 },
197 195
198 //------------------------------------------------------------------------- 196 //-------------------------------------------------------------------------
199 197
200 'creationWizard': function() { 198 'creationWizard': function() {
201 return this._creationWizard; 199 return this._creationWizard;
202 }, 200 },
203 201
204 'setCreationWizard': function(aValue) { 202 'setCreationWizard': function(aValue) {
205 this._creationWizard = aValue; 203 this._creationWizard = aValue;
206 }, 204 },
207 205
208 //------------------------------------------------------------------------- 206 //-------------------------------------------------------------------------
209 207
210 'exitWizard': function(aSelectedRecord, shouldEnterEditMode) { 208 'exitWizard': function(aSelectedRecord, shouldEnterEditMode) {
211//MochiKit.Logging.logDebug(">>> MainPanel.exitWizard - " + aSelectedRecord) 209//MochiKit.Logging.logDebug(">>> MainPanel.exitWizard - " + aSelectedRecord)
212 YAHOO.ext.Element.get('recordCreationWizardMainBlock').hide(); 210 YAHOO.ext.Element.get('recordCreationWizardMainBlock').hide();
213 YAHOO.ext.Element.get('recordDetailMainBlock').show(); 211 YAHOO.ext.Element.get('recordDetailMainBlock').show();
214 212
215 if (shouldEnterEditMode == true) { 213 if (shouldEnterEditMode == true) {
216 this.selectRecordAndEnterEditMode(aSelectedRecord); 214 this.selectRecordAndEnterEditMode(aSelectedRecord);
217 } else { 215 } else {
218 this.setSelectedRecord(aSelectedRecord); 216 this.setSelectedRecord(aSelectedRecord);
219 this.exitModalView(); 217 this.exitModalView();
220 } 218 }
221 219
222 this.creationWizard().remove(); 220 this.creationWizard().remove();
223 this.setCreationWizard(null); 221 this.setCreationWizard(null);
224//MochiKit.Logging.logDebug("<<< MainPanel.exitWizard"); 222//MochiKit.Logging.logDebug("<<< MainPanel.exitWizard");
225 }, 223 },
226 224
227 //------------------------------------------------------------------------- 225 //-------------------------------------------------------------------------
228 226
229 'selectRecordAndEnterEditMode': function(aRecord) { 227 'selectRecordAndEnterEditMode': function(aRecord) {
230 this.setSelectedRecord(aRecord); 228 this.setSelectedRecord(aRecord);
231 this.recordDetailComponent().setEditMode('EDIT'); 229 this.recordDetailComponent().setEditMode('EDIT');
232 }, 230 },
233 231
234 'selectRecordAndEnterEditModeHandler': function(anEvent) { 232 'selectRecordAndEnterEditModeHandler': function(anEvent) {
235 this.selectRecordAndEnterEditMode(anEvent.source()); 233 this.selectRecordAndEnterEditMode(anEvent.source());
236 }, 234 },
237 235
238 //------------------------------------------------------------------------- 236 //-------------------------------------------------------------------------
239 237
240 'resizeModalMask': function() { 238 'resizeModalMask': function() {
241//MochiKit.Logging.logDebug(">>> MainPanel.resizeModalMask"); 239//MochiKit.Logging.logDebug(">>> MainPanel.resizeModalMask");
242 MochiKit.Style.setElementDimensions('recordDetailEditModeHeaderMask', {w:MochiKit.Style.getElementDimensions('mainDiv').w, h:119}); 240 MochiKit.Style.setElementDimensions('recordDetailEditModeHeaderMask', {w:MochiKit.Style.getElementDimensions('mainDiv').w, h:119});
243 241
244 MochiKit.Style.setElementDimensions('recordDetailEditModeVerticalMask', {w:511, h:MochiKit.Style.getElementDimensions('mainDiv').h - 119}); 242 MochiKit.Style.setElementDimensions('recordDetailEditModeVerticalMask', {w:511, h:MochiKit.Style.getElementDimensions('mainDiv').h - 119});
245//MochiKit.Logging.logDebug("<<< MainPanel.resizeModalMask"); 243//MochiKit.Logging.logDebug("<<< MainPanel.resizeModalMask");
246 }, 244 },
247 245
248 //------------------------------------------------------------------------- 246 //-------------------------------------------------------------------------
249 247
250 'enterModalView': function() { 248 'enterModalView': function() {
251 if (this.user().preferences().useSafeEditMode()) { 249 if (this.user().preferences().useSafeEditMode()) {
252 var headerMaskElement; 250 var headerMaskElement;
253 var verticalMaskElement; 251 var verticalMaskElement;
254 252
255 this.resizeModalMask(); 253 this.resizeModalMask();
256 254
257 headerMaskElement = YAHOO.ext.Element.get('recordDetailEditModeHeaderMask'); 255 headerMaskElement = YAHOO.ext.Element.get('recordDetailEditModeHeaderMask');
258 headerMaskElement.show(); 256 headerMaskElement.show();
259 headerMaskElement.mask(); 257 headerMaskElement.mask();
260 258
261 verticalMaskElement = YAHOO.ext.Element.get('recordDetailEditModeVerticalMask'); 259 verticalMaskElement = YAHOO.ext.Element.get('recordDetailEditModeVerticalMask');
262 verticalMaskElement.show(); 260 verticalMaskElement.show();
263 verticalMaskElement.mask(); 261 verticalMaskElement.mask();
264 } 262 }
265 }, 263 },
266 264
267 //------------------------------------------------------------------------- 265 //-------------------------------------------------------------------------
268 266
269 'exitModalView': function() { 267 'exitModalView': function() {
270 if (this.user().preferences().useSafeEditMode()) { 268 if (this.user().preferences().useSafeEditMode()) {
271 var headerMaskElement; 269 var headerMaskElement;
272 var verticalMaskElement; 270 var verticalMaskElement;
273 271
274 headerMaskElement = YAHOO.ext.Element.get('recordDetailEditModeHeaderMask'); 272 headerMaskElement = YAHOO.ext.Element.get('recordDetailEditModeHeaderMask');
275 headerMaskElement.unmask(); 273 headerMaskElement.unmask();
276 headerMaskElement.hide(); 274 headerMaskElement.hide();
277 275
278 verticalMaskElement = YAHOO.ext.Element.get('recordDetailEditModeVerticalMask'); 276 verticalMaskElement = YAHOO.ext.Element.get('recordDetailEditModeVerticalMask');
279 verticalMaskElement.unmask(); 277 verticalMaskElement.unmask();
280 verticalMaskElement.hide(); 278 verticalMaskElement.hide();
281 } 279 }
282 }, 280 },
283 281
284 //------------------------------------------------------------------------- 282 //-------------------------------------------------------------------------
285 283
286 'removeSelectedRecord': function() { 284 'removeSelectedRecord': function() {
287 var selectedRecordReferences; 285 var selectedRecordReferences;
288 286
289//MochiKit.Logging.logDebug(">>> MainPanel.removeSelectedRecord"); 287//MochiKit.Logging.logDebug(">>> MainPanel.removeSelectedRecord");
290 if (this.selectedRecord() != null) { 288 if (this.selectedRecord() != null) {
291 selectedRecordReferences = [this.selectedRecord().reference()]; 289 selectedRecordReferences = [this.selectedRecord().reference()];
292 } else { 290 } else {
293 selectedRecordReferences = []; 291 selectedRecordReferences = [];
294 } 292 }
295 293
296 if (selectedRecordReferences.length > 0 ) { 294 if (selectedRecordReferences.length > 0 ) {
297 varrecordReference; 295 varrecordReference;
298 varrecords; 296 varrecords;
299 var deferred; 297 var deferred;
300 298
301 records = []; 299 records = [];
302 for (recordReference in selectedRecordReferences) { 300 for (recordReference in selectedRecordReferences) {
303 var record; 301 var record;
304 302
305//MochiKit.Logging.logDebug("### MainPanel.removeSelectedRecord - recordReference: " + selectedRecordReferences[recordReference]); 303//MochiKit.Logging.logDebug("### MainPanel.removeSelectedRecord - recordReference: " + selectedRecordReferences[recordReference]);
306 record = this.user().records()[selectedRecordReferences[recordReference]]; 304 record = this.user().records()[selectedRecordReferences[recordReference]];
307//MochiKit.Logging.logDebug("### MainPanel.removeSelectedRecord - record: " + record); 305//MochiKit.Logging.logDebug("### MainPanel.removeSelectedRecord - record: " + record);
308 records.push(record); 306 records.push(record);
309 } 307 }
310//MochiKit.Logging.logDebug("### MainPanel.removeSelectedRecord - records.length: " + records.length); 308//MochiKit.Logging.logDebug("### MainPanel.removeSelectedRecord - records.length: " + records.length);
311 309
312 deferred = new MochiKit.Async.Deferred(); 310 deferred = new MochiKit.Async.Deferred();
313//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 1:"); 311//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 1:");
314//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 1: " + res); return res;}); 312//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 1: " + res); return res;});
315//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 2:"); 313//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 2:");
316 deferred.addCallback(function() { 314 deferred.addCallback(function() {
317 var deferredResult; 315 var deferredResult;
318 316
319 deferredResult = new MochiKit.Async.Deferred(); 317 deferredResult = new MochiKit.Async.Deferred();
320 Clipperz.PM.Components.MessageBox().deferredShow({ 318 Clipperz.PM.Components.MessageBox().deferredShow({
321 title:Clipperz.PM.Strings['mainPanelDeletingRecordPanelConfirmationTitle'], 319 title:Clipperz.PM.Strings['mainPanelDeletingRecordPanelConfirmationTitle'],
322 text:Clipperz.PM.Strings['mainPanelDeleteRecordPanelConfirmationText'], 320 text:Clipperz.PM.Strings['mainPanelDeleteRecordPanelConfirmationText'],
323 width:240, 321 width:240,
324 showProgressBar:false, 322 showProgressBar:false,
325 showCloseButton:false, 323 showCloseButton:false,
326 buttons:{ 324 buttons:{
327 'yes':Clipperz.PM.Strings['mainPanelDeleteRecordPanelConfirmButtonLabel'], 325 'yes':Clipperz.PM.Strings['mainPanelDeleteRecordPanelConfirmButtonLabel'],
328 'no':Clipperz.PM.Strings['mainPanelDeleteRecordPanelDenyButtonLabel'] 326 'no':Clipperz.PM.Strings['mainPanelDeleteRecordPanelDenyButtonLabel']
329 }, 327 },
330 fn:MochiKit.Base.partial(function(aDeferred, aResult) { 328 fn:MochiKit.Base.partial(function(aDeferred, aResult) {
331 if (aResult == 'yes') { 329 if (aResult == 'yes') {
332 aDeferred.callback(aResult); 330 aDeferred.callback(aResult);
333 } else { 331 } else {
334 aDeferred.errback(aResult); 332 aDeferred.errback(aResult);
335 } 333 }
336 }, deferredResult) 334 }, deferredResult)
337 }, 'recordListRemoveRecordButton'); 335 }, 'recordListRemoveRecordButton');
338 336
339 return deferredResult; 337 return deferredResult;
340 }); 338 });
341//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 3:"); 339//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 3:");
342//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 2: " + res); return res;}); 340//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 2: " + res); return res;});
343//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 4:"); 341//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 4:");
344//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 3: " + res); return res;}); 342//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 3: " + res); return res;});
345 deferred.addCallback(MochiKit.Base.method(Clipperz.PM.Components.MessageBox(), 'deferredShow'), 343 deferred.addCallback(MochiKit.Base.method(Clipperz.PM.Components.MessageBox(), 'deferredShow'),
346 { 344 {
347 title:Clipperz.PM.Strings['mainPanelDeletingRecordPanelInitialTitle'], 345 title:Clipperz.PM.Strings['mainPanelDeletingRecordPanelInitialTitle'],
348 text:Clipperz.PM.Strings['mainPanelDeletingRecordPanelInitialText'], 346 text:Clipperz.PM.Strings['mainPanelDeletingRecordPanelInitialText'],
349 width:240, 347 width:240,
350 showProgressBar:true, 348 showProgressBar:true,
351 showCloseButton:false, 349 showCloseButton:false,
352 steps:5 350 steps:5
353 } 351 }
354 ); 352 );
355//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 5:"); 353//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 5:");
356//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 4: " + res); return res;}); 354//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 4: " + res); return res;});
357 deferred.addCallback(MochiKit.Base.method(this.user(), 'deleteRecordsAction'), records); 355 deferred.addCallback(MochiKit.Base.method(this.user(), 'deleteRecordsAction'), records);
358//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 6:"); 356//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 6:");
359//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 5: " + res); return res;}); 357//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 5: " + res); return res;});
360//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 7:"); 358//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 7:");
361//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 6: " + res); return res;}); 359//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 6: " + res); return res;});
362 deferred.addCallback(function() { 360 deferred.addCallback(function() {
363 Clipperz.PM.Components.MessageBox().update({ 361 Clipperz.PM.Components.MessageBox().update({
364 title:null, 362 title:null,
365 text:Clipperz.PM.Strings['mainPanelDeletingRecordPanelCompletedText'], 363 text:Clipperz.PM.Strings['mainPanelDeletingRecordPanelCompletedText'],
366 step:'next', 364 step:'next',
367 buttons:{} 365 buttons:{}
368 }); 366 });
369 }); 367 });
370//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 8:"); 368//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 8:");
371//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 7: " + res); return res;}); 369//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 7: " + res); return res;});
372 deferred.addCallback(MochiKit.Async.wait, 1); 370 deferred.addCallback(MochiKit.Async.wait, 1);
373//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 9:"); 371//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 9:");
374//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 8: " + res); return res;}); 372//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 8: " + res); return res;});
375 deferred.addCallback(function(res) { 373 deferred.addCallback(function(res) {
376 Clipperz.PM.Components.MessageBox().hide(YAHOO.ext.Element.get('main')); 374 Clipperz.PM.Components.MessageBox().hide(YAHOO.ext.Element.get('main'));
377 return res; 375 return res;
378 }); 376 });
379//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 10:"); 377//MochiKit.Logging.logDebug("--- MainPanel.removeSelectedRecord - 10:");
380//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 9: " + res); return res;}); 378//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.removeSelectedRecord - 9: " + res); return res;});
381 deferred.callback(); 379 deferred.callback();
382 } else { 380 } else {
383//MochiKit.Logging.logDebug("+++ MainPanel.removeSelectedRecord - nothing selected"); 381//MochiKit.Logging.logDebug("+++ MainPanel.removeSelectedRecord - nothing selected");
384 } 382 }
385 }, 383 },
386 384
387 //------------------------------------------------------------------------- 385 //-------------------------------------------------------------------------
388 386
389 'recordDetailComponent': function() { 387 'recordDetailComponent': function() {
390//MochiKit.Logging.logDebug(">>> MainPanel.recordDetailComponent"); 388//MochiKit.Logging.logDebug(">>> MainPanel.recordDetailComponent");
391 if (this._recordDetailComponent == null) { 389 if (this._recordDetailComponent == null) {
392//MochiKit.Logging.logDebug("--- MainPanel.recordDetailComponent - 1"); 390//MochiKit.Logging.logDebug("--- MainPanel.recordDetailComponent - 1");
393//MochiKit.Logging.logDebug("--- MainPanel.recordDetailComponent - 1 - user: " + this.user()); 391//MochiKit.Logging.logDebug("--- MainPanel.recordDetailComponent - 1 - user: " + this.user());
394 this._recordDetailComponent = new Clipperz.PM.Components.RecordDetail.MainComponent( 392 this._recordDetailComponent = new Clipperz.PM.Components.RecordDetail.MainComponent(
395 YAHOO.ext.Element.get('recordDetail'), 393 YAHOO.ext.Element.get('recordDetail'),
396 {user:this.user(), mainPanel:this} 394 {user:this.user(), mainPanel:this}
397 ); 395 );
398 } 396 }
399 397
400//MochiKit.Logging.logDebug("<<< MainPanel.recordDetailComponent"); 398//MochiKit.Logging.logDebug("<<< MainPanel.recordDetailComponent");
401 399
402 return this._recordDetailComponent; 400 return this._recordDetailComponent;
403 }, 401 },
404 402
405 //------------------------------------------------------------------------- 403 //-------------------------------------------------------------------------
406 404
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/ToolsPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/ToolsPanel.js
index 4f2a015..1c799d0 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Panels/ToolsPanel.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Panels/ToolsPanel.js
@@ -1,302 +1,300 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } 27if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.Panels.ToolsPanel = function(anElement, args) { 31Clipperz.PM.Components.Panels.ToolsPanel = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.Panels.ToolsPanel.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.Panels.ToolsPanel.superclass.constructor.call(this, anElement, args);
37 35
38 this._generateButtonElement = null; 36 this._generateButtonElement = null;
39 this._needsRenderingUponTabSwitch = false; 37 this._needsRenderingUponTabSwitch = false;
40 38
41 this.render(); 39 this.render();
42 40
43 return this; 41 return this;
44} 42}
45 43
46//============================================================================= 44//=============================================================================
47 45
48YAHOO.extendX(Clipperz.PM.Components.Panels.ToolsPanel, Clipperz.PM.Components.Panels.BasePanel, { 46YAHOO.extendX(Clipperz.PM.Components.Panels.ToolsPanel, Clipperz.PM.Components.Panels.BasePanel, {
49 47
50 'toString': function() { 48 'toString': function() {
51 return "Clipperz.PM.Components.Panels.ToolsPanel component"; 49 return "Clipperz.PM.Components.Panels.ToolsPanel component";
52 }, 50 },
53 51
54 //------------------------------------------------------------------------- 52 //-------------------------------------------------------------------------
55 53
56 'render': function() { 54 'render': function() {
57 var bookmarkletUrl; 55 var bookmarkletUrl;
58 56
59//MochiKit.Logging.logDebug(">>> ToolsPanel.render"); 57//MochiKit.Logging.logDebug(">>> ToolsPanel.render");
60 Clipperz.NotificationCenter.unregister(this); 58 Clipperz.NotificationCenter.unregister(this);
61 MochiKit.Signal.disconnectAllTo(this); 59 MochiKit.Signal.disconnectAllTo(this);
62 60
63 if (Clipperz_IEisBroken == true) { 61 if (Clipperz_IEisBroken == true) {
64 bookmarkletUrl = bookmarklet_ie; 62 bookmarkletUrl = bookmarklet_ie;
65 } else { 63 } else {
66 bookmarkletUrl = bookmarklet; 64 bookmarkletUrl = bookmarklet;
67 } 65 }
68 66
69 this.element().update(""); 67 this.element().update("");
70 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ 68 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[
71 {tag:'tbody', children:[ 69 {tag:'tbody', children:[
72 {tag:'tr', children:[ 70 {tag:'tr', children:[
73 {tag:'td', valign:'top', width:'200', children:[ 71 {tag:'td', valign:'top', width:'200', children:[
74 {tag:'ul', id:"dataSubMenu", cls:'subMenu', children:[ 72 {tag:'ul', id:"dataSubMenu", cls:'subMenu', children:[
75 {tag:'li', id:this.getId('passwordGenerator'), htmlString:Clipperz.PM.Strings['passwordGeneratorTabLabel']}, 73 {tag:'li', id:this.getId('passwordGenerator'), htmlString:Clipperz.PM.Strings['passwordGeneratorTabLabel']},
76 {tag:'li', id:this.getId('bookmarklet'), htmlString:Clipperz.PM.Strings['bookmarkletTabLabel']}, 74 {tag:'li', id:this.getId('bookmarklet'), htmlString:Clipperz.PM.Strings['bookmarkletTabLabel']},
77 {tag:'li', id:this.getId('compact'), htmlString:Clipperz.PM.Strings['compactTabLabel']}, 75 {tag:'li', id:this.getId('compact'), htmlString:Clipperz.PM.Strings['compactTabLabel']},
78 {tag:'li', id:this.getId('httpAuth'), htmlString:Clipperz.PM.Strings['httpAuthTabLabel']} 76 {tag:'li', id:this.getId('httpAuth'), htmlString:Clipperz.PM.Strings['httpAuthTabLabel']}
79 ]} 77 ]}
80 ]}, 78 ]},
81 {tag:'td', valign:'top', children:[ 79 {tag:'td', valign:'top', children:[
82 {tag:'ul', cls:'clipperzTabPanels', children:[ 80 {tag:'ul', cls:'clipperzTabPanels', children:[
83 {tag:'li', id:this.getId('passwordGeneratorPanel'), children:[ 81 {tag:'li', id:this.getId('passwordGeneratorPanel'), children:[
84 {tag:'div', cls:'clipperzSubPanel', children:[ 82 {tag:'div', cls:'clipperzSubPanel', children:[
85 {tag:'h5', htmlString:Clipperz.PM.Strings['passwordGeneratorTabTitle']}, 83 {tag:'h5', htmlString:Clipperz.PM.Strings['passwordGeneratorTabTitle']},
86 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['paswordGeneratorTabDescription']}, 84 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['paswordGeneratorTabDescription']},
87 85
88 //--------------------------------------------------- 86 //---------------------------------------------------
89 {tag:'div', children:[ 87 {tag:'div', children:[
90 {tag:'form', id:this.getId('passwordGeneratorForm'), cls:'passwordGenerator', children:[ 88 {tag:'form', id:this.getId('passwordGeneratorForm'), cls:'passwordGenerator', children:[
91 {tag:'input', type:'text', cls:'clipperz_passwordGenerator_password', id:this.getId('passwordField')}, 89 {tag:'input', type:'text', cls:'clipperz_passwordGenerator_password', id:this.getId('passwordField')},
92 {tag:'table', children:[ 90 {tag:'table', children:[
93 {tag:'tbody', children:[ 91 {tag:'tbody', children:[
94 {tag:'tr', children:[ 92 {tag:'tr', children:[
95 {tag:'td', width:'20%', children:[ 93 {tag:'td', width:'20%', children:[
96 {tag:'input', type:'checkbox', name:'lowercase', id:this.getId('lowercase'), checked:true}, 94 {tag:'input', type:'checkbox', name:'lowercase', id:this.getId('lowercase'), checked:true},
97 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLowercaseLabel']} 95 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLowercaseLabel']}
98 ]}, 96 ]},
99 {tag:'td', width:'20%', children:[ 97 {tag:'td', width:'20%', children:[
100 {tag:'input', type:'checkbox', name:'uppercase', id:this.getId('uppercase'), checked:true}, 98 {tag:'input', type:'checkbox', name:'uppercase', id:this.getId('uppercase'), checked:true},
101 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorUppercaseLabel']} 99 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorUppercaseLabel']}
102 ]}, 100 ]},
103 {tag:'td', width:'20%', children:[ 101 {tag:'td', width:'20%', children:[
104 {tag:'input', type:'checkbox', name:'numbers', id:this.getId('numbers'), checked:true}, 102 {tag:'input', type:'checkbox', name:'numbers', id:this.getId('numbers'), checked:true},
105 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorNumberLabel']} 103 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorNumberLabel']}
106 ]}, 104 ]},
107 {tag:'td', width:'20%', children:[ 105 {tag:'td', width:'20%', children:[
108 {tag:'input', type:'checkbox', name:'symbols', id:this.getId('symbols'), checked:true}, 106 {tag:'input', type:'checkbox', name:'symbols', id:this.getId('symbols'), checked:true},
109 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorSymbolLabel']} 107 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorSymbolLabel']}
110 ]}, 108 ]},
111 {tag:'td', width:'20%', children:[ 109 {tag:'td', width:'20%', children:[
112 {tag:'span', cls:'passwordGeneratorLength', children:[ 110 {tag:'span', cls:'passwordGeneratorLength', children:[
113 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLengthLabel']}, 111 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLengthLabel']},
114 {tag:'span', id:this.getId('passwordLength'), cls:'passwordGeneratorLengthValue', html:'0'} 112 {tag:'span', id:this.getId('passwordLength'), cls:'passwordGeneratorLengthValue', html:'0'}
115 ]} 113 ]}
116 ]} 114 ]}
117 ]} 115 ]}
118 ]} 116 ]}
119 ]} 117 ]}
120 ]}, 118 ]},
121 {tag:'div', id:this.getId('generateRandomPassword')} 119 {tag:'div', id:this.getId('generateRandomPassword')}
122 ]} 120 ]}
123 //--------------------------------------------------- 121 //---------------------------------------------------
124 122
125 ]} 123 ]}
126 ]}, 124 ]},
127 {tag:'li', id:this.getId('bookmarkletPanel'), children:[ 125 {tag:'li', id:this.getId('bookmarkletPanel'), children:[
128 {tag:'div', cls:'clipperzSubPanel', children:[ 126 {tag:'div', cls:'clipperzSubPanel', children:[
129 {tag:'h5', htmlString:Clipperz.PM.Strings['bookmarkletTabTitle']}, 127 {tag:'h5', htmlString:Clipperz.PM.Strings['bookmarkletTabTitle']},
130 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['bookmarkletTabDescription']}, 128 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['bookmarkletTabDescription']},
131 {tag:'a', href:bookmarkletUrl, cls:'bookmarkletLink', htmlString:Clipperz.PM.Strings['bookmarkletTabBookmarkletTitle']}, 129 {tag:'a', href:bookmarkletUrl, cls:'bookmarkletLink', htmlString:Clipperz.PM.Strings['bookmarkletTabBookmarkletTitle']},
132 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['bookmarkletTabInstructions']} 130 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['bookmarkletTabInstructions']}
133 ]} 131 ]}
134 ]}, 132 ]},
135 {tag:'li', id:this.getId('compactPanel'), children:[ 133 {tag:'li', id:this.getId('compactPanel'), children:[
136 {tag:'div', cls:'clipperzSubPanel', children:[ 134 {tag:'div', cls:'clipperzSubPanel', children:[
137 {tag:'h5', htmlString:Clipperz.PM.Strings['compactTabTitle']}, 135 {tag:'h5', htmlString:Clipperz.PM.Strings['compactTabTitle']},
138 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['compactTabDescription']} 136 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['compactTabDescription']}
139 ]} 137 ]}
140 ]}, 138 ]},
141 {tag:'li', id:this.getId('httpAuthPanel'), children:[ 139 {tag:'li', id:this.getId('httpAuthPanel'), children:[
142 {tag:'div', cls:'clipperzSubPanel', children:[ 140 {tag:'div', cls:'clipperzSubPanel', children:[
143 {tag:'h5', htmlString:Clipperz.PM.Strings['httpAuthTabTitle']}, 141 {tag:'h5', htmlString:Clipperz.PM.Strings['httpAuthTabTitle']},
144 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['httpAuthTabDescription']}, 142 {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['httpAuthTabDescription']},
145 {tag:'div', cls:'bookmarkletConfiguration', children:[Clipperz.PM.Strings['httpAuthBookmarkletConfiguration']]} 143 {tag:'div', cls:'bookmarkletConfiguration', children:[Clipperz.PM.Strings['httpAuthBookmarkletConfiguration']]}
146 ]} 144 ]}
147 ]} 145 ]}
148 ]} 146 ]}
149 ]} 147 ]}
150 ]} 148 ]}
151 ]} 149 ]}
152 ]}); 150 ]});
153 151
154 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('passwordField')); 152 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('passwordField'));
155 153
156 MochiKit.Signal.connect(this.getId('lowercase'), 'onclick', this, 'updatePasswordValue'); 154 MochiKit.Signal.connect(this.getId('lowercase'), 'onclick', this, 'updatePasswordValue');
157 MochiKit.Signal.connect(this.getId('uppercase'), 'onclick', this, 'updatePasswordValue'); 155 MochiKit.Signal.connect(this.getId('uppercase'), 'onclick', this, 'updatePasswordValue');
158 MochiKit.Signal.connect(this.getId('numbers'), 'onclick', this, 'updatePasswordValue'); 156 MochiKit.Signal.connect(this.getId('numbers'), 'onclick', this, 'updatePasswordValue');
159 MochiKit.Signal.connect(this.getId('symbols'), 'onclick', this, 'updatePasswordValue'); 157 MochiKit.Signal.connect(this.getId('symbols'), 'onclick', this, 'updatePasswordValue');
160 158
161 MochiKit.Signal.connect(this.getDom('passwordField'), 'onkeyup', this, 'updatePasswordLengthLabel'); 159 MochiKit.Signal.connect(this.getDom('passwordField'), 'onkeyup', this, 'updatePasswordLengthLabel');
162 MochiKit.Signal.connect(this.getDom('passwordField'), 'onchange', this, 'updatePasswordLengthLabel'); 160 MochiKit.Signal.connect(this.getDom('passwordField'), 'onchange', this, 'updatePasswordLengthLabel');
163 MochiKit.Signal.connect(this.getDom('passwordField'), 'onblur', this, 'updatePasswordLengthLabel'); 161 MochiKit.Signal.connect(this.getDom('passwordField'), 'onblur', this, 'updatePasswordLengthLabel');
164 162
165 this.setGenerateButtonElement(new YAHOO.ext.Button(this.getDom('generateRandomPassword'), {text:Clipperz.PM.Strings['passwordGeneratorTabButtonLabel'], handler:this.updatePasswordValue, scope:this})); 163 this.setGenerateButtonElement(new YAHOO.ext.Button(this.getDom('generateRandomPassword'), {text:Clipperz.PM.Strings['passwordGeneratorTabButtonLabel'], handler:this.updatePasswordValue, scope:this}));
166 164
167 this.setNeedsRenderingUponTabSwitch(false); 165 this.setNeedsRenderingUponTabSwitch(false);
168 this.tabPanelController().setUp(); 166 this.tabPanelController().setUp();
169 Clipperz.NotificationCenter.register(null, 'tabSelected', this, 'tabSelectedHandler'); 167 Clipperz.NotificationCenter.register(null, 'tabSelected', this, 'tabSelectedHandler');
170 Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler'); 168 Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler');
171//MochiKit.Logging.logDebug("<<< ToolsPanel.render"); 169//MochiKit.Logging.logDebug("<<< ToolsPanel.render");
172 }, 170 },
173 171
174 //------------------------------------------------------------------------- 172 //-------------------------------------------------------------------------
175 173
176 'needsRenderingUponTabSwitch': function() { 174 'needsRenderingUponTabSwitch': function() {
177 return this._needsRenderingUponTabSwitch; 175 return this._needsRenderingUponTabSwitch;
178 }, 176 },
179 177
180 'setNeedsRenderingUponTabSwitch': function(aValue) { 178 'setNeedsRenderingUponTabSwitch': function(aValue) {
181 this._needsRenderingUponTabSwitch = aValue; 179 this._needsRenderingUponTabSwitch = aValue;
182 }, 180 },
183 181
184 'tabSelectedHandler': function(anEvent) { 182 'tabSelectedHandler': function(anEvent) {
185 if (this.needsRenderingUponTabSwitch()) { 183 if (this.needsRenderingUponTabSwitch()) {
186 this.render(); 184 this.render();
187 } 185 }
188 186
189 if (anEvent.parameters() == this.getId('httpAuth')) { 187 if (anEvent.parameters() == this.getId('httpAuth')) {
190 var textarea; 188 var textarea;
191 189
192 textarea = document.getElementById("httpAuthDefaultConfiguration"); 190 textarea = document.getElementById("httpAuthDefaultConfiguration");
193 textarea.focus(); 191 textarea.focus();
194 textarea.select(); 192 textarea.select();
195 } 193 }
196 }, 194 },
197 195
198 //------------------------------------------------------------------------- 196 //-------------------------------------------------------------------------
199 197
200 'tabPanelController': function() { 198 'tabPanelController': function() {
201 if (this._tabPanelController == null) { 199 if (this._tabPanelController == null) {
202 var tabPanelControllerConfig; 200 var tabPanelControllerConfig;
203 201
204 tabPanelControllerConfig = {} 202 tabPanelControllerConfig = {}
205 tabPanelControllerConfig[this.getId('passwordGenerator')] = this.getId('passwordGeneratorPanel'); 203 tabPanelControllerConfig[this.getId('passwordGenerator')] = this.getId('passwordGeneratorPanel');
206 tabPanelControllerConfig[this.getId('bookmarklet')] = this.getId('bookmarkletPanel'); 204 tabPanelControllerConfig[this.getId('bookmarklet')] = this.getId('bookmarkletPanel');
207 tabPanelControllerConfig[this.getId('compact')] = this.getId('compactPanel'); 205 tabPanelControllerConfig[this.getId('compact')] = this.getId('compactPanel');
208 tabPanelControllerConfig[this.getId('httpAuth')] = this.getId('httpAuthPanel'); 206 tabPanelControllerConfig[this.getId('httpAuth')] = this.getId('httpAuthPanel');
209 this._tabPanelController = new Clipperz.PM.Components.TabPanel.TabPanelController({ config:tabPanelControllerConfig, selectedTab:this.getId('passwordGenerator') }); 207 this._tabPanelController = new Clipperz.PM.Components.TabPanel.TabPanelController({ config:tabPanelControllerConfig, selectedTab:this.getId('passwordGenerator') });
210 } 208 }
211 209
212 return this._tabPanelController; 210 return this._tabPanelController;
213 }, 211 },
214 212
215 //------------------------------------------------------------------------- 213 //-------------------------------------------------------------------------
216 214
217 'generateButtonElement': function() { 215 'generateButtonElement': function() {
218 return this._generateButtonElement; 216 return this._generateButtonElement;
219 }, 217 },
220 218
221 'setGenerateButtonElement': function(aValue) { 219 'setGenerateButtonElement': function(aValue) {
222 this._generateButtonElement = aValue; 220 this._generateButtonElement = aValue;
223 }, 221 },
224 222
225 //------------------------------------------------------------------------- 223 //-------------------------------------------------------------------------
226 224
227 'updatePasswordValue': function(anEvent) { 225 'updatePasswordValue': function(anEvent) {
228 varrandomBytes; 226 varrandomBytes;
229 varrandomValue; 227 varrandomValue;
230 var charset; 228 var charset;
231 var charsetBitSize; 229 var charsetBitSize;
232 var stringValue; 230 var stringValue;
233 varblockIndex; 231 varblockIndex;
234 232
235//MochiKit.Logging.logDebug(">>> updatePasswordValue"); 233//MochiKit.Logging.logDebug(">>> updatePasswordValue");
236 randomBytes = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(50); 234 randomBytes = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(50);
237 stringValue = ""; 235 stringValue = "";
238 blockIndex = 0; 236 blockIndex = 0;
239 237
240 charset = ""; 238 charset = "";
241 if (this.getDom('lowercase').checked) { 239 if (this.getDom('lowercase').checked) {
242 charset += Clipperz.PM.Strings['passwordGeneratorLowercaseCharset']; 240 charset += Clipperz.PM.Strings['passwordGeneratorLowercaseCharset'];
243 } 241 }
244 if (this.getDom('uppercase').checked) { 242 if (this.getDom('uppercase').checked) {
245 charset += Clipperz.PM.Strings['passwordGeneratorUppercaseCharset']; 243 charset += Clipperz.PM.Strings['passwordGeneratorUppercaseCharset'];
246 } 244 }
247 if (this.getDom('numbers').checked) { 245 if (this.getDom('numbers').checked) {
248 charset += Clipperz.PM.Strings['passwordGeneratorNumberCharset']; 246 charset += Clipperz.PM.Strings['passwordGeneratorNumberCharset'];
249 } 247 }
250 if (this.getDom('symbols').checked) { 248 if (this.getDom('symbols').checked) {
251 charset += Clipperz.PM.Strings['passwordGeneratorSymbolCharset']; 249 charset += Clipperz.PM.Strings['passwordGeneratorSymbolCharset'];
252 } 250 }
253 251
254 charsetBitSize = 0; 252 charsetBitSize = 0;
255 while (Math.pow(2, charsetBitSize) < charset.length) { 253 while (Math.pow(2, charsetBitSize) < charset.length) {
256 charsetBitSize ++; 254 charsetBitSize ++;
257 } 255 }
258 256
259 if (charsetBitSize > 0) { 257 if (charsetBitSize > 0) {
260 while (Clipperz.PM.Crypto.passwordEntropy(stringValue) < 128) { 258 while (Clipperz.PM.Crypto.passwordEntropy(stringValue) < 128) {
261 if (((blockIndex + 1)*charsetBitSize) > (randomBytes.length() * 8)) { 259 if (((blockIndex + 1)*charsetBitSize) > (randomBytes.length() * 8)) {
262 randomBytes = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(50); 260 randomBytes = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(50);
263 blockIndex = 0; 261 blockIndex = 0;
264 } 262 }
265 randomValue = randomBytes.bitBlockAtIndexWithSize(blockIndex*charsetBitSize, charsetBitSize); 263 randomValue = randomBytes.bitBlockAtIndexWithSize(blockIndex*charsetBitSize, charsetBitSize);
266 if (randomValue < charset.length) { 264 if (randomValue < charset.length) {
267 stringValue += charset.charAt(randomValue); 265 stringValue += charset.charAt(randomValue);
268 } 266 }
269 267
270 blockIndex ++; 268 blockIndex ++;
271 } 269 }
272 } else { 270 } else {
273 stringValue = ""; 271 stringValue = "";
274 } 272 }
275 273
276 this.getElement('passwordField').dom.focus() 274 this.getElement('passwordField').dom.focus()
277 this.getElement('passwordField').dom.value = stringValue; 275 this.getElement('passwordField').dom.value = stringValue;
278 276
279 277
280 if (anEvent.src) { 278 if (anEvent.src) {
281 anEvent.src().focus(); 279 anEvent.src().focus();
282 } else { 280 } else {
283 this.generateButtonElement().el.focus(); 281 this.generateButtonElement().el.focus();
284 } 282 }
285 283
286 this.setNeedsRenderingUponTabSwitch(true); 284 this.setNeedsRenderingUponTabSwitch(true);
287 285
288 return false; 286 return false;
289//MochiKit.Logging.logDebug("<<< updatePasswordValue"); 287//MochiKit.Logging.logDebug("<<< updatePasswordValue");
290 }, 288 },
291 289
292 //----------------------------------------------------- 290 //-----------------------------------------------------
293 291
294 'updatePasswordLengthLabel': function() { 292 'updatePasswordLengthLabel': function() {
295 this.getElement('passwordLength').update(this.getDom('passwordField').value.length); 293 this.getElement('passwordLength').update(this.getDom('passwordField').value.length);
296 }, 294 },
297 295
298 //------------------------------------------------------------------------- 296 //-------------------------------------------------------------------------
299 __syntaxFix__: "syntax fix" 297 __syntaxFix__: "syntax fix"
300 298
301}); 299});
302 300
diff --git a/frontend/beta/js/Clipperz/PM/Components/PasswordEntropyDisplay.js b/frontend/beta/js/Clipperz/PM/Components/PasswordEntropyDisplay.js
index 784dce9..b64e0f7 100644
--- a/frontend/beta/js/Clipperz/PM/Components/PasswordEntropyDisplay.js
+++ b/frontend/beta/js/Clipperz/PM/Components/PasswordEntropyDisplay.js
@@ -1,115 +1,113 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29 27
30Clipperz.PM.Components.PasswordEntropyDisplay = function(anElement, args) { 28Clipperz.PM.Components.PasswordEntropyDisplay = function(anElement, args) {
31 args = args || {}; 29 args = args || {};
32 30
33//MochiKit.Logging.logDebug(">>> new TextFormField"); 31//MochiKit.Logging.logDebug(">>> new TextFormField");
34 Clipperz.PM.Components.PasswordEntropyDisplay.superclass.constructor.call(this, anElement, args); 32 Clipperz.PM.Components.PasswordEntropyDisplay.superclass.constructor.call(this, anElement, args);
35 33
36 this._wrapperElement = null; 34 this._wrapperElement = null;
37 this._entropyElement = null; 35 this._entropyElement = null;
38 36
39 this.render(); 37 this.render();
40//MochiKit.Logging.logDebug("<<< new TextFormField"); 38//MochiKit.Logging.logDebug("<<< new TextFormField");
41 39
42 return this; 40 return this;
43}; 41};
44 42
45YAHOO.extendX(Clipperz.PM.Components.PasswordEntropyDisplay, Clipperz.PM.Components.BaseComponent, { 43YAHOO.extendX(Clipperz.PM.Components.PasswordEntropyDisplay, Clipperz.PM.Components.BaseComponent, {
46 44
47 'toString': function() { 45 'toString': function() {
48 return "Clipperz.PM.Components.PasswordEntropyDisplay"; 46 return "Clipperz.PM.Components.PasswordEntropyDisplay";
49 }, 47 },
50 48
51 //----------------------------------------------------- 49 //-----------------------------------------------------
52 50
53 'wrapperElement': function() { 51 'wrapperElement': function() {
54 return this._wrapperElement; 52 return this._wrapperElement;
55 }, 53 },
56 54
57 'setWrapperElement': function(aValue) { 55 'setWrapperElement': function(aValue) {
58 this._wrapperElement = aValue; 56 this._wrapperElement = aValue;
59 }, 57 },
60 58
61 //----------------------------------------------------- 59 //-----------------------------------------------------
62 60
63 'passwordElement': function() { 61 'passwordElement': function() {
64 return this.element(); 62 return this.element();
65 }, 63 },
66 64
67 //----------------------------------------------------- 65 //-----------------------------------------------------
68 66
69 'entropyElement': function() { 67 'entropyElement': function() {
70 return this._entropyElement; 68 return this._entropyElement;
71 }, 69 },
72 70
73 'setEntropyElement': function(aValue) { 71 'setEntropyElement': function(aValue) {
74 this._entropyElement = aValue; 72 this._entropyElement = aValue;
75 }, 73 },
76 74
77 //----------------------------------------------------- 75 //-----------------------------------------------------
78 76
79 'render': function() { 77 'render': function() {
80 MochiKit.Signal.disconnectAllTo(this); 78 MochiKit.Signal.disconnectAllTo(this);
81 79
82 this.setWrapperElement(this.element().wrap({tag:'div'})); 80 this.setWrapperElement(this.element().wrap({tag:'div'}));
83 this.setEntropyElement(Clipperz.YUI.DomHelper.append(this.wrapperElement().dom, {tag:'div', cls:'passwordEntropy', html:"&nbsp;"}, true)); 81 this.setEntropyElement(Clipperz.YUI.DomHelper.append(this.wrapperElement().dom, {tag:'div', cls:'passwordEntropy', html:"&nbsp;"}, true));
84 82
85 // this.entropyElement().setWidth(this.passwordElement().getWidth()); 83 // this.entropyElement().setWidth(this.passwordElement().getWidth());
86 this.updateEntropyElement(); 84 this.updateEntropyElement();
87 85
88 MochiKit.Signal.connect(this.element().dom, 'onkeyup', this, 'updateEntropyElement'); 86 MochiKit.Signal.connect(this.element().dom, 'onkeyup', this, 'updateEntropyElement');
89 MochiKit.Signal.connect(this.element().dom, 'onchange', this, 'updateEntropyElement'); 87 MochiKit.Signal.connect(this.element().dom, 'onchange', this, 'updateEntropyElement');
90 MochiKit.Signal.connect(this.element().dom, 'onblur', this, 'updateEntropyElement'); 88 MochiKit.Signal.connect(this.element().dom, 'onblur', this, 'updateEntropyElement');
91 }, 89 },
92 90
93 //----------------------------------------------------- 91 //-----------------------------------------------------
94 92
95 'computeEntropyForString': function(aValue) { 93 'computeEntropyForString': function(aValue) {
96 return Clipperz.PM.Crypto.passwordEntropy(aValue); 94 return Clipperz.PM.Crypto.passwordEntropy(aValue);
97 }, 95 },
98 96
99 //----------------------------------------------------- 97 //-----------------------------------------------------
100 98
101 'updateEntropyElement': function(anEvent) { 99 'updateEntropyElement': function(anEvent) {
102//MochiKit.Logging.logDebug(">>> PasswordEntropyDisplay.updateEntropyElement"); 100//MochiKit.Logging.logDebug(">>> PasswordEntropyDisplay.updateEntropyElement");
103 varmaxExtent; 101 varmaxExtent;
104 varentropy; 102 varentropy;
105 103
106 entropy = Math.min(128, this.computeEntropyForString(this.passwordElement().dom.value)); 104 entropy = Math.min(128, this.computeEntropyForString(this.passwordElement().dom.value));
107//MochiKit.Logging.logDebug("--- PasswordEntropyDisplay.updateEntropyElement - entropy: " + entropy); 105//MochiKit.Logging.logDebug("--- PasswordEntropyDisplay.updateEntropyElement - entropy: " + entropy);
108 this.entropyElement().setStyle('background-position', "0px " + -entropy + "px"); 106 this.entropyElement().setStyle('background-position', "0px " + -entropy + "px");
109 this.entropyElement().setWidth(this.passwordElement().getWidth() * (entropy/128)); 107 this.entropyElement().setWidth(this.passwordElement().getWidth() * (entropy/128));
110//MochiKit.Logging.logDebug("<<< PasswordEntropyDisplay.updateEntropyElement"); 108//MochiKit.Logging.logDebug("<<< PasswordEntropyDisplay.updateEntropyElement");
111 }, 109 },
112 110
113 //----------------------------------------------------- 111 //-----------------------------------------------------
114 __syntaxFix__: '__syntaxFix__' 112 __syntaxFix__: '__syntaxFix__'
115}); 113});
diff --git a/frontend/beta/js/Clipperz/PM/Components/PasswordGenerator.js b/frontend/beta/js/Clipperz/PM/Components/PasswordGenerator.js
index 87c52b2..67db50a 100644
--- a/frontend/beta/js/Clipperz/PM/Components/PasswordGenerator.js
+++ b/frontend/beta/js/Clipperz/PM/Components/PasswordGenerator.js
@@ -1,282 +1,280 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29 27
30Clipperz.PM.Components.PasswordGenerator = function(anElement, aFieldValueComponent, args) { 28Clipperz.PM.Components.PasswordGenerator = function(anElement, aFieldValueComponent, args) {
31 args = args || {}; 29 args = args || {};
32 30
33//MochiKit.Logging.logDebug(">>> new TextFormField"); 31//MochiKit.Logging.logDebug(">>> new TextFormField");
34 Clipperz.PM.Components.PasswordGenerator.superclass.constructor.call(this, anElement, args); 32 Clipperz.PM.Components.PasswordGenerator.superclass.constructor.call(this, anElement, args);
35 33
36 this._fieldValueComponent = aFieldValueComponent; 34 this._fieldValueComponent = aFieldValueComponent;
37 this._panelButton = null; 35 this._panelButton = null;
38 this.render(); 36 this.render();
39//MochiKit.Logging.logDebug("<<< new TextFormField"); 37//MochiKit.Logging.logDebug("<<< new TextFormField");
40 38
41 return this; 39 return this;
42}; 40};
43 41
44YAHOO.extendX(Clipperz.PM.Components.PasswordGenerator, Clipperz.PM.Components.BaseComponent, { 42YAHOO.extendX(Clipperz.PM.Components.PasswordGenerator, Clipperz.PM.Components.BaseComponent, {
45 43
46 'toString': function() { 44 'toString': function() {
47 return "Clipperz.PM.Components.PasswordGenerator"; 45 return "Clipperz.PM.Components.PasswordGenerator";
48 }, 46 },
49 47
50 //----------------------------------------------------- 48 //-----------------------------------------------------
51 49
52 'fieldValueComponent': function() { 50 'fieldValueComponent': function() {
53 return this._fieldValueComponent; 51 return this._fieldValueComponent;
54 }, 52 },
55 53
56 //----------------------------------------------------- 54 //-----------------------------------------------------
57 55
58 'render': function() { 56 'render': function() {
59 MochiKit.Signal.disconnectAllTo(this); 57 MochiKit.Signal.disconnectAllTo(this);
60 58
61 // this._panelButton = new YAHOO.ext.Button(this.element().dom, {text:Clipperz.PM.Strings['passwordGeneratorButtonLabel'], handler:this.openPasswordPanel, scope:this}); 59 // this._panelButton = new YAHOO.ext.Button(this.element().dom, {text:Clipperz.PM.Strings['passwordGeneratorButtonLabel'], handler:this.openPasswordPanel, scope:this});
62 MochiKit.Signal.connect(this.element().dom, 'onmouseenter', this, 'onMouseEnter'); 60 MochiKit.Signal.connect(this.element().dom, 'onmouseenter', this, 'onMouseEnter');
63 MochiKit.Signal.connect(this.element().dom, 'onmouseleave', this, 'onMouseLeave'); 61 MochiKit.Signal.connect(this.element().dom, 'onmouseleave', this, 'onMouseLeave');
64 MochiKit.Signal.connect(this.element().dom, 'onclick', this, 'openPasswordPanel'); 62 MochiKit.Signal.connect(this.element().dom, 'onclick', this, 'openPasswordPanel');
65 }, 63 },
66 64
67 //----------------------------------------------------- 65 //-----------------------------------------------------
68 66
69 'onMouseEnter': function() { 67 'onMouseEnter': function() {
70 this.element().addClass('hover'); 68 this.element().addClass('hover');
71 }, 69 },
72 70
73 'onMouseLeave': function() { 71 'onMouseLeave': function() {
74 this.element().removeClass('hover'); 72 this.element().removeClass('hover');
75 }, 73 },
76 74
77 //----------------------------------------------------- 75 //-----------------------------------------------------
78 76
79 'panelButton': function() { 77 'panelButton': function() {
80 return this._panelButton; 78 return this._panelButton;
81 }, 79 },
82 80
83 //----------------------------------------------------- 81 //-----------------------------------------------------
84 82
85 'openPasswordPanel': function() { 83 'openPasswordPanel': function() {
86 var passwordGeneratorElement; 84 var passwordGeneratorElement;
87 var passwordGeneratorDialog; 85 var passwordGeneratorDialog;
88 var cancelButton; 86 var cancelButton;
89 var okButton; 87 var okButton;
90 var cancelFunction; 88 var cancelFunction;
91 var okFunction; 89 var okFunction;
92 90
93//MochiKit.Logging.logDebug(">>> PasswordGenerator.openPasswordPanel"); 91//MochiKit.Logging.logDebug(">>> PasswordGenerator.openPasswordPanel");
94 passwordGeneratorElement = Clipperz.YUI.DomHelper.append(document.body, {tag:'div', id:'passwordGenerator', children:[ 92 passwordGeneratorElement = Clipperz.YUI.DomHelper.append(document.body, {tag:'div', id:'passwordGenerator', children:[
95 {tag:'div', cls:'ydlg-hd', htmlString:Clipperz.PM.Strings['passwordGeneratorPanelTitle']}, 93 {tag:'div', cls:'ydlg-hd', htmlString:Clipperz.PM.Strings['passwordGeneratorPanelTitle']},
96 {tag:'div', cls:'ydlg-bd', children:[ 94 {tag:'div', cls:'ydlg-bd', children:[
97 {tag:'form', id:this.getId('passwordGeneratorForm'), cls:'passwordGenerator', children:[ 95 {tag:'form', id:this.getId('passwordGeneratorForm'), cls:'passwordGenerator', children:[
98 {tag:'input', type:'text', cls:'clipperz_passwordGenerator_password', id:this.getId('passwordField')}, 96 {tag:'input', type:'text', cls:'clipperz_passwordGenerator_password', id:this.getId('passwordField')},
99 {tag:'table', children:[ 97 {tag:'table', children:[
100 {tag:'tbody', children:[ 98 {tag:'tbody', children:[
101 {tag:'tr', children:[ 99 {tag:'tr', children:[
102 {tag:'td', width:'20%', children:[ 100 {tag:'td', width:'20%', children:[
103 {tag:'input', type:'checkbox', name:'lowercase', id:this.getId('lowercase'), checked:true}, 101 {tag:'input', type:'checkbox', name:'lowercase', id:this.getId('lowercase'), checked:true},
104 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLowercaseLabel']} 102 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLowercaseLabel']}
105 ]}, 103 ]},
106 {tag:'td', width:'20%', children:[ 104 {tag:'td', width:'20%', children:[
107 {tag:'input', type:'checkbox', name:'uppercase', id:this.getId('uppercase'), checked:true}, 105 {tag:'input', type:'checkbox', name:'uppercase', id:this.getId('uppercase'), checked:true},
108 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorUppercaseLabel']} 106 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorUppercaseLabel']}
109 ]}, 107 ]},
110 {tag:'td', width:'20%', children:[ 108 {tag:'td', width:'20%', children:[
111 {tag:'input', type:'checkbox', name:'numbers', id:this.getId('numbers'), checked:true}, 109 {tag:'input', type:'checkbox', name:'numbers', id:this.getId('numbers'), checked:true},
112 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorNumberLabel']} 110 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorNumberLabel']}
113 ]}, 111 ]},
114 {tag:'td', width:'20%', children:[ 112 {tag:'td', width:'20%', children:[
115 {tag:'input', type:'checkbox', name:'symbols', id:this.getId('symbols'), checked:true}, 113 {tag:'input', type:'checkbox', name:'symbols', id:this.getId('symbols'), checked:true},
116 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorSymbolLabel']} 114 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorSymbolLabel']}
117 ]}, 115 ]},
118 {tag:'td', width:'20%', children:[ 116 {tag:'td', width:'20%', children:[
119 {tag:'span', cls:'passwordGeneratorLength', children:[ 117 {tag:'span', cls:'passwordGeneratorLength', children:[
120 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLengthLabel']}, 118 {tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLengthLabel']},
121 {tag:'span', id:this.getId('passwordLength'), cls:'passwordGeneratorLengthValue', html:'0'} 119 {tag:'span', id:this.getId('passwordLength'), cls:'passwordGeneratorLengthValue', html:'0'}
122 ]} 120 ]}
123 ]} 121 ]}
124 ]} 122 ]}
125 ]} 123 ]}
126 ]} 124 ]}
127 ]} 125 ]}
128 ]}, 126 ]},
129 {tag:'div', cls:'ydlg-ft'} 127 {tag:'div', cls:'ydlg-ft'}
130 ]}, true); 128 ]}, true);
131 129
132 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('passwordField')); 130 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('passwordField'));
133 131
134 MochiKit.Signal.connect(this.getId('lowercase'), 'onclick', this, 'updatePasswordValue'); 132 MochiKit.Signal.connect(this.getId('lowercase'), 'onclick', this, 'updatePasswordValue');
135 MochiKit.Signal.connect(this.getId('uppercase'), 'onclick', this, 'updatePasswordValue'); 133 MochiKit.Signal.connect(this.getId('uppercase'), 'onclick', this, 'updatePasswordValue');
136 MochiKit.Signal.connect(this.getId('numbers'), 'onclick', this, 'updatePasswordValue'); 134 MochiKit.Signal.connect(this.getId('numbers'), 'onclick', this, 'updatePasswordValue');
137 MochiKit.Signal.connect(this.getId('symbols'), 'onclick', this, 'updatePasswordValue'); 135 MochiKit.Signal.connect(this.getId('symbols'), 'onclick', this, 'updatePasswordValue');
138 136
139 MochiKit.Signal.connect(this.getDom('passwordField'), 'onkeyup', this, 'updatePasswordLengthLabel'); 137 MochiKit.Signal.connect(this.getDom('passwordField'), 'onkeyup', this, 'updatePasswordLengthLabel');
140 MochiKit.Signal.connect(this.getDom('passwordField'), 'onchange', this, 'updatePasswordLengthLabel'); 138 MochiKit.Signal.connect(this.getDom('passwordField'), 'onchange', this, 'updatePasswordLengthLabel');
141 MochiKit.Signal.connect(this.getDom('passwordField'), 'onblur', this, 'updatePasswordLengthLabel'); 139 MochiKit.Signal.connect(this.getDom('passwordField'), 'onblur', this, 'updatePasswordLengthLabel');
142 140
143 this.updatePasswordValue(); 141 this.updatePasswordValue();
144 142
145 passwordGeneratorDialog = new YAHOO.ext.BasicDialog( 143 passwordGeneratorDialog = new YAHOO.ext.BasicDialog(
146 passwordGeneratorElement, { 144 passwordGeneratorElement, {
147 autoCreate:false, 145 autoCreate:false,
148 closable:false, 146 closable:false,
149 modal:true, 147 modal:true,
150 autoTabs:false, 148 autoTabs:false,
151 resizable:false, 149 resizable:false,
152 fixedcenter:true, 150 fixedcenter:true,
153 constraintoviewport:false, 151 constraintoviewport:false,
154 width:320, 152 width:320,
155 height:130, 153 height:130,
156 shadow:true, 154 shadow:true,
157 minWidth:200, 155 minWidth:200,
158 minHeight:100 156 minHeight:100
159 } 157 }
160 ); 158 );
161 159
162 cancelFunction = MochiKit.Base.partial(MochiKit.Base.bind(this.cancelPasswordPanel, this), passwordGeneratorDialog); 160 cancelFunction = MochiKit.Base.partial(MochiKit.Base.bind(this.cancelPasswordPanel, this), passwordGeneratorDialog);
163 passwordGeneratorDialog.addKeyListener(27, cancelFunction); 161 passwordGeneratorDialog.addKeyListener(27, cancelFunction);
164 cancelButton = passwordGeneratorDialog.addButton(Clipperz.PM.Strings['passwordGeneratorPanelCancelLabel'], cancelFunction, this); 162 cancelButton = passwordGeneratorDialog.addButton(Clipperz.PM.Strings['passwordGeneratorPanelCancelLabel'], cancelFunction, this);
165 163
166 okFunction = MochiKit.Base.partial(MochiKit.Base.bind(this.okPasswordPanel, this), passwordGeneratorDialog); 164 okFunction = MochiKit.Base.partial(MochiKit.Base.bind(this.okPasswordPanel, this), passwordGeneratorDialog);
167 passwordGeneratorDialog.addKeyListener([10, 13], okFunction); 165 passwordGeneratorDialog.addKeyListener([10, 13], okFunction);
168 okButton = passwordGeneratorDialog.addButton(Clipperz.PM.Strings['passwordGeneratorPanelOkLabel'], okFunction, this); 166 okButton = passwordGeneratorDialog.addButton(Clipperz.PM.Strings['passwordGeneratorPanelOkLabel'], okFunction, this);
169 167
170 MochiKit.Signal.connect(this.getId('passwordGeneratorForm'), 'onsubmit', okFunction); 168 MochiKit.Signal.connect(this.getId('passwordGeneratorForm'), 'onsubmit', okFunction);
171 169
172 passwordGeneratorDialog.setDefaultButton(okButton); 170 passwordGeneratorDialog.setDefaultButton(okButton);
173 171
174 this.fieldValueComponent().mainComponent().mainPanel().exitModalView(); 172 this.fieldValueComponent().mainComponent().mainPanel().exitModalView();
175 this.fieldValueComponent().mainComponent().scrollToTop(); 173 this.fieldValueComponent().mainComponent().scrollToTop();
176 174
177 // passwordGeneratorDialog.show(this.panelButton().getEl()); 175 // passwordGeneratorDialog.show(this.panelButton().getEl());
178 passwordGeneratorDialog.show(this.element()); 176 passwordGeneratorDialog.show(this.element());
179 this.onMouseLeave(); 177 this.onMouseLeave();
180 }, 178 },
181 179
182 //----------------------------------------------------- 180 //-----------------------------------------------------
183 181
184 'cancelPasswordPanel': function(aPasswordGeneratorPanel) { 182 'cancelPasswordPanel': function(aPasswordGeneratorPanel) {
185 this.fieldValueComponent().mainComponent().mainPanel().enterModalView(); 183 this.fieldValueComponent().mainComponent().mainPanel().enterModalView();
186 aPasswordGeneratorPanel.hide(MochiKit.Base.bind(function() { 184 aPasswordGeneratorPanel.hide(MochiKit.Base.bind(function() {
187 aPasswordGeneratorPanel.destroy(true); 185 aPasswordGeneratorPanel.destroy(true);
188 MochiKit.Signal.disconnectAllTo(this); 186 MochiKit.Signal.disconnectAllTo(this);
189 }, this)); 187 }, this));
190 }, 188 },
191 189
192 //----------------------------------------------------- 190 //-----------------------------------------------------
193 191
194 'updatePasswordLengthLabel': function() { 192 'updatePasswordLengthLabel': function() {
195 this.getElement('passwordLength').update(this.getDom('passwordField').value.length); 193 this.getElement('passwordLength').update(this.getDom('passwordField').value.length);
196 }, 194 },
197 195
198 //----------------------------------------------------- 196 //-----------------------------------------------------
199 197
200 'okPasswordPanel': function(aPasswordGeneratorPanel, anEvent) { 198 'okPasswordPanel': function(aPasswordGeneratorPanel, anEvent) {
201//MochiKit.Logging.logDebug(">>> PasswordGenerator.okPasswordPanel"); 199//MochiKit.Logging.logDebug(">>> PasswordGenerator.okPasswordPanel");
202 200
203 if (anEvent.stop) { 201 if (anEvent.stop) {
204 anEvent.stop(); 202 anEvent.stop();
205 } 203 }
206 204
207 this.fieldValueComponent().inputElement().dom.focus(); 205 this.fieldValueComponent().inputElement().dom.focus();
208 this.fieldValueComponent().inputElement().dom.value = this.getElement('passwordField').dom.value; 206 this.fieldValueComponent().inputElement().dom.value = this.getElement('passwordField').dom.value;
209 this.getElement('passwordField').dom.focus(); 207 this.getElement('passwordField').dom.focus();
210 this.cancelPasswordPanel(aPasswordGeneratorPanel); 208 this.cancelPasswordPanel(aPasswordGeneratorPanel);
211 209
212 return false; 210 return false;
213 }, 211 },
214 212
215 //----------------------------------------------------- 213 //-----------------------------------------------------
216 214
217 'updatePasswordValue': function(anEvent) { 215 'updatePasswordValue': function(anEvent) {
218 varrandomBytes; 216 varrandomBytes;
219 varrandomValue; 217 varrandomValue;
220 var charset; 218 var charset;
221 var charsetBitSize; 219 var charsetBitSize;
222 var stringValue; 220 var stringValue;
223 varblockIndex; 221 varblockIndex;
224 222
225//MochiKit.Logging.logDebug(">>> updatePasswordValue"); 223//MochiKit.Logging.logDebug(">>> updatePasswordValue");
226 randomBytes = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(50); 224 randomBytes = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(50);
227 stringValue = ""; 225 stringValue = "";
228 blockIndex = 0; 226 blockIndex = 0;
229 227
230 charset = ""; 228 charset = "";
231 if (this.getDom('lowercase').checked) { 229 if (this.getDom('lowercase').checked) {
232 charset += Clipperz.PM.Strings['passwordGeneratorLowercaseCharset']; 230 charset += Clipperz.PM.Strings['passwordGeneratorLowercaseCharset'];
233 } 231 }
234 if (this.getDom('uppercase').checked) { 232 if (this.getDom('uppercase').checked) {
235 charset += Clipperz.PM.Strings['passwordGeneratorUppercaseCharset']; 233 charset += Clipperz.PM.Strings['passwordGeneratorUppercaseCharset'];
236 } 234 }
237 if (this.getDom('numbers').checked) { 235 if (this.getDom('numbers').checked) {
238 charset += Clipperz.PM.Strings['passwordGeneratorNumberCharset']; 236 charset += Clipperz.PM.Strings['passwordGeneratorNumberCharset'];
239 } 237 }
240 if (this.getDom('symbols').checked) { 238 if (this.getDom('symbols').checked) {
241 charset += Clipperz.PM.Strings['passwordGeneratorSymbolCharset']; 239 charset += Clipperz.PM.Strings['passwordGeneratorSymbolCharset'];
242 } 240 }
243 241
244 charsetBitSize = 0; 242 charsetBitSize = 0;
245 while (Math.pow(2, charsetBitSize) < charset.length) { 243 while (Math.pow(2, charsetBitSize) < charset.length) {
246 charsetBitSize ++; 244 charsetBitSize ++;
247 } 245 }
248 246
249 if (charsetBitSize > 0) { 247 if (charsetBitSize > 0) {
250 while (Clipperz.PM.Crypto.passwordEntropy(stringValue) < 128) { 248 while (Clipperz.PM.Crypto.passwordEntropy(stringValue) < 128) {
251 if (((blockIndex + 1)*charsetBitSize) > (randomBytes.length() * 8)) { 249 if (((blockIndex + 1)*charsetBitSize) > (randomBytes.length() * 8)) {
252 randomBytes = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(50); 250 randomBytes = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(50);
253 blockIndex = 0; 251 blockIndex = 0;
254 } 252 }
255 randomValue = randomBytes.bitBlockAtIndexWithSize(blockIndex*charsetBitSize, charsetBitSize); 253 randomValue = randomBytes.bitBlockAtIndexWithSize(blockIndex*charsetBitSize, charsetBitSize);
256 if (randomValue < charset.length) { 254 if (randomValue < charset.length) {
257 stringValue += charset.charAt(randomValue); 255 stringValue += charset.charAt(randomValue);
258 } 256 }
259 257
260 blockIndex ++; 258 blockIndex ++;
261 } 259 }
262 } else { 260 } else {
263 stringValue = ""; 261 stringValue = "";
264 } 262 }
265 263
266 this.getElement('passwordField').dom.focus() 264 this.getElement('passwordField').dom.focus()
267 this.getElement('passwordField').dom.value = stringValue; 265 this.getElement('passwordField').dom.value = stringValue;
268 266
269 267
270 if (anEvent) { 268 if (anEvent) {
271 anEvent.src().focus(); 269 anEvent.src().focus();
272 } else { 270 } else {
273 this.element().focus(); 271 this.element().focus();
274 } 272 }
275 273
276 return false; 274 return false;
277//MochiKit.Logging.logDebug("<<< updatePasswordValue"); 275//MochiKit.Logging.logDebug("<<< updatePasswordValue");
278 }, 276 },
279 277
280 //----------------------------------------------------- 278 //-----------------------------------------------------
281 __syntaxFix__: '__syntaxFix__' 279 __syntaxFix__: '__syntaxFix__'
282}); 280});
diff --git a/frontend/beta/js/Clipperz/PM/Components/Printing/Footer.js b/frontend/beta/js/Clipperz/PM/Components/Printing/Footer.js
index b3debad..821dc94 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Printing/Footer.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Printing/Footer.js
@@ -1,25 +1,23 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
diff --git a/frontend/beta/js/Clipperz/PM/Components/Printing/Header.js b/frontend/beta/js/Clipperz/PM/Components/Printing/Header.js
index b3debad..821dc94 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Printing/Header.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Printing/Header.js
@@ -1,25 +1,23 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
diff --git a/frontend/beta/js/Clipperz/PM/Components/Printing/Record.js b/frontend/beta/js/Clipperz/PM/Components/Printing/Record.js
index 5f5c29f..170bd09 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Printing/Record.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Printing/Record.js
@@ -1,92 +1,90 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.Printing) == 'undefined') { Clipperz.PM.Components.Printing = {}; } 27if (typeof(Clipperz.PM.Components.Printing) == 'undefined') { Clipperz.PM.Components.Printing = {}; }
30 28
31Clipperz.PM.Components.Printing.Record = function(args) { 29Clipperz.PM.Components.Printing.Record = function(args) {
32 args = args || {}; 30 args = args || {};
33 31
34 this._record = args['record']; 32 this._record = args['record'];
35 33
36 return this; 34 return this;
37} 35}
38 36
39MochiKit.Base.update(Clipperz.PM.Components.Printing.Record.prototype, { 37MochiKit.Base.update(Clipperz.PM.Components.Printing.Record.prototype, {
40 38
41 'record': function() { 39 'record': function() {
42 return this._record; 40 return this._record;
43 }, 41 },
44 42
45 //------------------------------------------------------------------------- 43 //-------------------------------------------------------------------------
46 44
47 'deferredDrawToWindow': function(aWindow) { 45 'deferredDrawToWindow': function(aWindow) {
48 vardeferredResult; 46 vardeferredResult;
49 47
50 deferredResult = new MochiKit.Async.Deferred(); 48 deferredResult = new MochiKit.Async.Deferred();
51 deferredResult.addCallback(MochiKit.Base.method(this.record(), 'deferredData')); 49 deferredResult.addCallback(MochiKit.Base.method(this.record(), 'deferredData'));
52 deferredResult.addCallback(MochiKit.Base.method(this, 'appendToWindow', aWindow)); 50 deferredResult.addCallback(MochiKit.Base.method(this, 'appendToWindow', aWindow));
53 deferredResult.callback(); 51 deferredResult.callback();
54 return deferredResult; 52 return deferredResult;
55 }, 53 },
56 54
57 //------------------------------------------------------------------------- 55 //-------------------------------------------------------------------------
58 56
59 'appendToWindow': function(aWindow) { 57 'appendToWindow': function(aWindow) {
60 MochiKit.DOM.withWindow(aWindow, MochiKit.Base.bind(function() { 58 MochiKit.DOM.withWindow(aWindow, MochiKit.Base.bind(function() {
61 var newBlock; 59 var newBlock;
62 var fields; 60 var fields;
63 61
64 fields = MochiKit.Base.concat( 62 fields = MochiKit.Base.concat(
65 MochiKit.Base.map(MochiKit.Base.bind(function(aField) { 63 MochiKit.Base.map(MochiKit.Base.bind(function(aField) {
66 var result; 64 var result;
67 var dt, dd; 65 var dt, dd;
68 var label, value; 66 var label, value;
69 67
70 label = aField.label(); 68 label = aField.label();
71 value = aField.value(); 69 value = aField.value();
72 dt = MochiKit.DOM.createDOM('DT', null, label); 70 dt = MochiKit.DOM.createDOM('DT', null, label);
73 dd = MochiKit.DOM.createDOM('DD', null, value) 71 dd = MochiKit.DOM.createDOM('DD', null, value)
74 result = [dt, dd]; 72 result = [dt, dd];
75 73
76 return result 74 return result
77 }, this), MochiKit.Base.values(this.record().currentVersion().fields())) 75 }, this), MochiKit.Base.values(this.record().currentVersion().fields()))
78 ); 76 );
79 77
80 newBlock = MochiKit.DOM.DIV({'class': 'recordBlock'}, 78 newBlock = MochiKit.DOM.DIV({'class': 'recordBlock'},
81 MochiKit.DOM.H2(null, this.record().label()), 79 MochiKit.DOM.H2(null, this.record().label()),
82 MochiKit.DOM.DIV({'class': 'recordNotes'}, MochiKit.Base.map(MochiKit.Base.partial(MochiKit.DOM.P, null), this.record().notes().split("\n"))), 80 MochiKit.DOM.DIV({'class': 'recordNotes'}, MochiKit.Base.map(MochiKit.Base.partial(MochiKit.DOM.P, null), this.record().notes().split("\n"))),
83 MochiKit.DOM.createDOM('DL', null, fields) 81 MochiKit.DOM.createDOM('DL', null, fields)
84 ); 82 );
85 MochiKit.DOM.appendChildNodes(MochiKit.DOM.currentDocument().body, newBlock); 83 MochiKit.DOM.appendChildNodes(MochiKit.DOM.currentDocument().body, newBlock);
86 84
87 }, this)); 85 }, this));
88 }, 86 },
89 87
90 //------------------------------------------------------------------------- 88 //-------------------------------------------------------------------------
91 __syntaxFix__: "syntax fix" 89 __syntaxFix__: "syntax fix"
92}); 90});
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js
index 5b50284..d6fde5c 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js
@@ -1,102 +1,100 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.AbstractComponent = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.AbstractComponent = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.RecordDetail.AbstractComponent.superclass.constructor.call(this, args); 34 Clipperz.PM.Components.RecordDetail.AbstractComponent.superclass.constructor.call(this, args);
37 35
38 this._element = anElement; 36 this._element = anElement;
39 this._mainComponent = args.mainComponent; 37 this._mainComponent = args.mainComponent;
40 38
41 return this; 39 return this;
42} 40}
43 41
44//============================================================================= 42//=============================================================================
45 43
46YAHOO.extendX(Clipperz.PM.Components.RecordDetail.AbstractComponent, Clipperz.PM.Components.BaseComponent, { 44YAHOO.extendX(Clipperz.PM.Components.RecordDetail.AbstractComponent, Clipperz.PM.Components.BaseComponent, {
47 45
48 'toString': function() { 46 'toString': function() {
49 return "Clipperz.PM.Components.RecordDetail.AbstractComponent"; 47 return "Clipperz.PM.Components.RecordDetail.AbstractComponent";
50 }, 48 },
51 49
52 //------------------------------------------------------------------------- 50 //-------------------------------------------------------------------------
53 51
54 'mainComponent': function() { 52 'mainComponent': function() {
55 return this._mainComponent; 53 return this._mainComponent;
56 }, 54 },
57 55
58 //------------------------------------------------------------------------- 56 //-------------------------------------------------------------------------
59 57
60 'record': function() { 58 'record': function() {
61 return this.mainComponent().record(); 59 return this.mainComponent().record();
62 }, 60 },
63 61
64 //------------------------------------------------------------------------- 62 //-------------------------------------------------------------------------
65 63
66 'editMode': function() { 64 'editMode': function() {
67 return this.mainComponent().editMode(); 65 return this.mainComponent().editMode();
68 }, 66 },
69 67
70 //------------------------------------------------------------------------- 68 //-------------------------------------------------------------------------
71 69
72 'render': function() { 70 'render': function() {
73 this.element().update(""); 71 this.element().update("");
74 this.update(); 72 this.update();
75 }, 73 },
76 74
77 //------------------------------------------------------------------------- 75 //-------------------------------------------------------------------------
78 76
79 'update': function(anEvent) { 77 'update': function(anEvent) {
80 if (this.editMode() == 'EDIT') { 78 if (this.editMode() == 'EDIT') {
81 this.updateEditMode(); 79 this.updateEditMode();
82 } else if (this.editMode() == 'VIEW') { 80 } else if (this.editMode() == 'VIEW') {
83 this.updateViewMode(); 81 this.updateViewMode();
84 } 82 }
85 }, 83 },
86 84
87 //------------------------------------------------------------------------- 85 //-------------------------------------------------------------------------
88 86
89 'updateViewMode': function() {}, 87 'updateViewMode': function() {},
90 'updateEditMode': function() {}, 88 'updateEditMode': function() {},
91 'synchronizeComponentValues': function() {}, 89 'synchronizeComponentValues': function() {},
92 90
93 //------------------------------------------------------------------------- 91 //-------------------------------------------------------------------------
94 92
95 'destroy': function() { 93 'destroy': function() {
96 this.element().remove(); 94 this.element().remove();
97 }, 95 },
98 96
99 //------------------------------------------------------------------------- 97 //-------------------------------------------------------------------------
100 __syntaxFix__: "syntax fix" 98 __syntaxFix__: "syntax fix"
101}); 99});
102 100
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js
index ad733aa..ede42c2 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js
@@ -1,74 +1,72 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent.superclass.constructor.call(this, anElement, args);
37 35
38 this._fieldComponent = args.fieldComponent || null; 36 this._fieldComponent = args.fieldComponent || null;
39 37
40 this.render(); 38 this.render();
41 39
42 return this; 40 return this;
43} 41}
44 42
45//============================================================================= 43//=============================================================================
46 44
47YAHOO.extendX(Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 45YAHOO.extendX(Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
48 46
49 'toString': function() { 47 'toString': function() {
50 return "Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent"; 48 return "Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent";
51 }, 49 },
52 50
53 //------------------------------------------------------------------------- 51 //-------------------------------------------------------------------------
54 52
55 'fieldComponent': function() { 53 'fieldComponent': function() {
56 return this._fieldComponent; 54 return this._fieldComponent;
57 }, 55 },
58 56
59 //------------------------------------------------------------------------- 57 //-------------------------------------------------------------------------
60 58
61 'mainComponent': function() { 59 'mainComponent': function() {
62 return this.fieldComponent().mainComponent(); 60 return this.fieldComponent().mainComponent();
63 }, 61 },
64 62
65 //------------------------------------------------------------------------- 63 //-------------------------------------------------------------------------
66 64
67 'recordField': function() { 65 'recordField': function() {
68 return this.fieldComponent().recordField(); 66 return this.fieldComponent().recordField();
69 }, 67 },
70 68
71 //------------------------------------------------------------------------- 69 //-------------------------------------------------------------------------
72 __syntaxFix__: "syntax fix" 70 __syntaxFix__: "syntax fix"
73}); 71});
74 72
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js
index d4c7837..c703db4 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js
@@ -1,314 +1,312 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.CreationWizard = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.CreationWizard = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.RecordDetail.CreationWizard.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.RecordDetail.CreationWizard.superclass.constructor.call(this, anElement, args);
37 35
38 this._mainComponent = args.mainComponent; 36 this._mainComponent = args.mainComponent;
39 this._previouslySelectedRecord = args.previouslySelectedRecord; 37 this._previouslySelectedRecord = args.previouslySelectedRecord;
40//MochiKit.Logging.logDebug("--- new CreationWizard - previouslySelectedRecord: " + args.previouslySelectedRecord); 38//MochiKit.Logging.logDebug("--- new CreationWizard - previouslySelectedRecord: " + args.previouslySelectedRecord);
41 this._createButton_header = null; 39 this._createButton_header = null;
42 this._createButton_footer = null; 40 this._createButton_footer = null;
43 41
44 this._cancelButton_header = null; 42 this._cancelButton_header = null;
45 this._cancelButton_footer = null; 43 this._cancelButton_footer = null;
46 44
47 this.render(); 45 this.render();
48 46
49 return this; 47 return this;
50} 48}
51 49
52//============================================================================= 50//=============================================================================
53 51
54YAHOO.extendX(Clipperz.PM.Components.RecordDetail.CreationWizard, Clipperz.PM.Components.BaseComponent, { 52YAHOO.extendX(Clipperz.PM.Components.RecordDetail.CreationWizard, Clipperz.PM.Components.BaseComponent, {
55 53
56 'toString': function() { 54 'toString': function() {
57 return "Clipperz.PM.Components.RecordDetail.CreationWizard component"; 55 return "Clipperz.PM.Components.RecordDetail.CreationWizard component";
58 }, 56 },
59 57
60 //------------------------------------------------------------------------- 58 //-------------------------------------------------------------------------
61 59
62 'previouslySelectedRecord': function() { 60 'previouslySelectedRecord': function() {
63 return this._previouslySelectedRecord; 61 return this._previouslySelectedRecord;
64 }, 62 },
65 63
66 //------------------------------------------------------------------------- 64 //-------------------------------------------------------------------------
67 65
68 'render': function() { 66 'render': function() {
69 vartemplateListElement; 67 vartemplateListElement;
70 vartemplates; 68 vartemplates;
71 69
72 this.element().update(""); 70 this.element().update("");
73 71
74 Clipperz.YUI.DomHelper.append(this.element().dom, 72 Clipperz.YUI.DomHelper.append(this.element().dom,
75 {tag:'form', cls:'recordDataFORM', id:this.getId('form'), children:[ 73 {tag:'form', cls:'recordDataFORM', id:this.getId('form'), children:[
76 {tag:'div', id:'recordDetailDataBox', cls:'recordDetailDataBox', children:[ 74 {tag:'div', id:'recordDetailDataBox', cls:'recordDetailDataBox', children:[
77 {tag:'div', id:this.getId('wizardBox'), cls:'recordCreationWizard', children:[ 75 {tag:'div', id:this.getId('wizardBox'), cls:'recordCreationWizard', children:[
78 {tag:'div', id:this.getId('recordCreationWizardTitleBox'), cls:'recordCreationWizardTitleBox', htmlString:Clipperz.PM.Strings['newRecordWizardTitleBox']}, 76 {tag:'div', id:this.getId('recordCreationWizardTitleBox'), cls:'recordCreationWizardTitleBox', htmlString:Clipperz.PM.Strings['newRecordWizardTitleBox']},
79 {tag:'ul', id:this.getId('templateList'), cls:'radioList'} 77 {tag:'ul', id:this.getId('templateList'), cls:'radioList'}
80 ]} 78 ]}
81 ]} 79 ]}
82 ]} 80 ]}
83 ); 81 );
84 82
85 Clipperz.YUI.DomHelper.append(this.getDom('recordCreationWizardTitleBox'), {tag:'div', cls:'newRecordWizardHeader', children:[ 83 Clipperz.YUI.DomHelper.append(this.getDom('recordCreationWizardTitleBox'), {tag:'div', cls:'newRecordWizardHeader', children:[
86 {tag:'table', width:'100%', cellpadding:'5', children:[ 84 {tag:'table', width:'100%', cellpadding:'5', children:[
87 {tag:'tbody', children:[ 85 {tag:'tbody', children:[
88 {tag:'tr', children:[ 86 {tag:'tr', children:[
89 {tag:'td', width:'49%', align:'right', children:[ 87 {tag:'td', width:'49%', align:'right', children:[
90 {tag:'div', id:this.getId('cancelButton_header')} 88 {tag:'div', id:this.getId('cancelButton_header')}
91 ]}, 89 ]},
92 {tag:'td', width:'10', html:'&nbsp;'}, 90 {tag:'td', width:'10', html:'&nbsp;'},
93 {tag:'td', width:'49%', align:'left', children:[ 91 {tag:'td', width:'49%', align:'left', children:[
94 {tag:'div', id:this.getId('createButton_header')} 92 {tag:'div', id:this.getId('createButton_header')}
95 ]} 93 ]}
96 ]} 94 ]}
97 ]} 95 ]}
98 ]} 96 ]}
99 ]}); 97 ]});
100 98
101 templateListElement = this.getElement('templateList'); 99 templateListElement = this.getElement('templateList');
102 templates = Clipperz.PM.Strings['recordTemplates']; 100 templates = Clipperz.PM.Strings['recordTemplates'];
103 MochiKit.Iter.forEach(MochiKit.Base.keys(templates), MochiKit.Base.bind(function(aTemplateKey) { 101 MochiKit.Iter.forEach(MochiKit.Base.keys(templates), MochiKit.Base.bind(function(aTemplateKey) {
104 Clipperz.YUI.DomHelper.append(templateListElement.dom, {tag:'li', children:[ 102 Clipperz.YUI.DomHelper.append(templateListElement.dom, {tag:'li', children:[
105 {tag:'table', children:[ 103 {tag:'table', children:[
106 {tag:'tbody', children:[ 104 {tag:'tbody', children:[
107 {tag:'tr', children:[ 105 {tag:'tr', children:[
108 {tag:'td', valign:'top', children:[ 106 {tag:'td', valign:'top', children:[
109 {tag:'input', id:this.getId(aTemplateKey+"_radio"), type:'radio', name:'recordTemplate', value:"aTemplateKey"} 107 {tag:'input', id:this.getId(aTemplateKey+"_radio"), type:'radio', name:'recordTemplate', value:"aTemplateKey"}
110 ]}, 108 ]},
111 {tag:'td', valign:'top', children:[ 109 {tag:'td', valign:'top', children:[
112 {tag:'h4', id:this.getId(aTemplateKey+"_title"), html:templates[aTemplateKey]['title']}, 110 {tag:'h4', id:this.getId(aTemplateKey+"_title"), html:templates[aTemplateKey]['title']},
113 {tag:'div', cls:'templateDescription', htmlString:templates[aTemplateKey]['description']} 111 {tag:'div', cls:'templateDescription', htmlString:templates[aTemplateKey]['description']}
114 ]} 112 ]}
115 ]} 113 ]}
116 ]} 114 ]}
117 ]} 115 ]}
118 ]}); 116 ]});
119 this.getElement(aTemplateKey+"_radio").dom.value = aTemplateKey; 117 this.getElement(aTemplateKey+"_radio").dom.value = aTemplateKey;
120 MochiKit.Signal.connect(this.getDom(aTemplateKey+"_title"), 'onclick', MochiKit.Base.partial(function(aRadioButton) {aRadioButton.click();}, this.getDom(aTemplateKey+"_radio"))); 118 MochiKit.Signal.connect(this.getDom(aTemplateKey+"_title"), 'onclick', MochiKit.Base.partial(function(aRadioButton) {aRadioButton.click();}, this.getDom(aTemplateKey+"_radio")));
121 }, this)); 119 }, this));
122 120
123 Clipperz.YUI.DomHelper.append(templateListElement.dom, {tag:'li', children:[ 121 Clipperz.YUI.DomHelper.append(templateListElement.dom, {tag:'li', children:[
124 {tag:'table', children:[ 122 {tag:'table', children:[
125 {tag:'tbody', children:[ 123 {tag:'tbody', children:[
126 {tag:'tr', children:[ 124 {tag:'tr', children:[
127 {tag:'td', valign:'top', children:[ 125 {tag:'td', valign:'top', children:[
128 {tag:'input', type:'radio', name:'recordTemplate', id:this.getId('bookmarkletRadioButton'), value:'BookmarkletConfigurationTemplate'} 126 {tag:'input', type:'radio', name:'recordTemplate', id:this.getId('bookmarkletRadioButton'), value:'BookmarkletConfigurationTemplate'}
129 ]}, 127 ]},
130 {tag:'td', valign:'top', children:[ 128 {tag:'td', valign:'top', children:[
131 {tag:'h4', htmlString:Clipperz.PM.Strings['newRecordWizardBookmarkletConfigurationTitle']}, 129 {tag:'h4', htmlString:Clipperz.PM.Strings['newRecordWizardBookmarkletConfigurationTitle']},
132 {tag:'div', cls:'templateDescription', htmlString:Clipperz.PM.Strings['newRecordWizardBookmarkletConfigurationDescription']}, 130 {tag:'div', cls:'templateDescription', htmlString:Clipperz.PM.Strings['newRecordWizardBookmarkletConfigurationDescription']},
133 {tag:'div', cls:'bookmarkletConfiguration', children:[ 131 {tag:'div', cls:'bookmarkletConfiguration', children:[
134 // {tag:'span', htmlString:Clipperz.PM.Strings['newRecordWizardBookmarkletConfigurationLabel']}, 132 // {tag:'span', htmlString:Clipperz.PM.Strings['newRecordWizardBookmarkletConfigurationLabel']},
135 {tag:'div', htmlString:Clipperz.PM.Strings['recordDetailNewDirectLoginDescription']}, 133 {tag:'div', htmlString:Clipperz.PM.Strings['recordDetailNewDirectLoginDescription']},
136 {tag:'textarea', id:this.getId('bookmarkletConfiguration')} 134 {tag:'textarea', id:this.getId('bookmarkletConfiguration')}
137 ]} 135 ]}
138 ]} 136 ]}
139 ]} 137 ]}
140 ]} 138 ]}
141 ]} 139 ]}
142 ]}); 140 ]});
143 141
144 Clipperz.YUI.DomHelper.append(this.getDom('wizardBox'), {tag:'div', cls:'newRecordWizardFooter', children:[ 142 Clipperz.YUI.DomHelper.append(this.getDom('wizardBox'), {tag:'div', cls:'newRecordWizardFooter', children:[
145 {tag:'table', width:'100%', cellpadding:'5', children:[ 143 {tag:'table', width:'100%', cellpadding:'5', children:[
146 {tag:'tbody', children:[ 144 {tag:'tbody', children:[
147 {tag:'tr', children:[ 145 {tag:'tr', children:[
148 {tag:'td', width:'49%', align:'right', children:[ 146 {tag:'td', width:'49%', align:'right', children:[
149 {tag:'div', id:this.getId('cancelButton_footer')} 147 {tag:'div', id:this.getId('cancelButton_footer')}
150 ]}, 148 ]},
151 {tag:'td', width:'10', html:'&nbsp;'}, 149 {tag:'td', width:'10', html:'&nbsp;'},
152 {tag:'td', width:'49%', align:'left', children:[ 150 {tag:'td', width:'49%', align:'left', children:[
153 {tag:'div', id:this.getId('createButton_footer')} 151 {tag:'div', id:this.getId('createButton_footer')}
154 ]} 152 ]}
155 ]} 153 ]}
156 ]} 154 ]}
157 ]} 155 ]}
158 ]}); 156 ]});
159 157
160 this.setCreateButton_header(new YAHOO.ext.Button(this.getDom('createButton_header'), {text:Clipperz.PM.Strings['newRecordWizardCreateButtonLabel'], handler:this.createRecord, scope:this})); 158 this.setCreateButton_header(new YAHOO.ext.Button(this.getDom('createButton_header'), {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})); 159 this.setCreateButton_footer(new YAHOO.ext.Button(this.getDom('createButton_footer'), {text:Clipperz.PM.Strings['newRecordWizardCreateButtonLabel'], handler:this.createRecord, scope:this}));
162 160
163 this.setCancelButton_header(new YAHOO.ext.Button(this.getDom('cancelButton_header'), {text:Clipperz.PM.Strings['newRecordWizardCancelButtonLabel'], handler:this.exitWizard, scope:this})); 161 this.setCancelButton_header(new YAHOO.ext.Button(this.getDom('cancelButton_header'), {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})); 162 this.setCancelButton_footer(new YAHOO.ext.Button(this.getDom('cancelButton_footer'), {text:Clipperz.PM.Strings['newRecordWizardCancelButtonLabel'], handler:this.exitWizard, scope:this}));
165 163
166 this.createButton_header().disable(); 164 this.createButton_header().disable();
167 this.createButton_footer().disable(); 165 this.createButton_footer().disable();
168 166
169 MochiKit.Iter.forEach(this.getElement('form').getChildrenByTagName('input'), MochiKit.Base.bind(function(anInput) { 167 MochiKit.Iter.forEach(this.getElement('form').getChildrenByTagName('input'), MochiKit.Base.bind(function(anInput) {
170 // MochiKit.Signal.connect(anInput.dom, 'onchange', this, 'enableCreateButton'); 168 // MochiKit.Signal.connect(anInput.dom, 'onchange', this, 'enableCreateButton');
171 MochiKit.Signal.connect(anInput.dom, 'onclick', this, 'enableCreateButton'); //for Safari 169 MochiKit.Signal.connect(anInput.dom, 'onclick', this, 'enableCreateButton'); //for Safari
172 },this)); 170 },this));
173 171
174 MochiKit.Signal.connect(this.getDom('bookmarkletConfiguration'), 'onkeyup', this, 'enableCreateButton'); 172 MochiKit.Signal.connect(this.getDom('bookmarkletConfiguration'), 'onkeyup', this, 'enableCreateButton');
175 MochiKit.Signal.connect(this.getDom('bookmarkletConfiguration'), 'onkeydown', this, 'enableCreateButton'); //for Safari 173 MochiKit.Signal.connect(this.getDom('bookmarkletConfiguration'), 'onkeydown', this, 'enableCreateButton'); //for Safari
176 }, 174 },
177 175
178 //------------------------------------------------------------------------- 176 //-------------------------------------------------------------------------
179 177
180 'createButton_header': function() { 178 'createButton_header': function() {
181 return this._createButton_header; 179 return this._createButton_header;
182 }, 180 },
183 181
184 'setCreateButton_header': function(aValue) { 182 'setCreateButton_header': function(aValue) {
185 this._createButton_header = aValue; 183 this._createButton_header = aValue;
186 }, 184 },
187 185
188 //......................................................................... 186 //.........................................................................
189 187
190 'createButton_footer': function() { 188 'createButton_footer': function() {
191 return this._createButton_footer; 189 return this._createButton_footer;
192 }, 190 },
193 191
194 'setCreateButton_footer': function(aValue) { 192 'setCreateButton_footer': function(aValue) {
195 this._createButton_footer = aValue; 193 this._createButton_footer = aValue;
196 }, 194 },
197 195
198 196
199 //------------------------------------------------------------------------- 197 //-------------------------------------------------------------------------
200 198
201 'cancelButton_header': function() { 199 'cancelButton_header': function() {
202 return this._cancelButton_header; 200 return this._cancelButton_header;
203 }, 201 },
204 202
205 'setCancelButton_header': function(aValue) { 203 'setCancelButton_header': function(aValue) {
206 this._cancelButton_header = aValue; 204 this._cancelButton_header = aValue;
207 }, 205 },
208 206
209 //......................................................................... 207 //.........................................................................
210 208
211 'cancelButton_footer': function() { 209 'cancelButton_footer': function() {
212 return this._cancelButton_footer; 210 return this._cancelButton_footer;
213 }, 211 },
214 212
215 'setCancelButton_footer': function(aValue) { 213 'setCancelButton_footer': function(aValue) {
216 this._cancelButton_footer = aValue; 214 this._cancelButton_footer = aValue;
217 }, 215 },
218 216
219 //------------------------------------------------------------------------- 217 //-------------------------------------------------------------------------
220 218
221 'enableCreateButton': function(anEvent, skipKeyDownCheck) { 219 'enableCreateButton': function(anEvent, skipKeyDownCheck) {
222//MochiKit.Logging.logDebug(">>> CreationWizard.enableCreateButton (" + anEvent.type() + ")"); 220//MochiKit.Logging.logDebug(">>> CreationWizard.enableCreateButton (" + anEvent.type() + ")");
223 if ((anEvent.type() == "keydown") && (skipKeyDownCheck != true)) { 221 if ((anEvent.type() == "keydown") && (skipKeyDownCheck != true)) {
224//MochiKit.Logging.logDebug("--- CreationWizard.enableCreateButton - handling 'keydown' event with a postponed execution of the check"); 222//MochiKit.Logging.logDebug("--- CreationWizard.enableCreateButton - handling 'keydown' event with a postponed execution of the check");
225 MochiKit.Async.callLater(0.3, MochiKit.Base.method(this, 'enableCreateButton', anEvent, true)); 223 MochiKit.Async.callLater(0.3, MochiKit.Base.method(this, 'enableCreateButton', anEvent, true));
226 } else { 224 } else {
227 var shouldEnableCreateButton; 225 var shouldEnableCreateButton;
228 var isBookmarkletConfigurationEmpty; 226 var isBookmarkletConfigurationEmpty;
229 227
230//MochiKit.Logging.logDebug("--- CreationWizard.enableCreateButton - common execution"); 228//MochiKit.Logging.logDebug("--- CreationWizard.enableCreateButton - common execution");
231 229
232 shouldEnableCreateButton = true; 230 shouldEnableCreateButton = true;
233 231
234 isBookmarkletConfigurationEmpty = !/[^ \n]/.test(this.getDom('bookmarkletConfiguration').value); 232 isBookmarkletConfigurationEmpty = !/[^ \n]/.test(this.getDom('bookmarkletConfiguration').value);
235//MochiKit.Logging.logDebug("--- CreationWizard.enableCreateButton - isBookmarkletConfigurationEmpty: " + isBookmarkletConfigurationEmpty); 233//MochiKit.Logging.logDebug("--- CreationWizard.enableCreateButton - isBookmarkletConfigurationEmpty: " + isBookmarkletConfigurationEmpty);
236 234
237 if ((anEvent.src() == this.getDom('bookmarkletConfiguration')) && !isBookmarkletConfigurationEmpty) { 235 if ((anEvent.src() == this.getDom('bookmarkletConfiguration')) && !isBookmarkletConfigurationEmpty) {
238 this.getDom('bookmarkletRadioButton').checked = true; 236 this.getDom('bookmarkletRadioButton').checked = true;
239 } 237 }
240 238
241 if ((this.getDom('bookmarkletRadioButton').checked) && isBookmarkletConfigurationEmpty) { 239 if ((this.getDom('bookmarkletRadioButton').checked) && isBookmarkletConfigurationEmpty) {
242 shouldEnableCreateButton = false; 240 shouldEnableCreateButton = false;
243 } 241 }
244 242
245 if (shouldEnableCreateButton) { 243 if (shouldEnableCreateButton) {
246//MochiKit.Logging.logDebug("--- CreationWizard.enableCreateButton - enabling button"); 244//MochiKit.Logging.logDebug("--- CreationWizard.enableCreateButton - enabling button");
247 this.createButton_header().enable(); 245 this.createButton_header().enable();
248 this.createButton_footer().enable(); 246 this.createButton_footer().enable();
249 } else { 247 } else {
250//MochiKit.Logging.logDebug("--- CreationWizard.enableCreateButton - disabling button"); 248//MochiKit.Logging.logDebug("--- CreationWizard.enableCreateButton - disabling button");
251 this.createButton_header().disable(); 249 this.createButton_header().disable();
252 this.createButton_footer().disable(); 250 this.createButton_footer().disable();
253 } 251 }
254 } 252 }
255//MochiKit.Logging.logDebug("<<< CreationWizard.enableCreateButton"); 253//MochiKit.Logging.logDebug("<<< CreationWizard.enableCreateButton");
256 }, 254 },
257 255
258 //------------------------------------------------------------------------- 256 //-------------------------------------------------------------------------
259 257
260 'createRecord': function() { 258 'createRecord': function() {
261 varselectedTemplateKey; 259 varselectedTemplateKey;
262 varnewRecord; 260 varnewRecord;
263 261
264 selectedTemplateKey = MochiKit.Base.filter(function(aCheckBoxElement) { 262 selectedTemplateKey = MochiKit.Base.filter(function(aCheckBoxElement) {
265 return aCheckBoxElement.dom.checked; 263 return aCheckBoxElement.dom.checked;
266 },this.getElement('form').getChildrenByTagName('input'))[0].dom.value; 264 },this.getElement('form').getChildrenByTagName('input'))[0].dom.value;
267 265
268//MochiKit.Logging.logDebug("--- CreationWizard.createRecord - selectedTemplateKey: " + selectedTemplateKey); 266//MochiKit.Logging.logDebug("--- CreationWizard.createRecord - selectedTemplateKey: " + selectedTemplateKey);
269 if (selectedTemplateKey == 'BookmarkletConfigurationTemplate') { 267 if (selectedTemplateKey == 'BookmarkletConfigurationTemplate') {
270 var bookmarkletConfiguration; 268 var bookmarkletConfiguration;
271 269
272 this.mainComponent().exitModalView(); 270 this.mainComponent().exitModalView();
273 bookmarkletConfiguration = Clipperz.PM.BookmarkletProcessor.checkBookmarkletConfiguration(this.getDom('bookmarkletConfiguration').value, this.getDom('createButton'), MochiKit.Base.method(this.mainComponent(), 'enterModalView')); 271 bookmarkletConfiguration = Clipperz.PM.BookmarkletProcessor.checkBookmarkletConfiguration(this.getDom('bookmarkletConfiguration').value, this.getDom('createButton'), MochiKit.Base.method(this.mainComponent(), 'enterModalView'));
274 this.mainComponent().enterModalView(); 272 this.mainComponent().enterModalView();
275 newRecord = Clipperz.PM.BookmarkletProcessor.createRecordFromBookmarkletConfiguration(this.mainComponent().user(), bookmarkletConfiguration); 273 newRecord = Clipperz.PM.BookmarkletProcessor.createRecordFromBookmarkletConfiguration(this.mainComponent().user(), bookmarkletConfiguration);
276 } else { 274 } else {
277 varfieldsConfigurations; 275 varfieldsConfigurations;
278 276
279 newRecord = this.mainComponent().user().addNewRecord(); 277 newRecord = this.mainComponent().user().addNewRecord();
280 newRecord.setLabel(Clipperz.PM.Strings['recordTemplates'][selectedTemplateKey]['title']); 278 newRecord.setLabel(Clipperz.PM.Strings['recordTemplates'][selectedTemplateKey]['title']);
281 279
282 fieldsConfigurations = Clipperz.PM.Strings['recordTemplates'][selectedTemplateKey]['fields']; 280 fieldsConfigurations = Clipperz.PM.Strings['recordTemplates'][selectedTemplateKey]['fields'];
283 281
284 MochiKit.Iter.forEach(fieldsConfigurations, MochiKit.Base.partial(function(aRecord, aFieldConfiguration) { 282 MochiKit.Iter.forEach(fieldsConfigurations, MochiKit.Base.partial(function(aRecord, aFieldConfiguration) {
285 var newField; 283 var newField;
286 284
287 newField = new Clipperz.PM.DataModel.RecordField({recordVersion:aRecord.currentVersion()}); 285 newField = new Clipperz.PM.DataModel.RecordField({recordVersion:aRecord.currentVersion()});
288 newField.setLabel(aFieldConfiguration['label']); 286 newField.setLabel(aFieldConfiguration['label']);
289 newField.setType(aFieldConfiguration['type']); 287 newField.setType(aFieldConfiguration['type']);
290 aRecord.currentVersion().addField(newField); 288 aRecord.currentVersion().addField(newField);
291 }, newRecord)); 289 }, newRecord));
292 } 290 }
293 291
294 this.mainComponent().exitWizard(newRecord, true); 292 this.mainComponent().exitWizard(newRecord, true);
295 }, 293 },
296 294
297 //------------------------------------------------------------------------- 295 //-------------------------------------------------------------------------
298 296
299 'exitWizard': function() { 297 'exitWizard': function() {
300//MochiKit.Logging.logDebug(">>> CreationWizard.exitWizard - " + this.previouslySelectedRecord()); 298//MochiKit.Logging.logDebug(">>> CreationWizard.exitWizard - " + this.previouslySelectedRecord());
301 this.mainComponent().exitWizard(this.previouslySelectedRecord()); 299 this.mainComponent().exitWizard(this.previouslySelectedRecord());
302//MochiKit.Logging.logDebug("<<< CreationWizard.exitWizard"); 300//MochiKit.Logging.logDebug("<<< CreationWizard.exitWizard");
303 }, 301 },
304 302
305 //------------------------------------------------------------------------- 303 //-------------------------------------------------------------------------
306 304
307 'mainComponent': function() { 305 'mainComponent': function() {
308 return this._mainComponent; 306 return this._mainComponent;
309 }, 307 },
310 308
311 //------------------------------------------------------------------------- 309 //-------------------------------------------------------------------------
312 __syntaxFix__: "syntax fix" 310 __syntaxFix__: "syntax fix"
313}); 311});
314 312
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js
index 36dd9a8..0e4640e 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js
@@ -1,171 +1,169 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent = function(anElement, args) {
34//MochiKit.Logging.logDebug(">>> new DirectLoginBindingComponent"); 32//MochiKit.Logging.logDebug(">>> new DirectLoginBindingComponent");
35 args = args || {}; 33 args = args || {};
36 34
37 Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent.superclass.constructor.call(this, anElement, args); 35 Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent.superclass.constructor.call(this, anElement, args);
38 36
39 this._directLoginBinding = args.directLoginBinding || null; 37 this._directLoginBinding = args.directLoginBinding || null;
40 this.render(); 38 this.render();
41 39
42 Clipperz.NotificationCenter.register(this.record(), 'addNewRecordField',this, 'syncAndUpdateEditMode'); 40 Clipperz.NotificationCenter.register(this.record(), 'addNewRecordField',this, 'syncAndUpdateEditMode');
43 Clipperz.NotificationCenter.register(this.record(), 'removedField', this, 'syncAndUpdateEditMode'); 41 Clipperz.NotificationCenter.register(this.record(), 'removedField', this, 'syncAndUpdateEditMode');
44 Clipperz.NotificationCenter.register(this.record(), 'updatedFieldLabel',this, 'syncAndUpdateEditMode'); 42 Clipperz.NotificationCenter.register(this.record(), 'updatedFieldLabel',this, 'syncAndUpdateEditMode');
45//MochiKit.Logging.logDebug("<<< new DirectLoginBindingComponent"); 43//MochiKit.Logging.logDebug("<<< new DirectLoginBindingComponent");
46 44
47 return this; 45 return this;
48} 46}
49 47
50//============================================================================= 48//=============================================================================
51 49
52YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 50YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
53 51
54 'toString': function() { 52 'toString': function() {
55 return "Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent component"; 53 return "Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent component";
56 }, 54 },
57 55
58 //------------------------------------------------------------------------- 56 //-------------------------------------------------------------------------
59 57
60 'directLoginBinding': function() { 58 'directLoginBinding': function() {
61 return this._directLoginBinding; 59 return this._directLoginBinding;
62 }, 60 },
63 61
64 //------------------------------------------------------------------------- 62 //-------------------------------------------------------------------------
65 63
66 'render': function() { 64 'render': function() {
67 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', style:'font-weight:bold;', html:this.directLoginBinding().key()}) 65 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', style:'font-weight:bold;', html:this.directLoginBinding().key()})
68 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', html:this.directLoginBinding().value()}) 66 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', html:this.directLoginBinding().value()})
69//MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.render"); 67//MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.render");
70 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginBindingLabelTD', children:[ 68 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginBindingLabelTD', children:[
71 {tag:'span', html:this.directLoginBinding().key()} 69 {tag:'span', html:this.directLoginBinding().key()}
72 ]}); 70 ]});
73//MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.render - 1"); 71//MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.render - 1");
74 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginBindingValueTD', children:[ 72 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginBindingValueTD', children:[
75 {tag:'div', id:this.getId('editModeBox'), children:[ 73 {tag:'div', id:this.getId('editModeBox'), children:[
76 {tag:'select', id:this.getId('select'), children:this.recordFieldOptions()} 74 {tag:'select', id:this.getId('select'), children:this.recordFieldOptions()}
77 ]}, 75 ]},
78 {tag:'div', id:this.getId('viewModeBox'), children:[ 76 {tag:'div', id:this.getId('viewModeBox'), children:[
79 {tag:'span', id:this.getId('viewValue'), html:""} 77 {tag:'span', id:this.getId('viewValue'), html:""}
80 ]} 78 ]}
81 ]}); 79 ]});
82//MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.render - 2"); 80//MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.render - 2");
83 this.getElement('editModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 81 this.getElement('editModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
84 this.getElement('viewModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 82 this.getElement('viewModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
85 83
86 this.update(); 84 this.update();
87//MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.render"); 85//MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.render");
88 }, 86 },
89 87
90 //------------------------------------------------------------------------- 88 //-------------------------------------------------------------------------
91 89
92 'recordFieldOptions': function() { 90 'recordFieldOptions': function() {
93 varresult; 91 varresult;
94 var option; 92 var option;
95 varrecordFieldKey; 93 varrecordFieldKey;
96 varrecordFields; 94 varrecordFields;
97 95
98//MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.recordFieldOptions"); 96//MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.recordFieldOptions");
99 recordFields = this.directLoginBinding().directLogin().record().currentVersion().fields(); 97 recordFields = this.directLoginBinding().directLogin().record().currentVersion().fields();
100 result = []; 98 result = [];
101 option = {tag:'option', value:null, html:'---'}; 99 option = {tag:'option', value:null, html:'---'};
102 result.push(option); 100 result.push(option);
103 for (recordFieldKey in recordFields) { 101 for (recordFieldKey in recordFields) {
104 //TODO: remove the value: field and replace it with element.dom.value = <some value> 102 //TODO: remove the value: field and replace it with element.dom.value = <some value>
105 option = {tag:'option', value:recordFieldKey, html:recordFields[recordFieldKey].label()} 103 option = {tag:'option', value:recordFieldKey, html:recordFields[recordFieldKey].label()}
106 if (recordFieldKey == this.directLoginBinding().fieldKey()) { 104 if (recordFieldKey == this.directLoginBinding().fieldKey()) {
107 option['selected'] = true; 105 option['selected'] = true;
108 } 106 }
109 result.push(option); 107 result.push(option);
110 } 108 }
111//MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.recordFieldOptions"); 109//MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.recordFieldOptions");
112 110
113 return result; 111 return result;
114 }, 112 },
115 113
116 //------------------------------------------------------------------------- 114 //-------------------------------------------------------------------------
117 115
118 'syncAndUpdateEditMode': function() { 116 'syncAndUpdateEditMode': function() {
119 this.synchronizeComponentValues(); 117 this.synchronizeComponentValues();
120 this.updateEditMode(); 118 this.updateEditMode();
121 }, 119 },
122 120
123 'updateEditMode': function() { 121 'updateEditMode': function() {
124 varselectElementBox; 122 varselectElementBox;
125 123
126//MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.updateEditMode"); 124//MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.updateEditMode");
127 this.getElement('viewModeBox').hide(); 125 this.getElement('viewModeBox').hide();
128 126
129 selectElementBox = this.getElement('editModeBox'); 127 selectElementBox = this.getElement('editModeBox');
130 selectElementBox.update(""); 128 selectElementBox.update("");
131 129
132 Clipperz.YUI.DomHelper.append(selectElementBox.dom, {tag:'select', id:this.getId('select'), children:this.recordFieldOptions()}); 130 Clipperz.YUI.DomHelper.append(selectElementBox.dom, {tag:'select', id:this.getId('select'), children:this.recordFieldOptions()});
133 131
134/* 132/*
135 selectElement = this.getElement('select'); 133 selectElement = this.getElement('select');
136 134
137 selectElement.update(""); 135 selectElement.update("");
138 MochiKit.Iter.forEach(this.recordFieldOptions(), function(anOption) { 136 MochiKit.Iter.forEach(this.recordFieldOptions(), function(anOption) {
139 Clipperz.YUI.DomHelper.append(selectElement.dom, anOption); 137 Clipperz.YUI.DomHelper.append(selectElement.dom, anOption);
140 }); 138 });
141*/ 139*/
142 140
143 141
144 this.getElement('editModeBox').show(); 142 this.getElement('editModeBox').show();
145//MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.updateEditMode"); 143//MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.updateEditMode");
146 }, 144 },
147 145
148 //------------------------------------------------------------------------- 146 //-------------------------------------------------------------------------
149 147
150 'updateViewMode': function() { 148 'updateViewMode': function() {
151//MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.updateViewMode"); 149//MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.updateViewMode");
152 this.getElement('editModeBox').hide(); 150 this.getElement('editModeBox').hide();
153 this.getElement('viewModeBox').show(); 151 this.getElement('viewModeBox').show();
154 152
155 this.getElement('viewValue').update(this.directLoginBinding().field().label()); 153 this.getElement('viewValue').update(this.directLoginBinding().field().label());
156//MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.updateViewMode"); 154//MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.updateViewMode");
157 }, 155 },
158 156
159 //------------------------------------------------------------------------- 157 //-------------------------------------------------------------------------
160 158
161 'synchronizeComponentValues': function() { 159 'synchronizeComponentValues': function() {
162//MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.synchronizeComponentValues") 160//MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.synchronizeComponentValues")
163//MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.synchronizeComponentValues - 1 - " + this.getId('select')); 161//MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.synchronizeComponentValues - 1 - " + this.getId('select'));
164 this.directLoginBinding().setFieldKey(this.getDom('select').value); 162 this.directLoginBinding().setFieldKey(this.getDom('select').value);
165//MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.synchronizeComponentValues"); 163//MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.synchronizeComponentValues");
166 }, 164 },
167 165
168 //------------------------------------------------------------------------- 166 //-------------------------------------------------------------------------
169 __syntaxFix__: "syntax fix" 167 __syntaxFix__: "syntax fix"
170}); 168});
171 169
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js
index 69cad79..883c45c 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js
@@ -1,359 +1,357 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.DirectLoginComponent = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.DirectLoginComponent = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.RecordDetail.DirectLoginComponent.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.RecordDetail.DirectLoginComponent.superclass.constructor.call(this, anElement, args);
37 35
38 this._directLogin = args.directLogin || null; 36 this._directLogin = args.directLogin || null;
39 //this._titleElement = null; 37 //this._titleElement = null;
40 this._structureElement = null; 38 this._structureElement = null;
41 this._removeButton = null; 39 this._removeButton = null;
42 this._directLoginBindingComponents = null; 40 this._directLoginBindingComponents = null;
43 this._collapser = null; 41 this._collapser = null;
44 42
45 this.mainComponent().addEditComponent(this); 43 this.mainComponent().addEditComponent(this);
46 this.render(); 44 this.render();
47 45
48 return this; 46 return this;
49} 47}
50 48
51//============================================================================= 49//=============================================================================
52 50
53YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 51YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
54 52
55 'toString': function() { 53 'toString': function() {
56 return "Clipperz.PM.Components.RecordDetail.DirectLoginComponent component"; 54 return "Clipperz.PM.Components.RecordDetail.DirectLoginComponent component";
57 }, 55 },
58 56
59 //------------------------------------------------------------------------- 57 //-------------------------------------------------------------------------
60 58
61 'directLogin': function() { 59 'directLogin': function() {
62 return this._directLogin; 60 return this._directLogin;
63 }, 61 },
64 62
65 'directLoginBindingComponents': function() { 63 'directLoginBindingComponents': function() {
66 return this._directLoginBindingComponents; 64 return this._directLoginBindingComponents;
67 }, 65 },
68 66
69 //------------------------------------------------------------------------- 67 //-------------------------------------------------------------------------
70 68
71 'removeDirectLogin': function() { 69 'removeDirectLogin': function() {
72//MochiKit.Logging.logDebug(">>> DirectLoginComponent.removeDirectLogin"); 70//MochiKit.Logging.logDebug(">>> DirectLoginComponent.removeDirectLogin");
73 this.mainComponent().synchronizeComponentValues(); 71 this.mainComponent().synchronizeComponentValues();
74 this.directLogin().remove(); 72 this.directLogin().remove();
75 this.mainComponent().removeEditComponent(this); 73 this.mainComponent().removeEditComponent(this);
76 this.mainComponent().render(); 74 this.mainComponent().render();
77//MochiKit.Logging.logDebug("<<< DirectLoginComponent.removeDirectLogin"); 75//MochiKit.Logging.logDebug("<<< DirectLoginComponent.removeDirectLogin");
78 }, 76 },
79 77
80 //------------------------------------------------------------------------- 78 //-------------------------------------------------------------------------
81/* 79/*
82 'formDataValue': function() { 80 'formDataValue': function() {
83 return Clipperz.Base.serializeJSON(this.directLogin().formData()); 81 return Clipperz.Base.serializeJSON(this.directLogin().formData());
84 }, 82 },
85 83
86 'setFormDataValue': function(aValue) { 84 'setFormDataValue': function(aValue) {
87 85
88 }, 86 },
89 */ 87 */
90 //------------------------------------------------------------------------- 88 //-------------------------------------------------------------------------
91 89
92 'removeButton': function() { 90 'removeButton': function() {
93 return this._removeButton; 91 return this._removeButton;
94 }, 92 },
95 93
96 'setRemoveButton': function(aValue) { 94 'setRemoveButton': function(aValue) {
97 this._removeButton = aValue; 95 this._removeButton = aValue;
98 }, 96 },
99 97
100 //------------------------------------------------------------------------- 98 //-------------------------------------------------------------------------
101/* 99/*
102 'titleElement': function() { 100 'titleElement': function() {
103 return this._titleElement; 101 return this._titleElement;
104 }, 102 },
105 103
106 'setTitleElement': function(aValue) { 104 'setTitleElement': function(aValue) {
107 this._titleElement = aValue; 105 this._titleElement = aValue;
108 }, 106 },
109 */ 107 */
110 //------------------------------------------------------------------------- 108 //-------------------------------------------------------------------------
111 109
112 'structureElement': function() { 110 'structureElement': function() {
113 return this._structureElement; 111 return this._structureElement;
114 }, 112 },
115 113
116 'setStructureElement': function(aValue) { 114 'setStructureElement': function(aValue) {
117 this._structureElement = aValue; 115 this._structureElement = aValue;
118 }, 116 },
119 117
120 //------------------------------------------------------------------------- 118 //-------------------------------------------------------------------------
121 119
122 'render': function() { 120 'render': function() {
123//MochiKit.Logging.logDebug(">>> DirectLoginComponent.render"); 121//MochiKit.Logging.logDebug(">>> DirectLoginComponent.render");
124 try { 122 try {
125 this.element().update(""); 123 this.element().update("");
126 Clipperz.YUI.DomHelper.append(this.element().dom, 124 Clipperz.YUI.DomHelper.append(this.element().dom,
127 {tag:'li', children:[ 125 {tag:'li', children:[
128 {tag:'table', width:'100%', border:'0', cellpadding:'0', cellspacing:'0', children:[ 126 {tag:'table', width:'100%', border:'0', cellpadding:'0', cellspacing:'0', children:[
129 {tag:'tbody', children:[ 127 {tag:'tbody', children:[
130 {tag:'tr', children:[ 128 {tag:'tr', children:[
131 {tag:'td', rowspan:'2', width:'30', valign:'top', html:'&#160', children:[ 129 {tag:'td', rowspan:'2', width:'30', valign:'top', html:'&#160', children:[
132 {tag:'div', id:this.getId('removeDirectLogin'), children:[ 130 {tag:'div', id:this.getId('removeDirectLogin'), children:[
133 {tag:'div', id:this.getId('removeDirectLoginButton')} 131 {tag:'div', id:this.getId('removeDirectLoginButton')}
134 ]}, 132 ]},
135 {tag:'div', id:this.getId('collapseLink'), cls:'directLoginCollapseLink'} 133 {tag:'div', id:this.getId('collapseLink'), cls:'directLoginCollapseLink'}
136 ]}, 134 ]},
137 {tag:'td', valign:'top', children:[ 135 {tag:'td', valign:'top', children:[
138 {tag:'table', width:'100%', border:'0', cellpadding:'0', cellspacing:'0', children:[ 136 {tag:'table', width:'100%', border:'0', cellpadding:'0', cellspacing:'0', children:[
139 {tag:'tbody', children:[ 137 {tag:'tbody', children:[
140 {tag:'tr', children:[ 138 {tag:'tr', children:[
141 {tag:'td', width:'20', valign:'top', children:[ 139 {tag:'td', width:'20', valign:'top', children:[
142 {tag:'a', href:'#', id:this.getId('directLogin'), children:[ 140 {tag:'a', href:'#', id:this.getId('directLogin'), children:[
143 {tag:'img', id:this.getId('faviconImage'), width:'16', height:'16', src:this.directLogin().fixedFavicon()} 141 {tag:'img', id:this.getId('faviconImage'), width:'16', height:'16', src:this.directLogin().fixedFavicon()}
144 ]} 142 ]}
145 ]}, 143 ]},
146 {tag:'td', valign:'top', children:[ 144 {tag:'td', valign:'top', children:[
147 {tag:'div', cls:'directLoginDetailTitle', children:[ 145 {tag:'div', cls:'directLoginDetailTitle', children:[
148 {tag:'div', id:this.getId('titleViewBox'), children:[ 146 {tag:'div', id:this.getId('titleViewBox'), children:[
149 {tag:'a', href:'#', id:this.getId('titleLink')} 147 {tag:'a', href:'#', id:this.getId('titleLink')}
150 ]}, 148 ]},
151 {tag:'div', id:this.getId('titleEditBox'), children:[ 149 {tag:'div', id:this.getId('titleEditBox'), children:[
152 {tag:'input', type:'text', id:this.getId('titleInput')} 150 {tag:'input', type:'text', id:this.getId('titleInput')}
153 ]} 151 ]}
154 ]} 152 ]}
155 ]} 153 ]}
156 ]} 154 ]}
157 ]} 155 ]}
158 ]} 156 ]}
159 ]} 157 ]}
160 ]}, 158 ]},
161 {tag:'tr', children:[ 159 {tag:'tr', children:[
162 {tag:'td', /*colspan:'2',*/ children:[ 160 {tag:'td', /*colspan:'2',*/ children:[
163 {tag:'div', id:this.getId('details'), children:[ 161 {tag:'div', id:this.getId('details'), children:[
164 {tag:'table', cls:'directLoginBindings', border:'0', cellpadding:'0', cellspacing:'0', children:[ 162 {tag:'table', cls:'directLoginBindings', border:'0', cellpadding:'0', cellspacing:'0', children:[
165 {tag:'tbody', id:this.getId('tbodyBindings'), children:[]} 163 {tag:'tbody', id:this.getId('tbodyBindings'), children:[]}
166 ]} 164 ]}
167 ]} 165 ]}
168 ]} 166 ]}
169 ]} 167 ]}
170 ]} 168 ]}
171 ]} 169 ]}
172 ]} 170 ]}
173 ); 171 );
174 172
175 MochiKit.Signal.connect(this.getId('faviconImage'), 'onload', this, 'handleLoadedFaviconImage'); 173 MochiKit.Signal.connect(this.getId('faviconImage'), 'onload', this, 'handleLoadedFaviconImage');
176 MochiKit.Signal.connect(this.getId('faviconImage'), 'onerror', this.directLogin(), 'handleMissingFaviconImage'); 174 MochiKit.Signal.connect(this.getId('faviconImage'), 'onerror', this.directLogin(), 'handleMissingFaviconImage');
177 MochiKit.Signal.connect(this.getId('faviconImage'), 'onabort', this.directLogin(), 'handleMissingFaviconImage'); 175 MochiKit.Signal.connect(this.getId('faviconImage'), 'onabort', this.directLogin(), 'handleMissingFaviconImage');
178 176
179 this.getElement('removeDirectLogin').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 177 this.getElement('removeDirectLogin').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
180//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 1"); 178//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 1");
181 this.getElement('collapseLink').addClassOnOver('hover'); 179 this.getElement('collapseLink').addClassOnOver('hover');
182 this._collapser = new Clipperz.YUI.Collapser(this.getElement('collapseLink'), this.getElement('details'), true); 180 this._collapser = new Clipperz.YUI.Collapser(this.getElement('collapseLink'), this.getElement('details'), true);
183//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 2"); 181//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 2");
184 MochiKit.Signal.connect(this.getId('directLogin'), 'onclick', this, 'runDirectLogin'); 182 MochiKit.Signal.connect(this.getId('directLogin'), 'onclick', this, 'runDirectLogin');
185 // this.getElement('directLogin').on('click', this.runDirectLogin, this, false); 183 // this.getElement('directLogin').on('click', this.runDirectLogin, this, false);
186//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 3"); 184//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 3");
187 // this.setTitleElement(new Clipperz.PM.Components.TextFormField(this.getElement('title'), { 185 // this.setTitleElement(new Clipperz.PM.Components.TextFormField(this.getElement('title'), {
188 // editMode:this.editMode(), 186 // editMode:this.editMode(),
189 // value:this.directLogin().label() 187 // value:this.directLogin().label()
190 // })); 188 // }));
191 this.getElement('titleViewBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 189 this.getElement('titleViewBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
192 this.getElement('titleEditBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 190 this.getElement('titleEditBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
193 //- this.getElement('titleLink').on('click', this.runDirectLogin, this, false); 191 //- this.getElement('titleLink').on('click', this.runDirectLogin, this, false);
194 MochiKit.Signal.connect(this.getId('titleLink'), 'onclick', this, 'runDirectLogin'); 192 MochiKit.Signal.connect(this.getId('titleLink'), 'onclick', this, 'runDirectLogin');
195 193
196//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 4"); 194//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 4");
197 //- this.setStructureElement(new Clipperz.PM.Components.TextFormField(this.getElement('formStructure'), { 195 //- this.setStructureElement(new Clipperz.PM.Components.TextFormField(this.getElement('formStructure'), {
198 //- editMode:this.editMode(), 196 //- editMode:this.editMode(),
199 //- value:this.formDataValue(), multiline:true 197 //- value:this.formDataValue(), multiline:true
200 //- })); 198 //- }));
201//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 5"); 199//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 5");
202 { 200 {
203 varbindingKey; 201 varbindingKey;
204 var valueName; 202 var valueName;
205 var inputsRequiringAdditionalValues; 203 var inputsRequiringAdditionalValues;
206 var bindingsElement; 204 var bindingsElement;
207 var i,c; 205 var i,c;
208 206
209//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 6"); 207//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 6");
210 this._directLoginBindingComponents = []; 208 this._directLoginBindingComponents = [];
211//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 7"); 209//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 7");
212 bindingsElement = this.getElement('tbodyBindings'); 210 bindingsElement = this.getElement('tbodyBindings');
213//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 8"); 211//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 8");
214 for (bindingKey in this.directLogin().bindings()) { 212 for (bindingKey in this.directLogin().bindings()) {
215 try { 213 try {
216 var directLoginBindingElement; 214 var directLoginBindingElement;
217 var directLoginBindingComponent; 215 var directLoginBindingComponent;
218 216
219//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 9"); 217//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 9");
220 directLoginBindingElement = Clipperz.YUI.DomHelper.append(bindingsElement.dom, {tag:'tr'}, true); 218 directLoginBindingElement = Clipperz.YUI.DomHelper.append(bindingsElement.dom, {tag:'tr'}, true);
221//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 10"); 219//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 10");
222 directLoginBindingComponent =new Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent(directLoginBindingElement, { 220 directLoginBindingComponent =new Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent(directLoginBindingElement, {
223 mainComponent:this, 221 mainComponent:this,
224 directLoginBinding:this.directLogin().bindings()[bindingKey] 222 directLoginBinding:this.directLogin().bindings()[bindingKey]
225 }); 223 });
226//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 11"); 224//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 11");
227 this._directLoginBindingComponents.push(directLoginBindingComponent); 225 this._directLoginBindingComponents.push(directLoginBindingComponent);
228 } catch (e) { 226 } catch (e) {
229 MochiKit.Logging.logError("Error while rendering a DirectLoginBindingComponent - " + e); 227 MochiKit.Logging.logError("Error while rendering a DirectLoginBindingComponent - " + e);
230 } 228 }
231//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 12"); 229//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 12");
232 } 230 }
233//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 13"); 231//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 13");
234 232
235 inputsRequiringAdditionalValues = this.directLogin().inputsRequiringAdditionalValues(); 233 inputsRequiringAdditionalValues = this.directLogin().inputsRequiringAdditionalValues();
236//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 13.1"); 234//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 13.1");
237 for (valueName in inputsRequiringAdditionalValues) { 235 for (valueName in inputsRequiringAdditionalValues) {
238 //- Clipperz.YUI.DomHelper.append(bindingsElement.dom, {tag:'tr', children:[ 236 //- Clipperz.YUI.DomHelper.append(bindingsElement.dom, {tag:'tr', children:[
239 //- {tag:'td', html:valueName}, 237 //- {tag:'td', html:valueName},
240 //- {tag:'td', children:inputsRequiringAdditionalValues[valueName].inputElementConfiguration()} 238 //- {tag:'td', children:inputsRequiringAdditionalValues[valueName].inputElementConfiguration()}
241 //- ]}, true) 239 //- ]}, true)
242 var directLoginValueElement; 240 var directLoginValueElement;
243 var directLoginValueComponent; 241 var directLoginValueComponent;
244 242
245//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 13.2"); 243//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 13.2");
246 directLoginValueElement = Clipperz.YUI.DomHelper.append(bindingsElement.dom, {tag:'tr'}, true); 244 directLoginValueElement = Clipperz.YUI.DomHelper.append(bindingsElement.dom, {tag:'tr'}, true);
247//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 13.3"); 245//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 13.3");
248 directLoginValueComponent =new Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent(directLoginValueElement, { 246 directLoginValueComponent =new Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent(directLoginValueElement, {
249 mainComponent:this, 247 mainComponent:this,
250 directLoginInputValue:inputsRequiringAdditionalValues[valueName] 248 directLoginInputValue:inputsRequiringAdditionalValues[valueName]
251 }); 249 });
252//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 13.4"); 250//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 13.4");
253 this._directLoginBindingComponents.push(directLoginValueComponent); 251 this._directLoginBindingComponents.push(directLoginValueComponent);
254//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 13.5"); 252//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 13.5");
255 } 253 }
256//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 13.6"); 254//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 13.6");
257 } 255 }
258//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 14"); 256//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 14");
259 this.setRemoveButton(new YAHOO.ext.Button(this.getDom('removeDirectLoginButton'), {text:Clipperz.PM.Strings['recordDetailDeleteDirectLoginButtonLabel'], handler:this.removeDirectLogin, scope:this})); 257 this.setRemoveButton(new YAHOO.ext.Button(this.getDom('removeDirectLoginButton'), {text:Clipperz.PM.Strings['recordDetailDeleteDirectLoginButtonLabel'], handler:this.removeDirectLogin, scope:this}));
260//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 15"); 258//MochiKit.Logging.logDebug("--- DirectLoginComponent.render - 15");
261 this.update(); 259 this.update();
262 } catch (e) { 260 } catch (e) {
263 MochiKit.Logging.logError("Error while rendering a DirectLoginComponent - " + e); 261 MochiKit.Logging.logError("Error while rendering a DirectLoginComponent - " + e);
264 } 262 }
265//MochiKit.Logging.logDebug("<<< DirectLoginComponent.render"); 263//MochiKit.Logging.logDebug("<<< DirectLoginComponent.render");
266 }, 264 },
267 265
268 //------------------------------------------------------------------------- 266 //-------------------------------------------------------------------------
269 267
270 'collapser': function() { 268 'collapser': function() {
271 return this._collapser; 269 return this._collapser;
272 }, 270 },
273 271
274 //------------------------------------------------------------------------- 272 //-------------------------------------------------------------------------
275 273
276 'handleLoadedFaviconImage': function(anEvent) { 274 'handleLoadedFaviconImage': function(anEvent) {
277 MochiKit.Signal.disconnectAll(anEvent.src()) 275 MochiKit.Signal.disconnectAll(anEvent.src())
278 }, 276 },
279 277
280 //------------------------------------------------------------------------- 278 //-------------------------------------------------------------------------
281 279
282 'update': function() { 280 'update': function() {
283 var i,c; 281 var i,c;
284 var bindingComponents; 282 var bindingComponents;
285 283
286//MochiKit.Logging.logDebug(">>> DirectLoginComponent.update"); 284//MochiKit.Logging.logDebug(">>> DirectLoginComponent.update");
287 bindingComponents = this.directLoginBindingComponents(); 285 bindingComponents = this.directLoginBindingComponents();
288 c = bindingComponents.length; 286 c = bindingComponents.length;
289 for (i=0; i<c; i++) { 287 for (i=0; i<c; i++) {
290 bindingComponents[i].update(); 288 bindingComponents[i].update();
291 } 289 }
292 290
293 Clipperz.PM.Components.RecordDetail.DirectLoginComponent.superclass.update.call(this); 291 Clipperz.PM.Components.RecordDetail.DirectLoginComponent.superclass.update.call(this);
294//MochiKit.Logging.logDebug("<<< DirectLoginComponent.update"); 292//MochiKit.Logging.logDebug("<<< DirectLoginComponent.update");
295 }, 293 },
296 294
297 //------------------------------------------------------------------------- 295 //-------------------------------------------------------------------------
298 296
299 'updateEditMode': function() { 297 'updateEditMode': function() {
300 // this.element().update(""); 298 // this.element().update("");
301 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', style:'border:4px solid red; padding:10px;', children:[ 299 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', style:'border:4px solid red; padding:10px;', children:[
302 // {tag:'div', style:'font-weight:bold;', html:this.directLogin().label()}, 300 // {tag:'div', style:'font-weight:bold;', html:this.directLogin().label()},
303 // {tag:'div', style:'border:1px solid #aaaaaa;', html:Clipperz.Base.serializeJSON(this.directLogin().formData())}, 301 // {tag:'div', style:'border:1px solid #aaaaaa;', html:Clipperz.Base.serializeJSON(this.directLogin().formData())},
304 // {tag:'div', style:'border:1px solid #aaaaaa;', html:Clipperz.Base.serializeJSON(this.directLogin().bindings())} 302 // {tag:'div', style:'border:1px solid #aaaaaa;', html:Clipperz.Base.serializeJSON(this.directLogin().bindings())}
305 // ]}); 303 // ]});
306 304
307 this.getElement('titleEditBox').show(); 305 this.getElement('titleEditBox').show();
308 this.getElement('titleViewBox').hide(); 306 this.getElement('titleViewBox').hide();
309 307
310 this.getDom('titleInput').value = this.directLogin().label(); 308 this.getDom('titleInput').value = this.directLogin().label();
311 309
312//MochiKit.Logging.logDebug(">>> DirectLoginComponent.updateEditMode"); 310//MochiKit.Logging.logDebug(">>> DirectLoginComponent.updateEditMode");
313 this.collapser().expand(); 311 this.collapser().expand();
314 this.getElement('collapseLink').hide(); 312 this.getElement('collapseLink').hide();
315 this.getElement('removeDirectLogin').show(); 313 this.getElement('removeDirectLogin').show();
316 // this.removeButton().show(); 314 // this.removeButton().show();
317//MochiKit.Logging.logDebug("<<< DirectLoginComponent.updateEditMode"); 315//MochiKit.Logging.logDebug("<<< DirectLoginComponent.updateEditMode");
318 }, 316 },
319 317
320 //------------------------------------------------------------------------- 318 //-------------------------------------------------------------------------
321 319
322 'updateViewMode': function() { 320 'updateViewMode': function() {
323//MochiKit.Logging.logDebug(">>> DirectLoginComponent.updateViewMode"); 321//MochiKit.Logging.logDebug(">>> DirectLoginComponent.updateViewMode");
324 this.getElement('titleEditBox').hide(); 322 this.getElement('titleEditBox').hide();
325 this.getElement('titleViewBox').show(); 323 this.getElement('titleViewBox').show();
326 this.getElement('titleLink').update(this.directLogin().label()); 324 this.getElement('titleLink').update(this.directLogin().label());
327 325
328 this.getElement('collapseLink').show(); 326 this.getElement('collapseLink').show();
329 this.getElement('removeDirectLogin').hide(); 327 this.getElement('removeDirectLogin').hide();
330 // this.removeButton().hide(); 328 // this.removeButton().hide();
331//MochiKit.Logging.logDebug("<<< DirectLoginComponent.updateViewMode"); 329//MochiKit.Logging.logDebug("<<< DirectLoginComponent.updateViewMode");
332 }, 330 },
333 331
334 //------------------------------------------------------------------------- 332 //-------------------------------------------------------------------------
335 333
336 'synchronizeComponentValues': function() { 334 'synchronizeComponentValues': function() {
337//MochiKit.Logging.logDebug(">>> DirectLoginComponent.syncronizeComponentValues"); 335//MochiKit.Logging.logDebug(">>> DirectLoginComponent.syncronizeComponentValues");
338 this.directLogin().setLabel(this.getDom('titleInput').value); 336 this.directLogin().setLabel(this.getDom('titleInput').value);
339 // this.setFormDataValue(this.structureElement().value()); 337 // this.setFormDataValue(this.structureElement().value());
340 338
341 MochiKit.Iter.forEach(this.directLoginBindingComponents(), MochiKit.Base.methodcaller('synchronizeComponentValues')); 339 MochiKit.Iter.forEach(this.directLoginBindingComponents(), MochiKit.Base.methodcaller('synchronizeComponentValues'));
342//MochiKit.Logging.logDebug("<<< DirectLoginComponent.syncronizeComponentValues"); 340//MochiKit.Logging.logDebug("<<< DirectLoginComponent.syncronizeComponentValues");
343 }, 341 },
344 342
345 //------------------------------------------------------------------------- 343 //-------------------------------------------------------------------------
346 344
347 'runDirectLogin': function(anEvent) { 345 'runDirectLogin': function(anEvent) {
348//MochiKit.Logging.logDebug("--- DirectLoginComponent.runDirectLogin - 1"); 346//MochiKit.Logging.logDebug("--- DirectLoginComponent.runDirectLogin - 1");
349//MochiKit.Logging.logDebug("--- DirectLoginComponent.runDirectLogin - 1 anEvent: " + anEvent); 347//MochiKit.Logging.logDebug("--- DirectLoginComponent.runDirectLogin - 1 anEvent: " + anEvent);
350 anEvent.stop(); 348 anEvent.stop();
351//MochiKit.Logging.logDebug("--- DirectLoginComponent.runDirectLogin - 2"); 349//MochiKit.Logging.logDebug("--- DirectLoginComponent.runDirectLogin - 2");
352 this.directLogin().runDirectLogin(); 350 this.directLogin().runDirectLogin();
353//MochiKit.Logging.logDebug("--- DirectLoginComponent.runDirectLogin - 3"); 351//MochiKit.Logging.logDebug("--- DirectLoginComponent.runDirectLogin - 3");
354 }, 352 },
355 353
356 //------------------------------------------------------------------------- 354 //-------------------------------------------------------------------------
357 __syntaxFix__: "syntax fix" 355 __syntaxFix__: "syntax fix"
358}); 356});
359 357
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js
index d210100..b478d94 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js
@@ -1,254 +1,252 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent = function(anElement, args) {
34//MochiKit.Logging.logDebug(">>> new DirectLoginValueComponent"); 32//MochiKit.Logging.logDebug(">>> new DirectLoginValueComponent");
35 args = args || {}; 33 args = args || {};
36 34
37 Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent.superclass.constructor.call(this, anElement, args); 35 Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent.superclass.constructor.call(this, anElement, args);
38 36
39 this._directLoginInputValue = args.directLoginInputValue || null; 37 this._directLoginInputValue = args.directLoginInputValue || null;
40 this._value = this.directLoginInputValue().directLogin().formValues()[this.directLoginInputValue().name()]; 38 this._value = this.directLoginInputValue().directLogin().formValues()[this.directLoginInputValue().name()];
41 39
42 this.render(); 40 this.render();
43//MochiKit.Logging.logDebug("<<< new DirectLoginValueComponent - record: " + this.record()); 41//MochiKit.Logging.logDebug("<<< new DirectLoginValueComponent - record: " + this.record());
44 42
45 return this; 43 return this;
46} 44}
47 45
48//============================================================================= 46//=============================================================================
49 47
50YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 48YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
51 49
52 'toString': function() { 50 'toString': function() {
53 return "Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent component - " + this.directLoginInputValue().name(); 51 return "Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent component - " + this.directLoginInputValue().name();
54 }, 52 },
55 53
56 //------------------------------------------------------------------------- 54 //-------------------------------------------------------------------------
57 55
58 'directLoginInputValue': function() { 56 'directLoginInputValue': function() {
59 return this._directLoginInputValue; 57 return this._directLoginInputValue;
60 }, 58 },
61 59
62 //------------------------------------------------------------------------- 60 //-------------------------------------------------------------------------
63 61
64 'render': function() { 62 'render': function() {
65//MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.render"); 63//MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.render");
66 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginDataLabelTD', children:[ 64 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginDataLabelTD', children:[
67 {tag:'span', html:this.directLoginInputValue().name()} 65 {tag:'span', html:this.directLoginInputValue().name()}
68 ]}); 66 ]});
69//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.render - 1"); 67//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.render - 1");
70 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginDataValueTD', children:[ 68 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginDataValueTD', children:[
71 {tag:'span', id:this.getId('inputElement')} 69 {tag:'span', id:this.getId('inputElement')}
72 ]}); 70 ]});
73//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.render - 2"); 71//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.render - 2");
74 this.update(); 72 this.update();
75//MochiKit.Logging.logDebug("<<< DirectLoginValueComponent.render"); 73//MochiKit.Logging.logDebug("<<< DirectLoginValueComponent.render");
76 }, 74 },
77 75
78 //------------------------------------------------------------------------- 76 //-------------------------------------------------------------------------
79 77
80 'inputElementConfiguration': function() { 78 'inputElementConfiguration': function() {
81 var result; 79 var result;
82 var currentValue; 80 var currentValue;
83 81
84//MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.inputElementConfiguration - " + this.directLoginInputValue().name()); 82//MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.inputElementConfiguration - " + this.directLoginInputValue().name());
85 result = []; 83 result = [];
86 currentValue = this.value(); 84 currentValue = this.value();
87 85
88 switch (this.directLoginInputValue().type()) { 86 switch (this.directLoginInputValue().type()) {
89 case 'checkbox': 87 case 'checkbox':
90 var checkbox; 88 var checkbox;
91//{"type":"checkbox", "name":"rememberUsernameChk", "value":"checkbox"} 89//{"type":"checkbox", "name":"rememberUsernameChk", "value":"checkbox"}
92 checkbox = {tag:'input', id:this.getId('checkbox'), type:'checkbox'} 90 checkbox = {tag:'input', id:this.getId('checkbox'), type:'checkbox'}
93 if (currentValue == true) { 91 if (currentValue == true) {
94 checkbox.checked = true; 92 checkbox.checked = true;
95 } 93 }
96 result.push(checkbox); 94 result.push(checkbox);
97 break; 95 break;
98 96
99 case 'select': 97 case 'select':
100 var input; 98 var input;
101//{"type":"select", "name":"DOMAIN", "options":[{"selected":true, "label":"@tin.it", "value":"tin.it"}, {"selected":false, "label":"@virgilio.it", "value":"virgilio.it"}]} 99//{"type":"select", "name":"DOMAIN", "options":[{"selected":true, "label":"@tin.it", "value":"tin.it"}, {"selected":false, "label":"@virgilio.it", "value":"virgilio.it"}]}
102 input = {tag:'select', id:this.getId('select'), name:this.directLoginInputValue().name(), children:[]}; 100 input = {tag:'select', id:this.getId('select'), name:this.directLoginInputValue().name(), children:[]};
103 input.children.push({tag:'option', value:null, html:"---"}); 101 input.children.push({tag:'option', value:null, html:"---"});
104 MochiKit.Iter.forEach(this.directLoginInputValue().args()['options'], function(anOption) { 102 MochiKit.Iter.forEach(this.directLoginInputValue().args()['options'], function(anOption) {
105 var option; 103 var option;
106 104
107 //TODO: remove the value: field and replace it with element.dom.value = <some value> 105 //TODO: remove the value: field and replace it with element.dom.value = <some value>
108 option = {tag:'option', value:anOption['value'], html:anOption['label']} 106 option = {tag:'option', value:anOption['value'], html:anOption['label']}
109 if (currentValue == anOption['value']) { 107 if (currentValue == anOption['value']) {
110 option.selected = true; 108 option.selected = true;
111 } 109 }
112 input.children.push(option); 110 input.children.push(option);
113 }) 111 })
114 result.push(input); 112 result.push(input);
115 break; 113 break;
116 114
117 case 'radio': 115 case 'radio':
118 var name; 116 var name;
119 var radioBox; 117 var radioBox;
120 118
121//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3"); 119//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3");
122 name = this.getId(this.directLoginInputValue().name()); 120 name = this.getId(this.directLoginInputValue().name());
123 radioBox = {tag:'div', id:this.getId('radioBox'), children:[]}; 121 radioBox = {tag:'div', id:this.getId('radioBox'), children:[]};
124 result.push(radioBox); 122 result.push(radioBox);
125//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1 - options.length: " + this.directLoginInputValue().args()['options'].length); 123//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1 - options.length: " + this.directLoginInputValue().args()['options'].length);
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}]} 124//{"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}]}
127 125
128 MochiKit.Iter.forEach(this.directLoginInputValue().args()['options'], function(anOption) { 126 MochiKit.Iter.forEach(this.directLoginInputValue().args()['options'], function(anOption) {
129 varradio; 127 varradio;
130 128
131//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1.1"); 129//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1.1");
132 //TODO: remove the value: field and replace it with element.dom.value = <some value> 130 //TODO: remove the value: field and replace it with element.dom.value = <some value>
133 radio = {tag:'input', type:'radio', name:name, value:anOption['value']}; 131 radio = {tag:'input', type:'radio', name:name, value:anOption['value']};
134//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1.2"); 132//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1.2");
135 if (currentValue == anOption['value']) { 133 if (currentValue == anOption['value']) {
136//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1.3"); 134//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1.3");
137 radio.checked = true; 135 radio.checked = true;
138//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1.4"); 136//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1.4");
139 } 137 }
140//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1.5"); 138//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1.5");
141 radioBox.children.push({tag:'div', children:[ radio, {tag:'span', html:anOption['value']} ]}) 139 radioBox.children.push({tag:'div', children:[ radio, {tag:'span', html:anOption['value']} ]})
142//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1.6"); 140//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1.6");
143 }) 141 })
144//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.2"); 142//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.2");
145 break; 143 break;
146 } 144 }
147//MochiKit.Logging.logDebug("<<< DirectLoginValueComponent.inputElementConfiguration"); 145//MochiKit.Logging.logDebug("<<< DirectLoginValueComponent.inputElementConfiguration");
148 146
149 return result; 147 return result;
150 }, 148 },
151 149
152 //------------------------------------------------------------------------- 150 //-------------------------------------------------------------------------
153 151
154 'inputValue': function() { 152 'inputValue': function() {
155 var result; 153 var result;
156 154
157 switch (this.directLoginInputValue().type()) { 155 switch (this.directLoginInputValue().type()) {
158 case 'checkbox': 156 case 'checkbox':
159 result = this.getDom('checkbox').checked; 157 result = this.getDom('checkbox').checked;
160 break; 158 break;
161 case 'select': 159 case 'select':
162 result = this.getDom('select').value; 160 result = this.getDom('select').value;
163 break; 161 break;
164 case 'radio': 162 case 'radio':
165 var checkedRadioButtons; 163 var checkedRadioButtons;
166 164
167 checkedRadioButtons = MochiKit.Base.filter(function(aRadioButton) { return aRadioButton.dom.checked }, 165 checkedRadioButtons = MochiKit.Base.filter(function(aRadioButton) { return aRadioButton.dom.checked },
168 this.getElement('radioBox').getChildrenByTagName('input')); 166 this.getElement('radioBox').getChildrenByTagName('input'));
169 167
170 if (checkedRadioButtons.length == 0) { 168 if (checkedRadioButtons.length == 0) {
171 result = null; 169 result = null;
172 } else { 170 } else {
173 result = checkedRadioButtons[0].dom.value; 171 result = checkedRadioButtons[0].dom.value;
174 } 172 }
175 break; 173 break;
176 } 174 }
177 175
178 return result; 176 return result;
179 }, 177 },
180 178
181 //------------------------------------------------------------------------- 179 //-------------------------------------------------------------------------
182 180
183 'value': function() { 181 'value': function() {
184 return this._value; 182 return this._value;
185 }, 183 },
186 184
187 'setValue': function(aValue) { 185 'setValue': function(aValue) {
188 this._value = aValue; 186 this._value = aValue;
189 }, 187 },
190 188
191 //------------------------------------------------------------------------- 189 //-------------------------------------------------------------------------
192 190
193 'updateEditMode': function() { 191 'updateEditMode': function() {
194//MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.updateEditMode - " + this); 192//MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.updateEditMode - " + this);
195 this.getElement('inputElement').update(""); 193 this.getElement('inputElement').update("");
196//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.updateEditMode - 1"); 194//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.updateEditMode - 1");
197 Clipperz.YUI.DomHelper.append(this.getDom('inputElement'), {tag:'div', children:this.inputElementConfiguration()}); 195 Clipperz.YUI.DomHelper.append(this.getDom('inputElement'), {tag:'div', children:this.inputElementConfiguration()});
198//MochiKit.Logging.logDebug("<<< DirectLoginValueComponent.updateEditMode"); 196//MochiKit.Logging.logDebug("<<< DirectLoginValueComponent.updateEditMode");
199 }, 197 },
200 198
201 //------------------------------------------------------------------------- 199 //-------------------------------------------------------------------------
202 200
203 'updateViewMode': function() { 201 'updateViewMode': function() {
204//MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.updateViewMode"); 202//MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.updateViewMode");
205 // this.getElement('inputElement').update(this.directLoginInputValue().value()); 203 // this.getElement('inputElement').update(this.directLoginInputValue().value());
206 204
207 this.getElement('inputElement').update(""); 205 this.getElement('inputElement').update("");
208 206
209 switch (this.directLoginInputValue().type()) { 207 switch (this.directLoginInputValue().type()) {
210 case 'checkbox': 208 case 'checkbox':
211 if (this.value() == true) { 209 if (this.value() == true) {
212 this.getElement('inputElement').update(Clipperz.PM.Strings['directLoginConfigurationCheckBoxFieldSelectedValue']); 210 this.getElement('inputElement').update(Clipperz.PM.Strings['directLoginConfigurationCheckBoxFieldSelectedValue']);
213 } else { 211 } else {
214 this.getElement('inputElement').update(Clipperz.PM.Strings['directLoginConfigurationCheckBoxFieldNotSelectedValue']) 212 this.getElement('inputElement').update(Clipperz.PM.Strings['directLoginConfigurationCheckBoxFieldNotSelectedValue'])
215 } 213 }
216 break; 214 break;
217 case 'select': 215 case 'select':
218 var displayedValue; 216 var displayedValue;
219 var selectedOptions; 217 var selectedOptions;
220 var currentValue; 218 var currentValue;
221 219
222 currentValue = this.value(); 220 currentValue = this.value();
223 selectedOptions = MochiKit.Base.filter(function(anOption) { return (anOption['value'] == currentValue); }, 221 selectedOptions = MochiKit.Base.filter(function(anOption) { return (anOption['value'] == currentValue); },
224 this.directLoginInputValue().args()['options']); 222 this.directLoginInputValue().args()['options']);
225 if (selectedOptions.length == 0) { 223 if (selectedOptions.length == 0) {
226 displayedValue = "---"; 224 displayedValue = "---";
227 } else { 225 } else {
228//MochiKit.Logging.logDebug("+++ " + Clipperz.Base.serializeJSON(selectedOptions)); 226//MochiKit.Logging.logDebug("+++ " + Clipperz.Base.serializeJSON(selectedOptions));
229//MochiKit.Logging.logDebug("*** " + Clipperz.Base.serializeJSON(selectedOptions[0])); 227//MochiKit.Logging.logDebug("*** " + Clipperz.Base.serializeJSON(selectedOptions[0]));
230 displayedValue = selectedOptions[0]['label']; 228 displayedValue = selectedOptions[0]['label'];
231 } 229 }
232 this.getElement('inputElement').update(displayedValue); 230 this.getElement('inputElement').update(displayedValue);
233 break; 231 break;
234 case 'radio': 232 case 'radio':
235 this.getElement('inputElement').update(this.value()); 233 this.getElement('inputElement').update(this.value());
236 break; 234 break;
237 } 235 }
238//MochiKit.Logging.logDebug("<<< DirectLoginValueComponent.updateViewMode"); 236//MochiKit.Logging.logDebug("<<< DirectLoginValueComponent.updateViewMode");
239 }, 237 },
240 238
241 //------------------------------------------------------------------------- 239 //-------------------------------------------------------------------------
242 240
243 'synchronizeComponentValues': function() { 241 'synchronizeComponentValues': function() {
244//MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.synchronizeComponentValues"); 242//MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.synchronizeComponentValues");
245//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.synchronizeComponentValues - 1; value: " + this.inputValue()); 243//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.synchronizeComponentValues - 1; value: " + this.inputValue());
246 this.setValue(this.inputValue()); 244 this.setValue(this.inputValue());
247 this.directLoginInputValue().directLogin().formValues()[this.directLoginInputValue().name()] = this.value(); 245 this.directLoginInputValue().directLogin().formValues()[this.directLoginInputValue().name()] = this.value();
248//MochiKit.Logging.logDebug("<<< DirectLoginValueComponent.synchronizeComponentValues"); 246//MochiKit.Logging.logDebug("<<< DirectLoginValueComponent.synchronizeComponentValues");
249 }, 247 },
250 248
251 //------------------------------------------------------------------------- 249 //-------------------------------------------------------------------------
252 __syntaxFix__: "syntax fix" 250 __syntaxFix__: "syntax fix"
253}); 251});
254 252
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js
index 1396bd8..878adce 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js
@@ -1,196 +1,194 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.DirectLoginsComponent = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.DirectLoginsComponent = function(anElement, args) {
34//MochiKit.Logging.logDebug(">>> new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent"); 32//MochiKit.Logging.logDebug(">>> new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent");
35 args = args || {}; 33 args = args || {};
36 34
37//MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 0"); 35//MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 0");
38 Clipperz.PM.Components.RecordDetail.DirectLoginsComponent.superclass.constructor.call(this, anElement, args); 36 Clipperz.PM.Components.RecordDetail.DirectLoginsComponent.superclass.constructor.call(this, anElement, args);
39//MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 1"); 37//MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 1");
40 38
41 this._addDirectLoginButton = null; 39 this._addDirectLoginButton = null;
42 40
43//MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 2"); 41//MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 2");
44 this.mainComponent().addEditComponent(this); 42 this.mainComponent().addEditComponent(this);
45//MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 3"); 43//MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 3");
46 this.render(); 44 this.render();
47//MochiKit.Logging.logDebug("<<< new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent"); 45//MochiKit.Logging.logDebug("<<< new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent");
48 46
49 return this; 47 return this;
50} 48}
51 49
52//============================================================================= 50//=============================================================================
53 51
54YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginsComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 52YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginsComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
55 53
56 'toString': function() { 54 'toString': function() {
57 return "Clipperz.PM.Components.RecordDetail.DirectLoginsComponent component"; 55 return "Clipperz.PM.Components.RecordDetail.DirectLoginsComponent component";
58 }, 56 },
59 57
60 //------------------------------------------------------------------------- 58 //-------------------------------------------------------------------------
61 59
62 'addDirectLoginButton': function() { 60 'addDirectLoginButton': function() {
63 return this._addDirectLoginButton; 61 return this._addDirectLoginButton;
64 }, 62 },
65 63
66 'setAddDirectLoginButton': function(aValue) { 64 'setAddDirectLoginButton': function(aValue) {
67 this._addDirectLoginButton = aValue; 65 this._addDirectLoginButton = aValue;
68 }, 66 },
69 67
70 //------------------------------------------------------------------------- 68 //-------------------------------------------------------------------------
71 69
72 'render': function() { 70 'render': function() {
73 this.element().update(""); 71 this.element().update("");
74 72
75 Clipperz.YUI.DomHelper.append(this.element().dom, 73 Clipperz.YUI.DomHelper.append(this.element().dom,
76 {tag:'div', cls:'directLoginsRecordBox', children:[ 74 {tag:'div', cls:'directLoginsRecordBox', children:[
77 {tag:'h3', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockTitle']}, 75 {tag:'h3', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockTitle']},
78 {tag:'ul', id:this.getId('directLogins')}, 76 {tag:'ul', id:this.getId('directLogins')},
79 77
80 {tag:'div', cls:'addDirectLoginBox', id:this.getId('addDirectLogin'), children:[ 78 {tag:'div', cls:'addDirectLoginBox', id:this.getId('addDirectLogin'), children:[
81 {tag:'div', cls:'addDirectLoginBoxContent', children:[ 79 {tag:'div', cls:'addDirectLoginBoxContent', children:[
82 {tag:'div', cls:'bookmarkletConfiguration', children:[ 80 {tag:'div', cls:'bookmarkletConfiguration', children:[
83 // {tag:'span', htmlString:Clipperz.PM.Strings['newRecordWizardBookmarkletConfigurationLabel']}, 81 // {tag:'span', htmlString:Clipperz.PM.Strings['newRecordWizardBookmarkletConfigurationLabel']},
84 {tag:'div', htmlString:Clipperz.PM.Strings['recordDetailNewDirectLoginDescription']}, 82 {tag:'div', htmlString:Clipperz.PM.Strings['recordDetailNewDirectLoginDescription']},
85 {tag:'textarea', id:this.getId('addDirectLoginTextarea')} 83 {tag:'textarea', id:this.getId('addDirectLoginTextarea')}
86 ]}, 84 ]},
87 {tag:'div', id:this.getId('addDirectLoginButton')} 85 {tag:'div', id:this.getId('addDirectLoginButton')}
88 ]} 86 ]}
89 ]} 87 ]}
90 ]} 88 ]}
91 ); 89 );
92 90
93 if (MochiKit.Base.keys(this.record().directLogins()).length == 0) { 91 if (MochiKit.Base.keys(this.record().directLogins()).length == 0) {
94//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 3"); 92//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 3");
95 Clipperz.YUI.DomHelper.append(this.getElement('directLogins'), 93 Clipperz.YUI.DomHelper.append(this.getElement('directLogins'),
96 {tag:'li', children:[ 94 {tag:'li', children:[
97 // {tag:'span', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockNoDirectLoginConfiguredLabel']} 95 // {tag:'span', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockNoDirectLoginConfiguredLabel']}
98 {tag:'div', cls:'recordDetailNoDirectLoginDescriptionBox', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription']} 96 {tag:'div', cls:'recordDetailNoDirectLoginDescriptionBox', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription']}
99 ]} 97 ]}
100 ); 98 );
101//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 4"); 99//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 4");
102 } else { 100 } else {
103//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 5"); 101//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 5");
104 for (directLoginReference in this.record().directLogins()) { 102 for (directLoginReference in this.record().directLogins()) {
105//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 6"); 103//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 6");
106 this.addDirectLogin(this.record().directLogins()[directLoginReference]); 104 this.addDirectLogin(this.record().directLogins()[directLoginReference]);
107//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 7"); 105//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 7");
108 } 106 }
109//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 8"); 107//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 8");
110 } 108 }
111//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 9"); 109//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 9");
112 110
113 this.setAddDirectLoginButton(new YAHOO.ext.Button(this.getDom('addDirectLoginButton'), { 111 this.setAddDirectLoginButton(new YAHOO.ext.Button(this.getDom('addDirectLoginButton'), {
114 text:Clipperz.PM.Strings['recordDetailAddNewDirectLoginButtonLabel'], 112 text:Clipperz.PM.Strings['recordDetailAddNewDirectLoginButtonLabel'],
115 handler:this.addNewDirectLogin, 113 handler:this.addNewDirectLogin,
116 scope:this 114 scope:this
117 })); 115 }));
118 MochiKit.Signal.connect(this.getId('addDirectLoginTextarea'), 'onkeydown', this, 'onkeydown'); 116 MochiKit.Signal.connect(this.getId('addDirectLoginTextarea'), 'onkeydown', this, 'onkeydown');
119//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 11"); 117//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 11");
120 118
121 this.update(); 119 this.update();
122//MochiKit.Logging.logDebug("<<< DirectLoginsComponent.render"); 120//MochiKit.Logging.logDebug("<<< DirectLoginsComponent.render");
123 }, 121 },
124 122
125 //------------------------------------------------------------------------- 123 //-------------------------------------------------------------------------
126 124
127 'addDirectLogin': function(aDirectLogin) { 125 'addDirectLogin': function(aDirectLogin) {
128//MochiKit.Logging.logDebug(">>> DirectLoginsComponent.addDirectLogin"); 126//MochiKit.Logging.logDebug(">>> DirectLoginsComponent.addDirectLogin");
129 new Clipperz.PM.Components.RecordDetail.DirectLoginComponent( 127 new Clipperz.PM.Components.RecordDetail.DirectLoginComponent(
130 Clipperz.YUI.DomHelper.append(this.getDom('directLogins'), {tag:'div'}, true), 128 Clipperz.YUI.DomHelper.append(this.getDom('directLogins'), {tag:'div'}, true),
131 { 129 {
132 mainComponent:this.mainComponent(), 130 mainComponent:this.mainComponent(),
133 directLogin:aDirectLogin 131 directLogin:aDirectLogin
134 } 132 }
135 ); 133 );
136//MochiKit.Logging.logDebug("<<< DirectLoginsComponent.addDirectLogin"); 134//MochiKit.Logging.logDebug("<<< DirectLoginsComponent.addDirectLogin");
137 }, 135 },
138 136
139 //------------------------------------------------------------------------- 137 //-------------------------------------------------------------------------
140 138
141 'addNewDirectLogin': function() { 139 'addNewDirectLogin': function() {
142 varnewDirectLogin; 140 varnewDirectLogin;
143 varconfiguration; 141 varconfiguration;
144 142
145//MochiKit.Logging.logDebug(">>> DirectLoginsComponent.addNewDirectLogin"); 143//MochiKit.Logging.logDebug(">>> DirectLoginsComponent.addNewDirectLogin");
146 if (MochiKit.Base.keys(this.record().directLogins()).length == 0) { 144 if (MochiKit.Base.keys(this.record().directLogins()).length == 0) {
147 this.getElement('directLogins').update(""); 145 this.getElement('directLogins').update("");
148 } 146 }
149 147
150 this.mainComponent().synchronizeComponentValues(); 148 this.mainComponent().synchronizeComponentValues();
151 149
152 this.mainComponent().exitModalView(); 150 this.mainComponent().exitModalView();
153 configuration = Clipperz.PM.BookmarkletProcessor.checkBookmarkletConfiguration( 151 configuration = Clipperz.PM.BookmarkletProcessor.checkBookmarkletConfiguration(
154 this.getDom('addDirectLoginTextarea').value, 152 this.getDom('addDirectLoginTextarea').value,
155 this.getDom('addDirectLoginButton'), 153 this.getDom('addDirectLoginButton'),
156 MochiKit.Base.method(this.mainComponent(), 'enterModalView') 154 MochiKit.Base.method(this.mainComponent(), 'enterModalView')
157 ); 155 );
158 this.mainComponent().enterModalView(); 156 this.mainComponent().enterModalView();
159 157
160 newDirectLogin = new Clipperz.PM.DataModel.DirectLogin({record:this.record(), 158 newDirectLogin = new Clipperz.PM.DataModel.DirectLogin({record:this.record(),
161 label:configuration['page']['title'], 159 label:configuration['page']['title'],
162 bookmarkletVersion:'0.2', 160 bookmarkletVersion:'0.2',
163 // bookmarkletVersion:configuration['version'], 161 // bookmarkletVersion:configuration['version'],
164 formData:configuration['form']}); 162 formData:configuration['form']});
165 this.record().addDirectLogin(newDirectLogin); 163 this.record().addDirectLogin(newDirectLogin);
166 this.addDirectLogin(newDirectLogin); 164 this.addDirectLogin(newDirectLogin);
167 this.getDom('addDirectLoginTextarea').value = ""; 165 this.getDom('addDirectLoginTextarea').value = "";
168//MochiKit.Logging.logDebug("<<< DirectLoginsComponent.addNewDirectLogin"); 166//MochiKit.Logging.logDebug("<<< DirectLoginsComponent.addNewDirectLogin");
169 }, 167 },
170 168
171 //------------------------------------------------------------------------- 169 //-------------------------------------------------------------------------
172 170
173 'updateViewMode': function() { 171 'updateViewMode': function() {
174 this.getElement('addDirectLogin').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 172 this.getElement('addDirectLogin').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
175 this.getElement('addDirectLogin').hide(); 173 this.getElement('addDirectLogin').hide();
176 }, 174 },
177 175
178 //------------------------------------------------------------------------- 176 //-------------------------------------------------------------------------
179 177
180 'updateEditMode': function() { 178 'updateEditMode': function() {
181 this.getElement('addDirectLogin').show(); 179 this.getElement('addDirectLogin').show();
182 }, 180 },
183 181
184 //------------------------------------------------------------------------- 182 //-------------------------------------------------------------------------
185 183
186 'onkeydown': function(anEvent) { 184 'onkeydown': function(anEvent) {
187//MochiKit.Logging.logDebug(">>> onkeydown - " + anEvent.src().id + ": " + anEvent.key().code); 185//MochiKit.Logging.logDebug(">>> onkeydown - " + anEvent.src().id + ": " + anEvent.key().code);
188 if (anEvent.key().code == 13) { 186 if (anEvent.key().code == 13) {
189 this.addNewDirectLogin(); 187 this.addNewDirectLogin();
190 } 188 }
191 }, 189 },
192 190
193 //------------------------------------------------------------------------- 191 //-------------------------------------------------------------------------
194 __syntaxFix__: "syntax fix" 192 __syntaxFix__: "syntax fix"
195}); 193});
196 194
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js
index b79c365..661f94d 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js
@@ -1,114 +1,112 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.FieldButtonComponent = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.FieldButtonComponent = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.RecordDetail.FieldButtonComponent.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.RecordDetail.FieldButtonComponent.superclass.constructor.call(this, anElement, args);
37 35
38 this._button = null; 36 this._button = null;
39 37
40 this.render(); 38 this.render();
41 39
42 return this; 40 return this;
43} 41}
44 42
45//============================================================================= 43//=============================================================================
46 44
47YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldButtonComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { 45YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldButtonComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, {
48 46
49 'toString': function() { 47 'toString': function() {
50 return "Clipperz.PM.Components.RecordDetail.FieldButtonComponent"; 48 return "Clipperz.PM.Components.RecordDetail.FieldButtonComponent";
51 }, 49 },
52 50
53 //------------------------------------------------------------------------- 51 //-------------------------------------------------------------------------
54 52
55 'buttonText': function() { 53 'buttonText': function() {
56 varresult; 54 varresult;
57 55
58 if (this.recordField() == null) { 56 if (this.recordField() == null) {
59 //TODO: this is never used. It is just an obsolete legacy chunk of code 57 //TODO: this is never used. It is just an obsolete legacy chunk of code
60 result = Clipperz.PM.Strings['recordDetailAddFieldButtonLabel']; 58 result = Clipperz.PM.Strings['recordDetailAddFieldButtonLabel'];
61 } else { 59 } else {
62 result = Clipperz.PM.Strings['recordDetailRemoveFieldButtonLabel']; 60 result = Clipperz.PM.Strings['recordDetailRemoveFieldButtonLabel'];
63 } 61 }
64 62
65 return result; 63 return result;
66 }, 64 },
67 65
68 //------------------------------------------------------------------------- 66 //-------------------------------------------------------------------------
69 67
70 'button': function() { 68 'button': function() {
71 return this._button; 69 return this._button;
72 }, 70 },
73 71
74 'setButton': function(aValue) { 72 'setButton': function(aValue) {
75 this._button = aValue; 73 this._button = aValue;
76 }, 74 },
77 75
78 //------------------------------------------------------------------------- 76 //-------------------------------------------------------------------------
79 77
80 'render': function() { 78 'render': function() {
81 this.element().update(""); 79 this.element().update("");
82 80
83 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('button')}) 81 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('button')})
84 this.setButton(new YAHOO.ext.Button(this.getDom('button'), {text:this.buttonText(), handler:this.handleButtonClick, scope:this})); 82 this.setButton(new YAHOO.ext.Button(this.getDom('button'), {text:this.buttonText(), handler:this.handleButtonClick, scope:this}));
85 83
86 this.update(); 84 this.update();
87 }, 85 },
88 86
89 //------------------------------------------------------------------------- 87 //-------------------------------------------------------------------------
90 88
91 'handleButtonClick': function() { 89 'handleButtonClick': function() {
92 if (this.recordField() == null) { 90 if (this.recordField() == null) {
93 this.mainComponent().addNewField(); 91 this.mainComponent().addNewField();
94 } else { 92 } else {
95 this.mainComponent().removeField(this.fieldComponent()); 93 this.mainComponent().removeField(this.fieldComponent());
96 } 94 }
97 }, 95 },
98 96
99 //------------------------------------------------------------------------- 97 //-------------------------------------------------------------------------
100 98
101 'updateEditMode': function() { 99 'updateEditMode': function() {
102 this.button().show(); 100 this.button().show();
103 }, 101 },
104 102
105 //------------------------------------------------------------------------- 103 //-------------------------------------------------------------------------
106 104
107 'updateViewMode': function() { 105 'updateViewMode': function() {
108 this.button().hide(); 106 this.button().hide();
109 }, 107 },
110 108
111 //------------------------------------------------------------------------- 109 //-------------------------------------------------------------------------
112 __syntaxFix__: "syntax fix" 110 __syntaxFix__: "syntax fix"
113}); 111});
114 112
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js
index 978a54e..bfa4658 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js
@@ -1,186 +1,184 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.FieldComponent = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.FieldComponent = function(anElement, args) {
34//MochiKit.Logging.logDebug(">>> new FieldComponent"); 32//MochiKit.Logging.logDebug(">>> new FieldComponent");
35 args = args || {}; 33 args = args || {};
36 34
37 Clipperz.PM.Components.RecordDetail.FieldComponent.superclass.constructor.call(this, anElement, args); 35 Clipperz.PM.Components.RecordDetail.FieldComponent.superclass.constructor.call(this, anElement, args);
38 36
39 this._element = anElement; 37 this._element = anElement;
40 this._recordField = args.recordField || null; 38 this._recordField = args.recordField || null;
41 39
42 this._buttonComponent = null; 40 this._buttonComponent = null;
43 this._labelComponent = null; 41 this._labelComponent = null;
44 this._dragHandler = null; 42 this._dragHandler = null;
45 this._valueComponent = null; 43 this._valueComponent = null;
46 this._typeComponent = null; 44 this._typeComponent = null;
47 45
48 this.mainComponent().addEditComponent(this); 46 this.mainComponent().addEditComponent(this);
49 47
50 this.render(); 48 this.render();
51 49
52 return this; 50 return this;
53} 51}
54 52
55//============================================================================= 53//=============================================================================
56 54
57YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 55YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
58 56
59 'toString': function() { 57 'toString': function() {
60 return "Clipperz.PM.Components.RecordDetail.FieldComponent component"; 58 return "Clipperz.PM.Components.RecordDetail.FieldComponent component";
61 }, 59 },
62 60
63 //------------------------------------------------------------------------- 61 //-------------------------------------------------------------------------
64 62
65 'recordField': function() { 63 'recordField': function() {
66 return this._recordField; 64 return this._recordField;
67 }, 65 },
68 66
69 //------------------------------------------------------------------------- 67 //-------------------------------------------------------------------------
70 68
71 'buttonComponent': function() { 69 'buttonComponent': function() {
72 return this._buttonComponent; 70 return this._buttonComponent;
73 }, 71 },
74 72
75 'setButtonComponent': function(aValue) { 73 'setButtonComponent': function(aValue) {
76 this._buttonComponent = aValue; 74 this._buttonComponent = aValue;
77 }, 75 },
78 76
79 //------------------------------------------------------------------------- 77 //-------------------------------------------------------------------------
80 78
81 'labelComponent': function() { 79 'labelComponent': function() {
82 return this._labelComponent; 80 return this._labelComponent;
83 }, 81 },
84 82
85 'setLabelComponent': function(aValue) { 83 'setLabelComponent': function(aValue) {
86 this._labelComponent = aValue; 84 this._labelComponent = aValue;
87 }, 85 },
88 86
89 //------------------------------------------------------------------------- 87 //-------------------------------------------------------------------------
90 88
91 'dragHandler': function() { 89 'dragHandler': function() {
92 return this._dragHandler; 90 return this._dragHandler;
93 }, 91 },
94 92
95 'setDragHandler': function(aValue) { 93 'setDragHandler': function(aValue) {
96 this._dragHandler = aValue; 94 this._dragHandler = aValue;
97 }, 95 },
98 96
99 //------------------------------------------------------------------------- 97 //-------------------------------------------------------------------------
100 98
101 'valueComponent': function() { 99 'valueComponent': function() {
102 return this._valueComponent; 100 return this._valueComponent;
103 }, 101 },
104 102
105 'setValueComponent': function(aValue) { 103 'setValueComponent': function(aValue) {
106 this._valueComponent = aValue; 104 this._valueComponent = aValue;
107 }, 105 },
108 106
109 //------------------------------------------------------------------------- 107 //-------------------------------------------------------------------------
110 108
111 'typeComponent': function() { 109 'typeComponent': function() {
112 return this._typeComponent; 110 return this._typeComponent;
113 }, 111 },
114 112
115 'setTypeComponent': function(aValue) { 113 'setTypeComponent': function(aValue) {
116 this._typeComponent = aValue; 114 this._typeComponent = aValue;
117 }, 115 },
118 116
119 //------------------------------------------------------------------------- 117 //-------------------------------------------------------------------------
120 118
121 'render': function() { 119 'render': function() {
122//MochiKit.Logging.logDebug(">>> RecordDetail.FieldComponent.render"); 120//MochiKit.Logging.logDebug(">>> RecordDetail.FieldComponent.render");
123 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td',/* width:'32',*/ height:'24', cls:'removeFieldButton', align:'left', valign:'top', id:this.getId('button')}); 121 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td',/* width:'32',*/ height:'24', cls:'removeFieldButton', align:'left', valign:'top', id:this.getId('button')});
124 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td',/* width:'25%',*/ valign:'top', id:this.getId('label')}); 122 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td',/* width:'25%',*/ valign:'top', id:this.getId('label')});
125 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td',/* width:'3',*/ valign:'top', id:this.getId('dragHandler')}); 123 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td',/* width:'3',*/ valign:'top', id:this.getId('dragHandler')});
126 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td',/* width:'50%',*/ valign:'top', children:[ 124 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td',/* width:'50%',*/ valign:'top', children:[
127 {tag:'div', cls:'Clipperz_recordFieldData', id:this.getId('value')} 125 {tag:'div', cls:'Clipperz_recordFieldData', id:this.getId('value')}
128 ]}); 126 ]});
129 127
130 128
131 this.setButtonComponent(new Clipperz.PM.Components.RecordDetail.FieldButtonComponent(this.getElement('button'), {fieldComponent:this})); 129 this.setButtonComponent(new Clipperz.PM.Components.RecordDetail.FieldButtonComponent(this.getElement('button'), {fieldComponent:this}));
132 this.setLabelComponent(new Clipperz.PM.Components.RecordDetail.FieldLabelComponent(this.getElement('label'), {fieldComponent:this})); 130 this.setLabelComponent(new Clipperz.PM.Components.RecordDetail.FieldLabelComponent(this.getElement('label'), {fieldComponent:this}));
133 this.setDragHandler(new Clipperz.PM.Components.RecordDetail.FieldDragHandler(this.getElement('dragHandler'), {fieldComponent:this})); 131 this.setDragHandler(new Clipperz.PM.Components.RecordDetail.FieldDragHandler(this.getElement('dragHandler'), {fieldComponent:this}));
134 this.setValueComponent(new Clipperz.PM.Components.RecordDetail.FieldValueComponent(this.getElement('value'), {fieldComponent:this})); 132 this.setValueComponent(new Clipperz.PM.Components.RecordDetail.FieldValueComponent(this.getElement('value'), {fieldComponent:this}));
135 133
136 if (this.editMode() == 'EDIT') { 134 if (this.editMode() == 'EDIT') {
137 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td',/* width:'60',*/ align:'left', cls:'fieldTypeTD', valign:'top', id:this.getId('type')}); 135 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td',/* width:'60',*/ align:'left', cls:'fieldTypeTD', valign:'top', id:this.getId('type')});
138 this.setTypeComponent(new Clipperz.PM.Components.RecordDetail.FieldTypeComponent(this.getElement('type'), {fieldComponent:this})); 136 this.setTypeComponent(new Clipperz.PM.Components.RecordDetail.FieldTypeComponent(this.getElement('type'), {fieldComponent:this}));
139 } 137 }
140 138
141 this.update(); 139 this.update();
142//MochiKit.Logging.logDebug("<<< RecordDetail.FieldComponent.render"); 140//MochiKit.Logging.logDebug("<<< RecordDetail.FieldComponent.render");
143 }, 141 },
144 142
145 //------------------------------------------------------------------------- 143 //-------------------------------------------------------------------------
146 144
147 'handleButtonClick': function() { 145 'handleButtonClick': function() {
148 this.mainComponent().record().removeField(this.recordField()); 146 this.mainComponent().record().removeField(this.recordField());
149 147
150 // if (this.recordField() == null) { 148 // if (this.recordField() == null) {
151 // this.mainComponent().record().addNewField(); 149 // this.mainComponent().record().addNewField();
152 // } else { 150 // } else {
153 // this.mainComponent().record().removeField(this.recordField()); 151 // this.mainComponent().record().removeField(this.recordField());
154 // } 152 // }
155 }, 153 },
156 154
157 //------------------------------------------------------------------------- 155 //-------------------------------------------------------------------------
158 156
159 'update': function(anEvent) { 157 'update': function(anEvent) {
160//MochiKit.Logging.logDebug(">>> RecordDetail.FieldComponent.update"); 158//MochiKit.Logging.logDebug(">>> RecordDetail.FieldComponent.update");
161 this.buttonComponent().update(); 159 this.buttonComponent().update();
162 this.labelComponent().update(); 160 this.labelComponent().update();
163 this.dragHandler().update(); 161 this.dragHandler().update();
164 this.valueComponent().update(); 162 this.valueComponent().update();
165 if (this.editMode() == 'EDIT') { 163 if (this.editMode() == 'EDIT') {
166 this.typeComponent().update(); 164 this.typeComponent().update();
167 } 165 }
168//MochiKit.Logging.logDebug("<<< RecordDetail.FieldComponent.update"); 166//MochiKit.Logging.logDebug("<<< RecordDetail.FieldComponent.update");
169 }, 167 },
170 168
171 //------------------------------------------------------------------------- 169 //-------------------------------------------------------------------------
172 170
173 'synchronizeComponentValues': function() { 171 'synchronizeComponentValues': function() {
174//MochiKit.Logging.logDebug(">>> FieldComponent.synchronizeComponentValues"); 172//MochiKit.Logging.logDebug(">>> FieldComponent.synchronizeComponentValues");
175 this.labelComponent().synchronizeComponentValues(); 173 this.labelComponent().synchronizeComponentValues();
176 this.valueComponent().synchronizeComponentValues(); 174 this.valueComponent().synchronizeComponentValues();
177 if (this.editMode() == 'EDIT') { 175 if (this.editMode() == 'EDIT') {
178 this.typeComponent().synchronizeComponentValues(); 176 this.typeComponent().synchronizeComponentValues();
179 } 177 }
180//MochiKit.Logging.logDebug("<<< FieldComponent.synchronizeComponentValues"); 178//MochiKit.Logging.logDebug("<<< FieldComponent.synchronizeComponentValues");
181 }, 179 },
182 180
183 //------------------------------------------------------------------------- 181 //-------------------------------------------------------------------------
184 __syntaxFix__: "syntax fix" 182 __syntaxFix__: "syntax fix"
185}); 183});
186 184
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js
index f7c5e21..7fea132 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js
@@ -1,56 +1,54 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.FieldDragHandler = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.FieldDragHandler = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.RecordDetail.FieldDragHandler.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.RecordDetail.FieldDragHandler.superclass.constructor.call(this, anElement, args);
37 35
38 this._element = anElement; 36 this._element = anElement;
39 37
40 this.render(); 38 this.render();
41 39
42 return this; 40 return this;
43} 41}
44 42
45//============================================================================= 43//=============================================================================
46 44
47YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldDragHandler, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { 45YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldDragHandler, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, {
48 46
49 'toString': function() { 47 'toString': function() {
50 return "Clipperz.PM.Components.RecordDetail.FieldDragHandler component"; 48 return "Clipperz.PM.Components.RecordDetail.FieldDragHandler component";
51 }, 49 },
52 50
53 //------------------------------------------------------------------------- 51 //-------------------------------------------------------------------------
54 __syntaxFix__: "syntax fix" 52 __syntaxFix__: "syntax fix"
55}); 53});
56 54
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js
index c58a7e2..c6f8cbf 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js
@@ -1,138 +1,136 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.FieldLabelComponent = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.FieldLabelComponent = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.RecordDetail.FieldLabelComponent.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.RecordDetail.FieldLabelComponent.superclass.constructor.call(this, anElement, args);
37 35
38 this._inputElement = null; 36 this._inputElement = null;
39 37
40 this.render(); 38 this.render();
41 39
42 return this; 40 return this;
43} 41}
44 42
45//============================================================================= 43//=============================================================================
46 44
47YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldLabelComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { 45YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldLabelComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, {
48 46
49 'toString': function() { 47 'toString': function() {
50 return "Clipperz.PM.Components.RecordDetail.FieldLabelComponent component"; 48 return "Clipperz.PM.Components.RecordDetail.FieldLabelComponent component";
51 }, 49 },
52 50
53 //------------------------------------------------------------------------- 51 //-------------------------------------------------------------------------
54 52
55 'value': function() { 53 'value': function() {
56 return this.recordField().label(); 54 return this.recordField().label();
57 }, 55 },
58 56
59 //------------------------------------------------------------------------- 57 //-------------------------------------------------------------------------
60 58
61 'inputElement': function() { 59 'inputElement': function() {
62 return this._inputElement; 60 return this._inputElement;
63 }, 61 },
64 62
65 'setInputElement': function(aValue) { 63 'setInputElement': function(aValue) {
66 this._inputElement = aValue; 64 this._inputElement = aValue;
67 }, 65 },
68 66
69 //------------------------------------------------------------------------- 67 //-------------------------------------------------------------------------
70 68
71 'render': function() { 69 'render': function() {
72 varnewTextFormField; 70 varnewTextFormField;
73 this.element().update(""); 71 this.element().update("");
74 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'Clipperz_recordFieldLabel', id:this.getId('label')}); 72 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'Clipperz_recordFieldLabel', id:this.getId('label')});
75 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', style:'font-size:8pt;', html:this.recordField().key()}); 73 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', style:'font-size:8pt;', html:this.recordField().key()});
76 74
77 // this.setInputElement(new Clipperz.PM.Components.TextFormField(this.getElement('label'), {editMode:this.editMode(), value:this.value()})); 75 // this.setInputElement(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()}); 76 newTextFormField = new Clipperz.PM.Components.TextFormField(this.getElement('label'), {editMode:this.editMode(), value:this.value()});
79 // newTextFormField.inputElement().setStyle({border:'3px solid cyan;'}); 77 // newTextFormField.inputElement().setStyle({border:'3px solid cyan;'});
80 newTextFormField.on('change', this.notifyChanges, this, true) 78 newTextFormField.on('change', this.notifyChanges, this, true)
81 // this.inputElement().on('change', function() {alert("CHANGE");}); 79 // this.inputElement().on('change', function() {alert("CHANGE");});
82 // this.inputElement().getElement('editComponent_input').on('change', function() {alert("CHANGE");}) 80 // this.inputElement().getElement('editComponent_input').on('change', function() {alert("CHANGE");})
83 // this.inputElement().on('blur', this.notifyChanges, this, true); 81 // this.inputElement().on('blur', this.notifyChanges, this, true);
84 82
85 this.setInputElement(newTextFormField); 83 this.setInputElement(newTextFormField);
86 this.update(); 84 this.update();
87 }, 85 },
88 86
89 'notifyChanges': function() { 87 'notifyChanges': function() {
90//MochiKit.Logging.logDebug(">>> FieldLabelComponent.notifyChanges - " + this); 88//MochiKit.Logging.logDebug(">>> FieldLabelComponent.notifyChanges - " + this);
91 this.synchronizeComponentValues(); 89 this.synchronizeComponentValues();
92 Clipperz.NotificationCenter.notify(this.recordField().recordVersion().record(), 'updatedFieldLabel'); 90 Clipperz.NotificationCenter.notify(this.recordField().recordVersion().record(), 'updatedFieldLabel');
93//MochiKit.Logging.logDebug("<<< FieldLabelComponent.notifyChanges"); 91//MochiKit.Logging.logDebug("<<< FieldLabelComponent.notifyChanges");
94 }, 92 },
95 93
96 //------------------------------------------------------------------------- 94 //-------------------------------------------------------------------------
97 95
98 'update': function() { 96 'update': function() {
99//MochiKit.Logging.logDebug(">>> FieldLabelComponent.update"); 97//MochiKit.Logging.logDebug(">>> FieldLabelComponent.update");
100 this.inputElement().update({editMode:this.editMode(), value:this.value()}); 98 this.inputElement().update({editMode:this.editMode(), value:this.value()});
101//MochiKit.Logging.logDebug("<<< FieldLabelComponent.update"); 99//MochiKit.Logging.logDebug("<<< FieldLabelComponent.update");
102 }, 100 },
103 101
104 //------------------------------------------------------------------------- 102 //-------------------------------------------------------------------------
105/* 103/*
106 'updateViewMode': function() { 104 'updateViewMode': function() {
107 varwidth; 105 varwidth;
108 varelement; 106 varelement;
109 107
110 this.element().update(""); 108 this.element().update("");
111 width = this.element().getWidth(); 109 width = this.element().getWidth();
112 element = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', html:this.value()}, true); 110 element = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', html:this.value()}, true);
113 element.setWidth(width-1); 111 element.setWidth(width-1);
114 }, 112 },
115 113
116 //------------------------------------------------------------------------- 114 //-------------------------------------------------------------------------
117 115
118 'updateEditMode': function() { 116 'updateEditMode': function() {
119 varwidth; 117 varwidth;
120 118
121 this.element().update(""); 119 this.element().update("");
122 width = this.element().getWidth(true); 120 width = this.element().getWidth(true);
123 this.setInputElement(Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'input', type:'text', value:this.value()}, true)); 121 this.setInputElement(Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'input', type:'text', value:this.value()}, true));
124 this.inputElement().setWidth(width-1); 122 this.inputElement().setWidth(width-1);
125 }, 123 },
126*/ 124*/
127 //------------------------------------------------------------------------- 125 //-------------------------------------------------------------------------
128 126
129 'synchronizeComponentValues': function() { 127 'synchronizeComponentValues': function() {
130 if (this.inputElement() != null) { 128 if (this.inputElement() != null) {
131 this.recordField().setLabel(this.inputElement().value()); 129 this.recordField().setLabel(this.inputElement().value());
132 } 130 }
133 }, 131 },
134 132
135 //------------------------------------------------------------------------- 133 //-------------------------------------------------------------------------
136 __syntaxFix__: "syntax fix" 134 __syntaxFix__: "syntax fix"
137}); 135});
138 136
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js
index 489258a..3108885 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js
@@ -1,154 +1,152 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.FieldTypeComponent = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.FieldTypeComponent = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.RecordDetail.FieldTypeComponent.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.RecordDetail.FieldTypeComponent.superclass.constructor.call(this, anElement, args);
37 35
38 this._inputElement = null; 36 this._inputElement = null;
39 37
40 this.render(); 38 this.render();
41 39
42 return this; 40 return this;
43} 41}
44 42
45//============================================================================= 43//=============================================================================
46 44
47YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldTypeComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { 45YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldTypeComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, {
48 46
49 'toString': function() { 47 'toString': function() {
50 return "Clipperz.PM.Components.RecordDetail.FieldTypeComponent component"; 48 return "Clipperz.PM.Components.RecordDetail.FieldTypeComponent component";
51 }, 49 },
52 50
53 //------------------------------------------------------------------------- 51 //-------------------------------------------------------------------------
54 52
55 'inputElement': function() { 53 'inputElement': function() {
56 return this._inputElement; 54 return this._inputElement;
57 }, 55 },
58 56
59 'setInputElement': function(aValue) { 57 'setInputElement': function(aValue) {
60 this._inputElement = aValue; 58 this._inputElement = aValue;
61 }, 59 },
62 60
63 //------------------------------------------------------------------------- 61 //-------------------------------------------------------------------------
64 62
65 'value': function() { 63 'value': function() {
66 return this.recordField().type(); 64 return this.recordField().type();
67 }, 65 },
68 66
69 'canChangeType': function() { 67 'canChangeType': function() {
70 var value; 68 var value;
71 var result; 69 var result;
72 70
73 value = this.value(); 71 value = this.value();
74 result = ((value == 'TXT') || (value == 'PWD') || (value == 'URL') || (value == 'DATE') || (value == 'ADDR')); 72 result = ((value == 'TXT') || (value == 'PWD') || (value == 'URL') || (value == 'DATE') || (value == 'ADDR'));
75 73
76 return result 74 return result
77 }, 75 },
78 76
79 //------------------------------------------------------------------------- 77 //-------------------------------------------------------------------------
80 78
81 'updateViewMode': function() { 79 'updateViewMode': function() {
82 this.element().update(""); 80 this.element().update("");
83 if (this.canChangeType()) { 81 if (this.canChangeType()) {
84 varwidth; 82 varwidth;
85 var element; 83 var element;
86 84
87 width = this.element().getWidth(true); 85 width = this.element().getWidth(true);
88 element = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', html:this.recordField().typeShortDescription()}, true); 86 element = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', html:this.recordField().typeShortDescription()}, true);
89 element.setWidth(width-1); 87 element.setWidth(width-1);
90 } 88 }
91 }, 89 },
92 90
93 //------------------------------------------------------------------------- 91 //-------------------------------------------------------------------------
94 92
95 'updateEditMode': function() { 93 'updateEditMode': function() {
96 this.element().update(""); 94 this.element().update("");
97 95
98 if (this.canChangeType()) { 96 if (this.canChangeType()) {
99 varwidth; 97 varwidth;
100 98
101 width = this.element().getWidth(true); 99 width = this.element().getWidth(true);
102 this.setInputElement(Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'select', children:[ 100 this.setInputElement(Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'select', children:[
103 {tag:'option', value:'TXT', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['TXT']['shortDescription']}, 101 {tag:'option', value:'TXT', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['TXT']['shortDescription']},
104 {tag:'option', value:'PWD', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['PWD']['shortDescription']}, 102 {tag:'option', value:'PWD', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['PWD']['shortDescription']},
105 {tag:'option', value:'URL', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['URL']['shortDescription']}, 103 {tag:'option', value:'URL', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['URL']['shortDescription']},
106 {tag:'option', value:'DATE', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['DATE']['shortDescription']}, 104 {tag:'option', value:'DATE', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['DATE']['shortDescription']},
107 {tag:'option', value:'ADDR', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['ADDR']['shortDescription']} 105 {tag:'option', value:'ADDR', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['ADDR']['shortDescription']}
108 106
109 // {tag:'option', value:'CHECK', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['CHECK']['shortDescription']}, 107 // {tag:'option', value:'CHECK', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['CHECK']['shortDescription']},
110 // {tag:'option', value:'RADIO', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['RADIO']['shortDescription']}, 108 // {tag:'option', value:'RADIO', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['RADIO']['shortDescription']},
111 // {tag:'option', value:'CHECK', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['SELECT']['shortDescription']} 109 // {tag:'option', value:'CHECK', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['SELECT']['shortDescription']}
112 // {tag:'option', value:'NOTE', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['NOTE']['shortDescription']} 110 // {tag:'option', value:'NOTE', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['NOTE']['shortDescription']}
113 ]}, true)); 111 ]}, true));
114 this.inputElement().setWidth(width-1); 112 this.inputElement().setWidth(width-1);
115 this.inputElement().addHandler('change', true, this.onChange, this, true); 113 this.inputElement().addHandler('change', true, this.onChange, this, true);
116 // this.selectCorrectOption(); 114 // this.selectCorrectOption();
117 Clipperz.DOM.selectOptionMatchingValue(this.inputElement().dom, this.value()); 115 Clipperz.DOM.selectOptionMatchingValue(this.inputElement().dom, this.value());
118 } 116 }
119 }, 117 },
120 118
121 //------------------------------------------------------------------------- 119 //-------------------------------------------------------------------------
122 120
123 'onChange': function() { 121 'onChange': function() {
124 this.synchronizeComponentValues(); 122 this.synchronizeComponentValues();
125 this.fieldComponent().valueComponent().handleTypeChange(); 123 this.fieldComponent().valueComponent().handleTypeChange();
126 }, 124 },
127 125
128 //------------------------------------------------------------------------- 126 //-------------------------------------------------------------------------
129/* 127/*
130 'selectCorrectOption': function() { 128 'selectCorrectOption': function() {
131 varoptions; 129 varoptions;
132 var i,c; 130 var i,c;
133 131
134 options = this.inputElement().getChildrenByTagName('option'); 132 options = this.inputElement().getChildrenByTagName('option');
135 c = options.length; 133 c = options.length;
136 for (i=0; i<c; i++) { 134 for (i=0; i<c; i++) {
137 if (options[i].dom.value == this.value()) { 135 if (options[i].dom.value == this.value()) {
138 options[i].dom.selected = true; 136 options[i].dom.selected = true;
139 } 137 }
140 } 138 }
141 }, 139 },
142 */ 140 */
143 //------------------------------------------------------------------------- 141 //-------------------------------------------------------------------------
144 142
145 'synchronizeComponentValues': function() { 143 'synchronizeComponentValues': function() {
146 if (this.inputElement() != null) { 144 if (this.inputElement() != null) {
147 this.recordField().setType(this.inputElement().dom.value); 145 this.recordField().setType(this.inputElement().dom.value);
148 } 146 }
149 }, 147 },
150 148
151 //------------------------------------------------------------------------- 149 //-------------------------------------------------------------------------
152 __syntaxFix__: "syntax fix" 150 __syntaxFix__: "syntax fix"
153}); 151});
154 152
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js
index 8621397..f2c70aa 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js
@@ -1,272 +1,270 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.FieldValueComponent = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.FieldValueComponent = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.RecordDetail.FieldValueComponent.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.RecordDetail.FieldValueComponent.superclass.constructor.call(this, anElement, args);
37 35
38 this._inputElement = null; 36 this._inputElement = null;
39 this._scrambledStatus = 'SCRAMBLED'; //'UNSCRAMBLED' 37 this._scrambledStatus = 'SCRAMBLED'; //'UNSCRAMBLED'
40 38
41 this.render(); 39 this.render();
42 40
43 return this; 41 return this;
44} 42}
45 43
46//============================================================================= 44//=============================================================================
47 45
48YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldValueComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, { 46YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldValueComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, {
49 47
50 'toString': function() { 48 'toString': function() {
51 return "Clipperz.PM.Components.RecordDetail.FieldValueComponent component"; 49 return "Clipperz.PM.Components.RecordDetail.FieldValueComponent component";
52 }, 50 },
53 51
54 //------------------------------------------------------------------------- 52 //-------------------------------------------------------------------------
55 53
56 'value': function() { 54 'value': function() {
57 return this.recordField().value(); 55 return this.recordField().value();
58 }, 56 },
59 57
60 'setValue': function(aValue) { 58 'setValue': function(aValue) {
61 this.recordField().setValue(aValue); 59 this.recordField().setValue(aValue);
62 }, 60 },
63 61
64 //------------------------------------------------------------------------- 62 //-------------------------------------------------------------------------
65 63
66 'inputElement': function() { 64 'inputElement': function() {
67 return this._inputElement; 65 return this._inputElement;
68 }, 66 },
69 67
70 'setInputElement': function(aValue) { 68 'setInputElement': function(aValue) {
71 this._inputElement = aValue; 69 this._inputElement = aValue;
72 }, 70 },
73 71
74 //------------------------------------------------------------------------- 72 //-------------------------------------------------------------------------
75 73
76 'scrambledStatus': function() { 74 'scrambledStatus': function() {
77 return this._scrambledStatus; 75 return this._scrambledStatus;
78 }, 76 },
79 77
80 'setScrambledStatus': function(aValue) { 78 'setScrambledStatus': function(aValue) {
81 this._scrambledStatus = aValue; 79 this._scrambledStatus = aValue;
82 }, 80 },
83 81
84 //------------------------------------------------------------------------- 82 //-------------------------------------------------------------------------
85 83
86 'handleTypeChange': function() { 84 'handleTypeChange': function() {
87//MochiKit.Logging.logDebug(">>> handling type change - " + this.recordField().type()); 85//MochiKit.Logging.logDebug(">>> handling type change - " + this.recordField().type());
88 this.synchronizeComponentValues(); 86 this.synchronizeComponentValues();
89 this.update(); 87 this.update();
90 }, 88 },
91 89
92 //------------------------------------------------------------------------- 90 //-------------------------------------------------------------------------
93 91
94 'addrUrl': function() { 92 'addrUrl': function() {
95 var result; 93 var result;
96 94
97 result = "http://maps.google.com/maps?q=" + this.value().split(' ').join('+'); 95 result = "http://maps.google.com/maps?q=" + this.value().split(' ').join('+');
98 96
99 return result; 97 return result;
100 }, 98 },
101 99
102 //------------------------------------------------------------------------- 100 //-------------------------------------------------------------------------
103 101
104 'updateViewMode': function() { 102 'updateViewMode': function() {
105 var scarmbledStatus; 103 var scarmbledStatus;
106 104
107 scrambledStatus = this.scrambledStatus() || 'SCRAMBLED'; 105 scrambledStatus = this.scrambledStatus() || 'SCRAMBLED';
108 106
109 this.element().update(""); 107 this.element().update("");
110 if (this.recordField().hidden() == false) { 108 if (this.recordField().hidden() == false) {
111 switch(this.recordField().type()) { 109 switch(this.recordField().type()) {
112 case 'TXT': 110 case 'TXT':
113 case 'PWD': 111 case 'PWD':
114 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', html:this.value()}); 112 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', html:this.value()});
115 break; 113 break;
116 case 'URL': 114 case 'URL':
117 varurlLocation; 115 varurlLocation;
118 116
119 urlLocation = Clipperz.Base.sanitizeString(this.value()); 117 urlLocation = Clipperz.Base.sanitizeString(this.value());
120 if (! (/^(https?|ftp|svn):\/\//.test(urlLocation))) { 118 if (! (/^(https?|ftp|svn):\/\//.test(urlLocation))) {
121 urlLocation = 'http://' + urlLocation; 119 urlLocation = 'http://' + urlLocation;
122 } 120 }
123 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'a', href:urlLocation, html:this.value(), target:'_blank'}); 121 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'a', href:urlLocation, html:this.value(), target:'_blank'});
124 break; 122 break;
125 case 'DATE': 123 case 'DATE':
126 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', html:this.value()}); 124 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', html:this.value()});
127 break; 125 break;
128 case 'ADDR': 126 case 'ADDR':
129 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'a', href:this.addrUrl(), html:this.value(), target:'_blank'}); 127 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'a', href:this.addrUrl(), html:this.value(), target:'_blank'});
130 break; 128 break;
131 } 129 }
132 } else { 130 } else {
133 var tableElement; 131 var tableElement;
134 var tdElement; 132 var tdElement;
135 var inputElement; 133 var inputElement;
136 var passwordElementConfiguration; 134 var passwordElementConfiguration;
137 135
138 if (scrambledStatus == 'SCRAMBLED') { 136 if (scrambledStatus == 'SCRAMBLED') {
139 varscrambledInputElement; 137 varscrambledInputElement;
140 138
141 if ((Clipperz_IEisBroken === true) && (Clipperz.PM.Proxy.defaultProxy.isReadOnly())) { 139 if ((Clipperz_IEisBroken === true) && (Clipperz.PM.Proxy.defaultProxy.isReadOnly())) {
142 scrambledInputElement = {tag:'input', type:'password', value:"this.value()"}; 140 scrambledInputElement = {tag:'input', type:'password', value:"this.value()"};
143 } else { 141 } else {
144 scrambledInputElement = {tag:'input', type:'text', cls:'scrambledField', title:Clipperz.PM.Strings['recordDetailPasswordFieldTooltipLabel'], value:"this.value()"}; 142 scrambledInputElement = {tag:'input', type:'text', cls:'scrambledField', title:Clipperz.PM.Strings['recordDetailPasswordFieldTooltipLabel'], value:"this.value()"};
145 } 143 }
146 144
147 passwordElementConfiguration = 145 passwordElementConfiguration =
148 {tag:'table', border:'0', cellspacing:'2', cellpadding:'0', children:[ 146 {tag:'table', border:'0', cellspacing:'2', cellpadding:'0', children:[
149 {tag:'tbody', children:[ 147 {tag:'tbody', children:[
150 {tag:'tr', children:[ 148 {tag:'tr', children:[
151 {tag:'td', valign:'top', children:[ 149 {tag:'td', valign:'top', children:[
152 scrambledInputElement, 150 scrambledInputElement,
153 {tag:'a', cls:'scrambleLink', id:this.getId('scrambleLink'), href:'#', htmlString:Clipperz.PM.Strings['recordDetailPasswordFieldUnscrambleLabel']} 151 {tag:'a', cls:'scrambleLink', id:this.getId('scrambleLink'), href:'#', htmlString:Clipperz.PM.Strings['recordDetailPasswordFieldUnscrambleLabel']}
154 ]}, 152 ]},
155 {tag:'td', valign:'top', children:[ 153 {tag:'td', valign:'top', children:[
156 {tag:'span', cls:'scrambledFieldLabel', htmlString:Clipperz.PM.Strings['recordDetailPasswordFieldHelpLabel']} 154 {tag:'span', cls:'scrambledFieldLabel', htmlString:Clipperz.PM.Strings['recordDetailPasswordFieldHelpLabel']}
157 ]} 155 ]}
158 ]} 156 ]}
159 ]} 157 ]}
160 ]}; 158 ]};
161 } else { 159 } else {
162 passwordElementConfiguration = 160 passwordElementConfiguration =
163 {tag:'div', children:[ 161 {tag:'div', children:[
164 {tag:'input', type:'text', cls:'unscrambledField', value:"this.value()"}, 162 {tag:'input', type:'text', cls:'unscrambledField', value:"this.value()"},
165 {tag:'a', cls:'scrambleLink', id:this.getId('scrambleLink'), href:'#', htmlString:Clipperz.PM.Strings['recordDetailPasswordFieldScrambleLabel']} 163 {tag:'a', cls:'scrambleLink', id:this.getId('scrambleLink'), href:'#', htmlString:Clipperz.PM.Strings['recordDetailPasswordFieldScrambleLabel']}
166 ]}; 164 ]};
167 } 165 }
168 166
169 tableElement = Clipperz.YUI.DomHelper.append(this.element().dom, passwordElementConfiguration, true); 167 tableElement = Clipperz.YUI.DomHelper.append(this.element().dom, passwordElementConfiguration, true);
170 168
171 inputElement = tableElement.getChildrenByTagName('input')[0]; 169 inputElement = tableElement.getChildrenByTagName('input')[0];
172 inputElement.dom.value = this.value(); 170 inputElement.dom.value = this.value();
173 inputElement.wrap({tag:'div', cls:'passwordBackground'}).setStyle('background-position', "0px -" + Math.min(128, Clipperz.PM.Crypto.passwordEntropy(this.value())) + "px"); 171 inputElement.wrap({tag:'div', cls:'passwordBackground'}).setStyle('background-position', "0px -" + Math.min(128, Clipperz.PM.Crypto.passwordEntropy(this.value())) + "px");
174 172
175 MochiKit.Signal.connect(inputElement.dom, 'onfocus', this, 'selectHiddenFieldOnFocus'); 173 MochiKit.Signal.connect(inputElement.dom, 'onfocus', this, 'selectHiddenFieldOnFocus');
176 MochiKit.Signal.connect(this.getDom('scrambleLink'), 'onclick', this, 'toggleScramble'); 174 MochiKit.Signal.connect(this.getDom('scrambleLink'), 'onclick', this, 'toggleScramble');
177 } 175 }
178 }, 176 },
179 177
180 //------------------------------------------------------------------------- 178 //-------------------------------------------------------------------------
181 179
182 'updateEditMode': function() { 180 'updateEditMode': function() {
183 var inputElement; 181 var inputElement;
184 var scarmbledStatus; 182 var scarmbledStatus;
185 183
186 scrambledStatus = this.scrambledStatus() || 'SCRAMBLED'; 184 scrambledStatus = this.scrambledStatus() || 'SCRAMBLED';
187 185
188 this.element().update(""); 186 this.element().update("");
189 switch(this.recordField().type()) { 187 switch(this.recordField().type()) {
190 case 'TXT': 188 case 'TXT':
191 case 'URL': 189 case 'URL':
192 case 'ADDR': 190 case 'ADDR':
193 inputElement = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'input', type:'text', value:"this.value()"}, true); 191 inputElement = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'input', type:'text', value:"this.value()"}, true);
194 inputElement.dom.value = this.value(); 192 inputElement.dom.value = this.value();
195 break; 193 break;
196 case 'PWD': 194 case 'PWD':
197 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', width:'100%', cellpadding:'0', cellspacing:'0', children:[ 195 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', width:'100%', cellpadding:'0', cellspacing:'0', children:[
198 {tag:'tbody', children:[ 196 {tag:'tbody', children:[
199 {tag:'tr', children:[ 197 {tag:'tr', children:[
200 {tag:'td', valign:'top', children:[ 198 {tag:'td', valign:'top', children:[
201 {tag:'input', type:((scrambledStatus == 'SCRAMBLED') ? 'password' : 'text'), id:this.getId('passwordInputElement'), value:"this.value()"}, 199 {tag:'input', type:((scrambledStatus == 'SCRAMBLED') ? 'password' : 'text'), id:this.getId('passwordInputElement'), value:"this.value()"},
202 {tag:'a', cls:'scrambleLink', id:this.getId('scrambleLink'), href:'#', html:(scrambledStatus == 'SCRAMBLED' ? Clipperz.PM.Strings['recordDetailPasswordFieldUnscrambleLabel'] : Clipperz.PM.Strings['recordDetailPasswordFieldScrambleLabel'])} 200 {tag:'a', cls:'scrambleLink', id:this.getId('scrambleLink'), href:'#', html:(scrambledStatus == 'SCRAMBLED' ? Clipperz.PM.Strings['recordDetailPasswordFieldUnscrambleLabel'] : Clipperz.PM.Strings['recordDetailPasswordFieldScrambleLabel'])}
203 ]}, 201 ]},
204 {tag:'td', valign:'top', children:[ 202 {tag:'td', valign:'top', children:[
205 {tag:'div', id:this.getId('passwordGenerator'), cls:'Clipperz_PasswordGenerator_button', html:'&nbsp;'} 203 {tag:'div', id:this.getId('passwordGenerator'), cls:'Clipperz_PasswordGenerator_button', html:'&nbsp;'}
206 ]} 204 ]}
207 ]} 205 ]}
208 ]} 206 ]}
209 ]}) 207 ]})
210 inputElement = this.getElement('passwordInputElement'); 208 inputElement = this.getElement('passwordInputElement');
211 inputElement.dom.value = this.value(); 209 inputElement.dom.value = this.value();
212 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('passwordInputElement')); 210 new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('passwordInputElement'));
213 new Clipperz.PM.Components.PasswordGenerator(this.getElement('passwordGenerator'), this); 211 new Clipperz.PM.Components.PasswordGenerator(this.getElement('passwordGenerator'), this);
214 MochiKit.Signal.connect(this.getDom('scrambleLink'), 'onclick', this, 'toggleScramble'); 212 MochiKit.Signal.connect(this.getDom('scrambleLink'), 'onclick', this, 'toggleScramble');
215 break; 213 break;
216 // case 'NOTE': 214 // case 'NOTE':
217 // inputElement = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'textarea', rows:'5', html:this.value()}, true); 215 // inputElement = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'textarea', rows:'5', html:this.value()}, true);
218 // break 216 // break
219 case 'DATE': 217 case 'DATE':
220 inputElement = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'input', type:'text', value:"this.value()"}, true); 218 inputElement = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'input', type:'text', value:"this.value()"}, true);
221 inputElement.dom.value = this.value(); 219 inputElement.dom.value = this.value();
222 break; 220 break;
223 } 221 }
224 222
225 this.setInputElement(inputElement); 223 this.setInputElement(inputElement);
226 }, 224 },
227 225
228 //------------------------------------------------------------------------- 226 //-------------------------------------------------------------------------
229 227
230 'synchronizeComponentValues': function() { 228 'synchronizeComponentValues': function() {
231//MochiKit.Logging.logDebug(">>> FieldValueComponent.synchronizeComponentValues"); 229//MochiKit.Logging.logDebug(">>> FieldValueComponent.synchronizeComponentValues");
232 if (this.inputElement() != null) { 230 if (this.inputElement() != null) {
233 var value; 231 var value;
234 232
235 switch(this.recordField().type()) { 233 switch(this.recordField().type()) {
236 case 'TXT': 234 case 'TXT':
237 case 'URL': 235 case 'URL':
238 case 'ADDR': 236 case 'ADDR':
239 case 'PWD': 237 case 'PWD':
240 case 'DATE': 238 case 'DATE':
241 value = this.inputElement().dom.value; 239 value = this.inputElement().dom.value;
242 break; 240 break;
243 } 241 }
244 this.setValue(value); 242 this.setValue(value);
245 } 243 }
246//MochiKit.Logging.logDebug("<<< FieldValueComponent.synchronizeComponentValues"); 244//MochiKit.Logging.logDebug("<<< FieldValueComponent.synchronizeComponentValues");
247 }, 245 },
248 246
249 //------------------------------------------------------------------------- 247 //-------------------------------------------------------------------------
250 248
251 'selectHiddenFieldOnFocus': function(anEvent) { 249 'selectHiddenFieldOnFocus': function(anEvent) {
252 anEvent.src().select(); 250 anEvent.src().select();
253 }, 251 },
254 252
255 //------------------------------------------------------------------------- 253 //-------------------------------------------------------------------------
256 254
257 'toggleScramble': function(anEvent) { 255 'toggleScramble': function(anEvent) {
258 this.synchronizeComponentValues(); 256 this.synchronizeComponentValues();
259 257
260 if (this.scrambledStatus() == 'SCRAMBLED') { 258 if (this.scrambledStatus() == 'SCRAMBLED') {
261 this.setScrambledStatus('UNSCRAMBLED'); 259 this.setScrambledStatus('UNSCRAMBLED');
262 } else { 260 } else {
263 this.setScrambledStatus('SCRAMBLED'); 261 this.setScrambledStatus('SCRAMBLED');
264 }; 262 };
265 263
266 this.update(); 264 this.update();
267 }, 265 },
268 266
269 //------------------------------------------------------------------------- 267 //-------------------------------------------------------------------------
270 __syntaxFix__: "syntax fix" 268 __syntaxFix__: "syntax fix"
271}); 269});
272 270
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js
index 46f456b..4f12c88 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js
@@ -1,162 +1,160 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.HeaderComponent = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.HeaderComponent = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.RecordDetail.HeaderComponent.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.RecordDetail.HeaderComponent.superclass.constructor.call(this, anElement, args);
37 this.mainComponent().addEditComponent(this); 35 this.mainComponent().addEditComponent(this);
38 36
39 this._saveButton = null; 37 this._saveButton = null;
40 38
41 this.render(); 39 this.render();
42 40
43 return this; 41 return this;
44} 42}
45 43
46//============================================================================= 44//=============================================================================
47 45
48YAHOO.extendX(Clipperz.PM.Components.RecordDetail.HeaderComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 46YAHOO.extendX(Clipperz.PM.Components.RecordDetail.HeaderComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
49 47
50 'toString': function() { 48 'toString': function() {
51 return "Clipperz.PM.Components.RecordDetail.HeaderComponent component"; 49 return "Clipperz.PM.Components.RecordDetail.HeaderComponent component";
52 }, 50 },
53 51
54 //------------------------------------------------------------------------- 52 //-------------------------------------------------------------------------
55 53
56 'render': function() { 54 'render': function() {
57 var editButton; 55 var editButton;
58 56
59//MochiKit.Logging.logDebug(">>> RecordDetail.HeaderComponent.appendTo"); 57//MochiKit.Logging.logDebug(">>> RecordDetail.HeaderComponent.appendTo");
60 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'recordDetailButtonsBox', children:[ 58 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'recordDetailButtonsBox', children:[
61 {tag:'div', id:this.getId('editButtonBox'), children:[ 59 {tag:'div', id:this.getId('editButtonBox'), children:[
62 {tag:'table', cls:'recordDetailButtonsTABLE', border:'0', cellpadding:'0', cellspacing:'0', children:[ 60 {tag:'table', cls:'recordDetailButtonsTABLE', border:'0', cellpadding:'0', cellspacing:'0', children:[
63 {tag:'tbody', children:[ 61 {tag:'tbody', children:[
64 {tag:'tr', children:[ 62 {tag:'tr', children:[
65 {tag:'td', align:'center', children:[ 63 {tag:'td', align:'center', children:[
66 {tag:'div', id:this.getId('editButton')} 64 {tag:'div', id:this.getId('editButton')}
67 ]} 65 ]}
68 ]} 66 ]}
69 ]} 67 ]}
70 ]} 68 ]}
71 ]}, 69 ]},
72 {tag:'div', id:this.getId('saveCancelButtonBox'), children:[ 70 {tag:'div', id:this.getId('saveCancelButtonBox'), children:[
73 {tag:'table', cls:'recordDetailButtonsTABLE', border:'0', cellpadding:'0', cellspacing:'0', children:[ 71 {tag:'table', cls:'recordDetailButtonsTABLE', border:'0', cellpadding:'0', cellspacing:'0', children:[
74 {tag:'tbody', children:[ 72 {tag:'tbody', children:[
75 {tag:'tr', children:[ 73 {tag:'tr', children:[
76 {tag:'td', width:'49%', align:'right', children:[ 74 {tag:'td', width:'49%', align:'right', children:[
77 {tag:'div', id:this.getId('saveButton')} 75 {tag:'div', id:this.getId('saveButton')}
78 ]}, 76 ]},
79 {tag:'td', html:'&nbsp'}, 77 {tag:'td', html:'&nbsp'},
80 {tag:'td', width:'49%', align:'left', children:[ 78 {tag:'td', width:'49%', align:'left', children:[
81 {tag:'div', id:this.getId('cancelButton')} 79 {tag:'div', id:this.getId('cancelButton')}
82 ]} 80 ]}
83 ]} 81 ]}
84 ]} 82 ]}
85 ]} 83 ]}
86 ]} 84 ]}
87 ]}); 85 ]});
88 86
89 this.getElement('editButtonBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 87 this.getElement('editButtonBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
90 this.getElement('saveCancelButtonBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 88 this.getElement('saveCancelButtonBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
91 89
92 editButton = new YAHOO.ext.Button(this.getDom('editButton'), {text:Clipperz.PM.Strings['recordDetailEditButtonLabel'], handler:this.editButtonHandler, scope:this}); 90 editButton = new YAHOO.ext.Button(this.getDom('editButton'), {text:Clipperz.PM.Strings['recordDetailEditButtonLabel'], handler:this.editButtonHandler, scope:this});
93 this.setSaveButton(new YAHOO.ext.Button(this.getDom('saveButton'), {text:Clipperz.PM.Strings['recordDetailSaveButtonLabel'], handler:this.saveButtonHandler, scope:this})); 91 this.setSaveButton(new YAHOO.ext.Button(this.getDom('saveButton'), {text:Clipperz.PM.Strings['recordDetailSaveButtonLabel'], handler:this.saveButtonHandler, scope:this}));
94 new YAHOO.ext.Button(this.getDom('cancelButton'), {text:Clipperz.PM.Strings['recordDetailCancelButtonLabel'], handler:this.cancelButtonHandler, scope:this}); 92 new YAHOO.ext.Button(this.getDom('cancelButton'), {text:Clipperz.PM.Strings['recordDetailCancelButtonLabel'], handler:this.cancelButtonHandler, scope:this});
95 93
96 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { 94 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) {
97 editButton.disable(); 95 editButton.disable();
98 } 96 }
99 97
100 this.update(); 98 this.update();
101//MochiKit.Logging.logDebug("<<< RecordDetail.HeaderComponent.appendTo"); 99//MochiKit.Logging.logDebug("<<< RecordDetail.HeaderComponent.appendTo");
102 }, 100 },
103 101
104 //------------------------------------------------------------------------- 102 //-------------------------------------------------------------------------
105 103
106 'updateViewMode': function() { 104 'updateViewMode': function() {
107//MochiKit.Logging.logDebug(">>> HeaderComponent.updateViewMode"); 105//MochiKit.Logging.logDebug(">>> HeaderComponent.updateViewMode");
108 this.getElement('editButtonBox').show(); 106 this.getElement('editButtonBox').show();
109 this.getElement('saveCancelButtonBox').hide(); 107 this.getElement('saveCancelButtonBox').hide();
110//MochiKit.Logging.logDebug("<<< HeaderComponent.updateViewMode"); 108//MochiKit.Logging.logDebug("<<< HeaderComponent.updateViewMode");
111 }, 109 },
112 110
113 //------------------------------------------------------------------------- 111 //-------------------------------------------------------------------------
114 112
115 'updateEditMode': function() { 113 'updateEditMode': function() {
116 this.getElement('editButtonBox').hide(); 114 this.getElement('editButtonBox').hide();
117 this.getElement('saveCancelButtonBox').show(); 115 this.getElement('saveCancelButtonBox').show();
118 if (this.mainComponent().enableSaveButton() == true) { 116 if (this.mainComponent().enableSaveButton() == true) {
119//MochiKit.Logging.logDebug("--- HeaderComponent.updateViewMode - ENABLE"); 117//MochiKit.Logging.logDebug("--- HeaderComponent.updateViewMode - ENABLE");
120 this.saveButton().enable(); 118 this.saveButton().enable();
121 } else { 119 } else {
122 this.saveButton().disable(); 120 this.saveButton().disable();
123 } 121 }
124 }, 122 },
125 123
126 //------------------------------------------------------------------------- 124 //-------------------------------------------------------------------------
127 125
128 'saveButton': function() { 126 'saveButton': function() {
129 return this._saveButton; 127 return this._saveButton;
130 }, 128 },
131 129
132 'setSaveButton': function(aValue) { 130 'setSaveButton': function(aValue) {
133 this._saveButton = aValue; 131 this._saveButton = aValue;
134 }, 132 },
135 133
136 //------------------------------------------------------------------------- 134 //-------------------------------------------------------------------------
137 135
138 'editButtonHandler': function(anEvent) { 136 'editButtonHandler': function(anEvent) {
139 this.mainComponent().setEditMode('EDIT'); 137 this.mainComponent().setEditMode('EDIT');
140 }, 138 },
141 139
142 //------------------------------------------------------------------------- 140 //-------------------------------------------------------------------------
143 141
144 'saveButtonHandler': function(anEvent) { 142 'saveButtonHandler': function(anEvent) {
145//MochiKit.Logging.logDebug(">>> RecordDetail.HeaderComponent.saveButtonHandler"); 143//MochiKit.Logging.logDebug(">>> RecordDetail.HeaderComponent.saveButtonHandler");
146 this.mainComponent().setEditMode('VIEW', this.getElement('saveButton')); 144 this.mainComponent().setEditMode('VIEW', this.getElement('saveButton'));
147//MochiKit.Logging.logDebug("<<< RecordDetail.HeaderComponent.saveButtonHandler"); 145//MochiKit.Logging.logDebug("<<< RecordDetail.HeaderComponent.saveButtonHandler");
148 }, 146 },
149 147
150 //------------------------------------------------------------------------- 148 //-------------------------------------------------------------------------
151 149
152 'cancelButtonHandler': function(anEvent) { 150 'cancelButtonHandler': function(anEvent) {
153 this.record().cancelChanges(); 151 this.record().cancelChanges();
154//MochiKit.Logging.logDebug("--- HeaderComponent.cancelButtonHandler - " + Clipperz.Base.serializeJSON(this.record().currentDataSnapshot())); 152//MochiKit.Logging.logDebug("--- HeaderComponent.cancelButtonHandler - " + Clipperz.Base.serializeJSON(this.record().currentDataSnapshot()));
155 this.mainComponent().setEditMode('VIEW', null, true); 153 this.mainComponent().setEditMode('VIEW', null, true);
156 }, 154 },
157 155
158 //------------------------------------------------------------------------- 156 //-------------------------------------------------------------------------
159 157
160 __syntaxFix__: "syntax fix" 158 __syntaxFix__: "syntax fix"
161}); 159});
162 160
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js
index d6a03d7..47ed3e6 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.MainComponent = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.MainComponent = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.RecordDetail.MainComponent.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.RecordDetail.MainComponent.superclass.constructor.call(this, anElement, args);
37 35
38 //this._element = args.element; 36 //this._element = args.element;
39 this._user = args.user; 37 this._user = args.user;
40 this._editMode = args.editMode || 'VIEW'; //[ 'VIEW' | 'EDIT' ] 38 this._editMode = args.editMode || 'VIEW'; //[ 'VIEW' | 'EDIT' ]
41 this._mainPanel = args.mainPanel; 39 this._mainPanel = args.mainPanel;
42 40
43 this._record = null; 41 this._record = null;
44 this._editComponents = []; 42 this._editComponents = [];
45 this._addFieldButton = null; 43 this._addFieldButton = null;
46 44
47 this._enableSaveButton = true; 45 this._enableSaveButton = true;
48 this._shouldShowLoginInfo = (Clipperz.PM.Proxy.defaultProxy.isReadOnly() ? false : true); 46 this._shouldShowLoginInfo = (Clipperz.PM.Proxy.defaultProxy.isReadOnly() ? false : true);
49 47
50 //this._mainLayoutManager = null; 48 //this._mainLayoutManager = null;
51 //this._layoutRegion = null; 49 //this._layoutRegion = null;
52 50
53 Clipperz.NotificationCenter.register(null, 'loadingRecordData', this, 'render'); 51 Clipperz.NotificationCenter.register(null, 'loadingRecordData', this, 'render');
54 Clipperz.NotificationCenter.register(null, 'decryptingRecordData', this, 'render'); 52 Clipperz.NotificationCenter.register(null, 'decryptingRecordData', this, 'render');
55 Clipperz.NotificationCenter.register(null, 'loadingRecordVersionData', this, 'render'); 53 Clipperz.NotificationCenter.register(null, 'loadingRecordVersionData', this, 'render');
56 Clipperz.NotificationCenter.register(null, 'decryptingRecordVersionData', this, 'render'); 54 Clipperz.NotificationCenter.register(null, 'decryptingRecordVersionData', this, 'render');
57 Clipperz.NotificationCenter.register(null, 'setupDone', this, 'render'); 55 Clipperz.NotificationCenter.register(null, 'setupDone', this, 'render');
58 Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'render'); 56 Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'render');
59 57
60 this.render(); 58 this.render();
61 59
62 return this; 60 return this;
63} 61}
64 62
65//============================================================================= 63//=============================================================================
66 64
67YAHOO.extendX(Clipperz.PM.Components.RecordDetail.MainComponent, Clipperz.PM.Components.BaseComponent, { 65YAHOO.extendX(Clipperz.PM.Components.RecordDetail.MainComponent, Clipperz.PM.Components.BaseComponent, {
68 66
69 'toString': function() { 67 'toString': function() {
70 return "Clipperz.PM.Components.RecordDetail.MainComponent component"; 68 return "Clipperz.PM.Components.RecordDetail.MainComponent component";
71 }, 69 },
72 70
73 //------------------------------------------------------------------------- 71 //-------------------------------------------------------------------------
74 72
75 'editMode': function() { 73 'editMode': function() {
76 return this._editMode; 74 return this._editMode;
77 }, 75 },
78 76
79 'setEditMode': function(aValue, aButtonElement, shouldSkipComponentSynchronization) { 77 'setEditMode': function(aValue, aButtonElement, shouldSkipComponentSynchronization) {
80//MochiKit.Logging.logDebug(">>> MainComponent.setEditingMode"); 78//MochiKit.Logging.logDebug(">>> MainComponent.setEditingMode");
81 this.scrollToTop(); 79 this.scrollToTop();
82 80
83 if (aValue == 'VIEW') { 81 if (aValue == 'VIEW') {
84 if (shouldSkipComponentSynchronization == true) { 82 if (shouldSkipComponentSynchronization == true) {
85 this.exitModalView(); 83 this.exitModalView();
86 } else { 84 } else {
87 this.synchronizeComponentValues(); 85 this.synchronizeComponentValues();
88 if (this.record().hasPendingChanges()) { 86 if (this.record().hasPendingChanges()) {
89 if (this.record().isBrandNew()) { 87 if (this.record().isBrandNew()) {
90 this.record().removeEmptyFields(); 88 this.record().removeEmptyFields();
91 } 89 }
92 this.saveCurrentRecordChanges(aButtonElement); 90 this.saveCurrentRecordChanges(aButtonElement);
93 } else { 91 } else {
94 if (this.record().isBrandNew()) { 92 if (this.record().isBrandNew()) {
95 this.record().user().removeRecord(this.record()); 93 this.record().user().removeRecord(this.record());
96 } 94 }
97 this.exitModalView(); 95 this.exitModalView();
98 } 96 }
99 } 97 }
100 } else if (aValue == 'EDIT') { 98 } else if (aValue == 'EDIT') {
101 this.enterModalView(); 99 this.enterModalView();
102 } else { 100 } else {
103 //???? 101 //????
104 } 102 }
105 103
106 this._editMode = aValue; 104 this._editMode = aValue;
107 this.render(); 105 this.render();
108 }, 106 },
109 107
110 //------------------------------------------------------------------------- 108 //-------------------------------------------------------------------------
111 109
112 'user': function() { 110 'user': function() {
113 return this._user; 111 return this._user;
114 }, 112 },
115 113
116 //------------------------------------------------------------------------- 114 //-------------------------------------------------------------------------
117 115
118 'mainPanel': function() { 116 'mainPanel': function() {
119 return this._mainPanel; 117 return this._mainPanel;
120 }, 118 },
121 119
122 //------------------------------------------------------------------------- 120 //-------------------------------------------------------------------------
123 121
124 'render': function() { 122 'render': function() {
125//MochiKit.Logging.logDebug(">>> RecordDetail.MainComponent.render"); 123//MochiKit.Logging.logDebug(">>> RecordDetail.MainComponent.render");
126 this.setEnableSaveButton(true); 124 this.setEnableSaveButton(true);
127 this.element().update(""); 125 this.element().update("");
128 126
129 if (this.record() == null) { 127 if (this.record() == null) {
130 if (MochiKit.Base.keys(this.user().records()).length == 0) { 128 if (MochiKit.Base.keys(this.user().records()).length == 0) {
131 this.renderWithNoRecordAtAll(); 129 this.renderWithNoRecordAtAll();
132 } else { 130 } else {
133 this.renderWithNoSelectedRecord(); 131 this.renderWithNoSelectedRecord();
134 } 132 }
135 } else { 133 } else {
136 this.renderWithSelectedRecord(); 134 this.renderWithSelectedRecord();
137 } 135 }
138//MochiKit.Logging.logDebug("<<< RecordDetail.MainComponent.render"); 136//MochiKit.Logging.logDebug("<<< RecordDetail.MainComponent.render");
139 }, 137 },
140 138
141 //------------------------------------------------------------------------- 139 //-------------------------------------------------------------------------
142 140
143 'renderWithNoRecordAtAll': function() { 141 'renderWithNoRecordAtAll': function() {
144//MochiKit.Logging.logDebug(">>> RecordDetail.MainComponent.renderWithNoRecordAtAll"); 142//MochiKit.Logging.logDebug(">>> RecordDetail.MainComponent.renderWithNoRecordAtAll");
145 Clipperz.YUI.DomHelper.append(this.element().dom, 143 Clipperz.YUI.DomHelper.append(this.element().dom,
146 {tag:'form', cls:'noRecordAtAllFORM', children:[ 144 {tag:'form', cls:'noRecordAtAllFORM', children:[
147 {tag:'div', cls:'recordTitleBlock', children:[ 145 {tag:'div', cls:'recordTitleBlock', children:[
148 {tag:'h2', id:'recordTitle', htmlString:Clipperz.PM.Strings['recordDetailNoRecordAtAllTitle']} 146 {tag:'h2', id:'recordTitle', htmlString:Clipperz.PM.Strings['recordDetailNoRecordAtAllTitle']}
149 ]}, 147 ]},
150 {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ 148 {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[
151 {tag:'tbody', children:[ 149 {tag:'tbody', children:[
152 {tag:'tr', children:[ 150 {tag:'tr', children:[
153 {tag:'td', colspan:'5', children:[ 151 {tag:'td', colspan:'5', children:[
154 {tag:'div', cls:'recordDetailDescriptionBox', htmlString:Clipperz.PM.Strings['recordDetailNoRecordAtAllDescription']} 152 {tag:'div', cls:'recordDetailDescriptionBox', htmlString:Clipperz.PM.Strings['recordDetailNoRecordAtAllDescription']}
155 ]} 153 ]}
156 ]} 154 ]}
157 ]} 155 ]}
158 ]} 156 ]}
159 ]} 157 ]}
160 ); 158 );
161//MochiKit.Logging.logDebug("<<< RecordDetail.MainComponent.renderWithNoRecordAtAll"); 159//MochiKit.Logging.logDebug("<<< RecordDetail.MainComponent.renderWithNoRecordAtAll");
162 }, 160 },
163 161
164 //------------------------------------------------------------------------- 162 //-------------------------------------------------------------------------
165 163
166 'renderWithNoSelectedRecord': function() { 164 'renderWithNoSelectedRecord': function() {
167//MochiKit.Logging.logDebug(">>> RecordDetail.MainComponent.renderWithNoSelectedRecord"); 165//MochiKit.Logging.logDebug(">>> RecordDetail.MainComponent.renderWithNoSelectedRecord");
168 Clipperz.YUI.DomHelper.append(this.element().dom, 166 Clipperz.YUI.DomHelper.append(this.element().dom,
169 {tag:'form', cls:'noRecordSelectedFORM', children:[ 167 {tag:'form', cls:'noRecordSelectedFORM', children:[
170 {tag:'div', cls:'recordTitleBlock', children:[ 168 {tag:'div', cls:'recordTitleBlock', children:[
171 {tag:'h2', id:'recordTitle', htmlString:Clipperz.PM.Strings['recordDetailNoRecordSelectedTitle']} 169 {tag:'h2', id:'recordTitle', htmlString:Clipperz.PM.Strings['recordDetailNoRecordSelectedTitle']}
172 ]}, 170 ]},
173 {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ 171 {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[
174 {tag:'tbody', children:[ 172 {tag:'tbody', children:[
175 {tag:'tr', children:[ 173 {tag:'tr', children:[
176 {tag:'td', colspan:'5', children:[ 174 {tag:'td', colspan:'5', children:[
177 {tag:'div', cls:'recordDetailDescriptionBox', htmlString:Clipperz.PM.Strings['recordDetailNoRecordSelectedDescription']} 175 {tag:'div', cls:'recordDetailDescriptionBox', htmlString:Clipperz.PM.Strings['recordDetailNoRecordSelectedDescription']}
178 ]} 176 ]}
179 ]}, 177 ]},
180 {tag:'tr', colspan:'5', children:[ 178 {tag:'tr', colspan:'5', children:[
181 {tag:'td', colspan:'5', children:this.loginInfo()} 179 {tag:'td', colspan:'5', children:this.loginInfo()}
182 ]} 180 ]}
183 ]} 181 ]}
184 ]} 182 ]}
185 ]} 183 ]}
186 ); 184 );
187//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithNoSelectedRecord - 1"); 185//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithNoSelectedRecord - 1");
188 186
189 if (MochiKit.DOM.getElement('fullLoginHistoryLink') != null) { 187 if (MochiKit.DOM.getElement('fullLoginHistoryLink') != null) {
190 MochiKit.Signal.connect('fullLoginHistoryLink', 'onclick', this, 'showLoginHistoryPanel'); 188 MochiKit.Signal.connect('fullLoginHistoryLink', 'onclick', this, 'showLoginHistoryPanel');
191 } 189 }
192//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithNoSelectedRecord - 2"); 190//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithNoSelectedRecord - 2");
193 191
194 if (MochiKit.DOM.getElement('offlineCopyDownloadWarningLink') != null) { 192 if (MochiKit.DOM.getElement('offlineCopyDownloadWarningLink') != null) {
195 MochiKit.Signal.connect('offlineCopyDownloadWarningLink', 'onclick', this, 'showDownloadOfflineCopyPanel'); 193 MochiKit.Signal.connect('offlineCopyDownloadWarningLink', 'onclick', this, 'showDownloadOfflineCopyPanel');
196 } 194 }
197//MochiKit.Logging.logDebug("<<< RecordDetail.MainComponent.renderWithNoSelectedRecord"); 195//MochiKit.Logging.logDebug("<<< RecordDetail.MainComponent.renderWithNoSelectedRecord");
198 }, 196 },
199 197
200 //------------------------------------------------------------------------- 198 //-------------------------------------------------------------------------
201 199
202 'renderWithSelectedRecord': function() { 200 'renderWithSelectedRecord': function() {
203//MochiKit.Logging.logDebug(">>> RecordDetail.MainComponent.renderWithSelectedRecord"); 201//MochiKit.Logging.logDebug(">>> RecordDetail.MainComponent.renderWithSelectedRecord");
204 if (this.record().shouldLoadData() === true) { 202 if (this.record().shouldLoadData() === true) {
205 // this.renderWithSelectedRecordLoading(); 203 // this.renderWithSelectedRecordLoading();
206//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 1.1"); 204//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 1.1");
207 this.renderWhileProcessingWithMessage(Clipperz.PM.Strings['recordDetailLoadingRecordMessage']); 205 this.renderWhileProcessingWithMessage(Clipperz.PM.Strings['recordDetailLoadingRecordMessage']);
208//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 1.2"); 206//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 1.2");
209 } else if (this.record().shouldDecryptData() === true) { 207 } else if (this.record().shouldDecryptData() === true) {
210 // this.renderWithSelectedRecordDecrypting(); 208 // this.renderWithSelectedRecordDecrypting();
211//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 2.1"); 209//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 2.1");
212 this.renderWhileProcessingWithMessage(Clipperz.PM.Strings['recordDetailDecryptingRecordMessage']); 210 this.renderWhileProcessingWithMessage(Clipperz.PM.Strings['recordDetailDecryptingRecordMessage']);
213//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 2.2"); 211//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 2.2");
214 } else if (this.record().currentVersion().shouldLoadData() === true) { 212 } else if (this.record().currentVersion().shouldLoadData() === true) {
215//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 3.1"); 213//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 3.1");
216 this.renderWhileProcessingWithMessage(Clipperz.PM.Strings['recordDetailLoadingRecordVersionMessage']); 214 this.renderWhileProcessingWithMessage(Clipperz.PM.Strings['recordDetailLoadingRecordVersionMessage']);
217//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 3.2"); 215//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 3.2");
218 } else if (this.record().currentVersion().shouldDecryptData() === true) { 216 } else if (this.record().currentVersion().shouldDecryptData() === true) {
219 // this.renderWithSelectedRecordCurrentVersionDecrypting(); 217 // this.renderWithSelectedRecordCurrentVersionDecrypting();
220//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 4.1"); 218//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 4.1");
221 this.renderWhileProcessingWithMessage(Clipperz.PM.Strings['recordDetailDecryptingRecordVersionMessage']); 219 this.renderWhileProcessingWithMessage(Clipperz.PM.Strings['recordDetailDecryptingRecordVersionMessage']);
222//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 4.2"); 220//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 4.2");
223 } else { 221 } else {
224//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 5.1"); 222//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 5.1");
225 this.renderWithSelectedRecordData(); 223 this.renderWithSelectedRecordData();
226//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 5.2"); 224//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecord - 5.2");
227 } 225 }
228//MochiKit.Logging.logDebug("<<< RecordDetail.MainComponent.renderWithSelectedRecord"); 226//MochiKit.Logging.logDebug("<<< RecordDetail.MainComponent.renderWithSelectedRecord");
229 }, 227 },
230 228
231 //......................................................................... 229 //.........................................................................
232 230
233 'renderWhileProcessingWithMessage': function(aMessage) { 231 'renderWhileProcessingWithMessage': function(aMessage) {
234//MochiKit.Logging.logDebug(">>> RecordDetail.MainComponent.renderWhileProcessingWithMessage"); 232//MochiKit.Logging.logDebug(">>> RecordDetail.MainComponent.renderWhileProcessingWithMessage");
235 Clipperz.YUI.DomHelper.append(this.element().dom, 233 Clipperz.YUI.DomHelper.append(this.element().dom,
236 {tag:'form', cls:'processingRecordFORM', children:[ 234 {tag:'form', cls:'processingRecordFORM', children:[
237 {tag:'div', cls:'recordTitleBlock', children:[ 235 {tag:'div', cls:'recordTitleBlock', children:[
238 {tag:'h2', id:'recordTitle', html:this.record().label()} 236 {tag:'h2', id:'recordTitle', html:this.record().label()}
239 ]}, 237 ]},
240 {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ 238 {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[
241 {tag:'tbody', children:[ 239 {tag:'tbody', children:[
242 {tag:'tr', cls:'recordTR', children:[ 240 {tag:'tr', cls:'recordTR', children:[
243 {tag:'td', colspan:'5', children:[ 241 {tag:'td', colspan:'5', children:[
244 {tag:'div', cls:'recordDetailDescriptionBox', children:[ 242 {tag:'div', cls:'recordDetailDescriptionBox', children:[
245 {tag:'h5', cls:'recordLoadingMessage', html:aMessage} 243 {tag:'h5', cls:'recordLoadingMessage', html:aMessage}
246 ]} 244 ]}
247 ]} 245 ]}
248 ]} 246 ]}
249 ]} 247 ]}
250 ]} 248 ]}
251 ]} 249 ]}
252 ); 250 );
253//MochiKit.Logging.logDebug("<<< RecordDetail.MainComponent.renderWhileProcessingWithMessage"); 251//MochiKit.Logging.logDebug("<<< RecordDetail.MainComponent.renderWhileProcessingWithMessage");
254 }, 252 },
255 253
256 //......................................................................... 254 //.........................................................................
257/* 255/*
258 'renderWithSelectedRecordLoading': function() { 256 'renderWithSelectedRecordLoading': function() {
259 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'', style:'border:1px solid red; padding: 20px;', children:[ 257 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'', style:'border:1px solid red; padding: 20px;', children:[
260 {tag:'div', cls:'Clipprez_RecordDetailTitle', children:[ 258 {tag:'div', cls:'Clipprez_RecordDetailTitle', children:[
261 {tag:'h3', html:this.record().label()}, 259 {tag:'h3', html:this.record().label()},
262 {tag:'h3', html:"loading"} 260 {tag:'h3', html:"loading"}
263 ]} 261 ]}
264 ]}); 262 ]});
265 }, 263 },
266 264
267 //......................................................................... 265 //.........................................................................
268 266
269 'renderWithSelectedRecordDecrypting': function() { 267 'renderWithSelectedRecordDecrypting': function() {
270 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'', style:'border:1px solid red; padding: 20px;', children:[ 268 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'', style:'border:1px solid red; padding: 20px;', children:[
271 {tag:'div', cls:'Clipprez_RecordDetailTitle', children:[ 269 {tag:'div', cls:'Clipprez_RecordDetailTitle', children:[
272 {tag:'h3', html:this.record().label()}, 270 {tag:'h3', html:this.record().label()},
273 {tag:'h3', html:"decrypting ... "} 271 {tag:'h3', html:"decrypting ... "}
274 ]} 272 ]}
275 ]}); 273 ]});
276 }, 274 },
277 275
278 //......................................................................... 276 //.........................................................................
279 277
280 'renderWithSelectedRecordCurrentVersionDecrypting': function() { 278 'renderWithSelectedRecordCurrentVersionDecrypting': function() {
281 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'', style:'border:1px solid red; padding: 20px;', children:[ 279 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'', style:'border:1px solid red; padding: 20px;', children:[
282 {tag:'div', cls:'Clipprez_RecordDetailTitle', children:[ 280 {tag:'div', cls:'Clipprez_RecordDetailTitle', children:[
283 {tag:'h3', html:this.record().label()}, 281 {tag:'h3', html:this.record().label()},
284 {tag:'h3', html:"decrypting version ... "} 282 {tag:'h3', html:"decrypting version ... "}
285 ]} 283 ]}
286 ]}); 284 ]});
287 }, 285 },
288*/ 286*/
289 //------------------------------------------------------------------------- 287 //-------------------------------------------------------------------------
290 288
291 'renderWithErrorMessage': function(anErrorMessage) { 289 'renderWithErrorMessage': function(anErrorMessage) {
292//MochiKit.Logging.logDebug(">>> RecordDetail.MainComponent.renderWithErrorMessage"); 290//MochiKit.Logging.logDebug(">>> RecordDetail.MainComponent.renderWithErrorMessage");
293 this.element().update(""); 291 this.element().update("");
294 292
295//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithErrorMessage - 1"); 293//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithErrorMessage - 1");
296 Clipperz.YUI.DomHelper.append(this.element().dom, 294 Clipperz.YUI.DomHelper.append(this.element().dom,
297 {tag:'form', cls:'errorMessageFORM', children:[ 295 {tag:'form', cls:'errorMessageFORM', children:[
298 {tag:'div', cls:'recordTitleBlock', children:[ 296 {tag:'div', cls:'recordTitleBlock', children:[
299 {tag:'h2', id:'recordTitle', html:this.record().label()} 297 {tag:'h2', id:'recordTitle', html:this.record().label()}
300 ]}, 298 ]},
301 {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ 299 {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[
302 {tag:'tbody', children:[ 300 {tag:'tbody', children:[
303 {tag:'tr', cls:'recordTR', children:[ 301 {tag:'tr', cls:'recordTR', children:[
304 {tag:'td', colspan:'5', children:[ 302 {tag:'td', colspan:'5', children:[
305 {tag:'div', cls:'recordDetailDescriptionBox loadingError', children:[ 303 {tag:'div', cls:'recordDetailDescriptionBox loadingError', children:[
306 {tag:'h5', htmlString:Clipperz.PM.Strings['recordDetailLoadingErrorMessageTitle']}, 304 {tag:'h5', htmlString:Clipperz.PM.Strings['recordDetailLoadingErrorMessageTitle']},
307 {tag:'p', html:anErrorMessage.message} 305 {tag:'p', html:anErrorMessage.message}
308 ]} 306 ]}
309 ]} 307 ]}
310 ]} 308 ]}
311 ]} 309 ]}
312 ]} 310 ]}
313 ]} 311 ]}
314 ); 312 );
315//MochiKit.Logging.logDebug("<<< RecordDetail.MainComponent.renderWithErrorMessage"); 313//MochiKit.Logging.logDebug("<<< RecordDetail.MainComponent.renderWithErrorMessage");
316 }, 314 },
317 315
318 //------------------------------------------------------------------------- 316 //-------------------------------------------------------------------------
319 317
320 'renderWithSelectedRecordData': function() { 318 'renderWithSelectedRecordData': function() {
321 varcolumns; 319 varcolumns;
322 320
323 this.resetEditComponents(); 321 this.resetEditComponents();
324 322
325 columns = [ 323 columns = [
326 {tag:'td', width:'25', html:'&#160'}, 324 {tag:'td', width:'25', html:'&#160'},
327 {tag:'td', width:'25%', htmlString:Clipperz.PM.Strings['recordDetailLabelFieldColumnLabel']}, 325 {tag:'td', width:'25%', htmlString:Clipperz.PM.Strings['recordDetailLabelFieldColumnLabel']},
328 {tag:'td', width:'3', html:'&#160'}, 326 {tag:'td', width:'3', html:'&#160'},
329 {tag:'td', /*width:'80%',*/ htmlString:Clipperz.PM.Strings['recordDetailDataFieldColumnLabel']} 327 {tag:'td', /*width:'80%',*/ htmlString:Clipperz.PM.Strings['recordDetailDataFieldColumnLabel']}
330 ]; 328 ];
331 329
332 if (this.editMode() == 'EDIT') { 330 if (this.editMode() == 'EDIT') {
333 columns.push({tag:'td', /*width:'55',*/ htmlString:Clipperz.PM.Strings['recordDetailTypeFieldColumnLabel']}) 331 columns.push({tag:'td', /*width:'55',*/ htmlString:Clipperz.PM.Strings['recordDetailTypeFieldColumnLabel']})
334 } 332 }
335 333
336//MochiKit.Logging.logDebug(">>> RecordDetail.MainComponent.renderWithSelectedRecordData"); 334//MochiKit.Logging.logDebug(">>> RecordDetail.MainComponent.renderWithSelectedRecordData");
337 Clipperz.YUI.DomHelper.append(this.element().dom, 335 Clipperz.YUI.DomHelper.append(this.element().dom,
338 {tag:'form', cls:'recordDataFORM', children:[ 336 {tag:'form', cls:'recordDataFORM', children:[
339 {tag:'div', cls:'recordTitleBlock', id:this.getId('title')}, 337 {tag:'div', cls:'recordTitleBlock', id:this.getId('title')},
340 {tag:'div', id:'recordDetailDataBox', cls:'recordDetailDataBox', children:[ 338 {tag:'div', id:'recordDetailDataBox', cls:'recordDetailDataBox', children:[
341 339
342{tag:'table', width:'100%', border:'0', cellspacing:'0', cellpadding:'0', children:[ 340{tag:'table', width:'100%', border:'0', cellspacing:'0', cellpadding:'0', children:[
343 {tag:'tbody', children:[ 341 {tag:'tbody', children:[
344 {tag:'tr', children:[ 342 {tag:'tr', children:[
345 {tag:'td', width:'5', html:"&nbsp;"}, 343 {tag:'td', width:'5', html:"&nbsp;"},
346 {tag:'td', children:[ 344 {tag:'td', children:[
347 345
348 {tag:'table', cls:'recordDetailDataBoxTABLE', border:'0', cellspacing:'0', cellpadding:'0', children:[ 346 {tag:'table', cls:'recordDetailDataBoxTABLE', border:'0', cellspacing:'0', cellpadding:'0', children:[
349 {tag:'tbody', id:this.getId('tbody'), children:[ 347 {tag:'tbody', id:this.getId('tbody'), children:[
350 {tag:'tr', /*cls:'recordNoteTR',*/ children:[ 348 {tag:'tr', /*cls:'recordNoteTR',*/ children:[
351 {tag:'td', colspan:'5', id:this.getId('notes')} 349 {tag:'td', colspan:'5', id:this.getId('notes')}
352 ]}, 350 ]},
353 {tag:'tr', cls:'recordFieldsTR', children:columns /*[ 351 {tag:'tr', cls:'recordFieldsTR', children:columns /*[
354 {tag:'td', width:'25', html:'&#160'}, 352 {tag:'td', width:'25', html:'&#160'},
355 {tag:'td', width:'25%', htmlString:Clipperz.PM.Strings['recordDetailLabelFieldColumnLabel']}, 353 {tag:'td', width:'25%', htmlString:Clipperz.PM.Strings['recordDetailLabelFieldColumnLabel']},
356 {tag:'td', width:'3', html:'&#160'}, 354 {tag:'td', width:'3', html:'&#160'},
357 {tag:'td', / *width:'80%',* / htmlString:Clipperz.PM.Strings['recordDetailDataFieldColumnLabel']}, 355 {tag:'td', / *width:'80%',* / htmlString:Clipperz.PM.Strings['recordDetailDataFieldColumnLabel']},
358 {tag:'td', / *width:'55',* / htmlString:Clipperz.PM.Strings['recordDetailTypeFieldColumnLabel']} 356 {tag:'td', / *width:'55',* / htmlString:Clipperz.PM.Strings['recordDetailTypeFieldColumnLabel']}
359 ] */} 357 ] */}
360 ]} 358 ]}
361 ]}, 359 ]},
362 {tag:'div', cls:'addFieldButton', id:this.getId('addField'), children:[ 360 {tag:'div', cls:'addFieldButton', id:this.getId('addField'), children:[
363 {tag:'div', id:this.getId('addFieldButton')} 361 {tag:'div', id:this.getId('addFieldButton')}
364 ]}, 362 ]},
365 {tag:'div', id:this.getId('directLogins')}, 363 {tag:'div', id:this.getId('directLogins')},
366 {tag:'div', id:this.getId('footer')} 364 {tag:'div', id:this.getId('footer')}
367 365
368 ]} 366 ]}
369 ]} 367 ]}
370 ]} 368 ]}
371]} 369]}
372 370
373 ]} 371 ]}
374 ]} 372 ]}
375 ); 373 );
376 374
377//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecordData - 1"); 375//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecordData - 1");
378 376
379 new Clipperz.PM.Components.RecordDetail.TitleComponent(this.getElement('title'), {mainComponent:this}); 377 new Clipperz.PM.Components.RecordDetail.TitleComponent(this.getElement('title'), {mainComponent:this});
380//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecordData - 2"); 378//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecordData - 2");
381 new Clipperz.PM.Components.RecordDetail.NotesComponent(this.getElement('notes'), {mainComponent:this}); 379 new Clipperz.PM.Components.RecordDetail.NotesComponent(this.getElement('notes'), {mainComponent:this});
382//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecordData - 3"); 380//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecordData - 3");
383 new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent(this.getElement('directLogins'), {mainComponent:this}); 381 new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent(this.getElement('directLogins'), {mainComponent:this});
384//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecordData - 4"); 382//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecordData - 4");
385 new Clipperz.PM.Components.RecordDetail.HeaderComponent(this.getElement('footer'), {mainComponent:this}); 383 new Clipperz.PM.Components.RecordDetail.HeaderComponent(this.getElement('footer'), {mainComponent:this});
386//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecordData - 5"); 384//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecordData - 5");
387 MochiKit.Iter.forEach(MochiKit.Base.values(this.record().currentVersion().fields()), this.appendFieldComponent, this); 385 MochiKit.Iter.forEach(MochiKit.Base.values(this.record().currentVersion().fields()), this.appendFieldComponent, this);
388//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecordData - 6"); 386//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecordData - 6");
389 this.setAddFieldButton(new YAHOO.ext.Button(this.getDom('addFieldButton'), {text:Clipperz.PM.Strings['recordDetailAddFieldButtonLabel'], handler:this.addNewRecordField, scope:this})); 387 this.setAddFieldButton(new YAHOO.ext.Button(this.getDom('addFieldButton'), {text:Clipperz.PM.Strings['recordDetailAddFieldButtonLabel'], handler:this.addNewRecordField, scope:this}));
390//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecordData - 7"); 388//MochiKit.Logging.logDebug("--- RecordDetail.MainComponent.renderWithSelectedRecordData - 7");
391 389
392 this.update(); 390 this.update();
393 391
394//MochiKit.Logging.logDebug("<<< RecordDetail.MainComponent.renderWithSelectedRecordData"); 392//MochiKit.Logging.logDebug("<<< RecordDetail.MainComponent.renderWithSelectedRecordData");
395 }, 393 },
396 394
397 //------------------------------------------------------------------------- 395 //-------------------------------------------------------------------------
398 396
399 'editComponents': function() { 397 'editComponents': function() {
400 return this._editComponents; 398 return this._editComponents;
401 }, 399 },
402 400
403 'resetEditComponents': function() { 401 'resetEditComponents': function() {
404 this._editComponents = []; 402 this._editComponents = [];
405 }, 403 },
406 404
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js
index 2066543..bb23e8d 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js
@@ -1,237 +1,235 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33 31
34 32
35Clipperz.PM.Components.RecordDetail.NotesComponent = function(anElement, args) { 33Clipperz.PM.Components.RecordDetail.NotesComponent = function(anElement, args) {
36//MochiKit.Logging.logDebug(">>> new NotesComponent"); 34//MochiKit.Logging.logDebug(">>> new NotesComponent");
37 args = args || {}; 35 args = args || {};
38 36
39 Clipperz.PM.Components.RecordDetail.NotesComponent.superclass.constructor.call(this, anElement, args); 37 Clipperz.PM.Components.RecordDetail.NotesComponent.superclass.constructor.call(this, anElement, args);
40 38
41 this.mainComponent().addEditComponent(this); 39 this.mainComponent().addEditComponent(this);
42 40
43 this._staticOffset = null; 41 this._staticOffset = null;
44 this._componentHeight = 50; 42 this._componentHeight = 50;
45 this._mouseMoveIdentifier = null; 43 this._mouseMoveIdentifier = null;
46 this._mouseUpIdentifier = null; 44 this._mouseUpIdentifier = null;
47 45
48 this.element().setVisibilityMode(YAHOO.ext.Element.DISPLAY); 46 this.element().setVisibilityMode(YAHOO.ext.Element.DISPLAY);
49 47
50 this.render(); 48 this.render();
51//MochiKit.Logging.logDebug("<<< new NotesComponent"); 49//MochiKit.Logging.logDebug("<<< new NotesComponent");
52 50
53 return this; 51 return this;
54} 52}
55 53
56//============================================================================= 54//=============================================================================
57 55
58YAHOO.extendX(Clipperz.PM.Components.RecordDetail.NotesComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 56YAHOO.extendX(Clipperz.PM.Components.RecordDetail.NotesComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
59 57
60 'toString': function() { 58 'toString': function() {
61 return "Clipperz.PM.Components.RecordDetail.NotesComponent component"; 59 return "Clipperz.PM.Components.RecordDetail.NotesComponent component";
62 }, 60 },
63 61
64 //------------------------------------------------------------------------- 62 //-------------------------------------------------------------------------
65 63
66 'value': function() { 64 'value': function() {
67 return this.record().notes(); 65 return this.record().notes();
68 }, 66 },
69 67
70 'setValue': function(aValue) { 68 'setValue': function(aValue) {
71 this.record().setNotes(aValue); 69 this.record().setNotes(aValue);
72 }, 70 },
73 71
74 //------------------------------------------------------------------------- 72 //-------------------------------------------------------------------------
75 73
76 'render': function() { 74 'render': function() {
77//MochiKit.Logging.logDebug(">>> NotesComponent.render"); 75//MochiKit.Logging.logDebug(">>> NotesComponent.render");
78/* 76/*
79 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', colspan:'5', children:[ 77 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', colspan:'5', children:[
80 {tag:'span', cls:'noteFieldLabel', htmlString:Clipperz.PM.Strings['recordDetailNotesLabel']}, 78 {tag:'span', cls:'noteFieldLabel', htmlString:Clipperz.PM.Strings['recordDetailNotesLabel']},
81 {tag:'div', cls:'noteFieldContent', id:this.getId('notes')} 79 {tag:'div', cls:'noteFieldContent', id:this.getId('notes')}
82 ]}); 80 ]});
83 */ 81 */
84 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', cls:'noteFieldLabel', htmlString:Clipperz.PM.Strings['recordDetailNotesLabel']}); 82 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', cls:'noteFieldLabel', htmlString:Clipperz.PM.Strings['recordDetailNotesLabel']});
85 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'noteFieldContent', id:this.getId('notes'), children:[ 83 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'noteFieldContent', id:this.getId('notes'), children:[
86 {tag:'div', id:this.getId('resizableDiv'), cls:'resizable-textarea', children:[ 84 {tag:'div', id:this.getId('resizableDiv'), cls:'resizable-textarea', children:[
87 {tag:'div', id:this.getId('contentView'), cls:'viewMode', html:""}, 85 {tag:'div', id:this.getId('contentView'), cls:'viewMode', html:""},
88 {tag:'div', id:this.getId('contentEdit'), children:[ 86 {tag:'div', id:this.getId('contentEdit'), children:[
89 {tag:'span', children:[ 87 {tag:'span', children:[
90 {tag:'textarea', id:this.getId('textarea'), html:""} 88 {tag:'textarea', id:this.getId('textarea'), html:""}
91 ]} 89 ]}
92 ]}, 90 ]},
93 {tag:'div', id:this.getId('grippie'), cls:'grippie'} 91 {tag:'div', id:this.getId('grippie'), cls:'grippie'}
94 ]} 92 ]}
95 ]}); 93 ]});
96 94
97 this.getElement('contentView').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 95 this.getElement('contentView').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
98 this.getElement('contentEdit').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 96 this.getElement('contentEdit').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
99 97
100 MochiKit.Signal.connect(this.getId('grippie'), 'onmousedown', this, 'startResize'); 98 MochiKit.Signal.connect(this.getId('grippie'), 'onmousedown', this, 'startResize');
101 99
102 this.update(); 100 this.update();
103//MochiKit.Logging.logDebug("<<< NotesComponent.render"); 101//MochiKit.Logging.logDebug("<<< NotesComponent.render");
104 }, 102 },
105 103
106 //------------------------------------------------------------------------- 104 //-------------------------------------------------------------------------
107 105
108 'updateViewMode': function() { 106 'updateViewMode': function() {
109//MochiKit.Logging.logDebug(">>> NotesComponent.updateViewMode"); 107//MochiKit.Logging.logDebug(">>> NotesComponent.updateViewMode");
110 // this.getElement('notes').update(this.value().replace(/\n/g, '<br>')); 108 // this.getElement('notes').update(this.value().replace(/\n/g, '<br>'));
111 109
112 this.getElement('contentView').update(Clipperz.Base.sanitizeString(this.value()).replace(/\n/g, '<br>')); 110 this.getElement('contentView').update(Clipperz.Base.sanitizeString(this.value()).replace(/\n/g, '<br>'));
113 111
114 if (this.isNoteEmpty()) { 112 if (this.isNoteEmpty()) {
115 this.element().hide(); 113 this.element().hide();
116 } else { 114 } else {
117 this.getElement('contentView').show(); 115 this.getElement('contentView').show();
118 this.getElement('contentView').setHeight(this.componentHeight()); 116 this.getElement('contentView').setHeight(this.componentHeight());
119 } 117 }
120 this.getElement('contentEdit').hide(); 118 this.getElement('contentEdit').hide();
121 119
122//MochiKit.Logging.logDebug("<<< NotesComponent.updateViewMode"); 120//MochiKit.Logging.logDebug("<<< NotesComponent.updateViewMode");
123 }, 121 },
124 122
125 //------------------------------------------------------------------------- 123 //-------------------------------------------------------------------------
126 124
127 'updateEditMode': function() { 125 'updateEditMode': function() {
128//MochiKit.Logging.logDebug(">>> NotesComponent.updateEditMode"); 126//MochiKit.Logging.logDebug(">>> NotesComponent.updateEditMode");
129 this.getDom('textarea').value = this.value().replace(/\n/g, Clipperz_normalizedNewLine); 127 this.getDom('textarea').value = this.value().replace(/\n/g, Clipperz_normalizedNewLine);
130 128
131 this.getElement('contentView').hide(); 129 this.getElement('contentView').hide();
132 this.getElement('contentEdit').show(); 130 this.getElement('contentEdit').show();
133 131
134 this.getElement('textarea').setHeight(this.componentHeight()); 132 this.getElement('textarea').setHeight(this.componentHeight());
135//MochiKit.Logging.logDebug("<<< NotesComponent.updateEditMode"); 133//MochiKit.Logging.logDebug("<<< NotesComponent.updateEditMode");
136 }, 134 },
137 135
138 //------------------------------------------------------------------------- 136 //-------------------------------------------------------------------------
139 137
140 'synchronizeComponentValues': function() { 138 'synchronizeComponentValues': function() {
141//MochiKit.Logging.logDebug(">>> NotesComponent.synchronizeComponentValues"); 139//MochiKit.Logging.logDebug(">>> NotesComponent.synchronizeComponentValues");
142 if (this.getElement('textarea') != null) { 140 if (this.getElement('textarea') != null) {
143 this.setValue(this.getDom('textarea').value.replace(/(\x0a\x0d|\x0d\x0a)/g,'\n')); 141 this.setValue(this.getDom('textarea').value.replace(/(\x0a\x0d|\x0d\x0a)/g,'\n'));
144 } 142 }
145//MochiKit.Logging.logDebug("<<< NotesComponent.synchronizeComponentValues"); 143//MochiKit.Logging.logDebug("<<< NotesComponent.synchronizeComponentValues");
146 }, 144 },
147 145
148 //------------------------------------------------------------------------- 146 //-------------------------------------------------------------------------
149 147
150 'componentHeight': function() { 148 'componentHeight': function() {
151 return this._componentHeight; 149 return this._componentHeight;
152 }, 150 },
153 151
154 'setComponentHeight': function(aValue) { 152 'setComponentHeight': function(aValue) {
155 this._componentHeight = aValue; 153 this._componentHeight = aValue;
156 }, 154 },
157 155
158 //------------------------------------------------------------------------- 156 //-------------------------------------------------------------------------
159 157
160 'isNoteEmpty': function() { 158 'isNoteEmpty': function() {
161 return !/[^ \n]/.test(this.value()); 159 return !/[^ \n]/.test(this.value());
162 }, 160 },
163 161
164 //------------------------------------------------------------------------- 162 //-------------------------------------------------------------------------
165 163
166 'staticOffset': function() { 164 'staticOffset': function() {
167 return this._staticOffset; 165 return this._staticOffset;
168 }, 166 },
169 167
170 'setStaticOffset': function(aValue) { 168 'setStaticOffset': function(aValue) {
171 this._staticOffset = aValue; 169 this._staticOffset = aValue;
172 }, 170 },
173 171
174 //------------------------------------------------------------------------- 172 //-------------------------------------------------------------------------
175 173
176 'startResize': function(anEvent) { 174 'startResize': function(anEvent) {
177//MochiKit.Logging.logDebug(">>> startResize"); 175//MochiKit.Logging.logDebug(">>> startResize");
178 if (this.editMode() == 'VIEW') { 176 if (this.editMode() == 'VIEW') {
179 this.setStaticOffset(this.getElement('contentView').getHeight() - anEvent.mouse().page['y']) 177 this.setStaticOffset(this.getElement('contentView').getHeight() - anEvent.mouse().page['y'])
180 } else { 178 } else {
181 this.setStaticOffset(this.getElement('textarea').getHeight() - anEvent.mouse().page['y']) 179 this.setStaticOffset(this.getElement('textarea').getHeight() - anEvent.mouse().page['y'])
182 // this.getElement('textarea').setStyle('opacity', 0.25); 180 // this.getElement('textarea').setStyle('opacity', 0.25);
183 } 181 }
184 this.setMouseMoveIdentifier(MochiKit.Signal.connect(MochiKit.DOM.currentDocument(), 'onmousemove', this, 'whileResizing')); 182 this.setMouseMoveIdentifier(MochiKit.Signal.connect(MochiKit.DOM.currentDocument(), 'onmousemove', this, 'whileResizing'));
185 this.setMouseUpIdentifier(MochiKit.Signal.connect(MochiKit.DOM.currentDocument(), 'onmouseup', this, 'endResize')); 183 this.setMouseUpIdentifier(MochiKit.Signal.connect(MochiKit.DOM.currentDocument(), 'onmouseup', this, 'endResize'));
186 anEvent.stop(); 184 anEvent.stop();
187//MochiKit.Logging.logDebug("<<< startResize"); 185//MochiKit.Logging.logDebug("<<< startResize");
188 }, 186 },
189 187
190 //------------------------------------------------------------------------- 188 //-------------------------------------------------------------------------
191 189
192 'whileResizing': function(anEvent) { 190 'whileResizing': function(anEvent) {
193//MochiKit.Logging.logDebug(">>> whileResizing"); 191//MochiKit.Logging.logDebug(">>> whileResizing");
194 this.getElement('textarea').setHeight(Math.max(32, this.staticOffset() + anEvent.mouse().page['y']) + 'px'); 192 this.getElement('textarea').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'); 193 this.getElement('contentView').setHeight(Math.max(32, this.staticOffset() + anEvent.mouse().page['y']) + 'px');
196 anEvent.stop(); 194 anEvent.stop();
197//MochiKit.Logging.logDebug("<<< whileResizing"); 195//MochiKit.Logging.logDebug("<<< whileResizing");
198 }, 196 },
199 197
200 //------------------------------------------------------------------------- 198 //-------------------------------------------------------------------------
201 199
202 'endResize': function(anEvent) { 200 'endResize': function(anEvent) {
203//MochiKit.Logging.logDebug(">>> endResize"); 201//MochiKit.Logging.logDebug(">>> endResize");
204 MochiKit.Signal.disconnect(this.mouseMoveIdentifier()); 202 MochiKit.Signal.disconnect(this.mouseMoveIdentifier());
205 this.setMouseMoveIdentifier(null); 203 this.setMouseMoveIdentifier(null);
206 MochiKit.Signal.disconnect(this.mouseUpIdentifier()); 204 MochiKit.Signal.disconnect(this.mouseUpIdentifier());
207 this.setMouseUpIdentifier(null); 205 this.setMouseUpIdentifier(null);
208 // this.getElement('textarea').setStyle('opacity', 1); 206 // this.getElement('textarea').setStyle('opacity', 1);
209 207
210 this.setComponentHeight(this.getElement('textarea').getHeight()); 208 this.setComponentHeight(this.getElement('textarea').getHeight());
211//MochiKit.Logging.logDebug("<<< endResize"); 209//MochiKit.Logging.logDebug("<<< endResize");
212 }, 210 },
213 211
214 //------------------------------------------------------------------------- 212 //-------------------------------------------------------------------------
215 213
216 'mouseMoveIdentifier': function() { 214 'mouseMoveIdentifier': function() {
217 return this._mouseMoveIdentifier; 215 return this._mouseMoveIdentifier;
218 }, 216 },
219 217
220 'setMouseMoveIdentifier': function(aValue) { 218 'setMouseMoveIdentifier': function(aValue) {
221 this._mouseMoveIdentifier = aValue; 219 this._mouseMoveIdentifier = aValue;
222 }, 220 },
223 221
224 //------------------------------------------------------------------------- 222 //-------------------------------------------------------------------------
225 223
226 'mouseUpIdentifier': function() { 224 'mouseUpIdentifier': function() {
227 return this._mouseUpIdentifier; 225 return this._mouseUpIdentifier;
228 }, 226 },
229 227
230 'setMouseUpIdentifier': function(aValue) { 228 'setMouseUpIdentifier': function(aValue) {
231 this._mouseUpIdentifier = aValue; 229 this._mouseUpIdentifier = aValue;
232 }, 230 },
233 231
234 //------------------------------------------------------------------------- 232 //-------------------------------------------------------------------------
235 __syntaxFix__: "syntax fix" 233 __syntaxFix__: "syntax fix"
236}); 234});
237 235
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js
index 29fe972..d114eaa 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js
@@ -1,134 +1,132 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } 27if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Components.RecordDetail.TitleComponent = function(anElement, args) { 31Clipperz.PM.Components.RecordDetail.TitleComponent = function(anElement, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 Clipperz.PM.Components.RecordDetail.TitleComponent.superclass.constructor.call(this, anElement, args); 34 Clipperz.PM.Components.RecordDetail.TitleComponent.superclass.constructor.call(this, anElement, args);
37 35
38 //this._inputElement = null; 36 //this._inputElement = null;
39 37
40 this.mainComponent().addEditComponent(this); 38 this.mainComponent().addEditComponent(this);
41 39
42 this.render(); 40 this.render();
43 41
44 return this; 42 return this;
45} 43}
46 44
47//============================================================================= 45//=============================================================================
48 46
49YAHOO.extendX(Clipperz.PM.Components.RecordDetail.TitleComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { 47YAHOO.extendX(Clipperz.PM.Components.RecordDetail.TitleComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
50 48
51 'toString': function() { 49 'toString': function() {
52 return "Clipperz.PM.Components.RecordDetail.TitleComponent component"; 50 return "Clipperz.PM.Components.RecordDetail.TitleComponent component";
53 }, 51 },
54 52
55 //------------------------------------------------------------------------- 53 //-------------------------------------------------------------------------
56 54
57 'value': function() { 55 'value': function() {
58 return this.record().label(); 56 return this.record().label();
59 }, 57 },
60 58
61 'setValue': function(aValue) { 59 'setValue': function(aValue) {
62 this.record().setLabel(aValue); 60 this.record().setLabel(aValue);
63 }, 61 },
64 62
65 //------------------------------------------------------------------------- 63 //-------------------------------------------------------------------------
66/* 64/*
67 'inputElement': function() { 65 'inputElement': function() {
68 return this._inputElement; 66 return this._inputElement;
69 }, 67 },
70 68
71 'setInputElement': function(aValue) { 69 'setInputElement': function(aValue) {
72 this._inputElement = aValue; 70 this._inputElement = aValue;
73 }, 71 },
74*/ 72*/
75 //------------------------------------------------------------------------- 73 //-------------------------------------------------------------------------
76 74
77 'render': function() { 75 'render': function() {
78 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', html:'&#160'}); 76 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', html:'&#160'});
79 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', colspan:"3", html:'&#160', children:[ 77 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', colspan:"3", html:'&#160', children:[
80 // {tag:'div', /*style:'border: 1px solid green;',*/ id:this.getId('title')} 78 // {tag:'div', /*style:'border: 1px solid green;',*/ id:this.getId('title')}
81 // ]}); 79 // ]});
82 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', html:'&#160'}); 80 // Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', html:'&#160'});
83 // 81 //
84 // this.setInputElement(new Clipperz.PM.Components.TextFormField(this.getElement('title'), {editMode:this.editMode(), value:this.value()})); 82 // this.setInputElement(new Clipperz.PM.Components.TextFormField(this.getElement('title'), {editMode:this.editMode(), value:this.value()}));
85 83
86 this.update(); 84 this.update();
87 }, 85 },
88 86
89 //------------------------------------------------------------------------- 87 //-------------------------------------------------------------------------
90/* 88/*
91 'update': function() { 89 'update': function() {
92 this.inputElement().update({value:this.value(), editMode:this.editMode()}); 90 this.inputElement().update({value:this.value(), editMode:this.editMode()});
93 }, 91 },
94 */ 92 */
95 //------------------------------------------------------------------------- 93 //-------------------------------------------------------------------------
96 94
97 'updateViewMode': function() { 95 'updateViewMode': function() {
98 this.element().update(""); 96 this.element().update("");
99 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'h2', html:this.value()}); 97 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'h2', html:this.value()});
100 }, 98 },
101 99
102 //------------------------------------------------------------------------- 100 //-------------------------------------------------------------------------
103 101
104 'updateEditMode': function() { 102 'updateEditMode': function() {
105//MochiKit.Logging.logDebug(">>> TitleComponent.updateEditMode"); 103//MochiKit.Logging.logDebug(">>> TitleComponent.updateEditMode");
106 // this.getElement('title').update(""); 104 // this.getElement('title').update("");
107 // Clipperz.YUI.DomHelper.append(this.getDom('title'), {tag:'div', id:this.getId('title_input')}); 105 // Clipperz.YUI.DomHelper.append(this.getDom('title'), {tag:'div', id:this.getId('title_input')});
108 // this.setInputElement(Clipperz.YUI.DomHelper.append(this.getDom('title_input'), {tag:'input', type:'text', value:this.value()}, true)); 106 // this.setInputElement(Clipperz.YUI.DomHelper.append(this.getDom('title_input'), {tag:'input', type:'text', value:this.value()}, true));
109 107
110 this.element().update(""); 108 this.element().update("");
111 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'input', id:this.getId('titleField'), type:'text', value:"this.value()"}); 109 Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'input', id:this.getId('titleField'), type:'text', value:"this.value()"});
112 this.getElement('titleField').dom.value = this.value(); 110 this.getElement('titleField').dom.value = this.value();
113 111
114//MochiKit.Logging.logDebug("<<< TitleComponent.updateEditMode"); 112//MochiKit.Logging.logDebug("<<< TitleComponent.updateEditMode");
115 }, 113 },
116 114
117 //------------------------------------------------------------------------- 115 //-------------------------------------------------------------------------
118 116
119 'synchronizeComponentValues': function() { 117 'synchronizeComponentValues': function() {
120 var inputElement; 118 var inputElement;
121 119
122//MochiKit.Logging.logDebug(">>> TitleComponent.synchronizeComponentValues"); 120//MochiKit.Logging.logDebug(">>> TitleComponent.synchronizeComponentValues");
123 inputElement = this.element().getChildrenByTagName('input')[0]; 121 inputElement = this.element().getChildrenByTagName('input')[0];
124 122
125 if (inputElement != null) { 123 if (inputElement != null) {
126 this.setValue(inputElement.dom.value); 124 this.setValue(inputElement.dom.value);
127 } 125 }
128//MochiKit.Logging.logDebug("<<< TitleComponent.synchronizeComponentValues"); 126//MochiKit.Logging.logDebug("<<< TitleComponent.synchronizeComponentValues");
129 }, 127 },
130 128
131 //------------------------------------------------------------------------- 129 //-------------------------------------------------------------------------
132 __syntaxFix__: "syntax fix" 130 __syntaxFix__: "syntax fix"
133}); 131});
134 132
diff --git a/frontend/beta/js/Clipperz/PM/Components/TabPanel/TabPanelController.js b/frontend/beta/js/Clipperz/PM/Components/TabPanel/TabPanelController.js
index b300ba6..d30f514 100644
--- a/frontend/beta/js/Clipperz/PM/Components/TabPanel/TabPanelController.js
+++ b/frontend/beta/js/Clipperz/PM/Components/TabPanel/TabPanelController.js
@@ -1,155 +1,153 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29if (typeof(Clipperz.PM.Components.TabPanel) == 'undefined') { Clipperz.PM.Components.TabPanel = {}; } 27if (typeof(Clipperz.PM.Components.TabPanel) == 'undefined') { Clipperz.PM.Components.TabPanel = {}; }
30 28
31Clipperz.PM.Components.TabPanel.TabPanelController = function(args) { 29Clipperz.PM.Components.TabPanel.TabPanelController = function(args) {
32 args = args || {}; 30 args = args || {};
33 31
34 Clipperz.PM.Components.TabPanel.TabPanelController.superclass.constructor.call(this); 32 Clipperz.PM.Components.TabPanel.TabPanelController.superclass.constructor.call(this);
35 33
36 this._name = args.name || 'undefined'; 34 this._name = args.name || 'undefined';
37 this._config = args.config; 35 this._config = args.config;
38 this._selectedTab = args.selectedTab || ((MochiKit.Base.keys(args.config).length > 0) ? MochiKit.Base.keys(args.config)[0] : null); 36 this._selectedTab = args.selectedTab || ((MochiKit.Base.keys(args.config).length > 0) ? MochiKit.Base.keys(args.config)[0] : null);
39 37
40 this._tabs = {}; 38 this._tabs = {};
41 this._panels = {}; 39 this._panels = {};
42 40
43 Clipperz.NotificationCenter.register(null, 'selectTab', this, 'handleSelectTabNotification'); 41 Clipperz.NotificationCenter.register(null, 'selectTab', this, 'handleSelectTabNotification');
44 return this; 42 return this;
45} 43}
46 44
47//============================================================================= 45//=============================================================================
48 46
49YAHOO.extendX(Clipperz.PM.Components.TabPanel.TabPanelController, YAHOO.ext.util.Observable, { 47YAHOO.extendX(Clipperz.PM.Components.TabPanel.TabPanelController, YAHOO.ext.util.Observable, {
50 48
51 //------------------------------------------------------------------------- 49 //-------------------------------------------------------------------------
52 50
53 'name': function() { 51 'name': function() {
54 return this._name; 52 return this._name;
55 }, 53 },
56 54
57 //------------------------------------------------------------------------- 55 //-------------------------------------------------------------------------
58 56
59 'tabs': function() { 57 'tabs': function() {
60 return this._tabs; 58 return this._tabs;
61 }, 59 },
62 60
63 //------------------------------------------------------------------------- 61 //-------------------------------------------------------------------------
64 62
65 'panels': function() { 63 'panels': function() {
66 return this._panels; 64 return this._panels;
67 }, 65 },
68 66
69 //------------------------------------------------------------------------- 67 //-------------------------------------------------------------------------
70 68
71 'config': function() { 69 'config': function() {
72 return this._config; 70 return this._config;
73 }, 71 },
74 72
75 //------------------------------------------------------------------------- 73 //-------------------------------------------------------------------------
76 74
77 'selectedTab': function() { 75 'selectedTab': function() {
78 return this._selectedTab; 76 return this._selectedTab;
79 }, 77 },
80 78
81 'setSelectedTab': function(aValue) { 79 'setSelectedTab': function(aValue) {
82 this._selectedTab = aValue; 80 this._selectedTab = aValue;
83 }, 81 },
84 82
85 //------------------------------------------------------------------------- 83 //-------------------------------------------------------------------------
86 84
87 'setUp': function() { 85 'setUp': function() {
88 vartabId; 86 vartabId;
89 87
90//MochiKit.Logging.logDebug(">>> TabPanelController.setUp - config: " + Clipperz.Base.serializeJSON(this.config())); 88//MochiKit.Logging.logDebug(">>> TabPanelController.setUp - config: " + Clipperz.Base.serializeJSON(this.config()));
91 for (tabId in this.config()) { 89 for (tabId in this.config()) {
92 vartabElement; 90 vartabElement;
93 varpanelElement; 91 varpanelElement;
94 92
95//MochiKit.Logging.logDebug("--- TabPanelController.setUp - tabId: " + tabId); 93//MochiKit.Logging.logDebug("--- TabPanelController.setUp - tabId: " + tabId);
96//MochiKit.Logging.logDebug("--- TabPanelController.setUp - panelId: " + this.config()[tabId]); 94//MochiKit.Logging.logDebug("--- TabPanelController.setUp - panelId: " + this.config()[tabId]);
97 tabElement = YAHOO.ext.Element.get(tabId); 95 tabElement = YAHOO.ext.Element.get(tabId);
98 tabElement.addClassOnOver("hover"); 96 tabElement.addClassOnOver("hover");
99 MochiKit.Signal.connect(tabId, 'onclick', this, 'selectTabHandler'); 97 MochiKit.Signal.connect(tabId, 'onclick', this, 'selectTabHandler');
100 98
101 panelElement = YAHOO.ext.Element.get(this.config()[tabId]); 99 panelElement = YAHOO.ext.Element.get(this.config()[tabId]);
102 100
103 this._tabs[tabId] = tabElement; 101 this._tabs[tabId] = tabElement;
104 this._panels[tabId] = panelElement; 102 this._panels[tabId] = panelElement;
105 103
106 if (tabId == this.selectedTab()) { 104 if (tabId == this.selectedTab()) {
107 tabElement.addClass('selectedTab'); 105 tabElement.addClass('selectedTab');
108 panelElement.addClass('selectedPanel'); 106 panelElement.addClass('selectedPanel');
109 } else { 107 } else {
110 panelElement.addClass('hiddenPanel'); 108 panelElement.addClass('hiddenPanel');
111 } 109 }
112 } 110 }
113//MochiKit.Logging.logDebug("<<< TabPanelController.setUp"); 111//MochiKit.Logging.logDebug("<<< TabPanelController.setUp");
114 }, 112 },
115 113
116 //------------------------------------------------------------------------- 114 //-------------------------------------------------------------------------
117 115
118 'selectTab': function(aTab) { 116 'selectTab': function(aTab) {
119 if (aTab != this.selectedTab()) { 117 if (aTab != this.selectedTab()) {
120 this.tabs()[this.selectedTab()].removeClass('selectedTab'); 118 this.tabs()[this.selectedTab()].removeClass('selectedTab');
121 this.panels()[this.selectedTab()].removeClass('selectedPanel').addClass('hiddenPanel'); 119 this.panels()[this.selectedTab()].removeClass('selectedPanel').addClass('hiddenPanel');
122 120
123 this.tabs()[aTab].addClass('selectedTab'); 121 this.tabs()[aTab].addClass('selectedTab');
124 this.panels()[aTab].addClass('selectedPanel').removeClass('hiddenPanel'); 122 this.panels()[aTab].addClass('selectedPanel').removeClass('hiddenPanel');
125 123
126 this.setSelectedTab(aTab); 124 this.setSelectedTab(aTab);
127 125
128 Clipperz.NotificationCenter.notify(this, 'tabSelected', aTab); 126 Clipperz.NotificationCenter.notify(this, 'tabSelected', aTab);
129 } 127 }
130 }, 128 },
131 129
132 //------------------------------------------------------------------------- 130 //-------------------------------------------------------------------------
133 131
134 'selectTabHandler': function(anEvent) { 132 'selectTabHandler': function(anEvent) {
135 this.selectTab(anEvent.src().id); 133 this.selectTab(anEvent.src().id);
136 }, 134 },
137 135
138 //------------------------------------------------------------------------- 136 //-------------------------------------------------------------------------
139 137
140 'handleSelectTabNotification': function(aNotificationEvent) { 138 'handleSelectTabNotification': function(aNotificationEvent) {
141 var parameters; 139 var parameters;
142 var splittedParamters; 140 var splittedParamters;
143 vartargetTabPanel; 141 vartargetTabPanel;
144 142
145 parameters = aNotificationEvent.parameters(); 143 parameters = aNotificationEvent.parameters();
146 splittedParamters = parameters.split('.'); 144 splittedParamters = parameters.split('.');
147 targetTabPanel = splittedParamters[0]; 145 targetTabPanel = splittedParamters[0];
148 if (targetTabPanel == this.name()) { 146 if (targetTabPanel == this.name()) {
149 this.selectTab(splittedParamters[1]) 147 this.selectTab(splittedParamters[1])
150 } 148 }
151 }, 149 },
152 150
153 //------------------------------------------------------------------------- 151 //-------------------------------------------------------------------------
154 __syntaxFix__: "syntax fix" 152 __syntaxFix__: "syntax fix"
155}); 153});
diff --git a/frontend/beta/js/Clipperz/PM/Components/TextFormField.js b/frontend/beta/js/Clipperz/PM/Components/TextFormField.js
index c6f0349..2b383ce 100644
--- a/frontend/beta/js/Clipperz/PM/Components/TextFormField.js
+++ b/frontend/beta/js/Clipperz/PM/Components/TextFormField.js
@@ -1,307 +1,305 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } 26if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
29 27
30Clipperz.PM.Components.TextFormField = function(anElement, args) { 28Clipperz.PM.Components.TextFormField = function(anElement, args) {
31 args = args || {}; 29 args = args || {};
32 30
33//MochiKit.Logging.logDebug(">>> new TextFormField"); 31//MochiKit.Logging.logDebug(">>> new TextFormField");
34 Clipperz.PM.Components.TextFormField.superclass.constructor.call(this, args); 32 Clipperz.PM.Components.TextFormField.superclass.constructor.call(this, args);
35 33
36 this._element = anElement; 34 this._element = anElement;
37 this._editMode = args.editMode || 'VIEW'; 35 this._editMode = args.editMode || 'VIEW';
38 this._value = args.value || ""; 36 this._value = args.value || "";
39 this._inputElement = null; 37 this._inputElement = null;
40 this._wrapper = null; 38 this._wrapper = null;
41 this._multiline = args.multiline || false; 39 this._multiline = args.multiline || false;
42 40
43 //this.multiline = args.multiline || true; 41 //this.multiline = args.multiline || true;
44 //this.editing = true; 42 //this.editing = true;
45 //this.completeOnBlur = true; 43 //this.completeOnBlur = true;
46 //this.autoSizeTask = new YAHOO.ext.util.DelayedTask(this.autoSize, this); 44 //this.autoSizeTask = new YAHOO.ext.util.DelayedTask(this.autoSize, this);
47 //this.textSizeEl = Clipperz.YUI.DomHelper.append(document.body, { 45 //this.textSizeEl = Clipperz.YUI.DomHelper.append(document.body, {
48 // tag: 'div', 46 // tag: 'div',
49 // cls: 'yinline-editor-sizer ' + (this.cls || '') 47 // cls: 'yinline-editor-sizer ' + (this.cls || '')
50 //}); 48 //});
51 49
52 this.render(); 50 this.render();
53//MochiKit.Logging.logDebug("<<< new TextFormField"); 51//MochiKit.Logging.logDebug("<<< new TextFormField");
54 52
55 return this; 53 return this;
56}; 54};
57 55
58YAHOO.extendX(Clipperz.PM.Components.TextFormField, Clipperz.PM.Components.BaseComponent, { 56YAHOO.extendX(Clipperz.PM.Components.TextFormField, Clipperz.PM.Components.BaseComponent, {
59 57
60 'toString': function() { 58 'toString': function() {
61 return "Clipperz.PM.Components.TextFormField"; 59 return "Clipperz.PM.Components.TextFormField";
62 }, 60 },
63 61
64 //----------------------------------------------------- 62 //-----------------------------------------------------
65 63
66 'value': function() { 64 'value': function() {
67 if (this.inputElement() != null) { 65 if (this.inputElement() != null) {
68 this._value = this.inputElement().dom.value; 66 this._value = this.inputElement().dom.value;
69 } 67 }
70 68
71 return this._value; 69 return this._value;
72 // return this.inlineEditor().getValue(); 70 // return this.inlineEditor().getValue();
73 }, 71 },
74 72
75 'setValue': function(aValue) { 73 'setValue': function(aValue) {
76 this._value = aValue; 74 this._value = aValue;
77 // this.getElement('viewComponent_Content').update(aValue); 75 // this.getElement('viewComponent_Content').update(aValue);
78 // this.inlineEditor().setValue(aValue); 76 // this.inlineEditor().setValue(aValue);
79 }, 77 },
80 78
81 //----------------------------------------------------- 79 //-----------------------------------------------------
82 80
83 'multiline': function() { 81 'multiline': function() {
84 return this._multiline; 82 return this._multiline;
85 }, 83 },
86 84
87 //----------------------------------------------------- 85 //-----------------------------------------------------
88 86
89 'editMode': function() { 87 'editMode': function() {
90 return this._editMode; 88 return this._editMode;
91 }, 89 },
92 90
93 'setEditMode': function(aValue) { 91 'setEditMode': function(aValue) {
94 this._editMode = aValue; 92 this._editMode = aValue;
95 }, 93 },
96 94
97 //----------------------------------------------------- 95 //-----------------------------------------------------
98 96
99 'inputElement': function() { 97 'inputElement': function() {
100 return this._inputElement; 98 return this._inputElement;
101 }, 99 },
102 100
103 'setInputElement': function(aValue) { 101 'setInputElement': function(aValue) {
104 this._inputElement = aValue; 102 this._inputElement = aValue;
105 }, 103 },
106 104
107 //----------------------------------------------------- 105 //-----------------------------------------------------
108 106
109 'on': function(anEventName, anHandler, aScope, shouldOverride) { 107 'on': function(anEventName, anHandler, aScope, shouldOverride) {
110//MochiKit.Logging.logDebug(">>> TextFormField.on - inputElement: " + this.inputElement()); 108//MochiKit.Logging.logDebug(">>> TextFormField.on - inputElement: " + this.inputElement());
111 return this.inputElement().on(anEventName, anHandler, aScope, shouldOverride); 109 return this.inputElement().on(anEventName, anHandler, aScope, shouldOverride);
112//MochiKit.Logging.logDebug("<<< TextFormField.on - inputElement: " + this.inputElement()); 110//MochiKit.Logging.logDebug("<<< TextFormField.on - inputElement: " + this.inputElement());
113 }, 111 },
114 112
115 //----------------------------------------------------- 113 //-----------------------------------------------------
116 114
117 'wrapper': function() { 115 'wrapper': function() {
118 return this._wrapper; 116 return this._wrapper;
119 }, 117 },
120 118
121 //----------------------------------------------------- 119 //-----------------------------------------------------
122 120
123 'render': function() { 121 'render': function() {
124 var editModeConfiguration; 122 var editModeConfiguration;
125 var viewModeConfiguration; 123 var viewModeConfiguration;
126 124
127 editModeConfiguration = {tag:'div', id:this.getId('editComponent'), children:[]}; 125 editModeConfiguration = {tag:'div', id:this.getId('editComponent'), children:[]};
128 if (this.multiline() == false) { 126 if (this.multiline() == false) {
129 editModeConfiguration.children.push({tag:'input', type:'text', id:this.getId('editComponent_input'), value:"this.value(1)"}); 127 editModeConfiguration.children.push({tag:'input', type:'text', id:this.getId('editComponent_input'), value:"this.value(1)"});
130 } else { 128 } else {
131 editModeConfiguration.children.push({tag:'textarea', id:this.getId('editComponent_input'), html:"this.value(2)"}); 129 editModeConfiguration.children.push({tag:'textarea', id:this.getId('editComponent_input'), html:"this.value(2)"});
132 } 130 }
133 131
134 viewModeConfiguration = {tag:'div', id:this.getId('viewComponent'), /*style:'border: 1px solid blue;',*/ children:[ 132 viewModeConfiguration = {tag:'div', id:this.getId('viewComponent'), /*style:'border: 1px solid blue;',*/ children:[
135 {tag:'span', id:this.getId('viewComponent_Content'), html:this.value()} 133 {tag:'span', id:this.getId('viewComponent_Content'), html:this.value()}
136 ]} 134 ]}
137 135
138//MochiKit.Logging.logDebug(">>> TextFormField.render"); 136//MochiKit.Logging.logDebug(">>> TextFormField.render");
139 this._wrapper = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('wrapper'), children:[ 137 this._wrapper = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('wrapper'), children:[
140 {tag:'div', id:this.getId('editModeBox'), children:[editModeConfiguration]}, 138 {tag:'div', id:this.getId('editModeBox'), children:[editModeConfiguration]},
141 {tag:'div', id:this.getId('viewModeBox'), children:[viewModeConfiguration]} 139 {tag:'div', id:this.getId('viewModeBox'), children:[viewModeConfiguration]}
142 ]}, true); 140 ]}, true);
143 141
144 this.getElement('editModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 142 this.getElement('editModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
145 this.getElement('viewModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY); 143 this.getElement('viewModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
146 144
147 this.getElement('editComponent_input').dom.value = this.value(); 145 this.getElement('editComponent_input').dom.value = this.value();
148 this.setInputElement(this.getElement('editComponent_input')); 146 this.setInputElement(this.getElement('editComponent_input'));
149 147
150 this.update(); 148 this.update();
151//MochiKit.Logging.logDebug("<<< TextFormField.render"); 149//MochiKit.Logging.logDebug("<<< TextFormField.render");
152 }, 150 },
153 151
154 //----------------------------------------------------- 152 //-----------------------------------------------------
155 153
156 'update': function(args) { 154 'update': function(args) {
157 args = args || {}; 155 args = args || {};
158 156
159//MochiKit.Logging.logDebug(">>> TextFormField.update"); 157//MochiKit.Logging.logDebug(">>> TextFormField.update");
160 if (typeof(args.value) != 'undefined') { 158 if (typeof(args.value) != 'undefined') {
161 this.setValue(args.value); 159 this.setValue(args.value);
162 } 160 }
163 if (typeof(args.editMode) != 'undefined') { 161 if (typeof(args.editMode) != 'undefined') {
164 this.setEditMode(args.editMode) 162 this.setEditMode(args.editMode)
165 } 163 }
166 164
167 if (this.editMode() == 'VIEW') { 165 if (this.editMode() == 'VIEW') {
168 this.updateViewMode(); 166 this.updateViewMode();
169 } else if (this.editMode() == 'EDIT') { 167 } else if (this.editMode() == 'EDIT') {
170 this.updateEditMode(); 168 this.updateEditMode();
171 } else { 169 } else {
172 //????? 170 //?????
173 } 171 }
174//MochiKit.Logging.logDebug("<<< TextFormField.update"); 172//MochiKit.Logging.logDebug("<<< TextFormField.update");
175 }, 173 },
176 174
177 //----------------------------------------------------- 175 //-----------------------------------------------------
178 176
179 'updateEditMode': function() { 177 'updateEditMode': function() {
180//MochiKit.Logging.logDebug(">>> TextFormField.updateEditMode"); 178//MochiKit.Logging.logDebug(">>> TextFormField.updateEditMode");
181 this.getElement('viewModeBox').hide(); 179 this.getElement('viewModeBox').hide();
182 this.getElement('editModeBox').show(); 180 this.getElement('editModeBox').show();
183 181
184 if (this.multiline() == false) { 182 if (this.multiline() == false) {
185 this.getElement('editComponent_input').dom.value = this.value(); 183 this.getElement('editComponent_input').dom.value = this.value();
186 } else { 184 } else {
187 this.getElement('editComponent_input').update(Clipperz.Base.sanitizeString(this.value())); 185 this.getElement('editComponent_input').update(Clipperz.Base.sanitizeString(this.value()));
188 } 186 }
189//MochiKit.Logging.logDebug("<<< TextFormField.updateEditMode"); 187//MochiKit.Logging.logDebug("<<< TextFormField.updateEditMode");
190 }, 188 },
191 189
192 //----------------------------------------------------- 190 //-----------------------------------------------------
193 191
194 'updateViewMode': function() { 192 'updateViewMode': function() {
195//MochiKit.Logging.logDebug(">>> TextFormField.updateViewMode"); 193//MochiKit.Logging.logDebug(">>> TextFormField.updateViewMode");
196 this.getElement('editModeBox').hide(); 194 this.getElement('editModeBox').hide();
197 this.getElement('viewModeBox').show(); 195 this.getElement('viewModeBox').show();
198 196
199 this.getElement('viewComponent_Content').update(Clipperz.Base.sanitizeString(this.value())); 197 this.getElement('viewComponent_Content').update(Clipperz.Base.sanitizeString(this.value()));
200//MochiKit.Logging.logDebug("<<< TextFormField.updateViewMode"); 198//MochiKit.Logging.logDebug("<<< TextFormField.updateViewMode");
201 }, 199 },
202 200
203 //##################################################### 201 //#####################################################
204 //##################################################### 202 //#####################################################
205 //##################################################### 203 //#####################################################
206 //##################################################### 204 //#####################################################
207 /* 205 /*
208 'onEnter': function(k, e) { 206 'onEnter': function(k, e) {
209MochiKit.Logging.logDebug(">>> TextFormField.onEnter"); 207MochiKit.Logging.logDebug(">>> TextFormField.onEnter");
210 if (this.multiline && (e.ctrlKey || e.shiftKey)) { 208 if (this.multiline && (e.ctrlKey || e.shiftKey)) {
211 return; 209 return;
212 } else { 210 } else {
213 this.completeEdit(); 211 this.completeEdit();
214 e.stopEvent(); 212 e.stopEvent();
215 } 213 }
216MochiKit.Logging.logDebug("<<< TextFormField.onEnter"); 214MochiKit.Logging.logDebug("<<< TextFormField.onEnter");
217 }, 215 },
218 216
219 //----------------------------------------------------- 217 //-----------------------------------------------------
220 218
221 'onEsc': function() { 219 'onEsc': function() {
222MochiKit.Logging.logDebug(">>> TextFormField.onEsc"); 220MochiKit.Logging.logDebug(">>> TextFormField.onEsc");
223 // if (this.ignoreNoChange) { 221 // if (this.ignoreNoChange) {
224 // this.revert(true); 222 // this.revert(true);
225 // } else { 223 // } else {
226 this.revert(false); 224 this.revert(false);
227 this.completeEdit(); 225 this.completeEdit();
228 // } 226 // }
229MochiKit.Logging.logDebug("<<< TextFormField.onEsc"); 227MochiKit.Logging.logDebug("<<< TextFormField.onEsc");
230 }, 228 },
231 229
232 //----------------------------------------------------- 230 //-----------------------------------------------------
233 231
234 onBlur : function(){ 232 onBlur : function(){
235MochiKit.Logging.logDebug(">>> TextFormField.onBlur"); 233MochiKit.Logging.logDebug(">>> TextFormField.onBlur");
236 if (this.editing && this.completeOnBlur !== false) { 234 if (this.editing && this.completeOnBlur !== false) {
237 this.completeEdit(); 235 this.completeEdit();
238 } 236 }
239MochiKit.Logging.logDebug("<<< TextFormField.onBlur"); 237MochiKit.Logging.logDebug("<<< TextFormField.onBlur");
240 }, 238 },
241 239
242 //----------------------------------------------------- 240 //-----------------------------------------------------
243 241
244 'onKeyUp': function(e) { 242 'onKeyUp': function(e) {
245 var k = e.getKey(); 243 var k = e.getKey();
246 if (this.editing && (k < 33 || k > 40) && k != 27) { 244 if (this.editing && (k < 33 || k > 40) && k != 27) {
247 this.autoSizeTask.delay(50); 245 this.autoSizeTask.delay(50);
248 } 246 }
249 }, 247 },
250 248
251 //----------------------------------------------------- 249 //-----------------------------------------------------
252 250
253 'autoSize': function() { 251 'autoSize': function() {
254 var el = this.inputElement(); 252 var el = this.inputElement();
255 var wrap = this.getElement('editComponent'); 253 var wrap = this.getElement('editComponent');
256 var v = el.dom.value; 254 var v = el.dom.value;
257 var ts = this.textSizeEl; 255 var ts = this.textSizeEl;
258 256
259 if (v.length < 1) { 257 if (v.length < 1) {
260 ts.innerHTML = "&#160;&#160;"; 258 ts.innerHTML = "&#160;&#160;";
261 } else { 259 } else {
262 v = v.replace(/[<> ]/g, '&#160;'); 260 v = v.replace(/[<> ]/g, '&#160;');
263 if (this.multiline) { 261 if (this.multiline) {
264 v = v.replace(/\n/g, '<br />&#160;'); 262 v = v.replace(/\n/g, '<br />&#160;');
265 } 263 }
266 ts.innerHTML = v; 264 ts.innerHTML = v;
267 } 265 }
268 266
269 var ww = wrap.dom.offsetWidth; 267 var ww = wrap.dom.offsetWidth;
270 var wh = wrap.dom.offsetHeight; 268 var wh = wrap.dom.offsetHeight;
271 var w = ts.offsetWidth; 269 var w = ts.offsetWidth;
272 var h = ts.offsetHeight; 270 var h = ts.offsetHeight;
273 // lots of magic numbers in this block - wtf? 271 // lots of magic numbers in this block - wtf?
274 // the logic is to prevent the scrollbars from flashing 272 // the logic is to prevent the scrollbars from flashing
275 // in firefox. Updates the right element first 273 // in firefox. Updates the right element first
276 // so there's never overflow. 274 // so there's never overflow.
277 if (ww > w+4) { 275 if (ww > w+4) {
278 el.setWidth(w+4); 276 el.setWidth(w+4);
279 wrap.setWidth(w+8); 277 wrap.setWidth(w+8);
280 } else { 278 } else {
281 wrap.setWidth(w+8); 279 wrap.setWidth(w+8);
282 el.setWidth(w+4); 280 el.setWidth(w+4);
283 } 281 }
284 if (wh > h+4) { 282 if (wh > h+4) {
285 el.setHeight(h); 283 el.setHeight(h);
286 wrap.setHeight(h+4); 284 wrap.setHeight(h+4);
287 } else { 285 } else {
288 wrap.setHeight(h+4); 286 wrap.setHeight(h+4);
289 el.setHeight(h); 287 el.setHeight(h);
290 } 288 }
291 }, 289 },
292 290
293 //----------------------------------------------------- 291 //-----------------------------------------------------
294 292
295 'completeEdit': function() { 293 'completeEdit': function() {
296MochiKit.Logging.logDebug(">>> TextFormField.completeEdit"); 294MochiKit.Logging.logDebug(">>> TextFormField.completeEdit");
297 295
298 }, 296 },
299 297
300 'revert': function() { 298 'revert': function() {
301MochiKit.Logging.logDebug(">>> TextFormField.revert"); 299MochiKit.Logging.logDebug(">>> TextFormField.revert");
302 300
303 }, 301 },
304 */ 302 */
305 //----------------------------------------------------- 303 //-----------------------------------------------------
306 __syntaxFix__: '__syntaxFix__' 304 __syntaxFix__: '__syntaxFix__'
307}); 305});
diff --git a/frontend/beta/js/Clipperz/PM/Connection.js b/frontend/beta/js/Clipperz/PM/Connection.js
index e81c7a6..613e7d6 100644
--- a/frontend/beta/js/Clipperz/PM/Connection.js
+++ b/frontend/beta/js/Clipperz/PM/Connection.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28 26
29//----------------------------------------------------------------------------- 27//-----------------------------------------------------------------------------
30// 28//
31 // Abstract C O N N E C T I O N class 29 // Abstract C O N N E C T I O N class
32// 30//
33//----------------------------------------------------------------------------- 31//-----------------------------------------------------------------------------
34 32
35Clipperz.PM.Connection = function (args) { 33Clipperz.PM.Connection = function (args) {
36 args = args || {}; 34 args = args || {};
37 35
38 this._user = args.user; 36 this._user = args.user;
39 this._clipperz_pm_crypto_version = null; 37 this._clipperz_pm_crypto_version = null;
40 this._connectionId = null; 38 this._connectionId = null;
41 this._oneTimePassword = null; 39 this._oneTimePassword = null;
42 40
43 return this; 41 return this;
44} 42}
45 43
46Clipperz.PM.Connection.prototype = MochiKit.Base.update(null, { 44Clipperz.PM.Connection.prototype = MochiKit.Base.update(null, {
47 45
48 'user': function() { 46 'user': function() {
49 return this._user; 47 return this._user;
50 }, 48 },
51 49
52 'toString': function() { 50 'toString': function() {
53 return "Connection [" + this.version() + "] - user: " + this.user(); 51 return "Connection [" + this.version() + "] - user: " + this.user();
54 }, 52 },
55 53
56 //========================================================================= 54 //=========================================================================
57 55
58 'version': function() { 56 'version': function() {
59 throw Clipperz.Base.exception.AbstractMethod; 57 throw Clipperz.Base.exception.AbstractMethod;
60 }, 58 },
61 59
62 'clipperz_pm_crypto_version': function() { 60 'clipperz_pm_crypto_version': function() {
63 if (this._clipperz_pm_crypto_version == null) { 61 if (this._clipperz_pm_crypto_version == null) {
64 var connectionVersions; 62 var connectionVersions;
65 varversions; 63 varversions;
66 varversion; 64 varversion;
67 var i, c; 65 var i, c;
68 66
69 version = null; 67 version = null;
70 connectionVersions = Clipperz.PM.Crypto.communicationProtocol.versions; 68 connectionVersions = Clipperz.PM.Crypto.communicationProtocol.versions;
71 versions = MochiKit.Base.keys(connectionVersions); 69 versions = MochiKit.Base.keys(connectionVersions);
72 c = versions.length; 70 c = versions.length;
73 for (i=0; i<c; i++) { 71 for (i=0; i<c; i++) {
74 if (! (versions[i] == 'current')) { 72 if (! (versions[i] == 'current')) {
75 if (this instanceof connectionVersions[versions[i]]) { 73 if (this instanceof connectionVersions[versions[i]]) {
76 version = versions[i]; 74 version = versions[i];
77 }; 75 };
78 } 76 }
79 } 77 }
80 78
81 this._clipperz_pm_crypto_version = version; 79 this._clipperz_pm_crypto_version = version;
82 } 80 }
83 81
84 return this._clipperz_pm_crypto_version; 82 return this._clipperz_pm_crypto_version;
85 }, 83 },
86 84
87 //------------------------------------------------------------------------- 85 //-------------------------------------------------------------------------
88 86
89 'defaultErrorHandler': function(anErrorString, anException) { 87 'defaultErrorHandler': function(anErrorString, anException) {
90MochiKit.Logging.logError("### Connection.defaultErrorHandler: " + anErrorString + " (" + anException + ")"); 88MochiKit.Logging.logError("### Connection.defaultErrorHandler: " + anErrorString + " (" + anException + ")");
91 }, 89 },
92 90
93 //------------------------------------------------------------------------- 91 //-------------------------------------------------------------------------
94 92
95 'login': function(someArguments, aCallback) { 93 'login': function(someArguments, aCallback) {
96 throw Clipperz.Base.exception.AbstractMethod; 94 throw Clipperz.Base.exception.AbstractMethod;
97 }, 95 },
98 96
99 //------------------------------------------------------------------------- 97 //-------------------------------------------------------------------------
100 98
101 'message': function(someArguments, aCallback) { 99 'message': function(someArguments, aCallback) {
102 throw Clipperz.Base.exception.AbstractMethod; 100 throw Clipperz.Base.exception.AbstractMethod;
103 }, 101 },
104 102
105 //------------------------------------------------------------------------- 103 //-------------------------------------------------------------------------
106 104
107 'sharedSecret': function() { 105 'sharedSecret': function() {
108 throw Clipperz.Base.exception.AbstractMethod; 106 throw Clipperz.Base.exception.AbstractMethod;
109 }, 107 },
110 108
111 'serverSideUserCredentials': function() { 109 'serverSideUserCredentials': function() {
112 throw Clipperz.Base.exception.AbstractMethod; 110 throw Clipperz.Base.exception.AbstractMethod;
113 }, 111 },
114 112
115 //========================================================================= 113 //=========================================================================
116 114
117 'connectionId': function() { 115 'connectionId': function() {
118 return this._connectionId; 116 return this._connectionId;
119 }, 117 },
120 118
121 'setConnectionId': function(aValue) { 119 'setConnectionId': function(aValue) {
122 this._connectionId = aValue; 120 this._connectionId = aValue;
123 }, 121 },
124 122
125 //========================================================================= 123 //=========================================================================
126 124
127 'oneTimePassword': function() { 125 'oneTimePassword': function() {
128 return this._oneTimePassword; 126 return this._oneTimePassword;
129 }, 127 },
130 128
131 'setOneTimePassword': function(aValue) { 129 'setOneTimePassword': function(aValue) {
132 this._oneTimePassword = aValue; 130 this._oneTimePassword = aValue;
133 }, 131 },
134 132
135 //========================================================================= 133 //=========================================================================
136 __syntaxFix__: "syntax fix" 134 __syntaxFix__: "syntax fix"
137 135
138} 136}
139); 137);
140 138
141 139
142if (typeof(Clipperz.PM.Connection.SRP) == 'undefined') { Clipperz.PM.Connection.SRP = {}; } 140if (typeof(Clipperz.PM.Connection.SRP) == 'undefined') { Clipperz.PM.Connection.SRP = {}; }
143//----------------------------------------------------------------------------- 141//-----------------------------------------------------------------------------
144// 142//
145 // S R P [ 1 . 0 ] C O N N E C T I O N class 143 // S R P [ 1 . 0 ] C O N N E C T I O N class
146// 144//
147//----------------------------------------------------------------------------- 145//-----------------------------------------------------------------------------
148 146
149Clipperz.PM.Connection.SRP['1.0'] = function (args) { 147Clipperz.PM.Connection.SRP['1.0'] = function (args) {
150 args = args || {}; 148 args = args || {};
151 Clipperz.PM.Connection.call(this, args); 149 Clipperz.PM.Connection.call(this, args);
152 150
153 this._C = null; 151 this._C = null;
154 this._P = null; 152 this._P = null;
155 this._srpConnection = null; 153 this._srpConnection = null;
156 154
157 return this; 155 return this;
158} 156}
159 157
160Clipperz.PM.Connection.SRP['1.0'].prototype = MochiKit.Base.update(new Clipperz.PM.Connection(), { 158Clipperz.PM.Connection.SRP['1.0'].prototype = MochiKit.Base.update(new Clipperz.PM.Connection(), {
161 159
162 'version': function() { 160 'version': function() {
163 return '1.0'; 161 return '1.0';
164 }, 162 },
165 163
166 //========================================================================= 164 //=========================================================================
167 165
168 'register': function(anInvitationCode) { 166 'register': function(anInvitationCode) {
169 var deferredResult; 167 var deferredResult;
170 varparameters; 168 varparameters;
171 169
172//MochiKit.Logging.logError(">>> Connection.register: " + this); 170//MochiKit.Logging.logError(">>> Connection.register: " + this);
173 parameters = {}; 171 parameters = {};
174 deferredResult = new MochiKit.Async.Deferred(); 172 deferredResult = new MochiKit.Async.Deferred();
175//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.register - 1: " + res); return res;}); 173//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.register - 1: " + res); return res;});
176 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'registration_verify'); 174 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'registration_verify');
177//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.register - 2: " + res); return res;}); 175//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.register - 2: " + res); return res;});
178 deferredResult.addCallback(function(aConnection, anInvitationCode) { 176 deferredResult.addCallback(function(aConnection, anInvitationCode) {
179 var args; 177 var args;
180 178
181 args = {}; 179 args = {};
182 args.message = 'register'; 180 args.message = 'register';
183 args.version = aConnection.clipperz_pm_crypto_version(); 181 args.version = aConnection.clipperz_pm_crypto_version();
184 args.invitationCode = anInvitationCode; 182 args.invitationCode = anInvitationCode;
185 183
186 return args; 184 return args;
187 }, this); 185 }, this);
188//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.register - 3: " + res); return res;}); 186//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.register - 3: " + res); return res;});
189 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'registration_sendingCredentials'); 187 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'registration_sendingCredentials');
190//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.register - 4: " + res); return res;}); 188//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.register - 4: " + res); return res;});
191 deferredResult.addCallback(MochiKit.Base.method(this.user(), 'encryptedData')); 189 deferredResult.addCallback(MochiKit.Base.method(this.user(), 'encryptedData'));
192//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.register - 5: " + res); return res;}); 190//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.register - 5: " + res); return res;});
193 deferredResult.addCallback(function(someParameters, anUser, anEncryptedData) { 191 deferredResult.addCallback(function(someParameters, anUser, anEncryptedData) {
194 var currentVersionConnection; 192 var currentVersionConnection;
195 var args; 193 var args;
196 194
197 currentVersionConnection = new Clipperz.PM.Crypto.communicationProtocol.versions['current']({user:anUser}); 195 currentVersionConnection = new Clipperz.PM.Crypto.communicationProtocol.versions['current']({user:anUser});
198 196
199 args = someParameters 197 args = someParameters
200 args.credentials = currentVersionConnection.serverSideUserCredentials(); 198 args.credentials = currentVersionConnection.serverSideUserCredentials();
201 args.user = anEncryptedData; 199 args.user = anEncryptedData;
202 args.version = args.credentials.version; 200 args.version = args.credentials.version;
203 args.message = "completeRegistration"; 201 args.message = "completeRegistration";
204 202
205 return args; 203 return args;
206 }, parameters, this.user()); 204 }, parameters, this.user());
207//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.register - 6: " + res); return res;}); 205//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.register - 6: " + res); return res;});
208 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Proxy.defaultProxy, 'registration')); 206 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Proxy.defaultProxy, 'registration'));
209//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.register - 7: " + Clipperz.Base.serializeJSON(res)); return res;}); 207//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.register - 7: " + Clipperz.Base.serializeJSON(res)); return res;});
210 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 208 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
211 this.user().setLock(res['lock']); 209 this.user().setLock(res['lock']);
212 210
213 return res; 211 return res;
214 }, this)); 212 }, this));
215 deferredResult.callback(anInvitationCode); 213 deferredResult.callback(anInvitationCode);
216//MochiKit.Logging.logError("<<< Connection.register"); 214//MochiKit.Logging.logError("<<< Connection.register");
217 215
218 return deferredResult; 216 return deferredResult;
219 }, 217 },
220 218
221 //========================================================================= 219 //=========================================================================
222 220
223 'login': function(isReconnecting) { 221 'login': function(isReconnecting) {
224 vardeferredResult; 222 vardeferredResult;
225 223
226//MochiKit.Logging.logDebug(">>> Connection.login: "/* + this*/); 224//MochiKit.Logging.logDebug(">>> Connection.login: "/* + this*/);
227//MochiKit.Logging.logDebug("--- Connection.login - isReconnecting: " + (isReconnecting == true)); 225//MochiKit.Logging.logDebug("--- Connection.login - isReconnecting: " + (isReconnecting == true));
228 deferredResult = new MochiKit.Async.Deferred(); 226 deferredResult = new MochiKit.Async.Deferred();
229//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.1 - Connection.login - 1: "/* + res*/); return res;}); 227//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.1 - Connection.login - 1: "/* + res*/); return res;});
230//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 228//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
231 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'connection_sendingCredentials'); 229 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'connection_sendingCredentials');
232//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.2 - Connection.login - 2: "/* + res*/); return res;}); 230//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.2 - Connection.login - 2: "/* + res*/); return res;});
233//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 231//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
234 deferredResult.addCallback(function(aConnection) { 232 deferredResult.addCallback(function(aConnection) {
235 var args; 233 var args;
236 234
237 args = {}; 235 args = {};
238 args.message = 'connect'; 236 args.message = 'connect';
239 args.version = aConnection.clipperz_pm_crypto_version(); 237 args.version = aConnection.clipperz_pm_crypto_version();
240 args.parameters = {}; 238 args.parameters = {};
241//MochiKit.Logging.logDebug("=== Connection.login - username: " + aConnection.srpConnection().C()); 239//MochiKit.Logging.logDebug("=== Connection.login - username: " + aConnection.srpConnection().C());
242 args.parameters['C'] = aConnection.srpConnection().C(); 240 args.parameters['C'] = aConnection.srpConnection().C();
243 args.parameters['A'] = aConnection.srpConnection().A().asString(16); 241 args.parameters['A'] = aConnection.srpConnection().A().asString(16);
244 242
245 if (isReconnecting == true) { 243 if (isReconnecting == true) {
246//MochiKit.Logging.logDebug("--- Connection.login - reconnecting"); 244//MochiKit.Logging.logDebug("--- Connection.login - reconnecting");
247 //# args.parameters['reconnecting'] = "yes"; 245 //# args.parameters['reconnecting'] = "yes";
248 args.parameters['reconnecting'] = aConnection.connectionId(); 246 args.parameters['reconnecting'] = aConnection.connectionId();
249 } 247 }
250//MochiKit.Logging.logDebug("--- Connection.login - args: " + Clipperz.Base.serializeJSON(args)); 248//MochiKit.Logging.logDebug("--- Connection.login - args: " + Clipperz.Base.serializeJSON(args));
251//MochiKit.Logging.logDebug("--- Connection.login - srp.a: " + aConnection.srpConnection().a().asString(16)); 249//MochiKit.Logging.logDebug("--- Connection.login - srp.a: " + aConnection.srpConnection().a().asString(16));
252 250
253 return args; 251 return args;
254 }); 252 });
255//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.3 - Connection.login - 3: "/* + res*/); return res;}); 253//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.3 - Connection.login - 3: "/* + res*/); return res;});
256//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 254//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
257 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Proxy.defaultProxy, 'handshake')); 255 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Proxy.defaultProxy, 'handshake'));
258//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.4 - Connection.login - 4: "/* + res*/); return res;}); 256//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.4 - Connection.login - 4: "/* + res*/); return res;});
259//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 257//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
260 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'connection_credentialVerification'); 258 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'connection_credentialVerification');
261//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.5 - Connection.login - 5: "/* + res*/); return res;}); 259//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.5 - Connection.login - 5: "/* + res*/); return res;});
262//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 260//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
263deferredResult.addErrback(MochiKit.Base.bind(function(res) {MochiKit.Logging.logDebug("ERROR - c: " + this.srpConnection().C() + " # version: " + this.clipperz_pm_crypto_version()); return res;}, this)); 261deferredResult.addErrback(MochiKit.Base.bind(function(res) {MochiKit.Logging.logDebug("ERROR - c: " + this.srpConnection().C() + " # version: " + this.clipperz_pm_crypto_version()); return res;}, this));
264 deferredResult.addCallback(MochiKit.Base.bind(function(someParameters) { 262 deferredResult.addCallback(MochiKit.Base.bind(function(someParameters) {
265 var args; 263 var args;
266 264
267 this.srpConnection().set_s(new Clipperz.Crypto.BigInt(someParameters['s'], 16)); 265 this.srpConnection().set_s(new Clipperz.Crypto.BigInt(someParameters['s'], 16));
268 this.srpConnection().set_B(new Clipperz.Crypto.BigInt(someParameters['B'], 16)); 266 this.srpConnection().set_B(new Clipperz.Crypto.BigInt(someParameters['B'], 16));
269 267
270 if (typeof(someParameters['oneTimePassword']) != 'undefined') { 268 if (typeof(someParameters['oneTimePassword']) != 'undefined') {
271 this.setOneTimePassword(someParameters['oneTimePassword']); 269 this.setOneTimePassword(someParameters['oneTimePassword']);
272 } 270 }
273 271
274 args = {}; 272 args = {};
275 args.message = 'credentialCheck'; 273 args.message = 'credentialCheck';
276 args.version = this.clipperz_pm_crypto_version(); 274 args.version = this.clipperz_pm_crypto_version();
277 args.parameters = {}; 275 args.parameters = {};
278 args.parameters['M1'] = this.srpConnection().M1(); 276 args.parameters['M1'] = this.srpConnection().M1();
279 277
280 return args; 278 return args;
281 }, this)); 279 }, this));
282//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.6 - Connection.login - 6: "/* + res*/); return res;}); 280//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.6 - Connection.login - 6: "/* + res*/); return res;});
283//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 281//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
284 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Proxy.defaultProxy, 'handshake')); 282 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Proxy.defaultProxy, 'handshake'));
285//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.7 - Connection.login - 7: "/* + res*/); return res;}); 283//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.7 - Connection.login - 7: "/* + res*/); return res;});
286//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 284//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
287 //# deferredResult.addCallback(MochiKit.Base.method(this, 'loginDone')); 285 //# deferredResult.addCallback(MochiKit.Base.method(this, 'loginDone'));
288 deferredResult.addCallback(MochiKit.Base.bind(function(someParameters) { 286 deferredResult.addCallback(MochiKit.Base.bind(function(someParameters) {
289 var result; 287 var result;
290 288
291//MochiKit.Logging.logDebug(">>> Connection.loginDone: " + this + " (M2: " + this.srpConnection().M2() + ")"); 289//MochiKit.Logging.logDebug(">>> Connection.loginDone: " + this + " (M2: " + this.srpConnection().M2() + ")");
292 if (someParameters['M2'] == this.srpConnection().M2()) { 290 if (someParameters['M2'] == this.srpConnection().M2()) {
293 result = new MochiKit.Async.Deferred(); 291 result = new MochiKit.Async.Deferred();
294 292
295//MochiKit.Logging.logDebug("--- Connection.loginDone - someParameters: " + Clipperz.Base.serializeJSON(someParameters)); 293//MochiKit.Logging.logDebug("--- Connection.loginDone - someParameters: " + Clipperz.Base.serializeJSON(someParameters));
296 this.setConnectionId(someParameters['connectionId']); 294 this.setConnectionId(someParameters['connectionId']);
297 this.user().setLoginInfo(someParameters['loginInfo']); 295 this.user().setLoginInfo(someParameters['loginInfo']);
298 this.user().setShouldDownloadOfflineCopy(someParameters['offlineCopyNeeded']); 296 this.user().setShouldDownloadOfflineCopy(someParameters['offlineCopyNeeded']);
299 297
300 if ((isReconnecting == true) && (this.user().lock() != someParameters['lock'])) { 298 if ((isReconnecting == true) && (this.user().lock() != someParameters['lock'])) {
301 throw Clipperz.PM.Connection.exception.StaleData; 299 throw Clipperz.PM.Connection.exception.StaleData;
302 } 300 }
303 301
304 if (this.oneTimePassword() != null) { 302 if (this.oneTimePassword() != null) {
305 result.addCallback(MochiKit.Base.method(this.user().oneTimePasswordManager(), 'archiveOneTimePassword', this.oneTimePassword())); 303 result.addCallback(MochiKit.Base.method(this.user().oneTimePasswordManager(), 'archiveOneTimePassword', this.oneTimePassword()));
306 } 304 }
307 305
308 result.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'connection_loggedIn'); 306 result.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'connection_loggedIn');
309 result.addCallback(MochiKit.Async.succeed, someParameters); 307 result.addCallback(MochiKit.Async.succeed, someParameters);
310 308
311 result.callback(); 309 result.callback();
312//MochiKit.Logging.logDebug("--- Connection.loginDone - 1 - result: "/* + Clipperz.Base.serializeJSON(result)*/); 310//MochiKit.Logging.logDebug("--- Connection.loginDone - 1 - result: "/* + Clipperz.Base.serializeJSON(result)*/);
313 } else { 311 } else {
314//MochiKit.Logging.logDebug("--- Connection.loginDone - 2 - ERROR"); 312//MochiKit.Logging.logDebug("--- Connection.loginDone - 2 - ERROR");
315//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 313//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
316 result = MochiKit.Async.fail(Clipperz.PM.Connection.exception.WrongChecksum); 314 result = MochiKit.Async.fail(Clipperz.PM.Connection.exception.WrongChecksum);
317 } 315 }
318//MochiKit.Logging.logDebug("<<< Connection.loginDone - result: " + Clipperz.Base.serializeJSON(result)); 316//MochiKit.Logging.logDebug("<<< Connection.loginDone - result: " + Clipperz.Base.serializeJSON(result));
319 317
320 return result; 318 return result;
321 }, this)); 319 }, this));
322 320
323//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.8 - Connection.login - 8: "/* + res*/); return res;}); 321//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.3.8 - Connection.login - 8: "/* + res*/); return res;});
324//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 322//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
325 deferredResult.callback(this); 323 deferredResult.callback(this);
326//MochiKit.Logging.logDebug("<<< Connection.login"); 324//MochiKit.Logging.logDebug("<<< Connection.login");
327 325
328 return deferredResult; 326 return deferredResult;
329 }, 327 },
330 328
331 //========================================================================= 329 //=========================================================================
332 330
333 'logout': function() { 331 'logout': function() {
334 var deferredResult; 332 var deferredResult;
335 333
336//MochiKit.Logging.logDebug(">>> Connection.logout: " + this); 334//MochiKit.Logging.logDebug(">>> Connection.logout: " + this);
337 deferredResult = new MochiKit.Async.Deferred(); 335 deferredResult = new MochiKit.Async.Deferred();
338//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.logout - 1: " + res); return res;}); 336//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.logout - 1: " + res); return res;});
339 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Proxy.defaultProxy, 'logout'), {}); 337 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Proxy.defaultProxy, 'logout'), {});
340//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.logout - 2: " + res); return res;}); 338//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.logout - 2: " + res); return res;});
341 deferredResult.addCallback(MochiKit.Base.method(this, 'resetSrpConnection')); 339 deferredResult.addCallback(MochiKit.Base.method(this, 'resetSrpConnection'));
342//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.logout - 3: " + res); return res;}); 340//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.logout - 3: " + res); return res;});
343 deferredResult.callback(); 341 deferredResult.callback();
344//MochiKit.Logging.logDebug("<<< Connection.logout"); 342//MochiKit.Logging.logDebug("<<< Connection.logout");
345 343
346 return deferredResult; 344 return deferredResult;
347 }, 345 },
348 346
349 //========================================================================= 347 //=========================================================================
350 348
351 'message': function(aMessageName, someParameters) { 349 'message': function(aMessageName, someParameters) {
352 var args; 350 var args;
353 var deferredResult; 351 var deferredResult;
354 352
355//MochiKit.Logging.logDebug(">>> Connection.message: " + this); 353//MochiKit.Logging.logDebug(">>> Connection.message: " + this);
356 args = {} 354 args = {}
357 args['message'] = aMessageName; 355 args['message'] = aMessageName;
358 args['srpSharedSecret'] = this.srpConnection().K(); 356 args['srpSharedSecret'] = this.srpConnection().K();
359 // args['lock'] = this.user().lock(); 357 // args['lock'] = this.user().lock();
360 358
361 if (someParameters != null) { 359 if (someParameters != null) {
362 args['parameters'] = someParameters; 360 args['parameters'] = someParameters;
363 } else { 361 } else {
364 args['parameters'] = {}; 362 args['parameters'] = {};
365 } 363 }
366//MochiKit.Logging.logDebug("--- Connection.message - args: " + Clipperz.Base.serializeJSON(args)); 364//MochiKit.Logging.logDebug("--- Connection.message - args: " + Clipperz.Base.serializeJSON(args));
367 365
368 // deferredResult = new MochiKit.Async.Deferred(); //### ????????????? 366 // deferredResult = new MochiKit.Async.Deferred(); //### ?????????????
369 367
370 return this.sendMessage(args); 368 return this.sendMessage(args);
371 }, 369 },
372 370
373 //------------------------------------------------------------------------- 371 //-------------------------------------------------------------------------
374 372
375 'sendMessage': function(someArguments) { 373 'sendMessage': function(someArguments) {
376 vardeferredResult; 374 vardeferredResult;
377 375
378//MochiKit.Logging.logDebug(">>> Connection.sendMessage: " + this); 376//MochiKit.Logging.logDebug(">>> Connection.sendMessage: " + this);
379 deferredResult = new MochiKit.Async.Deferred(); 377 deferredResult = new MochiKit.Async.Deferred();
380//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.sendMessage - 1: " + res); return res;}); 378//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.sendMessage - 1: " + res); return res;});
381 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Proxy.defaultProxy, 'message'), someArguments); 379 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Proxy.defaultProxy, 'message'), someArguments);
382//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.sendMessage - 2: " + res); return res;}); 380//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.sendMessage - 2: " + res); return res;});
383 381
384 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 382 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
385 if (typeof(res['lock']) != 'undefined') { 383 if (typeof(res['lock']) != 'undefined') {
386 this.user().setLock(res['lock']); 384 this.user().setLock(res['lock']);
387 } 385 }
388 return res; 386 return res;
389 }, this)); 387 }, this));
390 388
391 deferredResult.addErrback(MochiKit.Base.method(this, 'messageExceptionHandler'), someArguments); 389 deferredResult.addErrback(MochiKit.Base.method(this, 'messageExceptionHandler'), someArguments);
392//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.sendMessage - 3: " + res); return res;}); 390//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.sendMessage - 3: " + res); return res;});
393//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.sendMessage - 3: " + Clipperz.Base.serializeJSON(res)); return res;}); 391//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Connection.sendMessage - 3: " + Clipperz.Base.serializeJSON(res)); return res;});
394 deferredResult.callback(); 392 deferredResult.callback();
395//MochiKit.Logging.logDebug("<<< Connection.sendMessage"); 393//MochiKit.Logging.logDebug("<<< Connection.sendMessage");
396 394
397 return deferredResult 395 return deferredResult
398 }, 396 },
399 397
400 //------------------------------------------------------------------------- 398 //-------------------------------------------------------------------------
401 399
402 'messageExceptionHandler': function(anOriginalMessageArguments, anError) { 400 'messageExceptionHandler': function(anOriginalMessageArguments, anError) {
403 var result; 401 var result;
404 402
405//MochiKit.Logging.logDebug(">>> Connection.messageExceptionHandler - this: " + this + ", anError: " + anError); 403//MochiKit.Logging.logDebug(">>> Connection.messageExceptionHandler - this: " + this + ", anError: " + anError);
406 if (anError instanceof MochiKit.Async.CancelledError) { 404 if (anError instanceof MochiKit.Async.CancelledError) {
diff --git a/frontend/beta/js/Clipperz/PM/Crypto.js b/frontend/beta/js/Clipperz/PM/Crypto.js
index 6e9608c..ad16ff0 100644
--- a/frontend/beta/js/Clipperz/PM/Crypto.js
+++ b/frontend/beta/js/Clipperz/PM/Crypto.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Crypto) == 'undefined') { Clipperz.PM.Crypto = {}; } 26if (typeof(Clipperz.PM.Crypto) == 'undefined') { Clipperz.PM.Crypto = {}; }
29 27
30Clipperz.PM.Crypto.VERSION = "0.2"; 28Clipperz.PM.Crypto.VERSION = "0.2";
31Clipperz.PM.Crypto.NAME = "Clipperz.PM.Crypto"; 29Clipperz.PM.Crypto.NAME = "Clipperz.PM.Crypto";
32 30
33MochiKit.Base.update(Clipperz.PM.Crypto, { 31MochiKit.Base.update(Clipperz.PM.Crypto, {
34 32
35 '__repr__': function () { 33 '__repr__': function () {
36 return "[" + this.NAME + " " + this.VERSION + "]"; 34 return "[" + this.NAME + " " + this.VERSION + "]";
37 }, 35 },
38 36
39 //------------------------------------------------------------------------- 37 //-------------------------------------------------------------------------
40 38
41 'toString': function () { 39 'toString': function () {
42 return this.__repr__(); 40 return this.__repr__();
43 }, 41 },
44 42
45 //------------------------------------------------------------------------- 43 //-------------------------------------------------------------------------
46 44
47 'communicationProtocol': { 45 'communicationProtocol': {
48 'currentVersion': '0.2', 46 'currentVersion': '0.2',
49 'versions': { 47 'versions': {
50 '0.1': Clipperz.PM.Connection.SRP['1.0'],//Clipperz.Crypto.SRP.versions['1.0'].Connection, 48 '0.1': Clipperz.PM.Connection.SRP['1.0'],//Clipperz.Crypto.SRP.versions['1.0'].Connection,
51 '0.2': Clipperz.PM.Connection.SRP['1.1']//Clipperz.Crypto.SRP.versions['1.1'].Connection, 49 '0.2': Clipperz.PM.Connection.SRP['1.1']//Clipperz.Crypto.SRP.versions['1.1'].Connection,
52 }, 50 },
53 'fallbackVersions': { 51 'fallbackVersions': {
54 'current':'0.1', 52 'current':'0.1',
55 '0.2': '0.1', 53 '0.2': '0.1',
56 '0.1': null 54 '0.1': null
57 } 55 }
58 }, 56 },
59 57
60 //------------------------------------------------------------------------- 58 //-------------------------------------------------------------------------
61 59
62 'encryptingFunctions': { 60 'encryptingFunctions': {
63 'currentVersion': '0.3', 61 'currentVersion': '0.3',
64 'versions': { 62 'versions': {
65 63
66 //##################################################################### 64 //#####################################################################
67 65
68 '0.1': { 66 '0.1': {
69 'encrypt': function(aKey, aValue) { 67 'encrypt': function(aKey, aValue) {
70 return Clipperz.Crypto.Base.encryptUsingSecretKey(aKey, Clipperz.Base.serializeJSON(aValue)); 68 return Clipperz.Crypto.Base.encryptUsingSecretKey(aKey, Clipperz.Base.serializeJSON(aValue));
71 }, 69 },
72 70
73 'deferredEncrypt': function(aKey, aValue) { 71 'deferredEncrypt': function(aKey, aValue) {
74 var deferredResult; 72 var deferredResult;
75 73
76 deferredResult = new MochiKit.Async.Deferred(); 74 deferredResult = new MochiKit.Async.Deferred();
77 deferredResult.addCallback(Clipperz.PM.Crypto.encryptingFunctions.versions['0.1'].encrypt, aKey, aValue); 75 deferredResult.addCallback(Clipperz.PM.Crypto.encryptingFunctions.versions['0.1'].encrypt, aKey, aValue);
78 deferredResult.callback(); 76 deferredResult.callback();
79 77
80 return deferredResult; 78 return deferredResult;
81 }, 79 },
82 80
83 'decrypt': function(aKey, aValue) { 81 'decrypt': function(aKey, aValue) {
84 var result; 82 var result;
85 83
86 if (aValue != null) { 84 if (aValue != null) {
87 result = Clipperz.Base.evalJSON(Clipperz.Crypto.Base.decryptUsingSecretKey(aKey, aValue)); 85 result = Clipperz.Base.evalJSON(Clipperz.Crypto.Base.decryptUsingSecretKey(aKey, aValue));
88 } else { 86 } else {
89 result = null; 87 result = null;
90 } 88 }
91 89
92 return result; 90 return result;
93 }, 91 },
94 92
95 'deferredDecrypt': function(aKey, aValue) { 93 'deferredDecrypt': function(aKey, aValue) {
96 var deferredResult; 94 var deferredResult;
97 95
98 deferredResult = new MochiKit.Async.Deferred(); 96 deferredResult = new MochiKit.Async.Deferred();
99 deferredResult.addCallback(Clipperz.PM.Crypto.encryptingFunctions.versions['0.1'].decrypt, aKey, aValue); 97 deferredResult.addCallback(Clipperz.PM.Crypto.encryptingFunctions.versions['0.1'].decrypt, aKey, aValue);
100 deferredResult.callback(); 98 deferredResult.callback();
101 99
102 return deferredResult; 100 return deferredResult;
103 }, 101 },
104 102
105 'hash': function(aValue) { 103 'hash': function(aValue) {
106 var result; 104 var result;
107 var strngResult; 105 var strngResult;
108 106
109 stringResult = Clipperz.Crypto.Base.computeHashValue(aValue.asString()); //!!!!!!! 107 stringResult = Clipperz.Crypto.Base.computeHashValue(aValue.asString()); //!!!!!!!
110 result = new Clipperz.ByteArray("0x" + stringResult); 108 result = new Clipperz.ByteArray("0x" + stringResult);
111 109
112 return result; 110 return result;
113 } 111 }
114 }, 112 },
115 113
116 //##################################################################### 114 //#####################################################################
117 115
118 '0.2': { 116 '0.2': {
119 'encrypt': function(aKey, aValue, aNonce) { 117 'encrypt': function(aKey, aValue, aNonce) {
120 var result; 118 var result;
121 varkey, value; 119 varkey, value;
122 var dataToEncrypt; 120 var dataToEncrypt;
123 var encryptedData; 121 var encryptedData;
124 122
125 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey)); 123 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey));
126 value = new Clipperz.ByteArray(Clipperz.Base.serializeJSON(aValue)); 124 value = new Clipperz.ByteArray(Clipperz.Base.serializeJSON(aValue));
127 dataToEncrypt = Clipperz.Crypto.SHA.sha_d256(value).appendBlock(value); 125 dataToEncrypt = Clipperz.Crypto.SHA.sha_d256(value).appendBlock(value);
128 encryptedData = Clipperz.Crypto.AES.encrypt(key, dataToEncrypt, aNonce); 126 encryptedData = Clipperz.Crypto.AES.encrypt(key, dataToEncrypt, aNonce);
129 result = encryptedData.toBase64String(); 127 result = encryptedData.toBase64String();
130 128
131 return result; 129 return result;
132 }, 130 },
133 131
134 'deferredEncrypt': function(aKey, aValue, aNonce) { 132 'deferredEncrypt': function(aKey, aValue, aNonce) {
135 var deferredResult; 133 var deferredResult;
136 varkey, value; 134 varkey, value;
137 var dataToEncrypt; 135 var dataToEncrypt;
138 var encryptedData; 136 var encryptedData;
139 137
140 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey)); 138 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey));
141 value = new Clipperz.ByteArray(Clipperz.Base.serializeJSON(aValue)); 139 value = new Clipperz.ByteArray(Clipperz.Base.serializeJSON(aValue));
142 dataToEncrypt = Clipperz.Crypto.SHA.sha_d256(value).appendBlock(value); 140 dataToEncrypt = Clipperz.Crypto.SHA.sha_d256(value).appendBlock(value);
143 141
144 deferredResult = new MochiKit.Async.Deferred() 142 deferredResult = new MochiKit.Async.Deferred()
145 deferredResult.addCallback(Clipperz.Crypto.AES.deferredEncrypt, key, dataToEncrypt, aNonce); 143 deferredResult.addCallback(Clipperz.Crypto.AES.deferredEncrypt, key, dataToEncrypt, aNonce);
146 deferredResult.addCallback(function(aResult) { 144 deferredResult.addCallback(function(aResult) {
147 return aResult.toBase64String(); 145 return aResult.toBase64String();
148 }) 146 })
149 deferredResult.callback(); 147 deferredResult.callback();
150 148
151 return deferredResult; 149 return deferredResult;
152 }, 150 },
153 151
154 'decrypt': function(aKey, aValue) { 152 'decrypt': function(aKey, aValue) {
155 var result; 153 var result;
156 154
157 if (aValue != null) { 155 if (aValue != null) {
158 var key, value; 156 var key, value;
159 var decryptedData; 157 var decryptedData;
160 var decryptedData; 158 var decryptedData;
161 159
162 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey)); 160 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey));
163 value = new Clipperz.ByteArray().appendBase64String(aValue); 161 value = new Clipperz.ByteArray().appendBase64String(aValue);
164 162
165 decryptedData = Clipperz.Crypto.AES.decrypt(key, value); 163 decryptedData = Clipperz.Crypto.AES.decrypt(key, value);
166 decryptedData = decryptedData.split((256/8)); 164 decryptedData = decryptedData.split((256/8));
167 165
168 try { 166 try {
169 result = Clipperz.Base.evalJSON(decryptedData.asString()); 167 result = Clipperz.Base.evalJSON(decryptedData.asString());
170 } catch (exception) { 168 } catch (exception) {
171 MochiKit.Logging.logError("Error while decrypting data"); 169 MochiKit.Logging.logError("Error while decrypting data");
172 throw Clipperz.Crypto.Base.exception.CorruptedMessage; 170 throw Clipperz.Crypto.Base.exception.CorruptedMessage;
173 } 171 }
174 } else { 172 } else {
175 result = null; 173 result = null;
176 } 174 }
177 175
178 return result; 176 return result;
179 }, 177 },
180 178
181 'deferredDecrypt': function(aKey, aValue) { 179 'deferredDecrypt': function(aKey, aValue) {
182 var result; 180 var result;
183 181
184 if (aValue != null) { 182 if (aValue != null) {
185 var deferredResult; 183 var deferredResult;
186 var key, value; 184 var key, value;
187 var decryptedData; 185 var decryptedData;
188 186
189 result = new MochiKit.Async.Deferred(); 187 result = new MochiKit.Async.Deferred();
190 188
191 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey)); 189 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey));
192 value = new Clipperz.ByteArray().appendBase64String(aValue); 190 value = new Clipperz.ByteArray().appendBase64String(aValue);
193 191
194 192
195 deferredResult = new MochiKit.Async.Deferred() 193 deferredResult = new MochiKit.Async.Deferred()
196 deferredResult.addCallback(Clipperz.Crypto.AES.deferredDecrypt, key, value); 194 deferredResult.addCallback(Clipperz.Crypto.AES.deferredDecrypt, key, value);
197 deferredResult.addCallback(function(aResult) { 195 deferredResult.addCallback(function(aResult) {
198 var result; 196 var result;
199 var decryptedData; 197 var decryptedData;
200 198
201 decryptedData = aResult.split((256/8)); 199 decryptedData = aResult.split((256/8));
202 200
203 try { 201 try {
204 result = Clipperz.Base.evalJSON(decryptedData.asString()); 202 result = Clipperz.Base.evalJSON(decryptedData.asString());
205 } catch (exception) { 203 } catch (exception) {
206 MochiKit.Logging.logError("Error while decrypting data"); 204 MochiKit.Logging.logError("Error while decrypting data");
207 throw Clipperz.Crypto.Base.exception.CorruptedMessage; 205 throw Clipperz.Crypto.Base.exception.CorruptedMessage;
208 } 206 }
209 207
210 return result; 208 return result;
211 }) 209 })
212 deferredResult.callback(); 210 deferredResult.callback();
213 211
214 result = deferredResult; 212 result = deferredResult;
215 } else { 213 } else {
216 result = MochiKit.Async.succeed(null); 214 result = MochiKit.Async.succeed(null);
217 } 215 }
218 216
219 return result; 217 return result;
220 }, 218 },
221 219
222 'hash': Clipperz.Crypto.SHA.sha_d256 220 'hash': Clipperz.Crypto.SHA.sha_d256
223 }, 221 },
224 222
225 //##################################################################### 223 //#####################################################################
226 224
227 '0.3': { 225 '0.3': {
228 'encrypt': function(aKey, aValue, aNonce) { 226 'encrypt': function(aKey, aValue, aNonce) {
229 var result; 227 var result;
230 varkey, value; 228 varkey, value;
231 var data; 229 var data;
232 var dataToEncrypt; 230 var dataToEncrypt;
233 var encryptedData; 231 var encryptedData;
234 232
235 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey)); 233 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey));
236 value = Clipperz.Base.serializeJSON(aValue); 234 value = Clipperz.Base.serializeJSON(aValue);
237 data = new Clipperz.ByteArray(value); 235 data = new Clipperz.ByteArray(value);
238 encryptedData = Clipperz.Crypto.AES.encrypt(key, data, aNonce); 236 encryptedData = Clipperz.Crypto.AES.encrypt(key, data, aNonce);
239 result = encryptedData.toBase64String(); 237 result = encryptedData.toBase64String();
240 238
241 return result; 239 return result;
242 }, 240 },
243 241
244 'deferredEncrypt': function(aKey, aValue, aNonce) { 242 'deferredEncrypt': function(aKey, aValue, aNonce) {
245 var deferredResult; 243 var deferredResult;
246 varkey, value; 244 varkey, value;
247 var data; 245 var data;
248 var dataToEncrypt; 246 var dataToEncrypt;
249 var encryptedData; 247 var encryptedData;
250 248
251 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey)); 249 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey));
252 value = Clipperz.Base.serializeJSON(aValue); 250 value = Clipperz.Base.serializeJSON(aValue);
253 data = new Clipperz.ByteArray(value); 251 data = new Clipperz.ByteArray(value);
254 252
255 deferredResult = new MochiKit.Async.Deferred() 253 deferredResult = new MochiKit.Async.Deferred()
256//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Crypto.deferredEncrypt - 1: " + res); return res;}); 254//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Crypto.deferredEncrypt - 1: " + res); return res;});
257 deferredResult.addCallback(Clipperz.Crypto.AES.deferredEncrypt, key, data, aNonce); 255 deferredResult.addCallback(Clipperz.Crypto.AES.deferredEncrypt, key, data, aNonce);
258//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Crypto.deferredEncrypt - 2: " + res); return res;}); 256//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Crypto.deferredEncrypt - 2: " + res); return res;});
259 deferredResult.addCallback(function(aResult) { 257 deferredResult.addCallback(function(aResult) {
260 return aResult.toBase64String(); 258 return aResult.toBase64String();
261 }) 259 })
262//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Crypto.deferredEncrypt - 3: " + res); return res;}); 260//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Clipperz.PM.Crypto.deferredEncrypt - 3: " + res); return res;});
263 deferredResult.callback(); 261 deferredResult.callback();
264 262
265 return deferredResult; 263 return deferredResult;
266 }, 264 },
267 265
268 'decrypt': function(aKey, aValue) { 266 'decrypt': function(aKey, aValue) {
269 var result; 267 var result;
270 268
271 if (aValue != null) { 269 if (aValue != null) {
272 var key, value; 270 var key, value;
273 var decryptedData; 271 var decryptedData;
274 var decryptedValue; 272 var decryptedValue;
275 273
276 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey)); 274 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey));
277 value = new Clipperz.ByteArray().appendBase64String(aValue); 275 value = new Clipperz.ByteArray().appendBase64String(aValue);
278 276
279 decryptedData = Clipperz.Crypto.AES.decrypt(key, value); 277 decryptedData = Clipperz.Crypto.AES.decrypt(key, value);
280 278
281 value = decryptedData.asString(); 279 value = decryptedData.asString();
282 try { 280 try {
283 result = Clipperz.Base.evalJSON(value); 281 result = Clipperz.Base.evalJSON(value);
284 } catch (exception) { 282 } catch (exception) {
285 MochiKit.Logging.logError("Error while decrypting data"); 283 MochiKit.Logging.logError("Error while decrypting data");
286 throw Clipperz.Crypto.Base.exception.CorruptedMessage; 284 throw Clipperz.Crypto.Base.exception.CorruptedMessage;
287 } 285 }
288 } else { 286 } else {
289 result = null; 287 result = null;
290 } 288 }
291 289
292 return result; 290 return result;
293 }, 291 },
294 292
295 'deferredDecrypt': function(aKey, aValue) { 293 'deferredDecrypt': function(aKey, aValue) {
296 var deferredResult; 294 var deferredResult;
297 // var now; 295 // var now;
298 296
299 deferredResult = new MochiKit.Async.Deferred(); 297 deferredResult = new MochiKit.Async.Deferred();
300 now = new Date; 298 now = new Date;
301 299
302//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 1: " + res); return res;}); 300//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 1: " + res); return res;});
303 if (aValue != null) { 301 if (aValue != null) {
304 var key, value; 302 var key, value;
305 var decryptedData; 303 var decryptedData;
306 var decryptedValue; 304 var decryptedValue;
307 305
308 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey)); 306 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey));
309//MochiKit.Logging.logDebug("[" + (new Date() - now) + "] computed key"); 307//MochiKit.Logging.logDebug("[" + (new Date() - now) + "] computed key");
310 value = new Clipperz.ByteArray().appendBase64String(aValue); 308 value = new Clipperz.ByteArray().appendBase64String(aValue);
311//MochiKit.Logging.logDebug("[" + (new Date() - now) + "] appendedBase64String"); 309//MochiKit.Logging.logDebug("[" + (new Date() - now) + "] appendedBase64String");
312 310
313//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 1.1: " /* + res*/); return res;}); 311//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 1.1: " /* + res*/); return res;});
314 deferredResult.addCallback(Clipperz.Crypto.AES.deferredDecrypt, key, value); 312 deferredResult.addCallback(Clipperz.Crypto.AES.deferredDecrypt, key, value);
315//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 2: " /* + res*/); return res;}); 313//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 2: " /* + res*/); return res;});
316 deferredResult.addCallback(MochiKit.Async.wait, 0.1); 314 deferredResult.addCallback(MochiKit.Async.wait, 0.1);
317//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 3: " /* + res*/); return res;}); 315//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 3: " /* + res*/); return res;});
318 deferredResult.addCallback(function(aResult) { 316 deferredResult.addCallback(function(aResult) {
319 return aResult.asString(); 317 return aResult.asString();
320 }); 318 });
321//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 4: " /* + res*/); return res;}); 319//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 4: " /* + res*/); return res;});
322 deferredResult.addCallback(MochiKit.Async.wait, 0.1); 320 deferredResult.addCallback(MochiKit.Async.wait, 0.1);
323//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 5: " /* + res*/); return res;}); 321//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 5: " /* + res*/); return res;});
324 deferredResult.addCallback(Clipperz.Base.evalJSON); 322 deferredResult.addCallback(Clipperz.Base.evalJSON);
325//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 6: " /* + res*/); return res;}); 323//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 6: " /* + res*/); return res;});
326 deferredResult.addErrback(function(anError) { 324 deferredResult.addErrback(function(anError) {
327 MochiKit.Logging.logError("Error while decrypting data"); 325 MochiKit.Logging.logError("Error while decrypting data");
328 throw Clipperz.Crypto.Base.exception.CorruptedMessage; 326 throw Clipperz.Crypto.Base.exception.CorruptedMessage;
329 }) 327 })
330//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 7: " /* + res*/); return res;}); 328//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("[" + (new Date() - now) + "] Clipperz.PM.Crypto.deferredDecrypt - 7: " /* + res*/); return res;});
331 } else { 329 } else {
332 deferredResult.addCallback(function() { 330 deferredResult.addCallback(function() {
333 return null; 331 return null;
334 }); 332 });
335 } 333 }
336 deferredResult.callback(); 334 deferredResult.callback();
337 335
338 return deferredResult; 336 return deferredResult;
339 }, 337 },
340 338
341 'hash': Clipperz.Crypto.SHA.sha_d256 339 'hash': Clipperz.Crypto.SHA.sha_d256
342 }, 340 },
343 341
344 //##################################################################### 342 //#####################################################################
345/* 343/*
346 '0.4': { 344 '0.4': {
347 'encrypt': function(aKey, aValue, aNonce) { 345 'encrypt': function(aKey, aValue, aNonce) {
348 var result; 346 var result;
349 varkey, value; 347 varkey, value;
350 var data; 348 var data;
351 var dataToEncrypt; 349 var dataToEncrypt;
352 var encryptedData; 350 var encryptedData;
353 351
354//MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt"); 352//MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt");
355 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey)); 353 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey));
356//MochiKit.Logging.logDebug("--- [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt - 1"); 354//MochiKit.Logging.logDebug("--- [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt - 1");
357 value = Clipperz.Base.serializeJSON(aValue); 355 value = Clipperz.Base.serializeJSON(aValue);
358//MochiKit.Logging.logDebug("--- [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt - 2"); 356//MochiKit.Logging.logDebug("--- [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt - 2");
359/ * 357/ *
360//MochiKit.Logging.logDebug("--> encrypt.fullSize: " + value.length); 358//MochiKit.Logging.logDebug("--> encrypt.fullSize: " + value.length);
361 value = value.replace(/":{"label":"/g, '":{l:"'); 359 value = value.replace(/":{"label":"/g, '":{l:"');
362 value = value.replace(/":{"key":"/g, '":{k:"'); 360 value = value.replace(/":{"key":"/g, '":{k:"');
363 value = value.replace(/":{"notes":"/g, '":{n:"'); 361 value = value.replace(/":{"notes":"/g, '":{n:"');
364 value = value.replace(/":{"record":"/g, '":{r:"'); 362 value = value.replace(/":{"record":"/g, '":{r:"');
365 value = value.replace(/", "label":"/g, '",l:"'); 363 value = value.replace(/", "label":"/g, '",l:"');
366 value = value.replace(/", "favicon":"/g,'",f:"'); 364 value = value.replace(/", "favicon":"/g,'",f:"');
367//MochiKit.Logging.logDebug("<-- encrypt.compressed: " + value.length); 365//MochiKit.Logging.logDebug("<-- encrypt.compressed: " + value.length);
368* / 366* /
369 data = new Clipperz.ByteArray(value); 367 data = new Clipperz.ByteArray(value);
370//MochiKit.Logging.logDebug("--- [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt - 3"); 368//MochiKit.Logging.logDebug("--- [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt - 3");
371 encryptedData = Clipperz.Crypto.AES.encrypt(key, data, aNonce); 369 encryptedData = Clipperz.Crypto.AES.encrypt(key, data, aNonce);
372//MochiKit.Logging.logDebug("--- [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt - 4"); 370//MochiKit.Logging.logDebug("--- [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt - 4");
373 result = encryptedData.toBase64String(); 371 result = encryptedData.toBase64String();
374//MochiKit.Logging.logDebug("<<< [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt"); 372//MochiKit.Logging.logDebug("<<< [" + (new Date()).valueOf() + "] Clipperz.PM.Crypto.versions[0.3].encrypt");
375 373
376 return result; 374 return result;
377 }, 375 },
378 376
379 'decrypt': function(aKey, aValue) { 377 'decrypt': function(aKey, aValue) {
380 var result; 378 var result;
381 379
382 if (aValue != null) { 380 if (aValue != null) {
383 var key, value; 381 var key, value;
384 var decryptedData; 382 var decryptedData;
385 var decryptedValue; 383 var decryptedValue;
386 384
387 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey)); 385 key = Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aKey));
388 value = new Clipperz.ByteArray().appendBase64String(aValue); 386 value = new Clipperz.ByteArray().appendBase64String(aValue);
389 387
390 decryptedData = Clipperz.Crypto.AES.decrypt(key, value); 388 decryptedData = Clipperz.Crypto.AES.decrypt(key, value);
391 389
392 value = decryptedData.asString(); 390 value = decryptedData.asString();
393/ * 391/ *
394 value = value.replace(/":{l:"/g,'":{"label":"'); 392 value = value.replace(/":{l:"/g,'":{"label":"');
395 value = value.replace(/":{k:"/g,'":{"key":"'); 393 value = value.replace(/":{k:"/g,'":{"key":"');
396 value = value.replace(/":{n:"/g,'":{"notes":"'); 394 value = value.replace(/":{n:"/g,'":{"notes":"');
397 value = value.replace(/":{r:"/g,'":{"record":"'); 395 value = value.replace(/":{r:"/g,'":{"record":"');
398 value = value.replace(/",l:"/g, '", "label":"'); 396 value = value.replace(/",l:"/g, '", "label":"');
399 value = value.replace(/",f:"/g, '", "favicon":"'); 397 value = value.replace(/",f:"/g, '", "favicon":"');
400* / 398* /
401 try { 399 try {
402 result = Clipperz.Base.evalJSON(value); 400 result = Clipperz.Base.evalJSON(value);
403 } catch (exception) { 401 } catch (exception) {
404 MochiKit.Logging.logError("Error while decrypting data"); 402 MochiKit.Logging.logError("Error while decrypting data");
405 throw Clipperz.Crypto.Base.exception.CorruptedMessage; 403 throw Clipperz.Crypto.Base.exception.CorruptedMessage;
406 } 404 }
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/DirectLogin.js b/frontend/beta/js/Clipperz/PM/DataModel/DirectLogin.js
index aee5703..c0cfa3c 100644
--- a/frontend/beta/js/Clipperz/PM/DataModel/DirectLogin.js
+++ b/frontend/beta/js/Clipperz/PM/DataModel/DirectLogin.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } 26if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
29 27
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.DataModel.DirectLogin = function(args) { 31Clipperz.PM.DataModel.DirectLogin = function(args) {
34//MochiKit.Logging.logDebug(">>> new Clipperz.PM.DataModel.DirectLogin"); 32//MochiKit.Logging.logDebug(">>> new Clipperz.PM.DataModel.DirectLogin");
35//console.log(">>> new Clipperz.PM.DataModel.DirectLogin - args: %o", args); 33//console.log(">>> new Clipperz.PM.DataModel.DirectLogin - args: %o", args);
36//console.log("--- formData: %s", Clipperz.Base.serializeJSON(args.formData)); 34//console.log("--- formData: %s", Clipperz.Base.serializeJSON(args.formData));
37 args = args || {}; 35 args = args || {};
38 36
39//MochiKit.Logging.logDebug("--- new Clipperz.PM.DataModel.DirectLogin - args: " + Clipperz.Base.serializeJSON(MochiKit.Base.keys(args))); 37//MochiKit.Logging.logDebug("--- new Clipperz.PM.DataModel.DirectLogin - args: " + Clipperz.Base.serializeJSON(MochiKit.Base.keys(args)));
40 this._record = args.record || null; 38 this._record = args.record || null;
41 this._label = args.label || "unnamed record" 39 this._label = args.label || "unnamed record"
42 this._reference = args.reference || Clipperz.PM.Crypto.randomKey(); 40 this._reference = args.reference || Clipperz.PM.Crypto.randomKey();
43 this._favicon = args.favicon || null; 41 this._favicon = args.favicon || null;
44 this._bookmarkletVersion = args.bookmarkletVersion || "0.1"; 42 this._bookmarkletVersion = args.bookmarkletVersion || "0.1";
45 43
46 this._directLoginInputs = null; 44 this._directLoginInputs = null;
47 45
48 this._formValues = args.formValues || {}; 46 this._formValues = args.formValues || {};
49 this.setFormData(args.formData || null); 47 this.setFormData(args.formData || null);
50//console.log("=== formData: %o", this.formData()); 48//console.log("=== formData: %o", this.formData());
51 49
52 if (args.legacyBindingData == null) { 50 if (args.legacyBindingData == null) {
53 this.setBindingData(args.bindingData || null); 51 this.setBindingData(args.bindingData || null);
54 } else { 52 } else {
55 this.setLegacyBindingData(args.legacyBindingData); 53 this.setLegacyBindingData(args.legacyBindingData);
56 } 54 }
57 55
58 this._fixedFavicon = null; 56 this._fixedFavicon = null;
59 57
60 //this._formValues = args.formValues || (this.hasValuesToSet() ? {} : null); 58 //this._formValues = args.formValues || (this.hasValuesToSet() ? {} : null);
61//MochiKit.Logging.logDebug("<<< new Clipperz.PM.DataModel.DirectLogin"); 59//MochiKit.Logging.logDebug("<<< new Clipperz.PM.DataModel.DirectLogin");
62 60
63 return this; 61 return this;
64} 62}
65 63
66Clipperz.PM.DataModel.DirectLogin.prototype = MochiKit.Base.update(null, { 64Clipperz.PM.DataModel.DirectLogin.prototype = MochiKit.Base.update(null, {
67 65
68 'remove': function() { 66 'remove': function() {
69 this.record().removeDirectLogin(this); 67 this.record().removeDirectLogin(this);
70 }, 68 },
71 69
72 //------------------------------------------------------------------------- 70 //-------------------------------------------------------------------------
73 71
74 'record': function() { 72 'record': function() {
75 return this._record; 73 return this._record;
76 }, 74 },
77 75
78 //------------------------------------------------------------------------- 76 //-------------------------------------------------------------------------
79 77
80 'user': function() { 78 'user': function() {
81 return this.record().user(); 79 return this.record().user();
82 }, 80 },
83 81
84 //------------------------------------------------------------------------- 82 //-------------------------------------------------------------------------
85 83
86 'reference': function() { 84 'reference': function() {
87 return this._reference; 85 return this._reference;
88 }, 86 },
89 87
90 //------------------------------------------------------------------------- 88 //-------------------------------------------------------------------------
91 89
92 'label': function() { 90 'label': function() {
93 return this._label; 91 return this._label;
94 }, 92 },
95 93
96 'setLabel': function(aValue) { 94 'setLabel': function(aValue) {
97 this._label = aValue; 95 this._label = aValue;
98 }, 96 },
99 97
100 //------------------------------------------------------------------------- 98 //-------------------------------------------------------------------------
101 99
102 'favicon': function() { 100 'favicon': function() {
103 if (this._favicon == null) { 101 if (this._favicon == null) {
104 varactionUrl; 102 varactionUrl;
105 var hostname; 103 var hostname;
106 104
107 actionUrl = this.formData()['attributes']['action']; 105 actionUrl = this.formData()['attributes']['action'];
108 hostname = actionUrl.replace(/^https?:\/\/([^\/]*)\/.*/, '$1'); 106 hostname = actionUrl.replace(/^https?:\/\/([^\/]*)\/.*/, '$1');
109 this._favicon = "http://" + hostname + "/favicon.ico"; 107 this._favicon = "http://" + hostname + "/favicon.ico";
110 } 108 }
111 109
112 return this._favicon; 110 return this._favicon;
113 }, 111 },
114 112
115 //------------------------------------------------------------------------- 113 //-------------------------------------------------------------------------
116 114
117 'fixedFavicon': function() { 115 'fixedFavicon': function() {
118 var result; 116 var result;
119 117
120 if (this._fixedFavicon == null) { 118 if (this._fixedFavicon == null) {
121 result = this.favicon(); 119 result = this.favicon();
122 120
123 if (Clipperz_IEisBroken) { 121 if (Clipperz_IEisBroken) {
124 if (this.user().preferences().disableUnsecureFaviconLoadingForIE()) { 122 if (this.user().preferences().disableUnsecureFaviconLoadingForIE()) {
125 if (result.indexOf('https://') != 0) { 123 if (result.indexOf('https://') != 0) {
126 result = Clipperz.PM.Strings['defaultFaviconUrl_IE']; 124 result = Clipperz.PM.Strings['defaultFaviconUrl_IE'];
127 this.setFixedFavicon(result); 125 this.setFixedFavicon(result);
128 } 126 }
129 } 127 }
130 } 128 }
131 } else { 129 } else {
132 result = this._fixedFavicon; 130 result = this._fixedFavicon;
133 } 131 }
134 132
135 return result; 133 return result;
136 }, 134 },
137 135
138 'setFixedFavicon': function(aValue) { 136 'setFixedFavicon': function(aValue) {
139 this._fixedFavicon = aValue; 137 this._fixedFavicon = aValue;
140 }, 138 },
141 139
142 //------------------------------------------------------------------------- 140 //-------------------------------------------------------------------------
143 141
144 'bookmarkletVersion': function() { 142 'bookmarkletVersion': function() {
145 return this._bookmarkletVersion; 143 return this._bookmarkletVersion;
146 }, 144 },
147 145
148 'setBookmarkletVersion': function(aValue) { 146 'setBookmarkletVersion': function(aValue) {
149 this._bookmarkletVersion = aValue; 147 this._bookmarkletVersion = aValue;
150 }, 148 },
151 149
152 //------------------------------------------------------------------------- 150 //-------------------------------------------------------------------------
153 151
154 'formData': function() { 152 'formData': function() {
155 return this._formData; 153 return this._formData;
156 }, 154 },
157 155
158 'setFormData': function(aValue) { 156 'setFormData': function(aValue) {
159 var formData; 157 var formData;
160 158
161//MochiKit.Logging.logDebug(">>> DirectLogin.setFormData - " + Clipperz.Base.serializeJSON(aValue)); 159//MochiKit.Logging.logDebug(">>> DirectLogin.setFormData - " + Clipperz.Base.serializeJSON(aValue));
162 switch (this.bookmarkletVersion()) { 160 switch (this.bookmarkletVersion()) {
163 case "0.2": 161 case "0.2":
164 formData = aValue; 162 formData = aValue;
165 break; 163 break;
166 case "0.1": 164 case "0.1":
167//MochiKit.Logging.logDebug("--- DirectLogin.setFormData - fixing form data from bookmarklet version 0.1"); 165//MochiKit.Logging.logDebug("--- DirectLogin.setFormData - fixing form data from bookmarklet version 0.1");
168 formData = this.fixFormDataFromBookmarkletVersion_0_1(aValue); 166 formData = this.fixFormDataFromBookmarkletVersion_0_1(aValue);
169 break; 167 break;
170 } 168 }
171 169
172 this._formData = aValue; 170 this._formData = aValue;
173 this.setBookmarkletVersion("0.2"); 171 this.setBookmarkletVersion("0.2");
174 172
175//MochiKit.Logging.logDebug("--- DirectLogin.setFormData - formData: " + Clipperz.Base.serializeJSON(formData)); 173//MochiKit.Logging.logDebug("--- DirectLogin.setFormData - formData: " + Clipperz.Base.serializeJSON(formData));
176 if (formData != null) { 174 if (formData != null) {
177 var i,c; 175 var i,c;
178 176
179 this._directLoginInputs = []; 177 this._directLoginInputs = [];
180 c = formData['inputs'].length; 178 c = formData['inputs'].length;
181 for (i=0; i<c; i++) { 179 for (i=0; i<c; i++) {
182 var directLoginInput; 180 var directLoginInput;
183 181
184 directLoginInput = new Clipperz.PM.DataModel.DirectLoginInput(this, formData['inputs'][i]); 182 directLoginInput = new Clipperz.PM.DataModel.DirectLoginInput(this, formData['inputs'][i]);
185 this._directLoginInputs.push(directLoginInput); 183 this._directLoginInputs.push(directLoginInput);
186 } 184 }
187 } 185 }
188//MochiKit.Logging.logDebug("<<< DirectLogin.setFormData"); 186//MochiKit.Logging.logDebug("<<< DirectLogin.setFormData");
189 }, 187 },
190 188
191 'fixFormDataFromBookmarkletVersion_0_1': function(aValue) { 189 'fixFormDataFromBookmarkletVersion_0_1': function(aValue) {
192//{"type":"radio", "name":"action", "value":"new-user", "checked":false }, { "type":"radio", "name":"action", "value":"sign-in", "checked":true } 190//{"type":"radio", "name":"action", "value":"new-user", "checked":false }, { "type":"radio", "name":"action", "value":"sign-in", "checked":true }
193 // || 191 // ||
194 // \ / 192 // \ /
195 // \/ 193 // \/
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}]} 194//{"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}]}
197 var result; 195 var result;
198 var inputs; 196 var inputs;
199 var updatedInputs; 197 var updatedInputs;
200 var radios; 198 var radios;
201 199
202//MochiKit.Logging.logDebug(">>> DirectLogin.fixFormDataFromBookmarkletVersion_0_1"); 200//MochiKit.Logging.logDebug(">>> DirectLogin.fixFormDataFromBookmarkletVersion_0_1");
203 result = aValue; 201 result = aValue;
204 inputs = aValue['inputs']; 202 inputs = aValue['inputs'];
205 203
206 updatedInputs = MochiKit.Base.filter(function(anInput) { 204 updatedInputs = MochiKit.Base.filter(function(anInput) {
207 varresult; 205 varresult;
208 var type; 206 var type;
209 207
210 type = anInput['type'] || 'text'; 208 type = anInput['type'] || 'text';
211 result = type.toLowerCase() != 'radio'; 209 result = type.toLowerCase() != 'radio';
212 210
213 return result; 211 return result;
214 }, inputs); 212 }, inputs);
215 radios = MochiKit.Base.filter(function(anInput) { 213 radios = MochiKit.Base.filter(function(anInput) {
216 varresult; 214 varresult;
217 var type; 215 var type;
218 216
219 type = anInput['type'] || 'text'; 217 type = anInput['type'] || 'text';
220 result = type.toLowerCase() == 'radio'; 218 result = type.toLowerCase() == 'radio';
221 219
222 return result; 220 return result;
223 }, inputs); 221 }, inputs);
224 222
225 if (radios.length > 0) { 223 if (radios.length > 0) {
226 var updatedRadios; 224 var updatedRadios;
227 225
228 updatedRadios = {}; 226 updatedRadios = {};
229 MochiKit.Iter.forEach(radios, MochiKit.Base.bind(function(aRadio) { 227 MochiKit.Iter.forEach(radios, MochiKit.Base.bind(function(aRadio) {
230 varradioConfiguration; 228 varradioConfiguration;
231 229
232 radioConfiguration = updatedRadios[aRadio['name']]; 230 radioConfiguration = updatedRadios[aRadio['name']];
233 if (radioConfiguration == null) { 231 if (radioConfiguration == null) {
234 radioConfiguration = {type:'radio', name:aRadio['name'], options:[]}; 232 radioConfiguration = {type:'radio', name:aRadio['name'], options:[]};
235 updatedRadios[aRadio['name']] = radioConfiguration; 233 updatedRadios[aRadio['name']] = radioConfiguration;
236 } 234 }
237 235
238 //TODO: remove the value: field and replace it with element.dom.value = <some value> 236 //TODO: remove the value: field and replace it with element.dom.value = <some value>
239 radioConfiguration.options.push({value:aRadio['value'], checked:aRadio['checked']}); 237 radioConfiguration.options.push({value:aRadio['value'], checked:aRadio['checked']});
240 238
241 if ((aRadio['checked'] == true) && (this.formValues()[aRadio['name']] == null)) { 239 if ((aRadio['checked'] == true) && (this.formValues()[aRadio['name']] == null)) {
242//MochiKit.Logging.logDebug("+++ setting value '" + aRadio['value'] + "' for key: '" + aRadio['name'] + "'"); 240//MochiKit.Logging.logDebug("+++ setting value '" + aRadio['value'] + "' for key: '" + aRadio['name'] + "'");
243 this.formValues()[aRadio['name']] = aRadio['value']; 241 this.formValues()[aRadio['name']] = aRadio['value'];
244 } 242 }
245 }, this)) 243 }, this))
246 244
247 updatedInputs = MochiKit.Base.concat(updatedInputs, MochiKit.Base.values(updatedRadios)); 245 updatedInputs = MochiKit.Base.concat(updatedInputs, MochiKit.Base.values(updatedRadios));
248 } 246 }
249 247
250 delete result.inputs; 248 delete result.inputs;
251 result.inputs = updatedInputs; 249 result.inputs = updatedInputs;
252//MochiKit.Logging.logDebug("<<< DirectLogin.fixFormDataFromBookmarkletVersion_0_1"); 250//MochiKit.Logging.logDebug("<<< DirectLogin.fixFormDataFromBookmarkletVersion_0_1");
253 251
254 return result; 252 return result;
255 }, 253 },
256 254
257 //......................................................................... 255 //.........................................................................
258 256
259 'directLoginInputs': function() { 257 'directLoginInputs': function() {
260 return this._directLoginInputs; 258 return this._directLoginInputs;
261 }, 259 },
262 260
263 //------------------------------------------------------------------------- 261 //-------------------------------------------------------------------------
264 262
265 'formValues': function() { 263 'formValues': function() {
266 return this._formValues; 264 return this._formValues;
267 }, 265 },
268 266
269 'hasValuesToSet': function() { 267 'hasValuesToSet': function() {
270 var result; 268 var result;
271 269
272//MochiKit.Logging.logDebug(">>> DirectLogin.hasValuesToSet"); 270//MochiKit.Logging.logDebug(">>> DirectLogin.hasValuesToSet");
273 if (this.directLoginInputs() != null) { 271 if (this.directLoginInputs() != null) {
274 result = MochiKit.Iter.some(this.directLoginInputs(), MochiKit.Base.methodcaller('shouldSetValue')); 272 result = MochiKit.Iter.some(this.directLoginInputs(), MochiKit.Base.methodcaller('shouldSetValue'));
275 } else { 273 } else {
276 result = false; 274 result = false;
277 } 275 }
278//MochiKit.Logging.logDebug("<<< DirectLogin.hasValuesToSet"); 276//MochiKit.Logging.logDebug("<<< DirectLogin.hasValuesToSet");
279 277
280 return result; 278 return result;
281 }, 279 },
282 280
283 //'additionalValues': function() { 281 //'additionalValues': function() {
284 'inputsRequiringAdditionalValues': function() { 282 'inputsRequiringAdditionalValues': function() {
285 varresult; 283 varresult;
286 var inputs; 284 var inputs;
287 285
288//MochiKit.Logging.logDebug(">>> DirectLogin.additionalValues"); 286//MochiKit.Logging.logDebug(">>> DirectLogin.additionalValues");
289 result = {}; 287 result = {};
290 if (this.directLoginInputs() != null) { 288 if (this.directLoginInputs() != null) {
291 inputs = MochiKit.Base.filter(MochiKit.Base.methodcaller('shouldSetValue'), this.directLoginInputs()); 289 inputs = MochiKit.Base.filter(MochiKit.Base.methodcaller('shouldSetValue'), this.directLoginInputs());
292 MochiKit.Iter.forEach(inputs, function(anInput) { 290 MochiKit.Iter.forEach(inputs, function(anInput) {
293 result[anInput.name()] = anInput; 291 result[anInput.name()] = anInput;
294 }) 292 })
295 } 293 }
296//MochiKit.Logging.logDebug("<<< DirectLogin.additionalValues"); 294//MochiKit.Logging.logDebug("<<< DirectLogin.additionalValues");
297 295
298 return result; 296 return result;
299 }, 297 },
300 298
301 //------------------------------------------------------------------------- 299 //-------------------------------------------------------------------------
302 300
303 'bindingData': function() { 301 'bindingData': function() {
304 return this._bindingData; 302 return this._bindingData;
305 }, 303 },
306 304
307 'setBindingData': function(aValue) { 305 'setBindingData': function(aValue) {
308//MochiKit.Logging.logDebug(">>> DirectLogin.setBindingData"); 306//MochiKit.Logging.logDebug(">>> DirectLogin.setBindingData");
309 if (aValue != null) { 307 if (aValue != null) {
310 var bindingKey; 308 var bindingKey;
311 309
312 this._bindingData = aValue; 310 this._bindingData = aValue;
313 this._bindings = {}; 311 this._bindings = {};
314 312
315 for (bindingKey in aValue) { 313 for (bindingKey in aValue) {
316 var directLoginBinding; 314 var directLoginBinding;
317 315
318 directLoginBinding = new Clipperz.PM.DataModel.DirectLoginBinding(this, bindingKey, {fieldKey:aValue[bindingKey]}); 316 directLoginBinding = new Clipperz.PM.DataModel.DirectLoginBinding(this, bindingKey, {fieldKey:aValue[bindingKey]});
319 this._bindings[bindingKey] = directLoginBinding; 317 this._bindings[bindingKey] = directLoginBinding;
320 } 318 }
321 } else { 319 } else {
322 var editableFields; 320 var editableFields;
323 var bindings; 321 var bindings;
324 322
325 bindings = {}; 323 bindings = {};
326 324
327 editableFields = MochiKit.Base.filter(function(aField) { 325 editableFields = MochiKit.Base.filter(function(aField) {
328 var result; 326 var result;
329 var type; 327 var type;
330 328
331 type = aField['type'].toLowerCase(); 329 type = aField['type'].toLowerCase();
332 result = ((type != 'hidden') && (type != 'submit') && (type != 'checkbox') && (type != 'radio') && (type != 'select')); 330 result = ((type != 'hidden') && (type != 'submit') && (type != 'checkbox') && (type != 'radio') && (type != 'select'));
333 331
334 return result; 332 return result;
335 }, this.formData().inputs); 333 }, this.formData().inputs);
336 334
337 MochiKit.Iter.forEach(editableFields, function(anEditableField) { 335 MochiKit.Iter.forEach(editableFields, function(anEditableField) {
338 bindings[anEditableField['name']] = new Clipperz.PM.DataModel.DirectLoginBinding(this, anEditableField['name']); 336 bindings[anEditableField['name']] = new Clipperz.PM.DataModel.DirectLoginBinding(this, anEditableField['name']);
339 }, this); 337 }, this);
340 338
341 this._bindings = bindings; 339 this._bindings = bindings;
342 } 340 }
343//MochiKit.Logging.logDebug("<<< DirectLogin.setBindingData"); 341//MochiKit.Logging.logDebug("<<< DirectLogin.setBindingData");
344 }, 342 },
345 343
346 'setLegacyBindingData': function(aValue) { 344 'setLegacyBindingData': function(aValue) {
347//MochiKit.Logging.logDebug(">>> DirectLogin.setLegacyBindingData"); 345//MochiKit.Logging.logDebug(">>> DirectLogin.setLegacyBindingData");
348 var bindingKey; 346 var bindingKey;
349 347
350 this._bindingData = aValue; 348 this._bindingData = aValue;
351 this._bindings = {}; 349 this._bindings = {};
352 350
353 for (bindingKey in aValue) { 351 for (bindingKey in aValue) {
354 var directLoginBinding; 352 var directLoginBinding;
355 353
356 directLoginBinding = new Clipperz.PM.DataModel.DirectLoginBinding(this, bindingKey, {fieldName:aValue[bindingKey]}); 354 directLoginBinding = new Clipperz.PM.DataModel.DirectLoginBinding(this, bindingKey, {fieldName:aValue[bindingKey]});
357 this._bindings[bindingKey] = directLoginBinding; 355 this._bindings[bindingKey] = directLoginBinding;
358 } 356 }
359//MochiKit.Logging.logDebug("<<< DirectLogin.setLegacyBindingData"); 357//MochiKit.Logging.logDebug("<<< DirectLogin.setLegacyBindingData");
360 }, 358 },
361 359
362 //......................................................................... 360 //.........................................................................
363 361
364 'bindings': function() { 362 'bindings': function() {
365 return this._bindings; 363 return this._bindings;
366 }, 364 },
367 365
368 //------------------------------------------------------------------------- 366 //-------------------------------------------------------------------------
369 367
370 'serializedData': function() { 368 'serializedData': function() {
371 var result; 369 var result;
372 varbindingKey; 370 varbindingKey;
373 371
374 result = {}; 372 result = {};
375 // result.reference = this.reference(); 373 // result.reference = this.reference();
376 result.label = this.label(); 374 result.label = this.label();
377 result.favicon = this.favicon() || ""; 375 result.favicon = this.favicon() || "";
378 result.bookmarkletVersion = this.bookmarkletVersion(); 376 result.bookmarkletVersion = this.bookmarkletVersion();
379 result.formData = this.formData(); 377 result.formData = this.formData();
380 if (this.hasValuesToSet) { 378 if (this.hasValuesToSet) {
381 result.formValues = this.formValues(); 379 result.formValues = this.formValues();
382 } 380 }
383 result.bindingData = {}; 381 result.bindingData = {};
384 382
385 for (bindingKey in this.bindings()) { 383 for (bindingKey in this.bindings()) {
386 result.bindingData[bindingKey] = this.bindings()[bindingKey].serializedData(); 384 result.bindingData[bindingKey] = this.bindings()[bindingKey].serializedData();
387 } 385 }
388 386
389 return result; 387 return result;
390 }, 388 },
391 389
392 //------------------------------------------------------------------------- 390 //-------------------------------------------------------------------------
393 391
394 'handleMissingFaviconImage': function(anEvent) { 392 'handleMissingFaviconImage': function(anEvent) {
395 anEvent.stop(); 393 anEvent.stop();
396 MochiKit.Signal.disconnectAll(anEvent.src()); 394 MochiKit.Signal.disconnectAll(anEvent.src());
397 this.setFixedFavicon(Clipperz.PM.Strings['defaultFaviconUrl']); 395 this.setFixedFavicon(Clipperz.PM.Strings['defaultFaviconUrl']);
398 anEvent.src().src = this.fixedFavicon(); 396 anEvent.src().src = this.fixedFavicon();
399 }, 397 },
400 398
401 //========================================================================= 399 //=========================================================================
402 400
403 'runHttpAuthDirectLogin': function(aWindow) { 401 'runHttpAuthDirectLogin': function(aWindow) {
404 MochiKit.DOM.withWindow(aWindow, MochiKit.Base.bind(function() { 402 MochiKit.DOM.withWindow(aWindow, MochiKit.Base.bind(function() {
405 var completeUrl; 403 var completeUrl;
406 var url; 404 var url;
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginBinding.js b/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginBinding.js
index 7f09bff..cef41af 100644
--- a/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginBinding.js
+++ b/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginBinding.js
@@ -1,110 +1,108 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } 26if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
29 27
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.DataModel.DirectLoginBinding = function(aDirectLogin, aKey, args) { 31Clipperz.PM.DataModel.DirectLoginBinding = function(aDirectLogin, aKey, args) {
34//MochiKit.Logging.logDebug(">>> new DirectLoginBinding") 32//MochiKit.Logging.logDebug(">>> new DirectLoginBinding")
35 args = args || {}; 33 args = args || {};
36//MochiKit.Logging.logDebug("--- new DirectLoginBinding - args: " + Clipperz.Base.serializeJSON(args)); 34//MochiKit.Logging.logDebug("--- new DirectLoginBinding - args: " + Clipperz.Base.serializeJSON(args));
37 35
38 this._directLogin = aDirectLogin || args.directLogin || null; 36 this._directLogin = aDirectLogin || args.directLogin || null;
39 this._key = aKey; 37 this._key = aKey;
40 38
41 this._fieldKey = args.fieldKey || null; 39 this._fieldKey = args.fieldKey || null;
42 this._fieldName = args.fieldName || null; 40 this._fieldName = args.fieldName || null;
43//MochiKit.Logging.logDebug("<<< new DirectLoginBinding") 41//MochiKit.Logging.logDebug("<<< new DirectLoginBinding")
44 42
45 return this; 43 return this;
46} 44}
47 45
48Clipperz.PM.DataModel.DirectLoginBinding.prototype = MochiKit.Base.update(null, { 46Clipperz.PM.DataModel.DirectLoginBinding.prototype = MochiKit.Base.update(null, {
49 47
50 'directLogin': function() { 48 'directLogin': function() {
51 return this._directLogin; 49 return this._directLogin;
52 }, 50 },
53 51
54 //------------------------------------------------------------------------- 52 //-------------------------------------------------------------------------
55 53
56 'key': function() { 54 'key': function() {
57 return this._key; 55 return this._key;
58 }, 56 },
59 57
60 //------------------------------------------------------------------------- 58 //-------------------------------------------------------------------------
61 59
62 'fieldKey': function() { 60 'fieldKey': function() {
63//MochiKit.Logging.logDebug("=== Clipperz.PM.DataModel.DirectLoginBinding.fieldKey"); 61//MochiKit.Logging.logDebug("=== Clipperz.PM.DataModel.DirectLoginBinding.fieldKey");
64//MochiKit.Logging.logDebug("=== Clipperz.PM.DataModel.DirectLoginBinding.fieldKey - " + this._fieldKey); 62//MochiKit.Logging.logDebug("=== Clipperz.PM.DataModel.DirectLoginBinding.fieldKey - " + this._fieldKey);
65 return this._fieldKey; 63 return this._fieldKey;
66 }, 64 },
67 65
68 'setFieldKey': function(aValue) { 66 'setFieldKey': function(aValue) {
69 this._fieldKey = aValue; 67 this._fieldKey = aValue;
70 }, 68 },
71 69
72 'fieldName': function() { 70 'fieldName': function() {
73 return this._fieldName; 71 return this._fieldName;
74 }, 72 },
75 73
76 //------------------------------------------------------------------------- 74 //-------------------------------------------------------------------------
77 75
78 'field': function() { 76 'field': function() {
79 var result; 77 var result;
80 78
81 //MochiKit.Logging.logDebug(">>> Clipperz.PM.DataModel.DirectLoginBinding.field") 79 //MochiKit.Logging.logDebug(">>> Clipperz.PM.DataModel.DirectLoginBinding.field")
82//MochiKit.Logging.logDebug("--- Clipperz.PM.DataModel.DirectLoginBinding.field - 1 - this.fieldKey(): " + this.fieldKey()); 80//MochiKit.Logging.logDebug("--- Clipperz.PM.DataModel.DirectLoginBinding.field - 1 - this.fieldKey(): " + this.fieldKey());
83//MochiKit.Logging.logDebug("--- Clipperz.PM.DataModel.DirectLoginBinding.field - 2 - this.fieldName(): " + this.fieldName()); 81//MochiKit.Logging.logDebug("--- Clipperz.PM.DataModel.DirectLoginBinding.field - 2 - this.fieldName(): " + this.fieldName());
84 if (this.fieldKey() != null) { 82 if (this.fieldKey() != null) {
85 result = this.directLogin().record().currentVersion().fields()[this.fieldKey()]; 83 result = this.directLogin().record().currentVersion().fields()[this.fieldKey()];
86//MochiKit.Logging.logDebug("--- Clipperz.PM.DataModel.DirectLoginBinding.field - 3 - result: " + result); 84//MochiKit.Logging.logDebug("--- Clipperz.PM.DataModel.DirectLoginBinding.field - 3 - result: " + result);
87 } else if (this.fieldName() != null) { 85 } else if (this.fieldName() != null) {
88 result = this.directLogin().record().currentVersion().fieldWithName(this.fieldName()); 86 result = this.directLogin().record().currentVersion().fieldWithName(this.fieldName());
89//MochiKit.Logging.logDebug("--- Clipperz.PM.DataModel.DirectLoginBinding.field - 4 - result: " + result); 87//MochiKit.Logging.logDebug("--- Clipperz.PM.DataModel.DirectLoginBinding.field - 4 - result: " + result);
90 88
91 this.setFieldKey(result.key()); 89 this.setFieldKey(result.key());
92 } else { 90 } else {
93 result = null; 91 result = null;
94 } 92 }
95 //MochiKit.Logging.logDebug("<<< Clipperz.PM.DataModel.DirectLoginBinding.field") 93 //MochiKit.Logging.logDebug("<<< Clipperz.PM.DataModel.DirectLoginBinding.field")
96 94
97 return result; 95 return result;
98 }, 96 },
99 97
100 //------------------------------------------------------------------------- 98 //-------------------------------------------------------------------------
101 99
102 'serializedData': function() { 100 'serializedData': function() {
103 return this.fieldKey(); 101 return this.fieldKey();
104 }, 102 },
105 103
106 //------------------------------------------------------------------------- 104 //-------------------------------------------------------------------------
107 __syntaxFix__: "syntax fix" 105 __syntaxFix__: "syntax fix"
108 106
109}); 107});
110 108
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginInput.js b/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginInput.js
index 0e2b7ad..e5e9ad5 100644
--- a/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginInput.js
+++ b/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginInput.js
@@ -1,226 +1,224 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } 26if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
29 27
30//############################################################################# 28//#############################################################################
31 29
32Clipperz.PM.DataModel.DirectLoginInput = function(aDirectLogin, args) { 30Clipperz.PM.DataModel.DirectLoginInput = function(aDirectLogin, args) {
33 args = args || {}; 31 args = args || {};
34 32
35//console.log(">>> new DirectLoginInput - args: %o" + args); 33//console.log(">>> new DirectLoginInput - args: %o" + args);
36 this._directLogin = aDirectLogin; 34 this._directLogin = aDirectLogin;
37 this._args = args; 35 this._args = args;
38 36
39 return this; 37 return this;
40} 38}
41 39
42Clipperz.PM.DataModel.DirectLoginInput.prototype = MochiKit.Base.update(null, { 40Clipperz.PM.DataModel.DirectLoginInput.prototype = MochiKit.Base.update(null, {
43 41
44 'directLogin': function() { 42 'directLogin': function() {
45 return this._directLogin; 43 return this._directLogin;
46 }, 44 },
47 45
48 //------------------------------------------------------------------------- 46 //-------------------------------------------------------------------------
49 47
50 'args': function() { 48 'args': function() {
51 return this._args; 49 return this._args;
52 }, 50 },
53 51
54 //------------------------------------------------------------------------- 52 //-------------------------------------------------------------------------
55 53
56 'name': function() { 54 'name': function() {
57 return this.args()['name']; 55 return this.args()['name'];
58 }, 56 },
59 57
60 //------------------------------------------------------------------------- 58 //-------------------------------------------------------------------------
61 59
62 'type': function() { 60 'type': function() {
63 var result; 61 var result;
64 62
65 result = this.args()['type']; 63 result = this.args()['type'];
66 64
67 if (result != null) { 65 if (result != null) {
68 result = result.toLowerCase(); 66 result = result.toLowerCase();
69 } 67 }
70 return result; 68 return result;
71 }, 69 },
72 70
73 //------------------------------------------------------------------------- 71 //-------------------------------------------------------------------------
74 72
75 'value': function() { 73 'value': function() {
76 return this.args()['value']; 74 return this.args()['value'];
77 }, 75 },
78 76
79 //------------------------------------------------------------------------- 77 //-------------------------------------------------------------------------
80 78
81 'formConfiguration': function() { 79 'formConfiguration': function() {
82 var result; 80 var result;
83 81
84//MochiKit.Logging.logDebug(">>> DirectLoginInput.formConfiguration - " + this.name()); 82//MochiKit.Logging.logDebug(">>> DirectLoginInput.formConfiguration - " + this.name());
85 if (this.shouldSetValue()) { 83 if (this.shouldSetValue()) {
86//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 1"); 84//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 1");
87 switch (this.type()) { 85 switch (this.type()) {
88 case 'select': 86 case 'select':
89 var currentValue; 87 var currentValue;
90 var options; 88 var options;
91 89
92//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2"); 90//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2");
93 currentValue = this.directLogin().formValues()[this.name()]; 91 currentValue = this.directLogin().formValues()[this.name()];
94//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.1"); 92//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.1");
95 options = this.args()['options']; 93 options = this.args()['options'];
96//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.2"); 94//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.2");
97 95
98 result = MochiKit.DOM.SELECT({name:this.name()}, 96 result = MochiKit.DOM.SELECT({name:this.name()},
99 MochiKit.Base.map(function(anOption) { 97 MochiKit.Base.map(function(anOption) {
100 var options; 98 var options;
101 99
102//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.3"); 100//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.3");
103 //TODO: remove the value: field and replace it with element.dom.value = <some value> 101 //TODO: remove the value: field and replace it with element.dom.value = <some value>
104 options = {value:anOption['value']}; 102 options = {value:anOption['value']};
105//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.4"); 103//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.4");
106 if (currentValue == anOption['value']) { 104 if (currentValue == anOption['value']) {
107//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.5"); 105//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.5");
108 options.selected = true; 106 options.selected = true;
109//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.6"); 107//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.6");
110 } 108 }
111//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.7"); 109//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.7");
112 110
113 return MochiKit.DOM.OPTION(options, anOption['label']) 111 return MochiKit.DOM.OPTION(options, anOption['label'])
114 }, options) 112 }, options)
115 ) 113 )
116//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.8"); 114//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 2.8");
117 break; 115 break;
118 case 'checkbox': 116 case 'checkbox':
119 var options; 117 var options;
120 118
121//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 3"); 119//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 3");
122 options = {type:'checkbox', name: this.name()}; 120 options = {type:'checkbox', name: this.name()};
123 if (this.directLogin().formValues()[this.name()] == true) { 121 if (this.directLogin().formValues()[this.name()] == true) {
124 options['checked'] = true; 122 options['checked'] = true;
125 }; 123 };
126 124
127 result = MochiKit.DOM.INPUT(options, null); 125 result = MochiKit.DOM.INPUT(options, null);
128 break; 126 break;
129 case 'radio': 127 case 'radio':
130 var currentName; 128 var currentName;
131 var currentValue; 129 var currentValue;
132 var options; 130 var options;
133 131
134//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4"); 132//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4");
135 currentName = this.name(); 133 currentName = this.name();
136//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.1"); 134//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.1");
137 currentValue = this.directLogin().formValues()[this.name()]; 135 currentValue = this.directLogin().formValues()[this.name()];
138//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.2"); 136//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.2");
139 options = this.args()['options']; 137 options = this.args()['options'];
140//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.3"); 138//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.3");
141 139
142 result = MochiKit.DOM.DIV(null, 140 result = MochiKit.DOM.DIV(null,
143 MochiKit.Base.map(function(anOption) { 141 MochiKit.Base.map(function(anOption) {
144 var options; 142 var options;
145 var isChecked; 143 var isChecked;
146 var inputNode; 144 var inputNode;
147 var divNode; 145 var divNode;
148 146
149//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.4"); 147//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.4");
150 //TODO: remove the value: field and replace it with element.dom.value = <some value> 148 //TODO: remove the value: field and replace it with element.dom.value = <some value>
151 options = {type:'radio', name:currentName, value:anOption['value']} 149 options = {type:'radio', name:currentName, value:anOption['value']}
152 isChecked = (currentValue == anOption['value']); 150 isChecked = (currentValue == anOption['value']);
153//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.5"); 151//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.5");
154 if (isChecked) { 152 if (isChecked) {
155//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.6"); 153//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.6");
156 options.checked = true; 154 options.checked = true;
157//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.7"); 155//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.7");
158 } 156 }
159//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.8 - options: " + Clipperz.Base.serializeJSON(options)); 157//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.8 - options: " + Clipperz.Base.serializeJSON(options));
160//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.8 - value: " + anOption['value']); 158//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.8 - value: " + anOption['value']);
161 159
162 if (Clipperz_IEisBroken == true) { 160 if (Clipperz_IEisBroken == true) {
163 var checkedValue; 161 var checkedValue;
164 162
165//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.8.1"); 163//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.8.1");
166 checkedValue = (isChecked ? " CHECKED" : ""); 164 checkedValue = (isChecked ? " CHECKED" : "");
167//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.8.2"); 165//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.8.2");
168 inputNode = MochiKit.DOM.currentDocument().createElement("<INPUT TYPE='RADIO' NAME='" + currentName + "' VALUE='" + anOption['value'] + "'" + checkedValue + ">"); 166 inputNode = MochiKit.DOM.currentDocument().createElement("<INPUT TYPE='RADIO' NAME='" + currentName + "' VALUE='" + anOption['value'] + "'" + checkedValue + ">");
169//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.8.3"); 167//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.8.3");
170 } else { 168 } else {
171//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.8.4"); 169//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.8.4");
172 inputNode = MochiKit.DOM.INPUT(options, anOption['value']); 170 inputNode = MochiKit.DOM.INPUT(options, anOption['value']);
173//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.8.5"); 171//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.8.5");
174 } 172 }
175//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.9"); 173//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.9");
176 divNode = MochiKit.DOM.DIV(null, inputNode); 174 divNode = MochiKit.DOM.DIV(null, inputNode);
177//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.10"); 175//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.10");
178 176
179 return divNode; 177 return divNode;
180 // return MochiKit.DOM.DIV(null, MochiKit.DOM.INPUT(options, anOption['value'])); 178 // return MochiKit.DOM.DIV(null, MochiKit.DOM.INPUT(options, anOption['value']));
181 }, options) 179 }, options)
182 ); 180 );
183//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.9"); 181//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 4.9");
184 break; 182 break;
185 } 183 }
186 } else { 184 } else {
187 var binding; 185 var binding;
188//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 5"); 186//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 5");
189 binding = this.directLogin().bindings()[this.name()]; 187 binding = this.directLogin().bindings()[this.name()];
190 188
191//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 6"); 189//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 6");
192 //TODO: remove the value: field and replace it with element.dom.value = <some value> 190 //TODO: remove the value: field and replace it with element.dom.value = <some value>
193 result = MochiKit.DOM.INPUT({ 191 result = MochiKit.DOM.INPUT({
194 type:((this.type() != 'password') ? this.type() : 'text'), 192 type:((this.type() != 'password') ? this.type() : 'text'),
195 // type:(((this.type() != 'password') && (this.type() != 'submit')) ? this.type() : 'text'), 193 // type:(((this.type() != 'password') && (this.type() != 'submit')) ? this.type() : 'text'),
196 name:this.name(), 194 name:this.name(),
197 value:((binding != null)? binding.field().value() : this.value()) 195 value:((binding != null)? binding.field().value() : this.value())
198 }, null); 196 }, null);
199//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 7"); 197//MochiKit.Logging.logDebug("--- DirectLoginInput.formConfiguration - 7");
200 } 198 }
201 199
202//MochiKit.Logging.logDebug("<<< DirectLoginInput.formConfiguration: "); 200//MochiKit.Logging.logDebug("<<< DirectLoginInput.formConfiguration: ");
203 return result; 201 return result;
204 }, 202 },
205 203
206 //------------------------------------------------------------------------- 204 //-------------------------------------------------------------------------
207 205
208 'shouldSetValue': function() { 206 'shouldSetValue': function() {
209 var type; 207 var type;
210 var result; 208 var result;
211 209
212//MochiKit.Logging.logDebug(">>> DirectLoginInput.shouldSetValue"); 210//MochiKit.Logging.logDebug(">>> DirectLoginInput.shouldSetValue");
213 type = this.type(); 211 type = this.type();
214 result = ((type == 'checkbox') || (type == 'radio') || (type == 'select')); 212 result = ((type == 'checkbox') || (type == 'radio') || (type == 'select'));
215//if (result == true) { 213//if (result == true) {
216 //MochiKit.Logging.logDebug("DIRECT LOGIN INPUT need value: " + Clipperz.Base.serializeJSON(this.args())); 214 //MochiKit.Logging.logDebug("DIRECT LOGIN INPUT need value: " + Clipperz.Base.serializeJSON(this.args()));
217//} 215//}
218//MochiKit.Logging.logDebug("<<< DirectLoginInput.shouldSetValue"); 216//MochiKit.Logging.logDebug("<<< DirectLoginInput.shouldSetValue");
219 return result; 217 return result;
220 }, 218 },
221 219
222 //------------------------------------------------------------------------- 220 //-------------------------------------------------------------------------
223 __syntaxFix__: "syntax fix" 221 __syntaxFix__: "syntax fix"
224 222
225}); 223});
226 224
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginReference.js b/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginReference.js
index 2be7d58..236d7c9 100644
--- a/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginReference.js
+++ b/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginReference.js
@@ -1,189 +1,187 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } 26if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
29 27
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.DataModel.DirectLoginReference = function(args) { 31Clipperz.PM.DataModel.DirectLoginReference = function(args) {
34 args = args || {}; 32 args = args || {};
35 33
36//MochiKit.Logging.logDebug(">>> new DirectLoginReference: " + Clipperz.Base.serializeJSON(MochiKit.Base.keys(args))); 34//MochiKit.Logging.logDebug(">>> new DirectLoginReference: " + Clipperz.Base.serializeJSON(MochiKit.Base.keys(args)));
37//MochiKit.Logging.logDebug(">>> new DirectLoginReference - record: " + args.record); 35//MochiKit.Logging.logDebug(">>> new DirectLoginReference - record: " + args.record);
38 this._user = args.user; 36 this._user = args.user;
39 37
40 if (args.directLogin != null) { 38 if (args.directLogin != null) {
41 this._reference = args.directLogin.reference(); 39 this._reference = args.directLogin.reference();
42 this._recordReference = args.directLogin.record().reference(); 40 this._recordReference = args.directLogin.record().reference();
43 this._label = args.directLogin.label(); 41 this._label = args.directLogin.label();
44 this._favicon = args.directLogin.favicon() || null; 42 this._favicon = args.directLogin.favicon() || null;
45 43
46 this._directLogin = args.directLogin; 44 this._directLogin = args.directLogin;
47 this._record = args.directLogin.record(); 45 this._record = args.directLogin.record();
48 } else { 46 } else {
49 this._reference = args.reference; 47 this._reference = args.reference;
50 this._recordReference = args.record; 48 this._recordReference = args.record;
51 this._label = args.label; 49 this._label = args.label;
52 this._favicon = args.favicon || null; 50 this._favicon = args.favicon || null;
53 51
54 this._directLogin = null; 52 this._directLogin = null;
55 this._record = null; 53 this._record = null;
56 } 54 }
57 55
58 this._fixedFavicon = null; 56 this._fixedFavicon = null;
59 57
60 return this; 58 return this;
61} 59}
62 60
63Clipperz.PM.DataModel.DirectLoginReference.prototype = MochiKit.Base.update(null, { 61Clipperz.PM.DataModel.DirectLoginReference.prototype = MochiKit.Base.update(null, {
64 62
65 'user': function() { 63 'user': function() {
66 return this._user; 64 return this._user;
67 }, 65 },
68 66
69 //------------------------------------------------------------------------- 67 //-------------------------------------------------------------------------
70 68
71 'reference': function() { 69 'reference': function() {
72 return this._reference; 70 return this._reference;
73 }, 71 },
74 72
75 //------------------------------------------------------------------------- 73 //-------------------------------------------------------------------------
76 74
77 'synchronizeValues': function(aDirectLogin) { 75 'synchronizeValues': function(aDirectLogin) {
78 this._label = aDirectLogin.label(); 76 this._label = aDirectLogin.label();
79 this._favicon = aDirectLogin.favicon(); 77 this._favicon = aDirectLogin.favicon();
80 }, 78 },
81 79
82 //------------------------------------------------------------------------- 80 //-------------------------------------------------------------------------
83 81
84 'label': function() { 82 'label': function() {
85 return this._label; 83 return this._label;
86 }, 84 },
87 85
88 //------------------------------------------------------------------------- 86 //-------------------------------------------------------------------------
89 87
90 'recordReference': function() { 88 'recordReference': function() {
91 return this._recordReference; 89 return this._recordReference;
92 }, 90 },
93 91
94 //------------------------------------------------------------------------- 92 //-------------------------------------------------------------------------
95 93
96 'record': function() { 94 'record': function() {
97//MochiKit.Logging.logDebug(">>> DirectLoginReference.record"); 95//MochiKit.Logging.logDebug(">>> DirectLoginReference.record");
98 if (this._record == null) { 96 if (this._record == null) {
99 this._record = this.user().records()[this.recordReference()]; 97 this._record = this.user().records()[this.recordReference()];
100 } 98 }
101 99
102//MochiKit.Logging.logDebug("<<< DirectLoginReference.record"); 100//MochiKit.Logging.logDebug("<<< DirectLoginReference.record");
103 return this._record; 101 return this._record;
104 }, 102 },
105 103
106 //------------------------------------------------------------------------- 104 //-------------------------------------------------------------------------
107 105
108 'favicon': function() { 106 'favicon': function() {
109 return this._favicon; 107 return this._favicon;
110 }, 108 },
111 109
112 //------------------------------------------------------------------------- 110 //-------------------------------------------------------------------------
113 111
114 'fixedFavicon': function() { 112 'fixedFavicon': function() {
115 var result; 113 var result;
116 114
117 if (this._fixedFavicon == null) { 115 if (this._fixedFavicon == null) {
118 result = this.favicon(); 116 result = this.favicon();
119 117
120 if (Clipperz_IEisBroken && (this.user().preferences().disableUnsecureFaviconLoadingForIE()) && (result.indexOf('https://') != 0)) { 118 if (Clipperz_IEisBroken && (this.user().preferences().disableUnsecureFaviconLoadingForIE()) && (result.indexOf('https://') != 0)) {
121 result = Clipperz.PM.Strings['defaultFaviconUrl_IE']; 119 result = Clipperz.PM.Strings['defaultFaviconUrl_IE'];
122 this.setFixedFavicon(result); 120 this.setFixedFavicon(result);
123 } 121 }
124 } else { 122 } else {
125 result = this._fixedFavicon; 123 result = this._fixedFavicon;
126 } 124 }
127 125
128 return result; 126 return result;
129 }, 127 },
130 128
131 'setFixedFavicon': function(aValue) { 129 'setFixedFavicon': function(aValue) {
132 this._fixedFavicon = aValue; 130 this._fixedFavicon = aValue;
133 }, 131 },
134 132
135 //------------------------------------------------------------------------- 133 //-------------------------------------------------------------------------
136 134
137 'setupJumpPageWindow': function(aWindow) { 135 'setupJumpPageWindow': function(aWindow) {
138//MochiKit.Logging.logDebug(">>> DirectLoginReference.setupJumpPageWindow - " + aWindow); 136//MochiKit.Logging.logDebug(">>> DirectLoginReference.setupJumpPageWindow - " + aWindow);
139 try { 137 try {
140 MochiKit.DOM.withWindow(aWindow, MochiKit.Base.bind(function() { 138 MochiKit.DOM.withWindow(aWindow, MochiKit.Base.bind(function() {
141 MochiKit.DOM.appendChildNodes(MochiKit.DOM.currentDocument().body, 139 MochiKit.DOM.appendChildNodes(MochiKit.DOM.currentDocument().body,
142 MochiKit.DOM.H1(null, "Loading " + this.label()) 140 MochiKit.DOM.H1(null, "Loading " + this.label())
143 ); 141 );
144 }, this)); 142 }, this));
145 } catch(e) { 143 } catch(e) {
146 MochiKit.Logging.logDebug("EXCEPTION: " + e); 144 MochiKit.Logging.logDebug("EXCEPTION: " + e);
147 } 145 }
148//MochiKit.Logging.logDebug("<<< DirectLoginReference.setupJumpPageWindow"); 146//MochiKit.Logging.logDebug("<<< DirectLoginReference.setupJumpPageWindow");
149 }, 147 },
150 148
151 //------------------------------------------------------------------------- 149 //-------------------------------------------------------------------------
152 150
153 'deferredDirectLogin': function() { 151 'deferredDirectLogin': function() {
154 var deferredResult; 152 var deferredResult;
155 153
156//MochiKit.Logging.logDebug(">>> DirectLoginReference.deferredDirectLogin - " + this); 154//MochiKit.Logging.logDebug(">>> DirectLoginReference.deferredDirectLogin - " + this);
157 deferredResult = new MochiKit.Async.Deferred(); 155 deferredResult = new MochiKit.Async.Deferred();
158//MochiKit.Logging.logDebug("--- DirectLoginReference.deferredDirectLogin - 1"); 156//MochiKit.Logging.logDebug("--- DirectLoginReference.deferredDirectLogin - 1");
159 deferredResult.addCallback(MochiKit.Base.method(this.record(), 'deferredData')); 157 deferredResult.addCallback(MochiKit.Base.method(this.record(), 'deferredData'));
160//MochiKit.Logging.logDebug("--- DirectLoginReference.deferredDirectLogin - 2"); 158//MochiKit.Logging.logDebug("--- DirectLoginReference.deferredDirectLogin - 2");
161 deferredResult.addCallback(function(aRecord, aDirectLoginReference) { 159 deferredResult.addCallback(function(aRecord, aDirectLoginReference) {
162 return aRecord.directLogins()[aDirectLoginReference]; 160 return aRecord.directLogins()[aDirectLoginReference];
163 }, this.record(), this.reference()); 161 }, this.record(), this.reference());
164//MochiKit.Logging.logDebug("--- DirectLoginReference.deferredDirectLogin - 3"); 162//MochiKit.Logging.logDebug("--- DirectLoginReference.deferredDirectLogin - 3");
165 deferredResult.callback(); 163 deferredResult.callback();
166//MochiKit.Logging.logDebug("<<< DirectLoginReference.deferredDirectLogin"); 164//MochiKit.Logging.logDebug("<<< DirectLoginReference.deferredDirectLogin");
167 165
168 return deferredResult; 166 return deferredResult;
169 }, 167 },
170 168
171 //------------------------------------------------------------------------- 169 //-------------------------------------------------------------------------
172 170
173 'handleMissingFaviconImage': function(anEvent) { 171 'handleMissingFaviconImage': function(anEvent) {
174//MochiKit.Logging.logDebug(">>> DirectLoginReference.handleMissingFaviconImage"); 172//MochiKit.Logging.logDebug(">>> DirectLoginReference.handleMissingFaviconImage");
175 anEvent.stop(); 173 anEvent.stop();
176 MochiKit.Signal.disconnectAll(anEvent.src()); 174 MochiKit.Signal.disconnectAll(anEvent.src());
177 this.setFixedFavicon(Clipperz.PM.Strings['defaultFaviconUrl']); 175 this.setFixedFavicon(Clipperz.PM.Strings['defaultFaviconUrl']);
178//MochiKit.Logging.logDebug("--- DirectLoginReference.handleMissingFaviconImage - fixedFavicon: " + this.fixedFavicon()); 176//MochiKit.Logging.logDebug("--- DirectLoginReference.handleMissingFaviconImage - fixedFavicon: " + this.fixedFavicon());
179//MochiKit.Logging.logDebug("--- DirectLoginReference.handleMissingFaviconImage - anEvent.src().src: " + anEvent.src().src); 177//MochiKit.Logging.logDebug("--- DirectLoginReference.handleMissingFaviconImage - anEvent.src().src: " + anEvent.src().src);
180 // MochiKit.DOM.swapDOM(anEvent.src(), MochiKit.DOM.IMG({src:'this.fixedFavicon()'})); 178 // MochiKit.DOM.swapDOM(anEvent.src(), MochiKit.DOM.IMG({src:'this.fixedFavicon()'}));
181 anEvent.src().src = this.fixedFavicon(); 179 anEvent.src().src = this.fixedFavicon();
182//MochiKit.Logging.logDebug("<<< DirectLoginReference.handleMissingFaviconImage"); 180//MochiKit.Logging.logDebug("<<< DirectLoginReference.handleMissingFaviconImage");
183 }, 181 },
184 182
185 //------------------------------------------------------------------------- 183 //-------------------------------------------------------------------------
186 __syntaxFix__: "syntax fix" 184 __syntaxFix__: "syntax fix"
187 185
188}); 186});
189 187
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/Header.js b/frontend/beta/js/Clipperz/PM/DataModel/Header.js
index c780855..908d9f4 100644
--- a/frontend/beta/js/Clipperz/PM/DataModel/Header.js
+++ b/frontend/beta/js/Clipperz/PM/DataModel/Header.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } 26if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
29 27
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.DataModel.Header = function(args) { 31Clipperz.PM.DataModel.Header = function(args) {
34 args = args || {}; 32 args = args || {};
35 33
36 this._user = args.user; 34 this._user = args.user;
37 35
38 this._serverData = null; 36 this._serverData = null;
39 this._serverDataVersion = null; 37 this._serverDataVersion = null;
40 this._jsonEvaledServerData = null; 38 this._jsonEvaledServerData = null;
41 39
42 this._decryptedLegacyServerData = null; 40 this._decryptedLegacyServerData = null;
43 this._isDecryptingLegacyServerData = false; 41 this._isDecryptingLegacyServerData = false;
44 this._decryptingLegacyServerDataPendingQueue = []; 42 this._decryptingLegacyServerDataPendingQueue = [];
45 43
46 this.resetUpdatedSections(); 44 this.resetUpdatedSections();
47 45
48 this._shouldLoadSections = {}; 46 this._shouldLoadSections = {};
49 47
50 Clipperz.NotificationCenter.register(this.user(), 'updatedSection', this, 'updatedSectionHandler'); 48 Clipperz.NotificationCenter.register(this.user(), 'updatedSection', this, 'updatedSectionHandler');
51 49
52 return this; 50 return this;
53} 51}
54 52
55Clipperz.PM.DataModel.Header.prototype = MochiKit.Base.update(null, { 53Clipperz.PM.DataModel.Header.prototype = MochiKit.Base.update(null, {
56 54
57 //------------------------------------------------------------------------- 55 //-------------------------------------------------------------------------
58 56
59 'user': function() { 57 'user': function() {
60 return this._user; 58 return this._user;
61 }, 59 },
62 60
63 //------------------------------------------------------------------------- 61 //-------------------------------------------------------------------------
64 //------------------------------------------------------------------------- 62 //-------------------------------------------------------------------------
65 //------------------------------------------------------------------------- 63 //-------------------------------------------------------------------------
66 //------------------------------------------------------------------------- 64 //-------------------------------------------------------------------------
67 //------------------------------------------------------------------------- 65 //-------------------------------------------------------------------------
68 //------------------------------------------------------------------------- 66 //-------------------------------------------------------------------------
69 //------------------------------------------------------------------------- 67 //-------------------------------------------------------------------------
70 //------------------------------------------------------------------------- 68 //-------------------------------------------------------------------------
71 //------------------------------------------------------------------------- 69 //-------------------------------------------------------------------------
72 70
73 'updatedSections': function() { 71 'updatedSections': function() {
74 return this._updatedSections; 72 return this._updatedSections;
75 }, 73 },
76 74
77 'markSectionAsUpdated': function(aSectionName) { 75 'markSectionAsUpdated': function(aSectionName) {
78 this.updatedSections().push(aSectionName); 76 this.updatedSections().push(aSectionName);
79 }, 77 },
80 78
81 'resetUpdatedSections': function() { 79 'resetUpdatedSections': function() {
82 this._updatedSections = [] 80 this._updatedSections = []
83 }, 81 },
84 82
85 'hasSectionBeenUpdated': function(aSectionName) { 83 'hasSectionBeenUpdated': function(aSectionName) {
86 return (this.updatedSections().join().indexOf(aSectionName) != -1); 84 return (this.updatedSections().join().indexOf(aSectionName) != -1);
87 }, 85 },
88 86
89 'cachedServerDataSection': function(aSectionName) { 87 'cachedServerDataSection': function(aSectionName) {
90 return (this.hasSectionBeenUpdated(aSectionName)) ? {} : this.jsonEvaledServerData()[aSectionName]; 88 return (this.hasSectionBeenUpdated(aSectionName)) ? {} : this.jsonEvaledServerData()[aSectionName];
91 }, 89 },
92 90
93 'updateAllSections': function() { 91 'updateAllSections': function() {
94 this.resetUpdatedSections(); 92 this.resetUpdatedSections();
95 this.markSectionAsUpdated('records'); 93 this.markSectionAsUpdated('records');
96 this.markSectionAsUpdated('directLogins'); 94 this.markSectionAsUpdated('directLogins');
97 this.markSectionAsUpdated('preferences'); 95 this.markSectionAsUpdated('preferences');
98 this.markSectionAsUpdated('oneTimePasswords'); 96 this.markSectionAsUpdated('oneTimePasswords');
99 97
100 return MochiKit.Async.succeed(this); 98 return MochiKit.Async.succeed(this);
101 }, 99 },
102 100
103 'updatedSectionHandler': function(anEvent) { 101 'updatedSectionHandler': function(anEvent) {
104 this.markSectionAsUpdated(anEvent.parameters()); 102 this.markSectionAsUpdated(anEvent.parameters());
105 }, 103 },
106 104
107 //------------------------------------------------------------------------- 105 //-------------------------------------------------------------------------
108 106
109 'getObjectKeyIndex': function(anObject) { 107 'getObjectKeyIndex': function(anObject) {
110 var result; 108 var result;
111 varitemReference; 109 varitemReference;
112 var index; 110 var index;
113 111
114 result = {}; 112 result = {};
115 index = 0; 113 index = 0;
116 114
117 for (itemReference in anObject) { 115 for (itemReference in anObject) {
118 result[itemReference] = index.toString(); 116 result[itemReference] = index.toString();
119 index ++; 117 index ++;
120 } 118 }
121 119
122 return result; 120 return result;
123 }, 121 },
124 122
125 //------------------------------------------------------------------------- 123 //-------------------------------------------------------------------------
126 124
127 'serializedDataWithRecordAndDirectLoginIndexes': function(aRecordIndexes, aDirectLoginIndexs) { 125 'serializedDataWithRecordAndDirectLoginIndexes': function(aRecordIndexes, aDirectLoginIndexs) {
128 var result; 126 var result;
129 var records; 127 var records;
130 var recordReference; 128 var recordReference;
131 129
132//MochiKit.Logging.logDebug(">>> Header.serializedData"); 130//MochiKit.Logging.logDebug(">>> Header.serializedData");
133 result = { 131 result = {
134 'records': {}, 132 'records': {},
135 'directLogins': {} 133 'directLogins': {}
136 }; 134 };
137 135
138 records = this.user().records(); 136 records = this.user().records();
139 for (recordReference in records) { 137 for (recordReference in records) {
140 result['records'][aRecordIndexes[recordReference]] = this.user().records()[recordReference].headerData(); 138 result['records'][aRecordIndexes[recordReference]] = this.user().records()[recordReference].headerData();
141 } 139 }
142 140
143 for (directLoginReference in this.user().directLoginReferences()) { 141 for (directLoginReference in this.user().directLoginReferences()) {
144 var currentDirectLogin; 142 var currentDirectLogin;
145 vardirectLoginData; 143 vardirectLoginData;
146 144
147 currentDirectLogin = this.user().directLoginReferences()[directLoginReference]; 145 currentDirectLogin = this.user().directLoginReferences()[directLoginReference];
148 if (aRecordIndexes[currentDirectLogin.recordReference()] != null) { 146 if (aRecordIndexes[currentDirectLogin.recordReference()] != null) {
149 directLoginData = { 147 directLoginData = {
150 // reference: currentDirectLogin.reference(), 148 // reference: currentDirectLogin.reference(),
151 record: aRecordIndexes[currentDirectLogin.recordReference()].toString(), 149 record: aRecordIndexes[currentDirectLogin.recordReference()].toString(),
152 label: currentDirectLogin.label(), 150 label: currentDirectLogin.label(),
153 favicon:currentDirectLogin.favicon() || "" 151 favicon:currentDirectLogin.favicon() || ""
154 } 152 }
155 153
156 result['directLogins'][aDirectLoginIndexs[directLoginReference]] = directLoginData; 154 result['directLogins'][aDirectLoginIndexs[directLoginReference]] = directLoginData;
157 } 155 }
158 156
159 } 157 }
160//MochiKit.Logging.logDebug("<<< Header.serializedData - result: " + Clipperz.Base.serializeJSON(result)); 158//MochiKit.Logging.logDebug("<<< Header.serializedData - result: " + Clipperz.Base.serializeJSON(result));
161//MochiKit.Logging.logDebug("<<< Header.serializedData"); 159//MochiKit.Logging.logDebug("<<< Header.serializedData");
162 160
163 return result; 161 return result;
164 }, 162 },
165 163
166 //------------------------------------------------------------------------- 164 //-------------------------------------------------------------------------
167 165
168 'encryptedData': function() { 166 'encryptedData': function() {
169 var deferredResult; 167 var deferredResult;
170 var recordIndex; 168 var recordIndex;
171 var directLoginIndex; 169 var directLoginIndex;
172 varserializedData; 170 varserializedData;
173 var result; 171 var result;
174 172
175//MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] Header.encryptedData"); 173//MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] Header.encryptedData");
176//MochiKit.Logging.logDebug("### Header.encryptedData - " + Clipperz.Base.serializeJSON(this.updatedSections())); 174//MochiKit.Logging.logDebug("### Header.encryptedData - " + Clipperz.Base.serializeJSON(this.updatedSections()));
177 result = { 175 result = {
178 'records': this.cachedServerDataSection('records'), 176 'records': this.cachedServerDataSection('records'),
179 'directLogins': this.cachedServerDataSection('directLogins'), 177 'directLogins': this.cachedServerDataSection('directLogins'),
180 'preferences': this.cachedServerDataSection('preferences'), 178 'preferences': this.cachedServerDataSection('preferences'),
181 'oneTimePasswords': this.cachedServerDataSection('oneTimePasswords'), 179 'oneTimePasswords': this.cachedServerDataSection('oneTimePasswords'),
182 'version': '0.1' 180 'version': '0.1'
183 }; 181 };
184 182
185 if (this.hasSectionBeenUpdated('records')) { 183 if (this.hasSectionBeenUpdated('records')) {
186 recordIndex = this.getObjectKeyIndex(this.user().records()); 184 recordIndex = this.getObjectKeyIndex(this.user().records());
187 result['records']['index'] = recordIndex; 185 result['records']['index'] = recordIndex;
188 } else { 186 } else {
189 recordIndex = result['records']['index']; 187 recordIndex = result['records']['index'];
190 } 188 }
191 189
192 if (this.hasSectionBeenUpdated('directLogins')) { 190 if (this.hasSectionBeenUpdated('directLogins')) {
193 directLoginIndex = this.getObjectKeyIndex(this.user().directLoginReferences()); 191 directLoginIndex = this.getObjectKeyIndex(this.user().directLoginReferences());
194 result['directLogins']['index'] = directLoginIndex; 192 result['directLogins']['index'] = directLoginIndex;
195 } else { 193 } else {
196 directLoginIndex = result['directLogins']['index']; 194 directLoginIndex = result['directLogins']['index'];
197 } 195 }
198 196
199 if (this.hasSectionBeenUpdated('records') || this.hasSectionBeenUpdated('directLogins')) { 197 if (this.hasSectionBeenUpdated('records') || this.hasSectionBeenUpdated('directLogins')) {
200 serializedData = this.serializedDataWithRecordAndDirectLoginIndexes(recordIndex, directLoginIndex); 198 serializedData = this.serializedDataWithRecordAndDirectLoginIndexes(recordIndex, directLoginIndex);
201 } 199 }
202 200
203 deferredResult = new MochiKit.Async.Deferred(); 201 deferredResult = new MochiKit.Async.Deferred();
204 202
205//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 1: " + res); return res;}); 203//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 1: " + res); return res;});
206 if (this.hasSectionBeenUpdated('records')) { 204 if (this.hasSectionBeenUpdated('records')) {
207//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 1.1: " + res); return res;}); 205//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 1.1: " + res); return res;});
208 deferredResult.addCallback(function(anHeader, aResult, aSerializedData, aValue) { 206 deferredResult.addCallback(function(anHeader, aResult, aSerializedData, aValue) {
209 return Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion(anHeader.user().passphrase(), aSerializedData['records']); 207 return Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion(anHeader.user().passphrase(), aSerializedData['records']);
210 }, this, result, serializedData); 208 }, this, result, serializedData);
211//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 1.2: " + res); return res;}); 209//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 1.2: " + res); return res;});
212 deferredResult.addCallback(function(anHeader, aResult, aValue) { 210 deferredResult.addCallback(function(anHeader, aResult, aValue) {
213 aResult['records']['data'] = aValue; 211 aResult['records']['data'] = aValue;
214 }, this, result); 212 }, this, result);
215//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 1.3: " + res); return res;}); 213//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 1.3: " + res); return res;});
216 } 214 }
217 215
218//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 2: " + res); return res;}); 216//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 2: " + res); return res;});
219 if (this.hasSectionBeenUpdated('directLogins')) { 217 if (this.hasSectionBeenUpdated('directLogins')) {
220//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 2.1: " + res); return res;}); 218//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 2.1: " + res); return res;});
221 deferredResult.addCallback(function(anHeader, aResult, aSerializedData, aValue) { 219 deferredResult.addCallback(function(anHeader, aResult, aSerializedData, aValue) {
222 return Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion(anHeader.user().passphrase(), aSerializedData['directLogins']); 220 return Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion(anHeader.user().passphrase(), aSerializedData['directLogins']);
223 }, this, result, serializedData); 221 }, this, result, serializedData);
224//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 2.2: " + res); return res;}); 222//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 2.2: " + res); return res;});
225 deferredResult.addCallback(function(anHeader, aResult, aValue) { 223 deferredResult.addCallback(function(anHeader, aResult, aValue) {
226 aResult['directLogins']['data'] = aValue; 224 aResult['directLogins']['data'] = aValue;
227 }, this, result); 225 }, this, result);
228//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 2.3: " + res); return res;}); 226//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 2.3: " + res); return res;});
229 } 227 }
230 228
231//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 3: " + res); return res;}); 229//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 3: " + res); return res;});
232 if (this.hasSectionBeenUpdated('preferences')) { 230 if (this.hasSectionBeenUpdated('preferences')) {
233//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 3.1: " + res); return res;}); 231//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 3.1: " + res); return res;});
234 deferredResult.addCallback(function(anHeader, aResult, aValue) { 232 deferredResult.addCallback(function(anHeader, aResult, aValue) {
235 return Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion(anHeader.user().passphrase(), anHeader.user().preferences().serializedData()); 233 return Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion(anHeader.user().passphrase(), anHeader.user().preferences().serializedData());
236 }, this, result); 234 }, this, result);
237//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 3.2: " + res); return res;}); 235//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 3.2: " + res); return res;});
238 deferredResult.addCallback(function(anHeader, aResult, aValue) { 236 deferredResult.addCallback(function(anHeader, aResult, aValue) {
239 aResult['preferences']['data'] = aValue; 237 aResult['preferences']['data'] = aValue;
240 }, this, result); 238 }, this, result);
241//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 3.3: " + res); return res;}); 239//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 3.3: " + res); return res;});
242 } 240 }
243 241
244//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 4: " + res); return res;}); 242//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 4: " + res); return res;});
245 if (this.hasSectionBeenUpdated('oneTimePasswords')) { 243 if (this.hasSectionBeenUpdated('oneTimePasswords')) {
246//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 4.1: " + res); return res;}); 244//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 4.1: " + res); return res;});
247 // deferredResult.addCallback(MochiKit.Base.method(this, 'loadOneTimePasswords')); 245 // deferredResult.addCallback(MochiKit.Base.method(this, 'loadOneTimePasswords'));
248//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 4.2: " + res); return res;}); 246//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 4.2: " + res); return res;});
249 deferredResult.addCallback(function(anHeader, aResult, aValue) { 247 deferredResult.addCallback(function(anHeader, aResult, aValue) {
250 return Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion(anHeader.user().passphrase(), anHeader.user().oneTimePasswordManager().serializedData()); 248 return Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion(anHeader.user().passphrase(), anHeader.user().oneTimePasswordManager().serializedData());
251 }, this, result); 249 }, this, result);
252//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 4.3: " + res); return res;}); 250//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 4.3: " + res); return res;});
253 deferredResult.addCallback(function(anHeader, aResult, aValue) { 251 deferredResult.addCallback(function(anHeader, aResult, aValue) {
254 aResult['oneTimePasswords']['data'] = aValue; 252 aResult['oneTimePasswords']['data'] = aValue;
255 }, this, result); 253 }, this, result);
256//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 4.4: " + res); return res;}); 254//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 4.4: " + res); return res;});
257 } 255 }
258 256
259//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 5: " + res); return res;}); 257//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 5: " + res); return res;});
260 deferredResult.addCallback(function(anHeader, aResult, aValue) { 258 deferredResult.addCallback(function(anHeader, aResult, aValue) {
261 var serverData; 259 var serverData;
262 260
263 serverData = Clipperz.Base.serializeJSON(aResult); 261 serverData = Clipperz.Base.serializeJSON(aResult);
264 anHeader.setServerData(serverData); 262 anHeader.setServerData(serverData);
265 263
266 return serverData; 264 return serverData;
267 }, this, result); 265 }, this, result);
268//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 6: " + res); return res;}); 266//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.encryptedData - 6: " + res); return res;});
269 267
270 deferredResult.callback(); 268 deferredResult.callback();
271//MochiKit.Logging.logDebug("<<< [" + (new Date()).valueOf() + "] Header.encryptedData"); 269//MochiKit.Logging.logDebug("<<< [" + (new Date()).valueOf() + "] Header.encryptedData");
272 270
273 return deferredResult; 271 return deferredResult;
274 }, 272 },
275 273
276 //------------------------------------------------------------------------- 274 //-------------------------------------------------------------------------
277 275
278 'serverData': function() { 276 'serverData': function() {
279 return this._serverData; 277 return this._serverData;
280 }, 278 },
281 279
282 'setServerData': function(aValue) { 280 'setServerData': function(aValue) {
283//MochiKit.Logging.logDebug(">>> Header.setServerData"); 281//MochiKit.Logging.logDebug(">>> Header.setServerData");
284//MochiKit.Logging.logDebug("[start]============================================="); 282//MochiKit.Logging.logDebug("[start]=============================================");
285//MochiKit.Logging.logDebug("SERVER_DATA: " + aValue); 283//MochiKit.Logging.logDebug("SERVER_DATA: " + aValue);
286//MochiKit.Logging.logDebug("[end]==============================================="); 284//MochiKit.Logging.logDebug("[end]===============================================");
287 this._serverData = aValue; 285 this._serverData = aValue;
288//MochiKit.Logging.logDebug("--- Header.setServerData - 1"); 286//MochiKit.Logging.logDebug("--- Header.setServerData - 1");
289 this.resetUpdatedSections(); 287 this.resetUpdatedSections();
290//MochiKit.Logging.logDebug("--- Header.setServerData - 2"); 288//MochiKit.Logging.logDebug("--- Header.setServerData - 2");
291 this.resetJsonEvaledServerData(); 289 this.resetJsonEvaledServerData();
292//MochiKit.Logging.logDebug("<<< Header.setServerData"); 290//MochiKit.Logging.logDebug("<<< Header.setServerData");
293 }, 291 },
294 292
295 'jsonEvaledServerData': function() { 293 'jsonEvaledServerData': function() {
296 if (this._jsonEvaledServerData == null) { 294 if (this._jsonEvaledServerData == null) {
297 this._jsonEvaledServerData = Clipperz.Base.evalJSON(this.serverData()); 295 this._jsonEvaledServerData = Clipperz.Base.evalJSON(this.serverData());
298 } 296 }
299 297
300 return this._jsonEvaledServerData; 298 return this._jsonEvaledServerData;
301 }, 299 },
302 300
303 'resetJsonEvaledServerData': function() { 301 'resetJsonEvaledServerData': function() {
304 this._jsonEvaledServerData = null; 302 this._jsonEvaledServerData = null;
305 }, 303 },
306 304
307 //------------------------------------------------------------------------- 305 //-------------------------------------------------------------------------
308 306
309 'serverDataVersion': function() { 307 'serverDataVersion': function() {
310 return this._serverDataVersion; 308 return this._serverDataVersion;
311 }, 309 },
312 310
313 'setServerDataVersion': function(aValue) { 311 'setServerDataVersion': function(aValue) {
314 this._serverDataVersion = aValue; 312 this._serverDataVersion = aValue;
315 }, 313 },
316 314
317 //------------------------------------------------------------------------- 315 //-------------------------------------------------------------------------
318 316
319 'decryptedLegacyServerData': function() { 317 'decryptedLegacyServerData': function() {
320 var deferredResult; 318 var deferredResult;
321 319
322//MochiKit.Logging.logDebug(">>> Header.decryptedLegacyServerData"); 320//MochiKit.Logging.logDebug(">>> Header.decryptedLegacyServerData");
323 deferredResult = new MochiKit.Async.Deferred(); 321 deferredResult = new MochiKit.Async.Deferred();
324//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 1: "/* + res*/); return res;}); 322//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 1: "/* + res*/); return res;});
325//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 323//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
326 deferredResult.addCallback(MochiKit.Base.method(this, 'updateAllSections')); 324 deferredResult.addCallback(MochiKit.Base.method(this, 'updateAllSections'));
327//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 2: "/* + res*/); return res;}); 325//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 2: "/* + res*/); return res;});
328//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 326//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
329 if (this._decryptedLegacyServerData == null) { 327 if (this._decryptedLegacyServerData == null) {
330//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 3: "/* + res*/); return res;}); 328//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 3: "/* + res*/); return res;});
331//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 329//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
332 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'connection_decryptingUserData'); 330 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'connection_decryptingUserData');
333//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 4: "/* + res*/); return res;}); 331//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 4: "/* + res*/); return res;});
334//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 332//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
335 deferredResult.addCallback(Clipperz.PM.Crypto.deferredDecrypt, this.user().passphrase(), this.serverData(), this.serverDataVersion()); 333 deferredResult.addCallback(Clipperz.PM.Crypto.deferredDecrypt, this.user().passphrase(), this.serverData(), this.serverDataVersion());
336//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 5: "/* + res*/); return res;}); 334//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 5: "/* + res*/); return res;});
337//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 335//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
338 deferredResult.addCallback(function(anHeader, aValue) { 336 deferredResult.addCallback(function(anHeader, aValue) {
339 anHeader._decryptedLegacyServerData = aValue; 337 anHeader._decryptedLegacyServerData = aValue;
340 }, this); 338 }, this);
341//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 6: "/* + res*/); return res;}); 339//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 6: "/* + res*/); return res;});
342//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 340//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
343 }; 341 };
344//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 7: "/* + res*/); return res;}); 342//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 7: "/* + res*/); return res;});
345//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 343//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
346 344
347 deferredResult.addCallback(function(anHeader) { 345 deferredResult.addCallback(function(anHeader) {
348 return anHeader._decryptedLegacyServerData; 346 return anHeader._decryptedLegacyServerData;
349 }, this); 347 }, this);
350//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 8: "/* + res*/); return res;}); 348//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.decryptedLegacyServerData 8: "/* + res*/); return res;});
351//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 349//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
352 deferredResult.callback(); 350 deferredResult.callback();
353//MochiKit.Logging.logDebug("<<< Header.decryptedLegacyServerData"); 351//MochiKit.Logging.logDebug("<<< Header.decryptedLegacyServerData");
354 352
355 return deferredResult; 353 return deferredResult;
356 }, 354 },
357 355
358 //------------------------------------------------------------------------- 356 //-------------------------------------------------------------------------
359 357
360 'serverDataFormat': function() { 358 'serverDataFormat': function() {
361 var result; 359 var result;
362 360
363//MochiKit.Logging.logDebug(">>> Header.serverDataFormat"); 361//MochiKit.Logging.logDebug(">>> Header.serverDataFormat");
364 if (this.serverData().charAt(0) == '{') { 362 if (this.serverData().charAt(0) == '{') {
365 varserverData; 363 varserverData;
366 364
367 serverData = Clipperz.Base.evalJSON(this.serverData()); 365 serverData = Clipperz.Base.evalJSON(this.serverData());
368 result = serverData['version']; 366 result = serverData['version'];
369 } else { 367 } else {
370 result = 'LEGACY'; 368 result = 'LEGACY';
371 } 369 }
372//MochiKit.Logging.logDebug("<<< Header.serverDataFormat"); 370//MochiKit.Logging.logDebug("<<< Header.serverDataFormat");
373 371
374 return result; 372 return result;
375 }, 373 },
376 374
377 //------------------------------------------------------------------------- 375 //-------------------------------------------------------------------------
378 376
379 'extractHeaderDataFromUserDetails': function(someUserDetails) { 377 'extractHeaderDataFromUserDetails': function(someUserDetails) {
380 if (this.serverData() == null) { 378 if (this.serverData() == null) {
381 this.setServerData(someUserDetails['header']); 379 this.setServerData(someUserDetails['header']);
382 this.setServerDataVersion(someUserDetails['version']) 380 this.setServerDataVersion(someUserDetails['version'])
383 } 381 }
384 }, 382 },
385 383
386 //------------------------------------------------------------------------- 384 //-------------------------------------------------------------------------
387 385
388 'extractDataWithKey': function(aKey) { 386 'extractDataWithKey': function(aKey) {
389 var deferredResult; 387 var deferredResult;
390 388
391//MochiKit.Logging.logDebug(">>> Header.extractDataWithKey"); 389//MochiKit.Logging.logDebug(">>> Header.extractDataWithKey");
392 deferredResult = new MochiKit.Async.Deferred(); 390 deferredResult = new MochiKit.Async.Deferred();
393 391
394 switch (this.serverDataFormat()) { 392 switch (this.serverDataFormat()) {
395 case 'LEGACY': 393 case 'LEGACY':
396//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.extractDataWithKey 1: "/* + res*/); return res;}); 394//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.extractDataWithKey 1: "/* + res*/); return res;});
397//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 395//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
398 deferredResult.addCallback(MochiKit.Base.method(this, 'decryptedLegacyServerData')); 396 deferredResult.addCallback(MochiKit.Base.method(this, 'decryptedLegacyServerData'));
399//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.extractDataWithKey 2: "/* + res*/); return res;}); 397//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.extractDataWithKey 2: "/* + res*/); return res;});
400//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 398//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
401 deferredResult.addCallback(function(someDecryptedValues) { 399 deferredResult.addCallback(function(someDecryptedValues) {
402 return someDecryptedValues[aKey] || {}; 400 return someDecryptedValues[aKey] || {};
403 }) 401 })
404//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.extractDataWithKey 3: "/* + res*/); return res;}); 402//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.extractDataWithKey 3: "/* + res*/); return res;});
405//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 403//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
406 break; 404 break;
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/OneTimePassword.js b/frontend/beta/js/Clipperz/PM/DataModel/OneTimePassword.js
index 88f383a..3f611b4 100644
--- a/frontend/beta/js/Clipperz/PM/DataModel/OneTimePassword.js
+++ b/frontend/beta/js/Clipperz/PM/DataModel/OneTimePassword.js
@@ -1,330 +1,328 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } 26if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
29 27
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.DataModel.OneTimePassword = function(args) { 31Clipperz.PM.DataModel.OneTimePassword = function(args) {
34 args = args || {}; 32 args = args || {};
35 33
36//console.log("new OneTimePassword", args); 34//console.log("new OneTimePassword", args);
37//MochiKit.Logging.logDebug("---"); 35//MochiKit.Logging.logDebug("---");
38 this._user = args['user']; 36 this._user = args['user'];
39 this._password = args['password']; 37 this._password = args['password'];
40 this._passwordValue = Clipperz.PM.DataModel.OneTimePassword.normalizedOneTimePassword(args['password']); 38 this._passwordValue = Clipperz.PM.DataModel.OneTimePassword.normalizedOneTimePassword(args['password']);
41 this._reference = args['reference'] || Clipperz.PM.Crypto.randomKey(); 39 this._reference = args['reference'] || Clipperz.PM.Crypto.randomKey();
42 this._creationDate = args['created'] ? Clipperz.PM.Date.parseDateWithUTCFormat(args['created']) : new Date(); 40 this._creationDate = args['created'] ? Clipperz.PM.Date.parseDateWithUTCFormat(args['created']) : new Date();
43 this._usageDate = args['used'] ? Clipperz.PM.Date.parseDateWithUTCFormat(args['used']) : null; 41 this._usageDate = args['used'] ? Clipperz.PM.Date.parseDateWithUTCFormat(args['used']) : null;
44 42
45 this._status = args['status'] || 'ACTIVE'; 43 this._status = args['status'] || 'ACTIVE';
46 this._connectionInfo = null; 44 this._connectionInfo = null;
47 45
48 this._key = null; 46 this._key = null;
49 this._keyChecksum = null; 47 this._keyChecksum = null;
50 48
51 return this; 49 return this;
52} 50}
53 51
54Clipperz.PM.DataModel.OneTimePassword.prototype = MochiKit.Base.update(null, { 52Clipperz.PM.DataModel.OneTimePassword.prototype = MochiKit.Base.update(null, {
55 53
56 'toString': function() { 54 'toString': function() {
57 return "Clipperz.PM.DataModel.OneTimePassword"; 55 return "Clipperz.PM.DataModel.OneTimePassword";
58 }, 56 },
59 57
60 //------------------------------------------------------------------------- 58 //-------------------------------------------------------------------------
61 59
62 'user': function() { 60 'user': function() {
63 return this._user; 61 return this._user;
64 }, 62 },
65 63
66 //------------------------------------------------------------------------- 64 //-------------------------------------------------------------------------
67 65
68 'password': function() { 66 'password': function() {
69 return this._password; 67 return this._password;
70 }, 68 },
71 69
72 //------------------------------------------------------------------------- 70 //-------------------------------------------------------------------------
73 71
74 'passwordValue': function() { 72 'passwordValue': function() {
75 return this._passwordValue; 73 return this._passwordValue;
76 }, 74 },
77 75
78 //------------------------------------------------------------------------- 76 //-------------------------------------------------------------------------
79 77
80 'creationDate': function() { 78 'creationDate': function() {
81 return this._creationDate; 79 return this._creationDate;
82 }, 80 },
83 81
84 //------------------------------------------------------------------------- 82 //-------------------------------------------------------------------------
85 83
86 'reference': function() { 84 'reference': function() {
87 return this._reference; 85 return this._reference;
88 }, 86 },
89 87
90 //------------------------------------------------------------------------- 88 //-------------------------------------------------------------------------
91 89
92 'key': function() { 90 'key': function() {
93 if (this._key == null) { 91 if (this._key == null) {
94 this._key = Clipperz.PM.DataModel.OneTimePassword.computeKeyWithUsernameAndPassword(this.user().username(), this.passwordValue()); 92 this._key = Clipperz.PM.DataModel.OneTimePassword.computeKeyWithUsernameAndPassword(this.user().username(), this.passwordValue());
95 } 93 }
96 94
97 return this._key; 95 return this._key;
98 }, 96 },
99 97
100 //------------------------------------------------------------------------- 98 //-------------------------------------------------------------------------
101 99
102 'keyChecksum': function() { 100 'keyChecksum': function() {
103 if (this._keyChecksum == null) { 101 if (this._keyChecksum == null) {
104 this._keyChecksum = Clipperz.PM.DataModel.OneTimePassword.computeKeyChecksumWithUsernameAndPassword(this.user().username(), this.passwordValue()); 102 this._keyChecksum = Clipperz.PM.DataModel.OneTimePassword.computeKeyChecksumWithUsernameAndPassword(this.user().username(), this.passwordValue());
105 } 103 }
106 104
107 return this._keyChecksum; 105 return this._keyChecksum;
108 }, 106 },
109 107
110 //------------------------------------------------------------------------- 108 //-------------------------------------------------------------------------
111 109
112 'status': function() { 110 'status': function() {
113 return this._status; 111 return this._status;
114 }, 112 },
115 113
116 'setStatus': function(aValue) { 114 'setStatus': function(aValue) {
117 this._status = aValue; 115 this._status = aValue;
118 }, 116 },
119 117
120 //------------------------------------------------------------------------- 118 //-------------------------------------------------------------------------
121 119
122 'serializedData': function() { 120 'serializedData': function() {
123 var result; 121 var result;
124 122
125 result = { 123 result = {
126 'password': this.password(), 124 'password': this.password(),
127 'created': this.creationDate() ? Clipperz.PM.Date.formatDateWithUTCFormat(this.creationDate()) : null, 125 'created': this.creationDate() ? Clipperz.PM.Date.formatDateWithUTCFormat(this.creationDate()) : null,
128 'used': this.usageDate() ? Clipperz.PM.Date.formatDateWithUTCFormat(this.usageDate()) : null, 126 'used': this.usageDate() ? Clipperz.PM.Date.formatDateWithUTCFormat(this.usageDate()) : null,
129 'status': this.status() 127 'status': this.status()
130 }; 128 };
131 129
132 return result; 130 return result;
133 }, 131 },
134 132
135 //------------------------------------------------------------------------- 133 //-------------------------------------------------------------------------
136 134
137 'packedPassphrase': function() { 135 'packedPassphrase': function() {
138 var result; 136 var result;
139 var packedPassphrase; 137 var packedPassphrase;
140 var encodedPassphrase; 138 var encodedPassphrase;
141 varprefixPadding; 139 varprefixPadding;
142 var suffixPadding; 140 var suffixPadding;
143 var getRandomBytes; 141 var getRandomBytes;
144 142
145 getRandomBytes = MochiKit.Base.method(Clipperz.Crypto.PRNG.defaultRandomGenerator(), 'getRandomBytes'); 143 getRandomBytes = MochiKit.Base.method(Clipperz.Crypto.PRNG.defaultRandomGenerator(), 'getRandomBytes');
146 144
147 encodedPassphrase = new Clipperz.ByteArray(this.user().passphrase()).toBase64String(); 145 encodedPassphrase = new Clipperz.ByteArray(this.user().passphrase()).toBase64String();
148//MochiKit.Logging.logDebug("--- encodedPassphrase.length: " + encodedPassphrase.length); 146//MochiKit.Logging.logDebug("--- encodedPassphrase.length: " + encodedPassphrase.length);
149 prefixPadding = getRandomBytes(getRandomBytes(1).byteAtIndex(0)).toBase64String(); 147 prefixPadding = getRandomBytes(getRandomBytes(1).byteAtIndex(0)).toBase64String();
150//MochiKit.Logging.logDebug("--- prefixPadding.length: " + prefixPadding.length); 148//MochiKit.Logging.logDebug("--- prefixPadding.length: " + prefixPadding.length);
151 suffixPadding = getRandomBytes((500 - prefixPadding.length - encodedPassphrase.length) * 6 / 8).toBase64String(); 149 suffixPadding = getRandomBytes((500 - prefixPadding.length - encodedPassphrase.length) * 6 / 8).toBase64String();
152//MochiKit.Logging.logDebug("--- suffixPadding.length: " + suffixPadding.length); 150//MochiKit.Logging.logDebug("--- suffixPadding.length: " + suffixPadding.length);
153//MochiKit.Logging.logDebug("--- total.length: " + (prefixPadding.length + encodedPassphrase.length + suffixPadding.length)); 151//MochiKit.Logging.logDebug("--- total.length: " + (prefixPadding.length + encodedPassphrase.length + suffixPadding.length));
154 152
155 packedPassphrase = { 153 packedPassphrase = {
156 'prefix': prefixPadding, 154 'prefix': prefixPadding,
157 'passphrase': encodedPassphrase, 155 'passphrase': encodedPassphrase,
158 'suffix': suffixPadding 156 'suffix': suffixPadding
159 }; 157 };
160 158
161 // result = Clipperz.Base.serializeJSON(packedPassphrase); 159 // result = Clipperz.Base.serializeJSON(packedPassphrase);
162 result = packedPassphrase; 160 result = packedPassphrase;
163//MochiKit.Logging.logDebug("===== OTP packedPassprase: [" + result.length + "]" + result); 161//MochiKit.Logging.logDebug("===== OTP packedPassprase: [" + result.length + "]" + result);
164//MochiKit.Logging.logDebug("<<< OneTimePassword.packedPassphrase"); 162//MochiKit.Logging.logDebug("<<< OneTimePassword.packedPassphrase");
165 163
166 return result; 164 return result;
167 }, 165 },
168 166
169 //------------------------------------------------------------------------- 167 //-------------------------------------------------------------------------
170 168
171 'encryptedPackedPassphrase': function() { 169 'encryptedPackedPassphrase': function() {
172 return Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion(this.passwordValue(), this.packedPassphrase()) 170 return Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion(this.passwordValue(), this.packedPassphrase())
173 }, 171 },
174 172
175 //------------------------------------------------------------------------- 173 //-------------------------------------------------------------------------
176 174
177 'encryptedData': function() { 175 'encryptedData': function() {
178 var deferredResult; 176 var deferredResult;
179 varresult; 177 varresult;
180 178
181//MochiKit.Logging.logDebug(">>> OneTimePassword.encryptedData"); 179//MochiKit.Logging.logDebug(">>> OneTimePassword.encryptedData");
182//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - id: " + this.reference()); 180//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - id: " + this.reference());
183 result = { 181 result = {
184 'reference': this.reference(), 182 'reference': this.reference(),
185 'key': this.key(), 183 'key': this.key(),
186 'keyChecksum': this.keyChecksum(), 184 'keyChecksum': this.keyChecksum(),
187 'data': "", 185 'data': "",
188 'version': Clipperz.PM.Crypto.encryptingFunctions.currentVersion 186 'version': Clipperz.PM.Crypto.encryptingFunctions.currentVersion
189 } 187 }
190//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 2: " + Clipperz.Base.serializeJSON(result)); 188//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 2: " + Clipperz.Base.serializeJSON(result));
191 deferredResult = new MochiKit.Async.Deferred(); 189 deferredResult = new MochiKit.Async.Deferred();
192//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 3"); 190//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 3");
193//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.encryptedData - 1: " + res); return res;}); 191//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.encryptedData - 1: " + res); return res;});
194 //# deferredResult.addCallback(Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion, this.passwordValue(), this.packedPassphrase()); 192 //# deferredResult.addCallback(Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion, this.passwordValue(), this.packedPassphrase());
195 deferredResult.addCallback(MochiKit.Base.method(this, 'encryptedPackedPassphrase')); 193 deferredResult.addCallback(MochiKit.Base.method(this, 'encryptedPackedPassphrase'));
196//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 4"); 194//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 4");
197//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.encryptedData - 2: [" + res.length + "]" + res); return res;}); 195//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.encryptedData - 2: [" + res.length + "]" + res); return res;});
198 deferredResult.addCallback(function(aResult, res) { 196 deferredResult.addCallback(function(aResult, res) {
199 aResult['data'] = res; 197 aResult['data'] = res;
200 return aResult; 198 return aResult;
201 }, result); 199 }, result);
202//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 5"); 200//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 5");
203//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.encryptedData - 3: " + Clipperz.Base.serializeJSON(res)); return res;}); 201//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.encryptedData - 3: " + Clipperz.Base.serializeJSON(res)); return res;});
204 deferredResult.callback(); 202 deferredResult.callback();
205//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 6"); 203//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 6");
206 204
207 return deferredResult; 205 return deferredResult;
208 }, 206 },
209 207
210 //------------------------------------------------------------------------- 208 //-------------------------------------------------------------------------
211 209
212 'saveChanges': function() { 210 'saveChanges': function() {
213 var deferredResult; 211 var deferredResult;
214 varresult; 212 varresult;
215 213
216//MochiKit.Logging.logDebug(">>> OneTimePassword.saveChanges"); 214//MochiKit.Logging.logDebug(">>> OneTimePassword.saveChanges");
217 result = {}; 215 result = {};
218 deferredResult = new MochiKit.Async.Deferred(); 216 deferredResult = new MochiKit.Async.Deferred();
219 217
220 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_encryptUserData'); 218 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_encryptUserData');
221 deferredResult.addCallback(MochiKit.Base.method(this.user(), 'encryptedData')); 219 deferredResult.addCallback(MochiKit.Base.method(this.user(), 'encryptedData'));
222 deferredResult.addCallback(function(aResult, res) { 220 deferredResult.addCallback(function(aResult, res) {
223 aResult['user'] = res; 221 aResult['user'] = res;
224 return aResult; 222 return aResult;
225 }, result); 223 }, result);
226 224
227 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_encryptOTPData'); 225 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_encryptOTPData');
228 deferredResult.addCallback(MochiKit.Base.method(this, 'encryptedData')); 226 deferredResult.addCallback(MochiKit.Base.method(this, 'encryptedData'));
229 deferredResult.addCallback(function(aResult, res) { 227 deferredResult.addCallback(function(aResult, res) {
230 aResult['oneTimePassword'] = res; 228 aResult['oneTimePassword'] = res;
231 return aResult; 229 return aResult;
232 }, result); 230 }, result);
233 231
234 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_sendingData'); 232 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_sendingData');
235//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.saveChanges - 1: " + Clipperz.Base.serializeJSON(res)); return res;}); 233//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.saveChanges - 1: " + Clipperz.Base.serializeJSON(res)); return res;});
236 deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'addNewOneTimePassword'); 234 deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'addNewOneTimePassword');
237 235
238 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_updatingInterface'); 236 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_updatingInterface');
239//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.saveChanges - 2: " + res); return res;}); 237//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.saveChanges - 2: " + res); return res;});
240 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'notify', 'OTPUpdated'); 238 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'notify', 'OTPUpdated');
241 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'oneTimePassword_saveChanges_done', null); 239 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'oneTimePassword_saveChanges_done', null);
242//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.saveChanges - 2: " + res); return res;}); 240//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.saveChanges - 2: " + res); return res;});
243 deferredResult.callback(); 241 deferredResult.callback();
244//MochiKit.Logging.logDebug("<<< OneTimePassword.saveChanges"); 242//MochiKit.Logging.logDebug("<<< OneTimePassword.saveChanges");
245 243
246 return deferredResult; 244 return deferredResult;
247 }, 245 },
248 246
249 //------------------------------------------------------------------------- 247 //-------------------------------------------------------------------------
250 248
251 'usageDate': function() { 249 'usageDate': function() {
252 return this._usageDate; 250 return this._usageDate;
253 }, 251 },
254 252
255 'setUsageDate': function(aValue) { 253 'setUsageDate': function(aValue) {
256 this._usageDate = aValue; 254 this._usageDate = aValue;
257 }, 255 },
258 256
259 //------------------------------------------------------------------------- 257 //-------------------------------------------------------------------------
260 258
261 'connectionInfo': function() { 259 'connectionInfo': function() {
262 return this._connectionInfo; 260 return this._connectionInfo;
263 }, 261 },
264 262
265 'setConnectionInfo': function(aValue) { 263 'setConnectionInfo': function(aValue) {
266 this._connectionInfo = aValue; 264 this._connectionInfo = aValue;
267 }, 265 },
268 266
269 //------------------------------------------------------------------------- 267 //-------------------------------------------------------------------------
270 268
271 'isExpired': function() { 269 'isExpired': function() {
272 return (this.usageDate() != null); 270 return (this.usageDate() != null);
273 }, 271 },
274 272
275 //------------------------------------------------------------------------- 273 //-------------------------------------------------------------------------
276 274
277 'updateStatusWithValues': function(someValues) { 275 'updateStatusWithValues': function(someValues) {
278 var result; 276 var result;
279 277
280 result = false; 278 result = false;
281 279
282 if (someValues['status'] != this.status()) { 280 if (someValues['status'] != this.status()) {
283 result = true; 281 result = true;
284 } 282 }
285 283
286 this.setStatus(someValues['status']); 284 this.setStatus(someValues['status']);
287 this.setUsageDate(Clipperz.PM.Date.parseDateWithUTCFormat(someValues['requestDate'])); 285 this.setUsageDate(Clipperz.PM.Date.parseDateWithUTCFormat(someValues['requestDate']));
288 this.setConnectionInfo(someValues['connection']); 286 this.setConnectionInfo(someValues['connection']);
289 287
290 return result; 288 return result;
291 }, 289 },
292 290
293 //------------------------------------------------------------------------- 291 //-------------------------------------------------------------------------
294 __syntaxFix__: "syntax fix" 292 __syntaxFix__: "syntax fix"
295}); 293});
296 294
297//============================================================================= 295//=============================================================================
298 296
299Clipperz.PM.DataModel.OneTimePassword.computeKeyWithUsernameAndPassword = function(anUsername, aPassword) { 297Clipperz.PM.DataModel.OneTimePassword.computeKeyWithUsernameAndPassword = function(anUsername, aPassword) {
300 return Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aPassword)).toHexString().substring(2); 298 return Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(aPassword)).toHexString().substring(2);
301} 299}
302 300
303Clipperz.PM.DataModel.OneTimePassword.computeKeyChecksumWithUsernameAndPassword = function(anUsername, aPassword) { 301Clipperz.PM.DataModel.OneTimePassword.computeKeyChecksumWithUsernameAndPassword = function(anUsername, aPassword) {
304 return Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(anUsername + aPassword)).toHexString().substring(2); 302 return Clipperz.Crypto.SHA.sha_d256(new Clipperz.ByteArray(anUsername + aPassword)).toHexString().substring(2);
305} 303}
306 304
307//============================================================================= 305//=============================================================================
308 306
309Clipperz.PM.DataModel.OneTimePassword.normalizedOneTimePassword = function(aPassword) { 307Clipperz.PM.DataModel.OneTimePassword.normalizedOneTimePassword = function(aPassword) {
310 varresult; 308 varresult;
311 309
312 if (aPassword.replace(/[\s\-]/g, '').length == 32) { 310 if (aPassword.replace(/[\s\-]/g, '').length == 32) {
313 try { 311 try {
314 var passwordByteArray; 312 var passwordByteArray;
315 313
316 passwordByteArray = new Clipperz.ByteArray(); 314 passwordByteArray = new Clipperz.ByteArray();
317 passwordByteArray.appendBase32String(aPassword); 315 passwordByteArray.appendBase32String(aPassword);
318 316
319 result = passwordByteArray.toBase64String(); 317 result = passwordByteArray.toBase64String();
320 } catch(exception) { 318 } catch(exception) {
321 result = aPassword; 319 result = aPassword;
322 } 320 }
323 } else { 321 } else {
324 result = aPassword; 322 result = aPassword;
325 } 323 }
326 324
327 return result; 325 return result;
328} 326}
329 327
330//============================================================================= 328//=============================================================================
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/OneTimePasswordManager.js b/frontend/beta/js/Clipperz/PM/DataModel/OneTimePasswordManager.js
index aa40aba..1ebb615 100644
--- a/frontend/beta/js/Clipperz/PM/DataModel/OneTimePasswordManager.js
+++ b/frontend/beta/js/Clipperz/PM/DataModel/OneTimePasswordManager.js
@@ -1,277 +1,275 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } 26if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
29 27
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.DataModel.OneTimePasswordManager = function(anUser, args) { 31Clipperz.PM.DataModel.OneTimePasswordManager = function(anUser, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 this._user = anUser; 34 this._user = anUser;
37 this._oneTimePasswords = {}; 35 this._oneTimePasswords = {};
38 36
39 this.updateWithData(args); 37 this.updateWithData(args);
40 38
41 Clipperz.NotificationCenter.notify(null, 'oneTimePasswordAdded', null, true); 39 Clipperz.NotificationCenter.notify(null, 'oneTimePasswordAdded', null, true);
42 40
43 return this; 41 return this;
44} 42}
45 43
46Clipperz.PM.DataModel.OneTimePasswordManager.prototype = MochiKit.Base.update(null, { 44Clipperz.PM.DataModel.OneTimePasswordManager.prototype = MochiKit.Base.update(null, {
47 45
48 'toString': function() { 46 'toString': function() {
49 return "Clipperz.PM.DataModel.OneTimePasswordManager"; 47 return "Clipperz.PM.DataModel.OneTimePasswordManager";
50 }, 48 },
51 49
52 //------------------------------------------------------------------------- 50 //-------------------------------------------------------------------------
53 51
54 'updateWithData': function(someValues) { 52 'updateWithData': function(someValues) {
55 varotpReference; 53 varotpReference;
56 54
57//console.log("OneTimePasswordManager.updateWithData", someValues); 55//console.log("OneTimePasswordManager.updateWithData", someValues);
58//MochiKit.Logging.logDebug("OneTimePasswordManager.updateWithData: " + Clipperz.Base.serializeJSON(someValues)); 56//MochiKit.Logging.logDebug("OneTimePasswordManager.updateWithData: " + Clipperz.Base.serializeJSON(someValues));
59 for (otpReference in someValues) { 57 for (otpReference in someValues) {
60 var otp; 58 var otp;
61 var otpConfiguration; 59 var otpConfiguration;
62 60
63 otpConfiguration = someValues[otpReference]; 61 otpConfiguration = someValues[otpReference];
64 otpConfiguration['user'] = this.user(); 62 otpConfiguration['user'] = this.user();
65 otpConfiguration['reference'] = otpReference; 63 otpConfiguration['reference'] = otpReference;
66 otp = new Clipperz.PM.DataModel.OneTimePassword(otpConfiguration); 64 otp = new Clipperz.PM.DataModel.OneTimePassword(otpConfiguration);
67 this._oneTimePasswords[otpReference] = otp; 65 this._oneTimePasswords[otpReference] = otp;
68 } 66 }
69 67
70 return this; 68 return this;
71 }, 69 },
72 70
73 //------------------------------------------------------------------------- 71 //-------------------------------------------------------------------------
74 72
75 'updateWithServerData': function(someValues) { 73 'updateWithServerData': function(someValues) {
76 var deferredResult; 74 var deferredResult;
77 varoneTimePasswordReference; 75 varoneTimePasswordReference;
78 var wereChangesApplied; 76 var wereChangesApplied;
79 77
80//MochiKit.Logging.logDebug(">>> OneTimePasswordManager.updateWithServerData"); 78//MochiKit.Logging.logDebug(">>> OneTimePasswordManager.updateWithServerData");
81 deferredResult = new MochiKit.Async.Deferred(); 79 deferredResult = new MochiKit.Async.Deferred();
82 wereChangesApplied = false; 80 wereChangesApplied = false;
83 81
84 for (oneTimePasswordReference in someValues) { 82 for (oneTimePasswordReference in someValues) {
85 var oneTimePassword; 83 var oneTimePassword;
86 84
87 oneTimePassword = this.oneTimePasswordWithReference(oneTimePasswordReference); 85 oneTimePassword = this.oneTimePasswordWithReference(oneTimePasswordReference);
88 if (oneTimePassword != null) { 86 if (oneTimePassword != null) {
89 var oneTimePasswordHasBeenUpdated; 87 var oneTimePasswordHasBeenUpdated;
90 88
91 oneTimePasswordHasBeenUpdated = oneTimePassword.updateStatusWithValues(someValues[oneTimePasswordReference]); 89 oneTimePasswordHasBeenUpdated = oneTimePassword.updateStatusWithValues(someValues[oneTimePasswordReference]);
92 wereChangesApplied = oneTimePasswordHasBeenUpdated || wereChangesApplied; 90 wereChangesApplied = oneTimePasswordHasBeenUpdated || wereChangesApplied;
93 } else { 91 } else {
94 92
95 } 93 }
96 } 94 }
97 95
98 if (wereChangesApplied == true) { 96 if (wereChangesApplied == true) {
99 this.user().header().markSectionAsUpdated('oneTimePasswords'); 97 this.user().header().markSectionAsUpdated('oneTimePasswords');
100 } 98 }
101 99
102 for (oneTimePasswordReference in this.oneTimePasswords()) { 100 for (oneTimePasswordReference in this.oneTimePasswords()) {
103 if (typeof(someValues[oneTimePasswordReference]) == 'undefind') { 101 if (typeof(someValues[oneTimePasswordReference]) == 'undefind') {
104 deferredResult.addCallback(MochiKit.Base.method(this.oneTimePasswordWithReference(oneTimePasswordReference), 'saveChanges')); 102 deferredResult.addCallback(MochiKit.Base.method(this.oneTimePasswordWithReference(oneTimePasswordReference), 'saveChanges'));
105 } 103 }
106 } 104 }
107 105
108 deferredResult.addCallback(MochiKit.Async.succeed, this); 106 deferredResult.addCallback(MochiKit.Async.succeed, this);
109 107
110 deferredResult.callback(); 108 deferredResult.callback();
111//MochiKit.Logging.logDebug("<<< OneTimePasswordManager.updateWithServerData"); 109//MochiKit.Logging.logDebug("<<< OneTimePasswordManager.updateWithServerData");
112 110
113 return deferredResult; 111 return deferredResult;
114 }, 112 },
115 113
116 //------------------------------------------------------------------------- 114 //-------------------------------------------------------------------------
117 115
118 'user': function() { 116 'user': function() {
119 return this._user; 117 return this._user;
120 }, 118 },
121 119
122 //------------------------------------------------------------------------- 120 //-------------------------------------------------------------------------
123 121
124 'addOneTimePassword': function(aOneTimePassword, isBatchUpdate) { 122 'addOneTimePassword': function(aOneTimePassword, isBatchUpdate) {
125 this.oneTimePasswords()[aOneTimePassword.reference()] = aOneTimePassword; 123 this.oneTimePasswords()[aOneTimePassword.reference()] = aOneTimePassword;
126 124
127 if (isBatchUpdate != true) { 125 if (isBatchUpdate != true) {
128 Clipperz.NotificationCenter.notify(aOneTimePassword, 'oneTimePasswordAdded'); 126 Clipperz.NotificationCenter.notify(aOneTimePassword, 'oneTimePasswordAdded');
129 Clipperz.NotificationCenter.notify(this.user(), 'updatedSection', 'oneTimePasswords', true); 127 Clipperz.NotificationCenter.notify(this.user(), 'updatedSection', 'oneTimePasswords', true);
130 } 128 }
131 }, 129 },
132 130
133 //------------------------------------------------------------------------- 131 //-------------------------------------------------------------------------
134 132
135 'archiveOneTimePassword': function(aOneTimePasswordReference) { 133 'archiveOneTimePassword': function(aOneTimePasswordReference) {
136 var deferredResult; 134 var deferredResult;
137 135
138//MochiKit.Logging.logDebug(">>> OneTimePasswordManager.archiveOneTimePassword"); 136//MochiKit.Logging.logDebug(">>> OneTimePasswordManager.archiveOneTimePassword");
139//MochiKit.Logging.logDebug("--- OneTimePasswordManager.archiveOneTimePassword - 0 otp.reference: " + aOneTimePasswordReference); 137//MochiKit.Logging.logDebug("--- OneTimePasswordManager.archiveOneTimePassword - 0 otp.reference: " + aOneTimePasswordReference);
140 deferredResult = new MochiKit.Async.Deferred(); 138 deferredResult = new MochiKit.Async.Deferred();
141 deferredResult.addCallback(MochiKit.Base.method(this.user(), 'loadOneTimePasswords')); 139 deferredResult.addCallback(MochiKit.Base.method(this.user(), 'loadOneTimePasswords'));
142 deferredResult.addCallback(MochiKit.Base.bind(function(aOneTimePasswordReference) { 140 deferredResult.addCallback(MochiKit.Base.bind(function(aOneTimePasswordReference) {
143 var oneTimePassword; 141 var oneTimePassword;
144 142
145//MochiKit.Logging.logDebug("--- OneTimePasswordManager.archiveOneTimePassword - 1 serializedData: " + Clipperz.Base.serializeJSON(this.serializedData())); 143//MochiKit.Logging.logDebug("--- OneTimePasswordManager.archiveOneTimePassword - 1 serializedData: " + Clipperz.Base.serializeJSON(this.serializedData()));
146 oneTimePassword = this.oneTimePasswords()[aOneTimePasswordReference]; 144 oneTimePassword = this.oneTimePasswords()[aOneTimePasswordReference];
147 145
148 if (oneTimePassword != null) { 146 if (oneTimePassword != null) {
149 oneTimePassword.setUsageDate(new Date()); 147 oneTimePassword.setUsageDate(new Date());
150 148
151 // while (this.usedOneTimePasswords().length > 10) { 149 // while (this.usedOneTimePasswords().length > 10) {
152 // var referenceOfOneTimePasswordToRemove; 150 // var referenceOfOneTimePasswordToRemove;
153 // 151 //
154 // referenceOfOneTimePasswordToRemove = this.usedOneTimePasswords()[0]; 152 // referenceOfOneTimePasswordToRemove = this.usedOneTimePasswords()[0];
155 // delete this.oneTimePasswords()[referenceOfOneTimePasswordToRemove]; 153 // delete this.oneTimePasswords()[referenceOfOneTimePasswordToRemove];
156 // this.usedOneTimePasswords().shift(); 154 // this.usedOneTimePasswords().shift();
157 // } 155 // }
158 156
159 Clipperz.NotificationCenter.notify(this.user(), 'updatedSection', 'oneTimePasswords', true); 157 Clipperz.NotificationCenter.notify(this.user(), 'updatedSection', 'oneTimePasswords', true);
160 } else { 158 } else {
161 MochiKit.Logging.logError("### OneTimePasswordManager.archiveOneTimePassword - the used OneTimePassword has not been found on the index-card. :-("); 159 MochiKit.Logging.logError("### OneTimePasswordManager.archiveOneTimePassword - the used OneTimePassword has not been found on the index-card. :-(");
162 } 160 }
163 161
164//MochiKit.Logging.logDebug("--- OneTimePasswordManager.archiveOneTimePassword - 2 serializedData: " + Clipperz.Base.serializeJSON(this.serializedData())); 162//MochiKit.Logging.logDebug("--- OneTimePasswordManager.archiveOneTimePassword - 2 serializedData: " + Clipperz.Base.serializeJSON(this.serializedData()));
165 }, this), aOneTimePasswordReference); 163 }, this), aOneTimePasswordReference);
166 deferredResult.addCallback(MochiKit.Base.method(this, 'saveChanges')); 164 deferredResult.addCallback(MochiKit.Base.method(this, 'saveChanges'));
167 deferredResult.callback(); 165 deferredResult.callback();
168//MochiKit.Logging.logDebug("<<< OneTimePasswordManager.archiveOneTimePassword"); 166//MochiKit.Logging.logDebug("<<< OneTimePasswordManager.archiveOneTimePassword");
169 167
170 return deferredResult; 168 return deferredResult;
171 }, 169 },
172 170
173 //------------------------------------------------------------------------- 171 //-------------------------------------------------------------------------
174 172
175 'serializedData': function() { 173 'serializedData': function() {
176 var result; 174 var result;
177 varkey; 175 varkey;
178 176
179 result = {}; 177 result = {};
180 178
181 for (key in this.oneTimePasswords()) { 179 for (key in this.oneTimePasswords()) {
182 result[key] = this.oneTimePasswords()[key].serializedData(); 180 result[key] = this.oneTimePasswords()[key].serializedData();
183 } 181 }
184 182
185 return result; 183 return result;
186 }, 184 },
187 185
188 //------------------------------------------------------------------------- 186 //-------------------------------------------------------------------------
189 187
190 'oneTimePasswords': function() { 188 'oneTimePasswords': function() {
191 return this._oneTimePasswords; 189 return this._oneTimePasswords;
192 }, 190 },
193 191
194 //------------------------------------------------------------------------- 192 //-------------------------------------------------------------------------
195 193
196 'oneTimePasswordWithReference': function(aOneTimePasswordReference) { 194 'oneTimePasswordWithReference': function(aOneTimePasswordReference) {
197 return this.oneTimePasswords()[aOneTimePasswordReference]; 195 return this.oneTimePasswords()[aOneTimePasswordReference];
198 }, 196 },
199 197
200 //------------------------------------------------------------------------- 198 //-------------------------------------------------------------------------
201 199
202 'deleteOneTimePasswordWithReference': function(aOneTimePasswordReference) { 200 'deleteOneTimePasswordWithReference': function(aOneTimePasswordReference) {
203 delete(this.oneTimePasswords()[aOneTimePasswordReference]); 201 delete(this.oneTimePasswords()[aOneTimePasswordReference]);
204 Clipperz.NotificationCenter.notify(this.user(), 'updatedSection', 'oneTimePasswords', true); 202 Clipperz.NotificationCenter.notify(this.user(), 'updatedSection', 'oneTimePasswords', true);
205 }, 203 },
206 204
207 //------------------------------------------------------------------------- 205 //-------------------------------------------------------------------------
208 206
209 'encryptedData': function() { 207 'encryptedData': function() {
210 var deferredResult; 208 var deferredResult;
211 var oneTimePasswordReferences; 209 var oneTimePasswordReferences;
212 var result; 210 var result;
213 var i, c; 211 var i, c;
214 212
215 result = {}; 213 result = {};
216 deferredResult = new MochiKit.Async.Deferred(); 214 deferredResult = new MochiKit.Async.Deferred();
217 deferredResult.addCallback(MochiKit.Async.succeed); 215 deferredResult.addCallback(MochiKit.Async.succeed);
218 216
219 oneTimePasswordReferences = MochiKit.Base.keys(this.oneTimePasswords()); 217 oneTimePasswordReferences = MochiKit.Base.keys(this.oneTimePasswords());
220 c = oneTimePasswordReferences.length; 218 c = oneTimePasswordReferences.length;
221 for (i=0; i<c; i++) { 219 for (i=0; i<c; i++) {
222 var currentOneTimePassword; 220 var currentOneTimePassword;
223 221
224 currentOneTimePassword = this.oneTimePasswords()[oneTimePasswordReferences[i]]; 222 currentOneTimePassword = this.oneTimePasswords()[oneTimePasswordReferences[i]];
225 deferredResult.addCallback(MochiKit.Base.method(currentOneTimePassword, 'encryptedPackedPassphrase')); 223 deferredResult.addCallback(MochiKit.Base.method(currentOneTimePassword, 'encryptedPackedPassphrase'));
226 deferredResult.addCallback(function(aResult, aOneTimePasswordReference, anEncryptedPackedPassphrase) { 224 deferredResult.addCallback(function(aResult, aOneTimePasswordReference, anEncryptedPackedPassphrase) {
227 aResult[aOneTimePasswordReference] = anEncryptedPackedPassphrase; 225 aResult[aOneTimePasswordReference] = anEncryptedPackedPassphrase;
228 return aResult; 226 return aResult;
229 }, result, oneTimePasswordReferences[i]); 227 }, result, oneTimePasswordReferences[i]);
230 } 228 }
231//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePasswordManager.encryptedData: " + res); return res;}); 229//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePasswordManager.encryptedData: " + res); return res;});
232 230
233 deferredResult.callback(result); 231 deferredResult.callback(result);
234 232
235 return deferredResult; 233 return deferredResult;
236 }, 234 },
237 235
238 //------------------------------------------------------------------------- 236 //-------------------------------------------------------------------------
239 237
240 'saveChanges': function() { 238 'saveChanges': function() {
241 var deferredResult; 239 var deferredResult;
242 varresult; 240 varresult;
243 241
244//MochiKit.Logging.logDebug(">>> OneTimePasswordManager.saveChanges"); 242//MochiKit.Logging.logDebug(">>> OneTimePasswordManager.saveChanges");
245 result = {}; 243 result = {};
246 deferredResult = new MochiKit.Async.Deferred(); 244 deferredResult = new MochiKit.Async.Deferred();
247 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_encryptUserData'); 245 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_encryptUserData');
248 deferredResult.addCallback(MochiKit.Base.method(this.user(), 'encryptedData')); 246 deferredResult.addCallback(MochiKit.Base.method(this.user(), 'encryptedData'));
249 deferredResult.addCallback(function(aResult, res) { 247 deferredResult.addCallback(function(aResult, res) {
250 aResult['user'] = res; 248 aResult['user'] = res;
251 return aResult; 249 return aResult;
252 }, result); 250 }, result);
253 251
254 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_encryptOTPData'); 252 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_encryptOTPData');
255 deferredResult.addCallback(MochiKit.Base.bind(function(res) { 253 deferredResult.addCallback(MochiKit.Base.bind(function(res) {
256 res['oneTimePasswords'] = MochiKit.Base.keys(this.oneTimePasswords()); 254 res['oneTimePasswords'] = MochiKit.Base.keys(this.oneTimePasswords());
257 return res; 255 return res;
258 }, this)); 256 }, this));
259 257
260 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_sendingData'); 258 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_sendingData');
261//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePasswordManager.saveChanges - 1: " + Clipperz.Base.serializeJSON(res)); return res;}); 259//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePasswordManager.saveChanges - 1: " + Clipperz.Base.serializeJSON(res)); return res;});
262 deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'updateOneTimePasswords'); 260 deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'updateOneTimePasswords');
263 261
264 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_updatingInterface'); 262 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_updatingInterface');
265//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePasswordManager.saveChanges - 2: " + res); return res;}); 263//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePasswordManager.saveChanges - 2: " + res); return res;});
266 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'notify', 'OTPUpdated'); 264 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'notify', 'OTPUpdated');
267//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePasswordManager.saveChanges - 3: " + res); return res;}); 265//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePasswordManager.saveChanges - 3: " + res); return res;});
268 deferredResult.callback(); 266 deferredResult.callback();
269//MochiKit.Logging.logDebug("<<< OneTimePasswordManager.saveChanges"); 267//MochiKit.Logging.logDebug("<<< OneTimePasswordManager.saveChanges");
270 268
271 return deferredResult; 269 return deferredResult;
272 }, 270 },
273 271
274 //------------------------------------------------------------------------- 272 //-------------------------------------------------------------------------
275 __syntaxFix__: "syntax fix" 273 __syntaxFix__: "syntax fix"
276}); 274});
277 275
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/Record.js b/frontend/beta/js/Clipperz/PM/DataModel/Record.js
index f89f79c..7b06f29 100644
--- a/frontend/beta/js/Clipperz/PM/DataModel/Record.js
+++ b/frontend/beta/js/Clipperz/PM/DataModel/Record.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } 26if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
29 27
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.DataModel.Record = function(args) { 31Clipperz.PM.DataModel.Record = function(args) {
34 args = args || {}; 32 args = args || {};
35 33
36 this._user = args['user'] || null; 34 this._user = args['user'] || null;
37 this._reference = args['reference'] || Clipperz.PM.Crypto.randomKey(); 35 this._reference = args['reference'] || Clipperz.PM.Crypto.randomKey();
38 this._version = args['version'] || Clipperz.PM.Crypto.encryptingFunctions.currentVersion; 36 this._version = args['version'] || Clipperz.PM.Crypto.encryptingFunctions.currentVersion;
39 this._key = args['key'] || Clipperz.PM.Crypto.randomKey(); 37 this._key = args['key'] || Clipperz.PM.Crypto.randomKey();
40 38
41 this.setLabel(args['label'] || Clipperz.PM.Strings['newRecordTitleLabel']); 39 this.setLabel(args['label'] || Clipperz.PM.Strings['newRecordTitleLabel']);
42 40
43 this.setHeaderNotes(args['headerNotes'] || null); 41 this.setHeaderNotes(args['headerNotes'] || null);
44 this.setNotes(args['notes'] || args['headerNotes'] || ""); 42 this.setNotes(args['notes'] || args['headerNotes'] || "");
45//MochiKit.Logging.logDebug("--- new Record ('" + this._label + "')- _headerNotes: '" + this._headerNotes + "'"); 43//MochiKit.Logging.logDebug("--- new Record ('" + this._label + "')- _headerNotes: '" + this._headerNotes + "'");
46//MochiKit.Logging.logDebug("--- new Record ('" + this._label + "')- _notes: '" + this._notes + "'"); 44//MochiKit.Logging.logDebug("--- new Record ('" + this._label + "')- _notes: '" + this._notes + "'");
47 //this._notes = args.notes || ""; 45 //this._notes = args.notes || "";
48 46
49 this._versions = {}; 47 this._versions = {};
50 this._directLogins = {}; 48 this._directLogins = {};
51 this._removedDirectLogins = []; 49 this._removedDirectLogins = [];
52 50
53 this.setIsBrandNew(args['reference'] == null); 51 this.setIsBrandNew(args['reference'] == null);
54 52
55 this.setShouldLoadData(this.isBrandNew() ? false: true); 53 this.setShouldLoadData(this.isBrandNew() ? false: true);
56 this.setShouldDecryptData(this.isBrandNew() ? false: true); 54 this.setShouldDecryptData(this.isBrandNew() ? false: true);
57 this.setShouldProcessData(this.isBrandNew() ? false: true); 55 this.setShouldProcessData(this.isBrandNew() ? false: true);
58 56
59 this.setCurrentVersion(this.isBrandNew() ? new Clipperz.PM.DataModel.RecordVersion(this, null): null); 57 this.setCurrentVersion(this.isBrandNew() ? new Clipperz.PM.DataModel.RecordVersion(this, null): null);
60 this.setCurrentVersionKey(null); 58 this.setCurrentVersionKey(null);
61 59
62 this._serverData = null; 60 this._serverData = null;
63 this._decryptedData = null; 61 this._decryptedData = null;
64 this._cachedData = null; 62 this._cachedData = null;
65 63
66 return this; 64 return this;
67} 65}
68 66
69Clipperz.PM.DataModel.Record.prototype = MochiKit.Base.update(null, { 67Clipperz.PM.DataModel.Record.prototype = MochiKit.Base.update(null, {
70 68
71 'toString': function() { 69 'toString': function() {
72 return "Record (" + this.label() + ")"; 70 return "Record (" + this.label() + ")";
73 }, 71 },
74 72
75 //------------------------------------------------------------------------- 73 //-------------------------------------------------------------------------
76 74
77 'isBrandNew': function() { 75 'isBrandNew': function() {
78 return this._isBrandNew; 76 return this._isBrandNew;
79 }, 77 },
80 78
81 'setIsBrandNew': function(aValue) { 79 'setIsBrandNew': function(aValue) {
82 this._isBrandNew = aValue; 80 this._isBrandNew = aValue;
83 }, 81 },
84 82
85 //------------------------------------------------------------------------- 83 //-------------------------------------------------------------------------
86/* 84/*
87 'shouldRunTheRecordCreationWizard': function() { 85 'shouldRunTheRecordCreationWizard': function() {
88 return (this.isBrandNew() && (MochiKit.Base.keys(this.currentVersion().fields()).length == 0)); 86 return (this.isBrandNew() && (MochiKit.Base.keys(this.currentVersion().fields()).length == 0));
89 }, 87 },
90 */ 88 */
91 //------------------------------------------------------------------------- 89 //-------------------------------------------------------------------------
92 90
93 'user': function() { 91 'user': function() {
94 return this._user; 92 return this._user;
95 }, 93 },
96 94
97 //------------------------------------------------------------------------- 95 //-------------------------------------------------------------------------
98 96
99 'reference': function() { 97 'reference': function() {
100 return this._reference; 98 return this._reference;
101 }, 99 },
102 100
103 //------------------------------------------------------------------------- 101 //-------------------------------------------------------------------------
104 102
105 'key': function() { 103 'key': function() {
106 return this._key; 104 return this._key;
107 }, 105 },
108 106
109 'updateKey': function() { 107 'updateKey': function() {
110 this._key = Clipperz.PM.Crypto.randomKey(); 108 this._key = Clipperz.PM.Crypto.randomKey();
111 }, 109 },
112 110
113 //------------------------------------------------------------------------- 111 //-------------------------------------------------------------------------
114 112
115 'label': function() { 113 'label': function() {
116 return this._label; 114 return this._label;
117 }, 115 },
118 116
119 'setLabel': function(aValue) { 117 'setLabel': function(aValue) {
120 this._label = aValue; 118 this._label = aValue;
121 }, 119 },
122 120
123 'lowerCaseLabel': function() { 121 'lowerCaseLabel': function() {
124 return this.label().toLowerCase(); 122 return this.label().toLowerCase();
125 }, 123 },
126 124
127 //------------------------------------------------------------------------- 125 //-------------------------------------------------------------------------
128 126
129 'versions': function() { 127 'versions': function() {
130 return this._versions; 128 return this._versions;
131 }, 129 },
132 130
133 //------------------------------------------------------------------------- 131 //-------------------------------------------------------------------------
134 132
135 'currentVersion': function() { 133 'currentVersion': function() {
136 return this._currentVersion; 134 return this._currentVersion;
137 }, 135 },
138 136
139 'setCurrentVersion': function(aValue) { 137 'setCurrentVersion': function(aValue) {
140 this._currentVersion = aValue; 138 this._currentVersion = aValue;
141 }, 139 },
142 140
143 //------------------------------------------------------------------------- 141 //-------------------------------------------------------------------------
144 142
145 'currentVersionKey': function() { 143 'currentVersionKey': function() {
146 return this._currentVersionKey; 144 return this._currentVersionKey;
147 }, 145 },
148 146
149 'setCurrentVersionKey': function(aValue) { 147 'setCurrentVersionKey': function(aValue) {
150 this._currentVersionKey = aValue; 148 this._currentVersionKey = aValue;
151 }, 149 },
152 150
153 //------------------------------------------------------------------------- 151 //-------------------------------------------------------------------------
154 152
155 'deferredData': function() { 153 'deferredData': function() {
156 vardeferredResult; 154 vardeferredResult;
157 155
158//MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] Record.deferredData - this: " + this); 156//MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] Record.deferredData - this: " + this);
159 deferredResult = new MochiKit.Async.Deferred(); 157 deferredResult = new MochiKit.Async.Deferred();
160 deferredResult.addCallback(MochiKit.Base.method(this, 'loadData')); 158 deferredResult.addCallback(MochiKit.Base.method(this, 'loadData'));
161 deferredResult.addCallback(MochiKit.Base.method(this, 'decryptData')); 159 deferredResult.addCallback(MochiKit.Base.method(this, 'decryptData'));
162 deferredResult.addCallback(MochiKit.Base.method(this, 'processData')); 160 deferredResult.addCallback(MochiKit.Base.method(this, 'processData'));
163 deferredResult.addCallback(function(aRecord) { 161 deferredResult.addCallback(function(aRecord) {
164 return aRecord.currentVersion().deferredData(); 162 return aRecord.currentVersion().deferredData();
165 }); 163 });
166 deferredResult.addCallback(MochiKit.Base.method(this, 'takeSnapshotOfCurrentData')); 164 deferredResult.addCallback(MochiKit.Base.method(this, 'takeSnapshotOfCurrentData'));
167 deferredResult.addCallback(MochiKit.Async.succeed, this); 165 deferredResult.addCallback(MochiKit.Async.succeed, this);
168 deferredResult.callback(); 166 deferredResult.callback();
169//MochiKit.Logging.logDebug("<<< [" + (new Date()).valueOf() + "] Record.deferredData"); 167//MochiKit.Logging.logDebug("<<< [" + (new Date()).valueOf() + "] Record.deferredData");
170 168
171 return deferredResult; 169 return deferredResult;
172 }, 170 },
173 171
174 //------------------------------------------------------------------------- 172 //-------------------------------------------------------------------------
175 173
176 'exportedData': function() { 174 'exportedData': function() {
177 var result; 175 var result;
178 176
179 result = {}; 177 result = {};
180 result['label'] = this.label(); 178 result['label'] = this.label();
181 result['data'] = this.serializedData(); 179 result['data'] = this.serializedData();
182 result['currentVersion'] = this.currentVersion().serializedData(); 180 result['currentVersion'] = this.currentVersion().serializedData();
183 result['currentVersion']['reference'] = this.currentVersion().reference(); 181 result['currentVersion']['reference'] = this.currentVersion().reference();
184 // result['versions'] = MochiKit.Base.map(MochiKit.Base.methodcaller("serializedData"), MochiKit.Base.values(this.versions())); 182 // result['versions'] = MochiKit.Base.map(MochiKit.Base.methodcaller("serializedData"), MochiKit.Base.values(this.versions()));
185 183
186 return Clipperz.Base.serializeJSON(result); 184 return Clipperz.Base.serializeJSON(result);
187 }, 185 },
188 186
189 //------------------------------------------------------------------------- 187 //-------------------------------------------------------------------------
190 188
191 'shouldLoadData': function() { 189 'shouldLoadData': function() {
192 return this._shouldLoadData; 190 return this._shouldLoadData;
193 }, 191 },
194 192
195 'setShouldLoadData': function(aValue) { 193 'setShouldLoadData': function(aValue) {
196 this._shouldLoadData = aValue; 194 this._shouldLoadData = aValue;
197 }, 195 },
198 196
199 //------------------------------------------------------------------------- 197 //-------------------------------------------------------------------------
200 198
201 'shouldDecryptData': function() { 199 'shouldDecryptData': function() {
202 return this._shouldDecryptData; 200 return this._shouldDecryptData;
203 }, 201 },
204 202
205 'setShouldDecryptData': function(aValue) { 203 'setShouldDecryptData': function(aValue) {
206 this._shouldDecryptData = aValue; 204 this._shouldDecryptData = aValue;
207 }, 205 },
208 206
209 //------------------------------------------------------------------------- 207 //-------------------------------------------------------------------------
210 208
211 'shouldProcessData': function() { 209 'shouldProcessData': function() {
212 return this._shouldProcessData; 210 return this._shouldProcessData;
213 }, 211 },
214 212
215 'setShouldProcessData': function(aValue) { 213 'setShouldProcessData': function(aValue) {
216 this._shouldProcessData = aValue; 214 this._shouldProcessData = aValue;
217 }, 215 },
218 216
219 //------------------------------------------------------------------------- 217 //-------------------------------------------------------------------------
220 218
221 'loadData': function() { 219 'loadData': function() {
222 var result; 220 var result;
223 221
224//MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] Record.loadData - this: " + this); 222//MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] Record.loadData - this: " + this);
225 if (this.shouldLoadData()) { 223 if (this.shouldLoadData()) {
226 var deferredResult; 224 var deferredResult;
227 225
228 deferredResult = new MochiKit.Async.Deferred(); 226 deferredResult = new MochiKit.Async.Deferred();
229 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'notify', 'loadingRecordData'); 227 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'notify', 'loadingRecordData');
230 deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'getRecordDetail', {reference: this.reference()}); 228 deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'getRecordDetail', {reference: this.reference()});
231 deferredResult.addCallback(MochiKit.Base.method(this,'setServerData')); 229 deferredResult.addCallback(MochiKit.Base.method(this,'setServerData'));
232 deferredResult.callback(); 230 deferredResult.callback();
233 result = deferredResult; 231 result = deferredResult;
234 } else { 232 } else {
235 result = MochiKit.Async.succeed(this.serverData()); 233 result = MochiKit.Async.succeed(this.serverData());
236 } 234 }
237//MochiKit.Logging.logDebug("<<< [" + (new Date()).valueOf() + "] Record.loadData"); 235//MochiKit.Logging.logDebug("<<< [" + (new Date()).valueOf() + "] Record.loadData");
238 236
239 return result; 237 return result;
240 }, 238 },
241 239
242 //------------------------------------------------------------------------- 240 //-------------------------------------------------------------------------
243 241
244 'decryptData': function(anEncryptedData) { 242 'decryptData': function(anEncryptedData) {
245 var result; 243 var result;
246 244
247//MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] Record.decryptData - this: " + this + " (" + anEncryptedData + ")"); 245//MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] Record.decryptData - this: " + this + " (" + anEncryptedData + ")");
248 if (this.shouldDecryptData()) { 246 if (this.shouldDecryptData()) {
249 var deferredResult; 247 var deferredResult;
250 248
251 deferredResult = new MochiKit.Async.Deferred(); 249 deferredResult = new MochiKit.Async.Deferred();
252 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'notify', 'decryptingRecordData'); 250 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'notify', 'decryptingRecordData');
253 deferredResult.addCallback(Clipperz.PM.Crypto.deferredDecrypt, this.key(), anEncryptedData['data'], anEncryptedData['version']); 251 deferredResult.addCallback(Clipperz.PM.Crypto.deferredDecrypt, this.key(), anEncryptedData['data'], anEncryptedData['version']);
254 deferredResult.addCallback(function(anEncryptedData, someDecryptedValues) { 252 deferredResult.addCallback(function(anEncryptedData, someDecryptedValues) {
255 varresult; 253 varresult;
256 254
257 result = anEncryptedData; 255 result = anEncryptedData;
258 result['data'] = someDecryptedValues; 256 result['data'] = someDecryptedValues;
259 257
260 return result; 258 return result;
261 }, anEncryptedData); 259 }, anEncryptedData);
262 deferredResult.addCallback(MochiKit.Base.method(this, 'setDecryptedData')); 260 deferredResult.addCallback(MochiKit.Base.method(this, 'setDecryptedData'));
263 deferredResult.callback(); 261 deferredResult.callback();
264 262
265 result = deferredResult; 263 result = deferredResult;
266 } else { 264 } else {
267 result = MochiKit.Async.succeed(this.decryptedData()); 265 result = MochiKit.Async.succeed(this.decryptedData());
268 } 266 }
269//MochiKit.Logging.logDebug("<<< [" + (new Date()).valueOf() + "] Record.decryptData"); 267//MochiKit.Logging.logDebug("<<< [" + (new Date()).valueOf() + "] Record.decryptData");
270 268
271 return result; 269 return result;
272 }, 270 },
273 271
274 //------------------------------------------------------------------------- 272 //-------------------------------------------------------------------------
275 273
276 'processData': function(someValues) { 274 'processData': function(someValues) {
277//MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] Record.processData"); 275//MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] Record.processData");
278//MochiKit.Logging.logDebug("--- Record.processData: " + Clipperz.Base.serializeJSON(someValues)); 276//MochiKit.Logging.logDebug("--- Record.processData: " + Clipperz.Base.serializeJSON(someValues));
279 if (this.shouldProcessData()) { 277 if (this.shouldProcessData()) {
280 var currentVersionParameters; 278 var currentVersionParameters;
281 279
282 this.processDataToExtractLegacyValues(someValues['data']); 280 this.processDataToExtractLegacyValues(someValues['data']);
283 281
284 if (typeof(someValues['data']['notes']) != 'undefined') { 282 if (typeof(someValues['data']['notes']) != 'undefined') {
285 this.setNotes(someValues['data']['notes']); 283 this.setNotes(someValues['data']['notes']);
286 } 284 }
287 285
288 if (someValues['data']['currentVersionKey'] != null) { 286 if (someValues['data']['currentVersionKey'] != null) {
289 this.setCurrentVersionKey(someValues['data']['currentVersionKey']); 287 this.setCurrentVersionKey(someValues['data']['currentVersionKey']);
290 } else { 288 } else {
291 this.setCurrentVersionKey(this.key()); 289 this.setCurrentVersionKey(this.key());
292 } 290 }
293 291
294 // community edition doesn't currently pass version information 292 // community edition doesn't currently pass version information
295 if (someValues['versions'] == null) { 293 if (someValues['versions'] == null) {
296 currentVersionParameters = someValues['currentVersion']; 294 currentVersionParameters = someValues['currentVersion'];
297 } else { 295 } else {
298 currentVersionParameters = someValues['versions'][someValues['currentVersion']]; 296 currentVersionParameters = someValues['versions'][someValues['currentVersion']];
299 } 297 }
300 298
301 //- currentVersionParameters = someValues['currentVersion']; 299 //- currentVersionParameters = someValues['currentVersion'];
302 // currentVersionParameters = someValues['versions'][someValues['currentVersion']]; 300 // currentVersionParameters = someValues['versions'][someValues['currentVersion']];
303 301
304 currentVersionParameters['key'] = this.currentVersionKey(); 302 currentVersionParameters['key'] = this.currentVersionKey();
305 this.setCurrentVersion(new Clipperz.PM.DataModel.RecordVersion(this, currentVersionParameters)); 303 this.setCurrentVersion(new Clipperz.PM.DataModel.RecordVersion(this, currentVersionParameters));
306 304
307 if (someValues['data']['directLogins'] != null) { 305 if (someValues['data']['directLogins'] != null) {
308 vardirectLoginReference; 306 vardirectLoginReference;
309 307
310 for (directLoginReference in someValues['data']['directLogins']) { 308 for (directLoginReference in someValues['data']['directLogins']) {
311 var directLogin; 309 var directLogin;
312 var directLoginParameters; 310 var directLoginParameters;
313 311
314 directLoginParameters = someValues['data']['directLogins'][directLoginReference]; 312 directLoginParameters = someValues['data']['directLogins'][directLoginReference];
315 directLoginParameters.record = this; 313 directLoginParameters.record = this;
316 directLoginParameters.reference = directLoginReference; 314 directLoginParameters.reference = directLoginReference;
317 315
318 directLogin = new Clipperz.PM.DataModel.DirectLogin(directLoginParameters); 316 directLogin = new Clipperz.PM.DataModel.DirectLogin(directLoginParameters);
319 this.addDirectLogin(directLogin, true); 317 this.addDirectLogin(directLogin, true);
320 } 318 }
321 } 319 }
322 this.setShouldProcessData(false); 320 this.setShouldProcessData(false);
323 } 321 }
324 322
325 Clipperz.NotificationCenter.notify(this, 'recordDataReady'); 323 Clipperz.NotificationCenter.notify(this, 'recordDataReady');
326//MochiKit.Logging.logDebug("<<< [" + (new Date()).valueOf() + "] Record.processData"); 324//MochiKit.Logging.logDebug("<<< [" + (new Date()).valueOf() + "] Record.processData");
327//MochiKit.Logging.logDebug("<<< Record.processData"); 325//MochiKit.Logging.logDebug("<<< Record.processData");
328 326
329 return this; 327 return this;
330 }, 328 },
331 329
332 //------------------------------------------------------------------------- 330 //-------------------------------------------------------------------------
333 331
334 'processDataToExtractLegacyValues': function(someValues) { 332 'processDataToExtractLegacyValues': function(someValues) {
335//MochiKit.Logging.logDebug(">>> Record.processDataToExtractLegacyValues"); 333//MochiKit.Logging.logDebug(">>> Record.processDataToExtractLegacyValues");
336 if (someValues['data'] != null) { 334 if (someValues['data'] != null) {
337 this.setNotes(someValues['data']); 335 this.setNotes(someValues['data']);
338 } 336 }
339 337
340 if ( 338 if (
341 (typeof(someValues['loginFormData']) != "undefined") 339 (typeof(someValues['loginFormData']) != "undefined")
342 &&(typeof(someValues['loginBindings'] != "undefined")) 340 &&(typeof(someValues['loginBindings'] != "undefined"))
343 &&(someValues['loginFormData'] != "") 341 &&(someValues['loginFormData'] != "")
344 &&(someValues['loginBindings'] != "") 342 &&(someValues['loginBindings'] != "")
345 ) { 343 ) {
346 vardirectLogin; 344 vardirectLogin;
347 345
348 directLogin = new Clipperz.PM.DataModel.DirectLogin({ 346 directLogin = new Clipperz.PM.DataModel.DirectLogin({
349 record:this, 347 record:this,
350 label:this.label() + Clipperz.PM.Strings['newDirectLoginLabelSuffix'], 348 label:this.label() + Clipperz.PM.Strings['newDirectLoginLabelSuffix'],
351 reference:Clipperz.Crypto.SHA.sha256(new Clipperz.ByteArray(this.label() + 349 reference:Clipperz.Crypto.SHA.sha256(new Clipperz.ByteArray(this.label() +
352 someValues['loginFormData'] + 350 someValues['loginFormData'] +
353 someValues['loginBindings'])).toHexString().substring(2), 351 someValues['loginBindings'])).toHexString().substring(2),
354 formData:Clipperz.Base.evalJSON(someValues['loginFormData']), 352 formData:Clipperz.Base.evalJSON(someValues['loginFormData']),
355 legacyBindingData:Clipperz.Base.evalJSON(someValues['loginBindings']), 353 legacyBindingData:Clipperz.Base.evalJSON(someValues['loginBindings']),
356 bookmarkletVersion:'0.1' 354 bookmarkletVersion:'0.1'
357 }); 355 });
358 this.addDirectLogin(directLogin, true); 356 this.addDirectLogin(directLogin, true);
359 } 357 }
360//MochiKit.Logging.logDebug("<<< Record.processDataToExtractLegacyValues"); 358//MochiKit.Logging.logDebug("<<< Record.processDataToExtractLegacyValues");
361 }, 359 },
362 360
363 //------------------------------------------------------------------------- 361 //-------------------------------------------------------------------------
364 362
365 'getReadyBeforeUpdatingVersionValues': function() { 363 'getReadyBeforeUpdatingVersionValues': function() {
366 }, 364 },
367 365
368 //------------------------------------------------------------------------- 366 //-------------------------------------------------------------------------
369 367
370 'addNewField': function() { 368 'addNewField': function() {
371 varnewField; 369 varnewField;
372 370
373//MochiKit.Logging.logDebug(">>> Record.addNewField - " + this); 371//MochiKit.Logging.logDebug(">>> Record.addNewField - " + this);
374 this.getReadyBeforeUpdatingVersionValues(); 372 this.getReadyBeforeUpdatingVersionValues();
375 newField = this.currentVersion().addNewField(); 373 newField = this.currentVersion().addNewField();
376 Clipperz.NotificationCenter.notify(this, 'recordUpdated'); 374 Clipperz.NotificationCenter.notify(this, 'recordUpdated');
377//MochiKit.Logging.logDebug("<<< Record.addNewField"); 375//MochiKit.Logging.logDebug("<<< Record.addNewField");
378 376
379 return newField; 377 return newField;
380 }, 378 },
381 379
382 //------------------------------------------------------------------------- 380 //-------------------------------------------------------------------------
383 381
384 'removeField': function(aField) { 382 'removeField': function(aField) {
385 this.getReadyBeforeUpdatingVersionValues(); 383 this.getReadyBeforeUpdatingVersionValues();
386 this.currentVersion().removeField(aField); 384 this.currentVersion().removeField(aField);
387 Clipperz.NotificationCenter.notify(this, 'recordUpdated'); 385 Clipperz.NotificationCenter.notify(this, 'recordUpdated');
388 }, 386 },
389 387
390 'removeEmptyFields': function() { 388 'removeEmptyFields': function() {
391 MochiKit.Iter.forEach(MochiKit.Base.values(this.currentVersion().fields()), MochiKit.Base.bind(function(aField) { 389 MochiKit.Iter.forEach(MochiKit.Base.values(this.currentVersion().fields()), MochiKit.Base.bind(function(aField) {
392 if (aField.isEmpty()) { 390 if (aField.isEmpty()) {
393 this.removeField(aField); 391 this.removeField(aField);
394 // this.currentVersion().removeField(aField); 392 // this.currentVersion().removeField(aField);
395 } 393 }
396 }, this)); 394 }, this));
397 }, 395 },
398 396
399 //------------------------------------------------------------------------- 397 //-------------------------------------------------------------------------
400 398
401 'notes': function() { 399 'notes': function() {
402 return this._notes; 400 return this._notes;
403 }, 401 },
404 402
405 'setNotes': function(aValue) { 403 'setNotes': function(aValue) {
406 this._notes = aValue; 404 this._notes = aValue;
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/RecordField.js b/frontend/beta/js/Clipperz/PM/DataModel/RecordField.js
index bca664d..a5d7980 100644
--- a/frontend/beta/js/Clipperz/PM/DataModel/RecordField.js
+++ b/frontend/beta/js/Clipperz/PM/DataModel/RecordField.js
@@ -1,217 +1,215 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } 26if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
29 27
30//############################################################################# 28//#############################################################################
31 29
32Clipperz.PM.DataModel.RecordField = function(args) { 30Clipperz.PM.DataModel.RecordField = function(args) {
33 args = args || {}; 31 args = args || {};
34 32
35 this._recordVersion = args.recordVersion || null; 33 this._recordVersion = args.recordVersion || null;
36 this._key = args.key || Clipperz.PM.Crypto.randomKey(); 34 this._key = args.key || Clipperz.PM.Crypto.randomKey();
37 this.setLabel(args.label || ''); 35 this.setLabel(args.label || '');
38 this.setValue(args.value || ''); 36 this.setValue(args.value || '');
39 this.setType(args.type || 'TXT'); //valid types: 'TXT', 'PWD', 'URL', 'DATE', 'ADDR', 'CHECK', 'RADIO', ('NOTE' probably not), ... 37 this.setType(args.type || 'TXT'); //valid types: 'TXT', 'PWD', 'URL', 'DATE', 'ADDR', 'CHECK', 'RADIO', ('NOTE' probably not), ...
40 this._hidden = args.hidden || (args.type == 'PWD') || false; 38 this._hidden = args.hidden || (args.type == 'PWD') || false;
41 39
42 return this; 40 return this;
43} 41}
44 42
45Clipperz.PM.DataModel.RecordField.prototype = MochiKit.Base.update(null, { 43Clipperz.PM.DataModel.RecordField.prototype = MochiKit.Base.update(null, {
46 44
47 'toString': function() { 45 'toString': function() {
48 return "Clipperz.PM.DataModel.RecordField - " + this.label() + " (" + this.key() + ")"; 46 return "Clipperz.PM.DataModel.RecordField - " + this.label() + " (" + this.key() + ")";
49 }, 47 },
50 48
51 //------------------------------------------------------------------------- 49 //-------------------------------------------------------------------------
52 50
53 'recordVersion': function() { 51 'recordVersion': function() {
54 return this._recordVersion; 52 return this._recordVersion;
55 }, 53 },
56 54
57 //------------------------------------------------------------------------- 55 //-------------------------------------------------------------------------
58 56
59 'key': function() { 57 'key': function() {
60 return this._key; 58 return this._key;
61 }, 59 },
62 60
63 //------------------------------------------------------------------------- 61 //-------------------------------------------------------------------------
64 62
65 'label': function() { 63 'label': function() {
66 return this._label; 64 return this._label;
67 }, 65 },
68 66
69 'setLabel': function(aValue) { 67 'setLabel': function(aValue) {
70 this._label = aValue; 68 this._label = aValue;
71 }, 69 },
72 70
73 //------------------------------------------------------------------------- 71 //-------------------------------------------------------------------------
74 72
75 'value': function() { 73 'value': function() {
76 return this._value; 74 return this._value;
77 }, 75 },
78 76
79 'setValue': function(aValue) { 77 'setValue': function(aValue) {
80 this._value = aValue; 78 this._value = aValue;
81 }, 79 },
82 80
83 //------------------------------------------------------------------------- 81 //-------------------------------------------------------------------------
84 82
85 'type': function() { 83 'type': function() {
86 return this._type; 84 return this._type;
87 }, 85 },
88 86
89 'setType': function(aValue) { 87 'setType': function(aValue) {
90 this._type = aValue; 88 this._type = aValue;
91 89
92 if (aValue == 'PWD') { 90 if (aValue == 'PWD') {
93 this.setHidden(true); 91 this.setHidden(true);
94 } else { 92 } else {
95 this.setHidden(false); 93 this.setHidden(false);
96 } 94 }
97 }, 95 },
98 96
99 //------------------------------------------------------------------------- 97 //-------------------------------------------------------------------------
100 98
101 'serializeData': function() { 99 'serializeData': function() {
102 var result; 100 var result;
103 101
104//MochiKit.Logging.logDebug(">>> RecordField.serializeData - " + this); 102//MochiKit.Logging.logDebug(">>> RecordField.serializeData - " + this);
105 result = { 103 result = {
106 label: this.label(), 104 label: this.label(),
107 value:this.value(), 105 value:this.value(),
108 type: this.type(), 106 type: this.type(),
109 hidden: this.hidden() 107 hidden: this.hidden()
110 }; 108 };
111//MochiKit.Logging.logDebug("<<< RecordField.serializeData"); 109//MochiKit.Logging.logDebug("<<< RecordField.serializeData");
112 110
113 return result; 111 return result;
114 }, 112 },
115 113
116 //------------------------------------------------------------------------- 114 //-------------------------------------------------------------------------
117 115
118 'typeShortDescription': function() { 116 'typeShortDescription': function() {
119 // return Clipperz.PM.DataModel.RecordField.TypeDescriptions[this.type()]['shortDescription']; 117 // return Clipperz.PM.DataModel.RecordField.TypeDescriptions[this.type()]['shortDescription'];
120 return Clipperz.PM.Strings['recordFieldTypologies'][this.type()]['shortDescription']; 118 return Clipperz.PM.Strings['recordFieldTypologies'][this.type()]['shortDescription'];
121 }, 119 },
122 120
123 //------------------------------------------------------------------------- 121 //-------------------------------------------------------------------------
124 122
125 'hidden': function() { 123 'hidden': function() {
126 return this._hidden; 124 return this._hidden;
127 }, 125 },
128 126
129 'setHidden': function(aValue) { 127 'setHidden': function(aValue) {
130 this._hidden = aValue; 128 this._hidden = aValue;
131 }, 129 },
132 130
133 //------------------------------------------------------------------------- 131 //-------------------------------------------------------------------------
134 132
135 'clone': function(aRecordVersion) { 133 'clone': function(aRecordVersion) {
136 var result; 134 var result;
137 135
138 result = new Clipperz.PM.DataModel.RecordField({ 136 result = new Clipperz.PM.DataModel.RecordField({
139 recordVersion:aRecordVersion, 137 recordVersion:aRecordVersion,
140 label:this.label(), 138 label:this.label(),
141 value:this.value(), 139 value:this.value(),
142 type:this.type(), 140 type:this.type(),
143 hidden:this.hidden() 141 hidden:this.hidden()
144 }); 142 });
145 143
146 return result; 144 return result;
147 }, 145 },
148 146
149 //------------------------------------------------------------------------- 147 //-------------------------------------------------------------------------
150 148
151 'isEmpty': function() { 149 'isEmpty': function() {
152 var result; 150 var result;
153 151
154 if ((this.label() == "") && (this.value() == "") && (this.type() == 'TXT')) { 152 if ((this.label() == "") && (this.value() == "") && (this.type() == 'TXT')) {
155 result = true; 153 result = true;
156 } else { 154 } else {
157 result = false; 155 result = false;
158 } 156 }
159 157
160 return result; 158 return result;
161 }, 159 },
162 160
163 //------------------------------------------------------------------------- 161 //-------------------------------------------------------------------------
164 __syntaxFix__: "syntax fix" 162 __syntaxFix__: "syntax fix"
165 163
166}); 164});
167 165
168//############################################################################# 166//#############################################################################
169/* 167/*
170Clipperz.PM.DataModel.RecordField.TypeDescriptions = { 168Clipperz.PM.DataModel.RecordField.TypeDescriptions = {
171 'TXT': { 169 'TXT': {
172 description: 'simple text field', 170 description: 'simple text field',
173 shortDescription: 'txt' 171 shortDescription: 'txt'
174 }, 172 },
175 'PWD': { 173 'PWD': {
176 description: 'simple text field, with default status set to hidden', 174 description: 'simple text field, with default status set to hidden',
177 shortDescription: 'pwd' 175 shortDescription: 'pwd'
178 }, 176 },
179 'URL': { 177 'URL': {
180 description: 'simple text field in edit mode, that became an active url in view mode', 178 description: 'simple text field in edit mode, that became an active url in view mode',
181 shortDescription: 'url' 179 shortDescription: 'url'
182 }, 180 },
183 'DATE': { 181 'DATE': {
184 description: 'a value set with a calendar helper', 182 description: 'a value set with a calendar helper',
185 shortDescription: 'date' 183 shortDescription: 'date'
186 }, 184 },
187 'ADDR': { 185 'ADDR': {
188 description: 'just like the URL, but the active link points to Google Maps (or similar service) passing the address value as argument', 186 description: 'just like the URL, but the active link points to Google Maps (or similar service) passing the address value as argument',
189 shortDescription: 'addr' 187 shortDescription: 'addr'
190 }, 188 },
191 'CHECK': { 189 'CHECK': {
192 description: 'check description', 190 description: 'check description',
193 shortDescription: 'check' 191 shortDescription: 'check'
194 }, 192 },
195 'RADIO': { 193 'RADIO': {
196 description: 'radio description', 194 description: 'radio description',
197 shortDescription: 'radio' 195 shortDescription: 'radio'
198 }, 196 },
199 'SELECT': { 197 'SELECT': {
200 description: 'select description', 198 description: 'select description',
201 shortDescription: 'select' 199 shortDescription: 'select'
202 } 200 }
203 201
204 //'NOTE': { 202 //'NOTE': {
205 // description: 'a simple text field, but with a bigger component dimension; possibly with "smart edit components"', 203 // description: 'a simple text field, but with a bigger component dimension; possibly with "smart edit components"',
206 // shortDescription: 'note' 204 // shortDescription: 'note'
207 //} 205 //}
208}; 206};
209 207
210Clipperz.PM.DataModel.RecordField.InputTypeToRecordFieldType = { 208Clipperz.PM.DataModel.RecordField.InputTypeToRecordFieldType = {
211 'text': 'TXT', 209 'text': 'TXT',
212 'password': 'PWD', 210 'password': 'PWD',
213 'checkbox': 'CHECK', 211 'checkbox': 'CHECK',
214 'radio': 'RADIO', 212 'radio': 'RADIO',
215 'select': 'SELECT' 213 'select': 'SELECT'
216}; 214};
217*/ 215*/
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/RecordVersion.js b/frontend/beta/js/Clipperz/PM/DataModel/RecordVersion.js
index fc4a45c..69a7d91 100644
--- a/frontend/beta/js/Clipperz/PM/DataModel/RecordVersion.js
+++ b/frontend/beta/js/Clipperz/PM/DataModel/RecordVersion.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } 26if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
29 27
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.DataModel.RecordVersion = function(aRecord, args) { 31Clipperz.PM.DataModel.RecordVersion = function(aRecord, args) {
34 args = args || {}; 32 args = args || {};
35 33
36 this._record = aRecord; 34 this._record = aRecord;
37 35
38 this._reference = args.reference || Clipperz.PM.Crypto.randomKey(); 36 this._reference = args.reference || Clipperz.PM.Crypto.randomKey();
39 this._version = args.version || Clipperz.PM.Crypto.encryptingFunctions.currentVersion; 37 this._version = args.version || Clipperz.PM.Crypto.encryptingFunctions.currentVersion;
40 this._key = args.key || Clipperz.PM.Crypto.randomKey();; 38 this._key = args.key || Clipperz.PM.Crypto.randomKey();;
41 39
42 this._previousVersion = args.previousVersion || null; 40 this._previousVersion = args.previousVersion || null;
43 this._previousVersionKey = args.previousVersionKey || null; 41 this._previousVersionKey = args.previousVersionKey || null;
44 42
45 this.setIsBrandNew(args.reference == null); 43 this.setIsBrandNew(args.reference == null);
46 44
47 if (this.isBrandNew()) { 45 if (this.isBrandNew()) {
48 this._fields = {}; 46 this._fields = {};
49 47
50 this.setShouldLoadData(false); 48 this.setShouldLoadData(false);
51 this.setShouldDecryptData(false); 49 this.setShouldDecryptData(false);
52 this.setShouldProcessData(false); 50 this.setShouldProcessData(false);
53 } else { 51 } else {
54 if (typeof(args.fields) != 'undefined') { 52 if (typeof(args.fields) != 'undefined') {
55 this.processFieldData(args.fields); 53 this.processFieldData(args.fields);
56 54
57 this.setShouldLoadData(false); 55 this.setShouldLoadData(false);
58 this.setShouldDecryptData(false); 56 this.setShouldDecryptData(false);
59 this.setShouldProcessData(false); 57 this.setShouldProcessData(false);
60 } else { 58 } else {
61 if (typeof(args.data) != 'undefined') { 59 if (typeof(args.data) != 'undefined') {
62 this.setShouldLoadData(false); 60 this.setShouldLoadData(false);
63 } else { 61 } else {
64 this.setShouldLoadData(true); 62 this.setShouldLoadData(true);
65 } 63 }
66 this.setShouldDecryptData(true); 64 this.setShouldDecryptData(true);
67 this.setShouldProcessData(true); 65 this.setShouldProcessData(true);
68 } 66 }
69 } 67 }
70 68
71 this._serverData = args.data; 69 this._serverData = args.data;
72 this._decryptedData = null; 70 this._decryptedData = null;
73 71
74 return this; 72 return this;
75} 73}
76 74
77Clipperz.PM.DataModel.RecordVersion.prototype = MochiKit.Base.update(null, { 75Clipperz.PM.DataModel.RecordVersion.prototype = MochiKit.Base.update(null, {
78 76
79 'toString': function() { 77 'toString': function() {
80 return "RecordVersion"; 78 return "RecordVersion";
81 }, 79 },
82 80
83 //------------------------------------------------------------------------- 81 //-------------------------------------------------------------------------
84 82
85 'record': function() { 83 'record': function() {
86 return this._record; 84 return this._record;
87 }, 85 },
88 86
89 //------------------------------------------------------------------------- 87 //-------------------------------------------------------------------------
90 88
91 'reference': function() { 89 'reference': function() {
92 return this._reference; 90 return this._reference;
93 }, 91 },
94 92
95 'setReference': function(aValue) { 93 'setReference': function(aValue) {
96 this._reference = aValue; 94 this._reference = aValue;
97 }, 95 },
98 96
99 //------------------------------------------------------------------------- 97 //-------------------------------------------------------------------------
100 98
101 'key': function() { 99 'key': function() {
102//MochiKit.Logging.logDebug(">>> RecordVersion.key"); 100//MochiKit.Logging.logDebug(">>> RecordVersion.key");
103//MochiKit.Logging.logDebug("--- RecordVersion.key - " + this._key); 101//MochiKit.Logging.logDebug("--- RecordVersion.key - " + this._key);
104 return this._key; 102 return this._key;
105 }, 103 },
106 104
107 'setKey': function(aValue) { 105 'setKey': function(aValue) {
108 this._key = aValue; 106 this._key = aValue;
109 }, 107 },
110 108
111 //------------------------------------------------------------------------- 109 //-------------------------------------------------------------------------
112 110
113 'serverData': function() { 111 'serverData': function() {
114 return this._serverData; 112 return this._serverData;
115 }, 113 },
116 114
117 'setServerData': function(aValue) { 115 'setServerData': function(aValue) {
118 this._serverData = aValue; 116 this._serverData = aValue;
119 this.setShouldLoadData(false); 117 this.setShouldLoadData(false);
120 return aValue; 118 return aValue;
121 }, 119 },
122 120
123 //------------------------------------------------------------------------- 121 //-------------------------------------------------------------------------
124 122
125 'decryptedData': function() { 123 'decryptedData': function() {
126//MochiKit.Logging.logDebug(">>> RecordVersion.decryptedData: " + (this._decryptedData ? Clipperz.Base.serializeJSON(aValue) : "null")); 124//MochiKit.Logging.logDebug(">>> RecordVersion.decryptedData: " + (this._decryptedData ? Clipperz.Base.serializeJSON(aValue) : "null"));
127 return this._decryptedData; 125 return this._decryptedData;
128 }, 126 },
129 127
130 'setDecryptedData': function(aValue) { 128 'setDecryptedData': function(aValue) {
131//MochiKit.Logging.logDebug(">>> RecordVersion.setDecryptedData: " + Clipperz.Base.serializeJSON(aValue)); 129//MochiKit.Logging.logDebug(">>> RecordVersion.setDecryptedData: " + Clipperz.Base.serializeJSON(aValue));
132 this._decryptedData = aValue; 130 this._decryptedData = aValue;
133 this.setShouldDecryptData(false); 131 this.setShouldDecryptData(false);
134 return aValue; 132 return aValue;
135 }, 133 },
136 134
137 //------------------------------------------------------------------------- 135 //-------------------------------------------------------------------------
138 136
139 'version': function() { 137 'version': function() {
140 return this._version; 138 return this._version;
141 }, 139 },
142 140
143 //------------------------------------------------------------------------- 141 //-------------------------------------------------------------------------
144 142
145 'isBrandNew': function() { 143 'isBrandNew': function() {
146 return this._isBrandNew; 144 return this._isBrandNew;
147 }, 145 },
148 146
149 'setIsBrandNew': function(aValue) { 147 'setIsBrandNew': function(aValue) {
150 this._isBrandNew = aValue; 148 this._isBrandNew = aValue;
151 }, 149 },
152 150
153 //------------------------------------------------------------------------- 151 //-------------------------------------------------------------------------
154 152
155 'fields': function() { 153 'fields': function() {
156 return this._fields; 154 return this._fields;
157 }, 155 },
158 156
159 'addField': function(aField) { 157 'addField': function(aField) {
160 this.fields()[aField.key()] = aField; 158 this.fields()[aField.key()] = aField;
161 }, 159 },
162 160
163 'addNewField': function() { 161 'addNewField': function() {
164 varnewRecordField; 162 varnewRecordField;
165 163
166 newRecordField = new Clipperz.PM.DataModel.RecordField({recordVersion:this}); 164 newRecordField = new Clipperz.PM.DataModel.RecordField({recordVersion:this});
167 this.addField(newRecordField); 165 this.addField(newRecordField);
168 166
169 return newRecordField; 167 return newRecordField;
170 }, 168 },
171 169
172 'fieldWithName': function(aValue) { 170 'fieldWithName': function(aValue) {
173 varresult; 171 varresult;
174 var fieldValues; 172 var fieldValues;
175 var i,c; 173 var i,c;
176 174
177 result = null; 175 result = null;
178 fieldValues = MochiKit.Base.values(this.fields()); 176 fieldValues = MochiKit.Base.values(this.fields());
179 c = fieldValues.length; 177 c = fieldValues.length;
180 for (i=0; (i<c) && (result == null); i++) { 178 for (i=0; (i<c) && (result == null); i++) {
181 varcurrentField; 179 varcurrentField;
182 180
183 currentField = fieldValues[i]; 181 currentField = fieldValues[i];
184 if (currentField.label() == aValue) { 182 if (currentField.label() == aValue) {
185 result = currentField; 183 result = currentField;
186 } 184 }
187 } 185 }
188 186
189 return result; 187 return result;
190 }, 188 },
191 189
192 //------------------------------------------------------------------------- 190 //-------------------------------------------------------------------------
193 191
194 'shouldLoadData': function() { 192 'shouldLoadData': function() {
195 return this._shouldLoadData; 193 return this._shouldLoadData;
196 }, 194 },
197 195
198 'setShouldLoadData': function(aValue) { 196 'setShouldLoadData': function(aValue) {
199 this._shouldLoadData = aValue; 197 this._shouldLoadData = aValue;
200 }, 198 },
201 199
202 //------------------------------------------------------------------------- 200 //-------------------------------------------------------------------------
203 201
204 'shouldDecryptData': function() { 202 'shouldDecryptData': function() {
205 return this._shouldDecryptData; 203 return this._shouldDecryptData;
206 }, 204 },
207 205
208 'setShouldDecryptData': function(aValue) { 206 'setShouldDecryptData': function(aValue) {
209 this._shouldDecryptData = aValue; 207 this._shouldDecryptData = aValue;
210 }, 208 },
211 209
212 //------------------------------------------------------------------------- 210 //-------------------------------------------------------------------------
213 211
214 'shouldProcessData': function() { 212 'shouldProcessData': function() {
215 return this._shouldProcessData; 213 return this._shouldProcessData;
216 }, 214 },
217 215
218 'setShouldProcessData': function(aValue) { 216 'setShouldProcessData': function(aValue) {
219 this._shouldProcessData = aValue; 217 this._shouldProcessData = aValue;
220 }, 218 },
221 219
222 //------------------------------------------------------------------------- 220 //-------------------------------------------------------------------------
223 221
224 'deferredData': function() { 222 'deferredData': function() {
225 var deferredResult; 223 var deferredResult;
226 224
227//MochiKit.Logging.logDebug(">>> RecordVersion.deferredData - this: " + this); 225//MochiKit.Logging.logDebug(">>> RecordVersion.deferredData - this: " + this);
228 deferredResult = new MochiKit.Async.Deferred(); 226 deferredResult = new MochiKit.Async.Deferred();
229 deferredResult.addCallback(MochiKit.Base.method(this, 'loadData')); 227 deferredResult.addCallback(MochiKit.Base.method(this, 'loadData'));
230 deferredResult.addCallback(MochiKit.Base.method(this, 'decryptData')); 228 deferredResult.addCallback(MochiKit.Base.method(this, 'decryptData'));
231 deferredResult.addCallback(MochiKit.Base.method(this, 'processData')); 229 deferredResult.addCallback(MochiKit.Base.method(this, 'processData'));
232 deferredResult.callback(); 230 deferredResult.callback();
233//MochiKit.Logging.logDebug("<<< RecordVersion.deferredData"); 231//MochiKit.Logging.logDebug("<<< RecordVersion.deferredData");
234 232
235 return deferredResult; 233 return deferredResult;
236 }, 234 },
237 235
238 //------------------------------------------------------------------------- 236 //-------------------------------------------------------------------------
239 237
240 'loadData': function() { 238 'loadData': function() {
241 var result; 239 var result;
242 240
243//MochiKit.Logging.logDebug(">>> RecordVersion.loadData - this: " + this); 241//MochiKit.Logging.logDebug(">>> RecordVersion.loadData - this: " + this);
244 if (this.shouldLoadData()) { 242 if (this.shouldLoadData()) {
245 var deferredResult; 243 var deferredResult;
246 244
247 alert("ERROR: this should have not happened yet!"); 245 alert("ERROR: this should have not happened yet!");
248//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 1"); 246//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 1");
249 deferredResult = new MochiKit.Async.Deferred(); 247 deferredResult = new MochiKit.Async.Deferred();
250//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 2"); 248//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 2");
251 deferredResult.addCallback(MochiKit.Base.method(this, 'notify'), 'loadingRecordVersionData'); 249 deferredResult.addCallback(MochiKit.Base.method(this, 'notify'), 'loadingRecordVersionData');
252//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 3"); 250//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 3");
253 deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'getRecordVersionDetail', {reference: this.reference()}); 251 deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'getRecordVersionDetail', {reference: this.reference()});
254//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 4"); 252//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 4");
255 deferredResult.addCallback(MochiKit.Base.method(this, 'setServerData')); 253 deferredResult.addCallback(MochiKit.Base.method(this, 'setServerData'));
256//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 5"); 254//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 5");
257 deferredResult.callback(); 255 deferredResult.callback();
258//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 6"); 256//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 6");
259 result = deferredResult; 257 result = deferredResult;
260//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 7"); 258//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 7");
261 } else { 259 } else {
262//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 8"); 260//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 8");
263 result = MochiKit.Async.succeed(this.serverData()); 261 result = MochiKit.Async.succeed(this.serverData());
264//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 9"); 262//MochiKit.Logging.logDebug("--- RecordVersion.loadData - 9");
265 } 263 }
266//MochiKit.Logging.logDebug("<<< RecordVersion.loadData"); 264//MochiKit.Logging.logDebug("<<< RecordVersion.loadData");
267 265
268 return result; 266 return result;
269 }, 267 },
270 268
271 //------------------------------------------------------------------------- 269 //-------------------------------------------------------------------------
272 270
273 'decryptData': function(anEncryptedData) { 271 'decryptData': function(anEncryptedData) {
274 var result; 272 var result;
275 273
276//MochiKit.Logging.logDebug(">>> RecordVersion.decryptData - this: " + this + " (" + anEncryptedData + ")"); 274//MochiKit.Logging.logDebug(">>> RecordVersion.decryptData - this: " + this + " (" + anEncryptedData + ")");
277 if (this.shouldDecryptData()) { 275 if (this.shouldDecryptData()) {
278 var deferredResult; 276 var deferredResult;
279 277
280//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 1"); 278//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 1");
281 deferredResult = new MochiKit.Async.Deferred(); 279 deferredResult = new MochiKit.Async.Deferred();
282//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 2"); 280//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 2");
283//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RecordVersion.decryptData 1: " + res); return res;}); 281//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RecordVersion.decryptData 1: " + res); return res;});
284 deferredResult.addCallback(MochiKit.Base.method(this, 'notify'), 'decryptingRecordVersionData'); 282 deferredResult.addCallback(MochiKit.Base.method(this, 'notify'), 'decryptingRecordVersionData');
285//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 3"); 283//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 3");
286//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RecordVersion.decryptData 2: " + res); return res;}); 284//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RecordVersion.decryptData 2: " + res); return res;});
287 deferredResult.addCallback(Clipperz.PM.Crypto.deferredDecrypt, this.key(), anEncryptedData, this.version()); 285 deferredResult.addCallback(Clipperz.PM.Crypto.deferredDecrypt, this.key(), anEncryptedData, this.version());
288//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 4"); 286//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 4");
289//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RecordVersion.decryptData 3: " + res); return res;}); 287//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RecordVersion.decryptData 3: " + res); return res;});
290//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 5"); 288//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 5");
291//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RecordVersion.decryptData 4: " + res); return res;}); 289//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RecordVersion.decryptData 4: " + res); return res;});
292 deferredResult.addCallback(MochiKit.Base.method(this, 'setDecryptedData')); 290 deferredResult.addCallback(MochiKit.Base.method(this, 'setDecryptedData'));
293//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 6"); 291//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 6");
294//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RecordVersion.decryptData 5: " + res); return res;}); 292//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("RecordVersion.decryptData 5: " + res); return res;});
295 deferredResult.callback(); 293 deferredResult.callback();
296//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 7"); 294//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 7");
297 result = deferredResult; 295 result = deferredResult;
298//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 8"); 296//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 8");
299 } else { 297 } else {
300//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 9"); 298//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 9");
301 result = MochiKit.Async.succeed(this.decryptedData()); 299 result = MochiKit.Async.succeed(this.decryptedData());
302//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 10"); 300//MochiKit.Logging.logDebug("--- RecordVersion.decryptData - 10");
303 } 301 }
304//MochiKit.Logging.logDebug("<<< RecordVersion.decryptData"); 302//MochiKit.Logging.logDebug("<<< RecordVersion.decryptData");
305 303
306 return result; 304 return result;
307 }, 305 },
308 306
309 //------------------------------------------------------------------------- 307 //-------------------------------------------------------------------------
310 308
311 'processFieldData': function(someValues) { 309 'processFieldData': function(someValues) {
312 var fieldValues; 310 var fieldValues;
313 311
314 this._fields = {}; 312 this._fields = {};
315 313
316 if (typeof(someValues) == 'undefined') { 314 if (typeof(someValues) == 'undefined') {
317 fieldValues = {}; 315 fieldValues = {};
318 } else { 316 } else {
319 fieldValues = someValues; 317 fieldValues = someValues;
320 } 318 }
321 319
322 if (fieldValues.constructor == Array) { 320 if (fieldValues.constructor == Array) {
323 var i, c; 321 var i, c;
324 c = fieldValues.length; 322 c = fieldValues.length;
325 for (i=0; i<c; i++) { 323 for (i=0; i<c; i++) {
326 var newRecordField; 324 var newRecordField;
327 var currentFieldValues; 325 var currentFieldValues;
328 326
329 currentFieldValues = fieldValues[i]; 327 currentFieldValues = fieldValues[i];
330 currentFieldValues['recordVersion'] = this; 328 currentFieldValues['recordVersion'] = this;
331 newRecordField = new Clipperz.PM.DataModel.RecordField(currentFieldValues); 329 newRecordField = new Clipperz.PM.DataModel.RecordField(currentFieldValues);
332 this._fields[newRecordField.key()] = newRecordField; 330 this._fields[newRecordField.key()] = newRecordField;
333 } 331 }
334 332
335 } else { 333 } else {
336 var fieldKey; 334 var fieldKey;
337 335
338 for (fieldKey in fieldValues) { 336 for (fieldKey in fieldValues) {
339 var newRecordField; 337 var newRecordField;
340 var currentFieldValues; 338 var currentFieldValues;
341 339
342 currentFieldValues = fieldValues[fieldKey]; 340 currentFieldValues = fieldValues[fieldKey];
343 currentFieldValues['key'] = fieldKey; 341 currentFieldValues['key'] = fieldKey;
344 currentFieldValues['recordVersion'] = this; 342 currentFieldValues['recordVersion'] = this;
345 newRecordField = new Clipperz.PM.DataModel.RecordField(currentFieldValues); 343 newRecordField = new Clipperz.PM.DataModel.RecordField(currentFieldValues);
346 this._fields[fieldKey] = newRecordField; 344 this._fields[fieldKey] = newRecordField;
347 } 345 }
348 } 346 }
349 347
350 }, 348 },
351 349
352 'processData': function(someValues) { 350 'processData': function(someValues) {
353 if (this.shouldProcessData()) { 351 if (this.shouldProcessData()) {
354 this.processFieldData(someValues.fields); 352 this.processFieldData(someValues.fields);
355 this.setShouldProcessData(false); 353 this.setShouldProcessData(false);
356 } 354 }
357 355
358 this.notify('recordVersionDataReady'); 356 this.notify('recordVersionDataReady');
359 357
360 return this; 358 return this;
361 }, 359 },
362 360
363 //------------------------------------------------------------------------- 361 //-------------------------------------------------------------------------
364 362
365 'notify': function(aValue) { 363 'notify': function(aValue) {
366 Clipperz.NotificationCenter.notify(this, aValue); 364 Clipperz.NotificationCenter.notify(this, aValue);
367 }, 365 },
368 366
369 //------------------------------------------------------------------------- 367 //-------------------------------------------------------------------------
370 368
371 'removeField': function(aField) { 369 'removeField': function(aField) {
372 delete this.fields()[aField.key()]; 370 delete this.fields()[aField.key()];
373 }, 371 },
374 372
375 //------------------------------------------------------------------------- 373 //-------------------------------------------------------------------------
376 374
377 'previousVersion': function() { 375 'previousVersion': function() {
378 return this._previousVersion; 376 return this._previousVersion;
379 }, 377 },
380 378
381 'setPreviousVersion': function(aValue) { 379 'setPreviousVersion': function(aValue) {
382 this._previousVersion = aValue; 380 this._previousVersion = aValue;
383 }, 381 },
384 382
385 //------------------------------------------------------------------------- 383 //-------------------------------------------------------------------------
386 384
387 'previousVersionKey': function() { 385 'previousVersionKey': function() {
388 return this._previousVersionKey; 386 return this._previousVersionKey;
389 }, 387 },
390 388
391 'setPreviousVersionKey': function(aValue) { 389 'setPreviousVersionKey': function(aValue) {
392 this._previousVersionKey = aValue; 390 this._previousVersionKey = aValue;
393 }, 391 },
394 392
395 //------------------------------------------------------------------------- 393 //-------------------------------------------------------------------------
396 394
397 'serializedData': function() { 395 'serializedData': function() {
398 var result; 396 var result;
399 varfieldKey; 397 varfieldKey;
400 398
401//MochiKit.Logging.logDebug(">>> RecordVersion.serializedData"); 399//MochiKit.Logging.logDebug(">>> RecordVersion.serializedData");
402 result = { 400 result = {
403 fields: {} 401 fields: {}
404 }; 402 };
405//MochiKit.Logging.logDebug("--- RecordVersion.serializedData - 1"); 403//MochiKit.Logging.logDebug("--- RecordVersion.serializedData - 1");
406 404
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/Statistics.js b/frontend/beta/js/Clipperz/PM/DataModel/Statistics.js
index 3d53adf..f0c229e 100644
--- a/frontend/beta/js/Clipperz/PM/DataModel/Statistics.js
+++ b/frontend/beta/js/Clipperz/PM/DataModel/Statistics.js
@@ -1,130 +1,128 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } 26if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
29 27
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.DataModel.Statistics = function(args) { 31Clipperz.PM.DataModel.Statistics = function(args) {
34 args = args || {}; 32 args = args || {};
35 33
36 this._user = args.user; 34 this._user = args.user;
37 this._data = args.data || null; 35 this._data = args.data || null;
38 36
39 return this; 37 return this;
40} 38}
41 39
42Clipperz.PM.DataModel.Statistics.prototype = MochiKit.Base.update(null, { 40Clipperz.PM.DataModel.Statistics.prototype = MochiKit.Base.update(null, {
43 41
44 //------------------------------------------------------------------------- 42 //-------------------------------------------------------------------------
45 43
46 'decrypt': function(aVersion, someEncryptedData) { 44 'decrypt': function(aVersion, someEncryptedData) {
47 var deferredResult; 45 var deferredResult;
48 46
49//MochiKit.Logging.logDebug(">>> Statistics.decrypt"); 47//MochiKit.Logging.logDebug(">>> Statistics.decrypt");
50 if (someEncryptedData == Clipperz.PM.Crypto.nullValue) { 48 if (someEncryptedData == Clipperz.PM.Crypto.nullValue) {
51 this.setData({}); 49 this.setData({});
52 deferredResult = MochiKit.Async.succeed(this.data()); 50 deferredResult = MochiKit.Async.succeed(this.data());
53 } else { 51 } else {
54 varstatistic; 52 varstatistic;
55 var user; 53 var user;
56 54
57 statistic = this; 55 statistic = this;
58 user = this.user(); 56 user = this.user();
59 deferredResult = new MochiKit.Async.Deferred(); 57 deferredResult = new MochiKit.Async.Deferred();
60//deferredResult.addCallback(function() { console.time("Statistics.decrypt.deferredDecrypt")}); 58//deferredResult.addCallback(function() { console.time("Statistics.decrypt.deferredDecrypt")});
61 deferredResult.addCallback(Clipperz.PM.Crypto.deferredDecrypt, user.passphrase(), someEncryptedData, aVersion); 59 deferredResult.addCallback(Clipperz.PM.Crypto.deferredDecrypt, user.passphrase(), someEncryptedData, aVersion);
62//deferredResult.addCallback(function() { console.timeEnd("Statistics.decrypt.deferredDecrypt")}); 60//deferredResult.addCallback(function() { console.timeEnd("Statistics.decrypt.deferredDecrypt")});
63//deferredResult.addCallback(function() { console.time("Statistics.decrypt.setup")}); 61//deferredResult.addCallback(function() { console.time("Statistics.decrypt.setup")});
64 deferredResult.addCallbacks( 62 deferredResult.addCallbacks(
65 MochiKit.Base.partial(function (aStatistic, someData) { 63 MochiKit.Base.partial(function (aStatistic, someData) {
66 aStatistic.setData(someData); 64 aStatistic.setData(someData);
67 return aStatistic.data(); 65 return aStatistic.data();
68 }, statistic), 66 }, statistic),
69 MochiKit.Base.partial(function (aStatistic) { 67 MochiKit.Base.partial(function (aStatistic) {
70 MochiKit.Logging.logWarning("resetting user statistics due to an error while decrypting stored data"); 68 MochiKit.Logging.logWarning("resetting user statistics due to an error while decrypting stored data");
71 aStatistic.setData({}); 69 aStatistic.setData({});
72 return aStatistic.data(); 70 return aStatistic.data();
73 }, statistic) 71 }, statistic)
74 ); 72 );
75//deferredResult.addCallback(function() { console.timeEnd("Statistics.decrypt.setup")}); 73//deferredResult.addCallback(function() { console.timeEnd("Statistics.decrypt.setup")});
76 74
77 deferredResult.callback(); 75 deferredResult.callback();
78 } 76 }
79//MochiKit.Logging.logDebug("<<< Statistics.decrypt"); 77//MochiKit.Logging.logDebug("<<< Statistics.decrypt");
80 78
81 return deferredResult; 79 return deferredResult;
82 }, 80 },
83 81
84 //------------------------------------------------------------------------- 82 //-------------------------------------------------------------------------
85 83
86 'user': function() { 84 'user': function() {
87 return this._user; 85 return this._user;
88 }, 86 },
89 87
90 //------------------------------------------------------------------------- 88 //-------------------------------------------------------------------------
91 89
92 'data': function() { 90 'data': function() {
93 return this._data; 91 return this._data;
94 }, 92 },
95 93
96 'setData': function(aValue) { 94 'setData': function(aValue) {
97 this._data = aValue; 95 this._data = aValue;
98 96
99 this.extractInfoFromData(aValue); 97 this.extractInfoFromData(aValue);
100 }, 98 },
101 99
102 //------------------------------------------------------------------------- 100 //-------------------------------------------------------------------------
103 101
104 'extractInfoFromData': function(someValues) { 102 'extractInfoFromData': function(someValues) {
105 103
106 }, 104 },
107 105
108 //------------------------------------------------------------------------- 106 //-------------------------------------------------------------------------
109 107
110 'encryptedData': function() { 108 'encryptedData': function() {
111 return Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion(this.user().passphrase(), this.serializedData()); 109 return Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion(this.user().passphrase(), this.serializedData());
112 }, 110 },
113 111
114 //------------------------------------------------------------------------- 112 //-------------------------------------------------------------------------
115 113
116 'serializedData': function() { 114 'serializedData': function() {
117 var result; 115 var result;
118 116
119//MochiKit.Logging.logDebug(">>> Statistics.serializedData"); 117//MochiKit.Logging.logDebug(">>> Statistics.serializedData");
120 result = {}; 118 result = {};
121//MochiKit.Logging.logDebug("<<< Statistics.serializedData"); 119//MochiKit.Logging.logDebug("<<< Statistics.serializedData");
122 120
123 return result; 121 return result;
124 }, 122 },
125 123
126 //------------------------------------------------------------------------- 124 //-------------------------------------------------------------------------
127 __syntaxFix__: "syntax fix" 125 __syntaxFix__: "syntax fix"
128 126
129}); 127});
130 128
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/User.js b/frontend/beta/js/Clipperz/PM/DataModel/User.js
index b29d224..3067742 100644
--- a/frontend/beta/js/Clipperz/PM/DataModel/User.js
+++ b/frontend/beta/js/Clipperz/PM/DataModel/User.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } 26if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
29 27
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.DataModel.User = function(args) { 31Clipperz.PM.DataModel.User = function(args) {
34//MochiKit.Logging.logDebug(">>> new User"); 32//MochiKit.Logging.logDebug(">>> new User");
35 args = args || {}; 33 args = args || {};
36 34
37 this._username = args.username || null; 35 this._username = args.username || null;
38 this._passphrase = args.passphrase || null; 36 this._passphrase = args.passphrase || null;
39 37
40 this._connection = null; 38 this._connection = null;
41 this._connectionVersion = 'current'; 39 this._connectionVersion = 'current';
42 40
43 this._header = null; 41 this._header = null;
44 this._statistics = null; 42 this._statistics = null;
45 this._lock = 'new lock'; 43 this._lock = 'new lock';
46 44
47 this._preferences = null; 45 this._preferences = null;
48 this._records = {}; 46 this._records = {};
49 this._directLoginReferences = {}; 47 this._directLoginReferences = {};
50 this._oneTimePasswordManager = null; 48 this._oneTimePasswordManager = null;
51 49
52 this._isLoadingUserDetails = false; 50 this._isLoadingUserDetails = false;
53 this._loadingUserDetailsPendingQueue = []; 51 this._loadingUserDetailsPendingQueue = [];
54 52
55 this._maxNumberOfRecords = Number.MAX_VALUE; 53 this._maxNumberOfRecords = Number.MAX_VALUE;
56 54
57 this._shouldDownloadOfflineCopy = false; 55 this._shouldDownloadOfflineCopy = false;
58 56
59 this._loginInfo = null; 57 this._loginInfo = null;
60 this._loginHistory = null; 58 this._loginHistory = null;
61 59
62 this._serverData = null; 60 this._serverData = null;
63//MochiKit.Logging.logDebug("<<< new User"); 61//MochiKit.Logging.logDebug("<<< new User");
64 62
65 return this; 63 return this;
66} 64}
67 65
68Clipperz.PM.DataModel.User.prototype = MochiKit.Base.update(null, { 66Clipperz.PM.DataModel.User.prototype = MochiKit.Base.update(null, {
69 67
70 'toString': function() { 68 'toString': function() {
71 return "Clipperz.PM.DataModel.User - " + this.username(); 69 return "Clipperz.PM.DataModel.User - " + this.username();
72 }, 70 },
73 71
74 //------------------------------------------------------------------------- 72 //-------------------------------------------------------------------------
75 73
76 'username': function() { 74 'username': function() {
77 return this._username; 75 return this._username;
78 }, 76 },
79 77
80 'setUsername': function(aValue) { 78 'setUsername': function(aValue) {
81 this._username = aValue; 79 this._username = aValue;
82 }, 80 },
83 81
84 //------------------------------------------------------------------------- 82 //-------------------------------------------------------------------------
85 83
86 'passphrase': function() { 84 'passphrase': function() {
87 return this._passphrase; 85 return this._passphrase;
88 }, 86 },
89 87
90 'setPassphrase': function(aValue) { 88 'setPassphrase': function(aValue) {
91 this._passphrase = aValue; 89 this._passphrase = aValue;
92 }, 90 },
93 91
94 //------------------------------------------------------------------------- 92 //-------------------------------------------------------------------------
95 93
96 'maxNumberOfRecords': function() { 94 'maxNumberOfRecords': function() {
97 return this._maxNumberOfRecords; 95 return this._maxNumberOfRecords;
98 }, 96 },
99 97
100 'setMaxNumberOfRecords': function(aValue) { 98 'setMaxNumberOfRecords': function(aValue) {
101 this._maxNumberOfRecords = aValue; 99 this._maxNumberOfRecords = aValue;
102 }, 100 },
103 101
104 //------------------------------------------------------------------------- 102 //-------------------------------------------------------------------------
105 103
106 'errorHandler': function(anErrorString, anException) { 104 'errorHandler': function(anErrorString, anException) {
107MochiKit.Logging.logError("- User.errorHandler: " + anErrorString + " (" + anException + ")"); 105MochiKit.Logging.logError("- User.errorHandler: " + anErrorString + " (" + anException + ")");
108 }, 106 },
109 107
110 //------------------------------------------------------------------------- 108 //-------------------------------------------------------------------------
111 109
112 'connectionVersion': function() { 110 'connectionVersion': function() {
113 return this._connectionVersion; 111 return this._connectionVersion;
114 }, 112 },
115 113
116 'setConnectionVersion': function(aValue) { 114 'setConnectionVersion': function(aValue) {
117 this._connectionVersion = aValue; 115 this._connectionVersion = aValue;
118 }, 116 },
119 117
120 //------------------------------------------------------------------------- 118 //-------------------------------------------------------------------------
121 119
122 'connection': function() { 120 'connection': function() {
123 if ((this._connection == null) && (this.connectionVersion() != null) ){ 121 if ((this._connection == null) && (this.connectionVersion() != null) ){
124 this._connection = new Clipperz.PM.Crypto.communicationProtocol.versions[this.connectionVersion()]({user:this}); 122 this._connection = new Clipperz.PM.Crypto.communicationProtocol.versions[this.connectionVersion()]({user:this});
125 } 123 }
126 124
127 return this._connection; 125 return this._connection;
128 }, 126 },
129 127
130 'resetConnection': function(aValue) { 128 'resetConnection': function(aValue) {
131 this._connection = null; 129 this._connection = null;
132 }, 130 },
133 131
134 //========================================================================= 132 //=========================================================================
135 133
136 'register': function(anInvitationCode) { 134 'register': function(anInvitationCode) {
137 vardeferredResult; 135 vardeferredResult;
138 var prng; 136 var prng;
139 137
140//MochiKit.Logging.logError(">>> User.register: " + this); 138//MochiKit.Logging.logError(">>> User.register: " + this);
141 prng = Clipperz.Crypto.PRNG.defaultRandomGenerator(); 139 prng = Clipperz.Crypto.PRNG.defaultRandomGenerator();
142 140
143 deferredResult = new MochiKit.Async.Deferred() 141 deferredResult = new MochiKit.Async.Deferred()
144//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.register - 1: " + res); return res;}); 142//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.register - 1: " + res); return res;});
145 deferredResult.addCallback(MochiKit.Base.method(prng, 'deferredEntropyCollection')); 143 deferredResult.addCallback(MochiKit.Base.method(prng, 'deferredEntropyCollection'));
146//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.register - 2: " + res); return res;}); 144//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.register - 2: " + res); return res;});
147 deferredResult.addCallback(MochiKit.Base.method(this.header(), 'updateAllSections'), anInvitationCode); 145 deferredResult.addCallback(MochiKit.Base.method(this.header(), 'updateAllSections'), anInvitationCode);
148//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.register - 2.1: " + res); return res;}); 146//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.register - 2.1: " + res); return res;});
149 deferredResult.addCallback(MochiKit.Base.method(this.connection(), 'register'), anInvitationCode); 147 deferredResult.addCallback(MochiKit.Base.method(this.connection(), 'register'), anInvitationCode);
150//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.register - 3: " + res); return res;}); 148//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.register - 3: " + res); return res;});
151 deferredResult.callback(); 149 deferredResult.callback();
152//MochiKit.Logging.logError("<<< User.register"); 150//MochiKit.Logging.logError("<<< User.register");
153 151
154 return deferredResult; 152 return deferredResult;
155 }, 153 },
156 154
157 //========================================================================= 155 //=========================================================================
158 156
159 'connect': function(aValue) { 157 'connect': function(aValue) {
160 vardeferredResult; 158 vardeferredResult;
161 var prng; 159 var prng;
162 160
163 prng = Clipperz.Crypto.PRNG.defaultRandomGenerator(); 161 prng = Clipperz.Crypto.PRNG.defaultRandomGenerator();
164 162
165//MochiKit.Logging.logDebug(">>> User.connect"); 163//MochiKit.Logging.logDebug(">>> User.connect");
166 deferredResult = new MochiKit.Async.Deferred(); 164 deferredResult = new MochiKit.Async.Deferred();
167//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.1 - User.connect - 1: "/* + res*/); return res;}); 165//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.1 - User.connect - 1: "/* + res*/); return res;});
168//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 166//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
169 deferredResult.addCallback(MochiKit.Base.method(prng, 'deferredEntropyCollection')); 167 deferredResult.addCallback(MochiKit.Base.method(prng, 'deferredEntropyCollection'));
170//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.2 - User.connect - 2: "/* + res*/); return res;}); 168//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.2 - User.connect - 2: "/* + res*/); return res;});
171//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 169//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
172 deferredResult.addCallback(MochiKit.Base.method(this.connection(), 'login')); 170 deferredResult.addCallback(MochiKit.Base.method(this.connection(), 'login'));
173//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.3 - User.connect - 3: "/* + res*/); return res;}); 171//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.3 - User.connect - 3: "/* + res*/); return res;});
174//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 172//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
175 173
176 // TODO:add an addErrback call here to manage a wrong login. Any error after this point is due to some other causes. 174 // TODO:add an addErrback call here to manage a wrong login. Any error after this point is due to some other causes.
177 // possibly the same exact 'handleConnectionFallback use at the end of this same method. 175 // possibly the same exact 'handleConnectionFallback use at the end of this same method.
178 176
179 if (this.connectionVersion() != 'current') { 177 if (this.connectionVersion() != 'current') {
180 varcurrentConnection; 178 varcurrentConnection;
181 179
182 currentVersionConnection = new Clipperz.PM.Crypto.communicationProtocol.versions['current']({user:this}); 180 currentVersionConnection = new Clipperz.PM.Crypto.communicationProtocol.versions['current']({user:this});
183 181
184//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.4 - User.connect - 4: "/* + res*/); return res;}); 182//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.4 - User.connect - 4: "/* + res*/); return res;});
185//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 183//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
186 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'connection_upgrading'); 184 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'connection_upgrading');
187//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.5 - User.connect - 5: "/* + res*/); return res;}); 185//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.5 - User.connect - 5: "/* + res*/); return res;});
188//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 186//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
189 deferredResult.addCallback(MochiKit.Base.method(this.connection(), 'message'), 'upgradeUserCredentials', currentVersionConnection.serverSideUserCredentials()); 187 deferredResult.addCallback(MochiKit.Base.method(this.connection(), 'message'), 'upgradeUserCredentials', currentVersionConnection.serverSideUserCredentials());
190//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.6 - User.connect - 6: "/* + res*/); return res;}); 188//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.6 - User.connect - 6: "/* + res*/); return res;});
191//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 189//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
192 } 190 }
193 191
194//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.7 - User.connect - 7: "/* + res*/); return res;}); 192//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.7 - User.connect - 7: "/* + res*/); return res;});
195//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 193//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
196 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'userConnected', null); 194 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'userConnected', null);
197//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.8 - User.connect - 8: "/* + res*/); return res;}); 195//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.8 - User.connect - 8: "/* + res*/); return res;});
198//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 196//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
199 deferredResult.addErrback(MochiKit.Base.method(this, 'handleConnectionFallback')); 197 deferredResult.addErrback(MochiKit.Base.method(this, 'handleConnectionFallback'));
200//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.9 - User.connect - 9: "/* + res*/); return res;}); 198//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("1.2.9 - User.connect - 9: "/* + res*/); return res;});
201//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;}); 199//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
202 200
203 deferredResult.callback(aValue); 201 deferredResult.callback(aValue);
204//MochiKit.Logging.logDebug("<<< User.connect"); 202//MochiKit.Logging.logDebug("<<< User.connect");
205 203
206 return deferredResult; 204 return deferredResult;
207 }, 205 },
208 206
209 //......................................................................... 207 //.........................................................................
210 208
211 'handleConnectionFallback': function(aValue) { 209 'handleConnectionFallback': function(aValue) {
212 var result; 210 var result;
213//MochiKit.Logging.logDebug(">>> User.handleConnectionFallback"); 211//MochiKit.Logging.logDebug(">>> User.handleConnectionFallback");
214 if (aValue instanceof MochiKit.Async.CancelledError) { 212 if (aValue instanceof MochiKit.Async.CancelledError) {
215//MochiKit.Logging.logDebug("--- User.handleConnectionFallback - operation cancelled"); 213//MochiKit.Logging.logDebug("--- User.handleConnectionFallback - operation cancelled");
216 result = aValue; 214 result = aValue;
217 } else { 215 } else {
218 216
219//MochiKit.Logging.logDebug("--- User.handleConnectionFallback - an ERROR has occurred - " + aValue); 217//MochiKit.Logging.logDebug("--- User.handleConnectionFallback - an ERROR has occurred - " + aValue);
220 this.resetConnection(); 218 this.resetConnection();
221 this.setConnectionVersion(Clipperz.PM.Crypto.communicationProtocol.fallbackVersions[this.connectionVersion()]); 219 this.setConnectionVersion(Clipperz.PM.Crypto.communicationProtocol.fallbackVersions[this.connectionVersion()]);
222 220
223 if (this.connectionVersion() != null) { 221 if (this.connectionVersion() != null) {
224 result = new MochiKit.Async.Deferred(); 222 result = new MochiKit.Async.Deferred();
225 223
226 result.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'connection_tryOlderSchema'); 224 result.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'connection_tryOlderSchema');
227 result.addCallback(MochiKit.Base.method(this, 'connect')); 225 result.addCallback(MochiKit.Base.method(this, 'connect'));
228 result.callback(); 226 result.callback();
229 } else { 227 } else {
230 result = MochiKit.Async.fail(Clipperz.PM.DataModel.User.exception.LoginFailed); 228 result = MochiKit.Async.fail(Clipperz.PM.DataModel.User.exception.LoginFailed);
231 } 229 }
232 } 230 }
233//MochiKit.Logging.logDebug("<<< User.handleConnectionFallback"); 231//MochiKit.Logging.logDebug("<<< User.handleConnectionFallback");
234 return result; 232 return result;
235 }, 233 },
236 234
237 //========================================================================= 235 //=========================================================================
238 236
239 'header': function() { 237 'header': function() {
240 if (this._header == null) { 238 if (this._header == null) {
241 this._header = new Clipperz.PM.DataModel.Header({user:this}); 239 this._header = new Clipperz.PM.DataModel.Header({user:this});
242 } 240 }
243 return this._header; 241 return this._header;
244 }, 242 },
245 243
246 //------------------------------------------------------------------------- 244 //-------------------------------------------------------------------------
247 245
248 'statistics': function() { 246 'statistics': function() {
249 if (this._statistics == null) { 247 if (this._statistics == null) {
250 this._statistics = new Clipperz.PM.DataModel.Statistics({user:this}); 248 this._statistics = new Clipperz.PM.DataModel.Statistics({user:this});
251 } 249 }
252 return this._statistics; 250 return this._statistics;
253 }, 251 },
254 252
255 //------------------------------------------------------------------------- 253 //-------------------------------------------------------------------------
256 254
257 'records': function() { 255 'records': function() {
258 return this._records; 256 return this._records;
259 }, 257 },
260 258
261 //......................................................................... 259 //.........................................................................
262 260
263 'addRecord': function(aValue, isBatchUpdate) { 261 'addRecord': function(aValue, isBatchUpdate) {
264 this.records()[aValue.reference()] = aValue; 262 this.records()[aValue.reference()] = aValue;
265 263
266 if (isBatchUpdate != true) { 264 if (isBatchUpdate != true) {
267 Clipperz.NotificationCenter.notify(aValue, 'recordAdded', null, true); 265 Clipperz.NotificationCenter.notify(aValue, 'recordAdded', null, true);
268 Clipperz.NotificationCenter.notify(this, 'updatedSection', 'records', true); 266 Clipperz.NotificationCenter.notify(this, 'updatedSection', 'records', true);
269 } 267 }
270 }, 268 },
271 269
272 //----------------------------------------------------------------------------- 270 //-----------------------------------------------------------------------------
273 271
274 'addNewRecord': function() { 272 'addNewRecord': function() {
275 varrecord; 273 varrecord;
276 274
277//MochiKit.Logging.logDebug(">>> User.addNewRecord"); 275//MochiKit.Logging.logDebug(">>> User.addNewRecord");
278 record = new Clipperz.PM.DataModel.Record({user:this}); 276 record = new Clipperz.PM.DataModel.Record({user:this});
279 this.addRecord(record); 277 this.addRecord(record);
280 Clipperz.NotificationCenter.notify(this, 'updatedSection', 'records', true); 278 Clipperz.NotificationCenter.notify(this, 'updatedSection', 'records', true);
281//MochiKit.Logging.logDebug("<<< User.addNewRecord"); 279//MochiKit.Logging.logDebug("<<< User.addNewRecord");
282 280
283 return record; 281 return record;
284 }, 282 },
285 283
286 //------------------------------------------------------------------------- 284 //-------------------------------------------------------------------------
287 285
288 'saveRecords': function(someRecords /*, aMethodName*/) { 286 'saveRecords': function(someRecords /*, aMethodName*/) {
289 var deferredResult; 287 var deferredResult;
290 // var methodName; 288 // var methodName;
291 varresult; 289 varresult;
292 var i,c; 290 var i,c;
293 291
294//console.log("User.saveRecords - someRecords", someRecords); 292//console.log("User.saveRecords - someRecords", someRecords);
295 // methodName = aMethodName || 'addNewRecords'; 293 // methodName = aMethodName || 'addNewRecords';
296 294
297 Clipperz.NotificationCenter.notify(this, 'updatedSection', 'records', true); 295 Clipperz.NotificationCenter.notify(this, 'updatedSection', 'records', true);
298//MochiKit.Logging.logDebug(">>> User.saveRecords"); 296//MochiKit.Logging.logDebug(">>> User.saveRecords");
299//MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] User.saveRecords"); 297//MochiKit.Logging.logDebug(">>> [" + (new Date()).valueOf() + "] User.saveRecords");
300/* 298/*
301MochiKit.Logging.logDebug("--- User.saveRecords - 1"); 299MochiKit.Logging.logDebug("--- User.saveRecords - 1");
302 MochiKit.Iter.forEach(someRecords, function(aRecord) { 300 MochiKit.Iter.forEach(someRecords, function(aRecord) {
303 if (aRecord.headerNotes() != null) { 301 if (aRecord.headerNotes() != null) {
304 aRecord.setNotes(aRecord.headerNotes()); 302 aRecord.setNotes(aRecord.headerNotes());
305 } 303 }
306 aRecord.syncDirectLoginReferenceValues(); 304 aRecord.syncDirectLoginReferenceValues();
307 aRecord.currentVersion().createNewVersion(); 305 aRecord.currentVersion().createNewVersion();
308 aRecord.updateKey(); 306 aRecord.updateKey();
309 }); 307 });
310MochiKit.Logging.logDebug("--- User.saveRecords - 2"); 308MochiKit.Logging.logDebug("--- User.saveRecords - 2");
311*/ 309*/
312 310
313 result = { 311 result = {
314 'records': { 312 'records': {
315 // 'deleted': [], 313 // 'deleted': [],
316 'updated': [] 314 'updated': []
317 } 315 }
318 }; 316 };
319 317
320 deferredResult = new MochiKit.Async.Deferred(); 318 deferredResult = new MochiKit.Async.Deferred();
321 c = someRecords.length; 319 c = someRecords.length;
322 for (i=0; i<c; i++) { 320 for (i=0; i<c; i++) {
323 deferredResult.addCallback(function(aRecord) { 321 deferredResult.addCallback(function(aRecord) {
324 if (aRecord.headerNotes() != null) { 322 if (aRecord.headerNotes() != null) {
325 aRecord.setNotes(aRecord.headerNotes()); 323 aRecord.setNotes(aRecord.headerNotes());
326 } 324 }
327 aRecord.syncDirectLoginReferenceValues(); 325 aRecord.syncDirectLoginReferenceValues();
328 aRecord.currentVersion().createNewVersion(); 326 aRecord.currentVersion().createNewVersion();
329 aRecord.updateKey(); 327 aRecord.updateKey();
330 }, someRecords[i]); 328 }, someRecords[i]);
331 deferredResult.addCallback(MochiKit.Async.wait, 0.1); 329 deferredResult.addCallback(MochiKit.Async.wait, 0.1);
332 } 330 }
333//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 1 " + res); return res;}); 331//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 1 " + res); return res;});
334 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveCard_collectRecordInfo'); 332 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveCard_collectRecordInfo');
335//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 2 " + res); return res;}); 333//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 2 " + res); return res;});
336 334
337 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveCard_encryptUserData'); 335 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveCard_encryptUserData');
338//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 3 " + res); return res;}); 336//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 3 " + res); return res;});
339 deferredResult.addCallback(MochiKit.Base.method(this, 'encryptedData')); 337 deferredResult.addCallback(MochiKit.Base.method(this, 'encryptedData'));
340//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 4 " + res); return res;}); 338//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 4 " + res); return res;});
341 deferredResult.addCallback(function(aResult, res) { 339 deferredResult.addCallback(function(aResult, res) {
342 aResult['user'] = res; 340 aResult['user'] = res;
343 return aResult; 341 return aResult;
344 }, result); 342 }, result);
345//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 5 " + res); return res;}); 343//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 5 " + res); return res;});
346 344
347 c = someRecords.length; 345 c = someRecords.length;
348 for (i=0; i<c; i++) { 346 for (i=0; i<c; i++) {
349 var recordData; 347 var recordData;
350 348
351 recordData = {}; 349 recordData = {};
352 350
353//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.1 " + res); return res;}); 351//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.1 " + res); return res;});
354 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveCard_encryptRecordData'); 352 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveCard_encryptRecordData');
355//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.2 " + res); return res;}); 353//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.2 " + res); return res;});
356 deferredResult.addCallback(MochiKit.Base.method(someRecords[i], 'encryptedData')); 354 deferredResult.addCallback(MochiKit.Base.method(someRecords[i], 'encryptedData'));
357//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.3 " + res); return res;}); 355//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.3 " + res); return res;});
358 deferredResult.addCallback(function(aResult, res) { 356 deferredResult.addCallback(function(aResult, res) {
359 aResult['record'] = res; 357 aResult['record'] = res;
360 return aResult; 358 return aResult;
361 }, recordData); 359 }, recordData);
362//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.4 " + res); return res;}); 360//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.4 " + res); return res;});
363 361
364 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {} /*'saveCard_encryptRecordVersions'*/); 362 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', {} /*'saveCard_encryptRecordVersions'*/);
365//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.5 " + res); return res;}); 363//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.5 " + res); return res;});
366 deferredResult.addCallback(MochiKit.Base.method(someRecords[i].currentVersion(), 'encryptedData')); 364 deferredResult.addCallback(MochiKit.Base.method(someRecords[i].currentVersion(), 'encryptedData'));
367//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.6 " + res); return res;}); 365//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.6 " + res); return res;});
368 deferredResult.addCallback(function(aResult, res) { 366 deferredResult.addCallback(function(aResult, res) {
369 aResult['currentRecordVersion'] = res; 367 aResult['currentRecordVersion'] = res;
370 return aResult; 368 return aResult;
371 }, recordData); 369 }, recordData);
372//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.7 " + res); return res;}); 370//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.7 " + res); return res;});
373 371
374 deferredResult.addCallback(function(aResult, res) { 372 deferredResult.addCallback(function(aResult, res) {
375 aResult['records']['updated'].push(res); 373 aResult['records']['updated'].push(res);
376 return aResult; 374 return aResult;
377 }, result); 375 }, result);
378//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.8 " + res); return res;}); 376//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 6.8 " + res); return res;});
379 } 377 }
380 378
381//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 7 " + res); return res;}); 379//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 7 " + res); return res;});
382 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveCard_sendingData'); 380 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveCard_sendingData');
383//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 8 " + res); return res;}); 381//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 8 " + res); return res;});
384 // deferredResult.addCallback(MochiKit.Base.method(this.connection(), 'message'), methodName); 382 // deferredResult.addCallback(MochiKit.Base.method(this.connection(), 'message'), methodName);
385 deferredResult.addCallback(MochiKit.Base.method(this.connection(), 'message'), 'saveChanges'); 383 deferredResult.addCallback(MochiKit.Base.method(this.connection(), 'message'), 'saveChanges');
386//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 9 " + res); return res;}); 384//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 9 " + res); return res;});
387 385
388 for (i=0; i<c; i++) { 386 for (i=0; i<c; i++) {
389//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 9.1 " + res); return res;}); 387//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 9.1 " + res); return res;});
390 deferredResult.addCallback(MochiKit.Base.method(someRecords[i], 'takeSnapshotOfCurrentData')); 388 deferredResult.addCallback(MochiKit.Base.method(someRecords[i], 'takeSnapshotOfCurrentData'));
391//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 9.2 " + res); return res;}); 389//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 9.2 " + res); return res;});
392 deferredResult.addCallback(MochiKit.Base.method(someRecords[i], 'setIsBrandNew'), false); 390 deferredResult.addCallback(MochiKit.Base.method(someRecords[i], 'setIsBrandNew'), false);
393//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 9.3 " + res); return res;}); 391//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 9.3 " + res); return res;});
394 } 392 }
395 393
396//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 10 " + res); return res;}); 394//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 10 " + res); return res;});
397 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'notify', 'recordUpdated'); 395 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'notify', 'recordUpdated');
398//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 11 " + res); return res;}); 396//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 11 " + res); return res;});
399 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'notify', 'directLoginUpdated'); 397 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'notify', 'directLoginUpdated');
400//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 12 " + res); return res;}); 398//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("User.saveRecords - 12 " + res); return res;});
401 deferredResult.callback(); 399 deferredResult.callback();
402 400
403 return deferredResult; 401 return deferredResult;
404 }, 402 },
405 403
406 //------------------------------------------------------------------------- 404 //-------------------------------------------------------------------------
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/UserPreferences.js b/frontend/beta/js/Clipperz/PM/DataModel/UserPreferences.js
index 919289d..d44ad89 100644
--- a/frontend/beta/js/Clipperz/PM/DataModel/UserPreferences.js
+++ b/frontend/beta/js/Clipperz/PM/DataModel/UserPreferences.js
@@ -1,195 +1,193 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } 26if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; }
29 27
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.DataModel.UserPreferences = function(args) { 31Clipperz.PM.DataModel.UserPreferences = function(args) {
34 args = args || {}; 32 args = args || {};
35 33
36 this._user = args['user']; delete args['user']; 34 this._user = args['user']; delete args['user'];
37 this._config = args; 35 this._config = args;
38 36
39 return this; 37 return this;
40} 38}
41 39
42Clipperz.PM.DataModel.UserPreferences.prototype = MochiKit.Base.update(null, { 40Clipperz.PM.DataModel.UserPreferences.prototype = MochiKit.Base.update(null, {
43 41
44 //------------------------------------------------------------------------- 42 //-------------------------------------------------------------------------
45 43
46 'config': function() { 44 'config': function() {
47 return this._config; 45 return this._config;
48 }, 46 },
49 47
50 //------------------------------------------------------------------------- 48 //-------------------------------------------------------------------------
51 49
52 'user': function() { 50 'user': function() {
53 return this._user; 51 return this._user;
54 }, 52 },
55 53
56 //------------------------------------------------------------------------- 54 //-------------------------------------------------------------------------
57 55
58 'updateWithData': function(someValues) { 56 'updateWithData': function(someValues) {
59 var currentLanguage; 57 var currentLanguage;
60 58
61//MochiKit.Logging.logDebug(">>> Clipperz.PM.DataModel.UserPreferences.updateWithData: " + Clipperz.Base.serializeJSON(someValues)); 59//MochiKit.Logging.logDebug(">>> Clipperz.PM.DataModel.UserPreferences.updateWithData: " + Clipperz.Base.serializeJSON(someValues));
62 currentLanguage = this.preferredLanguage(); 60 currentLanguage = this.preferredLanguage();
63 61
64 MochiKit.Base.update(this._config, someValues); 62 MochiKit.Base.update(this._config, someValues);
65 63
66 if (this.preferredLanguage() != currentLanguage) { 64 if (this.preferredLanguage() != currentLanguage) {
67 Clipperz.PM.Strings.Languages.setSelectedLanguage(this.preferredLanguage()); 65 Clipperz.PM.Strings.Languages.setSelectedLanguage(this.preferredLanguage());
68 } else { 66 } else {
69//MochiKit.Logging.logDebug("### keepping the browser selected language: " + Clipperz.PM.Strings.selectedLanguage); 67//MochiKit.Logging.logDebug("### keepping the browser selected language: " + Clipperz.PM.Strings.selectedLanguage);
70 } 68 }
71 69
72 return this; 70 return this;
73 }, 71 },
74 72
75 //------------------------------------------------------------------------- 73 //-------------------------------------------------------------------------
76 74
77 'configValue': function(aConfigName, aDefaultValue) { 75 'configValue': function(aConfigName, aDefaultValue) {
78 var result; 76 var result;
79 77
80//MochiKit.Logging.logDebug(">>> UserPreferences.configValue - config: " + Clipperz.Base.serializeJSON(this.config())); 78//MochiKit.Logging.logDebug(">>> UserPreferences.configValue - config: " + Clipperz.Base.serializeJSON(this.config()));
81 if (typeof(this.config()[aConfigName]) == 'undefined') { 79 if (typeof(this.config()[aConfigName]) == 'undefined') {
82 result = aDefaultValue; 80 result = aDefaultValue;
83 } else { 81 } else {
84 result = this.config()[aConfigName]; 82 result = this.config()[aConfigName];
85 } 83 }
86//MochiKit.Logging.logDebug("<<< UserPreferences.configValue"); 84//MochiKit.Logging.logDebug("<<< UserPreferences.configValue");
87 85
88 return result; 86 return result;
89 }, 87 },
90 88
91 'setConfigValue': function(aConfigName, aValue) { 89 'setConfigValue': function(aConfigName, aValue) {
92 var result; 90 var result;
93 91
94 if (aValue != this.configValue(aConfigName)) { 92 if (aValue != this.configValue(aConfigName)) {
95 if (aValue == null) { 93 if (aValue == null) {
96 delete this.config()[aConfigName] 94 delete this.config()[aConfigName]
97 } else { 95 } else {
98 this.config()[aConfigName] = aValue; 96 this.config()[aConfigName] = aValue;
99 } 97 }
100 98
101 Clipperz.NotificationCenter.notify(this.user(), 'updatedSection', 'preferences', true); 99 Clipperz.NotificationCenter.notify(this.user(), 'updatedSection', 'preferences', true);
102 100
103 result = true; 101 result = true;
104 } else { 102 } else {
105 result = false; 103 result = false;
106 } 104 }
107 105
108 return result; 106 return result;
109 }, 107 },
110 108
111 //------------------------------------------------------------------------- 109 //-------------------------------------------------------------------------
112 110
113 'useSafeEditMode': function() { 111 'useSafeEditMode': function() {
114 return this.configValue('useSafeEditMode', true); 112 return this.configValue('useSafeEditMode', true);
115 }, 113 },
116 114
117 'setUseSafeEditMode': function(aValue) { 115 'setUseSafeEditMode': function(aValue) {
118 this.setConfigValue('useSafeEditMode', aValue); 116 this.setConfigValue('useSafeEditMode', aValue);
119 }, 117 },
120 118
121 //------------------------------------------------------------------------- 119 //-------------------------------------------------------------------------
122 120
123 'preferredLanguage': function() { 121 'preferredLanguage': function() {
124 return this.configValue('preferredLanguage', null); 122 return this.configValue('preferredLanguage', null);
125 }, 123 },
126 124
127 'setPreferredLanguage': function(aValue) { 125 'setPreferredLanguage': function(aValue) {
128 if (this.setConfigValue('preferredLanguage', aValue)) { 126 if (this.setConfigValue('preferredLanguage', aValue)) {
129 Clipperz.PM.Strings.Languages.setSelectedLanguage(this.preferredLanguage()); 127 Clipperz.PM.Strings.Languages.setSelectedLanguage(this.preferredLanguage());
130 } 128 }
131 }, 129 },
132 130
133 //------------------------------------------------------------------------- 131 //-------------------------------------------------------------------------
134 132
135 'shouldShowDonationPanel': function() { 133 'shouldShowDonationPanel': function() {
136 return this.configValue('shouldShowDonationPanel', true); 134 return this.configValue('shouldShowDonationPanel', true);
137 }, 135 },
138 136
139 'setShouldShowDonationPanel': function(aValue) { 137 'setShouldShowDonationPanel': function(aValue) {
140 this.setConfigValue('shouldShowDonationPanel', aValue); 138 this.setConfigValue('shouldShowDonationPanel', aValue);
141 }, 139 },
142 140
143 //------------------------------------------------------------------------- 141 //-------------------------------------------------------------------------
144 142
145 'disableUnsecureFaviconLoadingForIE': function() { 143 'disableUnsecureFaviconLoadingForIE': function() {
146 return this.configValue('disableUnsecureFaviconLoadingForIE', false); 144 return this.configValue('disableUnsecureFaviconLoadingForIE', false);
147 }, 145 },
148 146
149 'setDisableUnsecureFaviconLoadingForIE': function(aValue) { 147 'setDisableUnsecureFaviconLoadingForIE': function(aValue) {
150 this.setConfigValue('disableUnsecureFaviconLoadingForIE', aValue); 148 this.setConfigValue('disableUnsecureFaviconLoadingForIE', aValue);
151 }, 149 },
152 150
153 //------------------------------------------------------------------------- 151 //-------------------------------------------------------------------------
154 152
155 'serializedData': function() { 153 'serializedData': function() {
156 return this.config(); 154 return this.config();
157 }, 155 },
158 156
159 //------------------------------------------------------------------------- 157 //-------------------------------------------------------------------------
160 158
161 'saveChanges': function(aReferenceElement) { 159 'saveChanges': function(aReferenceElement) {
162 vardeferredResult; 160 vardeferredResult;
163 161
164 deferredResult = new MochiKit.Async.Deferred(); 162 deferredResult = new MochiKit.Async.Deferred();
165 163
166 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Components.MessageBox(), 'deferredShow'), 164 deferredResult.addCallback(MochiKit.Base.method(Clipperz.PM.Components.MessageBox(), 'deferredShow'),
167 { 165 {
168 title:"", //Clipperz.PM.Strings['accountPreferencesSavingPanelTitle_Step1'], 166 title:"", //Clipperz.PM.Strings['accountPreferencesSavingPanelTitle_Step1'],
169 text:"", //Clipperz.PM.Strings['accountPreferencesSavingPanelText_Step1'], 167 text:"", //Clipperz.PM.Strings['accountPreferencesSavingPanelText_Step1'],
170 width:240, 168 width:240,
171 showProgressBar:true, 169 showProgressBar:true,
172 showCloseButton:false 170 showCloseButton:false
173 }, 171 },
174 aReferenceElement 172 aReferenceElement
175 ); 173 );
176 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'account_savingPreferences_1'); 174 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'account_savingPreferences_1');
177 deferredResult.addCallback(MochiKit.Base.method(this.user(), 'encryptedData')); 175 deferredResult.addCallback(MochiKit.Base.method(this.user(), 'encryptedData'));
178 deferredResult.addCallback(function(res) { 176 deferredResult.addCallback(function(res) {
179 return {user:res}; 177 return {user:res};
180 }) 178 })
181 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'account_savingPreferences_2'); 179 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'account_savingPreferences_2');
182 // deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'updateData'); 180 // deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'updateData');
183 deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'saveChanges'); 181 deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'saveChanges');
184 deferredResult.addCallback(Clipperz.PM.Components.MessageBox().hide, YAHOO.ext.Element.get('main')); 182 deferredResult.addCallback(Clipperz.PM.Components.MessageBox().hide, YAHOO.ext.Element.get('main'));
185 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedPreferences', null); 183 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedPreferences', null);
186 184
187 deferredResult.callback(); 185 deferredResult.callback();
188 186
189 return deferredResult; 187 return deferredResult;
190 }, 188 },
191 189
192 //------------------------------------------------------------------------- 190 //-------------------------------------------------------------------------
193 __syntaxFix__: "syntax fix" 191 __syntaxFix__: "syntax fix"
194}); 192});
195 193
diff --git a/frontend/beta/js/Clipperz/PM/Date.js b/frontend/beta/js/Clipperz/PM/Date.js
index 13116e9..36c10c8 100644
--- a/frontend/beta/js/Clipperz/PM/Date.js
+++ b/frontend/beta/js/Clipperz/PM/Date.js
@@ -1,190 +1,188 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Date) == 'undefined') { Clipperz.PM.Date = {}; } 26if (typeof(Clipperz.PM.Date) == 'undefined') { Clipperz.PM.Date = {}; }
29 27
30Clipperz.PM.Date.VERSION = "0.1"; 28Clipperz.PM.Date.VERSION = "0.1";
31Clipperz.PM.Date.NAME = "Clipperz.PM.Date"; 29Clipperz.PM.Date.NAME = "Clipperz.PM.Date";
32 30
33MochiKit.Base.update(Clipperz.PM.Date, { 31MochiKit.Base.update(Clipperz.PM.Date, {
34 32
35 '__repr__': function () { 33 '__repr__': function () {
36 return "[" + this.NAME + " " + this.VERSION + "]"; 34 return "[" + this.NAME + " " + this.VERSION + "]";
37 }, 35 },
38 36
39 //------------------------------------------------------------------------- 37 //-------------------------------------------------------------------------
40 38
41 'toString': function () { 39 'toString': function () {
42 return this.__repr__(); 40 return this.__repr__();
43 }, 41 },
44 42
45 //------------------------------------------------------------------------- 43 //-------------------------------------------------------------------------
46 44
47 'locale': function() { 45 'locale': function() {
48 return { 46 return {
49 'amDesignation':Clipperz.PM.Strings['calendarStrings']['amDesignation'], 47 'amDesignation':Clipperz.PM.Strings['calendarStrings']['amDesignation'],
50 'pmDesignation':Clipperz.PM.Strings['calendarStrings']['pmDesignation'], 48 'pmDesignation':Clipperz.PM.Strings['calendarStrings']['pmDesignation'],
51 'days': Clipperz.PM.Strings['calendarStrings']['days'], 49 'days': Clipperz.PM.Strings['calendarStrings']['days'],
52 'shortDays': Clipperz.PM.Strings['calendarStrings']['shortDays'], 50 'shortDays': Clipperz.PM.Strings['calendarStrings']['shortDays'],
53 'shortMonths': Clipperz.PM.Strings['calendarStrings']['shortMonths'], 51 'shortMonths': Clipperz.PM.Strings['calendarStrings']['shortMonths'],
54 'months': Clipperz.PM.Strings['calendarStrings']['months'] 52 'months': Clipperz.PM.Strings['calendarStrings']['months']
55 } 53 }
56 }, 54 },
57 55
58 //========================================================================= 56 //=========================================================================
59/* 57/*
60 'formatDateWithPHPLikeTemplate': function(aDate, aTemplate) { 58 'formatDateWithPHPLikeTemplate': function(aDate, aTemplate) {
61 return Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale(aDate, aTemplate, Clipperz.PM.Date.locale()); 59 return Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale(aDate, aTemplate, Clipperz.PM.Date.locale());
62 }, 60 },
63 61
64 'parseDateWithPHPLikeTemplate': function(aDate, aTemplate) { 62 'parseDateWithPHPLikeTemplate': function(aDate, aTemplate) {
65 return Clipperz.Date.parseDateWithPHPTemplateAndLocale(aDate, aTemplate, Clipperz.PM.Date.locale()); 63 return Clipperz.Date.parseDateWithPHPTemplateAndLocale(aDate, aTemplate, Clipperz.PM.Date.locale());
66 }, 64 },
67 65
68 //========================================================================= 66 //=========================================================================
69 67
70 'formatDateWithJavaLikeTemplate': function(aDate, aTemplate) { 68 'formatDateWithJavaLikeTemplate': function(aDate, aTemplate) {
71 return Clipperz.Date.formatDateWithJavaLikeTemplateAndLocale(aDate, aTemplate, Clipperz.PM.Date.locale()); 69 return Clipperz.Date.formatDateWithJavaLikeTemplateAndLocale(aDate, aTemplate, Clipperz.PM.Date.locale());
72 }, 70 },
73 71
74 'parseDateWithJavaLikeTemplate': function(aDate, aTemplate) { 72 'parseDateWithJavaLikeTemplate': function(aDate, aTemplate) {
75 return Clipperz.Date.parseDateWithJavaLikeTemplateAndLocale(aDate, aTemplate, Clipperz.PM.Date.locale()); 73 return Clipperz.Date.parseDateWithJavaLikeTemplateAndLocale(aDate, aTemplate, Clipperz.PM.Date.locale());
76 }, 74 },
77*/ 75*/
78 //========================================================================= 76 //=========================================================================
79 77
80 'formatDateWithTemplate': function(aDate, aTemplate) { 78 'formatDateWithTemplate': function(aDate, aTemplate) {
81 var result; 79 var result;
82 80
83 if (aDate == null) { 81 if (aDate == null) {
84 result = "" 82 result = ""
85 } else { 83 } else {
86 result = Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale(aDate, aTemplate, Clipperz.PM.Date.locale()); 84 result = Clipperz.Date.formatDateWithPHPLikeTemplateAndLocale(aDate, aTemplate, Clipperz.PM.Date.locale());
87 }; 85 };
88 86
89 return result; 87 return result;
90 }, 88 },
91 89
92 'parseDateWithTemplate': function(aValue, aTemplate) { 90 'parseDateWithTemplate': function(aValue, aTemplate) {
93 return Clipperz.Date.parseDateWithPHPTemplateAndLocale(aValue, aTemplate, Clipperz.PM.Date.locale()); 91 return Clipperz.Date.parseDateWithPHPTemplateAndLocale(aValue, aTemplate, Clipperz.PM.Date.locale());
94 }, 92 },
95 93
96 //========================================================================= 94 //=========================================================================
97 95
98 'formatDateWithUTCFormat': function(aDate) { 96 'formatDateWithUTCFormat': function(aDate) {
99 return Clipperz.Date.formatDateWithUTCFormatAndLocale(aDate, Clipperz.PM.Date.locale()); 97 return Clipperz.Date.formatDateWithUTCFormatAndLocale(aDate, Clipperz.PM.Date.locale());
100 }, 98 },
101 99
102 'parseDateWithUTCFormat': function(aValue) { 100 'parseDateWithUTCFormat': function(aValue) {
103 var result; 101 var result;
104 102
105 if (aValue == null) { 103 if (aValue == null) {
106 result = null; 104 result = null;
107 } else { 105 } else {
108 result = Clipperz.Date.parseDateWithUTCFormatAndLocale(aValue, Clipperz.PM.Date.locale()); 106 result = Clipperz.Date.parseDateWithUTCFormatAndLocale(aValue, Clipperz.PM.Date.locale());
109 } 107 }
110 108
111 return result; 109 return result;
112 }, 110 },
113 111
114 //========================================================================= 112 //=========================================================================
115 113
116 'getElapsedTimeDescription': function(aDate) { 114 'getElapsedTimeDescription': function(aDate) {
117 var result; 115 var result;
118 116
119 result = "" 117 result = ""
120 118
121 if (aDate != null) { 119 if (aDate != null) {
122 var now; 120 var now;
123 var elapsedTime; 121 var elapsedTime;
124 122
125 var millisencondsInAMinute; 123 var millisencondsInAMinute;
126 var millisencondsInAnHour; 124 var millisencondsInAnHour;
127 var millisencondsInADay; 125 var millisencondsInADay;
128 var millisencondsInAWeek; 126 var millisencondsInAWeek;
129 var millisencondsInAMonth; 127 var millisencondsInAMonth;
130 128
131 now = new Date(); 129 now = new Date();
132 elapsedTime = now.getTime() - aDate.getTime(); 130 elapsedTime = now.getTime() - aDate.getTime();
133 131
134 millisencondsInAMinute = 60 * 1000; 132 millisencondsInAMinute = 60 * 1000;
135 millisencondsInAnHour = millisencondsInAMinute * 60; 133 millisencondsInAnHour = millisencondsInAMinute * 60;
136 millisencondsInADay = millisencondsInAnHour * 24; 134 millisencondsInADay = millisencondsInAnHour * 24;
137 millisencondsInAWeek = millisencondsInADay * 7; 135 millisencondsInAWeek = millisencondsInADay * 7;
138 millisencondsInAMonth = millisencondsInAWeek * 5; 136 millisencondsInAMonth = millisencondsInAWeek * 5;
139 137
140 if ((elapsedTime / millisencondsInAMonth) > 1) { 138 if ((elapsedTime / millisencondsInAMonth) > 1) {
141 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['MORE_THAN_A_MONTH_AGO']; 139 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['MORE_THAN_A_MONTH_AGO'];
142 } else if ((elapsedTime / millisencondsInAWeek) > 1) { 140 } else if ((elapsedTime / millisencondsInAWeek) > 1) {
143 var elapsedWeeks; 141 var elapsedWeeks;
144 142
145 elapsedWeeks = Math.floor((elapsedTime / millisencondsInAWeek)); 143 elapsedWeeks = Math.floor((elapsedTime / millisencondsInAWeek));
146 if (elapsedWeeks == 1) { 144 if (elapsedWeeks == 1) {
147 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['MORE_THAN_A_WEEK_AGO']; 145 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['MORE_THAN_A_WEEK_AGO'];
148 } else { 146 } else {
149 result = Clipprez.PM.Strings['elapsedTimeDescriptions']['MORE_THAN_*_WEEKS_AGO'].replace(/__elapsed__/, elapsedWeeks); 147 result = Clipprez.PM.Strings['elapsedTimeDescriptions']['MORE_THAN_*_WEEKS_AGO'].replace(/__elapsed__/, elapsedWeeks);
150 } 148 }
151 } else if ((elapsedTime / millisencondsInADay) > 1) { 149 } else if ((elapsedTime / millisencondsInADay) > 1) {
152 var elapsedDays; 150 var elapsedDays;
153 151
154 elapsedDays = Math.floor((elapsedTime / millisencondsInADay)); 152 elapsedDays = Math.floor((elapsedTime / millisencondsInADay));
155 if (elapsedDays == 1) { 153 if (elapsedDays == 1) {
156 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['YESTERDAY']; 154 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['YESTERDAY'];
157 } else { 155 } else {
158 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['*_DAYS_AGO'].replace(/__elapsed__/, elapsedDays); 156 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['*_DAYS_AGO'].replace(/__elapsed__/, elapsedDays);
159 } 157 }
160 } else if ((elapsedTime / millisencondsInAnHour) > 1) { 158 } else if ((elapsedTime / millisencondsInAnHour) > 1) {
161 var elapsedHours; 159 var elapsedHours;
162 160
163 elapsedHours = Math.floor((elapsedTime / millisencondsInAnHour)); 161 elapsedHours = Math.floor((elapsedTime / millisencondsInAnHour));
164 if (elapsedHours == 1) { 162 if (elapsedHours == 1) {
165 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['ABOUT_AN_HOUR_AGO']; 163 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['ABOUT_AN_HOUR_AGO'];
166 } else { 164 } else {
167 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['*_HOURS_AGO'].replace(/__elapsed__/, elapsedHours); 165 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['*_HOURS_AGO'].replace(/__elapsed__/, elapsedHours);
168 } 166 }
169 } else { 167 } else {
170 var elapsed10Minutes; 168 var elapsed10Minutes;
171 169
172 elapsed10Minutes = (Math.floor((elapsedTime / millisencondsInAMinute) / 10)) * 10; 170 elapsed10Minutes = (Math.floor((elapsedTime / millisencondsInAMinute) / 10)) * 10;
173 if (elapsed10Minutes == 0) { 171 if (elapsed10Minutes == 0) {
174 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['JUST_A_FEW_MINUTES_AGO']; 172 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['JUST_A_FEW_MINUTES_AGO'];
175 } else { 173 } else {
176 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['ABOUT_*_MINUTES_AGO'].replace(/__elapsed__/, elapsed10Minutes+""); 174 result = Clipperz.PM.Strings['elapsedTimeDescriptions']['ABOUT_*_MINUTES_AGO'].replace(/__elapsed__/, elapsed10Minutes+"");
177 } 175 }
178 } 176 }
179 } 177 }
180 178
181 return result; 179 return result;
182 }, 180 },
183 181
184 //------------------------------------------------------------------------- 182 //-------------------------------------------------------------------------
185 183
186 //------------------------------------------------------------------------- 184 //-------------------------------------------------------------------------
187 __syntaxFix__: "syntax fix" 185 __syntaxFix__: "syntax fix"
188 186
189}); 187});
190 188
diff --git a/frontend/beta/js/Clipperz/PM/Main.js b/frontend/beta/js/Clipperz/PM/Main.js
index 989e0a4..3dded31 100644
--- a/frontend/beta/js/Clipperz/PM/Main.js
+++ b/frontend/beta/js/Clipperz/PM/Main.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 24if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
27 25
28Clipperz.PM.VERSION = "0.1"; 26Clipperz.PM.VERSION = "0.1";
29Clipperz.PM.NAME = "Clipperz.PM"; 27Clipperz.PM.NAME = "Clipperz.PM";
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.PM.Main = function() { 31Clipperz.PM.Main = function() {
34 this._loginPanel = null; 32 this._loginPanel = null;
35 this._user = null; 33 this._user = null;
36 34
37 this._isRunningCompact = false; 35 this._isRunningCompact = false;
38 36
39 Clipperz.NotificationCenter.register(null, 'userConnected', this, 'userConnectedCallback'); 37 Clipperz.NotificationCenter.register(null, 'userConnected', this, 'userConnectedCallback');
40 Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler'); 38 Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler');
41 39
42 Clipperz.NotificationCenter.register(null, 'EXCEPTION', this, 'reportException'); 40 Clipperz.NotificationCenter.register(null, 'EXCEPTION', this, 'reportException');
43 41
44 return this; 42 return this;
45} 43}
46 44
47//============================================================================= 45//=============================================================================
48 46
49MochiKit.Base.update(Clipperz.PM.Main.prototype, { 47MochiKit.Base.update(Clipperz.PM.Main.prototype, {
50 'toString': function() { 48 'toString': function() {
51 return "Clipperz.PM.Main"; 49 return "Clipperz.PM.Main";
52 }, 50 },
53 51
54 'switchLanguageHandler': function() { 52 'switchLanguageHandler': function() {
55//MochiKit.Logging.logDebug(">>> main.switchLanguageHandler"); 53//MochiKit.Logging.logDebug(">>> main.switchLanguageHandler");
56 YAHOO.ext.Element.get('donateHeaderIconLink').dom.href = Clipperz.PM.Strings['donateHeaderLinkUrl']; 54 YAHOO.ext.Element.get('donateHeaderIconLink').dom.href = Clipperz.PM.Strings['donateHeaderLinkUrl'];
57 YAHOO.ext.Element.get('donateHeaderLink').update(Clipperz.PM.Strings['donateHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['donateHeaderLinkUrl']; 55 YAHOO.ext.Element.get('donateHeaderLink').update(Clipperz.PM.Strings['donateHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['donateHeaderLinkUrl'];
58 YAHOO.ext.Element.get('creditsHeaderLink').update(Clipperz.PM.Strings['creditsHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['creditsHeaderLinkUrl']; 56 YAHOO.ext.Element.get('creditsHeaderLink').update(Clipperz.PM.Strings['creditsHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['creditsHeaderLinkUrl'];
59 YAHOO.ext.Element.get('feedbackHeaderLink').update(Clipperz.PM.Strings['feedbackHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['feedbackHeaderLinkUrl']; 57 YAHOO.ext.Element.get('feedbackHeaderLink').update(Clipperz.PM.Strings['feedbackHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['feedbackHeaderLinkUrl'];
60 YAHOO.ext.Element.get('helpHeaderLink').update(Clipperz.PM.Strings['helpHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['helpHeaderLinkUrl']; 58 YAHOO.ext.Element.get('helpHeaderLink').update(Clipperz.PM.Strings['helpHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['helpHeaderLinkUrl'];
61 YAHOO.ext.Element.get('forumHeaderLink').update(Clipperz.PM.Strings['forumHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['forumHeaderLinkUrl']; 59 YAHOO.ext.Element.get('forumHeaderLink').update(Clipperz.PM.Strings['forumHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['forumHeaderLinkUrl'];
62 60
63 if (YAHOO.ext.Element.get('logout') != null) { 61 if (YAHOO.ext.Element.get('logout') != null) {
64 YAHOO.ext.Element.get('logout').update(Clipperz.PM.Strings['logoutMenuLabel']); 62 YAHOO.ext.Element.get('logout').update(Clipperz.PM.Strings['logoutMenuLabel']);
65 YAHOO.ext.Element.get('lock').update(Clipperz.PM.Strings['lockMenuLabel']); 63 YAHOO.ext.Element.get('lock').update(Clipperz.PM.Strings['lockMenuLabel']);
66 64
67 YAHOO.ext.Element.get('recordsTabAnchor').update(Clipperz.PM.Strings['recordMenuLabel']); 65 YAHOO.ext.Element.get('recordsTabAnchor').update(Clipperz.PM.Strings['recordMenuLabel']);
68 YAHOO.ext.Element.get('accountTabAnchor').update(Clipperz.PM.Strings['accountMenuLabel']); 66 YAHOO.ext.Element.get('accountTabAnchor').update(Clipperz.PM.Strings['accountMenuLabel']);
69 YAHOO.ext.Element.get('dataTabAnchor').update(Clipperz.PM.Strings['dataMenuLabel']); 67 YAHOO.ext.Element.get('dataTabAnchor').update(Clipperz.PM.Strings['dataMenuLabel']);
70 // YAHOO.ext.Element.get('contactsTabAnchor').update(Clipperz.PM.Strings['contactsMenuLabel']); 68 // YAHOO.ext.Element.get('contactsTabAnchor').update(Clipperz.PM.Strings['contactsMenuLabel']);
71 YAHOO.ext.Element.get('toolsTabAnchor').update(Clipperz.PM.Strings['toolsMenuLabel']); 69 YAHOO.ext.Element.get('toolsTabAnchor').update(Clipperz.PM.Strings['toolsMenuLabel']);
72 } 70 }
73//MochiKit.Logging.logDebug("<<< main.switchLanguageHandler"); 71//MochiKit.Logging.logDebug("<<< main.switchLanguageHandler");
74 }, 72 },
75 73
76 //------------------------------------------------------------------------- 74 //-------------------------------------------------------------------------
77 75
78 'fixToDrawTheMainTabsCorrectlyOnSafari': function() { 76 'fixToDrawTheMainTabsCorrectlyOnSafari': function() {
79 this.switchLanguageHandler(); 77 this.switchLanguageHandler();
80 }, 78 },
81 79
82 //------------------------------------------------------------------------- 80 //-------------------------------------------------------------------------
83 81
84 'run': function(shouldShowRegistrationForm) { 82 'run': function(shouldShowRegistrationForm) {
85 varmainElement; 83 varmainElement;
86 84
87 Clipperz.NotificationCenter.register(null, 'updatedProgressState', this, 'updateProgressDialogStatus'); 85 Clipperz.NotificationCenter.register(null, 'updatedProgressState', this, 'updateProgressDialogStatus');
88 86
89 YAHOO.ext.Element.get('recordDetailEditModeHeaderMask').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide().unmask(); 87 YAHOO.ext.Element.get('recordDetailEditModeHeaderMask').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide().unmask();
90 YAHOO.ext.Element.get('recordDetailEditModeVerticalMask').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide().unmask(); 88 YAHOO.ext.Element.get('recordDetailEditModeVerticalMask').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide().unmask();
91 89
92//MochiKit.Logging.logDebug(">>> Main.run"); 90//MochiKit.Logging.logDebug(">>> Main.run");
93 mainElement = YAHOO.ext.Element.get('main'); 91 mainElement = YAHOO.ext.Element.get('main');
94 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { 92 if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) {
95 YAHOO.ext.Element.get('applicationVersionType').dom.className = "readOnly"; 93 YAHOO.ext.Element.get('applicationVersionType').dom.className = "readOnly";
96 } 94 }
97 mainElement.update(""); 95 mainElement.update("");
98 96
99 Clipperz.YUI.DomHelper.append(mainElement.dom, {tag:'ul', cls:'clipperzTabPanels', children:[ 97 Clipperz.YUI.DomHelper.append(mainElement.dom, {tag:'ul', cls:'clipperzTabPanels', children:[
100 {tag:'li', id:'loginPanel'} 98 {tag:'li', id:'loginPanel'}
101 ]}) 99 ]})
102 100
103 this.setLoginPanel(new Clipperz.PM.Components.Panels.LoginPanel(YAHOO.ext.Element.get('loginPanel'))); 101 this.setLoginPanel(new Clipperz.PM.Components.Panels.LoginPanel(YAHOO.ext.Element.get('loginPanel')));
104 102
105//MochiKit.Logging.logDebug("--- Main.run - selecting active form to show ..."); 103//MochiKit.Logging.logDebug("--- Main.run - selecting active form to show ...");
106 if (shouldShowRegistrationForm == true) { 104 if (shouldShowRegistrationForm == true) {
107 this.loginPanel().showRegistrationForm(false); 105 this.loginPanel().showRegistrationForm(false);
108 } else { 106 } else {
109 this.loginPanel().showLoginForm(false); 107 this.loginPanel().showLoginForm(false);
110 } 108 }
111 109
112 this.switchLanguageHandler(); 110 this.switchLanguageHandler();
113//MochiKit.Logging.logDebug("--- Main.run - selecting active form to show. done."); 111//MochiKit.Logging.logDebug("--- Main.run - selecting active form to show. done.");
114//MochiKit.Logging.logDebug("<<< Main.run"); 112//MochiKit.Logging.logDebug("<<< Main.run");
115 }, 113 },
116 114
117 //------------------------------------------------------------------------- 115 //-------------------------------------------------------------------------
118 116
119 'runCompact': function() { 117 'runCompact': function() {
120 this.setIsRunningCompact(true); 118 this.setIsRunningCompact(true);
121 YAHOO.ext.Element.get(document.body).addClass("compact"); 119 YAHOO.ext.Element.get(document.body).addClass("compact");
122 new Clipperz.PM.Components.Compact.LoginForm(YAHOO.ext.Element.get('mainDiv')); 120 new Clipperz.PM.Components.Compact.LoginForm(YAHOO.ext.Element.get('mainDiv'));
123 }, 121 },
124 122
125 'showCompactInterface': function() { 123 'showCompactInterface': function() {
126//MochiKit.Logging.logDebug(">>> main.showCompactInterface"); 124//MochiKit.Logging.logDebug(">>> main.showCompactInterface");
127 new Clipperz.PM.Components.Compact.CompactInterface(YAHOO.ext.Element.get('compactBody'), {user:this.user()}); 125 new Clipperz.PM.Components.Compact.CompactInterface(YAHOO.ext.Element.get('compactBody'), {user:this.user()});
128//MochiKit.Logging.logDebug("<<< main.showCompactInterface"); 126//MochiKit.Logging.logDebug("<<< main.showCompactInterface");
129 }, 127 },
130 128
131 //------------------------------------------------------------------------- 129 //-------------------------------------------------------------------------
132 130
133 'mainPage': function() { 131 'mainPage': function() {
134 if (this._mainPage == null) { 132 if (this._mainPage == null) {
135 this._mainPage = new Clipperz.PM.Components.MainPage(); 133 this._mainPage = new Clipperz.PM.Components.MainPage();
136 } 134 }
137 135
138 return this._mainPage; 136 return this._mainPage;
139 }, 137 },
140 138
141 //------------------------------------------------------------------------- 139 //-------------------------------------------------------------------------
142 140
143 'loginPanel': function() { 141 'loginPanel': function() {
144 return this._loginPanel; 142 return this._loginPanel;
145 }, 143 },
146 144
147 'setLoginPanel': function(aValue) { 145 'setLoginPanel': function(aValue) {
148 this._loginPanel = aValue; 146 this._loginPanel = aValue;
149 }, 147 },
150 148
151 //------------------------------------------------------------------------- 149 //-------------------------------------------------------------------------
152 150
153 'showMainPanels': function() { 151 'showMainPanels': function() {
154 varmainElement; 152 varmainElement;
155 var logoutBlock; 153 var logoutBlock;
156 var lockBlock; 154 var lockBlock;
157 var menusTRElement; 155 var menusTRElement;
158 156
159 this.loginPanel().remove(); 157 this.loginPanel().remove();
160 this.setLoginPanel(null); 158 this.setLoginPanel(null);
161 159
162 logoutBlock = YAHOO.ext.Element.get('logoutLI'); 160 logoutBlock = YAHOO.ext.Element.get('logoutLI');
163 Clipperz.YUI.DomHelper.append(logoutBlock.dom, {tag:'a', href:"#", id:'logout', htmlString:Clipperz.PM.Strings['logoutMenuLabel']}); 161 Clipperz.YUI.DomHelper.append(logoutBlock.dom, {tag:'a', href:"#", id:'logout', htmlString:Clipperz.PM.Strings['logoutMenuLabel']});
164 MochiKit.Signal.connect('logout', 'onclick', this, 'doLogoutEventHandler'); 162 MochiKit.Signal.connect('logout', 'onclick', this, 'doLogoutEventHandler');
165 163
166 lockBlock = YAHOO.ext.Element.get('lockLI'); 164 lockBlock = YAHOO.ext.Element.get('lockLI');
167 Clipperz.YUI.DomHelper.append(lockBlock.dom, {tag:'a', href:"#", id:'lock', htmlString:Clipperz.PM.Strings['lockMenuLabel']}); 165 Clipperz.YUI.DomHelper.append(lockBlock.dom, {tag:'a', href:"#", id:'lock', htmlString:Clipperz.PM.Strings['lockMenuLabel']});
168 MochiKit.Signal.connect('lock', 'onclick', this, 'doLockEventHandler'); 166 MochiKit.Signal.connect('lock', 'onclick', this, 'doLockEventHandler');
169 167
170 menusTRElement = YAHOO.ext.Element.get('menusTR'); 168 menusTRElement = YAHOO.ext.Element.get('menusTR');
171 Clipperz.YUI.DomHelper.append(menusTRElement.dom, {tag:'td', id:'recordsTab', children:[{tag:'div', children:[{tag:'a', id:'recordsTabAnchor', htmlString:Clipperz.PM.Strings['recordMenuLabel']}]}]}); 169 Clipperz.YUI.DomHelper.append(menusTRElement.dom, {tag:'td', id:'recordsTab', children:[{tag:'div', children:[{tag:'a', id:'recordsTabAnchor', htmlString:Clipperz.PM.Strings['recordMenuLabel']}]}]});
172 Clipperz.YUI.DomHelper.append(menusTRElement.dom, {tag:'td', id:'accountTab', children:[{tag:'div', children:[{tag:'a', id:'accountTabAnchor', htmlString:Clipperz.PM.Strings['accountMenuLabel']}]}]}); 170 Clipperz.YUI.DomHelper.append(menusTRElement.dom, {tag:'td', id:'accountTab', children:[{tag:'div', children:[{tag:'a', id:'accountTabAnchor', htmlString:Clipperz.PM.Strings['accountMenuLabel']}]}]});
173 Clipperz.YUI.DomHelper.append(menusTRElement.dom, {tag:'td', id:'dataTab', children:[{tag:'div', children:[{tag:'a', id:'dataTabAnchor', htmlString:Clipperz.PM.Strings['dataMenuLabel']}]}]}); 171 Clipperz.YUI.DomHelper.append(menusTRElement.dom, {tag:'td', id:'dataTab', children:[{tag:'div', children:[{tag:'a', id:'dataTabAnchor', htmlString:Clipperz.PM.Strings['dataMenuLabel']}]}]});
174 // Clipperz.YUI.DomHelper.append(menusTRElement.dom, {tag:'td', id:'contactsTab', children:[{tag:'div', children:[{tag:'a', id:'contactsTabAnchor', htmlString:Clipperz.PM.Strings['contactsMenuLabel']}]}]}); 172 // Clipperz.YUI.DomHelper.append(menusTRElement.dom, {tag:'td', id:'contactsTab', children:[{tag:'div', children:[{tag:'a', id:'contactsTabAnchor', htmlString:Clipperz.PM.Strings['contactsMenuLabel']}]}]});
175 Clipperz.YUI.DomHelper.append(menusTRElement.dom, {tag:'td', id:'toolsTab', children:[{tag:'div', children:[{tag:'a', id:'toolsTabAnchor', htmlString:Clipperz.PM.Strings['toolsMenuLabel']}]}]}); 173 Clipperz.YUI.DomHelper.append(menusTRElement.dom, {tag:'td', id:'toolsTab', children:[{tag:'div', children:[{tag:'a', id:'toolsTabAnchor', htmlString:Clipperz.PM.Strings['toolsMenuLabel']}]}]});
176 174
177 mainElement = YAHOO.ext.Element.get('main'); 175 mainElement = YAHOO.ext.Element.get('main');
178 mainElement.update(""); 176 mainElement.update("");
179 Clipperz.YUI.DomHelper.append(mainElement.dom, {tag:'ul', cls:'clipperzTabPanels', children:[ 177 Clipperz.YUI.DomHelper.append(mainElement.dom, {tag:'ul', cls:'clipperzTabPanels', children:[
180 {tag:'li', id:'recordsPanel'}, 178 {tag:'li', id:'recordsPanel'},
181 {tag:'li', id:'accountPanel'}, 179 {tag:'li', id:'accountPanel'},
182 {tag:'li', id:'dataPanel'}, 180 {tag:'li', id:'dataPanel'},
183 // {tag:'li', id:'contactsPanel'}, 181 // {tag:'li', id:'contactsPanel'},
184 {tag:'li', id:'toolsPanel'} 182 {tag:'li', id:'toolsPanel'}
185 ]}, true) 183 ]}, true)
186 184
187 new Clipperz.PM.Components.TabPanel.TabPanelController({ 185 new Clipperz.PM.Components.TabPanel.TabPanelController({
188 name: 'mainTabPanel', 186 name: 'mainTabPanel',
189 config:{'recordsTab':'recordsPanel', 187 config:{'recordsTab':'recordsPanel',
190 'accountTab':'accountPanel', 188 'accountTab':'accountPanel',
191 'dataTab':'dataPanel', 189 'dataTab':'dataPanel',
192 // 'contactsTab':'contactsPanel', 190 // 'contactsTab':'contactsPanel',
193 'toolsTab':'toolsPanel'}, 191 'toolsTab':'toolsPanel'},
194 selectedTab:'recordsTab' 192 selectedTab:'recordsTab'
195 }).setUp(); 193 }).setUp();
196 194
197 new Clipperz.PM.Components.Panels.MainPanel(YAHOO.ext.Element.get('recordsPanel'), {user:this.user()}); 195 new Clipperz.PM.Components.Panels.MainPanel(YAHOO.ext.Element.get('recordsPanel'), {user:this.user()});
198 new Clipperz.PM.Components.Panels.AccountPanel(YAHOO.ext.Element.get('accountPanel'), {user:this.user()}); 196 new Clipperz.PM.Components.Panels.AccountPanel(YAHOO.ext.Element.get('accountPanel'), {user:this.user()});
199 new Clipperz.PM.Components.Panels.DataPanel(YAHOO.ext.Element.get('dataPanel'), {user:this.user()}); 197 new Clipperz.PM.Components.Panels.DataPanel(YAHOO.ext.Element.get('dataPanel'), {user:this.user()});
200 // new Clipperz.PM.Components.Panels.ContactsPanel(YAHOO.ext.Element.get('contactsPanel'), {user:this.user()}); 198 // new Clipperz.PM.Components.Panels.ContactsPanel(YAHOO.ext.Element.get('contactsPanel'), {user:this.user()});
201 new Clipperz.PM.Components.Panels.ToolsPanel(YAHOO.ext.Element.get('toolsPanel'), {user:this.user()}); 199 new Clipperz.PM.Components.Panels.ToolsPanel(YAHOO.ext.Element.get('toolsPanel'), {user:this.user()});
202 200
203 this.fixToDrawTheMainTabsCorrectlyOnSafari(); //fix to 201 this.fixToDrawTheMainTabsCorrectlyOnSafari(); //fix to
204//MochiKit.Logging.logDebug("<<< Main.showMainPanels"); 202//MochiKit.Logging.logDebug("<<< Main.showMainPanels");
205 }, 203 },
206 204
207 //------------------------------------------------------------------------- 205 //-------------------------------------------------------------------------
208 206
209 'userConnectedCallback': function(anEvent) { 207 'userConnectedCallback': function(anEvent) {
210//MochiKit.Logging.logDebug(">>> Main.userConnectedCallback"); 208//MochiKit.Logging.logDebug(">>> Main.userConnectedCallback");
211//MochiKit.Logging.logDebug(">>> doConnect - user: " + this.user()); 209//MochiKit.Logging.logDebug(">>> doConnect - user: " + this.user());
212 this.setUser(anEvent.source()); 210 this.setUser(anEvent.source());
213 211
214 if (this.isRunningCompact()) { 212 if (this.isRunningCompact()) {
215 this.showCompactInterface(); 213 this.showCompactInterface();
216 } else { 214 } else {
217 this.showMainPanels(); 215 this.showMainPanels();
218 } 216 }
219//MochiKit.Logging.logDebug("<<< Main.userConnectedCallback"); 217//MochiKit.Logging.logDebug("<<< Main.userConnectedCallback");
220 }, 218 },
221 219
222 //----------------------------------------------------------------------------- 220 //-----------------------------------------------------------------------------
223 221
224 'user': function() { 222 'user': function() {
225 return this._user; 223 return this._user;
226 }, 224 },
227 225
228 'setUser': function(aValue) { 226 'setUser': function(aValue) {
229 this._user = aValue; 227 this._user = aValue;
230 }, 228 },
231 229
232 //----------------------------------------------------------------------------- 230 //-----------------------------------------------------------------------------
233 231
234 'doLogoutEventHandler': function(anEvent) { 232 'doLogoutEventHandler': function(anEvent) {
235 var deferred; 233 var deferred;
236 234
237 anEvent.stop(); 235 anEvent.stop();
238 236
239 deferred = new MochiKit.Async.Deferred(); 237 deferred = new MochiKit.Async.Deferred();
240//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("Main.doLogoutEventHandler - 1: " + res); return res;}); 238//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("Main.doLogoutEventHandler - 1: " + res); return res;});
241 deferred.addCallback(MochiKit.Base.method(this.user(), 'doLogout')); 239 deferred.addCallback(MochiKit.Base.method(this.user(), 'doLogout'));
242//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("Main.doLogoutEventHandler - 2: " + res); return res;}); 240//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("Main.doLogoutEventHandler - 2: " + res); return res;});
243 deferred.addCallback(Clipperz.PM.exit, 'logout.html'); 241 deferred.addCallback(Clipperz.PM.exit, 'logout.html');
244//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("Main.doLogoutEventHandler - 3: " + res); return res;}); 242//deferred.addBoth(function(res) {MochiKit.Logging.logDebug("Main.doLogoutEventHandler - 3: " + res); return res;});
245 deferred.callback(); 243 deferred.callback();
246 }, 244 },
247 245
248 //----------------------------------------------------------------------------- 246 //-----------------------------------------------------------------------------
249 247
250 'doLockEventHandler': function(anEvent) { 248 'doLockEventHandler': function(anEvent) {
251 vardeferredResult; 249 vardeferredResult;
252 varlockDialogElement; 250 varlockDialogElement;
253 var lockDialog; 251 var lockDialog;
254 var unlockButton; 252 var unlockButton;
255 253
256 anEvent.stop(); 254 anEvent.stop();
257 255
258 Clipperz.NotificationCenter.notify(this, 'accountLocked', null, true); 256 Clipperz.NotificationCenter.notify(this, 'accountLocked', null, true);
259 257
260 lockDialogElement = Clipperz.YUI.DomHelper.append(document.body, {tag:'div', id:'lockDialog', children:[ 258 lockDialogElement = Clipperz.YUI.DomHelper.append(document.body, {tag:'div', id:'lockDialog', children:[
261 {tag:'div', cls:'ydlg-hd', htmlString:Clipperz.PM.Strings['lockTitle']}, 259 {tag:'div', cls:'ydlg-hd', htmlString:Clipperz.PM.Strings['lockTitle']},
262 {tag:'div', cls:'ydlg-bd', children:[ 260 {tag:'div', cls:'ydlg-bd', children:[
263 {tag:'div', cls:'alert-message', id:'lockMessage', children:[ 261 {tag:'div', cls:'alert-message', id:'lockMessage', children:[
264 {tag:'div', htmlString:Clipperz.PM.Strings['lockDescription']}, 262 {tag:'div', htmlString:Clipperz.PM.Strings['lockDescription']},
265 {tag:'form', id:'lockDialogForm', children:[ 263 {tag:'form', id:'lockDialogForm', children:[
266 {tag:'input', type:'password', id:'lockPassphrase'} 264 {tag:'input', type:'password', id:'lockPassphrase'}
267 ]} 265 ]}
268 ]} 266 ]}
269 ]}, 267 ]},
270 {tag:'div', cls:'ydlg-ft'} 268 {tag:'div', cls:'ydlg-ft'}
271 ]}, true); 269 ]}, true);
272 new Clipperz.PM.Components.PasswordEntropyDisplay(YAHOO.ext.Element.get('lockPassphrase')); 270 new Clipperz.PM.Components.PasswordEntropyDisplay(YAHOO.ext.Element.get('lockPassphrase'));
273 271
274 lockDialog = new YAHOO.ext.BasicDialog( 272 lockDialog = new YAHOO.ext.BasicDialog(
275 lockDialogElement, { 273 lockDialogElement, {
276 closable:false, 274 closable:false,
277 modal:true, 275 modal:true,
278 autoTabs:false, 276 autoTabs:false,
279 resizable:false, 277 resizable:false,
280 fixedcenter:true, 278 fixedcenter:true,
281 constraintoviewport:false, 279 constraintoviewport:false,
282 width:350, 280 width:350,
283 height:130, 281 height:130,
284 shadow:true 282 shadow:true
285 } 283 }
286 ); 284 );
287 285
288 unlockButton = lockDialog.addButton(Clipperz.PM.Strings['unlockButtonLabel'], MochiKit.Base.method(this, 'exitLock', lockDialog)); 286 unlockButton = lockDialog.addButton(Clipperz.PM.Strings['unlockButtonLabel'], MochiKit.Base.method(this, 'exitLock', lockDialog));
289//MochiKit.Logging.logDebug("--- Main.showAlertDialog - 5"); 287//MochiKit.Logging.logDebug("--- Main.showAlertDialog - 5");
290 lockDialog.setDefaultButton(unlockButton); 288 lockDialog.setDefaultButton(unlockButton);
291 289
292 MochiKit.Signal.connect('lockDialogForm', 'onsubmit', MochiKit.Base.method(this, 'exitLock', lockDialog)); 290 MochiKit.Signal.connect('lockDialogForm', 'onsubmit', MochiKit.Base.method(this, 'exitLock', lockDialog));
293 lockDialog.on('show', function() {YAHOO.ext.Element.get('lockPassphrase').focus();}); 291 lockDialog.on('show', function() {YAHOO.ext.Element.get('lockPassphrase').focus();});
294 lockDialog.show('main'); 292 lockDialog.show('main');
295 // this.user().lock(); 293 // this.user().lock();
296 }, 294 },
297 295
298 'exitLock': function(aLockDialog, anEvent) { 296 'exitLock': function(aLockDialog, anEvent) {
299 // var deferredResult; 297 // var deferredResult;
300 298
301//MochiKit.Logging.logDebug(">>> Exiting lock"); 299//MochiKit.Logging.logDebug(">>> Exiting lock");
302 if (typeof(anEvent.stop) != 'undefined') { 300 if (typeof(anEvent.stop) != 'undefined') {
303 anEvent.stop(); 301 anEvent.stop();
304 } 302 }
305 303
306 if (this.user().passphrase() == YAHOO.ext.Element.get('lockPassphrase').dom.value) { 304 if (this.user().passphrase() == YAHOO.ext.Element.get('lockPassphrase').dom.value) {
307 aLockDialog.hide(MochiKit.Base.method(aLockDialog, 'destroy', true)); 305 aLockDialog.hide(MochiKit.Base.method(aLockDialog, 'destroy', true));
308 Clipperz.NotificationCenter.notify(this, 'accountUnlocked', null, true); 306 Clipperz.NotificationCenter.notify(this, 'accountUnlocked', null, true);
309 } else { 307 } else {
310 YAHOO.ext.Element.get('lockPassphrase').dom.value = ""; 308 YAHOO.ext.Element.get('lockPassphrase').dom.value = "";
311 YAHOO.ext.Element.get('lockPassphrase').focus(); 309 YAHOO.ext.Element.get('lockPassphrase').focus();
312 } 310 }
313 311
314 // deferredResult = new MochiKit.Async.Deferred(); 312 // deferredResult = new MochiKit.Async.Deferred();
315 // deferredResult.addCallback(MochiKit.Base.method(this.user(), 'unlockWithPassphrase')); 313 // deferredResult.addCallback(MochiKit.Base.method(this.user(), 'unlockWithPassphrase'));
316 // deferredResult.addCallback(MochiKit.Base.method(aLockDialog, 'hide', MochiKit.Base.method(aLockDialog, 'destroy', true))); 314 // deferredResult.addCallback(MochiKit.Base.method(aLockDialog, 'hide', MochiKit.Base.method(aLockDialog, 'destroy', true)));
317 // deferredResult.addCallback(MochiKit.Base.method(Clipperz.NotificationCenter, 'notify', this, 'accountUnlocked', null, true)); 315 // deferredResult.addCallback(MochiKit.Base.method(Clipperz.NotificationCenter, 'notify', this, 'accountUnlocked', null, true));
318 // deferredResult.addErrback(function() { 316 // deferredResult.addErrback(function() {
319 // YAHOO.ext.Element.get('lockPassphrase').dom.value = ""; 317 // YAHOO.ext.Element.get('lockPassphrase').dom.value = "";
320 // YAHOO.ext.Element.get('lockPassphrase').focus(); 318 // YAHOO.ext.Element.get('lockPassphrase').focus();
321 // }); 319 // });
322 // deferredResult.callback(YAHOO.ext.Element.get('lockPassphrase').dom.value); 320 // deferredResult.callback(YAHOO.ext.Element.get('lockPassphrase').dom.value);
323 321
324 return false; 322 return false;
325 }, 323 },
326 324
327 //----------------------------------------------------------------------------- 325 //-----------------------------------------------------------------------------
328 326
329 'updateProgressDialogStatus': function(anEvent) { 327 'updateProgressDialogStatus': function(anEvent) {
330//MochiKit.Logging.logDebug(">>> main.updateProgressDialogStatus - " + anEvent.parameters()); 328//MochiKit.Logging.logDebug(">>> main.updateProgressDialogStatus - " + anEvent.parameters());
331//try { 329//try {
332 if (Clipperz.Base.objectType(anEvent.parameters()) == 'string') { 330 if (Clipperz.Base.objectType(anEvent.parameters()) == 'string') {
333 Clipperz.PM.Components.MessageBox().update(Clipperz.PM.Strings.messagePanelConfigurations[anEvent.parameters()]()); 331 Clipperz.PM.Components.MessageBox().update(Clipperz.PM.Strings.messagePanelConfigurations[anEvent.parameters()]());
334 } else { 332 } else {
335 Clipperz.PM.Components.MessageBox().update(anEvent.parameters()); 333 Clipperz.PM.Components.MessageBox().update(anEvent.parameters());
336 } 334 }
337//} catch (exception) { 335//} catch (exception) {
338//console.log("updateProgressDialogStatus - anEvent", anEvent); 336//console.log("updateProgressDialogStatus - anEvent", anEvent);
339 //MochiKit.Logging.logError("Main.updateProgressDialogStatus: " + exception); 337 //MochiKit.Logging.logError("Main.updateProgressDialogStatus: " + exception);
340 //throw exception; 338 //throw exception;
341//} 339//}
342//MochiKit.Logging.logDebug("<<< main.updateProgressDialogStatus"); 340//MochiKit.Logging.logDebug("<<< main.updateProgressDialogStatus");
343 }, 341 },
344 342
345 //----------------------------------------------------------------------------- 343 //-----------------------------------------------------------------------------
346 344
347 'defaultErrorHandler': function(anErrorString, anException) { 345 'defaultErrorHandler': function(anErrorString, anException) {
348MochiKit.Logging.logDebug(">>> DEFAULT ERROR HANDLER: " + anErrorString + " (exception: " + Clipperz.Base.serializeJSON(anException) + ")"); 346MochiKit.Logging.logDebug(">>> DEFAULT ERROR HANDLER: " + anErrorString + " (exception: " + Clipperz.Base.serializeJSON(anException) + ")");
349 }, 347 },
350 348
351 //----------------------------------------------------------------------------- 349 //-----------------------------------------------------------------------------
352 350
353 'isRunningCompact': function() { 351 'isRunningCompact': function() {
354 return this._isRunningCompact; 352 return this._isRunningCompact;
355 }, 353 },
356 354
357 'setIsRunningCompact': function(aValue) { 355 'setIsRunningCompact': function(aValue) {
358 this._isRunningCompact = aValue; 356 this._isRunningCompact = aValue;
359 }, 357 },
360 358
361 //----------------------------------------------------------------------------- 359 //-----------------------------------------------------------------------------
362 360
363 'reportException': function(anError) { 361 'reportException': function(anError) {
364/* 362/*
365 var deferredResult; 363 var deferredResult;
366 364
367 deferredResult = new MochiKit.Async.Deferred(); 365 deferredResult = new MochiKit.Async.Deferred();
368 366
369 Clipperz.PM.Components.MessageBox().show( 367 Clipperz.PM.Components.MessageBox().show(
370 { 368 {
371 title:Clipperz.PM.Strings['fatalErrorMessageTitle'], 369 title:Clipperz.PM.Strings['fatalErrorMessageTitle'],
372 text:Clipperz.PM.Strings['fatalErrorMessageText'], 370 text:Clipperz.PM.Strings['fatalErrorMessageText'],
373 width:240, 371 width:240,
374 showProgressBar:false, 372 showProgressBar:false,
375 showCloseButton:false, 373 showCloseButton:false,
376 fn:MochiKit.Base.method(deferredResult, 'callback'), 374 fn:MochiKit.Base.method(deferredResult, 'callback'),
377 scope:this, 375 scope:this,
378 buttons:{ 376 buttons:{
379 'ok':Clipperz.PM.Strings['fatalErrorMessageCloseButtonLabel'] 377 'ok':Clipperz.PM.Strings['fatalErrorMessageCloseButtonLabel']
380 } 378 }
381 } 379 }
382 ); 380 );
383 381
384 deferredResult.addCallback(function() { 382 deferredResult.addCallback(function() {
385 window.document.body.innerHTML = ""; 383 window.document.body.innerHTML = "";
386 window.location.reload(true); 384 window.location.reload(true);
387 }); 385 });
388*/ 386*/
389 Clipperz.PM.exit('error.html'); 387 Clipperz.PM.exit('error.html');
390 }, 388 },
391 389
392 //----------------------------------------------------------------------------- 390 //-----------------------------------------------------------------------------
393 __syntaxFix__: "syntax fix" 391 __syntaxFix__: "syntax fix"
394 392
395}); 393});
396 394
397 395
398 396
399//############################################################################# 397//#############################################################################
400 398
401MochiKit.Base.update(Clipperz.PM, { 399MochiKit.Base.update(Clipperz.PM, {
402 400
403 __repr__: function() { 401 __repr__: function() {
404 return "[" + this.NAME + " " + this.VERSION + "]"; 402 return "[" + this.NAME + " " + this.VERSION + "]";
405 }, 403 },
406 404
diff --git a/frontend/beta/js/Clipperz/PM/Proxy.js b/frontend/beta/js/Clipperz/PM/Proxy.js
index bec9195..cf5a237 100644
--- a/frontend/beta/js/Clipperz/PM/Proxy.js
+++ b/frontend/beta/js/Clipperz/PM/Proxy.js
@@ -1,169 +1,167 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28 26
29//============================================================================= 27//=============================================================================
30 28
31Clipperz.PM.Proxy = function(args) { 29Clipperz.PM.Proxy = function(args) {
32 args = args || {}; 30 args = args || {};
33 31
34 this._shouldPayTolls = args.shouldPayTolls || false; 32 this._shouldPayTolls = args.shouldPayTolls || false;
35 33
36 this._tolls = { 34 this._tolls = {
37 'CONNECT':[], 35 'CONNECT':[],
38 'REGISTER':[], 36 'REGISTER':[],
39 'MESSAGE':[] 37 'MESSAGE':[]
40 }; 38 };
41 39
42 if (args.isDefault === true) { 40 if (args.isDefault === true) {
43 Clipperz.PM.Proxy.defaultProxy = this; 41 Clipperz.PM.Proxy.defaultProxy = this;
44 } 42 }
45 43
46 return this; 44 return this;
47} 45}
48 46
49Clipperz.PM.Proxy.prototype = MochiKit.Base.update(null, { 47Clipperz.PM.Proxy.prototype = MochiKit.Base.update(null, {
50 48
51 'toString': function() { 49 'toString': function() {
52 return "Clipperz.PM.Proxy"; 50 return "Clipperz.PM.Proxy";
53 }, 51 },
54 52
55 //========================================================================= 53 //=========================================================================
56 54
57 'shouldPayTolls': function() { 55 'shouldPayTolls': function() {
58 return this._shouldPayTolls; 56 return this._shouldPayTolls;
59 }, 57 },
60 58
61 //------------------------------------------------------------------------- 59 //-------------------------------------------------------------------------
62 60
63 'tolls': function() { 61 'tolls': function() {
64 return this._tolls; 62 return this._tolls;
65 }, 63 },
66 64
67 //------------------------------------------------------------------------- 65 //-------------------------------------------------------------------------
68 66
69 'payToll': function(aRequestType, someParameters) { 67 'payToll': function(aRequestType, someParameters) {
70 vardeferredResult; 68 vardeferredResult;
71 69
72//console.log(">>> Proxy.payToll", aRequestType, someParameters); 70//console.log(">>> Proxy.payToll", aRequestType, someParameters);
73 if (this.shouldPayTolls()) { 71 if (this.shouldPayTolls()) {
74 deferredResult = new MochiKit.Async.Deferred(); 72 deferredResult = new MochiKit.Async.Deferred();
75 73
76 if (this.tolls()[aRequestType].length == 0) { 74 if (this.tolls()[aRequestType].length == 0) {
77 deferredResult.addCallback(MochiKit.Base.method(this, 'sendMessage', 'knock', {requestType:aRequestType})); 75 deferredResult.addCallback(MochiKit.Base.method(this, 'sendMessage', 'knock', {requestType:aRequestType}));
78 deferredResult.addCallback(MochiKit.Base.method(this, 'setTollCallback')); 76 deferredResult.addCallback(MochiKit.Base.method(this, 'setTollCallback'));
79 } 77 }
80 deferredResult.addCallback(MochiKit.Base.method(this.tolls()[aRequestType], 'pop')); 78 deferredResult.addCallback(MochiKit.Base.method(this.tolls()[aRequestType], 'pop'));
81 deferredResult.addCallback(MochiKit.Base.methodcaller('deferredPay')); 79 deferredResult.addCallback(MochiKit.Base.methodcaller('deferredPay'));
82 deferredResult.addCallback(function(aToll) { 80 deferredResult.addCallback(function(aToll) {
83 var result; 81 var result;
84 82
85 result = { 83 result = {
86 parameters: someParameters, 84 parameters: someParameters,
87 toll: aToll 85 toll: aToll
88 } 86 }
89 87
90 return result; 88 return result;
91 }); 89 });
92 90
93 deferredResult.callback(); 91 deferredResult.callback();
94 } else { 92 } else {
95 deferredResult = MochiKit.Async.succeed({parameters:someParameters}); 93 deferredResult = MochiKit.Async.succeed({parameters:someParameters});
96 } 94 }
97//console.log("<<< Proxy.payToll"); 95//console.log("<<< Proxy.payToll");
98 96
99 return deferredResult; 97 return deferredResult;
100 }, 98 },
101 99
102 //------------------------------------------------------------------------- 100 //-------------------------------------------------------------------------
103 101
104 'addToll': function(aToll) { 102 'addToll': function(aToll) {
105//console.log(">>> Proxy.addToll", aToll); 103//console.log(">>> Proxy.addToll", aToll);
106 this.tolls()[aToll.requestType()].push(aToll); 104 this.tolls()[aToll.requestType()].push(aToll);
107//console.log("<<< Proxy.addToll"); 105//console.log("<<< Proxy.addToll");
108 }, 106 },
109 107
110 //========================================================================= 108 //=========================================================================
111 109
112 'setTollCallback': function(someParameters) { 110 'setTollCallback': function(someParameters) {
113//console.log(">>> Proxy.setTollCallback", someParameters); 111//console.log(">>> Proxy.setTollCallback", someParameters);
114 if (typeof(someParameters['toll']) != 'undefined') { 112 if (typeof(someParameters['toll']) != 'undefined') {
115//console.log("added a new toll", someParameters['toll']); 113//console.log("added a new toll", someParameters['toll']);
116 this.addToll(new Clipperz.PM.Toll(someParameters['toll'])); 114 this.addToll(new Clipperz.PM.Toll(someParameters['toll']));
117 } 115 }
118//console.log("<<< Proxy.setTallCallback", someParameters['result']); 116//console.log("<<< Proxy.setTallCallback", someParameters['result']);
119 return someParameters['result']; 117 return someParameters['result'];
120 }, 118 },
121 119
122 //========================================================================= 120 //=========================================================================
123 121
124 'registration': function (someParameters) { 122 'registration': function (someParameters) {
125 return this.processMessage('registration', someParameters, 'REGISTER'); 123 return this.processMessage('registration', someParameters, 'REGISTER');
126 }, 124 },
127 125
128 'handshake': function (someParameters) { 126 'handshake': function (someParameters) {
129 return this.processMessage('handshake', someParameters, 'CONNECT'); 127 return this.processMessage('handshake', someParameters, 'CONNECT');
130 }, 128 },
131 129
132 'message': function (someParameters) { 130 'message': function (someParameters) {
133 return this.processMessage('message', someParameters, 'MESSAGE'); 131 return this.processMessage('message', someParameters, 'MESSAGE');
134 }, 132 },
135 133
136 'logout': function (someParameters) { 134 'logout': function (someParameters) {
137 return this.processMessage('logout', someParameters, 'MESSAGE'); 135 return this.processMessage('logout', someParameters, 'MESSAGE');
138 }, 136 },
139 137
140 //========================================================================= 138 //=========================================================================
141 139
142 'processMessage': function (aFunctionName, someParameters, aRequestType) { 140 'processMessage': function (aFunctionName, someParameters, aRequestType) {
143 vardeferredResult; 141 vardeferredResult;
144 142
145 deferredResult = new MochiKit.Async.Deferred(); 143 deferredResult = new MochiKit.Async.Deferred();
146 deferredResult.addCallback(MochiKit.Base.method(this, 'payToll', aRequestType)); 144 deferredResult.addCallback(MochiKit.Base.method(this, 'payToll', aRequestType));
147 deferredResult.addCallback(MochiKit.Base.method(this, 'sendMessage', aFunctionName)); 145 deferredResult.addCallback(MochiKit.Base.method(this, 'sendMessage', aFunctionName));
148 deferredResult.addCallback(MochiKit.Base.method(this, 'setTollCallback')); 146 deferredResult.addCallback(MochiKit.Base.method(this, 'setTollCallback'));
149 deferredResult.callback(someParameters); 147 deferredResult.callback(someParameters);
150 148
151 return deferredResult; 149 return deferredResult;
152 }, 150 },
153 151
154 //========================================================================= 152 //=========================================================================
155 153
156 'sendMessage': function () { 154 'sendMessage': function () {
157 throw Clipperz.Base.exception.AbstractMethod; 155 throw Clipperz.Base.exception.AbstractMethod;
158 }, 156 },
159 157
160 //========================================================================= 158 //=========================================================================
161 159
162 'isReadOnly': function () { 160 'isReadOnly': function () {
163 return false; 161 return false;
164 }, 162 },
165 163
166 //========================================================================= 164 //=========================================================================
167 __syntaxFix__: "syntax fix" 165 __syntaxFix__: "syntax fix"
168 166
169}); 167});
diff --git a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.JSON.js b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.JSON.js
index 4f3b4b2..dac966d 100755
--- a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.JSON.js
+++ b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.JSON.js
@@ -1,97 +1,95 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28 26
29//============================================================================= 27//=============================================================================
30 28
31Clipperz.PM.Proxy.JSON = function(args) { 29Clipperz.PM.Proxy.JSON = function(args) {
32 Clipperz.PM.Proxy.JSON.superclass.constructor.call(this, args); 30 Clipperz.PM.Proxy.JSON.superclass.constructor.call(this, args);
33 31
34 this._url = args.url || Clipperz.Base.exception.raise('MandatoryParameter'); 32 this._url = args.url || Clipperz.Base.exception.raise('MandatoryParameter');
35 33
36 return this; 34 return this;
37} 35}
38 36
39YAHOO.extendX(Clipperz.PM.Proxy.JSON, Clipperz.PM.Proxy, { 37YAHOO.extendX(Clipperz.PM.Proxy.JSON, Clipperz.PM.Proxy, {
40 38
41 'toString': function() { 39 'toString': function() {
42 return "Clipperz.PM.Proxy.JSON"; 40 return "Clipperz.PM.Proxy.JSON";
43 }, 41 },
44 42
45 //========================================================================= 43 //=========================================================================
46 44
47 'url': function () { 45 'url': function () {
48 return this._url; 46 return this._url;
49 }, 47 },
50 48
51 //========================================================================= 49 //=========================================================================
52 50
53 'sendMessage': function(aFunctionName, someParameters) { 51 'sendMessage': function(aFunctionName, someParameters) {
54 vardeferredResult; 52 vardeferredResult;
55 var parameters; 53 var parameters;
56 54
57 parameters = { 55 parameters = {
58 method: aFunctionName, 56 method: aFunctionName,
59 // version: someParameters['version'], 57 // version: someParameters['version'],
60 // message: someParameters['message'], 58 // message: someParameters['message'],
61 parameters: Clipperz.Base.serializeJSON(someParameters) 59 parameters: Clipperz.Base.serializeJSON(someParameters)
62 }; 60 };
63 61
64 deferredResult = new MochiKit.Async.Deferred(); 62 deferredResult = new MochiKit.Async.Deferred();
65 deferredResult.addCallback(function (aValue) { 63 deferredResult.addCallback(function (aValue) {
66 MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'remoteRequestSent'); 64 MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'remoteRequestSent');
67 return aValue; 65 return aValue;
68 }); 66 });
69 deferredResult.addCallback(MochiKit.Async.doXHR, this.url(), { 67 deferredResult.addCallback(MochiKit.Async.doXHR, this.url(), {
70 method:'POST', 68 method:'POST',
71 sendContent:MochiKit.Base.queryString(parameters), 69 sendContent:MochiKit.Base.queryString(parameters),
72 headers:{"Content-Type":"application/x-www-form-urlencoded"} 70 headers:{"Content-Type":"application/x-www-form-urlencoded"}
73 }); 71 });
74 deferredResult.addCallback(function (aValue) { 72 deferredResult.addCallback(function (aValue) {
75 MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'remoteRequestReceived'); 73 MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'remoteRequestReceived');
76 return aValue; 74 return aValue;
77 }); 75 });
78 // deferredResult.addCallback(MochiKit.Async.evalJSONRequest); 76 // deferredResult.addCallback(MochiKit.Async.evalJSONRequest);
79 deferredResult.addCallback(MochiKit.Base.itemgetter('responseText')); 77 deferredResult.addCallback(MochiKit.Base.itemgetter('responseText'));
80 deferredResult.addCallback(Clipperz.Base.evalJSON); 78 deferredResult.addCallback(Clipperz.Base.evalJSON);
81 deferredResult.addCallback(function (someValues) { 79 deferredResult.addCallback(function (someValues) {
82 if (someValues['result'] == 'EXCEPTION') { 80 if (someValues['result'] == 'EXCEPTION') {
83 throw someValues['message']; 81 throw someValues['message'];
84 } 82 }
85 83
86 return someValues; 84 return someValues;
87 }) 85 })
88 // return MochiKit.Base.evalJSON(req.responseText); 86 // return MochiKit.Base.evalJSON(req.responseText);
89 deferredResult.callback(); 87 deferredResult.callback();
90 88
91 return deferredResult; 89 return deferredResult;
92 }, 90 },
93 91
94 //========================================================================= 92 //=========================================================================
95 __syntaxFix__: "syntax fix" 93 __syntaxFix__: "syntax fix"
96 94
97}); 95});
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 d5336be..1a5caff 100644
--- a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js
+++ b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26try { if (typeof(Clipperz.PM.Proxy.Offline) == 'undefined') { throw ""; }} catch (e) { 24try { if (typeof(Clipperz.PM.Proxy.Offline) == 'undefined') { throw ""; }} catch (e) {
27 throw "Clipperz.PM.Proxy.Offline.DataStore depends on Clipperz.PM.Proxy.Offline!"; 25 throw "Clipperz.PM.Proxy.Offline.DataStore depends on Clipperz.PM.Proxy.Offline!";
28} 26}
29 27
30//============================================================================= 28//=============================================================================
31 29
32Clipperz.PM.Proxy.Offline.DataStore = function(args) { 30Clipperz.PM.Proxy.Offline.DataStore = function(args) {
33 args = args || {}; 31 args = args || {};
34 32
35 this._data = args.data || (typeof(_clipperz_dump_data_) != 'undefined' ? _clipperz_dump_data_ : null); 33 this._data = args.data || (typeof(_clipperz_dump_data_) != 'undefined' ? _clipperz_dump_data_ : null);
36 this._isReadOnly = (typeof(args.readOnly) == 'undefined' ? true : args.readOnly); 34 this._isReadOnly = (typeof(args.readOnly) == 'undefined' ? true : args.readOnly);
37 this._shouldPayTolls = args.shouldPayTolls || false; 35 this._shouldPayTolls = args.shouldPayTolls || false;
38 36
39 this._tolls = {}; 37 this._tolls = {};
40 this._connections = {}; 38 this._connections = {};
41 39
42 this._b = null; 40 this._b = null;
43 this._B = null; 41 this._B = null;
44 this._A = null; 42 this._A = null;
45 this._userData = null; 43 this._userData = null;
46 44
47 return this; 45 return this;
48} 46}
49 47
50//Clipperz.Base.extend(Clipperz.PM.Proxy.Offline.DataStore, Object, { 48//Clipperz.Base.extend(Clipperz.PM.Proxy.Offline.DataStore, Object, {
51Clipperz.PM.Proxy.Offline.DataStore.prototype = MochiKit.Base.update(null, { 49Clipperz.PM.Proxy.Offline.DataStore.prototype = MochiKit.Base.update(null, {
52 50
53 //------------------------------------------------------------------------- 51 //-------------------------------------------------------------------------
54 52
55 'isReadOnly': function () { 53 'isReadOnly': function () {
56 return this._isReadOnly; 54 return this._isReadOnly;
57 }, 55 },
58 56
59 //------------------------------------------------------------------------- 57 //-------------------------------------------------------------------------
60 58
61 'shouldPayTolls': function() { 59 'shouldPayTolls': function() {
62 return this._shouldPayTolls; 60 return this._shouldPayTolls;
63 }, 61 },
64 62
65 //------------------------------------------------------------------------- 63 //-------------------------------------------------------------------------
66 64
67 'data': function () { 65 'data': function () {
68 return this._data; 66 return this._data;
69 }, 67 },
70 68
71 //------------------------------------------------------------------------- 69 //-------------------------------------------------------------------------
72 70
73 'tolls': function () { 71 'tolls': function () {
74 return this._tolls; 72 return this._tolls;
75 }, 73 },
76 74
77 //------------------------------------------------------------------------- 75 //-------------------------------------------------------------------------
78 76
79 'connections': function () { 77 'connections': function () {
80 return this._connections; 78 return this._connections;
81 }, 79 },
82 80
83 //========================================================================= 81 //=========================================================================
84 82
85 'resetData': function() { 83 'resetData': function() {
86 this._data = { 84 this._data = {
87 'users': { 85 'users': {
88 'catchAllUser': { 86 'catchAllUser': {
89 __masterkey_test_value__: 'masterkey', 87 __masterkey_test_value__: 'masterkey',
90 s: '112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00', 88 s: '112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00',
91 v: '112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00' 89 v: '112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00'
92 } 90 }
93 } 91 }
94 }; 92 };
95 }, 93 },
96 94
97 //------------------------------------------------------------------------- 95 //-------------------------------------------------------------------------
98 96
99 'setupWithEncryptedData': function(someData) { 97 'setupWithEncryptedData': function(someData) {
100 this._data = Clipperz.Base.deepClone(someData); 98 this._data = Clipperz.Base.deepClone(someData);
101 }, 99 },
102 100
103 //------------------------------------------------------------------------- 101 //-------------------------------------------------------------------------
104 102
105 'setupWithData': function(someData) { 103 'setupWithData': function(someData) {
106 var deferredResult; 104 var deferredResult;
107 var resultData; 105 var resultData;
108 var i, c; 106 var i, c;
109 107
110//Clipperz.log(">>> Proxy.Test.setupWithData"); 108//Clipperz.log(">>> Proxy.Test.setupWithData");
111 resultData = this._data; 109 resultData = this._data;
112 110
113 deferredResult = new MochiKit.Async.Deferred(); 111 deferredResult = new MochiKit.Async.Deferred();
114 c = someData['users'].length; 112 c = someData['users'].length;
115 113
116 for (i=0; i<c; i++) { 114 for (i=0; i<c; i++) {
117 varnewConnection; 115 varnewConnection;
118 varrecordConfiguration; 116 varrecordConfiguration;
119 117
120 deferredResult.addCallback(MochiKit.Base.method(this, 'userSerializedEncryptedData', someData['users'][i])); 118 deferredResult.addCallback(MochiKit.Base.method(this, 'userSerializedEncryptedData', someData['users'][i]));
121 deferredResult.addCallback(MochiKit.Base.bind(function(aUserSerializationContext) { 119 deferredResult.addCallback(MochiKit.Base.bind(function(aUserSerializationContext) {
122//console.log("SERIALIZED USER", aUserSerializationContext); 120//console.log("SERIALIZED USER", aUserSerializationContext);
123 resultData['users'][aUserSerializationContext['credentials']['C']] = { 121 resultData['users'][aUserSerializationContext['credentials']['C']] = {
124 's': aUserSerializationContext['credentials']['s'], 122 's': aUserSerializationContext['credentials']['s'],
125 'v': aUserSerializationContext['credentials']['v'], 123 'v': aUserSerializationContext['credentials']['v'],
126 'version': aUserSerializationContext['data']['connectionVersion'], 124 'version': aUserSerializationContext['data']['connectionVersion'],
127 'userDetails': aUserSerializationContext['encryptedData']['user']['header'], 125 'userDetails': aUserSerializationContext['encryptedData']['user']['header'],
128 'userDetailsVersion':aUserSerializationContext['encryptedData']['user']['version'], 126 'userDetailsVersion':aUserSerializationContext['encryptedData']['user']['version'],
129 'statistics': aUserSerializationContext['encryptedData']['user']['statistics'], 127 'statistics': aUserSerializationContext['encryptedData']['user']['statistics'],
130 'lock': aUserSerializationContext['encryptedData']['user']['lock'], 128 'lock': aUserSerializationContext['encryptedData']['user']['lock'],
131 'records': this.rearrangeRecordsData(aUserSerializationContext['encryptedData']['records']) 129 'records': this.rearrangeRecordsData(aUserSerializationContext['encryptedData']['records'])
132 } 130 }
133 }, this)); 131 }, this));
134 } 132 }
135 133
136 deferredResult.addCallback(MochiKit.Base.bind(function() { 134 deferredResult.addCallback(MochiKit.Base.bind(function() {
137//console.log("this._data", resultData); 135//console.log("this._data", resultData);
138 this._data = resultData; 136 this._data = resultData;
139 }, this)); 137 }, this));
140 138
141 deferredResult.callback(); 139 deferredResult.callback();
142//Clipperz.log("<<< Proxy.Test.setupWithData"); 140//Clipperz.log("<<< Proxy.Test.setupWithData");
143 141
144 return deferredResult; 142 return deferredResult;
145 }, 143 },
146 144
147 //========================================================================= 145 //=========================================================================
148 146
149 'b': function() { 147 'b': function() {
150 return this._b; 148 return this._b;
151 }, 149 },
152 150
153 'set_b': function(aValue) { 151 'set_b': function(aValue) {
154 this._b = aValue; 152 this._b = aValue;
155 }, 153 },
156 154
157 //------------------------------------------------------------------------- 155 //-------------------------------------------------------------------------
158 156
159 'B': function() { 157 'B': function() {
160 return this._B; 158 return this._B;
161 }, 159 },
162 160
163 'set_B': function(aValue) { 161 'set_B': function(aValue) {
164 this._B = aValue; 162 this._B = aValue;
165 }, 163 },
166 164
167 //------------------------------------------------------------------------- 165 //-------------------------------------------------------------------------
168 166
169 'A': function() { 167 'A': function() {
170 return this._A; 168 return this._A;
171 }, 169 },
172 170
173 'set_A': function(aValue) { 171 'set_A': function(aValue) {
174 this._A = aValue; 172 this._A = aValue;
175 }, 173 },
176 174
177 //------------------------------------------------------------------------- 175 //-------------------------------------------------------------------------
178 176
179 'userData': function() { 177 'userData': function() {
180 return this._userData; 178 return this._userData;
181 }, 179 },
182 180
183 'setUserData': function(aValue) { 181 'setUserData': function(aValue) {
184 this._userData = aValue; 182 this._userData = aValue;
185 }, 183 },
186 184
187 //========================================================================= 185 //=========================================================================
188 186
189 'getTollForRequestType': function (aRequestType) { 187 'getTollForRequestType': function (aRequestType) {
190 varresult; 188 varresult;
191 vartargetValue; 189 vartargetValue;
192 var cost; 190 var cost;
193 191
194 targetValue = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32).toHexString().substring(2); 192 targetValue = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32).toHexString().substring(2);
195 switch (aRequestType) { 193 switch (aRequestType) {
196 case 'REGISTER': 194 case 'REGISTER':
197 cost = 5; 195 cost = 5;
198 break; 196 break;
199 case 'CONNECT': 197 case 'CONNECT':
200 cost = 5; 198 cost = 5;
201 break; 199 break;
202 case 'MESSAGE': 200 case 'MESSAGE':
203 cost = 2; 201 cost = 2;
204 break; 202 break;
205 } 203 }
206 204
207 result = { 205 result = {
208 requestType: aRequestType, 206 requestType: aRequestType,
209 targetValue: targetValue, 207 targetValue: targetValue,
210 cost: cost 208 cost: cost
211 } 209 }
212 210
213 if (this.shouldPayTolls()) { 211 if (this.shouldPayTolls()) {
214 this.tolls()[targetValue] = result; 212 this.tolls()[targetValue] = result;
215 } 213 }
216 214
217 return result; 215 return result;
218 }, 216 },
219 217
220 //------------------------------------------------------------------------- 218 //-------------------------------------------------------------------------
221 219
222 'checkToll': function (aFunctionName, someParameters) { 220 'checkToll': function (aFunctionName, someParameters) {
223 if (this.shouldPayTolls()) { 221 if (this.shouldPayTolls()) {
224 var localToll; 222 var localToll;
225 vartollParameters; 223 vartollParameters;
226 224
227 tollParameters = someParameters['toll']; 225 tollParameters = someParameters['toll'];
228 localToll = this.tolls()[tollParameters['targetValue']]; 226 localToll = this.tolls()[tollParameters['targetValue']];
229 227
230 if (localToll != null) { 228 if (localToll != null) {
231 if (! Clipperz.PM.Toll.validate(tollParameters['targetValue'], tollParameters['toll'], localToll['cost'])) { 229 if (! Clipperz.PM.Toll.validate(tollParameters['targetValue'], tollParameters['toll'], localToll['cost'])) {
232 throw "Toll value too low."; 230 throw "Toll value too low.";
233 }; 231 };
234 } else { 232 } else {
235 throw "Missing toll"; 233 throw "Missing toll";
236 } 234 }
237 } 235 }
238 }, 236 },
239 237
240 //========================================================================= 238 //=========================================================================
241 239
242 'processMessage': function(aFunctionName, someParameters) { 240 'processMessage': function(aFunctionName, someParameters) {
243 var result; 241 var result;
244 242
245 switch(aFunctionName) { 243 switch(aFunctionName) {
246 case 'knock': 244 case 'knock':
247 result = this._knock(someParameters); 245 result = this._knock(someParameters);
248 break; 246 break;
249 case 'registration': 247 case 'registration':
250 this.checkToll(aFunctionName, someParameters); 248 this.checkToll(aFunctionName, someParameters);
251 result = this._registration(someParameters.parameters); 249 result = this._registration(someParameters.parameters);
252 break; 250 break;
253 case 'handshake': 251 case 'handshake':
254 this.checkToll(aFunctionName, someParameters); 252 this.checkToll(aFunctionName, someParameters);
255 result = this._handshake(someParameters.parameters); 253 result = this._handshake(someParameters.parameters);
256 break; 254 break;
257 case 'message': 255 case 'message':
258 this.checkToll(aFunctionName, someParameters); 256 this.checkToll(aFunctionName, someParameters);
259 result = this._message(someParameters.parameters); 257 result = this._message(someParameters.parameters);
260 break; 258 break;
261 case 'logout': 259 case 'logout':
262 result = this._logout(someParameters.parameters); 260 result = this._logout(someParameters.parameters);
263 break; 261 break;
264 } 262 }
265 263
266 return result; 264 return result;
267 }, 265 },
268 266
269 //========================================================================= 267 //=========================================================================
270 268
271 '_knock': function(someParameters) { 269 '_knock': function(someParameters) {
272 var result; 270 var result;
273 271
274 result = { 272 result = {
275 toll: this.getTollForRequestType(someParameters['requestType']) 273 toll: this.getTollForRequestType(someParameters['requestType'])
276 // toll: { 274 // toll: {
277 // requestType: someParameters['requestType'], 275 // requestType: someParameters['requestType'],
278 // targetValue: "3a1ba0be23580f902885c6c8a6b035e228ed1ca74d77de5f9bb0e0c899f07cfe", 276 // targetValue: "3a1ba0be23580f902885c6c8a6b035e228ed1ca74d77de5f9bb0e0c899f07cfe",
279 // cost: 277 // cost:
280 // } 278 // }
281 } 279 }
282 280
283 return result; 281 return result;
284 }, 282 },
285 283
286 //------------------------------------------------------------------------- 284 //-------------------------------------------------------------------------
287 285
288 '_registration': function(someParameters) { 286 '_registration': function(someParameters) {
289//console.log("_registration", someParameters); 287//console.log("_registration", someParameters);
290 if (this.isReadOnly() == false) { 288 if (this.isReadOnly() == false) {
291 if (typeof(this.data()['users'][someParameters['credentials']['C']]) == 'undefined') { 289 if (typeof(this.data()['users'][someParameters['credentials']['C']]) == 'undefined') {
292 this.data()['users'][someParameters['credentials']['C']] = { 290 this.data()['users'][someParameters['credentials']['C']] = {
293 's': someParameters['credentials']['s'], 291 's': someParameters['credentials']['s'],
294 'v': someParameters['credentials']['v'], 292 'v': someParameters['credentials']['v'],
295 'version':someParameters['credentials']['version'], 293 'version':someParameters['credentials']['version'],
296 // 'lock': someParameters['user']['lock'], 294 // 'lock': someParameters['user']['lock'],
297 'lock': Clipperz.Crypto.Base.generateRandomSeed(), 295 'lock': Clipperz.Crypto.Base.generateRandomSeed(),
298 // 'maxNumberOfRecords':'100', 296 // 'maxNumberOfRecords':'100',
299 'userDetails': someParameters['user']['header'], 297 'userDetails': someParameters['user']['header'],
300 'statistics': someParameters['user']['statistics'], 298 'statistics': someParameters['user']['statistics'],
301 'userDetailsVersion':someParameters['user']['version'], 299 'userDetailsVersion':someParameters['user']['version'],
302 'records':{} 300 'records':{}
303 } 301 }
304 } else { 302 } else {
305 throw "user already exists"; 303 throw "user already exists";
306 } 304 }
307 } else { 305 } else {
308 throw Clipperz.PM.Proxy.Offline.DataStore.exception.ReadOnly; 306 throw Clipperz.PM.Proxy.Offline.DataStore.exception.ReadOnly;
309 } 307 }
310 308
311 result = { 309 result = {
312 result: { 310 result: {
313 'lock': this.data()['users'][someParameters['credentials']['C']]['lock'], 311 'lock': this.data()['users'][someParameters['credentials']['C']]['lock'],
314 'result':'done' 312 'result':'done'
315 }, 313 },
316 toll: this.getTollForRequestType('CONNECT') 314 toll: this.getTollForRequestType('CONNECT')
317 } 315 }
318 316
319 return MochiKit.Async.succeed(result); 317 return MochiKit.Async.succeed(result);
320 }, 318 },
321 319
322 //------------------------------------------------------------------------- 320 //-------------------------------------------------------------------------
323 321
324 '_handshake': function(someParameters) { 322 '_handshake': function(someParameters) {
325 var result; 323 var result;
326 varnextTollRequestType; 324 varnextTollRequestType;
327 325
328//Clipperz.log(">>> Proxy.Offline.DataStore._handshake"); 326//Clipperz.log(">>> Proxy.Offline.DataStore._handshake");
329 result = {}; 327 result = {};
330 if (someParameters.message == "connect") { 328 if (someParameters.message == "connect") {
331 var userData; 329 var userData;
332 var randomBytes; 330 var randomBytes;
333 var b, B, v; 331 var b, B, v;
334 332
335//console.log(">>> Proxy.Offline.DataStore._handshake.connect", someParameters); 333//console.log(">>> Proxy.Offline.DataStore._handshake.connect", someParameters);
336 userData = this.data()['users'][someParameters.parameters.C]; 334 userData = this.data()['users'][someParameters.parameters.C];
337 335
338 if ((typeof(userData) != 'undefined') && (userData['version'] == someParameters.version)) { 336 if ((typeof(userData) != 'undefined') && (userData['version'] == someParameters.version)) {
339 this.setUserData(userData); 337 this.setUserData(userData);
340 } else { 338 } else {
341 this.setUserData(this.data()['users']['catchAllUser']); 339 this.setUserData(this.data()['users']['catchAllUser']);
342 } 340 }
343 341
344 randomBytes = Clipperz.Crypto.Base.generateRandomSeed(); 342 randomBytes = Clipperz.Crypto.Base.generateRandomSeed();
345 this.set_b(new Clipperz.Crypto.BigInt(randomBytes, 16)); 343 this.set_b(new Clipperz.Crypto.BigInt(randomBytes, 16));
346 v = new Clipperz.Crypto.BigInt(this.userData()['v'], 16); 344 v = new Clipperz.Crypto.BigInt(this.userData()['v'], 16);
347 this.set_B(v.add(Clipperz.Crypto.SRP.g().powerModule(this.b(), Clipperz.Crypto.SRP.n()))); 345 this.set_B(v.add(Clipperz.Crypto.SRP.g().powerModule(this.b(), Clipperz.Crypto.SRP.n())));
348 346
349 this.set_A(someParameters.parameters.A); 347 this.set_A(someParameters.parameters.A);
350 348
351 result['s'] = this.userData()['s']; 349 result['s'] = this.userData()['s'];
352 result['B'] = this.B().asString(16); 350 result['B'] = this.B().asString(16);
353 351
354 nextTollRequestType = 'CONNECT'; 352 nextTollRequestType = 'CONNECT';
355 } else if (someParameters.message == "credentialCheck") { 353 } else if (someParameters.message == "credentialCheck") {
356 var v, u, S, A, K, M1; 354 var v, u, S, A, K, M1;
357 355
358//console.log(">>> Proxy.Offline.DataStore._handshake.credentialCheck", someParameters); 356//console.log(">>> Proxy.Offline.DataStore._handshake.credentialCheck", someParameters);
359 v = new Clipperz.Crypto.BigInt(this.userData()['v'], 16); 357 v = new Clipperz.Crypto.BigInt(this.userData()['v'], 16);
360 u = new Clipperz.Crypto.BigInt(Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters.version].hash(new Clipperz.ByteArray(this.B().asString(10))).toHexString(), 16); 358 u = new Clipperz.Crypto.BigInt(Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters.version].hash(new Clipperz.ByteArray(this.B().asString(10))).toHexString(), 16);
361 A = new Clipperz.Crypto.BigInt(this.A(), 16); 359 A = new Clipperz.Crypto.BigInt(this.A(), 16);
362 S = (A.multiply(v.powerModule(u, Clipperz.Crypto.SRP.n()))).powerModule(this.b(), Clipperz.Crypto.SRP.n()); 360 S = (A.multiply(v.powerModule(u, Clipperz.Crypto.SRP.n()))).powerModule(this.b(), Clipperz.Crypto.SRP.n());
363 361
364 K = Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters.version].hash(new Clipperz.ByteArray(S.asString(10))).toHexString().slice(2); 362 K = Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters.version].hash(new Clipperz.ByteArray(S.asString(10))).toHexString().slice(2);
365 363
366 M1 = Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters.version].hash(new Clipperz.ByteArray(A.asString(10) + this.B().asString(10) + K)).toHexString().slice(2); 364 M1 = Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters.version].hash(new Clipperz.ByteArray(A.asString(10) + this.B().asString(10) + K)).toHexString().slice(2);
367 if (someParameters.parameters.M1 == M1) { 365 if (someParameters.parameters.M1 == M1) {
368 var M2; 366 var M2;
369 367
370 M2 = Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters.version].hash(new Clipperz.ByteArray(A.asString(10) + someParameters.parameters.M1 + K)).toHexString().slice(2); 368 M2 = Clipperz.PM.Crypto.encryptingFunctions.versions[someParameters.version].hash(new Clipperz.ByteArray(A.asString(10) + someParameters.parameters.M1 + K)).toHexString().slice(2);
371 result['M2'] = M2; 369 result['M2'] = M2;
372 } else { 370 } else {
373 throw new Error("Client checksum verification failed! Expected <" + M1 + ">, received <" + someParameters.parameters.M1 + ">.", "Error"); 371 throw new Error("Client checksum verification failed! Expected <" + M1 + ">, received <" + someParameters.parameters.M1 + ">.", "Error");
374 } 372 }
375 373
376 nextTollRequestType = 'MESSAGE'; 374 nextTollRequestType = 'MESSAGE';
377 } else if (someParameters.message == "oneTimePassword") { 375 } else if (someParameters.message == "oneTimePassword") {
378 var otpData; 376 var otpData;
379 377
380//console.log("HANDSHAKE WITH OTP", someParameters.parameters.oneTimePasswordKey); 378//console.log("HANDSHAKE WITH OTP", someParameters.parameters.oneTimePasswordKey);
381//console.log("someParameters", someParameters); 379//console.log("someParameters", someParameters);
382//console.log("data.OTP", Clipperz.Base.serializeJSON(this.data()['onetimePasswords'])); 380//console.log("data.OTP", Clipperz.Base.serializeJSON(this.data()['onetimePasswords']));
383 otpData = this.data()['onetimePasswords'][someParameters.parameters.oneTimePasswordKey]; 381 otpData = this.data()['onetimePasswords'][someParameters.parameters.oneTimePasswordKey];
384 382
385 try { 383 try {
386 if (typeof(otpData) != 'undefined') { 384 if (typeof(otpData) != 'undefined') {
387 if (otpData['status'] == 'ACTIVE') { 385 if (otpData['status'] == 'ACTIVE') {
388 if (otpData['key_checksum'] == someParameters.parameters.oneTimePasswordKeyChecksum) { 386 if (otpData['key_checksum'] == someParameters.parameters.oneTimePasswordKeyChecksum) {
389 result = { 387 result = {
390 'data': otpData['data'], 388 'data': otpData['data'],
391 'version':otpData['version'] 389 'version':otpData['version']
392 } 390 }
393 391
394 otpData['status'] = 'REQUESTED'; 392 otpData['status'] = 'REQUESTED';
395 } else { 393 } else {
396 otpData['status'] = 'DISABLED'; 394 otpData['status'] = 'DISABLED';
397 throw "The requested One Time Password has been disabled, due to a wrong keyChecksum"; 395 throw "The requested One Time Password has been disabled, due to a wrong keyChecksum";
398 } 396 }
399 } else { 397 } else {
400 throw "The requested One Time Password was not active"; 398 throw "The requested One Time Password was not active";
401 } 399 }
402 } else { 400 } else {
403 throw "The requested One Time Password has not been found" 401 throw "The requested One Time Password has not been found"
404 } 402 }
405 } catch (exception) { 403 } catch (exception) {
406 result = { 404 result = {
diff --git a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.js b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.js
index 3cf499e..91a7b48 100644
--- a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.js
+++ b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.js
@@ -1,70 +1,68 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28 26
29//============================================================================= 27//=============================================================================
30 28
31Clipperz.PM.Proxy.Offline = function(args) { 29Clipperz.PM.Proxy.Offline = function(args) {
32 args = args || {}; 30 args = args || {};
33 31
34 Clipperz.PM.Proxy.Offline.superclass.constructor.call(this, args); 32 Clipperz.PM.Proxy.Offline.superclass.constructor.call(this, args);
35 33
36 this._dataStore = args.dataStore || new Clipperz.PM.Proxy.Offline.DataStore(args); 34 this._dataStore = args.dataStore || new Clipperz.PM.Proxy.Offline.DataStore(args);
37 35
38 return this; 36 return this;
39} 37}
40 38
41YAHOO.extendX(Clipperz.PM.Proxy.Offline, Clipperz.PM.Proxy, { 39YAHOO.extendX(Clipperz.PM.Proxy.Offline, Clipperz.PM.Proxy, {
42 40
43 'toString': function () { 41 'toString': function () {
44 return "Clipperz.PM.Proxy.Offline"; 42 return "Clipperz.PM.Proxy.Offline";
45 }, 43 },
46 44
47 //------------------------------------------------------------------------- 45 //-------------------------------------------------------------------------
48 46
49 'dataStore': function () { 47 'dataStore': function () {
50 return this._dataStore; 48 return this._dataStore;
51 }, 49 },
52 50
53 //------------------------------------------------------------------------- 51 //-------------------------------------------------------------------------
54 52
55 'sendMessage': function(aFunctionName, someParameters) { 53 'sendMessage': function(aFunctionName, someParameters) {
56 return this.dataStore().processMessage(aFunctionName, someParameters); 54 return this.dataStore().processMessage(aFunctionName, someParameters);
57 }, 55 },
58 56
59 //------------------------------------------------------------------------- 57 //-------------------------------------------------------------------------
60 58
61 'isReadOnly': function () { 59 'isReadOnly': function () {
62 return true; 60 return true;
63 }, 61 },
64 62
65 //------------------------------------------------------------------------- 63 //-------------------------------------------------------------------------
66 64
67 __syntaxFix__: "syntax fix" 65 __syntaxFix__: "syntax fix"
68 66
69}); 67});
70 68
diff --git a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Test.js b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Test.js
index ce6e6d8..18014f4 100644
--- a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Test.js
+++ b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Test.js
@@ -1,91 +1,89 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Proxy) == 'undefined') { Clipperz.PM.Proxy = {}; } 26if (typeof(Clipperz.PM.Proxy) == 'undefined') { Clipperz.PM.Proxy = {}; }
29 27
30//============================================================================= 28//=============================================================================
31 29
32Clipperz.PM.Proxy.Test = function(args) { 30Clipperz.PM.Proxy.Test = function(args) {
33 args = args || {}; 31 args = args || {};
34 32
35 Clipperz.PM.Proxy.Offline.call(this, args); 33 Clipperz.PM.Proxy.Offline.call(this, args);
36 34
37 35
38 36
39 return this; 37 return this;
40} 38}
41 39
42Clipperz.PM.Proxy.Test.prototype = MochiKit.Base.update(new Clipperz.PM.Proxy.Offline(), { 40Clipperz.PM.Proxy.Test.prototype = MochiKit.Base.update(new Clipperz.PM.Proxy.Offline(), {
43 41
44 'toString': function() { 42 'toString': function() {
45 return "Clipperz.PM.Proxy.Test"; 43 return "Clipperz.PM.Proxy.Test";
46 }, 44 },
47 45
48 //------------------------------------------------------------------------- 46 //-------------------------------------------------------------------------
49 47
50 'isTestData': function() { 48 'isTestData': function() {
51 return typeof(this.userData()['__masterkey_test_value__'] != 'undefined'); 49 return typeof(this.userData()['__masterkey_test_value__'] != 'undefined');
52 }, 50 },
53 51
54 //------------------------------------------------------------------------- 52 //-------------------------------------------------------------------------
55 53
56 'userDetails': function() { 54 'userDetails': function() {
57 var result; 55 var result;
58 56
59 if (this.isTestData()) { 57 if (this.isTestData()) {
60 var serializedHeader; 58 var serializedHeader;
61 var version; 59 var version;
62 60
63 version = this.userData()['version']; 61 version = this.userData()['version'];
64 serializedHeader = Clipperz.Base.serializeJSON(this.userData()['userDetails']); 62 serializedHeader = Clipperz.Base.serializeJSON(this.userData()['userDetails']);
65 result = Clipperz.PM.Crypto.encryptingFunctions.versions[version].encrypt(this.userData()['__masterkey_test_value__'], serializedHeader); 63 result = Clipperz.PM.Crypto.encryptingFunctions.versions[version].encrypt(this.userData()['__masterkey_test_value__'], serializedHeader);
66 } else { 64 } else {
67 result = Clipperz.PM.Proxy.Offline.prototype.userDetails.call(this); 65 result = Clipperz.PM.Proxy.Offline.prototype.userDetails.call(this);
68 } 66 }
69 67
70 return result; 68 return result;
71 }, 69 },
72 70
73 //------------------------------------------------------------------------- 71 //-------------------------------------------------------------------------
74 72
75 'statistics': function() { 73 'statistics': function() {
76 var result; 74 var result;
77 var serializedStatistics; 75 var serializedStatistics;
78 var version; 76 var version;
79 77
80 version = this.userData()['version']; 78 version = this.userData()['version'];
81 serializedStatistics = Clipperz.Base.serializeJSON(this.userData()['statistics']); 79 serializedStatistics = Clipperz.Base.serializeJSON(this.userData()['statistics']);
82 result = Clipperz.PM.Crypto.encryptingFunctions.versions[version].encrypt(this.userData()['__masterkey_test_value__'], serializedStatistics); 80 result = Clipperz.PM.Crypto.encryptingFunctions.versions[version].encrypt(this.userData()['__masterkey_test_value__'], serializedStatistics);
83 81
84 return result; 82 return result;
85 }, 83 },
86 84
87 //------------------------------------------------------------------------- 85 //-------------------------------------------------------------------------
88 __syntaxFix__: "syntax fix" 86 __syntaxFix__: "syntax fix"
89 87
90}); 88});
91 89
diff --git a/frontend/beta/js/Clipperz/PM/Strings.js b/frontend/beta/js/Clipperz/PM/Strings.js
index 24ef0ce..204159f 100644
--- a/frontend/beta/js/Clipperz/PM/Strings.js
+++ b/frontend/beta/js/Clipperz/PM/Strings.js
@@ -1,228 +1,226 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Strings) == 'undefined') { Clipperz.PM.Strings = {}; } 26if (typeof(Clipperz.PM.Strings) == 'undefined') { Clipperz.PM.Strings = {}; }
29if (typeof(Clipperz.PM.Strings.Languages) == 'undefined') { Clipperz.PM.Strings.Languages = {}; } 27if (typeof(Clipperz.PM.Strings.Languages) == 'undefined') { Clipperz.PM.Strings.Languages = {}; }
30 28
31Clipperz.PM.Strings.standardStrings = { 29Clipperz.PM.Strings.standardStrings = {
32 30
33 'loginPanelSwitchLanguageSelectOptions':[ 31 'loginPanelSwitchLanguageSelectOptions':[
34/* 32/*
35 {tag:'option', html:"Arabic (Oman) (العربية)", value:'ar-OM', disabled:true}, 33 {tag:'option', html:"Arabic (Oman) (العربية)", value:'ar-OM', disabled:true},
36 {tag:'option', html:"Arabic (Syria) (العربية)", value:'ar-SY', disabled:true}, 34 {tag:'option', html:"Arabic (Syria) (العربية)", value:'ar-SY', disabled:true},
37 {tag:'option', html:"Bahasa Indonesia", value:'id-ID', disabled:true}, 35 {tag:'option', html:"Bahasa Indonesia", value:'id-ID', disabled:true},
38 {tag:'option', html:"Bulgarian (Български)", value:'bg-BG', disabled:true}, 36 {tag:'option', html:"Bulgarian (Български)", value:'bg-BG', disabled:true},
39 {tag:'option', html:"Català", value:'ca-ES', disabled:true}, 37 {tag:'option', html:"Català", value:'ca-ES', disabled:true},
40 {tag:'option', html:"Chinese (Simplified) (简体中文)", value:'zh-CN', disabled:true}, 38 {tag:'option', html:"Chinese (Simplified) (简体中文)", value:'zh-CN', disabled:true},
41 {tag:'option', html:"Chinese (Traditional) (正體中文)", value:'zh-TW', disabled:true}, 39 {tag:'option', html:"Chinese (Traditional) (正體中文)", value:'zh-TW', disabled:true},
42 {tag:'option', html:"Czech (Česky)", value:'cs-CZ', disabled:true}, 40 {tag:'option', html:"Czech (Česky)", value:'cs-CZ', disabled:true},
43 {tag:'option', html:"Dansk", value:'da-DK', disabled:true}, 41 {tag:'option', html:"Dansk", value:'da-DK', disabled:true},
44 {tag:'option', html:"Deutsch", value:'de-DE'/ *, disabled:true* /}, 42 {tag:'option', html:"Deutsch", value:'de-DE'/ *, disabled:true* /},
45 {tag:'option', html:"English (American)", value:'en-US'/ *, disabled:true* /}, 43 {tag:'option', html:"English (American)", value:'en-US'/ *, disabled:true* /},
46 {tag:'option', html:"English (British)", value:'en-GB'/ *, disabled:true* /}, 44 {tag:'option', html:"English (British)", value:'en-GB'/ *, disabled:true* /},
47 {tag:'option', html:"English (Canadian)", value:'en-CA'/ *, disabled:true* /}, 45 {tag:'option', html:"English (Canadian)", value:'en-CA'/ *, disabled:true* /},
48 {tag:'option', html:"Español", value:'es-ES', disabled:true}, 46 {tag:'option', html:"Español", value:'es-ES', disabled:true},
49 {tag:'option', html:"Eesti", value:'et-EE', disabled:true}, 47 {tag:'option', html:"Eesti", value:'et-EE', disabled:true},
50 {tag:'option', html:"Français", value:'fr-FR', disabled:true}, 48 {tag:'option', html:"Français", value:'fr-FR', disabled:true},
51 {tag:'option', html:"Galego", value:'gl-ES', disabled:true}, 49 {tag:'option', html:"Galego", value:'gl-ES', disabled:true},
52 {tag:'option', html:"Greek (Ελληνικά)", value:'el-GR', disabled:true}, 50 {tag:'option', html:"Greek (Ελληνικά)", value:'el-GR', disabled:true},
53 {tag:'option', html:"Íslenska", value:'is-IS', disabled:true}, 51 {tag:'option', html:"Íslenska", value:'is-IS', disabled:true},
54 {tag:'option', html:"Italiano", value:'it-IT'/ *, disabled:true* /}, 52 {tag:'option', html:"Italiano", value:'it-IT'/ *, disabled:true* /},
55 {tag:'option', html:"Japanese (日本語)", value:'ja-JP', disabled:true}, 53 {tag:'option', html:"Japanese (日本語)", value:'ja-JP', disabled:true},
56 {tag:'option', html:"Korean (한국어)", value:'ko-KR', disabled:true}, 54 {tag:'option', html:"Korean (한국어)", value:'ko-KR', disabled:true},
57 {tag:'option', html:"Latviešu", value:'lv-LV', disabled:true}, 55 {tag:'option', html:"Latviešu", value:'lv-LV', disabled:true},
58 {tag:'option', html:"Lietuvių", value:'lt-LT', disabled:true}, 56 {tag:'option', html:"Lietuvių", value:'lt-LT', disabled:true},
59 {tag:'option', html:"Macedonian (Македонски)", value:'mk-MK', disabled:true}, 57 {tag:'option', html:"Macedonian (Македонски)", value:'mk-MK', disabled:true},
60 {tag:'option', html:"Magyar", value:'hu-HU', disabled:true}, 58 {tag:'option', html:"Magyar", value:'hu-HU', disabled:true},
61 {tag:'option', html:"Nederlands", value:'nl-NL', disabled:true}, 59 {tag:'option', html:"Nederlands", value:'nl-NL', disabled:true},
62 {tag:'option', html:"Norsk bokmål", value:'nb-NO', disabled:true}, 60 {tag:'option', html:"Norsk bokmål", value:'nb-NO', disabled:true},
63 {tag:'option', html:"Norsk nynorsk", value:'nn-NO', disabled:true}, 61 {tag:'option', html:"Norsk nynorsk", value:'nn-NO', disabled:true},
64 {tag:'option', html:"Persian (Western) (فارسى)", value:'fa-IR', disabled:true}, 62 {tag:'option', html:"Persian (Western) (فارسى)", value:'fa-IR', disabled:true},
65 {tag:'option', html:"Polski", value:'pl-PL', disabled:true}, 63 {tag:'option', html:"Polski", value:'pl-PL', disabled:true},
66 {tag:'option', html:"Português", value:'pt-PT'/ *, disabled:true* /}, 64 {tag:'option', html:"Português", value:'pt-PT'/ *, disabled:true* /},
67 {tag:'option', html:"Português Brasileiro", value:'pt-BR'/ *, disabled:true* /}, 65 {tag:'option', html:"Português Brasileiro", value:'pt-BR'/ *, disabled:true* /},
68 {tag:'option', html:"Românä", value:'ro-RO', disabled:true}, 66 {tag:'option', html:"Românä", value:'ro-RO', disabled:true},
69 {tag:'option', html:"Russian (Русский)", value:'ru-RU', disabled:true}, 67 {tag:'option', html:"Russian (Русский)", value:'ru-RU', disabled:true},
70 {tag:'option', html:"Slovak (Slovenčina)", value:'sk-SK', disabled:true}, 68 {tag:'option', html:"Slovak (Slovenčina)", value:'sk-SK', disabled:true},
71 {tag:'option', html:"Slovenian (Slovenščina)", value:'sl-SI', disabled:true}, 69 {tag:'option', html:"Slovenian (Slovenščina)", value:'sl-SI', disabled:true},
72 {tag:'option', html:"Suomi", value:'fi-FI', disabled:true}, 70 {tag:'option', html:"Suomi", value:'fi-FI', disabled:true},
73 {tag:'option', html:"Svenska", value:'sv-SE', disabled:true}, 71 {tag:'option', html:"Svenska", value:'sv-SE', disabled:true},
74 {tag:'option', html:"Thai (ไทย)", value:'th-TH', disabled:true}, 72 {tag:'option', html:"Thai (ไทย)", value:'th-TH', disabled:true},
75 {tag:'option', html:"Türkçe", value:'tr-TR', disabled:true}, 73 {tag:'option', html:"Türkçe", value:'tr-TR', disabled:true},
76 {tag:'option', html:"Ukrainian (Українська)", value:'uk-UA', disabled:true} 74 {tag:'option', html:"Ukrainian (Українська)", value:'uk-UA', disabled:true}
77*/ 75*/
78 {tag:'option', html:"Arabic (العربية)", value:"ar", disabled:true, cls:'disabledOption'}, 76 {tag:'option', html:"Arabic (العربية)", value:"ar", disabled:true, cls:'disabledOption'},
79 // {tag:'option', html:"Chinese (中文)", value:"zh", disabled:true}, 77 // {tag:'option', html:"Chinese (中文)", value:"zh", disabled:true},
80 {tag:'option', html:"Chinese (Simplified) (简体中文)", value:'zh-CN'}, 78 {tag:'option', html:"Chinese (Simplified) (简体中文)", value:'zh-CN'},
81 {tag:'option', html:"Dutch (Nederlands)", value:"nl-NL", disabled:true, cls:'disabledOption'}, 79 {tag:'option', html:"Dutch (Nederlands)", value:"nl-NL", disabled:true, cls:'disabledOption'},
82 {tag:'option', html:"English", value:"en-US"}, 80 {tag:'option', html:"English", value:"en-US"},
83 {tag:'option', html:"French (Français)", value:"fr-FR"}, 81 {tag:'option', html:"French (Français)", value:"fr-FR"},
84 {tag:'option', html:"German (Deutsch)", value:"de-DE"/* -- */, disabled:true, cls:'disabledOption' /* */}, 82 {tag:'option', html:"German (Deutsch)", value:"de-DE"/* -- */, disabled:true, cls:'disabledOption' /* */},
85 {tag:'option', html:"Greek (Ελληνικά)", value:"el-GR"/* -- */, disabled:true, cls:'disabledOption' /* */}, 83 {tag:'option', html:"Greek (Ελληνικά)", value:"el-GR"/* -- */, disabled:true, cls:'disabledOption' /* */},
86 {tag:'option', html:"Hebrew (עברית)", value:"he-IL"/* -- */, disabled:true, cls:'disabledOption' /* */}, 84 {tag:'option', html:"Hebrew (עברית)", value:"he-IL"/* -- */, disabled:true, cls:'disabledOption' /* */},
87 {tag:'option', html:"Italian (Italiano)", value:"it-IT"}, 85 {tag:'option', html:"Italian (Italiano)", value:"it-IT"},
88 {tag:'option', html:"Japanese (日本語)", value:"ja-JP"}, 86 {tag:'option', html:"Japanese (日本語)", value:"ja-JP"},
89 {tag:'option', html:"Korean (한국어)", value:"ko-KR", disabled:true, cls:'disabledOption'}, 87 {tag:'option', html:"Korean (한국어)", value:"ko-KR", disabled:true, cls:'disabledOption'},
90 {tag:'option', html:"Norwegian (Norsk)", value:"no", disabled:true, cls:'disabledOption'}, 88 {tag:'option', html:"Norwegian (Norsk)", value:"no", disabled:true, cls:'disabledOption'},
91 {tag:'option', html:"Persian (فارسی)", value:"fa-IR", disabled:true, cls:'disabledOption'}, 89 {tag:'option', html:"Persian (فارسی)", value:"fa-IR", disabled:true, cls:'disabledOption'},
92 {tag:'option', html:"Polish (Polski)", value:"pl-PL", disabled:true, cls:'disabledOption'}, 90 {tag:'option', html:"Polish (Polski)", value:"pl-PL", disabled:true, cls:'disabledOption'},
93 {tag:'option', html:"Portuguese (Português)", value:"pt-BR"}, 91 {tag:'option', html:"Portuguese (Português)", value:"pt-BR"},
94 {tag:'option', html:"Russian (Русский)", value:"ru-RU"}, 92 {tag:'option', html:"Russian (Русский)", value:"ru-RU"},
95 {tag:'option', html:"Spanish (Español)", value:"es-ES"}, 93 {tag:'option', html:"Spanish (Español)", value:"es-ES"},
96 {tag:'option', html:"Swedish (Svenska)", value:"sv-SE", disabled:true, cls:'disabledOption'}, 94 {tag:'option', html:"Swedish (Svenska)", value:"sv-SE", disabled:true, cls:'disabledOption'},
97 {tag:'option', html:"Turkish (Türkçe)", value:"tr-TR", disabled:true, cls:'disabledOption'}, 95 {tag:'option', html:"Turkish (Türkçe)", value:"tr-TR", disabled:true, cls:'disabledOption'},
98 {tag:'option', html:"Vietnamese (Tiếng Việt)", value:"vi-VN", disabled:true, cls:'disabledOption'} 96 {tag:'option', html:"Vietnamese (Tiếng Việt)", value:"vi-VN", disabled:true, cls:'disabledOption'}
99 ] 97 ]
100} 98}
101 99
102Clipperz.PM.Strings.GeneralSettings = { 100Clipperz.PM.Strings.GeneralSettings = {
103 'en-us': { 101 'en-us': {
104 'loginFormAarghThatsBadUrl':"http://www.clipperz.com/support/faq/account_faq", 102 'loginFormAarghThatsBadUrl':"http://www.clipperz.com/support/faq/account_faq",
105 'loginFormVerifyTheCodeUrl':"http://www.clipperz.com/learn_more/reviewing_the_code", 103 'loginFormVerifyTheCodeUrl':"http://www.clipperz.com/learn_more/reviewing_the_code",
106 104
107 'donateHeaderLinkUrl': "http://www.clipperz.com/donations", 105 'donateHeaderLinkUrl': "http://www.clipperz.com/donations",
108 'creditsHeaderLinkUrl': "http://www.clipperz.com/credits", 106 'creditsHeaderLinkUrl': "http://www.clipperz.com/credits",
109 'feedbackHeaderLinkUrl': "http://www.clipperz.com/contact", 107 'feedbackHeaderLinkUrl': "http://www.clipperz.com/contact",
110 'helpHeaderLinkUrl': "http://www.clipperz.com/support/user_guide", 108 'helpHeaderLinkUrl': "http://www.clipperz.com/support/user_guide",
111 'forumHeaderLinkUrl': "http://www.clipperz.com/forum", 109 'forumHeaderLinkUrl': "http://www.clipperz.com/forum",
112 110
113 'httpAuthBookmarkletConfiguration':{tag:'textarea', id:'httpAuthDefaultConfiguration', html:"" + 111 'httpAuthBookmarkletConfiguration':{tag:'textarea', id:'httpAuthDefaultConfiguration', html:"" +
114 "{ \"page\":{\"title\":\"HTTP authentication\"}," + "\n" + 112 "{ \"page\":{\"title\":\"HTTP authentication\"}," + "\n" +
115 " \"form\":{\"attributes\": {" + "\n" + 113 " \"form\":{\"attributes\": {" + "\n" +
116 " \"action\":\"\"," + "\n" + 114 " \"action\":\"\"," + "\n" +
117 " \"type\":\"http_auth\"" + "\n" + 115 " \"type\":\"http_auth\"" + "\n" +
118 " }, \"inputs\": [" + "\n" + 116 " }, \"inputs\": [" + "\n" +
119 " {\"type\":\"text\",\"name\":\"url\",\"value\":\"\"}," + "\n" + 117 " {\"type\":\"text\",\"name\":\"url\",\"value\":\"\"}," + "\n" +
120 " {\"type\":\"text\",\"name\":\"username\",\"value\":\"\"}," + "\n" + 118 " {\"type\":\"text\",\"name\":\"username\",\"value\":\"\"}," + "\n" +
121 " {\"type\":\"password\",\"name\":\"password\",\"value\":\"\"}" + "\n" + 119 " {\"type\":\"password\",\"name\":\"password\",\"value\":\"\"}" + "\n" +
122 " ]}, \"version\":\"0.2.3\"}" 120 " ]}, \"version\":\"0.2.3\"}"
123 }, 121 },
124 122
125 'directLoginJumpPageUrl':"", 123 'directLoginJumpPageUrl':"",
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=", 124 '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=",
127 'defaultFaviconUrl_IE': "https://www.clipperz.com/images/icons/misc/favicon.ico", 125 'defaultFaviconUrl_IE': "https://www.clipperz.com/images/icons/misc/favicon.ico",
128 126
129 'donateSplashPanelIconUrl':"./images/smiles_big.gif", 127 'donateSplashPanelIconUrl':"./images/smiles_big.gif",
130 128
131 'icons_baseUrl':"https://www.clipperz.com/images/icons", 129 'icons_baseUrl':"https://www.clipperz.com/images/icons",
132 130
133 'passwordGeneratorLowercaseCharset':"abcdefghijklmnopqrstuvwxyz", 131 'passwordGeneratorLowercaseCharset':"abcdefghijklmnopqrstuvwxyz",
134 'passwordGeneratorUppercaseCharset':"ABCDEFGHIJKLMNOPQRSTUVWXYZ", 132 'passwordGeneratorUppercaseCharset':"ABCDEFGHIJKLMNOPQRSTUVWXYZ",
135 'passwordGeneratorNumberCharset': "0123456789", 133 'passwordGeneratorNumberCharset': "0123456789",
136 'passwordGeneratorSymbolCharset': "!@#$%^&*+?[]{}/|\\<>,.;:~=-_", 134 'passwordGeneratorSymbolCharset': "!@#$%^&*+?[]{}/|\\<>,.;:~=-_",
137 135
138 '_': "" 136 '_': ""
139 } 137 }
140} 138}
141 139
142Clipperz.PM.Strings.defaultLanguages = { 140Clipperz.PM.Strings.defaultLanguages = {
143 'default':"en-us", 141 'default':"en-us",
144 142
145 // 'de':"de-de", 143 // 'de':"de-de",
146 // 'el':"el-gr", 144 // 'el':"el-gr",
147 // 'he':"he-il", 145 // 'he':"he-il",
148 // 'ru':"ru-ru", 146 // 'ru':"ru-ru",
149 147
150 148
151 'fr':"fr-fr", 149 'fr':"fr-fr",
152 'es':"es-es", 150 'es':"es-es",
153 'zh':"zh-cn", 151 'zh':"zh-cn",
154 'ja':"ja-jp", 152 'ja':"ja-jp",
155 'pt':"pt-br", 153 'pt':"pt-br",
156 'it':"it-it", 154 'it':"it-it",
157 'en': "en-us" 155 'en': "en-us"
158} 156}
159 157
160Clipperz.PM.Strings.inputTypeToRecordFieldType = { 158Clipperz.PM.Strings.inputTypeToRecordFieldType = {
161 'text': 'TXT', 159 'text': 'TXT',
162 'password': 'PWD', 160 'password': 'PWD',
163 'checkbox': 'CHECK', 161 'checkbox': 'CHECK',
164 'radio': 'RADIO', 162 'radio': 'RADIO',
165 'select': 'SELECT' 163 'select': 'SELECT'
166}; 164};
167 165
168Clipperz.PM.Strings.Languages.setSelectedLanguage = function(aLanguage) { 166Clipperz.PM.Strings.Languages.setSelectedLanguage = function(aLanguage) {
169 var language; 167 var language;
170 varselectedLanguage; 168 varselectedLanguage;
171 169
172 language = (aLanguage || Clipperz.PM.Strings.preferredLanguage || 'default').toLowerCase(); 170 language = (aLanguage || Clipperz.PM.Strings.preferredLanguage || 'default').toLowerCase();
173//MochiKit.Logging.logDebug("1 - language: " + language); 171//MochiKit.Logging.logDebug("1 - language: " + language);
174 if (typeof(Clipperz.PM.Strings.defaultLanguages[language]) != 'undefined') { 172 if (typeof(Clipperz.PM.Strings.defaultLanguages[language]) != 'undefined') {
175 language = Clipperz.PM.Strings.defaultLanguages[language]; 173 language = Clipperz.PM.Strings.defaultLanguages[language];
176//MochiKit.Logging.logDebug("2 - language: " + language); 174//MochiKit.Logging.logDebug("2 - language: " + language);
177 } 175 }
178 176
179 if (typeof(Clipperz.PM.Strings.Languages[language]) != 'undefined') { 177 if (typeof(Clipperz.PM.Strings.Languages[language]) != 'undefined') {
180 selectedLanguage = language; 178 selectedLanguage = language;
181//MochiKit.Logging.logDebug("### selectedLanguage full match: " + selectedLanguage); 179//MochiKit.Logging.logDebug("### selectedLanguage full match: " + selectedLanguage);
182 } else if (typeof(Clipperz.PM.Strings.defaultLanguages[language.substr(0,2)]) != 'undefined') { 180 } else if (typeof(Clipperz.PM.Strings.defaultLanguages[language.substr(0,2)]) != 'undefined') {
183 selectedLanguage = Clipperz.PM.Strings.defaultLanguages[language.substr(0,2)]; 181 selectedLanguage = Clipperz.PM.Strings.defaultLanguages[language.substr(0,2)];
184//MochiKit.Logging.logDebug("### selectedLanguage partial match: " + selectedLanguage); 182//MochiKit.Logging.logDebug("### selectedLanguage partial match: " + selectedLanguage);
185 } else { 183 } else {
186 selectedLanguage = Clipperz.PM.Strings.defaultLanguages['default']; 184 selectedLanguage = Clipperz.PM.Strings.defaultLanguages['default'];
187//MochiKit.Logging.logDebug("### selectedLanguage default match: " + selectedLanguage); 185//MochiKit.Logging.logDebug("### selectedLanguage default match: " + selectedLanguage);
188 } 186 }
189 187
190//MochiKit.Logging.logDebug("### selectedLanguage: " + selectedLanguage); 188//MochiKit.Logging.logDebug("### selectedLanguage: " + selectedLanguage);
191 if (selectedLanguage != Clipperz.PM.Strings.selectedLanguage) { 189 if (selectedLanguage != Clipperz.PM.Strings.selectedLanguage) {
192//MochiKit.Logging.logDebug(">>> setting Clipperz.PM.Strings.selectedLanguage: " + selectedLanguage); 190//MochiKit.Logging.logDebug(">>> setting Clipperz.PM.Strings.selectedLanguage: " + selectedLanguage);
193 Clipperz.PM.Strings.selectedLanguage = selectedLanguage; 191 Clipperz.PM.Strings.selectedLanguage = selectedLanguage;
194 192
195 MochiKit.Base.update(Clipperz.PM.Strings, Clipperz.PM.Strings.standardStrings) 193 MochiKit.Base.update(Clipperz.PM.Strings, Clipperz.PM.Strings.standardStrings)
196//MochiKit.Logging.logDebug("=== 1: " + Clipperz.PM.Strings['bookmarkletTabInstructions']); 194//MochiKit.Logging.logDebug("=== 1: " + Clipperz.PM.Strings['bookmarkletTabInstructions']);
197 MochiKit.Base.updatetree(Clipperz.PM.Strings, Clipperz.PM.Strings.Languages[Clipperz.PM.Strings.defaultLanguages['default']]); 195 MochiKit.Base.updatetree(Clipperz.PM.Strings, Clipperz.PM.Strings.Languages[Clipperz.PM.Strings.defaultLanguages['default']]);
198//MochiKit.Logging.logDebug("=== 2: " + Clipperz.PM.Strings['bookmarkletTabInstructions']); 196//MochiKit.Logging.logDebug("=== 2: " + Clipperz.PM.Strings['bookmarkletTabInstructions']);
199 MochiKit.Base.updatetree(Clipperz.PM.Strings, Clipperz.PM.Strings.GeneralSettings[Clipperz.PM.Strings.defaultLanguages['default']]); 197 MochiKit.Base.updatetree(Clipperz.PM.Strings, Clipperz.PM.Strings.GeneralSettings[Clipperz.PM.Strings.defaultLanguages['default']]);
200//MochiKit.Logging.logDebug("=== 3: " + Clipperz.PM.Strings['bookmarkletTabInstructions']); 198//MochiKit.Logging.logDebug("=== 3: " + Clipperz.PM.Strings['bookmarkletTabInstructions']);
201 MochiKit.Base.updatetree(Clipperz.PM.Strings, Clipperz.PM.Strings.Languages[selectedLanguage]); 199 MochiKit.Base.updatetree(Clipperz.PM.Strings, Clipperz.PM.Strings.Languages[selectedLanguage]);
202//MochiKit.Logging.logDebug("=== 4: " + Clipperz.PM.Strings['bookmarkletTabInstructions']); 200//MochiKit.Logging.logDebug("=== 4: " + Clipperz.PM.Strings['bookmarkletTabInstructions']);
203 MochiKit.Base.updatetree(Clipperz.PM.Strings, Clipperz.PM.Strings.GeneralSettings[selectedLanguage]); 201 MochiKit.Base.updatetree(Clipperz.PM.Strings, Clipperz.PM.Strings.GeneralSettings[selectedLanguage]);
204//MochiKit.Logging.logDebug("=== 5: " + Clipperz.PM.Strings['bookmarkletTabInstructions']); 202//MochiKit.Logging.logDebug("=== 5: " + Clipperz.PM.Strings['bookmarkletTabInstructions']);
205 203
206 Clipperz.NotificationCenter.notify(Clipperz.PM.Strings.Languages, 'switchLanguage', selectedLanguage); 204 Clipperz.NotificationCenter.notify(Clipperz.PM.Strings.Languages, 'switchLanguage', selectedLanguage);
207//MochiKit.Logging.logDebug("<<< setting Clipperz.PM.Strings.selectedLanguage. Done"); 205//MochiKit.Logging.logDebug("<<< setting Clipperz.PM.Strings.selectedLanguage. Done");
208 } 206 }
209} 207}
210 208
211Clipperz.PM.Strings.Languages.initSetup = function() { 209Clipperz.PM.Strings.Languages.initSetup = function() {
212 varlanguage; 210 varlanguage;
213 varlanguageParser; 211 varlanguageParser;
214 212
215 language = navigator.language || navigator.userLanguage; //en, en-US, .... "de", "nb-no" 213 language = navigator.language || navigator.userLanguage; //en, en-US, .... "de", "nb-no"
216 languageParser = new RegExp("language=([a-z]{2}(?:\-[a-z]{2})?)(\&|$)", "i"); 214 languageParser = new RegExp("language=([a-z]{2}(?:\-[a-z]{2})?)(\&|$)", "i");
217 if (languageParser.test(window.location.search)) { 215 if (languageParser.test(window.location.search)) {
218//MochiKit.Logging.logDebug("LANGUAGE specified in the query string"); 216//MochiKit.Logging.logDebug("LANGUAGE specified in the query string");
219 language = RegExp.$1; 217 language = RegExp.$1;
220 } 218 }
221 219
222//MochiKit.Logging.logDebug("+++ preferredLanguage: " + language); 220//MochiKit.Logging.logDebug("+++ preferredLanguage: " + language);
223 Clipperz.PM.Strings.preferredLanguage = language.toLowerCase(); 221 Clipperz.PM.Strings.preferredLanguage = language.toLowerCase();
224//MochiKit.Logging.logDebug("## preferredLanguage: " + Clipperz.PM.Strings.preferredLanguage); 222//MochiKit.Logging.logDebug("## preferredLanguage: " + Clipperz.PM.Strings.preferredLanguage);
225 Clipperz.PM.Strings.Languages.setSelectedLanguage(Clipperz.PM.Strings.preferredLanguage); 223 Clipperz.PM.Strings.Languages.setSelectedLanguage(Clipperz.PM.Strings.preferredLanguage);
226} 224}
227 225
228//MochiKit.DOM.addLoadEvent(Clipperz.PM.Strings.Languages.initSetup); 226//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 7f6c52f..7565d2d 100644
--- a/frontend/beta/js/Clipperz/PM/Strings/MessagePanelConfigurations.js
+++ b/frontend/beta/js/Clipperz/PM/Strings/MessagePanelConfigurations.js
@@ -1,386 +1,384 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Strings) == 'undefined') { Clipperz.PM.Strings = {}; } 26if (typeof(Clipperz.PM.Strings) == 'undefined') { Clipperz.PM.Strings = {}; }
29 27
30Clipperz.PM.Strings.messagePanelConfigurations = { 28Clipperz.PM.Strings.messagePanelConfigurations = {
31 29
32 30
33 //------------------------------------------------------------------------- 31 //-------------------------------------------------------------------------
34 // 32 //
35 // Registration - connection 33 // Registration - connection
36 // 34 //
37 'registration_verify': function() { 35 'registration_verify': function() {
38 return { 36 return {
39 'title': null, 37 'title': null,
40 'text': Clipperz.PM.Strings['connectionRegistrationSendingRequestMessageText'] 38 'text': Clipperz.PM.Strings['connectionRegistrationSendingRequestMessageText']
41 } 39 }
42 }, 40 },
43 41
44 'registration_sendingCredentials': function() { 42 'registration_sendingCredentials': function() {
45 return { 43 return {
46 'title': null, 44 'title': null,
47 'text': Clipperz.PM.Strings['connectionRegistrationSendingCredentialsMessageText'] 45 'text': Clipperz.PM.Strings['connectionRegistrationSendingCredentialsMessageText']
48 } 46 }
49 }, 47 },
50 48
51 //------------------------------------------------------------------------- 49 //-------------------------------------------------------------------------
52 // 50 //
53 // One Time Password login message panel 51 // One Time Password login message panel
54 // 52 //
55 53
56 'OTP_login_start': function() { 54 'OTP_login_start': function() {
57 return { 55 return {
58 'title': Clipperz.PM.Strings['OTPloginMessagePanelInitialTitle'], 56 'title': Clipperz.PM.Strings['OTPloginMessagePanelInitialTitle'],
59 'text': Clipperz.PM.Strings['OTPloginMessagePanelInitialText'], 57 'text': Clipperz.PM.Strings['OTPloginMessagePanelInitialText'],
60 'steps': '+3', 58 'steps': '+3',
61 'buttons': {} 59 'buttons': {}
62 } 60 }
63 }, 61 },
64 62
65 'OTP_login_loadingOTP': function() { 63 'OTP_login_loadingOTP': function() {
66 return { 64 return {
67 'title': Clipperz.PM.Strings['OTPloginMessagePanelLoadingTitle'], 65 'title': Clipperz.PM.Strings['OTPloginMessagePanelLoadingTitle'],
68 'text': Clipperz.PM.Strings['OTPloginMessagePanelLoadingText'] 66 'text': Clipperz.PM.Strings['OTPloginMessagePanelLoadingText']
69 } 67 }
70 }, 68 },
71 69
72 'OTP_login_extractingPassphrase': function() { 70 'OTP_login_extractingPassphrase': function() {
73 return { 71 return {
74 'title': Clipperz.PM.Strings['OTPloginMessagePanelProcessingTitle'], 72 'title': Clipperz.PM.Strings['OTPloginMessagePanelProcessingTitle'],
75 'text': Clipperz.PM.Strings['OTPloginMessagePanelProcessingText'] 73 'text': Clipperz.PM.Strings['OTPloginMessagePanelProcessingText']
76 } 74 }
77 }, 75 },
78 76
79 77
80 //------------------------------------------------------------------------- 78 //-------------------------------------------------------------------------
81 // 79 //
82 // Login message panel 80 // Login message panel
83 // 81 //
84 'login_start': function() { 82 'login_start': function() {
85 return { 83 return {
86 'title': Clipperz.PM.Strings['loginMessagePanelInitialTitle'], 84 'title': Clipperz.PM.Strings['loginMessagePanelInitialTitle'],
87 'text': Clipperz.PM.Strings['loginMessagePanelInitialText'], 85 'text': Clipperz.PM.Strings['loginMessagePanelInitialText'],
88 'steps': '+7', 86 'steps': '+7',
89 'buttons': { 87 'buttons': {
90 'ok': Clipperz.PM.Strings['loginMessagePanelInitialButtonLabel'] 88 'ok': Clipperz.PM.Strings['loginMessagePanelInitialButtonLabel']
91 } 89 }
92 } 90 }
93 }, 91 },
94 92
95 'login_connected': function() { 93 'login_connected': function() {
96 return { 94 return {
97 'title': Clipperz.PM.Strings['loginMessagePanelConnectedTitle'], 95 'title': Clipperz.PM.Strings['loginMessagePanelConnectedTitle'],
98 'text': Clipperz.PM.Strings['loginMessagePanelConnectedText'], 96 'text': Clipperz.PM.Strings['loginMessagePanelConnectedText'],
99 'buttons': {} 97 'buttons': {}
100 } 98 }
101 }, 99 },
102 100
103 'login_failed':function() { 101 'login_failed':function() {
104 return { 102 return {
105 'title': Clipperz.PM.Strings['loginMessagePanelFailureTitle'], 103 'title': Clipperz.PM.Strings['loginMessagePanelFailureTitle'],
106 'text': Clipperz.PM.Strings['loginMessagePanelFailureText'], 104 'text': Clipperz.PM.Strings['loginMessagePanelFailureText'],
107 'button': Clipperz.PM.Strings['loginMessagePanelFailureButtonLabel'] 105 'button': Clipperz.PM.Strings['loginMessagePanelFailureButtonLabel']
108 } 106 }
109 }, 107 },
110 108
111 //------------------------------------------------------------------------- 109 //-------------------------------------------------------------------------
112 // 110 //
113 // Login message panel - connection 111 // Login message panel - connection
114 // 112 //
115 'connection_sendingCredentials': function() { 113 'connection_sendingCredentials': function() {
116 return { 114 return {
117 'title': Clipperz.PM.Strings['connectionLoginSendingCredentialsMessageTitle'], 115 'title': Clipperz.PM.Strings['connectionLoginSendingCredentialsMessageTitle'],
118 'text': Clipperz.PM.Strings['connectionLoginSendingCredentialsMessageText'] 116 'text': Clipperz.PM.Strings['connectionLoginSendingCredentialsMessageText']
119 } 117 }
120 }, 118 },
121 119
122 'connection_credentialVerification': function() { 120 'connection_credentialVerification': function() {
123 return { 121 return {
124 'title': Clipperz.PM.Strings['connectionLoginCredentialsVerificationMessageTitle'], 122 'title': Clipperz.PM.Strings['connectionLoginCredentialsVerificationMessageTitle'],
125 'text': Clipperz.PM.Strings['connectionLoginCredentialsVerificationMessageText'] 123 'text': Clipperz.PM.Strings['connectionLoginCredentialsVerificationMessageText']
126 } 124 }
127 }, 125 },
128 126
129 'connection_loggedIn': function() { 127 'connection_loggedIn': function() {
130 return { 128 return {
131 'title': Clipperz.PM.Strings['connectionLoginDoneMessageTitle'], 129 'title': Clipperz.PM.Strings['connectionLoginDoneMessageTitle'],
132 'text': Clipperz.PM.Strings['connectionLoginDoneMessageText'] 130 'text': Clipperz.PM.Strings['connectionLoginDoneMessageText']
133 } 131 }
134 }, 132 },
135 133
136 //------------------------------------------------------------------------- 134 //-------------------------------------------------------------------------
137 // 135 //
138 //Login message panel - user 136 //Login message panel - user
139 // 137 //
140 'connection_upgrading': function() { 138 'connection_upgrading': function() {
141 return { 139 return {
142 'title': Clipperz.PM.Strings['userLoginPanelUpgradingUserCredentialsMessageTitle'], 140 'title': Clipperz.PM.Strings['userLoginPanelUpgradingUserCredentialsMessageTitle'],
143 'text': Clipperz.PM.Strings['userLoginPanelUpgradingUserCredentialsMessageText'], 141 'text': Clipperz.PM.Strings['userLoginPanelUpgradingUserCredentialsMessageText'],
144 'steps': '+1' 142 'steps': '+1'
145 } 143 }
146 }, 144 },
147 145
148 'connection_done': function() { 146 'connection_done': function() {
149 return { 147 return {
150 'title': Clipperz.PM.Strings['userLoginPanelConnectedMessageTitle'], 148 'title': Clipperz.PM.Strings['userLoginPanelConnectedMessageTitle'],
151 'text': Clipperz.PM.Strings['userLoginPanelConnectedMessageText'] 149 'text': Clipperz.PM.Strings['userLoginPanelConnectedMessageText']
152 } 150 }
153 }, 151 },
154 152
155 'connection_tryOlderSchema': function() { 153 'connection_tryOlderSchema': function() {
156 return { 154 return {
157 'title': Clipperz.PM.Strings['userLoginPanelTryingAnOlderConnectionSchemaMessageTitle'], 155 'title': Clipperz.PM.Strings['userLoginPanelTryingAnOlderConnectionSchemaMessageTitle'],
158 'text': Clipperz.PM.Strings['userLoginPanelTryingAnOlderConnectionSchemaMessageText'], 156 'text': Clipperz.PM.Strings['userLoginPanelTryingAnOlderConnectionSchemaMessageText'],
159 'steps': '+4' 157 'steps': '+4'
160 } 158 }
161 }, 159 },
162 160
163 'connection_loadingUserData': function() { 161 'connection_loadingUserData': function() {
164 return { 162 return {
165 'title': Clipperz.PM.Strings['userLoginPanelLoadingUserDataMessageTitle'], 163 'title': Clipperz.PM.Strings['userLoginPanelLoadingUserDataMessageTitle'],
166 'text': Clipperz.PM.Strings['userLoginPanelLoadingUserDataMessageText'] 164 'text': Clipperz.PM.Strings['userLoginPanelLoadingUserDataMessageText']
167 } 165 }
168 }, 166 },
169 167
170 'connection_decryptingUserData': function() { 168 'connection_decryptingUserData': function() {
171 return { 169 return {
172 'title': Clipperz.PM.Strings['userLoginPanelDecryptingUserDataMessageTitle'], 170 'title': Clipperz.PM.Strings['userLoginPanelDecryptingUserDataMessageTitle'],
173 'text': Clipperz.PM.Strings['userLoginPanelDecryptingUserDataMessageText'], 171 'text': Clipperz.PM.Strings['userLoginPanelDecryptingUserDataMessageText'],
174 'steps': '+1' 172 'steps': '+1'
175 } 173 }
176 }, 174 },
177 175
178 'connection_decryptingUserStatistics': function() { 176 'connection_decryptingUserStatistics': function() {
179 return { 177 return {
180 'title': Clipperz.PM.Strings['userLoginPanelDecryptingUserStatisticsMessageTitle'], 178 'title': Clipperz.PM.Strings['userLoginPanelDecryptingUserStatisticsMessageTitle'],
181 'text': Clipperz.PM.Strings['userLoginPanelDecryptingUserStatisticsMessageText'] 179 'text': Clipperz.PM.Strings['userLoginPanelDecryptingUserStatisticsMessageText']
182 } 180 }
183 }, 181 },
184 182
185 'collectingEntropy': function() { 183 'collectingEntropy': function() {
186 return { 184 return {
187 'text': Clipperz.PM.Strings['panelCollectingEntryopyMessageText'], 185 'text': Clipperz.PM.Strings['panelCollectingEntryopyMessageText'],
188 'steps': '+1' 186 'steps': '+1'
189 } 187 }
190 }, 188 },
191 189
192 //------------------------------------------------------------------------- 190 //-------------------------------------------------------------------------
193 // 191 //
194 // Cards block - delete card panel 192 // Cards block - delete card panel
195 // 193 //
196 'deleteRecord_collectData': function() { 194 'deleteRecord_collectData': function() {
197 return { 195 return {
198 'title': Clipperz.PM.Strings['deleteRecordPanelCollectRecordDataMessageTitle'], 196 'title': Clipperz.PM.Strings['deleteRecordPanelCollectRecordDataMessageTitle'],
199 'text': Clipperz.PM.Strings['deleteRecordPanelCollectRecordDataMessageText'] 197 'text': Clipperz.PM.Strings['deleteRecordPanelCollectRecordDataMessageText']
200 } 198 }
201 }, 199 },
202 200
203 'deleteRecord_encryptData': function() { 201 'deleteRecord_encryptData': function() {
204 return { 202 return {
205 'title': Clipperz.PM.Strings['deleteRecordPanelEncryptUserDataMessageTitle'], 203 'title': Clipperz.PM.Strings['deleteRecordPanelEncryptUserDataMessageTitle'],
206 'text': Clipperz.PM.Strings['deleteRecordPanelEncryptUserDataMessageText'] 204 'text': Clipperz.PM.Strings['deleteRecordPanelEncryptUserDataMessageText']
207 } 205 }
208 }, 206 },
209 207
210 'deleteRecord_sendingData': function() { 208 'deleteRecord_sendingData': function() {
211 return { 209 return {
212 'title': Clipperz.PM.Strings['deleteRecordPanelSendingDataToTheServerMessageTitle'], 210 'title': Clipperz.PM.Strings['deleteRecordPanelSendingDataToTheServerMessageTitle'],
213 'text': Clipperz.PM.Strings['deleteRecordPanelSendingDataToTheServerMessageText'] 211 'text': Clipperz.PM.Strings['deleteRecordPanelSendingDataToTheServerMessageText']
214 } 212 }
215 }, 213 },
216 214
217 'deleteRecord_updatingInterface': function() { 215 'deleteRecord_updatingInterface': function() {
218 return { 216 return {
219 'title': Clipperz.PM.Strings['deleteRecordPanelUpdatingTheInterfaceMessageTitle'], 217 'title': Clipperz.PM.Strings['deleteRecordPanelUpdatingTheInterfaceMessageTitle'],
220 'text': Clipperz.PM.Strings['deleteRecordPanelUpdatingTheInterfaceMessageText'] 218 'text': Clipperz.PM.Strings['deleteRecordPanelUpdatingTheInterfaceMessageText']
221 } 219 }
222 }, 220 },
223 221
224 222
225 //------------------------------------------------------------------------- 223 //-------------------------------------------------------------------------
226 // 224 //
227 //Cards block - save card panel 225 //Cards block - save card panel
228 // 226 //
229 'saveCard_collectRecordInfo': function() { 227 'saveCard_collectRecordInfo': function() {
230 return { 228 return {
231 'title': Clipperz.PM.Strings['recordSaveChangesPanelCollectRecordInfoMessageTitle'], 229 'title': Clipperz.PM.Strings['recordSaveChangesPanelCollectRecordInfoMessageTitle'],
232 'text': Clipperz.PM.Strings['recordSaveChangesPanelCollectRecordInfoMessageText'] 230 'text': Clipperz.PM.Strings['recordSaveChangesPanelCollectRecordInfoMessageText']
233 } 231 }
234 }, 232 },
235 233
236 'saveCard_encryptUserData': function() { 234 'saveCard_encryptUserData': function() {
237 return { 235 return {
238 'title': Clipperz.PM.Strings['recordSaveChangesPanelEncryptUserDataMessageTitle'], 236 'title': Clipperz.PM.Strings['recordSaveChangesPanelEncryptUserDataMessageTitle'],
239 'text': Clipperz.PM.Strings['recordSaveChangesPanelEncryptUserDataMessageText'] 237 'text': Clipperz.PM.Strings['recordSaveChangesPanelEncryptUserDataMessageText']
240 } 238 }
241 }, 239 },
242 240
243 'saveCard_encryptRecordData': function() { 241 'saveCard_encryptRecordData': function() {
244 return { 242 return {
245 'title': Clipperz.PM.Strings['recordSaveChangesPanelEncryptRecordDataMessageTitle'], 243 'title': Clipperz.PM.Strings['recordSaveChangesPanelEncryptRecordDataMessageTitle'],
246 'text': Clipperz.PM.Strings['recordSaveChangesPanelEncryptRecordDataMessageText'] 244 'text': Clipperz.PM.Strings['recordSaveChangesPanelEncryptRecordDataMessageText']
247 } 245 }
248 }, 246 },
249 247
250 'saveCard_encryptRecordVersions': function() { 248 'saveCard_encryptRecordVersions': function() {
251 return { 249 return {
252 'title': Clipperz.PM.Strings['recordSaveChangesPanelEncryptRecordVersionDataMessageTitle'], 250 'title': Clipperz.PM.Strings['recordSaveChangesPanelEncryptRecordVersionDataMessageTitle'],
253 'text': Clipperz.PM.Strings['recordSaveChangesPanelEncryptRecordVersionDataMessageText'] 251 'text': Clipperz.PM.Strings['recordSaveChangesPanelEncryptRecordVersionDataMessageText']
254 } 252 }
255 }, 253 },
256 254
257 'saveCard_sendingData': function() { 255 'saveCard_sendingData': function() {
258 return { 256 return {
259 'title': Clipperz.PM.Strings['recordSaveChangesPanelSendingDataToTheServerMessageTitle'], 257 'title': Clipperz.PM.Strings['recordSaveChangesPanelSendingDataToTheServerMessageTitle'],
260 'text': Clipperz.PM.Strings['recordSaveChangesPanelSendingDataToTheServerMessageText'] 258 'text': Clipperz.PM.Strings['recordSaveChangesPanelSendingDataToTheServerMessageText']
261 } 259 }
262 }, 260 },
263 261
264 'saveCard_updatingInterface': function() { 262 'saveCard_updatingInterface': function() {
265 return { 263 return {
266 'title': Clipperz.PM.Strings['recordSaveChangesPanelUpdatingTheInterfaceMessageTitle'], 264 'title': Clipperz.PM.Strings['recordSaveChangesPanelUpdatingTheInterfaceMessageTitle'],
267 'text': Clipperz.PM.Strings['recordSaveChangesPanelUpdatingTheInterfaceMessageText'] 265 'text': Clipperz.PM.Strings['recordSaveChangesPanelUpdatingTheInterfaceMessageText']
268 } 266 }
269 }, 267 },
270 268
271 //------------------------------------------------------------------------- 269 //-------------------------------------------------------------------------
272 // 270 //
273 //Account panel - user preferences 271 //Account panel - user preferences
274 // 272 //
275 'account_savingPreferences_1': function() { 273 'account_savingPreferences_1': function() {
276 return { 274 return {
277 'title': Clipperz.PM.Strings['accountPreferencesSavingPanelTitle_Step1'], 275 'title': Clipperz.PM.Strings['accountPreferencesSavingPanelTitle_Step1'],
278 'text': Clipperz.PM.Strings['accountPreferencesSavingPanelText_Step1'], 276 'text': Clipperz.PM.Strings['accountPreferencesSavingPanelText_Step1'],
279 'steps': '+3' 277 'steps': '+3'
280 } 278 }
281 }, 279 },
282 280
283 'account_savingPreferences_2': function() { 281 'account_savingPreferences_2': function() {
284 return { 282 return {
285 'title': Clipperz.PM.Strings['accountPreferencesSavingPanelTitle_Step2'], 283 'title': Clipperz.PM.Strings['accountPreferencesSavingPanelTitle_Step2'],
286 'text': Clipperz.PM.Strings['accountPreferencesSavingPanelText_Step2'] 284 'text': Clipperz.PM.Strings['accountPreferencesSavingPanelText_Step2']
287 } 285 }
288 }, 286 },
289 287
290 288
291 //------------------------------------------------------------------------- 289 //-------------------------------------------------------------------------
292 // 290 //
293 //Account panel - change credentials 291 //Account panel - change credentials
294 // 292 //
295 'changeCredentials_encryptingData': function() { 293 'changeCredentials_encryptingData': function() {
296 return { 294 return {
297 'title': Clipperz.PM.Strings['changeCredentialsPanelEncryptingDataMessageTitle'], 295 'title': Clipperz.PM.Strings['changeCredentialsPanelEncryptingDataMessageTitle'],
298 'text': Clipperz.PM.Strings['changeCredentialsPanelEncryptingDataMessageText'] 296 'text': Clipperz.PM.Strings['changeCredentialsPanelEncryptingDataMessageText']
299 } 297 }
300 }, 298 },
301 299
302 'changeCredentials_creatingNewCredentials': function() { 300 'changeCredentials_creatingNewCredentials': function() {
303 return { 301 return {
304 'title': Clipperz.PM.Strings['changeCredentialsPanelCreatingNewCredentialsMessageTitle'], 302 'title': Clipperz.PM.Strings['changeCredentialsPanelCreatingNewCredentialsMessageTitle'],
305 'text': Clipperz.PM.Strings['changeCredentialsPanelCreatingNewCredentialsMessageText'] 303 'text': Clipperz.PM.Strings['changeCredentialsPanelCreatingNewCredentialsMessageText']
306 } 304 }
307 }, 305 },
308 306
309 'changeCredentials_sendingCredentials': function() { 307 'changeCredentials_sendingCredentials': function() {
310 return { 308 return {
311 'title': Clipperz.PM.Strings['changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle'], 309 'title': Clipperz.PM.Strings['changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle'],
312 'text': Clipperz.PM.Strings['changeCredentialsPanelSendingNewCredentialsToTheServerMessageText'] 310 'text': Clipperz.PM.Strings['changeCredentialsPanelSendingNewCredentialsToTheServerMessageText']
313 } 311 }
314 }, 312 },
315 313
316 'changeCredentials_done': function() { 314 'changeCredentials_done': function() {
317 return { 315 return {
318 'title': Clipperz.PM.Strings['changeCredentialsPanelDoneMessageTitle'], 316 'title': Clipperz.PM.Strings['changeCredentialsPanelDoneMessageTitle'],
319 'text': Clipperz.PM.Strings['changeCredentialsPanelDoneMessageText'] 317 'text': Clipperz.PM.Strings['changeCredentialsPanelDoneMessageText']
320 } 318 }
321 }, 319 },
322 320
323 321
324 //------------------------------------------------------------------------- 322 //-------------------------------------------------------------------------
325 // 323 //
326 //Account panel - change credentials 324 //Account panel - change credentials
327 // 325 //
328 'saveOTP_encryptUserData': function() { 326 'saveOTP_encryptUserData': function() {
329 return { 327 return {
330 'title': Clipperz.PM.Strings['saveOTP_encryptUserDataTitle'], 328 'title': Clipperz.PM.Strings['saveOTP_encryptUserDataTitle'],
331 'text': Clipperz.PM.Strings['saveOTP_encryptUserDataText'], 329 'text': Clipperz.PM.Strings['saveOTP_encryptUserDataText'],
332 'steps': '+4' 330 'steps': '+4'
333 } 331 }
334 }, 332 },
335 333
336 'saveOTP_encryptOTPData': function() { 334 'saveOTP_encryptOTPData': function() {
337 return { 335 return {
338 'title': Clipperz.PM.Strings['saveOTP_encryptOTPDataTitle'], 336 'title': Clipperz.PM.Strings['saveOTP_encryptOTPDataTitle'],
339 'text': Clipperz.PM.Strings['saveOTP_encryptOTPDataText'] 337 'text': Clipperz.PM.Strings['saveOTP_encryptOTPDataText']
340 } 338 }
341 }, 339 },
342 340
343 'saveOTP_sendingData': function() { 341 'saveOTP_sendingData': function() {
344 return { 342 return {
345 'title': Clipperz.PM.Strings['saveOTP_sendingDataTitle'], 343 'title': Clipperz.PM.Strings['saveOTP_sendingDataTitle'],
346 'text': Clipperz.PM.Strings['saveOTP_sendingDataText'] 344 'text': Clipperz.PM.Strings['saveOTP_sendingDataText']
347 } 345 }
348 }, 346 },
349 347
350 'saveOTP_updatingInterface': function() { 348 'saveOTP_updatingInterface': function() {
351 return { 349 return {
352 'title': Clipperz.PM.Strings['saveOTP_updatingInterfaceTitle'], 350 'title': Clipperz.PM.Strings['saveOTP_updatingInterfaceTitle'],
353 'text': Clipperz.PM.Strings['saveOTP_updatingInterfaceText'] 351 'text': Clipperz.PM.Strings['saveOTP_updatingInterfaceText']
354 } 352 }
355 }, 353 },
356 354
357 355
358 //------------------------------------------------------------------------- 356 //-------------------------------------------------------------------------
359 // 357 //
360 //Data panel - processingImportData 358 //Data panel - processingImportData
361 // 359 //
362 'parseImportData': function() { 360 'parseImportData': function() {
363 return { 361 return {
364 'title': Clipperz.PM.Strings['importData_parsingDataTitle'], 362 'title': Clipperz.PM.Strings['importData_parsingDataTitle'],
365 'text': Clipperz.PM.Strings['importData_parsingDataText'] 363 'text': Clipperz.PM.Strings['importData_parsingDataText']
366 } 364 }
367 }, 365 },
368 366
369 'previewImportData': function() { 367 'previewImportData': function() {
370 return { 368 return {
371 'title': Clipperz.PM.Strings['importData_previewingDataTitle'], 369 'title': Clipperz.PM.Strings['importData_previewingDataTitle'],
372 'text': Clipperz.PM.Strings['importData_previewingDataText'] 370 'text': Clipperz.PM.Strings['importData_previewingDataText']
373 } 371 }
374 }, 372 },
375 373
376 'processingImportData': function() { 374 'processingImportData': function() {
377 return { 375 return {
378 'title': Clipperz.PM.Strings['importData_processingDataTitle'], 376 'title': Clipperz.PM.Strings['importData_processingDataTitle'],
379 'text': Clipperz.PM.Strings['importData_processingDataText'] 377 'text': Clipperz.PM.Strings['importData_processingDataText']
380 } 378 }
381 }, 379 },
382 380
383 //------------------------------------------------------------------------- 381 //-------------------------------------------------------------------------
384 __syntaxFix__: "syntax fix" 382 __syntaxFix__: "syntax fix"
385 383
386} 384}
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 6ccffa8..0ca4b51 100644
--- a/frontend/beta/js/Clipperz/PM/Strings/Strings_de-DE.js
+++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_de-DE.js
@@ -1,349 +1,347 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26Clipperz.PM.Strings.Languages['de-DE'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 24Clipperz.PM.Strings.Languages['de-DE'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], {
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> ", 25 '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> ",
28 'loginFormTitle':"Login zu Deinem Clipperz Konto", 26 'loginFormTitle':"Login zu Deinem Clipperz Konto",
29 'loginFormUsernameLabel':"Benutzernamen", 27 'loginFormUsernameLabel':"Benutzernamen",
30 'loginFormPassphraseLabel':"Sicherheitssatz", 28 'loginFormPassphraseLabel':"Sicherheitssatz",
31 'loginFormDontHaveAnAccountLabel':"Du hast noch kein Clipperz Konto?", 29 'loginFormDontHaveAnAccountLabel':"Du hast noch kein Clipperz Konto?",
32 'loginFormCreateOneLabel':"Konto erstellen", 30 'loginFormCreateOneLabel':"Konto erstellen",
33 'loginFormForgotYourCredentialsLabel':"Zugangsdaten vergessen?", 31 'loginFormForgotYourCredentialsLabel':"Zugangsdaten vergessen?",
34 'loginFormAarghThatsBadLabel':"Misst! Dass ist schlecht!", 32 'loginFormAarghThatsBadLabel':"Misst! Dass ist schlecht!",
35 'loginFormAfraidOfMaliciousScriptsLabel':"verängstigt von bösartigen Scripts?", 33 'loginFormAfraidOfMaliciousScriptsLabel':"verängstigt von bösartigen Scripts?",
36 'loginFormVerifyTheCodeLabel':"begutachte den Quellcode", 34 'loginFormVerifyTheCodeLabel':"begutachte den Quellcode",
37 'loginFormButtonLabel':"Einloggen", 35 'loginFormButtonLabel':"Einloggen",
38 'loginPanelSwithLanguageDescription':"<h5>Wechsel zu Deiner vervorzugten Sprache</h5> ", 36 'loginPanelSwithLanguageDescription':"<h5>Wechsel zu Deiner vervorzugten Sprache</h5> ",
39 'browserCompatibilityDescription':"<p>Bessere und sicherere Clipperz-Erfahrung mit Firefox. Clipperz funktioniert auch mit Safari, Opera und MS Internet Explorer!</p> ", 37 'browserCompatibilityDescription':"<p>Bessere und sicherere Clipperz-Erfahrung mit Firefox. Clipperz funktioniert auch mit Safari, Opera und MS Internet Explorer!</p> ",
40 'loginMessagePanelInitialTitle':"Du wirst eingeloggt…", 38 'loginMessagePanelInitialTitle':"Du wirst eingeloggt…",
41 'loginMessagePanelInitialButtonLabel':"Abbruch", 39 'loginMessagePanelInitialButtonLabel':"Abbruch",
42 'loginMessagePanelConnectedTitle':"Verbunden", 40 'loginMessagePanelConnectedTitle':"Verbunden",
43 'loginMessagePanelConnectedText':"Fertig", 41 'loginMessagePanelConnectedText':"Fertig",
44 'loginMessagePanelFailureTitle':"Fehler", 42 'loginMessagePanelFailureTitle':"Fehler",
45 'loginMessagePanelFailureText':"Login fehlgeschlagen", 43 'loginMessagePanelFailureText':"Login fehlgeschlagen",
46 'loginMessagePanelFailureButtonLabel':"Schließen", 44 'loginMessagePanelFailureButtonLabel':"Schließen",
47 'connectionLoginSendingCredentialsMessageTitle':"Prüfe Zugangsdaten", 45 'connectionLoginSendingCredentialsMessageTitle':"Prüfe Zugangsdaten",
48 'connectionLoginSendingCredentialsMessageText':"Sende Zugangsdaten", 46 'connectionLoginSendingCredentialsMessageText':"Sende Zugangsdaten",
49 'connectionLoginCredentialsVerificationMessageTitle':"Prüfe Zugangsdaten", 47 'connectionLoginCredentialsVerificationMessageTitle':"Prüfe Zugangsdaten",
50 'connectionLoginCredentialsVerificationMessageText':"Führe SRP Authentifizierung durch", 48 'connectionLoginCredentialsVerificationMessageText':"Führe SRP Authentifizierung durch",
51 'connectionLoginDoneMessageTitle':"Prüfe Zugangsdaten", 49 'connectionLoginDoneMessageTitle':"Prüfe Zugangsdaten",
52 'connectionLoginDoneMessageText':"Verbunden", 50 'connectionLoginDoneMessageText':"Verbunden",
53 'userLoginPanelUpgradingUserCredentialsMessageTitle':"Prüfe Zugangsdaten", 51 'userLoginPanelUpgradingUserCredentialsMessageTitle':"Prüfe Zugangsdaten",
54 'userLoginPanelUpgradingUserCredentialsMessageText':"Aktualisierung Deiner Zugangsdaten auf ein neues Authentifizierungsschema", 52 'userLoginPanelUpgradingUserCredentialsMessageText':"Aktualisierung Deiner Zugangsdaten auf ein neues Authentifizierungsschema",
55 'userLoginPanelConnectedMessageTitle':"Benutzer authentifiziert", 53 'userLoginPanelConnectedMessageTitle':"Benutzer authentifiziert",
56 'userLoginPanelConnectedMessageText':"Login erfolgreich", 54 'userLoginPanelConnectedMessageText':"Login erfolgreich",
57 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"Prüfe Zugangsdaten", 55 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"Prüfe Zugangsdaten",
58 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"Probiere älteres Authentifizierungsschema", 56 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"Probiere älteres Authentifizierungsschema",
59 'userLoginPanelLoadingUserDataMessageTitle':"Benutzer authentifiziert", 57 'userLoginPanelLoadingUserDataMessageTitle':"Benutzer authentifiziert",
60 'userLoginPanelLoadingUserDataMessageText':"Lade verschlüsselte Kartendaten von Clipperz", 58 'userLoginPanelLoadingUserDataMessageText':"Lade verschlüsselte Kartendaten von Clipperz",
61 'userLoginPanelDecryptingUserDataMessageTitle':"Benutzer authentifiziert", 59 'userLoginPanelDecryptingUserDataMessageTitle':"Benutzer authentifiziert",
62 'userLoginPanelDecryptingUserDataMessageText':"Lokale Entschlüsselung der Kartendaten", 60 'userLoginPanelDecryptingUserDataMessageText':"Lokale Entschlüsselung der Kartendaten",
63 'userLoginPanelDecryptingUserStatisticsMessageTitle':"Benutzer authentifiziert", 61 'userLoginPanelDecryptingUserStatisticsMessageTitle':"Benutzer authentifiziert",
64 'userLoginPanelDecryptingUserStatisticsMessageText':"Lokale Entschlüsselung der Benutzerstatisik", 62 'userLoginPanelDecryptingUserStatisticsMessageText':"Lokale Entschlüsselung der Benutzerstatisik",
65 'splashAlertTitle':"Willkommen bei Clipperz!", 63 'splashAlertTitle':"Willkommen bei Clipperz!",
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> ", 64 '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> ",
67 'splashAlertCloseButtonLabel':"Ok", 65 'splashAlertCloseButtonLabel':"Ok",
68 'registrationFormTitle':"Erstelle Dein Konto", 66 'registrationFormTitle':"Erstelle Dein Konto",
69 'registrationFormUsernameLabel':"Benutzernamen", 67 'registrationFormUsernameLabel':"Benutzernamen",
70 'registrationFormPassphraseLabel':"Sicherheitssatz", 68 'registrationFormPassphraseLabel':"Sicherheitssatz",
71 'registrationFormRetypePassphraseLabel':"Wiederhole Sicherheitssatz", 69 'registrationFormRetypePassphraseLabel':"Wiederhole Sicherheitssatz",
72 'registrationFormSafetyCheckLabel':"Ich akzeptiere dass es Clipperz nicht möglich ist, einen verlorenen Sicherheitssatz wiederherzustellen.", 70 'registrationFormSafetyCheckLabel':"Ich akzeptiere dass es Clipperz nicht möglich ist, einen verlorenen Sicherheitssatz wiederherzustellen.",
73 'registrationFormTermsOfServiceCheckLabel':"Ich habe die <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Nutzungsbedingungen</a> gelesen, verstanden und akzeptiere diese.", 71 'registrationFormTermsOfServiceCheckLabel':"Ich habe die <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Nutzungsbedingungen</a> gelesen, verstanden und akzeptiere diese.",
74 'registrationFormDoYouAlreadyHaveAnAccountLabel':"Hast Du bereits einen Zugang?", 72 'registrationFormDoYouAlreadyHaveAnAccountLabel':"Hast Du bereits einen Zugang?",
75 'registrationFormSimplyLoginLabel':"Einloggen", 73 'registrationFormSimplyLoginLabel':"Einloggen",
76 'registrationFormButtonLabel':"Anmelden", 74 'registrationFormButtonLabel':"Anmelden",
77 'registrationFormWarningMessageNotMatchingPassphrases':"Deine Sicherheitssätze stimmen nicht überein. Bitte erneut eingeben.", 75 'registrationFormWarningMessageNotMatchingPassphrases':"Deine Sicherheitssätze stimmen nicht überein. Bitte erneut eingeben.",
78 'registrationFormWarningMessageSafetyCheckNotSelected':"Bitte lese die Bedingungen und akzeptiere die Auswahlboxen weiter unten.", 76 'registrationFormWarningMessageSafetyCheckNotSelected':"Bitte lese die Bedingungen und akzeptiere die Auswahlboxen weiter unten.",
79 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"Du musst die Nutzungsbedingungen akzeptieren.", 77 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"Du musst die Nutzungsbedingungen akzeptieren.",
80 'registrationMessagePanelInitialTitle':"Benutzer wird angelegt…", 78 'registrationMessagePanelInitialTitle':"Benutzer wird angelegt…",
81 'registrationMessagePanelInitialButtonLabel':"Abbruch", 79 'registrationMessagePanelInitialButtonLabel':"Abbruch",
82 'registrationMessagePanelRegistrationDoneTitle':"Anmeldung", 80 'registrationMessagePanelRegistrationDoneTitle':"Anmeldung",
83 'registrationMessagePanelRegistrationDoneText':"Fertig", 81 'registrationMessagePanelRegistrationDoneText':"Fertig",
84 'registrationMessagePanelFailureTitle':"Anmerldung fehlgeschlagen", 82 'registrationMessagePanelFailureTitle':"Anmerldung fehlgeschlagen",
85 'registrationMessagePanelFailureButtonLabel':"Schließen", 83 'registrationMessagePanelFailureButtonLabel':"Schließen",
86 'connectionRegistrationSendingRequestMessageText':"Zugangsdaten werden geprüft", 84 'connectionRegistrationSendingRequestMessageText':"Zugangsdaten werden geprüft",
87 'connectionRegistrationSendingCredentialsMessageText':"Sende Zugangsdaten", 85 'connectionRegistrationSendingCredentialsMessageText':"Sende Zugangsdaten",
88 'registrationSplashPanelTitle':"Sicherheitshinweis", 86 'registrationSplashPanelTitle':"Sicherheitshinweis",
89 'registrationSplashPanelDescription':"<p>Dies sind Deine Clipperz Zugangsdaten, pass sehr gut auf sie auf. Clipperz wird diese kein zweites und weiteres mal anzeigen!</p> ", 87 'registrationSplashPanelDescription':"<p>Dies sind Deine Clipperz Zugangsdaten, pass sehr gut auf sie auf. Clipperz wird diese kein zweites und weiteres mal anzeigen!</p> ",
90 'registrationSplashPanelUsernameLabel':"Benutzernamen", 88 'registrationSplashPanelUsernameLabel':"Benutzernamen",
91 'registrationSplashPanelPassphraseLabel':"Schlüsselsatz", 89 'registrationSplashPanelPassphraseLabel':"Schlüsselsatz",
92 'donateHeaderLinkLabel':"spende", 90 'donateHeaderLinkLabel':"spende",
93 'creditsHeaderLinkLabel':"credits", 91 'creditsHeaderLinkLabel':"credits",
94 'feedbackHeaderLinkLabel':"feedback", 92 'feedbackHeaderLinkLabel':"feedback",
95 'helpHeaderLinkLabel':"hilfe", 93 'helpHeaderLinkLabel':"hilfe",
96 'forumHeaderLinkLabel':"forum", 94 'forumHeaderLinkLabel':"forum",
97 'recordMenuLabel':"Karten", 95 'recordMenuLabel':"Karten",
98 'accountMenuLabel':"Benutzer", 96 'accountMenuLabel':"Benutzer",
99 'dataMenuLabel':"Daten", 97 'dataMenuLabel':"Daten",
100 'contactsMenuLabel':"Kontakt", 98 'contactsMenuLabel':"Kontakt",
101 'bookmarkletMenuLabel':"Bookmarklet", 99 'bookmarkletMenuLabel':"Bookmarklet",
102 'logoutMenuLabel':"Ausloggen", 100 'logoutMenuLabel':"Ausloggen",
103 'lockMenuLabel':"Sperren", 101 'lockMenuLabel':"Sperren",
104 'lockTitle':"Dieses Konto ist gesperrt", 102 'lockTitle':"Dieses Konto ist gesperrt",
105 'lockDescription':"<p>Bitte gebe Deinen Sicherheitssatz ein, um das Clipperz-Konto zu entsperren.</p> ", 103 'lockDescription':"<p>Bitte gebe Deinen Sicherheitssatz ein, um das Clipperz-Konto zu entsperren.</p> ",
106 'unlockButtonLabel':"Entsperren", 104 'unlockButtonLabel':"Entsperren",
107 'changePasswordTabLabel':"Sicherheitssatz ändern", 105 'changePasswordTabLabel':"Sicherheitssatz ändern",
108 'changePasswordTabTitle':"Sicherheitssatz ändern", 106 'changePasswordTabTitle':"Sicherheitssatz ändern",
109 'changePasswordFormUsernameLabel':"Benutzername", 107 'changePasswordFormUsernameLabel':"Benutzername",
110 'changePasswordFormOldPassphraseLabel':"Alter Sicherheitssatz", 108 'changePasswordFormOldPassphraseLabel':"Alter Sicherheitssatz",
111 'changePasswordFormNewPassphraseLabel':"Neuer Sicherheitssatz", 109 'changePasswordFormNewPassphraseLabel':"Neuer Sicherheitssatz",
112 'changePasswordFormRetypePassphraseLabel':"Wiederholdung neuen Sicherheitssatz", 110 'changePasswordFormRetypePassphraseLabel':"Wiederholdung neuen Sicherheitssatz",
113 'changePasswordFormSafetyCheckboxLabel':"Ich akzeptiere dass es Clipperz nicht möglich ist, einen verlorenen Sicherheitssatz wiederherzustellen.", 111 'changePasswordFormSafetyCheckboxLabel':"Ich akzeptiere dass es Clipperz nicht möglich ist, einen verlorenen Sicherheitssatz wiederherzustellen.",
114 'changePasswordFormSubmitLabel':"Sicherheitssatz ändern", 112 'changePasswordFormSubmitLabel':"Sicherheitssatz ändern",
115 'changePasswordFormWrongUsernameWarning':"Falscher Benutzername", 113 'changePasswordFormWrongUsernameWarning':"Falscher Benutzername",
116 'changePasswordFormWrongPassphraseWarning':"Falscher Sicherheitssatz", 114 'changePasswordFormWrongPassphraseWarning':"Falscher Sicherheitssatz",
117 'changePasswordFormWrongRetypePassphraseWarning':"Deine Sicherheitssätze stimmen nicht überein. Bitte erneut eingeben.", 115 'changePasswordFormWrongRetypePassphraseWarning':"Deine Sicherheitssätze stimmen nicht überein. Bitte erneut eingeben.",
118 'changePasswordFormSafetyCheckWarning':"Bitte ließ die folgenden Hinweise und akzeptiere diese.", 116 'changePasswordFormSafetyCheckWarning':"Bitte ließ die folgenden Hinweise und akzeptiere diese.",
119 'changePasswordFormProgressDialogTitle':"Ändere Zugangsdaten", 117 'changePasswordFormProgressDialogTitle':"Ändere Zugangsdaten",
120 'changePasswordFormProgressDialogConnectedMessageTitle':"Verbunden", 118 'changePasswordFormProgressDialogConnectedMessageTitle':"Verbunden",
121 'changePasswordFormProgressDialogConnectedMessageText':"Fertig", 119 'changePasswordFormProgressDialogConnectedMessageText':"Fertig",
122 'changePasswordFormProgressDialogErrorMessageTitle':"Fehler", 120 'changePasswordFormProgressDialogErrorMessageTitle':"Fehler",
123 'changePasswordFormProgressDialogErrorMessageText':"Ändern der Zugangsdaten fehlgeschlagen!", 121 'changePasswordFormProgressDialogErrorMessageText':"Ändern der Zugangsdaten fehlgeschlagen!",
124 'changeCredentialsPanelEncryptingDataMessageTitle':"Ändere Sicherheitssatz", 122 'changeCredentialsPanelEncryptingDataMessageTitle':"Ändere Sicherheitssatz",
125 'changeCredentialsPanelEncryptingDataMessageText':"Lokale Verschlüsselung der Kartendaten", 123 'changeCredentialsPanelEncryptingDataMessageText':"Lokale Verschlüsselung der Kartendaten",
126 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"Ändere Sicherheitssatz", 124 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"Ändere Sicherheitssatz",
127 'changeCredentialsPanelCreatingNewCredentialsMessageText':"Aktualisiere Zugangsdaten", 125 'changeCredentialsPanelCreatingNewCredentialsMessageText':"Aktualisiere Zugangsdaten",
128 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Ändere Sicherheitssatz", 126 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Ändere Sicherheitssatz",
129 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Sende verschlüsselte Zugangsdaten zu Clipperz", 127 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Sende verschlüsselte Zugangsdaten zu Clipperz",
130 'changeCredentialsPanelDoneMessageTitle':"Ändere Sicherheitssatz", 128 'changeCredentialsPanelDoneMessageTitle':"Ändere Sicherheitssatz",
131 'changeCredentialsPanelDoneMessageText':"Fertig", 129 'changeCredentialsPanelDoneMessageText':"Fertig",
132 'manageOTPTabLabel':"Verwaltung des Sicheitssatzes für einmaliges Anmelden", 130 'manageOTPTabLabel':"Verwaltung des Sicheitssatzes für einmaliges Anmelden",
133 'manageOTPTabTitle':"Verwaltung des Sicheitssatzes für einmaliges Anmelden", 131 'manageOTPTabTitle':"Verwaltung des Sicheitssatzes für einmaliges Anmelden",
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> ", 132 '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> ",
135 'accountPreferencesLabel':"Einstellungen", 133 'accountPreferencesLabel':"Einstellungen",
136 'accountPreferencesTabTitle':"Einstellungen", 134 'accountPreferencesTabTitle':"Einstellungen",
137 'accountPreferencesLanguageTitle':"Sprachenauswahl", 135 'accountPreferencesLanguageTitle':"Sprachenauswahl",
138 'accountPreferencesLanguageDescription':"<p>Wähle Deine bevorzugte Sprache, aus der unten stehenden Liste.</p> ", 136 'accountPreferencesLanguageDescription':"<p>Wähle Deine bevorzugte Sprache, aus der unten stehenden Liste.</p> ",
139 'accountPreferencesInterfaceTitle':"Personalisiere Dein persönliches Clipperz-Erscheinungsbild", 137 'accountPreferencesInterfaceTitle':"Personalisiere Dein persönliches Clipperz-Erscheinungsbild",
140 'accountPreferencesInterfaceDescription':"<p>Passe dass Clipperz-Erscheinungsbild an Deine Wünsche an.</p> ", 138 'accountPreferencesInterfaceDescription':"<p>Passe dass Clipperz-Erscheinungsbild an Deine Wünsche an.</p> ",
141 'saveUserPreferencesFormSubmitLabel':"Speichern", 139 'saveUserPreferencesFormSubmitLabel':"Speichern",
142 'cancelUserPreferencesFormSubmitLabel':"Abbruch", 140 'cancelUserPreferencesFormSubmitLabel':"Abbruch",
143 'accountPreferencesSavingPanelTitle_Step1':"Speichere Einstellungen", 141 'accountPreferencesSavingPanelTitle_Step1':"Speichere Einstellungen",
144 'accountPreferencesSavingPanelText_Step1':"Lokale Verschlüsselung der Einstellungen", 142 'accountPreferencesSavingPanelText_Step1':"Lokale Verschlüsselung der Einstellungen",
145 'accountPreferencesSavingPanelTitle_Step2':"Speichere Einstellungen", 143 'accountPreferencesSavingPanelTitle_Step2':"Speichere Einstellungen",
146 'accountPreferencesSavingPanelText_Step2':"Sende verschlüsselte Einstellungen", 144 'accountPreferencesSavingPanelText_Step2':"Sende verschlüsselte Einstellungen",
147 'deleteAccountTabLabel':"Konto löschen", 145 'deleteAccountTabLabel':"Konto löschen",
148 'deleteAccountTabTitle':"Konto löschen", 146 'deleteAccountTabTitle':"Konto löschen",
149 'deleteAccountFormUsernameLabel':"Benutzername", 147 'deleteAccountFormUsernameLabel':"Benutzername",
150 'deleteAccountFormPassphraseLabel':"Sicherheitssatz", 148 'deleteAccountFormPassphraseLabel':"Sicherheitssatz",
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.", 149 'deleteAccountFormSafetyCheckboxLabel':"Ich bin mir bewusst, dass alle meine Daten gelöscht werden und dieser Vorgang in keinem Falle rückgängig gemacht werden kann.",
152 'deleteAccountFormSubmitLabel':"Konto löschens", 150 'deleteAccountFormSubmitLabel':"Konto löschens",
153 'deleteAccountFormWrongUsernameWarning':"Falscher Benutzername", 151 'deleteAccountFormWrongUsernameWarning':"Falscher Benutzername",
154 'deleteAccountFormWrongPassphraseWarning':"Falscher Sicherheitssatz", 152 'deleteAccountFormWrongPassphraseWarning':"Falscher Sicherheitssatz",
155 'deleteAccountFormSafetyCheckWarning':"Bitte lese die Bedingungen und akzeptiere die Auswahlboxen weiter unten.", 153 'deleteAccountFormSafetyCheckWarning':"Bitte lese die Bedingungen und akzeptiere die Auswahlboxen weiter unten.",
156 'accountPanelDeletingAccountPanelConfirmationTitle':"ACHTUNG", 154 'accountPanelDeletingAccountPanelConfirmationTitle':"ACHTUNG",
157 'accountPanelDeleteAccountPanelConfirmationText':"Bist Du sicher, dass Du den Zugang löschen möchtest?", 155 'accountPanelDeleteAccountPanelConfirmationText':"Bist Du sicher, dass Du den Zugang löschen möchtest?",
158 'accountPanelDeleteAccountPanelConfirmButtonLabel':"Ja", 156 'accountPanelDeleteAccountPanelConfirmButtonLabel':"Ja",
159 'accountPanelDeleteAccountPanelDenyButtonLabel':"Nein", 157 'accountPanelDeleteAccountPanelDenyButtonLabel':"Nein",
160 'offlineCopyTabLabel':"Offline Kopie", 158 'offlineCopyTabLabel':"Offline Kopie",
161 'offlineCopyTabTitle':"Offline Kopie", 159 'offlineCopyTabTitle':"Offline Kopie",
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> ", 160 '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> ",
163 'offlineCopyDownloadLinkLabel':"Download", 161 'offlineCopyDownloadLinkLabel':"Download",
164 'sharingTabLabel':"Freigabe für gemeinsame Nutzung", 162 'sharingTabLabel':"Freigabe für gemeinsame Nutzung",
165 'sharingTabTitle':"Freigabe für gemeinsame Nutzung", 163 'sharingTabTitle':"Freigabe für gemeinsame Nutzung",
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> ", 164 '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> ",
167 'importTabLabel':"Import", 165 'importTabLabel':"Import",
168 'importTabTitle':"Import", 166 'importTabTitle':"Import",
169 'importTabDescription':"<p> <b>In Kürze ...</b> </p> ", 167 'importTabDescription':"<p> <b>In Kürze ...</b> </p> ",
170 'printingTabLabel':"Export", 168 'printingTabLabel':"Export",
171 'printingTabTitle':"Export", 169 'printingTabTitle':"Export",
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> ", 170 '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> ",
173 'printingLinkLabel':"Druckerfreundliches Format", 171 'printingLinkLabel':"Druckerfreundliches Format",
174 'contactsTabLabel':"Kontakte", 172 'contactsTabLabel':"Kontakte",
175 'contactsTabTitle':"Kontakte", 173 'contactsTabTitle':"Kontakte",
176 'bookmarkletTabLabel':"Bookmarklet", 174 'bookmarkletTabLabel':"Bookmarklet",
177 'bookmarkletTabTitle':"Bookmarklet", 175 'bookmarkletTabTitle':"Bookmarklet",
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> ", 176 '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> ",
179 'bookmarkletTabBookmarkletTitle':"Zu Clipperz hinzufügen", 177 'bookmarkletTabBookmarkletTitle':"Zu Clipperz hinzufügen",
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> ", 178 '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> ",
181 'mainPanelDirectLoginBlockLabel':"Direktes Login", 179 'mainPanelDirectLoginBlockLabel':"Direktes Login",
182 'directLinkReferenceShowButtonLabel':"zeigen", 180 'directLinkReferenceShowButtonLabel':"zeigen",
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> ", 181 '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> ",
184 'mainPanelRecordsBlockLabel':"Karten", 182 'mainPanelRecordsBlockLabel':"Karten",
185 'mainPanelAddRecordButtonLabel':"Neue Karte anlegen", 183 'mainPanelAddRecordButtonLabel':"Neue Karte anlegen",
186 'mainPanelRemoveRecordButtonLabel':"Karte löschen", 184 'mainPanelRemoveRecordButtonLabel':"Karte löschen",
187 'mainPanelRecordFilterBlockAllLabel':"all", 185 'mainPanelRecordFilterBlockAllLabel':"all",
188 'mainPanelRecordFilterBlockTagsLabel':"tags", 186 'mainPanelRecordFilterBlockTagsLabel':"tags",
189 'mainPanelRecordFilterBlockSearchLabel':"search", 187 'mainPanelRecordFilterBlockSearchLabel':"search",
190 'recordDetailNoRecordAtAllTitle':"Willkommen bei Clipperz!", 188 'recordDetailNoRecordAtAllTitle':"Willkommen bei Clipperz!",
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> ", 189 '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> ",
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> ", 190 '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> ",
193 'newRecordWizardBookmarkletConfigurationTitle':"Direktes Login", 191 'newRecordWizardBookmarkletConfigurationTitle':"Direktes Login",
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> ", 192 '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> ",
195 'newRecordWizardCreateButtonLabel':"Anlegen", 193 'newRecordWizardCreateButtonLabel':"Anlegen",
196 'newRecordWizardCancelButtonLabel':"Abbruch", 194 'newRecordWizardCancelButtonLabel':"Abbruch",
197 'recordTemplates':{ 195 'recordTemplates':{
198 'WebAccount':{ 196 'WebAccount':{
199 'title':"Web Zugangsdaten", 197 'title':"Web Zugangsdaten",
200 'description':"<p>Eine einfache Karte, die die Login Informationen für einen Online Service speichert.</p> ", 198 'description':"<p>Eine einfache Karte, die die Login Informationen für einen Online Service speichert.</p> ",
201 'fields':{ 199 'fields':{
202 'URL':"Web Adresse", 200 'URL':"Web Adresse",
203 'TXT':"Benutzername / E-Mail", 201 'TXT':"Benutzername / E-Mail",
204 'PWD':"Passwort" 202 'PWD':"Passwort"
205 } 203 }
206 }, 204 },
207 'BankAccount':{ 205 'BankAccount':{
208 'title':"Bank Zugangsdaten", 206 'title':"Bank Zugangsdaten",
209 'description':"<p>Speichere geschützt Deine Online Banking Zugangsdaten.</p> ", 207 'description':"<p>Speichere geschützt Deine Online Banking Zugangsdaten.</p> ",
210 'fields':{ 208 'fields':{
211 'TXT':"Bank", 209 'TXT':"Bank",
212 'TXT':"Kontonummer", 210 'TXT':"Kontonummer",
213 'URL':"Web Adresse", 211 'URL':"Web Adresse",
214 'TXT':"Online Zugangsdaten", 212 'TXT':"Online Zugangsdaten",
215 'PWD':"Online Passwort" 213 'PWD':"Online Passwort"
216 } 214 }
217 }, 215 },
218 'CreditCard':{ 216 'CreditCard':{
219 'title':"Kreditkarte", 217 'title':"Kreditkarte",
220 'description':"<p>Kartennummer, CVV2, Ablaufdatum und PIN zu jeder Zeit abrufbar bei Clipperz.</p> ", 218 'description':"<p>Kartennummer, CVV2, Ablaufdatum und PIN zu jeder Zeit abrufbar bei Clipperz.</p> ",
221 'fields':{ 219 'fields':{
222 'TXT':"Art (Visa, AmEx, ...)", 220 'TXT':"Art (Visa, AmEx, ...)",
223 'TXT':"Nummer", 221 'TXT':"Nummer",
224 'TXT':"Inhaber", 222 'TXT':"Inhaber",
225 'TXT':"Ablaufdatum", 223 'TXT':"Ablaufdatum",
226 'TXT':"CVV2", 224 'TXT':"CVV2",
227 'PWD':"PIN", 225 'PWD':"PIN",
228 'URL':"Webseite", 226 'URL':"Webseite",
229 'TXT':"Online Zugangsdaten", 227 'TXT':"Online Zugangsdaten",
230 'PWD':"Passwort" 228 'PWD':"Passwort"
231 } 229 }
232 }, 230 },
233 'AddressBookEntry':{ 231 'AddressBookEntry':{
234 'title':"Adressbuch Eintrag", 232 'title':"Adressbuch Eintrag",
235 'description':"<p>Clipperz kann auch als Dein neues privates Adressbuch agieren. Nutze diese Vorlage um einfach eine neuen Eintrag anzulegen.</p> ", 233 'description':"<p>Clipperz kann auch als Dein neues privates Adressbuch agieren. Nutze diese Vorlage um einfach eine neuen Eintrag anzulegen.</p> ",
236 'fields':{ 234 'fields':{
237 'TXT':"Name", 235 'TXT':"Name",
238 'TXT':"Email", 236 'TXT':"Email",
239 'TXT':"Telefon", 237 'TXT':"Telefon",
240 'TXT':"Handy", 238 'TXT':"Handy",
241 'ADDR':"Adresse" 239 'ADDR':"Adresse"
242 } 240 }
243 }, 241 },
244 'Custom':{ 242 'Custom':{
245 'title':"Benutzerdefinierte Karte", 243 'title':"Benutzerdefinierte Karte",
246 'description':"<p>Egal welche Art von vertraulichen Informationen Du speichern musst, mit der benutzerdefinierten Karte kannst Du diese Informationen speichern.</p> ", 244 'description':"<p>Egal welche Art von vertraulichen Informationen Du speichern musst, mit der benutzerdefinierten Karte kannst Du diese Informationen speichern.</p> ",
247 'fields':{ 245 'fields':{
248 'TXT':"Feldname 1", 246 'TXT':"Feldname 1",
249 'TXT':"Feldname 2", 247 'TXT':"Feldname 2",
250 'TXT':"Feldname 3" 248 'TXT':"Feldname 3"
251 } 249 }
252 } 250 }
253}, 251},
254 'recordFieldTypologies':{ 252 'recordFieldTypologies':{
255 'TXT':{ 253 'TXT':{
256 'description':"simple text field", 254 'description':"simple text field",
257 'shortDescription':"Text" 255 'shortDescription':"Text"
258 }, 256 },
259 'PWD':{ 257 'PWD':{
260 'description':"simple text field, with default status set to hidden", 258 'description':"simple text field, with default status set to hidden",
261 'shortDescription':"Passwort" 259 'shortDescription':"Passwort"
262 }, 260 },
263 'URL':{ 261 'URL':{
264 'description':"simple text field in edit mode, that became an active url in view mode", 262 'description':"simple text field in edit mode, that became an active url in view mode",
265 'shortDescription':"Webadresse" 263 'shortDescription':"Webadresse"
266 }, 264 },
267 'DATE':{ 265 'DATE':{
268 'description':"a value set with a calendar helper", 266 'description':"a value set with a calendar helper",
269 'shortDescription':"Datum" 267 'shortDescription':"Datum"
270 }, 268 },
271 'ADDR':{ 269 'ADDR':{
272 'description':"just like the URL, but the active link points to Google Maps (or similar service) passing the address value as argument", 270 'description':"just like the URL, but the active link points to Google Maps (or similar service) passing the address value as argument",
273 'shortDescription':"Postanschrift" 271 'shortDescription':"Postanschrift"
274 }, 272 },
275 'CHECK':{ 273 'CHECK':{
276 'description':"check description", 274 'description':"check description",
277 'shortDescription':"check" 275 'shortDescription':"check"
278 }, 276 },
279 'RADIO':{ 277 'RADIO':{
280 'description':"radio description", 278 'description':"radio description",
281 'shortDescription':"radio" 279 'shortDescription':"radio"
282 }, 280 },
283 'SELECT':{ 281 'SELECT':{
284 'description':"select description", 282 'description':"select description",
285 'shortDescription':"select" 283 'shortDescription':"select"
286 } 284 }
287}, 285},
288 'newRecordPanelGeneralExceptionTitle':"Fehler", 286 'newRecordPanelGeneralExceptionTitle':"Fehler",
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.", 287 'newRecordPanelGeneralExceptionMessage':"Der Konfigurationstext ist nicht gültig. Stelle sicher, dass Du den Text des Bookmarket Pop-Up eingefügt hast und versuch es nocheinmal.",
290 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"Fehler", 288 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"Fehler",
291 'newRecordPanelWrongBookmarkletVersionExceptionMessage':"Der Konfigurationstext wurde von einer älteren Version des Bookmarklets erstellt. Bitte aktualisiere Dein Bookmarklet und probiere es erneut.", 289 'newRecordPanelWrongBookmarkletVersionExceptionMessage':"Der Konfigurationstext wurde von einer älteren Version des Bookmarklets erstellt. Bitte aktualisiere Dein Bookmarklet und probiere es erneut.",
292 'newRecordPanelExceptionPanelCloseButtonLabel':"Abbruch", 290 'newRecordPanelExceptionPanelCloseButtonLabel':"Abbruch",
293 'mainPanelDeletingRecordPanelConfirmationTitle':"Lösche ausgewählte Karte", 291 'mainPanelDeletingRecordPanelConfirmationTitle':"Lösche ausgewählte Karte",
294 'mainPanelDeleteRecordPanelConfirmationText':"Möschtest Du wirklich die ausgewählte Karte löschen?", 292 'mainPanelDeleteRecordPanelConfirmationText':"Möschtest Du wirklich die ausgewählte Karte löschen?",
295 'mainPanelDeleteRecordPanelConfirmButtonLabel':"Ja", 293 'mainPanelDeleteRecordPanelConfirmButtonLabel':"Ja",
296 'mainPanelDeleteRecordPanelDenyButtonLabel':"Nein", 294 'mainPanelDeleteRecordPanelDenyButtonLabel':"Nein",
297 'mainPanelDeletingRecordPanelInitialTitle':"Lösche ausgewählte Karte", 295 'mainPanelDeletingRecordPanelInitialTitle':"Lösche ausgewählte Karte",
298 'mainPanelDeletingRecordPanelCompletedText':"Fertig", 296 'mainPanelDeletingRecordPanelCompletedText':"Fertig",
299 'deleteRecordPanelCollectRecordDataMessageTitle':"Karte löschen", 297 'deleteRecordPanelCollectRecordDataMessageTitle':"Karte löschen",
300 'deleteRecordPanelCollectRecordDataMessageText':"Aktualisiere Kartenliste", 298 'deleteRecordPanelCollectRecordDataMessageText':"Aktualisiere Kartenliste",
301 'deleteRecordPanelEncryptUserDataMessageTitle':"Karte löschen", 299 'deleteRecordPanelEncryptUserDataMessageTitle':"Karte löschen",
302 'deleteRecordPanelEncryptUserDataMessageText':"Lokale Verschlüsselung der Karten Kopfdaten", 300 'deleteRecordPanelEncryptUserDataMessageText':"Lokale Verschlüsselung der Karten Kopfdaten",
303 'deleteRecordPanelSendingDataToTheServerMessageTitle':"Karte löschen", 301 'deleteRecordPanelSendingDataToTheServerMessageTitle':"Karte löschen",
304 'deleteRecordPanelSendingDataToTheServerMessageText':"Lade verschlüsselte Karten Kopfdaten zu Clipperz hoch", 302 'deleteRecordPanelSendingDataToTheServerMessageText':"Lade verschlüsselte Karten Kopfdaten zu Clipperz hoch",
305 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"Karte löschen", 303 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"Karte löschen",
306 'deleteRecordPanelUpdatingTheInterfaceMessageText':"Aktualisiere Benutzerschnittstelle", 304 'deleteRecordPanelUpdatingTheInterfaceMessageText':"Aktualisiere Benutzerschnittstelle",
307 'recordDetailNoRecordSelectedTitle':"Keine Karte ausgewählt", 305 'recordDetailNoRecordSelectedTitle':"Keine Karte ausgewählt",
308 'recordDetailNoRecordSelectedDescription':"<p>Bitte wähle aus der linken Liste eine Karte aus.</p> ", 306 'recordDetailNoRecordSelectedDescription':"<p>Bitte wähle aus der linken Liste eine Karte aus.</p> ",
309 'recordDetailLoadingRecordMessage':"Lade verschlüsselte Karte von Clipperz runter", 307 'recordDetailLoadingRecordMessage':"Lade verschlüsselte Karte von Clipperz runter",
310 'recordDetailDecryptingRecordMessage':"Lokale entschlüsselung der Kartendaten", 308 'recordDetailDecryptingRecordMessage':"Lokale entschlüsselung der Kartendaten",
311 'recordDetailLoadingRecordVersionMessage':"Herunterladen der aktuellsten Kartenversion", 309 'recordDetailLoadingRecordVersionMessage':"Herunterladen der aktuellsten Kartenversion",
312 'recordDetailDecryptingRecordVersionMessage':"Lokale Entschlüsselung der aktuellen Version", 310 'recordDetailDecryptingRecordVersionMessage':"Lokale Entschlüsselung der aktuellen Version",
313 'recordDetailLoadingErrorMessageTitle':"Fehler beim Herunterladen der Karte", 311 'recordDetailLoadingErrorMessageTitle':"Fehler beim Herunterladen der Karte",
314 'recordDetailNotesLabel':"Notiz", 312 'recordDetailNotesLabel':"Notiz",
315 'recordDetailLabelFieldColumnLabel':"Feld Namen", 313 'recordDetailLabelFieldColumnLabel':"Feld Namen",
316 'recordDetailDataFieldColumnLabel':"Feld Daten", 314 'recordDetailDataFieldColumnLabel':"Feld Daten",
317 'recordDetailTypeFieldColumnLabel':"Art", 315 'recordDetailTypeFieldColumnLabel':"Art",
318 'recordDetailSavingChangesMessagePanelInitialTitle':"Speichere Karte", 316 'recordDetailSavingChangesMessagePanelInitialTitle':"Speichere Karte",
319 'recordDetailAddFieldButtonLabel':"Neues Feld hinzufügen", 317 'recordDetailAddFieldButtonLabel':"Neues Feld hinzufügen",
320 'recordDetailDirectLoginBlockTitle':"Direkt Logins", 318 'recordDetailDirectLoginBlockTitle':"Direkt Logins",
321 'recordDetailNewDirectLoginDescription':"<p>Direkt Login Konfiguration</p> ", 319 'recordDetailNewDirectLoginDescription':"<p>Direkt Login Konfiguration</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> ", 320 '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> ",
323 'recordDetailAddNewDirectLoginButtonLabel':"Neues Direktlogin hinzufügen", 321 'recordDetailAddNewDirectLoginButtonLabel':"Neues Direktlogin hinzufügen",
324 'recordDetailEditButtonLabel':"Bearbeiten", 322 'recordDetailEditButtonLabel':"Bearbeiten",
325 'recordDetailSaveButtonLabel':"Speichern", 323 'recordDetailSaveButtonLabel':"Speichern",
326 'recordDetailCancelButtonLabel':"Abbruch", 324 'recordDetailCancelButtonLabel':"Abbruch",
327 'newRecordTitleLabel':"_neue Karte_", 325 'newRecordTitleLabel':"_neue Karte_",
328 'newDirectLoginLabelSuffix':"", 326 'newDirectLoginLabelSuffix':"",
329 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"Karte speichern", 327 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"Karte speichern",
330 'recordSaveChangesPanelCollectRecordInfoMessageText':"Aktualisierung der Karten Kopfdaten", 328 'recordSaveChangesPanelCollectRecordInfoMessageText':"Aktualisierung der Karten Kopfdaten",
331 'recordSaveChangesPanelEncryptUserDataMessageTitle':"Karte speichern", 329 'recordSaveChangesPanelEncryptUserDataMessageTitle':"Karte speichern",
332 'recordSaveChangesPanelEncryptUserDataMessageText':"Lokale Verschlüsselung der Karten Kopfdaten", 330 'recordSaveChangesPanelEncryptUserDataMessageText':"Lokale Verschlüsselung der Karten Kopfdaten",
333 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"Karte speichern", 331 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"Karte speichern",
334 'recordSaveChangesPanelEncryptRecordDataMessageText':"Lokale Verschlüsselung der Karten Informationen", 332 'recordSaveChangesPanelEncryptRecordDataMessageText':"Lokale Verschlüsselung der Karten Informationen",
335 'recordSaveChangesPanelEncryptRecordVersionDataMessageTitle':"Karte speichern", 333 'recordSaveChangesPanelEncryptRecordVersionDataMessageTitle':"Karte speichern",
336 'recordSaveChangesPanelEncryptRecordVersionDataMessageText':"Lokale Verschlüsselung der Karten Versions Informationen", 334 'recordSaveChangesPanelEncryptRecordVersionDataMessageText':"Lokale Verschlüsselung der Karten Versions Informationen",
337 'recordSaveChangesPanelSendingDataToTheServerMessageTitle':"Karte speichern", 335 'recordSaveChangesPanelSendingDataToTheServerMessageTitle':"Karte speichern",
338 'recordSaveChangesPanelSendingDataToTheServerMessageText':"Verschlüsselte Karten Kopfdaten auf Clipperz hochladen", 336 'recordSaveChangesPanelSendingDataToTheServerMessageText':"Verschlüsselte Karten Kopfdaten auf Clipperz hochladen",
339 'recordSaveChangesPanelUpdatingTheInterfaceMessageTitle':"Karte speichern", 337 'recordSaveChangesPanelUpdatingTheInterfaceMessageTitle':"Karte speichern",
340 'recordSaveChangesPanelUpdatingTheInterfaceMessageText':"Aktualisierung der Benutzerschnittstelle", 338 'recordSaveChangesPanelUpdatingTheInterfaceMessageText':"Aktualisierung der Benutzerschnittstelle",
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> ", 339 '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> ",
342 //'DWRUtilLoadingMessage':"Lade Daten ...", 340 //'DWRUtilLoadingMessage':"Lade Daten ...",
343 'comingSoon':"In Kürze ...", 341 'comingSoon':"In Kürze ...",
344 'panelCollectingEntryopyMessageText':"Sammlung", 342 'panelCollectingEntryopyMessageText':"Sammlung",
345 'directLoginConfigurationCheckBoxFieldSelectedValue':"Ja", 343 'directLoginConfigurationCheckBoxFieldSelectedValue':"Ja",
346 'directLoginConfigurationCheckBoxFieldNotSelectedValue':"Nein", 344 'directLoginConfigurationCheckBoxFieldNotSelectedValue':"Nein",
347 345
348__syntaxFix__: "syntax fix" 346__syntaxFix__: "syntax fix"
349}); 347});
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 fc610d6..f7a7583 100644
--- a/frontend/beta/js/Clipperz/PM/Strings/Strings_el-GR.js
+++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_el-GR.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26//============================================================================= 24//=============================================================================
27// 25//
28 // G R E E K (el_GR) 26 // G R E E K (el_GR)
29// 27//
30//============================================================================= 28//=============================================================================
31 29
32Clipperz.PM.Strings.Languages['el-gr'] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 30Clipperz.PM.Strings.Languages['el-gr'] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], {
33 31
34//----------------------------------------------------- 32//-----------------------------------------------------
35 //Login page - description 33 //Login page - description
36 'clipperzServiceDescriptionConfig': [ 34 'clipperzServiceDescriptionConfig': [
37 {tag:'h2', html:'Κρατήστε το για τον Εαυτό Σας'}, 35 {tag:'h2', html:'Κρατήστε το για τον Εαυτό Σας'},
38 {tag:'ul', children:[ 36 {tag:'ul', children:[
39 {tag:'li', children:[ 37 {tag:'li', children:[
40 {tag:'h3', html:'Το Clipperz είναι:'}, 38 {tag:'h3', html:'Το Clipperz είναι:'},
41 {tag:'ul', children:[ 39 {tag:'ul', children:[
42 {tag:'li', children:[{tag:'span', html:'Ένας ασφαλής και απλός τρόπος διαχείρησης όλων των κωδικών πρόσβασης σας'}]}, 40 {tag:'li', children:[{tag:'span', html:'Ένας ασφαλής και απλός τρόπος διαχείρησης όλων των κωδικών πρόσβασης σας'}]},
43 {tag:'li', children:[{tag:'span', html:'Μια αποτελεσματική λύση πρόσβασης σε δεδομένα/εφαρμογές με μοναδικό κωδικό'}]}, 41 {tag:'li', children:[{tag:'span', html:'Μια αποτελεσματική λύση πρόσβασης σε δεδομένα/εφαρμογές με μοναδικό κωδικό'}]},
44 {tag:'li', children:[{tag:'span', html:'Μια ψηφιακή θυρίδα για τα απόρρητα δεδομένα σας'}]} 42 {tag:'li', children:[{tag:'span', html:'Μια ψηφιακή θυρίδα για τα απόρρητα δεδομένα σας'}]}
45 ]} 43 ]}
46 ]}, 44 ]},
47 {tag:'li', children:[ 45 {tag:'li', children:[
48 {tag:'h3', html:'Με το Clipperz μπορείτε:'}, 46 {tag:'h3', html:'Με το Clipperz μπορείτε:'},
49 {tag:'ul', children:[ 47 {tag:'ul', children:[
50 {tag:'li', children:[{tag:'span', html:'Να αποθηκεύσετε και να διαχειριστείτε όλους τους κωδικούς πρόσβασης και τα online πιστοποιητικά/διαπιστευτήρια σας'}]}, 48 {tag:'li', children:[{tag:'span', html:'Να αποθηκεύσετε και να διαχειριστείτε όλους τους κωδικούς πρόσβασης και τα online πιστοποιητικά/διαπιστευτήρια σας'}]},
51 {tag:'li', children:[{tag:'span', html:'Να έχετε πρόσβαση (login) στις υπηρεσίες διαδικτύου χωρίς την εισαγωγή oνομάτων λογαρισμών χρήστη (username),ή, κωδικών πρόσβασης (passwords)'}]}, 49 {tag:'li', children:[{tag:'span', html:'Να έχετε πρόσβαση (login) στις υπηρεσίες διαδικτύου χωρίς την εισαγωγή oνομάτων λογαρισμών χρήστη (username),ή, κωδικών πρόσβασης (passwords)'}]},
52 {tag:'li', children:[{tag:'span', html:'Να προστατεύσετε όλα τα προσωπικά δεδομένα σας: κωδικούς συναγερμών, PINs, αριθμούς πιστωτικών καρτών, ...'}]}, 50 {tag:'li', children:[{tag:'span', html:'Να προστατεύσετε όλα τα προσωπικά δεδομένα σας: κωδικούς συναγερμών, PINs, αριθμούς πιστωτικών καρτών, ...'}]},
53 {tag:'li', children:[{tag:'span', html:'Να μοιραστείτε δεδομένα με μέλη της οικογένεια σας και τους συνεργάτες σας (σύντομα στην διάθεση σας)'}]} 51 {tag:'li', children:[{tag:'span', html:'Να μοιραστείτε δεδομένα με μέλη της οικογένεια σας και τους συνεργάτες σας (σύντομα στην διάθεση σας)'}]}
54 ]} 52 ]}
55 ]}, 53 ]},
56 {tag:'li', children:[ 54 {tag:'li', children:[
57 {tag:'h3', html:'Τα πλεονεκτήματα του Clipperz είναι:'}, 55 {tag:'h3', html:'Τα πλεονεκτήματα του Clipperz είναι:'},
58 {tag:'ul', children:[ 56 {tag:'ul', children:[
59 {tag:'li', children:[{tag:'span', html:'Είναι δωρεάν και προσφέρει πρόσβαση ανώνυμα'}]}, 57 {tag:'li', children:[{tag:'span', html:'Είναι δωρεάν και προσφέρει πρόσβαση ανώνυμα'}]},
60 {tag:'li', children:[{tag:'span', html:'Μπορεί να χρησιμοποιηθεί οποαδήποτε ώρα και από οποιοδήποτε τερματικό'}]}, 58 {tag:'li', children:[{tag:'span', html:'Μπορεί να χρησιμοποιηθεί οποαδήποτε ώρα και από οποιοδήποτε τερματικό'}]},
61 {tag:'li', children:[{tag:'span', html:'Δεν απαιτεί την φόρτωση και εγκατάσταση οποιουδήποτε λογισμικού'}]}, 59 {tag:'li', children:[{tag:'span', html:'Δεν απαιτεί την φόρτωση και εγκατάσταση οποιουδήποτε λογισμικού'}]},
62 {tag:'li', children:[{tag:'span', html:'Αποφεύγετε την διατήριση απορρήτων στον υπολογιστή σας ή σε έντυπη μορφή'}]} 60 {tag:'li', children:[{tag:'span', html:'Αποφεύγετε την διατήριση απορρήτων στον υπολογιστή σας ή σε έντυπη μορφή'}]}
63 ]} 61 ]}
64 ]}, 62 ]},
65 {tag:'li', children:[ 63 {tag:'li', children:[
66 {tag:'h3', html:'Η ασφάλεια που παρέχει το Clipperz:'}, 64 {tag:'h3', html:'Η ασφάλεια που παρέχει το Clipperz:'},
67 {tag:'ul', children:[ 65 {tag:'ul', children:[
68 {tag:'li', children:[{tag:'span', html:'Τα απόρρητα δεδομένα σας κωδικοποιούνται τοπικά από τον διακομιστή σας (browser) πρίν να φορτωθούν στο Clipperz'}]}, 66 {tag:'li', children:[{tag:'span', html:'Τα απόρρητα δεδομένα σας κωδικοποιούνται τοπικά από τον διακομιστή σας (browser) πρίν να φορτωθούν στο Clipperz'}]},
69 {tag:'li', children:[{tag:'span', html:'Το κλειδί της κωδικοποίησης είναι μία φράση-κωδικός γνωστή μόνο σε εσάς'}]}, 67 {tag:'li', children:[{tag:'span', html:'Το κλειδί της κωδικοποίησης είναι μία φράση-κωδικός γνωστή μόνο σε εσάς'}]},
70 {tag:'li', children:[{tag:'span', html:'Το Clipperz φυλάσσει τα προσωπικά σας δεδομένα σε κωδικοποιημένη μορφή, και δεν μπορεί να έχει πρόσβαση σε αυτά στην αρχική τους μορφή'}]}, 68 {tag:'li', children:[{tag:'span', html:'Το Clipperz φυλάσσει τα προσωπικά σας δεδομένα σε κωδικοποιημένη μορφή, και δεν μπορεί να έχει πρόσβαση σε αυτά στην αρχική τους μορφή'}]},
71 {tag:'li', children:[{tag:'span', html:'Το Clipperz χρησιμοποιεί επίσημες /πρότυπες μεθόδους κωδικοποίησης, και όχι αόριστα και εφάνταστα μοντέλα'}]}, 69 {tag:'li', children:[{tag:'span', html:'Το Clipperz χρησιμοποιεί επίσημες /πρότυπες μεθόδους κωδικοποίησης, και όχι αόριστα και εφάνταστα μοντέλα'}]},
72 {tag:'li', children:[{tag:'span', html:'Έχετε πρόσβαση στον πηγαίο κώδικα οποτεδήποτε το θελήσετε, και δεν χρειάζετε να γνωρίζετε τίποτα από κρυπτογράφηση για να είστε ένας ευχαριστημένος χρήστης!'}]} 70 {tag:'li', children:[{tag:'span', html:'Έχετε πρόσβαση στον πηγαίο κώδικα οποτεδήποτε το θελήσετε, και δεν χρειάζετε να γνωρίζετε τίποτα από κρυπτογράφηση για να είστε ένας ευχαριστημένος χρήστης!'}]}
73 ]} 71 ]}
74 ]}, 72 ]},
75 {tag:'li', children:[ 73 {tag:'li', children:[
76 {tag:'a', href:"http://www.clipperz.com", target:'_blank', html:'Μάθετε περισσότερα'} 74 {tag:'a', href:"http://www.clipperz.com", target:'_blank', html:'Μάθετε περισσότερα'}
77 ]} 75 ]}
78 ]} 76 ]}
79 ], 77 ],
80 78
81 // Login page - form 79 // Login page - form
82 'loginFormTitle': "Συνδεθείτε με τον Clipperz λογαριασμό σας", 80 'loginFormTitle': "Συνδεθείτε με τον Clipperz λογαριασμό σας",
83 'loginFormUsernameLabel': "Όνομα χρήστη", 81 'loginFormUsernameLabel': "Όνομα χρήστη",
84 'loginFormPassphraseLabel': "Κωδική φράση", 82 'loginFormPassphraseLabel': "Κωδική φράση",
85 'loginFormDontHaveAnAccountLabel': "Δεν έχετε δημιουργήσει λογαριασμό?", 83 'loginFormDontHaveAnAccountLabel': "Δεν έχετε δημιουργήσει λογαριασμό?",
86 'loginFormCreateOneLabel': "Δημιουργήστε έναν", 84 'loginFormCreateOneLabel': "Δημιουργήστε έναν",
87 'loginFormForgotYourCredentialsLabel': "Ξεχάσατε τα διαπιστευτήριά σας?", 85 'loginFormForgotYourCredentialsLabel': "Ξεχάσατε τα διαπιστευτήριά σας?",
88 'loginFormAarghThatsBadLabel': "Ααααργκ! Αυτό είναι κακό!", 86 'loginFormAarghThatsBadLabel': "Ααααργκ! Αυτό είναι κακό!",
89 'loginFormAfraidOfMaliciousScriptsLabel':"φοβάστε κακόβουλα προγράμματα (scripts)?", 87 'loginFormAfraidOfMaliciousScriptsLabel':"φοβάστε κακόβουλα προγράμματα (scripts)?",
90 'loginFormVerifyTheCodeLabel': "Επαληθεύστε τον κωδικό", 88 'loginFormVerifyTheCodeLabel': "Επαληθεύστε τον κωδικό",
91 'loginFormButtonLabel': "Σύνδεση", 89 'loginFormButtonLabel': "Σύνδεση",
92 90
93// Login page - language selection 91// Login page - language selection
94 'loginPanelSwithLanguageDescriptionConfig':[ 92 'loginPanelSwithLanguageDescriptionConfig':[
95 {tag:'h5', html:"Αλλάξτε στην γλώσσα προτήμησης σας"} 93 {tag:'h5', html:"Αλλάξτε στην γλώσσα προτήμησης σας"}
96 ], 94 ],
97 95
98// Login page - browser compatibility 96// Login page - browser compatibility
99 'browserCompatibilityDescriptionConfig':[ 97 'browserCompatibilityDescriptionConfig':[
100 {tag:'p', html:"Έχετε μία καλύτερη και πιό ασφαλή Clipperz εμπειρία χρησιμοποιόντας τον Firefox. Ωστόσο το Clipperz συνεργάζετε άψογα με Opera και MS Internet Explorer!"} 98 {tag:'p', html:"Έχετε μία καλύτερη και πιό ασφαλή Clipperz εμπειρία χρησιμοποιόντας τον Firefox. Ωστόσο το Clipperz συνεργάζετε άψογα με Opera και MS Internet Explorer!"}
101 ], 99 ],
102 100
103// Login message panel 101// Login message panel
104 'loginMessagePanelInitialTitle': "Γίνεται σύνδεση ...", 102 'loginMessagePanelInitialTitle': "Γίνεται σύνδεση ...",
105 'loginMessagePanelInitialButtonLabel': "Ακύρωση", 103 'loginMessagePanelInitialButtonLabel': "Ακύρωση",
106 'loginMessagePanelConnectedTitle': "Συνδεθήκατε", 104 'loginMessagePanelConnectedTitle': "Συνδεθήκατε",
107 'loginMessagePanelConnectedText': "Ολοκληρώθηκε", 105 'loginMessagePanelConnectedText': "Ολοκληρώθηκε",
108 'loginMessagePanelFailureTitle': "Λάθος", 106 'loginMessagePanelFailureTitle': "Λάθος",
109 'loginMessagePanelFailureText': "Η σύνδεση χρήστη απέτυχε", 107 'loginMessagePanelFailureText': "Η σύνδεση χρήστη απέτυχε",
110 'loginMessagePanelFailureButtonLabel': "Κλείσιμο", 108 'loginMessagePanelFailureButtonLabel': "Κλείσιμο",
111 109
112// Login message panel - connection 110// Login message panel - connection
113 'connectionLoginSendingCredentialsMessageTitle': "Γίνεται επαλήθευση διαπιστευτηρίων", 111 'connectionLoginSendingCredentialsMessageTitle': "Γίνεται επαλήθευση διαπιστευτηρίων",
114 'connectionLoginSendingCredentialsMessageText': "Αποστέλλονται διαπιστευτήρια", 112 'connectionLoginSendingCredentialsMessageText': "Αποστέλλονται διαπιστευτήρια",
115 'connectionLoginCredentialsVerificationMessageTitle':"Γίνεται επαλήθευση διαπιστευτηρίων", 113 'connectionLoginCredentialsVerificationMessageTitle':"Γίνεται επαλήθευση διαπιστευτηρίων",
116 'connectionLoginCredentialsVerificationMessageText':"Εκτέλεση πιστοποίησης SRP ", 114 'connectionLoginCredentialsVerificationMessageText':"Εκτέλεση πιστοποίησης SRP ",
117 'connectionLoginDoneMessageTitle': "Γίνεται επαλήθευση διαπιστευτηρίων", 115 'connectionLoginDoneMessageTitle': "Γίνεται επαλήθευση διαπιστευτηρίων",
118 'connectionLoginDoneMessageText': "Συνδεδεμένος", 116 'connectionLoginDoneMessageText': "Συνδεδεμένος",
119 117
120 //Login message panel - user 118 //Login message panel - user
121 'userLoginPanelUpgradingUserCredentialsMessageTitle': "Γίνεται επαλήθευση διαπιστευτηρίων", 119 'userLoginPanelUpgradingUserCredentialsMessageTitle': "Γίνεται επαλήθευση διαπιστευτηρίων",
122 'userLoginPanelUpgradingUserCredentialsMessageText': "Αναβάθμηση των διαπιστευτηρίων σας σε ένα νέο σζήμα πιστοποίησης", 120 'userLoginPanelUpgradingUserCredentialsMessageText': "Αναβάθμηση των διαπιστευτηρίων σας σε ένα νέο σζήμα πιστοποίησης",
123 'userLoginPanelConnectedMessageTitle': "Χρήστης πιστοποιήθηκε ", 121 'userLoginPanelConnectedMessageTitle': "Χρήστης πιστοποιήθηκε ",
124 'userLoginPanelConnectedMessageText': "Συνδεθήκατε με επιτυχία", 122 'userLoginPanelConnectedMessageText': "Συνδεθήκατε με επιτυχία",
125 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle': "Γίνεται επαλήθευση διαπιστευτηρίων", 123 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle': "Γίνεται επαλήθευση διαπιστευτηρίων",
126 'userLoginPanelTryingAnOlderConnectionSchemaMessageText': "Trying an older authentication schema", 124 'userLoginPanelTryingAnOlderConnectionSchemaMessageText': "Trying an older authentication schema",
127 'userLoginPanelLoadingUserDataMessageTitle': "Χρήστης πιστοποιήθηκε ", 125 'userLoginPanelLoadingUserDataMessageTitle': "Χρήστης πιστοποιήθηκε ",
128 'userLoginPanelLoadingUserDataMessageText': "Downloading encrypted card headers from Clipperz", 126 'userLoginPanelLoadingUserDataMessageText': "Downloading encrypted card headers from Clipperz",
129 'userLoginPanelDecryptingUserDataMessageTitle': "Χρήστης πιστοποιήθηκε ", 127 'userLoginPanelDecryptingUserDataMessageTitle': "Χρήστης πιστοποιήθηκε ",
130 'userLoginPanelDecryptingUserDataMessageText': "Local decryption of card headers", 128 'userLoginPanelDecryptingUserDataMessageText': "Local decryption of card headers",
131 'userLoginPanelDecryptingUserStatisticsMessageTitle': "Χρήστης πιστοποιήθηκε ", 129 'userLoginPanelDecryptingUserStatisticsMessageTitle': "Χρήστης πιστοποιήθηκε ",
132 'userLoginPanelDecryptingUserStatisticsMessageText': "Local decryption of usage statistics", 130 'userLoginPanelDecryptingUserStatisticsMessageText': "Local decryption of usage statistics",
133 131
134 //----------------------------------------------------- 132 //-----------------------------------------------------
135 //Registration page - splash alert 133 //Registration page - splash alert
136 'splashAlertTitle':"Καλώς ήλθατε στο Clipperz!", 134 'splashAlertTitle':"Καλώς ήλθατε στο Clipperz!",
137 'splashAlertTextConfig': [ 135 'splashAlertTextConfig': [
138 {tag:'p', html:'Μερικές συμβουλές ασφαλείας'}, 136 {tag:'p', html:'Μερικές συμβουλές ασφαλείας'},
139 {tag:'ul', children:[ 137 {tag:'ul', children:[
140 {tag:'li', children:[{tag:'span', html:'Η αποθήκευση των δεδομένων σας στο Clipperz είναι τόσο ασφαλής, όσο η κωδική φράση που επιλέγετε για να τα προστατεύσετε. Κανένας δεν θα έχει πρόσβαση σε αυτά, εκτός αν γνωρίζει την κωδική φράση σας.'}]}, 138 {tag:'li', children:[{tag:'span', html:'Η αποθήκευση των δεδομένων σας στο Clipperz είναι τόσο ασφαλής, όσο η κωδική φράση που επιλέγετε για να τα προστατεύσετε. Κανένας δεν θα έχει πρόσβαση σε αυτά, εκτός αν γνωρίζει την κωδική φράση σας.'}]},
141 {tag:'li', children:[{tag:'span', html:'Αν πρόκειται να χρησιμοποιήσετε το Clipperz για ασφαλή προστασία ευαίσθητων ή σημαντικών πληροφοριών, βεβαιωθείτε ότι θα χρησιμοποιήσετε μία “γερή” κωδική φράση. Όσο μεγαλύτερη, τόσο καλύτερη!'}]}, 139 {tag:'li', children:[{tag:'span', html:'Αν πρόκειται να χρησιμοποιήσετε το Clipperz για ασφαλή προστασία ευαίσθητων ή σημαντικών πληροφοριών, βεβαιωθείτε ότι θα χρησιμοποιήσετε μία “γερή” κωδική φράση. Όσο μεγαλύτερη, τόσο καλύτερη!'}]},
142 {tag:'li', children:[{tag:'span', html:'Το Clipperz δεν θα έχει τη δυνατότητα να ανακτήσει μία χαμένη κωδική φράση!'}]} 140 {tag:'li', children:[{tag:'span', html:'Το Clipperz δεν θα έχει τη δυνατότητα να ανακτήσει μία χαμένη κωδική φράση!'}]}
143 ]}, 141 ]},
144 {tag:'p', html:'Για περισσότερες πληροφορίες, παρακαλώ ανατρέξτε στο <a href=\"http://www.clipperz.com\" target=\"_blank\">Clipperz</a>.'} 142 {tag:'p', html:'Για περισσότερες πληροφορίες, παρακαλώ ανατρέξτε στο <a href=\"http://www.clipperz.com\" target=\"_blank\">Clipperz</a>.'}
145 ], 143 ],
146 'splashAlertCloseButtonLabel':"Εντάξει", 144 'splashAlertCloseButtonLabel':"Εντάξει",
147 145
148 // Registration page - form 146 // Registration page - form
149 'registrationFormTitle': "Δημιουργήστε λογαριασμό", 147 'registrationFormTitle': "Δημιουργήστε λογαριασμό",
150 'registrationFormUsernameLabel': "Όνομα χρήστη", 148 'registrationFormUsernameLabel': "Όνομα χρήστη",
151 'registrationFormPassphraseLabel': "Κωδική φράση", 149 'registrationFormPassphraseLabel': "Κωδική φράση",
152 'registrationFormRetypePassphraseLabel': "Εισάγετε ξανά την κωδική φράση", 150 'registrationFormRetypePassphraseLabel': "Εισάγετε ξανά την κωδική φράση",
153 'registrationFormSafetyCheckLabel': "Κατανοώ πως το Clipperz δεν θα μπορεί να ανακτήσει μία χαμένη κωδική φράση.", 151 'registrationFormSafetyCheckLabel': "Κατανοώ πως το Clipperz δεν θα μπορεί να ανακτήσει μία χαμένη κωδική φράση.",
154 'registrationFormTermsOfServiceCheckLabel': "Έχω διαβάσει και αποδέχομαι τους Όρους Χρήσης <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Όρους Χρήσης</a>.", 152 'registrationFormTermsOfServiceCheckLabel': "Έχω διαβάσει και αποδέχομαι τους Όρους Χρήσης <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Όρους Χρήσης</a>.",
155 'registrationFormDoYouAlreadyHaveAnAccountLabel': "Έχετε ήδη έναν λογαριασμό?", 153 'registrationFormDoYouAlreadyHaveAnAccountLabel': "Έχετε ήδη έναν λογαριασμό?",
156 'registrationFormSimplyLoginLabel': "απλώς συνδεθείτε", 154 'registrationFormSimplyLoginLabel': "απλώς συνδεθείτε",
157 'registrationFormButtonLabel': "Εγγραφείτε", 155 'registrationFormButtonLabel': "Εγγραφείτε",
158 156
159// Registration page - warning messages 157// Registration page - warning messages
160 'registrationFormWarningMessageNotMatchingPassphrases':"Οι κωδικές φράσεις που εισάγατε δεν ταιριάζουν. Παρακαλώ ξαναπροσπαθήστε.", 158 'registrationFormWarningMessageNotMatchingPassphrases':"Οι κωδικές φράσεις που εισάγατε δεν ταιριάζουν. Παρακαλώ ξαναπροσπαθήστε.",
161 'registrationFormWarningMessageSafetyCheckNotSelected':"Παρακαλώ διαβάστε και επιλέξτε όλες τις παρακάτω επιλογές.", 159 'registrationFormWarningMessageSafetyCheckNotSelected':"Παρακαλώ διαβάστε και επιλέξτε όλες τις παρακάτω επιλογές.",
162 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"Πρέπει να αποδεχθείτε τους Όρους Χρήσης.", 160 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"Πρέπει να αποδεχθείτε τους Όρους Χρήσης.",
163 161
164 // Registration message panel 162 // Registration message panel
165 'registrationMessagePanelInitialTitle': "Δημιουργία λογαριασμού ...", 163 'registrationMessagePanelInitialTitle': "Δημιουργία λογαριασμού ...",
166 'registrationMessagePanelInitialButtonLabel': "Ακύρωση", 164 'registrationMessagePanelInitialButtonLabel': "Ακύρωση",
167 'registrationMessagePanelRegistrationDoneTitle': "Εγγραφή", 165 'registrationMessagePanelRegistrationDoneTitle': "Εγγραφή",
168 'registrationMessagePanelRegistrationDoneText': "Ολοκληρώθηκε", 166 'registrationMessagePanelRegistrationDoneText': "Ολοκληρώθηκε",
169 'registrationMessagePanelFailureTitle': "Η εγγραφή απέτυχε", 167 'registrationMessagePanelFailureTitle': "Η εγγραφή απέτυχε",
170 'registrationMessagePanelFailureButtonLabel': "Κλείσιμο", 168 'registrationMessagePanelFailureButtonLabel': "Κλείσιμο",
171 169
172// Registration - connection 170// Registration - connection
173 'connectionRegistrationSendingRequestMessageText': "Γίνεται επαλήθευση διαπιστευτηρίων", 171 'connectionRegistrationSendingRequestMessageText': "Γίνεται επαλήθευση διαπιστευτηρίων",
174 'connectionRegistrationSendingCredentialsMessageText':"Αποστέλλονται διαπιστευτήρια", 172 'connectionRegistrationSendingCredentialsMessageText':"Αποστέλλονται διαπιστευτήρια",
175 173
176 //----------------------------------------------------- 174 //-----------------------------------------------------
177// Registration splash panel 175// Registration splash panel
178 'registrationSplashPanelTitle':"Συμβουλές Ασφαλείας", 176 'registrationSplashPanelTitle':"Συμβουλές Ασφαλείας",
179 'registrationSplashPanelDescriptionConfig': [ 177 'registrationSplashPanelDescriptionConfig': [
180 {tag:'p', html:'Αυτά είναι τα διαπιστευτήριά σας στο Clipperz, δείτε τα προσεκτικά. Το Clipperz δεν θα απεικονίσει το όνομα χρήστη και την κωδική σας φράση δεύτερη φορά!'} 178 {tag:'p', html:'Αυτά είναι τα διαπιστευτήριά σας στο Clipperz, δείτε τα προσεκτικά. Το Clipperz δεν θα απεικονίσει το όνομα χρήστη και την κωδική σας φράση δεύτερη φορά!'}
181 ], 179 ],
182 'registrationSplashPanelUsernameLabel': "όνομα χρήστη", 180 'registrationSplashPanelUsernameLabel': "όνομα χρήστη",
183 'registrationSplashPanelPassphraseLabel':"κωδική φράση", 181 'registrationSplashPanelPassphraseLabel':"κωδική φράση",
184 182
185 //----------------------------------------------------- 183 //-----------------------------------------------------
186 //Header links 184 //Header links
187 'donateHeaderLinkLabel':"donate", 185 'donateHeaderLinkLabel':"donate",
188 'creditsHeaderLinkLabel':"credits", 186 'creditsHeaderLinkLabel':"credits",
189 'feedbackHeaderLinkLabel':"feedback", 187 'feedbackHeaderLinkLabel':"feedback",
190 'helpHeaderLinkLabel': "Βοήθεια", 188 'helpHeaderLinkLabel': "Βοήθεια",
191 'forumHeaderLinkLabel': "forum", 189 'forumHeaderLinkLabel': "forum",
192 190
193 //----------------------------------------------------- 191 //-----------------------------------------------------
194 //Menu labels 192 //Menu labels
195 'recordMenuLabel': "cards", 193 'recordMenuLabel': "cards",
196 'accountMenuLabel': "Λογαριασμός", 194 'accountMenuLabel': "Λογαριασμός",
197 'dataMenuLabel': "Δεδομένα", 195 'dataMenuLabel': "Δεδομένα",
198 'contactsMenuLabel':"Επαφές", 196 'contactsMenuLabel':"Επαφές",
199 'bookmarkletMenuLabel':"bookmarklet", 197 'bookmarkletMenuLabel':"bookmarklet",
200 'logoutMenuLabel': "Αποσύνδεση", 198 'logoutMenuLabel': "Αποσύνδεση",
201 'lockMenuLabel': "lock", 199 'lockMenuLabel': "lock",
202 200
203//----------------------------------------------------- 201//-----------------------------------------------------
204 //Lock dialog 202 //Lock dialog
205 'lockTitle': "The account is locked", 203 'lockTitle': "The account is locked",
206 'lockDescriptionConfig':[ 204 'lockDescriptionConfig':[
207 {tag:'p', html:'To unlock your account, please insert your passphrase'} 205 {tag:'p', html:'To unlock your account, please insert your passphrase'}
208 ], 206 ],
209 'unlockButtonLabel': "Unlock", 207 'unlockButtonLabel': "Unlock",
210 208
211//----------------------------------------------------- 209//-----------------------------------------------------
212 //Account panel - change passphrase 210 //Account panel - change passphrase
213 'changePasswordTabLabel':"Αλλάξτε την κωδική φράση σας", 211 'changePasswordTabLabel':"Αλλάξτε την κωδική φράση σας",
214 'changePasswordTabTitle':"Αλλάξτε την κωδική φράση σας", 212 'changePasswordTabTitle':"Αλλάξτε την κωδική φράση σας",
215 213
216 //Account panel - change passphrase - form 214 //Account panel - change passphrase - form
217 'changePasswordFormUsernameLabel': "όνομα χρήστη", 215 'changePasswordFormUsernameLabel': "όνομα χρήστη",
218 'changePasswordFormOldPassphraseLabel': "παλαιά κωδική φράση", 216 'changePasswordFormOldPassphraseLabel': "παλαιά κωδική φράση",
219 'changePasswordFormNewPassphraseLabel': "νέα κωδική φράση", 217 'changePasswordFormNewPassphraseLabel': "νέα κωδική φράση",
220 'changePasswordFormRetypePassphraseLabel':"Εισάγετε ξανά τη νέα κωδική φράση", 218 'changePasswordFormRetypePassphraseLabel':"Εισάγετε ξανά τη νέα κωδική φράση",
221 'changePasswordFormSafetyCheckboxLabel':"Κατανοώ πως το Clipperz δεν θα μπορεί να ανακτήσει μία χαμένη κωδική φράση.", 219 'changePasswordFormSafetyCheckboxLabel':"Κατανοώ πως το Clipperz δεν θα μπορεί να ανακτήσει μία χαμένη κωδική φράση.",
222 'changePasswordFormSubmitLabel': "Αλλάξτε την κωδική φράση σας", 220 'changePasswordFormSubmitLabel': "Αλλάξτε την κωδική φράση σας",
223 221
224 //Account panel - change passphrase - warnings 222 //Account panel - change passphrase - warnings
225 'changePasswordFormWrongUsernameWarning': "Λάθος όνομα χρήστη", 223 'changePasswordFormWrongUsernameWarning': "Λάθος όνομα χρήστη",
226 'changePasswordFormWrongPassphraseWarning': "Λάθος κωδική φράση", 224 'changePasswordFormWrongPassphraseWarning': "Λάθος κωδική φράση",
227 'changePasswordFormWrongRetypePassphraseWarning':"Οι κωδικές φράσεις που εισάγατε δεν ταιριάζουν. Παρακαλώ ξαναπροσπαθήστε.", 225 'changePasswordFormWrongRetypePassphraseWarning':"Οι κωδικές φράσεις που εισάγατε δεν ταιριάζουν. Παρακαλώ ξαναπροσπαθήστε.",
228 'changePasswordFormSafetyCheckWarning': "Παρακαλώ διαβάστε και επιλέξτε όλες τις παρακάτω επιλογές.", 226 'changePasswordFormSafetyCheckWarning': "Παρακαλώ διαβάστε και επιλέξτε όλες τις παρακάτω επιλογές.",
229 227
230 //Account panel - change passphrase - progress dialog 228 //Account panel - change passphrase - progress dialog
231 'changePasswordFormProgressDialogTitle': "Γίνεται αλλαγή διαπιστευτηρίων χρήστη", 229 'changePasswordFormProgressDialogTitle': "Γίνεται αλλαγή διαπιστευτηρίων χρήστη",
232 'changePasswordFormProgressDialogConnectedMessageTitle': "Συνδεδεμένος", 230 'changePasswordFormProgressDialogConnectedMessageTitle': "Συνδεδεμένος",
233 'changePasswordFormProgressDialogConnectedMessageText': "Ολοκληρώθηκε", 231 'changePasswordFormProgressDialogConnectedMessageText': "Ολοκληρώθηκε",
234 'changePasswordFormProgressDialogErrorMessageTitle': "Σφάλμα", 232 'changePasswordFormProgressDialogErrorMessageTitle': "Σφάλμα",
235 'changePasswordFormProgressDialogErrorMessageText': "Απέτυχε η αλλαγή διαπιστευτηρίων!", 233 'changePasswordFormProgressDialogErrorMessageText': "Απέτυχε η αλλαγή διαπιστευτηρίων!",
236 234
237 'changeCredentialsPanelEncryptingDataMessageTitle': "Γίνεται αλλαγή της κωδικής φράσης σας", 235 'changeCredentialsPanelEncryptingDataMessageTitle': "Γίνεται αλλαγή της κωδικής φράσης σας",
238 'changeCredentialsPanelEncryptingDataMessageText': "Local encryption of card headers", 236 'changeCredentialsPanelEncryptingDataMessageText': "Local encryption of card headers",
239 'changeCredentialsPanelCreatingNewCredentialsMessageTitle': "Γίνεται αλλαγή της κωδικής φράσης σας", 237 'changeCredentialsPanelCreatingNewCredentialsMessageTitle': "Γίνεται αλλαγή της κωδικής φράσης σας",
240 'changeCredentialsPanelCreatingNewCredentialsMessageText': "Γίνεται ανανέωση των διαπιστευτηρίων σας", 238 'changeCredentialsPanelCreatingNewCredentialsMessageText': "Γίνεται ανανέωση των διαπιστευτηρίων σας",
241 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Γίνεται αλλαγή της κωδικής φράσης σας", 239 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Γίνεται αλλαγή της κωδικής φράσης σας",
242 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Uploading your encrypted credentials to Clipperz", 240 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Uploading your encrypted credentials to Clipperz",
243 'changeCredentialsPanelDoneMessageTitle': "Γίνεται αλλαγή της κωδικής φράσης σας", 241 'changeCredentialsPanelDoneMessageTitle': "Γίνεται αλλαγή της κωδικής φράσης σας",
244 'changeCredentialsPanelDoneMessageText': "Ολοκληρώθηκε", 242 'changeCredentialsPanelDoneMessageText': "Ολοκληρώθηκε",
245 243
246//----------------------------------------------------- 244//-----------------------------------------------------
247 //Account panel - manage OTP 245 //Account panel - manage OTP
248 'manageOTPTabLabel': "Manage your one-time passphrases", 246 'manageOTPTabLabel': "Manage your one-time passphrases",
249 'manageOTPTabTitle': "Manage your one-time passphrases", 247 'manageOTPTabTitle': "Manage your one-time passphrases",
250 248
251 // Account panel - manage OTP - description 249 // Account panel - manage OTP - description
252 'manageOTPTabDescriptionConfig':[ 250 'manageOTPTabDescriptionConfig':[
253 {tag:'p', html:"A one-time passphrase works like your regular passphrase, but can be used only once."}, 251 {tag:'p', html:"A one-time passphrase works like your regular passphrase, but can be used only once."},
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."}, 252 {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."},
255 {tag:'p', html:"Immediately after a successful login, your one-time passphrase will be deleted preventing any fraudulent access."}, 253 {tag:'p', html:"Immediately after a successful login, your one-time passphrase will be deleted preventing any fraudulent access."},
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."}, 254 {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."},
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>"}, 255 {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>"},
258 {tag:'p', html:""}, 256 {tag:'p', html:""},
259 {tag:'p', html:"<b>Coming soon ...</b>"} 257 {tag:'p', html:"<b>Coming soon ...</b>"}
260 ], 258 ],
261 259
262//----------------------------------------------------- 260//-----------------------------------------------------
263// Account panel - user preferences 261// Account panel - user preferences
264 'accountPreferencesLabel': "Προτιμήσεις", 262 'accountPreferencesLabel': "Προτιμήσεις",
265 'accountPreferencesTabTitle': "Προτιμήσεις", 263 'accountPreferencesTabTitle': "Προτιμήσεις",
266 264
267// Account panel - user preferences - description 265// Account panel - user preferences - description
268 'accountPreferencesLanguageTitle':"Επιλογή Γλώσσας", 266 'accountPreferencesLanguageTitle':"Επιλογή Γλώσσας",
269 'accountPreferencesLanguageDescriptionConfig': [ 267 'accountPreferencesLanguageDescriptionConfig': [
270 {tag:'p', html:"Choose your preferred language from the list below."} 268 {tag:'p', html:"Choose your preferred language from the list below."}
271 ], 269 ],
272 270
273 'accountPreferencesInterfaceTitle':"Interface customization", 271 'accountPreferencesInterfaceTitle':"Interface customization",
274 'accountPreferencesInterfaceDescriptionConfig': [ 272 'accountPreferencesInterfaceDescriptionConfig': [
275 {tag:'p', html:"Tune the Clipperz interface to your needs."} 273 {tag:'p', html:"Tune the Clipperz interface to your needs."}
276 ], 274 ],
277 275
278// Account panel - user preferences - form 276// Account panel - user preferences - form
279 'saveUserPreferencesFormSubmitLabel': "Αποθήκευση", 277 'saveUserPreferencesFormSubmitLabel': "Αποθήκευση",
280 'cancelUserPreferencesFormSubmitLabel': "Ακύρωση", 278 'cancelUserPreferencesFormSubmitLabel': "Ακύρωση",
281 279
282// Account panel - user preferences - panel 280// Account panel - user preferences - panel
283 'accountPreferencesSavingPanelTitle_Step1': "Saving preferences", 281 'accountPreferencesSavingPanelTitle_Step1': "Saving preferences",
284 'accountPreferencesSavingPanelText_Step1': "Local encryption of your preferences", 282 'accountPreferencesSavingPanelText_Step1': "Local encryption of your preferences",
285 'accountPreferencesSavingPanelTitle_Step2': "Saving preferences", 283 'accountPreferencesSavingPanelTitle_Step2': "Saving preferences",
286 'accountPreferencesSavingPanelText_Step2': "Sending encrypted preferences to Clipperz", 284 'accountPreferencesSavingPanelText_Step2': "Sending encrypted preferences to Clipperz",
287 285
288//----------------------------------------------------- 286//-----------------------------------------------------
289 //Account panel - delete account 287 //Account panel - delete account
290 'deleteAccountTabLabel': "Διαγράψτε τον λογαριασμό σας", 288 'deleteAccountTabLabel': "Διαγράψτε τον λογαριασμό σας",
291 'deleteAccountTabTitle':"Γίνεται διαγραφή του λογαριασμού σας", 289 'deleteAccountTabTitle':"Γίνεται διαγραφή του λογαριασμού σας",
292 290
293 //Account panel - delete account - form 291 //Account panel - delete account - form
294 'deleteAccountFormUsernameLabel': "όνομα χρήστη", 292 'deleteAccountFormUsernameLabel': "όνομα χρήστη",
295 'deleteAccountFormPassphraseLabel': "κωδική φράση", 293 'deleteAccountFormPassphraseLabel': "κωδική φράση",
296 'deleteAccountFormSafetyCheckboxLabel':"Κατανοώ πως όλα τα δεδομένα μου θα διαγραφούν και πως αυτή η πράξη είναι μη αναστρέψιμη.", 294 'deleteAccountFormSafetyCheckboxLabel':"Κατανοώ πως όλα τα δεδομένα μου θα διαγραφούν και πως αυτή η πράξη είναι μη αναστρέψιμη.",
297 'deleteAccountFormSubmitLabel': "Διαγράψτε τον λογαριασμό μου", 295 'deleteAccountFormSubmitLabel': "Διαγράψτε τον λογαριασμό μου",
298 296
299 //Account panel - delete account - warnings 297 //Account panel - delete account - warnings
300 'deleteAccountFormWrongUsernameWarning':"λάθος όνομα χρήστη", 298 'deleteAccountFormWrongUsernameWarning':"λάθος όνομα χρήστη",
301 'deleteAccountFormWrongPassphraseWarning':"λάθος κωδική φράση", 299 'deleteAccountFormWrongPassphraseWarning':"λάθος κωδική φράση",
302 'deleteAccountFormSafetyCheckWarning': "Παρακαλώ διαβάστε και επιλέξτε την παρακάτω επιλογή.", 300 'deleteAccountFormSafetyCheckWarning': "Παρακαλώ διαβάστε και επιλέξτε την παρακάτω επιλογή.",
303 301
304 //Account panel - delete account - confirmation 302 //Account panel - delete account - confirmation
305 'accountPanelDeletingAccountPanelConfirmationTitle':"ΠΡΟΣΟΧΗ", 303 'accountPanelDeletingAccountPanelConfirmationTitle':"ΠΡΟΣΟΧΗ",
306 'accountPanelDeleteAccountPanelConfirmationText': "Είστε σίγουρος/η ότι θέλετε να διαγράψετε αυτόν τον λογαριασμό?", 304 'accountPanelDeleteAccountPanelConfirmationText': "Είστε σίγουρος/η ότι θέλετε να διαγράψετε αυτόν τον λογαριασμό?",
307 'accountPanelDeleteAccountPanelConfirmButtonLabel': "Ναι", 305 'accountPanelDeleteAccountPanelConfirmButtonLabel': "Ναι",
308 'accountPanelDeleteAccountPanelDenyButtonLabel': "Όχι", 306 'accountPanelDeleteAccountPanelDenyButtonLabel': "Όχι",
309 307
310//----------------------------------------------------- 308//-----------------------------------------------------
311 //Data panel - offline copy 309 //Data panel - offline copy
312 'offlineCopyTabLabel':"Offline copy", 310 'offlineCopyTabLabel':"Offline copy",
313 'offlineCopyTabTitle':"Offline copy", 311 'offlineCopyTabTitle':"Offline copy",
314 312
315 // Data panel - offline copy - description 313 // Data panel - offline copy - description
316 'offlineCopyTabDescriptionConfig': [ 314 'offlineCopyTabDescriptionConfig': [
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."}, 315 {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."},
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."}, 316 {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."},
319 {tag:'ol', children:[ 317 {tag:'ol', children:[
320 {tag:'li', children:[{tag:'span', html:"Click the link below to download the offline copy."}]}, 318 {tag:'li', children:[{tag:'span', html:"Click the link below to download the offline copy."}]},
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."}]}, 319 {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."}]},
322 {tag:'li', children:[{tag:'span', html:"Unzip the file to reveal the “Clipperz_YYYYMMDD” folder."}]}, 320 {tag:'li', children:[{tag:'span', html:"Unzip the file to reveal the “Clipperz_YYYYMMDD” folder."}]},
323 {tag:'li', children:[{tag:'span', html:"Open the “Clipperz_YYYYMMDD” folder and double click on the “index.html” file."}]}, 321 {tag:'li', children:[{tag:'span', html:"Open the “Clipperz_YYYYMMDD” folder and double click on the “index.html” file."}]},
324 {tag:'li', children:[{tag:'span', html:"Enter the usual username and passphrase and access your private data without an Internet connection."}]} 322 {tag:'li', children:[{tag:'span', html:"Enter the usual username and passphrase and access your private data without an Internet connection."}]}
325 ]} 323 ]}
326 ], 324 ],
327 'offlineCopyDownloadLinkLabel':"Download", 325 'offlineCopyDownloadLinkLabel':"Download",
328 326
329//----------------------------------------------------- 327//-----------------------------------------------------
330 //Data panel - sharing 328 //Data panel - sharing
331 'sharingTabLabel':"Sharing", 329 'sharingTabLabel':"Sharing",
332 'sharingTabTitle':"Sharing", 330 'sharingTabTitle':"Sharing",
333 331
334 //Data panel - sharing - description 332 //Data panel - sharing - description
335 'sharingTabDescriptionConfig':[ 333 'sharingTabDescriptionConfig':[
336 {tag:'p', html:"Quite often a confidential piece of information needs to be shared with one or more persons."}, 334 {tag:'p', html:"Quite often a confidential piece of information needs to be shared with one or more persons."},
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."}, 335 {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."},
338 {tag:'p', html:"Clipperz can make sharing your secrets a secure and straightforward process."}, 336 {tag:'p', html:"Clipperz can make sharing your secrets a secure and straightforward process."},
339 {tag:'p', html:""}, 337 {tag:'p', html:""},
340 {tag:'p', html:"<b>Coming soon ...</b>"} 338 {tag:'p', html:"<b>Coming soon ...</b>"}
341 ], 339 ],
342 340
343//----------------------------------------------------- 341//-----------------------------------------------------
344 // Data panel - import 342 // Data panel - import
345 'importTabLabel':"Εισαγωγή", 343 'importTabLabel':"Εισαγωγή",
346 'importTabTitle':"Εισαγωγή", 344 'importTabTitle':"Εισαγωγή",
347 345
348 // Data panel - import - description 346 // Data panel - import - description
349 'importTabDescriptionConfig':[ 347 'importTabDescriptionConfig':[
350 {tag:'p', html:"<b>Σύντομα κοντά σας ...</b>"} 348 {tag:'p', html:"<b>Σύντομα κοντά σας ...</b>"}
351 ], 349 ],
352 350
353//----------------------------------------------------- 351//-----------------------------------------------------
354 //Data panel - export 352 //Data panel - export
355 'printingTabLabel':"Εξαγωγή", 353 'printingTabLabel':"Εξαγωγή",
356 'printingTabTitle':"Εξαγωγή", 354 'printingTabTitle':"Εξαγωγή",
357 355
358 //Data panel - export - description “” 356 //Data panel - export - description “”
359 'printingTabDescriptionConfig':[ 357 'printingTabDescriptionConfig':[
360 {tag:'p', html:"<b>Print your data</b>"}, 358 {tag:'p', html:"<b>Print your data</b>"},
361 {tag:'p', html:"Clicking on the link below will open a new window displaying all your cards in a printable format."}, 359 {tag:'p', html:"Clicking on the link below will open a new window displaying all your cards in a printable format."},
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”."} 360 {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”."}
363 ], 361 ],
364 'printingLinkLabel':"Έκδοση Εκτύπωσης", 362 'printingLinkLabel':"Έκδοση Εκτύπωσης",
365 363
366//------------------------------------------------------------------- 364//-------------------------------------------------------------------
367 //Contacts panel 365 //Contacts panel
368 'contactsTabLabel':"Contacts", 366 'contactsTabLabel':"Contacts",
369 'contactsTabTitle':"Contacts", 367 'contactsTabTitle':"Contacts",
370 368
371//------------------------------------------------------------------- 369//-------------------------------------------------------------------
372 //Bookmarklet panel 370 //Bookmarklet panel
373 'bookmarkletTabLabel': "Bookmarklet", 371 'bookmarkletTabLabel': "Bookmarklet",
374 'bookmarkletTabTitle': "Bookmarklet", 372 'bookmarkletTabTitle': "Bookmarklet",
375 373
376 //Bookmarklet panel - description 374 //Bookmarklet panel - description
377 'bookmarkletTabDescriptionConfig':[ 375 'bookmarkletTabDescriptionConfig':[
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."}, 376 {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."},
379 {tag:'p', html:"The Clipperz bookmarklet will help you to quickly create new cards and new “direct logins” within existing cards."}, 377 {tag:'p', html:"The Clipperz bookmarklet will help you to quickly create new cards and new “direct logins” within existing cards."},
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>"}, 378 {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>"},
381 {tag:'div', children:[ 379 {tag:'div', children:[
382 {tag:'p', html:"To install the bookmarklet <b>drag</b> the link below to the bookmark bar of your browser."} 380 {tag:'p', html:"To install the bookmarklet <b>drag</b> the link below to the bookmark bar of your browser."}
383 ]} 381 ]}
384 ], 382 ],
385 'bookmarkletTabBookmarkletTitle':"Προσθήκη στο Clipperz", 383 'bookmarkletTabBookmarkletTitle':"Προσθήκη στο Clipperz",
386 384
387 //Bookmarklet panel - instructions 385 //Bookmarklet panel - instructions
388 'bookmarkletTabInstructionsConfig':[ 386 'bookmarkletTabInstructionsConfig':[
389 {tag:'h3', html:"How to create a new card inclusive of a “direct login” link to an online service"}, 387 {tag:'h3', html:"How to create a new card inclusive of a “direct login” link to an online service"},
390 {tag:'ol', children:[ 388 {tag:'ol', children:[
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)"}]}, 389 {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)"}]},
392 {tag:'li', children:[{tag:'span', html:"Launch the bookmarklet by clicking on it: a pop-up window will appear over the web page."}]}, 390 {tag:'li', children:[{tag:'span', html:"Launch the bookmarklet by clicking on it: a pop-up window will appear over the web page."}]},
393 {tag:'li', children:[{tag:'span', html:"Copy to the clipboard the content of the large text area within the pop-up. (ctrl-C)"}]}, 391 {tag:'li', children:[{tag:'span', html:"Copy to the clipboard the content of the large text area within the pop-up. (ctrl-C)"}]},
394 {tag:'li', children:[{tag:'span', html:"Enter your Clipperz account and click on the <b>Add new card</b> button."}]}, 392 {tag:'li', children:[{tag:'span', html:"Enter your Clipperz account and click on the <b>Add new card</b> button."}]},
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)"}]}, 393 {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)"}]},
396 {tag:'li', children:[{tag:'span', html:"Press the <b>Create</b> button, complete and review the details, then click <b>Save</b>."}]} 394 {tag:'li', children:[{tag:'span', html:"Press the <b>Create</b> button, complete and review the details, then click <b>Save</b>."}]}
397 ]}, 395 ]},
398 {tag:'h3', html:"How to add a “direct login” link to an existing card"}, 396 {tag:'h3', html:"How to add a “direct login” link to an existing card"},
399 {tag:'ol', children:[ 397 {tag:'ol', children:[
400 {tag:'li', children:[{tag:'span', html:"Same as above."}]}, 398 {tag:'li', children:[{tag:'span', html:"Same as above."}]},
401 {tag:'li', children:[{tag:'span', html:"Same as above."}]}, 399 {tag:'li', children:[{tag:'span', html:"Same as above."}]},
402 {tag:'li', children:[{tag:'span', html:"Same as above."}]}, 400 {tag:'li', children:[{tag:'span', html:"Same as above."}]},
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."}]}, 401 {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."}]},
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)"}]}, 402 {tag:'li', children:[{tag:'span', html:"Paste the content of the clipboard to the large text area in the “Direct logins” section. (ctrl-V)"}]},
405 {tag:'li', children:[{tag:'span', html:"Press the <b>Add direct login</b> button, review the details and then click <b>Save</b>."}]} 403 {tag:'li', children:[{tag:'span', html:"Press the <b>Add direct login</b> button, review the details and then click <b>Save</b>."}]}
406 ]}, 404 ]},
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 6879c60..4ecd533 100644
--- a/frontend/beta/js/Clipperz/PM/Strings/Strings_en-CA.js
+++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_en-CA.js
@@ -1,40 +1,38 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26//============================================================================= 24//=============================================================================
27// 25//
28 // E N G L I S H C A N A D I A N ( en_CA ) 26 // E N G L I S H C A N A D I A N ( en_CA )
29// 27//
30//============================================================================= 28//=============================================================================
31 29
32Clipperz.PM.Strings.Languages['en-ca'] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 30Clipperz.PM.Strings.Languages['en-ca'] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], {
33 31
34 // 'forumHeaderLinkLabel': "forum-CA", 32 // 'forumHeaderLinkLabel': "forum-CA",
35 33
36 // 'recordMenuLabel': "cards-CA", 34 // 'recordMenuLabel': "cards-CA",
37 35
38 //------------------------------------------------------------------------- 36 //-------------------------------------------------------------------------
39 __syntaxFix__: "syntax fix" 37 __syntaxFix__: "syntax fix"
40}); \ No newline at end of file 38}); \ 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 f734c8e..af7b6a2 100644
--- a/frontend/beta/js/Clipperz/PM/Strings/Strings_en-GB.js
+++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_en-GB.js
@@ -1,40 +1,38 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26//============================================================================= 24//=============================================================================
27// 25//
28 // E N G L I S H B R I T I S H ( en_GB ) 26 // E N G L I S H B R I T I S H ( en_GB )
29// 27//
30//============================================================================= 28//=============================================================================
31 29
32Clipperz.PM.Strings.Languages['en-gb'] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 30Clipperz.PM.Strings.Languages['en-gb'] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], {
33 31
34 // 'forumHeaderLinkLabel': "forum-GB", 32 // 'forumHeaderLinkLabel': "forum-GB",
35 33
36 // 'recordMenuLabel': "cards-GB", 34 // 'recordMenuLabel': "cards-GB",
37 35
38 //------------------------------------------------------------------------- 36 //-------------------------------------------------------------------------
39 __syntaxFix__: "syntax fix" 37 __syntaxFix__: "syntax fix"
40}); \ No newline at end of file 38}); \ 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 ab1bb0f..97543a4 100644
--- a/frontend/beta/js/Clipperz/PM/Strings/Strings_en-US.js
+++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_en-US.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28if (typeof(Clipperz.PM.Strings) == 'undefined') { Clipperz.PM.Strings = {}; } 26if (typeof(Clipperz.PM.Strings) == 'undefined') { Clipperz.PM.Strings = {}; }
29if (typeof(Clipperz.PM.Strings.Languages) == 'undefined') { Clipperz.PM.Strings.Languages = {}; } 27if (typeof(Clipperz.PM.Strings.Languages) == 'undefined') { Clipperz.PM.Strings.Languages = {}; }
30 28
31//============================================================================= 29//=============================================================================
32// 30//
33 // E N G L I S H A M E R I C A N ( en_US ) 31 // E N G L I S H A M E R I C A N ( en_US )
34// 32//
35//============================================================================= 33//=============================================================================
36 34
37Clipperz.PM.Strings.Languages['en-us'] = { 35Clipperz.PM.Strings.Languages['en-us'] = {
38 36
39 //Login page - description 37 //Login page - description
40'clipperzServiceDescription': "\ 38'clipperzServiceDescription': "\
41 <!-- FIX CSS DONE -->\ 39 <!-- FIX CSS DONE -->\
42 <h2>Keep it to yourself!</h2>\ 40 <h2>Keep it to yourself!</h2>\
43 <ul>\ 41 <ul>\
44 <li>\ 42 <li>\
45 <h3>Clipperz is:</h3>\ 43 <h3>Clipperz is:</h3>\
46 <ul>\ 44 <ul>\
47 <li><p>a secure and simple password manager</p></li>\ 45 <li><p>a secure and simple password manager</p></li>\
48 <li><p>an effective single sign-on solution</p></li>\ 46 <li><p>an effective single sign-on solution</p></li>\
49 <li><p>a digital vault for your personal data</p></li>\ 47 <li><p>a digital vault for your personal data</p></li>\
50 </ul>\ 48 </ul>\
51 </li>\ 49 </li>\
52 <li>\ 50 <li>\
53 <h3>With Clipperz you can:</h3>\ 51 <h3>With Clipperz you can:</h3>\
54 <ul>\ 52 <ul>\
55 <li><p>store and manage your passwords and online credentials</p></li>\ 53 <li><p>store and manage your passwords and online credentials</p></li>\
56 <li><p>login to your web services without entering any username or password</p></li>\ 54 <li><p>login to your web services without entering any username or password</p></li>\
57 <li><p>protect all your sensitive data: codes for burglar alarms, PINs, credit card numbers, …</p></li>\ 55 <li><p>protect all your sensitive data: codes for burglar alarms, PINs, credit card numbers, …</p></li>\
58 <li><p>share secrets with family members and associates (coming soon)</p></li>\ 56 <li><p>share secrets with family members and associates (coming soon)</p></li>\
59 </ul>\ 57 </ul>\
60 </li>\ 58 </li>\
61 <li>\ 59 <li>\
62 <h3>Clipperz benefits:</h3>\ 60 <h3>Clipperz benefits:</h3>\
63 <ul>\ 61 <ul>\
64 <li><p>free and completely anonymous</p></li>\ 62 <li><p>free and completely anonymous</p></li>\
65 <li><p>access it any time from any computer</p></li>\ 63 <li><p>access it any time from any computer</p></li>\
66 <li><p>no software to download and nothing to install</p></li>\ 64 <li><p>no software to download and nothing to install</p></li>\
67 <li><p>avoid keeping secrets on your PC or on paper</p></li>\ 65 <li><p>avoid keeping secrets on your PC or on paper</p></li>\
68 </ul>\ 66 </ul>\
69 </li>\ 67 </li>\
70 <li>\ 68 <li>\
71 <h3>Clipperz security:</h3>\ 69 <h3>Clipperz security:</h3>\
72 <ul>\ 70 <ul>\
73 <li><p>your secrets are locally encrypted by your browser before being uploaded to Clipperz</p></li>\ 71 <li><p>your secrets are locally encrypted by your browser before being uploaded to Clipperz</p></li>\
74 <li><p>the encryption key is a passphrase known only to you</p></li>\ 72 <li><p>the encryption key is a passphrase known only to you</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>\ 73 <li><p>Clipperz hosts your sensitive data in encrypted form and could never actually access the data in its plain form</p></li>\
76 <li><p>Clipperz is built upon standard encryption schemes, nothing fancies or homemade</p></li>\ 74 <li><p>Clipperz is built upon standard encryption schemes, nothing fancies or homemade</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>\ 75 <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>\
78 </ul>\ 76 </ul>\
79 </li>\ 77 </li>\
80 <li>\ 78 <li>\
81 <a href=\"http://www.clipperz.com\" target=\"_blank\">Learn more</a>\ 79 <a href=\"http://www.clipperz.com\" target=\"_blank\">Learn more</a>\
82 </li>\ 80 </li>\
83 </ul>", 81 </ul>",
84 82
85 83
86 'loginFormTitle': "login with your Clipperz account", 84 'loginFormTitle': "login with your Clipperz account",
87 'loginFormUsernameLabel': "username", 85 'loginFormUsernameLabel': "username",
88 'loginFormPassphraseLabel': "passphrase", 86 'loginFormPassphraseLabel': "passphrase",
89 'loginFormDontHaveAnAccountLabel': "don\'t have an account?", 87 'loginFormDontHaveAnAccountLabel': "don\'t have an account?",
90 'loginFormCreateOneLabel': "create one", 88 'loginFormCreateOneLabel': "create one",
91 'loginFormForgotYourCredentialsLabel': "forgot your credentials?", 89 'loginFormForgotYourCredentialsLabel': "forgot your credentials?",
92 'loginFormAarghThatsBadLabel': "aargh! that\'s bad!", 90 'loginFormAarghThatsBadLabel': "aargh! that\'s bad!",
93 'loginFormAfraidOfMaliciousScriptsLabel': "afraid of malicious scripts?", 91 'loginFormAfraidOfMaliciousScriptsLabel': "afraid of malicious scripts?",
94 'loginFormVerifyTheCodeLabel': "verify the code", 92 'loginFormVerifyTheCodeLabel': "verify the code",
95 'loginFormButtonLabel': "Login", 93 'loginFormButtonLabel': "Login",
96 'loginFormOneTimePasswordCheckboxLabel': "use a one-time passphrase", 94 'loginFormOneTimePasswordCheckboxLabel': "use a one-time passphrase",
97'loginFormOneTimePasswordCheckboxDescription': "", 95'loginFormOneTimePasswordCheckboxDescription': "",
98 96
99// Login page - language selection 97// Login page - language selection
100 'loginPanelSwithLanguageDescription': "<h5>Switch to your preferred language</h5>", 98 'loginPanelSwithLanguageDescription': "<h5>Switch to your preferred language</h5>",
101 99
102// Login page - browser compatibility 100// Login page - browser compatibility
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>", 101 '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>",
104 102
105// Login with OTP - message panel 103// Login with OTP - message panel
106 'OTPloginMessagePanelInitialTitle': "Logging in using a one-time passphrase", 104 'OTPloginMessagePanelInitialTitle': "Logging in using a one-time passphrase",
107 'OTPloginMessagePanelInitialText': "Sending OTP credentials …", 105 'OTPloginMessagePanelInitialText': "Sending OTP credentials …",
108 'OTPloginMessagePanelLoadingTitle': "Logging in using a one-time passphrase", 106 'OTPloginMessagePanelLoadingTitle': "Logging in using a one-time passphrase",
109 'OTPloginMessagePanelLoadingText': "Fetching encrypted authentication data from the server …", 107 'OTPloginMessagePanelLoadingText': "Fetching encrypted authentication data from the server …",
110 'OTPloginMessagePanelProcessingTitle': "Logging in using a one-time passphrase", 108 'OTPloginMessagePanelProcessingTitle': "Logging in using a one-time passphrase",
111 'OTPloginMessagePanelProcessingText': "Local decryption of authentication data", 109 'OTPloginMessagePanelProcessingText': "Local decryption of authentication data",
112 110
113// Regular login - message panel 111// Regular login - message panel
114 'loginMessagePanelInitialTitle': "Logging in …", 112 'loginMessagePanelInitialTitle': "Logging in …",
115 'loginMessagePanelInitialText': "---", 113 'loginMessagePanelInitialText': "---",
116 'loginMessagePanelInitialButtonLabel': "Cancel", 114 'loginMessagePanelInitialButtonLabel': "Cancel",
117 'loginMessagePanelConnectedTitle': "Connected", 115 'loginMessagePanelConnectedTitle': "Connected",
118 'loginMessagePanelConnectedText': "Done", 116 'loginMessagePanelConnectedText': "Done",
119 'loginMessagePanelFailureTitle': "Error", 117 'loginMessagePanelFailureTitle': "Error",
120 'loginMessagePanelFailureText': "Login failed", 118 'loginMessagePanelFailureText': "Login failed",
121 'loginMessagePanelFailureButtonLabel': "Close", 119 'loginMessagePanelFailureButtonLabel': "Close",
122 120
123// Regular login - message panel - connection 121// Regular login - message panel - connection
124 'connectionLoginSendingCredentialsMessageTitle': "Verifying credentials", 122 'connectionLoginSendingCredentialsMessageTitle': "Verifying credentials",
125 'connectionLoginSendingCredentialsMessageText': "Sending credentials", 123 'connectionLoginSendingCredentialsMessageText': "Sending credentials",
126 'connectionLoginCredentialsVerificationMessageTitle':"Verifying credentials", 124 'connectionLoginCredentialsVerificationMessageTitle':"Verifying credentials",
127 'connectionLoginCredentialsVerificationMessageText':"Performing SRP authentication", 125 'connectionLoginCredentialsVerificationMessageText':"Performing SRP authentication",
128 'connectionLoginDoneMessageTitle': "Verifying credentials", 126 'connectionLoginDoneMessageTitle': "Verifying credentials",
129 'connectionLoginDoneMessageText': "Connected", 127 'connectionLoginDoneMessageText': "Connected",
130 128
131 //Regular login - message panel - user 129 //Regular login - message panel - user
132 'userLoginPanelUpgradingUserCredentialsMessageTitle': "Verifying credentials", 130 'userLoginPanelUpgradingUserCredentialsMessageTitle': "Verifying credentials",
133 'userLoginPanelUpgradingUserCredentialsMessageText': "Upgrading your credentials to a new authentication schema", 131 'userLoginPanelUpgradingUserCredentialsMessageText': "Upgrading your credentials to a new authentication schema",
134 'userLoginPanelConnectedMessageTitle': "User authenticated", 132 'userLoginPanelConnectedMessageTitle': "User authenticated",
135 'userLoginPanelConnectedMessageText': "Successfully logged in", 133 'userLoginPanelConnectedMessageText': "Successfully logged in",
136 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle': "Verifying credentials", 134 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle': "Verifying credentials",
137 'userLoginPanelTryingAnOlderConnectionSchemaMessageText': "Trying an older authentication schema", 135 'userLoginPanelTryingAnOlderConnectionSchemaMessageText': "Trying an older authentication schema",
138 'userLoginPanelLoadingUserDataMessageTitle': "User authenticated", 136 'userLoginPanelLoadingUserDataMessageTitle': "User authenticated",
139 'userLoginPanelLoadingUserDataMessageText': "Downloading encrypted card headers from Clipperz", 137 'userLoginPanelLoadingUserDataMessageText': "Downloading encrypted card headers from Clipperz",
140 'userLoginPanelDecryptingUserDataMessageTitle': "User authenticated", 138 'userLoginPanelDecryptingUserDataMessageTitle': "User authenticated",
141 'userLoginPanelDecryptingUserDataMessageText': "Local decryption of card headers", 139 'userLoginPanelDecryptingUserDataMessageText': "Local decryption of card headers",
142 'userLoginPanelDecryptingUserStatisticsMessageTitle': "User authenticated", 140 'userLoginPanelDecryptingUserStatisticsMessageTitle': "User authenticated",
143 'userLoginPanelDecryptingUserStatisticsMessageText': "Local decryption of usage statistics", 141 'userLoginPanelDecryptingUserStatisticsMessageText': "Local decryption of usage statistics",
144 142
145 //Registration page - splash alert 143 //Registration page - splash alert
146 'splashAlertTitle':"Welcome to Clipperz!", 144 'splashAlertTitle':"Welcome to Clipperz!",
147'splashAlertText': "\ 145'splashAlertText': "\
148 <!-- FIX CSS DONE! -->\ 146 <!-- FIX CSS DONE! -->\
149 <p>Some security advice</p>\ 147 <p>Some security advice</p>\
150 <ul>\ 148 <ul>\
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>\ 149 <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>\
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>\ 150 <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>\
153 <li><p>Clipperz will not be able to recover a lost passphrase!</p></li>\ 151 <li><p>Clipperz will not be able to recover a lost passphrase!</p></li>\
154 </ul>\ 152 </ul>\
155 <p>For any further information, please refer to <a href=\"http://www.clipperz.com\" target=\"_blank\">Clipperz</a> website.</p>", 153 <p>For any further information, please refer to <a href=\"http://www.clipperz.com\" target=\"_blank\">Clipperz</a> website.</p>",
156 'splashAlertCloseButtonLabel':"Ok", 154 'splashAlertCloseButtonLabel':"Ok",
157 155
158 // Registration page - form 156 // Registration page - form
159 'registrationFormTitle': "create your account", 157 'registrationFormTitle': "create your account",
160 'registrationFormUsernameLabel': "username", 158 'registrationFormUsernameLabel': "username",
161 'registrationFormPassphraseLabel': "passphrase", 159 'registrationFormPassphraseLabel': "passphrase",
162 'registrationFormRetypePassphraseLabel': "re-enter passphrase", 160 'registrationFormRetypePassphraseLabel': "re-enter passphrase",
163 'registrationFormSafetyCheckLabel': "I understand that Clipperz will not be able to recover a lost passphrase.", 161 'registrationFormSafetyCheckLabel': "I understand that Clipperz will not be able to recover a lost passphrase.",
164 'registrationFormTermsOfServiceCheckLabel': "I have read and agreed to the <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Terms of Service</a>.", 162 'registrationFormTermsOfServiceCheckLabel': "I have read and agreed to the <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Terms of Service</a>.",
165 'registrationFormDoYouAlreadyHaveAnAccountLabel': "do you already have an account?", 163 'registrationFormDoYouAlreadyHaveAnAccountLabel': "do you already have an account?",
166 'registrationFormSimplyLoginLabel': "simply login", 164 'registrationFormSimplyLoginLabel': "simply login",
167 'registrationFormButtonLabel': "Register", 165 'registrationFormButtonLabel': "Register",
168 166
169// Registration page - warning messages 167// Registration page - warning messages
170 'registrationFormWarningMessageNotMatchingPassphrases':"Your passphrases don't match, please re-type them.", 168 'registrationFormWarningMessageNotMatchingPassphrases':"Your passphrases don't match, please re-type them.",
171 'registrationFormWarningMessageSafetyCheckNotSelected':"Please read and check all the boxes below.", 169 'registrationFormWarningMessageSafetyCheckNotSelected':"Please read and check all the boxes below.",
172 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"You need to agree to the Terms of Service.", 170 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"You need to agree to the Terms of Service.",
173 171
174 // Registration page - message panel 172 // Registration page - message panel
175 'registrationMessagePanelInitialTitle': "Creating account …", 173 'registrationMessagePanelInitialTitle': "Creating account …",
176 'registrationMessagePanelInitialText': "---", 174 'registrationMessagePanelInitialText': "---",
177 'registrationMessagePanelInitialButtonLabel': "Cancel", 175 'registrationMessagePanelInitialButtonLabel': "Cancel",
178 'registrationMessagePanelRegistrationDoneTitle': "Registration", 176 'registrationMessagePanelRegistrationDoneTitle': "Registration",
179 'registrationMessagePanelRegistrationDoneText': "Done", 177 'registrationMessagePanelRegistrationDoneText': "Done",
180 'registrationMessagePanelFailureTitle': "Registration failed", 178 'registrationMessagePanelFailureTitle': "Registration failed",
181 'registrationMessagePanelFailureButtonLabel': "Close", 179 'registrationMessagePanelFailureButtonLabel': "Close",
182 180
183// Registration page - message panel - connection 181// Registration page - message panel - connection
184 'connectionRegistrationSendingRequestMessageText': "Verifying credentials", 182 'connectionRegistrationSendingRequestMessageText': "Verifying credentials",
185 'connectionRegistrationSendingCredentialsMessageText':"Sending credentials", 183 'connectionRegistrationSendingCredentialsMessageText':"Sending credentials",
186 184
187// Registration page - splash panel 185// Registration page - splash panel
188 'registrationSplashPanelTitle': "Security advice", 186 'registrationSplashPanelTitle': "Security advice",
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>", 187 'registrationSplashPanelDescription': "<p>These are your Clipperz credentials, take good care of them. Clipperz will never display your username and passphrase a second time!</p>",
190 'registrationSplashPanelUsernameLabel': "username", 188 'registrationSplashPanelUsernameLabel': "username",
191 'registrationSplashPanelPassphraseLabel':"passphrase", 189 'registrationSplashPanelPassphraseLabel':"passphrase",
192 190
193 'registrationSplashPanelShowPassphraseButtonLabel':"show passphrase", 191 'registrationSplashPanelShowPassphraseButtonLabel':"show passphrase",
194 192
195 //Header links 193 //Header links
196 'donateHeaderLinkLabel': "donate", 194 'donateHeaderLinkLabel': "donate",
197 'creditsHeaderLinkLabel': "credits", 195 'creditsHeaderLinkLabel': "credits",
198 'feedbackHeaderLinkLabel': "feedback", 196 'feedbackHeaderLinkLabel': "feedback",
199 'helpHeaderLinkLabel': "help", 197 'helpHeaderLinkLabel': "help",
200 'forumHeaderLinkLabel': "forum", 198 'forumHeaderLinkLabel': "forum",
201 199
202 //Menu labels 200 //Menu labels
203 'recordMenuLabel': "cards", 201 'recordMenuLabel': "cards",
204 'accountMenuLabel': "account", 202 'accountMenuLabel': "account",
205 'dataMenuLabel': "data", 203 'dataMenuLabel': "data",
206 'contactsMenuLabel': "contacts", 204 'contactsMenuLabel': "contacts",
207 'toolsMenuLabel': "tools", 205 'toolsMenuLabel': "tools",
208 'logoutMenuLabel': "logout", 206 'logoutMenuLabel': "logout",
209 'lockMenuLabel': "lock", 207 'lockMenuLabel': "lock",
210 208
211 //Lock dialog 209 //Lock dialog
212 'lockTitle': "The account is locked", 210 'lockTitle': "The account is locked",
213 'lockDescription': "<p>To unlock your account, please enter your passphrase.</p>", 211 'lockDescription': "<p>To unlock your account, please enter your passphrase.</p>",
214 'unlockButtonLabel': "Unlock", 212 'unlockButtonLabel': "Unlock",
215 213
216 //Account panel - change passphrase 214 //Account panel - change passphrase
217 'changePasswordTabLabel': "Change your passphrase", 215 'changePasswordTabLabel': "Change your passphrase",
218 'changePasswordTabTitle': "Change your passphrase", 216 'changePasswordTabTitle': "Change your passphrase",
219 217
220 'changePasswordFormUsernameLabel': "username", 218 'changePasswordFormUsernameLabel': "username",
221 'changePasswordFormOldPassphraseLabel': "old passphrase", 219 'changePasswordFormOldPassphraseLabel': "old passphrase",
222 'changePasswordFormNewPassphraseLabel': "new passphrase", 220 'changePasswordFormNewPassphraseLabel': "new passphrase",
223 'changePasswordFormRetypePassphraseLabel':"re-enter new passphrase", 221 'changePasswordFormRetypePassphraseLabel':"re-enter new passphrase",
224 'changePasswordFormSafetyCheckboxLabel':"I understand that Clipperz will not be able to recover a lost passphrase.", 222 'changePasswordFormSafetyCheckboxLabel':"I understand that Clipperz will not be able to recover a lost passphrase.",
225 'changePasswordFormSubmitLabel': "Change passphrase", 223 'changePasswordFormSubmitLabel': "Change passphrase",
226 224
227 //Account panel - change passphrase - warning messages 225 //Account panel - change passphrase - warning messages
228 'changePasswordFormWrongUsernameWarning': "Wrong username", 226 'changePasswordFormWrongUsernameWarning': "Wrong username",
229 'changePasswordFormWrongPassphraseWarning': "Wrong passphrase", 227 'changePasswordFormWrongPassphraseWarning': "Wrong passphrase",
230 'changePasswordFormWrongRetypePassphraseWarning':"Your passphrases don't match, please re-type them.", 228 'changePasswordFormWrongRetypePassphraseWarning':"Your passphrases don't match, please re-type them.",
231 'changePasswordFormSafetyCheckWarning': "Please read and check the box below.", 229 'changePasswordFormSafetyCheckWarning': "Please read and check the box below.",
232 230
233 //Account panel - change passphrase - progress dialog 231 //Account panel - change passphrase - progress dialog
234 'changePasswordFormProgressDialogTitle': "Changing user credentials", 232 'changePasswordFormProgressDialogTitle': "Changing user credentials",
235 'changePasswordFormProgressDialogEmptyText': "---", 233 'changePasswordFormProgressDialogEmptyText': "---",
236 'changePasswordFormProgressDialogConnectedMessageTitle': "Connected", 234 'changePasswordFormProgressDialogConnectedMessageTitle': "Connected",
237 'changePasswordFormProgressDialogConnectedMessageText': "Done", 235 'changePasswordFormProgressDialogConnectedMessageText': "Done",
238 'changePasswordFormProgressDialogErrorMessageTitle': "Error", 236 'changePasswordFormProgressDialogErrorMessageTitle': "Error",
239 'changePasswordFormProgressDialogErrorMessageText': "Credentials change failed!", 237 'changePasswordFormProgressDialogErrorMessageText': "Credentials change failed!",
240 238
241 'changeCredentialsPanelEncryptingDataMessageTitle': "Changing your passphrase", 239 'changeCredentialsPanelEncryptingDataMessageTitle': "Changing your passphrase",
242 'changeCredentialsPanelEncryptingDataMessageText': "Local encryption of card headers", 240 'changeCredentialsPanelEncryptingDataMessageText': "Local encryption of card headers",
243 'changeCredentialsPanelCreatingNewCredentialsMessageTitle': "Changing your passphrase", 241 'changeCredentialsPanelCreatingNewCredentialsMessageTitle': "Changing your passphrase",
244 'changeCredentialsPanelCreatingNewCredentialsMessageText': "Updating your credentials", 242 'changeCredentialsPanelCreatingNewCredentialsMessageText': "Updating your credentials",
245 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Changing your passphrase", 243 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Changing your passphrase",
246 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Uploading your encrypted credentials to Clipperz", 244 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Uploading your encrypted credentials to Clipperz",
247 'changeCredentialsPanelDoneMessageTitle': "Changing your passphrase", 245 'changeCredentialsPanelDoneMessageTitle': "Changing your passphrase",
248 'changeCredentialsPanelDoneMessageText': "Done", 246 'changeCredentialsPanelDoneMessageText': "Done",
249 247
250 //Account panel - OTP 248 //Account panel - OTP
251 'manageOTPTabLabel': "Manage your one-time passphrases", 249 'manageOTPTabLabel': "Manage your one-time passphrases",
252 'manageOTPTabTitle': "Manage your one-time passphrases", 250 'manageOTPTabTitle': "Manage your one-time passphrases",
253 251
254 'manageOTPTabDescription':"\ 252 'manageOTPTabDescription':"\
255 <p>A one-time passphrase works like your regular passphrase, but can be used only once.</p>\ 253 <p>A one-time passphrase works like your regular passphrase, but can be used only once.</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>\ 254 <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>\
257 <p>Immediately after a successful login, your one-time passphrase will be deleted preventing any fraudulent access.</p>\ 255 <p>Immediately after a successful login, your one-time passphrase will be deleted preventing any fraudulent access.</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>\ 256 <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>\
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>", 257 <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>",
260 258
261 //Account panel - OTP - OTP table 259 //Account panel - OTP - OTP table
262'oneTimePasswordReadOnlyMessage': "\ 260'oneTimePasswordReadOnlyMessage': "\
263 <h6>Sorry!</h6>\ 261 <h6>Sorry!</h6>\
264 <p>You cannot manage your one-time passphrases when using the offline version of Clipperz.</p>", 262 <p>You cannot manage your one-time passphrases when using the offline version of Clipperz.</p>",
265 263
266 'oneTimePasswordLoadingMessage':"\ 264 'oneTimePasswordLoadingMessage':"\
267 <h6>Loading data</h6>\ 265 <h6>Loading data</h6>\
268 <p>Please wait …</p>", 266 <p>Please wait …</p>",
269 267
270 'oneTimePasswordNoPasswordAvailable':"\ 268 'oneTimePasswordNoPasswordAvailable':"\
271 <h6>No one-time passphrase available</h6>\ 269 <h6>No one-time passphrase available</h6>\
272 <p>Click the “New” button above to add one-time passphrases to your account.</p>", 270 <p>Click the “New” button above to add one-time passphrases to your account.</p>",
273 271
274 'createNewOTPButtonLabel': "New", 272 'createNewOTPButtonLabel': "New",
275 'deleteOTPButtonLabel': "Delete", 273 'deleteOTPButtonLabel': "Delete",
276 'printOTPButtonLabel': "Print", 274 'printOTPButtonLabel': "Print",
277 275
278 'disabledOneTimePassword_warning': "disabled", 276 'disabledOneTimePassword_warning': "disabled",
279 277
280 'oneTimePasswordSelectionLink_selectLabel':"Select:", 278 'oneTimePasswordSelectionLink_selectLabel':"Select:",
281 'oneTimePasswordSelectionLink_all': "all", 279 'oneTimePasswordSelectionLink_all': "all",
282 'oneTimePasswordSelectionLink_none': "none", 280 'oneTimePasswordSelectionLink_none': "none",
283 'oneTimePasswordSelectionLink_used': "used", 281 'oneTimePasswordSelectionLink_used': "used",
284 'oneTimePasswordSelectionLink_unused': "unused", 282 'oneTimePasswordSelectionLink_unused': "unused",
285 283
286//Account panel - OTP - saving new OTP dialog 284//Account panel - OTP - saving new OTP dialog
287 'saveOTP_encryptUserDataTitle': "Saving one-time passphrase", 285 'saveOTP_encryptUserDataTitle': "Saving one-time passphrase",
288 'saveOTP_encryptUserDataText': "Processing new OTP credentials …", 286 'saveOTP_encryptUserDataText': "Processing new OTP credentials …",
289 'saveOTP_encryptOTPDataTitle': "Saving one-time passphrase", 287 'saveOTP_encryptOTPDataTitle': "Saving one-time passphrase",
290 'saveOTP_encryptOTPDataText': "Local encryption of authentication data …", 288 'saveOTP_encryptOTPDataText': "Local encryption of authentication data …",
291 'saveOTP_sendingDataTitle': "Saving one-time passphrase", 289 'saveOTP_sendingDataTitle': "Saving one-time passphrase",
292 'saveOTP_sendingDataText': "Sending authentication data to the server …", 290 'saveOTP_sendingDataText': "Sending authentication data to the server …",
293 'saveOTP_updatingInterfaceTitle': "Saving one-time passphrase", 291 'saveOTP_updatingInterfaceTitle': "Saving one-time passphrase",
294 'saveOTP_updatingInterfaceText': "Updating interface", 292 'saveOTP_updatingInterfaceText': "Updating interface",
295 293
296// Account panel - preferences 294// Account panel - preferences
297 'accountPreferencesLabel': "Preferences", 295 'accountPreferencesLabel': "Preferences",
298 'accountPreferencesTabTitle': "Preferences", 296 'accountPreferencesTabTitle': "Preferences",
299 297
300 'accountPreferencesLanguageTitle': "Language", 298 'accountPreferencesLanguageTitle': "Language",
301 'accountPreferencesLanguageDescription':"<p>Choose your preferred language from the list below.</p>", 299 'accountPreferencesLanguageDescription':"<p>Choose your preferred language from the list below.</p>",
302 300
303 'showDonationReminderPanelTitle': "Donation reminders", 301 'showDonationReminderPanelTitle': "Donation reminders",
304 'showDonationReminderPanelDescription': "<p>Show donation reminders</p>", 302 'showDonationReminderPanelDescription': "<p>Show donation reminders</p>",
305 303
306 'saveUserPreferencesFormSubmitLabel': "Save", 304 'saveUserPreferencesFormSubmitLabel': "Save",
307 'cancelUserPreferencesFormSubmitLabel': "Cancel", 305 'cancelUserPreferencesFormSubmitLabel': "Cancel",
308 306
309// Account panel - preferences - saving dialog 307// Account panel - preferences - saving dialog
310 'accountPreferencesSavingPanelTitle_Step1': "Saving preferences", 308 'accountPreferencesSavingPanelTitle_Step1': "Saving preferences",
311 'accountPreferencesSavingPanelText_Step1': "Local encryption of your preferences", 309 'accountPreferencesSavingPanelText_Step1': "Local encryption of your preferences",
312 'accountPreferencesSavingPanelTitle_Step2': "Saving preferences", 310 'accountPreferencesSavingPanelTitle_Step2': "Saving preferences",
313 'accountPreferencesSavingPanelText_Step2': "Sending encrypted preferences to Clipperz", 311 'accountPreferencesSavingPanelText_Step2': "Sending encrypted preferences to Clipperz",
314 312
315 //Account panel - login history 313 //Account panel - login history
316 'accountLoginHistoryLabel': "Login history", 314 'accountLoginHistoryLabel': "Login history",
317 'loginHistoryTabTitle': "Login history", 315 'loginHistoryTabTitle': "Login history",
318 316
319 'loginHistoryReadOnlyMessage': "\ 317 'loginHistoryReadOnlyMessage': "\
320 <h6>Sorry!</h6>\ 318 <h6>Sorry!</h6>\
321 <p>The login history is not available while using the offline version of Clipperz.</p>", 319 <p>The login history is not available while using the offline version of Clipperz.</p>",
322 320
323 'loginHistoryLoadingMessage': "\ 321 'loginHistoryLoadingMessage': "\
324 <h6>Loading data</h6>\ 322 <h6>Loading data</h6>\
325 <p>Please wait …</p>", 323 <p>Please wait …</p>",
326 324
327 'loginHistoryLoadedMessage': "\ 325 'loginHistoryLoadedMessage': "\
328 <h6>Your latest 10 logins</h6>\ 326 <h6>Your latest 10 logins</h6>\
329 <p></p>", 327 <p></p>",
330 328
331 'loginHistoryIPLabel': "IP", 329 'loginHistoryIPLabel': "IP",
332 'loginHistoryTimeLabel': "date", 330 'loginHistoryTimeLabel': "date",
333 'loginHistoryCurrentSessionText': "current session", 331 'loginHistoryCurrentSessionText': "current session",
334 'loginHistoryReloadButtonLabel': "Reload login history", 332 'loginHistoryReloadButtonLabel': "Reload login history",
335 333
336 //Account panel - delete account 334 //Account panel - delete account
337 'deleteAccountTabLabel': "Delete your account", 335 'deleteAccountTabLabel': "Delete your account",
338 'deleteAccountTabTitle': "Delete your account", 336 'deleteAccountTabTitle': "Delete your account",
339 337
340 'deleteAccountFormUsernameLabel': "username", 338 'deleteAccountFormUsernameLabel': "username",
341 'deleteAccountFormPassphraseLabel': "passphrase", 339 'deleteAccountFormPassphraseLabel': "passphrase",
342 'deleteAccountFormSafetyCheckboxLabel': "I understand that all my data will be deleted and that this action is irreversible.", 340 'deleteAccountFormSafetyCheckboxLabel': "I understand that all my data will be deleted and that this action is irreversible.",
343 'deleteAccountFormSubmitLabel': "Delete my account", 341 'deleteAccountFormSubmitLabel': "Delete my account",
344 342
345//Account panel - delete account - warnings 343//Account panel - delete account - warnings
346 'deleteAccountFormWrongUsernameWarning':"Wrong username", 344 'deleteAccountFormWrongUsernameWarning':"Wrong username",
347 'deleteAccountFormWrongPassphraseWarning':"Wrong passphrase", 345 'deleteAccountFormWrongPassphraseWarning':"Wrong passphrase",
348 'deleteAccountFormSafetyCheckWarning': "Please read and check the box below.", 346 'deleteAccountFormSafetyCheckWarning': "Please read and check the box below.",
349 347
350//Account panel - delete account - confirmation 348//Account panel - delete account - confirmation
351 'accountPanelDeletingAccountPanelConfirmationTitle':"ATTENTION", 349 'accountPanelDeletingAccountPanelConfirmationTitle':"ATTENTION",
352 'accountPanelDeleteAccountPanelConfirmationText': "Are your sure you want to delete your account?", 350 'accountPanelDeleteAccountPanelConfirmationText': "Are your sure you want to delete your account?",
353 'accountPanelDeleteAccountPanelConfirmButtonLabel': "Yes", 351 'accountPanelDeleteAccountPanelConfirmButtonLabel': "Yes",
354 'accountPanelDeleteAccountPanelDenyButtonLabel': "No", 352 'accountPanelDeleteAccountPanelDenyButtonLabel': "No",
355 353
356//Account panel - delete account - confirmation 354//Account panel - delete account - confirmation
357 'accountPanelDeletingAccountPanelProgressTitle': "Deleting the account data", 355 'accountPanelDeletingAccountPanelProgressTitle': "Deleting the account data",
358 'accountPanelDeletingAccountPanelProgressText': "The operation could take long, please be patient.", 356 'accountPanelDeletingAccountPanelProgressText': "The operation could take long, please be patient.",
359 357
360//Data panel - offline copy 358//Data panel - offline copy
361 'offlineCopyTabLabel': "Offline copy", 359 'offlineCopyTabLabel': "Offline copy",
362 'offlineCopyTabTitle': "Offline copy", 360 'offlineCopyTabTitle': "Offline copy",
363 361
364'offlineCopyTabDescription': "\ 362'offlineCopyTabDescription': "\
365 <!-- FIX CSS DONE! -->\ 363 <!-- FIX CSS DONE! -->\
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>\ 364 <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>\
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>\ 365 <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>\
368 <ol>\ 366 <ol>\
369 <li><p>Click the link below to start the download.</p></li>\ 367 <li><p>Click the link below to start the download.</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>\ 368 <li><p>The browser will ask you what to do with the “Clipperz_YYYYMMDD.html” file. Save it on your hard disk.</p></li>\
371 <li><p>Double click on the downloaded file to launch the offline version in your browser.</p></li>\ 369 <li><p>Double click on the downloaded file to launch the offline version in your browser.</p></li>\
372 <li><p>Enter the usual username and passphrase.</p></li>\ 370 <li><p>Enter the usual username and passphrase.</p></li>\
373 </ol>", 371 </ol>",
374 372
375 'offlineCopyDownloadLinkLabel': "Download", 373 'offlineCopyDownloadLinkLabel': "Download",
376 374
377 //Data panel - offline copy - not updated 375 //Data panel - offline copy - not updated
378 'offlineCopyDownloadWarning': "\ 376 'offlineCopyDownloadWarning': "\
379 <!-- FIX CSS DONE! -->\ 377 <!-- FIX CSS DONE! -->\
380 <h4><a href=\"#\" id=\"offlineCopyDownloadWarningLink\">Update your “offline copy”!</a></h4>\ 378 <h4><a href=\"#\" id=\"offlineCopyDownloadWarningLink\">Update your “offline copy”!</a></h4>\
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>", 379 <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>",
382 380
383 'offlineCopyDownloadOk': "", 381 'offlineCopyDownloadOk': "",
384 382
385 //Data panel - sharing 383 //Data panel - sharing
386 'sharingTabLabel': "Sharing", 384 'sharingTabLabel': "Sharing",
387 'sharingTabTitle': "Sharing", 385 'sharingTabTitle': "Sharing",
388 386
389 'sharingTabDescription': "\ 387 'sharingTabDescription': "\
390 <p>Quite often a confidential piece of information needs to be shared with one or more persons.</p>\ 388 <p>Quite often a confidential piece of information needs to be shared with one or more persons.</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>\ 389 <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>\
392 <p>Clipperz can make sharing your secrets a secure and straightforward process.</p>\ 390 <p>Clipperz can make sharing your secrets a secure and straightforward process.</p>\
393 <p></p>\ 391 <p></p>\
394 <p><b>Coming soon …</b></p>", 392 <p><b>Coming soon …</b></p>",
395 393
396 // Data panel - import 394 // Data panel - import
397 'importTabLabel': "Import", 395 'importTabLabel': "Import",
398 'importTabTitle': "Import", 396 'importTabTitle': "Import",
399 397
400 'importTabDescription': "<p>You can bulk import data to your Clipperz account from several file formats.</p>", 398 'importTabDescription': "<p>You can bulk import data to your Clipperz account from several file formats.</p>",
401 399
402 //Data panel - export 400 //Data panel - export
403 'printingTabLabel': "Export", 401 'printingTabLabel': "Export",
404 'printingTabTitle': "Export", 402 'printingTabTitle': "Export",
405 403
406 'printingTabDescription': "\ 404 'printingTabDescription': "\
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 57286fe..2090913 100644
--- a/frontend/beta/js/Clipperz/PM/Strings/Strings_es-ES.js
+++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_es-ES.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26Clipperz.PM.Strings.Languages['es-ES'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 24Clipperz.PM.Strings.Languages['es-ES'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], {
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> ", 25 '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> ",
28 'loginFormTitle':"ingrese con su usuario Clipperz", 26 'loginFormTitle':"ingrese con su usuario Clipperz",
29 'loginFormUsernameLabel':"usuario", 27 'loginFormUsernameLabel':"usuario",
30 'loginFormPassphraseLabel':"frase clave", 28 'loginFormPassphraseLabel':"frase clave",
31 'loginFormDontHaveAnAccountLabel':"¿no tiene una cuenta?", 29 'loginFormDontHaveAnAccountLabel':"¿no tiene una cuenta?",
32 'loginFormCreateOneLabel':"crear una", 30 'loginFormCreateOneLabel':"crear una",
33 'loginFormForgotYourCredentialsLabel':"¿perdió sus credenciales?", 31 'loginFormForgotYourCredentialsLabel':"¿perdió sus credenciales?",
34 'loginFormAarghThatsBadLabel':"¡Ahhh! ¡eso es malo!", 32 'loginFormAarghThatsBadLabel':"¡Ahhh! ¡eso es malo!",
35 'loginFormAfraidOfMaliciousScriptsLabel':"¿evitar scripts maliciosos?", 33 'loginFormAfraidOfMaliciousScriptsLabel':"¿evitar scripts maliciosos?",
36 'loginFormVerifyTheCodeLabel':"verificar el código", 34 'loginFormVerifyTheCodeLabel':"verificar el código",
37 'loginFormButtonLabel':"Ingresar", 35 'loginFormButtonLabel':"Ingresar",
38 'loginFormOneTimePasswordCheckboxLabel':"usar una frase clave desechable", 36 'loginFormOneTimePasswordCheckboxLabel':"usar una frase clave desechable",
39 'loginPanelSwithLanguageDescription':"<h5>Cambiar a su lenguaje preferido</h5> ", 37 'loginPanelSwithLanguageDescription':"<h5>Cambiar a su lenguaje preferido</h5> ",
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> ", 38 '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> ",
41 'OTPloginMessagePanelInitialTitle':"Ingresar usando una frase clave desechable", 39 'OTPloginMessagePanelInitialTitle':"Ingresar usando una frase clave desechable",
42 'OTPloginMessagePanelInitialText':"Enviando credenciales OTP ...", 40 'OTPloginMessagePanelInitialText':"Enviando credenciales OTP ...",
43 'OTPloginMessagePanelLoadingTitle':"Ingresar usando una frase clave desechable", 41 'OTPloginMessagePanelLoadingTitle':"Ingresar usando una frase clave desechable",
44 'OTPloginMessagePanelLoadingText':"Descargando datos de autenticación encriptados desde el servidor ...", 42 'OTPloginMessagePanelLoadingText':"Descargando datos de autenticación encriptados desde el servidor ...",
45 'OTPloginMessagePanelProcessingTitle':"Ingresar usando una frase clave desechable", 43 'OTPloginMessagePanelProcessingTitle':"Ingresar usando una frase clave desechable",
46 'OTPloginMessagePanelProcessingText':"Desencriptación local de datos de autenticación ...", 44 'OTPloginMessagePanelProcessingText':"Desencriptación local de datos de autenticación ...",
47 'loginMessagePanelInitialTitle':"Ingresando ...", 45 'loginMessagePanelInitialTitle':"Ingresando ...",
48 'loginMessagePanelInitialButtonLabel':"Cancelar", 46 'loginMessagePanelInitialButtonLabel':"Cancelar",
49 'loginMessagePanelConnectedTitle':"Conectado", 47 'loginMessagePanelConnectedTitle':"Conectado",
50 'loginMessagePanelConnectedText':"Hecho", 48 'loginMessagePanelConnectedText':"Hecho",
51 'loginMessagePanelFailureTitle':"Error", 49 'loginMessagePanelFailureTitle':"Error",
52 'loginMessagePanelFailureText':"Ingreso fallido", 50 'loginMessagePanelFailureText':"Ingreso fallido",
53 'loginMessagePanelFailureButtonLabel':"Cerrar", 51 'loginMessagePanelFailureButtonLabel':"Cerrar",
54 'connectionLoginSendingCredentialsMessageTitle':"Verificando credenciales", 52 'connectionLoginSendingCredentialsMessageTitle':"Verificando credenciales",
55 'connectionLoginSendingCredentialsMessageText':"Enviando credenciales", 53 'connectionLoginSendingCredentialsMessageText':"Enviando credenciales",
56 'connectionLoginCredentialsVerificationMessageTitle':"Verificando credenciales", 54 'connectionLoginCredentialsVerificationMessageTitle':"Verificando credenciales",
57 'connectionLoginCredentialsVerificationMessageText':"Realizando una autenticación SRP", 55 'connectionLoginCredentialsVerificationMessageText':"Realizando una autenticación SRP",
58 'connectionLoginDoneMessageTitle':"Verificando credenciales", 56 'connectionLoginDoneMessageTitle':"Verificando credenciales",
59 'connectionLoginDoneMessageText':"Conectado", 57 'connectionLoginDoneMessageText':"Conectado",
60 'userLoginPanelUpgradingUserCredentialsMessageTitle':"Verificando credenciales", 58 'userLoginPanelUpgradingUserCredentialsMessageTitle':"Verificando credenciales",
61 'userLoginPanelUpgradingUserCredentialsMessageText':"Actualizando sus credenciales al nuevo esquema de autenticación", 59 'userLoginPanelUpgradingUserCredentialsMessageText':"Actualizando sus credenciales al nuevo esquema de autenticación",
62 'userLoginPanelConnectedMessageTitle':"Usuario autenticado", 60 'userLoginPanelConnectedMessageTitle':"Usuario autenticado",
63 'userLoginPanelConnectedMessageText':"Exitosamente logueado", 61 'userLoginPanelConnectedMessageText':"Exitosamente logueado",
64 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"Verifying credentials", 62 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"Verifying credentials",
65 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"Probando un esquema de autenticación antiguo", 63 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"Probando un esquema de autenticación antiguo",
66 'userLoginPanelLoadingUserDataMessageTitle':"Usuario autenticado", 64 'userLoginPanelLoadingUserDataMessageTitle':"Usuario autenticado",
67 'userLoginPanelLoadingUserDataMessageText':"Descargando encabezamientos encriptados desde Clipperz", 65 'userLoginPanelLoadingUserDataMessageText':"Descargando encabezamientos encriptados desde Clipperz",
68 'userLoginPanelDecryptingUserDataMessageTitle':"Usuario autenticado", 66 'userLoginPanelDecryptingUserDataMessageTitle':"Usuario autenticado",
69 'userLoginPanelDecryptingUserDataMessageText':"Desencriptación local de datos", 67 'userLoginPanelDecryptingUserDataMessageText':"Desencriptación local de datos",
70 'userLoginPanelDecryptingUserStatisticsMessageTitle':"Usuario autenticado", 68 'userLoginPanelDecryptingUserStatisticsMessageTitle':"Usuario autenticado",
71 'userLoginPanelDecryptingUserStatisticsMessageText':"Desencriptación local de estadísticas de uso", 69 'userLoginPanelDecryptingUserStatisticsMessageText':"Desencriptación local de estadísticas de uso",
72 'splashAlertTitle':"¡Bienvenido a Clipperz!", 70 'splashAlertTitle':"¡Bienvenido a Clipperz!",
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> ", 71 '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> ",
74 'splashAlertCloseButtonLabel':"Aceptar", 72 'splashAlertCloseButtonLabel':"Aceptar",
75 'registrationFormTitle':"Abrir su cuenta", 73 'registrationFormTitle':"Abrir su cuenta",
76 'registrationFormUsernameLabel':"usuario", 74 'registrationFormUsernameLabel':"usuario",
77 'registrationFormPassphraseLabel':"frase clave", 75 'registrationFormPassphraseLabel':"frase clave",
78 'registrationFormRetypePassphraseLabel':"reingrese la frase clave", 76 'registrationFormRetypePassphraseLabel':"reingrese la frase clave",
79 'registrationFormSafetyCheckLabel':"Yo entiendo que Clipperz no me permite recuperar frases clave perdidas", 77 'registrationFormSafetyCheckLabel':"Yo entiendo que Clipperz no me permite recuperar frases clave perdidas",
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>.", 78 '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>.",
81 'registrationFormDoYouAlreadyHaveAnAccountLabel':"¿usted ya tiene una cuenta?", 79 'registrationFormDoYouAlreadyHaveAnAccountLabel':"¿usted ya tiene una cuenta?",
82 'registrationFormSimplyLoginLabel':"ingreso simple", 80 'registrationFormSimplyLoginLabel':"ingreso simple",
83 'registrationFormButtonLabel':"Registrarse", 81 'registrationFormButtonLabel':"Registrarse",
84 'registrationFormWarningMessageNotMatchingPassphrases':"Su frase clave no coincide, por favor reescríbala.", 82 'registrationFormWarningMessageNotMatchingPassphrases':"Su frase clave no coincide, por favor reescríbala.",
85 'registrationFormWarningMessageSafetyCheckNotSelected':"Por favor, lea y chequee todas las casillas debajo.", 83 'registrationFormWarningMessageSafetyCheckNotSelected':"Por favor, lea y chequee todas las casillas debajo.",
86 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"Usted necesita estar de acuerdo con los Términos de Servicio.", 84 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"Usted necesita estar de acuerdo con los Términos de Servicio.",
87 'registrationMessagePanelInitialTitle':"Creando cuenta ...", 85 'registrationMessagePanelInitialTitle':"Creando cuenta ...",
88 'registrationMessagePanelInitialButtonLabel':"Cancelar", 86 'registrationMessagePanelInitialButtonLabel':"Cancelar",
89 'registrationMessagePanelRegistrationDoneTitle':"Registración", 87 'registrationMessagePanelRegistrationDoneTitle':"Registración",
90 'registrationMessagePanelRegistrationDoneText':"Hecho", 88 'registrationMessagePanelRegistrationDoneText':"Hecho",
91 'registrationMessagePanelFailureTitle':"Registración fallada", 89 'registrationMessagePanelFailureTitle':"Registración fallada",
92 'registrationMessagePanelFailureButtonLabel':"Cerrar", 90 'registrationMessagePanelFailureButtonLabel':"Cerrar",
93 'connectionRegistrationSendingRequestMessageText':"Verificando credenciales", 91 'connectionRegistrationSendingRequestMessageText':"Verificando credenciales",
94 'connectionRegistrationSendingCredentialsMessageText':"Enviando credenciales", 92 'connectionRegistrationSendingCredentialsMessageText':"Enviando credenciales",
95 'registrationSplashPanelTitle':"Aviso de seguridad", 93 'registrationSplashPanelTitle':"Aviso de seguridad",
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> ", 94 '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> ",
97 'registrationSplashPanelUsernameLabel':"usuario", 95 'registrationSplashPanelUsernameLabel':"usuario",
98 'registrationSplashPanelPassphraseLabel':"frase clave", 96 'registrationSplashPanelPassphraseLabel':"frase clave",
99 'registrationSplashPanelShowPassphraseButtonLabel':" mostrar frase clave", 97 'registrationSplashPanelShowPassphraseButtonLabel':" mostrar frase clave",
100 'donateHeaderLinkLabel':"donaciones", 98 'donateHeaderLinkLabel':"donaciones",
101 'creditsHeaderLinkLabel':"créditos", 99 'creditsHeaderLinkLabel':"créditos",
102 'feedbackHeaderLinkLabel':"contacto", 100 'feedbackHeaderLinkLabel':"contacto",
103 'helpHeaderLinkLabel':"ayuda", 101 'helpHeaderLinkLabel':"ayuda",
104 'forumHeaderLinkLabel':"foro", 102 'forumHeaderLinkLabel':"foro",
105 'recordMenuLabel':"tarjetas", 103 'recordMenuLabel':"tarjetas",
106 'accountMenuLabel':"cuenta", 104 'accountMenuLabel':"cuenta",
107 'dataMenuLabel':"datos", 105 'dataMenuLabel':"datos",
108 'contactsMenuLabel':"contactos", 106 'contactsMenuLabel':"contactos",
109 'toolsMenuLabel':"herramientas", 107 'toolsMenuLabel':"herramientas",
110 'logoutMenuLabel':"salir", 108 'logoutMenuLabel':"salir",
111 'lockMenuLabel':"bloquear", 109 'lockMenuLabel':"bloquear",
112 'lockTitle':"La cuenta está bloqueada", 110 'lockTitle':"La cuenta está bloqueada",
113 'lockDescriptionConfig':"<p>Para desbloquear su cuenta, por favor ingrese su frase clave</p> ", 111 'lockDescriptionConfig':"<p>Para desbloquear su cuenta, por favor ingrese su frase clave</p> ",
114 'unlockButtonLabel':"desbloquear", 112 'unlockButtonLabel':"desbloquear",
115 'changePasswordTabLabel':"Cambiar su frase clave", 113 'changePasswordTabLabel':"Cambiar su frase clave",
116 'changePasswordTabTitle':"Cambiar su frase clave", 114 'changePasswordTabTitle':"Cambiar su frase clave",
117 'changePasswordFormUsernameLabel':"usuario", 115 'changePasswordFormUsernameLabel':"usuario",
118 'changePasswordFormOldPassphraseLabel':"frase clave anterior", 116 'changePasswordFormOldPassphraseLabel':"frase clave anterior",
119 'changePasswordFormNewPassphraseLabel':"nueva frase clave", 117 'changePasswordFormNewPassphraseLabel':"nueva frase clave",
120 'changePasswordFormRetypePassphraseLabel':"reingrese su nueva frase clave", 118 'changePasswordFormRetypePassphraseLabel':"reingrese su nueva frase clave",
121 'changePasswordFormSafetyCheckboxLabel':"Yo entiendo que Clipperz no me permite recuperar una frase clave perdida.", 119 'changePasswordFormSafetyCheckboxLabel':"Yo entiendo que Clipperz no me permite recuperar una frase clave perdida.",
122 'changePasswordFormSubmitLabel':"Cambiar", 120 'changePasswordFormSubmitLabel':"Cambiar",
123 'changePasswordFormWrongUsernameWarning':"Usuario incorrecto", 121 'changePasswordFormWrongUsernameWarning':"Usuario incorrecto",
124 'changePasswordFormWrongPassphraseWarning':"Frase clave incorrecta", 122 'changePasswordFormWrongPassphraseWarning':"Frase clave incorrecta",
125 'changePasswordFormWrongRetypePassphraseWarning':"Sus frases claves no coinciden, por favor reescríbalas.", 123 'changePasswordFormWrongRetypePassphraseWarning':"Sus frases claves no coinciden, por favor reescríbalas.",
126 'changePasswordFormSafetyCheckWarning':"Por favor lea y seleccione la casilla de abajo.", 124 'changePasswordFormSafetyCheckWarning':"Por favor lea y seleccione la casilla de abajo.",
127 'changePasswordFormProgressDialogTitle':"Cambiando credenciales de usuario", 125 'changePasswordFormProgressDialogTitle':"Cambiando credenciales de usuario",
128 'changePasswordFormProgressDialogConnectedMessageTitle':"Conectado", 126 'changePasswordFormProgressDialogConnectedMessageTitle':"Conectado",
129 'changePasswordFormProgressDialogConnectedMessageText':"Hecho", 127 'changePasswordFormProgressDialogConnectedMessageText':"Hecho",
130 'changePasswordFormProgressDialogErrorMessageTitle':"Error", 128 'changePasswordFormProgressDialogErrorMessageTitle':"Error",
131 'changePasswordFormProgressDialogErrorMessageText':"¡Cambio de credenciales fallado!", 129 'changePasswordFormProgressDialogErrorMessageText':"¡Cambio de credenciales fallado!",
132 'changeCredentialsPanelEncryptingDataMessageTitle':"Cambiando su frase clave", 130 'changeCredentialsPanelEncryptingDataMessageTitle':"Cambiando su frase clave",
133 'changeCredentialsPanelEncryptingDataMessageText':"Encriptación local de encabezados de tarjetas", 131 'changeCredentialsPanelEncryptingDataMessageText':"Encriptación local de encabezados de tarjetas",
134 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"Cambiando su frase clave", 132 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"Cambiando su frase clave",
135 'changeCredentialsPanelCreatingNewCredentialsMessageText':"Actualizando su credenciales", 133 'changeCredentialsPanelCreatingNewCredentialsMessageText':"Actualizando su credenciales",
136 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Cambiando su frase clave", 134 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Cambiando su frase clave",
137 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Subiendo sus credenciales encriptadas a Clipperz", 135 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Subiendo sus credenciales encriptadas a Clipperz",
138 'changeCredentialsPanelDoneMessageTitle':"Cambiando su frase clave", 136 'changeCredentialsPanelDoneMessageTitle':"Cambiando su frase clave",
139 'changeCredentialsPanelDoneMessageText':"Hecho", 137 'changeCredentialsPanelDoneMessageText':"Hecho",
140 'manageOTPTabLabel':"Administrar su frases clave desechables", 138 'manageOTPTabLabel':"Administrar su frases clave desechables",
141 'manageOTPTabTitle':"Administrar su frases clave desechables", 139 'manageOTPTabTitle':"Administrar su frases clave desechables",
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> ", 140 '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> ",
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> ", 141 '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> ",
144 'oneTimePasswordLoadingMessage':"<h6>Cargando datos</h6> <p>Por favor espere ...</p> ", 142 'oneTimePasswordLoadingMessage':"<h6>Cargando datos</h6> <p>Por favor espere ...</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> ", 143 '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> ",
146 'createNewOTPButtonLabel':"Nueva", 144 'createNewOTPButtonLabel':"Nueva",
147 'deleteOTPButtonLabel':"Borrar", 145 'deleteOTPButtonLabel':"Borrar",
148 'printOTPButtonLabel':"Imprimir", 146 'printOTPButtonLabel':"Imprimir",
149 'disabledOneTimePassword_warning':"desabilitado", 147 'disabledOneTimePassword_warning':"desabilitado",
150 'oneTimePasswordSelectionLink_selectLabel':"Seleccionar:", 148 'oneTimePasswordSelectionLink_selectLabel':"Seleccionar:",
151 'oneTimePasswordSelectionLink_all':"todo", 149 'oneTimePasswordSelectionLink_all':"todo",
152 'oneTimePasswordSelectionLink_none':"ninguna", 150 'oneTimePasswordSelectionLink_none':"ninguna",
153 'oneTimePasswordSelectionLink_used':"usada", 151 'oneTimePasswordSelectionLink_used':"usada",
154 'oneTimePasswordSelectionLink_unused':"sin uso", 152 'oneTimePasswordSelectionLink_unused':"sin uso",
155 'saveOTP_encryptUserDataTitle':"Guardando frase clave desechable", 153 'saveOTP_encryptUserDataTitle':"Guardando frase clave desechable",
156 'saveOTP_encryptUserDataText':"Procesando nuevas credenciales OTP ...", 154 'saveOTP_encryptUserDataText':"Procesando nuevas credenciales OTP ...",
157 'saveOTP_encryptOTPDataTitle':"Guardando frase clave desechable", 155 'saveOTP_encryptOTPDataTitle':"Guardando frase clave desechable",
158 'saveOTP_encryptOTPDataText':"Encriptación local de datos de autenticación ...", 156 'saveOTP_encryptOTPDataText':"Encriptación local de datos de autenticación ...",
159 'saveOTP_sendingDataTitle':"Guardando frase clave desechable", 157 'saveOTP_sendingDataTitle':"Guardando frase clave desechable",
160 'saveOTP_sendingDataText':"Enviando datos de autenticación al servidor ...", 158 'saveOTP_sendingDataText':"Enviando datos de autenticación al servidor ...",
161 'saveOTP_updatingInterfaceTitle':"Guardando frase clave desechable", 159 'saveOTP_updatingInterfaceTitle':"Guardando frase clave desechable",
162 'saveOTP_updatingInterfaceText':"Actualizando interface ...", 160 'saveOTP_updatingInterfaceText':"Actualizando interface ...",
163 'accountPreferencesLabel':"Preferencias", 161 'accountPreferencesLabel':"Preferencias",
164 'accountPreferencesTabTitle':"Preferencias", 162 'accountPreferencesTabTitle':"Preferencias",
165 'accountPreferencesLanguageTitle':"Seleccione el lenguaje", 163 'accountPreferencesLanguageTitle':"Seleccione el lenguaje",
166 'accountPreferencesLanguageDescription':"<p>Elija su lenguaje preferido de la siguiente lista.<p> ", 164 'accountPreferencesLanguageDescription':"<p>Elija su lenguaje preferido de la siguiente lista.<p> ",
167 'showDonationReminderPanelTitle':"Recordatorios de donaciones", 165 'showDonationReminderPanelTitle':"Recordatorios de donaciones",
168 'showDonationReminderPanelDescription':"<p>Mostrar recordatorios de donaciones</p> ", 166 'showDonationReminderPanelDescription':"<p>Mostrar recordatorios de donaciones</p> ",
169 'accountPreferencesInterfaceTitle':"Personalización de la interface", 167 'accountPreferencesInterfaceTitle':"Personalización de la interface",
170 'accountPreferencesInterfaceDescription':"<p>Ajuste Clipperz a sus necesidades.</p> ", 168 'accountPreferencesInterfaceDescription':"<p>Ajuste Clipperz a sus necesidades.</p> ",
171 'saveUserPreferencesFormSubmitLabel':"Guardar", 169 'saveUserPreferencesFormSubmitLabel':"Guardar",
172 'cancelUserPreferencesFormSubmitLabel':"Cancelar", 170 'cancelUserPreferencesFormSubmitLabel':"Cancelar",
173 'accountPreferencesSavingPanelTitle_Step1':"Guardando preferencias", 171 'accountPreferencesSavingPanelTitle_Step1':"Guardando preferencias",
174 'accountPreferencesSavingPanelText_Step1':"Encriptación local de sus preferencias", 172 'accountPreferencesSavingPanelText_Step1':"Encriptación local de sus preferencias",
175 'accountPreferencesSavingPanelTitle_Step2':"Guardando preferencias", 173 'accountPreferencesSavingPanelTitle_Step2':"Guardando preferencias",
176 'accountPreferencesSavingPanelText_Step2':"Enviando preferencias encriptadas a Clipperz", 174 'accountPreferencesSavingPanelText_Step2':"Enviando preferencias encriptadas a Clipperz",
177 'accountLoginHistoryLabel':"Historial de accesos", 175 'accountLoginHistoryLabel':"Historial de accesos",
178 'loginHistoryTabTitle':"Historial de accesos", 176 'loginHistoryTabTitle':"Historial de accesos",
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> ", 177 '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> ",
180 'loginHistoryLoadingMessage':"<h6>Cargando datos</h6> <p>Por favor espere ...</p> ", 178 'loginHistoryLoadingMessage':"<h6>Cargando datos</h6> <p>Por favor espere ...</p> ",
181 'loginHistoryLoadedMessage':"<h6>Sus últimos 10 accesos</h6> <p> </p> ", 179 'loginHistoryLoadedMessage':"<h6>Sus últimos 10 accesos</h6> <p> </p> ",
182 'loginHistoryIPLabel':"IP", 180 'loginHistoryIPLabel':"IP",
183 'loginHistoryTimeLabel':"fecha", 181 'loginHistoryTimeLabel':"fecha",
184 'loginHistoryCurrentSessionText':"sesión actual", 182 'loginHistoryCurrentSessionText':"sesión actual",
185 'loginHistoryReloadButtonLabel':"Refrescar historial de acceso", 183 'loginHistoryReloadButtonLabel':"Refrescar historial de acceso",
186 'deleteAccountTabLabel':"Borrar su cuenta", 184 'deleteAccountTabLabel':"Borrar su cuenta",
187 'deleteAccountTabTitle':"Borrar su cuenta", 185 'deleteAccountTabTitle':"Borrar su cuenta",
188 'deleteAccountFormUsernameLabel':"usuario", 186 'deleteAccountFormUsernameLabel':"usuario",
189 'deleteAccountFormPassphraseLabel':"frase clave", 187 'deleteAccountFormPassphraseLabel':"frase clave",
190 'deleteAccountFormSafetyCheckboxLabel':"Yo entiendo que todos mis datos serán borrados y que esta acción es irreversible.", 188 'deleteAccountFormSafetyCheckboxLabel':"Yo entiendo que todos mis datos serán borrados y que esta acción es irreversible.",
191 'deleteAccountFormSubmitLabel':"Borrar mi cuenta", 189 'deleteAccountFormSubmitLabel':"Borrar mi cuenta",
192 'deleteAccountFormWrongUsernameWarning':"Usuario incorrecto", 190 'deleteAccountFormWrongUsernameWarning':"Usuario incorrecto",
193 'deleteAccountFormWrongPassphraseWarning':"Frase clave incorrecta", 191 'deleteAccountFormWrongPassphraseWarning':"Frase clave incorrecta",
194 'deleteAccountFormSafetyCheckWarning':"Por favor, léa y marque la opción debajo.", 192 'deleteAccountFormSafetyCheckWarning':"Por favor, léa y marque la opción debajo.",
195 'accountPanelDeletingAccountPanelConfirmationTitle':"ATENCIÓN", 193 'accountPanelDeletingAccountPanelConfirmationTitle':"ATENCIÓN",
196 'accountPanelDeleteAccountPanelConfirmationText':"¿Esta Ud. seguro que desea borrar esta cuenta?", 194 'accountPanelDeleteAccountPanelConfirmationText':"¿Esta Ud. seguro que desea borrar esta cuenta?",
197 'accountPanelDeleteAccountPanelConfirmButtonLabel':"Sí", 195 'accountPanelDeleteAccountPanelConfirmButtonLabel':"Sí",
198 'accountPanelDeleteAccountPanelDenyButtonLabel':"No", 196 'accountPanelDeleteAccountPanelDenyButtonLabel':"No",
199 'offlineCopyTabLabel':"Copia fuera de línea", 197 'offlineCopyTabLabel':"Copia fuera de línea",
200 'offlineCopyTabTitle':"Copia fuera de línea", 198 'offlineCopyTabTitle':"Copia fuera de línea",
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> ", 199 '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> ",
202 'offlineCopyDownloadLinkLabel':"Descargar", 200 'offlineCopyDownloadLinkLabel':"Descargar",
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> ", 201 '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> ",
204 'sharingTabLabel':"Compartir", 202 'sharingTabLabel':"Compartir",
205 'sharingTabTitle':"Compartir", 203 'sharingTabTitle':"Compartir",
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> ", 204 '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> ",
207 'importTabLabel':"Importar", 205 'importTabLabel':"Importar",
208 'importTabTitle':"Importar", 206 'importTabTitle':"Importar",
209 'importTabDescription':"<p> <b>Proximamente ...</b> </p> ", 207 'importTabDescription':"<p> <b>Proximamente ...</b> </p> ",
210 'printingTabLabel':"Exportar", 208 'printingTabLabel':"Exportar",
211 'printingTabTitle':"Exportar", 209 'printingTabTitle':"Exportar",
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> ", 210 '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> ",
213 'printingLinkLabel':"Versión imprimible", 211 'printingLinkLabel':"Versión imprimible",
214 'contactsTabLabel':"Contactos", 212 'contactsTabLabel':"Contactos",
215 'contactsTabTitle':"Contactos", 213 'contactsTabTitle':"Contactos",
216 'passwordGeneratorTabLabel':"Generador de contraseñas", 214 'passwordGeneratorTabLabel':"Generador de contraseñas",
217 'passwordGeneratorTabTitle':"Generador de contraseñas", 215 'passwordGeneratorTabTitle':"Generador de contraseñas",
218 'paswordGeneratorTabDescriptionConfig':"<p> </p> ", 216 'paswordGeneratorTabDescriptionConfig':"<p> </p> ",
219 'passwordGeneratorTabButtonLabel':"Generar contraseña", 217 'passwordGeneratorTabButtonLabel':"Generar contraseña",
220 'bookmarkletTabLabel':"Bookmarklet", 218 'bookmarkletTabLabel':"Bookmarklet",
221 'bookmarkletTabTitle':"Bookmarklet", 219 'bookmarkletTabTitle':"Bookmarklet",
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> ", 220 '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> ",
223 'bookmarkletTabBookmarkletTitle':"Agregar a Clipperz", 221 'bookmarkletTabBookmarkletTitle':"Agregar a Clipperz",
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> ", 222 '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> ",
225 'mainPanelDirectLoginBlockLabel':"Accesos directos", 223 'mainPanelDirectLoginBlockLabel':"Accesos directos",
226 'directLinkReferenceShowButtonLabel':"ver", 224 'directLinkReferenceShowButtonLabel':"ver",
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> ", 225 '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> ",
228 'mainPanelRecordsBlockLabel':"Tarjetas", 226 'mainPanelRecordsBlockLabel':"Tarjetas",
229 'mainPanelAddRecordButtonLabel':"Agregar tarjeta nueva", 227 'mainPanelAddRecordButtonLabel':"Agregar tarjeta nueva",
230 'mainPanelRemoveRecordButtonLabel':"Borrar tarjeta", 228 'mainPanelRemoveRecordButtonLabel':"Borrar tarjeta",
231 'mainPanelRecordFilterBlockAllLabel':"todo", 229 'mainPanelRecordFilterBlockAllLabel':"todo",
232 'mainPanelRecordFilterBlockTagsLabel':"tags", 230 'mainPanelRecordFilterBlockTagsLabel':"tags",
233 'mainPanelRecordFilterBlockSearchLabel':"buscar", 231 'mainPanelRecordFilterBlockSearchLabel':"buscar",
234 'recordDetailNoRecordAtAllTitle':"¡Bienvenido a Clipperz!", 232 'recordDetailNoRecordAtAllTitle':"¡Bienvenido a Clipperz!",
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> ", 233 '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> ",
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> ", 234 '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> ",
237 'newRecordWizardBookmarkletConfigurationTitle':"Acceso directo", 235 'newRecordWizardBookmarkletConfigurationTitle':"Acceso directo",
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> ", 236 '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> ",
239 'newRecordWizardCreateButtonLabel':"Crear", 237 'newRecordWizardCreateButtonLabel':"Crear",
240 'newRecordWizardCancelButtonLabel':"Cancelar", 238 'newRecordWizardCancelButtonLabel':"Cancelar",
241 'donateSplashPanelTitle':"¡Apoye a Clipperz, haga una donación hoy!", 239 'donateSplashPanelTitle':"¡Apoye a Clipperz, haga una donación hoy!",
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> ", 240 '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> ",
243 'donateCloseButtonLabel':"No todavía", 241 'donateCloseButtonLabel':"No todavía",
244 'donateDonateButtonLabel':"Si", 242 'donateDonateButtonLabel':"Si",
245 'recordTemplates':{ 243 'recordTemplates':{
246 'WebAccount':{ 244 'WebAccount':{
247 'title':"Contraseña web", 245 'title':"Contraseña web",
248 'description':"<p>Una simple tarjeta para almacenar sus credenciales de acceso a sus servicios online.</p> ", 246 'description':"<p>Una simple tarjeta para almacenar sus credenciales de acceso a sus servicios online.</p> ",
249 'fields':{ 247 'fields':{
250 'URL':"Dirección web", 248 'URL':"Dirección web",
251 'TXT':"Usuario o correo electrónico", 249 'TXT':"Usuario o correo electrónico",
252 'PWD':"Contraseña" 250 'PWD':"Contraseña"
253 } 251 }
254 }, 252 },
255 'BankAccount':{ 253 'BankAccount':{
256 'title':"Cuenta bancaria", 254 'title':"Cuenta bancaria",
257 'description':"<p>Almacene en forma segura su número de cuenta bancaria y credenciales de servicios bancarios en línea.</p> ", 255 'description':"<p>Almacene en forma segura su número de cuenta bancaria y credenciales de servicios bancarios en línea.</p> ",
258 'fields':{ 256 'fields':{
259 'TXT':"Banco", 257 'TXT':"Banco",
260 'TXT':"Número de cuenta", 258 'TXT':"Número de cuenta",
261 'URL':"Sitio web del Banco", 259 'URL':"Sitio web del Banco",
262 'TXT':"ID del servicio bancario en línea", 260 'TXT':"ID del servicio bancario en línea",
263 'PWD':"Contraseña del servicio bancario en línea" 261 'PWD':"Contraseña del servicio bancario en línea"
264 } 262 }
265 }, 263 },
266 'CreditCard':{ 264 'CreditCard':{
267 'title':"Tarjeta de crédito", 265 'title':"Tarjeta de crédito",
268 'description':"<p>Número de tarjeta, fecha de vencimiento, CVV2 y PIN siempre a mano con Clipperz.</p> ", 266 'description':"<p>Número de tarjeta, fecha de vencimiento, CVV2 y PIN siempre a mano con Clipperz.</p> ",
269 'fields':{ 267 'fields':{
270 'TXT':"Tipo (Visa, AmEx, ...)", 268 'TXT':"Tipo (Visa, AmEx, ...)",
271 'TXT':"Número", 269 'TXT':"Número",
272 'TXT':"Nombre del propietario", 270 'TXT':"Nombre del propietario",
273 'TXT':"Fecha de vencimiento", 271 'TXT':"Fecha de vencimiento",
274 'TXT':"CVV2", 272 'TXT':"CVV2",
275 'PWD':"PIN cajero automático", 273 'PWD':"PIN cajero automático",
276 'URL':"Sitio web tarjeta", 274 'URL':"Sitio web tarjeta",
277 'TXT':"Usuario", 275 'TXT':"Usuario",
278 'PWD':"Contraseña" 276 'PWD':"Contraseña"
279 } 277 }
280 }, 278 },
281 'AddressBookEntry':{ 279 'AddressBookEntry':{
282 'title':"Libreta de direcciones", 280 'title':"Libreta de direcciones",
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> ", 281 'description':"<p>Clipperz puede también funcionar como su nueva libreta privada de direcciones. Use esta plantilla para crear fácilmente nuevas entradas.</p> ",
284 'fields':{ 282 'fields':{
285 'TXT':"Nombre", 283 'TXT':"Nombre",
286 'TXT':"Correo electrónico", 284 'TXT':"Correo electrónico",
287 'TXT':"Teléfono", 285 'TXT':"Teléfono",
288 'TXT':"Móvil", 286 'TXT':"Móvil",
289 'ADDR':"Dirección" 287 'ADDR':"Dirección"
290 } 288 }
291 }, 289 },
292 'Custom':{ 290 'Custom':{
293 'title':" Tarjeta personalizada", 291 'title':" Tarjeta personalizada",
294 'description':"<p>No importa que tipo de dato confidencial usted necesita proteger, puede crear la tarjeta que necesite.</p> ", 292 'description':"<p>No importa que tipo de dato confidencial usted necesita proteger, puede crear la tarjeta que necesite.</p> ",
295 'fields':{ 293 'fields':{
296 'TXT':"Etiqueta 1", 294 'TXT':"Etiqueta 1",
297 'TXT':"Etiqueta 2", 295 'TXT':"Etiqueta 2",
298 'TXT':"Etiqueta 3" 296 'TXT':"Etiqueta 3"
299 } 297 }
300 } 298 }
301}, 299},
302 'recordFieldTypologies':{ 300 'recordFieldTypologies':{
303 'TXT':{ 301 'TXT':{
304 'description':"simple text field", 302 'description':"simple text field",
305 'shortDescription':"texto" 303 'shortDescription':"texto"
306 }, 304 },
307 'PWD':{ 305 'PWD':{
308 'description':"simple text field, with default status set to hidden", 306 'description':"simple text field, with default status set to hidden",
309 'shortDescription':"contraseña" 307 'shortDescription':"contraseña"
310 }, 308 },
311 'URL':{ 309 'URL':{
312 '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",
313 'shortDescription':"dirección web" 311 'shortDescription':"dirección web"
314 }, 312 },
315 'DATE':{ 313 'DATE':{
316 'description':"a value set with a calendar helper", 314 'description':"a value set with a calendar helper",
317 'shortDescription':"fecha" 315 'shortDescription':"fecha"
318 }, 316 },
319 'ADDR':{ 317 'ADDR':{
320 '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",
321 'shortDescription':"dirección postal" 319 'shortDescription':"dirección postal"
322 }, 320 },
323 'CHECK':{ 321 'CHECK':{
324 'description':"check description", 322 'description':"check description",
325 'shortDescription':"check" 323 'shortDescription':"check"
326 }, 324 },
327 'RADIO':{ 325 'RADIO':{
328 'description':"radio description", 326 'description':"radio description",
329 'shortDescription':"radio" 327 'shortDescription':"radio"
330 }, 328 },
331 'SELECT':{ 329 'SELECT':{
332 'description':"select description", 330 'description':"select description",
333 'shortDescription':"select" 331 'shortDescription':"select"
334 } 332 }
335}, 333},
336 'newRecordPanelGeneralExceptionTitle':"Error", 334 'newRecordPanelGeneralExceptionTitle':"Error",
337 'newRecordPanelGeneralExceptionMessage':"El texto de configuración no es válido. Asegúrese que toma su texto desde la ventana emergente del bookmarklet.", 335 'newRecordPanelGeneralExceptionMessage':"El texto de configuración no es válido. Asegúrese que toma su texto desde la ventana emergente del bookmarklet.",
338 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"Error", 336 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"Error",
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.", 337 'newRecordPanelWrongBookmarkletVersionExceptionMessage':"El texto de configuración ha sido generado por una versión anterior de bookmarklet. Por favor actualize su bookmarklet y pruebe nuevamente.",
340 'newRecordPanelExceptionPanelCloseButtonLabel':"Cancelar", 338 'newRecordPanelExceptionPanelCloseButtonLabel':"Cancelar",
341 'mainPanelDeletingRecordPanelConfirmationTitle':"Eliminando tarjeta seleccionada", 339 'mainPanelDeletingRecordPanelConfirmationTitle':"Eliminando tarjeta seleccionada",
342 'mainPanelDeleteRecordPanelConfirmationText':"¿Desea realmente eliminar la tarjeta seleccionada?", 340 'mainPanelDeleteRecordPanelConfirmationText':"¿Desea realmente eliminar la tarjeta seleccionada?",
343 'mainPanelDeleteRecordPanelConfirmButtonLabel':"Sí", 341 'mainPanelDeleteRecordPanelConfirmButtonLabel':"Sí",
344 'mainPanelDeleteRecordPanelDenyButtonLabel':"No", 342 'mainPanelDeleteRecordPanelDenyButtonLabel':"No",
345 'mainPanelDeletingRecordPanelInitialTitle':"Eliminando tarjeta seleccionada", 343 'mainPanelDeletingRecordPanelInitialTitle':"Eliminando tarjeta seleccionada",
346 'mainPanelDeletingRecordPanelCompletedText':"Hecho", 344 'mainPanelDeletingRecordPanelCompletedText':"Hecho",
347 'deleteRecordPanelCollectRecordDataMessageTitle':"Eliminar tarjeta", 345 'deleteRecordPanelCollectRecordDataMessageTitle':"Eliminar tarjeta",
348 'deleteRecordPanelCollectRecordDataMessageText':"Actualizando lista de tarjetas", 346 'deleteRecordPanelCollectRecordDataMessageText':"Actualizando lista de tarjetas",
349 'deleteRecordPanelEncryptUserDataMessageTitle':"Eliminar tarjeta", 347 'deleteRecordPanelEncryptUserDataMessageTitle':"Eliminar tarjeta",
350 'deleteRecordPanelEncryptUserDataMessageText':"Encriptación local de encabezamiento de tarjetas", 348 'deleteRecordPanelEncryptUserDataMessageText':"Encriptación local de encabezamiento de tarjetas",
351 'deleteRecordPanelSendingDataToTheServerMessageTitle':"Eliminar tarjeta", 349 'deleteRecordPanelSendingDataToTheServerMessageTitle':"Eliminar tarjeta",
352 'deleteRecordPanelSendingDataToTheServerMessageText':"Subiendo encabezamiento de tarjetas encriptadas a Clipperz", 350 'deleteRecordPanelSendingDataToTheServerMessageText':"Subiendo encabezamiento de tarjetas encriptadas a Clipperz",
353 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"Eliminar tarjeta", 351 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"Eliminar tarjeta",
354 'deleteRecordPanelUpdatingTheInterfaceMessageText':"Actualizando interface", 352 'deleteRecordPanelUpdatingTheInterfaceMessageText':"Actualizando interface",
355 'recordDetailNoRecordSelectedTitle':"No hay tarjetas seleccionadas", 353 'recordDetailNoRecordSelectedTitle':"No hay tarjetas seleccionadas",
356 'recordDetailNoRecordSelectedDescription':"<p>Por favor seleccione una tarjeta de la lista de la izquierda.</p> ", 354 'recordDetailNoRecordSelectedDescription':"<p>Por favor seleccione una tarjeta de la lista de la izquierda.</p> ",
357 'recordDetailLoadingRecordMessage':"Descargando tarjetas encriptadas desde Clipperz", 355 'recordDetailLoadingRecordMessage':"Descargando tarjetas encriptadas desde Clipperz",
358 'recordDetailDecryptingRecordMessage':"Desencriptación local de los datos de las tarjetas", 356 'recordDetailDecryptingRecordMessage':"Desencriptación local de los datos de las tarjetas",
359 'recordDetailLoadingRecordVersionMessage':"Descargando última versión de la tarjeta", 357 'recordDetailLoadingRecordVersionMessage':"Descargando última versión de la tarjeta",
360 'recordDetailDecryptingRecordVersionMessage':"Desencriptación local de la última versión", 358 'recordDetailDecryptingRecordVersionMessage':"Desencriptación local de la última versión",
361 'recordDetailLoadingErrorMessageTitle':"Error mientras descargaba la tarjeta", 359 'recordDetailLoadingErrorMessageTitle':"Error mientras descargaba la tarjeta",
362 'recordDetailNotesLabel':"Notas", 360 'recordDetailNotesLabel':"Notas",
363 'recordDetailLabelFieldColumnLabel':"Campo título", 361 'recordDetailLabelFieldColumnLabel':"Campo título",
364 'recordDetailDataFieldColumnLabel':"Campo de datos", 362 'recordDetailDataFieldColumnLabel':"Campo de datos",
365 'recordDetailTypeFieldColumnLabel':"Tipo", 363 'recordDetailTypeFieldColumnLabel':"Tipo",
366 'recordDetailSavingChangesMessagePanelInitialTitle':"Guardando tarjeta", 364 'recordDetailSavingChangesMessagePanelInitialTitle':"Guardando tarjeta",
367 'recordDetailAddFieldButtonLabel':"Agregar nuevo campo", 365 'recordDetailAddFieldButtonLabel':"Agregar nuevo campo",
368 'recordDetailPasswordFieldHelpLabel':"para copiar la contraseña al portapapeles, haga click en la estrella y luego Ctrl-C", 366 'recordDetailPasswordFieldHelpLabel':"para copiar la contraseña al portapapeles, haga click en la estrella y luego Ctrl-C",
369 'recordDetailPasswordFieldScrambleLabel':"ocultar", 367 'recordDetailPasswordFieldScrambleLabel':"ocultar",
370 'recordDetailPasswordFieldUnscrambleLabel':"mostrar", 368 'recordDetailPasswordFieldUnscrambleLabel':"mostrar",
371 'recordDetailDirectLoginBlockTitle':"Acceso directos", 369 'recordDetailDirectLoginBlockTitle':"Acceso directos",
372 'recordDetailNewDirectLoginDescription':"<p>Configuración de los accesos directos</p> ", 370 'recordDetailNewDirectLoginDescription':"<p>Configuración de los accesos directos</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> ", 371 '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> ",
374 'recordDetailAddNewDirectLoginButtonLabel':"Agregar nuevo acceso directo", 372 'recordDetailAddNewDirectLoginButtonLabel':"Agregar nuevo acceso directo",
375 'recordDetailEditButtonLabel':"Editar", 373 'recordDetailEditButtonLabel':"Editar",
376 'recordDetailSaveButtonLabel':"Guardar", 374 'recordDetailSaveButtonLabel':"Guardar",
377 'recordDetailCancelButtonLabel':"Cancelar", 375 'recordDetailCancelButtonLabel':"Cancelar",
378 'newRecordTitleLabel':"_nueva tarjeta_", 376 'newRecordTitleLabel':"_nueva tarjeta_",
379 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"Guardar tarjeta", 377 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"Guardar tarjeta",
380 'recordSaveChangesPanelCollectRecordInfoMessageText':"Actualizando encabezamiento de tarjetas", 378 'recordSaveChangesPanelCollectRecordInfoMessageText':"Actualizando encabezamiento de tarjetas",
381 'recordSaveChangesPanelEncryptUserDataMessageTitle':"Guardar tarjeta", 379 'recordSaveChangesPanelEncryptUserDataMessageTitle':"Guardar tarjeta",
382 'recordSaveChangesPanelEncryptUserDataMessageText':"Encriptación local de encabezamiento de tarjetas", 380 'recordSaveChangesPanelEncryptUserDataMessageText':"Encriptación local de encabezamiento de tarjetas",
383 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"Guardar tarjeta", 381 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"Guardar tarjeta",
384 'recordSaveChangesPanelEncryptRecordDataMessageText':"Encriptación local de los datos de la tarjeta", 382 'recordSaveChangesPanelEncryptRecordDataMessageText':"Encriptación local de los datos de la tarjeta",
385 'recordSaveChangesPanelEncryptRecordVersionDataMessageTitle':"Guardar tarjeta", 383 'recordSaveChangesPanelEncryptRecordVersionDataMessageTitle':"Guardar tarjeta",
386 'recordSaveChangesPanelEncryptRecordVersionDataMessageText':"Encriptación local de la versión de los datos de la tarjeta", 384 'recordSaveChangesPanelEncryptRecordVersionDataMessageText':"Encriptación local de la versión de los datos de la tarjeta",
387 'recordSaveChangesPanelSendingDataToTheServerMessageTitle':"Guardar tarjeta", 385 'recordSaveChangesPanelSendingDataToTheServerMessageTitle':"Guardar tarjeta",
388 'recordSaveChangesPanelSendingDataToTheServerMessageText':"Subiendo encabezamiento de tarjeta encriptada a Clipperz", 386 'recordSaveChangesPanelSendingDataToTheServerMessageText':"Subiendo encabezamiento de tarjeta encriptada a Clipperz",
389 'recordSaveChangesPanelUpdatingTheInterfaceMessageTitle':"Guardar tarjeta", 387 'recordSaveChangesPanelUpdatingTheInterfaceMessageTitle':"Guardar tarjeta",
390 'recordSaveChangesPanelUpdatingTheInterfaceMessageText':"Actualizando la interface", 388 'recordSaveChangesPanelUpdatingTheInterfaceMessageText':"Actualizando la interface",
391 'passwordGeneratorPanelTitle':"Generador de contraseñas", 389 'passwordGeneratorPanelTitle':"Generador de contraseñas",
392 'passwordGeneratorPanelOkLabel':"Ok", 390 'passwordGeneratorPanelOkLabel':"Ok",
393 'passwordGeneratorPanelCancelLabel':"Cancelar", 391 'passwordGeneratorPanelCancelLabel':"Cancelar",
394 'passwordGeneratorLengthLabel':"longitud:", 392 'passwordGeneratorLengthLabel':"longitud:",
395 //'DWRUtilLoadingMessage':"Cargando datos ...", 393 //'DWRUtilLoadingMessage':"Cargando datos ...",
396 'comingSoon':"próximamente ...", 394 'comingSoon':"próximamente ...",
397 'panelCollectingEntryopyMessageText':"Recogiendo entropía", 395 'panelCollectingEntryopyMessageText':"Recogiendo entropía",
398 'directLoginConfigurationCheckBoxFieldSelectedValue':"Sí", 396 'directLoginConfigurationCheckBoxFieldSelectedValue':"Sí",
399 'directLoginConfigurationCheckBoxFieldNotSelectedValue':"No", 397 'directLoginConfigurationCheckBoxFieldNotSelectedValue':"No",
400 'WELCOME_BACK':"¡Bienvenido!", 398 'WELCOME_BACK':"¡Bienvenido!",
401 'currentConnectionText':"Usted está ahora conectado desde ip&nbsp;__ip__, aparentemente desde __country__, usando __browser__ en __operatingSystem__.", 399 'currentConnectionText':"Usted está ahora conectado 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__.", 400 'latestConnectionText':"Su última conexión fue __elapsedTimeDescription__ (__time__) desde ip&nbsp;__ip__, aparentemente desde __country__, usando __browser__ en __operatingSystem__.",
403 'fullLoginHistoryLinkLabel':"mostrar historial de acceso", 401 'fullLoginHistoryLinkLabel':"mostrar historial de acceso",
404 'elapsedTimeDescriptions':{ 402 'elapsedTimeDescriptions':{
405 'MORE_THAN_A_MONTH_AGO':"más de un mes atrás", 403 'MORE_THAN_A_MONTH_AGO':"más de un mes atrás",
406 'MORE_THAN_A_WEEK_AGO':"más de una semana atrás", 404 'MORE_THAN_A_WEEK_AGO':"más de una semana 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 34467e9..08f0c21 100644
--- a/frontend/beta/js/Clipperz/PM/Strings/Strings_fr-FR.js
+++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_fr-FR.js
@@ -1,359 +1,357 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26Clipperz.PM.Strings.Languages['fr-FR'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 24Clipperz.PM.Strings.Languages['fr-FR'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], {
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> ", 25 '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> ",
28 'loginFormTitle':"identifiez-vous avec votre compte Clipperz", 26 'loginFormTitle':"identifiez-vous avec votre compte Clipperz",
29 'loginFormUsernameLabel':"nom d’utilisateur", 27 'loginFormUsernameLabel':"nom d’utilisateur",
30 'loginFormPassphraseLabel':"phrase secrète", 28 'loginFormPassphraseLabel':"phrase secrète",
31 'loginFormDontHaveAnAccountLabel':"vous n’avez pas de compte?", 29 'loginFormDontHaveAnAccountLabel':"vous n’avez pas de compte?",
32 'loginFormCreateOneLabel':"créez votre compte", 30 'loginFormCreateOneLabel':"créez votre compte",
33 'loginFormForgotYourCredentialsLabel':"vous avez oublié votre certificat?", 31 'loginFormForgotYourCredentialsLabel':"vous avez oublié votre certificat?",
34 'loginFormAarghThatsBadLabel':"c’est fort dommage pour vous!", 32 'loginFormAarghThatsBadLabel':"c’est fort dommage pour vous!",
35 'loginFormAfraidOfMaliciousScriptsLabel':"vous avez peur des script malicieux?", 33 'loginFormAfraidOfMaliciousScriptsLabel':"vous avez peur des script malicieux?",
36 'loginFormVerifyTheCodeLabel':"vérifiez le code", 34 'loginFormVerifyTheCodeLabel':"vérifiez le code",
37 'loginFormButtonLabel':"S’identifer", 35 'loginFormButtonLabel':"S’identifer",
38 'loginPanelSwithLanguageDescription':"<p>Sélectionnez votre langue préféré</p> ", 36 'loginPanelSwithLanguageDescription':"<p>Sélectionnez votre langue préféré</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> ", 37 'browserCompatibilityDescription':"<p>Have a better and safer Clipperz experience with Firefox. However Clipperz works just fine also with Opera and MS Internet Explorer!</p> ",
40 'loginMessagePanelInitialTitle':"En cours d’identification ...", 38 'loginMessagePanelInitialTitle':"En cours d’identification ...",
41 'loginMessagePanelInitialButtonLabel':"Annuler", 39 'loginMessagePanelInitialButtonLabel':"Annuler",
42 'loginMessagePanelConnectedTitle':"Connecté", 40 'loginMessagePanelConnectedTitle':"Connecté",
43 'loginMessagePanelConnectedText':"Terminé", 41 'loginMessagePanelConnectedText':"Terminé",
44 'loginMessagePanelFailureTitle':"Erreur", 42 'loginMessagePanelFailureTitle':"Erreur",
45 'loginMessagePanelFailureText':"Identification échoué", 43 'loginMessagePanelFailureText':"Identification échoué",
46 'loginMessagePanelFailureButtonLabel':"Fermer", 44 'loginMessagePanelFailureButtonLabel':"Fermer",
47 'connectionLoginSendingCredentialsMessageTitle':"Vérification des identifiants", 45 'connectionLoginSendingCredentialsMessageTitle':"Vérification des identifiants",
48 'connectionLoginSendingCredentialsMessageText':"Envoi des identifiants", 46 'connectionLoginSendingCredentialsMessageText':"Envoi des identifiants",
49 'connectionLoginCredentialsVerificationMessageTitle':"Vérification des identifiants", 47 'connectionLoginCredentialsVerificationMessageTitle':"Vérification des identifiants",
50 'connectionLoginCredentialsVerificationMessageText':"Authentification SRP en cours", 48 'connectionLoginCredentialsVerificationMessageText':"Authentification SRP en cours",
51 'connectionLoginDoneMessageTitle':"Vérification des identifiants", 49 'connectionLoginDoneMessageTitle':"Vérification des identifiants",
52 'connectionLoginDoneMessageText':"Connecté", 50 'connectionLoginDoneMessageText':"Connecté",
53 'userLoginPanelUpgradingUserCredentialsMessageTitle':"Vérification des identifiants", 51 'userLoginPanelUpgradingUserCredentialsMessageTitle':"Vérification des identifiants",
54 'userLoginPanelUpgradingUserCredentialsMessageText':"Mise à jour de vos identifiants à un nouveau schéma d’authentification", 52 'userLoginPanelUpgradingUserCredentialsMessageText':"Mise à jour de vos identifiants à un nouveau schéma d’authentification",
55 'userLoginPanelConnectedMessageTitle':"Utilisateur identifié", 53 'userLoginPanelConnectedMessageTitle':"Utilisateur identifié",
56 'userLoginPanelConnectedMessageText':"Vous vous êtes identifié avec succès", 54 'userLoginPanelConnectedMessageText':"Vous vous êtes identifié avec succès",
57 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"Vérification des identifiants", 55 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"Vérification des identifiants",
58 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"Nous essayons un ancien schéma d’authentification", 56 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"Nous essayons un ancien schéma d’authentification",
59 'userLoginPanelLoadingUserDataMessageTitle':"Utilisateur identifié", 57 'userLoginPanelLoadingUserDataMessageTitle':"Utilisateur identifié",
60 'userLoginPanelLoadingUserDataMessageText':"Téléchargement des cartes d’en-têtes chiffrés depuis Clipperz", 58 'userLoginPanelLoadingUserDataMessageText':"Téléchargement des cartes d’en-têtes chiffrés depuis Clipperz",
61 'userLoginPanelDecryptingUserDataMessageTitle':"Utilisateur identifié", 59 'userLoginPanelDecryptingUserDataMessageTitle':"Utilisateur identifié",
62 'userLoginPanelDecryptingUserDataMessageText':"Décryptage local des en-têtes chiffrés", 60 'userLoginPanelDecryptingUserDataMessageText':"Décryptage local des en-têtes chiffrés",
63 'userLoginPanelDecryptingUserStatisticsMessageTitle':"Utilisateur identifié", 61 'userLoginPanelDecryptingUserStatisticsMessageTitle':"Utilisateur identifié",
64 'userLoginPanelDecryptingUserStatisticsMessageText':"Décryptage local des statistiques", 62 'userLoginPanelDecryptingUserStatisticsMessageText':"Décryptage local des statistiques",
65 'splashAlertTitle':"Bienvenue sur Clipperz!", 63 'splashAlertTitle':"Bienvenue sur Clipperz!",
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> ", 64 '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> ",
67 'splashAlertCloseButtonLabel':"Ok", 65 'splashAlertCloseButtonLabel':"Ok",
68 'registrationFormTitle':"créer votre compte", 66 'registrationFormTitle':"créer votre compte",
69 'registrationFormUsernameLabel':"nom d’utilisateur", 67 'registrationFormUsernameLabel':"nom d’utilisateur",
70 'registrationFormPassphraseLabel':"phrase secrète", 68 'registrationFormPassphraseLabel':"phrase secrète",
71 'registrationFormRetypePassphraseLabel':"re-saisissez votre phrase secrète", 69 'registrationFormRetypePassphraseLabel':"re-saisissez votre phrase secrète",
72 'registrationFormSafetyCheckLabel':"J’accepte que Clipperz ne pourra pas récupérer ma phrase secrète.", 70 'registrationFormSafetyCheckLabel':"J’accepte que Clipperz ne pourra pas récupérer ma phrase secrète.",
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>.", 71 '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>.",
74 'registrationFormDoYouAlreadyHaveAnAccountLabel':"avez-vous déjà un compte?", 72 'registrationFormDoYouAlreadyHaveAnAccountLabel':"avez-vous déjà un compte?",
75 'registrationFormSimplyLoginLabel':"identifiez-vous", 73 'registrationFormSimplyLoginLabel':"identifiez-vous",
76 'registrationFormButtonLabel':"S’inscrire", 74 'registrationFormButtonLabel':"S’inscrire",
77 'registrationFormWarningMessageNotMatchingPassphrases':"Vos phrases secrètes ne correspondent pas, veuillez les saisir à nouveau.", 75 'registrationFormWarningMessageNotMatchingPassphrases':"Vos phrases secrètes ne correspondent pas, veuillez les saisir à nouveau.",
78 'registrationFormWarningMessageSafetyCheckNotSelected':"Veuillez lire et cocher les cases-à-cocher ci-dessous.", 76 'registrationFormWarningMessageSafetyCheckNotSelected':"Veuillez lire et cocher les cases-à-cocher ci-dessous.",
79 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"Vous devez accepter les “Conditions d’Utilisation du Service”.", 77 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"Vous devez accepter les “Conditions d’Utilisation du Service”.",
80 'registrationMessagePanelInitialTitle':"Création du compte en cours ...", 78 'registrationMessagePanelInitialTitle':"Création du compte en cours ...",
81 'registrationMessagePanelInitialButtonLabel':"Annuler", 79 'registrationMessagePanelInitialButtonLabel':"Annuler",
82 'registrationMessagePanelRegistrationDoneTitle':"Enregistrement", 80 'registrationMessagePanelRegistrationDoneTitle':"Enregistrement",
83 'registrationMessagePanelRegistrationDoneText':"Terminé", 81 'registrationMessagePanelRegistrationDoneText':"Terminé",
84 'registrationMessagePanelFailureTitle':"Enregistrement échoué", 82 'registrationMessagePanelFailureTitle':"Enregistrement échoué",
85 'registrationMessagePanelFailureButtonLabel':"Fermer", 83 'registrationMessagePanelFailureButtonLabel':"Fermer",
86 'connectionRegistrationSendingRequestMessageText':"Vérification en cours des identifiants", 84 'connectionRegistrationSendingRequestMessageText':"Vérification en cours des identifiants",
87 'connectionRegistrationSendingCredentialsMessageText':"Envoi des identifiants", 85 'connectionRegistrationSendingCredentialsMessageText':"Envoi des identifiants",
88 'registrationSplashPanelTitle':"Conseils de sécurité", 86 'registrationSplashPanelTitle':"Conseils de sécurité",
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> ", 87 '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> ",
90 'registrationSplashPanelUsernameLabel':"nom d’utilisateur", 88 'registrationSplashPanelUsernameLabel':"nom d’utilisateur",
91 'registrationSplashPanelPassphraseLabel':"phrase secrète", 89 'registrationSplashPanelPassphraseLabel':"phrase secrète",
92 'registrationSplashPanelShowPassphraseButtonLabel':"afficher la phrase secrète", 90 'registrationSplashPanelShowPassphraseButtonLabel':"afficher la phrase secrète",
93 'donateHeaderLinkLabel':"faites un don", 91 'donateHeaderLinkLabel':"faites un don",
94 'creditsHeaderLinkLabel':"crédits", 92 'creditsHeaderLinkLabel':"crédits",
95 'feedbackHeaderLinkLabel':"votre avis", 93 'feedbackHeaderLinkLabel':"votre avis",
96 'helpHeaderLinkLabel':"aide", 94 'helpHeaderLinkLabel':"aide",
97 'forumHeaderLinkLabel':"forum", 95 'forumHeaderLinkLabel':"forum",
98 'recordMenuLabel':"cartes", 96 'recordMenuLabel':"cartes",
99 'accountMenuLabel':"compte", 97 'accountMenuLabel':"compte",
100 'dataMenuLabel':"données", 98 'dataMenuLabel':"données",
101 'contactsMenuLabel':"contacts", 99 'contactsMenuLabel':"contacts",
102 'toolsMenuLabel':"outils", 100 'toolsMenuLabel':"outils",
103 'logoutMenuLabel':"déconnexion", 101 'logoutMenuLabel':"déconnexion",
104 'lockMenuLabel':"verrouiller", 102 'lockMenuLabel':"verrouiller",
105 'lockTitle':"Le compte est verrouillé", 103 'lockTitle':"Le compte est verrouillé",
106 'lockDescription':"<p>Pour déverrouiller votre compte, veuillez saisir votre phrase secrète</p> ", 104 'lockDescription':"<p>Pour déverrouiller votre compte, veuillez saisir votre phrase secrète</p> ",
107 'unlockButtonLabel':"Déverrouiller", 105 'unlockButtonLabel':"Déverrouiller",
108 'changePasswordTabLabel':"Changer votre phrase secrète", 106 'changePasswordTabLabel':"Changer votre phrase secrète",
109 'changePasswordTabTitle':"Changer votre phrase secrète", 107 'changePasswordTabTitle':"Changer votre phrase secrète",
110 'changePasswordFormUsernameLabel':"nom d’utilisateur", 108 'changePasswordFormUsernameLabel':"nom d’utilisateur",
111 'changePasswordFormOldPassphraseLabel':"ancienne phrase secrète", 109 'changePasswordFormOldPassphraseLabel':"ancienne phrase secrète",
112 'changePasswordFormNewPassphraseLabel':"nouvelle phrase secrète", 110 'changePasswordFormNewPassphraseLabel':"nouvelle phrase secrète",
113 'changePasswordFormRetypePassphraseLabel':"re-saisissez phrase secrète", 111 'changePasswordFormRetypePassphraseLabel':"re-saisissez phrase secrète",
114 'changePasswordFormSafetyCheckboxLabel':"Je sais que Clipperz ne pourra pas récupérer ma phrase secrète.", 112 'changePasswordFormSafetyCheckboxLabel':"Je sais que Clipperz ne pourra pas récupérer ma phrase secrète.",
115 'changePasswordFormSubmitLabel':"Changer ma phrase secrète", 113 'changePasswordFormSubmitLabel':"Changer ma phrase secrète",
116 'changePasswordFormWrongUsernameWarning':"Nom d’utilisateur incorrect", 114 'changePasswordFormWrongUsernameWarning':"Nom d’utilisateur incorrect",
117 'changePasswordFormWrongPassphraseWarning':"Phrase secrète incorrect", 115 'changePasswordFormWrongPassphraseWarning':"Phrase secrète incorrect",
118 'changePasswordFormWrongRetypePassphraseWarning':"Votre phrase secrète ne correspond pas, veuillez la saisir à nouveau", 116 'changePasswordFormWrongRetypePassphraseWarning':"Votre phrase secrète ne correspond pas, veuillez la saisir à nouveau",
119 'changePasswordFormSafetyCheckWarning':"Veuillez lire et cocher la case-à-cocher ci-dessous", 117 'changePasswordFormSafetyCheckWarning':"Veuillez lire et cocher la case-à-cocher ci-dessous",
120 'changePasswordFormProgressDialogTitle':"Changement des identifiants utilisateurs", 118 'changePasswordFormProgressDialogTitle':"Changement des identifiants utilisateurs",
121 'changePasswordFormProgressDialogConnectedMessageTitle':"Connecté", 119 'changePasswordFormProgressDialogConnectedMessageTitle':"Connecté",
122 'changePasswordFormProgressDialogConnectedMessageText':"Terminé", 120 'changePasswordFormProgressDialogConnectedMessageText':"Terminé",
123 'changePasswordFormProgressDialogErrorMessageTitle':"Erreur", 121 'changePasswordFormProgressDialogErrorMessageTitle':"Erreur",
124 'changePasswordFormProgressDialogErrorMessageText':"Changement de identifiants échoué!", 122 'changePasswordFormProgressDialogErrorMessageText':"Changement de identifiants échoué!",
125 'changeCredentialsPanelEncryptingDataMessageTitle':"Changement de votre phrase secrète", 123 'changeCredentialsPanelEncryptingDataMessageTitle':"Changement de votre phrase secrète",
126 'changeCredentialsPanelEncryptingDataMessageText':"Cryptage local des identifiants", 124 'changeCredentialsPanelEncryptingDataMessageText':"Cryptage local des identifiants",
127 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"Modifier votre phrase secrète", 125 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"Modifier votre phrase secrète",
128 'changeCredentialsPanelCreatingNewCredentialsMessageText':"Mettre à jour vos identifiants", 126 'changeCredentialsPanelCreatingNewCredentialsMessageText':"Mettre à jour vos identifiants",
129 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Modifier votre phrase secrète", 127 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Modifier votre phrase secrète",
130 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Téléchargement de vos identifiants sur Clipperz.com", 128 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Téléchargement de vos identifiants sur Clipperz.com",
131 'changeCredentialsPanelDoneMessageTitle':"Modifier votre phrase secrète", 129 'changeCredentialsPanelDoneMessageTitle':"Modifier votre phrase secrète",
132 'changeCredentialsPanelDoneMessageText':"Terminé", 130 'changeCredentialsPanelDoneMessageText':"Terminé",
133 'manageOTPTabLabel':"Mettre à jour votre phrase secrète à usage unique", 131 'manageOTPTabLabel':"Mettre à jour votre phrase secrète à usage unique",
134 'manageOTPTabTitle':"Mettre à jour votre phrase secrète à usage unique", 132 'manageOTPTabTitle':"Mettre à jour votre phrase secrète à usage unique",
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> ", 133 '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> ",
136 'accountPreferencesLabel':"Préférences", 134 'accountPreferencesLabel':"Préférences",
137 'accountPreferencesTabTitle':"Préférences", 135 'accountPreferencesTabTitle':"Préférences",
138 'accountPreferencesLanguageTitle':"Choix de la langue", 136 'accountPreferencesLanguageTitle':"Choix de la langue",
139 'accountPreferencesLanguageDescription':"<p>Choisissez la langue d'affichage de Clipperz dans la liste suivante.</p> ", 137 'accountPreferencesLanguageDescription':"<p>Choisissez la langue d'affichage de Clipperz dans la liste suivante.</p> ",
140 'accountPreferencesInterfaceTitle':"Personnalisation de l'interface", 138 'accountPreferencesInterfaceTitle':"Personnalisation de l'interface",
141 'accountPreferencesInterfaceDescription':"<p>Ajustez l'interface de Clipperz à vos besoins.</p> ", 139 'accountPreferencesInterfaceDescription':"<p>Ajustez l'interface de Clipperz à vos besoins.</p> ",
142 'saveUserPreferencesFormSubmitLabel':"Enregistrer", 140 'saveUserPreferencesFormSubmitLabel':"Enregistrer",
143 'cancelUserPreferencesFormSubmitLabel':"Annuler", 141 'cancelUserPreferencesFormSubmitLabel':"Annuler",
144 'accountPreferencesSavingPanelTitle_Step1':"Enregistrement des préférences", 142 'accountPreferencesSavingPanelTitle_Step1':"Enregistrement des préférences",
145 'accountPreferencesSavingPanelText_Step1':"Chiffrement local de vos préférences", 143 'accountPreferencesSavingPanelText_Step1':"Chiffrement local de vos préférences",
146 'accountPreferencesSavingPanelTitle_Step2':"Enregistrement des préférences", 144 'accountPreferencesSavingPanelTitle_Step2':"Enregistrement des préférences",
147 'accountPreferencesSavingPanelText_Step2':"Transmission des préférences chiffrées au serveur", 145 'accountPreferencesSavingPanelText_Step2':"Transmission des préférences chiffrées au serveur",
148 'deleteAccountTabLabel':"Supprimer votre compte", 146 'deleteAccountTabLabel':"Supprimer votre compte",
149 'deleteAccountTabTitle':"Supprimer votre compte", 147 'deleteAccountTabTitle':"Supprimer votre compte",
150 'deleteAccountFormUsernameLabel':"nom d’utilisateur", 148 'deleteAccountFormUsernameLabel':"nom d’utilisateur",
151 'deleteAccountFormPassphraseLabel':"phrase secrète", 149 'deleteAccountFormPassphraseLabel':"phrase secrète",
152 'deleteAccountFormSafetyCheckboxLabel':"Je sais que toute mes données seront supprimés et que cette action sera irréversible.", 150 'deleteAccountFormSafetyCheckboxLabel':"Je sais que toute mes données seront supprimés et que cette action sera irréversible.",
153 'deleteAccountFormSubmitLabel':"Supprimer mon compte", 151 'deleteAccountFormSubmitLabel':"Supprimer mon compte",
154 'deleteAccountFormWrongUsernameWarning':"Nom d’utilisateur incorrect", 152 'deleteAccountFormWrongUsernameWarning':"Nom d’utilisateur incorrect",
155 'deleteAccountFormWrongPassphraseWarning':"Phrase secrète incorrect", 153 'deleteAccountFormWrongPassphraseWarning':"Phrase secrète incorrect",
156 'deleteAccountFormSafetyCheckWarning':"Veuillez lire et cocher la case-à-cocher ci-dessous.", 154 'deleteAccountFormSafetyCheckWarning':"Veuillez lire et cocher la case-à-cocher ci-dessous.",
157 'accountPanelDeletingAccountPanelConfirmationTitle':"ATTENTION", 155 'accountPanelDeletingAccountPanelConfirmationTitle':"ATTENTION",
158 'accountPanelDeleteAccountPanelConfirmationText':"Êtes-vous sûr de vouloir supprimer ce compte?", 156 'accountPanelDeleteAccountPanelConfirmationText':"Êtes-vous sûr de vouloir supprimer ce compte?",
159 'accountPanelDeleteAccountPanelConfirmButtonLabel':"Oui", 157 'accountPanelDeleteAccountPanelConfirmButtonLabel':"Oui",
160 'accountPanelDeleteAccountPanelDenyButtonLabel':"Non", 158 'accountPanelDeleteAccountPanelDenyButtonLabel':"Non",
161 'offlineCopyTabLabel':"Copie locale", 159 'offlineCopyTabLabel':"Copie locale",
162 'offlineCopyTabTitle':"Copie locale", 160 'offlineCopyTabTitle':"Copie locale",
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> ", 161 '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> ",
164 'offlineCopyDownloadLinkLabel':"Télécharger", 162 'offlineCopyDownloadLinkLabel':"Télécharger",
165 'sharingTabLabel':"Partager", 163 'sharingTabLabel':"Partager",
166 'sharingTabTitle':"Partager", 164 'sharingTabTitle':"Partager",
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> ", 165 '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> ",
168 'importTabLabel':"Importer", 166 'importTabLabel':"Importer",
169 'importTabTitle':"Importer", 167 'importTabTitle':"Importer",
170 'importTabDescription':"<p> <b>Prochainement disponible ...</b> </p> ", 168 'importTabDescription':"<p> <b>Prochainement disponible ...</b> </p> ",
171 'printingTabLabel':"Exporter", 169 'printingTabLabel':"Exporter",
172 'printingTabTitle':"Exporter", 170 'printingTabTitle':"Exporter",
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> ", 171 '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> ",
174 'printingLinkLabel':"Version imprimable", 172 'printingLinkLabel':"Version imprimable",
175 'contactsTabLabel':"Contacts", 173 'contactsTabLabel':"Contacts",
176 'contactsTabTitle':"Contacts", 174 'contactsTabTitle':"Contacts",
177 'passwordGeneratorTabLabel':"Générateur de mot de passe", 175 'passwordGeneratorTabLabel':"Générateur de mot de passe",
178 'bookmarkletTabLabel':"Bookmarklet", 176 'bookmarkletTabLabel':"Bookmarklet",
179 'passwordGeneratorTabTitle':"Générateur de mot de passe", 177 'passwordGeneratorTabTitle':"Générateur de mot de passe",
180 'bookmarkletTabTitle':"Bookmarklet", 178 'bookmarkletTabTitle':"Bookmarklet",
181 'paswordGeneratorTabDescription':"<p> </p> ", 179 'paswordGeneratorTabDescription':"<p> </p> ",
182 'passwordGeneratorTabButtonLabel':" Générer un mot de passe", 180 'passwordGeneratorTabButtonLabel':" Générer un mot de passe",
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> ", 181 '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> ",
184 'bookmarkletTabBookmarkletTitle':"Ajouter à Clipperz", 182 'bookmarkletTabBookmarkletTitle':"Ajouter à Clipperz",
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> ", 183 '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> ",
186 'mainPanelDirectLoginBlockLabel':"Accès directs", 184 'mainPanelDirectLoginBlockLabel':"Accès directs",
187 'directLinkReferenceShowButtonLabel':"voir", 185 'directLinkReferenceShowButtonLabel':"voir",
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> ", 186 '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> ",
189 'mainPanelRecordsBlockLabel':"Cartes", 187 'mainPanelRecordsBlockLabel':"Cartes",
190 'mainPanelAddRecordButtonLabel':"Ajouter une nouvelle carte", 188 'mainPanelAddRecordButtonLabel':"Ajouter une nouvelle carte",
191 'mainPanelRemoveRecordButtonLabel':"Supprimer une carte", 189 'mainPanelRemoveRecordButtonLabel':"Supprimer une carte",
192 'mainPanelRecordFilterBlockAllLabel':"tous", 190 'mainPanelRecordFilterBlockAllLabel':"tous",
193 'mainPanelRecordFilterBlockTagsLabel':"tags", 191 'mainPanelRecordFilterBlockTagsLabel':"tags",
194 'mainPanelRecordFilterBlockSearchLabel':"chercher", 192 'mainPanelRecordFilterBlockSearchLabel':"chercher",
195 'recordDetailNoRecordAtAllTitle':"Bienvenue sur Clipperz!", 193 'recordDetailNoRecordAtAllTitle':"Bienvenue sur Clipperz!",
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> ", 194 '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> ",
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> ", 195 '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> ",
198 'newRecordWizardBookmarkletConfigurationTitle':"Accès directs", 196 'newRecordWizardBookmarkletConfigurationTitle':"Accès directs",
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> ", 197 '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> ",
200 'newRecordWizardCreateButtonLabel':"Créer", 198 'newRecordWizardCreateButtonLabel':"Créer",
201 'newRecordWizardCancelButtonLabel':"Annuler", 199 'newRecordWizardCancelButtonLabel':"Annuler",
202 'recordTemplates':{ 200 'recordTemplates':{
203 'WebAccount':{ 201 'WebAccount':{
204 'title':"Mot de passe web", 202 'title':"Mot de passe web",
205 'description':"<p>Une carte toute simple pour enregistrer les informations d'identification de vos services en ligne.</p> ", 203 'description':"<p>Une carte toute simple pour enregistrer les informations d'identification de vos services en ligne.</p> ",
206 'fields':{ 204 'fields':{
207 'URL':"Adresse web", 205 'URL':"Adresse web",
208 'TXT':"Nom d'utilisateur ou email", 206 'TXT':"Nom d'utilisateur ou email",
209 'PWD':"Mot de passe" 207 'PWD':"Mot de passe"
210 } 208 }
211 }, 209 },
212 'BankAccount':{ 210 'BankAccount':{
213 'title':"Compte bancaire", 211 'title':"Compte bancaire",
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> ", 212 'description':"<p>Enregistrer de façon sécurisée vos numéros de compte bancaire et vos identifiants de service bancaire en ligne.</p> ",
215 'fields':{ 213 'fields':{
216 'TXT':"Banque", 214 'TXT':"Banque",
217 'TXT':"N° de compte", 215 'TXT':"N° de compte",
218 'URL':"Adresse web du site", 216 'URL':"Adresse web du site",
219 'TXT':"Identifiant", 217 'TXT':"Identifiant",
220 'PWD':"Mot de passe" 218 'PWD':"Mot de passe"
221 } 219 }
222 }, 220 },
223 'CreditCard':{ 221 'CreditCard':{
224 'title':"Carte bancaire", 222 'title':"Carte bancaire",
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> ", 223 '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> ",
226 'fields':{ 224 'fields':{
227 'TXT':"Type (Visa, AmEx, ...)", 225 'TXT':"Type (Visa, AmEx, ...)",
228 'TXT':"Numéro", 226 'TXT':"Numéro",
229 'TXT':"Nom du porteur", 227 'TXT':"Nom du porteur",
230 'TXT':"Date de validité", 228 'TXT':"Date de validité",
231 'TXT':"Code de contrôle", 229 'TXT':"Code de contrôle",
232 'PWD':"Code secret", 230 'PWD':"Code secret",
233 'URL':"Site web", 231 'URL':"Site web",
234 'TXT':"Identifiant", 232 'TXT':"Identifiant",
235 'PWD':"Mot de passe" 233 'PWD':"Mot de passe"
236 } 234 }
237 }, 235 },
238 'AddressBookEntry':{ 236 'AddressBookEntry':{
239 'title':"Carnet d'adresse", 237 'title':"Carnet d'adresse",
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> ", 238 'description':"<p>Clipperz peux aussi être utilisé comme un nouveau carnet d'adresse privé. Utilisez ce modèle pour ajouter des contacts facilement.</p> ",
241 'fields':{ 239 'fields':{
242 'TXT':"Nom", 240 'TXT':"Nom",
243 'TXT':"Adresse eMail", 241 'TXT':"Adresse eMail",
244 'TXT':"Téléphone", 242 'TXT':"Téléphone",
245 'TXT':"Mobile", 243 'TXT':"Mobile",
246 'ADDR':"Adresse" 244 'ADDR':"Adresse"
247 } 245 }
248 }, 246 },
249 'Custom':{ 247 'Custom':{
250 'title':"Carte personnalisée", 248 'title':"Carte personnalisée",
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> ", 249 '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> ",
252 'fields':{ 250 'fields':{
253 'TXT':"Titre du champ 1", 251 'TXT':"Titre du champ 1",
254 'TXT':"Titre du champ 2", 252 'TXT':"Titre du champ 2",
255 'TXT':"Titre du champ 3" 253 'TXT':"Titre du champ 3"
256 } 254 }
257 } 255 }
258}, 256},
259 'recordFieldTypologies':{ 257 'recordFieldTypologies':{
260 'TXT':{ 258 'TXT':{
261 'description':"simple text field", 259 'description':"simple text field",
262 'shortDescription':"texte" 260 'shortDescription':"texte"
263 }, 261 },
264 'PWD':{ 262 'PWD':{
265 'description':"simple text field, with default status set to hidden", 263 'description':"simple text field, with default status set to hidden",
266 'shortDescription':"mot de passe" 264 'shortDescription':"mot de passe"
267 }, 265 },
268 'URL':{ 266 'URL':{
269 'description':"simple text field in edit mode, that became an active url in view mode", 267 'description':"simple text field in edit mode, that became an active url in view mode",
270 'shortDescription':"adresse de site web" 268 'shortDescription':"adresse de site web"
271 }, 269 },
272 'DATE':{ 270 'DATE':{
273 'description':"a value set with a calendar helper", 271 'description':"a value set with a calendar helper",
274 'shortDescription':"date" 272 'shortDescription':"date"
275 }, 273 },
276 'ADDR':{ 274 'ADDR':{
277 'description':"just like the URL, but the active link points to Google Maps (or similar service) passing the address value as argument", 275 'description':"just like the URL, but the active link points to Google Maps (or similar service) passing the address value as argument",
278 'shortDescription':"adresse" 276 'shortDescription':"adresse"
279 }, 277 },
280 'CHECK':{ 278 'CHECK':{
281 'description':"check description", 279 'description':"check description",
282 'shortDescription':"check" 280 'shortDescription':"check"
283 }, 281 },
284 'RADIO':{ 282 'RADIO':{
285 'description':"radio description", 283 'description':"radio description",
286 'shortDescription':"radio" 284 'shortDescription':"radio"
287 }, 285 },
288 'SELECT':{ 286 'SELECT':{
289 'description':"select description", 287 'description':"select description",
290 'shortDescription':"select" 288 'shortDescription':"select"
291 } 289 }
292}, 290},
293 'newRecordPanelGeneralExceptionTitle':"Erreur", 291 'newRecordPanelGeneralExceptionTitle':"Erreur",
294 'newRecordPanelGeneralExceptionMessage':"Le code de configuration n'est pas valide. Copiez le depuis la fenêtre du bookmarklet, et essayez à nouveau.", 292 'newRecordPanelGeneralExceptionMessage':"Le code de configuration n'est pas valide. Copiez le depuis la fenêtre du bookmarklet, et essayez à nouveau.",
295 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"Erreur", 293 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"Erreur",
296 'newRecordPanelWrongBookmarkletVersionExceptionMessage':"Ce code de configuration provient d'un ancien bookmarklet. Mettez votre bookmarklet à jour, puis essayez de nouveau.", 294 'newRecordPanelWrongBookmarkletVersionExceptionMessage':"Ce code de configuration provient d'un ancien bookmarklet. Mettez votre bookmarklet à jour, puis essayez de nouveau.",
297 'newRecordPanelExceptionPanelCloseButtonLabel':"Annuler", 295 'newRecordPanelExceptionPanelCloseButtonLabel':"Annuler",
298 'mainPanelDeletingRecordPanelConfirmationTitle':"Suppression de la carte sélectionnée", 296 'mainPanelDeletingRecordPanelConfirmationTitle':"Suppression de la carte sélectionnée",
299 'mainPanelDeleteRecordPanelConfirmationText':"Voulez vous vraiment supprimer la carte sélectionnée?", 297 'mainPanelDeleteRecordPanelConfirmationText':"Voulez vous vraiment supprimer la carte sélectionnée?",
300 'mainPanelDeleteRecordPanelConfirmButtonLabel':"Oui", 298 'mainPanelDeleteRecordPanelConfirmButtonLabel':"Oui",
301 'mainPanelDeleteRecordPanelDenyButtonLabel':"Non", 299 'mainPanelDeleteRecordPanelDenyButtonLabel':"Non",
302 'mainPanelDeletingRecordPanelInitialTitle':"Suppression de la carte", 300 'mainPanelDeletingRecordPanelInitialTitle':"Suppression de la carte",
303 'mainPanelDeletingRecordPanelCompletedText':"Terminé", 301 'mainPanelDeletingRecordPanelCompletedText':"Terminé",
304 'deleteRecordPanelCollectRecordDataMessageTitle':"Supprimer la carte", 302 'deleteRecordPanelCollectRecordDataMessageTitle':"Supprimer la carte",
305 'deleteRecordPanelCollectRecordDataMessageText':"Mise à jour de la liste des cartes", 303 'deleteRecordPanelCollectRecordDataMessageText':"Mise à jour de la liste des cartes",
306 'deleteRecordPanelEncryptUserDataMessageTitle':"Supprimer la carte", 304 'deleteRecordPanelEncryptUserDataMessageTitle':"Supprimer la carte",
307 'deleteRecordPanelEncryptUserDataMessageText':"Chiffrement local des en-têtes de carte", 305 'deleteRecordPanelEncryptUserDataMessageText':"Chiffrement local des en-têtes de carte",
308 'deleteRecordPanelSendingDataToTheServerMessageTitle':"Supprimer la carteDelete card", 306 'deleteRecordPanelSendingDataToTheServerMessageTitle':"Supprimer la carteDelete card",
309 'deleteRecordPanelSendingDataToTheServerMessageText':"Transmission des en-têtes chiffrées à Clipperz", 307 'deleteRecordPanelSendingDataToTheServerMessageText':"Transmission des en-têtes chiffrées à Clipperz",
310 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"Supprimer la carte", 308 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"Supprimer la carte",
311 'deleteRecordPanelUpdatingTheInterfaceMessageText':"Mise à jour de l'interface", 309 'deleteRecordPanelUpdatingTheInterfaceMessageText':"Mise à jour de l'interface",
312 'recordDetailNoRecordSelectedTitle':"Aucune carte sélectionnée", 310 'recordDetailNoRecordSelectedTitle':"Aucune carte sélectionnée",
313 'recordDetailNoRecordSelectedDescription':"<p>Veuillez selectionner une carte dans la liste de gauche.</p> ", 311 'recordDetailNoRecordSelectedDescription':"<p>Veuillez selectionner une carte dans la liste de gauche.</p> ",
314 'recordDetailLoadingRecordMessage':"Téléchargement de la carte chiffrée depuis Clipperz", 312 'recordDetailLoadingRecordMessage':"Téléchargement de la carte chiffrée depuis Clipperz",
315 'recordDetailDecryptingRecordMessage':"Déchiffrement local des informations de la carte", 313 'recordDetailDecryptingRecordMessage':"Déchiffrement local des informations de la carte",
316 'recordDetailLoadingRecordVersionMessage':"Téléchargement de la dernière version de la carte", 314 'recordDetailLoadingRecordVersionMessage':"Téléchargement de la dernière version de la carte",
317 'recordDetailDecryptingRecordVersionMessage':"Déchiffrement local de la dernière version", 315 'recordDetailDecryptingRecordVersionMessage':"Déchiffrement local de la dernière version",
318 'recordDetailLoadingErrorMessageTitle':"Erreur lors du téléchargement de la carte", 316 'recordDetailLoadingErrorMessageTitle':"Erreur lors du téléchargement de la carte",
319 'recordDetailNotesLabel':"Notes", 317 'recordDetailNotesLabel':"Notes",
320 'recordDetailLabelFieldColumnLabel':"Titre du champ", 318 'recordDetailLabelFieldColumnLabel':"Titre du champ",
321 'recordDetailDataFieldColumnLabel':"Données du champ", 319 'recordDetailDataFieldColumnLabel':"Données du champ",
322 'recordDetailTypeFieldColumnLabel':"Type", 320 'recordDetailTypeFieldColumnLabel':"Type",
323 'recordDetailSavingChangesMessagePanelInitialTitle':"Enregistrement de la carte", 321 'recordDetailSavingChangesMessagePanelInitialTitle':"Enregistrement de la carte",
324 'recordDetailAddFieldButtonLabel':"Ajouter un champ", 322 'recordDetailAddFieldButtonLabel':"Ajouter un champ",
325 'recordDetailPasswordFieldHelpLabel':"pour copier le mot de passe, cliquez sur les étoiles, puis Ctrl-C", 323 'recordDetailPasswordFieldHelpLabel':"pour copier le mot de passe, cliquez sur les étoiles, puis Ctrl-C",
326 'recordDetailPasswordFieldScrambleLabel':"dissimuler", 324 'recordDetailPasswordFieldScrambleLabel':"dissimuler",
327 'recordDetailPasswordFieldUnscrambleLabel':"en clair", 325 'recordDetailPasswordFieldUnscrambleLabel':"en clair",
328 'recordDetailDirectLoginBlockTitle':"Accès directs", 326 'recordDetailDirectLoginBlockTitle':"Accès directs",
329 'recordDetailNewDirectLoginDescription':"<p>Configuration de l'accès direct</p> ", 327 'recordDetailNewDirectLoginDescription':"<p>Configuration de l'accès direct</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> ", 328 '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> ",
331 'recordDetailAddNewDirectLoginButtonLabel':"Ajouter un accès direct", 329 'recordDetailAddNewDirectLoginButtonLabel':"Ajouter un accès direct",
332 'recordDetailEditButtonLabel':"Modifier", 330 'recordDetailEditButtonLabel':"Modifier",
333 'recordDetailSaveButtonLabel':"Sauver", 331 'recordDetailSaveButtonLabel':"Sauver",
334 'recordDetailCancelButtonLabel':"Annuler", 332 'recordDetailCancelButtonLabel':"Annuler",
335 'newRecordTitleLabel':"_nouvelle carte_", 333 'newRecordTitleLabel':"_nouvelle carte_",
336 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"Enregistrement de la carte", 334 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"Enregistrement de la carte",
337 'recordSaveChangesPanelCollectRecordInfoMessageText':"Updating card headers", 335 'recordSaveChangesPanelCollectRecordInfoMessageText':"Updating card headers",
338 'recordSaveChangesPanelEncryptUserDataMessageTitle':"Sauvegarde de la carte", 336 'recordSaveChangesPanelEncryptUserDataMessageTitle':"Sauvegarde de la carte",
339 'recordSaveChangesPanelEncryptUserDataMessageText':"Cryptage local des en-têtes chiffrés", 337 'recordSaveChangesPanelEncryptUserDataMessageText':"Cryptage local des en-têtes chiffrés",
340 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"Sauvegarde de la carte", 338 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"Sauvegarde de la carte",
341 'recordSaveChangesPanelEncryptRecordDataMessageText':"Cryptage local des en-têtes chiffrés", 339 'recordSaveChangesPanelEncryptRecordDataMessageText':"Cryptage local des en-têtes chiffrés",
342 'recordSaveChangesPanelEncryptRecordVersionDataMessageTitle':"Sauvegarde de la carte", 340 'recordSaveChangesPanelEncryptRecordVersionDataMessageTitle':"Sauvegarde de la carte",
343 'recordSaveChangesPanelEncryptRecordVersionDataMessageText':"Cryptage local des données de version de la carte", 341 'recordSaveChangesPanelEncryptRecordVersionDataMessageText':"Cryptage local des données de version de la carte",
344 'recordSaveChangesPanelSendingDataToTheServerMessageTitle':"Sauvegarde de la carte", 342 'recordSaveChangesPanelSendingDataToTheServerMessageTitle':"Sauvegarde de la carte",
345 'recordSaveChangesPanelSendingDataToTheServerMessageText':"Téléchargement des cartes d’en-têtes chiffrés depuis Clipperz", 343 'recordSaveChangesPanelSendingDataToTheServerMessageText':"Téléchargement des cartes d’en-têtes chiffrés depuis Clipperz",
346 'recordSaveChangesPanelUpdatingTheInterfaceMessageTitle':"Sauvegarde de la carte", 344 'recordSaveChangesPanelUpdatingTheInterfaceMessageTitle':"Sauvegarde de la carte",
347 'recordSaveChangesPanelUpdatingTheInterfaceMessageText':"Mise à jour de l'interface", 345 'recordSaveChangesPanelUpdatingTheInterfaceMessageText':"Mise à jour de l'interface",
348 'passwordGeneratorPanelTitle':"Générateur de mot de passe", 346 'passwordGeneratorPanelTitle':"Générateur de mot de passe",
349 'passwordGeneratorPanelOkLabel':"Ok", 347 'passwordGeneratorPanelOkLabel':"Ok",
350 'passwordGeneratorPanelCancelLabel':"Annuler", 348 'passwordGeneratorPanelCancelLabel':"Annuler",
351 'passwordGeneratorLengthLabel':"longueur:", 349 'passwordGeneratorLengthLabel':"longueur:",
352 //'DWRUtilLoadingMessage':"Chargement des données ...", 350 //'DWRUtilLoadingMessage':"Chargement des données ...",
353 'comingSoon':"Bientôt en ligne ...", 351 'comingSoon':"Bientôt en ligne ...",
354 'panelCollectingEntryopyMessageText':"Rassemblement d'entropie", 352 'panelCollectingEntryopyMessageText':"Rassemblement d'entropie",
355 'directLoginConfigurationCheckBoxFieldSelectedValue':"Oui", 353 'directLoginConfigurationCheckBoxFieldSelectedValue':"Oui",
356 'directLoginConfigurationCheckBoxFieldNotSelectedValue':"Non", 354 'directLoginConfigurationCheckBoxFieldNotSelectedValue':"Non",
357 355
358__syntaxFix__: "syntax fix" 356__syntaxFix__: "syntax fix"
359}); 357});
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 70a59c8..fa94311 100644
--- a/frontend/beta/js/Clipperz/PM/Strings/Strings_he-IL.js
+++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_he-IL.js
@@ -1,37 +1,35 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26//============================================================================= 24//=============================================================================
27// 25//
28 // H E B R E W (he_IL) 26 // H E B R E W (he_IL)
29// 27//
30//============================================================================= 28//=============================================================================
31 29
32Clipperz.PM.Strings.Languages['he-il'] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 30Clipperz.PM.Strings.Languages['he-il'] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], {
33 31
34 //------------------------------------------------------------------------- 32 //-------------------------------------------------------------------------
35 __syntaxFix__: "syntax fix" 33 __syntaxFix__: "syntax fix"
36}); 34});
37 35
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 acf6acd..0499376 100644
--- a/frontend/beta/js/Clipperz/PM/Strings/Strings_it-IT.js
+++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_it-IT.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26Clipperz.PM.Strings.Languages['it-IT'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 24Clipperz.PM.Strings.Languages['it-IT'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], {
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> ", 25 '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> ",
28 'loginFormTitle':"accedi a Clipperz", 26 'loginFormTitle':"accedi a Clipperz",
29 'loginFormUsernameLabel':"Utente", 27 'loginFormUsernameLabel':"Utente",
30 'loginFormPassphraseLabel':"frase segreta", 28 'loginFormPassphraseLabel':"frase segreta",
31 'loginFormDontHaveAnAccountLabel':"non ti sei ancora registrato?", 29 'loginFormDontHaveAnAccountLabel':"non ti sei ancora registrato?",
32 'loginFormCreateOneLabel':"registrati adesso", 30 'loginFormCreateOneLabel':"registrati adesso",
33 'loginFormForgotYourCredentialsLabel':"hai perso i dati di accesso?", 31 'loginFormForgotYourCredentialsLabel':"hai perso i dati di accesso?",
34 'loginFormAarghThatsBadLabel':"aargh! questo non è bello!", 32 'loginFormAarghThatsBadLabel':"aargh! questo non è bello!",
35 'loginFormAfraidOfMaliciousScriptsLabel':"non ti fidi?", 33 'loginFormAfraidOfMaliciousScriptsLabel':"non ti fidi?",
36 'loginFormVerifyTheCodeLabel':"controlla il codice", 34 'loginFormVerifyTheCodeLabel':"controlla il codice",
37 'loginFormButtonLabel':"Accedi", 35 'loginFormButtonLabel':"Accedi",
38 'loginFormOneTimePasswordCheckboxLabel':"usa un codice “usa e getta”", 36 'loginFormOneTimePasswordCheckboxLabel':"usa un codice “usa e getta”",
39 'loginFormOneTimePasswordCheckboxDescription':"", 37 'loginFormOneTimePasswordCheckboxDescription':"",
40 'loginPanelSwithLanguageDescription':"<h5>Seleziona la tua lingua preferita</h5> ", 38 'loginPanelSwithLanguageDescription':"<h5>Seleziona la tua lingua preferita</h5> ",
41 'browserCompatibilityDescription':"<p>Clipperz consiglia Firefox per una maggiore sicurezza. Clipperz supporta anche Opera ed Internet Explorer.</p> ", 39 'browserCompatibilityDescription':"<p>Clipperz consiglia Firefox per una maggiore sicurezza. Clipperz supporta anche Opera ed Internet Explorer.</p> ",
42 'OTPloginMessagePanelInitialTitle':"Accesso con codice “usa e getta”", 40 'OTPloginMessagePanelInitialTitle':"Accesso con codice “usa e getta”",
43 'OTPloginMessagePanelInitialText':"Invio delle credenziali OTP ...", 41 'OTPloginMessagePanelInitialText':"Invio delle credenziali OTP ...",
44 'OTPloginMessagePanelLoadingTitle':"Accesso con codice “usa e getta”", 42 'OTPloginMessagePanelLoadingTitle':"Accesso con codice “usa e getta”",
45 'OTPloginMessagePanelLoadingText':"Caricamento dei dati di autenticazione criptati ...", 43 'OTPloginMessagePanelLoadingText':"Caricamento dei dati di autenticazione criptati ...",
46 'OTPloginMessagePanelProcessingTitle':"Accesso con codice “usa e getta”", 44 'OTPloginMessagePanelProcessingTitle':"Accesso con codice “usa e getta”",
47 'OTPloginMessagePanelProcessingText':"Decodifica locale dei dati di autenticazione ...", 45 'OTPloginMessagePanelProcessingText':"Decodifica locale dei dati di autenticazione ...",
48 'loginMessagePanelInitialTitle':"Connessione in corso ...", 46 'loginMessagePanelInitialTitle':"Connessione in corso ...",
49 'loginMessagePanelInitialText':"---", 47 'loginMessagePanelInitialText':"---",
50 'loginMessagePanelInitialButtonLabel':"Annulla", 48 'loginMessagePanelInitialButtonLabel':"Annulla",
51 'loginMessagePanelConnectedTitle':"Connesso", 49 'loginMessagePanelConnectedTitle':"Connesso",
52 'loginMessagePanelConnectedText':"Fatto", 50 'loginMessagePanelConnectedText':"Fatto",
53 'loginMessagePanelFailureTitle':"Errore", 51 'loginMessagePanelFailureTitle':"Errore",
54 'loginMessagePanelFailureText':"Connessione fallita", 52 'loginMessagePanelFailureText':"Connessione fallita",
55 'loginMessagePanelFailureButtonLabel':"Chiudi", 53 'loginMessagePanelFailureButtonLabel':"Chiudi",
56 'connectionLoginSendingCredentialsMessageTitle':"Verifica delle credenziali", 54 'connectionLoginSendingCredentialsMessageTitle':"Verifica delle credenziali",
57 'connectionLoginSendingCredentialsMessageText':"Invio delle credenziali", 55 'connectionLoginSendingCredentialsMessageText':"Invio delle credenziali",
58 'connectionLoginCredentialsVerificationMessageTitle':"Verifica delle credenziali", 56 'connectionLoginCredentialsVerificationMessageTitle':"Verifica delle credenziali",
59 'connectionLoginCredentialsVerificationMessageText':"Esecuzione dell&#x27;autenticazione SRP ...", 57 'connectionLoginCredentialsVerificationMessageText':"Esecuzione dell&#x27;autenticazione SRP ...",
60 'connectionLoginDoneMessageTitle':"Verifica delle credenziali", 58 'connectionLoginDoneMessageTitle':"Verifica delle credenziali",
61 'connectionLoginDoneMessageText':"Connesso", 59 'connectionLoginDoneMessageText':"Connesso",
62 'userLoginPanelUpgradingUserCredentialsMessageTitle':"Verifica delle credenziali", 60 'userLoginPanelUpgradingUserCredentialsMessageTitle':"Verifica delle credenziali",
63 'userLoginPanelUpgradingUserCredentialsMessageText':"Aggiornamento delle credenziali ad un nuovo schema di autenticazione", 61 'userLoginPanelUpgradingUserCredentialsMessageText':"Aggiornamento delle credenziali ad un nuovo schema di autenticazione",
64 'userLoginPanelConnectedMessageTitle':"Utente autenticato", 62 'userLoginPanelConnectedMessageTitle':"Utente autenticato",
65 'userLoginPanelConnectedMessageText':"Autenticazione eseguita con successo", 63 'userLoginPanelConnectedMessageText':"Autenticazione eseguita con successo",
66 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"Verifica delle credenziali", 64 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"Verifica delle credenziali",
67 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"Tentativo con vecchio schema di autenticazione", 65 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"Tentativo con vecchio schema di autenticazione",
68 'userLoginPanelLoadingUserDataMessageTitle':"Utente autenticato", 66 'userLoginPanelLoadingUserDataMessageTitle':"Utente autenticato",
69 'userLoginPanelLoadingUserDataMessageText':"Scarica le intestazioni criptate delle schede da Clipperz", 67 'userLoginPanelLoadingUserDataMessageText':"Scarica le intestazioni criptate delle schede da Clipperz",
70 'userLoginPanelDecryptingUserDataMessageTitle':"Utente autenticato", 68 'userLoginPanelDecryptingUserDataMessageTitle':"Utente autenticato",
71 'userLoginPanelDecryptingUserDataMessageText':"Decodifica locale dell&#x27;intestazione delle schede", 69 'userLoginPanelDecryptingUserDataMessageText':"Decodifica locale dell&#x27;intestazione delle schede",
72 'userLoginPanelDecryptingUserStatisticsMessageTitle':"Utente autenticato", 70 'userLoginPanelDecryptingUserStatisticsMessageTitle':"Utente autenticato",
73 'userLoginPanelDecryptingUserStatisticsMessageText':"Decodifica locale delle statistiche d&#x27;uso", 71 'userLoginPanelDecryptingUserStatisticsMessageText':"Decodifica locale delle statistiche d&#x27;uso",
74 'splashAlertTitle':"Benvenuto a Clipperz!", 72 'splashAlertTitle':"Benvenuto a Clipperz!",
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> ", 73 '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> ",
76 'splashAlertCloseButtonLabel':"Ok", 74 'splashAlertCloseButtonLabel':"Ok",
77 'registrationFormTitle':"crea il tuo utente", 75 'registrationFormTitle':"crea il tuo utente",
78 'registrationFormUsernameLabel':"Utente", 76 'registrationFormUsernameLabel':"Utente",
79 'registrationFormPassphraseLabel':"frase segreta", 77 'registrationFormPassphraseLabel':"frase segreta",
80 'registrationFormRetypePassphraseLabel':"ripeti frase segreta", 78 'registrationFormRetypePassphraseLabel':"ripeti frase segreta",
81 'registrationFormSafetyCheckLabel':"Sono consapevole che Clipperz non è in grado di recuperare una frase segreta dimenticata.", 79 'registrationFormSafetyCheckLabel':"Sono consapevole che Clipperz non è in grado di recuperare una frase segreta dimenticata.",
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> .", 80 'registrationFormTermsOfServiceCheckLabel':"Dichiaro di aver letto e di accettare i <a href=\"http://www.clipperz.com/terms_of_service\" target=\"_blank\">Termini del Servizio</a> .",
83 'registrationFormDoYouAlreadyHaveAnAccountLabel':"sei già un utente registrato?", 81 'registrationFormDoYouAlreadyHaveAnAccountLabel':"sei già un utente registrato?",
84 'registrationFormSimplyLoginLabel':"accedi subito", 82 'registrationFormSimplyLoginLabel':"accedi subito",
85 'registrationFormButtonLabel':"Registrati", 83 'registrationFormButtonLabel':"Registrati",
86 'registrationFormWarningMessageNotMatchingPassphrases':"Le frasi segrete non corrispondono, ripeti l&#x27;inserimento.", 84 'registrationFormWarningMessageNotMatchingPassphrases':"Le frasi segrete non corrispondono, ripeti l&#x27;inserimento.",
87 'registrationFormWarningMessageSafetyCheckNotSelected':"Leggi e spunta le condizioni sotto riportate.", 85 'registrationFormWarningMessageSafetyCheckNotSelected':"Leggi e spunta le condizioni sotto riportate.",
88 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"Per procedere devi accettare i Termini del Servizio.", 86 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"Per procedere devi accettare i Termini del Servizio.",
89 'registrationMessagePanelInitialTitle':"Registrazione in corso ...", 87 'registrationMessagePanelInitialTitle':"Registrazione in corso ...",
90 'registrationMessagePanelInitialText':"---", 88 'registrationMessagePanelInitialText':"---",
91 'registrationMessagePanelInitialButtonLabel':"Annulla", 89 'registrationMessagePanelInitialButtonLabel':"Annulla",
92 'registrationMessagePanelRegistrationDoneTitle':"Registrazione", 90 'registrationMessagePanelRegistrationDoneTitle':"Registrazione",
93 'registrationMessagePanelRegistrationDoneText':"Fatto", 91 'registrationMessagePanelRegistrationDoneText':"Fatto",
94 'registrationMessagePanelFailureTitle':"Registrazione fallita", 92 'registrationMessagePanelFailureTitle':"Registrazione fallita",
95 'registrationMessagePanelFailureButtonLabel':"Chiudi", 93 'registrationMessagePanelFailureButtonLabel':"Chiudi",
96 'connectionRegistrationSendingRequestMessageText':"Verifica delle credenziali", 94 'connectionRegistrationSendingRequestMessageText':"Verifica delle credenziali",
97 'connectionRegistrationSendingCredentialsMessageText':"Invio delle credenziali", 95 'connectionRegistrationSendingCredentialsMessageText':"Invio delle credenziali",
98 'registrationSplashPanelTitle':"Avviso di sicurezza", 96 'registrationSplashPanelTitle':"Avviso di sicurezza",
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> ", 97 '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> ",
100 'registrationSplashPanelUsernameLabel':"Utente", 98 'registrationSplashPanelUsernameLabel':"Utente",
101 'registrationSplashPanelPassphraseLabel':"frase segreta", 99 'registrationSplashPanelPassphraseLabel':"frase segreta",
102 'registrationSplashPanelShowPassphraseButtonLabel':"mostra la frase segreta", 100 'registrationSplashPanelShowPassphraseButtonLabel':"mostra la frase segreta",
103 'donateHeaderLinkLabel':"donazioni", 101 'donateHeaderLinkLabel':"donazioni",
104 'creditsHeaderLinkLabel':"credits", 102 'creditsHeaderLinkLabel':"credits",
105 'feedbackHeaderLinkLabel':"scrivici", 103 'feedbackHeaderLinkLabel':"scrivici",
106 'helpHeaderLinkLabel':"aiuto", 104 'helpHeaderLinkLabel':"aiuto",
107 'forumHeaderLinkLabel':"forum", 105 'forumHeaderLinkLabel':"forum",
108 'recordMenuLabel':"Schede", 106 'recordMenuLabel':"Schede",
109 'accountMenuLabel':"profilo", 107 'accountMenuLabel':"profilo",
110 'dataMenuLabel':"dati", 108 'dataMenuLabel':"dati",
111 'contactsMenuLabel':"Contatti", 109 'contactsMenuLabel':"Contatti",
112 'toolsMenuLabel':"strumenti", 110 'toolsMenuLabel':"strumenti",
113 'logoutMenuLabel':"esci", 111 'logoutMenuLabel':"esci",
114 'lockMenuLabel':"blocca", 112 'lockMenuLabel':"blocca",
115 'lockTitle':"Utente bloccato", 113 'lockTitle':"Utente bloccato",
116 'lockDescription':"<p>Per sbloccare il tuo utente inserisci la frase segreta</p> ", 114 'lockDescription':"<p>Per sbloccare il tuo utente inserisci la frase segreta</p> ",
117 'unlockButtonLabel':"Sblocca", 115 'unlockButtonLabel':"Sblocca",
118 'changePasswordTabLabel':"Cambia la tua frase segreta", 116 'changePasswordTabLabel':"Cambia la tua frase segreta",
119 'changePasswordTabTitle':"Cambia la tua frase segreta", 117 'changePasswordTabTitle':"Cambia la tua frase segreta",
120 'changePasswordFormUsernameLabel':"Utente", 118 'changePasswordFormUsernameLabel':"Utente",
121 'changePasswordFormOldPassphraseLabel':"attuale frase segreta", 119 'changePasswordFormOldPassphraseLabel':"attuale frase segreta",
122 'changePasswordFormNewPassphraseLabel':"nuova frase segreta", 120 'changePasswordFormNewPassphraseLabel':"nuova frase segreta",
123 'changePasswordFormRetypePassphraseLabel':"ripeti nuova frase segreta", 121 'changePasswordFormRetypePassphraseLabel':"ripeti nuova frase segreta",
124 'changePasswordFormSafetyCheckboxLabel':"Sono consapevole che Clipperz non è in grado di recuperare una frase segreta dimenticata.", 122 'changePasswordFormSafetyCheckboxLabel':"Sono consapevole che Clipperz non è in grado di recuperare una frase segreta dimenticata.",
125 'changePasswordFormSubmitLabel':"Cambia frase segreta", 123 'changePasswordFormSubmitLabel':"Cambia frase segreta",
126 'changePasswordFormWrongUsernameWarning':"Utente errato", 124 'changePasswordFormWrongUsernameWarning':"Utente errato",
127 'changePasswordFormWrongPassphraseWarning':"Frase segreta errata", 125 'changePasswordFormWrongPassphraseWarning':"Frase segreta errata",
128 'changePasswordFormWrongRetypePassphraseWarning':"Le frasi segrete non corrispondono, ripeti l&#x27;inserimento.", 126 'changePasswordFormWrongRetypePassphraseWarning':"Le frasi segrete non corrispondono, ripeti l&#x27;inserimento.",
129 'changePasswordFormSafetyCheckWarning':"Leggi e spunta le condizioni sotto riportate.", 127 'changePasswordFormSafetyCheckWarning':"Leggi e spunta le condizioni sotto riportate.",
130 'changePasswordFormProgressDialogTitle':"Aggiornamento credenziali", 128 'changePasswordFormProgressDialogTitle':"Aggiornamento credenziali",
131 'changePasswordFormProgressDialogEmptyText':"---", 129 'changePasswordFormProgressDialogEmptyText':"---",
132 'changePasswordFormProgressDialogConnectedMessageTitle':"Connesso", 130 'changePasswordFormProgressDialogConnectedMessageTitle':"Connesso",
133 'changePasswordFormProgressDialogConnectedMessageText':"Fatto", 131 'changePasswordFormProgressDialogConnectedMessageText':"Fatto",
134 'changePasswordFormProgressDialogErrorMessageTitle':"Errore", 132 'changePasswordFormProgressDialogErrorMessageTitle':"Errore",
135 'changePasswordFormProgressDialogErrorMessageText':"Aggiornamento credenziali fallito!", 133 'changePasswordFormProgressDialogErrorMessageText':"Aggiornamento credenziali fallito!",
136 'changeCredentialsPanelEncryptingDataMessageTitle':"Cambio della frase segreta", 134 'changeCredentialsPanelEncryptingDataMessageTitle':"Cambio della frase segreta",
137 'changeCredentialsPanelEncryptingDataMessageText':"Cripta localmente l&#x27;intestazione delle schede", 135 'changeCredentialsPanelEncryptingDataMessageText':"Cripta localmente l&#x27;intestazione delle schede",
138 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"Cambio della frase segreta", 136 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"Cambio della frase segreta",
139 'changeCredentialsPanelCreatingNewCredentialsMessageText':"Aggiornamento delle credenziali", 137 'changeCredentialsPanelCreatingNewCredentialsMessageText':"Aggiornamento delle credenziali",
140 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Cambio della frase segreta", 138 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Cambio della frase segreta",
141 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Carica le intestazioni criptate delle schede su Clipperz", 139 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Carica le intestazioni criptate delle schede su Clipperz",
142 'changeCredentialsPanelDoneMessageTitle':"Cambio della frase segreta", 140 'changeCredentialsPanelDoneMessageTitle':"Cambio della frase segreta",
143 'changeCredentialsPanelDoneMessageText':"Fatto", 141 'changeCredentialsPanelDoneMessageText':"Fatto",
144 'manageOTPTabLabel':"Codici di accesso “usa e getta”", 142 'manageOTPTabLabel':"Codici di accesso “usa e getta”",
145 'manageOTPTabTitle':"Codici di accesso “usa e getta”", 143 'manageOTPTabTitle':"Codici di accesso “usa e getta”",
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> ", 144 '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> ",
147 'oneTimePasswordReadOnlyMessage':"<h6>Attenzione!</h6> <p>Non è possibilie accedere ai propri codici “usa e getta” quando si utilizza la versione offline di Clipperz.</p> ", 145 'oneTimePasswordReadOnlyMessage':"<h6>Attenzione!</h6> <p>Non è possibilie accedere ai propri codici “usa e getta” quando si utilizza la versione offline di Clipperz.</p> ",
148 'oneTimePasswordLoadingMessage':"<h6>Caricamento dati</h6> <p>Si prega di attendere ...</p> ", 146 'oneTimePasswordLoadingMessage':"<h6>Caricamento dati</h6> <p>Si prega di attendere ...</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> ", 147 '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> ",
150 'deleteOTPButtonLabel':"Elimina", 148 'deleteOTPButtonLabel':"Elimina",
151 'printOTPButtonLabel':"Stampa", 149 'printOTPButtonLabel':"Stampa",
152 'disabledOneTimePassword_warning':"disabilitato", 150 'disabledOneTimePassword_warning':"disabilitato",
153 'oneTimePasswordSelectionLink_selectLabel':"Seleziona:", 151 'oneTimePasswordSelectionLink_selectLabel':"Seleziona:",
154 'oneTimePasswordSelectionLink_none':"nessuno", 152 'oneTimePasswordSelectionLink_none':"nessuno",
155 'oneTimePasswordSelectionLink_used':"utilizzati", 153 'oneTimePasswordSelectionLink_used':"utilizzati",
156 'oneTimePasswordSelectionLink_unused':"disponibili", 154 'oneTimePasswordSelectionLink_unused':"disponibili",
157 'saveOTP_encryptUserDataTitle':"Registrazione del nuovo codice “usa e getta”", 155 'saveOTP_encryptUserDataTitle':"Registrazione del nuovo codice “usa e getta”",
158 'saveOTP_encryptUserDataText':"Elaborazione delle credenziali OTP ...", 156 'saveOTP_encryptUserDataText':"Elaborazione delle credenziali OTP ...",
159 'saveOTP_encryptOTPDataTitle':"Registrazione del nuovo codice “usa e getta”", 157 'saveOTP_encryptOTPDataTitle':"Registrazione del nuovo codice “usa e getta”",
160 'saveOTP_encryptOTPDataText':"Codifica locale dei dati di autenticazione ...", 158 'saveOTP_encryptOTPDataText':"Codifica locale dei dati di autenticazione ...",
161 'saveOTP_sendingDataTitle':"Registrazione del nuovo codice “usa e getta”", 159 'saveOTP_sendingDataTitle':"Registrazione del nuovo codice “usa e getta”",
162 'saveOTP_sendingDataText':"Invio dei dati di autenticazione criptati ...", 160 'saveOTP_sendingDataText':"Invio dei dati di autenticazione criptati ...",
163 'saveOTP_updatingInterfaceTitle':"Registrazione del nuovo codice “usa e getta”", 161 'saveOTP_updatingInterfaceTitle':"Registrazione del nuovo codice “usa e getta”",
164 'saveOTP_updatingInterfaceText':"Aggiornamento dell&#x27;interfaccia", 162 'saveOTP_updatingInterfaceText':"Aggiornamento dell&#x27;interfaccia",
165 'accountPreferencesLabel':"Preferenze", 163 'accountPreferencesLabel':"Preferenze",
166 'accountPreferencesTabTitle':"Preferenze", 164 'accountPreferencesTabTitle':"Preferenze",
167 'accountPreferencesLanguageTitle':"Selezione della lingua", 165 'accountPreferencesLanguageTitle':"Selezione della lingua",
168 'accountPreferencesLanguageDescription':"<p>Scegli la lingua preferita dall&#x27;elenco sottostante.</p> ", 166 'accountPreferencesLanguageDescription':"<p>Scegli la lingua preferita dall&#x27;elenco sottostante.</p> ",
169 'showDonationReminderPanelTitle':"Promemoria donazioni", 167 'showDonationReminderPanelTitle':"Promemoria donazioni",
170 'showDonationReminderPanelDescription':"<p>Mostra i promemopria per le donazioni</p> ", 168 'showDonationReminderPanelDescription':"<p>Mostra i promemopria per le donazioni</p> ",
171 'saveUserPreferencesFormSubmitLabel':"Salva", 169 'saveUserPreferencesFormSubmitLabel':"Salva",
172 'cancelUserPreferencesFormSubmitLabel':"Annulla", 170 'cancelUserPreferencesFormSubmitLabel':"Annulla",
173 'accountPreferencesSavingPanelTitle_Step1':"Salvataggio preferenze", 171 'accountPreferencesSavingPanelTitle_Step1':"Salvataggio preferenze",
174 'accountPreferencesSavingPanelText_Step1':"Cripta localmente le preferenze", 172 'accountPreferencesSavingPanelText_Step1':"Cripta localmente le preferenze",
175 'accountPreferencesSavingPanelTitle_Step2':"Salvataggio preferenze", 173 'accountPreferencesSavingPanelTitle_Step2':"Salvataggio preferenze",
176 'accountPreferencesSavingPanelText_Step2':"Carica preferenze criptate su Clipperz", 174 'accountPreferencesSavingPanelText_Step2':"Carica preferenze criptate su Clipperz",
177 'accountLoginHistoryLabel':"Registro degli accessi", 175 'accountLoginHistoryLabel':"Registro degli accessi",
178 'loginHistoryTabTitle':"Registro degli accessi", 176 'loginHistoryTabTitle':"Registro degli accessi",
179 'loginHistoryReadOnlyMessage':"<h6>Attenzione!</h6> <p>Il registro degli accessi non è disponibile quando si utilizza la versione offline di Clipperz</p> ", 177 'loginHistoryReadOnlyMessage':"<h6>Attenzione!</h6> <p>Il registro degli accessi non è disponibile quando si utilizza la versione offline di Clipperz</p> ",
180 'loginHistoryLoadingMessage':"<h6>Caricamento dati</h6> <p>Si prega di attendere ...</p> ", 178 'loginHistoryLoadingMessage':"<h6>Caricamento dati</h6> <p>Si prega di attendere ...</p> ",
181 'loginHistoryLoadedMessage':"<h6>I tuoi ultimi 10 accessi</h6> <p> </p> ", 179 'loginHistoryLoadedMessage':"<h6>I tuoi ultimi 10 accessi</h6> <p> </p> ",
182 'loginHistoryIPLabel':"IP", 180 'loginHistoryIPLabel':"IP",
183 'loginHistoryTimeLabel':"data", 181 'loginHistoryTimeLabel':"data",
184 'loginHistoryCurrentSessionText':"sessione corrente", 182 'loginHistoryCurrentSessionText':"sessione corrente",
185 'loginHistoryReloadButtonLabel':"Aggiorna il registro degli accessi", 183 'loginHistoryReloadButtonLabel':"Aggiorna il registro degli accessi",
186 'deleteAccountTabLabel':"Cancella il tuo utente", 184 'deleteAccountTabLabel':"Cancella il tuo utente",
187 'deleteAccountTabTitle':"Cancella il tuo utente", 185 'deleteAccountTabTitle':"Cancella il tuo utente",
188 'deleteAccountFormUsernameLabel':"Utente", 186 'deleteAccountFormUsernameLabel':"Utente",
189 'deleteAccountFormPassphraseLabel':"frase segreta", 187 'deleteAccountFormPassphraseLabel':"frase segreta",
190 'deleteAccountFormSafetyCheckboxLabel':"Sono consapevole che tutti miei dati verranno cancellati e che questa azione è irreversibile.", 188 'deleteAccountFormSafetyCheckboxLabel':"Sono consapevole che tutti miei dati verranno cancellati e che questa azione è irreversibile.",
191 'deleteAccountFormSubmitLabel':"Cancella il mio utente", 189 'deleteAccountFormSubmitLabel':"Cancella il mio utente",
192 'deleteAccountFormWrongUsernameWarning':"Utente errato", 190 'deleteAccountFormWrongUsernameWarning':"Utente errato",
193 'deleteAccountFormWrongPassphraseWarning':"Frase segreta errata", 191 'deleteAccountFormWrongPassphraseWarning':"Frase segreta errata",
194 'deleteAccountFormSafetyCheckWarning':"Leggi e spunta le condizioni sotto riportate.", 192 'deleteAccountFormSafetyCheckWarning':"Leggi e spunta le condizioni sotto riportate.",
195 'accountPanelDeletingAccountPanelConfirmationTitle':"ATTENZIONE", 193 'accountPanelDeletingAccountPanelConfirmationTitle':"ATTENZIONE",
196 'accountPanelDeleteAccountPanelConfirmationText':"Sei sicuro di voler cancellare il tuo utente?", 194 'accountPanelDeleteAccountPanelConfirmationText':"Sei sicuro di voler cancellare il tuo utente?",
197 'offlineCopyTabLabel':"Copia offline", 195 'offlineCopyTabLabel':"Copia offline",
198 'offlineCopyTabTitle':"Copia offline", 196 'offlineCopyTabTitle':"Copia offline",
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> ", 197 '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> ",
200 'offlineCopyDownloadLinkLabel':"Scarica copia offline", 198 'offlineCopyDownloadLinkLabel':"Scarica copia offline",
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> ", 199 '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> ",
202 'offlineCopyDownloadOk':"", 200 'offlineCopyDownloadOk':"",
203 'sharingTabLabel':"Condividi", 201 'sharingTabLabel':"Condividi",
204 'sharingTabTitle':"Condividi", 202 'sharingTabTitle':"Condividi",
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> ", 203 '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> ",
206 'importTabLabel':"Importa", 204 'importTabLabel':"Importa",
207 'importTabTitle':"Importa", 205 'importTabTitle':"Importa",
208 'importTabDescription':"<p>Presto disponibile ...</p> ", 206 'importTabDescription':"<p>Presto disponibile ...</p> ",
209 'printingTabLabel':"Esporta", 207 'printingTabLabel':"Esporta",
210 'printingTabTitle':"Esporta", 208 'printingTabTitle':"Esporta",
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> ", 209 '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> ",
212 'printingLinkLabel':"Versione stampabile", 210 'printingLinkLabel':"Versione stampabile",
213 'contactsTabLabel':"Contatti", 211 'contactsTabLabel':"Contatti",
214 'contactsTabTitle':"Contatti", 212 'contactsTabTitle':"Contatti",
215 'passwordGeneratorTabLabel':"Generatore di password", 213 'passwordGeneratorTabLabel':"Generatore di password",
216 'bookmarkletTabLabel':"Bookmarklet", 214 'bookmarkletTabLabel':"Bookmarklet",
217 'passwordGeneratorTabTitle':"Generatore di password", 215 'passwordGeneratorTabTitle':"Generatore di password",
218 'bookmarkletTabTitle':"Bookmarklet", 216 'bookmarkletTabTitle':"Bookmarklet",
219 'paswordGeneratorTabDescription':"<p> </p> ", 217 'paswordGeneratorTabDescription':"<p> </p> ",
220 'passwordGeneratorTabButtonLabel':"Genera password", 218 'passwordGeneratorTabButtonLabel':"Genera password",
221 'bookmarkletTabLabel':"Bookmarklet", 219 'bookmarkletTabLabel':"Bookmarklet",
222 'bookmarkletTabTitle':"Bookmarklet", 220 'bookmarkletTabTitle':"Bookmarklet",
223 'bookmarkletTabBookmarkletTitle':"Aggiungi a Clipperz", 221 'bookmarkletTabBookmarkletTitle':"Aggiungi a Clipperz",
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> ", 222 '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> ",
225 'mainPanelDirectLoginBlockLabel':"Login diretti", 223 'mainPanelDirectLoginBlockLabel':"Login diretti",
226 'directLinkReferenceShowButtonLabel':"mostra", 224 'directLinkReferenceShowButtonLabel':"mostra",
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> ", 225 '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> ",
228 'mainPanelRecordsBlockLabel':"Schede", 226 'mainPanelRecordsBlockLabel':"Schede",
229 'mainPanelAddRecordButtonLabel':"Aggiungi nuova scheda", 227 'mainPanelAddRecordButtonLabel':"Aggiungi nuova scheda",
230 'mainPanelRemoveRecordButtonLabel':"Elimina scheda", 228 'mainPanelRemoveRecordButtonLabel':"Elimina scheda",
231 'mainPanelRecordFilterBlockTagsLabel':"tags", 229 'mainPanelRecordFilterBlockTagsLabel':"tags",
232 'recordDetailNoRecordAtAllTitle':"Benvenuto a Clipperz!", 230 'recordDetailNoRecordAtAllTitle':"Benvenuto a Clipperz!",
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> ", 231 '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> ",
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> ", 232 '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> ",
235 'newRecordWizardBookmarkletConfigurationTitle':"Login diretto", 233 'newRecordWizardBookmarkletConfigurationTitle':"Login diretto",
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> ", 234 '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> ",
237 'newRecordWizardCreateButtonLabel':"Crea", 235 'newRecordWizardCreateButtonLabel':"Crea",
238 'newRecordWizardCancelButtonLabel':"Annulla", 236 'newRecordWizardCancelButtonLabel':"Annulla",
239 'donateSplashPanelTitle':"Supporta Clipperz, fai una donazione oggi!", 237 'donateSplashPanelTitle':"Supporta Clipperz, fai una donazione oggi!",
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> ", 238 '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> ",
241 'donateCloseButtonLabel':"Non ancora", 239 'donateCloseButtonLabel':"Non ancora",
242 'recordTemplates':{ 240 'recordTemplates':{
243 'WebAccount':{ 241 'WebAccount':{
244 'title':"Password", 242 'title':"Password",
245 'description':"<p>Una scheda molto semplice per conservare le credenziali di accesso ai tuoi servizi web.</p> ", 243 'description':"<p>Una scheda molto semplice per conservare le credenziali di accesso ai tuoi servizi web.</p> ",
246 'fields':{ 244 'fields':{
247 'URL':"Indirizzo web", 245 'URL':"Indirizzo web",
248 'TXT':"Utente o email", 246 'TXT':"Utente o email",
249 'PWD':"Password" 247 'PWD':"Password"
250 } 248 }
251 }, 249 },
252 'BankAccount':{ 250 'BankAccount':{
253 'title':"Conto corrente bancario", 251 'title':"Conto corrente bancario",
254 'description':"<p>Proteggi il tuo numero di conto corrente ed i codici di accesso ai servizi di online banking.</p> ", 252 'description':"<p>Proteggi il tuo numero di conto corrente ed i codici di accesso ai servizi di online banking.</p> ",
255 'fields':{ 253 'fields':{
256 'TXT':"Banca", 254 'TXT':"Banca",
257 'TXT':"Conto corrente n.", 255 'TXT':"Conto corrente n.",
258 'URL':"Sito web della banca", 256 'URL':"Sito web della banca",
259 'TXT':"Online banking ID", 257 'TXT':"Online banking ID",
260 'PWD':"Online banking password" 258 'PWD':"Online banking password"
261 } 259 }
262 }, 260 },
263 'CreditCard':{ 261 'CreditCard':{
264 'title':"Carta di credito", 262 'title':"Carta di credito",
265 'description':"<p>Numero della carta, data di scadenza, codici CVV2 e PIN sempre a portata di mano con Clipperz.</p> ", 263 'description':"<p>Numero della carta, data di scadenza, codici CVV2 e PIN sempre a portata di mano con Clipperz.</p> ",
266 'fields':{ 264 'fields':{
267 'TXT':"Tipo (Visa, AmEx, ...)", 265 'TXT':"Tipo (Visa, AmEx, ...)",
268 'TXT':"Numero", 266 'TXT':"Numero",
269 'TXT':"Titolare", 267 'TXT':"Titolare",
270 'TXT':"Data di scadenza", 268 'TXT':"Data di scadenza",
271 'TXT':"CVV2", 269 'TXT':"CVV2",
272 'PWD':"PIN", 270 'PWD':"PIN",
273 'URL':"Sito web della carta", 271 'URL':"Sito web della carta",
274 'TXT':"Utente", 272 'TXT':"Utente",
275 'PWD':"Password" 273 'PWD':"Password"
276 } 274 }
277 }, 275 },
278 'AddressBookEntry':{ 276 'AddressBookEntry':{
279 'title':"Voce della rubrica", 277 'title':"Voce della rubrica",
280 'description':"<p>Fai di Clipperz la tua rubrica segreta. Usa questo modello per creare una nuova voce.</p> ", 278 'description':"<p>Fai di Clipperz la tua rubrica segreta. Usa questo modello per creare una nuova voce.</p> ",
281 'fields':{ 279 'fields':{
282 'TXT':"Nome", 280 'TXT':"Nome",
283 'TXT':"Email", 281 'TXT':"Email",
284 'TXT':"Telefono", 282 'TXT':"Telefono",
285 'TXT':"Cellulare", 283 'TXT':"Cellulare",
286 'ADDR':"Indirizzo" 284 'ADDR':"Indirizzo"
287 } 285 }
288 }, 286 },
289 'Custom':{ 287 'Custom':{
290 'title':"Scheda personalizzata", 288 'title':"Scheda personalizzata",
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> ", 289 '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> ",
292 'fields':{ 290 'fields':{
293 'TXT':"Nome del campo 1", 291 'TXT':"Nome del campo 1",
294 'TXT':"Nome del campo 2", 292 'TXT':"Nome del campo 2",
295 'TXT':"Nome del campo 3" 293 'TXT':"Nome del campo 3"
296 } 294 }
297 } 295 }
298}, 296},
299 'recordFieldTypologies':{ 297 'recordFieldTypologies':{
300 'TXT':{ 298 'TXT':{
301 'description':"simple text field" 299 'description':"simple text field"
302 }, 300 },
303 'PWD':{ 301 'PWD':{
304 'description':"simple text field, with default status set to hidden", 302 'description':"simple text field, with default status set to hidden",
305 'shortDescription':"Password" 303 'shortDescription':"Password"
306 }, 304 },
307 'URL':{ 305 'URL':{
308 'description':"simple text field in edit mode, that became an active url in view mode", 306 'description':"simple text field in edit mode, that became an active url in view mode",
309 'shortDescription':"Indirizzo web" 307 'shortDescription':"Indirizzo web"
310 }, 308 },
311 'DATE':{ 309 'DATE':{
312 'description':"a value set with a calendar helper", 310 'description':"a value set with a calendar helper",
313 'shortDescription':"data" 311 'shortDescription':"data"
314 }, 312 },
315 'ADDR':{ 313 'ADDR':{
316 'description':"just like the URL, but the active link points to Google Maps (or similar service) passing the address value as argument", 314 'description':"just like the URL, but the active link points to Google Maps (or similar service) passing the address value as argument",
317 'shortDescription':"indirizzo stradale" 315 'shortDescription':"indirizzo stradale"
318 }, 316 },
319 'CHECK':{ 317 'CHECK':{
320 'description':"check description", 318 'description':"check description",
321 'shortDescription':"check" 319 'shortDescription':"check"
322 }, 320 },
323 'RADIO':{ 321 'RADIO':{
324 'description':"radio description", 322 'description':"radio description",
325 'shortDescription':"radio" 323 'shortDescription':"radio"
326 }, 324 },
327 'SELECT':{ 325 'SELECT':{
328 'description':"select description", 326 'description':"select description",
329 'shortDescription':"Seleziona:" 327 'shortDescription':"Seleziona:"
330 } 328 }
331}, 329},
332 'newRecordPanelGeneralExceptionTitle':"Errore", 330 'newRecordPanelGeneralExceptionTitle':"Errore",
333 'newRecordPanelGeneralExceptionMessage':"Configurazione non valida. Accertati di aver utilizzato il codice quello generato dalla bookmarklet.", 331 'newRecordPanelGeneralExceptionMessage':"Configurazione non valida. Accertati di aver utilizzato il codice quello generato dalla bookmarklet.",
334 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"Errore", 332 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"Errore",
335 'newRecordPanelWrongBookmarkletVersionExceptionMessage':"La configurazione è stato generata da una vecchia versione della bookmarklet. Sei pregato di aggiornare subito la tua bookmarklet.", 333 'newRecordPanelWrongBookmarkletVersionExceptionMessage':"La configurazione è stato generata da una vecchia versione della bookmarklet. Sei pregato di aggiornare subito la tua bookmarklet.",
336 'newRecordPanelExceptionPanelCloseButtonLabel':"Annulla", 334 'newRecordPanelExceptionPanelCloseButtonLabel':"Annulla",
337 'mainPanelDeletingRecordPanelConfirmationTitle':"Eliminazione della scheda in corso", 335 'mainPanelDeletingRecordPanelConfirmationTitle':"Eliminazione della scheda in corso",
338 'mainPanelDeleteRecordPanelConfirmationText':"Vuoi veramente eliminare la scheda selezionata?", 336 'mainPanelDeleteRecordPanelConfirmationText':"Vuoi veramente eliminare la scheda selezionata?",
339 'mainPanelDeletingRecordPanelInitialTitle':"Eliminazione della scheda in corso", 337 'mainPanelDeletingRecordPanelInitialTitle':"Eliminazione della scheda in corso",
340 'mainPanelDeletingRecordPanelInitialText':"---", 338 'mainPanelDeletingRecordPanelInitialText':"---",
341 'mainPanelDeletingRecordPanelCompletedText':"Fatto", 339 'mainPanelDeletingRecordPanelCompletedText':"Fatto",
342 'deleteRecordPanelCollectRecordDataMessageTitle':"Elimina scheda", 340 'deleteRecordPanelCollectRecordDataMessageTitle':"Elimina scheda",
343 'deleteRecordPanelCollectRecordDataMessageText':"Aggiorna elenco delle schede", 341 'deleteRecordPanelCollectRecordDataMessageText':"Aggiorna elenco delle schede",
344 'deleteRecordPanelEncryptUserDataMessageTitle':"Elimina scheda", 342 'deleteRecordPanelEncryptUserDataMessageTitle':"Elimina scheda",
345 'deleteRecordPanelEncryptUserDataMessageText':"Cripta localmente l&#x27;intestazione delle schede", 343 'deleteRecordPanelEncryptUserDataMessageText':"Cripta localmente l&#x27;intestazione delle schede",
346 'deleteRecordPanelSendingDataToTheServerMessageTitle':"Elimina scheda", 344 'deleteRecordPanelSendingDataToTheServerMessageTitle':"Elimina scheda",
347 'deleteRecordPanelSendingDataToTheServerMessageText':"Carica le intestazioni criptate delle schede su Clipperz", 345 'deleteRecordPanelSendingDataToTheServerMessageText':"Carica le intestazioni criptate delle schede su Clipperz",
348 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"Elimina scheda", 346 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"Elimina scheda",
349 'deleteRecordPanelUpdatingTheInterfaceMessageText':"Aggiornamento dell&#x27;interfaccia", 347 'deleteRecordPanelUpdatingTheInterfaceMessageText':"Aggiornamento dell&#x27;interfaccia",
350 'recordDetailNoRecordSelectedTitle':"Nessuna scheda selezionata", 348 'recordDetailNoRecordSelectedTitle':"Nessuna scheda selezionata",
351 'recordDetailNoRecordSelectedDescription':"<p>Selezionare una scheda dall&#x27;elenco a sinistra.</p> ", 349 'recordDetailNoRecordSelectedDescription':"<p>Selezionare una scheda dall&#x27;elenco a sinistra.</p> ",
352 'recordDetailLoadingRecordMessage':"Scarica scheda criptata da Clipperz", 350 'recordDetailLoadingRecordMessage':"Scarica scheda criptata da Clipperz",
353 'recordDetailDecryptingRecordMessage':"Decodifica locale dei dati della scheda", 351 'recordDetailDecryptingRecordMessage':"Decodifica locale dei dati della scheda",
354 'recordDetailLoadingRecordVersionMessage':"Scarica l&#x27;ultima versione della scheda", 352 'recordDetailLoadingRecordVersionMessage':"Scarica l&#x27;ultima versione della scheda",
355 'recordDetailDecryptingRecordVersionMessage':"Decodifica locale dell&#x27;ultima versione", 353 'recordDetailDecryptingRecordVersionMessage':"Decodifica locale dell&#x27;ultima versione",
356 'recordDetailLoadingErrorMessageTitle':"Errore nello scaricamento della scheda", 354 'recordDetailLoadingErrorMessageTitle':"Errore nello scaricamento della scheda",
357 'recordDetailNotesLabel':"Note", 355 'recordDetailNotesLabel':"Note",
358 'recordDetailLabelFieldColumnLabel':"Nome del campo", 356 'recordDetailLabelFieldColumnLabel':"Nome del campo",
359 'recordDetailDataFieldColumnLabel':"Dati del campo", 357 'recordDetailDataFieldColumnLabel':"Dati del campo",
360 'recordDetailTypeFieldColumnLabel':"Tipo", 358 'recordDetailTypeFieldColumnLabel':"Tipo",
361 'recordDetailSavingChangesMessagePanelInitialTitle':"Salvataggio scheda", 359 'recordDetailSavingChangesMessagePanelInitialTitle':"Salvataggio scheda",
362 'recordDetailSavingChangesMessagePanelInitialText':"---", 360 'recordDetailSavingChangesMessagePanelInitialText':"---",
363 'recordDetailRemoveFieldButtonLabel':"-", 361 'recordDetailRemoveFieldButtonLabel':"-",
364 'recordDetailAddFieldButtonLabel':"Aggiungi nuovo campo", 362 'recordDetailAddFieldButtonLabel':"Aggiungi nuovo campo",
365 'recordDetailPasswordFieldHelpLabel':"clicca le stelline per copiare la password e poi Ctrl-C", 363 'recordDetailPasswordFieldHelpLabel':"clicca le stelline per copiare la password e poi Ctrl-C",
366 'recordDetailPasswordFieldScrambleLabel':"nascondi", 364 'recordDetailPasswordFieldScrambleLabel':"nascondi",
367 'recordDetailPasswordFieldUnscrambleLabel':"mostra", 365 'recordDetailPasswordFieldUnscrambleLabel':"mostra",
368 'recordDetailDirectLoginBlockTitle':"Login diretti", 366 'recordDetailDirectLoginBlockTitle':"Login diretti",
369 'recordDetailNewDirectLoginDescription':"<p>Configurazione del login diretto</p> ", 367 'recordDetailNewDirectLoginDescription':"<p>Configurazione del login diretto</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> ", 368 '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> ",
371 'recordDetailDeleteDirectLoginButtonLabel':"-", 369 'recordDetailDeleteDirectLoginButtonLabel':"-",
372 'recordDetailAddNewDirectLoginButtonLabel':"Aggiungi nuovo login diretto", 370 'recordDetailAddNewDirectLoginButtonLabel':"Aggiungi nuovo login diretto",
373 'recordDetailEditButtonLabel':"Modifica", 371 'recordDetailEditButtonLabel':"Modifica",
374 'recordDetailSaveButtonLabel':"Salva", 372 'recordDetailSaveButtonLabel':"Salva",
375 'recordDetailCancelButtonLabel':"Annulla", 373 'recordDetailCancelButtonLabel':"Annulla",
376 'newRecordTitleLabel':"_nuova scheda_", 374 'newRecordTitleLabel':"_nuova scheda_",
377 'newDirectLoginLabelSuffix':"", 375 'newDirectLoginLabelSuffix':"",
378 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"Salva scheda", 376 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"Salva scheda",
379 'recordSaveChangesPanelCollectRecordInfoMessageText':"Aggiorna elenco delle schede", 377 'recordSaveChangesPanelCollectRecordInfoMessageText':"Aggiorna elenco delle schede",
380 'recordSaveChangesPanelEncryptUserDataMessageTitle':"Salva scheda", 378 'recordSaveChangesPanelEncryptUserDataMessageTitle':"Salva scheda",
381 'recordSaveChangesPanelEncryptUserDataMessageText':"Cripta localmente l&#x27;intestazione delle schede", 379 'recordSaveChangesPanelEncryptUserDataMessageText':"Cripta localmente l&#x27;intestazione delle schede",
382 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"Salva scheda", 380 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"Salva scheda",
383 'recordSaveChangesPanelEncryptRecordDataMessageText':"Cripta localmente i dati della scheda", 381 'recordSaveChangesPanelEncryptRecordDataMessageText':"Cripta localmente i dati della scheda",
384 'recordSaveChangesPanelEncryptRecordVersionDataMessageTitle':"Salva scheda", 382 'recordSaveChangesPanelEncryptRecordVersionDataMessageTitle':"Salva scheda",
385 'recordSaveChangesPanelEncryptRecordVersionDataMessageText':"Cripta localmente la versione della scheda", 383 'recordSaveChangesPanelEncryptRecordVersionDataMessageText':"Cripta localmente la versione della scheda",
386 'recordSaveChangesPanelSendingDataToTheServerMessageTitle':"Salva scheda", 384 'recordSaveChangesPanelSendingDataToTheServerMessageTitle':"Salva scheda",
387 'recordSaveChangesPanelSendingDataToTheServerMessageText':"Carica le intestazioni criptate delle schede su Clipperz", 385 'recordSaveChangesPanelSendingDataToTheServerMessageText':"Carica le intestazioni criptate delle schede su Clipperz",
388 'recordSaveChangesPanelUpdatingTheInterfaceMessageTitle':"Salva scheda", 386 'recordSaveChangesPanelUpdatingTheInterfaceMessageTitle':"Salva scheda",
389 'recordSaveChangesPanelUpdatingTheInterfaceMessageText':"Aggiornamento dell&#x27;interfaccia", 387 'recordSaveChangesPanelUpdatingTheInterfaceMessageText':"Aggiornamento dell&#x27;interfaccia",
390 'passwordGeneratorPanelTitle':"Generatore di password", 388 'passwordGeneratorPanelTitle':"Generatore di password",
391 'passwordGeneratorPanelOkLabel':"Ok", 389 'passwordGeneratorPanelOkLabel':"Ok",
392 'passwordGeneratorPanelCancelLabel':"Annulla", 390 'passwordGeneratorPanelCancelLabel':"Annulla",
393 'passwordGeneratorLengthLabel':"lung . :", 391 'passwordGeneratorLengthLabel':"lung . :",
394 //'DWRUtilLoadingMessage':"Caricamento dati", 392 //'DWRUtilLoadingMessage':"Caricamento dati",
395 'comingSoon':"Presto disponibile ...", 393 'comingSoon':"Presto disponibile ...",
396 'panelCollectingEntryopyMessageText':"Raccolta entropia", 394 'panelCollectingEntryopyMessageText':"Raccolta entropia",
397 'importData_parsingDataTitle':"Importa", 395 'importData_parsingDataTitle':"Importa",
398 'importData_previewingDataTitle':"Importa", 396 'importData_previewingDataTitle':"Importa",
399 'importData_processingDataTitle':"Importa", 397 'importData_processingDataTitle':"Importa",
400 'ImportWizard':{ 398 'ImportWizard':{
401 'EDIT':"Modifica", 399 'EDIT':"Modifica",
402 'IMPORT':"Importa", 400 'IMPORT':"Importa",
403 'CSV_NOTES':"Note", 401 'CSV_NOTES':"Note",
404 'EXCEL_EDIT':"Modifica" 402 'EXCEL_EDIT':"Modifica"
405}, 403},
406 'importData_importConfirmation_title':"Importa", 404 'importData_importConfirmation_title':"Importa",
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 42993b3..1401acc 100644
--- a/frontend/beta/js/Clipperz/PM/Strings/Strings_ja-JP.js
+++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_ja-JP.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26Clipperz.PM.Strings.Languages['ja-JP'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 24Clipperz.PM.Strings.Languages['ja-JP'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], {
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> ", 25 '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> ",
28 'loginFormTitle':"Clipperz のアカウントでログイン", 26 'loginFormTitle':"Clipperz のアカウントでログイン",
29 'loginFormUsernameLabel':"ユーザー名", 27 'loginFormUsernameLabel':"ユーザー名",
30 'loginFormPassphraseLabel':"パスフレーズ", 28 'loginFormPassphraseLabel':"パスフレーズ",
31 'loginFormDontHaveAnAccountLabel':"アカウントを持っていない?", 29 'loginFormDontHaveAnAccountLabel':"アカウントを持っていない?",
32 'loginFormCreateOneLabel':"新規作成", 30 'loginFormCreateOneLabel':"新規作成",
33 'loginFormForgotYourCredentialsLabel':"パスフレーズを忘れた?", 31 'loginFormForgotYourCredentialsLabel':"パスフレーズを忘れた?",
34 'loginFormAarghThatsBadLabel':"それは困った!", 32 'loginFormAarghThatsBadLabel':"それは困った!",
35 'loginFormAfraidOfMaliciousScriptsLabel':"偽サイトかも?", 33 'loginFormAfraidOfMaliciousScriptsLabel':"偽サイトかも?",
36 'loginFormVerifyTheCodeLabel':"確認する", 34 'loginFormVerifyTheCodeLabel':"確認する",
37 'loginFormButtonLabel':"ログイン", 35 'loginFormButtonLabel':"ログイン",
38 'loginFormOneTimePasswordCheckboxLabel':"ワンタイムパスフレーズ使用", 36 'loginFormOneTimePasswordCheckboxLabel':"ワンタイムパスフレーズ使用",
39 'loginFormOneTimePasswordCheckboxDescription':"", 37 'loginFormOneTimePasswordCheckboxDescription':"",
40 'loginPanelSwithLanguageDescription':"<h5>言語設定の変更</h5> ", 38 'loginPanelSwithLanguageDescription':"<h5>言語設定の変更</h5> ",
41 'browserCompatibilityDescription':"<p>Clipperz は Firefox に最適化されています。 しかし Clipperz は Opera や Safari そしてインターネットエクスプローラでも十分動作します。</p> ", 39 'browserCompatibilityDescription':"<p>Clipperz は Firefox に最適化されています。 しかし Clipperz は Opera や Safari そしてインターネットエクスプローラでも十分動作します。</p> ",
42 'OTPloginMessagePanelInitialTitle':"ワンタイムパスフレーズでログイン中", 40 'OTPloginMessagePanelInitialTitle':"ワンタイムパスフレーズでログイン中",
43 'OTPloginMessagePanelInitialText':"OTP 情報送信中 ...", 41 'OTPloginMessagePanelInitialText':"OTP 情報送信中 ...",
44 'OTPloginMessagePanelLoadingTitle':"ワンタイムパスフレーズでログイン中", 42 'OTPloginMessagePanelLoadingTitle':"ワンタイムパスフレーズでログイン中",
45 'OTPloginMessagePanelLoadingText':"認証情報を取得中 ...", 43 'OTPloginMessagePanelLoadingText':"認証情報を取得中 ...",
46 'OTPloginMessagePanelProcessingTitle':"ワンタイムパスフレーズでログイン中", 44 'OTPloginMessagePanelProcessingTitle':"ワンタイムパスフレーズでログイン中",
47 'OTPloginMessagePanelProcessingText':"認証情報を復号中 ...", 45 'OTPloginMessagePanelProcessingText':"認証情報を復号中 ...",
48 'loginMessagePanelInitialTitle':"ログイン中 ...", 46 'loginMessagePanelInitialTitle':"ログイン中 ...",
49 'loginMessagePanelInitialText':"---", 47 'loginMessagePanelInitialText':"---",
50 'loginMessagePanelInitialButtonLabel':"キャンセル", 48 'loginMessagePanelInitialButtonLabel':"キャンセル",
51 'loginMessagePanelConnectedTitle':"接続完了", 49 'loginMessagePanelConnectedTitle':"接続完了",
52 'loginMessagePanelConnectedText':"完了", 50 'loginMessagePanelConnectedText':"完了",
53 'loginMessagePanelFailureTitle':"エラー", 51 'loginMessagePanelFailureTitle':"エラー",
54 'loginMessagePanelFailureText':"ログインに失敗しました", 52 'loginMessagePanelFailureText':"ログインに失敗しました",
55 'loginMessagePanelFailureButtonLabel':"閉じる", 53 'loginMessagePanelFailureButtonLabel':"閉じる",
56 'connectionLoginSendingCredentialsMessageTitle':"認証確認中", 54 'connectionLoginSendingCredentialsMessageTitle':"認証確認中",
57 'connectionLoginSendingCredentialsMessageText':"認証送信中", 55 'connectionLoginSendingCredentialsMessageText':"認証送信中",
58 'connectionLoginCredentialsVerificationMessageTitle':"認証確認中", 56 'connectionLoginCredentialsVerificationMessageTitle':"認証確認中",
59 'connectionLoginCredentialsVerificationMessageText':"SRP 認証中", 57 'connectionLoginCredentialsVerificationMessageText':"SRP 認証中",
60 'connectionLoginDoneMessageTitle':"認証確認中", 58 'connectionLoginDoneMessageTitle':"認証確認中",
61 'connectionLoginDoneMessageText':"接続完了", 59 'connectionLoginDoneMessageText':"接続完了",
62 'userLoginPanelUpgradingUserCredentialsMessageTitle':"認証確認中", 60 'userLoginPanelUpgradingUserCredentialsMessageTitle':"認証確認中",
63 'userLoginPanelUpgradingUserCredentialsMessageText':"認証更新中", 61 'userLoginPanelUpgradingUserCredentialsMessageText':"認証更新中",
64 'userLoginPanelConnectedMessageTitle':"認証完了", 62 'userLoginPanelConnectedMessageTitle':"認証完了",
65 'userLoginPanelConnectedMessageText':"ログイン完了", 63 'userLoginPanelConnectedMessageText':"ログイン完了",
66 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"認証確認中", 64 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"認証確認中",
67 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"認証復元中", 65 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"認証復元中",
68 'userLoginPanelLoadingUserDataMessageTitle':"認証完了", 66 'userLoginPanelLoadingUserDataMessageTitle':"認証完了",
69 'userLoginPanelLoadingUserDataMessageText':"暗号化データを受信中", 67 'userLoginPanelLoadingUserDataMessageText':"暗号化データを受信中",
70 'userLoginPanelDecryptingUserDataMessageTitle':"認証完了", 68 'userLoginPanelDecryptingUserDataMessageTitle':"認証完了",
71 'userLoginPanelDecryptingUserDataMessageText':"復号中", 69 'userLoginPanelDecryptingUserDataMessageText':"復号中",
72 'userLoginPanelDecryptingUserStatisticsMessageTitle':"認証完了", 70 'userLoginPanelDecryptingUserStatisticsMessageTitle':"認証完了",
73 'userLoginPanelDecryptingUserStatisticsMessageText':"復号中", 71 'userLoginPanelDecryptingUserStatisticsMessageText':"復号中",
74 'splashAlertTitle':"Clipperz へようこそ", 72 'splashAlertTitle':"Clipperz へようこそ",
75 'splashAlertText':"<p>セキュリティアドバイス</p> <ul> <li> <p>Clipperz に保管したデータはパスフレーズによって保護されます。 パスフレーズを知らない人はデータにアクセスできません。</p> </li> <li> <p>Clipperz に重要なデータを保管するためにパスフレーズを類推されにくいものにしてください。 長いほど安全です。</p> </li> <li> <p>パスフレーズを忘れてしまったら Clipperz ではデータを復元できません。</p> </li> </ul> <p>さらに詳しくは Clipperz のサイトをごらんください。</p> ", 73 'splashAlertText':"<p>セキュリティアドバイス</p> <ul> <li> <p>Clipperz に保管したデータはパスフレーズによって保護されます。 パスフレーズを知らない人はデータにアクセスできません。</p> </li> <li> <p>Clipperz に重要なデータを保管するためにパスフレーズを類推されにくいものにしてください。 長いほど安全です。</p> </li> <li> <p>パスフレーズを忘れてしまったら Clipperz ではデータを復元できません。</p> </li> </ul> <p>さらに詳しくは Clipperz のサイトをごらんください。</p> ",
76 'splashAlertCloseButtonLabel':"OK", 74 'splashAlertCloseButtonLabel':"OK",
77 'registrationFormTitle':"新規アカウント作成", 75 'registrationFormTitle':"新規アカウント作成",
78 'registrationFormUsernameLabel':"ユーザー名", 76 'registrationFormUsernameLabel':"ユーザー名",
79 'registrationFormPassphraseLabel':"パスフレーズ", 77 'registrationFormPassphraseLabel':"パスフレーズ",
80 'registrationFormRetypePassphraseLabel':"パスフレーズをもう一度", 78 'registrationFormRetypePassphraseLabel':"パスフレーズをもう一度",
81 'registrationFormSafetyCheckLabel':"パスフレーズを忘れたら復活できないことを了承します。", 79 'registrationFormSafetyCheckLabel':"パスフレーズを忘れたら復活できないことを了承します。",
82 'registrationFormTermsOfServiceCheckLabel':"利用許諾に同意します 。", 80 'registrationFormTermsOfServiceCheckLabel':"利用許諾に同意します 。",
83 'registrationFormDoYouAlreadyHaveAnAccountLabel':"アカウントを持っている?", 81 'registrationFormDoYouAlreadyHaveAnAccountLabel':"アカウントを持っている?",
84 'registrationFormSimplyLoginLabel':"すぐにログイン", 82 'registrationFormSimplyLoginLabel':"すぐにログイン",
85 'registrationFormButtonLabel':"登録", 83 'registrationFormButtonLabel':"登録",
86 'registrationFormWarningMessageNotMatchingPassphrases':"パスフレーズの入力に誤りがあります。 再入力してください。", 84 'registrationFormWarningMessageNotMatchingPassphrases':"パスフレーズの入力に誤りがあります。 再入力してください。",
87 'registrationFormWarningMessageSafetyCheckNotSelected':"説明を読んで下のボックスを全てチェックしてください。", 85 'registrationFormWarningMessageSafetyCheckNotSelected':"説明を読んで下のボックスを全てチェックしてください。",
88 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"利用許諾に同意してください。", 86 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"利用許諾に同意してください。",
89 'registrationMessagePanelInitialTitle':"アカウント作成中 ...", 87 'registrationMessagePanelInitialTitle':"アカウント作成中 ...",
90 'registrationMessagePanelInitialText':"---", 88 'registrationMessagePanelInitialText':"---",
91 'registrationMessagePanelInitialButtonLabel':"キャンセル", 89 'registrationMessagePanelInitialButtonLabel':"キャンセル",
92 'registrationMessagePanelRegistrationDoneTitle':"登録", 90 'registrationMessagePanelRegistrationDoneTitle':"登録",
93 'registrationMessagePanelRegistrationDoneText':"完了", 91 'registrationMessagePanelRegistrationDoneText':"完了",
94 'registrationMessagePanelFailureTitle':"登録失敗", 92 'registrationMessagePanelFailureTitle':"登録失敗",
95 'registrationMessagePanelFailureButtonLabel':"閉じる", 93 'registrationMessagePanelFailureButtonLabel':"閉じる",
96 'connectionRegistrationSendingRequestMessageText':"認証確認中", 94 'connectionRegistrationSendingRequestMessageText':"認証確認中",
97 'connectionRegistrationSendingCredentialsMessageText':"認証送信中", 95 'connectionRegistrationSendingCredentialsMessageText':"認証送信中",
98 'registrationSplashPanelTitle':"セキュリティアドバイス", 96 'registrationSplashPanelTitle':"セキュリティアドバイス",
99 'registrationSplashPanelDescription':"<p>Clipperz の認証情報です。 大切に保管してください。 ユーザー名とパスフレーズは二度と表示されません。</p> ", 97 'registrationSplashPanelDescription':"<p>Clipperz の認証情報です。 大切に保管してください。 ユーザー名とパスフレーズは二度と表示されません。</p> ",
100 'registrationSplashPanelUsernameLabel':"ユーザー名", 98 'registrationSplashPanelUsernameLabel':"ユーザー名",
101 'registrationSplashPanelPassphraseLabel':"パスフレーズ", 99 'registrationSplashPanelPassphraseLabel':"パスフレーズ",
102 'registrationSplashPanelShowPassphraseButtonLabel':"パスフレーズを表示", 100 'registrationSplashPanelShowPassphraseButtonLabel':"パスフレーズを表示",
103 'donateHeaderLinkLabel':"寄付", 101 'donateHeaderLinkLabel':"寄付",
104 'creditsHeaderLinkLabel':"クレジット", 102 'creditsHeaderLinkLabel':"クレジット",
105 'feedbackHeaderLinkLabel':"フィードバック", 103 'feedbackHeaderLinkLabel':"フィードバック",
106 'helpHeaderLinkLabel':"ヘルプ", 104 'helpHeaderLinkLabel':"ヘルプ",
107 'forumHeaderLinkLabel':"フォーラム", 105 'forumHeaderLinkLabel':"フォーラム",
108 'recordMenuLabel':"カード", 106 'recordMenuLabel':"カード",
109 'accountMenuLabel':"アカウント", 107 'accountMenuLabel':"アカウント",
110 'dataMenuLabel':"データ", 108 'dataMenuLabel':"データ",
111 'contactsMenuLabel':"コンタクト", 109 'contactsMenuLabel':"コンタクト",
112 'toolsMenuLabel':"ツール", 110 'toolsMenuLabel':"ツール",
113 'logoutMenuLabel':"ログアウト", 111 'logoutMenuLabel':"ログアウト",
114 'lockMenuLabel':"ロック", 112 'lockMenuLabel':"ロック",
115 'lockTitle':"アカウントはロックされました", 113 'lockTitle':"アカウントはロックされました",
116 'lockDescription':"<p>ロックを解除するにはパスフレーズを入力してください。</p> ", 114 'lockDescription':"<p>ロックを解除するにはパスフレーズを入力してください。</p> ",
117 'unlockButtonLabel':"解除", 115 'unlockButtonLabel':"解除",
118 'changePasswordTabLabel':"パスフレーズの変更", 116 'changePasswordTabLabel':"パスフレーズの変更",
119 'changePasswordTabTitle':"パスフレーズの変更", 117 'changePasswordTabTitle':"パスフレーズの変更",
120 'changePasswordFormUsernameLabel':"ユーザー名", 118 'changePasswordFormUsernameLabel':"ユーザー名",
121 'changePasswordFormOldPassphraseLabel':"今のパスフレーズ", 119 'changePasswordFormOldPassphraseLabel':"今のパスフレーズ",
122 'changePasswordFormNewPassphraseLabel':"新しいパスフレーズ", 120 'changePasswordFormNewPassphraseLabel':"新しいパスフレーズ",
123 'changePasswordFormRetypePassphraseLabel':"パスフレーズをもう一度", 121 'changePasswordFormRetypePassphraseLabel':"パスフレーズをもう一度",
124 'changePasswordFormSafetyCheckboxLabel':"パスフレーズを忘れたら復活できないことを了承します。", 122 'changePasswordFormSafetyCheckboxLabel':"パスフレーズを忘れたら復活できないことを了承します。",
125 'changePasswordFormSubmitLabel':"変更", 123 'changePasswordFormSubmitLabel':"変更",
126 'changePasswordFormWrongUsernameWarning':"ユーザー名が違います", 124 'changePasswordFormWrongUsernameWarning':"ユーザー名が違います",
127 'changePasswordFormWrongPassphraseWarning':"パスフレーズが違います", 125 'changePasswordFormWrongPassphraseWarning':"パスフレーズが違います",
128 'changePasswordFormWrongRetypePassphraseWarning':"パスフレーズの入力に誤りがあります。 再入力してください。", 126 'changePasswordFormWrongRetypePassphraseWarning':"パスフレーズの入力に誤りがあります。 再入力してください。",
129 'changePasswordFormSafetyCheckWarning':"説明を読んでボックスをチェックしてください。", 127 'changePasswordFormSafetyCheckWarning':"説明を読んでボックスをチェックしてください。",
130 'changePasswordFormProgressDialogTitle':"認証情報を変更中", 128 'changePasswordFormProgressDialogTitle':"認証情報を変更中",
131 'changePasswordFormProgressDialogEmptyText':"---", 129 'changePasswordFormProgressDialogEmptyText':"---",
132 'changePasswordFormProgressDialogConnectedMessageTitle':"接続完了", 130 'changePasswordFormProgressDialogConnectedMessageTitle':"接続完了",
133 'changePasswordFormProgressDialogConnectedMessageText':"完了", 131 'changePasswordFormProgressDialogConnectedMessageText':"完了",
134 'changePasswordFormProgressDialogErrorMessageTitle':"エラー", 132 'changePasswordFormProgressDialogErrorMessageTitle':"エラー",
135 'changePasswordFormProgressDialogErrorMessageText':"変更に失敗しました", 133 'changePasswordFormProgressDialogErrorMessageText':"変更に失敗しました",
136 'changeCredentialsPanelEncryptingDataMessageTitle':"パスフレーズを変更中", 134 'changeCredentialsPanelEncryptingDataMessageTitle':"パスフレーズを変更中",
137 'changeCredentialsPanelEncryptingDataMessageText':"カードヘッダ暗号化", 135 'changeCredentialsPanelEncryptingDataMessageText':"カードヘッダ暗号化",
138 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"パスフレーズを変更中", 136 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"パスフレーズを変更中",
139 'changeCredentialsPanelCreatingNewCredentialsMessageText':"認証情報を送信中", 137 'changeCredentialsPanelCreatingNewCredentialsMessageText':"認証情報を送信中",
140 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"パスフレーズを変更中", 138 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"パスフレーズを変更中",
141 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"暗号化データを送信中", 139 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"暗号化データを送信中",
142 'changeCredentialsPanelDoneMessageTitle':"パスフレーズを変更中", 140 'changeCredentialsPanelDoneMessageTitle':"パスフレーズを変更中",
143 'changeCredentialsPanelDoneMessageText':"完了", 141 'changeCredentialsPanelDoneMessageText':"完了",
144 'manageOTPTabLabel':"ワンタイムパスフレーズ管理", 142 'manageOTPTabLabel':"ワンタイムパスフレーズ管理",
145 'manageOTPTabTitle':"ワンタイムパスフレーズ管理", 143 'manageOTPTabTitle':"ワンタイムパスフレーズ管理",
146 'manageOTPTabDescription':"<p>ワンタイムパスフレーズは通常のパスフレームと同様に機能しますが、一回限りの使い捨てパスフレーズです。</p> <p>同じパスフレーズで再度ログインすることはできません。</p> <p>不正アクセス防止のためにログインに成功したら直ちにワンタイムパスフレーズは削除されます</p> <p>ワンタイムパスフレーズはキーロガーやスパイウェアからパスフレーズを守るすばらしい機能です</p> <p><b>インターネットカフェや図書館などから Clipperz にアクセする場合にはワンタイムパスフレーズを利用することを強くお薦めします。</b> </p> ", 144 'manageOTPTabDescription':"<p>ワンタイムパスフレーズは通常のパスフレームと同様に機能しますが、一回限りの使い捨てパスフレーズです。</p> <p>同じパスフレーズで再度ログインすることはできません。</p> <p>不正アクセス防止のためにログインに成功したら直ちにワンタイムパスフレーズは削除されます</p> <p>ワンタイムパスフレーズはキーロガーやスパイウェアからパスフレーズを守るすばらしい機能です</p> <p><b>インターネットカフェや図書館などから Clipperz にアクセする場合にはワンタイムパスフレーズを利用することを強くお薦めします。</b> </p> ",
147 'oneTimePasswordReadOnlyMessage':"<h6>ごめんなさい</h6> <p>ローカルコピー使用中はワンタイムパスフレーズを利用できません。</p> ", 145 'oneTimePasswordReadOnlyMessage':"<h6>ごめんなさい</h6> <p>ローカルコピー使用中はワンタイムパスフレーズを利用できません。</p> ",
148 'oneTimePasswordLoadingMessage':"<h6>ロード中</h6> <p>お待ちください ...</p> ", 146 'oneTimePasswordLoadingMessage':"<h6>ロード中</h6> <p>お待ちください ...</p> ",
149 'oneTimePasswordNoPasswordAvailable':"<h6>有効なワンタイムパスフレーズがありません</h6> <p>「新規」ボタンをクリックしてワンタイムパスフレーズを作成してください。</p> ", 147 'oneTimePasswordNoPasswordAvailable':"<h6>有効なワンタイムパスフレーズがありません</h6> <p>「新規」ボタンをクリックしてワンタイムパスフレーズを作成してください。</p> ",
150 'createNewOTPButtonLabel':"新規", 148 'createNewOTPButtonLabel':"新規",
151 'deleteOTPButtonLabel':"削除", 149 'deleteOTPButtonLabel':"削除",
152 'printOTPButtonLabel':"印刷", 150 'printOTPButtonLabel':"印刷",
153 'disabledOneTimePassword_warning':"無効", 151 'disabledOneTimePassword_warning':"無効",
154 'oneTimePasswordSelectionLink_selectLabel':"選択:", 152 'oneTimePasswordSelectionLink_selectLabel':"選択:",
155 'oneTimePasswordSelectionLink_all':"すべて", 153 'oneTimePasswordSelectionLink_all':"すべて",
156 'oneTimePasswordSelectionLink_none':"解除", 154 'oneTimePasswordSelectionLink_none':"解除",
157 'oneTimePasswordSelectionLink_used':"使用済", 155 'oneTimePasswordSelectionLink_used':"使用済",
158 'oneTimePasswordSelectionLink_unused':"未使用", 156 'oneTimePasswordSelectionLink_unused':"未使用",
159 'saveOTP_encryptUserDataTitle':"ワンタイムパスフレーズを保存中", 157 'saveOTP_encryptUserDataTitle':"ワンタイムパスフレーズを保存中",
160 'saveOTP_encryptUserDataText':"OTP 認証譲歩を作成中 ...", 158 'saveOTP_encryptUserDataText':"OTP 認証譲歩を作成中 ...",
161 'saveOTP_encryptOTPDataTitle':"ワンタイムパスフレーズを保存中", 159 'saveOTP_encryptOTPDataTitle':"ワンタイムパスフレーズを保存中",
162 'saveOTP_encryptOTPDataText':"暗号化データを作成中 ...", 160 'saveOTP_encryptOTPDataText':"暗号化データを作成中 ...",
163 'saveOTP_sendingDataTitle':"ワンタイムパスフレーズを保存中", 161 'saveOTP_sendingDataTitle':"ワンタイムパスフレーズを保存中",
164 'saveOTP_sendingDataText':"暗号化データを送信中 ...", 162 'saveOTP_sendingDataText':"暗号化データを送信中 ...",
165 'saveOTP_updatingInterfaceTitle':"ワンタイムパスフレーズを保存中", 163 'saveOTP_updatingInterfaceTitle':"ワンタイムパスフレーズを保存中",
166 'saveOTP_updatingInterfaceText':"インターフェイスを更新中 ...", 164 'saveOTP_updatingInterfaceText':"インターフェイスを更新中 ...",
167 'accountPreferencesLabel':"設定", 165 'accountPreferencesLabel':"設定",
168 'accountPreferencesTabTitle':"設定", 166 'accountPreferencesTabTitle':"設定",
169 'accountPreferencesLanguageTitle':"言語設定", 167 'accountPreferencesLanguageTitle':"言語設定",
170 'accountPreferencesLanguageDescription':"<p>リストから使用する言語を選択してください。</p> ", 168 'accountPreferencesLanguageDescription':"<p>リストから使用する言語を選択してください。</p> ",
171 'showDonationReminderPanelTitle':"ドネーションリマインダ", 169 'showDonationReminderPanelTitle':"ドネーションリマインダ",
172 'showDonationReminderPanelDescription':"<p>ドネーションリマインダを表示</p> ", 170 'showDonationReminderPanelDescription':"<p>ドネーションリマインダを表示</p> ",
173 'saveUserPreferencesFormSubmitLabel':"保存", 171 'saveUserPreferencesFormSubmitLabel':"保存",
174 'cancelUserPreferencesFormSubmitLabel':"キャンセル", 172 'cancelUserPreferencesFormSubmitLabel':"キャンセル",
175 'accountPreferencesSavingPanelTitle_Step1':"保存中", 173 'accountPreferencesSavingPanelTitle_Step1':"保存中",
176 'accountPreferencesSavingPanelText_Step1':"暗号化中", 174 'accountPreferencesSavingPanelText_Step1':"暗号化中",
177 'accountPreferencesSavingPanelTitle_Step2':"保存中", 175 'accountPreferencesSavingPanelTitle_Step2':"保存中",
178 'accountPreferencesSavingPanelText_Step2':"送信中", 176 'accountPreferencesSavingPanelText_Step2':"送信中",
179 'accountLoginHistoryLabel':"ログイン履歴", 177 'accountLoginHistoryLabel':"ログイン履歴",
180 'loginHistoryTabTitle':"ログイン履歴", 178 'loginHistoryTabTitle':"ログイン履歴",
181 'loginHistoryReadOnlyMessage':"<h6>ごめんなさい</h6> <p>ローカルコピー使用中はログイン履歴を利用できません。</p> ", 179 'loginHistoryReadOnlyMessage':"<h6>ごめんなさい</h6> <p>ローカルコピー使用中はログイン履歴を利用できません。</p> ",
182 'loginHistoryLoadingMessage':"<h6>ロード中</h6> <p>お待ちください ...</p> ", 180 'loginHistoryLoadingMessage':"<h6>ロード中</h6> <p>お待ちください ...</p> ",
183 'loginHistoryLoadedMessage':"<h6>最近 10 回のログイン</h6> <p> </p> ", 181 'loginHistoryLoadedMessage':"<h6>最近 10 回のログイン</h6> <p> </p> ",
184 'loginHistoryIPLabel':"IP", 182 'loginHistoryIPLabel':"IP",
185 'loginHistoryTimeLabel':"日付", 183 'loginHistoryTimeLabel':"日付",
186 'loginHistoryCurrentSessionText':"現在のログイン", 184 'loginHistoryCurrentSessionText':"現在のログイン",
187 'loginHistoryReloadButtonLabel':"ログイン履歴を更新", 185 'loginHistoryReloadButtonLabel':"ログイン履歴を更新",
188 'deleteAccountTabLabel':"アカウント削除", 186 'deleteAccountTabLabel':"アカウント削除",
189 'deleteAccountTabTitle':"アカウント削除", 187 'deleteAccountTabTitle':"アカウント削除",
190 'deleteAccountFormUsernameLabel':"ユーザー名", 188 'deleteAccountFormUsernameLabel':"ユーザー名",
191 'deleteAccountFormPassphraseLabel':"パスフレーズ", 189 'deleteAccountFormPassphraseLabel':"パスフレーズ",
192 'deleteAccountFormSafetyCheckboxLabel':"全てのデータが消去されて復元不可能になることを了承します。", 190 'deleteAccountFormSafetyCheckboxLabel':"全てのデータが消去されて復元不可能になることを了承します。",
193 'deleteAccountFormSubmitLabel':"アカウント削除", 191 'deleteAccountFormSubmitLabel':"アカウント削除",
194 'deleteAccountFormWrongUsernameWarning':"ユーザー名が違います", 192 'deleteAccountFormWrongUsernameWarning':"ユーザー名が違います",
195 'deleteAccountFormWrongPassphraseWarning':"パスフレーズが違います", 193 'deleteAccountFormWrongPassphraseWarning':"パスフレーズが違います",
196 'deleteAccountFormSafetyCheckWarning':"説明を読んでボックスをチェックしてください。", 194 'deleteAccountFormSafetyCheckWarning':"説明を読んでボックスをチェックしてください。",
197 'accountPanelDeletingAccountPanelConfirmationTitle':"確認", 195 'accountPanelDeletingAccountPanelConfirmationTitle':"確認",
198 'accountPanelDeleteAccountPanelConfirmationText':"本当にアカウントを削除しますか?", 196 'accountPanelDeleteAccountPanelConfirmationText':"本当にアカウントを削除しますか?",
199 'accountPanelDeleteAccountPanelConfirmButtonLabel':"はい", 197 'accountPanelDeleteAccountPanelConfirmButtonLabel':"はい",
200 'accountPanelDeleteAccountPanelDenyButtonLabel':"いいえ", 198 'accountPanelDeleteAccountPanelDenyButtonLabel':"いいえ",
201 'accountPanelDeletingAccountPanelProgressTitle':"アカウント情報削除中", 199 'accountPanelDeletingAccountPanelProgressTitle':"アカウント情報削除中",
202 'accountPanelDeletingAccountPanelProgressText':"しばらくお待ちください", 200 'accountPanelDeletingAccountPanelProgressText':"しばらくお待ちください",
203 'offlineCopyTabLabel':"ローカルコピー", 201 'offlineCopyTabLabel':"ローカルコピー",
204 'offlineCopyTabTitle':"ローカルコピー", 202 'offlineCopyTabTitle':"ローカルコピー",
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> ", 203 '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> ",
206 'offlineCopyDownloadLinkLabel':"ダウンロード", 204 'offlineCopyDownloadLinkLabel':"ダウンロード",
207 'offlineCopyDownloadWarning':"<h4><a href=\"#\" id=\"offlineCopyDownloadWarningLink\">ローカルコピーを更新してください</a> </h4> <p>ローカルコピーを作成後に新しいカードを追加または編集しています。 最新の情報を保つためローカルコピーを更新してください。</p> ", 205 'offlineCopyDownloadWarning':"<h4><a href=\"#\" id=\"offlineCopyDownloadWarningLink\">ローカルコピーを更新してください</a> </h4> <p>ローカルコピーを作成後に新しいカードを追加または編集しています。 最新の情報を保つためローカルコピーを更新してください。</p> ",
208 'offlineCopyDownloadOk':"", 206 'offlineCopyDownloadOk':"",
209 'sharingTabLabel':"共有", 207 'sharingTabLabel':"共有",
210 'sharingTabTitle':"共有", 208 'sharingTabTitle':"共有",
211 'sharingTabDescription':"<p>暗証番号などを他人に教える必要があることは日常生活で往々にして発生します。</p> <p>同僚に留守番電話のメッセージを代わりに聞いてもらうために暗証番号を教えたり、秘書に代わりに銀行に行ってもらうために暗証番号を教えたりということはよくあることです。</p> <p>Clipperz では機密情報を安全に、そして簡単に共有できます。</p> <p> </p> <p><b>近日登場 ...</b> </p> ", 209 'sharingTabDescription':"<p>暗証番号などを他人に教える必要があることは日常生活で往々にして発生します。</p> <p>同僚に留守番電話のメッセージを代わりに聞いてもらうために暗証番号を教えたり、秘書に代わりに銀行に行ってもらうために暗証番号を教えたりということはよくあることです。</p> <p>Clipperz では機密情報を安全に、そして簡単に共有できます。</p> <p> </p> <p><b>近日登場 ...</b> </p> ",
212 'importTabLabel':"インポート", 210 'importTabLabel':"インポート",
213 'importTabTitle':"インポート", 211 'importTabTitle':"インポート",
214 'importTabDescription':"<p>コンピュータから Clipperz にデータを一括インポートできます。</p> ", 212 'importTabDescription':"<p>コンピュータから Clipperz にデータを一括インポートできます。</p> ",
215 'printingTabLabel':"エクスポート", 213 'printingTabLabel':"エクスポート",
216 'printingTabTitle':"エクスポート", 214 'printingTabTitle':"エクスポート",
217 'printingTabDescription':"<h5>印刷</h5> <p>「印刷用データ」のリンクをクリックするとウィンドウが開いて全てのデータが印刷可能な状態で表示されます。</p> <p>バックアップが目的なら、誰でも見ることができる印刷版よりは安全なローカルコピーをお薦めします。</p> ", 215 'printingTabDescription':"<h5>印刷</h5> <p>「印刷用データ」のリンクをクリックするとウィンドウが開いて全てのデータが印刷可能な状態で表示されます。</p> <p>バックアップが目的なら、誰でも見ることができる印刷版よりは安全なローカルコピーをお薦めします。</p> ",
218 'printingLinkLabel':"印刷用データ", 216 'printingLinkLabel':"印刷用データ",
219 'exportTabDescription':"<h5>JSON エクスポート</h5> <p>JSON はすべてのデータをエクスポートできます。 ダイレクトログインを含むすべての情報が保存されます。</p> <p>このフォーマットはすべてのデータを別の Clipperz アカウントに移動するときに便利です。 トラブルが発生したときにデータを復旧するのにも役立ちます。</p> <p>「JSON 出力」のリンクをクリックするとエクスポートが開始されます。</p> ", 217 'exportTabDescription':"<h5>JSON エクスポート</h5> <p>JSON はすべてのデータをエクスポートできます。 ダイレクトログインを含むすべての情報が保存されます。</p> <p>このフォーマットはすべてのデータを別の Clipperz アカウントに移動するときに便利です。 トラブルが発生したときにデータを復旧するのにも役立ちます。</p> <p>「JSON 出力」のリンクをクリックするとエクスポートが開始されます。</p> ",
220 'exportLinkLabel':"JSON 出力", 218 'exportLinkLabel':"JSON 出力",
221 'exportDataInProgressDescription':"<h4>出力中。しばらくお待ちください ...</h4> ", 219 'exportDataInProgressDescription':"<h4>出力中。しばらくお待ちください ...</h4> ",
222 'exportDataDescription':"<h4>利用法</h4> <p>下のテキストを任意のエディターにコピーして保存します。 (例: 「clipperz_export_20071217.json」)</p> ", 220 'exportDataDescription':"<h4>利用法</h4> <p>下のテキストを任意のエディターにコピーして保存します。 (例: 「clipperz_export_20071217.json」)</p> ",
223 'contactsTabLabel':"コンタクト", 221 'contactsTabLabel':"コンタクト",
224 'contactsTabTitle':"コンタクト", 222 'contactsTabTitle':"コンタクト",
225 'passwordGeneratorTabLabel':"パスワードジェネレータ", 223 'passwordGeneratorTabLabel':"パスワードジェネレータ",
226 'bookmarkletTabLabel':"ブックマークレット", 224 'bookmarkletTabLabel':"ブックマークレット",
227 'compactTabLabel':"コンパクト版", 225 'compactTabLabel':"コンパクト版",
228 'httpAuthTabLabel':"HTTP 認証", 226 'httpAuthTabLabel':"HTTP 認証",
229 'passwordGeneratorTabTitle':"パスワードジェネレータ", 227 'passwordGeneratorTabTitle':"パスワードジェネレータ",
230 'bookmarkletTabTitle':"ブックマークレット", 228 'bookmarkletTabTitle':"ブックマークレット",
231 'compactTabTitle':"コンパクト版", 229 'compactTabTitle':"コンパクト版",
232 'httpAuthTabTitle':"HTTP 認証", 230 'httpAuthTabTitle':"HTTP 認証",
233 'paswordGeneratorTabDescription':"<p> </p> ", 231 'paswordGeneratorTabDescription':"<p> </p> ",
234 'passwordGeneratorTabButtonLabel':"パスワード生成", 232 'passwordGeneratorTabButtonLabel':"パスワード生成",
235 'bookmarkletTabLabel':"ブックマークレット", 233 'bookmarkletTabLabel':"ブックマークレット",
236 'bookmarkletTabTitle':"ブックマークレット", 234 'bookmarkletTabTitle':"ブックマークレット",
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> ", 235 '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> ",
238 'bookmarkletTabBookmarkletTitle':"Clipperz に追加", 236 'bookmarkletTabBookmarkletTitle':"Clipperz に追加",
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> ", 237 '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> ",
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> ", 238 '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> ",
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> ", 239 '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> ",
242 'mainPanelDirectLoginBlockLabel':"ダイレクトログイン", 240 'mainPanelDirectLoginBlockLabel':"ダイレクトログイン",
243 'directLinkReferenceShowButtonLabel':"表示", 241 'directLinkReferenceShowButtonLabel':"表示",
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> ", 242 '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> ",
245 'mainPanelRecordsBlockLabel':"カード", 243 'mainPanelRecordsBlockLabel':"カード",
246 'mainPanelAddRecordButtonLabel':"新規カード追加", 244 'mainPanelAddRecordButtonLabel':"新規カード追加",
247 'mainPanelRemoveRecordButtonLabel':"カード削除", 245 'mainPanelRemoveRecordButtonLabel':"カード削除",
248 'mainPanelRecordFilterBlockAllLabel':"すべて", 246 'mainPanelRecordFilterBlockAllLabel':"すべて",
249 'mainPanelRecordFilterBlockTagsLabel':"タグ", 247 'mainPanelRecordFilterBlockTagsLabel':"タグ",
250 'mainPanelRecordFilterBlockSearchLabel':"検索", 248 'mainPanelRecordFilterBlockSearchLabel':"検索",
251 'recordDetailNoRecordAtAllTitle':"Clipperz へようこそ", 249 'recordDetailNoRecordAtAllTitle':"Clipperz へようこそ",
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> ", 250 '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> ",
253 'newRecordWizardTitleBox':"<h5>テンプレート選択</h5> <p>カードはシンプルでパスワードや重要な情報を何でも保存できる柔軟性があります。</p> <p>まずはテンプレートを選んでください。  カードはいつでも自由に変更できます。</p> ", 251 'newRecordWizardTitleBox':"<h5>テンプレート選択</h5> <p>カードはシンプルでパスワードや重要な情報を何でも保存できる柔軟性があります。</p> <p>まずはテンプレートを選んでください。  カードはいつでも自由に変更できます。</p> ",
254 'newRecordWizardBookmarkletConfigurationTitle':"ダイレクトログイン", 252 'newRecordWizardBookmarkletConfigurationTitle':"ダイレクトログイン",
255 'newRecordWizardBookmarkletConfigurationDescription':"<p>ブックマークレットが生成したコードを下に貼り付けてください。</p> <p>ダイレクトログイン情報を含む新しいカードが作成されます。</p> ", 253 'newRecordWizardBookmarkletConfigurationDescription':"<p>ブックマークレットが生成したコードを下に貼り付けてください。</p> <p>ダイレクトログイン情報を含む新しいカードが作成されます。</p> ",
256 'newRecordWizardCreateButtonLabel':"作成", 254 'newRecordWizardCreateButtonLabel':"作成",
257 'newRecordWizardCancelButtonLabel':"キャンセル", 255 'newRecordWizardCancelButtonLabel':"キャンセル",
258 'donateSplashPanelTitle':"Clipperz のために今すぐ寄付しよう", 256 'donateSplashPanelTitle':"Clipperz のために今すぐ寄付しよう",
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> ", 257 'donateSplashPanelDescription':"<p>寄付する理由:</p> <ul> <li> <p>新機能追加をサポートします</p> </li> <li> <p>Clipperz を無料に保ちます</p> </li> <li> <p>開発陣の仕事に感謝します</p> </li> </ul> <p>詳しくは寄付のページをごらんください .</p> <p><b>寄付しますか?</b> </p> ",
260 'donateCloseButtonLabel':"あとでする", 258 'donateCloseButtonLabel':"あとでする",
261 'donateDonateButtonLabel':"はい", 259 'donateDonateButtonLabel':"はい",
262 'recordTemplates':{ 260 'recordTemplates':{
263 'WebAccount':{ 261 'WebAccount':{
264 'title':"ウェブパスワード", 262 'title':"ウェブパスワード",
265 'description':"<p>ログイン情報用のシンプルなカードです。</p> ", 263 'description':"<p>ログイン情報用のシンプルなカードです。</p> ",
266 'fields':{ 264 'fields':{
267 'URL':"ウェブアドレス", 265 'URL':"ウェブアドレス",
268 'TXT':"ユーザー名またはメールアドレス", 266 'TXT':"ユーザー名またはメールアドレス",
269 'PWD':"パスワード" 267 'PWD':"パスワード"
270 } 268 }
271 }, 269 },
272 'BankAccount':{ 270 'BankAccount':{
273 'title':"銀行口座", 271 'title':"銀行口座",
274 'description':"<p>口座番号とオンラインバンキング情報用のカードです。</p> ", 272 'description':"<p>口座番号とオンラインバンキング情報用のカードです。</p> ",
275 'fields':{ 273 'fields':{
276 'TXT':"銀行", 274 'TXT':"銀行",
277 'TXT':"口座番号", 275 'TXT':"口座番号",
278 'URL':"銀行サイト", 276 'URL':"銀行サイト",
279 'TXT':"オンラインバンキング ID", 277 'TXT':"オンラインバンキング ID",
280 'PWD':"オンラインバンキングパスワード" 278 'PWD':"オンラインバンキングパスワード"
281 } 279 }
282 }, 280 },
283 'CreditCard':{ 281 'CreditCard':{
284 'title':"クレジットカード", 282 'title':"クレジットカード",
285 'description':"<p>クレジットカードに関するあらゆる情報を保管できます。</p> ", 283 'description':"<p>クレジットカードに関するあらゆる情報を保管できます。</p> ",
286 'fields':{ 284 'fields':{
287 'TXT':"種類(Visa 、 AMEX など)", 285 'TXT':"種類(Visa 、 AMEX など)",
288 'TXT':"番号", 286 'TXT':"番号",
289 'TXT':"所有者名", 287 'TXT':"所有者名",
290 'TXT':"有効期限", 288 'TXT':"有効期限",
291 'TXT':"CVV2 番号", 289 'TXT':"CVV2 番号",
292 'PWD':"暗証番号", 290 'PWD':"暗証番号",
293 'URL':"カード会社サイト", 291 'URL':"カード会社サイト",
294 'TXT':"ユーザー名", 292 'TXT':"ユーザー名",
295 'PWD':"パスワード" 293 'PWD':"パスワード"
296 } 294 }
297 }, 295 },
298 'AddressBookEntry':{ 296 'AddressBookEntry':{
299 'title':"アドレス帳", 297 'title':"アドレス帳",
300 'description':"<p>Clipperz はプライベートなアドレス帳としても機能します。 このテンプレートを利用して簡単に新しい住所を追加できます。</p> ", 298 'description':"<p>Clipperz はプライベートなアドレス帳としても機能します。 このテンプレートを利用して簡単に新しい住所を追加できます。</p> ",
301 'fields':{ 299 'fields':{
302 'TXT':"名前", 300 'TXT':"名前",
303 'TXT':"メールアドレス", 301 'TXT':"メールアドレス",
304 'TXT':"電話番号", 302 'TXT':"電話番号",
305 'TXT':"携帯電話", 303 'TXT':"携帯電話",
306 'ADDR':"住所" 304 'ADDR':"住所"
307 } 305 }
308 }, 306 },
309 'Custom':{ 307 'Custom':{
310 'title':"カスタムカード", 308 'title':"カスタムカード",
311 'description':"<p>カスタムカードを使えばどんな情報でも保管できます。</p> ", 309 'description':"<p>カスタムカードを使えばどんな情報でも保管できます。</p> ",
312 'fields':{ 310 'fields':{
313 'TXT':"ラベル 1", 311 'TXT':"ラベル 1",
314 'TXT':"ラベル 2", 312 'TXT':"ラベル 2",
315 'TXT':"ラベル 3" 313 'TXT':"ラベル 3"
316 } 314 }
317 } 315 }
318}, 316},
319 'recordFieldTypologies':{ 317 'recordFieldTypologies':{
320 'TXT':{ 318 'TXT':{
321 'description':"テキスト入力欄", 319 'description':"テキスト入力欄",
322 'shortDescription':"テキスト" 320 'shortDescription':"テキスト"
323 }, 321 },
324 'PWD':{ 322 'PWD':{
325 'description':"通常は非表示になるテキスト入力欄", 323 'description':"通常は非表示になるテキスト入力欄",
326 'shortDescription':"パスワード" 324 'shortDescription':"パスワード"
327 }, 325 },
328 'URL':{ 326 'URL':{
329 'description':"表示モードではクリックできる URL 入力欄", 327 'description':"表示モードではクリックできる URL 入力欄",
330 'shortDescription':"ウェブアドレス" 328 'shortDescription':"ウェブアドレス"
331 }, 329 },
332 'DATE':{ 330 'DATE':{
333 'description':"日付入力欄", 331 'description':"日付入力欄",
334 'shortDescription':"日付" 332 'shortDescription':"日付"
335 }, 333 },
336 'ADDR':{ 334 'ADDR':{
337 'description':"Google マップ用の URL に似た文字列", 335 'description':"Google マップ用の URL に似た文字列",
338 'shortDescription':"住所" 336 'shortDescription':"住所"
339 }, 337 },
340 'CHECK':{ 338 'CHECK':{
341 'description':"チェックボックスの詳細", 339 'description':"チェックボックスの詳細",
342 'shortDescription':"チェックボックス" 340 'shortDescription':"チェックボックス"
343 }, 341 },
344 'RADIO':{ 342 'RADIO':{
345 'description':"ラジオボタンの詳細", 343 'description':"ラジオボタンの詳細",
346 'shortDescription':"ラジオボタン" 344 'shortDescription':"ラジオボタン"
347 }, 345 },
348 'SELECT':{ 346 'SELECT':{
349 'description':"セレクトリストの詳細", 347 'description':"セレクトリストの詳細",
350 'shortDescription':"セレクトリスト" 348 'shortDescription':"セレクトリスト"
351 } 349 }
352}, 350},
353 'newRecordPanelGeneralExceptionTitle':"エラー", 351 'newRecordPanelGeneralExceptionTitle':"エラー",
354 'newRecordPanelGeneralExceptionMessage':"コードが不正です。 ブックマークレットを確認してもう一度やり直してください。", 352 'newRecordPanelGeneralExceptionMessage':"コードが不正です。 ブックマークレットを確認してもう一度やり直してください。",
355 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"エラー", 353 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"エラー",
356 'newRecordPanelWrongBookmarkletVersionExceptionMessage':"古いバージョンのブックマークレットで生成されたコードです。 ブックマークレットを更新してやり直してください。", 354 'newRecordPanelWrongBookmarkletVersionExceptionMessage':"古いバージョンのブックマークレットで生成されたコードです。 ブックマークレットを更新してやり直してください。",
357 'newRecordPanelExceptionPanelCloseButtonLabel':"キャンセル", 355 'newRecordPanelExceptionPanelCloseButtonLabel':"キャンセル",
358 'mainPanelDeletingRecordPanelConfirmationTitle':"カード削除中", 356 'mainPanelDeletingRecordPanelConfirmationTitle':"カード削除中",
359 'mainPanelDeleteRecordPanelConfirmationText':"本当に削除しますか?", 357 'mainPanelDeleteRecordPanelConfirmationText':"本当に削除しますか?",
360 'mainPanelDeleteRecordPanelConfirmButtonLabel':"はい", 358 'mainPanelDeleteRecordPanelConfirmButtonLabel':"はい",
361 'mainPanelDeleteRecordPanelDenyButtonLabel':"いいえ", 359 'mainPanelDeleteRecordPanelDenyButtonLabel':"いいえ",
362 'mainPanelDeletingRecordPanelInitialTitle':"カード削除中", 360 'mainPanelDeletingRecordPanelInitialTitle':"カード削除中",
363 'mainPanelDeletingRecordPanelInitialText':"---", 361 'mainPanelDeletingRecordPanelInitialText':"---",
364 'mainPanelDeletingRecordPanelCompletedText':"完了", 362 'mainPanelDeletingRecordPanelCompletedText':"完了",
365 'deleteRecordPanelCollectRecordDataMessageTitle':"カード削除", 363 'deleteRecordPanelCollectRecordDataMessageTitle':"カード削除",
366 'deleteRecordPanelCollectRecordDataMessageText':"カードリスト更新中", 364 'deleteRecordPanelCollectRecordDataMessageText':"カードリスト更新中",
367 'deleteRecordPanelEncryptUserDataMessageTitle':"カード削除", 365 'deleteRecordPanelEncryptUserDataMessageTitle':"カード削除",
368 'deleteRecordPanelEncryptUserDataMessageText':"カードヘッダ暗号化", 366 'deleteRecordPanelEncryptUserDataMessageText':"カードヘッダ暗号化",
369 'deleteRecordPanelSendingDataToTheServerMessageTitle':"カード削除", 367 'deleteRecordPanelSendingDataToTheServerMessageTitle':"カード削除",
370 'deleteRecordPanelSendingDataToTheServerMessageText':"送信中", 368 'deleteRecordPanelSendingDataToTheServerMessageText':"送信中",
371 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"カード削除", 369 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"カード削除",
372 'deleteRecordPanelUpdatingTheInterfaceMessageText':"更新中", 370 'deleteRecordPanelUpdatingTheInterfaceMessageText':"更新中",
373 'recordDetailNoRecordSelectedTitle':"カードが選択されていません", 371 'recordDetailNoRecordSelectedTitle':"カードが選択されていません",
374 'recordDetailNoRecordSelectedDescription':"<p>左のリストからカードを選択してください。</p> ", 372 'recordDetailNoRecordSelectedDescription':"<p>左のリストからカードを選択してください。</p> ",
375 'recordDetailLoadingRecordMessage':"データ受信中", 373 'recordDetailLoadingRecordMessage':"データ受信中",
376 'recordDetailDecryptingRecordMessage':"データ復元中", 374 'recordDetailDecryptingRecordMessage':"データ復元中",
377 'recordDetailLoadingRecordVersionMessage':"最新情報を受信中", 375 'recordDetailLoadingRecordVersionMessage':"最新情報を受信中",
378 'recordDetailDecryptingRecordVersionMessage':"最新情報を復元中", 376 'recordDetailDecryptingRecordVersionMessage':"最新情報を復元中",
379 'recordDetailLoadingErrorMessageTitle':"受信エラー", 377 'recordDetailLoadingErrorMessageTitle':"受信エラー",
380 'recordDetailNotesLabel':"ノート", 378 'recordDetailNotesLabel':"ノート",
381 'recordDetailLabelFieldColumnLabel':"ラベル", 379 'recordDetailLabelFieldColumnLabel':"ラベル",
382 'recordDetailDataFieldColumnLabel':"データ", 380 'recordDetailDataFieldColumnLabel':"データ",
383 'recordDetailTypeFieldColumnLabel':"タイプ", 381 'recordDetailTypeFieldColumnLabel':"タイプ",
384 'recordDetailSavingChangesMessagePanelInitialTitle':"保存中", 382 'recordDetailSavingChangesMessagePanelInitialTitle':"保存中",
385 'recordDetailSavingChangesMessagePanelInitialText':"---", 383 'recordDetailSavingChangesMessagePanelInitialText':"---",
386 'recordDetailRemoveFieldButtonLabel':"-", 384 'recordDetailRemoveFieldButtonLabel':"-",
387 'recordDetailAddFieldButtonLabel':"フィールド追加", 385 'recordDetailAddFieldButtonLabel':"フィールド追加",
388 'recordDetailPasswordFieldHelpLabel':"パスワードをコピーするには星マークをクリックして ctrl-C をタイプします", 386 'recordDetailPasswordFieldHelpLabel':"パスワードをコピーするには星マークをクリックして ctrl-C をタイプします",
389 'recordDetailPasswordFieldScrambleLabel':"隠す", 387 'recordDetailPasswordFieldScrambleLabel':"隠す",
390 'recordDetailPasswordFieldUnscrambleLabel':"可視化", 388 'recordDetailPasswordFieldUnscrambleLabel':"可視化",
391 'recordDetailDirectLoginBlockTitle':"ダイレクトログイン", 389 'recordDetailDirectLoginBlockTitle':"ダイレクトログイン",
392 'recordDetailNewDirectLoginDescription':"<p>ダイレクトログイン設定</p> ", 390 'recordDetailNewDirectLoginDescription':"<p>ダイレクトログイン設定</p> ",
393 'recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription':"<p>オンラインサービスのログイン情報を含んでいますか?</p> <p>ブックマークレットを使ってダイレクトログインを設定しましょう!</p> ", 391 'recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription':"<p>オンラインサービスのログイン情報を含んでいますか?</p> <p>ブックマークレットを使ってダイレクトログインを設定しましょう!</p> ",
394 'recordDetailDeleteDirectLoginButtonLabel':"-", 392 'recordDetailDeleteDirectLoginButtonLabel':"-",
395 'recordDetailAddNewDirectLoginButtonLabel':"新規ダイレクトログイン追加", 393 'recordDetailAddNewDirectLoginButtonLabel':"新規ダイレクトログイン追加",
396 'recordDetailEditButtonLabel':"編集", 394 'recordDetailEditButtonLabel':"編集",
397 'recordDetailSaveButtonLabel':"保存", 395 'recordDetailSaveButtonLabel':"保存",
398 'recordDetailCancelButtonLabel':"キャンセル", 396 'recordDetailCancelButtonLabel':"キャンセル",
399 'newRecordTitleLabel':"_新規カード_", 397 'newRecordTitleLabel':"_新規カード_",
400 'newDirectLoginLabelSuffix':"", 398 'newDirectLoginLabelSuffix':"",
401 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"カード保存", 399 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"カード保存",
402 'recordSaveChangesPanelCollectRecordInfoMessageText':"更新中", 400 'recordSaveChangesPanelCollectRecordInfoMessageText':"更新中",
403 'recordSaveChangesPanelEncryptUserDataMessageTitle':"カード保存", 401 'recordSaveChangesPanelEncryptUserDataMessageTitle':"カード保存",
404 'recordSaveChangesPanelEncryptUserDataMessageText':"カードヘッダ暗号化", 402 'recordSaveChangesPanelEncryptUserDataMessageText':"カードヘッダ暗号化",
405 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"カード保存", 403 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"カード保存",
406 'recordSaveChangesPanelEncryptRecordDataMessageText':"カードデータ暗号化", 404 'recordSaveChangesPanelEncryptRecordDataMessageText':"カードデータ暗号化",
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 8fde63f..8478c0d 100644
--- a/frontend/beta/js/Clipperz/PM/Strings/Strings_pt-BR.js
+++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_pt-BR.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26Clipperz.PM.Strings.Languages['pt-BR'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 24Clipperz.PM.Strings.Languages['pt-BR'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], {
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> ", 25 '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> ",
28 'loginFormTitle':"entre sua conta Clipperz", 26 'loginFormTitle':"entre sua conta Clipperz",
29 'loginFormUsernameLabel':"nome do usuário", 27 'loginFormUsernameLabel':"nome do usuário",
30 'loginFormPassphraseLabel':"frase chave", 28 'loginFormPassphraseLabel':"frase chave",
31 'loginFormDontHaveAnAccountLabel':"não tem uma conta?", 29 'loginFormDontHaveAnAccountLabel':"não tem uma conta?",
32 'loginFormCreateOneLabel':"criar uma", 30 'loginFormCreateOneLabel':"criar uma",
33 'loginFormForgotYourCredentialsLabel':"esqueceu suas credenciais?", 31 'loginFormForgotYourCredentialsLabel':"esqueceu suas credenciais?",
34 'loginFormAarghThatsBadLabel':"xiiiii! isso é não é bom!", 32 'loginFormAarghThatsBadLabel':"xiiiii! isso é não é bom!",
35 'loginFormAfraidOfMaliciousScriptsLabel':"medo de scripts maliciosos?", 33 'loginFormAfraidOfMaliciousScriptsLabel':"medo de scripts maliciosos?",
36 'loginFormVerifyTheCodeLabel':"verifique o código", 34 'loginFormVerifyTheCodeLabel':"verifique o código",
37 'loginFormButtonLabel':"Entrar", 35 'loginFormButtonLabel':"Entrar",
38 'loginFormOneTimePasswordCheckboxLabel':"use uma frase chave descartável", 36 'loginFormOneTimePasswordCheckboxLabel':"use uma frase chave descartável",
39 'loginPanelSwithLanguageDescription':"<h5>Mudar para sua linguagem preferida</h5> ", 37 'loginPanelSwithLanguageDescription':"<h5>Mudar para sua linguagem preferida</h5> ",
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> ", 38 '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> ",
41 'OTPloginMessagePanelInitialTitle':"Acessando usando a frase chave descartável", 39 'OTPloginMessagePanelInitialTitle':"Acessando usando a frase chave descartável",
42 'OTPloginMessagePanelInitialText':"Enviando credenciais descartáveis ...", 40 'OTPloginMessagePanelInitialText':"Enviando credenciais descartáveis ...",
43 'OTPloginMessagePanelLoadingTitle':"Acessando usando a frase chave descartável", 41 'OTPloginMessagePanelLoadingTitle':"Acessando usando a frase chave descartável",
44 'OTPloginMessagePanelLoadingText':"Buscando informação de autenticação codificada no servidor ...", 42 'OTPloginMessagePanelLoadingText':"Buscando informação de autenticação codificada no servidor ...",
45 'OTPloginMessagePanelProcessingTitle':"Acessando usando a frase chave descartável", 43 'OTPloginMessagePanelProcessingTitle':"Acessando usando a frase chave descartável",
46 'OTPloginMessagePanelProcessingText':"Decodificação local da informação de autenticação ...", 44 'OTPloginMessagePanelProcessingText':"Decodificação local da informação de autenticação ...",
47 'loginMessagePanelInitialTitle':"Entrando ...", 45 'loginMessagePanelInitialTitle':"Entrando ...",
48 'loginMessagePanelInitialButtonLabel':"Cancelar", 46 'loginMessagePanelInitialButtonLabel':"Cancelar",
49 'loginMessagePanelConnectedTitle':"Conectado", 47 'loginMessagePanelConnectedTitle':"Conectado",
50 'loginMessagePanelConnectedText':"Concluído", 48 'loginMessagePanelConnectedText':"Concluído",
51 'loginMessagePanelFailureTitle':"Erro", 49 'loginMessagePanelFailureTitle':"Erro",
52 'loginMessagePanelFailureText':"Ocorreu uma falha", 50 'loginMessagePanelFailureText':"Ocorreu uma falha",
53 'loginMessagePanelFailureButtonLabel':"Fechar", 51 'loginMessagePanelFailureButtonLabel':"Fechar",
54 'connectionLoginSendingCredentialsMessageTitle':"Verificando credenciais", 52 'connectionLoginSendingCredentialsMessageTitle':"Verificando credenciais",
55 'connectionLoginSendingCredentialsMessageText':"Enviando credenciais", 53 'connectionLoginSendingCredentialsMessageText':"Enviando credenciais",
56 'connectionLoginCredentialsVerificationMessageTitle':"Verificando credenciais", 54 'connectionLoginCredentialsVerificationMessageTitle':"Verificando credenciais",
57 'connectionLoginCredentialsVerificationMessageText':"Realizando autenticação SRP", 55 'connectionLoginCredentialsVerificationMessageText':"Realizando autenticação SRP",
58 'connectionLoginDoneMessageTitle':"Verificando credenciais", 56 'connectionLoginDoneMessageTitle':"Verificando credenciais",
59 'connectionLoginDoneMessageText':"Conectado", 57 'connectionLoginDoneMessageText':"Conectado",
60 'userLoginPanelUpgradingUserCredentialsMessageTitle':"Verificando credenciais", 58 'userLoginPanelUpgradingUserCredentialsMessageTitle':"Verificando credenciais",
61 'userLoginPanelUpgradingUserCredentialsMessageText':"Upgrade de suas credenciais para um novo esquema de autenticação", 59 'userLoginPanelUpgradingUserCredentialsMessageText':"Upgrade de suas credenciais para um novo esquema de autenticação",
62 'userLoginPanelConnectedMessageTitle':"Usuário autenticado", 60 'userLoginPanelConnectedMessageTitle':"Usuário autenticado",
63 'userLoginPanelConnectedMessageText':"Logado com sucesso em", 61 'userLoginPanelConnectedMessageText':"Logado com sucesso em",
64 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"Verificando credenciais", 62 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"Verificando credenciais",
65 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"Tentando esquema antigo de autenticação", 63 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"Tentando esquema antigo de autenticação",
66 'userLoginPanelLoadingUserDataMessageTitle':"Usuário autenticado", 64 'userLoginPanelLoadingUserDataMessageTitle':"Usuário autenticado",
67 'userLoginPanelLoadingUserDataMessageText':"Baixando cabeçalhos de cartão codificados de Clipperz", 65 'userLoginPanelLoadingUserDataMessageText':"Baixando cabeçalhos de cartão codificados de Clipperz",
68 'userLoginPanelDecryptingUserDataMessageTitle':"Usuário autenticado", 66 'userLoginPanelDecryptingUserDataMessageTitle':"Usuário autenticado",
69 'userLoginPanelDecryptingUserDataMessageText':"Descrição local de cabeçalhos dos cartões", 67 'userLoginPanelDecryptingUserDataMessageText':"Descrição local de cabeçalhos dos cartões",
70 'userLoginPanelDecryptingUserStatisticsMessageTitle':"Usuário autenticado", 68 'userLoginPanelDecryptingUserStatisticsMessageTitle':"Usuário autenticado",
71 'userLoginPanelDecryptingUserStatisticsMessageText':"Descrição local de estatísticas de uso", 69 'userLoginPanelDecryptingUserStatisticsMessageText':"Descrição local de estatísticas de uso",
72 'splashAlertTitle':"Bem-vindo ao Clipperz!", 70 'splashAlertTitle':"Bem-vindo ao Clipperz!",
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> ", 71 '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> ",
74 'splashAlertCloseButtonLabel':"Ok", 72 'splashAlertCloseButtonLabel':"Ok",
75 'registrationFormTitle':"crie sua conta", 73 'registrationFormTitle':"crie sua conta",
76 'registrationFormUsernameLabel':"nome do usuário", 74 'registrationFormUsernameLabel':"nome do usuário",
77 'registrationFormPassphraseLabel':"frase chave", 75 'registrationFormPassphraseLabel':"frase chave",
78 'registrationFormRetypePassphraseLabel':"entre novamente sua frase chave", 76 'registrationFormRetypePassphraseLabel':"entre novamente sua frase chave",
79 'registrationFormSafetyCheckLabel':"Eu compreendo que Clipperz não será capaz de recuperar senhas perdidas.", 77 'registrationFormSafetyCheckLabel':"Eu compreendo que Clipperz não será capaz de recuperar senhas perdidas.",
80 'registrationFormTermsOfServiceCheckLabel':"Eu li e concordo com os <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Termos do Serviço</a>.", 78 'registrationFormTermsOfServiceCheckLabel':"Eu li e concordo com os <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Termos do Serviço</a>.",
81 'registrationFormDoYouAlreadyHaveAnAccountLabel':"você já tem uma conta?", 79 'registrationFormDoYouAlreadyHaveAnAccountLabel':"você já tem uma conta?",
82 'registrationFormSimplyLoginLabel':"login simples", 80 'registrationFormSimplyLoginLabel':"login simples",
83 'registrationFormButtonLabel':"Registrar", 81 'registrationFormButtonLabel':"Registrar",
84 'registrationFormWarningMessageNotMatchingPassphrases':"Suas frases chaves não conferem, por favor tente novamente.", 82 'registrationFormWarningMessageNotMatchingPassphrases':"Suas frases chaves não conferem, por favor tente novamente.",
85 'registrationFormWarningMessageSafetyCheckNotSelected':"Por favor leia e confira todos os campos abaixo.", 83 'registrationFormWarningMessageSafetyCheckNotSelected':"Por favor leia e confira todos os campos abaixo.",
86 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"Você precisa concordar com os Termos do Serviço.", 84 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"Você precisa concordar com os Termos do Serviço.",
87 'registrationMessagePanelInitialTitle':"Criando conta ...", 85 'registrationMessagePanelInitialTitle':"Criando conta ...",
88 'registrationMessagePanelInitialText':"---", 86 'registrationMessagePanelInitialText':"---",
89 'registrationMessagePanelInitialButtonLabel':"Cancelar", 87 'registrationMessagePanelInitialButtonLabel':"Cancelar",
90 'registrationMessagePanelRegistrationDoneTitle':"Registro", 88 'registrationMessagePanelRegistrationDoneTitle':"Registro",
91 'registrationMessagePanelRegistrationDoneText':"Concluído", 89 'registrationMessagePanelRegistrationDoneText':"Concluído",
92 'registrationMessagePanelFailureTitle':"Registrou falhou", 90 'registrationMessagePanelFailureTitle':"Registrou falhou",
93 'registrationMessagePanelFailureButtonLabel':"Fechar", 91 'registrationMessagePanelFailureButtonLabel':"Fechar",
94 'connectionRegistrationSendingRequestMessageText':"Verificando credenciais", 92 'connectionRegistrationSendingRequestMessageText':"Verificando credenciais",
95 'connectionRegistrationSendingCredentialsMessageText':"Enviando credenciais", 93 'connectionRegistrationSendingCredentialsMessageText':"Enviando credenciais",
96 'registrationSplashPanelTitle':"Informe de segurança", 94 'registrationSplashPanelTitle':"Informe de segurança",
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> ", 95 '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> ",
98 'registrationSplashPanelUsernameLabel':"nome de usuário", 96 'registrationSplashPanelUsernameLabel':"nome de usuário",
99 'registrationSplashPanelPassphraseLabel':"frase chave", 97 'registrationSplashPanelPassphraseLabel':"frase chave",
100 'registrationSplashPanelShowPassphraseButtonLabel':"mostrar frase chave", 98 'registrationSplashPanelShowPassphraseButtonLabel':"mostrar frase chave",
101 'donateHeaderLinkLabel':"doar", 99 'donateHeaderLinkLabel':"doar",
102 'creditsHeaderLinkLabel':"créditos", 100 'creditsHeaderLinkLabel':"créditos",
103 'feedbackHeaderLinkLabel':"feedback", 101 'feedbackHeaderLinkLabel':"feedback",
104 'helpHeaderLinkLabel':"ajuda", 102 'helpHeaderLinkLabel':"ajuda",
105 'forumHeaderLinkLabel':"fórum", 103 'forumHeaderLinkLabel':"fórum",
106 'recordMenuLabel':"cartões", 104 'recordMenuLabel':"cartões",
107 'accountMenuLabel':"conta", 105 'accountMenuLabel':"conta",
108 'dataMenuLabel':"dados", 106 'dataMenuLabel':"dados",
109 'contactsMenuLabel':"contatos", 107 'contactsMenuLabel':"contatos",
110 'toolsMenuLabel':"ferramentas", 108 'toolsMenuLabel':"ferramentas",
111 'logoutMenuLabel':"sair", 109 'logoutMenuLabel':"sair",
112 'lockMenuLabel':"bloquear", 110 'lockMenuLabel':"bloquear",
113 'lockTitle':"A conta está bloqueada", 111 'lockTitle':"A conta está bloqueada",
114 'lockDescription':"<p>Para desbloquear sua conta, por favor, entre com a frase chave</p> ", 112 'lockDescription':"<p>Para desbloquear sua conta, por favor, entre com a frase chave</p> ",
115 'unlockButtonLabel':"desbloquear", 113 'unlockButtonLabel':"desbloquear",
116 'changePasswordTabLabel':"Alterar sua frase chave", 114 'changePasswordTabLabel':"Alterar sua frase chave",
117 'changePasswordTabTitle':"Alterar sua frase chave", 115 'changePasswordTabTitle':"Alterar sua frase chave",
118 'changePasswordFormUsernameLabel':"nome de usuário", 116 'changePasswordFormUsernameLabel':"nome de usuário",
119 'changePasswordFormOldPassphraseLabel':"frase chave antiga", 117 'changePasswordFormOldPassphraseLabel':"frase chave antiga",
120 'changePasswordFormNewPassphraseLabel':"frase chave nova", 118 'changePasswordFormNewPassphraseLabel':"frase chave nova",
121 'changePasswordFormRetypePassphraseLabel':"re-inserir frase chave nova", 119 'changePasswordFormRetypePassphraseLabel':"re-inserir frase chave nova",
122 'changePasswordFormSafetyCheckboxLabel':"Eu compreendo que Clipperz não poderá recuperar a frase chave perdida.", 120 'changePasswordFormSafetyCheckboxLabel':"Eu compreendo que Clipperz não poderá recuperar a frase chave perdida.",
123 'changePasswordFormSubmitLabel':"Alterar frase chave", 121 'changePasswordFormSubmitLabel':"Alterar frase chave",
124 'changePasswordFormWrongUsernameWarning':"Nome de usuário errado", 122 'changePasswordFormWrongUsernameWarning':"Nome de usuário errado",
125 'changePasswordFormWrongPassphraseWarning':"Frase chave errada", 123 'changePasswordFormWrongPassphraseWarning':"Frase chave errada",
126 'changePasswordFormWrongRetypePassphraseWarning':"Suas frases chaves não conferem, por favor tente novamente.", 124 'changePasswordFormWrongRetypePassphraseWarning':"Suas frases chaves não conferem, por favor tente novamente.",
127 'changePasswordFormSafetyCheckWarning':"Por favor leia e confira todos os campos abaixo.", 125 'changePasswordFormSafetyCheckWarning':"Por favor leia e confira todos os campos abaixo.",
128 'changePasswordFormProgressDialogTitle':"Alterando credenciais do usuário", 126 'changePasswordFormProgressDialogTitle':"Alterando credenciais do usuário",
129 'changePasswordFormProgressDialogConnectedMessageTitle':"Conectado", 127 'changePasswordFormProgressDialogConnectedMessageTitle':"Conectado",
130 'changePasswordFormProgressDialogConnectedMessageText':"Concluído", 128 'changePasswordFormProgressDialogConnectedMessageText':"Concluído",
131 'changePasswordFormProgressDialogErrorMessageTitle':"Erro", 129 'changePasswordFormProgressDialogErrorMessageTitle':"Erro",
132 'changePasswordFormProgressDialogErrorMessageText':"Mudança de credenciais falhou!", 130 'changePasswordFormProgressDialogErrorMessageText':"Mudança de credenciais falhou!",
133 'changeCredentialsPanelEncryptingDataMessageTitle':"Alterando sua frase chave", 131 'changeCredentialsPanelEncryptingDataMessageTitle':"Alterando sua frase chave",
134 'changeCredentialsPanelEncryptingDataMessageText':"Codificação local de cabeçalho de cartões", 132 'changeCredentialsPanelEncryptingDataMessageText':"Codificação local de cabeçalho de cartões",
135 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"Alterando sua frase chave", 133 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"Alterando sua frase chave",
136 'changeCredentialsPanelCreatingNewCredentialsMessageText':"Atualizando suas credenciais", 134 'changeCredentialsPanelCreatingNewCredentialsMessageText':"Atualizando suas credenciais",
137 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Alterando sua frase chave", 135 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Alterando sua frase chave",
138 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Enviando suas credenciais codificadas para Clipperz", 136 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Enviando suas credenciais codificadas para Clipperz",
139 'changeCredentialsPanelDoneMessageTitle':"Alterando sua frase chave", 137 'changeCredentialsPanelDoneMessageTitle':"Alterando sua frase chave",
140 'changeCredentialsPanelDoneMessageText':"Concluído", 138 'changeCredentialsPanelDoneMessageText':"Concluído",
141 'manageOTPTabLabel':"Gerenciar suas frases chaves descartáveis", 139 'manageOTPTabLabel':"Gerenciar suas frases chaves descartáveis",
142 'manageOTPTabTitle':"Gerenciar suas frases chaves descartáveis", 140 'manageOTPTabTitle':"Gerenciar suas frases chaves descartáveis",
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> ", 141 '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> ",
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> ", 142 'oneTimePasswordReadOnlyMessage':"<h6>Desculpe!</h6> <p>Você não pode gerenciar sua frase chave descartável quando usando a versão offline do Clipperz.</p> ",
145 'oneTimePasswordLoadingMessage':"<h6>Carregando informação</h6> <p>Por favor, aguarde ...</p> ", 143 'oneTimePasswordLoadingMessage':"<h6>Carregando informação</h6> <p>Por favor, aguarde ...</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> ", 144 '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> ",
147 'createNewOTPButtonLabel':"Novo", 145 'createNewOTPButtonLabel':"Novo",
148 'deleteOTPButtonLabel':"Apagar", 146 'deleteOTPButtonLabel':"Apagar",
149 'printOTPButtonLabel':"Imprimir", 147 'printOTPButtonLabel':"Imprimir",
150 'disabledOneTimePassword_warning':"desativada", 148 'disabledOneTimePassword_warning':"desativada",
151 'oneTimePasswordSelectionLink_selectLabel':"Selecionar:", 149 'oneTimePasswordSelectionLink_selectLabel':"Selecionar:",
152 'oneTimePasswordSelectionLink_all':"tudo", 150 'oneTimePasswordSelectionLink_all':"tudo",
153 'oneTimePasswordSelectionLink_none':"nenhum", 151 'oneTimePasswordSelectionLink_none':"nenhum",
154 'oneTimePasswordSelectionLink_used':"usado", 152 'oneTimePasswordSelectionLink_used':"usado",
155 'oneTimePasswordSelectionLink_unused':"não usado", 153 'oneTimePasswordSelectionLink_unused':"não usado",
156 'saveOTP_encryptUserDataTitle':"Salvando a frase chave descartável", 154 'saveOTP_encryptUserDataTitle':"Salvando a frase chave descartável",
157 'saveOTP_encryptUserDataText':"Processando novas credenciais descartáveis ...", 155 'saveOTP_encryptUserDataText':"Processando novas credenciais descartáveis ...",
158 'saveOTP_encryptOTPDataTitle':"Salvando a frase chave descartável", 156 'saveOTP_encryptOTPDataTitle':"Salvando a frase chave descartável",
159 'saveOTP_encryptOTPDataText':"Codificação local da informação de autenticação ...", 157 'saveOTP_encryptOTPDataText':"Codificação local da informação de autenticação ...",
160 'saveOTP_sendingDataTitle':"Salvando a frase chave descartável", 158 'saveOTP_sendingDataTitle':"Salvando a frase chave descartável",
161 'saveOTP_sendingDataText':"Enviando informação de autenticação para o servidor ...", 159 'saveOTP_sendingDataText':"Enviando informação de autenticação para o servidor ...",
162 'saveOTP_updatingInterfaceTitle':"Salvando a frase chave descartável", 160 'saveOTP_updatingInterfaceTitle':"Salvando a frase chave descartável",
163 'saveOTP_updatingInterfaceText':"Atualizando interface ...", 161 'saveOTP_updatingInterfaceText':"Atualizando interface ...",
164 'accountPreferencesLabel':"Preferências", 162 'accountPreferencesLabel':"Preferências",
165 'accountPreferencesTabTitle':"Preferências", 163 'accountPreferencesTabTitle':"Preferências",
166 'accountPreferencesLanguageTitle':"Seleção de idioma", 164 'accountPreferencesLanguageTitle':"Seleção de idioma",
167 'accountPreferencesLanguageDescription':"<p>Escolha seu idioma preferido da lista abaixo.</p> ", 165 'accountPreferencesLanguageDescription':"<p>Escolha seu idioma preferido da lista abaixo.</p> ",
168 'showDonationReminderPanelTitle':"Lembretes de doação", 166 'showDonationReminderPanelTitle':"Lembretes de doação",
169 'showDonationReminderPanelDescription':"<p>Mostrar lembretes de doação</p> ", 167 'showDonationReminderPanelDescription':"<p>Mostrar lembretes de doação</p> ",
170 'saveUserPreferencesFormSubmitLabel':"Salvar", 168 'saveUserPreferencesFormSubmitLabel':"Salvar",
171 'cancelUserPreferencesFormSubmitLabel':"Cancelar", 169 'cancelUserPreferencesFormSubmitLabel':"Cancelar",
172 'accountPreferencesSavingPanelTitle_Step1':"Salvando preferências", 170 'accountPreferencesSavingPanelTitle_Step1':"Salvando preferências",
173 'accountPreferencesSavingPanelText_Step1':"Codificação local de suas preferências", 171 'accountPreferencesSavingPanelText_Step1':"Codificação local de suas preferências",
174 'accountPreferencesSavingPanelTitle_Step2':"Salvando preferências", 172 'accountPreferencesSavingPanelTitle_Step2':"Salvando preferências",
175 'accountPreferencesSavingPanelText_Step2':"Enviando informação codificada para o servidor", 173 'accountPreferencesSavingPanelText_Step2':"Enviando informação codificada para o servidor",
176 'accountLoginHistoryLabel':"Histórico de conexão", 174 'accountLoginHistoryLabel':"Histórico de conexão",
177 'loginHistoryTabTitle':"Histórico de conexão", 175 'loginHistoryTabTitle':"Histórico de conexão",
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> ", 176 '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> ",
179 'loginHistoryLoadingMessage':"<h6>Carregando informação</h6> <p>Por favor, aguarde ...</p> ", 177 'loginHistoryLoadingMessage':"<h6>Carregando informação</h6> <p>Por favor, aguarde ...</p> ",
180 'loginHistoryLoadedMessageConfig':"<h6>Suas 10 últimas conexões</h6> <p> </p> ", 178 'loginHistoryLoadedMessageConfig':"<h6>Suas 10 últimas conexões</h6> <p> </p> ",
181 'loginHistoryIPLabel':"IP", 179 'loginHistoryIPLabel':"IP",
182 'loginHistoryTimeLabel':"data", 180 'loginHistoryTimeLabel':"data",
183 'loginHistoryCurrentSessionText':"sessão atual", 181 'loginHistoryCurrentSessionText':"sessão atual",
184 'loginHistoryReloadButtonLabel':"Recarregar histórico de conexão", 182 'loginHistoryReloadButtonLabel':"Recarregar histórico de conexão",
185 'deleteAccountTabLabel':"Apagar sua conta", 183 'deleteAccountTabLabel':"Apagar sua conta",
186 'deleteAccountTabTitle':"Apagar sua conta", 184 'deleteAccountTabTitle':"Apagar sua conta",
187 'deleteAccountFormUsernameLabel':"nome de usuário", 185 'deleteAccountFormUsernameLabel':"nome de usuário",
188 'deleteAccountFormPassphraseLabel':"frase chave", 186 'deleteAccountFormPassphraseLabel':"frase chave",
189 'deleteAccountFormSafetyCheckboxLabel':"Eu compreendo que toda minha informação será apagada e que esta ação é irreversível.", 187 'deleteAccountFormSafetyCheckboxLabel':"Eu compreendo que toda minha informação será apagada e que esta ação é irreversível.",
190 'deleteAccountFormSubmitLabel':"Apagar minha conta", 188 'deleteAccountFormSubmitLabel':"Apagar minha conta",
191 'deleteAccountFormWrongUsernameWarning':"Nome de usuário errado", 189 'deleteAccountFormWrongUsernameWarning':"Nome de usuário errado",
192 'deleteAccountFormWrongPassphraseWarning':"Frase chave errada", 190 'deleteAccountFormWrongPassphraseWarning':"Frase chave errada",
193 'deleteAccountFormSafetyCheckWarning':"Por favor leia e confira os campos abaixo.", 191 'deleteAccountFormSafetyCheckWarning':"Por favor leia e confira os campos abaixo.",
194 'accountPanelDeletingAccountPanelConfirmationTitle':"ATENÇÃO", 192 'accountPanelDeletingAccountPanelConfirmationTitle':"ATENÇÃO",
195 'accountPanelDeleteAccountPanelConfirmationText':"Você tem certeza que quer apagar esta conta?", 193 'accountPanelDeleteAccountPanelConfirmationText':"Você tem certeza que quer apagar esta conta?",
196 'accountPanelDeleteAccountPanelConfirmButtonLabel':"Sim", 194 'accountPanelDeleteAccountPanelConfirmButtonLabel':"Sim",
197 'accountPanelDeleteAccountPanelDenyButtonLabel':"Não", 195 'accountPanelDeleteAccountPanelDenyButtonLabel':"Não",
198 'offlineCopyTabLabel':"Cópia offline", 196 'offlineCopyTabLabel':"Cópia offline",
199 'offlineCopyTabTitle':"Cópia offline", 197 'offlineCopyTabTitle':"Cópia offline",
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> ", 198 '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> ",
201 'offlineCopyDownloadLinkLabel':"Baixar", 199 'offlineCopyDownloadLinkLabel':"Baixar",
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> ", 200 '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> ",
203 'sharingTabLabel':"Compartilhar", 201 'sharingTabLabel':"Compartilhar",
204 'sharingTabTitle':"Compartilhar", 202 'sharingTabTitle':"Compartilhar",
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> ", 203 '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> ",
206 'importTabLabel':"Importar", 204 'importTabLabel':"Importar",
207 'importTabTitle':"Importar", 205 'importTabTitle':"Importar",
208 'importTabDescription':"<p> <b>Em breve ...</b> <p> ", 206 'importTabDescription':"<p> <b>Em breve ...</b> <p> ",
209 'printingTabLabel':"Exportar", 207 'printingTabLabel':"Exportar",
210 'printingTabTitle':"Exportar", 208 'printingTabTitle':"Exportar",
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> ", 209 '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> ",
212 'printingLinkLabel':"Versão para impressão", 210 'printingLinkLabel':"Versão para impressão",
213 'contactsTabLabel':"Contatos", 211 'contactsTabLabel':"Contatos",
214 'contactsTabTitle':"Contatos", 212 'contactsTabTitle':"Contatos",
215 'passwordGeneratorTabLabel':"Gerador de senhas", 213 'passwordGeneratorTabLabel':"Gerador de senhas",
216 'passwordGeneratorTabTitle':"Gerador de senhas", 214 'passwordGeneratorTabTitle':"Gerador de senhas",
217 'passwordGeneratorTabButtonLabel':"Gerar senha", 215 'passwordGeneratorTabButtonLabel':"Gerar senha",
218 'bookmarkletTabLabel':"Bookmarklet", 216 'bookmarkletTabLabel':"Bookmarklet",
219 'bookmarkletTabTitle':"Bookmarklet", 217 'bookmarkletTabTitle':"Bookmarklet",
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> ", 218 '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> ",
221 'bookmarkletTabBookmarkletTitle':"Adicionar ao Clipperz", 219 'bookmarkletTabBookmarkletTitle':"Adicionar ao Clipperz",
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> ", 220 '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> ",
223 'mainPanelDirectLoginBlockLabel':"Logins diretos", 221 'mainPanelDirectLoginBlockLabel':"Logins diretos",
224 'directLinkReferenceShowButtonLabel':"mostrar", 222 'directLinkReferenceShowButtonLabel':"mostrar",
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> ", 223 '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> ",
226 'mainPanelRecordsBlockLabel':"Cartões", 224 'mainPanelRecordsBlockLabel':"Cartões",
227 'mainPanelAddRecordButtonLabel':"Adicionar novo cartão", 225 'mainPanelAddRecordButtonLabel':"Adicionar novo cartão",
228 'mainPanelRemoveRecordButtonLabel':"Apagar cartão", 226 'mainPanelRemoveRecordButtonLabel':"Apagar cartão",
229 'mainPanelRecordFilterBlockAllLabel':"todos", 227 'mainPanelRecordFilterBlockAllLabel':"todos",
230 'mainPanelRecordFilterBlockTagsLabel':"tags", 228 'mainPanelRecordFilterBlockTagsLabel':"tags",
231 'mainPanelRecordFilterBlockSearchLabel':"buscar", 229 'mainPanelRecordFilterBlockSearchLabel':"buscar",
232 'recordDetailNoRecordAtAllTitle':"Bem-vindo ao Clipperz!", 230 'recordDetailNoRecordAtAllTitle':"Bem-vindo ao Clipperz!",
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> ", 231 '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> ",
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> ", 232 '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> ",
235 'newRecordWizardBookmarkletConfigurationTitle':"Login direto", 233 'newRecordWizardBookmarkletConfigurationTitle':"Login direto",
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> ", 234 '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> ",
237 'newRecordWizardCreateButtonLabel':"Criar", 235 'newRecordWizardCreateButtonLabel':"Criar",
238 'newRecordWizardCancelButtonLabel':"Cancelar", 236 'newRecordWizardCancelButtonLabel':"Cancelar",
239 'donateSplashPanelTitle':"Apoie Clipperz, faça uma doação hoje!", 237 'donateSplashPanelTitle':"Apoie Clipperz, faça uma doação hoje!",
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> ", 238 '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> ",
241 'donateCloseButtonLabel':"Não ainda", 239 'donateCloseButtonLabel':"Não ainda",
242 'donateDonateButtonLabel':"Sim", 240 'donateDonateButtonLabel':"Sim",
243 'recordTemplates':{ 241 'recordTemplates':{
244 'WebAccount':{ 242 'WebAccount':{
245 'title':"Senha web", 243 'title':"Senha web",
246 'description':"<p>Um cartão simples para arquivar credenciais de login para seus serviços online.</p> ", 244 'description':"<p>Um cartão simples para arquivar credenciais de login para seus serviços online.</p> ",
247 'fields':{ 245 'fields':{
248 'URL':"Endereço web", 246 'URL':"Endereço web",
249 'TXT':"Nome de usuário ou email", 247 'TXT':"Nome de usuário ou email",
250 'PWD':"Senha" 248 'PWD':"Senha"
251 } 249 }
252 }, 250 },
253 'BankAccount':{ 251 'BankAccount':{
254 'title':"Conta bancária", 252 'title':"Conta bancária",
255 'description':"<p>Arquive com segurança o número de sua conta corrente e suas credenciais de online banking.</p> ", 253 'description':"<p>Arquive com segurança o número de sua conta corrente e suas credenciais de online banking.</p> ",
256 'fields':{ 254 'fields':{
257 'TXT':"Banco", 255 'TXT':"Banco",
258 'TXT':"Número da conta", 256 'TXT':"Número da conta",
259 'URL':"Website do banco", 257 'URL':"Website do banco",
260 'TXT':"ID de online banking", 258 'TXT':"ID de online banking",
261 'PWD':"Senha de online banking" 259 'PWD':"Senha de online banking"
262 } 260 }
263 }, 261 },
264 'CreditCard':{ 262 'CreditCard':{
265 'title':"Cartão de crédito", 263 'title':"Cartão de crédito",
266 'description':"<p>Número do cartão, validade, CVV2 e PIN sempre disponíveis no Clipperz</p> ", 264 'description':"<p>Número do cartão, validade, CVV2 e PIN sempre disponíveis no Clipperz</p> ",
267 'fields':{ 265 'fields':{
268 'TXT':"Tipo (Visa, AmEx, ...)", 266 'TXT':"Tipo (Visa, AmEx, ...)",
269 'TXT':"Número", 267 'TXT':"Número",
270 'TXT':"Nome do proprietário", 268 'TXT':"Nome do proprietário",
271 'TXT':"Prazo de validade", 269 'TXT':"Prazo de validade",
272 'TXT':"CVV2", 270 'TXT':"CVV2",
273 'PWD':"PIN", 271 'PWD':"PIN",
274 'URL':"Website do cartão", 272 'URL':"Website do cartão",
275 'TXT':"Nome do usuário", 273 'TXT':"Nome do usuário",
276 'PWD':"Senha" 274 'PWD':"Senha"
277 } 275 }
278 }, 276 },
279 'AddressBookEntry':{ 277 'AddressBookEntry':{
280 'title':"Agenda de endereços", 278 'title':"Agenda de endereços",
281 'description':"<p>Clipperz pode também funcionar como sua agenda de endereços particular. Use esse template para facilmente adicionar novas entradas.</p> ", 279 'description':"<p>Clipperz pode também funcionar como sua agenda de endereços particular. Use esse template para facilmente adicionar novas entradas.</p> ",
282 'fields':{ 280 'fields':{
283 'TXT':"Nome", 281 'TXT':"Nome",
284 'TXT':"Email", 282 'TXT':"Email",
285 'TXT':"Fone", 283 'TXT':"Fone",
286 'TXT':"Mobile", 284 'TXT':"Mobile",
287 'ADDR':"Endereço" 285 'ADDR':"Endereço"
288 } 286 }
289 }, 287 },
290 'Custom':{ 288 'Custom':{
291 'title':"Cartão customizado", 289 'title':"Cartão customizado",
292 'description':"<p>Não importa o tipo de informação confidencial você precisa proteger, crie um cartão customizado para sua necessidade.</p> ", 290 'description':"<p>Não importa o tipo de informação confidencial você precisa proteger, crie um cartão customizado para sua necessidade.</p> ",
293 'fields':{ 291 'fields':{
294 'TXT':"Label 1", 292 'TXT':"Label 1",
295 'TXT':"Label 2", 293 'TXT':"Label 2",
296 'TXT':"Label 3" 294 'TXT':"Label 3"
297 } 295 }
298 } 296 }
299}, 297},
300 'recordFieldTypologies':{ 298 'recordFieldTypologies':{
301 'TXT':{ 299 'TXT':{
302 'description':"simple text field", 300 'description':"simple text field",
303 'shortDescription':"texto" 301 'shortDescription':"texto"
304 }, 302 },
305 'PWD':{ 303 'PWD':{
306 'description':"simple text field, with default status set to hidden", 304 'description':"simple text field, with default status set to hidden",
307 'shortDescription':"senha" 305 'shortDescription':"senha"
308 }, 306 },
309 'URL':{ 307 'URL':{
310 '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",
311 'shortDescription':"endereço web" 309 'shortDescription':"endereço web"
312 }, 310 },
313 'DATE':{ 311 'DATE':{
314 'description':"a value set with a calendar helper", 312 'description':"a value set with a calendar helper",
315 'shortDescription':"data" 313 'shortDescription':"data"
316 }, 314 },
317 'ADDR':{ 315 'ADDR':{
318 '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",
319 'shortDescription':"endereço" 317 'shortDescription':"endereço"
320 }, 318 },
321 'CHECK':{ 319 'CHECK':{
322 'description':"check description", 320 'description':"check description",
323 'shortDescription':"check" 321 'shortDescription':"check"
324 }, 322 },
325 'RADIO':{ 323 'RADIO':{
326 'description':"radio description", 324 'description':"radio description",
327 'shortDescription':"radio" 325 'shortDescription':"radio"
328 }, 326 },
329 'SELECT':{ 327 'SELECT':{
330 'description':"select description", 328 'description':"select description",
331 'shortDescription':"select" 329 'shortDescription':"select"
332 } 330 }
333}, 331},
334 'newRecordPanelGeneralExceptionTitle':"Erro", 332 'newRecordPanelGeneralExceptionTitle':"Erro",
335 'newRecordPanelGeneralExceptionMessage':"O texto de configuração não é válido. Certifique-se do texto no pop-up de bookmarklet e tente novamente.", 333 'newRecordPanelGeneralExceptionMessage':"O texto de configuração não é válido. Certifique-se do texto no pop-up de bookmarklet e tente novamente.",
336 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"Erro", 334 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"Erro",
337 'newRecordPanelWrongBookmarkletVersionExceptionMessage':"O texto de configuração foi gerado por uma velha versão de bookmarklet. Por favor, atualize seus preferidos e tente novamente.", 335 'newRecordPanelWrongBookmarkletVersionExceptionMessage':"O texto de configuração foi gerado por uma velha versão de bookmarklet. Por favor, atualize seus preferidos e tente novamente.",
338 'newRecordPanelExceptionPanelCloseButtonLabel':"Cancelar", 336 'newRecordPanelExceptionPanelCloseButtonLabel':"Cancelar",
339 'mainPanelDeletingRecordPanelConfirmationTitle':"Apagando o cartão selecionado", 337 'mainPanelDeletingRecordPanelConfirmationTitle':"Apagando o cartão selecionado",
340 'mainPanelDeleteRecordPanelConfirmationText':"Você quer mesmo apagar o cartão selecionado?", 338 'mainPanelDeleteRecordPanelConfirmationText':"Você quer mesmo apagar o cartão selecionado?",
341 'mainPanelDeleteRecordPanelConfirmButtonLabel':"Sim", 339 'mainPanelDeleteRecordPanelConfirmButtonLabel':"Sim",
342 'mainPanelDeleteRecordPanelDenyButtonLabel':"Não", 340 'mainPanelDeleteRecordPanelDenyButtonLabel':"Não",
343 'mainPanelDeletingRecordPanelInitialTitle':"Apagando o cartão selecionado", 341 'mainPanelDeletingRecordPanelInitialTitle':"Apagando o cartão selecionado",
344 'mainPanelDeletingRecordPanelCompletedText':"Concluído", 342 'mainPanelDeletingRecordPanelCompletedText':"Concluído",
345 'deleteRecordPanelCollectRecordDataMessageTitle':"Apagar cartão", 343 'deleteRecordPanelCollectRecordDataMessageTitle':"Apagar cartão",
346 'deleteRecordPanelCollectRecordDataMessageText':"Atualizando lista de cartões", 344 'deleteRecordPanelCollectRecordDataMessageText':"Atualizando lista de cartões",
347 'deleteRecordPanelEncryptUserDataMessageTitle':"Apagar cartão", 345 'deleteRecordPanelEncryptUserDataMessageTitle':"Apagar cartão",
348 'deleteRecordPanelEncryptUserDataMessageText':"Codificação local de cabeçalhos de cartão", 346 'deleteRecordPanelEncryptUserDataMessageText':"Codificação local de cabeçalhos de cartão",
349 'deleteRecordPanelSendingDataToTheServerMessageTitle':"Apagar cartão", 347 'deleteRecordPanelSendingDataToTheServerMessageTitle':"Apagar cartão",
350 'deleteRecordPanelSendingDataToTheServerMessageText':"Enviando os cabeçalhos de cartão codificados para Clipperz", 348 'deleteRecordPanelSendingDataToTheServerMessageText':"Enviando os cabeçalhos de cartão codificados para Clipperz",
351 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"Apagar cartão", 349 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"Apagar cartão",
352 'deleteRecordPanelUpdatingTheInterfaceMessageText':"Atualizando a interface", 350 'deleteRecordPanelUpdatingTheInterfaceMessageText':"Atualizando a interface",
353 'recordDetailNoRecordSelectedTitle':"Nenhum cartão selecionado", 351 'recordDetailNoRecordSelectedTitle':"Nenhum cartão selecionado",
354 'recordDetailNoRecordSelectedDescription':"<p>Por favor selecione um cartão da lista na esquerda.</p> ", 352 'recordDetailNoRecordSelectedDescription':"<p>Por favor selecione um cartão da lista na esquerda.</p> ",
355 'recordDetailLoadingRecordMessage':"Baixando cartão codificados do Clipperz", 353 'recordDetailLoadingRecordMessage':"Baixando cartão codificados do Clipperz",
356 'recordDetailDecryptingRecordMessage':"Descrição local dos dados do cartão", 354 'recordDetailDecryptingRecordMessage':"Descrição local dos dados do cartão",
357 'recordDetailLoadingRecordVersionMessage':"Baixando a versão mais recente do cartão", 355 'recordDetailLoadingRecordVersionMessage':"Baixando a versão mais recente do cartão",
358 'recordDetailDecryptingRecordVersionMessage':"Descrição local da versão mais recente", 356 'recordDetailDecryptingRecordVersionMessage':"Descrição local da versão mais recente",
359 'recordDetailLoadingErrorMessageTitle':"Erro enquanto baixando o cartão", 357 'recordDetailLoadingErrorMessageTitle':"Erro enquanto baixando o cartão",
360 'recordDetailNotesLabel':"Notas", 358 'recordDetailNotesLabel':"Notas",
361 'recordDetailLabelFieldColumnLabel':"Legenda do campo", 359 'recordDetailLabelFieldColumnLabel':"Legenda do campo",
362 'recordDetailDataFieldColumnLabel':"Dados do campo", 360 'recordDetailDataFieldColumnLabel':"Dados do campo",
363 'recordDetailTypeFieldColumnLabel':"Tipo", 361 'recordDetailTypeFieldColumnLabel':"Tipo",
364 'recordDetailSavingChangesMessagePanelInitialTitle':"Salvando cartão", 362 'recordDetailSavingChangesMessagePanelInitialTitle':"Salvando cartão",
365 'recordDetailAddFieldButtonLabel':"Adicionar novo campo", 363 'recordDetailAddFieldButtonLabel':"Adicionar novo campo",
366 'recordDetailPasswordFieldHelpLabel':"para copiar a senha para o clipboard clique nas estrelas e em seguida Ctrl-C", 364 'recordDetailPasswordFieldHelpLabel':"para copiar a senha para o clipboard clique nas estrelas e em seguida Ctrl-C",
367 'recordDetailPasswordFieldScrambleLabel':"misturar", 365 'recordDetailPasswordFieldScrambleLabel':"misturar",
368 'recordDetailPasswordFieldUnscrambleLabel':"mostrar", 366 'recordDetailPasswordFieldUnscrambleLabel':"mostrar",
369 'recordDetailDirectLoginBlockTitle':"Logins diretos", 367 'recordDetailDirectLoginBlockTitle':"Logins diretos",
370 'recordDetailNewDirectLoginDescription':"<p>Configuração de login direto</p> ", 368 'recordDetailNewDirectLoginDescription':"<p>Configuração de login direto</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> ", 369 '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> ",
372 'recordDetailAddNewDirectLoginButtonLabel':"Adicionar novo login direto", 370 'recordDetailAddNewDirectLoginButtonLabel':"Adicionar novo login direto",
373 'recordDetailEditButtonLabel':"Editar", 371 'recordDetailEditButtonLabel':"Editar",
374 'recordDetailSaveButtonLabel':"Salvar", 372 'recordDetailSaveButtonLabel':"Salvar",
375 'recordDetailCancelButtonLabel':"Cancelar", 373 'recordDetailCancelButtonLabel':"Cancelar",
376 'newRecordTitleLabel':"_novo cartão_", 374 'newRecordTitleLabel':"_novo cartão_",
377 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"Salvar cartão", 375 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"Salvar cartão",
378 'recordSaveChangesPanelCollectRecordInfoMessageText':"Subindo cabeçalhos de cartão", 376 'recordSaveChangesPanelCollectRecordInfoMessageText':"Subindo cabeçalhos de cartão",
379 'recordSaveChangesPanelEncryptUserDataMessageTitle':"Salvar cartão", 377 'recordSaveChangesPanelEncryptUserDataMessageTitle':"Salvar cartão",
380 'recordSaveChangesPanelEncryptUserDataMessageText':"Codificação local do cabeçalho do cartão", 378 'recordSaveChangesPanelEncryptUserDataMessageText':"Codificação local do cabeçalho do cartão",
381 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"Salvar cartão", 379 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"Salvar cartão",
382 'recordSaveChangesPanelEncryptRecordDataMessageText':"Codificação local da informação do cartão", 380 'recordSaveChangesPanelEncryptRecordDataMessageText':"Codificação local da informação do cartão",
383 'recordSaveChangesPanelEncryptRecordVersionDataMessageTitle':"Salvar cartão", 381 'recordSaveChangesPanelEncryptRecordVersionDataMessageTitle':"Salvar cartão",
384 'recordSaveChangesPanelEncryptRecordVersionDataMessageText':"Codificação local da informação de versão do cartão", 382 'recordSaveChangesPanelEncryptRecordVersionDataMessageText':"Codificação local da informação de versão do cartão",
385 'recordSaveChangesPanelSendingDataToTheServerMessageTitle':"Salvar cartão", 383 'recordSaveChangesPanelSendingDataToTheServerMessageTitle':"Salvar cartão",
386 'recordSaveChangesPanelSendingDataToTheServerMessageText':"Subindo o cabeçalho do cartão codificado para Clipperz", 384 'recordSaveChangesPanelSendingDataToTheServerMessageText':"Subindo o cabeçalho do cartão codificado para Clipperz",
387 'recordSaveChangesPanelUpdatingTheInterfaceMessageTitle':"Salvar cartão", 385 'recordSaveChangesPanelUpdatingTheInterfaceMessageTitle':"Salvar cartão",
388 'recordSaveChangesPanelUpdatingTheInterfaceMessageText':"Atualizando a interface", 386 'recordSaveChangesPanelUpdatingTheInterfaceMessageText':"Atualizando a interface",
389 'passwordGeneratorPanelTitle':"Gerador de senhas", 387 'passwordGeneratorPanelTitle':"Gerador de senhas",
390 'passwordGeneratorPanelOkLabel':"Ok", 388 'passwordGeneratorPanelOkLabel':"Ok",
391 'passwordGeneratorPanelCancelLabel':"Cancelar", 389 'passwordGeneratorPanelCancelLabel':"Cancelar",
392 'passwordGeneratorLengthLabel':"compr.:", 390 'passwordGeneratorLengthLabel':"compr.:",
393 //'DWRUtilLoadingMessage':"Carregando ...", 391 //'DWRUtilLoadingMessage':"Carregando ...",
394 'comingSoon':"em breve ...", 392 'comingSoon':"em breve ...",
395 'panelCollectingEntryopyMessageText':"Coletando entropia", 393 'panelCollectingEntryopyMessageText':"Coletando entropia",
396 'directLoginConfigurationCheckBoxFieldSelectedValue':"Sim", 394 'directLoginConfigurationCheckBoxFieldSelectedValue':"Sim",
397 'directLoginConfigurationCheckBoxFieldNotSelectedValue':"Não", 395 'directLoginConfigurationCheckBoxFieldNotSelectedValue':"Não",
398 'WELCOME_BACK':"Welcome back!", 396 'WELCOME_BACK':"Welcome back!",
399 'currentConnectionText':"Você está conectado do ip&nbsp;__ip__, aparentemente desde __country__, usando __browser__ num __operatingSystem__.", 397 'currentConnectionText':"Você está conectado 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__.", 398 'latestConnectionText':"Sua úlitima conexão foi __elapsedTimeDescription__ (__time__) do ip&nbsp;__ip__, aparentemente desde __country__, usando __browser__ num __operatingSystem__.",
401 'fullLoginHistoryLinkLabel':"mostrar o histórico de logins completos", 399 'fullLoginHistoryLinkLabel':"mostrar o histórico de logins completos",
402 'elapsedTimeDescriptions':{ 400 'elapsedTimeDescriptions':{
403 'MORE_THAN_A_MONTH_AGO':"mais de um mês atrás", 401 'MORE_THAN_A_MONTH_AGO':"mais de um mês atrás",
404 'MORE_THAN_A_WEEK_AGO':"mais de uma semana atrás", 402 'MORE_THAN_A_WEEK_AGO':"mais de uma semana atrás",
405 'MORE_THAN_*_WEEKS_AGO':"mais de __elapsed__ semanas atrás", 403 'MORE_THAN_*_WEEKS_AGO':"mais de __elapsed__ semanas atrás",
406 'YESTERDAY':"ontem", 404 'YESTERDAY':"ontem",
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 7930852..d27829d 100644
--- a/frontend/beta/js/Clipperz/PM/Strings/Strings_pt-PT.js
+++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_pt-PT.js
@@ -1,39 +1,37 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26//============================================================================= 24//=============================================================================
27// 25//
28 // P O R T U G U Ê S ( pt_PT ) 26 // P O R T U G U Ê S ( pt_PT )
29// 27//
30//============================================================================= 28//=============================================================================
31 29
32Clipperz.PM.Strings.Languages['pt-pt'] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['pt-br'], { 30Clipperz.PM.Strings.Languages['pt-pt'] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['pt-br'], {
33 31
34 32
35 33
36 //------------------------------------------------------------------------- 34 //-------------------------------------------------------------------------
37 __syntaxFix__: "syntax fix" 35 __syntaxFix__: "syntax fix"
38}); 36});
39 37
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 547dcc8..612e745 100644
--- a/frontend/beta/js/Clipperz/PM/Strings/Strings_ru-RU.js
+++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_ru-RU.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26Clipperz.PM.Strings.Languages['ru-RU'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 24Clipperz.PM.Strings.Languages['ru-RU'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], {
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>\ 25 'clipperzServiceDescription':"<h2>Держи всегда при себе!</h2> <ul> <li> <h3>Clipperz - это:</h3> <ul> <li> <p>безопасный и простой менеджер паролей</p> </li> <li> <p>эффективное решение для единой регистрации</p> </li> <li> <p>цифровое хранилище ваших конфиденциальных данных</p> </li> </ul> </li> <li>\
28 <h3>C помощью Clipperz вы можете:</h3> <ul>\ 26 <h3>C помощью Clipperz вы можете:</h3> <ul>\
29 <li> <p>хранить и управлять вашими паролями</p> </li> <li> <p>входить в любые веб-сервисы без ввода логина и пароля</p> </li> <li> <p>защитить все важные данные: коды охранной сигнализации, PINы, номера кредитных карт, и пр.</p> </li> <li> <p>открыть доступ к паролям вашим членам семьи, друзьям, коллегам</p> </li> </ul> </li> <li>\ 27 <li> <p>хранить и управлять вашими паролями</p> </li> <li> <p>входить в любые веб-сервисы без ввода логина и пароля</p> </li> <li> <p>защитить все важные данные: коды охранной сигнализации, PINы, номера кредитных карт, и пр.</p> </li> <li> <p>открыть доступ к паролям вашим членам семьи, друзьям, коллегам</p> </li> </ul> </li> <li>\
30 <h3>Преимущества Clipperz:</h3> <ul>\ 28 <h3>Преимущества Clipperz:</h3> <ul>\
31 <li> <p>бесплатный и абсолютно анонимный</p> </li> <li> <p>доступен в любое время и с любого компьютера</p> </li> <li> <p>не нужно ничего устанавливать</p> </li> <li> <p>не надо хранить секреты на компьютере или бумаге</p> </li> </ul> </li> <li>\ 29 <li> <p>бесплатный и абсолютно анонимный</p> </li> <li> <p>доступен в любое время и с любого компьютера</p> </li> <li> <p>не нужно ничего устанавливать</p> </li> <li> <p>не надо хранить секреты на компьютере или бумаге</p> </li> </ul> </li> <li>\
32 <h3>Безопасность Clipperz:</h3> <ul>\ 30 <h3>Безопасность Clipperz:</h3> <ul>\
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>\ 31 <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>\
34 <a href=\"http://www.clipperz.com\" target=\"_blank\">Подробнее</a> </li> </ul> ", 32 <a href=\"http://www.clipperz.com\" target=\"_blank\">Подробнее</a> </li> </ul> ",
35 'loginFormTitle':"войти в аккаунт Clipperz", 33 'loginFormTitle':"войти в аккаунт Clipperz",
36 'loginFormUsernameLabel':"логин", 34 'loginFormUsernameLabel':"логин",
37 'loginFormPassphraseLabel':"пароль", 35 'loginFormPassphraseLabel':"пароль",
38 'loginFormDontHaveAnAccountLabel':"у вас еще нет аккаунта?", 36 'loginFormDontHaveAnAccountLabel':"у вас еще нет аккаунта?",
39 'loginFormCreateOneLabel':"создать сейчас", 37 'loginFormCreateOneLabel':"создать сейчас",
40 'loginFormForgotYourCredentialsLabel':"забыли пароль?", 38 'loginFormForgotYourCredentialsLabel':"забыли пароль?",
41 'loginFormAarghThatsBadLabel':"это плохо!", 39 'loginFormAarghThatsBadLabel':"это плохо!",
42 'loginFormAfraidOfMaliciousScriptsLabel':"опасаетесь вредоносных скриптов?", 40 'loginFormAfraidOfMaliciousScriptsLabel':"опасаетесь вредоносных скриптов?",
43 'loginFormVerifyTheCodeLabel':"проверить", 41 'loginFormVerifyTheCodeLabel':"проверить",
44 'loginFormButtonLabel':"Войти", 42 'loginFormButtonLabel':"Войти",
45 'loginFormOneTimePasswordCheckboxLabel':"использовать одноразовый пароль", 43 'loginFormOneTimePasswordCheckboxLabel':"использовать одноразовый пароль",
46 'loginPanelSwithLanguageDescription':"<h5>Переключить язык</h5> ", 44 'loginPanelSwithLanguageDescription':"<h5>Переключить язык</h5> ",
47 'browserCompatibilityDescription':"<p>Clipperz адаптирован для Firefox. Но также совместим с Opera и MS Internet Explorer!</p> ", 45 'browserCompatibilityDescription':"<p>Clipperz адаптирован для Firefox. Но также совместим с Opera и MS Internet Explorer!</p> ",
48 'OTPloginMessagePanelInitialTitle':"Вход", 46 'OTPloginMessagePanelInitialTitle':"Вход",
49 'OTPloginMessagePanelInitialText':"Передача данных учетной записи ...", 47 'OTPloginMessagePanelInitialText':"Передача данных учетной записи ...",
50 'OTPloginMessagePanelLoadingTitle':"Вход", 48 'OTPloginMessagePanelLoadingTitle':"Вход",
51 'OTPloginMessagePanelLoadingText':"Запрос аутентификационных данных с сервера ...", 49 'OTPloginMessagePanelLoadingText':"Запрос аутентификационных данных с сервера ...",
52 'OTPloginMessagePanelProcessingTitle':"Вход", 50 'OTPloginMessagePanelProcessingTitle':"Вход",
53 'OTPloginMessagePanelProcessingText':"Расшифровка аутентификационных данных", 51 'OTPloginMessagePanelProcessingText':"Расшифровка аутентификационных данных",
54 'loginMessagePanelInitialTitle':"Вход ...", 52 'loginMessagePanelInitialTitle':"Вход ...",
55 'loginMessagePanelInitialButtonLabel':"Отмена", 53 'loginMessagePanelInitialButtonLabel':"Отмена",
56 'loginMessagePanelConnectedTitle':"Соединен", 54 'loginMessagePanelConnectedTitle':"Соединен",
57 'loginMessagePanelConnectedText':"Выполнен", 55 'loginMessagePanelConnectedText':"Выполнен",
58 'loginMessagePanelFailureTitle':"Ошибка", 56 'loginMessagePanelFailureTitle':"Ошибка",
59 'loginMessagePanelFailureText':"Ошибка при попытке входа", 57 'loginMessagePanelFailureText':"Ошибка при попытке входа",
60 'loginMessagePanelFailureButtonLabel':"Закрыть", 58 'loginMessagePanelFailureButtonLabel':"Закрыть",
61 'connectionLoginSendingCredentialsMessageTitle':"Проверка учетной записи", 59 'connectionLoginSendingCredentialsMessageTitle':"Проверка учетной записи",
62 'connectionLoginSendingCredentialsMessageText':"Передача данных ...", 60 'connectionLoginSendingCredentialsMessageText':"Передача данных ...",
63 'connectionLoginCredentialsVerificationMessageTitle':"Проверка учетной записи", 61 'connectionLoginCredentialsVerificationMessageTitle':"Проверка учетной записи",
64 'connectionLoginCredentialsVerificationMessageText':"Выполняем SRP-аутентификацию ...", 62 'connectionLoginCredentialsVerificationMessageText':"Выполняем SRP-аутентификацию ...",
65 'connectionLoginDoneMessageTitle':"Проверка учетной записи", 63 'connectionLoginDoneMessageTitle':"Проверка учетной записи",
66 'connectionLoginDoneMessageText':"Соединено", 64 'connectionLoginDoneMessageText':"Соединено",
67 'userLoginPanelUpgradingUserCredentialsMessageTitle':"Проверка учетной записи", 65 'userLoginPanelUpgradingUserCredentialsMessageTitle':"Проверка учетной записи",
68 'userLoginPanelUpgradingUserCredentialsMessageText':"Обновляем полномочия к новой схеме аутентификации", 66 'userLoginPanelUpgradingUserCredentialsMessageText':"Обновляем полномочия к новой схеме аутентификации",
69 'userLoginPanelConnectedMessageTitle':"Пользователь аутентифицирован", 67 'userLoginPanelConnectedMessageTitle':"Пользователь аутентифицирован",
70 'userLoginPanelConnectedMessageText':"Успешный вход", 68 'userLoginPanelConnectedMessageText':"Успешный вход",
71 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"Проверка учетной записи", 69 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"Проверка учетной записи",
72 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"Пробуем войти по старой схеме", 70 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"Пробуем войти по старой схеме",
73 'userLoginPanelLoadingUserDataMessageTitle':"Пользователь аутентифицирован", 71 'userLoginPanelLoadingUserDataMessageTitle':"Пользователь аутентифицирован",
74 'userLoginPanelLoadingUserDataMessageText':"Загрузка зашифрованных заголовков карточек", 72 'userLoginPanelLoadingUserDataMessageText':"Загрузка зашифрованных заголовков карточек",
75 'userLoginPanelDecryptingUserDataMessageTitle':"Пользователь аутентифицирован", 73 'userLoginPanelDecryptingUserDataMessageTitle':"Пользователь аутентифицирован",
76 'userLoginPanelDecryptingUserDataMessageText':"Расшифровка заголовков карточек", 74 'userLoginPanelDecryptingUserDataMessageText':"Расшифровка заголовков карточек",
77 'userLoginPanelDecryptingUserStatisticsMessageTitle':"Пользователь аутентифицирован", 75 'userLoginPanelDecryptingUserStatisticsMessageTitle':"Пользователь аутентифицирован",
78 'userLoginPanelDecryptingUserStatisticsMessageText':"Расшифровка статистики", 76 'userLoginPanelDecryptingUserStatisticsMessageText':"Расшифровка статистики",
79 'splashAlertTitle':"Добро пожаловать в Clipperz!", 77 'splashAlertTitle':"Добро пожаловать в Clipperz!",
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> ", 78 '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> ",
81 'splashAlertCloseButtonLabel':"OK", 79 'splashAlertCloseButtonLabel':"OK",
82 'registrationFormTitle':"создать аккаунт", 80 'registrationFormTitle':"создать аккаунт",
83 'registrationFormUsernameLabel':"имя пользователя", 81 'registrationFormUsernameLabel':"имя пользователя",
84 'registrationFormPassphraseLabel':"пароль", 82 'registrationFormPassphraseLabel':"пароль",
85 'registrationFormRetypePassphraseLabel':"повторите пароль", 83 'registrationFormRetypePassphraseLabel':"повторите пароль",
86 'registrationFormSafetyCheckLabel':"Я понимаю, что Clipperz не сможет восстановить забытый пароль", 84 'registrationFormSafetyCheckLabel':"Я понимаю, что Clipperz не сможет восстановить забытый пароль",
87 'registrationFormTermsOfServiceCheckLabel':"Я прочитал и согласен с <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Условиями предоставления услуг</a>.", 85 'registrationFormTermsOfServiceCheckLabel':"Я прочитал и согласен с <a href='http://www.clipperz.com/terms_of_service' target='_blank'>Условиями предоставления услуг</a>.",
88 'registrationFormDoYouAlreadyHaveAnAccountLabel':"у вас уже есть аккаунт?", 86 'registrationFormDoYouAlreadyHaveAnAccountLabel':"у вас уже есть аккаунт?",
89 'registrationFormSimplyLoginLabel':"просто авторизируйтесь", 87 'registrationFormSimplyLoginLabel':"просто авторизируйтесь",
90 'registrationFormButtonLabel':"Зарегистрировать", 88 'registrationFormButtonLabel':"Зарегистрировать",
91 'registrationFormWarningMessageNotMatchingPassphrases':"Пароли не совпадают, пожайлуста, повторите ввод", 89 'registrationFormWarningMessageNotMatchingPassphrases':"Пароли не совпадают, пожайлуста, повторите ввод",
92 'registrationFormWarningMessageSafetyCheckNotSelected':"Прочитайте и проверьте все поля ниже", 90 'registrationFormWarningMessageSafetyCheckNotSelected':"Прочитайте и проверьте все поля ниже",
93 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"Вы должны принять Условия предоставления услуг", 91 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"Вы должны принять Условия предоставления услуг",
94 'registrationMessagePanelInitialTitle':"Создание аккаунта", 92 'registrationMessagePanelInitialTitle':"Создание аккаунта",
95 'registrationMessagePanelInitialButtonLabel':"Отмена", 93 'registrationMessagePanelInitialButtonLabel':"Отмена",
96 'registrationMessagePanelRegistrationDoneTitle':"Регистрация", 94 'registrationMessagePanelRegistrationDoneTitle':"Регистрация",
97 'registrationMessagePanelRegistrationDoneText':"Выполнено", 95 'registrationMessagePanelRegistrationDoneText':"Выполнено",
98 'registrationMessagePanelFailureTitle':"Ошибка регистрации", 96 'registrationMessagePanelFailureTitle':"Ошибка регистрации",
99 'registrationMessagePanelFailureButtonLabel':"Закрыть", 97 'registrationMessagePanelFailureButtonLabel':"Закрыть",
100 'connectionRegistrationSendingRequestMessageText':"Проверка учетной записи", 98 'connectionRegistrationSendingRequestMessageText':"Проверка учетной записи",
101 'connectionRegistrationSendingCredentialsMessageText':"Передача данных", 99 'connectionRegistrationSendingCredentialsMessageText':"Передача данных",
102 'registrationSplashPanelTitle':"Совет", 100 'registrationSplashPanelTitle':"Совет",
103 'registrationSplashPanelDescription':"<p>Это ваши данные учетной записи, позаботесь об их безопасности. Clipperz никогда больше не покажет ваш логин и пароль!</p> ", 101 'registrationSplashPanelDescription':"<p>Это ваши данные учетной записи, позаботесь об их безопасности. Clipperz никогда больше не покажет ваш логин и пароль!</p> ",
104 'registrationSplashPanelUsernameLabel':"имя пользователя", 102 'registrationSplashPanelUsernameLabel':"имя пользователя",
105 'registrationSplashPanelPassphraseLabel':"пароль", 103 'registrationSplashPanelPassphraseLabel':"пароль",
106 'registrationSplashPanelShowPassphraseButtonLabel':"показать пароль", 104 'registrationSplashPanelShowPassphraseButtonLabel':"показать пароль",
107 'donateHeaderLinkLabel':"помочь проекту", 105 'donateHeaderLinkLabel':"помочь проекту",
108 'creditsHeaderLinkLabel':"авторы", 106 'creditsHeaderLinkLabel':"авторы",
109 'feedbackHeaderLinkLabel':"обратная связь", 107 'feedbackHeaderLinkLabel':"обратная связь",
110 'helpHeaderLinkLabel':"помощь", 108 'helpHeaderLinkLabel':"помощь",
111 'forumHeaderLinkLabel':"форум", 109 'forumHeaderLinkLabel':"форум",
112 'recordMenuLabel':"карточки", 110 'recordMenuLabel':"карточки",
113 'accountMenuLabel':"аккаунт", 111 'accountMenuLabel':"аккаунт",
114 'dataMenuLabel':"данные", 112 'dataMenuLabel':"данные",
115 'contactsMenuLabel':"контакты", 113 'contactsMenuLabel':"контакты",
116 'toolsMenuLabel':"инструменты", 114 'toolsMenuLabel':"инструменты",
117 'logoutMenuLabel':"выход", 115 'logoutMenuLabel':"выход",
118 'lockMenuLabel':"заблокировать", 116 'lockMenuLabel':"заблокировать",
119 'lockTitle':"Аккаунт заблокирован", 117 'lockTitle':"Аккаунт заблокирован",
120 'lockDescription':"<p>Введите пароль для разблокировки</p> ", 118 'lockDescription':"<p>Введите пароль для разблокировки</p> ",
121 'unlockButtonLabel':"разблокировать", 119 'unlockButtonLabel':"разблокировать",
122 'changePasswordTabLabel':"Изменить пароль", 120 'changePasswordTabLabel':"Изменить пароль",
123 'changePasswordTabTitle':"Изменить пароль", 121 'changePasswordTabTitle':"Изменить пароль",
124 'changePasswordFormUsernameLabel':"логин", 122 'changePasswordFormUsernameLabel':"логин",
125 'changePasswordFormOldPassphraseLabel':"старый пароль", 123 'changePasswordFormOldPassphraseLabel':"старый пароль",
126 'changePasswordFormNewPassphraseLabel':"новый пароль", 124 'changePasswordFormNewPassphraseLabel':"новый пароль",
127 'changePasswordFormRetypePassphraseLabel':"повторите пароль", 125 'changePasswordFormRetypePassphraseLabel':"повторите пароль",
128 'changePasswordFormSafetyCheckboxLabel':"Я понимаю, что Clipperz не сможет восстановить забытый пароль.", 126 'changePasswordFormSafetyCheckboxLabel':"Я понимаю, что Clipperz не сможет восстановить забытый пароль.",
129 'changePasswordFormSubmitLabel':"Изменить", 127 'changePasswordFormSubmitLabel':"Изменить",
130 'changePasswordFormWrongUsernameWarning':"Неправильный логин", 128 'changePasswordFormWrongUsernameWarning':"Неправильный логин",
131 'changePasswordFormWrongPassphraseWarning':"Неверный пароль", 129 'changePasswordFormWrongPassphraseWarning':"Неверный пароль",
132 'changePasswordFormWrongRetypePassphraseWarning':"Пароли не совпадают, пожайлуста, повторите ввод.", 130 'changePasswordFormWrongRetypePassphraseWarning':"Пароли не совпадают, пожайлуста, повторите ввод.",
133 'changePasswordFormSafetyCheckWarning':"Прочитайте и проверьте все поля ниже.", 131 'changePasswordFormSafetyCheckWarning':"Прочитайте и проверьте все поля ниже.",
134 'changePasswordFormProgressDialogTitle':"Изменение учетной записи", 132 'changePasswordFormProgressDialogTitle':"Изменение учетной записи",
135 'changePasswordFormProgressDialogConnectedMessageTitle':"Соединено", 133 'changePasswordFormProgressDialogConnectedMessageTitle':"Соединено",
136 'changePasswordFormProgressDialogConnectedMessageText':"Выполнено", 134 'changePasswordFormProgressDialogConnectedMessageText':"Выполнено",
137 'changePasswordFormProgressDialogErrorMessageTitle':"Ошибка", 135 'changePasswordFormProgressDialogErrorMessageTitle':"Ошибка",
138 'changePasswordFormProgressDialogErrorMessageText':"Ошибка изменения учетной записи!", 136 'changePasswordFormProgressDialogErrorMessageText':"Ошибка изменения учетной записи!",
139 'changeCredentialsPanelEncryptingDataMessageTitle':"Изменение пароля", 137 'changeCredentialsPanelEncryptingDataMessageTitle':"Изменение пароля",
140 'changeCredentialsPanelEncryptingDataMessageText':"Шифрование заголовков карточек", 138 'changeCredentialsPanelEncryptingDataMessageText':"Шифрование заголовков карточек",
141 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"Изменение пароля", 139 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"Изменение пароля",
142 'changeCredentialsPanelCreatingNewCredentialsMessageText':"Обновление учетной записи", 140 'changeCredentialsPanelCreatingNewCredentialsMessageText':"Обновление учетной записи",
143 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Изменение пароля", 141 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"Изменение пароля",
144 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Загрузка данных учетной записи в Clipperz", 142 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"Загрузка данных учетной записи в Clipperz",
145 'changeCredentialsPanelDoneMessageTitle':"Изменение пароля", 143 'changeCredentialsPanelDoneMessageTitle':"Изменение пароля",
146 'changeCredentialsPanelDoneMessageText':"Выполнено", 144 'changeCredentialsPanelDoneMessageText':"Выполнено",
147 'manageOTPTabLabel':"Управление одноразовыми паролями", 145 'manageOTPTabLabel':"Управление одноразовыми паролями",
148 'manageOTPTabTitle':"Управление одноразовыми паролями", 146 'manageOTPTabTitle':"Управление одноразовыми паролями",
149 'manageOTPTabDescription':"<p>Одноразовый пароль работает так же, как ваш обычный пароль, но может быть использован только один раз.</p> <p>Если один и тот же пароль будет использоваться снова, он будет отклонен при попытке войти.</p> <p>Сразу после входа одноразовый пароль будет удален, чтобы предотвратить любую несанкционированную попытку доступа.</p> <p>Одноразовые пароли - удачный выбор для тех, кто обеспокоен кейлоггерами или spyware, которые могут украсть пароль.</p> <p> <b>Строго рекомендуется использовать одноразовые пароли для доступа к Clipperz с чужих компьютеров, интернет-кафе и компьютеров общего пользования.</b> </p> ", 147 'manageOTPTabDescription':"<p>Одноразовый пароль работает так же, как ваш обычный пароль, но может быть использован только один раз.</p> <p>Если один и тот же пароль будет использоваться снова, он будет отклонен при попытке войти.</p> <p>Сразу после входа одноразовый пароль будет удален, чтобы предотвратить любую несанкционированную попытку доступа.</p> <p>Одноразовые пароли - удачный выбор для тех, кто обеспокоен кейлоггерами или spyware, которые могут украсть пароль.</p> <p> <b>Строго рекомендуется использовать одноразовые пароли для доступа к Clipperz с чужих компьютеров, интернет-кафе и компьютеров общего пользования.</b> </p> ",
150 'oneTimePasswordReadOnlyMessage':"<h6>Извините!</h6> <p>Вы не можете управлять одноразовыми паролями в автономной версии Clipperz.</p> ", 148 'oneTimePasswordReadOnlyMessage':"<h6>Извините!</h6> <p>Вы не можете управлять одноразовыми паролями в автономной версии Clipperz.</p> ",
151 'oneTimePasswordLoadingMessage':"<h6>Загрузка данных</h6> <p>Подождите, пожайлуста ...</p> ", 149 'oneTimePasswordLoadingMessage':"<h6>Загрузка данных</h6> <p>Подождите, пожайлуста ...</p> ",
152 'oneTimePasswordNoPasswordAvailable':"<h6>Нет доступных одноразовых паролей.</h6> <p>Нажмите кнопку “Создать”, чтобы создать одноразовый пароль.</p> ", 150 'oneTimePasswordNoPasswordAvailable':"<h6>Нет доступных одноразовых паролей.</h6> <p>Нажмите кнопку “Создать”, чтобы создать одноразовый пароль.</p> ",
153 'createNewOTPButtonLabel':"создать", 151 'createNewOTPButtonLabel':"создать",
154 'deleteOTPButtonLabel':"удалить", 152 'deleteOTPButtonLabel':"удалить",
155 'printOTPButtonLabel':"печать", 153 'printOTPButtonLabel':"печать",
156 'disabledOneTimePassword_warning':"запрещено", 154 'disabledOneTimePassword_warning':"запрещено",
157 'oneTimePasswordSelectionLink_selectLabel':"Выбрать:", 155 'oneTimePasswordSelectionLink_selectLabel':"Выбрать:",
158 'oneTimePasswordSelectionLink_all':"все", 156 'oneTimePasswordSelectionLink_all':"все",
159 'oneTimePasswordSelectionLink_none':"ни одного", 157 'oneTimePasswordSelectionLink_none':"ни одного",
160 'oneTimePasswordSelectionLink_used':"использованные", 158 'oneTimePasswordSelectionLink_used':"использованные",
161 'oneTimePasswordSelectionLink_unused':"неиспользованные", 159 'oneTimePasswordSelectionLink_unused':"неиспользованные",
162 'saveOTP_encryptUserDataTitle':"Сохранение одноразовых паролей", 160 'saveOTP_encryptUserDataTitle':"Сохранение одноразовых паролей",
163 'saveOTP_encryptUserDataText':"Обработка новых данных учетной записи ...", 161 'saveOTP_encryptUserDataText':"Обработка новых данных учетной записи ...",
164 'saveOTP_encryptOTPDataTitle':"одноразовыми паролями", 162 'saveOTP_encryptOTPDataTitle':"одноразовыми паролями",
165 'saveOTP_encryptOTPDataText':"Шифрование аутентификационных данных ...", 163 'saveOTP_encryptOTPDataText':"Шифрование аутентификационных данных ...",
166 'saveOTP_sendingDataTitle':"одноразовыми паролями", 164 'saveOTP_sendingDataTitle':"одноразовыми паролями",
167 'saveOTP_sendingDataText':"Передача аутентификационных данных на сервер ...", 165 'saveOTP_sendingDataText':"Передача аутентификационных данных на сервер ...",
168 'saveOTP_updatingInterfaceTitle':"одноразовыми паролями", 166 'saveOTP_updatingInterfaceTitle':"одноразовыми паролями",
169 'saveOTP_updatingInterfaceText':"Обновление интерфейса ...", 167 'saveOTP_updatingInterfaceText':"Обновление интерфейса ...",
170 'accountPreferencesLabel':"Настройки", 168 'accountPreferencesLabel':"Настройки",
171 'accountPreferencesTabTitle':"Настройки", 169 'accountPreferencesTabTitle':"Настройки",
172 'accountPreferencesLanguageTitle':"Выбор языка", 170 'accountPreferencesLanguageTitle':"Выбор языка",
173 'accountPreferencesLanguageDescription':"<p>Выберите ваш язык из списка.</p> ", 171 'accountPreferencesLanguageDescription':"<p>Выберите ваш язык из списка.</p> ",
174 'showDonationReminderPanelTitle':"Напоминания о пожертвованиях", 172 'showDonationReminderPanelTitle':"Напоминания о пожертвованиях",
175 'showDonationReminderPanelDescription':"<p>Показывать напоминания о пожертвованиях</p> ", 173 'showDonationReminderPanelDescription':"<p>Показывать напоминания о пожертвованиях</p> ",
176 'saveUserPreferencesFormSubmitLabel':"Сохранить", 174 'saveUserPreferencesFormSubmitLabel':"Сохранить",
177 'cancelUserPreferencesFormSubmitLabel':"Отмена", 175 'cancelUserPreferencesFormSubmitLabel':"Отмена",
178 'accountPreferencesSavingPanelTitle_Step1':"Сохранение настроек", 176 'accountPreferencesSavingPanelTitle_Step1':"Сохранение настроек",
179 'accountPreferencesSavingPanelText_Step1':"Шифрование настроек", 177 'accountPreferencesSavingPanelText_Step1':"Шифрование настроек",
180 'accountPreferencesSavingPanelTitle_Step2':"Сохранение настроек", 178 'accountPreferencesSavingPanelTitle_Step2':"Сохранение настроек",
181 'accountPreferencesSavingPanelText_Step2':"Передача зашифрованных настроек в Clipperz", 179 'accountPreferencesSavingPanelText_Step2':"Передача зашифрованных настроек в Clipperz",
182 'accountLoginHistoryLabel':"История входов", 180 'accountLoginHistoryLabel':"История входов",
183 'loginHistoryTabTitle':"История входов", 181 'loginHistoryTabTitle':"История входов",
184 'loginHistoryReadOnlyMessage':"<h6>Извините!</h6> <p>История входов не доступна в автономной версии Clipperz.</p> ", 182 'loginHistoryReadOnlyMessage':"<h6>Извините!</h6> <p>История входов не доступна в автономной версии Clipperz.</p> ",
185 'loginHistoryLoadingMessage':"<h6>Загрузка данных</h6> <p>Подождите, пожайлуста ...</p> ", 183 'loginHistoryLoadingMessage':"<h6>Загрузка данных</h6> <p>Подождите, пожайлуста ...</p> ",
186 'loginHistoryLoadedMessage':"<h6>Здесь можно посмотреть информацию о последних авторизациях в Clipperz</h6> <p> </p> ", 184 'loginHistoryLoadedMessage':"<h6>Здесь можно посмотреть информацию о последних авторизациях в Clipperz</h6> <p> </p> ",
187 'loginHistoryIPLabel':"IP", 185 'loginHistoryIPLabel':"IP",
188 'loginHistoryTimeLabel':"дата", 186 'loginHistoryTimeLabel':"дата",
189 'loginHistoryCurrentSessionText':"текущая сессия", 187 'loginHistoryCurrentSessionText':"текущая сессия",
190 'loginHistoryReloadButtonLabel':"Обновить историю", 188 'loginHistoryReloadButtonLabel':"Обновить историю",
191 'deleteAccountTabLabel':"Удалить аккаунт", 189 'deleteAccountTabLabel':"Удалить аккаунт",
192 'deleteAccountTabTitle':"Удалить аккаунт", 190 'deleteAccountTabTitle':"Удалить аккаунт",
193 'deleteAccountFormUsernameLabel':"логин", 191 'deleteAccountFormUsernameLabel':"логин",
194 'deleteAccountFormPassphraseLabel':"пароль", 192 'deleteAccountFormPassphraseLabel':"пароль",
195 'deleteAccountFormSafetyCheckboxLabel':"Я понимаю, что все данные этого аккаунта будут безвозвратно удалены.", 193 'deleteAccountFormSafetyCheckboxLabel':"Я понимаю, что все данные этого аккаунта будут безвозвратно удалены.",
196 'deleteAccountFormSubmitLabel':"Удалить аккаунт", 194 'deleteAccountFormSubmitLabel':"Удалить аккаунт",
197 'deleteAccountFormWrongUsernameWarning':"Неверный логин", 195 'deleteAccountFormWrongUsernameWarning':"Неверный логин",
198 'deleteAccountFormWrongPassphraseWarning':"Неверный пароль", 196 'deleteAccountFormWrongPassphraseWarning':"Неверный пароль",
199 'deleteAccountFormSafetyCheckWarning':"Прочтите и отметьте все поля ниже.", 197 'deleteAccountFormSafetyCheckWarning':"Прочтите и отметьте все поля ниже.",
200 'accountPanelDeletingAccountPanelConfirmationTitle':"ВНИМАНИЕ", 198 'accountPanelDeletingAccountPanelConfirmationTitle':"ВНИМАНИЕ",
201 'accountPanelDeleteAccountPanelConfirmationText':"Вы уверены, что хотите удалить аккаунт? Операция необратима.", 199 'accountPanelDeleteAccountPanelConfirmationText':"Вы уверены, что хотите удалить аккаунт? Операция необратима.",
202 'accountPanelDeleteAccountPanelConfirmButtonLabel':"Да", 200 'accountPanelDeleteAccountPanelConfirmButtonLabel':"Да",
203 'accountPanelDeleteAccountPanelDenyButtonLabel':"Нет", 201 'accountPanelDeleteAccountPanelDenyButtonLabel':"Нет",
204 'offlineCopyTabLabel':"Автономная копия", 202 'offlineCopyTabLabel':"Автономная копия",
205 'offlineCopyTabTitle':"Автономная копия", 203 'offlineCopyTabTitle':"Автономная копия",
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> ", 204 '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> ",
207 'offlineCopyDownloadLinkLabel':"Скачать", 205 'offlineCopyDownloadLinkLabel':"Скачать",
208 'offlineCopyDownloadWarning':"<h4> <a href=\"#\" id=\"offlineCopyDownloadWarningLink\">Обновите вашу автономную копию!</a> </h4> <p>Вы недавно создали или изменили одну или более карточек: рекомендуется скачать новую автономную копию.</p> ", 206 'offlineCopyDownloadWarning':"<h4> <a href=\"#\" id=\"offlineCopyDownloadWarningLink\">Обновите вашу автономную копию!</a> </h4> <p>Вы недавно создали или изменили одну или более карточек: рекомендуется скачать новую автономную копию.</p> ",
209 'sharingTabLabel':"Совместное использование", 207 'sharingTabLabel':"Совместное использование",
210 'sharingTabTitle':"Совместное использование", 208 'sharingTabTitle':"Совместное использование",
211 'sharingTabDescription':"<p>Достаточно часто конфиденциальную информацию нужно предоставить другим людям.</p> <p>Может быть, просто дать коллеге ключ доступа к вашей почте, когда вас нету в офисе, или даже открыть доступ наследникам к вашему счету в местном банке, на случай, если с вами что-нибудь случится.</p> <p>Clipperz поможет сделать совместное использование ваших секретов безопасной и простой процедурой.</p> <p> </p> <p> <b>Раздел в разработке...</b> </p> ", 209 'sharingTabDescription':"<p>Достаточно часто конфиденциальную информацию нужно предоставить другим людям.</p> <p>Может быть, просто дать коллеге ключ доступа к вашей почте, когда вас нету в офисе, или даже открыть доступ наследникам к вашему счету в местном банке, на случай, если с вами что-нибудь случится.</p> <p>Clipperz поможет сделать совместное использование ваших секретов безопасной и простой процедурой.</p> <p> </p> <p> <b>Раздел в разработке...</b> </p> ",
212 'importTabLabel':"Импорт", 210 'importTabLabel':"Импорт",
213 'importTabTitle':"Импорт", 211 'importTabTitle':"Импорт",
214 'importTabDescription':"<p>Вы можете импортировать данные целиком, в ваш аккаунт Clipperz, из файлов различных форматов.</p>", 212 'importTabDescription':"<p>Вы можете импортировать данные целиком, в ваш аккаунт Clipperz, из файлов различных форматов.</p>",
215 'printingTabLabel':"Экспорт", 213 'printingTabLabel':"Экспорт",
216 'printingTabTitle':"Экспорт", 214 'printingTabTitle':"Экспорт",
217 'printingTabDescription':"<p> <b>Печать ваших данных</b> </p> <p>Нажмите по ссылке, чтобы открыть новое окно со всеми вашими карточками для печати.</p> <p>Если вы собираетесь распечатать в резервных целях, пожалуйста, рассмотрите более безопасный вариант, как создание “автономной копии”.</p> ", 215 'printingTabDescription':"<p> <b>Печать ваших данных</b> </p> <p>Нажмите по ссылке, чтобы открыть новое окно со всеми вашими карточками для печати.</p> <p>Если вы собираетесь распечатать в резервных целях, пожалуйста, рассмотрите более безопасный вариант, как создание “автономной копии”.</p> ",
218 'printingLinkLabel':"Версия для печати", 216 'printingLinkLabel':"Версия для печати",
219 'contactsTabLabel':"Контакты", 217 'contactsTabLabel':"Контакты",
220 'contactsTabTitle':"Контакты", 218 'contactsTabTitle':"Контакты",
221 'passwordGeneratorTabLabel':"Генератор паролей", 219 'passwordGeneratorTabLabel':"Генератор паролей",
222 'passwordGeneratorTabTitle':"Генератор паролей", 220 'passwordGeneratorTabTitle':"Генератор паролей",
223 'passwordGeneratorTabButtonLabel':"сгенерировать", 221 'passwordGeneratorTabButtonLabel':"сгенерировать",
224 'bookmarkletTabLabel':"Букмарклет", 222 'bookmarkletTabLabel':"Букмарклет",
225 'bookmarkletTabTitle':"Букмарклет", 223 'bookmarkletTabTitle':"Букмарклет",
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> ", 224 '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> ",
227 'bookmarkletTabBookmarkletTitle':"Добавить в Clipperz", 225 'bookmarkletTabBookmarkletTitle':"Добавить в Clipperz",
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> ", 226 '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> ",
229 'mainPanelDirectLoginBlockLabel':"Быстрый вход", 227 'mainPanelDirectLoginBlockLabel':"Быстрый вход",
230 'directLinkReferenceShowButtonLabel':"показать", 228 'directLinkReferenceShowButtonLabel':"показать",
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> ", 229 '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> ",
232 'mainPanelRecordsBlockLabel':"Карточки", 230 'mainPanelRecordsBlockLabel':"Карточки",
233 'mainPanelAddRecordButtonLabel':"Добавить новую карточку", 231 'mainPanelAddRecordButtonLabel':"Добавить новую карточку",
234 'mainPanelRemoveRecordButtonLabel':"Удалить карточку", 232 'mainPanelRemoveRecordButtonLabel':"Удалить карточку",
235 'mainPanelRecordFilterBlockAllLabel':"все", 233 'mainPanelRecordFilterBlockAllLabel':"все",
236 'mainPanelRecordFilterBlockTagsLabel':"теги", 234 'mainPanelRecordFilterBlockTagsLabel':"теги",
237 'mainPanelRecordFilterBlockSearchLabel':"поиск", 235 'mainPanelRecordFilterBlockSearchLabel':"поиск",
238 'recordDetailNoRecordAtAllTitle':"Добро пожаловать в Clipperz!", 236 'recordDetailNoRecordAtAllTitle':"Добро пожаловать в Clipperz!",
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> ", 237 '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> ",
240 'newRecordWizardTitleBox':"<h5>Пожайлуста, выберите шаблон</h5> <p>Карточки - это простой и гибкий инструмент, с помощью которого вы можете хранить пароли и любую другую информацию.</p> <p>Выберите один из шаблонов. Вы всегда сможете настроить ваши карточки, добавляя или удаляя поля.</p> ", 238 'newRecordWizardTitleBox':"<h5>Пожайлуста, выберите шаблон</h5> <p>Карточки - это простой и гибкий инструмент, с помощью которого вы можете хранить пароли и любую другую информацию.</p> <p>Выберите один из шаблонов. Вы всегда сможете настроить ваши карточки, добавляя или удаляя поля.</p> ",
241 'newRecordWizardBookmarkletConfigurationTitle':"Быстрый вход", 239 'newRecordWizardBookmarkletConfigurationTitle':"Быстрый вход",
242 'newRecordWizardBookmarkletConfigurationDescription':"<p>Вставьте конфигурационный код, сгенерированный с помощью букмарклета</p> <p>Будет создана новая карточка с поддержкой быстрого входа.</p> ", 240 'newRecordWizardBookmarkletConfigurationDescription':"<p>Вставьте конфигурационный код, сгенерированный с помощью букмарклета</p> <p>Будет создана новая карточка с поддержкой быстрого входа.</p> ",
243 'newRecordWizardCreateButtonLabel':"Создать", 241 'newRecordWizardCreateButtonLabel':"Создать",
244 'newRecordWizardCancelButtonLabel':"Отмена", 242 'newRecordWizardCancelButtonLabel':"Отмена",
245 'donateSplashPanelTitle':"Поддержите Clipperz, сделайте пожертвование сегодня!", 243 'donateSplashPanelTitle':"Поддержите Clipperz, сделайте пожертвование сегодня!",
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> ", 244 '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> ",
247 'donateCloseButtonLabel':"Еще нет", 245 'donateCloseButtonLabel':"Еще нет",
248 'donateDonateButtonLabel':"Да", 246 'donateDonateButtonLabel':"Да",
249 'recordTemplates':{ 247 'recordTemplates':{
250 'WebAccount':{ 248 'WebAccount':{
251 'title':"Интернет аккаунт", 249 'title':"Интернет аккаунт",
252 'description':"Простая форма для хранения учетной записи в онлайн сервисе." 250 'description':"Простая форма для хранения учетной записи в онлайн сервисе."
253 }, 251 },
254 'BankAccount':{ 252 'BankAccount':{
255 'title':"Счет банка", 253 'title':"Счет банка",
256 'description':"Безопасное хранение номера вашего счета и учетной записи для онлайн доступа." 254 'description':"Безопасное хранение номера вашего счета и учетной записи для онлайн доступа."
257 }, 255 },
258 'CreditCard':{ 256 'CreditCard':{
259 'title':"Кредитная карта", 257 'title':"Кредитная карта",
260 'description':"Номер карты, срок действия, CCV2 и PIN будут всегда при вас." 258 'description':"Номер карты, срок действия, CCV2 и PIN будут всегда при вас."
261 }, 259 },
262 'AddressBookEntry':{ 260 'AddressBookEntry':{
263 'title':"Запись адресной книги", 261 'title':"Запись адресной книги",
264 'description':"Clipperz может также работать, как записная книга. Используйте этот шаблон, чтобы легко добавить новую запись." 262 'description':"Clipperz может также работать, как записная книга. Используйте этот шаблон, чтобы легко добавить новую запись."
265 }, 263 },
266 'Custom':{ 264 'Custom':{
267 'title':"Пользовательская карточка", 265 'title':"Пользовательская карточка",
268 'description':"Не важно, какие данные нужно защитить, просто создайте карточку." 266 'description':"Не важно, какие данные нужно защитить, просто создайте карточку."
269 } 267 }
270 }, 268 },
271 'recordFieldTypologies':{ 269 'recordFieldTypologies':{
272 'TXT':{ 270 'TXT':{
273 'description':"simple text field", 271 'description':"simple text field",
274 'shortDescription':"текст" 272 'shortDescription':"текст"
275 }, 273 },
276 'PWD':{ 274 'PWD':{
277 'description':"simple text field, with default status set to hidden", 275 'description':"simple text field, with default status set to hidden",
278 'shortDescription':"пароль" 276 'shortDescription':"пароль"
279 }, 277 },
280 'URL':{ 278 'URL':{
281 'description':"simple text field in edit mode, that became an active url in view mode", 279 'description':"simple text field in edit mode, that became an active url in view mode",
282 'shortDescription':"URL" 280 'shortDescription':"URL"
283 }, 281 },
284 'DATE':{ 282 'DATE':{
285 'description':"a value set with a calendar helper", 283 'description':"a value set with a calendar helper",
286 'shortDescription':"дата" 284 'shortDescription':"дата"
287 }, 285 },
288 'ADDR':{ 286 'ADDR':{
289 'description':"just like the URL, but the active link points to Google Maps (or similar service) passing the address value as argument", 287 'description':"just like the URL, but the active link points to Google Maps (or similar service) passing the address value as argument",
290 'shortDescription':"адрес" 288 'shortDescription':"адрес"
291 }, 289 },
292 'CHECK':{ 290 'CHECK':{
293 'description':"check description", 291 'description':"check description",
294 'shortDescription':"check" 292 'shortDescription':"check"
295 }, 293 },
296 'RADIO':{ 294 'RADIO':{
297 'description':"radio description", 295 'description':"radio description",
298 'shortDescription':"radio" 296 'shortDescription':"radio"
299 }, 297 },
300 'SELECT':{ 298 'SELECT':{
301 'description':"select description", 299 'description':"select description",
302 'shortDescription':"select" 300 'shortDescription':"select"
303 } 301 }
304 }, 302 },
305 'newRecordPanelGeneralExceptionTitle':"Ошибка", 303 'newRecordPanelGeneralExceptionTitle':"Ошибка",
306 'newRecordPanelGeneralExceptionMessage':"Конфигурационный текст неверен. Убедитесь, что вы взяли его из окна закладки и попробуйте снова.", 304 'newRecordPanelGeneralExceptionMessage':"Конфигурационный текст неверен. Убедитесь, что вы взяли его из окна закладки и попробуйте снова.",
307 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"Ошибка", 305 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"Ошибка",
308 'newRecordPanelWrongBookmarkletVersionExceptionMessage':"Конфигурационный текст был сгенерирован с помощью старой весии закладок. Пожайлуста, обновите вашу закладку и попробуйте снова.", 306 'newRecordPanelWrongBookmarkletVersionExceptionMessage':"Конфигурационный текст был сгенерирован с помощью старой весии закладок. Пожайлуста, обновите вашу закладку и попробуйте снова.",
309 'newRecordPanelExceptionPanelCloseButtonLabel':"Отмена", 307 'newRecordPanelExceptionPanelCloseButtonLabel':"Отмена",
310 'mainPanelDeletingRecordPanelConfirmationTitle':"Удаление выбранной карточки", 308 'mainPanelDeletingRecordPanelConfirmationTitle':"Удаление выбранной карточки",
311 'mainPanelDeleteRecordPanelConfirmationText':"Вы действительно хотите удалить эту карточку?", 309 'mainPanelDeleteRecordPanelConfirmationText':"Вы действительно хотите удалить эту карточку?",
312 'mainPanelDeleteRecordPanelConfirmButtonLabel':"Да", 310 'mainPanelDeleteRecordPanelConfirmButtonLabel':"Да",
313 'mainPanelDeleteRecordPanelDenyButtonLabel':"Нет", 311 'mainPanelDeleteRecordPanelDenyButtonLabel':"Нет",
314 'mainPanelDeletingRecordPanelInitialTitle':"Удаление выбранной карточки", 312 'mainPanelDeletingRecordPanelInitialTitle':"Удаление выбранной карточки",
315 'mainPanelDeletingRecordPanelCompletedText':"Выполнено", 313 'mainPanelDeletingRecordPanelCompletedText':"Выполнено",
316 'deleteRecordPanelCollectRecordDataMessageTitle':"Удаление карточки", 314 'deleteRecordPanelCollectRecordDataMessageTitle':"Удаление карточки",
317 'deleteRecordPanelCollectRecordDataMessageText':"Обновление списка карточек", 315 'deleteRecordPanelCollectRecordDataMessageText':"Обновление списка карточек",
318 'deleteRecordPanelEncryptUserDataMessageTitle':"Удаление карточки", 316 'deleteRecordPanelEncryptUserDataMessageTitle':"Удаление карточки",
319 'deleteRecordPanelEncryptUserDataMessageText':"Шифрование заголовков карточек", 317 'deleteRecordPanelEncryptUserDataMessageText':"Шифрование заголовков карточек",
320 'deleteRecordPanelSendingDataToTheServerMessageTitle':"Удаление карточки", 318 'deleteRecordPanelSendingDataToTheServerMessageTitle':"Удаление карточки",
321 'deleteRecordPanelSendingDataToTheServerMessageText':"Передача зашифрованных заголовков карчточек в Clipperz", 319 'deleteRecordPanelSendingDataToTheServerMessageText':"Передача зашифрованных заголовков карчточек в Clipperz",
322 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"Удаление карточки", 320 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"Удаление карточки",
323 'deleteRecordPanelUpdatingTheInterfaceMessageText':"Обновление интерфейса", 321 'deleteRecordPanelUpdatingTheInterfaceMessageText':"Обновление интерфейса",
324 'recordDetailNoRecordSelectedTitle':"Не выбрана карточка", 322 'recordDetailNoRecordSelectedTitle':"Не выбрана карточка",
325 'recordDetailNoRecordSelectedDescription':"<p>Пожайлуста, выберите карточку из списка слева.</p> ", 323 'recordDetailNoRecordSelectedDescription':"<p>Пожайлуста, выберите карточку из списка слева.</p> ",
326 'recordDetailLoadingRecordMessage':"Загрузка зашифрованных карточек из Clipperz", 324 'recordDetailLoadingRecordMessage':"Загрузка зашифрованных карточек из Clipperz",
327 'recordDetailDecryptingRecordMessage':"Расшифровка данных карточек", 325 'recordDetailDecryptingRecordMessage':"Расшифровка данных карточек",
328 'recordDetailLoadingRecordVersionMessage':"Загрузка последней версии карточкиn", 326 'recordDetailLoadingRecordVersionMessage':"Загрузка последней версии карточкиn",
329 'recordDetailDecryptingRecordVersionMessage':"Расшифровка", 327 'recordDetailDecryptingRecordVersionMessage':"Расшифровка",
330 'recordDetailLoadingErrorMessageTitle':"Ошибка при загрузку", 328 'recordDetailLoadingErrorMessageTitle':"Ошибка при загрузку",
331 'recordDetailNotesLabel':"Примечания", 329 'recordDetailNotesLabel':"Примечания",
332 'recordDetailLabelFieldColumnLabel':"Название поля", 330 'recordDetailLabelFieldColumnLabel':"Название поля",
333 'recordDetailDataFieldColumnLabel':"Значение поля", 331 'recordDetailDataFieldColumnLabel':"Значение поля",
334 'recordDetailTypeFieldColumnLabel':"Тип", 332 'recordDetailTypeFieldColumnLabel':"Тип",
335 'recordDetailSavingChangesMessagePanelInitialTitle':"Сохранение карточки", 333 'recordDetailSavingChangesMessagePanelInitialTitle':"Сохранение карточки",
336 'recordDetailAddFieldButtonLabel':"Добавить новое поле", 334 'recordDetailAddFieldButtonLabel':"Добавить новое поле",
337 'recordDetailPasswordFieldHelpLabel':"чтобы скопировать пароль в буфер обмена, нажмите на звездочку, затем Ctrl-C", 335 'recordDetailPasswordFieldHelpLabel':"чтобы скопировать пароль в буфер обмена, нажмите на звездочку, затем Ctrl-C",
338 'recordDetailPasswordFieldScrambleLabel':"спрятать", 336 'recordDetailPasswordFieldScrambleLabel':"спрятать",
339 'recordDetailPasswordFieldUnscrambleLabel':"показать", 337 'recordDetailPasswordFieldUnscrambleLabel':"показать",
340 'recordDetailDirectLoginBlockTitle':"Быстрый вход", 338 'recordDetailDirectLoginBlockTitle':"Быстрый вход",
341 'recordDetailNewDirectLoginDescription':"<p>Настройка быстрого входа</p> ", 339 'recordDetailNewDirectLoginDescription':"<p>Настройка быстрого входа</p> ",
342 'recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription':"<p>В этой карточке есть данные для доступа в онлайн сервис?</p> <p>Используйте букмарклет, чтобы добавить «Быстрый вход»!</p> ", 340 'recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription':"<p>В этой карточке есть данные для доступа в онлайн сервис?</p> <p>Используйте букмарклет, чтобы добавить «Быстрый вход»!</p> ",
343 'recordDetailAddNewDirectLoginButtonLabel':"Добавить новый «Быстрый вход»", 341 'recordDetailAddNewDirectLoginButtonLabel':"Добавить новый «Быстрый вход»",
344 'recordDetailEditButtonLabel':"Изменить", 342 'recordDetailEditButtonLabel':"Изменить",
345 'recordDetailSaveButtonLabel':"Сохранить", 343 'recordDetailSaveButtonLabel':"Сохранить",
346 'recordDetailCancelButtonLabel':"Отмена", 344 'recordDetailCancelButtonLabel':"Отмена",
347 'newRecordTitleLabel':"_новую карточку_", 345 'newRecordTitleLabel':"_новую карточку_",
348 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"Сохранение карточки", 346 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"Сохранение карточки",
349 'recordSaveChangesPanelCollectRecordInfoMessageText':"Обновление заголовков карточек", 347 'recordSaveChangesPanelCollectRecordInfoMessageText':"Обновление заголовков карточек",
350 'recordSaveChangesPanelEncryptUserDataMessageTitle':"Сохранение карточки", 348 'recordSaveChangesPanelEncryptUserDataMessageTitle':"Сохранение карточки",
351 'recordSaveChangesPanelEncryptUserDataMessageText':"Шифрование заголовков карточки", 349 'recordSaveChangesPanelEncryptUserDataMessageText':"Шифрование заголовков карточки",
352 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"Сохранение карточки", 350 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"Сохранение карточки",
353 'recordSaveChangesPanelEncryptRecordDataMessageText':"Шифровани данных карточки", 351 'recordSaveChangesPanelEncryptRecordDataMessageText':"Шифровани данных карточки",
354 'recordSaveChangesPanelEncryptRecordVersionDataMessageTitle':"Сохранение карточки", 352 'recordSaveChangesPanelEncryptRecordVersionDataMessageTitle':"Сохранение карточки",
355 'recordSaveChangesPanelEncryptRecordVersionDataMessageText':"Шифрование данных версии карточки", 353 'recordSaveChangesPanelEncryptRecordVersionDataMessageText':"Шифрование данных версии карточки",
356 'recordSaveChangesPanelSendingDataToTheServerMessageTitle':"Сохранение карточки", 354 'recordSaveChangesPanelSendingDataToTheServerMessageTitle':"Сохранение карточки",
357 'recordSaveChangesPanelSendingDataToTheServerMessageText':"Передача зашифрованного заголовка карточки в Clipperz", 355 'recordSaveChangesPanelSendingDataToTheServerMessageText':"Передача зашифрованного заголовка карточки в Clipperz",
358 'recordSaveChangesPanelUpdatingTheInterfaceMessageTitle':"Сохранение карточки", 356 'recordSaveChangesPanelUpdatingTheInterfaceMessageTitle':"Сохранение карточки",
359 'recordSaveChangesPanelUpdatingTheInterfaceMessageText':"Обновление интерфейса", 357 'recordSaveChangesPanelUpdatingTheInterfaceMessageText':"Обновление интерфейса",
360 'passwordGeneratorPanelTitle':"Генератор паролей", 358 'passwordGeneratorPanelTitle':"Генератор паролей",
361 'passwordGeneratorPanelOkLabel':"OK", 359 'passwordGeneratorPanelOkLabel':"OK",
362 'passwordGeneratorPanelCancelLabel':"Отмена", 360 'passwordGeneratorPanelCancelLabel':"Отмена",
363 'passwordGeneratorLengthLabel':"длина:", 361 'passwordGeneratorLengthLabel':"длина:",
364 'DWRUtilLoadingMessage':"Загрузка данных ...", 362 'DWRUtilLoadingMessage':"Загрузка данных ...",
365 'comingSoon':"вскоре ...", 363 'comingSoon':"вскоре ...",
366 'panelCollectingEntryopyMessageText':"Определение энтропии", 364 'panelCollectingEntryopyMessageText':"Определение энтропии",
367 'directLoginConfigurationCheckBoxFieldSelectedValue':"Да", 365 'directLoginConfigurationCheckBoxFieldSelectedValue':"Да",
368 'directLoginConfigurationCheckBoxFieldNotSelectedValue':"Нет", 366 'directLoginConfigurationCheckBoxFieldNotSelectedValue':"Нет",
369 'WELCOME_BACK':"Добро пожаловать снова!", 367 'WELCOME_BACK':"Добро пожаловать снова!",
370 'currentConnectionText':"Сейчас вы подключились с ip&nbsp;__ip__, очевидно __country__, используя __browser__ на __operatingSystem__.", 368 'currentConnectionText':"Сейчас вы подключились с ip&nbsp;__ip__, очевидно __country__, используя __browser__ на __operatingSystem__.",
371 'latestConnectionText':"Последнее соединение было __elapsedTimeDescription__ (__time__) с ip&nbsp;__ip__, очевидно __country__, используя __browser__ на __operatingSystem__.", 369 'latestConnectionText':"Последнее соединение было __elapsedTimeDescription__ (__time__) с ip&nbsp;__ip__, очевидно __country__, используя __browser__ на __operatingSystem__.",
372 'fullLoginHistoryLinkLabel':"показать полную историю входов", 370 'fullLoginHistoryLinkLabel':"показать полную историю входов",
373 371
374'exportTabDescription': 372'exportTabDescription':
375 "<h5>JSON экспорт</h5>\ 373 "<h5>JSON экспорт</h5>\
376 <p>JSON включает в себя полную информацию про ваши карты, в том числе и конфигурации быстрого входа.</p>\ 374 <p>JSON включает в себя полную информацию про ваши карты, в том числе и конфигурации быстрого входа.</p>\
377 <p>Это формат, разработанный для Clipperz, и наиболее удобен для работы с ним. Например, если вам нужно переместить все свои карты на другую учетную запись Clipperz, или если вы хотите восстановить карточку, которая была случайно удалена.</p>\ 375 <p>Это формат, разработанный для Clipperz, и наиболее удобен для работы с ним. Например, если вам нужно переместить все свои карты на другую учетную запись Clipperz, или если вы хотите восстановить карточку, которая была случайно удалена.</p>\
378 <p>Нажмите на ссылку ниже, чтобы начать экспорт.</p>", 376 <p>Нажмите на ссылку ниже, чтобы начать экспорт.</p>",
379 377
380 'exportLinkLabel': "JSON экспорт", 378 'exportLinkLabel': "JSON экспорт",
381 379
382 'exportDataInProgressDescription':"<h4>Экспорт, пожалуста, подождите, пока обрабатываются ваши данные…</h4>", 380 'exportDataInProgressDescription':"<h4>Экспорт, пожалуста, подождите, пока обрабатываются ваши данные…</h4>",
383 381
384 'exportDataDescription': 382 'exportDataDescription':
385 "<h4>Инструкция</h4>\ 383 "<h4>Инструкция</h4>\
386 <p>Скопируйте текст ниже в любой текстовый редактор и сохраните его. (напр. “clipperz_export_20071217.json”)</p>", 384 <p>Скопируйте текст ниже в любой текстовый редактор и сохраните его. (напр. “clipperz_export_20071217.json”)</p>",
387 385
388 386
389 'elapsedTimeDescriptions':{ 387 'elapsedTimeDescriptions':{
390 'MORE_THAN_A_MONTH_AGO':"за месяц", 388 'MORE_THAN_A_MONTH_AGO':"за месяц",
391 'MORE_THAN_A_WEEK_AGO':"за неделю", 389 'MORE_THAN_A_WEEK_AGO':"за неделю",
392 'MORE_THAN_*_WEEKS_AGO':"за несколько __elapsed__ недель", 390 'MORE_THAN_*_WEEKS_AGO':"за несколько __elapsed__ недель",
393 'YESTERDAY':"вчера", 391 'YESTERDAY':"вчера",
394 '*_DAYS_AGO':"__elapsed__ дней(-я)", 392 '*_DAYS_AGO':"__elapsed__ дней(-я)",
395 'ABOUT_AN_HOUR_AGO':"за час", 393 'ABOUT_AN_HOUR_AGO':"за час",
396 '*_HOURS_AGO':"__elapsed__ часов(-а)", 394 '*_HOURS_AGO':"__elapsed__ часов(-а)",
397 'JUST_A_FEW_MINUTES_AGO':"несколько минут", 395 'JUST_A_FEW_MINUTES_AGO':"несколько минут",
398 'ABOUT_*_MINUTES_AGO':"около __elapsed__ минут" 396 'ABOUT_*_MINUTES_AGO':"около __elapsed__ минут"
399}, 397},
400 'unknown_ip':"неизвестный", 398 'unknown_ip':"неизвестный",
401 399
402// NEW - Import panel 400// NEW - Import panel
403 'importFormats':{ 401 'importFormats':{
404 'CSV': { 402 'CSV': {
405 'label': "CSV", 403 'label': "CSV",
406 'description':"<p>Распространенный формат для хранения табличных данных. Большинство менеджеров паролей поддерживают экспорт в этот формат.</p>" 404 'description':"<p>Распространенный формат для хранения табличных данных. Большинство менеджеров паролей поддерживают экспорт в этот формат.</p>"
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 1a9caed..e880954 100644
--- a/frontend/beta/js/Clipperz/PM/Strings/Strings_zh-CN.js
+++ b/frontend/beta/js/Clipperz/PM/Strings/Strings_zh-CN.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26Clipperz.PM.Strings.Languages['zh-CN'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], { 24Clipperz.PM.Strings.Languages['zh-CN'.toLowerCase()] = MochiKit.Base.merge(Clipperz.PM.Strings.Languages['en-us'], {
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> ", 25 '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> ",
28 'loginFormTitle':"用你的 Clipperz 帐户登录", 26 'loginFormTitle':"用你的 Clipperz 帐户登录",
29 'loginFormUsernameLabel':"用户名", 27 'loginFormUsernameLabel':"用户名",
30 'loginFormPassphraseLabel':"密码短语", 28 'loginFormPassphraseLabel':"密码短语",
31 'loginFormDontHaveAnAccountLabel':"还未建立帐户?", 29 'loginFormDontHaveAnAccountLabel':"还未建立帐户?",
32 'loginFormCreateOneLabel':"创建一个新帐户", 30 'loginFormCreateOneLabel':"创建一个新帐户",
33 'loginFormForgotYourCredentialsLabel':"忘记你的证书?", 31 'loginFormForgotYourCredentialsLabel':"忘记你的证书?",
34 'loginFormAarghThatsBadLabel':"呃?这下糟糕了", 32 'loginFormAarghThatsBadLabel':"呃?这下糟糕了",
35 'loginFormAfraidOfMaliciousScriptsLabel':"害怕有恶意脚本?", 33 'loginFormAfraidOfMaliciousScriptsLabel':"害怕有恶意脚本?",
36 'loginFormVerifyTheCodeLabel':"验证代码", 34 'loginFormVerifyTheCodeLabel':"验证代码",
37 'loginFormButtonLabel':"登录", 35 'loginFormButtonLabel':"登录",
38 'loginFormOneTimePasswordCheckboxLabel':"使用一次性密码短语", 36 'loginFormOneTimePasswordCheckboxLabel':"使用一次性密码短语",
39 'loginPanelSwithLanguageDescription':"<h5>选择你的第一语言</h5> ", 37 'loginPanelSwithLanguageDescription':"<h5>选择你的第一语言</h5> ",
40 'browserCompatibilityDescription':"<p>使用 Firefox 将得到更快更安全的 Clipperz 服务。不过 Clipperz 同样可以很好的工作在 Opera 和 微软的 IE 中。</p> ", 38 'browserCompatibilityDescription':"<p>使用 Firefox 将得到更快更安全的 Clipperz 服务。不过 Clipperz 同样可以很好的工作在 Opera 和 微软的 IE 中。</p> ",
41 'OTPloginMessagePanelInitialTitle':"用一次性密码短语登录", 39 'OTPloginMessagePanelInitialTitle':"用一次性密码短语登录",
42 'OTPloginMessagePanelInitialText':"发送 OTP 证书 ...", 40 'OTPloginMessagePanelInitialText':"发送 OTP 证书 ...",
43 'OTPloginMessagePanelLoadingTitle':"用一次性密码短语登录", 41 'OTPloginMessagePanelLoadingTitle':"用一次性密码短语登录",
44 'OTPloginMessagePanelLoadingText':"从服务器读取加密认证数据 ...", 42 'OTPloginMessagePanelLoadingText':"从服务器读取加密认证数据 ...",
45 'OTPloginMessagePanelProcessingTitle':"用一次性密码短语登录", 43 'OTPloginMessagePanelProcessingTitle':"用一次性密码短语登录",
46 'OTPloginMessagePanelProcessingText':"本地解密认证数据", 44 'OTPloginMessagePanelProcessingText':"本地解密认证数据",
47 'loginMessagePanelInitialTitle':"登录中...", 45 'loginMessagePanelInitialTitle':"登录中...",
48 'loginMessagePanelInitialButtonLabel':"取消", 46 'loginMessagePanelInitialButtonLabel':"取消",
49 'loginMessagePanelConnectedTitle':"连接成功", 47 'loginMessagePanelConnectedTitle':"连接成功",
50 'loginMessagePanelConnectedText':"完成", 48 'loginMessagePanelConnectedText':"完成",
51 'loginMessagePanelFailureTitle':"错误", 49 'loginMessagePanelFailureTitle':"错误",
52 'loginMessagePanelFailureText':"登录失败", 50 'loginMessagePanelFailureText':"登录失败",
53 'loginMessagePanelFailureButtonLabel':"取消", 51 'loginMessagePanelFailureButtonLabel':"取消",
54 'connectionLoginSendingCredentialsMessageTitle':"验证证书", 52 'connectionLoginSendingCredentialsMessageTitle':"验证证书",
55 'connectionLoginSendingCredentialsMessageText':"传送证书", 53 'connectionLoginSendingCredentialsMessageText':"传送证书",
56 'connectionLoginCredentialsVerificationMessageTitle':"验证证书", 54 'connectionLoginCredentialsVerificationMessageTitle':"验证证书",
57 'connectionLoginCredentialsVerificationMessageText':"进行 SRP 认证", 55 'connectionLoginCredentialsVerificationMessageText':"进行 SRP 认证",
58 'connectionLoginDoneMessageTitle':"验证证书", 56 'connectionLoginDoneMessageTitle':"验证证书",
59 'connectionLoginDoneMessageText':"已连接", 57 'connectionLoginDoneMessageText':"已连接",
60 'userLoginPanelUpgradingUserCredentialsMessageTitle':"验证证书", 58 'userLoginPanelUpgradingUserCredentialsMessageTitle':"验证证书",
61 'userLoginPanelUpgradingUserCredentialsMessageText':"升级证书到新的认证模式", 59 'userLoginPanelUpgradingUserCredentialsMessageText':"升级证书到新的认证模式",
62 'userLoginPanelConnectedMessageTitle':"用户识别", 60 'userLoginPanelConnectedMessageTitle':"用户识别",
63 'userLoginPanelConnectedMessageText':"成功登录", 61 'userLoginPanelConnectedMessageText':"成功登录",
64 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"验证证书", 62 'userLoginPanelTryingAnOlderConnectionSchemaMessageTitle':"验证证书",
65 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"旧认证模式失效", 63 'userLoginPanelTryingAnOlderConnectionSchemaMessageText':"旧认证模式失效",
66 'userLoginPanelLoadingUserDataMessageTitle':"用户识别", 64 'userLoginPanelLoadingUserDataMessageTitle':"用户识别",
67 'userLoginPanelLoadingUserDataMessageText':"正在从 Clipperz 下载加密卡报头", 65 'userLoginPanelLoadingUserDataMessageText':"正在从 Clipperz 下载加密卡报头",
68 'userLoginPanelDecryptingUserDataMessageTitle':"用户识别", 66 'userLoginPanelDecryptingUserDataMessageTitle':"用户识别",
69 'userLoginPanelDecryptingUserDataMessageText':"加密卡报头本地解密", 67 'userLoginPanelDecryptingUserDataMessageText':"加密卡报头本地解密",
70 'userLoginPanelDecryptingUserStatisticsMessageTitle':"用户识别", 68 'userLoginPanelDecryptingUserStatisticsMessageTitle':"用户识别",
71 'userLoginPanelDecryptingUserStatisticsMessageText':"本地解密使用统计", 69 'userLoginPanelDecryptingUserStatisticsMessageText':"本地解密使用统计",
72 'splashAlertTitle':"Clipperz 欢迎您", 70 'splashAlertTitle':"Clipperz 欢迎您",
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> ", 71 '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> ",
74 'splashAlertCloseButtonLabel':"确定", 72 'splashAlertCloseButtonLabel':"确定",
75 'registrationFormTitle':"创建你的帐户", 73 'registrationFormTitle':"创建你的帐户",
76 'registrationFormUsernameLabel':"用户名", 74 'registrationFormUsernameLabel':"用户名",
77 'registrationFormPassphraseLabel':"密码短语", 75 'registrationFormPassphraseLabel':"密码短语",
78 'registrationFormRetypePassphraseLabel':"确认密码短语", 76 'registrationFormRetypePassphraseLabel':"确认密码短语",
79 'registrationFormSafetyCheckLabel':"我明白 Clipperz 无法找回忘记的密码短语.", 77 'registrationFormSafetyCheckLabel':"我明白 Clipperz 无法找回忘记的密码短语.",
80 'registrationFormTermsOfServiceCheckLabel':"我同意接受 <a href='http://www.clipperz.com/terms_of_service' target='_blank'>服务条款</a> 款.", 78 'registrationFormTermsOfServiceCheckLabel':"我同意接受 <a href='http://www.clipperz.com/terms_of_service' target='_blank'>服务条款</a> 款.",
81 'registrationFormDoYouAlreadyHaveAnAccountLabel':"如果已有一个 Clipperz 帐户", 79 'registrationFormDoYouAlreadyHaveAnAccountLabel':"如果已有一个 Clipperz 帐户",
82 'registrationFormSimplyLoginLabel':"在此登录", 80 'registrationFormSimplyLoginLabel':"在此登录",
83 'registrationFormButtonLabel':"注册", 81 'registrationFormButtonLabel':"注册",
84 'registrationFormWarningMessageNotMatchingPassphrases':"两次密码短语不同,请重新输入", 82 'registrationFormWarningMessageNotMatchingPassphrases':"两次密码短语不同,请重新输入",
85 'registrationFormWarningMessageSafetyCheckNotSelected':"请阅读并检查下面的选项框", 83 'registrationFormWarningMessageSafetyCheckNotSelected':"请阅读并检查下面的选项框",
86 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"您需要同意服务条款", 84 'registrationFormWarningMessageTermsOfServiceCheckNotSelected':"您需要同意服务条款",
87 'registrationMessagePanelInitialTitle':"创建账户...", 85 'registrationMessagePanelInitialTitle':"创建账户...",
88 'registrationMessagePanelInitialButtonLabel':"取消", 86 'registrationMessagePanelInitialButtonLabel':"取消",
89 'registrationMessagePanelRegistrationDoneTitle':"注册", 87 'registrationMessagePanelRegistrationDoneTitle':"注册",
90 'registrationMessagePanelRegistrationDoneText':"完成", 88 'registrationMessagePanelRegistrationDoneText':"完成",
91 'registrationMessagePanelFailureTitle':"注册失败", 89 'registrationMessagePanelFailureTitle':"注册失败",
92 'registrationMessagePanelFailureButtonLabel':"关闭", 90 'registrationMessagePanelFailureButtonLabel':"关闭",
93 'connectionRegistrationSendingRequestMessageText':"验证证书", 91 'connectionRegistrationSendingRequestMessageText':"验证证书",
94 'connectionRegistrationSendingCredentialsMessageText':"传送证书", 92 'connectionRegistrationSendingCredentialsMessageText':"传送证书",
95 'registrationSplashPanelTitle':"安全忠告", 93 'registrationSplashPanelTitle':"安全忠告",
96 'registrationSplashPanelDescription':"<p>这是你的 Clipperz 证书,请保存好。Clipperz 永远不会第二次显示你的用户名和密码短语</p> ", 94 'registrationSplashPanelDescription':"<p>这是你的 Clipperz 证书,请保存好。Clipperz 永远不会第二次显示你的用户名和密码短语</p> ",
97 'registrationSplashPanelUsernameLabel':"用户名", 95 'registrationSplashPanelUsernameLabel':"用户名",
98 'registrationSplashPanelPassphraseLabel':"密码短语", 96 'registrationSplashPanelPassphraseLabel':"密码短语",
99 'registrationSplashPanelShowPassphraseButtonLabel':"显示密码短语", 97 'registrationSplashPanelShowPassphraseButtonLabel':"显示密码短语",
100 'donateHeaderLinkLabel':"捐赠", 98 'donateHeaderLinkLabel':"捐赠",
101 'creditsHeaderLinkLabel':"致谢", 99 'creditsHeaderLinkLabel':"致谢",
102 'feedbackHeaderLinkLabel':"反馈", 100 'feedbackHeaderLinkLabel':"反馈",
103 'helpHeaderLinkLabel':"帮助", 101 'helpHeaderLinkLabel':"帮助",
104 'forumHeaderLinkLabel':"论坛", 102 'forumHeaderLinkLabel':"论坛",
105 'recordMenuLabel':"密码卡片", 103 'recordMenuLabel':"密码卡片",
106 'accountMenuLabel':"账户", 104 'accountMenuLabel':"账户",
107 'dataMenuLabel':"资料", 105 'dataMenuLabel':"资料",
108 'contactsMenuLabel':"联系", 106 'contactsMenuLabel':"联系",
109 'toolsMenuLabel':"工具", 107 'toolsMenuLabel':"工具",
110 'logoutMenuLabel':"暂时离开", 108 'logoutMenuLabel':"暂时离开",
111 'lockMenuLabel':"安全锁", 109 'lockMenuLabel':"安全锁",
112 'lockTitle':"账户被锁定", 110 'lockTitle':"账户被锁定",
113 'lockDescription':"<p>请输入你的密码短语解开账户</p> ", 111 'lockDescription':"<p>请输入你的密码短语解开账户</p> ",
114 'unlockButtonLabel':"解锁", 112 'unlockButtonLabel':"解锁",
115 'changePasswordTabLabel':"修改密码短语", 113 'changePasswordTabLabel':"修改密码短语",
116 'changePasswordTabTitle':"修改密码短语", 114 'changePasswordTabTitle':"修改密码短语",
117 'changePasswordFormUsernameLabel':"用户名", 115 'changePasswordFormUsernameLabel':"用户名",
118 'changePasswordFormOldPassphraseLabel':"旧密码短语", 116 'changePasswordFormOldPassphraseLabel':"旧密码短语",
119 'changePasswordFormNewPassphraseLabel':"新密码短语", 117 'changePasswordFormNewPassphraseLabel':"新密码短语",
120 'changePasswordFormRetypePassphraseLabel':"确认密码短语", 118 'changePasswordFormRetypePassphraseLabel':"确认密码短语",
121 'changePasswordFormSafetyCheckboxLabel':"我知道 Clipperz 不能找回丢失的密码短语", 119 'changePasswordFormSafetyCheckboxLabel':"我知道 Clipperz 不能找回丢失的密码短语",
122 'changePasswordFormSubmitLabel':"修改密码短语", 120 'changePasswordFormSubmitLabel':"修改密码短语",
123 'changePasswordFormWrongUsernameWarning':"用户名错误", 121 'changePasswordFormWrongUsernameWarning':"用户名错误",
124 'changePasswordFormWrongPassphraseWarning':"旧密码短语错误", 122 'changePasswordFormWrongPassphraseWarning':"旧密码短语错误",
125 'changePasswordFormWrongRetypePassphraseWarning':"两次密码短语不同,请重新输入", 123 'changePasswordFormWrongRetypePassphraseWarning':"两次密码短语不同,请重新输入",
126 'changePasswordFormSafetyCheckWarning':"请阅读并检查下面的选项框", 124 'changePasswordFormSafetyCheckWarning':"请阅读并检查下面的选项框",
127 'changePasswordFormProgressDialogTitle':"正在修改密码短语", 125 'changePasswordFormProgressDialogTitle':"正在修改密码短语",
128 'changePasswordFormProgressDialogConnectedMessageTitle':"连接", 126 'changePasswordFormProgressDialogConnectedMessageTitle':"连接",
129 'changePasswordFormProgressDialogConnectedMessageText':"完成", 127 'changePasswordFormProgressDialogConnectedMessageText':"完成",
130 'changePasswordFormProgressDialogErrorMessageTitle':"错误", 128 'changePasswordFormProgressDialogErrorMessageTitle':"错误",
131 'changePasswordFormProgressDialogErrorMessageText':"证书修改失败", 129 'changePasswordFormProgressDialogErrorMessageText':"证书修改失败",
132 'changeCredentialsPanelEncryptingDataMessageTitle':"正在修改你的密码短语", 130 'changeCredentialsPanelEncryptingDataMessageTitle':"正在修改你的密码短语",
133 'changeCredentialsPanelEncryptingDataMessageText':"加密卡报头本地解密", 131 'changeCredentialsPanelEncryptingDataMessageText':"加密卡报头本地解密",
134 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"正在修改你的密码短语", 132 'changeCredentialsPanelCreatingNewCredentialsMessageTitle':"正在修改你的密码短语",
135 'changeCredentialsPanelCreatingNewCredentialsMessageText':"更新你的证书", 133 'changeCredentialsPanelCreatingNewCredentialsMessageText':"更新你的证书",
136 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"正在修改你的密码短语", 134 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageTitle':"正在修改你的密码短语",
137 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"正在上传本地证书到 Clipperz", 135 'changeCredentialsPanelSendingNewCredentialsToTheServerMessageText':"正在上传本地证书到 Clipperz",
138 'changeCredentialsPanelDoneMessageTitle':"正在修改你的密码短语", 136 'changeCredentialsPanelDoneMessageTitle':"正在修改你的密码短语",
139 'changeCredentialsPanelDoneMessageText':"完成", 137 'changeCredentialsPanelDoneMessageText':"完成",
140 'manageOTPTabLabel':"管理你的一次性密码短语", 138 'manageOTPTabLabel':"管理你的一次性密码短语",
141 'manageOTPTabTitle':"管理你的一次性密码短语", 139 'manageOTPTabTitle':"管理你的一次性密码短语",
142 'manageOTPTabDescription':"<p>一次性密码短语工作起来和一般的密码短语一样,但是只可以使用一次</p> <p>如果同样的密码短语在一段时间以内再次登录,会被拒绝。登录进程将会失败。</p> <p>为了防止任何欺诈登录,在成功登陆之后,你的一次性密码将会立即被删除,</p> <p>如果一次性密码被键盘记录程序或者间谍软件得到,可能会从被感染的机器上收集数据,这样的话,一次性密码绝对是个很好的选择。</p> <p> <b>强烈建议在公共场合登录 Clipperz 时,使用一次性密码。比如公关计算机,网吧,图书馆等</b> </p> ", 140 'manageOTPTabDescription':"<p>一次性密码短语工作起来和一般的密码短语一样,但是只可以使用一次</p> <p>如果同样的密码短语在一段时间以内再次登录,会被拒绝。登录进程将会失败。</p> <p>为了防止任何欺诈登录,在成功登陆之后,你的一次性密码将会立即被删除,</p> <p>如果一次性密码被键盘记录程序或者间谍软件得到,可能会从被感染的机器上收集数据,这样的话,一次性密码绝对是个很好的选择。</p> <p> <b>强烈建议在公共场合登录 Clipperz 时,使用一次性密码。比如公关计算机,网吧,图书馆等</b> </p> ",
143 'oneTimePasswordReadOnlyMessage':"<h6>对不起!</h6> <p>你不能从离线版本管理你的一次性密码短语</p> ", 141 'oneTimePasswordReadOnlyMessage':"<h6>对不起!</h6> <p>你不能从离线版本管理你的一次性密码短语</p> ",
144 'oneTimePasswordLoadingMessage':"<h6>加载数据</h6> <p>请等待 ...</p> ", 142 'oneTimePasswordLoadingMessage':"<h6>加载数据</h6> <p>请等待 ...</p> ",
145 'oneTimePasswordNoPasswordAvailable':"<h6>一次性密码短语没有激活</h6> <p>点击“新建”按钮添加一次性密码短语到你的帐户</p> ", 143 'oneTimePasswordNoPasswordAvailable':"<h6>一次性密码短语没有激活</h6> <p>点击“新建”按钮添加一次性密码短语到你的帐户</p> ",
146 'createNewOTPButtonLabel':"新建", 144 'createNewOTPButtonLabel':"新建",
147 'deleteOTPButtonLabel':"删除", 145 'deleteOTPButtonLabel':"删除",
148 'printOTPButtonLabel':"打印", 146 'printOTPButtonLabel':"打印",
149 'disabledOneTimePassword_warning':"禁用", 147 'disabledOneTimePassword_warning':"禁用",
150 'oneTimePasswordSelectionLink_selectLabel':"选择:", 148 'oneTimePasswordSelectionLink_selectLabel':"选择:",
151 'oneTimePasswordSelectionLink_all':"所有", 149 'oneTimePasswordSelectionLink_all':"所有",
152 'oneTimePasswordSelectionLink_none':"没有", 150 'oneTimePasswordSelectionLink_none':"没有",
153 'oneTimePasswordSelectionLink_used':"被使用", 151 'oneTimePasswordSelectionLink_used':"被使用",
154 'oneTimePasswordSelectionLink_unused':"未使用", 152 'oneTimePasswordSelectionLink_unused':"未使用",
155 'saveOTP_encryptUserDataTitle':"保存一次性密码短语", 153 'saveOTP_encryptUserDataTitle':"保存一次性密码短语",
156 'saveOTP_encryptUserDataText':"处理新的 OTP 证书 ...", 154 'saveOTP_encryptUserDataText':"处理新的 OTP 证书 ...",
157 'saveOTP_encryptOTPDataTitle':"保存一次性密码短语", 155 'saveOTP_encryptOTPDataTitle':"保存一次性密码短语",
158 'saveOTP_encryptOTPDataText':"本地解密认证数据 ...", 156 'saveOTP_encryptOTPDataText':"本地解密认证数据 ...",
159 'saveOTP_sendingDataTitle':"保存一次性密码短语", 157 'saveOTP_sendingDataTitle':"保存一次性密码短语",
160 'saveOTP_sendingDataText':"发送信任数据到服务器 ...", 158 'saveOTP_sendingDataText':"发送信任数据到服务器 ...",
161 'saveOTP_updatingInterfaceTitle':"保存一次性密码短语", 159 'saveOTP_updatingInterfaceTitle':"保存一次性密码短语",
162 'saveOTP_updatingInterfaceText':"更新界面...", 160 'saveOTP_updatingInterfaceText':"更新界面...",
163 'accountPreferencesLabel':"使用偏好", 161 'accountPreferencesLabel':"使用偏好",
164 'accountPreferencesTabTitle':"使用偏好", 162 'accountPreferencesTabTitle':"使用偏好",
165 'accountPreferencesLanguageTitle':"界面语言选择", 163 'accountPreferencesLanguageTitle':"界面语言选择",
166 'accountPreferencesLanguageDescription':"<p>在下拉菜单中选择你的首选语言</p> ", 164 'accountPreferencesLanguageDescription':"<p>在下拉菜单中选择你的首选语言</p> ",
167 'showDonationReminderPanelTitle':"捐赠提示", 165 'showDonationReminderPanelTitle':"捐赠提示",
168 'showDonationReminderPanelDescription':"<p>显示捐赠提示</p> ", 166 'showDonationReminderPanelDescription':"<p>显示捐赠提示</p> ",
169 'saveUserPreferencesFormSubmitLabel':"保存", 167 'saveUserPreferencesFormSubmitLabel':"保存",
170 'cancelUserPreferencesFormSubmitLabel':"取消", 168 'cancelUserPreferencesFormSubmitLabel':"取消",
171 'accountPreferencesSavingPanelTitle_Step1':"保存使用偏好", 169 'accountPreferencesSavingPanelTitle_Step1':"保存使用偏好",
172 'accountPreferencesSavingPanelText_Step1':"本地加密你的使用偏好", 170 'accountPreferencesSavingPanelText_Step1':"本地加密你的使用偏好",
173 'accountPreferencesSavingPanelTitle_Step2':"保存使用偏好", 171 'accountPreferencesSavingPanelTitle_Step2':"保存使用偏好",
174 'accountPreferencesSavingPanelText_Step2':"正在向 Clipperz 传送加密后的使用偏好", 172 'accountPreferencesSavingPanelText_Step2':"正在向 Clipperz 传送加密后的使用偏好",
175 'accountLoginHistoryLabel':"登录历史", 173 'accountLoginHistoryLabel':"登录历史",
176 'loginHistoryTabTitle':"登录历史", 174 'loginHistoryTabTitle':"登录历史",
177 'loginHistoryReadOnlyMessage':"<h6>对不起!</h6> <p>当你使用离线版本时登录历史是无法显示的</p> ", 175 'loginHistoryReadOnlyMessage':"<h6>对不起!</h6> <p>当你使用离线版本时登录历史是无法显示的</p> ",
178 'loginHistoryLoadingMessage':"<h6>加载数据</h6> <p>请等待 ...</p> ", 176 'loginHistoryLoadingMessage':"<h6>加载数据</h6> <p>请等待 ...</p> ",
179 'loginHistoryLoadedMessage':"<h6>您的最近 10 次登陆</h6> <p> </p> ", 177 'loginHistoryLoadedMessage':"<h6>您的最近 10 次登陆</h6> <p> </p> ",
180 'loginHistoryIPLabel':"IP", 178 'loginHistoryIPLabel':"IP",
181 'loginHistoryTimeLabel':"时间", 179 'loginHistoryTimeLabel':"时间",
182 'loginHistoryCurrentSessionText':"当前登录信息", 180 'loginHistoryCurrentSessionText':"当前登录信息",
183 'loginHistoryReloadButtonLabel':"刷新登录历史", 181 'loginHistoryReloadButtonLabel':"刷新登录历史",
184 'deleteAccountTabLabel':"删除你的账户", 182 'deleteAccountTabLabel':"删除你的账户",
185 'deleteAccountTabTitle':"删除你的账户", 183 'deleteAccountTabTitle':"删除你的账户",
186 'deleteAccountFormUsernameLabel':"用户名", 184 'deleteAccountFormUsernameLabel':"用户名",
187 'deleteAccountFormPassphraseLabel':"密码短语", 185 'deleteAccountFormPassphraseLabel':"密码短语",
188 'deleteAccountFormSafetyCheckboxLabel':"我知道我的所有数据将被删除,并且是不可回复的.", 186 'deleteAccountFormSafetyCheckboxLabel':"我知道我的所有数据将被删除,并且是不可回复的.",
189 'deleteAccountFormSubmitLabel':"删除我的账户", 187 'deleteAccountFormSubmitLabel':"删除我的账户",
190 'deleteAccountFormWrongUsernameWarning':"用户名错误", 188 'deleteAccountFormWrongUsernameWarning':"用户名错误",
191 'deleteAccountFormWrongPassphraseWarning':"密码短语错误", 189 'deleteAccountFormWrongPassphraseWarning':"密码短语错误",
192 'deleteAccountFormSafetyCheckWarning':"请阅读并检查下面的选项框", 190 'deleteAccountFormSafetyCheckWarning':"请阅读并检查下面的选项框",
193 'accountPanelDeletingAccountPanelConfirmationTitle':"注意", 191 'accountPanelDeletingAccountPanelConfirmationTitle':"注意",
194 'accountPanelDeleteAccountPanelConfirmationText':"你确认要删除你的帐户", 192 'accountPanelDeleteAccountPanelConfirmationText':"你确认要删除你的帐户",
195 'accountPanelDeleteAccountPanelConfirmButtonLabel':"是", 193 'accountPanelDeleteAccountPanelConfirmButtonLabel':"是",
196 'accountPanelDeleteAccountPanelDenyButtonLabel':"否", 194 'accountPanelDeleteAccountPanelDenyButtonLabel':"否",
197 'offlineCopyTabLabel':"离线拷贝", 195 'offlineCopyTabLabel':"离线拷贝",
198 'offlineCopyTabTitle':"离线拷贝", 196 'offlineCopyTabTitle':"离线拷贝",
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> ", 197 '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> ",
200 'offlineCopyDownloadLinkLabel':"下载", 198 'offlineCopyDownloadLinkLabel':"下载",
201 'offlineCopyDownloadWarning':"<h4> <a href=\"#\" id=\"offlineCopyDownloadWarningLink\">更新你的“离线版本”!</a> </h4> <p>你最近创建或修改了卡片,需要下载新的“离线版本”</p> ", 199 'offlineCopyDownloadWarning':"<h4> <a href=\"#\" id=\"offlineCopyDownloadWarningLink\">更新你的“离线版本”!</a> </h4> <p>你最近创建或修改了卡片,需要下载新的“离线版本”</p> ",
202 'sharingTabLabel':"共享", 200 'sharingTabLabel':"共享",
203 'sharingTabTitle':"共享", 201 'sharingTabTitle':"共享",
204 'sharingTabDescription':"<p>往往一个机密的资料需要另外一个人或者多人共同使用</p> <p>你可以在这里设置一个简单的授权码,以便在离开办公室的时候你的同事可以访问你的邮箱,或者设置一个复杂的,当你去世后子孙可以在这里找到取得银行保险箱的方法。</p> <p>Clipperz 可以安全并且简单的分享你的密码</p> <p> </p> <p> <b>即将发布...</b> </p> ", 202 'sharingTabDescription':"<p>往往一个机密的资料需要另外一个人或者多人共同使用</p> <p>你可以在这里设置一个简单的授权码,以便在离开办公室的时候你的同事可以访问你的邮箱,或者设置一个复杂的,当你去世后子孙可以在这里找到取得银行保险箱的方法。</p> <p>Clipperz 可以安全并且简单的分享你的密码</p> <p> </p> <p> <b>即将发布...</b> </p> ",
205 'importTabLabel':"导入", 203 'importTabLabel':"导入",
206 'importTabTitle':"导入", 204 'importTabTitle':"导入",
207 'importTabDescription':"<p> <b>即将发布 ...</b> </p> ", 205 'importTabDescription':"<p> <b>即将发布 ...</b> </p> ",
208 'printingTabLabel':"导出", 206 'printingTabLabel':"导出",
209 'printingTabTitle':"导出", 207 'printingTabTitle':"导出",
210 'printingTabDescription':"<p> <b>打印你的数据</b> </p> <p>点击下面的链接,将会打开一个新窗口,以打印格式显示你的密码卡片</p> <p>如果你打印下来是为了备份,请考虑使用我们提供的\"离线版本\",这比打印更安全。</p> ", 208 'printingTabDescription':"<p> <b>打印你的数据</b> </p> <p>点击下面的链接,将会打开一个新窗口,以打印格式显示你的密码卡片</p> <p>如果你打印下来是为了备份,请考虑使用我们提供的\"离线版本\",这比打印更安全。</p> ",
211 'printingLinkLabel':"打印版本", 209 'printingLinkLabel':"打印版本",
212 'contactsTabLabel':"联系", 210 'contactsTabLabel':"联系",
213 'contactsTabTitle':"联系", 211 'contactsTabTitle':"联系",
214 'passwordGeneratorTabLabel':"随机密码生成器", 212 'passwordGeneratorTabLabel':"随机密码生成器",
215 'passwordGeneratorTabTitle':"随机密码生成器", 213 'passwordGeneratorTabTitle':"随机密码生成器",
216 'passwordGeneratorTabButtonLabel':"生成随机密码", 214 'passwordGeneratorTabButtonLabel':"生成随机密码",
217 'bookmarkletTabLabel':"书签按钮", 215 'bookmarkletTabLabel':"书签按钮",
218 'bookmarkletTabTitle':"书签按钮", 216 'bookmarkletTabTitle':"书签按钮",
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> ", 217 '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> ",
220 'bookmarkletTabBookmarkletTitle':"添加到 Clipperz", 218 'bookmarkletTabBookmarkletTitle':"添加到 Clipperz",
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> ", 219 '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> ",
222 'mainPanelDirectLoginBlockLabel':"直接登录", 220 'mainPanelDirectLoginBlockLabel':"直接登录",
223 'directLinkReferenceShowButtonLabel':"显示", 221 'directLinkReferenceShowButtonLabel':"显示",
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> ", 222 '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> ",
225 'mainPanelRecordsBlockLabel':"密码卡片", 223 'mainPanelRecordsBlockLabel':"密码卡片",
226 'mainPanelAddRecordButtonLabel':"添加新密码卡片", 224 'mainPanelAddRecordButtonLabel':"添加新密码卡片",
227 'mainPanelRemoveRecordButtonLabel':"删除密码卡片", 225 'mainPanelRemoveRecordButtonLabel':"删除密码卡片",
228 'mainPanelRecordFilterBlockAllLabel':"所有", 226 'mainPanelRecordFilterBlockAllLabel':"所有",
229 'mainPanelRecordFilterBlockTagsLabel':"标签", 227 'mainPanelRecordFilterBlockTagsLabel':"标签",
230 'mainPanelRecordFilterBlockSearchLabel':"搜索", 228 'mainPanelRecordFilterBlockSearchLabel':"搜索",
231 'recordDetailNoRecordAtAllTitle':"欢迎来到 Clipperz!", 229 'recordDetailNoRecordAtAllTitle':"欢迎来到 Clipperz!",
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> ", 230 '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> ",
233 'newRecordWizardTitleBox':"<h5>请选择一个模板</h5> <p>密码卡片是简单灵活的方式,在这里你可以保存你的密码和其他机密资料.</p> <p>首先选择下面的一个模板。在添加或者删除以后,可以随时定制你的密码卡片.</p> ", 231 'newRecordWizardTitleBox':"<h5>请选择一个模板</h5> <p>密码卡片是简单灵活的方式,在这里你可以保存你的密码和其他机密资料.</p> <p>首先选择下面的一个模板。在添加或者删除以后,可以随时定制你的密码卡片.</p> ",
234 'newRecordWizardBookmarkletConfigurationTitle':"直接登陆", 232 'newRecordWizardBookmarkletConfigurationTitle':"直接登陆",
235 'newRecordWizardBookmarkletConfigurationDescription':"<p>将从 Clipperz 书签按钮得到的代码粘贴到下面的文本框中</p> <p>一个直接登陆你的网络账户的新密码卡片将要被创建完成</p> ", 233 'newRecordWizardBookmarkletConfigurationDescription':"<p>将从 Clipperz 书签按钮得到的代码粘贴到下面的文本框中</p> <p>一个直接登陆你的网络账户的新密码卡片将要被创建完成</p> ",
236 'newRecordWizardCreateButtonLabel':"创建", 234 'newRecordWizardCreateButtonLabel':"创建",
237 'newRecordWizardCancelButtonLabel':"取消", 235 'newRecordWizardCancelButtonLabel':"取消",
238 'donateSplashPanelTitle':"今天就捐赠支持 Clipperz!", 236 'donateSplashPanelTitle':"今天就捐赠支持 Clipperz!",
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> ", 237 '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> ",
240 'donateCloseButtonLabel':"不必了", 238 'donateCloseButtonLabel':"不必了",
241 'donateDonateButtonLabel':"是", 239 'donateDonateButtonLabel':"是",
242 'recordTemplates':{ 240 'recordTemplates':{
243 'WebAccount':{ 241 'WebAccount':{
244 'title':"网站密码", 242 'title':"网站密码",
245 'description':"<p>为您的网上服务提供简单的密码储存,自动登录服务.</p> ", 243 'description':"<p>为您的网上服务提供简单的密码储存,自动登录服务.</p> ",
246 'fields':{ 244 'fields':{
247 'URL':"网址", 245 'URL':"网址",
248 'TXT':"用户名或者电子邮件地址", 246 'TXT':"用户名或者电子邮件地址",
249 'PWD':"密码" 247 'PWD':"密码"
250 } 248 }
251 }, 249 },
252 'BankAccount':{ 250 'BankAccount':{
253 'title':"银行帐户", 251 'title':"银行帐户",
254 'description':"<p>安全储存你的银行账号和网上银行证书.</p> ", 252 'description':"<p>安全储存你的银行账号和网上银行证书.</p> ",
255 'fields':{ 253 'fields':{
256 'TXT':"银行", 254 'TXT':"银行",
257 'TXT':"帐号", 255 'TXT':"帐号",
258 'URL':"银行网站", 256 'URL':"银行网站",
259 'TXT':"在线银行 ID", 257 'TXT':"在线银行 ID",
260 'PWD':"在线银行密码" 258 'PWD':"在线银行密码"
261 } 259 }
262 }, 260 },
263 'CreditCard':{ 261 'CreditCard':{
264 'title':"信用卡", 262 'title':"信用卡",
265 'description':"<p>信用卡号码,有效日期,CVV2和PIN 都由 Clipperz 管理</p> ", 263 'description':"<p>信用卡号码,有效日期,CVV2和PIN 都由 Clipperz 管理</p> ",
266 'fields':{ 264 'fields':{
267 'TXT':"类型(VISA, AmEx, ...)", 265 'TXT':"类型(VISA, AmEx, ...)",
268 'TXT':"号码", 266 'TXT':"号码",
269 'TXT':"持卡人姓名", 267 'TXT':"持卡人姓名",
270 'TXT':"有效日期", 268 'TXT':"有效日期",
271 'TXT':"CVV2", 269 'TXT':"CVV2",
272 'PWD':"PIN", 270 'PWD':"PIN",
273 'URL':"信用卡网站", 271 'URL':"信用卡网站",
274 'TXT':"用户名", 272 'TXT':"用户名",
275 'PWD':"密码" 273 'PWD':"密码"
276 } 274 }
277 }, 275 },
278 'AddressBookEntry':{ 276 'AddressBookEntry':{
279 'title':"通讯录条目", 277 'title':"通讯录条目",
280 'description':"<p>Clipperz 同样可以为你的私人通讯录服务. 使用这个模板,轻易添加新的条目.</p> ", 278 'description':"<p>Clipperz 同样可以为你的私人通讯录服务. 使用这个模板,轻易添加新的条目.</p> ",
281 'fields':{ 279 'fields':{
282 'TXT':"姓名", 280 'TXT':"姓名",
283 'TXT':"电子邮件", 281 'TXT':"电子邮件",
284 'TXT':"电话", 282 'TXT':"电话",
285 'TXT':"手机", 283 'TXT':"手机",
286 'ADDR':"地址" 284 'ADDR':"地址"
287 } 285 }
288 }, 286 },
289 'Custom':{ 287 'Custom':{
290 'title':"定制密码卡片", 288 'title':"定制密码卡片",
291 'description':"<p>无论你需要保护哪种类型的机密数据,创建定制密码卡片便可满足你的需求</p> ", 289 'description':"<p>无论你需要保护哪种类型的机密数据,创建定制密码卡片便可满足你的需求</p> ",
292 'fields':{ 290 'fields':{
293 'TXT':"标签 1", 291 'TXT':"标签 1",
294 'TXT':"标签 2", 292 'TXT':"标签 2",
295 'TXT':"标签 3" 293 'TXT':"标签 3"
296 } 294 }
297 } 295 }
298}, 296},
299 'recordFieldTypologies':{ 297 'recordFieldTypologies':{
300 'TXT':{ 298 'TXT':{
301 'description':"simple text field", 299 'description':"simple text field",
302 'shortDescription':"文字" 300 'shortDescription':"文字"
303 }, 301 },
304 'PWD':{ 302 'PWD':{
305 'description':"simple text field, with default status set to hidden", 303 'description':"simple text field, with default status set to hidden",
306 'shortDescription':"密码" 304 'shortDescription':"密码"
307 }, 305 },
308 'URL':{ 306 'URL':{
309 'description':"simple text field in edit mode, that became an active url in view mode", 307 'description':"simple text field in edit mode, that became an active url in view mode",
310 'shortDescription':"网址" 308 'shortDescription':"网址"
311 }, 309 },
312 'DATE':{ 310 'DATE':{
313 'description':"a value set with a calendar helper", 311 'description':"a value set with a calendar helper",
314 'shortDescription':"数据" 312 'shortDescription':"数据"
315 }, 313 },
316 'ADDR':{ 314 'ADDR':{
317 'description':"just like the URL, but the active link points to Google Maps (or similar service) passing the address value as argument", 315 'description':"just like the URL, but the active link points to Google Maps (or similar service) passing the address value as argument",
318 'shortDescription':"地址" 316 'shortDescription':"地址"
319 }, 317 },
320 'CHECK':{ 318 'CHECK':{
321 'description':"check description", 319 'description':"check description",
322 'shortDescription':"check" 320 'shortDescription':"check"
323 }, 321 },
324 'RADIO':{ 322 'RADIO':{
325 'description':"radio description", 323 'description':"radio description",
326 'shortDescription':"radio" 324 'shortDescription':"radio"
327 }, 325 },
328 'SELECT':{ 326 'SELECT':{
329 'description':"select description", 327 'description':"select description",
330 'shortDescription':"select" 328 'shortDescription':"select"
331 } 329 }
332}, 330},
333 'newRecordPanelGeneralExceptionTitle':"错误", 331 'newRecordPanelGeneralExceptionTitle':"错误",
334 'newRecordPanelGeneralExceptionMessage':"配置文本不正确,请从书签中确认你的文本并且再试一次", 332 'newRecordPanelGeneralExceptionMessage':"配置文本不正确,请从书签中确认你的文本并且再试一次",
335 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"错误", 333 'newRecordPanelWrongBookmarkletVersionExceptionTitle':"错误",
336 'newRecordPanelWrongBookmarkletVersionExceptionMessage':"配置文本已经产生了一个旧版本书签,请更新你的书签然后再试试。", 334 'newRecordPanelWrongBookmarkletVersionExceptionMessage':"配置文本已经产生了一个旧版本书签,请更新你的书签然后再试试。",
337 'newRecordPanelExceptionPanelCloseButtonLabel':"取消", 335 'newRecordPanelExceptionPanelCloseButtonLabel':"取消",
338 'mainPanelDeletingRecordPanelConfirmationTitle':"删除所选密码卡片", 336 'mainPanelDeletingRecordPanelConfirmationTitle':"删除所选密码卡片",
339 'mainPanelDeleteRecordPanelConfirmationText':"确认要删除选定的密码卡片?", 337 'mainPanelDeleteRecordPanelConfirmationText':"确认要删除选定的密码卡片?",
340 'mainPanelDeleteRecordPanelConfirmButtonLabel':"是", 338 'mainPanelDeleteRecordPanelConfirmButtonLabel':"是",
341 'mainPanelDeleteRecordPanelDenyButtonLabel':"否", 339 'mainPanelDeleteRecordPanelDenyButtonLabel':"否",
342 'mainPanelDeletingRecordPanelInitialTitle':"删除选定的密码卡片", 340 'mainPanelDeletingRecordPanelInitialTitle':"删除选定的密码卡片",
343 'mainPanelDeletingRecordPanelCompletedText':"完成", 341 'mainPanelDeletingRecordPanelCompletedText':"完成",
344 'deleteRecordPanelCollectRecordDataMessageTitle':"删除密码卡片", 342 'deleteRecordPanelCollectRecordDataMessageTitle':"删除密码卡片",
345 'deleteRecordPanelCollectRecordDataMessageText':"更新密码卡片列表", 343 'deleteRecordPanelCollectRecordDataMessageText':"更新密码卡片列表",
346 'deleteRecordPanelEncryptUserDataMessageTitle':"删除密码卡片", 344 'deleteRecordPanelEncryptUserDataMessageTitle':"删除密码卡片",
347 'deleteRecordPanelEncryptUserDataMessageText':"加密卡报头本地解密", 345 'deleteRecordPanelEncryptUserDataMessageText':"加密卡报头本地解密",
348 'deleteRecordPanelSendingDataToTheServerMessageTitle':"删除密码卡片", 346 'deleteRecordPanelSendingDataToTheServerMessageTitle':"删除密码卡片",
349 'deleteRecordPanelSendingDataToTheServerMessageText':"从 Clipperz 更新加密卡报头", 347 'deleteRecordPanelSendingDataToTheServerMessageText':"从 Clipperz 更新加密卡报头",
350 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"删除密码卡片", 348 'deleteRecordPanelUpdatingTheInterfaceMessageTitle':"删除密码卡片",
351 'deleteRecordPanelUpdatingTheInterfaceMessageText':"更新界面", 349 'deleteRecordPanelUpdatingTheInterfaceMessageText':"更新界面",
352 'recordDetailNoRecordSelectedTitle':"未选择密码卡片", 350 'recordDetailNoRecordSelectedTitle':"未选择密码卡片",
353 'recordDetailNoRecordSelectedDescription':"<p>从左边的列表中选择一个密码卡片</p> ", 351 'recordDetailNoRecordSelectedDescription':"<p>从左边的列表中选择一个密码卡片</p> ",
354 'recordDetailLoadingRecordMessage':"正在从 Clipperz 下载加密卡片", 352 'recordDetailLoadingRecordMessage':"正在从 Clipperz 下载加密卡片",
355 'recordDetailDecryptingRecordMessage':"密码卡片数据本地解密", 353 'recordDetailDecryptingRecordMessage':"密码卡片数据本地解密",
356 'recordDetailLoadingRecordVersionMessage':"下载最新版本的密码卡片", 354 'recordDetailLoadingRecordVersionMessage':"下载最新版本的密码卡片",
357 'recordDetailDecryptingRecordVersionMessage':"本地解密最新版本密码卡片", 355 'recordDetailDecryptingRecordVersionMessage':"本地解密最新版本密码卡片",
358 'recordDetailLoadingErrorMessageTitle':"密码卡片下载错误", 356 'recordDetailLoadingErrorMessageTitle':"密码卡片下载错误",
359 'recordDetailNotesLabel':"注释", 357 'recordDetailNotesLabel':"注释",
360 'recordDetailLabelFieldColumnLabel':"标签区域", 358 'recordDetailLabelFieldColumnLabel':"标签区域",
361 'recordDetailDataFieldColumnLabel':"数据区域", 359 'recordDetailDataFieldColumnLabel':"数据区域",
362 'recordDetailTypeFieldColumnLabel':"类型", 360 'recordDetailTypeFieldColumnLabel':"类型",
363 'recordDetailSavingChangesMessagePanelInitialTitle':"保存密码卡片", 361 'recordDetailSavingChangesMessagePanelInitialTitle':"保存密码卡片",
364 'recordDetailAddFieldButtonLabel':"添加新区域", 362 'recordDetailAddFieldButtonLabel':"添加新区域",
365 'recordDetailPasswordFieldHelpLabel':"点击星星复制密码到剪贴板,然后用 Ctrl+V 使用", 363 'recordDetailPasswordFieldHelpLabel':"点击星星复制密码到剪贴板,然后用 Ctrl+V 使用",
366 'recordDetailPasswordFieldScrambleLabel':"隐藏密码", 364 'recordDetailPasswordFieldScrambleLabel':"隐藏密码",
367 'recordDetailPasswordFieldUnscrambleLabel':"显示密码", 365 'recordDetailPasswordFieldUnscrambleLabel':"显示密码",
368 'recordDetailDirectLoginBlockTitle':"直接登录", 366 'recordDetailDirectLoginBlockTitle':"直接登录",
369 'recordDetailNewDirectLoginDescription':"<p>直接登录配置</p> ", 367 'recordDetailNewDirectLoginDescription':"<p>直接登录配置</p> ",
370 'recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription':"<p>这个密码卡片包含在线服务证书吗?</p> <p>仅仅单击就可以从 Clipperz 使用书签配置 “直接登录”</p> ", 368 'recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription':"<p>这个密码卡片包含在线服务证书吗?</p> <p>仅仅单击就可以从 Clipperz 使用书签配置 “直接登录”</p> ",
371 'recordDetailAddNewDirectLoginButtonLabel':"添加新的直接登录", 369 'recordDetailAddNewDirectLoginButtonLabel':"添加新的直接登录",
372 'recordDetailEditButtonLabel':"编辑", 370 'recordDetailEditButtonLabel':"编辑",
373 'recordDetailSaveButtonLabel':"保存", 371 'recordDetailSaveButtonLabel':"保存",
374 'recordDetailCancelButtonLabel':"取消", 372 'recordDetailCancelButtonLabel':"取消",
375 'newRecordTitleLabel':"_新密码卡片_", 373 'newRecordTitleLabel':"_新密码卡片_",
376 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"保存密码卡片", 374 'recordSaveChangesPanelCollectRecordInfoMessageTitle':"保存密码卡片",
377 'recordSaveChangesPanelCollectRecordInfoMessageText':"更新密码卡片报头", 375 'recordSaveChangesPanelCollectRecordInfoMessageText':"更新密码卡片报头",
378 'recordSaveChangesPanelEncryptUserDataMessageTitle':"保存密码卡片", 376 'recordSaveChangesPanelEncryptUserDataMessageTitle':"保存密码卡片",
379 'recordSaveChangesPanelEncryptUserDataMessageText':"本地加密卡片报头", 377 'recordSaveChangesPanelEncryptUserDataMessageText':"本地加密卡片报头",
380 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"保存密码卡片", 378 'recordSaveChangesPanelEncryptRecordDataMessageTitle':"保存密码卡片",
381 'recordSaveChangesPanelEncryptRecordDataMessageText':"本地加密卡片数据", 379 'recordSaveChangesPanelEncryptRecordDataMessageText':"本地加密卡片数据",
382 'recordSaveChangesPanelEncryptRecordVersionDataMessageTitle':"保存密码卡片", 380 'recordSaveChangesPanelEncryptRecordVersionDataMessageTitle':"保存密码卡片",
383 'recordSaveChangesPanelEncryptRecordVersionDataMessageText':"本地加密密码卡片版本数据", 381 'recordSaveChangesPanelEncryptRecordVersionDataMessageText':"本地加密密码卡片版本数据",
384 'recordSaveChangesPanelSendingDataToTheServerMessageTitle':"保存密码卡片", 382 'recordSaveChangesPanelSendingDataToTheServerMessageTitle':"保存密码卡片",
385 'recordSaveChangesPanelSendingDataToTheServerMessageText':"从 Clipperz 更新加密卡报头", 383 'recordSaveChangesPanelSendingDataToTheServerMessageText':"从 Clipperz 更新加密卡报头",
386 'recordSaveChangesPanelUpdatingTheInterfaceMessageTitle':"保存密码卡片", 384 'recordSaveChangesPanelUpdatingTheInterfaceMessageTitle':"保存密码卡片",
387 'recordSaveChangesPanelUpdatingTheInterfaceMessageText':"更新界面", 385 'recordSaveChangesPanelUpdatingTheInterfaceMessageText':"更新界面",
388 'passwordGeneratorPanelTitle':"密码生成器", 386 'passwordGeneratorPanelTitle':"密码生成器",
389 'passwordGeneratorPanelOkLabel':"确认", 387 'passwordGeneratorPanelOkLabel':"确认",
390 'passwordGeneratorPanelCancelLabel':"取消", 388 'passwordGeneratorPanelCancelLabel':"取消",
391 'passwordGeneratorLengthLabel':"长度:", 389 'passwordGeneratorLengthLabel':"长度:",
392 //'DWRUtilLoadingMessage':"加载数据。。。", 390 //'DWRUtilLoadingMessage':"加载数据。。。",
393 'comingSoon':"即将到来。。。", 391 'comingSoon':"即将到来。。。",
394 'panelCollectingEntryopyMessageText':"收集平均信息", 392 'panelCollectingEntryopyMessageText':"收集平均信息",
395 'directLoginConfigurationCheckBoxFieldSelectedValue':"是", 393 'directLoginConfigurationCheckBoxFieldSelectedValue':"是",
396 'directLoginConfigurationCheckBoxFieldNotSelectedValue':"否", 394 'directLoginConfigurationCheckBoxFieldNotSelectedValue':"否",
397 'WELCOME_BACK':"欢迎回来!", 395 'WELCOME_BACK':"欢迎回来!",
398 'currentConnectionText':"你的连接 IP 地址是&nbsp;__ip__; 来自 __country__, 在 __browser__ 上使用 __operatingSystem__。", 396 'currentConnectionText':"你的连接 IP 地址是&nbsp;__ip__; 来自 __country__, 在 __browser__ 上使用 __operatingSystem__。",
399 'latestConnectionText':"你上次的登录 IP 是&nbsp;__ip__ 在 __elapsedTimeDescription__ (__time__); 来自 __country__, 在 __browser__ 上使用 __operatingSystem__。", 397 'latestConnectionText':"你上次的登录 IP 是&nbsp;__ip__ 在 __elapsedTimeDescription__ (__time__); 来自 __country__, 在 __browser__ 上使用 __operatingSystem__。",
400 'fullLoginHistoryLinkLabel':"显示所有登录历史", 398 'fullLoginHistoryLinkLabel':"显示所有登录历史",
401 'elapsedTimeDescriptions':{ 399 'elapsedTimeDescriptions':{
402 'MORE_THAN_A_MONTH_AGO':"一个月之前", 400 'MORE_THAN_A_MONTH_AGO':"一个月之前",
403 'MORE_THAN_A_WEEK_AGO':"一周之前", 401 'MORE_THAN_A_WEEK_AGO':"一周之前",
404 'MORE_THAN_*_WEEKS_AGO':"__elapsed__ 周以前", 402 'MORE_THAN_*_WEEKS_AGO':"__elapsed__ 周以前",
405 'YESTERDAY':"昨天", 403 'YESTERDAY':"昨天",
406 '*_DAYS_AGO':"__elapsed__ 天之前", 404 '*_DAYS_AGO':"__elapsed__ 天之前",
diff --git a/frontend/beta/js/Clipperz/PM/Toll.js b/frontend/beta/js/Clipperz/PM/Toll.js
index 3a9b48f..027d8a3 100644
--- a/frontend/beta/js/Clipperz/PM/Toll.js
+++ b/frontend/beta/js/Clipperz/PM/Toll.js
@@ -1,190 +1,188 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } 25if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
28 26
29//============================================================================= 27//=============================================================================
30 28
31Clipperz.PM.Toll = function(args) { 29Clipperz.PM.Toll = function(args) {
32 this._requestType = args.requestType; 30 this._requestType = args.requestType;
33 this._targetValue = args.targetValue; 31 this._targetValue = args.targetValue;
34 this._cost = args.cost; 32 this._cost = args.cost;
35 this._toll = null; 33 this._toll = null;
36 34
37 return this; 35 return this;
38} 36}
39 37
40Clipperz.PM.Toll.prototype = MochiKit.Base.update(null, { 38Clipperz.PM.Toll.prototype = MochiKit.Base.update(null, {
41 39
42 'toString': function() { 40 'toString': function() {
43 return "Clipperz.PM.Toll (" + this.requestType() + ": " + this.cost() + " - " + ((this.toll() == null)? 'UNPAID' : 'PAID') + ")"; 41 return "Clipperz.PM.Toll (" + this.requestType() + ": " + this.cost() + " - " + ((this.toll() == null)? 'UNPAID' : 'PAID') + ")";
44 }, 42 },
45 43
46 //------------------------------------------------------------------------- 44 //-------------------------------------------------------------------------
47 45
48 'requestType': function() { 46 'requestType': function() {
49 return this._requestType; 47 return this._requestType;
50 }, 48 },
51 49
52 //------------------------------------------------------------------------- 50 //-------------------------------------------------------------------------
53 51
54 'targetValue': function() { 52 'targetValue': function() {
55 return this._targetValue; 53 return this._targetValue;
56 }, 54 },
57 55
58 //------------------------------------------------------------------------- 56 //-------------------------------------------------------------------------
59 57
60 'cost': function() { 58 'cost': function() {
61 return this._cost; 59 return this._cost;
62 }, 60 },
63 61
64 //------------------------------------------------------------------------- 62 //-------------------------------------------------------------------------
65 63
66 'toll': function() { 64 'toll': function() {
67 return this._toll; 65 return this._toll;
68 }, 66 },
69 67
70 //========================================================================= 68 //=========================================================================
71 69
72 'prefixMatchingBits': function(aValue1, aValue2) { 70 'prefixMatchingBits': function(aValue1, aValue2) {
73 varresult; 71 varresult;
74 var i,c; 72 var i,c;
75 73
76 result = 0; 74 result = 0;
77 75
78 c = Math.min(aValue1.length(), aValue2.length()); 76 c = Math.min(aValue1.length(), aValue2.length());
79 i = 0; 77 i = 0;
80 while (i<c && (aValue1.byteAtIndex(i) == aValue2.byteAtIndex(i))) { 78 while (i<c && (aValue1.byteAtIndex(i) == aValue2.byteAtIndex(i))) {
81 result += 8; 79 result += 8;
82 i++; 80 i++;
83 } 81 }
84 82
85 if (i<c) { 83 if (i<c) {
86 varxorValue; 84 varxorValue;
87 85
88 xorValue = (aValue1.byteAtIndex(i) ^ aValue2.byteAtIndex(i)); 86 xorValue = (aValue1.byteAtIndex(i) ^ aValue2.byteAtIndex(i));
89 87
90 if (xorValue >= 128) { 88 if (xorValue >= 128) {
91 result += 0; 89 result += 0;
92 } else if (xorValue >= 64) { 90 } else if (xorValue >= 64) {
93 result += 1; 91 result += 1;
94 } else if (xorValue >= 32) { 92 } else if (xorValue >= 32) {
95 result += 2; 93 result += 2;
96 } else if (xorValue >= 16) { 94 } else if (xorValue >= 16) {
97 result += 3; 95 result += 3;
98 } else if (xorValue >= 8) { 96 } else if (xorValue >= 8) {
99 result += 4; 97 result += 4;
100 } else if (xorValue >= 4) { 98 } else if (xorValue >= 4) {
101 result += 5; 99 result += 5;
102 } else if (xorValue >= 2) { 100 } else if (xorValue >= 2) {
103 result += 6; 101 result += 6;
104 } else if (xorValue >= 1) { 102 } else if (xorValue >= 1) {
105 result += 7; 103 result += 7;
106 } 104 }
107 } 105 }
108 106
109 return result; 107 return result;
110 }, 108 },
111 109
112 //========================================================================= 110 //=========================================================================
113 111
114 'pay': function() { 112 'pay': function() {
115 varresult; 113 varresult;
116 vartargetData; 114 vartargetData;
117 vartargetMatchSize; 115 vartargetMatchSize;
118 var prefixMatchingBits; 116 var prefixMatchingBits;
119 varpayment; 117 varpayment;
120 var i; 118 var i;
121 119
122//MochiKit.Logging.logDebug(">>> Toll.pay"); 120//MochiKit.Logging.logDebug(">>> Toll.pay");
123 if (this.toll() == null) { 121 if (this.toll() == null) {
124 i = 0; 122 i = 0;
125//MochiKit.Logging.logDebug("--- Proxy.payToll - 1"); 123//MochiKit.Logging.logDebug("--- Proxy.payToll - 1");
126 targetData = new Clipperz.ByteArray("0x" + this.targetValue()); 124 targetData = new Clipperz.ByteArray("0x" + this.targetValue());
127//MochiKit.Logging.logDebug("--- Proxy.payToll - 2"); 125//MochiKit.Logging.logDebug("--- Proxy.payToll - 2");
128 targetMatchSize = this.cost(); 126 targetMatchSize = this.cost();
129//MochiKit.Logging.logDebug("--- Proxy.payToll - 3"); 127//MochiKit.Logging.logDebug("--- Proxy.payToll - 3");
130 128
131 payment = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32); 129 payment = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32);
132//MochiKit.Logging.logDebug("--- Proxy.payToll - 4"); 130//MochiKit.Logging.logDebug("--- Proxy.payToll - 4");
133 131
134 do { 132 do {
135 varpaymentData; 133 varpaymentData;
136 134
137//MochiKit.Logging.logDebug("--- Proxy.payToll - 5"); 135//MochiKit.Logging.logDebug("--- Proxy.payToll - 5");
138 //payment = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32); 136 //payment = Clipperz.Crypto.PRNG.defaultRandomGenerator().getRandomBytes(32);
139 payment.increment(); 137 payment.increment();
140//MochiKit.Logging.logDebug("--- Proxy.payToll - 6"); 138//MochiKit.Logging.logDebug("--- Proxy.payToll - 6");
141 paymentData = Clipperz.Crypto.SHA.sha256(payment); 139 paymentData = Clipperz.Crypto.SHA.sha256(payment);
142//MochiKit.Logging.logDebug("--- Proxy.payToll - 7"); 140//MochiKit.Logging.logDebug("--- Proxy.payToll - 7");
143 prefixMatchingBits = this.prefixMatchingBits(targetData, paymentData); 141 prefixMatchingBits = this.prefixMatchingBits(targetData, paymentData);
144//MochiKit.Logging.logDebug("--- Proxy.payToll - 8"); 142//MochiKit.Logging.logDebug("--- Proxy.payToll - 8");
145 i++; 143 i++;
146//MochiKit.Logging.logDebug("--- Proxy.payToll - 9"); 144//MochiKit.Logging.logDebug("--- Proxy.payToll - 9");
147 } while (prefixMatchingBits < targetMatchSize); 145 } while (prefixMatchingBits < targetMatchSize);
148//MochiKit.Logging.logDebug("--- Proxy.payToll - 10"); 146//MochiKit.Logging.logDebug("--- Proxy.payToll - 10");
149 147
150 this._toll = payment.toHexString().substring(2) 148 this._toll = payment.toHexString().substring(2)
151 } 149 }
152//MochiKit.Logging.logDebug("<<< Toll.pay"); 150//MochiKit.Logging.logDebug("<<< Toll.pay");
153 151
154 return this; 152 return this;
155 }, 153 },
156 154
157 //------------------------------------------------------------------------- 155 //-------------------------------------------------------------------------
158 156
159 'deferredPay': function() { 157 'deferredPay': function() {
160 vardeferredResult; 158 vardeferredResult;
161 vartoll; 159 vartoll;
162 160
163//MochiKit.Logging.logDebug(">>> Toll.deferredPay"); 161//MochiKit.Logging.logDebug(">>> Toll.deferredPay");
164 toll = this; 162 toll = this;
165 deferredResult = new MochiKit.Async.Deferred(); 163 deferredResult = new MochiKit.Async.Deferred();
166//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("y.1 - Proxy.deferredPayToll - 1: " + res); return res;}); 164//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("y.1 - Proxy.deferredPayToll - 1: " + res); return res;});
167 deferredResult.addCallback(MochiKit.Base.method(toll, 'pay')); 165 deferredResult.addCallback(MochiKit.Base.method(toll, 'pay'));
168//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("y.2 - Proxy.deferredPayToll - 2: " + res); return res;}); 166//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("y.2 - Proxy.deferredPayToll - 2: " + res); return res;});
169 deferredResult.addCallback(function(aToll) { 167 deferredResult.addCallback(function(aToll) {
170 var result; 168 var result;
171 169
172 result = { 170 result = {
173 targetValue:aToll.targetValue(), 171 targetValue:aToll.targetValue(),
174 toll:aToll.toll() 172 toll:aToll.toll()
175 }; 173 };
176 174
177 return result; 175 return result;
178 }); 176 });
179//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("y.3 - Proxy.deferredPayToll - 3: " + res); return res;}); 177//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("y.3 - Proxy.deferredPayToll - 3: " + res); return res;});
180 deferredResult.callback(); 178 deferredResult.callback();
181//MochiKit.Logging.logDebug("<<< Toll.deferredPay"); 179//MochiKit.Logging.logDebug("<<< Toll.deferredPay");
182 180
183 return deferredResult; 181 return deferredResult;
184 }, 182 },
185 183
186 //========================================================================= 184 //=========================================================================
187 __syntaxFix__: "syntax fix" 185 __syntaxFix__: "syntax fix"
188 186
189}); 187});
190 188
diff --git a/frontend/beta/js/Clipperz/Profile.js b/frontend/beta/js/Clipperz/Profile.js
index fb12417..98c1e53 100644
--- a/frontend/beta/js/Clipperz/Profile.js
+++ b/frontend/beta/js/Clipperz/Profile.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26addEvent(window, "load", sortables_init); 24addEvent(window, "load", sortables_init);
27 25
28var SORT_COLUMN_INDEX; 26var SORT_COLUMN_INDEX;
29 27
30function sortables_init() { 28function sortables_init() {
31 // Find all tables with class sortable and make them sortable 29 // Find all tables with class sortable and make them sortable
32 if (!document.getElementsByTagName) return; 30 if (!document.getElementsByTagName) return;
33 tbls = document.getElementsByTagName("table"); 31 tbls = document.getElementsByTagName("table");
34 for (ti=0;ti<tbls.length;ti++) { 32 for (ti=0;ti<tbls.length;ti++) {
35 thisTbl = tbls[ti]; 33 thisTbl = tbls[ti];
36 if (((' '+thisTbl.className+' ').indexOf("sortable") != -1) && (thisTbl.id)) { 34 if (((' '+thisTbl.className+' ').indexOf("sortable") != -1) && (thisTbl.id)) {
37 //initTable(thisTbl.id); 35 //initTable(thisTbl.id);
38 ts_makeSortable(thisTbl); 36 ts_makeSortable(thisTbl);
39 } 37 }
40 } 38 }
41} 39}
42 40
43function ts_makeSortable(table) { 41function ts_makeSortable(table) {
44 if (table.rows && table.rows.length > 0) { 42 if (table.rows && table.rows.length > 0) {
45 var firstRow = table.rows[0]; 43 var firstRow = table.rows[0];
46 } 44 }
47 if (!firstRow) return; 45 if (!firstRow) return;
48 46
49 // We have a first row: assume it's the header, and make its contents clickable links 47 // We have a first row: assume it's the header, and make its contents clickable links
50 for (var i=0;i<firstRow.cells.length;i++) { 48 for (var i=0;i<firstRow.cells.length;i++) {
51 var cell = firstRow.cells[i]; 49 var cell = firstRow.cells[i];
52 var txt = ts_getInnerText(cell); 50 var txt = ts_getInnerText(cell);
53 cell.innerHTML = '<a href="#" class="sortheader" '+ 51 cell.innerHTML = '<a href="#" class="sortheader" '+
54 'onclick="ts_resortTable(this, '+i+');return false;">' + 52 'onclick="ts_resortTable(this, '+i+');return false;">' +
55 txt+'<span class="sortarrow">&nbsp;&nbsp;&nbsp;</span></a>'; 53 txt+'<span class="sortarrow">&nbsp;&nbsp;&nbsp;</span></a>';
56 } 54 }
57} 55}
58 56
59function ts_getInnerText(el) { 57function ts_getInnerText(el) {
60 if (typeof el == "string") return el; 58 if (typeof el == "string") return el;
61 if (typeof el == "undefined") { return el }; 59 if (typeof el == "undefined") { return el };
62 if (el.innerText) return el.innerText;//Not needed but it is faster 60 if (el.innerText) return el.innerText;//Not needed but it is faster
63 var str = ""; 61 var str = "";
64 62
65 var cs = el.childNodes; 63 var cs = el.childNodes;
66 var l = cs.length; 64 var l = cs.length;
67 for (var i = 0; i < l; i++) { 65 for (var i = 0; i < l; i++) {
68 switch (cs[i].nodeType) { 66 switch (cs[i].nodeType) {
69 case 1: //ELEMENT_NODE 67 case 1: //ELEMENT_NODE
70 str += ts_getInnerText(cs[i]); 68 str += ts_getInnerText(cs[i]);
71 break; 69 break;
72 case 3://TEXT_NODE 70 case 3://TEXT_NODE
73 str += cs[i].nodeValue; 71 str += cs[i].nodeValue;
74 break; 72 break;
75 } 73 }
76 } 74 }
77 return str; 75 return str;
78} 76}
79 77
80function ts_resortTable(lnk,clid) { 78function ts_resortTable(lnk,clid) {
81 // get the span 79 // get the span
82 var span; 80 var span;
83 for (var ci=0;ci<lnk.childNodes.length;ci++) { 81 for (var ci=0;ci<lnk.childNodes.length;ci++) {
84 if (lnk.childNodes[ci].tagName && lnk.childNodes[ci].tagName.toLowerCase() == 'span') span = lnk.childNodes[ci]; 82 if (lnk.childNodes[ci].tagName && lnk.childNodes[ci].tagName.toLowerCase() == 'span') span = lnk.childNodes[ci];
85 } 83 }
86 var spantext = ts_getInnerText(span); 84 var spantext = ts_getInnerText(span);
87 var td = lnk.parentNode; 85 var td = lnk.parentNode;
88 var column = clid || td.cellIndex; 86 var column = clid || td.cellIndex;
89 var table = getParent(td,'TABLE'); 87 var table = getParent(td,'TABLE');
90 88
91 // Work out a type for the column 89 // Work out a type for the column
92 if (table.rows.length <= 1) return; 90 if (table.rows.length <= 1) return;
93 var itm = ts_getInnerText(table.rows[1].cells[column]); 91 var itm = ts_getInnerText(table.rows[1].cells[column]);
94 sortfn = ts_sort_caseinsensitive; 92 sortfn = ts_sort_caseinsensitive;
95 if (itm.match(/^\d\d[\/-]\d\d[\/-]\d\d\d\d$/)) { 93 if (itm.match(/^\d\d[\/-]\d\d[\/-]\d\d\d\d$/)) {
96 sortfn = ts_sort_date; 94 sortfn = ts_sort_date;
97 } 95 }
98 if (itm.match(/^\d\d[\/-]\d\d[\/-]\d\d$/)) { 96 if (itm.match(/^\d\d[\/-]\d\d[\/-]\d\d$/)) {
99 sortfn = ts_sort_date; 97 sortfn = ts_sort_date;
100 } 98 }
101 if (itm.match(/^[£$]/)) { 99 if (itm.match(/^[£$]/)) {
102 sortfn = ts_sort_currency; 100 sortfn = ts_sort_currency;
103 } 101 }
104 if (itm.match(/^[\d\.]+$/)) { 102 if (itm.match(/^[\d\.]+$/)) {
105 sortfn = ts_sort_numeric; 103 sortfn = ts_sort_numeric;
106 } 104 }
107 SORT_COLUMN_INDEX = column; 105 SORT_COLUMN_INDEX = column;
108 var firstRow = new Array(); 106 var firstRow = new Array();
109 var newRows = new Array(); 107 var newRows = new Array();
110 for (i=0;i<table.rows[0].length;i++) { 108 for (i=0;i<table.rows[0].length;i++) {
111 firstRow[i] = table.rows[0][i]; 109 firstRow[i] = table.rows[0][i];
112 } 110 }
113 111
114 for (j=1;j<table.rows.length;j++) { 112 for (j=1;j<table.rows.length;j++) {
115 newRows[j-1] = table.rows[j]; 113 newRows[j-1] = table.rows[j];
116 } 114 }
117 newRows.sort(sortfn); 115 newRows.sort(sortfn);
118 116
119 if (span.getAttribute("sortdir") == 'down') { 117 if (span.getAttribute("sortdir") == 'down') {
120 ARROW = '&nbsp;&nbsp;&uarr;'; 118 ARROW = '&nbsp;&nbsp;&uarr;';
121 newRows.reverse(); 119 newRows.reverse();
122 span.setAttribute('sortdir','up'); 120 span.setAttribute('sortdir','up');
123 } else { 121 } else {
124 ARROW = '&nbsp;&nbsp;&darr;'; 122 ARROW = '&nbsp;&nbsp;&darr;';
125 span.setAttribute('sortdir','down'); 123 span.setAttribute('sortdir','down');
126 } 124 }
127 125
128 // We appendChild rows that already exist to the tbody, so it moves them rather than creating new ones 126 // We appendChild rows that already exist to the tbody, so it moves them rather than creating new ones
129 // don't do sortbottom rows 127 // don't do sortbottom rows
130 for (i=0;i<newRows.length;i++) { 128 for (i=0;i<newRows.length;i++) {
131 if (!newRows[i].className || (newRows[i].className && (newRows[i].className.indexOf('sortbottom') == -1))) { 129 if (!newRows[i].className || (newRows[i].className && (newRows[i].className.indexOf('sortbottom') == -1))) {
132 table.tBodies[0].appendChild(newRows[i]); 130 table.tBodies[0].appendChild(newRows[i]);
133 } 131 }
134 } 132 }
135 // do sortbottom rows only 133 // do sortbottom rows only
136 for (i=0;i<newRows.length;i++) { 134 for (i=0;i<newRows.length;i++) {
137 if (newRows[i].className && (newRows[i].className.indexOf('sortbottom') != -1)) { 135 if (newRows[i].className && (newRows[i].className.indexOf('sortbottom') != -1)) {
138 table.tBodies[0].appendChild(newRows[i]); 136 table.tBodies[0].appendChild(newRows[i]);
139 } 137 }
140 } 138 }
141 139
142 // Delete any other arrows there may be showing 140 // Delete any other arrows there may be showing
143 var allspans = document.getElementsByTagName("span"); 141 var allspans = document.getElementsByTagName("span");
144 for (var ci=0;ci<allspans.length;ci++) { 142 for (var ci=0;ci<allspans.length;ci++) {
145 if (allspans[ci].className == 'sortarrow') { 143 if (allspans[ci].className == 'sortarrow') {
146 if (getParent(allspans[ci],"table") == getParent(lnk,"table")) { // in the same table as us? 144 if (getParent(allspans[ci],"table") == getParent(lnk,"table")) { // in the same table as us?
147 allspans[ci].innerHTML = '&nbsp;&nbsp;&nbsp;'; 145 allspans[ci].innerHTML = '&nbsp;&nbsp;&nbsp;';
148 } 146 }
149 } 147 }
150 } 148 }
151 149
152 span.innerHTML = ARROW; 150 span.innerHTML = ARROW;
153} 151}
154 152
155function getParent(el, pTagName) { 153function getParent(el, pTagName) {
156 if (el == null) return null; 154 if (el == null) return null;
157 else if (el.nodeType == 1 && el.tagName.toLowerCase() == pTagName.toLowerCase())// Gecko bug, supposed to be uppercase 155 else if (el.nodeType == 1 && el.tagName.toLowerCase() == pTagName.toLowerCase())// Gecko bug, supposed to be uppercase
158 return el; 156 return el;
159 else 157 else
160 return getParent(el.parentNode, pTagName); 158 return getParent(el.parentNode, pTagName);
161} 159}
162function ts_sort_date(a,b) { 160function ts_sort_date(a,b) {
163 // y2k notes: two digit years less than 50 are treated as 20XX, greater than 50 are treated as 19XX 161 // y2k notes: two digit years less than 50 are treated as 20XX, greater than 50 are treated as 19XX
164 aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]); 162 aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]);
165 bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]); 163 bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]);
166 if (aa.length == 10) { 164 if (aa.length == 10) {
167 dt1 = aa.substr(6,4)+aa.substr(3,2)+aa.substr(0,2); 165 dt1 = aa.substr(6,4)+aa.substr(3,2)+aa.substr(0,2);
168 } else { 166 } else {
169 yr = aa.substr(6,2); 167 yr = aa.substr(6,2);
170 if (parseInt(yr) < 50) { yr = '20'+yr; } else { yr = '19'+yr; } 168 if (parseInt(yr) < 50) { yr = '20'+yr; } else { yr = '19'+yr; }
171 dt1 = yr+aa.substr(3,2)+aa.substr(0,2); 169 dt1 = yr+aa.substr(3,2)+aa.substr(0,2);
172 } 170 }
173 if (bb.length == 10) { 171 if (bb.length == 10) {
174 dt2 = bb.substr(6,4)+bb.substr(3,2)+bb.substr(0,2); 172 dt2 = bb.substr(6,4)+bb.substr(3,2)+bb.substr(0,2);
175 } else { 173 } else {
176 yr = bb.substr(6,2); 174 yr = bb.substr(6,2);
177 if (parseInt(yr) < 50) { yr = '20'+yr; } else { yr = '19'+yr; } 175 if (parseInt(yr) < 50) { yr = '20'+yr; } else { yr = '19'+yr; }
178 dt2 = yr+bb.substr(3,2)+bb.substr(0,2); 176 dt2 = yr+bb.substr(3,2)+bb.substr(0,2);
179 } 177 }
180 if (dt1==dt2) return 0; 178 if (dt1==dt2) return 0;
181 if (dt1<dt2) return -1; 179 if (dt1<dt2) return -1;
182 return 1; 180 return 1;
183} 181}
184 182
185function ts_sort_currency(a,b) { 183function ts_sort_currency(a,b) {
186 aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]).replace(/[^0-9.]/g,''); 184 aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]).replace(/[^0-9.]/g,'');
187 bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]).replace(/[^0-9.]/g,''); 185 bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]).replace(/[^0-9.]/g,'');
188 return parseFloat(aa) - parseFloat(bb); 186 return parseFloat(aa) - parseFloat(bb);
189} 187}
190 188
191function ts_sort_numeric(a,b) { 189function ts_sort_numeric(a,b) {
192 aa = parseFloat(ts_getInnerText(a.cells[SORT_COLUMN_INDEX])); 190 aa = parseFloat(ts_getInnerText(a.cells[SORT_COLUMN_INDEX]));
193 if (isNaN(aa)) aa = 0; 191 if (isNaN(aa)) aa = 0;
194 bb = parseFloat(ts_getInnerText(b.cells[SORT_COLUMN_INDEX])); 192 bb = parseFloat(ts_getInnerText(b.cells[SORT_COLUMN_INDEX]));
195 if (isNaN(bb)) bb = 0; 193 if (isNaN(bb)) bb = 0;
196 return aa-bb; 194 return aa-bb;
197} 195}
198 196
199function ts_sort_caseinsensitive(a,b) { 197function ts_sort_caseinsensitive(a,b) {
200 aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]).toLowerCase(); 198 aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]).toLowerCase();
201 bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]).toLowerCase(); 199 bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]).toLowerCase();
202 if (aa==bb) return 0; 200 if (aa==bb) return 0;
203 if (aa<bb) return -1; 201 if (aa<bb) return -1;
204 return 1; 202 return 1;
205} 203}
206 204
207function ts_sort_default(a,b) { 205function ts_sort_default(a,b) {
208 aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]); 206 aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]);
209 bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]); 207 bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]);
210 if (aa==bb) return 0; 208 if (aa==bb) return 0;
211 if (aa<bb) return -1; 209 if (aa<bb) return -1;
212 return 1; 210 return 1;
213} 211}
214 212
215 213
216function addEvent(elm, evType, fn, useCapture) 214function addEvent(elm, evType, fn, useCapture)
217// addEvent and removeEvent 215// addEvent and removeEvent
218// cross-browser event handling for IE5+, NS6 and Mozilla 216// cross-browser event handling for IE5+, NS6 and Mozilla
219// By Scott Andrew 217// By Scott Andrew
220{ 218{
221 if (elm.addEventListener){ 219 if (elm.addEventListener){
222 elm.addEventListener(evType, fn, useCapture); 220 elm.addEventListener(evType, fn, useCapture);
223 return true; 221 return true;
224 } else if (elm.attachEvent){ 222 } else if (elm.attachEvent){
225 var r = elm.attachEvent("on"+evType, fn); 223 var r = elm.attachEvent("on"+evType, fn);
226 return r; 224 return r;
227 } else { 225 } else {
228 alert("Handler could not be removed"); 226 alert("Handler could not be removed");
229 } 227 }
230} 228}
231 229
232 230
233 231
234 232
235if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 233if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
236if (typeof(Clipperz.Profile) == 'undefined') { Clipperz.Profile = {}; } 234if (typeof(Clipperz.Profile) == 'undefined') { Clipperz.Profile = {}; }
237 235
238Clipperz.Profile.VERSION = "0.1"; 236Clipperz.Profile.VERSION = "0.1";
239Clipperz.Profile.NAME = "Clipperz.Profile"; 237Clipperz.Profile.NAME = "Clipperz.Profile";
240 238
241MochiKit.Base.update(Clipperz.Profile, { 239MochiKit.Base.update(Clipperz.Profile, {
242 240
243 //------------------------------------------------------------------------- 241 //-------------------------------------------------------------------------
244 242
245 '__repr__': function () { 243 '__repr__': function () {
246 varstatus; 244 varstatus;
247 245
248 if (Clipperz.Profile.isEnabled == true) { 246 if (Clipperz.Profile.isEnabled == true) {
249 status = ENABLED; 247 status = ENABLED;
250 } else { 248 } else {
251 status = DISABLED; 249 status = DISABLED;
252 } 250 }
253 251
254 return "[" + this.NAME + " " + this.VERSION + " - " + status + "]"; 252 return "[" + this.NAME + " " + this.VERSION + " - " + status + "]";
255 }, 253 },
256 254
257 //------------------------------------------------------------------------- 255 //-------------------------------------------------------------------------
258 256
259 'toString': function () { 257 'toString': function () {
260 return this.__repr__(); 258 return this.__repr__();
261 }, 259 },
262 260
263 //------------------------------------------------------------------------- 261 //-------------------------------------------------------------------------
264 262
265 'isEnabled': function() { 263 'isEnabled': function() {
266 return false; 264 return false;
267 }, 265 },
268 266
269 //------------------------------------------------------------------------- 267 //-------------------------------------------------------------------------
270 268
271 'initialValues': function() { 269 'initialValues': function() {
272 return {iters:0, total:0, min:Number.MAX_VALUE, max:0} 270 return {iters:0, total:0, min:Number.MAX_VALUE, max:0}
273 }, 271 },
274 272
275 //------------------------------------------------------------------------- 273 //-------------------------------------------------------------------------
276 274
277 'start': function(aName) {}, 275 'start': function(aName) {},
278 'stop': function(aName) {}, 276 'stop': function(aName) {},
279 'dump': function(aName) {}, 277 'dump': function(aName) {},
280 'profileData': function(aName, aKey) { 278 'profileData': function(aName, aKey) {
281 varresult; 279 varresult;
282 280
283 if (typeof(aName) != 'undefined') { 281 if (typeof(aName) != 'undefined') {
284 result = this.initialValues(); 282 result = this.initialValues();
285 283
286 if (typeof(aKey) != 'undefined') { 284 if (typeof(aKey) != 'undefined') {
287 result = result[aKey]; 285 result = result[aKey];
288 } 286 }
289 } else { 287 } else {
290 result = null; 288 result = null;
291 } 289 }
292 290
293 return result; 291 return result;
294 292
295 }, 293 },
296 'resetProfileData': function() {}, 294 'resetProfileData': function() {},
297 //------------------------------------------------------------------------- 295 //-------------------------------------------------------------------------
298 296
299 'end': function(aName) { 297 'end': function(aName) {
300 Clipperz.Profile.stop(aName); 298 Clipperz.Profile.stop(aName);
301 }, 299 },
302 300
303 //------------------------------------------------------------------------- 301 //-------------------------------------------------------------------------
304 302
305 __syntaxFix__: "syntax fix" 303 __syntaxFix__: "syntax fix"
306}); 304});
307 305
308 306
309 307
310if ((typeof(clipperz_profiling_enabled) != 'undefined') && (clipperz_profiling_enabled == true)) { 308if ((typeof(clipperz_profiling_enabled) != 'undefined') && (clipperz_profiling_enabled == true)) {
311 309
312var _clipperz_profile_profiles = {}; 310var _clipperz_profile_profiles = {};
313var _clipperz_profile_pns = []; 311var _clipperz_profile_pns = [];
314 312
315 313
316MochiKit.Base.update(Clipperz.Profile, { 314MochiKit.Base.update(Clipperz.Profile, {
317 315
318 //------------------------------------------------------------------------- 316 //-------------------------------------------------------------------------
319 317
320 'isEnabled': function() { 318 'isEnabled': function() {
321 return true; 319 return true;
322 }, 320 },
323 321
324 //------------------------------------------------------------------------- 322 //-------------------------------------------------------------------------
325 323
326 'start': function(aName) { 324 'start': function(aName) {
327 if (!_clipperz_profile_profiles[aName]) { 325 if (!_clipperz_profile_profiles[aName]) {
328 _clipperz_profile_profiles[aName] = this.initialValues(); 326 _clipperz_profile_profiles[aName] = this.initialValues();
329 _clipperz_profile_pns[_clipperz_profile_pns.length] = aName; 327 _clipperz_profile_pns[_clipperz_profile_pns.length] = aName;
330 } else { 328 } else {
331 if (_clipperz_profile_profiles[aName]["start"]) { 329 if (_clipperz_profile_profiles[aName]["start"]) {
332 Clipperz.Profile.stop(aName); 330 Clipperz.Profile.stop(aName);
333 } 331 }
334 } 332 }
335 333
336 _clipperz_profile_profiles[aName].end = null; 334 _clipperz_profile_profiles[aName].end = null;
337 _clipperz_profile_profiles[aName].start = new Date(); 335 _clipperz_profile_profiles[aName].start = new Date();
338 }, 336 },
339 337
340 //------------------------------------------------------------------------- 338 //-------------------------------------------------------------------------
341 339
342 'stop': function(aName) { 340 'stop': function(aName) {
343 if ((_clipperz_profile_profiles[aName]) && (_clipperz_profile_profiles[aName]["start"])) { 341 if ((_clipperz_profile_profiles[aName]) && (_clipperz_profile_profiles[aName]["start"])) {
344 with(_clipperz_profile_profiles[aName]) { 342 with(_clipperz_profile_profiles[aName]) {
345 var now; 343 var now;
346 varelapsedTime; 344 varelapsedTime;
347 345
348 now = new Date(); 346 now = new Date();
349 elapsedTime = (now - start); 347 elapsedTime = (now - start);
350 348
351 end = now; 349 end = now;
352 min = Math.min(min, elapsedTime); 350 min = Math.min(min, elapsedTime);
353 max = Math.max(max, elapsedTime); 351 max = Math.max(max, elapsedTime);
354 total += elapsedTime; 352 total += elapsedTime;
355 start = null; 353 start = null;
356 iters++; 354 iters++;
357 } 355 }
358 } else { 356 } else {
359 // oops! bad call to end(), what should we do here? 357 // oops! bad call to end(), what should we do here?
360 return true; 358 return true;
361 } 359 }
362 }, 360 },
363 361
364 //------------------------------------------------------------------------- 362 //-------------------------------------------------------------------------
365 363
366 'dump': function(appendToDoc) { 364 'dump': function(appendToDoc) {
367 // var tbl = document.createElement("table"); 365 // var tbl = document.createElement("table");
368 var tbl = MochiKit.DOM.TABLE(null, MochiKit.DOM.TBODY()); 366 var tbl = MochiKit.DOM.TABLE(null, MochiKit.DOM.TBODY());
369 tbl.className = 'sortable'; 367 tbl.className = 'sortable';
370 tbl.id = "profileOutputTable_table"; 368 tbl.id = "profileOutputTable_table";
371 with(tbl.style){ 369 with(tbl.style){
372 border = "1px solid black"; 370 border = "1px solid black";
373 borderCollapse = "collapse"; 371 borderCollapse = "collapse";
374 } 372 }
375 var hdr = tbl.createTHead(); 373 var hdr = tbl.createTHead();
376 var hdrtr = hdr.insertRow(0); 374 var hdrtr = hdr.insertRow(0);
377 // document.createElement("tr"); 375 // document.createElement("tr");
378 var cols = ["Identifier","#","Min", "Avg","Max","Total"]; 376 var cols = ["Identifier","#","Min", "Avg","Max","Total"];
379 for(var x=0; x<cols.length; x++){ 377 for(var x=0; x<cols.length; x++){
380 var ntd = hdrtr.insertCell(x); 378 var ntd = hdrtr.insertCell(x);
381 with(ntd.style){ 379 with(ntd.style){
382 backgroundColor = "#225d94"; 380 backgroundColor = "#225d94";
383 color = "white"; 381 color = "white";
384 borderBottom = "1px solid black"; 382 borderBottom = "1px solid black";
385 borderRight = "1px solid black"; 383 borderRight = "1px solid black";
386 fontFamily = "tahoma"; 384 fontFamily = "tahoma";
387 fontWeight = "bolder"; 385 fontWeight = "bolder";
388 paddingLeft = paddingRight = "5px"; 386 paddingLeft = paddingRight = "5px";
389 } 387 }
390 ntd.appendChild(document.createTextNode(cols[x])); 388 ntd.appendChild(document.createTextNode(cols[x]));
391 } 389 }
392 390
393 for(var x=0; x < _clipperz_profile_pns.length; x++){ 391 for(var x=0; x < _clipperz_profile_pns.length; x++){
394 var prf = _clipperz_profile_profiles[_clipperz_profile_pns[x]]; 392 var prf = _clipperz_profile_profiles[_clipperz_profile_pns[x]];
395 this.end(_clipperz_profile_pns[x]); 393 this.end(_clipperz_profile_pns[x]);
396 if(prf.iters>0){ 394 if(prf.iters>0){
397 var bdytr = tbl.insertRow(true); 395 var bdytr = tbl.insertRow(true);
398 var vals = [_clipperz_profile_pns[x], prf.iters, prf.min, parseInt(Math.round(prf.total/prf.iters)), prf.max, prf.total]; 396 var vals = [_clipperz_profile_pns[x], prf.iters, prf.min, parseInt(Math.round(prf.total/prf.iters)), prf.max, prf.total];
399 for(var y=0; y<vals.length; y++){ 397 for(var y=0; y<vals.length; y++){
400 var cc = bdytr.insertCell(y); 398 var cc = bdytr.insertCell(y);
401 cc.appendChild(document.createTextNode(vals[y])); 399 cc.appendChild(document.createTextNode(vals[y]));
402 with(cc.style){ 400 with(cc.style){
403 borderBottom = "1px solid gray"; 401 borderBottom = "1px solid gray";
404 paddingLeft = paddingRight = "5px"; 402 paddingLeft = paddingRight = "5px";
405 if(x%2){ 403 if(x%2){
406 backgroundColor = "#e1f1ff"; 404 backgroundColor = "#e1f1ff";
diff --git a/frontend/beta/js/Clipperz/Set.js b/frontend/beta/js/Clipperz/Set.js
index 7023888..b3831a4 100644
--- a/frontend/beta/js/Clipperz/Set.js
+++ b/frontend/beta/js/Clipperz/Set.js
@@ -1,164 +1,162 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26 24
27if (typeof(Clipperz) == 'undefined') { 25if (typeof(Clipperz) == 'undefined') {
28 Clipperz = {}; 26 Clipperz = {};
29} 27}
30 28
31//############################################################################# 29//#############################################################################
32 30
33Clipperz.Set = function(args) { 31Clipperz.Set = function(args) {
34 args = args || {}; 32 args = args || {};
35 //MochiKit.Base.bindMethods(this); 33 //MochiKit.Base.bindMethods(this);
36 34
37 if (args.items != null) { 35 if (args.items != null) {
38 this._items = args.items.slice(); 36 this._items = args.items.slice();
39 } else { 37 } else {
40 this._items = []; 38 this._items = [];
41 } 39 }
42 40
43 return this; 41 return this;
44} 42}
45 43
46//============================================================================= 44//=============================================================================
47 45
48Clipperz.Set.prototype = MochiKit.Base.update(null, { 46Clipperz.Set.prototype = MochiKit.Base.update(null, {
49 47
50 //------------------------------------------------------------------------- 48 //-------------------------------------------------------------------------
51 49
52 'toString': function() { 50 'toString': function() {
53 return "Clipperz.Set"; 51 return "Clipperz.Set";
54 }, 52 },
55 53
56 //------------------------------------------------------------------------- 54 //-------------------------------------------------------------------------
57 55
58 'items': function() { 56 'items': function() {
59 return this._items; 57 return this._items;
60 }, 58 },
61 59
62 //------------------------------------------------------------------------- 60 //-------------------------------------------------------------------------
63 61
64 'popAnItem': function() { 62 'popAnItem': function() {
65 var result; 63 var result;
66 64
67 if (this.size() > 0) { 65 if (this.size() > 0) {
68 result = this.items().pop(); 66 result = this.items().pop();
69 } else { 67 } else {
70 result = null; 68 result = null;
71 } 69 }
72 70
73 return result; 71 return result;
74 }, 72 },
75 73
76 //------------------------------------------------------------------------- 74 //-------------------------------------------------------------------------
77 75
78 'allItems': function() { 76 'allItems': function() {
79 return this.items(); 77 return this.items();
80 }, 78 },
81 79
82 //------------------------------------------------------------------------- 80 //-------------------------------------------------------------------------
83 81
84 'contains': function(anItem) { 82 'contains': function(anItem) {
85 return (this.indexOf(anItem) != -1); 83 return (this.indexOf(anItem) != -1);
86 }, 84 },
87 85
88 //------------------------------------------------------------------------- 86 //-------------------------------------------------------------------------
89 87
90 'indexOf': function(anItem) { 88 'indexOf': function(anItem) {
91 varresult; 89 varresult;
92 vari, c; 90 vari, c;
93 91
94 result = -1; 92 result = -1;
95 93
96 c = this.items().length; 94 c = this.items().length;
97 for (i=0; (i<c) && (result == -1); i++) { 95 for (i=0; (i<c) && (result == -1); i++) {
98 if (this.items()[i] === anItem) { 96 if (this.items()[i] === anItem) {
99 result = i; 97 result = i;
100 } 98 }
101 } 99 }
102 100
103 return result; 101 return result;
104 }, 102 },
105 103
106 //------------------------------------------------------------------------- 104 //-------------------------------------------------------------------------
107 105
108 'add': function(anItem) { 106 'add': function(anItem) {
109 if (anItem.constructor == Array) { 107 if (anItem.constructor == Array) {
110 MochiKit.Base.map(MochiKit.Base.bind(this,add, this), anItem); 108 MochiKit.Base.map(MochiKit.Base.bind(this,add, this), anItem);
111 } else { 109 } else {
112 if (! this.contains(anItem)) { 110 if (! this.contains(anItem)) {
113 this.items().push(anItem); 111 this.items().push(anItem);
114 } 112 }
115 } 113 }
116 }, 114 },
117 115
118 //------------------------------------------------------------------------- 116 //-------------------------------------------------------------------------
119 117
120 'debug': function() { 118 'debug': function() {
121 vari, c; 119 vari, c;
122 120
123 result = -1; 121 result = -1;
124 122
125 c = this.items().length; 123 c = this.items().length;
126 for (i=0; i<c; i++) { 124 for (i=0; i<c; i++) {
127 alert("[" + i + "] " + this.items()[i].label); 125 alert("[" + i + "] " + this.items()[i].label);
128 } 126 }
129 }, 127 },
130 128
131 //------------------------------------------------------------------------- 129 //-------------------------------------------------------------------------
132 130
133 'remove': function(anItem) { 131 'remove': function(anItem) {
134 if (anItem.constructor == Array) { 132 if (anItem.constructor == Array) {
135 MochiKit.Base.map(MochiKit.Base.bind(this.remove, this), anItem); 133 MochiKit.Base.map(MochiKit.Base.bind(this.remove, this), anItem);
136 } else { 134 } else {
137 varitemIndex; 135 varitemIndex;
138 136
139 itemIndex = this.indexOf(anItem); 137 itemIndex = this.indexOf(anItem);
140 if (itemIndex != -1) { 138 if (itemIndex != -1) {
141 this.items().splice(itemIndex, 1); 139 this.items().splice(itemIndex, 1);
142 } 140 }
143 } 141 }
144 }, 142 },
145 143
146 //------------------------------------------------------------------------- 144 //-------------------------------------------------------------------------
147 145
148 'size': function() { 146 'size': function() {
149 return this.items().length; 147 return this.items().length;
150 }, 148 },
151 149
152 //------------------------------------------------------------------------- 150 //-------------------------------------------------------------------------
153 151
154 'empty': function() { 152 'empty': function() {
155 this.items().splice(0, this.items().length); 153 this.items().splice(0, this.items().length);
156 }, 154 },
157 155
158 //------------------------------------------------------------------------- 156 //-------------------------------------------------------------------------
159 157
160 __syntaxFix__: "syntax fix" 158 __syntaxFix__: "syntax fix"
161 159
162 //------------------------------------------------------------------------- 160 //-------------------------------------------------------------------------
163}); 161});
164 162
diff --git a/frontend/beta/js/Clipperz/Signal.js b/frontend/beta/js/Clipperz/Signal.js
index 8ed37cc..996c398 100644
--- a/frontend/beta/js/Clipperz/Signal.js
+++ b/frontend/beta/js/Clipperz/Signal.js
@@ -1,68 +1,66 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.Signal) == 'undefined') { Clipperz.Signal = {}; } 25if (typeof(Clipperz.Signal) == 'undefined') { Clipperz.Signal = {}; }
28 26
29Clipperz.Signal.VERSION = "0.1"; 27Clipperz.Signal.VERSION = "0.1";
30Clipperz.Signal.NAME = "Clipperz.Signal"; 28Clipperz.Signal.NAME = "Clipperz.Signal";
31 29
32MochiKit.Base.update(Clipperz.Signal, { 30MochiKit.Base.update(Clipperz.Signal, {
33 31
34 //------------------------------------------------------------------------- 32 //-------------------------------------------------------------------------
35 33
36 '__repr__': function () { 34 '__repr__': function () {
37 return "[" + this.NAME + " " + this.VERSION + "]"; 35 return "[" + this.NAME + " " + this.VERSION + "]";
38 }, 36 },
39 37
40 //------------------------------------------------------------------------- 38 //-------------------------------------------------------------------------
41 39
42 'toString': function () { 40 'toString': function () {
43 return this.__repr__(); 41 return this.__repr__();
44 }, 42 },
45 43
46 //------------------------------------------------------------------------- 44 //-------------------------------------------------------------------------
47 45
48 'fireNativeEvent': function(element, eventName) { 46 'fireNativeEvent': function(element, eventName) {
49 if (element.fireEvent) { 47 if (element.fireEvent) {
50 // MSIE 48 // MSIE
51 element.fireEvent(eventName); 49 element.fireEvent(eventName);
52 } else { 50 } else {
53 // W3C 51 // W3C
54 var event; 52 var event;
55 53
56 event = document.createEvent("HTMLEvents"); 54 event = document.createEvent("HTMLEvents");
57 event.initEvent(eventName.replace(/^on/, ""), true, true); 55 event.initEvent(eventName.replace(/^on/, ""), true, true);
58 element.dispatchEvent(event); 56 element.dispatchEvent(event);
59 } 57 }
60 }, 58 },
61 59
62 //------------------------------------------------------------------------- 60 //-------------------------------------------------------------------------
63 __syntaxFix__: "syntax fix" 61 __syntaxFix__: "syntax fix"
64 62
65}); 63});
66 64
67 65
68 66
diff --git a/frontend/beta/js/Clipperz/Style.js b/frontend/beta/js/Clipperz/Style.js
index 1eecdd1..02cf2f0 100644
--- a/frontend/beta/js/Clipperz/Style.js
+++ b/frontend/beta/js/Clipperz/Style.js
@@ -1,70 +1,68 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.Style) == 'undefined') { Clipperz.Style = {}; } 25if (typeof(Clipperz.Style) == 'undefined') { Clipperz.Style = {}; }
28 26
29Clipperz.Style.VERSION = "0.1"; 27Clipperz.Style.VERSION = "0.1";
30Clipperz.Style.NAME = "Clipperz.DOM"; 28Clipperz.Style.NAME = "Clipperz.DOM";
31 29
32MochiKit.Base.update(Clipperz.Style, { 30MochiKit.Base.update(Clipperz.Style, {
33 31
34 //------------------------------------------------------------------------- 32 //-------------------------------------------------------------------------
35 33
36 '__repr__': function () { 34 '__repr__': function () {
37 return "[" + this.NAME + " " + this.VERSION + "]"; 35 return "[" + this.NAME + " " + this.VERSION + "]";
38 }, 36 },
39 37
40 //------------------------------------------------------------------------- 38 //-------------------------------------------------------------------------
41 39
42 'toString': function () { 40 'toString': function () {
43 return this.__repr__(); 41 return this.__repr__();
44 }, 42 },
45 43
46 //------------------------------------------------------------------------- 44 //-------------------------------------------------------------------------
47 45
48 'applyZebraStylesToTable': function(aTable) { 46 'applyZebraStylesToTable': function(aTable) {
49 var tbody; 47 var tbody;
50 var tbodyRows; 48 var tbodyRows;
51 var i,c; 49 var i,c;
52 50
53 tbody = MochiKit.DOM.getFirstElementByTagAndClassName('tbody', null, aTable); 51 tbody = MochiKit.DOM.getFirstElementByTagAndClassName('tbody', null, aTable);
54 tbodyRows = tbody.childNodes; 52 tbodyRows = tbody.childNodes;
55 // tbodyRows = MochiKit.DOM.getElementsByTagAndClassName('tr', null, tbody) 53 // tbodyRows = MochiKit.DOM.getElementsByTagAndClassName('tr', null, tbody)
56 c = tbodyRows.length; 54 c = tbodyRows.length;
57 for (i=0; i<c; i++) { 55 for (i=0; i<c; i++) {
58 var element; 56 var element;
59 57
60 element = YAHOO.ext.Element.get(tbodyRows[i]); 58 element = YAHOO.ext.Element.get(tbodyRows[i]);
61 element.addClass(((i%2 == 0) ? "zebra_odd": "zebra_even")); 59 element.addClass(((i%2 == 0) ? "zebra_odd": "zebra_even"));
62 element.removeClass(((i%2 == 1) ? "zebra_odd": "zebra_even")); 60 element.removeClass(((i%2 == 1) ? "zebra_odd": "zebra_even"));
63 } 61 }
64 }, 62 },
65 63
66 //------------------------------------------------------------------------- 64 //-------------------------------------------------------------------------
67 __syntaxFix__: "syntax fix" 65 __syntaxFix__: "syntax fix"
68 66
69}); 67});
70 68
diff --git a/frontend/beta/js/Clipperz/YUI/Collapser.js b/frontend/beta/js/Clipperz/YUI/Collapser.js
index b104877..849cbe9 100644
--- a/frontend/beta/js/Clipperz/YUI/Collapser.js
+++ b/frontend/beta/js/Clipperz/YUI/Collapser.js
@@ -1,70 +1,68 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; } 25if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; }
28 26
29 //found on YUI-EXT forum (http://www.yui-ext.com/forum/viewtopic.php?t=683&highlight=accordion) 27 //found on YUI-EXT forum (http://www.yui-ext.com/forum/viewtopic.php?t=683&highlight=accordion)
30Clipperz.YUI.Collapser = function(clickEl, collapseEl, initiallyCollapsed) { 28Clipperz.YUI.Collapser = function(clickEl, collapseEl, initiallyCollapsed) {
31 this.clickEl = getEl(clickEl); 29 this.clickEl = getEl(clickEl);
32 this.collapseEl = getEl(collapseEl); 30 this.collapseEl = getEl(collapseEl);
33 this.clickEl.addClass('collapser-expanded'); 31 this.clickEl.addClass('collapser-expanded');
34 if (initiallyCollapsed == true) { 32 if (initiallyCollapsed == true) {
35 this.afterCollapse(); 33 this.afterCollapse();
36 } 34 }
37 this.clickEl.mon('click', function(){ 35 this.clickEl.mon('click', function(){
38 this.collapsed === true ? this.expand() : this.collapse(); 36 this.collapsed === true ? this.expand() : this.collapse();
39 }, this, true); 37 }, this, true);
40}; 38};
41 39
42Clipperz.YUI.Collapser.prototype = { 40Clipperz.YUI.Collapser.prototype = {
43 'collapse': function(){ 41 'collapse': function(){
44 this.collapseEl.clip(); 42 this.collapseEl.clip();
45 this.collapseEl.setHeight(1, true, .35, this.afterCollapse.createDelegate(this), YAHOO.util.Easing.easeOut); 43 this.collapseEl.setHeight(1, true, .35, this.afterCollapse.createDelegate(this), YAHOO.util.Easing.easeOut);
46 this.clickEl.replaceClass('collapser-expanded','collapser-collapsed'); 44 this.clickEl.replaceClass('collapser-expanded','collapser-collapsed');
47 }, 45 },
48 46
49 'afterCollapse': function(){ 47 'afterCollapse': function(){
50 this.collapsed = true; 48 this.collapsed = true;
51 this.collapseEl.setDisplayed(false); 49 this.collapseEl.setDisplayed(false);
52 this.clickEl.replaceClass('collapser-expanded','collapser-collapsed'); 50 this.clickEl.replaceClass('collapser-expanded','collapser-collapsed');
53 }, 51 },
54 52
55 'expand': function(){ 53 'expand': function(){
56 this.collapseEl.setDisplayed(true); 54 this.collapseEl.setDisplayed(true);
57 this.collapseEl.autoHeight(true, .35, this.afterExpand.createDelegate(this), YAHOO.util.Easing.easeOut); 55 this.collapseEl.autoHeight(true, .35, this.afterExpand.createDelegate(this), YAHOO.util.Easing.easeOut);
58 this.clickEl.replaceClass('collapser-collapsed','collapser-expanded'); 56 this.clickEl.replaceClass('collapser-collapsed','collapser-expanded');
59 }, 57 },
60 58
61 'afterExpand': function(){ 59 'afterExpand': function(){
62 this.collapsed = false; 60 this.collapsed = false;
63 this.collapseEl.unclip(); 61 this.collapseEl.unclip();
64 this.collapseEl.setStyle('height', ''); 62 this.collapseEl.setStyle('height', '');
65 this.clickEl.replaceClass('collapser-collapsed','collapser-expanded'); 63 this.clickEl.replaceClass('collapser-collapsed','collapser-expanded');
66 }, 64 },
67 65
68 //----------------------------------------------------- 66 //-----------------------------------------------------
69 __syntaxFix__: '__syntaxFix__' 67 __syntaxFix__: '__syntaxFix__'
70}; 68};
diff --git a/frontend/beta/js/Clipperz/YUI/DomHelper.js b/frontend/beta/js/Clipperz/YUI/DomHelper.js
index 05edc49..2c0ba34 100644
--- a/frontend/beta/js/Clipperz/YUI/DomHelper.js
+++ b/frontend/beta/js/Clipperz/YUI/DomHelper.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.ext) == 'undefined') { Clipperz.ext = {}; } 25if (typeof(Clipperz.ext) == 'undefined') { Clipperz.ext = {}; }
28 26
29/** 27/**
30 * @class Clipperz.YUI.DomHelper 28 * @class Clipperz.YUI.DomHelper
31 * Utility class for working with DOM and/or Templates. It transparently supports using HTML fragments or DOM. 29 * Utility class for working with DOM and/or Templates. It transparently supports using HTML fragments or DOM.
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>. 30 * 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>.
33 * @singleton 31 * @singleton
34 */ 32 */
35Clipperz.YUI.DomHelper = new function(){ 33Clipperz.YUI.DomHelper = new function(){
36 /**@private*/ 34 /**@private*/
37 var d = document; 35 var d = document;
38 var tempTableEl = null; 36 var tempTableEl = null;
39 /** True to force the use of DOM instead of html fragments @type Boolean */ 37 /** True to force the use of DOM instead of html fragments @type Boolean */
40 this.useDom = false; 38 this.useDom = false;
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; 39 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;
42 /** 40 /**
43 * Applies a style specification to an element 41 * Applies a style specification to an element
44 * @param {String/HTMLElement} el The element to apply styles to 42 * @param {String/HTMLElement} el The element to apply styles to
45 * @param {String/Object/Function} styles A style specification string eg "width:100px", or object in the form {width:"100px"}, or 43 * @param {String/Object/Function} styles A style specification string eg "width:100px", or object in the form {width:"100px"}, or
46 * a function which returns such a specification. 44 * a function which returns such a specification.
47 */ 45 */
48 this.applyStyles = function(el, styles){ 46 this.applyStyles = function(el, styles){
49 if(styles){ 47 if(styles){
50 var D = YAHOO.util.Dom; 48 var D = YAHOO.util.Dom;
51 if (typeof styles == "string"){ 49 if (typeof styles == "string"){
52 var re = /\s?([a-z\-]*)\:([^;]*);?/gi; 50 var re = /\s?([a-z\-]*)\:([^;]*);?/gi;
53 var matches; 51 var matches;
54 while ((matches = re.exec(styles)) != null){ 52 while ((matches = re.exec(styles)) != null){
55 D.setStyle(el, matches[1], matches[2]); 53 D.setStyle(el, matches[1], matches[2]);
56 } 54 }
57 }else if (typeof styles == "object"){ 55 }else if (typeof styles == "object"){
58 for (var style in styles){ 56 for (var style in styles){
59 D.setStyle(el, style, styles[style]); 57 D.setStyle(el, style, styles[style]);
60 } 58 }
61 }else if (typeof styles == "function"){ 59 }else if (typeof styles == "function"){
62 Clipperz.YUI.DomHelper.applyStyles(el, styles.call()); 60 Clipperz.YUI.DomHelper.applyStyles(el, styles.call());
63 } 61 }
64 } 62 }
65 }; 63 };
66 64
67 // build as innerHTML where available 65 // build as innerHTML where available
68 /** @ignore */ 66 /** @ignore */
69 var createHtml = function(o){ 67 var createHtml = function(o){
70 var b = ''; 68 var b = '';
71 69
72 if(typeof(o['html']) != 'undefined') { 70 if(typeof(o['html']) != 'undefined') {
73 o['html'] = Clipperz.Base.sanitizeString(o['html']); 71 o['html'] = Clipperz.Base.sanitizeString(o['html']);
74 } else if (typeof(o['htmlString']) != 'undefined') { 72 } else if (typeof(o['htmlString']) != 'undefined') {
75 o['html'] = o['htmlString']; 73 o['html'] = o['htmlString'];
76 delete o.htmlString; 74 delete o.htmlString;
77 } 75 }
78 76
79 b += '<' + o.tag; 77 b += '<' + o.tag;
80 for(var attr in o){ 78 for(var attr in o){
81 if(attr == 'tag' || attr == 'children' || attr == 'html' || typeof o[attr] == 'function') continue; 79 if(attr == 'tag' || attr == 'children' || attr == 'html' || typeof o[attr] == 'function') continue;
82 if(attr == 'style'){ 80 if(attr == 'style'){
83 var s = o['style']; 81 var s = o['style'];
84 if(typeof s == 'function'){ 82 if(typeof s == 'function'){
85 s = s.call(); 83 s = s.call();
86 } 84 }
87 if(typeof s == 'string'){ 85 if(typeof s == 'string'){
88 b += ' style="' + s + '"'; 86 b += ' style="' + s + '"';
89 }else if(typeof s == 'object'){ 87 }else if(typeof s == 'object'){
90 b += ' style="'; 88 b += ' style="';
91 for(var key in s){ 89 for(var key in s){
92 if(typeof s[key] != 'function'){ 90 if(typeof s[key] != 'function'){
93 b += key + ':' + s[key] + ';'; 91 b += key + ':' + s[key] + ';';
94 } 92 }
95 } 93 }
96 b += '"'; 94 b += '"';
97 } 95 }
98 }else{ 96 }else{
99 if(attr == 'cls'){ 97 if(attr == 'cls'){
100 b += ' class="' + o['cls'] + '"'; 98 b += ' class="' + o['cls'] + '"';
101 }else if(attr == 'htmlFor'){ 99 }else if(attr == 'htmlFor'){
102 b += ' for="' + o['htmlFor'] + '"'; 100 b += ' for="' + o['htmlFor'] + '"';
103 }else{ 101 }else{
104 b += ' ' + attr + '="' + o[attr] + '"'; 102 b += ' ' + attr + '="' + o[attr] + '"';
105 } 103 }
106 } 104 }
107 } 105 }
108 if(emptyTags.test(o.tag)){ 106 if(emptyTags.test(o.tag)){
109 b += ' />'; 107 b += ' />';
110 }else{ 108 }else{
111 b += '>'; 109 b += '>';
112 if(o.children){ 110 if(o.children){
113 for(var i = 0, len = o.children.length; i < len; i++) { 111 for(var i = 0, len = o.children.length; i < len; i++) {
114 b += createHtml(o.children[i], b); 112 b += createHtml(o.children[i], b);
115 } 113 }
116 } 114 }
117 if(o.html){ 115 if(o.html){
118 b += o.html; 116 b += o.html;
119 } 117 }
120 b += '</' + o.tag + '>'; 118 b += '</' + o.tag + '>';
121 } 119 }
122 return b; 120 return b;
123 } 121 }
124 122
125 // build as dom 123 // build as dom
126 /** @ignore */ 124 /** @ignore */
127 var createDom = function(o, parentNode){ 125 var createDom = function(o, parentNode){
128 var el = d.createElement(o.tag); 126 var el = d.createElement(o.tag);
129 var useSet = el.setAttribute ? true : false; // In IE some elements don't have setAttribute 127 var useSet = el.setAttribute ? true : false; // In IE some elements don't have setAttribute
130 for(var attr in o){ 128 for(var attr in o){
131 if(attr == 'tag' || attr == 'children' || attr == 'html' || attr == 'style' || typeof o[attr] == 'function') continue; 129 if(attr == 'tag' || attr == 'children' || attr == 'html' || attr == 'style' || typeof o[attr] == 'function') continue;
132 if(attr=='cls'){ 130 if(attr=='cls'){
133 el.className = o['cls']; 131 el.className = o['cls'];
134 }else{ 132 }else{
135 if(useSet) el.setAttribute(attr, o[attr]); 133 if(useSet) el.setAttribute(attr, o[attr]);
136 else el[attr] = o[attr]; 134 else el[attr] = o[attr];
137 } 135 }
138 } 136 }
139 Clipperz.YUI.DomHelper.applyStyles(el, o.style); 137 Clipperz.YUI.DomHelper.applyStyles(el, o.style);
140 if(o.children){ 138 if(o.children){
141 for(var i = 0, len = o.children.length; i < len; i++) { 139 for(var i = 0, len = o.children.length; i < len; i++) {
142 createDom(o.children[i], el); 140 createDom(o.children[i], el);
143 } 141 }
144 } 142 }
145 if(o.html){ 143 if(o.html){
146 el.innerHTML = o.html; 144 el.innerHTML = o.html;
147 } 145 }
148 if(parentNode){ 146 if(parentNode){
149 parentNode.appendChild(el); 147 parentNode.appendChild(el);
150 } 148 }
151 return el; 149 return el;
152 }; 150 };
153 151
154 /** 152 /**
155 * @ignore 153 * @ignore
156 * Nasty code for IE's broken table implementation 154 * Nasty code for IE's broken table implementation
157 */ 155 */
158 var insertIntoTable = function(tag, where, el, html){ 156 var insertIntoTable = function(tag, where, el, html){
159 if(!tempTableEl){ 157 if(!tempTableEl){
160 tempTableEl = document.createElement('div'); 158 tempTableEl = document.createElement('div');
161 } 159 }
162 var node; 160 var node;
163 if(tag == 'table' || tag == 'tbody'){ 161 if(tag == 'table' || tag == 'tbody'){
164 tempTableEl.innerHTML = '<table><tbody>'+html+'</tbody></table>'; 162 tempTableEl.innerHTML = '<table><tbody>'+html+'</tbody></table>';
165 node = tempTableEl.firstChild.firstChild.firstChild; 163 node = tempTableEl.firstChild.firstChild.firstChild;
166 }else{ 164 }else{
167 tempTableEl.innerHTML = '<table><tbody><tr>'+html+'</tr></tbody></table>'; 165 tempTableEl.innerHTML = '<table><tbody><tr>'+html+'</tr></tbody></table>';
168 node = tempTableEl.firstChild.firstChild.firstChild.firstChild; 166 node = tempTableEl.firstChild.firstChild.firstChild.firstChild;
169 } 167 }
170 if(where == 'beforebegin'){ 168 if(where == 'beforebegin'){
171 el.parentNode.insertBefore(node, el); 169 el.parentNode.insertBefore(node, el);
172 return node; 170 return node;
173 }else if(where == 'afterbegin'){ 171 }else if(where == 'afterbegin'){
174 el.insertBefore(node, el.firstChild); 172 el.insertBefore(node, el.firstChild);
175 return node; 173 return node;
176 }else if(where == 'beforeend'){ 174 }else if(where == 'beforeend'){
177 el.appendChild(node); 175 el.appendChild(node);
178 return node; 176 return node;
179 }else if(where == 'afterend'){ 177 }else if(where == 'afterend'){
180 el.parentNode.insertBefore(node, el.nextSibling); 178 el.parentNode.insertBefore(node, el.nextSibling);
181 return node; 179 return node;
182 } 180 }
183 } 181 }
184 182
185 /** 183 /**
186 * Inserts an HTML fragment into the Dom 184 * Inserts an HTML fragment into the Dom
187 * @param {String} where Where to insert the html in relation to el - beforeBegin, afterBegin, beforeEnd, afterEnd. 185 * @param {String} where Where to insert the html in relation to el - beforeBegin, afterBegin, beforeEnd, afterEnd.
188 * @param {HTMLElement} el The context element 186 * @param {HTMLElement} el The context element
189 * @param {String} html The HTML fragmenet 187 * @param {String} html The HTML fragmenet
190 * @return {HTMLElement} The new node 188 * @return {HTMLElement} The new node
191 */ 189 */
192 this.insertHtml = function(where, el, html){ 190 this.insertHtml = function(where, el, html){
193 where = where.toLowerCase(); 191 where = where.toLowerCase();
194 if(el.insertAdjacentHTML){ 192 if(el.insertAdjacentHTML){
195 var tag = el.tagName.toLowerCase(); 193 var tag = el.tagName.toLowerCase();
196 if(tag == 'table' || tag == 'tbody' || tag == 'tr'){ 194 if(tag == 'table' || tag == 'tbody' || tag == 'tr'){
197 return insertIntoTable(tag, where, el, html); 195 return insertIntoTable(tag, where, el, html);
198 } 196 }
199 switch(where){ 197 switch(where){
200 case 'beforebegin': 198 case 'beforebegin':
201 el.insertAdjacentHTML(where, html); 199 el.insertAdjacentHTML(where, html);
202 return el.previousSibling; 200 return el.previousSibling;
203 case 'afterbegin': 201 case 'afterbegin':
204 el.insertAdjacentHTML(where, html); 202 el.insertAdjacentHTML(where, html);
205 return el.firstChild; 203 return el.firstChild;
206 case 'beforeend': 204 case 'beforeend':
207 el.insertAdjacentHTML(where, html); 205 el.insertAdjacentHTML(where, html);
208 return el.lastChild; 206 return el.lastChild;
209 case 'afterend': 207 case 'afterend':
210 el.insertAdjacentHTML(where, html); 208 el.insertAdjacentHTML(where, html);
211 return el.nextSibling; 209 return el.nextSibling;
212 } 210 }
213 throw 'Illegal insertion point -> "' + where + '"'; 211 throw 'Illegal insertion point -> "' + where + '"';
214 } 212 }
215 var range = el.ownerDocument.createRange(); 213 var range = el.ownerDocument.createRange();
216 var frag; 214 var frag;
217 switch(where){ 215 switch(where){
218 case 'beforebegin': 216 case 'beforebegin':
219 range.setStartBefore(el); 217 range.setStartBefore(el);
220 frag = range.createContextualFragment(html); 218 frag = range.createContextualFragment(html);
221 el.parentNode.insertBefore(frag, el); 219 el.parentNode.insertBefore(frag, el);
222 return el.previousSibling; 220 return el.previousSibling;
223 case 'afterbegin': 221 case 'afterbegin':
224 if(el.firstChild){ // faster 222 if(el.firstChild){ // faster
225 range.setStartBefore(el.firstChild); 223 range.setStartBefore(el.firstChild);
226 }else{ 224 }else{
227 range.selectNodeContents(el); 225 range.selectNodeContents(el);
228 range.collapse(true); 226 range.collapse(true);
229 } 227 }
230 frag = range.createContextualFragment(html); 228 frag = range.createContextualFragment(html);
231 el.insertBefore(frag, el.firstChild); 229 el.insertBefore(frag, el.firstChild);
232 return el.firstChild; 230 return el.firstChild;
233 case 'beforeend': 231 case 'beforeend':
234 if(el.lastChild){ 232 if(el.lastChild){
235 range.setStartAfter(el.lastChild); // faster 233 range.setStartAfter(el.lastChild); // faster
236 }else{ 234 }else{
237 range.selectNodeContents(el); 235 range.selectNodeContents(el);
238 range.collapse(false); 236 range.collapse(false);
239 } 237 }
240 frag = range.createContextualFragment(html); 238 frag = range.createContextualFragment(html);
241 el.appendChild(frag); 239 el.appendChild(frag);
242 return el.lastChild; 240 return el.lastChild;
243 case 'afterend': 241 case 'afterend':
244 range.setStartAfter(el); 242 range.setStartAfter(el);
245 frag = range.createContextualFragment(html); 243 frag = range.createContextualFragment(html);
246 el.parentNode.insertBefore(frag, el.nextSibling); 244 el.parentNode.insertBefore(frag, el.nextSibling);
247 return el.nextSibling; 245 return el.nextSibling;
248 } 246 }
249 throw 'Illegal insertion point -> "' + where + '"'; 247 throw 'Illegal insertion point -> "' + where + '"';
250 }; 248 };
251 249
252 /** 250 /**
253 * Creates new Dom element(s) and inserts them before el 251 * Creates new Dom element(s) and inserts them before el
254 * @param {String/HTMLElement/Element} el The context element 252 * @param {String/HTMLElement/Element} el The context element
255 * @param {Object} o The Dom object spec (and children) 253 * @param {Object} o The Dom object spec (and children)
256 * @param {<i>Boolean</i>} returnElement (optional) true to return a YAHOO.ext.Element 254 * @param {<i>Boolean</i>} returnElement (optional) true to return a YAHOO.ext.Element
257 * @return {HTMLElement} The new node 255 * @return {HTMLElement} The new node
258 */ 256 */
259 this.insertBefore = function(el, o, returnElement){ 257 this.insertBefore = function(el, o, returnElement){
260 el = el.dom ? el.dom : YAHOO.util.Dom.get(el); 258 el = el.dom ? el.dom : YAHOO.util.Dom.get(el);
261 var newNode; 259 var newNode;
262 if(this.useDom){ 260 if(this.useDom){
263 newNode = createDom(o, null); 261 newNode = createDom(o, null);
264 el.parentNode.insertBefore(newNode, el); 262 el.parentNode.insertBefore(newNode, el);
265 }else{ 263 }else{
266 var html = createHtml(o); 264 var html = createHtml(o);
267 newNode = this.insertHtml('beforeBegin', el, html); 265 newNode = this.insertHtml('beforeBegin', el, html);
268 } 266 }
269 return returnElement ? YAHOO.ext.Element.get(newNode, true) : newNode; 267 return returnElement ? YAHOO.ext.Element.get(newNode, true) : newNode;
270 }; 268 };
271 269
272 /** 270 /**
273 * Creates new Dom element(s) and inserts them after el 271 * Creates new Dom element(s) and inserts them after el
274 * @param {String/HTMLElement/Element} el The context element 272 * @param {String/HTMLElement/Element} el The context element
275 * @param {Object} o The Dom object spec (and children) 273 * @param {Object} o The Dom object spec (and children)
276 * @param {<i>Boolean</i>} returnElement (optional) true to return a YAHOO.ext.Element 274 * @param {<i>Boolean</i>} returnElement (optional) true to return a YAHOO.ext.Element
277 * @return {HTMLElement} The new node 275 * @return {HTMLElement} The new node
278 */ 276 */
279 this.insertAfter = function(el, o, returnElement){ 277 this.insertAfter = function(el, o, returnElement){
280 el = el.dom ? el.dom : YAHOO.util.Dom.get(el); 278 el = el.dom ? el.dom : YAHOO.util.Dom.get(el);
281 var newNode; 279 var newNode;
282 if(this.useDom){ 280 if(this.useDom){
283 newNode = createDom(o, null); 281 newNode = createDom(o, null);
284 el.parentNode.insertBefore(newNode, el.nextSibling); 282 el.parentNode.insertBefore(newNode, el.nextSibling);
285 }else{ 283 }else{
286 var html = createHtml(o); 284 var html = createHtml(o);
287 newNode = this.insertHtml('afterEnd', el, html); 285 newNode = this.insertHtml('afterEnd', el, html);
288 } 286 }
289 return returnElement ? YAHOO.ext.Element.get(newNode, true) : newNode; 287 return returnElement ? YAHOO.ext.Element.get(newNode, true) : newNode;
290 }; 288 };
291 289
292 /** 290 /**
293 * Creates new Dom element(s) and appends them to el 291 * Creates new Dom element(s) and appends them to el
294 * @param {String/HTMLElement/Element} el The context element 292 * @param {String/HTMLElement/Element} el The context element
295 * @param {Object} o The Dom object spec (and children) 293 * @param {Object} o The Dom object spec (and children)
296 * @param {<i>Boolean</i>} returnElement (optional) true to return a YAHOO.ext.Element 294 * @param {<i>Boolean</i>} returnElement (optional) true to return a YAHOO.ext.Element
297 * @return {HTMLElement} The new node 295 * @return {HTMLElement} The new node
298 */ 296 */
299 this.append = function(el, o, returnElement){ 297 this.append = function(el, o, returnElement){
300 el = el.dom ? el.dom : YAHOO.util.Dom.get(el); 298 el = el.dom ? el.dom : YAHOO.util.Dom.get(el);
301 var newNode; 299 var newNode;
302 if(this.useDom){ 300 if(this.useDom){
303 newNode = createDom(o, null); 301 newNode = createDom(o, null);
304 el.appendChild(newNode); 302 el.appendChild(newNode);
305 }else{ 303 }else{
306 var html = createHtml(o); 304 var html = createHtml(o);
307 newNode = this.insertHtml('beforeEnd', el, html); 305 newNode = this.insertHtml('beforeEnd', el, html);
308 } 306 }
309 return returnElement ? YAHOO.ext.Element.get(newNode, true) : newNode; 307 return returnElement ? YAHOO.ext.Element.get(newNode, true) : newNode;
310 }; 308 };
311 309
312 /** 310 /**
313 * Creates new Dom element(s) and overwrites the contents of el with them 311 * Creates new Dom element(s) and overwrites the contents of el with them
314 * @param {String/HTMLElement/Element} el The context element 312 * @param {String/HTMLElement/Element} el The context element
315 * @param {Object} o The Dom object spec (and children) 313 * @param {Object} o The Dom object spec (and children)
316 * @param {<i>Boolean</i>} returnElement (optional) true to return a YAHOO.ext.Element 314 * @param {<i>Boolean</i>} returnElement (optional) true to return a YAHOO.ext.Element
317 * @return {HTMLElement} The new node 315 * @return {HTMLElement} The new node
318 */ 316 */
319 this.overwrite = function(el, o, returnElement){ 317 this.overwrite = function(el, o, returnElement){
320 el = el.dom ? el.dom : YAHOO.util.Dom.get(el); 318 el = el.dom ? el.dom : YAHOO.util.Dom.get(el);
321 el.innerHTML = createHtml(o); 319 el.innerHTML = createHtml(o);
322 return returnElement ? YAHOO.ext.Element.get(el.firstChild, true) : el.firstChild; 320 return returnElement ? YAHOO.ext.Element.get(el.firstChild, true) : el.firstChild;
323 }; 321 };
324 322
325 /** 323 /**
326 * Creates a new Clipperz.YUI.DomHelper.Template from the Dom object spec 324 * Creates a new Clipperz.YUI.DomHelper.Template from the Dom object spec
327 * @param {Object} o The Dom object spec (and children) 325 * @param {Object} o The Dom object spec (and children)
328 * @return {Clipperz.YUI.DomHelper.Template} The new template 326 * @return {Clipperz.YUI.DomHelper.Template} The new template
329 */ 327 */
330 this.createTemplate = function(o){ 328 this.createTemplate = function(o){
331 var html = createHtml(o); 329 var html = createHtml(o);
332 return new Clipperz.YUI.DomHelper.Template(html); 330 return new Clipperz.YUI.DomHelper.Template(html);
333 }; 331 };
334}(); 332}();
335 333
336/** 334/**
337* @class Clipperz.YUI.DomHelper.Template 335* @class Clipperz.YUI.DomHelper.Template
338* Represents an HTML fragment template. 336* Represents an HTML fragment template.
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>. 337* 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>.
340* <br> 338* <br>
341* <b>This class is also available as YAHOO.ext.Template</b>. 339* <b>This class is also available as YAHOO.ext.Template</b>.
342* @constructor 340* @constructor
343* @param {String/Array} html The HTML fragment or an array of fragments to join('') or multiple arguments to join('') 341* @param {String/Array} html The HTML fragment or an array of fragments to join('') or multiple arguments to join('')
344*/ 342*/
345Clipperz.YUI.DomHelper.Template = function(html){ 343Clipperz.YUI.DomHelper.Template = function(html){
346 if(html instanceof Array){ 344 if(html instanceof Array){
347 html = html.join(''); 345 html = html.join('');
348 }else if(arguments.length > 1){ 346 }else if(arguments.length > 1){
349 html = Array.prototype.join.call(arguments, ''); 347 html = Array.prototype.join.call(arguments, '');
350 } 348 }
351 /**@private*/ 349 /**@private*/
352 this.html = html; 350 this.html = html;
353}; 351};
354Clipperz.YUI.DomHelper.Template.prototype = { 352Clipperz.YUI.DomHelper.Template.prototype = {
355 /** 353 /**
356 * Returns an HTML fragment of this template with the specified values applied 354 * Returns an HTML fragment of this template with the specified values applied
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'}) 355 * @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'})
358 * @return {String} 356 * @return {String}
359 */ 357 */
360 applyTemplate : function(values){ 358 applyTemplate : function(values){
361 if(this.compiled){ 359 if(this.compiled){
362 return this.compiled(values); 360 return this.compiled(values);
363 } 361 }
364 var empty = ''; 362 var empty = '';
365 var fn = function(match, index){ 363 var fn = function(match, index){
366 if(typeof values[index] != 'undefined'){ 364 if(typeof values[index] != 'undefined'){
367 return values[index]; 365 return values[index];
368 }else{ 366 }else{
369 return empty; 367 return empty;
370 } 368 }
371 } 369 }
372 return this.html.replace(this.re, fn); 370 return this.html.replace(this.re, fn);
373 }, 371 },
374 372
375 /** 373 /**
376 * The regular expression used to match template variables 374 * The regular expression used to match template variables
377 * @type RegExp 375 * @type RegExp
378 * @property 376 * @property
379 */ 377 */
380 re : /\{([\w|-]+)\}/g, 378 re : /\{([\w|-]+)\}/g,
381 379
382 /** 380 /**
383 * Compiles the template into an internal function, eliminating the RegEx overhead 381 * Compiles the template into an internal function, eliminating the RegEx overhead
384 */ 382 */
385 compile : function(){ 383 compile : function(){
386 var body = ["this.compiled = function(values){ return ['"]; 384 var body = ["this.compiled = function(values){ return ['"];
387 body.push(this.html.replace(this.re, "', values['$1'], '")); 385 body.push(this.html.replace(this.re, "', values['$1'], '"));
388 body.push("'].join('');};"); 386 body.push("'].join('');};");
389 eval(body.join('')); 387 eval(body.join(''));
390 return this; 388 return this;
391 }, 389 },
392 390
393 /** 391 /**
394 * Applies the supplied values to the template and inserts the new node(s) before el 392 * Applies the supplied values to the template and inserts the new node(s) before el
395 * @param {String/HTMLElement/Element} el The context element 393 * @param {String/HTMLElement/Element} el The context element
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'}) 394 * @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'})
397 * @param {<i>Boolean</i>} returnElement (optional) true to return a YAHOO.ext.Element 395 * @param {<i>Boolean</i>} returnElement (optional) true to return a YAHOO.ext.Element
398 * @return {HTMLElement} The new node 396 * @return {HTMLElement} The new node
399 */ 397 */
400 insertBefore: function(el, values, returnElement){ 398 insertBefore: function(el, values, returnElement){
401 el = el.dom ? el.dom : YAHOO.util.Dom.get(el); 399 el = el.dom ? el.dom : YAHOO.util.Dom.get(el);
402 var newNode = Clipperz.YUI.DomHelper.insertHtml('beforeBegin', el, this.applyTemplate(values)); 400 var newNode = Clipperz.YUI.DomHelper.insertHtml('beforeBegin', el, this.applyTemplate(values));
403 return returnElement ? YAHOO.ext.Element.get(newNode, true) : newNode; 401 return returnElement ? YAHOO.ext.Element.get(newNode, true) : newNode;
404 }, 402 },
405 403
406 /** 404 /**
diff --git a/frontend/beta/js/Clipperz/YUI/DomQuery.js b/frontend/beta/js/Clipperz/YUI/DomQuery.js
index 4ad4193..6e54b6c 100644
--- a/frontend/beta/js/Clipperz/YUI/DomQuery.js
+++ b/frontend/beta/js/Clipperz/YUI/DomQuery.js
@@ -1,406 +1,404 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26/* 24/*
27 * yui-ext 0.40 25 * yui-ext 0.40
28 * Copyright(c) 2006, Jack Slocum. 26 * Copyright(c) 2006, Jack Slocum.
29 */ 27 */
30 28
31/** 29/**
32 * @class Ext.DomQuery 30 * @class Ext.DomQuery
33 * Provides high performance selector/xpath processing by compiling queries into reusable functions. 31 * Provides high performance selector/xpath processing by compiling queries into reusable functions.
34 * New pseudo classes and matchers can be plugged. It works on HTML and XML documents (if a content node is passed in). 32 * New pseudo classes and matchers can be plugged. It works on HTML and XML documents (if a content node is passed in).
35 * @singleton 33 * @singleton
36 */ 34 */
37Ext.DomQuery = function(){ 35Ext.DomQuery = function(){
38 var cache = {}, simpleCache = {}, valueCache = {}; 36 var cache = {}, simpleCache = {}, valueCache = {};
39 var nonSpace = /\S/; 37 var nonSpace = /\S/;
40 var trimRe = /^\s*(.*?)\s*$/; 38 var trimRe = /^\s*(.*?)\s*$/;
41 var tplRe = /\{(\d+)\}/g; 39 var tplRe = /\{(\d+)\}/g;
42 var modeRe = /^(\s?[\/>]\s?|\s|$)/; 40 var modeRe = /^(\s?[\/>]\s?|\s|$)/;
43 var clsRes = {}; 41 var clsRes = {};
44 42
45 function child(p, index){ 43 function child(p, index){
46 var i = 0; 44 var i = 0;
47 var n = p.firstChild; 45 var n = p.firstChild;
48 while(n){ 46 while(n){
49 if(n.nodeType == 1){ 47 if(n.nodeType == 1){
50 i++; 48 i++;
51 if(i == index){ 49 if(i == index){
52 return n; 50 return n;
53 } 51 }
54 } 52 }
55 n = n.nextSibling; 53 n = n.nextSibling;
56 } 54 }
57 return null; 55 return null;
58 }; 56 };
59 57
60 function next(d){ 58 function next(d){
61 var n = d.nextSibling; 59 var n = d.nextSibling;
62 while(n && n.nodeType != 1){ 60 while(n && n.nodeType != 1){
63 n = n.nextSibling; 61 n = n.nextSibling;
64 } 62 }
65 return n; 63 return n;
66 }; 64 };
67 65
68 function prev(d){ 66 function prev(d){
69 var n = d.previousSibling; 67 var n = d.previousSibling;
70 while(n && n.nodeType != 1){ 68 while(n && n.nodeType != 1){
71 n = n.previousSibling; 69 n = n.previousSibling;
72 } 70 }
73 return n; 71 return n;
74 }; 72 };
75 73
76 function clean(d){ 74 function clean(d){
77 var n = d.firstChild, ni = -1; 75 var n = d.firstChild, ni = -1;
78 while(n){ 76 while(n){
79 var nx = n.nextSibling; 77 var nx = n.nextSibling;
80 if(n.nodeType == 3 && !nonSpace.test(n.nodeValue)){ 78 if(n.nodeType == 3 && !nonSpace.test(n.nodeValue)){
81 d.removeChild(n); 79 d.removeChild(n);
82 }else{ 80 }else{
83 n.nodeIndex = ++ni; 81 n.nodeIndex = ++ni;
84 } 82 }
85 n = nx; 83 n = nx;
86 } 84 }
87 return this; 85 return this;
88 }; 86 };
89 87
90 function byClassName(c, a, v){ 88 function byClassName(c, a, v){
91 if(!v){ 89 if(!v){
92 return c; 90 return c;
93 } 91 }
94 var re = clsRes[v]; 92 var re = clsRes[v];
95 if(!re){ 93 if(!re){
96 re = new RegExp('(?:^|\\s)(?:' + v + ')(?:\\s|$)'); 94 re = new RegExp('(?:^|\\s)(?:' + v + ')(?:\\s|$)');
97 clsRes[v] = re; 95 clsRes[v] = re;
98 } 96 }
99 var r = []; 97 var r = [];
100 for(var i = 0, ci; ci = c[i]; i++){ 98 for(var i = 0, ci; ci = c[i]; i++){
101 if(re.test(ci.className)){ 99 if(re.test(ci.className)){
102 r[r.length] = ci; 100 r[r.length] = ci;
103 } 101 }
104 } 102 }
105 return r; 103 return r;
106 }; 104 };
107 105
108 function convert(c){ 106 function convert(c){
109 if(c.slice){ 107 if(c.slice){
110 return c; 108 return c;
111 } 109 }
112 var r = []; 110 var r = [];
113 for(var i = 0, l = c.length; i < l; i++){ 111 for(var i = 0, l = c.length; i < l; i++){
114 r[r.length] = c[i]; 112 r[r.length] = c[i];
115 } 113 }
116 return r; 114 return r;
117 }; 115 };
118 116
119 function attrValue(n, attr){ 117 function attrValue(n, attr){
120 if(!n.tagName && typeof n.length != 'undefined'){ 118 if(!n.tagName && typeof n.length != 'undefined'){
121 n = n[0]; 119 n = n[0];
122 } 120 }
123 if(!n){ 121 if(!n){
124 return null; 122 return null;
125 } 123 }
126 if(attr == 'for'){ 124 if(attr == 'for'){
127 return n.htmlFor; 125 return n.htmlFor;
128 } 126 }
129 if(attr == 'class' || attr == 'className'){ 127 if(attr == 'class' || attr == 'className'){
130 return n.className; 128 return n.className;
131 } 129 }
132 return n.getAttribute(attr) || n[attr]; 130 return n.getAttribute(attr) || n[attr];
133 131
134 }; 132 };
135 133
136 function getNodes(ns, mode, tagName){ 134 function getNodes(ns, mode, tagName){
137 var result = [], cs; 135 var result = [], cs;
138 if(!ns){ 136 if(!ns){
139 return result; 137 return result;
140 } 138 }
141 mode = mode ? mode.replace(trimRe, '$1') : ''; 139 mode = mode ? mode.replace(trimRe, '$1') : '';
142 tagName = tagName || '*'; 140 tagName = tagName || '*';
143 if(ns.tagName || ns == document){ 141 if(ns.tagName || ns == document){
144 ns = [ns]; 142 ns = [ns];
145 } 143 }
146 if(mode != '/' && mode != '>'){ 144 if(mode != '/' && mode != '>'){
147 for(var i = 0, ni; ni = ns[i]; i++){ 145 for(var i = 0, ni; ni = ns[i]; i++){
148 cs = ni.getElementsByTagName(tagName); 146 cs = ni.getElementsByTagName(tagName);
149 result = concat(result, cs); 147 result = concat(result, cs);
150 } 148 }
151 }else{ 149 }else{
152 for(var i = 0, ni; ni = ns[i]; i++){ 150 for(var i = 0, ni; ni = ns[i]; i++){
153 var cn = ni.getElementsByTagName(tagName); 151 var cn = ni.getElementsByTagName(tagName);
154 for(var j = 0, cj; cj = cn[j]; j++){ 152 for(var j = 0, cj; cj = cn[j]; j++){
155 if(cj.parentNode == ni){ 153 if(cj.parentNode == ni){
156 result[result.length] = cj; 154 result[result.length] = cj;
157 } 155 }
158 } 156 }
159 } 157 }
160 158
161 } 159 }
162 return result; 160 return result;
163 }; 161 };
164 162
165 function concat(a, b){ 163 function concat(a, b){
166 if(b.slice){ 164 if(b.slice){
167 return a.concat(b); 165 return a.concat(b);
168 } 166 }
169 for(var i = 0, l = b.length; i < l; i++){ 167 for(var i = 0, l = b.length; i < l; i++){
170 a[a.length] = b[i]; 168 a[a.length] = b[i];
171 } 169 }
172 return a; 170 return a;
173 } 171 }
174 172
175 function byTag(cs, tagName){ 173 function byTag(cs, tagName){
176 if(cs.tagName || cs == document){ 174 if(cs.tagName || cs == document){
177 cs = [cs]; 175 cs = [cs];
178 } 176 }
179 if(!tagName){ 177 if(!tagName){
180 return cs; 178 return cs;
181 } 179 }
182 var r = []; tagName = tagName.toLowerCase(); 180 var r = []; tagName = tagName.toLowerCase();
183 for(var i = 0, ci; ci = cs[i]; i++){ 181 for(var i = 0, ci; ci = cs[i]; i++){
184 if(ci.nodeType == 1 && ci.tagName.toLowerCase()==tagName){ 182 if(ci.nodeType == 1 && ci.tagName.toLowerCase()==tagName){
185 r[r.length] = ci; 183 r[r.length] = ci;
186 } 184 }
187 } 185 }
188 return r; 186 return r;
189 }; 187 };
190 188
191 function byId(cs, attr, id){ 189 function byId(cs, attr, id){
192 if(cs.tagName || cs == document){ 190 if(cs.tagName || cs == document){
193 cs = [cs]; 191 cs = [cs];
194 } 192 }
195 if(!id){ 193 if(!id){
196 return cs; 194 return cs;
197 } 195 }
198 var r = []; 196 var r = [];
199 for(var i = 0, l = cs.length; i < l; i++){ 197 for(var i = 0, l = cs.length; i < l; i++){
200 var ci = cs[i]; 198 var ci = cs[i];
201 if(ci && ci.id == id){ 199 if(ci && ci.id == id){
202 r[r.length] = ci; 200 r[r.length] = ci;
203 } 201 }
204 } 202 }
205 return r; 203 return r;
206 }; 204 };
207 205
208 function byAttribute(cs, attr, value, op, custom){ 206 function byAttribute(cs, attr, value, op, custom){
209 var r = [], st = custom=='{'; 207 var r = [], st = custom=='{';
210 var f = Ext.DomQuery.operators[op]; 208 var f = Ext.DomQuery.operators[op];
211 for(var i = 0, l = cs.length; i < l; i++){ 209 for(var i = 0, l = cs.length; i < l; i++){
212 var a; 210 var a;
213 if(st){ 211 if(st){
214 a = Ext.DomQuery.getStyle(cs[i], attr); 212 a = Ext.DomQuery.getStyle(cs[i], attr);
215 } 213 }
216 else if(attr == 'class' || attr == 'className'){ 214 else if(attr == 'class' || attr == 'className'){
217 a = cs[i].className; 215 a = cs[i].className;
218 }else if(attr == 'for'){ 216 }else if(attr == 'for'){
219 a = cs[i].htmlFor; 217 a = cs[i].htmlFor;
220 }else{ 218 }else{
221 a = cs[i].getAttribute(attr); 219 a = cs[i].getAttribute(attr);
222 } 220 }
223 if((f && f(a, value)) || (!f && a)){ 221 if((f && f(a, value)) || (!f && a)){
224 r[r.length] = cs[i]; 222 r[r.length] = cs[i];
225 } 223 }
226 } 224 }
227 return r; 225 return r;
228 }; 226 };
229 227
230 function byPseudo(cs, name, value){ 228 function byPseudo(cs, name, value){
231 return Ext.DomQuery.pseudos[name](cs, value); 229 return Ext.DomQuery.pseudos[name](cs, value);
232 }; 230 };
233 231
234 // This is for IE MSXML which does not support expandos. 232 // This is for IE MSXML which does not support expandos.
235 // IE runs the same speed using setAttribute, however FF slows way down 233 // IE runs the same speed using setAttribute, however FF slows way down
236 // and Safari completely fails so they need to continue to use expandos. 234 // and Safari completely fails so they need to continue to use expandos.
237 // Branched at load time for faster execution. 235 // Branched at load time for faster execution.
238 var isIE = window.ActiveXObject; 236 var isIE = window.ActiveXObject;
239 var addAttr = isIE ? 237 var addAttr = isIE ?
240 function(n, a, v){ 238 function(n, a, v){
241 n.setAttribute(a, v); 239 n.setAttribute(a, v);
242 } : 240 } :
243 function(n, a, v){ 241 function(n, a, v){
244 n[a] = v; 242 n[a] = v;
245 }; 243 };
246 var getAttr = isIE ? 244 var getAttr = isIE ?
247 function(n, a){ 245 function(n, a){
248 return n.getAttribute(a); 246 return n.getAttribute(a);
249 } : 247 } :
250 function(n, a){ 248 function(n, a){
251 return n[a]; 249 return n[a];
252 }; 250 };
253 var clearAttr = isIE ? 251 var clearAttr = isIE ?
254 function(n, a){ 252 function(n, a){
255 n.removeAttribute(a); 253 n.removeAttribute(a);
256 } : 254 } :
257 function(n, a, v){ 255 function(n, a, v){
258 delete n[a]; 256 delete n[a];
259 }; 257 };
260 258
261 function nodup(cs){ 259 function nodup(cs){
262 if(!cs.length){ 260 if(!cs.length){
263 return cs; 261 return cs;
264 } 262 }
265 addAttr(cs[0], '_nodup', true); 263 addAttr(cs[0], '_nodup', true);
266 var r = [cs[0]]; 264 var r = [cs[0]];
267 for(var i = 1, len = cs.length; i < len; i++){ 265 for(var i = 1, len = cs.length; i < len; i++){
268 var c = cs[i]; 266 var c = cs[i];
269 if(!getAttr(c, '_nodup')){ 267 if(!getAttr(c, '_nodup')){
270 addAttr(c, '_nodup', true); 268 addAttr(c, '_nodup', true);
271 r[r.length] = c; 269 r[r.length] = c;
272 } 270 }
273 } 271 }
274 for(var i = 0, len = cs.length; i < len; i++){ 272 for(var i = 0, len = cs.length; i < len; i++){
275 clearAttr(cs[i], '_nodup'); 273 clearAttr(cs[i], '_nodup');
276 } 274 }
277 return r; 275 return r;
278 } 276 }
279 277
280 function quickDiff(c1, c2){ 278 function quickDiff(c1, c2){
281 if(!c1.length){ 279 if(!c1.length){
282 return c2; 280 return c2;
283 } 281 }
284 for(var i = 0, len = c1.length; i < len; i++){ 282 for(var i = 0, len = c1.length; i < len; i++){
285 addAttr(c1[i], '_qdiff', true); 283 addAttr(c1[i], '_qdiff', true);
286 } 284 }
287 var r = []; 285 var r = [];
288 for(var i = 0, len = c2.length; i < len; i++){ 286 for(var i = 0, len = c2.length; i < len; i++){
289 if(!getAttr(c2[i], '_qdiff')){ 287 if(!getAttr(c2[i], '_qdiff')){
290 r[r.length] = c2[i]; 288 r[r.length] = c2[i];
291 } 289 }
292 } 290 }
293 for(var i = 0, len = c1.length; i < len; i++){ 291 for(var i = 0, len = c1.length; i < len; i++){
294 clearAttr(c1[i], '_qdiff'); 292 clearAttr(c1[i], '_qdiff');
295 } 293 }
296 return r; 294 return r;
297 } 295 }
298 296
299 function quickId(ns, mode, root, id){ 297 function quickId(ns, mode, root, id){
300 if(ns == root){ 298 if(ns == root){
301 var d = root.ownerDocument || root; 299 var d = root.ownerDocument || root;
302 return d.getElementById(id); 300 return d.getElementById(id);
303 } 301 }
304 ns = getNodes(ns, mode, '*'); 302 ns = getNodes(ns, mode, '*');
305 return byId(ns, null, id); 303 return byId(ns, null, id);
306 } 304 }
307 305
308 return { 306 return {
309 getStyle : function(el, name){ 307 getStyle : function(el, name){
310 return YAHOO.util.Dom.getStyle(el, name); 308 return YAHOO.util.Dom.getStyle(el, name);
311 }, 309 },
312 /** 310 /**
313 * Compiles a selector/xpath query into a reusable function. The returned function 311 * Compiles a selector/xpath query into a reusable function. The returned function
314 * takes one parameter "root" (optional), which is the context node from where the query should start. 312 * takes one parameter "root" (optional), which is the context node from where the query should start.
315 * @param {String} selector The selector/xpath query 313 * @param {String} selector The selector/xpath query
316 * @param {String} type (optional) Either 'select' (the default) or 'simple' for a simple selector match 314 * @param {String} type (optional) Either 'select' (the default) or 'simple' for a simple selector match
317 * @return {Function} 315 * @return {Function}
318 */ 316 */
319 compile : function(path, type){ 317 compile : function(path, type){
320 // strip leading slashes 318 // strip leading slashes
321 while(path.substr(0, 1)=='/'){ 319 while(path.substr(0, 1)=='/'){
322 path = path.substr(1); 320 path = path.substr(1);
323 } 321 }
324 type = type || 'select'; 322 type = type || 'select';
325 323
326 var fn = ['var f = function(root){\n var mode; var n = root || document;\n']; 324 var fn = ['var f = function(root){\n var mode; var n = root || document;\n'];
327 var q = path, mode, lq; 325 var q = path, mode, lq;
328 var tk = Ext.DomQuery.matchers; 326 var tk = Ext.DomQuery.matchers;
329 var tklen = tk.length; 327 var tklen = tk.length;
330 var mm; 328 var mm;
331 while(q && lq != q){ 329 while(q && lq != q){
332 lq = q; 330 lq = q;
333 var tm = q.match(/^(#)?([\w-\*]+)/); 331 var tm = q.match(/^(#)?([\w-\*]+)/);
334 if(type == 'select'){ 332 if(type == 'select'){
335 if(tm){ 333 if(tm){
336 if(tm[1] == '#'){ 334 if(tm[1] == '#'){
337 fn[fn.length] = 'n = quickId(n, mode, root, "'+tm[2]+'");'; 335 fn[fn.length] = 'n = quickId(n, mode, root, "'+tm[2]+'");';
338 }else{ 336 }else{
339 fn[fn.length] = 'n = getNodes(n, mode, "'+tm[2]+'");'; 337 fn[fn.length] = 'n = getNodes(n, mode, "'+tm[2]+'");';
340 } 338 }
341 q = q.replace(tm[0], ''); 339 q = q.replace(tm[0], '');
342 }else{ 340 }else{
343 fn[fn.length] = 'n = getNodes(n, mode, "*");'; 341 fn[fn.length] = 'n = getNodes(n, mode, "*");';
344 } 342 }
345 }else{ 343 }else{
346 if(tm){ 344 if(tm){
347 if(tm[1] == '#'){ 345 if(tm[1] == '#'){
348 fn[fn.length] = 'n = byId(n, null, "'+tm[2]+'");'; 346 fn[fn.length] = 'n = byId(n, null, "'+tm[2]+'");';
349 }else{ 347 }else{
350 fn[fn.length] = 'n = byTag(n, "'+tm[2]+'");'; 348 fn[fn.length] = 'n = byTag(n, "'+tm[2]+'");';
351 } 349 }
352 q = q.replace(tm[0], ''); 350 q = q.replace(tm[0], '');
353 } 351 }
354 } 352 }
355 while(!(mm = q.match(modeRe))){ 353 while(!(mm = q.match(modeRe))){
356 var matched = false; 354 var matched = false;
357 for(var j = 0; j < tklen; j++){ 355 for(var j = 0; j < tklen; j++){
358 var t = tk[j]; 356 var t = tk[j];
359 var m = q.match(t.re); 357 var m = q.match(t.re);
360 if(m){ 358 if(m){
361 fn[fn.length] = t.select.replace(tplRe, function(x, i){ 359 fn[fn.length] = t.select.replace(tplRe, function(x, i){
362 return m[i]; 360 return m[i];
363 }); 361 });
364 q = q.replace(m[0], ''); 362 q = q.replace(m[0], '');
365 matched = true; 363 matched = true;
366 break; 364 break;
367 } 365 }
368 } 366 }
369 // prevent infinite loop on bad selector 367 // prevent infinite loop on bad selector
370 if(!matched){ 368 if(!matched){
371 throw 'Error parsing selector, parsing failed at "' + q + '"'; 369 throw 'Error parsing selector, parsing failed at "' + q + '"';
372 } 370 }
373 } 371 }
374 if(mm[1]){ 372 if(mm[1]){
375 fn[fn.length] = 'mode="'+mm[1]+'";'; 373 fn[fn.length] = 'mode="'+mm[1]+'";';
376 q = q.replace(mm[1], ''); 374 q = q.replace(mm[1], '');
377 } 375 }
378 } 376 }
379 fn[fn.length] = 'return nodup(n);\n}'; 377 fn[fn.length] = 'return nodup(n);\n}';
380 eval(fn.join('')); 378 eval(fn.join(''));
381 return f; 379 return f;
382 }, 380 },
383 381
384 /** 382 /**
385 * Selects a group of elements. 383 * Selects a group of elements.
386 * @param {String} selector The selector/xpath query 384 * @param {String} selector The selector/xpath query
387 * @param {Node} root (optional) The start of the query (defaults to document). 385 * @param {Node} root (optional) The start of the query (defaults to document).
388 * @return {Array} 386 * @return {Array}
389 */ 387 */
390 select : function(path, root, type){ 388 select : function(path, root, type){
391 if(!root || root == document){ 389 if(!root || root == document){
392 root = document; 390 root = document;
393 } 391 }
394 if(typeof root == 'string'){ 392 if(typeof root == 'string'){
395 root = document.getElementById(root); 393 root = document.getElementById(root);
396 } 394 }
397 var paths = path.split(','); 395 var paths = path.split(',');
398 var results = []; 396 var results = [];
399 for(var i = 0, len = paths.length; i < len; i++){ 397 for(var i = 0, len = paths.length; i < len; i++){
400 var p = paths[i].replace(trimRe, '$1'); 398 var p = paths[i].replace(trimRe, '$1');
401 if(!cache[p]){ 399 if(!cache[p]){
402 cache[p] = Ext.DomQuery.compile(p); 400 cache[p] = Ext.DomQuery.compile(p);
403 if(!cache[p]){ 401 if(!cache[p]){
404 throw p + ' is not a valid selector'; 402 throw p + ' is not a valid selector';
405 } 403 }
406 } 404 }
diff --git a/frontend/beta/js/Clipperz/YUI/Drawer.js b/frontend/beta/js/Clipperz/YUI/Drawer.js
index 508bfe5..2105363 100644
--- a/frontend/beta/js/Clipperz/YUI/Drawer.js
+++ b/frontend/beta/js/Clipperz/YUI/Drawer.js
@@ -1,235 +1,233 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; } 25if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; }
28 26
29 27
30Clipperz.YUI.Drawer = function(anElement, aRegion) { 28Clipperz.YUI.Drawer = function(anElement, aRegion) {
31 this._status = 'slideIn'; 29 this._status = 'slideIn';
32 30
33 this._element = YAHOO.ext.Element.get(anElement); 31 this._element = YAHOO.ext.Element.get(anElement);
34 this._region = aRegion || null; 32 this._region = aRegion || null;
35 33
36 this._collapsedElement = this.element().getChildrenByClassName("drawer-collapsed")[0]; 34 this._collapsedElement = this.element().getChildrenByClassName("drawer-collapsed")[0];
37 this._contentElement = this.element().getChildrenByClassName("drawer-content")[0]; 35 this._contentElement = this.element().getChildrenByClassName("drawer-content")[0];
38 36
39 37
40 this._wholeCollapedElement = this.enhanceCollapsedElement(); 38 this._wholeCollapedElement = this.enhanceCollapsedElement();
41 this._wholeCollapedElement.setWidth(this.region().element().getWidth()); 39 this._wholeCollapedElement.setWidth(this.region().element().getWidth());
42 this._wholeCollapedElement.setHeight(this.region().element().getHeight()); 40 this._wholeCollapedElement.setHeight(this.region().element().getHeight());
43 41
44 this._contentWrapper = this.enhanceContentElement(); 42 this._contentWrapper = this.enhanceContentElement();
45 this._contentElementActor = new YAHOO.ext.Actor(this.contentWrapper().dom); 43 this._contentElementActor = new YAHOO.ext.Actor(this.contentWrapper().dom);
46 this.contentElementActor().hide(); 44 this.contentElementActor().hide();
47 45
48 this._contentWidth = 200; 46 this._contentWidth = 200;
49}; 47};
50 48
51YAHOO.extendX(Clipperz.YUI.Drawer, YAHOO.ext.util.Observable, { 49YAHOO.extendX(Clipperz.YUI.Drawer, YAHOO.ext.util.Observable, {
52 50
53 'element': function() { 51 'element': function() {
54 return this._element; 52 return this._element;
55 }, 53 },
56 54
57 //----------------------------------------------------- 55 //-----------------------------------------------------
58 56
59 'status': function() { 57 'status': function() {
60 return this._status; 58 return this._status;
61 }, 59 },
62 60
63 'setStatus': function(aValue) { 61 'setStatus': function(aValue) {
64 this._status = aValue; 62 this._status = aValue;
65 }, 63 },
66 64
67 //----------------------------------------------------- 65 //-----------------------------------------------------
68 66
69 'collapsedElement': function() { 67 'collapsedElement': function() {
70 return this._collapsedElement; 68 return this._collapsedElement;
71 }, 69 },
72 70
73 //----------------------------------------------------- 71 //-----------------------------------------------------
74 72
75 'contentElement': function() { 73 'contentElement': function() {
76 return this._contentElement; 74 return this._contentElement;
77 }, 75 },
78 76
79 //----------------------------------------------------- 77 //-----------------------------------------------------
80 78
81 'contentElementActor': function() { 79 'contentElementActor': function() {
82 return this._contentElementActor; 80 return this._contentElementActor;
83 }, 81 },
84 82
85 //----------------------------------------------------- 83 //-----------------------------------------------------
86 84
87 'contentWrapper': function() { 85 'contentWrapper': function() {
88 return this._contentWrapper; 86 return this._contentWrapper;
89 }, 87 },
90 88
91 //----------------------------------------------------- 89 //-----------------------------------------------------
92 90
93 'contentWidth': function() { 91 'contentWidth': function() {
94 return this._contentWidth; 92 return this._contentWidth;
95 }, 93 },
96 94
97 //----------------------------------------------------- 95 //-----------------------------------------------------
98 96
99 'region': function() { 97 'region': function() {
100 return this._region; 98 return this._region;
101 }, 99 },
102 100
103 //----------------------------------------------------- 101 //-----------------------------------------------------
104 102
105 'enhanceCollapsedElement': function() { 103 'enhanceCollapsedElement': function() {
106 varwrapper; 104 varwrapper;
107 var link; 105 var link;
108 106
109 wrapper = this.collapsedElement().wrap({tag:'div', cls:'drawer-collapsedElement-wrapper', children:[ 107 wrapper = this.collapsedElement().wrap({tag:'div', cls:'drawer-collapsedElement-wrapper', children:[
110 {tag:'div', cls:'drawer-pin-button', children:[ 108 {tag:'div', cls:'drawer-pin-button', children:[
111 {tag:'a', cls:'drawer-pin-button', href:"#", children:[ 109 {tag:'a', cls:'drawer-pin-button', href:"#", children:[
112 {tag:'img', src:'./images/directLogins/drawer/mm-expand.gif'} 110 {tag:'img', src:'./images/directLogins/drawer/mm-expand.gif'}
113 ]} 111 ]}
114 ]} 112 ]}
115 ]}); 113 ]});
116 114
117 link = wrapper.getChildrenByClassName('drawer-pin-button', 'a')[0]; 115 link = wrapper.getChildrenByClassName('drawer-pin-button', 'a')[0];
118 MochiKit.Signal.connect(link.dom, 'onclick', this, 'pinDrawer'); 116 MochiKit.Signal.connect(link.dom, 'onclick', this, 'pinDrawer');
119 117
120 this.collapsedElement().setHeight('100%'); 118 this.collapsedElement().setHeight('100%');
121 this.collapsedElement().setStyle('cursor', 'pointer'); 119 this.collapsedElement().setStyle('cursor', 'pointer');
122 MochiKit.Signal.connect(this.collapsedElement().dom, 'onclick', this, 'showDrawer'); 120 MochiKit.Signal.connect(this.collapsedElement().dom, 'onclick', this, 'showDrawer');
123 121
124 return wrapper; 122 return wrapper;
125 }, 123 },
126 124
127 //----------------------------------------------------- 125 //-----------------------------------------------------
128 126
129 'enhanceContentElement': function() { 127 'enhanceContentElement': function() {
130 var wrapper; 128 var wrapper;
131 129
132 wrapper = this.contentElement().wrap({tag:'div', cls:'drawer-content-wrapper', children:[ 130 wrapper = this.contentElement().wrap({tag:'div', cls:'drawer-content-wrapper', children:[
133 {tag:'div', cls:'drawer-content-header', html:'direct login', style:'width:100%;'} 131 {tag:'div', cls:'drawer-content-header', html:'direct login', style:'width:100%;'}
134 ]}); 132 ]});
135 133
136 MochiKit.Signal.connect(wrapper.dom, 'onclick', this, 'hideDrawer'); 134 MochiKit.Signal.connect(wrapper.dom, 'onclick', this, 'hideDrawer');
137 return wrapper; 135 return wrapper;
138 }, 136 },
139 137
140 //----------------------------------------------------- 138 //-----------------------------------------------------
141 139
142 'pinDrawer': function() { 140 'pinDrawer': function() {
143 alert("pin drawer"); 141 alert("pin drawer");
144 }, 142 },
145 143
146 //----------------------------------------------------- 144 //-----------------------------------------------------
147 145
148 'showDrawer': function() { 146 'showDrawer': function() {
149 if (this.status() == 'slideIn') { 147 if (this.status() == 'slideIn') {
150 var actor; 148 var actor;
151 149
152 this.setStatus('slidingOut'); 150 this.setStatus('slidingOut');
153 actor = this.contentElementActor(); 151 actor = this.contentElementActor();
154 actor.setHeight(this.region().element().getHeight()); 152 actor.setHeight(this.region().element().getHeight());
155 153
156 actor.startCapture(true); 154 actor.startCapture(true);
157 actor.alignTo(this.element(), 'tr'); 155 actor.alignTo(this.element(), 'tr');
158 actor.blindShow('left', this.contentWidth(), .35); 156 actor.blindShow('left', this.contentWidth(), .35);
159 actor.play(this.onSlideOut.createDelegate(this)); 157 actor.play(this.onSlideOut.createDelegate(this));
160 } 158 }
161 }, 159 },
162 160
163 //----------------------------------------------------- 161 //-----------------------------------------------------
164 162
165 'onSlideOut': function() { 163 'onSlideOut': function() {
166 this.setStatus('slideOut'); 164 this.setStatus('slideOut');
167MochiKit.Logging.logDebug(">>> onSlideOut"); 165MochiKit.Logging.logDebug(">>> onSlideOut");
168 // alert("done"); 166 // alert("done");
169 }, 167 },
170 168
171 //----------------------------------------------------- 169 //-----------------------------------------------------
172/* 170/*
173 'showContentElement': function() { 171 'showContentElement': function() {
174 var top, left, width, height; 172 var top, left, width, height;
175 173
176MochiKit.Logging.logDebug(">>> showContentElement"); 174MochiKit.Logging.logDebug(">>> showContentElement");
177 175
178 176
179 top = this.element().getTop(true); 177 top = this.element().getTop(true);
180 left = this.element().getRight(); 178 left = this.element().getRight();
181 width = this.contentWidth(); 179 width = this.contentWidth();
182 height = this.element().getHeight(); 180 height = this.element().getHeight();
183 181
184 this.contentWrapper().setStyle('position', 'absolute'); 182 this.contentWrapper().setStyle('position', 'absolute');
185 this.contentWrapper().setStyle('overflow', 'none'); 183 this.contentWrapper().setStyle('overflow', 'none');
186 this.contentWrapper().setStyle('visibility', 'visible'); 184 this.contentWrapper().setStyle('visibility', 'visible');
187 this.contentWrapper().setStyle('z-index', '10'); 185 this.contentWrapper().setStyle('z-index', '10');
188 186
189 this.contentWrapper().setLeft(left); 187 this.contentWrapper().setLeft(left);
190 this.contentWrapper().setTop(top); 188 this.contentWrapper().setTop(top);
191 this.contentWrapper().setHeight(height); 189 this.contentWrapper().setHeight(height);
192 this.contentWrapper().setWidth(width); 190 this.contentWrapper().setWidth(width);
193 191
194 this.contentWrapper().show(); 192 this.contentWrapper().show();
195 }, 193 },
196 */ 194 */
197 //----------------------------------------------------- 195 //-----------------------------------------------------
198 196
199 'hideDrawer': function() { 197 'hideDrawer': function() {
200 if (this.status() == 'slideOut') { 198 if (this.status() == 'slideOut') {
201 var actor; 199 var actor;
202 200
203 this.setStatus('slidingIn'); 201 this.setStatus('slidingIn');
204 202
205 actor = this.contentElementActor(); 203 actor = this.contentElementActor();
206 actor.setHeight(this.region().element().getHeight()); 204 actor.setHeight(this.region().element().getHeight());
207 205
208 actor.startCapture(true); 206 actor.startCapture(true);
209 actor.alignTo(this.element(), 'tr'); 207 actor.alignTo(this.element(), 'tr');
210 actor.blindHide('left', .35); 208 actor.blindHide('left', .35);
211 actor.setVisible(false); 209 actor.setVisible(false);
212 actor.play(this.onSlideIn.createDelegate(this)); 210 actor.play(this.onSlideIn.createDelegate(this));
213 } 211 }
214 }, 212 },
215 213
216 //----------------------------------------------------- 214 //-----------------------------------------------------
217 215
218 'onSlideIn': function() { 216 'onSlideIn': function() {
219 this.setStatus('slideIn'); 217 this.setStatus('slideIn');
220MochiKit.Logging.logDebug(">>> onSlideIn"); 218MochiKit.Logging.logDebug(">>> onSlideIn");
221 // alert("done"); 219 // alert("done");
222 }, 220 },
223 221
224 //----------------------------------------------------- 222 //-----------------------------------------------------
225 223
226 'hideContentElement': function() { 224 'hideContentElement': function() {
227 this.contentWrapper().hide(); 225 this.contentWrapper().hide();
228 }, 226 },
229 227
230 //----------------------------------------------------- 228 //-----------------------------------------------------
231 //----------------------------------------------------- 229 //-----------------------------------------------------
232 230
233 //----------------------------------------------------- 231 //-----------------------------------------------------
234 __syntaxFix__: '__syntaxFix__' 232 __syntaxFix__: '__syntaxFix__'
235}); \ No newline at end of file 233}); \ 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 6e2138e..d6b5782 100644
--- a/frontend/beta/js/Clipperz/YUI/IBLayoutManager.js
+++ b/frontend/beta/js/Clipperz/YUI/IBLayoutManager.js
@@ -1,111 +1,109 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; } 25if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; }
28 26
29 27
30Clipperz.YUI.IBLayoutManager = function(container, config) { 28Clipperz.YUI.IBLayoutManager = function(container, config) {
31 var regionName; 29 var regionName;
32 varelement; 30 varelement;
33 31
34 config = config || {}; 32 config = config || {};
35 33
36 Clipperz.YUI.IBLayoutManager.superclass.constructor.call(this, container); 34 Clipperz.YUI.IBLayoutManager.superclass.constructor.call(this, container);
37 this.hideOnLayout = config.hideOnLayout || false; 35 this.hideOnLayout = config.hideOnLayout || false;
38 36
39 element = YAHOO.ext.Element.get(container); 37 element = YAHOO.ext.Element.get(container);
40 element.setStyle('position', 'absolute'); 38 element.setStyle('position', 'absolute');
41 element.setStyle('overflow', 'hidden'); 39 element.setStyle('overflow', 'hidden');
42 40
43 for (regionName in config.regions) { 41 for (regionName in config.regions) {
44 var newRegion; 42 var newRegion;
45 43
46 newRegion = new new Clipperz.YUI.IBLayoutRegion(this, regionName, config.regions[regionName]); 44 newRegion = new new Clipperz.YUI.IBLayoutRegion(this, regionName, config.regions[regionName]);
47 this.addRegion(regionName, newRegion); 45 this.addRegion(regionName, newRegion);
48 } 46 }
49 47
50 this.layout(); 48 this.layout();
51}; 49};
52 50
53YAHOO.extendX(Clipperz.YUI.IBLayoutManager, YAHOO.ext.LayoutManager, { 51YAHOO.extendX(Clipperz.YUI.IBLayoutManager, YAHOO.ext.LayoutManager, {
54 52
55 'toString': function() { 53 'toString': function() {
56 return "IBLayoutManager (" + this.el.id + ")"; 54 return "IBLayoutManager (" + this.el.id + ")";
57 }, 55 },
58 56
59 //----------------------------------------------------- 57 //-----------------------------------------------------
60 58
61 'add': function(aName, aPanel) { 59 'add': function(aName, aPanel) {
62 var regionName; 60 var regionName;
63 61
64 regionName = aName.toLowerCase(); 62 regionName = aName.toLowerCase();
65 return this.regions[regionName].add(aPanel); 63 return this.regions[regionName].add(aPanel);
66 }, 64 },
67 65
68 //----------------------------------------------------- 66 //-----------------------------------------------------
69 67
70 'addRegion': function(aRegion) { 68 'addRegion': function(aRegion) {
71 var regionName; 69 var regionName;
72 70
73 regionName = aRegion.name().toLowerCase(); 71 regionName = aRegion.name().toLowerCase();
74 if (!this.regions[regionName]) { 72 if (!this.regions[regionName]) {
75//MochiKit.Logging.logDebug("--- adding region with name: " + aRegion.name()); 73//MochiKit.Logging.logDebug("--- adding region with name: " + aRegion.name());
76 this.regions[regionName] = aRegion; 74 this.regions[regionName] = aRegion;
77 } else { 75 } else {
78 // ???? 76 // ????
79 } 77 }
80 78
81 return aRegion; 79 return aRegion;
82 }, 80 },
83 81
84 //----------------------------------------------------- 82 //-----------------------------------------------------
85 83
86 'getRegion': function(target){ 84 'getRegion': function(target){
87 return this.regions[target.toLowerCase()]; 85 return this.regions[target.toLowerCase()];
88 }, 86 },
89 87
90 //----------------------------------------------------- 88 //-----------------------------------------------------
91 89
92 'layout': function(){ 90 'layout': function(){
93 varregion; 91 varregion;
94 92
95//MochiKit.Logging.logDebug(">>> IBLayoutManager.layout - regions: " + Clipperz.Base.serializeJSON(MochiKit.Base.keys(this.regions))); 93//MochiKit.Logging.logDebug(">>> IBLayoutManager.layout - regions: " + Clipperz.Base.serializeJSON(MochiKit.Base.keys(this.regions)));
96 for (region in this.regions) { 94 for (region in this.regions) {
97//MochiKit.Logging.logDebug("--- IBLayoutManager.layout - region: " + region); 95//MochiKit.Logging.logDebug("--- IBLayoutManager.layout - region: " + region);
98 this.regions[region].layout(); 96 this.regions[region].layout();
99 } 97 }
100//MochiKit.Logging.logDebug("<<< IBLayoutManager.layout"); 98//MochiKit.Logging.logDebug("<<< IBLayoutManager.layout");
101 }, 99 },
102 100
103 //----------------------------------------------------- 101 //-----------------------------------------------------
104 102
105 'getSize': function() { 103 'getSize': function() {
106 return this.el.getSize(); 104 return this.el.getSize();
107 }, 105 },
108 106
109 //----------------------------------------------------- 107 //-----------------------------------------------------
110 __syntaxFix__: '__syntaxFix__' 108 __syntaxFix__: '__syntaxFix__'
111}); 109});
diff --git a/frontend/beta/js/Clipperz/YUI/IBLayoutRegion.js b/frontend/beta/js/Clipperz/YUI/IBLayoutRegion.js
index f8e0cb1..11b7a6c 100644
--- a/frontend/beta/js/Clipperz/YUI/IBLayoutRegion.js
+++ b/frontend/beta/js/Clipperz/YUI/IBLayoutRegion.js
@@ -1,246 +1,244 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } 24if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
27if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; } 25if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; }
28 26
29 27
30Clipperz.YUI.IBLayoutRegion = function(aManager, aName, aConfig) { 28Clipperz.YUI.IBLayoutRegion = function(aManager, aName, aConfig) {
31 this._configuration = aConfig; 29 this._configuration = aConfig;
32 30
33 //Clipperz.YUI.IBLayoutRegion.superclass.constructor.call(); 31 //Clipperz.YUI.IBLayoutRegion.superclass.constructor.call();
34 Clipperz.YUI.IBLayoutRegion.superclass.constructor.call(this, aManager, aConfig, aName); 32 Clipperz.YUI.IBLayoutRegion.superclass.constructor.call(this, aManager, aConfig, aName);
35}; 33};
36 34
37YAHOO.extendX(Clipperz.YUI.IBLayoutRegion, YAHOO.ext.LayoutRegion, { 35YAHOO.extendX(Clipperz.YUI.IBLayoutRegion, YAHOO.ext.LayoutRegion, {
38 36
39 'toString': function() { 37 'toString': function() {
40 return "IBLayoutRegion (" + this.name() + ")"; 38 return "IBLayoutRegion (" + this.name() + ")";
41 }, 39 },
42 40
43 //----------------------------------------------------- 41 //-----------------------------------------------------
44 42
45 'name': function() { 43 'name': function() {
46 return this.position; 44 return this.position;
47 }, 45 },
48 46
49 //----------------------------------------------------- 47 //-----------------------------------------------------
50 48
51 'manager': function() { 49 'manager': function() {
52 return this.mgr; 50 return this.mgr;
53 }, 51 },
54 52
55 'configuration': function() { 53 'configuration': function() {
56 return this._configuration; 54 return this._configuration;
57 }, 55 },
58 56
59 //----------------------------------------------------- 57 //-----------------------------------------------------
60 58
61 'getAttributeValue': function(anAttribute) { 59 'getAttributeValue': function(anAttribute) {
62 var result; 60 var result;
63 61
64 switch(anAttribute) { 62 switch(anAttribute) {
65 case "top": 63 case "top":
66 result = this.element().getTop(); 64 result = this.element().getTop();
67 break; 65 break;
68 case "left": 66 case "left":
69 result = this.element().getLeft(); 67 result = this.element().getLeft();
70 break; 68 break;
71 case "bottom": 69 case "bottom":
72 result = this.element().getBottom(); 70 result = this.element().getBottom();
73 break; 71 break;
74 case "right": 72 case "right":
75 result = this.element().getRight(); 73 result = this.element().getRight();
76 break; 74 break;
77 case "height": 75 case "height":
78 result = this.element().getHeight(); 76 result = this.element().getHeight();
79 break; 77 break;
80 case "width": 78 case "width":
81 result = this.element().getWidth(); 79 result = this.element().getWidth();
82 break; 80 break;
83 } 81 }
84//MochiKit.Logging.logDebug("--- " + this.name() + " [" + anAttribute + "] = " + result); 82//MochiKit.Logging.logDebug("--- " + this.name() + " [" + anAttribute + "] = " + result);
85 83
86 return result; 84 return result;
87 }, 85 },
88 86
89 //----------------------------------------------------- 87 //-----------------------------------------------------
90 88
91 'normalizeConfigureValue': function(aConfigurationValue) { 89 'normalizeConfigureValue': function(aConfigurationValue) {
92 var result; 90 var result;
93 91
94//MochiKit.Logging.logDebug("--- normalizeConfigureValue - " + aConfigurationValue); 92//MochiKit.Logging.logDebug("--- normalizeConfigureValue - " + aConfigurationValue);
95 if (typeof(aConfigurationValue) == 'number') { 93 if (typeof(aConfigurationValue) == 'number') {
96 result = aConfigurationValue; 94 result = aConfigurationValue;
97 } else if (aConfigurationValue == 'auto') { 95 } else if (aConfigurationValue == 'auto') {
98 result = aConfigurationValue; 96 result = aConfigurationValue;
99 } else { 97 } else {
100 var splitValues; 98 var splitValues;
101 var referenceValue; 99 var referenceValue;
102 var deltaValue; 100 var deltaValue;
103 var targetRegion; 101 var targetRegion;
104 var targetAttribute; 102 var targetAttribute;
105 103
106 splitValues = aConfigurationValue.split('+'); 104 splitValues = aConfigurationValue.split('+');
107 referenceValue = Clipperz.Base.trim(splitValues[0]); 105 referenceValue = Clipperz.Base.trim(splitValues[0]);
108 deltaValue = Clipperz.Base.trim(splitValues[1] || ""); 106 deltaValue = Clipperz.Base.trim(splitValues[1] || "");
109 107
110 splitValues = referenceValue.split('.'); 108 splitValues = referenceValue.split('.');
111 targetRegion = splitValues[0]; 109 targetRegion = splitValues[0];
112 targetAttribute = splitValues[1]; 110 targetAttribute = splitValues[1];
113 111
114//MochiKit.Logging.logDebug("> " + aConfigurationValue); 112//MochiKit.Logging.logDebug("> " + aConfigurationValue);
115//MochiKit.Logging.logDebug(">> manager: " + this.manager()); 113//MochiKit.Logging.logDebug(">> manager: " + this.manager());
116//MochiKit.Logging.logDebug(">> targetRegion: " + targetRegion); 114//MochiKit.Logging.logDebug(">> targetRegion: " + targetRegion);
117//MochiKit.Logging.logDebug(">>> " + this.manager().getRegion(targetRegion)); 115//MochiKit.Logging.logDebug(">>> " + this.manager().getRegion(targetRegion));
118 targetValue = this.manager().getRegion(targetRegion).getAttributeValue(targetAttribute); 116 targetValue = this.manager().getRegion(targetRegion).getAttributeValue(targetAttribute);
119//MochiKit.Logging.logDebug(">>>> " + targetRegion + "." + targetAttribute + " + " + deltaValue + " = " + targetValue); 117//MochiKit.Logging.logDebug(">>>> " + targetRegion + "." + targetAttribute + " + " + deltaValue + " = " + targetValue);
120 118
121 result = targetValue + (deltaValue - 0); 119 result = targetValue + (deltaValue - 0);
122 120
123//MochiKit.Logging.logDebug("<<< " + aConfigurationValue + " = " + result); 121//MochiKit.Logging.logDebug("<<< " + aConfigurationValue + " = " + result);
124 } 122 }
125 123
126 return result; 124 return result;
127 }, 125 },
128 126
129 'normalizedConfiguration': function(aConfiguration) { 127 'normalizedConfiguration': function(aConfiguration) {
130 varresult; 128 varresult;
131 varkey; 129 varkey;
132 130
133 result = {}; 131 result = {};
134 132
135//MochiKit.Logging.logDebug("--- normalizedConfiguration - keys: " + Clipperz.Base.serializeJSON(MochiKit.Base.keys(aConfiguration))); 133//MochiKit.Logging.logDebug("--- normalizedConfiguration - keys: " + Clipperz.Base.serializeJSON(MochiKit.Base.keys(aConfiguration)));
136 for (key in aConfiguration) { 134 for (key in aConfiguration) {
137 if ((key == 'top') || (key == 'bottom') || (key == 'left') || (key == 'rigth') || (key == 'width') || (key == 'height')) { 135 if ((key == 'top') || (key == 'bottom') || (key == 'left') || (key == 'rigth') || (key == 'width') || (key == 'height')) {
138 result[key] = this.normalizeConfigureValue(aConfiguration[key]); 136 result[key] = this.normalizeConfigureValue(aConfiguration[key]);
139 } else { 137 } else {
140 result[key] = aConfiguration[key]; 138 result[key] = aConfiguration[key];
141 } 139 }
142 } 140 }
143 141
144 return result; 142 return result;
145 }, 143 },
146 144
147 //----------------------------------------------------- 145 //-----------------------------------------------------
148 146
149 'element': function() { 147 'element': function() {
150 return this.el; 148 return this.el;
151 }, 149 },
152 150
153 //----------------------------------------------------- 151 //-----------------------------------------------------
154/* 152/*
155 'hide': function() { 153 'hide': function() {
156MochiKit.Logging.logDebug(">>> IBLayoutManager.hide()") 154MochiKit.Logging.logDebug(">>> IBLayoutManager.hide()")
157 Clipperz.YUI.IBLayoutRegion.superclass.hide.call(this); 155 Clipperz.YUI.IBLayoutRegion.superclass.hide.call(this);
158 }, 156 },
159*/ 157*/
160 //----------------------------------------------------- 158 //-----------------------------------------------------
161/* 159/*
162 'add': function(aPanel) { 160 'add': function(aPanel) {
163 Clipperz.YUI.IBLayoutRegion.superclass.add.call(this, aPanel); 161 Clipperz.YUI.IBLayoutRegion.superclass.add.call(this, aPanel);
164 aPanel.el.fitToParent(true); 162 aPanel.el.fitToParent(true);
165 }, 163 },
166*/ 164*/
167 //----------------------------------------------------- 165 //-----------------------------------------------------
168 166
169 'updateBox': function(aBox) { 167 'updateBox': function(aBox) {
170//MochiKit.Logging.logDebug(">>> IBLayoutRegion.updateBox - " + aBox); 168//MochiKit.Logging.logDebug(">>> IBLayoutRegion.updateBox - " + aBox);
171 Clipperz.YUI.IBLayoutRegion.superclass.updateBox.call(this, aBox); 169 Clipperz.YUI.IBLayoutRegion.superclass.updateBox.call(this, aBox);
172 }, 170 },
173 171
174 //----------------------------------------------------- 172 //-----------------------------------------------------
175 173
176 'layout': function() { 174 'layout': function() {
177 vartop, left, bottom, right, width, height; 175 vartop, left, bottom, right, width, height;
178 varelement; 176 varelement;
179 var config; 177 var config;
180 var windowSize; 178 var windowSize;
181 var containerSize; 179 var containerSize;
182 180
183//MochiKit.Logging.logDebug(">>> IBLayoutRegion.layout - " + this); 181//MochiKit.Logging.logDebug(">>> IBLayoutRegion.layout - " + this);
184 config = this.normalizedConfiguration(this.configuration()); 182 config = this.normalizedConfiguration(this.configuration());
185 element = this.element(); 183 element = this.element();
186 // containerSize = this.manager().getSize(true); 184 // containerSize = this.manager().getSize(true);
187 containerSize = this.manager().getSize(false); 185 containerSize = this.manager().getSize(false);
188 windowSize = {width: YAHOO.util.Dom.getViewportWidth(), height: YAHOO.util.Dom.getViewportHeight()}; 186 windowSize = {width: YAHOO.util.Dom.getViewportWidth(), height: YAHOO.util.Dom.getViewportHeight()};
189 187
190 // element.setStyle("position", "absolute"); 188 // element.setStyle("position", "absolute");
191 // element.setStyle("overflow", "none"); 189 // element.setStyle("overflow", "none");
192 190
193 if (typeof(config.top) == 'number') { 191 if (typeof(config.top) == 'number') {
194 top = config.top; 192 top = config.top;
195 193
196 if (typeof(config.bottom) == 'number') { 194 if (typeof(config.bottom) == 'number') {
197 height = containerSize.height - top - config.bottom; 195 height = containerSize.height - top - config.bottom;
198 } else if (typeof(config.height) == 'number') { 196 } else if (typeof(config.height) == 'number') {
199 height = config.height; 197 height = config.height;
200 } else { 198 } else {
201 //??? 199 //???
202 } 200 }
203 } else { 201 } else {
204 if ((typeof(config.bottom) == 'number') && (typeof(config.height) == 'number')) { 202 if ((typeof(config.bottom) == 'number') && (typeof(config.height) == 'number')) {
205 top = containerSize.height - (config.height + config.bottom); 203 top = containerSize.height - (config.height + config.bottom);
206 height = config.height; 204 height = config.height;
207 } else if ((config.bottom == 'auto') && (typeof(config.height) == 'number')) { 205 } else if ((config.bottom == 'auto') && (typeof(config.height) == 'number')) {
208 top = ((containerSize.height - config.height) / 2); 206 top = ((containerSize.height - config.height) / 2);
209 height = config.height; 207 height = config.height;
210 } 208 }
211 } 209 }
212 210
213 if (typeof(config.left) == 'number') { 211 if (typeof(config.left) == 'number') {
214 left = config.left; 212 left = config.left;
215 213
216 if (typeof(config.right) == 'number') { 214 if (typeof(config.right) == 'number') {
217 width = (containerSize.width - left - config.right); 215 width = (containerSize.width - left - config.right);
218 } else if (typeof(config.width) == 'number') { 216 } else if (typeof(config.width) == 'number') {
219 width = config.width; 217 width = config.width;
220 } else { 218 } else {
221 //??? 219 //???
222 } 220 }
223 } else { 221 } else {
224 if ((typeof(config.right) == 'number') && (typeof(config.width) == 'number')) { 222 if ((typeof(config.right) == 'number') && (typeof(config.width) == 'number')) {
225 left = containerSize.width - (config.width + config.right); 223 left = containerSize.width - (config.width + config.right);
226 width = config.width; 224 width = config.width;
227 } else if ((config.right == 'auto') && (typeof(config.width) == 'number')) { 225 } else if ((config.right == 'auto') && (typeof(config.width) == 'number')) {
228 left = ((containerSize.width - config.width) / 2); 226 left = ((containerSize.width - config.width) / 2);
229 width = config.width; 227 width = config.width;
230 } 228 }
231 } 229 }
232//MochiKit.Logging.logDebug("--- setting position (top: " + top + ", left: " + left + ", width: " + width + ", height: " + height + ")"); 230//MochiKit.Logging.logDebug("--- setting position (top: " + top + ", left: " + left + ", width: " + width + ", height: " + height + ")");
233 element.setTop(top); 231 element.setTop(top);
234 element.setLeft(left); 232 element.setLeft(left);
235 element.setWidth(width); 233 element.setWidth(width);
236 element.setHeight(height); 234 element.setHeight(height);
237 235
238 if (this.activePanel != null) { 236 if (this.activePanel != null) {
239 this.activePanel.setSize(width, height); 237 this.activePanel.setSize(width, height);
240 } 238 }
241//MochiKit.Logging.logDebug("<<< IBLayoutRegion.layout"); 239//MochiKit.Logging.logDebug("<<< IBLayoutRegion.layout");
242 }, 240 },
243 241
244 //----------------------------------------------------- 242 //-----------------------------------------------------
245 __syntaxFix__: '__syntaxFix__' 243 __syntaxFix__: '__syntaxFix__'
246}); 244});
diff --git a/frontend/beta/js/Clipperz/YUI/MessageBox.js b/frontend/beta/js/Clipperz/YUI/MessageBox.js
index c7b4702..8b8ca7f 100644
--- a/frontend/beta/js/Clipperz/YUI/MessageBox.js
+++ b/frontend/beta/js/Clipperz/YUI/MessageBox.js
@@ -1,262 +1,260 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* You should have received a copy of the GNU Affero General Public 19* You should have received a copy of the GNU Affero General Public
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26Clipperz.YUI.MessageBox = function(){ 24Clipperz.YUI.MessageBox = function(){
27 var dlg, opt, mask; 25 var dlg, opt, mask;
28 var bodyEl, msgEl, textboxEl, textareaEl, progressEl, pp; 26 var bodyEl, msgEl, textboxEl, textareaEl, progressEl, pp;
29 var buttons, activeTextEl, bwidth; 27 var buttons, activeTextEl, bwidth;
30 28
31 var handleButton = function(button){ 29 var handleButton = function(button){
32 if(typeof opt.fn == 'function'){ 30 if(typeof opt.fn == 'function'){
33 if(opt.fn.call(opt.scope||window, button, activeTextEl.dom.value) !== false){ 31 if(opt.fn.call(opt.scope||window, button, activeTextEl.dom.value) !== false){
34 dlg.hide(); 32 dlg.hide();
35 } 33 }
36 }else{ 34 }else{
37 dlg.hide(); 35 dlg.hide();
38 } 36 }
39 }; 37 };
40 38
41 return { 39 return {
42 updateButtons: function(b){ 40 updateButtons: function(b){
43 var width = 0; 41 var width = 0;
44 if(!b){ 42 if(!b){
45 buttons['ok'].hide(); 43 buttons['ok'].hide();
46 buttons['cancel'].hide(); 44 buttons['cancel'].hide();
47 buttons['yes'].hide(); 45 buttons['yes'].hide();
48 buttons['no'].hide(); 46 buttons['no'].hide();
49 return width; 47 return width;
50 } 48 }
51 for(var k in buttons){ 49 for(var k in buttons){
52 if(typeof buttons[k] != 'function'){ 50 if(typeof buttons[k] != 'function'){
53 if(b[k]){ 51 if(b[k]){
54 buttons[k].show(); 52 buttons[k].show();
55 buttons[k].setText(typeof b[k] == 'string' ? b[k] : YAHOO.ext.MessageBox.buttonText[k]); 53 buttons[k].setText(typeof b[k] == 'string' ? b[k] : YAHOO.ext.MessageBox.buttonText[k]);
56 width += buttons[k].el.getWidth()+15; 54 width += buttons[k].el.getWidth()+15;
57 }else{ 55 }else{
58 buttons[k].hide(); 56 buttons[k].hide();
59 } 57 }
60 } 58 }
61 } 59 }
62 return width; 60 return width;
63 }, 61 },
64 62
65 getDialog : function(){ 63 getDialog : function(){
66 if(!dlg){ 64 if(!dlg){
67 dlg = new YAHOO.ext.BasicDialog('mb-dlg', { 65 dlg = new YAHOO.ext.BasicDialog('mb-dlg', {
68 autoCreate:true, 66 autoCreate:true,
69 shadow:true, 67 shadow:true,
70 draggable:true, 68 draggable:true,
71 resizable:false, 69 resizable:false,
72 constraintoviewport:true, 70 constraintoviewport:true,
73 fixedcenter:true, 71 fixedcenter:true,
74 shim:true, 72 shim:true,
75 modal:true, 73 modal:true,
76 width:400, height:100, 74 width:400, height:100,
77 buttonAlign:'center', 75 buttonAlign:'center',
78 closeClick : function(){ 76 closeClick : function(){
79 if(opt && opt.buttons && opt.buttons.no && !opt.buttons.cancel){ 77 if(opt && opt.buttons && opt.buttons.no && !opt.buttons.cancel){
80 handleButton('no'); 78 handleButton('no');
81 }else{ 79 }else{
82 handleButton('cancel'); 80 handleButton('cancel');
83 } 81 }
84 } 82 }
85 }); 83 });
86 dlg.closeClick = function(){ 84 dlg.closeClick = function(){
87 alert('wtf'); 85 alert('wtf');
88 }; 86 };
89 mask = dlg.mask; 87 mask = dlg.mask;
90 dlg.addKeyListener(27, dlg.hide, dlg); 88 dlg.addKeyListener(27, dlg.hide, dlg);
91 buttons = {}; 89 buttons = {};
92 buttons['ok'] = dlg.addButton(this.buttonText['ok'], handleButton.createCallback('ok')); 90 buttons['ok'] = dlg.addButton(this.buttonText['ok'], handleButton.createCallback('ok'));
93 buttons['yes'] = dlg.addButton(this.buttonText['yes'], handleButton.createCallback('yes')); 91 buttons['yes'] = dlg.addButton(this.buttonText['yes'], handleButton.createCallback('yes'));
94 buttons['no'] = dlg.addButton(this.buttonText['no'], handleButton.createCallback('no')); 92 buttons['no'] = dlg.addButton(this.buttonText['no'], handleButton.createCallback('no'));
95 buttons['cancel'] = dlg.addButton(this.buttonText['cancel'], handleButton.createCallback('cancel')); 93 buttons['cancel'] = dlg.addButton(this.buttonText['cancel'], handleButton.createCallback('cancel'));
96 bodyEl = dlg.body.createChild({ 94 bodyEl = dlg.body.createChild({
97 tag:'div', 95 tag:'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>' 96 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>'
99 }); 97 });
100 msgEl = bodyEl.dom.firstChild; 98 msgEl = bodyEl.dom.firstChild;
101 textboxEl = getEl(bodyEl.dom.childNodes[2]); 99 textboxEl = getEl(bodyEl.dom.childNodes[2]);
102 textboxEl.enableDisplayMode(); 100 textboxEl.enableDisplayMode();
103 textboxEl.addKeyListener([10,13], function(){ 101 textboxEl.addKeyListener([10,13], function(){
104 if(dlg.isVisible() && opt && opt.buttons){ 102 if(dlg.isVisible() && opt && opt.buttons){
105 if(opt.buttons.ok){ 103 if(opt.buttons.ok){
106 handleButton('ok'); 104 handleButton('ok');
107 }else if(opt.buttons.yes){ 105 }else if(opt.buttons.yes){
108 handleButton('yes'); 106 handleButton('yes');
109 } 107 }
110 } 108 }
111 }); 109 });
112 textareaEl = getEl(bodyEl.dom.childNodes[3]); 110 textareaEl = getEl(bodyEl.dom.childNodes[3]);
113 textareaEl.enableDisplayMode(); 111 textareaEl.enableDisplayMode();
114 progressEl = getEl(bodyEl.dom.childNodes[4]); 112 progressEl = getEl(bodyEl.dom.childNodes[4]);
115 progressEl.enableDisplayMode(); 113 progressEl.enableDisplayMode();
116 pp = getEl(progressEl.dom.firstChild.firstChild); 114 pp = getEl(progressEl.dom.firstChild.firstChild);
117 } 115 }
118 return dlg; 116 return dlg;
119 }, 117 },
120 118
121 updateText : function(text){ 119 updateText : function(text){
122 if(!dlg.isVisible() && !opt.width){ 120 if(!dlg.isVisible() && !opt.width){
123 dlg.resizeTo(this.maxWidth, 100); // resize first so content is never clipped from previous shows 121 dlg.resizeTo(this.maxWidth, 100); // resize first so content is never clipped from previous shows
124 } 122 }
125 msgEl.innerHTML = text; 123 msgEl.innerHTML = text;
126 var w = Math.max(Math.min(opt.width || msgEl.offsetWidth, this.maxWidth), 124 var w = Math.max(Math.min(opt.width || msgEl.offsetWidth, this.maxWidth),
127 Math.max(opt.minWidth || this.minWidth, bwidth)); 125 Math.max(opt.minWidth || this.minWidth, bwidth));
128 if(opt.prompt){ 126 if(opt.prompt){
129 activeTextEl.setWidth(w); 127 activeTextEl.setWidth(w);
130 } 128 }
131 dlg.setContentSize(w, bodyEl.getHeight()); 129 dlg.setContentSize(w, bodyEl.getHeight());
132 }, 130 },
133 131
134 updateProgress : function(value, text){ 132 updateProgress : function(value, text){
135 if(text){ 133 if(text){
136 this.updateText(text); 134 this.updateText(text);
137 } 135 }
138 pp.setWidth(value*progressEl.dom.firstChild.offsetWidth); 136 pp.setWidth(value*progressEl.dom.firstChild.offsetWidth);
139 }, 137 },
140 138
141 isVisible : function(){ 139 isVisible : function(){
142 return dlg && dlg.isVisible(); 140 return dlg && dlg.isVisible();
143 }, 141 },
144 142
145 hide : function(){ 143 hide : function(){
146 if(this.isVisible()){ 144 if(this.isVisible()){
147 dlg.hide(); 145 dlg.hide();
148 } 146 }
149 }, 147 },
150 148
151 show : function(options){ 149 show : function(options){
152 var d = this.getDialog(); 150 var d = this.getDialog();
153 opt = options; 151 opt = options;
154 d.setTitle(opt.title || '&#160;'); 152 d.setTitle(opt.title || '&#160;');
155 d.close.setDisplayed(opt.closable !== false); 153 d.close.setDisplayed(opt.closable !== false);
156 activeTextEl = textboxEl; 154 activeTextEl = textboxEl;
157 opt.prompt = opt.prompt || (opt.multiline ? true : false) 155 opt.prompt = opt.prompt || (opt.multiline ? true : false)
158 if(opt.prompt){ 156 if(opt.prompt){
159 if(opt.multiline){ 157 if(opt.multiline){
160 textboxEl.hide(); 158 textboxEl.hide();
161 textareaEl.show(); 159 textareaEl.show();
162 textareaEl.setHeight(typeof opt.multiline == 'number' ? 160 textareaEl.setHeight(typeof opt.multiline == 'number' ?
163 opt.multiline : this.defaultTextHeight); 161 opt.multiline : this.defaultTextHeight);
164 activeTextEl = textareaEl; 162 activeTextEl = textareaEl;
165 }else{ 163 }else{
166 textboxEl.show(); 164 textboxEl.show();
167 textareaEl.hide(); 165 textareaEl.hide();
168 } 166 }
169 }else{ 167 }else{
170 textboxEl.hide(); 168 textboxEl.hide();
171 textareaEl.hide(); 169 textareaEl.hide();
172 } 170 }
173 progressEl.setDisplayed(opt.progress === true); 171 progressEl.setDisplayed(opt.progress === true);
174 this.updateProgress(0); 172 this.updateProgress(0);
175 activeTextEl.dom.value = opt.value || ''; 173 activeTextEl.dom.value = opt.value || '';
176 if(opt.prompt){ 174 if(opt.prompt){
177 dlg.setDefaultButton(activeTextEl); 175 dlg.setDefaultButton(activeTextEl);
178 }else{ 176 }else{
179 var bs = opt.buttons; 177 var bs = opt.buttons;
180 var db = null; 178 var db = null;
181 if(bs && bs.ok){ 179 if(bs && bs.ok){
182 db = buttons['ok']; 180 db = buttons['ok'];
183 }else if(bs && bs.yes){ 181 }else if(bs && bs.yes){
184 db = buttons['yes']; 182 db = buttons['yes'];
185 } 183 }
186 dlg.setDefaultButton(db); 184 dlg.setDefaultButton(db);
187 } 185 }
188 bwidth = this.updateButtons(opt.buttons); 186 bwidth = this.updateButtons(opt.buttons);
189 this.updateText(opt.msg); 187 this.updateText(opt.msg);
190 d.modal = opt.modal !== false; 188 d.modal = opt.modal !== false;
191 d.mask = opt.modal !== false ? mask : false; 189 d.mask = opt.modal !== false ? mask : false;
192 d.animateTarget = null; 190 d.animateTarget = null;
193 d.show(options.animEl); 191 d.show(options.animEl);
194 }, 192 },
195 193
196 progress : function(title, msg){ 194 progress : function(title, msg){
197 this.show({ 195 this.show({
198 title : title, 196 title : title,
199 msg : msg, 197 msg : msg,
200 buttons: false, 198 buttons: false,
201 progress:true, 199 progress:true,
202 closable:false 200 closable:false
203 }); 201 });
204 }, 202 },
205 203
206 progressElement : function() { 204 progressElement : function() {
207 return progressEl; 205 return progressEl;
208 }, 206 },
209 207
210 opt: function() { 208 opt: function() {
211 return opt; 209 return opt;
212 }, 210 },
213 211
214 alert : function(title, msg, fn, scope){ 212 alert : function(title, msg, fn, scope){
215 this.show({ 213 this.show({
216 title : title, 214 title : title,
217 msg : msg, 215 msg : msg,
218 buttons: this.OK, 216 buttons: this.OK,
219 fn: fn, 217 fn: fn,
220 scope : scope 218 scope : scope
221 }); 219 });
222 }, 220 },
223 221
224 confirm : function(title, msg, fn, scope){ 222 confirm : function(title, msg, fn, scope){
225 this.show({ 223 this.show({
226 title : title, 224 title : title,
227 msg : msg, 225 msg : msg,
228 buttons: this.YESNO, 226 buttons: this.YESNO,
229 fn: fn, 227 fn: fn,
230 scope : scope 228 scope : scope
231 }); 229 });
232 }, 230 },
233 231
234 prompt : function(title, msg, fn, scope, multiline){ 232 prompt : function(title, msg, fn, scope, multiline){
235 this.show({ 233 this.show({
236 title : title, 234 title : title,
237 msg : msg, 235 msg : msg,
238 buttons: this.OKCANCEL, 236 buttons: this.OKCANCEL,
239 fn: fn, 237 fn: fn,
240 minWidth:250, 238 minWidth:250,
241 scope : scope, 239 scope : scope,
242 prompt:true, 240 prompt:true,
243 multiline: multiline 241 multiline: multiline
244 }); 242 });
245 }, 243 },
246 244
247 OK : {ok:true}, 245 OK : {ok:true},
248 YESNO : {yes:true, no:true}, 246 YESNO : {yes:true, no:true},
249 OKCANCEL : {ok:true, cancel:true}, 247 OKCANCEL : {ok:true, cancel:true},
250 YESNOCANCEL : {yes:true, no:true, cancel:true}, 248 YESNOCANCEL : {yes:true, no:true, cancel:true},
251 249
252 defaultTextHeight:75, 250 defaultTextHeight:75,
253 maxWidth : 500, 251 maxWidth : 500,
254 minWidth : 100, 252 minWidth : 100,
255 buttonText : { 253 buttonText : {
256 ok : 'OK', 254 ok : 'OK',
257 cancel : 'Cancel', 255 cancel : 'Cancel',
258 yes : 'Yes', 256 yes : 'Yes',
259 no : 'No' 257 no : 'No'
260 } 258 }
261 }; 259 };
262}(); 260}();