summaryrefslogtreecommitdiff
path: root/frontend/delta/js/main.js
Unidiff
Diffstat (limited to 'frontend/delta/js/main.js') (more/less context) (ignore whitespace changes)
-rw-r--r--frontend/delta/js/main.js62
1 files changed, 62 insertions, 0 deletions
diff --git a/frontend/delta/js/main.js b/frontend/delta/js/main.js
new file mode 100644
index 0000000..6f8b497
--- a/dev/null
+++ b/frontend/delta/js/main.js
@@ -0,0 +1,62 @@
1/*
2
3Copyright 2008-2013 Clipperz Srl
4
5This file is part of Clipperz, the online password manager.
6For further information about its features and functionalities please
7refer to http://www.clipperz.com.
8
9* Clipperz is free software: you can redistribute it and/or modify it
10 under the terms of the GNU Affero General Public License as published
11 by the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14* Clipperz is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17 See the GNU Affero General Public License for more details.
18
19* You should have received a copy of the GNU Affero General Public
20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
21
22*/
23
24function _pm_logEvent(anEvent) {
25 //console.log("####", anEvent);
26
27 anEvent.preventDefault();
28}
29
30function handleGenericDeferredError(anError) {
31 var result;
32
33 if (anError instanceof MochiKit.Async.CancelledError) {
34 result = anError;
35 } else {
36MochiKit.Logging.logError("## MainController - GENERIC ERROR" + "\n" + "==>> " + anError + " <<==\n" + anError.stack);
37//console.log(anError);
38 result = new MochiKit.Async.CancelledError(anError);
39 }
40
41 return result;
42}
43
44
45Clipperz.PM.RunTime = {};
46function run() {
47 var parameters = {};
48
49 Clipperz.PM.Strings.Languages.initSetup();
50
51
52 if ((window.location.search.indexOf('registration') != -1) || (window.location.hash.indexOf('registration') != -1)) {
53 parameters['shouldShowRegistrationForm'] = true;
54 } else {
55 parameters['shouldShowRegistrationForm'] = false;
56 }
57
58 Clipperz.PM.RunTime.mainController = new Clipperz.PM.UI.MainController();
59 Clipperz.PM.RunTime.mainController.run(parameters);
60}
61
62MochiKit.DOM.addLoadEvent(run);