author | Clipperz <info@clipperz.com> | 2013-01-08 15:21:04 (UTC) |
---|---|---|
committer | Clipperz <info@clipperz.com> | 2013-01-08 15:21:04 (UTC) |
commit | 816fc35420a434b1d54ae5833d617608f7456048 (patch) (unidiff) | |
tree | 95b8caf354083593d7775e4dda6f4c556b44a2d9 /frontend/gamma/tests/tests/Components/FullApp/main_test.js | |
parent | 267603e3aa3cf0029411e67ae14018b52344c296 (diff) | |
download | clipperz-816fc35420a434b1d54ae5833d617608f7456048.zip clipperz-816fc35420a434b1d54ae5833d617608f7456048.tar.gz clipperz-816fc35420a434b1d54ae5833d617608f7456048.tar.bz2 |
Updated version of /gamma
Tons of changes, included a new draft of the mobile version (still VERY rough)
Diffstat (limited to 'frontend/gamma/tests/tests/Components/FullApp/main_test.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/gamma/tests/tests/Components/FullApp/main_test.js | 111 |
1 files changed, 0 insertions, 111 deletions
diff --git a/frontend/gamma/tests/tests/Components/FullApp/main_test.js b/frontend/gamma/tests/tests/Components/FullApp/main_test.js deleted file mode 100644 index b13972a..0000000 --- a/frontend/gamma/tests/tests/Components/FullApp/main_test.js +++ b/dev/null | |||
@@ -1,111 +0,0 @@ | |||
1 | /* | ||
2 | |||
3 | Copyright 2008-2011 Clipperz Srl | ||
4 | |||
5 | This file is part of Clipperz Community Edition. | ||
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | ||
8 | refer to http://www.clipperz.com. | ||
9 | |||
10 | * Clipperz Community Edition is free software: you can redistribute | ||
11 | it and/or modify it under the terms of the GNU Affero General Public | ||
12 | License as published by the Free Software Foundation, either version | ||
13 | 3 of the License, or (at your option) any later version. | ||
14 | |||
15 | * Clipperz Community Edition is distributed in the hope that it will | ||
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | ||
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
18 | See the GNU Affero General Public License for more details. | ||
19 | |||
20 | * You should have received a copy of the GNU Affero General Public | ||
21 | License along with Clipperz Community Edition. If not, see | ||
22 | <http://www.gnu.org/licenses/>. | ||
23 | |||
24 | */ | ||
25 | |||
26 | function _pm_logEvent(anEvent) { | ||
27 | //console.log("####", anEvent); | ||
28 | |||
29 | anEvent.preventDefault(); | ||
30 | } | ||
31 | |||
32 | function handleGenericDeferredError(anError) { | ||
33 | var result; | ||
34 | |||
35 | if (anError instanceof MochiKit.Async.CancelledError) { | ||
36 | result = anError; | ||
37 | } else { | ||
38 | MochiKit.Logging.logError("## MainController - GENERIC ERROR" + "\n" + "==>> " + anError + " <<==\n" + anError.stack); | ||
39 | //console.log(anError); | ||
40 | result = new MochiKit.Async.CancelledError(anError); | ||
41 | } | ||
42 | |||
43 | return result; | ||
44 | } | ||
45 | |||
46 | |||
47 | Clipperz.PM.RunTime = {}; | ||
48 | |||
49 | |||
50 | function run() { | ||
51 | var shouldShowRegistrationForm; | ||
52 | var useCompactDesign; | ||
53 | var controllerParameters; | ||
54 | //var iPhoneDesign; | ||
55 | |||
56 | //MochiKit.Signal.connect(document.body, 'onkeydown', _pm_logEvent); | ||
57 | //MochiKit.Signal.connect(document.body, 'onkeypress', _pm_logEvent); | ||
58 | //MochiKit.Signal.connect(document.body, 'onclick', _pm_logEvent); | ||
59 | |||
60 | controllerParameters = {}; | ||
61 | |||
62 | MochiKit.DOM.removeElement('javaScriptAlert'); | ||
63 | Clipperz.PM.Strings.Languages.initSetup(); | ||
64 | |||
65 | if (window.location.search.indexOf('registration') != -1) { | ||
66 | shouldShowRegistrationForm = true; | ||
67 | } else { | ||
68 | shouldShowRegistrationForm = false; | ||
69 | } | ||
70 | |||
71 | if (window.location.search.indexOf('autocomplete') != -1) { | ||
72 | controllerParameters['autocomplete'] = 'on' | ||
73 | } | ||
74 | |||
75 | //if ((window.location.search.indexOf('iPhone') != -1) || (navigator.userAgent.match('iPhone'))) { | ||
76 | // iPhoneDesign = true; | ||
77 | //} else { | ||
78 | // iPhoneDesign = false; | ||
79 | //} | ||
80 | |||
81 | if (window.location.search.indexOf('compact') != -1) { | ||
82 | useCompactDesign = true; | ||
83 | } else { | ||
84 | useCompactDesign = false; | ||
85 | } | ||
86 | |||
87 | if (useCompactDesign == true) { | ||
88 | Clipperz.PM.RunTime.mainController = new Clipperz.PM.UI.Compact.Controllers.MainController(controllerParameters); | ||
89 | //} else if (iPhoneDesign == true) { | ||
90 | // Clipperz.PM.RunTime.mainController = new Clipperz.PM.UI.iPhone.Controllers.MainController(); | ||
91 | } else { | ||
92 | Clipperz.PM.RunTime.mainController = new Clipperz.PM.UI.Web.Controllers.MainController(controllerParameters); | ||
93 | } | ||
94 | |||
95 | Clipperz.PM.RunTime.mainController.run(shouldShowRegistrationForm); | ||
96 | |||
97 | //Clipperz.log("HASH: " + window.location.hash); | ||
98 | //if (window.location.hash != "") { | ||
99 | // window.location.hash = "" | ||
100 | //} | ||
101 | //Clipperz.log("HASH cleaned"); | ||
102 | //#credentials=base64encoded({username:'joe', passphrase:'clipperz'}) | ||
103 | //MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'doLogin', {username:'joe', passphrase:'clipperz'}); | ||
104 | } | ||
105 | |||
106 | Clipperz.Crypto.PRNG.defaultRandomGenerator().fastEntropyAccumulationForTestingPurpose(); | ||
107 | |||
108 | var proxy = new Clipperz.PM.Proxy.Test({shouldPayTolls:true, isDefault:true, readOnly:false}); | ||
109 | proxy.dataStore().setupWithEncryptedData(testData['testData']); | ||
110 | |||
111 | MochiKit.DOM.addLoadEvent(run); | ||