Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginProgress.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginProgress.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginProgress.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginProgress.js index 03c7b9e..5d082b5 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginProgress.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginProgress.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 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Components.LoginProgress = function(args) { | 28 | Clipperz.PM.UI.Web.Components.LoginProgress = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | 30 | ||
34 | Clipperz.PM.UI.Web.Components.LoginProgress.superclass.constructor.apply(this, arguments); | 31 | Clipperz.PM.UI.Web.Components.LoginProgress.superclass.constructor.apply(this, arguments); |
35 | 32 | ||
36 | this._deferred = null; | 33 | this._deferred = null; |
37 | 34 | ||
38 | return this; | 35 | return this; |
39 | } | 36 | } |
40 | 37 | ||
41 | //============================================================================= | 38 | //============================================================================= |
42 | 39 | ||
43 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LoginProgress, Clipperz.PM.UI.Common.Components.BaseComponent, { | 40 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LoginProgress, Clipperz.PM.UI.Common.Components.BaseComponent, { |
44 | 41 | ||
45 | //------------------------------------------------------------------------- | 42 | //------------------------------------------------------------------------- |
46 | 43 | ||
47 | 'toString': function () { | 44 | 'toString': function () { |
48 | return "Clipperz.PM.UI.Web.Components.LoginProgress component"; | 45 | return "Clipperz.PM.UI.Web.Components.LoginProgress component"; |
49 | }, | 46 | }, |
50 | 47 | ||
51 | //------------------------------------------------------------------------- | 48 | //------------------------------------------------------------------------- |
52 | 49 | ||
53 | 'deferred': function() { | 50 | 'deferred': function() { |
54 | return this._deferred; | 51 | return this._deferred; |
55 | }, | 52 | }, |
56 | 53 | ||
57 | 'setDeferred': function(aValue) { | 54 | 'setDeferred': function(aValue) { |
58 | this._deferred = aValue; | 55 | this._deferred = aValue; |
59 | }, | 56 | }, |
60 | 57 | ||
61 | //------------------------------------------------------------------------- | 58 | //------------------------------------------------------------------------- |
62 | 59 | ||
63 | 'renderSelf': function() { | 60 | 'renderSelf': function() { |
64 | // var loginProgressElement; | 61 | // var loginProgressElement; |
65 | // | 62 | // |
66 | // loginProgressElement = MochiKit.DOM.getElement('loginProgress'); | 63 | // loginProgressElement = MochiKit.DOM.getElement('loginProgress'); |
67 | // | 64 | // |
68 | // if (loginProgressElement == null) { | 65 | // if (loginProgressElement == null) { |
69 | // loginProgressElement = this.append(this.element(), {tag:'div', id:'loginProgress', cls:'LoginProgress'}, true); | 66 | // loginProgressElement = this.append(this.element(), {tag:'div', id:'loginProgress', cls:'LoginProgress'}, true); |
70 | // } | 67 | // } |
71 | 68 | ||
72 | //console.log(">> LoginProgress.renderSelf", this.element()); | 69 | //console.log(">> LoginProgress.renderSelf", this.element()); |
73 | this.append(this.element(), {tag:'div', id:'loginProgress', cls:'LoginProgress', children: [ | 70 | this.append(this.element(), {tag:'div', id:'loginProgress', cls:'LoginProgress', children: [ |
74 | // this.append(loginProgressElement, [ | 71 | // this.append(loginProgressElement, [ |
75 | {tag:'div', cls:'header', children:[ | 72 | {tag:'div', cls:'header', children:[ |
76 | {tag:'h3', id:this.getId('title'), html:"login progress"} | 73 | {tag:'h3', id:this.getId('title'), html:"login progress"} |
77 | ]}, | 74 | ]}, |
78 | {tag:'div', cls:'body', children:[ | 75 | {tag:'div', cls:'body', children:[ |
79 | {tag:'div', id:this.getId('progressBar')}, | 76 | {tag:'div', id:this.getId('progressBar')}, |
80 | {tag:'div', id:this.getId('errorBox'), cls:'errorBox', children:[ | 77 | {tag:'div', id:this.getId('errorBox'), cls:'errorBox', children:[ |
81 | // {tag:'div',cls:'img ALERT', children:[{tag:'div'}]}, | 78 | // {tag:'div',cls:'img ALERT', children:[{tag:'div'}]}, |
82 | {tag:'div',cls:'img ALERT', children:[{tag:'canvas', id:this.getId('canvas')}]}, | 79 | {tag:'div',cls:'img ALERT', children:[{tag:'canvas', id:this.getId('canvas')}]}, |
83 | {tag:'p', html:"Login failed"} | 80 | {tag:'p', html:"Login failed"} |
84 | ]} | 81 | ]} |
85 | ]}, | 82 | ]}, |
86 | {tag:'div', cls:'footer', children:[ | 83 | {tag:'div', cls:'footer', children:[ |
87 | {tag:'div', cls:'buttonArea', id:this.getId('buttonArea'), children:[ | 84 | {tag:'div', cls:'buttonArea', id:this.getId('buttonArea'), children:[ |
88 | {tag:'div', cls:'button', id:this.getId('button'), children:[ | 85 | {tag:'div', cls:'button', id:this.getId('button'), children:[ |
89 | {tag:'a', href:'#', id:this.getId('buttonLink'), html:"cancel"} | 86 | {tag:'a', href:'#', id:this.getId('buttonLink'), html:"cancel"} |
90 | ]} | 87 | ]} |
91 | ]} | 88 | ]} |
92 | ]} | 89 | ]} |
93 | ]}); | 90 | ]}); |
94 | // ]); | 91 | // ]); |
95 | 92 | ||
96 | Clipperz.PM.UI.Canvas.marks['!'](this.getElement('canvas'), "#ffffff"); | 93 | Clipperz.PM.UI.Canvas.marks['!'](this.getElement('canvas'), "#ffffff"); |
97 | 94 | ||
98 | this.addComponent(new Clipperz.PM.UI.Common.Components.ProgressBar({'element':this.getElement('progressBar')})); | 95 | this.addComponent(new Clipperz.PM.UI.Common.Components.ProgressBar({'element':this.getElement('progressBar')})); |
99 | MochiKit.Style.hideElement(this.getElement('errorBox')); | 96 | MochiKit.Style.hideElement(this.getElement('errorBox')); |
100 | 97 | ||
101 | MochiKit.Signal.connect(this.getId('buttonLink'), 'onclick', this, 'cancelEventHandler'); | 98 | MochiKit.Signal.connect(this.getId('buttonLink'), 'onclick', this, 'cancelEventHandler'); |
102 | }, | 99 | }, |
103 | 100 | ||
104 | //------------------------------------------------------------------------- | 101 | //------------------------------------------------------------------------- |
105 | 102 | ||
106 | 'displayElement': function() { | 103 | 'displayElement': function() { |
107 | return MochiKit.DOM.getElement('loginProgress'); | 104 | return MochiKit.DOM.getElement('loginProgress'); |
108 | }, | 105 | }, |
109 | 106 | ||
110 | //------------------------------------------------------------------------- | 107 | //------------------------------------------------------------------------- |
111 | 108 | ||
112 | 'cancelEventHandler': function(anEvent) { | 109 | 'cancelEventHandler': function(anEvent) { |
113 | anEvent.preventDefault(); | 110 | anEvent.preventDefault(); |
114 | 111 | ||
115 | MochiKit.Signal.signal(this, 'cancelEvent'); | 112 | MochiKit.Signal.signal(this, 'cancelEvent'); |
116 | }, | 113 | }, |
117 | 114 | ||
118 | //------------------------------------------------------------------------- | 115 | //------------------------------------------------------------------------- |
119 | 116 | ||
120 | 'disableCancel': function() { | 117 | 'disableCancel': function() { |