Diffstat (limited to 'frontend/beta/js/Clipperz/PM/Proxy') (more/less context) (ignore whitespace changes)
-rwxr-xr-x | frontend/beta/js/Clipperz/PM/Proxy/Proxy.JSON.js | 15 | ||||
-rw-r--r-- | frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js | 15 | ||||
-rw-r--r-- | frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.js | 15 | ||||
-rwxr-xr-x | frontend/beta/js/Clipperz/PM/Proxy/Proxy.PHP.js | 15 | ||||
-rw-r--r-- | frontend/beta/js/Clipperz/PM/Proxy/Proxy.Test.js | 15 |
5 files changed, 30 insertions, 45 deletions
diff --git a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.JSON.js b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.JSON.js index 889e1f1..4f3b4b2 100755 --- a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.JSON.js +++ b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.JSON.js | |||
@@ -1,72 +1,69 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | 28 | ||
32 | //============================================================================= | 29 | //============================================================================= |
33 | 30 | ||
34 | Clipperz.PM.Proxy.JSON = function(args) { | 31 | Clipperz.PM.Proxy.JSON = function(args) { |
35 | Clipperz.PM.Proxy.JSON.superclass.constructor.call(this, args); | 32 | Clipperz.PM.Proxy.JSON.superclass.constructor.call(this, args); |
36 | 33 | ||
37 | this._url = args.url || Clipperz.Base.exception.raise('MandatoryParameter'); | 34 | this._url = args.url || Clipperz.Base.exception.raise('MandatoryParameter'); |
38 | 35 | ||
39 | return this; | 36 | return this; |
40 | } | 37 | } |
41 | 38 | ||
42 | YAHOO.extendX(Clipperz.PM.Proxy.JSON, Clipperz.PM.Proxy, { | 39 | YAHOO.extendX(Clipperz.PM.Proxy.JSON, Clipperz.PM.Proxy, { |
43 | 40 | ||
44 | 'toString': function() { | 41 | 'toString': function() { |
45 | return "Clipperz.PM.Proxy.JSON"; | 42 | return "Clipperz.PM.Proxy.JSON"; |
46 | }, | 43 | }, |
47 | 44 | ||
48 | //========================================================================= | 45 | //========================================================================= |
49 | 46 | ||
50 | 'url': function () { | 47 | 'url': function () { |
51 | return this._url; | 48 | return this._url; |
52 | }, | 49 | }, |
53 | 50 | ||
54 | //========================================================================= | 51 | //========================================================================= |
55 | 52 | ||
56 | 'sendMessage': function(aFunctionName, someParameters) { | 53 | 'sendMessage': function(aFunctionName, someParameters) { |
57 | vardeferredResult; | 54 | vardeferredResult; |
58 | var parameters; | 55 | var parameters; |
59 | 56 | ||
60 | parameters = { | 57 | parameters = { |
61 | method: aFunctionName, | 58 | method: aFunctionName, |
62 | // version: someParameters['version'], | 59 | // version: someParameters['version'], |
63 | // message: someParameters['message'], | 60 | // message: someParameters['message'], |
64 | parameters: Clipperz.Base.serializeJSON(someParameters) | 61 | parameters: Clipperz.Base.serializeJSON(someParameters) |
65 | }; | 62 | }; |
66 | 63 | ||
67 | deferredResult = new MochiKit.Async.Deferred(); | 64 | deferredResult = new MochiKit.Async.Deferred(); |
68 | deferredResult.addCallback(function (aValue) { | 65 | deferredResult.addCallback(function (aValue) { |
69 | MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'remoteRequestSent'); | 66 | MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'remoteRequestSent'); |
70 | return aValue; | 67 | return aValue; |
71 | }); | 68 | }); |
72 | deferredResult.addCallback(MochiKit.Async.doXHR, this.url(), { | 69 | deferredResult.addCallback(MochiKit.Async.doXHR, this.url(), { |
diff --git a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js index 4d3ba08..d5336be 100644 --- a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js +++ b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js | |||
@@ -1,72 +1,69 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | try { if (typeof(Clipperz.PM.Proxy.Offline) == 'undefined') { throw ""; }} catch (e) { | 26 | try { if (typeof(Clipperz.PM.Proxy.Offline) == 'undefined') { throw ""; }} catch (e) { |
30 | throw "Clipperz.PM.Proxy.Offline.DataStore depends on Clipperz.PM.Proxy.Offline!"; | 27 | throw "Clipperz.PM.Proxy.Offline.DataStore depends on Clipperz.PM.Proxy.Offline!"; |
31 | } | 28 | } |
32 | 29 | ||
33 | //============================================================================= | 30 | //============================================================================= |
34 | 31 | ||
35 | Clipperz.PM.Proxy.Offline.DataStore = function(args) { | 32 | Clipperz.PM.Proxy.Offline.DataStore = function(args) { |
36 | args = args || {}; | 33 | args = args || {}; |
37 | 34 | ||
38 | this._data = args.data || (typeof(_clipperz_dump_data_) != 'undefined' ? _clipperz_dump_data_ : null); | 35 | this._data = args.data || (typeof(_clipperz_dump_data_) != 'undefined' ? _clipperz_dump_data_ : null); |
39 | this._isReadOnly = (typeof(args.readOnly) == 'undefined' ? true : args.readOnly); | 36 | this._isReadOnly = (typeof(args.readOnly) == 'undefined' ? true : args.readOnly); |
40 | this._shouldPayTolls = args.shouldPayTolls || false; | 37 | this._shouldPayTolls = args.shouldPayTolls || false; |
41 | 38 | ||
42 | this._tolls = {}; | 39 | this._tolls = {}; |
43 | this._connections = {}; | 40 | this._connections = {}; |
44 | 41 | ||
45 | this._b = null; | 42 | this._b = null; |
46 | this._B = null; | 43 | this._B = null; |
47 | this._A = null; | 44 | this._A = null; |
48 | this._userData = null; | 45 | this._userData = null; |
49 | 46 | ||
50 | return this; | 47 | return this; |
51 | } | 48 | } |
52 | 49 | ||
53 | //Clipperz.Base.extend(Clipperz.PM.Proxy.Offline.DataStore, Object, { | 50 | //Clipperz.Base.extend(Clipperz.PM.Proxy.Offline.DataStore, Object, { |
54 | Clipperz.PM.Proxy.Offline.DataStore.prototype = MochiKit.Base.update(null, { | 51 | Clipperz.PM.Proxy.Offline.DataStore.prototype = MochiKit.Base.update(null, { |
55 | 52 | ||
56 | //------------------------------------------------------------------------- | 53 | //------------------------------------------------------------------------- |
57 | 54 | ||
58 | 'isReadOnly': function () { | 55 | 'isReadOnly': function () { |
59 | return this._isReadOnly; | 56 | return this._isReadOnly; |
60 | }, | 57 | }, |
61 | 58 | ||
62 | //------------------------------------------------------------------------- | 59 | //------------------------------------------------------------------------- |
63 | 60 | ||
64 | 'shouldPayTolls': function() { | 61 | 'shouldPayTolls': function() { |
65 | return this._shouldPayTolls; | 62 | return this._shouldPayTolls; |
66 | }, | 63 | }, |
67 | 64 | ||
68 | //------------------------------------------------------------------------- | 65 | //------------------------------------------------------------------------- |
69 | 66 | ||
70 | 'data': function () { | 67 | 'data': function () { |
71 | return this._data; | 68 | return this._data; |
72 | }, | 69 | }, |
diff --git a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.js b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.js index 072f9bf..3cf499e 100644 --- a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.js +++ b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Offline.js | |||
@@ -1,72 +1,69 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | 28 | ||
32 | //============================================================================= | 29 | //============================================================================= |
33 | 30 | ||
34 | Clipperz.PM.Proxy.Offline = function(args) { | 31 | Clipperz.PM.Proxy.Offline = function(args) { |
35 | args = args || {}; | 32 | args = args || {}; |
36 | 33 | ||
37 | Clipperz.PM.Proxy.Offline.superclass.constructor.call(this, args); | 34 | Clipperz.PM.Proxy.Offline.superclass.constructor.call(this, args); |
38 | 35 | ||
39 | this._dataStore = args.dataStore || new Clipperz.PM.Proxy.Offline.DataStore(args); | 36 | this._dataStore = args.dataStore || new Clipperz.PM.Proxy.Offline.DataStore(args); |
40 | 37 | ||
41 | return this; | 38 | return this; |
42 | } | 39 | } |
43 | 40 | ||
44 | YAHOO.extendX(Clipperz.PM.Proxy.Offline, Clipperz.PM.Proxy, { | 41 | YAHOO.extendX(Clipperz.PM.Proxy.Offline, Clipperz.PM.Proxy, { |
45 | 42 | ||
46 | 'toString': function () { | 43 | 'toString': function () { |
47 | return "Clipperz.PM.Proxy.Offline"; | 44 | return "Clipperz.PM.Proxy.Offline"; |
48 | }, | 45 | }, |
49 | 46 | ||
50 | //------------------------------------------------------------------------- | 47 | //------------------------------------------------------------------------- |
51 | 48 | ||
52 | 'dataStore': function () { | 49 | 'dataStore': function () { |
53 | return this._dataStore; | 50 | return this._dataStore; |
54 | }, | 51 | }, |
55 | 52 | ||
56 | //------------------------------------------------------------------------- | 53 | //------------------------------------------------------------------------- |
57 | 54 | ||
58 | 'sendMessage': function(aFunctionName, someParameters) { | 55 | 'sendMessage': function(aFunctionName, someParameters) { |
59 | return this.dataStore().processMessage(aFunctionName, someParameters); | 56 | return this.dataStore().processMessage(aFunctionName, someParameters); |
60 | }, | 57 | }, |
61 | 58 | ||
62 | //------------------------------------------------------------------------- | 59 | //------------------------------------------------------------------------- |
63 | 60 | ||
64 | 'isReadOnly': function () { | 61 | 'isReadOnly': function () { |
65 | return true; | 62 | return true; |
66 | }, | 63 | }, |
67 | 64 | ||
68 | //------------------------------------------------------------------------- | 65 | //------------------------------------------------------------------------- |
69 | 66 | ||
70 | __syntaxFix__: "syntax fix" | 67 | __syntaxFix__: "syntax fix" |
71 | 68 | ||
72 | }); | 69 | }); |
diff --git a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.PHP.js b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.PHP.js index 6185fd6..34a10c2 100755 --- a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.PHP.js +++ b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.PHP.js | |||
@@ -1,72 +1,69 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | 28 | ||
32 | //============================================================================= | 29 | //============================================================================= |
33 | 30 | ||
34 | Clipperz.PM.Proxy.PHP = function(args) { | 31 | Clipperz.PM.Proxy.PHP = function(args) { |
35 | Clipperz.PM.Proxy.PHP.superclass.constructor.call(this, args); | 32 | Clipperz.PM.Proxy.PHP.superclass.constructor.call(this, args); |
36 | /* | 33 | /* |
37 | this._tolls = { | 34 | this._tolls = { |
38 | 'CONNECT':[], | 35 | 'CONNECT':[], |
39 | 'REGISTER':[], | 36 | 'REGISTER':[], |
40 | 'MESSAGE':[] | 37 | 'MESSAGE':[] |
41 | }; | 38 | }; |
42 | */ | 39 | */ |
43 | return this; | 40 | return this; |
44 | } | 41 | } |
45 | 42 | ||
46 | YAHOO.extendX(Clipperz.PM.Proxy.PHP, Clipperz.PM.Proxy, { | 43 | YAHOO.extendX(Clipperz.PM.Proxy.PHP, Clipperz.PM.Proxy, { |
47 | 44 | ||
48 | 'toString': function() { | 45 | 'toString': function() { |
49 | return "Clipperz.PM.Proxy.PHP - " + this.args(); | 46 | return "Clipperz.PM.Proxy.PHP - " + this.args(); |
50 | }, | 47 | }, |
51 | 48 | ||
52 | //========================================================================= | 49 | //========================================================================= |
53 | /* | 50 | /* |
54 | 'tolls': function() { | 51 | 'tolls': function() { |
55 | return this._tolls; | 52 | return this._tolls; |
56 | }, | 53 | }, |
57 | */ | 54 | */ |
58 | //------------------------------------------------------------------------- | 55 | //------------------------------------------------------------------------- |
59 | /* | 56 | /* |
60 | 'payToll': function(aRequestType, someParameters) { | 57 | 'payToll': function(aRequestType, someParameters) { |
61 | vardeferredResult; | 58 | vardeferredResult; |
62 | 59 | ||
63 | //MochiKit.Logging.logDebug(">>> Proxy.DWR.payToll: " + aRequestType); | 60 | //MochiKit.Logging.logDebug(">>> Proxy.DWR.payToll: " + aRequestType); |
64 | if (this.tolls()[aRequestType].length > 0) { | 61 | if (this.tolls()[aRequestType].length > 0) { |
65 | deferredResult = MochiKit.Async.succeed(this.tolls()[aRequestType].pop()); | 62 | deferredResult = MochiKit.Async.succeed(this.tolls()[aRequestType].pop()); |
66 | } else { | 63 | } else { |
67 | //MochiKit.Logging.logDebug("### " + aRequestType + " toll NOT immediately available; request queued."); | 64 | //MochiKit.Logging.logDebug("### " + aRequestType + " toll NOT immediately available; request queued."); |
68 | deferredResult = new MochiKit.Async.Deferred(); | 65 | deferredResult = new MochiKit.Async.Deferred(); |
69 | deferredResult.addCallback(function(someParameters) { | 66 | deferredResult.addCallback(function(someParameters) { |
70 | return new Clipperz.PM.Toll(someParameters['toll']); | 67 | return new Clipperz.PM.Toll(someParameters['toll']); |
71 | }) | 68 | }) |
72 | com_clipperz_pm_Proxy.knock(Clipperz.Base.serializeJSON({requestType:aRequestType}), { | 69 | com_clipperz_pm_Proxy.knock(Clipperz.Base.serializeJSON({requestType:aRequestType}), { |
diff --git a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Test.js b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Test.js index fd5bf8a..ce6e6d8 100644 --- a/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Test.js +++ b/frontend/beta/js/Clipperz/PM/Proxy/Proxy.Test.js | |||
@@ -1,72 +1,69 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Proxy) == 'undefined') { Clipperz.PM.Proxy = {}; } | 28 | if (typeof(Clipperz.PM.Proxy) == 'undefined') { Clipperz.PM.Proxy = {}; } |
32 | 29 | ||
33 | //============================================================================= | 30 | //============================================================================= |
34 | 31 | ||
35 | Clipperz.PM.Proxy.Test = function(args) { | 32 | Clipperz.PM.Proxy.Test = function(args) { |
36 | args = args || {}; | 33 | args = args || {}; |
37 | 34 | ||
38 | Clipperz.PM.Proxy.Offline.call(this, args); | 35 | Clipperz.PM.Proxy.Offline.call(this, args); |
39 | 36 | ||
40 | 37 | ||
41 | 38 | ||
42 | return this; | 39 | return this; |
43 | } | 40 | } |
44 | 41 | ||
45 | Clipperz.PM.Proxy.Test.prototype = MochiKit.Base.update(new Clipperz.PM.Proxy.Offline(), { | 42 | Clipperz.PM.Proxy.Test.prototype = MochiKit.Base.update(new Clipperz.PM.Proxy.Offline(), { |
46 | 43 | ||
47 | 'toString': function() { | 44 | 'toString': function() { |
48 | return "Clipperz.PM.Proxy.Test"; | 45 | return "Clipperz.PM.Proxy.Test"; |
49 | }, | 46 | }, |
50 | 47 | ||
51 | //------------------------------------------------------------------------- | 48 | //------------------------------------------------------------------------- |
52 | 49 | ||
53 | 'isTestData': function() { | 50 | 'isTestData': function() { |
54 | return typeof(this.userData()['__masterkey_test_value__'] != 'undefined'); | 51 | return typeof(this.userData()['__masterkey_test_value__'] != 'undefined'); |
55 | }, | 52 | }, |
56 | 53 | ||
57 | //------------------------------------------------------------------------- | 54 | //------------------------------------------------------------------------- |
58 | 55 | ||
59 | 'userDetails': function() { | 56 | 'userDetails': function() { |
60 | var result; | 57 | var result; |
61 | 58 | ||
62 | if (this.isTestData()) { | 59 | if (this.isTestData()) { |
63 | var serializedHeader; | 60 | var serializedHeader; |
64 | var version; | 61 | var version; |
65 | 62 | ||
66 | version = this.userData()['version']; | 63 | version = this.userData()['version']; |
67 | serializedHeader = Clipperz.Base.serializeJSON(this.userData()['userDetails']); | 64 | serializedHeader = Clipperz.Base.serializeJSON(this.userData()['userDetails']); |
68 | result = Clipperz.PM.Crypto.encryptingFunctions.versions[version].encrypt(this.userData()['__masterkey_test_value__'], serializedHeader); | 65 | result = Clipperz.PM.Crypto.encryptingFunctions.versions[version].encrypt(this.userData()['__masterkey_test_value__'], serializedHeader); |
69 | } else { | 66 | } else { |
70 | result = Clipperz.PM.Proxy.Offline.prototype.userDetails.call(this); | 67 | result = Clipperz.PM.Proxy.Offline.prototype.userDetails.call(this); |
71 | } | 68 | } |
72 | 69 | ||