author | Clipperz <info@clipperz.com> | 2013-01-31 13:42:04 (UTC) |
---|---|---|
committer | Clipperz <info@clipperz.com> | 2013-01-31 13:42:04 (UTC) |
commit | 07d0357beef5d9328a2dd8d07ad7b39c87ac55e4 (patch) (unidiff) | |
tree | f7a4aed8848302db153c2a211f8e58b944eb4c5b /frontend/gamma/js/main.js | |
parent | 767a3dcf48b6ac911c088af5dd7738a728eb6b99 (diff) | |
download | clipperz-07d0357beef5d9328a2dd8d07ad7b39c87ac55e4.zip clipperz-07d0357beef5d9328a2dd8d07ad7b39c87ac55e4.tar.gz clipperz-07d0357beef5d9328a2dd8d07ad7b39c87ac55e4.tar.bz2 |
Updated Copyright claims
- updated reference dates;
- removed reference to Community Edition;
- normalized logging using Clipperz.log[Warn|Error|Debug]
-rw-r--r-- | frontend/gamma/js/main.js | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/frontend/gamma/js/main.js b/frontend/gamma/js/main.js index 934b325..6816754 100644 --- a/frontend/gamma/js/main.js +++ b/frontend/gamma/js/main.js | |||
@@ -1,93 +1,91 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | function _pm_logEvent(anEvent) { | 24 | function _pm_logEvent(anEvent) { |
27 | //console.log("####", anEvent); | 25 | //console.log("####", anEvent); |
28 | 26 | ||
29 | anEvent.preventDefault(); | 27 | anEvent.preventDefault(); |
30 | } | 28 | } |
31 | 29 | ||
32 | function handleGenericDeferredError(anError) { | 30 | function handleGenericDeferredError(anError) { |
33 | var result; | 31 | var result; |
34 | 32 | ||
35 | if (anError instanceof MochiKit.Async.CancelledError) { | 33 | if (anError instanceof MochiKit.Async.CancelledError) { |
36 | result = anError; | 34 | result = anError; |
37 | } else { | 35 | } else { |
38 | MochiKit.Logging.logError("## MainController - GENERIC ERROR" + "\n" + "==>> " + anError + " <<==\n" + anError.stack); | 36 | MochiKit.Logging.logError("## MainController - GENERIC ERROR" + "\n" + "==>> " + anError + " <<==\n" + anError.stack); |
39 | //console.log(anError); | 37 | //console.log(anError); |
40 | result = new MochiKit.Async.CancelledError(anError); | 38 | result = new MochiKit.Async.CancelledError(anError); |
41 | } | 39 | } |
42 | 40 | ||
43 | return result; | 41 | return result; |
44 | } | 42 | } |
45 | 43 | ||
46 | 44 | ||
47 | Clipperz.PM.RunTime = {}; | 45 | Clipperz.PM.RunTime = {}; |
48 | 46 | ||
49 | 47 | ||
50 | function run() { | 48 | function run() { |
51 | var shouldShowRegistrationForm; | 49 | var shouldShowRegistrationForm; |
52 | var useCompactDesign; | 50 | var useCompactDesign; |
53 | var controllerParameters; | 51 | var controllerParameters; |
54 | 52 | ||
55 | controllerParameters = {}; | 53 | controllerParameters = {}; |
56 | 54 | ||
57 | //MochiKit.DOM.removeElement('javaScriptAlert'); | 55 | //MochiKit.DOM.removeElement('javaScriptAlert'); |
58 | Clipperz.PM.Strings.Languages.initSetup(); | 56 | Clipperz.PM.Strings.Languages.initSetup(); |
59 | 57 | ||
60 | if (window.location.search.indexOf('registration') != -1) { | 58 | if (window.location.search.indexOf('registration') != -1) { |
61 | shouldShowRegistrationForm = true; | 59 | shouldShowRegistrationForm = true; |
62 | } else { | 60 | } else { |
63 | shouldShowRegistrationForm = false; | 61 | shouldShowRegistrationForm = false; |
64 | } | 62 | } |
65 | 63 | ||
66 | if (window.location.search.indexOf('autocomplete') != -1) { | 64 | if (window.location.search.indexOf('autocomplete') != -1) { |
67 | controllerParameters['autocomplete'] = 'on' | 65 | controllerParameters['autocomplete'] = 'on' |
68 | } | 66 | } |
69 | 67 | ||
70 | if (window.location.search.indexOf('compact') != -1) { | 68 | if (window.location.search.indexOf('compact') != -1) { |
71 | useCompactDesign = true; | 69 | useCompactDesign = true; |
72 | } else { | 70 | } else { |
73 | useCompactDesign = false; | 71 | useCompactDesign = false; |
74 | } | 72 | } |
75 | 73 | ||
76 | if (useCompactDesign == true) { | 74 | if (useCompactDesign == true) { |
77 | Clipperz.PM.RunTime.mainController = new Clipperz.PM.UI.Compact.Controllers.MainController(controllerParameters); | 75 | Clipperz.PM.RunTime.mainController = new Clipperz.PM.UI.Compact.Controllers.MainController(controllerParameters); |
78 | } else { | 76 | } else { |
79 | Clipperz.PM.RunTime.mainController = new Clipperz.PM.UI.Web.Controllers.MainController(controllerParameters); | 77 | Clipperz.PM.RunTime.mainController = new Clipperz.PM.UI.Web.Controllers.MainController(controllerParameters); |
80 | } | 78 | } |
81 | 79 | ||
82 | Clipperz.PM.RunTime.mainController.run(shouldShowRegistrationForm); | 80 | Clipperz.PM.RunTime.mainController.run(shouldShowRegistrationForm); |
83 | 81 | ||
84 | //Clipperz.log("HASH: " + window.location.hash); | 82 | //Clipperz.log("HASH: " + window.location.hash); |
85 | //if (window.location.hash != "") { | 83 | //if (window.location.hash != "") { |
86 | // window.location.hash = "" | 84 | // window.location.hash = "" |
87 | //} | 85 | //} |
88 | //Clipperz.log("HASH cleaned"); | 86 | //Clipperz.log("HASH cleaned"); |
89 | //#credentials=base64encoded({username:'joe', passphrase:'clipperz'}) | 87 | //#credentials=base64encoded({username:'joe', passphrase:'clipperz'}) |
90 | //MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'doLogin', {username:'joe', passphrase:'clipperz'}); | 88 | //MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'doLogin', {username:'joe', passphrase:'clipperz'}); |
91 | } | 89 | } |
92 | 90 | ||
93 | MochiKit.DOM.addLoadEvent(run); | 91 | MochiKit.DOM.addLoadEvent(run); |