summaryrefslogtreecommitdiff
path: root/frontend/gamma/js/Clipperz/PM/DataModel
Unidiff
Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/DataModel') (more/less context) (ignore whitespace changes)
-rw-r--r--frontend/gamma/js/Clipperz/PM/DataModel/DirectLogin.js34
-rw-r--r--frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginBinding.js22
-rw-r--r--frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginFormValue.js23
-rw-r--r--frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginInput.js30
-rw-r--r--frontend/gamma/js/Clipperz/PM/DataModel/EncryptedRemoteObject.js26
-rw-r--r--frontend/gamma/js/Clipperz/PM/DataModel/OneTimePassword.js66
-rw-r--r--frontend/gamma/js/Clipperz/PM/DataModel/Record.Version.Field.js22
-rw-r--r--frontend/gamma/js/Clipperz/PM/DataModel/Record.Version.js25
-rw-r--r--frontend/gamma/js/Clipperz/PM/DataModel/Record.js44
-rw-r--r--frontend/gamma/js/Clipperz/PM/DataModel/User.Header.Legacy.js22
-rw-r--r--frontend/gamma/js/Clipperz/PM/DataModel/User.Header.OneTimePasswords.js28
-rw-r--r--frontend/gamma/js/Clipperz/PM/DataModel/User.Header.Preferences.js22
-rw-r--r--frontend/gamma/js/Clipperz/PM/DataModel/User.Header.RecordIndex.js39
-rw-r--r--frontend/gamma/js/Clipperz/PM/DataModel/User.js24
14 files changed, 165 insertions, 262 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/DirectLogin.js b/frontend/gamma/js/Clipperz/PM/DataModel/DirectLogin.js
index 8f8696d..507ee31 100644
--- a/frontend/gamma/js/Clipperz/PM/DataModel/DirectLogin.js
+++ b/frontend/gamma/js/Clipperz/PM/DataModel/DirectLogin.js
@@ -1,24 +1,22 @@
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*/
@@ -330,5 +328,5 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.DirectLogin, Object, {
330 fixedConfiguration = Clipperz.Base.deepClone(aConfiguration); 328 fixedConfiguration = Clipperz.Base.deepClone(aConfiguration);
331 329
332//console.log("PROCESS CONFIGURATION", aConfiguration); 330//Clipperz.log("PROCESS CONFIGURATION", aConfiguration);
333 switch (aConfiguration['bookmarkletVersion']) { 331 switch (aConfiguration['bookmarkletVersion']) {
334 case '0.1': 332 case '0.1':
@@ -482,8 +480,7 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.DirectLogin, Object, {
482 480
483 bookmarkletConfiguration = Clipperz.PM.DataModel.DirectLogin.checkBookmarkletConfiguration(aValue); 481 bookmarkletConfiguration = Clipperz.PM.DataModel.DirectLogin.checkBookmarkletConfiguration(aValue);
484//console.log("BOOKMARKLET CONFIGURATION", bookmarkletConfiguration); 482
485 return Clipperz.Async.callbacks("DirectLogin.setBookmarkletConfiguration", [ 483 return Clipperz.Async.callbacks("DirectLogin.setBookmarkletConfiguration", [
486 MochiKit.Base.method(this, 'setValue', 'formData', bookmarkletConfiguration['form']), 484 MochiKit.Base.method(this, 'setValue', 'formData', bookmarkletConfiguration['form']),
487//function (aValue) { console.log("SET VALUE - formData", aValue); return aValue; },
488 MochiKit.Base.method(this, 'setValue', 'bookmarkletVersion', bookmarkletConfiguration['version']), 485 MochiKit.Base.method(this, 'setValue', 'bookmarkletVersion', bookmarkletConfiguration['version']),
489 486
@@ -537,8 +534,5 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.DirectLogin, Object, {
537 'updateInputsAfterChangingBookmarkletConfiguration': function () { 534 'updateInputsAfterChangingBookmarkletConfiguration': function () {
538 return Clipperz.Async.callbacks("DirectLogin.updateInputsAfterChangingBookmarkletConfiguration", [ 535 return Clipperz.Async.callbacks("DirectLogin.updateInputsAfterChangingBookmarkletConfiguration", [
539 // MochiKit.Base.method(this, 'getValue', ''),
540//function (aValue) { console.log("VALUE", aValue); return aValue },
541 MochiKit.Base.method(this, 'getValue', 'formData'), 536 MochiKit.Base.method(this, 'getValue', 'formData'),
542//function (aValue) { console.log("FORM DATA", aValue); return aValue },
543 MochiKit.Base.method(this, 'setInputWithFormDataConfiguration') 537 MochiKit.Base.method(this, 'setInputWithFormDataConfiguration')
544 ], {trace:false}); 538 ], {trace:false});
@@ -551,5 +545,4 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.DirectLogin, Object, {
551 MochiKit.Base.method(this, 'inputs'), 545 MochiKit.Base.method(this, 'inputs'),
552 MochiKit.Base.values, 546 MochiKit.Base.values,
553 //function (aValue) { console.log("INPUTS", aValue); return aValue; },
554 MochiKit.Base.partial(MochiKit.Base.map, MochiKit.Base.partial(MochiKit.Base.method(this, 'inputValue'))), 547 MochiKit.Base.partial(MochiKit.Base.map, MochiKit.Base.partial(MochiKit.Base.method(this, 'inputValue'))),
555 Clipperz.Async.collectAll, 548 Clipperz.Async.collectAll,
@@ -675,5 +668,4 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.DirectLogin, Object, {
675 this._bindings[anInput.name()] = newBinding; 668 this._bindings[anInput.name()] = newBinding;
676 }, this)) 669 }, this))
677//console.log("THIS._BINDINGS", this._bindings);
678 670
679 return newBindingValues; 671 return newBindingValues;
@@ -681,5 +673,4 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.DirectLogin, Object, {
681/* 673/*
682 this._bindings = {}; 674 this._bindings = {};
683//console.log("CONFIGURATION", aConfiguration);
684 675
685 if (someValues['currentValues'] != null) { 676 if (someValues['currentValues'] != null) {
@@ -687,5 +678,4 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.DirectLogin, Object, {
687 var bindingKey; 678 var bindingKey;
688 679
689//console.log("BINDING DATA", someValues['currentValues']['bindingData']);
690 for (bindingKey in someValues['currentValues']['bindingData']) { 680 for (bindingKey in someValues['currentValues']['bindingData']) {
691 var newBinding; 681 var newBinding;
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginBinding.js b/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginBinding.js
index 4377853..a8ebb97 100644
--- a/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginBinding.js
+++ b/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginBinding.js
@@ -1,24 +1,22 @@
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*/
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginFormValue.js b/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginFormValue.js
index a461197..2429f88 100644
--- a/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginFormValue.js
+++ b/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginFormValue.js
@@ -1,24 +1,22 @@
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*/
@@ -88,5 +86,4 @@ Clipperz.PM.DataModel.DirectLoginFormValue.prototype = MochiKit.Base.update(null
88 86
89 'setValue': function (aValue) { 87 'setValue': function (aValue) {
90//console.log("DirectLoginFormValue.setValue", aValue);
91 this._value = aValue; 88 this._value = aValue;
92 return this.directLogin().setValue('formValues' + '.' + this.key(), aValue); 89 return this.directLogin().setValue('formValues' + '.' + this.key(), aValue);
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginInput.js b/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginInput.js
index 8188389..d9995fc 100644
--- a/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginInput.js
+++ b/frontend/gamma/js/Clipperz/PM/DataModel/DirectLoginInput.js
@@ -1,24 +1,22 @@
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*/
@@ -77,5 +75,5 @@ Clipperz.PM.DataModel.DirectLoginInput.prototype = MochiKit.Base.update(null, {
77 'formConfiguration': function(someFormValues, someBindings, someFields) { 75 'formConfiguration': function(someFormValues, someBindings, someFields) {
78 var result; 76 var result;
79//console.log("### DirectLoginInput.formConfiguration", someFields); 77
80 if (this.shouldSetValue()) { 78 if (this.shouldSetValue()) {
81 switch (this.type()) { 79 switch (this.type()) {
@@ -155,10 +153,4 @@ Clipperz.PM.DataModel.DirectLoginInput.prototype = MochiKit.Base.update(null, {
155 binding = someBindings[this.name()]; 153 binding = someBindings[this.name()];
156 154
157//console.log("### binding", binding);
158//if (binding != null) {
159 ///console.log(" binding.field()", binding.field());
160 ///console.log(" binding.field().value()", binding.field().value());
161 //console.log(" someFields[binding.fieldKey()].value()", someFields[binding.fieldKey()].value());
162//}
163 result = MochiKit.DOM.INPUT({ 155 result = MochiKit.DOM.INPUT({
164 type:((this.type() != 'password') ? this.type() : 'text'), 156 type:((this.type() != 'password') ? this.type() : 'text'),
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/EncryptedRemoteObject.js b/frontend/gamma/js/Clipperz/PM/DataModel/EncryptedRemoteObject.js
index cdeec8b..1aa7a52 100644
--- a/frontend/gamma/js/Clipperz/PM/DataModel/EncryptedRemoteObject.js
+++ b/frontend/gamma/js/Clipperz/PM/DataModel/EncryptedRemoteObject.js
@@ -1,24 +1,22 @@
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*/
@@ -412,8 +410,4 @@ Clipperz.PM.DataModel.EncryptedRemoteObject.prototype = MochiKit.Base.update(nul
412 }); 410 });
413 deferredResult.addCallback(function (someValues) { 411 deferredResult.addCallback(function (someValues) {
414//if (someValues['decryptedData'] != someValues['objectData']) {
415 //console.log("ORIGINAL DATA", '[[[' + someValues['decryptedData'] + ']]]');
416 //console.log("CURRENT DATA", '>>>' + someValues['objectData'] + '<<<');
417//}
418 return (someValues['decryptedData'] != someValues['objectData']); 412 return (someValues['decryptedData'] != someValues['objectData']);
419 }); 413 });
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/OneTimePassword.js b/frontend/gamma/js/Clipperz/PM/DataModel/OneTimePassword.js
index 834e21b..fbca1ff 100644
--- a/frontend/gamma/js/Clipperz/PM/DataModel/OneTimePassword.js
+++ b/frontend/gamma/js/Clipperz/PM/DataModel/OneTimePassword.js
@@ -1,24 +1,22 @@
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*/
@@ -144,10 +142,10 @@ Clipperz.PM.DataModel.OneTimePassword.prototype = MochiKit.Base.update(null, {
144 142
145 encodedPassphrase = new Clipperz.ByteArray(this.user().passphrase()).toBase64String(); 143 encodedPassphrase = new Clipperz.ByteArray(this.user().passphrase()).toBase64String();
146//MochiKit.Logging.logDebug("--- encodedPassphrase.length: " + encodedPassphrase.length); 144//Clipperz.logDebug("--- encodedPassphrase.length: " + encodedPassphrase.length);
147 prefixPadding = getRandomBytes(getRandomBytes(1).byteAtIndex(0)).toBase64String(); 145 prefixPadding = getRandomBytes(getRandomBytes(1).byteAtIndex(0)).toBase64String();
148//MochiKit.Logging.logDebug("--- prefixPadding.length: " + prefixPadding.length); 146//Clipperz.logDebug("--- prefixPadding.length: " + prefixPadding.length);
149 suffixPadding = getRandomBytes((500 - prefixPadding.length - encodedPassphrase.length) * 6 / 8).toBase64String(); 147 suffixPadding = getRandomBytes((500 - prefixPadding.length - encodedPassphrase.length) * 6 / 8).toBase64String();
150//MochiKit.Logging.logDebug("--- suffixPadding.length: " + suffixPadding.length); 148//Clipperz.logDebug("--- suffixPadding.length: " + suffixPadding.length);
151//MochiKit.Logging.logDebug("--- total.length: " + (prefixPadding.length + encodedPassphrase.length + suffixPadding.length)); 149//Clipperz.logDebug("--- total.length: " + (prefixPadding.length + encodedPassphrase.length + suffixPadding.length));
152 150
153 packedPassphrase = { 151 packedPassphrase = {
@@ -159,6 +157,6 @@ Clipperz.PM.DataModel.OneTimePassword.prototype = MochiKit.Base.update(null, {
159 // result = Clipperz.Base.serializeJSON(packedPassphrase); 157 // result = Clipperz.Base.serializeJSON(packedPassphrase);
160 result = packedPassphrase; 158 result = packedPassphrase;
161//MochiKit.Logging.logDebug("===== OTP packedPassprase: [" + result.length + "]" + result); 159//Clipperz.logDebug("===== OTP packedPassprase: [" + result.length + "]" + result);
162//MochiKit.Logging.logDebug("<<< OneTimePassword.packedPassphrase"); 160//Clipperz.logDebug("<<< OneTimePassword.packedPassphrase");
163 161
164 return result; 162 return result;
@@ -177,6 +175,6 @@ Clipperz.PM.DataModel.OneTimePassword.prototype = MochiKit.Base.update(null, {
177 varresult; 175 varresult;
178 176
179//MochiKit.Logging.logDebug(">>> OneTimePassword.encryptedData"); 177//Clipperz.logDebug(">>> OneTimePassword.encryptedData");
180//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - id: " + this.reference()); 178//Clipperz.logDebug("--- OneTimePassword.encryptedData - id: " + this.reference());
181 result = { 179 result = {
182 'reference': this.reference(), 180 'reference': this.reference(),
@@ -186,20 +184,20 @@ Clipperz.PM.DataModel.OneTimePassword.prototype = MochiKit.Base.update(null, {
186 'version': Clipperz.PM.Crypto.encryptingFunctions.currentVersion 184 'version': Clipperz.PM.Crypto.encryptingFunctions.currentVersion
187 } 185 }
188//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 2: " + Clipperz.Base.serializeJSON(result)); 186//Clipperz.logDebug("--- OneTimePassword.encryptedData - 2: " + Clipperz.Base.serializeJSON(result));
189 deferredResult = new MochiKit.Async.Deferred(); 187 deferredResult = new MochiKit.Async.Deferred();
190//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 3"); 188//Clipperz.logDebug("--- OneTimePassword.encryptedData - 3");
191//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.encryptedData - 1: " + res); return res;}); 189//deferredResult.addBoth(function(res) {Clipperz.logDebug("OneTimePassword.encryptedData - 1: " + res); return res;});
192 //# deferredResult.addCallback(Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion, this.passwordValue(), this.packedPassphrase()); 190 //# deferredResult.addCallback(Clipperz.PM.Crypto.deferredEncryptWithCurrentVersion, this.passwordValue(), this.packedPassphrase());
193 deferredResult.addCallback(MochiKit.Base.method(this, 'encryptedPackedPassphrase')); 191 deferredResult.addCallback(MochiKit.Base.method(this, 'encryptedPackedPassphrase'));
194//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 4"); 192//Clipperz.logDebug("--- OneTimePassword.encryptedData - 4");
195//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.encryptedData - 2: [" + res.length + "]" + res); return res;}); 193//deferredResult.addBoth(function(res) {Clipperz.logDebug("OneTimePassword.encryptedData - 2: [" + res.length + "]" + res); return res;});
196 deferredResult.addCallback(function(aResult, res) { 194 deferredResult.addCallback(function(aResult, res) {
197 aResult['data'] = res; 195 aResult['data'] = res;
198 return aResult; 196 return aResult;
199 }, result); 197 }, result);
200//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 5"); 198//Clipperz.logDebug("--- OneTimePassword.encryptedData - 5");
201//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.encryptedData - 3: " + Clipperz.Base.serializeJSON(res)); return res;}); 199//deferredResult.addBoth(function(res) {Clipperz.logDebug("OneTimePassword.encryptedData - 3: " + Clipperz.Base.serializeJSON(res)); return res;});
202 deferredResult.callback(); 200 deferredResult.callback();
203//MochiKit.Logging.logDebug("--- OneTimePassword.encryptedData - 6"); 201//Clipperz.logDebug("--- OneTimePassword.encryptedData - 6");
204 202
205 return deferredResult; 203 return deferredResult;
@@ -212,5 +210,5 @@ Clipperz.PM.DataModel.OneTimePassword.prototype = MochiKit.Base.update(null, {
212 varresult; 210 varresult;
213 211
214//MochiKit.Logging.logDebug(">>> OneTimePassword.saveChanges"); 212//Clipperz.logDebug(">>> OneTimePassword.saveChanges");
215 result = {}; 213 result = {};
216 deferredResult = new MochiKit.Async.Deferred(); 214 deferredResult = new MochiKit.Async.Deferred();
@@ -231,14 +229,14 @@ Clipperz.PM.DataModel.OneTimePassword.prototype = MochiKit.Base.update(null, {
231 229
232 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_sendingData'); 230 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_sendingData');
233//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.saveChanges - 1: " + Clipperz.Base.serializeJSON(res)); return res;}); 231//deferredResult.addBoth(function(res) {Clipperz.logDebug("OneTimePassword.saveChanges - 1: " + Clipperz.Base.serializeJSON(res)); return res;});
234 deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'addNewOneTimePassword'); 232 deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'addNewOneTimePassword');
235 233
236 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_updatingInterface'); 234 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'saveOTP_updatingInterface');
237//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.saveChanges - 2: " + res); return res;}); 235//deferredResult.addBoth(function(res) {Clipperz.logDebug("OneTimePassword.saveChanges - 2: " + res); return res;});
238 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'notify', 'OTPUpdated'); 236 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'notify', 'OTPUpdated');
239 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'oneTimePassword_saveChanges_done', null); 237 deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'oneTimePassword_saveChanges_done', null);
240//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OneTimePassword.saveChanges - 2: " + res); return res;}); 238//deferredResult.addBoth(function(res) {Clipperz.logDebug("OneTimePassword.saveChanges - 2: " + res); return res;});
241 deferredResult.callback(); 239 deferredResult.callback();
242//MochiKit.Logging.logDebug("<<< OneTimePassword.saveChanges"); 240//Clipperz.logDebug("<<< OneTimePassword.saveChanges");
243 241
244 return deferredResult; 242 return deferredResult;
@@ -309,5 +307,4 @@ Clipperz.PM.DataModel.OneTimePassword.isValidOneTimePasswordValue = function(aPa
309 307
310 //"yaxx k7ww - f8y6 tqz5 - 58b6 th44 - 9cwv q0fg" 308 //"yaxx k7ww - f8y6 tqz5 - 58b6 th44 - 9cwv q0fg"
311//console.log("Clipperz.PM.DataModel.OneTimePassword.isValidOneTimePasswordValue", aPassword);
312 if (aPassword.replace(/[\s\-]/g, '').length == 32) { 309 if (aPassword.replace(/[\s\-]/g, '').length == 32) {
313 try { 310 try {
@@ -348,5 +345,4 @@ Clipperz.PM.DataModel.OneTimePassword.normalizedOneTimePassword = function(aPass
348 } 345 }
349 346
350//console.log("Clipperz.PM.DataModel.OneTimePassword.normalizedOneTimePassword", aPassword, result);
351 return result; 347 return result;
352} 348}
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/Record.Version.Field.js b/frontend/gamma/js/Clipperz/PM/DataModel/Record.Version.Field.js
index f51bbc2..986db40 100644
--- a/frontend/gamma/js/Clipperz/PM/DataModel/Record.Version.Field.js
+++ b/frontend/gamma/js/Clipperz/PM/DataModel/Record.Version.Field.js
@@ -1,24 +1,22 @@
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*/
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/Record.Version.js b/frontend/gamma/js/Clipperz/PM/DataModel/Record.Version.js
index dd35fc9..87b319c 100644
--- a/frontend/gamma/js/Clipperz/PM/DataModel/Record.Version.js
+++ b/frontend/gamma/js/Clipperz/PM/DataModel/Record.Version.js
@@ -1,24 +1,22 @@
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*/
@@ -29,5 +27,4 @@ try { if (typeof(Clipperz.PM.DataModel.Record) == 'undefined') { throw ""; }} ca
29 27
30Clipperz.PM.DataModel.Record.Version = function(args) { 28Clipperz.PM.DataModel.Record.Version = function(args) {
31//console.log(">>> Record.new");
32 Clipperz.PM.DataModel.Record.Version.superclass.constructor.apply(this, arguments); 29 Clipperz.PM.DataModel.Record.Version.superclass.constructor.apply(this, arguments);
33 30
@@ -100,5 +97,4 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record.Version, Clipperz.PM.DataModel
100 varresult; 97 varresult;
101 98
102//console.log("Record.Version - UNPACK DATA", this, someData);
103 result = someData; 99 result = someData;
104 if ((someData['fields'] != null) && (someData['fields'] instanceof Array)) { 100 if ((someData['fields'] != null) && (someData['fields'] instanceof Array)) {
@@ -293,5 +289,4 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record.Version, Clipperz.PM.DataModel
293 result = {}; 289 result = {};
294 290
295//console.log("prepareRemoteDataWithKey", aKey);
296 deferredResult = new Clipperz.Async.Deferred("Record.Version.prepareRemoteDataWithKey", {trace:false}); 291 deferredResult = new Clipperz.Async.Deferred("Record.Version.prepareRemoteDataWithKey", {trace:false});
297 if (this.isBrandNew() == false) { 292 if (this.isBrandNew() == false) {
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/Record.js b/frontend/gamma/js/Clipperz/PM/DataModel/Record.js
index b816f80..3fc1813 100644
--- a/frontend/gamma/js/Clipperz/PM/DataModel/Record.js
+++ b/frontend/gamma/js/Clipperz/PM/DataModel/Record.js
@@ -1,24 +1,22 @@
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*/
@@ -30,5 +28,4 @@ if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {};
30 28
31Clipperz.PM.DataModel.Record = function(args) { 29Clipperz.PM.DataModel.Record = function(args) {
32//console.log(">>> new Clipperz.PM.DataModel.Record", args);
33 Clipperz.PM.DataModel.Record.superclass.constructor.apply(this, arguments); 30 Clipperz.PM.DataModel.Record.superclass.constructor.apply(this, arguments);
34 31
@@ -63,6 +60,4 @@ Clipperz.PM.DataModel.Record = function(args) {
63 } 60 }
64 61
65//console.log("<<< new Clipperz.PM.DataModel.Record", args);
66
67 return this; 62 return this;
68} 63}
@@ -211,5 +206,4 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.Encrypt
211 var deferredResult; 206 var deferredResult;
212 207
213//console.log(">>> searchableContent");
214 deferredResult = new Clipperz.Async.Deferred("Record.searchableContent", {trace:false}); 208 deferredResult = new Clipperz.Async.Deferred("Record.searchableContent", {trace:false});
215 209
@@ -225,5 +219,4 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.Encrypt
225 }); 219 });
226 deferredResult.callback(); 220 deferredResult.callback();
227//console.log("<<< searchableContent");
228 221
229 return deferredResult; 222 return deferredResult;
@@ -271,5 +264,4 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.Encrypt
271 if (this.transientState().getValue('directLogins') == null) { 264 if (this.transientState().getValue('directLogins') == null) {
272 // this.transientState().setValue('directLogins', this._directLogins) 265 // this.transientState().setValue('directLogins', this._directLogins)
273//console.log("SET TRANSIENT STATE", Clipperz.Base.serializeJSON(MochiKit.Base.keys(this.transientState().getValue('directLogins'))))
274 MochiKit.Iter.forEach(MochiKit.Base.keys(this._directLogins), MochiKit.Base.bind(function(aKey) { 266 MochiKit.Iter.forEach(MochiKit.Base.keys(this._directLogins), MochiKit.Base.bind(function(aKey) {
275 this.transientState().setValue('directLogins' + '.' + aKey, this._directLogins[aKey]) 267 this.transientState().setValue('directLogins' + '.' + aKey, this._directLogins[aKey])
@@ -330,5 +322,4 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.Encrypt
330 var result; 322 var result;
331 323
332//console.log("new Clipperz.PM.DataModel.Record.Version [2]");
333/* 324/*
334 this._currentRecordVersion = new Clipperz.PM.DataModel.Record.Version({ 325 this._currentRecordVersion = new Clipperz.PM.DataModel.Record.Version({
@@ -341,5 +332,4 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.Encrypt
341 332
342 for (versionKey in someData['versions']) { 333 for (versionKey in someData['versions']) {
343//console.log("### versionKey", versionKey);
344 this._versions[versionKey] = new Clipperz.PM.DataModel.Record.Version({ 334 this._versions[versionKey] = new Clipperz.PM.DataModel.Record.Version({
345 'reference': versionKey, 335 'reference': versionKey,
@@ -352,5 +342,4 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.Encrypt
352 // this._currentVersionReference = someData['currentVersion']['reference']; 342 // this._currentVersionReference = someData['currentVersion']['reference'];
353 this._currentVersionReference = someData['currentVersion']; 343 this._currentVersionReference = someData['currentVersion'];
354//console.log("=== currentVersionReference", this._currentVersionReference, someData);
355 344
356 result = Clipperz.PM.DataModel.Record.superclass.unpackRemoteData.apply(this, arguments); 345 result = Clipperz.PM.DataModel.Record.superclass.unpackRemoteData.apply(this, arguments);
@@ -537,5 +526,4 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.Encrypt
537 526
538 'currentVersionReference': function () { 527 'currentVersionReference': function () {
539//console.log("currentVersionReference");
540 return this._currentVersionReference; 528 return this._currentVersionReference;
541 }, 529 },
@@ -586,5 +574,4 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.Encrypt
586 574
587 'getCurrentRecordVersionKey': function () { 575 'getCurrentRecordVersionKey': function () {
588//console.log("getCurrentRecordVersionKey");
589 return Clipperz.Async.callbacks("Record.getCurrentRecordVersionKey", [ 576 return Clipperz.Async.callbacks("Record.getCurrentRecordVersionKey", [
590 MochiKit.Base.method(this, 'getValue', 'currentVersionKey'), 577 MochiKit.Base.method(this, 'getValue', 'currentVersionKey'),
@@ -607,8 +594,6 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.Encrypt
607 594
608 'invokeCurrentRecordVersionMethod': function (aMethodName, someValues) { 595 'invokeCurrentRecordVersionMethod': function (aMethodName, someValues) {
609//console.log(">>> invokeCurrentRecordVersionMethod", aMethodName);
610 return Clipperz.Async.callbacks("Record.invokeCurrentRecordVersionMethod", [ 596 return Clipperz.Async.callbacks("Record.invokeCurrentRecordVersionMethod", [
611 MochiKit.Base.method(this, 'getCurrentRecordVersion'), 597 MochiKit.Base.method(this, 'getCurrentRecordVersion'),
612//function (aValue) { console.log("=== getCurrentRecordVersion", aValue); return aValue},
613 MochiKit.Base.methodcaller(aMethodName, someValues) 598 MochiKit.Base.methodcaller(aMethodName, someValues)
614 ], {trace:false}); 599 ], {trace:false});
@@ -619,14 +604,9 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.Encrypt
619 return Clipperz.Async.callbacks("Record.lazilyinvokeCurrentRecordVersionMethod", [ 604 return Clipperz.Async.callbacks("Record.lazilyinvokeCurrentRecordVersionMethod", [
620 MochiKit.Base.method(this, 'currentVersionReference'), 605 MochiKit.Base.method(this, 'currentVersionReference'),
621//function (aValue) { console.log("LAZY -> versions", aValue); return aValue; },
622 Clipperz.Async.deferredIf("versions has been loaded", [ 606 Clipperz.Async.deferredIf("versions has been loaded", [
623//function (aValue) { console.log("LAZY -> then"); return aValue; },
624 MochiKit.Base.method(this, 'getCurrentRecordVersion'), 607 MochiKit.Base.method(this, 'getCurrentRecordVersion'),
625 MochiKit.Base.methodcaller(aMethodName, someValues), 608 MochiKit.Base.methodcaller(aMethodName, someValues),
626//function (aValue) { console.log("LAZY <- then"); return aValue; }
627 ], [ 609 ], [
628//function (aValue) { console.log("LAZY -> else"); return aValue; },
629 MochiKit.Base.partial(MochiKit.Async.succeed, defaultResult), 610 MochiKit.Base.partial(MochiKit.Async.succeed, defaultResult),
630//function (aValue) { console.log("LAZY <- else"); return aValue; }
631 ]) 611 ])
632 ], {trace:false}); 612 ], {trace:false});
@@ -649,5 +629,4 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.Encrypt
649 'directLogins': [ 629 'directLogins': [
650 MochiKit.Base.method(this, 'directLogins'), 630 MochiKit.Base.method(this, 'directLogins'),
651//function (aValue) { console.log("Record.directLogins", aValue); return aValue; },
652 MochiKit.Base.values, 631 MochiKit.Base.values,
653 MochiKit.Base.partial(MochiKit.Base.map, MochiKit.Base.methodcaller('hasPendingChanges')), 632 MochiKit.Base.partial(MochiKit.Base.map, MochiKit.Base.methodcaller('hasPendingChanges')),
@@ -659,5 +638,4 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.Encrypt
659 ] 638 ]
660 }); 639 });
661//deferredResult.addCallback(function (aValue) { console.log("Record.hasPendingResults", aValue); return aValue; });
662 deferredResult.addCallback(MochiKit.Base.values); 640 deferredResult.addCallback(MochiKit.Base.values);
663 deferredResult.addCallback(MochiKit.Base.bind(function(someValues) { 641 deferredResult.addCallback(MochiKit.Base.bind(function(someValues) {
@@ -777,5 +755,4 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.Encrypt
777 755
778 MochiKit.Base.method(this, 'directLogins'), 756 MochiKit.Base.method(this, 'directLogins'),
779//function (aValue) { console.log("resetTransientState - directLogins", aValue); return aValue; },
780 MochiKit.Base.values, 757 MochiKit.Base.values,
781 MochiKit.Base.partial(MochiKit.Base.map, MochiKit.Base.methodcaller('resetTransientState')), 758 MochiKit.Base.partial(MochiKit.Base.map, MochiKit.Base.methodcaller('resetTransientState')),
@@ -817,5 +794,4 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.Record, Clipperz.PM.DataModel.Encrypt
817 794
818 'retrieveDirectLoginIndexDataFunction': function () { 795 'retrieveDirectLoginIndexDataFunction': function () {
819//console.log("Record.retrieveDirectLoginIndexDataFunction", this._retrieveDirectLoginIndexDataFunction);
820 return this._retrieveDirectLoginIndexDataFunction; 796 return this._retrieveDirectLoginIndexDataFunction;
821 }, 797 },
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.Legacy.js b/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.Legacy.js
index d6202ff..cda5a41 100644
--- a/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.Legacy.js
+++ b/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.Legacy.js
@@ -1,24 +1,22 @@
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*/
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.OneTimePasswords.js b/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.OneTimePasswords.js
index 3528db6..e82da47 100644
--- a/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.OneTimePasswords.js
+++ b/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.OneTimePasswords.js
@@ -1,24 +1,22 @@
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*/
@@ -52,7 +50,5 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.User.Header.OneTimePasswords, Clipper
52 var result; 50 var result;
53 51
54console.log(">>> OneTimePasswords.packData", someData);
55 result = Clipperz.PM.DataModel.User.Header.OneTimePasswords.superclass.packData.apply(this, arguments); 52 result = Clipperz.PM.DataModel.User.Header.OneTimePasswords.superclass.packData.apply(this, arguments);
56console.log("<<< OneTimePasswords.packData");
57 53
58 return result; 54 return result;
@@ -64,7 +60,5 @@ console.log("<<< OneTimePasswords.packData");
64 var result; 60 var result;
65 61
66console.log(">>> OneTimePasswords.packRemoteData", someData);
67 result = Clipperz.PM.DataModel.User.Header.OneTimePasswords.superclass.packRemoteData.apply(this, arguments); 62 result = Clipperz.PM.DataModel.User.Header.OneTimePasswords.superclass.packRemoteData.apply(this, arguments);
68console.log("<<< OneTimePasswords.packRemoteData");
69 63
70 return result; 64 return result;
@@ -76,7 +70,5 @@ console.log("<<< OneTimePasswords.packRemoteData");
76 var result; 70 var result;
77 71
78console.log(">>> OneTimePasswords.prepareRemoteDataWithKey");
79 result = Clipperz.PM.DataModel.User.Header.OneTimePasswords.superclass.prepareRemoteDataWithKey.apply(this, arguments); 72 result = Clipperz.PM.DataModel.User.Header.OneTimePasswords.superclass.prepareRemoteDataWithKey.apply(this, arguments);
80console.log("<<< OneTimePasswords.prepareRemoteDataWithKey");
81 73
82 return result; 74 return result;
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.Preferences.js b/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.Preferences.js
index b164889..f1f95e8 100644
--- a/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.Preferences.js
+++ b/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.Preferences.js
@@ -1,24 +1,22 @@
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*/
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.RecordIndex.js b/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.RecordIndex.js
index f77ea80..5681f70 100644
--- a/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.RecordIndex.js
+++ b/frontend/gamma/js/Clipperz/PM/DataModel/User.Header.RecordIndex.js
@@ -1,24 +1,22 @@
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*/
@@ -33,5 +31,4 @@ Clipperz.PM.DataModel.User.Header.RecordIndex = function(args) {
33 Clipperz.PM.DataModel.User.Header.RecordIndex.superclass.constructor.apply(this, arguments); 31 Clipperz.PM.DataModel.User.Header.RecordIndex.superclass.constructor.apply(this, arguments);
34 32
35//console.log("NEW Clipperz.PM.DataModel.User.Header.RecordIndex", args);
36 this._recordsData = new Clipperz.PM.DataModel.EncryptedRemoteObject({ 33 this._recordsData = new Clipperz.PM.DataModel.EncryptedRemoteObject({
37 'name':'recordsData', 34 'name':'recordsData',
@@ -119,5 +116,4 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.User.Header.RecordIndex, Object, {
119 116
120 'resetTransientState': function (isCommitting) { 117 'resetTransientState': function (isCommitting) {
121//console.log("######## UserHeaderRecordIndex - resetTransientState", Clipperz.Base.deepClone(this._transientState));
122 if (this._transientState != null) { 118 if (this._transientState != null) {
123 this._transientState.removeAllData(); 119 this._transientState.removeAllData();
@@ -159,5 +155,4 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.User.Header.RecordIndex, Object, {
159 155
160 'setDirectLoginIndexData': function (aDirectLoginReference, aKey, aValue) { 156 'setDirectLoginIndexData': function (aDirectLoginReference, aKey, aValue) {
161//console.log("UserHeaderRecordIndex.setDirectLoginIndexData", aDirectLoginReference, this.directLoginsIndex()[aDirectLoginReference], aKey);
162//if (MochiKit.Base.isUndefinedOrNull(this.directLoginsIndex()[aDirectLoginReference])) { 157//if (MochiKit.Base.isUndefinedOrNull(this.directLoginsIndex()[aDirectLoginReference])) {
163 //throw "PIPPO"; 158 //throw "PIPPO";
@@ -167,5 +162,4 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.User.Header.RecordIndex, Object, {
167 162
168 'addDirectLoginIndexData': function (aDirectLoginReference) { 163 'addDirectLoginIndexData': function (aDirectLoginReference) {
169//console.log("UserHeaderRecordIndex.addDirectLoginIndexData", aDirectLoginReference, this.directLoginsIndex()[aDirectLoginReference]);
170 return this.directLoginsData().setValue(this.directLoginsIndex()[aDirectLoginReference], {}); 164 return this.directLoginsData().setValue(this.directLoginsIndex()[aDirectLoginReference], {});
171 }, 165 },
@@ -262,10 +256,5 @@ Clipperz.log("SKIPPING record " + reference + " as there are no stas associated
262 }); 256 });
263 } else { 257 } else {
264Clipperz.log("WARNING: DIRECT LOGIN without a matching RECORD!!"); 258 Clipperz.logWarning("WARNING: DIRECT LOGIN without a matching RECORD!!");
265//console.log("direct login data", someData['directLogins']);
266//console.log("current direct login data", someData['directLogins'][indexReference])
267//console.log("reference", reference);
268//console.log("record index", this.recordsIndex());
269//console.log("record inverted index", recordsInvertedIndex);
270 } 259 }
271 } 260 }
@@ -306,5 +295,4 @@ Clipperz.log("WARNING: DIRECT LOGIN without a matching RECORD!!");
306 var newRecord; 295 var newRecord;
307 296
308//console.log("#### new Clipperz.PM.DataModel.Record [4]");
309 newRecord = new Clipperz.PM.DataModel.Record({ 297 newRecord = new Clipperz.PM.DataModel.Record({
310 'retrieveKeyFunction': MochiKit.Base.method(this, 'getRecordKey'), 298 'retrieveKeyFunction': MochiKit.Base.method(this, 'getRecordKey'),
@@ -387,7 +375,5 @@ Clipperz.log("WARNING: DIRECT LOGIN without a matching RECORD!!");
387 this.transientState().setValue('newDirectLoginReferences' + '.' + newDirectLogin.reference(), newDirectLogin); 375 this.transientState().setValue('newDirectLoginReferences' + '.' + newDirectLogin.reference(), newDirectLogin);
388 376
389//console.log("UserHeaderRecordIndex.createNewDirectLogin [1]", newDirectLogin.reference(), newDirectLoginIndexValue);
390 this.directLoginsIndex()[newDirectLogin.reference()] = newDirectLoginIndexValue; 377 this.directLoginsIndex()[newDirectLogin.reference()] = newDirectLoginIndexValue;
391//console.log("UserHeaderRecordIndex.createNewDirectLogin [2]", newDirectLogin.reference(), this.directLoginsIndex()[newDirectLogin.reference()]);
392 this.directLoginsData().setValue(this.directLoginsIndex()[newDirectLogin.reference()], {'record': this.recordsIndex()[aRecord.reference()]}); 378 this.directLoginsData().setValue(this.directLoginsIndex()[newDirectLogin.reference()], {'record': this.recordsIndex()[aRecord.reference()]});
393 379
@@ -432,5 +418,4 @@ Clipperz.log("WARNING: DIRECT LOGIN without a matching RECORD!!");
432 // ] 418 // ]
433 }); 419 });
434//deferredResult.addCallback(function (aValue) { console.log("USER.Header.RecordIndex.hasAnyCleanTextData", aValue); return aValue});
435 420
436 // deferredResult.addCallback(MochiKit.Base.values); 421 // deferredResult.addCallback(MochiKit.Base.values);
@@ -462,5 +447,4 @@ Clipperz.log("WARNING: DIRECT LOGIN without a matching RECORD!!");
462 ] 447 ]
463 }); 448 });
464//deferredResult.addCallback(function (aValue) { console.log("UserHeaderIndex.hasPendingResults", aValue); return aValue; });
465 deferredResult.addCallback(Clipperz.Async.or); 449 deferredResult.addCallback(Clipperz.Async.or);
466 // deferredResult.addCallback(MochiKit.Base.values); 450 // deferredResult.addCallback(MochiKit.Base.values);
@@ -571,5 +555,4 @@ Clipperz.log("WARNING: DIRECT LOGIN without a matching RECORD!!");
571 var result; 555 var result;
572 556
573//console.log("recordsIndex", this.recordsIndex());
574 result = {}; 557 result = {};
575 558
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/User.js b/frontend/gamma/js/Clipperz/PM/DataModel/User.js
index 646ce21..fd18faf 100644
--- a/frontend/gamma/js/Clipperz/PM/DataModel/User.js
+++ b/frontend/gamma/js/Clipperz/PM/DataModel/User.js
@@ -1,24 +1,22 @@
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*/
@@ -329,5 +327,4 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.User, Object, {
329 var oneTimePasswords; 327 var oneTimePasswords;
330 328
331//console.log(">>> ***************** user.unpackServerData", someServerData);
332 // this.setServerLockValue(someServerData['lock']); 329 // this.setServerLockValue(someServerData['lock']);
333 330
@@ -418,5 +415,4 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.User, Object, {
418 415
419 this._serverData = unpackedData; 416 this._serverData = unpackedData;
420//console.log("<<< ***************** user.unpackServerData", this._serverData);
421 417
422 return this._serverData; 418 return this._serverData;