Diffstat (limited to 'frontend/beta/js/Clipperz/PM/Main.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/beta/js/Clipperz/PM/Main.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/frontend/beta/js/Clipperz/PM/Main.js b/frontend/beta/js/Clipperz/PM/Main.js index 9a068e1..989e0a4 100644 --- a/frontend/beta/js/Clipperz/PM/Main.js +++ b/frontend/beta/js/Clipperz/PM/Main.js | |||
@@ -1,88 +1,85 @@ | |||
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.PM) == 'undefined') { Clipperz.PM = {}; } | 26 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
30 | 27 | ||
31 | Clipperz.PM.VERSION = "0.1"; | 28 | Clipperz.PM.VERSION = "0.1"; |
32 | Clipperz.PM.NAME = "Clipperz.PM"; | 29 | Clipperz.PM.NAME = "Clipperz.PM"; |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Main = function() { | 33 | Clipperz.PM.Main = function() { |
37 | this._loginPanel = null; | 34 | this._loginPanel = null; |
38 | this._user = null; | 35 | this._user = null; |
39 | 36 | ||
40 | this._isRunningCompact = false; | 37 | this._isRunningCompact = false; |
41 | 38 | ||
42 | Clipperz.NotificationCenter.register(null, 'userConnected', this, 'userConnectedCallback'); | 39 | Clipperz.NotificationCenter.register(null, 'userConnected', this, 'userConnectedCallback'); |
43 | Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler'); | 40 | Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler'); |
44 | 41 | ||
45 | Clipperz.NotificationCenter.register(null, 'EXCEPTION', this, 'reportException'); | 42 | Clipperz.NotificationCenter.register(null, 'EXCEPTION', this, 'reportException'); |
46 | 43 | ||
47 | return this; | 44 | return this; |
48 | } | 45 | } |
49 | 46 | ||
50 | //============================================================================= | 47 | //============================================================================= |
51 | 48 | ||
52 | MochiKit.Base.update(Clipperz.PM.Main.prototype, { | 49 | MochiKit.Base.update(Clipperz.PM.Main.prototype, { |
53 | 'toString': function() { | 50 | 'toString': function() { |
54 | return "Clipperz.PM.Main"; | 51 | return "Clipperz.PM.Main"; |
55 | }, | 52 | }, |
56 | 53 | ||
57 | 'switchLanguageHandler': function() { | 54 | 'switchLanguageHandler': function() { |
58 | //MochiKit.Logging.logDebug(">>> main.switchLanguageHandler"); | 55 | //MochiKit.Logging.logDebug(">>> main.switchLanguageHandler"); |
59 | YAHOO.ext.Element.get('donateHeaderIconLink').dom.href = Clipperz.PM.Strings['donateHeaderLinkUrl']; | 56 | YAHOO.ext.Element.get('donateHeaderIconLink').dom.href = Clipperz.PM.Strings['donateHeaderLinkUrl']; |
60 | YAHOO.ext.Element.get('donateHeaderLink').update(Clipperz.PM.Strings['donateHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['donateHeaderLinkUrl']; | 57 | YAHOO.ext.Element.get('donateHeaderLink').update(Clipperz.PM.Strings['donateHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['donateHeaderLinkUrl']; |
61 | YAHOO.ext.Element.get('creditsHeaderLink').update(Clipperz.PM.Strings['creditsHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['creditsHeaderLinkUrl']; | 58 | YAHOO.ext.Element.get('creditsHeaderLink').update(Clipperz.PM.Strings['creditsHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['creditsHeaderLinkUrl']; |
62 | YAHOO.ext.Element.get('feedbackHeaderLink').update(Clipperz.PM.Strings['feedbackHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['feedbackHeaderLinkUrl']; | 59 | YAHOO.ext.Element.get('feedbackHeaderLink').update(Clipperz.PM.Strings['feedbackHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['feedbackHeaderLinkUrl']; |
63 | YAHOO.ext.Element.get('helpHeaderLink').update(Clipperz.PM.Strings['helpHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['helpHeaderLinkUrl']; | 60 | YAHOO.ext.Element.get('helpHeaderLink').update(Clipperz.PM.Strings['helpHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['helpHeaderLinkUrl']; |
64 | YAHOO.ext.Element.get('forumHeaderLink').update(Clipperz.PM.Strings['forumHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['forumHeaderLinkUrl']; | 61 | YAHOO.ext.Element.get('forumHeaderLink').update(Clipperz.PM.Strings['forumHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['forumHeaderLinkUrl']; |
65 | 62 | ||
66 | if (YAHOO.ext.Element.get('logout') != null) { | 63 | if (YAHOO.ext.Element.get('logout') != null) { |
67 | YAHOO.ext.Element.get('logout').update(Clipperz.PM.Strings['logoutMenuLabel']); | 64 | YAHOO.ext.Element.get('logout').update(Clipperz.PM.Strings['logoutMenuLabel']); |
68 | YAHOO.ext.Element.get('lock').update(Clipperz.PM.Strings['lockMenuLabel']); | 65 | YAHOO.ext.Element.get('lock').update(Clipperz.PM.Strings['lockMenuLabel']); |
69 | 66 | ||
70 | YAHOO.ext.Element.get('recordsTabAnchor').update(Clipperz.PM.Strings['recordMenuLabel']); | 67 | YAHOO.ext.Element.get('recordsTabAnchor').update(Clipperz.PM.Strings['recordMenuLabel']); |
71 | YAHOO.ext.Element.get('accountTabAnchor').update(Clipperz.PM.Strings['accountMenuLabel']); | 68 | YAHOO.ext.Element.get('accountTabAnchor').update(Clipperz.PM.Strings['accountMenuLabel']); |
72 | YAHOO.ext.Element.get('dataTabAnchor').update(Clipperz.PM.Strings['dataMenuLabel']); | 69 | YAHOO.ext.Element.get('dataTabAnchor').update(Clipperz.PM.Strings['dataMenuLabel']); |
73 | // YAHOO.ext.Element.get('contactsTabAnchor').update(Clipperz.PM.Strings['contactsMenuLabel']); | 70 | // YAHOO.ext.Element.get('contactsTabAnchor').update(Clipperz.PM.Strings['contactsMenuLabel']); |
74 | YAHOO.ext.Element.get('toolsTabAnchor').update(Clipperz.PM.Strings['toolsMenuLabel']); | 71 | YAHOO.ext.Element.get('toolsTabAnchor').update(Clipperz.PM.Strings['toolsMenuLabel']); |
75 | } | 72 | } |
76 | //MochiKit.Logging.logDebug("<<< main.switchLanguageHandler"); | 73 | //MochiKit.Logging.logDebug("<<< main.switchLanguageHandler"); |
77 | }, | 74 | }, |
78 | 75 | ||
79 | //------------------------------------------------------------------------- | 76 | //------------------------------------------------------------------------- |
80 | 77 | ||
81 | 'fixToDrawTheMainTabsCorrectlyOnSafari': function() { | 78 | 'fixToDrawTheMainTabsCorrectlyOnSafari': function() { |
82 | this.switchLanguageHandler(); | 79 | this.switchLanguageHandler(); |
83 | }, | 80 | }, |
84 | 81 | ||
85 | //------------------------------------------------------------------------- | 82 | //------------------------------------------------------------------------- |
86 | 83 | ||
87 | 'run': function(shouldShowRegistrationForm) { | 84 | 'run': function(shouldShowRegistrationForm) { |
88 | varmainElement; | 85 | varmainElement; |