Diffstat (limited to 'frontend/beta/js/Clipperz/PM/Components/Compact') (more/less context) (ignore whitespace changes)
3 files changed, 30 insertions, 36 deletions
diff --git a/frontend/beta/js/Clipperz/PM/Components/Compact/CompactHeader.js b/frontend/beta/js/Clipperz/PM/Components/Compact/CompactHeader.js index 7a3b3a3..14e42a5 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Compact/CompactHeader.js +++ b/frontend/beta/js/Clipperz/PM/Components/Compact/CompactHeader.js | |||
@@ -1,83 +1,81 @@ | |||
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) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; } | 27 | if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; } |
30 | 28 | ||
31 | Clipperz.PM.Components.Compact.CompactHeader = function(anElement, args) { | 29 | Clipperz.PM.Components.Compact.CompactHeader = function(anElement, args) { |
32 | 30 | ||
33 | Clipperz.PM.Components.Compact.CompactHeader.superclass.constructor.call(this, anElement, args); | 31 | Clipperz.PM.Components.Compact.CompactHeader.superclass.constructor.call(this, anElement, args); |
34 | 32 | ||
35 | this.render(); | 33 | this.render(); |
36 | 34 | ||
37 | return this; | 35 | return this; |
38 | }; | 36 | }; |
39 | 37 | ||
40 | YAHOO.extendX(Clipperz.PM.Components.Compact.CompactHeader, Clipperz.PM.Components.BaseComponent, { | 38 | YAHOO.extendX(Clipperz.PM.Components.Compact.CompactHeader, Clipperz.PM.Components.BaseComponent, { |
41 | 39 | ||
42 | 'toString': function() { | 40 | 'toString': function() { |
43 | return "Clipperz.PM.Components.Compact.CompactHeader"; | 41 | return "Clipperz.PM.Components.Compact.CompactHeader"; |
44 | }, | 42 | }, |
45 | 43 | ||
46 | //----------------------------------------------------- | 44 | //----------------------------------------------------- |
47 | 45 | ||
48 | 'render': function() { | 46 | 'render': function() { |
49 | this.element().update(""); | 47 | this.element().update(""); |
50 | 48 | ||
51 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', children:[ | 49 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', children:[ |
52 | {tag:'img', src:'./images/logo.gif'}, | 50 | {tag:'img', src:'./images/logo.gif'}, |
53 | {tag:'div', id:'lockBlock', children:[ | 51 | {tag:'div', id:'lockBlock', children:[ |
54 | {tag:'input', type:'checkbox', id:'autolock'}, | 52 | {tag:'input', type:'checkbox', id:'autolock'}, |
55 | {tag:'span', html:'auto'}, | 53 | {tag:'span', html:'auto'}, |
56 | {tag:'a', href:'#', htmlString:Clipperz.PM.Strings['lockMenuLabel'], id:'lock'} | 54 | {tag:'a', href:'#', htmlString:Clipperz.PM.Strings['lockMenuLabel'], id:'lock'} |
57 | ]} | 55 | ]} |
58 | ]}); | 56 | ]}); |
59 | 57 | ||
60 | Clipperz.YUI.DomHelper.append(this.element().dom, | 58 | Clipperz.YUI.DomHelper.append(this.element().dom, |
61 | {tag:'div', id:'compactMiscLinks', children:[ | 59 | {tag:'div', id:'compactMiscLinks', children:[ |
62 | {tag:'a', id:'donateHeaderIconLink', target:'_blank', href:Clipperz.PM.Strings['donateHeaderLinkUrl'], children:[ | 60 | {tag:'a', id:'donateHeaderIconLink', target:'_blank', href:Clipperz.PM.Strings['donateHeaderLinkUrl'], children:[ |
63 | {tag:'img', id:'donateHeaderLinkIcon', src:'./images/smiles_small.gif'} | 61 | {tag:'img', id:'donateHeaderLinkIcon', src:'./images/smiles_small.gif'} |
64 | ]}, | 62 | ]}, |
65 | {tag:'ul', children:[ | 63 | {tag:'ul', children:[ |
66 | {tag:'li', children:[{tag:'a', id:'donateHeaderLink', html:'donate', target:'_blank'}]}, | 64 | {tag:'li', children:[{tag:'a', id:'donateHeaderLink', html:'donate', target:'_blank'}]}, |
67 | {tag:'li', children:[{tag:'a', id:'creditsHeaderLink', html:'credits', target:'_blank'}]}, | 65 | {tag:'li', children:[{tag:'a', id:'creditsHeaderLink', html:'credits', target:'_blank'}]}, |
68 | {tag:'li', children:[{tag:'a', id:'feedbackHeaderLink', html:'feedback', target:'_blank'}]}, | 66 | {tag:'li', children:[{tag:'a', id:'feedbackHeaderLink', html:'feedback', target:'_blank'}]}, |
69 | {tag:'li', children:[{tag:'a', id:'helpHeaderLink', html:'help', target:'_blank'}]}, | 67 | {tag:'li', children:[{tag:'a', id:'helpHeaderLink', html:'help', target:'_blank'}]}, |
70 | {tag:'li', children:[{tag:'a', id:'forumHeaderLink', html:'forum', target:'_blank'}]} | 68 | {tag:'li', children:[{tag:'a', id:'forumHeaderLink', html:'forum', target:'_blank'}]} |
71 | ]} | 69 | ]} |
72 | ]} | 70 | ]} |
73 | ); | 71 | ); |
74 | 72 | ||
75 | YAHOO.ext.Element.get('lockBlock').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 73 | YAHOO.ext.Element.get('lockBlock').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
76 | Clipperz.NotificationCenter.notify(this, 'switchLanguage'); | 74 | Clipperz.NotificationCenter.notify(this, 'switchLanguage'); |
77 | }, | 75 | }, |
78 | 76 | ||
79 | //----------------------------------------------------- | 77 | //----------------------------------------------------- |
80 | __syntaxFix__: '__syntaxFix__' | 78 | __syntaxFix__: '__syntaxFix__' |
81 | }); | 79 | }); |
82 | 80 | ||
83 | 81 | ||
diff --git a/frontend/beta/js/Clipperz/PM/Components/Compact/CompactInterface.js b/frontend/beta/js/Clipperz/PM/Components/Compact/CompactInterface.js index 0f6858a..1312967 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Compact/CompactInterface.js +++ b/frontend/beta/js/Clipperz/PM/Components/Compact/CompactInterface.js | |||
@@ -1,214 +1,212 @@ | |||
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) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; } | 27 | if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; } |
30 | 28 | ||
31 | Clipperz.PM.Components.Compact.CompactInterface = function(anElement, args) { | 29 | Clipperz.PM.Components.Compact.CompactInterface = function(anElement, args) { |
32 | 30 | ||
33 | Clipperz.PM.Components.Compact.CompactInterface.superclass.constructor.call(this, anElement, args); | 31 | Clipperz.PM.Components.Compact.CompactInterface.superclass.constructor.call(this, anElement, args); |
34 | 32 | ||
35 | this._directLoginItemTemplate = null; | 33 | this._directLoginItemTemplate = null; |
36 | this._user = args.user; | 34 | this._user = args.user; |
37 | this._autoLockTimer = null; | 35 | this._autoLockTimer = null; |
38 | 36 | ||
39 | Clipperz.NotificationCenter.register(null, 'updatedProgressState', this, 'userNotificationHandler') | 37 | Clipperz.NotificationCenter.register(null, 'updatedProgressState', this, 'userNotificationHandler') |
40 | Clipperz.NotificationCenter.register(null, 'directLoginAdded', this, 'directLoginAddedHandler'); | 38 | Clipperz.NotificationCenter.register(null, 'directLoginAdded', this, 'directLoginAddedHandler'); |
41 | 39 | ||
42 | this.render(); | 40 | this.render(); |
43 | 41 | ||
44 | return this; | 42 | return this; |
45 | }; | 43 | }; |
46 | 44 | ||
47 | YAHOO.extendX(Clipperz.PM.Components.Compact.CompactInterface, Clipperz.PM.Components.BaseComponent, { | 45 | YAHOO.extendX(Clipperz.PM.Components.Compact.CompactInterface, Clipperz.PM.Components.BaseComponent, { |
48 | 46 | ||
49 | 'toString': function() { | 47 | 'toString': function() { |
50 | return "Clipperz.PM.Components.Compact.CompactInterface"; | 48 | return "Clipperz.PM.Components.Compact.CompactInterface"; |
51 | }, | 49 | }, |
52 | 50 | ||
53 | //----------------------------------------------------- | 51 | //----------------------------------------------------- |
54 | 52 | ||
55 | 'render': function() { | 53 | 'render': function() { |
56 | var result; | 54 | var result; |
57 | varlayout; | 55 | varlayout; |
58 | var registerButton; | 56 | var registerButton; |
59 | 57 | ||
60 | //MochiKit.Logging.logDebug(">>> CompactInterface.render"); | 58 | //MochiKit.Logging.logDebug(">>> CompactInterface.render"); |
61 | this.element().update(""); | 59 | this.element().update(""); |
62 | 60 | ||
63 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', children:[ | 61 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', children:[ |
64 | {tag:'div', id:this.getId('cantentPanel'), children:[ | 62 | {tag:'div', id:this.getId('cantentPanel'), children:[ |
65 | {tag:'h4', id:this.getId('message')}, | 63 | {tag:'h4', id:this.getId('message')}, |
66 | {tag:'ul', id:'directLogins', children:[]} | 64 | {tag:'ul', id:'directLogins', children:[]} |
67 | ]}, | 65 | ]}, |
68 | {tag:'div', id:this.getId('lockPanel'), cls:'lockPanel', children:[ | 66 | {tag:'div', id:this.getId('lockPanel'), cls:'lockPanel', children:[ |
69 | {tag:'div', htmlString:Clipperz.PM.Strings['lockDescription']}, | 67 | {tag:'div', htmlString:Clipperz.PM.Strings['lockDescription']}, |
70 | {tag:'form', id:'lockDialogForm', children:[ | 68 | {tag:'form', id:'lockDialogForm', children:[ |
71 | {tag:'input', type:'password', id:this.getId('lockPassphrase')} | 69 | {tag:'input', type:'password', id:this.getId('lockPassphrase')} |
72 | ]}, | 70 | ]}, |
73 | {tag:'div', id:this.getId('unlock')} | 71 | {tag:'div', id:this.getId('unlock')} |
74 | ]} | 72 | ]} |
75 | ]}); | 73 | ]}); |
76 | 74 | ||
77 | this.getElement('lockPanel').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 75 | this.getElement('lockPanel').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
78 | 76 | ||
79 | YAHOO.ext.Element.get('lockBlock').show(); | 77 | YAHOO.ext.Element.get('lockBlock').show(); |
80 | MochiKit.Signal.connect(YAHOO.ext.Element.get('lock').dom, 'onclick', this, 'doLockEventHandler'); | 78 | MochiKit.Signal.connect(YAHOO.ext.Element.get('lock').dom, 'onclick', this, 'doLockEventHandler'); |
81 | new YAHOO.ext.Button(this.getId('unlock'), {text:Clipperz.PM.Strings['unlockButtonLabel'], handler:this.doUnlockEventHandler, scope:this, minWidth:0}); | 79 | new YAHOO.ext.Button(this.getId('unlock'), {text:Clipperz.PM.Strings['unlockButtonLabel'], handler:this.doUnlockEventHandler, scope:this, minWidth:0}); |
82 | this.getElement('unlock').swallowEvent('click', true); | 80 | this.getElement('unlock').swallowEvent('click', true); |
83 | new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('lockPassphrase')); | 81 | new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('lockPassphrase')); |
84 | MochiKit.Signal.connect('lockDialogForm', 'onsubmit', this, 'doUnlockEventHandler'); | 82 | MochiKit.Signal.connect('lockDialogForm', 'onsubmit', this, 'doUnlockEventHandler'); |
85 | 83 | ||
86 | this.getElement('cantentPanel').setVisibilityMode(YAHOO.ext.Element.DISPLAY); | 84 | this.getElement('cantentPanel').setVisibilityMode(YAHOO.ext.Element.DISPLAY); |
87 | //MochiKit.Logging.logDebug("<<< CompactInterface.render"); | 85 | //MochiKit.Logging.logDebug("<<< CompactInterface.render"); |
88 | 86 | ||
89 | return result; | 87 | return result; |
90 | }, | 88 | }, |
91 | 89 | ||
92 | //----------------------------------------------------- | 90 | //----------------------------------------------------- |
93 | 91 | ||
94 | 'directLoginAddedHandler': function(anEvent) { | 92 | 'directLoginAddedHandler': function(anEvent) { |
95 | this.redrawDirectLoginItems(); | 93 | this.redrawDirectLoginItems(); |
96 | }, | 94 | }, |
97 | 95 | ||
98 | //----------------------------------------------------- | 96 | //----------------------------------------------------- |
99 | 97 | ||
100 | 'compareDirectLogins': function(a, b) { | 98 | 'compareDirectLogins': function(a, b) { |
101 | return MochiKit.Base.compare(a.label().toLowerCase(), b.label().toLowerCase()); | 99 | return MochiKit.Base.compare(a.label().toLowerCase(), b.label().toLowerCase()); |
102 | }, | 100 | }, |
103 | 101 | ||
104 | //----------------------------------------------------- | 102 | //----------------------------------------------------- |
105 | 103 | ||
106 | 'redrawDirectLoginItems': function() { | 104 | 'redrawDirectLoginItems': function() { |
107 | var template; | 105 | var template; |
108 | var allDirectLogins; | 106 | var allDirectLogins; |
109 | 107 | ||
110 | this.getElement('message').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 108 | this.getElement('message').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
111 | //MochiKit.Logging.logDebug(">>> CompactInterface.redrawDirectLoginItems"); | 109 | //MochiKit.Logging.logDebug(">>> CompactInterface.redrawDirectLoginItems"); |
112 | //MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 0"); | 110 | //MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 0"); |
113 | MochiKit.Iter.forEach(YAHOO.ext.Element.get('directLogins').getChildrenByTagName('li'), function(aDirectLoginElement) { | 111 | MochiKit.Iter.forEach(YAHOO.ext.Element.get('directLogins').getChildrenByTagName('li'), function(aDirectLoginElement) { |
114 | MochiKit.Signal.disconnectAll(aDirectLoginElement.dom); | 112 | MochiKit.Signal.disconnectAll(aDirectLoginElement.dom); |
115 | //MochiKit.Logging.logDebug("disconnecting IMG " + aDirectLoginElement.getChildrenByTagName('img')[0].dom.src); | 113 | //MochiKit.Logging.logDebug("disconnecting IMG " + aDirectLoginElement.getChildrenByTagName('img')[0].dom.src); |
116 | MochiKit.Signal.disconnectAll(aDirectLoginElement.getChildrenByTagName('img')[0].dom); | 114 | MochiKit.Signal.disconnectAll(aDirectLoginElement.getChildrenByTagName('img')[0].dom); |
117 | }) | 115 | }) |
118 | //MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 1"); | 116 | //MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 1"); |
119 | YAHOO.ext.Element.get('directLogins').update(""); | 117 | YAHOO.ext.Element.get('directLogins').update(""); |
120 | //MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 2"); | 118 | //MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 2"); |
121 | allDirectLogins = MochiKit.Base.values(this.user().directLoginReferences()); | 119 | allDirectLogins = MochiKit.Base.values(this.user().directLoginReferences()); |
122 | //MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 3"); | 120 | //MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 3"); |
123 | allDirectLogins.sort(this.compareDirectLogins); | 121 | allDirectLogins.sort(this.compareDirectLogins); |
124 | 122 | ||
125 | //MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 4"); | 123 | //MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 4"); |
126 | template = this.directLoginItemTemplate(); | 124 | template = this.directLoginItemTemplate(); |
127 | //MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 5"); | 125 | //MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 5"); |
128 | MochiKit.Iter.forEach(allDirectLogins, MochiKit.Base.bind(function(aDirectLogin) { | 126 | MochiKit.Iter.forEach(allDirectLogins, MochiKit.Base.bind(function(aDirectLogin) { |
129 | vardirectLoginElement; | 127 | vardirectLoginElement; |
130 | varfaviconImageElementID; | 128 | varfaviconImageElementID; |
131 | 129 | ||
132 | faviconImageElementID = aDirectLogin.reference() + "_faviconIMG"; | 130 | faviconImageElementID = aDirectLogin.reference() + "_faviconIMG"; |
133 | directLoginElement = template.append('directLogins', { | 131 | directLoginElement = template.append('directLogins', { |
134 | elementID:faviconImageElementID, | 132 | elementID:faviconImageElementID, |
135 | faviconUrl:aDirectLogin.fixedFavicon(), | 133 | faviconUrl:aDirectLogin.fixedFavicon(), |
136 | directLoginTitle:aDirectLogin.label(), | 134 | directLoginTitle:aDirectLogin.label(), |
137 | directLoginReference:aDirectLogin.reference() | 135 | directLoginReference:aDirectLogin.reference() |
138 | }, true); | 136 | }, true); |
139 | //MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 6: " + recordElement.dom); | 137 | //MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 6: " + recordElement.dom); |
140 | directLoginElement.addClassOnOver("hover"); | 138 | directLoginElement.addClassOnOver("hover"); |
141 | MochiKit.Signal.connect(directLoginElement.dom, 'onclick', this, 'handleDirectLoginClick'); | 139 | MochiKit.Signal.connect(directLoginElement.dom, 'onclick', this, 'handleDirectLoginClick'); |
142 | 140 | ||
143 | MochiKit.Signal.connect(faviconImageElementID, 'onload', this, 'handleLoadedFaviconImage'); | 141 | MochiKit.Signal.connect(faviconImageElementID, 'onload', this, 'handleLoadedFaviconImage'); |
144 | MochiKit.Signal.connect(faviconImageElementID, 'onerror', aDirectLogin, 'handleMissingFaviconImage'); | 142 | MochiKit.Signal.connect(faviconImageElementID, 'onerror', aDirectLogin, 'handleMissingFaviconImage'); |
145 | MochiKit.Signal.connect(faviconImageElementID, 'onabort', aDirectLogin, 'handleMissingFaviconImage'); | 143 | MochiKit.Signal.connect(faviconImageElementID, 'onabort', aDirectLogin, 'handleMissingFaviconImage'); |
146 | 144 | ||
147 | // YAHOO.ext.Element.get(faviconImageElementID).dom.src = aDirectLogin.fixedFavicon(); | 145 | // YAHOO.ext.Element.get(faviconImageElementID).dom.src = aDirectLogin.fixedFavicon(); |
148 | }, this)); | 146 | }, this)); |
149 | 147 | ||
150 | this.resetAutoLockTimer(); | 148 | this.resetAutoLockTimer(); |
151 | //MochiKit.Logging.logDebug("<<< CompactInterface.redrawDirectLoginItems"); | 149 | //MochiKit.Logging.logDebug("<<< CompactInterface.redrawDirectLoginItems"); |
152 | }, | 150 | }, |
153 | 151 | ||
154 | //----------------------------------------------------- | 152 | //----------------------------------------------------- |
155 | 153 | ||
156 | 'directLoginItemTemplate': function() { | 154 | 'directLoginItemTemplate': function() { |
157 | if (this._directLoginItemTemplate == null) { | 155 | if (this._directLoginItemTemplate == null) { |
158 | this._directLoginItemTemplate = Clipperz.YUI.DomHelper.createTemplate({tag:'li', id:'{directLoginReference}', children:[ | 156 | this._directLoginItemTemplate = Clipperz.YUI.DomHelper.createTemplate({tag:'li', id:'{directLoginReference}', children:[ |
159 | {tag:'table', border:'0', cellpadding:'0', cellspacing:'0', children:[ | 157 | {tag:'table', border:'0', cellpadding:'0', cellspacing:'0', children:[ |
160 | {tag:'tbody', children:[ | 158 | {tag:'tbody', children:[ |
161 | {tag:'tr', children:[ | 159 | {tag:'tr', children:[ |
162 | {tag:'td', width:'20', align:'center', valign:'top', children:[ | 160 | {tag:'td', width:'20', align:'center', valign:'top', children:[ |
163 | {tag:'img', id:'{elementID}', src:'{faviconUrl}'} | 161 | {tag:'img', id:'{elementID}', src:'{faviconUrl}'} |
164 | ]}, | 162 | ]}, |
165 | {tag:'td', valign:'top', children:[ | 163 | {tag:'td', valign:'top', children:[ |
166 | {tag:'a', cls:'directLoginItemTitle', html:'{directLoginTitle}'} | 164 | {tag:'a', cls:'directLoginItemTitle', html:'{directLoginTitle}'} |
167 | ]} | 165 | ]} |
168 | ]} | 166 | ]} |
169 | ]} | 167 | ]} |
170 | ]} | 168 | ]} |
171 | ]}); | 169 | ]}); |
172 | this._directLoginItemTemplate.compile(); | 170 | this._directLoginItemTemplate.compile(); |
173 | } | 171 | } |
174 | 172 | ||
175 | return this._directLoginItemTemplate; | 173 | return this._directLoginItemTemplate; |
176 | }, | 174 | }, |
177 | 175 | ||
178 | //------------------------------------------------------------------------- | 176 | //------------------------------------------------------------------------- |
179 | 177 | ||
180 | 'handleDirectLoginClick': function(anEvent) { | 178 | 'handleDirectLoginClick': function(anEvent) { |
181 | vardirectLoginReference; | 179 | vardirectLoginReference; |
182 | //MochiKit.Logging.logDebug(">>> MainPanel.handleDirectLoginClick !!!"); | 180 | //MochiKit.Logging.logDebug(">>> MainPanel.handleDirectLoginClick !!!"); |
183 | 181 | ||
184 | directLoginReference = this.user().directLoginReferences()[anEvent.src().id]; | 182 | directLoginReference = this.user().directLoginReferences()[anEvent.src().id]; |
185 | this.openDirectLogin(directLoginReference); | 183 | this.openDirectLogin(directLoginReference); |
186 | this.resetAutoLockTimer(); | 184 | this.resetAutoLockTimer(); |
187 | //MochiKit.Logging.logDebug("<<< MainPanel.handleDirectLoginClick"); | 185 | //MochiKit.Logging.logDebug("<<< MainPanel.handleDirectLoginClick"); |
188 | }, | 186 | }, |
189 | 187 | ||
190 | //----------------------------------------------------- | 188 | //----------------------------------------------------- |
191 | 189 | ||
192 | 'openDirectLogin': function(aDirectLoginReference) { | 190 | 'openDirectLogin': function(aDirectLoginReference) { |
193 | vardeferredResult; | 191 | vardeferredResult; |
194 | varnewWindow; | 192 | varnewWindow; |
195 | 193 | ||
196 | //MochiKit.Logging.logDebug(">>> MainPanel.openDirectLogin - " + aDirectLoginReference.label()); | 194 | //MochiKit.Logging.logDebug(">>> MainPanel.openDirectLogin - " + aDirectLoginReference.label()); |
197 | deferredResult = new MochiKit.Async.Deferred(); | 195 | deferredResult = new MochiKit.Async.Deferred(); |
198 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.openDirectLogin - 1: " + res); return res;}); | 196 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("MainPanel.openDirectLogin - 1: " + res); return res;}); |
199 | deferredResult.addCallback(MochiKit.Base.method(aDirectLoginReference, 'setupJumpPageWindow')); | 197 | deferredResult.addCallback(MochiKit.Base.method(aDirectLoginReference, 'setupJumpPageWindow')); |
200 | deferredResult.addCallback(MochiKit.Base.method(aDirectLoginReference, 'deferredDirectLogin')); | 198 | deferredResult.addCallback(MochiKit.Base.method(aDirectLoginReference, 'deferredDirectLogin')); |
201 | deferredResult.addCallback(function(aDirectLogin) { | 199 | deferredResult.addCallback(function(aDirectLogin) { |
202 | aDirectLogin.runDirectLogin(newWindow); | 200 | aDirectLogin.runDirectLogin(newWindow); |
203 | }); | 201 | }); |
204 | 202 | ||
205 | newWindow = window.open(Clipperz.PM.Strings['directLoginJumpPageUrl'], ""); | 203 | newWindow = window.open(Clipperz.PM.Strings['directLoginJumpPageUrl'], ""); |
206 | // MochiKit.Signal.connect(newWindow, 'onload', MochiKit.Base.method(deferredResult, 'callback', newWindow)) | 204 | // MochiKit.Signal.connect(newWindow, 'onload', MochiKit.Base.method(deferredResult, 'callback', newWindow)) |
207 | // MochiKit.Signal.connect(newWindow, 'onload', MochiKit.Base.partial(alert, "done")); | 205 | // MochiKit.Signal.connect(newWindow, 'onload', MochiKit.Base.partial(alert, "done")); |
208 | deferredResult.callback(newWindow); | 206 | deferredResult.callback(newWindow); |
209 | //MochiKit.Logging.logDebug("<<< MainPanel.openDirectLogin"); | 207 | //MochiKit.Logging.logDebug("<<< MainPanel.openDirectLogin"); |
210 | }, | 208 | }, |
211 | 209 | ||
212 | //------------------------------------------------------------------------- | 210 | //------------------------------------------------------------------------- |
213 | 211 | ||
214 | 'handleLoadedFaviconImage': function(anEvent) { | 212 | 'handleLoadedFaviconImage': function(anEvent) { |
diff --git a/frontend/beta/js/Clipperz/PM/Components/Compact/LoginForm.js b/frontend/beta/js/Clipperz/PM/Components/Compact/LoginForm.js index a1e60d8..013dd0d 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Compact/LoginForm.js +++ b/frontend/beta/js/Clipperz/PM/Components/Compact/LoginForm.js | |||
@@ -1,186 +1,184 @@ | |||
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) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; } | 27 | if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; } |
30 | 28 | ||
31 | Clipperz.PM.Components.Compact.LoginForm = function(anElement, args) { | 29 | Clipperz.PM.Components.Compact.LoginForm = function(anElement, args) { |
32 | 30 | ||
33 | Clipperz.PM.Components.Compact.LoginForm.superclass.constructor.call(this, anElement, args); | 31 | Clipperz.PM.Components.Compact.LoginForm.superclass.constructor.call(this, anElement, args); |
34 | 32 | ||
35 | this.render(); | 33 | this.render(); |
36 | Clipperz.NotificationCenter.register(null, 'updatedProgressState', this, 'userNotificationHandler') | 34 | Clipperz.NotificationCenter.register(null, 'updatedProgressState', this, 'userNotificationHandler') |
37 | 35 | ||
38 | return this; | 36 | return this; |
39 | }; | 37 | }; |
40 | 38 | ||
41 | YAHOO.extendX(Clipperz.PM.Components.Compact.LoginForm, Clipperz.PM.Components.BaseComponent, { | 39 | YAHOO.extendX(Clipperz.PM.Components.Compact.LoginForm, Clipperz.PM.Components.BaseComponent, { |
42 | 40 | ||
43 | 'toString': function() { | 41 | 'toString': function() { |
44 | return "Clipperz.PM.Components.Compact.LoginForm"; | 42 | return "Clipperz.PM.Components.Compact.LoginForm"; |
45 | }, | 43 | }, |
46 | 44 | ||
47 | //----------------------------------------------------- | 45 | //----------------------------------------------------- |
48 | 46 | ||
49 | 'render': function() { | 47 | 'render': function() { |
50 | var result; | 48 | var result; |
51 | varlayout; | 49 | varlayout; |
52 | 50 | ||
53 | MochiKit.Signal.disconnectAllTo(this); | 51 | MochiKit.Signal.disconnectAllTo(this); |
54 | this.element().update(""); | 52 | this.element().update(""); |
55 | 53 | ||
56 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('baseDiv'), cls:'LoginPanel', children:[ | 54 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('baseDiv'), cls:'LoginPanel', children:[ |
57 | {tag:'div', id:'compactHeader'}, | 55 | {tag:'div', id:'compactHeader'}, |
58 | {tag:'div', id:'compactBody', children:[ | 56 | {tag:'div', id:'compactBody', children:[ |
59 | {tag:'form', id:this.getId('loginForm_form'), children:[ | 57 | {tag:'form', id:this.getId('loginForm_form'), children:[ |
60 | {tag:'dl', children:[ | 58 | {tag:'dl', children:[ |
61 | {tag:'dt', htmlString:Clipperz.PM.Strings['loginFormUsernameLabel']}, | 59 | {tag:'dt', htmlString:Clipperz.PM.Strings['loginFormUsernameLabel']}, |
62 | {tag:'dd', children:[ | 60 | {tag:'dd', children:[ |
63 | {tag:'input', id:this.getId('login_username'), type:'text', size:'30', name:'username'} | 61 | {tag:'input', id:this.getId('login_username'), type:'text', size:'30', name:'username'} |
64 | ]}, | 62 | ]}, |
65 | {tag:'dt', htmlString:Clipperz.PM.Strings['loginFormPassphraseLabel']}, | 63 | {tag:'dt', htmlString:Clipperz.PM.Strings['loginFormPassphraseLabel']}, |
66 | {tag:'dd', children:[ | 64 | {tag:'dd', children:[ |
67 | {tag:'input', id:this.getId('login_passphrase'), type:'password', size:'30', name:'passphrase'} | 65 | {tag:'input', id:this.getId('login_passphrase'), type:'password', size:'30', name:'passphrase'} |
68 | ]} | 66 | ]} |
69 | ]}, | 67 | ]}, |
70 | {tag:'div', id:this.getId('login_submit')} | 68 | {tag:'div', id:this.getId('login_submit')} |
71 | ]}, | 69 | ]}, |
72 | {tag:'h4', id:this.getId('message')} | 70 | {tag:'h4', id:this.getId('message')} |
73 | ]} | 71 | ]} |
74 | ]}); | 72 | ]}); |
75 | 73 | ||
76 | new Clipperz.PM.Components.Compact.CompactHeader(YAHOO.ext.Element.get('compactHeader')); | 74 | new Clipperz.PM.Components.Compact.CompactHeader(YAHOO.ext.Element.get('compactHeader')); |
77 | 75 | ||
78 | MochiKit.Signal.connect(this.getId('loginForm_form'), 'onsubmit', this, 'stopFormSubmit'); | 76 | MochiKit.Signal.connect(this.getId('loginForm_form'), 'onsubmit', this, 'stopFormSubmit'); |
79 | new YAHOO.ext.Button(this.getId('login_submit'), {text:Clipperz.PM.Strings['loginFormButtonLabel'], handler:this.doLogin, scope:this, minWidth:0}); | 77 | new YAHOO.ext.Button(this.getId('login_submit'), {text:Clipperz.PM.Strings['loginFormButtonLabel'], handler:this.doLogin, scope:this, minWidth:0}); |
80 | this.getElement('login_submit').swallowEvent('click', true); | 78 | this.getElement('login_submit').swallowEvent('click', true); |
81 | 79 | ||
82 | MochiKit.Signal.connect(this.getId('loginForm_form'), 'onkeydown', this, 'onkeydown'); | 80 | MochiKit.Signal.connect(this.getId('loginForm_form'), 'onkeydown', this, 'onkeydown'); |
83 | 81 | ||
84 | new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('login_passphrase')); | 82 | new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('login_passphrase')); |
85 | this.getElement('login_username').focus(); | 83 | this.getElement('login_username').focus(); |
86 | 84 | ||
87 | return result; | 85 | return result; |
88 | }, | 86 | }, |
89 | 87 | ||
90 | //----------------------------------------------------- | 88 | //----------------------------------------------------- |
91 | 89 | ||
92 | 'doLogin': function(e) { | 90 | 'doLogin': function(e) { |
93 | //MochiKit.Logging.logDebug(">>> compact.LoginForm.doLogin"); | 91 | //MochiKit.Logging.logDebug(">>> compact.LoginForm.doLogin"); |
94 | if (this.checkLoginForm()) { | 92 | if (this.checkLoginForm()) { |
95 | this.doLoginWithUsernameAndPassphrase(this.getDom('login_username').value, this.getDom('login_passphrase').value); | 93 | this.doLoginWithUsernameAndPassphrase(this.getDom('login_username').value, this.getDom('login_passphrase').value); |
96 | } | 94 | } |
97 | //MochiKit.Logging.logDebug("<<< compact.LoginForm.doLogin"); | 95 | //MochiKit.Logging.logDebug("<<< compact.LoginForm.doLogin"); |
98 | }, | 96 | }, |
99 | 97 | ||
100 | //......................................................................... | 98 | //......................................................................... |
101 | 99 | ||
102 | 'doLoginWithUsernameAndPassphrase': function(anUsername, aPassphrase) { | 100 | 'doLoginWithUsernameAndPassphrase': function(anUsername, aPassphrase) { |
103 | var deferredResult; | 101 | var deferredResult; |
104 | var user; | 102 | var user; |
105 | 103 | ||
106 | //MochiKit.Logging.logDebug(">>> compact.LoginForm.doLoginWithUsernameAndPassphrase"); | 104 | //MochiKit.Logging.logDebug(">>> compact.LoginForm.doLoginWithUsernameAndPassphrase"); |
107 | user = new Clipperz.PM.DataModel.User({username:anUsername, passphrase:aPassphrase}); | 105 | user = new Clipperz.PM.DataModel.User({username:anUsername, passphrase:aPassphrase}); |
108 | 106 | ||
109 | deferredResult = new MochiKit.Async.Deferred(); | 107 | deferredResult = new MochiKit.Async.Deferred(); |
110 | deferredResult.addCallback(MochiKit.Base.method(user, 'connect')); | 108 | deferredResult.addCallback(MochiKit.Base.method(user, 'connect')); |
111 | deferredResult.addCallback(MochiKit.Base.method(user, 'loadPreferences')); | 109 | deferredResult.addCallback(MochiKit.Base.method(user, 'loadPreferences')); |
112 | deferredResult.addCallback(MochiKit.Base.method(user, 'loadRecords')); | 110 | deferredResult.addCallback(MochiKit.Base.method(user, 'loadRecords')); |
113 | deferredResult.addCallback(MochiKit.Base.method(user, 'loadDirectLogins')); | 111 | deferredResult.addCallback(MochiKit.Base.method(user, 'loadDirectLogins')); |
114 | deferredResult.addErrback(MochiKit.Base.bind(function() { | 112 | deferredResult.addErrback(MochiKit.Base.bind(function() { |
115 | this.getElement('loginForm_form').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show(); | 113 | this.getElement('loginForm_form').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show(); |
116 | this.getElement('message').update(Clipperz.PM.Strings['loginMessagePanelFailureText']); | 114 | this.getElement('message').update(Clipperz.PM.Strings['loginMessagePanelFailureText']); |
117 | this.getDom('login_passphrase').value = ""; | 115 | this.getDom('login_passphrase').value = ""; |
118 | this.getElement('login_passphrase').focus(); | 116 | this.getElement('login_passphrase').focus(); |
119 | }, this)) | 117 | }, this)) |
120 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("compact.LoginForm.doLogin - 6: " + res); return res;}); | 118 | //deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("compact.LoginForm.doLogin - 6: " + res); return res;}); |
121 | deferredResult.callback("token"); | 119 | deferredResult.callback("token"); |
122 | //MochiKit.Logging.logDebug("<<< compact.LoginForm.doLoginWithUsernameAndPassphrase"); | 120 | //MochiKit.Logging.logDebug("<<< compact.LoginForm.doLoginWithUsernameAndPassphrase"); |
123 | 121 | ||
124 | return deferredResult; | 122 | return deferredResult; |
125 | }, | 123 | }, |
126 | 124 | ||
127 | //......................................................................... | 125 | //......................................................................... |
128 | 126 | ||
129 | 'checkLoginForm': function() { | 127 | 'checkLoginForm': function() { |
130 | var result; | 128 | var result; |
131 | var username | 129 | var username |
132 | varpassphrase; | 130 | varpassphrase; |
133 | 131 | ||
134 | //MochiKit.Logging.logDebug(">>> checkLoginForm"); | 132 | //MochiKit.Logging.logDebug(">>> checkLoginForm"); |
135 | username = this.getDom('login_username').value; | 133 | username = this.getDom('login_username').value; |
136 | passphrase = this.getDom('login_passphrase').value; | 134 | passphrase = this.getDom('login_passphrase').value; |
137 | 135 | ||
138 | if ((username != "") && (passphrase != "")) { | 136 | if ((username != "") && (passphrase != "")) { |
139 | result = true; | 137 | result = true; |
140 | } else { | 138 | } else { |
141 | if (username == "") { | 139 | if (username == "") { |
142 | this.getElement('login_username').focus(); | 140 | this.getElement('login_username').focus(); |
143 | } else if (passphrase == "") { | 141 | } else if (passphrase == "") { |
144 | this.getElement('login_passphrase').focus(); | 142 | this.getElement('login_passphrase').focus(); |
145 | } | 143 | } |
146 | 144 | ||
147 | result = false; | 145 | result = false; |
148 | } | 146 | } |
149 | //MochiKit.Logging.logDebug("<<< checkLoginForm - " + result); | 147 | //MochiKit.Logging.logDebug("<<< checkLoginForm - " + result); |
150 | 148 | ||
151 | return result; | 149 | return result; |
152 | }, | 150 | }, |
153 | 151 | ||
154 | //------------------------------------------------------------------------- | 152 | //------------------------------------------------------------------------- |
155 | 153 | ||
156 | 'stopFormSubmit': function(anEvent) { | 154 | 'stopFormSubmit': function(anEvent) { |
157 | anEvent.stop(); | 155 | anEvent.stop(); |
158 | }, | 156 | }, |
159 | 157 | ||
160 | //------------------------------------------------------------------------- | 158 | //------------------------------------------------------------------------- |
161 | 159 | ||
162 | 'onkeydown': function(anEvent) { | 160 | 'onkeydown': function(anEvent) { |
163 | //MochiKit.Logging.logDebug(">>> onkeydown - " + anEvent.src().id); | 161 | //MochiKit.Logging.logDebug(">>> onkeydown - " + anEvent.src().id); |
164 | if (anEvent.key().code == 13) { | 162 | if (anEvent.key().code == 13) { |
165 | this.doLogin(); | 163 | this.doLogin(); |
166 | anEvent.stop(); | 164 | anEvent.stop(); |
167 | } | 165 | } |
168 | }, | 166 | }, |
169 | 167 | ||
170 | //----------------------------------------------------- | 168 | //----------------------------------------------------- |
171 | 169 | ||
172 | 'userNotificationHandler': function(anEvent) { | 170 | 'userNotificationHandler': function(anEvent) { |
173 | //MochiKit.Logging.logDebug(">>> compact.LoginForm.userNotificationHandler"); | 171 | //MochiKit.Logging.logDebug(">>> compact.LoginForm.userNotificationHandler"); |
174 | //MochiKit.Logging.logDebug("userNotificationHandler - event: " + anEvent.event()); | 172 | //MochiKit.Logging.logDebug("userNotificationHandler - event: " + anEvent.event()); |
175 | this.getElement('loginForm_form').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); | 173 | this.getElement('loginForm_form').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide(); |
176 | if (this.getDom('message') != null) { | 174 | if (this.getDom('message') != null) { |
177 | this.getElement('message').update(Clipperz.PM.Strings.messagePanelConfigurations[anEvent.parameters()]()['text']); | 175 | this.getElement('message').update(Clipperz.PM.Strings.messagePanelConfigurations[anEvent.parameters()]()['text']); |
178 | } | 176 | } |
179 | //MochiKit.Logging.logDebug("<<< compact.LoginForm.userNotificationHandler"); | 177 | //MochiKit.Logging.logDebug("<<< compact.LoginForm.userNotificationHandler"); |
180 | }, | 178 | }, |
181 | 179 | ||
182 | //----------------------------------------------------- | 180 | //----------------------------------------------------- |
183 | __syntaxFix__: '__syntaxFix__' | 181 | __syntaxFix__: '__syntaxFix__' |
184 | }); | 182 | }); |
185 | 183 | ||
186 | 184 | ||