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/beta/js/Clipperz/PM/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]
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 | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/frontend/beta/js/Clipperz/PM/Main.js b/frontend/beta/js/Clipperz/PM/Main.js index 989e0a4..3dded31 100644 --- a/frontend/beta/js/Clipperz/PM/Main.js +++ b/frontend/beta/js/Clipperz/PM/Main.js | |||
@@ -1,118 +1,116 @@ | |||
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 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 24 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
27 | 25 | ||
28 | Clipperz.PM.VERSION = "0.1"; | 26 | Clipperz.PM.VERSION = "0.1"; |
29 | Clipperz.PM.NAME = "Clipperz.PM"; | 27 | Clipperz.PM.NAME = "Clipperz.PM"; |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Main = function() { | 31 | Clipperz.PM.Main = function() { |
34 | this._loginPanel = null; | 32 | this._loginPanel = null; |
35 | this._user = null; | 33 | this._user = null; |
36 | 34 | ||
37 | this._isRunningCompact = false; | 35 | this._isRunningCompact = false; |
38 | 36 | ||
39 | Clipperz.NotificationCenter.register(null, 'userConnected', this, 'userConnectedCallback'); | 37 | Clipperz.NotificationCenter.register(null, 'userConnected', this, 'userConnectedCallback'); |
40 | Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler'); | 38 | Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler'); |
41 | 39 | ||
42 | Clipperz.NotificationCenter.register(null, 'EXCEPTION', this, 'reportException'); | 40 | Clipperz.NotificationCenter.register(null, 'EXCEPTION', this, 'reportException'); |
43 | 41 | ||
44 | return this; | 42 | return this; |
45 | } | 43 | } |
46 | 44 | ||
47 | //============================================================================= | 45 | //============================================================================= |
48 | 46 | ||
49 | MochiKit.Base.update(Clipperz.PM.Main.prototype, { | 47 | MochiKit.Base.update(Clipperz.PM.Main.prototype, { |
50 | 'toString': function() { | 48 | 'toString': function() { |
51 | return "Clipperz.PM.Main"; | 49 | return "Clipperz.PM.Main"; |
52 | }, | 50 | }, |
53 | 51 | ||
54 | 'switchLanguageHandler': function() { | 52 | 'switchLanguageHandler': function() { |
55 | //MochiKit.Logging.logDebug(">>> main.switchLanguageHandler"); | 53 | //MochiKit.Logging.logDebug(">>> main.switchLanguageHandler"); |
56 | YAHOO.ext.Element.get('donateHeaderIconLink').dom.href = Clipperz.PM.Strings['donateHeaderLinkUrl']; | 54 | YAHOO.ext.Element.get('donateHeaderIconLink').dom.href = Clipperz.PM.Strings['donateHeaderLinkUrl']; |
57 | YAHOO.ext.Element.get('donateHeaderLink').update(Clipperz.PM.Strings['donateHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['donateHeaderLinkUrl']; | 55 | YAHOO.ext.Element.get('donateHeaderLink').update(Clipperz.PM.Strings['donateHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['donateHeaderLinkUrl']; |
58 | YAHOO.ext.Element.get('creditsHeaderLink').update(Clipperz.PM.Strings['creditsHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['creditsHeaderLinkUrl']; | 56 | YAHOO.ext.Element.get('creditsHeaderLink').update(Clipperz.PM.Strings['creditsHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['creditsHeaderLinkUrl']; |
59 | YAHOO.ext.Element.get('feedbackHeaderLink').update(Clipperz.PM.Strings['feedbackHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['feedbackHeaderLinkUrl']; | 57 | YAHOO.ext.Element.get('feedbackHeaderLink').update(Clipperz.PM.Strings['feedbackHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['feedbackHeaderLinkUrl']; |
60 | YAHOO.ext.Element.get('helpHeaderLink').update(Clipperz.PM.Strings['helpHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['helpHeaderLinkUrl']; | 58 | YAHOO.ext.Element.get('helpHeaderLink').update(Clipperz.PM.Strings['helpHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['helpHeaderLinkUrl']; |
61 | YAHOO.ext.Element.get('forumHeaderLink').update(Clipperz.PM.Strings['forumHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['forumHeaderLinkUrl']; | 59 | YAHOO.ext.Element.get('forumHeaderLink').update(Clipperz.PM.Strings['forumHeaderLinkLabel']).dom.href = Clipperz.PM.Strings['forumHeaderLinkUrl']; |
62 | 60 | ||
63 | if (YAHOO.ext.Element.get('logout') != null) { | 61 | if (YAHOO.ext.Element.get('logout') != null) { |
64 | YAHOO.ext.Element.get('logout').update(Clipperz.PM.Strings['logoutMenuLabel']); | 62 | YAHOO.ext.Element.get('logout').update(Clipperz.PM.Strings['logoutMenuLabel']); |
65 | YAHOO.ext.Element.get('lock').update(Clipperz.PM.Strings['lockMenuLabel']); | 63 | YAHOO.ext.Element.get('lock').update(Clipperz.PM.Strings['lockMenuLabel']); |
66 | 64 | ||
67 | YAHOO.ext.Element.get('recordsTabAnchor').update(Clipperz.PM.Strings['recordMenuLabel']); | 65 | YAHOO.ext.Element.get('recordsTabAnchor').update(Clipperz.PM.Strings['recordMenuLabel']); |
68 | YAHOO.ext.Element.get('accountTabAnchor').update(Clipperz.PM.Strings['accountMenuLabel']); | 66 | YAHOO.ext.Element.get('accountTabAnchor').update(Clipperz.PM.Strings['accountMenuLabel']); |
69 | YAHOO.ext.Element.get('dataTabAnchor').update(Clipperz.PM.Strings['dataMenuLabel']); | 67 | YAHOO.ext.Element.get('dataTabAnchor').update(Clipperz.PM.Strings['dataMenuLabel']); |
70 | // YAHOO.ext.Element.get('contactsTabAnchor').update(Clipperz.PM.Strings['contactsMenuLabel']); | 68 | // YAHOO.ext.Element.get('contactsTabAnchor').update(Clipperz.PM.Strings['contactsMenuLabel']); |
71 | YAHOO.ext.Element.get('toolsTabAnchor').update(Clipperz.PM.Strings['toolsMenuLabel']); | 69 | YAHOO.ext.Element.get('toolsTabAnchor').update(Clipperz.PM.Strings['toolsMenuLabel']); |
72 | } | 70 | } |
73 | //MochiKit.Logging.logDebug("<<< main.switchLanguageHandler"); | 71 | //MochiKit.Logging.logDebug("<<< main.switchLanguageHandler"); |
74 | }, | 72 | }, |
75 | 73 | ||
76 | //------------------------------------------------------------------------- | 74 | //------------------------------------------------------------------------- |
77 | 75 | ||
78 | 'fixToDrawTheMainTabsCorrectlyOnSafari': function() { | 76 | 'fixToDrawTheMainTabsCorrectlyOnSafari': function() { |
79 | this.switchLanguageHandler(); | 77 | this.switchLanguageHandler(); |
80 | }, | 78 | }, |
81 | 79 | ||
82 | //------------------------------------------------------------------------- | 80 | //------------------------------------------------------------------------- |
83 | 81 | ||
84 | 'run': function(shouldShowRegistrationForm) { | 82 | 'run': function(shouldShowRegistrationForm) { |
85 | varmainElement; | 83 | varmainElement; |
86 | 84 | ||
87 | Clipperz.NotificationCenter.register(null, 'updatedProgressState', this, 'updateProgressDialogStatus'); | 85 | Clipperz.NotificationCenter.register(null, 'updatedProgressState', this, 'updateProgressDialogStatus'); |
88 | 86 | ||
89 | YAHOO.ext.Element.get('recordDetailEditModeHeaderMask').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide().unmask(); | 87 | YAHOO.ext.Element.get('recordDetailEditModeHeaderMask').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide().unmask(); |
90 | YAHOO.ext.Element.get('recordDetailEditModeVerticalMask').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide().unmask(); | 88 | YAHOO.ext.Element.get('recordDetailEditModeVerticalMask').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide().unmask(); |
91 | 89 | ||
92 | //MochiKit.Logging.logDebug(">>> Main.run"); | 90 | //MochiKit.Logging.logDebug(">>> Main.run"); |
93 | mainElement = YAHOO.ext.Element.get('main'); | 91 | mainElement = YAHOO.ext.Element.get('main'); |
94 | if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { | 92 | if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) { |
95 | YAHOO.ext.Element.get('applicationVersionType').dom.className = "readOnly"; | 93 | YAHOO.ext.Element.get('applicationVersionType').dom.className = "readOnly"; |
96 | } | 94 | } |
97 | mainElement.update(""); | 95 | mainElement.update(""); |
98 | 96 | ||
99 | Clipperz.YUI.DomHelper.append(mainElement.dom, {tag:'ul', cls:'clipperzTabPanels', children:[ | 97 | Clipperz.YUI.DomHelper.append(mainElement.dom, {tag:'ul', cls:'clipperzTabPanels', children:[ |
100 | {tag:'li', id:'loginPanel'} | 98 | {tag:'li', id:'loginPanel'} |
101 | ]}) | 99 | ]}) |
102 | 100 | ||
103 | this.setLoginPanel(new Clipperz.PM.Components.Panels.LoginPanel(YAHOO.ext.Element.get('loginPanel'))); | 101 | this.setLoginPanel(new Clipperz.PM.Components.Panels.LoginPanel(YAHOO.ext.Element.get('loginPanel'))); |
104 | 102 | ||
105 | //MochiKit.Logging.logDebug("--- Main.run - selecting active form to show ..."); | 103 | //MochiKit.Logging.logDebug("--- Main.run - selecting active form to show ..."); |
106 | if (shouldShowRegistrationForm == true) { | 104 | if (shouldShowRegistrationForm == true) { |
107 | this.loginPanel().showRegistrationForm(false); | 105 | this.loginPanel().showRegistrationForm(false); |
108 | } else { | 106 | } else { |
109 | this.loginPanel().showLoginForm(false); | 107 | this.loginPanel().showLoginForm(false); |
110 | } | 108 | } |
111 | 109 | ||
112 | this.switchLanguageHandler(); | 110 | this.switchLanguageHandler(); |
113 | //MochiKit.Logging.logDebug("--- Main.run - selecting active form to show. done."); | 111 | //MochiKit.Logging.logDebug("--- Main.run - selecting active form to show. done."); |
114 | //MochiKit.Logging.logDebug("<<< Main.run"); | 112 | //MochiKit.Logging.logDebug("<<< Main.run"); |
115 | }, | 113 | }, |
116 | 114 | ||
117 | //------------------------------------------------------------------------- | 115 | //------------------------------------------------------------------------- |
118 | 116 | ||