Diffstat (limited to 'frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js index 6b467d0..f7991f1 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js +++ b/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js | |||
@@ -1,216 +1,213 @@ | |||
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) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } | 29 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.Panels.AccountPanel = function(anElement, args) { | 33 | Clipperz.PM.Components.Panels.AccountPanel = function(anElement, args) { |
37 | //MochiKit.Logging.logDebug(">>> new AccountPanel"); | 34 | //MochiKit.Logging.logDebug(">>> new AccountPanel"); |
38 | args = args || {}; | 35 | args = args || {}; |
39 | 36 | ||
40 | Clipperz.PM.Components.Panels.AccountPanel.superclass.constructor.call(this, anElement, args); | 37 | Clipperz.PM.Components.Panels.AccountPanel.superclass.constructor.call(this, anElement, args); |
41 | 38 | ||
42 | Clipperz.NotificationCenter.register(null, 'setupDone', this, 'render'); | 39 | Clipperz.NotificationCenter.register(null, 'setupDone', this, 'render'); |
43 | 40 | ||
44 | this._shouldLoadLoginHistory = true; | 41 | this._shouldLoadLoginHistory = true; |
45 | 42 | ||
46 | //this.render(); | 43 | //this.render(); |
47 | //MochiKit.Logging.logDebug("<<< new AccountPanel"); | 44 | //MochiKit.Logging.logDebug("<<< new AccountPanel"); |
48 | 45 | ||
49 | return this; | 46 | return this; |
50 | } | 47 | } |
51 | 48 | ||
52 | //============================================================================= | 49 | //============================================================================= |
53 | 50 | ||
54 | YAHOO.extendX(Clipperz.PM.Components.Panels.AccountPanel, Clipperz.PM.Components.Panels.BasePanel, { | 51 | YAHOO.extendX(Clipperz.PM.Components.Panels.AccountPanel, Clipperz.PM.Components.Panels.BasePanel, { |
55 | 52 | ||
56 | 'toString': function() { | 53 | 'toString': function() { |
57 | return "Clipperz.PM.Components.AccountPanel component"; | 54 | return "Clipperz.PM.Components.AccountPanel component"; |
58 | }, | 55 | }, |
59 | 56 | ||
60 | //------------------------------------------------------------------------- | 57 | //------------------------------------------------------------------------- |
61 | 58 | ||
62 | 'render': function() { | 59 | 'render': function() { |
63 | var errorMessageActor; | 60 | var errorMessageActor; |
64 | varchangePasswordButton; | 61 | varchangePasswordButton; |
65 | var deleteAccountButton; | 62 | var deleteAccountButton; |
66 | 63 | ||
67 | try { | 64 | try { |
68 | //MochiKit.Logging.logDebug(">>> AccountPanel.render"); | 65 | //MochiKit.Logging.logDebug(">>> AccountPanel.render"); |
69 | Clipperz.NotificationCenter.unregister(this); | 66 | Clipperz.NotificationCenter.unregister(this); |
70 | MochiKit.Signal.disconnectAllTo(this); | 67 | MochiKit.Signal.disconnectAllTo(this); |
71 | 68 | ||
72 | this.element().update(""); | 69 | this.element().update(""); |
73 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ | 70 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[ |
74 | {tag:'tbody', children:[ | 71 | {tag:'tbody', children:[ |
75 | {tag:'tr', children:[ | 72 | {tag:'tr', children:[ |
76 | {tag:'td', valign:'top', width:'200', children:[ | 73 | {tag:'td', valign:'top', width:'200', children:[ |
77 | {tag:'ul', id:"accountSubMenu", cls:'subMenu', children:[ | 74 | {tag:'ul', id:"accountSubMenu", cls:'subMenu', children:[ |
78 | {tag:'li', id:'changePassphraseTab', htmlString:Clipperz.PM.Strings['changePasswordTabLabel']}, | 75 | {tag:'li', id:'changePassphraseTab', htmlString:Clipperz.PM.Strings['changePasswordTabLabel']}, |
79 | {tag:'li', id:'manageOTPTab', htmlString:Clipperz.PM.Strings['manageOTPTabLabel']}, | 76 | {tag:'li', id:'manageOTPTab', htmlString:Clipperz.PM.Strings['manageOTPTabLabel']}, |
80 | {tag:'li', id:'accountPreferencesTab', htmlString:Clipperz.PM.Strings['accountPreferencesLabel']}, | 77 | {tag:'li', id:'accountPreferencesTab', htmlString:Clipperz.PM.Strings['accountPreferencesLabel']}, |
81 | {tag:'li', id:'loginHistoryTab', htmlString:Clipperz.PM.Strings['accountLoginHistoryLabel']}, | 78 | {tag:'li', id:'loginHistoryTab', htmlString:Clipperz.PM.Strings['accountLoginHistoryLabel']}, |
82 | {tag:'li', id:'deleteAccountTab', htmlString:Clipperz.PM.Strings['deleteAccountTabLabel']} | 79 | {tag:'li', id:'deleteAccountTab', htmlString:Clipperz.PM.Strings['deleteAccountTabLabel']} |
83 | // {tag:'li', id:'paidAccountTab'), htmlString:Clipperz.PM.Strings['paidAccountTabLabel']} | 80 | // {tag:'li', id:'paidAccountTab'), htmlString:Clipperz.PM.Strings['paidAccountTabLabel']} |
84 | ]} | 81 | ]} |
85 | ]}, | 82 | ]}, |
86 | {tag:'td', valign:'top', children:[ | 83 | {tag:'td', valign:'top', children:[ |
87 | {tag:'ul', cls:'clipperzTabPanels', children:[ | 84 | {tag:'ul', cls:'clipperzTabPanels', children:[ |
88 | {tag:'li', id:this.getId('changePassphrasePanel'), children:[ | 85 | {tag:'li', id:this.getId('changePassphrasePanel'), children:[ |
89 | {tag:'div', cls:'clipperzSubPanel', children:[ | 86 | {tag:'div', cls:'clipperzSubPanel', children:[ |
90 | {tag:'h5', htmlString:Clipperz.PM.Strings['changePasswordTabTitle']}, | 87 | {tag:'h5', htmlString:Clipperz.PM.Strings['changePasswordTabTitle']}, |
91 | {tag:'div', cls:'panelBody', id:'changePassphraseBlock', children:[ | 88 | {tag:'div', cls:'panelBody', id:'changePassphraseBlock', children:[ |
92 | {tag:'form', id:this.getId('changePassphraseForm'), children:[ | 89 | {tag:'form', id:this.getId('changePassphraseForm'), children:[ |
93 | {tag:'h5', cls:'errorMessage', id:this.getId('changePassphrase_errorMessage')}, | 90 | {tag:'h5', cls:'errorMessage', id:this.getId('changePassphrase_errorMessage')}, |
94 | {tag:'table', cls:'panelBody', children:[ | 91 | {tag:'table', cls:'panelBody', children:[ |
95 | {tag:'tr', children:[ | 92 | {tag:'tr', children:[ |
96 | {tag:'td', children:[ | 93 | {tag:'td', children:[ |
97 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormUsernameLabel']} | 94 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormUsernameLabel']} |
98 | ]}, | 95 | ]}, |
99 | {tag:'td', children:[ | 96 | {tag:'td', children:[ |
100 | {tag:'input', type:'text', name:'username', id:this.getId('changePassphrase_username')} | 97 | {tag:'input', type:'text', name:'username', id:this.getId('changePassphrase_username')} |
101 | ]} | 98 | ]} |
102 | ]}, | 99 | ]}, |
103 | {tag:'tr', children:[ | 100 | {tag:'tr', children:[ |
104 | {tag:'td', children:[ | 101 | {tag:'td', children:[ |
105 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormOldPassphraseLabel']} | 102 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormOldPassphraseLabel']} |
106 | ]}, | 103 | ]}, |
107 | {tag:'td', children:[ | 104 | {tag:'td', children:[ |
108 | {tag:'input', type:'password', name:'oldPassphrase', id:this.getId('changePassphrase_oldPassphrase')} | 105 | {tag:'input', type:'password', name:'oldPassphrase', id:this.getId('changePassphrase_oldPassphrase')} |
109 | ]} | 106 | ]} |
110 | ]}, | 107 | ]}, |
111 | {tag:'tr', children:[ | 108 | {tag:'tr', children:[ |
112 | {tag:'td', children:[ | 109 | {tag:'td', children:[ |
113 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormNewPassphraseLabel']} | 110 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormNewPassphraseLabel']} |
114 | ]}, | 111 | ]}, |
115 | {tag:'td', children:[ | 112 | {tag:'td', children:[ |
116 | {tag:'input', type:'password', name:'newPassphrase', id:this.getId('changePassphrase_newPassphrase')} | 113 | {tag:'input', type:'password', name:'newPassphrase', id:this.getId('changePassphrase_newPassphrase')} |
117 | ]} | 114 | ]} |
118 | ]}, | 115 | ]}, |
119 | {tag:'tr', children:[ | 116 | {tag:'tr', children:[ |
120 | {tag:'td', children:[ | 117 | {tag:'td', children:[ |
121 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormRetypePassphraseLabel']} | 118 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormRetypePassphraseLabel']} |
122 | ]}, | 119 | ]}, |
123 | {tag:'td', children:[ | 120 | {tag:'td', children:[ |
124 | {tag:'input', type:'password', name:'renewPassphrase', id:this.getId('changePassphrase_renewPassphrase')} | 121 | {tag:'input', type:'password', name:'renewPassphrase', id:this.getId('changePassphrase_renewPassphrase')} |
125 | ]} | 122 | ]} |
126 | ]}, | 123 | ]}, |
127 | {tag:'tr', children:[ | 124 | {tag:'tr', children:[ |
128 | {tag:'td', align:'right', children:[ | 125 | {tag:'td', align:'right', children:[ |
129 | {tag:'input', type:'checkbox', id:this.getId('changePassphrase_safetyCheck')} | 126 | {tag:'input', type:'checkbox', id:this.getId('changePassphrase_safetyCheck')} |
130 | ]}, | 127 | ]}, |
131 | {tag:'td', children:[ | 128 | {tag:'td', children:[ |
132 | {tag:'span', htmlString:Clipperz.PM.Strings['changePasswordFormSafetyCheckboxLabel']} | 129 | {tag:'span', htmlString:Clipperz.PM.Strings['changePasswordFormSafetyCheckboxLabel']} |
133 | ]} | 130 | ]} |
134 | ]} | 131 | ]} |
135 | ]}, | 132 | ]}, |
136 | {tag:'div', cls:'clipperzSubPanelButtonBox', children:[ | 133 | {tag:'div', cls:'clipperzSubPanelButtonBox', children:[ |
137 | {tag:'div', id:this.getId('changePassphraseButton')} | 134 | {tag:'div', id:this.getId('changePassphraseButton')} |
138 | ]} | 135 | ]} |
139 | ]} | 136 | ]} |
140 | ]} | 137 | ]} |
141 | ]} | 138 | ]} |
142 | ]}, | 139 | ]}, |
143 | {tag:'li', id:this.getId('manageOTPPanel'), children:[ | 140 | {tag:'li', id:this.getId('manageOTPPanel'), children:[ |
144 | {tag:'div', cls:'clipperzSubPanel', children:[ | 141 | {tag:'div', cls:'clipperzSubPanel', children:[ |
145 | {tag:'h5', htmlString:Clipperz.PM.Strings['manageOTPTabTitle']}, | 142 | {tag:'h5', htmlString:Clipperz.PM.Strings['manageOTPTabTitle']}, |
146 | {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['manageOTPTabDescription']}, | 143 | {tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['manageOTPTabDescription']}, |
147 | {tag:'div', id:'OTPComponent'} | 144 | {tag:'div', id:'OTPComponent'} |
148 | ]} | 145 | ]} |
149 | ]}, | 146 | ]}, |
150 | {tag:'li', id:this.getId('accountPreferencesPanel'), children:[ | 147 | {tag:'li', id:this.getId('accountPreferencesPanel'), children:[ |
151 | {tag:'div', cls:'clipperzSubPanel', children:[ | 148 | {tag:'div', cls:'clipperzSubPanel', children:[ |
152 | {tag:'h5', htmlString:Clipperz.PM.Strings['accountPreferencesTabTitle']}, | 149 | {tag:'h5', htmlString:Clipperz.PM.Strings['accountPreferencesTabTitle']}, |
153 | {tag:'div', cls:'panelBody', id:this.getId('preferencesPanelBody')} | 150 | {tag:'div', cls:'panelBody', id:this.getId('preferencesPanelBody')} |
154 | ]} | 151 | ]} |
155 | ]}, | 152 | ]}, |
156 | {tag:'li', id:this.getId('loginHistoryAccountPanel'), children:[ | 153 | {tag:'li', id:this.getId('loginHistoryAccountPanel'), children:[ |
157 | {tag:'div', cls:'clipperzSubPanel', children:[ | 154 | {tag:'div', cls:'clipperzSubPanel', children:[ |
158 | {tag:'h5', htmlString:Clipperz.PM.Strings['loginHistoryTabTitle']}, | 155 | {tag:'h5', htmlString:Clipperz.PM.Strings['loginHistoryTabTitle']}, |
159 | {tag:'div', cls:'panelBody', id:'loginHistoryAccountBlock'} | 156 | {tag:'div', cls:'panelBody', id:'loginHistoryAccountBlock'} |
160 | ]} | 157 | ]} |
161 | ]}, | 158 | ]}, |
162 | {tag:'li', id:this.getId('deleteAccountPanel'), children:[ | 159 | {tag:'li', id:this.getId('deleteAccountPanel'), children:[ |
163 | {tag:'div', cls:'clipperzSubPanel', children:[ | 160 | {tag:'div', cls:'clipperzSubPanel', children:[ |
164 | {tag:'h5', htmlString:Clipperz.PM.Strings['deleteAccountTabTitle']}, | 161 | {tag:'h5', htmlString:Clipperz.PM.Strings['deleteAccountTabTitle']}, |
165 | 162 | ||
166 | {tag:'div', cls:'panelBody', id:'deleteAccountBlock', children:[ | 163 | {tag:'div', cls:'panelBody', id:'deleteAccountBlock', children:[ |
167 | {tag:'form', id:this.getId('deleteAccountForm'), children:[ | 164 | {tag:'form', id:this.getId('deleteAccountForm'), children:[ |
168 | {tag:'h5', cls:'errorMessage', id:this.getId('deleteAccount_errorMessage')}, | 165 | {tag:'h5', cls:'errorMessage', id:this.getId('deleteAccount_errorMessage')}, |
169 | {tag:'table', cls:'panelBody', children:[ | 166 | {tag:'table', cls:'panelBody', children:[ |
170 | {tag:'tr', children:[ | 167 | {tag:'tr', children:[ |
171 | {tag:'td', children:[ | 168 | {tag:'td', children:[ |
172 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['deleteAccountFormUsernameLabel']} | 169 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['deleteAccountFormUsernameLabel']} |
173 | ]}, | 170 | ]}, |
174 | {tag:'td', children:[ | 171 | {tag:'td', children:[ |
175 | {tag:'input', type:'text', name:'username', id:this.getId('deleteAccount_username')} | 172 | {tag:'input', type:'text', name:'username', id:this.getId('deleteAccount_username')} |
176 | ]} | 173 | ]} |
177 | ]}, | 174 | ]}, |
178 | {tag:'tr', children:[ | 175 | {tag:'tr', children:[ |
179 | {tag:'td', children:[ | 176 | {tag:'td', children:[ |
180 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['deleteAccountFormPassphraseLabel']} | 177 | {tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['deleteAccountFormPassphraseLabel']} |
181 | ]}, | 178 | ]}, |
182 | {tag:'td', children:[ | 179 | {tag:'td', children:[ |
183 | {tag:'input', type:'password', name:'passphrase', id:this.getId('deleteAccount_passphrase')} | 180 | {tag:'input', type:'password', name:'passphrase', id:this.getId('deleteAccount_passphrase')} |
184 | ]} | 181 | ]} |
185 | ]}, | 182 | ]}, |
186 | {tag:'tr', children:[ | 183 | {tag:'tr', children:[ |
187 | {tag:'td', align:'right', children:[ | 184 | {tag:'td', align:'right', children:[ |
188 | {tag:'input', type:'checkbox', id:this.getId('deleteAccount_safetyCheck')} | 185 | {tag:'input', type:'checkbox', id:this.getId('deleteAccount_safetyCheck')} |
189 | ]}, | 186 | ]}, |
190 | {tag:'td', children:[ | 187 | {tag:'td', children:[ |
191 | {tag:'span', htmlString:Clipperz.PM.Strings['deleteAccountFormSafetyCheckboxLabel']} | 188 | {tag:'span', htmlString:Clipperz.PM.Strings['deleteAccountFormSafetyCheckboxLabel']} |
192 | ]} | 189 | ]} |
193 | ]} | 190 | ]} |
194 | ]}, | 191 | ]}, |
195 | {tag:'div', cls:'clipperzSubPanelButtonBox', children:[ | 192 | {tag:'div', cls:'clipperzSubPanelButtonBox', children:[ |
196 | {tag:'div', id:this.getId('deleteAccountButton')} | 193 | {tag:'div', id:this.getId('deleteAccountButton')} |
197 | ]} | 194 | ]} |
198 | ]} | 195 | ]} |
199 | ]} | 196 | ]} |
200 | ]} | 197 | ]} |
201 | ]} | 198 | ]} |
202 | /* | 199 | /* |
203 | {tag:'li', id:this.getId('paidAccountPanel'), children:[ | 200 | {tag:'li', id:this.getId('paidAccountPanel'), children:[ |
204 | {tag:'div', cls:'clipperzSubPanel', children:[ | 201 | {tag:'div', cls:'clipperzSubPanel', children:[ |
205 | {tag:'h5', htmlString:Clipperz.PM.Strings['upgradeAccountTabTitle']}, | 202 | {tag:'h5', htmlString:Clipperz.PM.Strings['upgradeAccountTabTitle']}, |
206 | {tag:'div', htmlString:Clipperz.PM.Strings['comingSoon']} | 203 | {tag:'div', htmlString:Clipperz.PM.Strings['comingSoon']} |
207 | ]} | 204 | ]} |
208 | ]} | 205 | ]} |
209 | */ | 206 | */ |
210 | ]} | 207 | ]} |
211 | ]} | 208 | ]} |
212 | ]} | 209 | ]} |
213 | ]} | 210 | ]} |
214 | ]}); | 211 | ]}); |
215 | 212 | ||
216 | //MochiKit.Logging.logDebug("--- AccountPanel.render - 1"); | 213 | //MochiKit.Logging.logDebug("--- AccountPanel.render - 1"); |