author | Giulio Cesare Solaroli <giulio.cesare@clipperz.com> | 2011-10-02 23:56:18 (UTC) |
---|---|---|
committer | Giulio Cesare Solaroli <giulio.cesare@clipperz.com> | 2011-10-02 23:56:18 (UTC) |
commit | ef68436ac04da078ffdcacd7e1f785473a303d45 (patch) (unidiff) | |
tree | c403752d66a2c4775f00affd4fa8431b29c5b68c /frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginPage.js | |
parent | 597ecfbc0249d83e1b856cbd558340c01237a360 (diff) | |
download | clipperz-ef68436ac04da078ffdcacd7e1f785473a303d45.zip clipperz-ef68436ac04da078ffdcacd7e1f785473a303d45.tar.gz clipperz-ef68436ac04da078ffdcacd7e1f785473a303d45.tar.bz2 |
First version of the newly restructured repository
Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginPage.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginPage.js | 206 |
1 files changed, 206 insertions, 0 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginPage.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginPage.js new file mode 100644 index 0000000..49c030d --- a/dev/null +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginPage.js | |||
@@ -0,0 +1,206 @@ | |||
1 | /* | ||
2 | |||
3 | Copyright 2008-2011 Clipperz Srl | ||
4 | |||
5 | This file is part of Clipperz's Javascript Crypto Library. | ||
6 | Javascript Crypto Library provides web developers with an extensive | ||
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 | ||
11 | refer to http://www.clipperz.com | ||
12 | |||
13 | * Javascript Crypto Library is free software: you can redistribute | ||
14 | 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 | ||
16 | 3 of the License, or (at your option) any later version. | ||
17 | |||
18 | * Javascript Crypto Library is distributed in the hope that it will | ||
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | ||
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
21 | See the GNU Affero General Public License for more details. | ||
22 | |||
23 | * You should have received a copy of the GNU Affero General Public | ||
24 | License along with Javascript Crypto Library. If not, see | ||
25 | <http://www.gnu.org/licenses/>. | ||
26 | |||
27 | */ | ||
28 | |||
29 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | ||
30 | |||
31 | Clipperz.PM.UI.Web.Components.LoginPage = function(args) { | ||
32 | args = args || {}; | ||
33 | |||
34 | Clipperz.PM.UI.Web.Components.LoginPage.superclass.constructor.apply(this, arguments); | ||
35 | |||
36 | this._slots = { | ||
37 | 'loginForm':this.getId('loginBoxSlot') | ||
38 | }; | ||
39 | |||
40 | return this; | ||
41 | } | ||
42 | |||
43 | //============================================================================= | ||
44 | |||
45 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LoginPage, Clipperz.PM.UI.Common.Components.BaseComponent, { | ||
46 | |||
47 | //------------------------------------------------------------------------- | ||
48 | |||
49 | 'toString': function () { | ||
50 | return "Clipperz.PM.UI.Web.Components.LoginPage component"; | ||
51 | }, | ||
52 | |||
53 | //------------------------------------------------------------------------- | ||
54 | |||
55 | 'renderSelf': function(/*aContainer, aPosition*/) { | ||
56 | this.append(this.element(), [ | ||
57 | {tag:'div', id:this.getId('loginBoxSlot')}, | ||
58 | {tag:'div', id:'main', children:[ | ||
59 | {tag:'div', id:'featurePoints', children:[ | ||
60 | {tag:'table', children:[ | ||
61 | {tag:'tr', children:[ | ||
62 | {tag:'td', children:[ | ||
63 | {tag:'div', cls:'block', children:[ | ||
64 | {tag:'h3', html:'Clipperz is:'}, | ||
65 | {tag:'ul', children:[ | ||
66 | {tag:'li', html:'a secure and simple password manager'}, | ||
67 | {tag:'li', html:'an effective single sign-on solution'}, | ||
68 | {tag:'li', html:'a digital vault for your personal data'} | ||
69 | ]} | ||
70 | ]}, | ||
71 | {tag:'div', cls:'block', children:[ | ||
72 | {tag:'h3', html:'Clipperz benefits:'}, | ||
73 | {tag:'ul', children:[ | ||
74 | {tag:'li', html:'free and completely anonymous'}, | ||
75 | {tag:'li', html:'access it any time from any computer'}, | ||
76 | {tag:'li', html:'no software to download and nothing to install'}, | ||
77 | {tag:'li', html:'avoid keeping secrets on your PC or on paper'} | ||
78 | ]} | ||
79 | ]} | ||
80 | ]}, {tag:'td', children:[ | ||
81 | {tag:'div', cls:'block', children:[ | ||
82 | {tag:'h3', html:'Clipperz security:'}, | ||
83 | {tag:'ul', children:[ | ||
84 | {tag:'li', html:'your secretes are locally encrypted by your browser before being uploaded to Clipperz'}, | ||
85 | {tag:'li', html:'the encryption key is a passphrase known only to you'}, | ||
86 | {tag:'li', html:'Clipperz hosts your sensitive data in an encrypted form and could never access the data in its plain form'}, | ||
87 | {tag:'li', html:'Clipperz is built upon standard encryption schemes, nothing fancies of homemade'}, | ||
88 | {tag:'li', html:'you can review the source code anytime you like, but you need to know nothing about cryptography to be an happy user!'} | ||
89 | ]} | ||
90 | ]} | ||
91 | ]} | ||
92 | ]} | ||
93 | ]} | ||
94 | ]}, | ||
95 | {tag:'div', cls:'activeFeatures', children:[ | ||
96 | {tag:'div', id:this.getId('registerButton'), cls:'createAccountLink', children:[ | ||
97 | {tag:'canvas', id:this.getId('registerButtonIcon')}, | ||
98 | {tag:'a', href:'#', id:this.getId('createAccountLink'), cls:'createAccountLink', children:[ | ||
99 | {tag:'span', cls:'payoff', html:"Free sign up!"}, | ||
100 | {tag:'span', cls:'link', html:"Create account >>"} | ||
101 | ]} | ||
102 | ]}, | ||
103 | {tag:'div', cls:'keepTogether', children:[ | ||
104 | {tag:'div', id:this.getId('screenshotLink'), cls:'screenshotLink', children:[ | ||
105 | {tag:'canvas', id:this.getId('lookIcon')}, | ||
106 | {tag:'a', href:'#', cls:'screenshotLink', children:[ | ||
107 | {tag:'span', cls:'payoff', html:"Look Clipperz!"}, | ||
108 | {tag:'span', cls:'link', html:"screenshot tour >>"} | ||
109 | ]} | ||
110 | ]}, | ||
111 | {tag:'div', id:this.getId('offlineLink'), cls:'offlineLink', children:[ | ||
112 | {tag:'canvas', id:this.getId('downloadIcon')}, | ||
113 | {tag:'a', href:'#', cls:'offlineLink', children:[ | ||
114 | {tag:'span', cls:'payoff', html:"Download!"}, | ||
115 | {tag:'span', cls:'link', html:"Offline version >>"} | ||
116 | ]} | ||
117 | ]} | ||
118 | ]} | ||
119 | ]} | ||
120 | ]} | ||
121 | ]); | ||
122 | |||
123 | this.setRegistrationButtonIconDefaultColors(); | ||
124 | this.setLookIconDefaultColors(); | ||
125 | this.setDownloadIconDefaultColors(); | ||
126 | |||
127 | // MochiKit.Signal.connect(this.getElement('createAccountLink'), 'onclick', this, 'handleCreateAccountLink') | ||
128 | |||
129 | MochiKit.Signal.connect(this.getElement('registerButton'), 'onmouseenter', this, 'handleMouseEnterOnRegisterButtonIcon'); | ||
130 | MochiKit.Signal.connect(this.getElement('registerButton'), 'onmouseleave', this, 'handleMouseLeaveOnRegisterButtonIcon'); | ||
131 | |||
132 | MochiKit.Signal.connect(this.getElement('screenshotLink'), 'onmouseenter', this, 'handleMouseEnterOnLookIcon'); | ||
133 | MochiKit.Signal.connect(this.getElement('screenshotLink'), 'onmouseleave', this, 'handleMouseLeaveOnLookIcon'); | ||
134 | |||
135 | MochiKit.Signal.connect(this.getElement('offlineLink'), 'onmouseenter', this, 'handleMouseEnterOnDownloadIcon'); | ||
136 | MochiKit.Signal.connect(this.getElement('offlineLink'), 'onmouseleave', this, 'handleMouseLeaveOnDownloadIcon'); | ||
137 | |||
138 | MochiKit.Signal.connect(this.getElement('createAccountLink'), 'onclick', this, 'handleCreateAccountLink') | ||
139 | }, | ||
140 | |||
141 | //------------------------------------------------------------------------- | ||
142 | |||
143 | 'setRegistrationButtonIconDefaultColors': function () { | ||
144 | Clipperz.PM.UI.Canvas.registerButton.normal(this.getElement('registerButtonIcon'), "#eeeeee", "#eeeeee", "#ecab12", "#e14624", "#ffffff"); | ||
145 | }, | ||
146 | |||
147 | 'setRegistrationButtonIconHoverColors': function () { | ||
148 | Clipperz.PM.UI.Canvas.registerButton.normal(this.getElement('registerButtonIcon'), "#cccccc", "#999999", "#ffb710", "#ff4d27", "#ffffff"); | ||
149 | }, | ||
150 | |||
151 | 'handleMouseEnterOnRegisterButtonIcon': function (anEvent) { | ||
152 | this.setRegistrationButtonIconHoverColors(); | ||
153 | }, | ||
154 | |||
155 | 'handleMouseLeaveOnRegisterButtonIcon': function (anEvent) { | ||
156 | this.setRegistrationButtonIconDefaultColors(); | ||
157 | }, | ||
158 | |||
159 | //------------------------------------------------------------------------- | ||
160 | |||
161 | 'setLookIconDefaultColors': function () { | ||
162 | Clipperz.PM.UI.Canvas.coverActions.look(this.getElement('lookIcon'), "#7e7e7e", "#ffffff", 1); | ||
163 | }, | ||
164 | |||
165 | 'setLookIconHoverColors': function () { | ||
166 | Clipperz.PM.UI.Canvas.coverActions.look(this.getElement('lookIcon'), "#666666", "#ffffff", 2); | ||
167 | }, | ||
168 | |||
169 | 'handleMouseEnterOnLookIcon': function (anEvent) { | ||
170 | this.setLookIconHoverColors(); | ||
171 | }, | ||
172 | |||
173 | 'handleMouseLeaveOnLookIcon': function (anEvent) { | ||
174 | this.setLookIconDefaultColors(); | ||
175 | }, | ||
176 | |||
177 | //------------------------------------------------------------------------- | ||
178 | |||
179 | 'setDownloadIconDefaultColors': function () { | ||
180 | Clipperz.PM.UI.Canvas.coverActions.download(this.getElement('downloadIcon'), "#7e7e7e", "#ffffff", 1); | ||
181 | }, | ||
182 | |||
183 | 'setDownloadIconHoverColors': function () { | ||
184 | Clipperz.PM.UI.Canvas.coverActions.download(this.getElement('downloadIcon'), "#666666", "#ffffff", 2); | ||
185 | }, | ||
186 | |||
187 | 'handleMouseEnterOnDownloadIcon': function (anEvent) { | ||
188 | this.setDownloadIconHoverColors(); | ||
189 | }, | ||
190 | |||
191 | 'handleMouseLeaveOnDownloadIcon': function (anEvent) { | ||
192 | this.setDownloadIconDefaultColors(); | ||
193 | }, | ||
194 | |||
195 | //------------------------------------------------------------------------- | ||
196 | |||
197 | 'handleCreateAccountLink': function (anEvent) { | ||
198 | anEvent.preventDefault(); | ||
199 | |||
200 | MochiKit.Signal.signal(this, 'createNewAccountClick', anEvent.src()); | ||
201 | }, | ||
202 | |||
203 | //------------------------------------------------------------------------- | ||
204 | |||
205 | __syntaxFix__: "syntax fix" | ||
206 | }); | ||