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,120 +1,117 @@ | |||
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:[ |