summaryrefslogtreecommitdiff
path: root/frontend/gamma/js/Clipperz/PM/UI/Web/Components/UserInfoBox.js
Unidiff
Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Web/Components/UserInfoBox.js') (more/less context) (show whitespace changes)
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Web/Components/UserInfoBox.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/UserInfoBox.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/UserInfoBox.js
index fbf58e0..91085cf 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/UserInfoBox.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/UserInfoBox.js
@@ -157,49 +157,77 @@ Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.UserInfoBox, Clipperz.PM.UI.C
157 {tag:'div', cls:'body', children:[ 157 {tag:'div', cls:'body', children:[
158 {tag:'h3', id:this.getId('username'), html:""}, 158 {tag:'h3', id:this.getId('username'), html:""},
159 {tag:'ul', children:[ 159 {tag:'ul', children:[
160 {tag:'li', id:this.getId('cards'), children:[ 160 {tag:'li', id:this.getId('cards'), children:[
161 {tag:'span', id:this.getId('cardsNumber'), cls:'number', html:"-"}, 161 {tag:'span', id:this.getId('cardsNumber'), cls:'number', html:"-"},
162 {tag:'span', id:this.getId('cardsLabel'), html:"cards"} 162 {tag:'span', id:this.getId('cardsLabel'), html:"cards"}
163 ]}, 163 ]},
164 {tag:'li', id:this.getId('directLogins'), children:[ 164 {tag:'li', id:this.getId('directLogins'), children:[
165 {tag:'span', id:this.getId('directLoginsNumber'), cls:'number', html:"-"}, 165 {tag:'span', id:this.getId('directLoginsNumber'), cls:'number', html:"-"},
166 {tag:'span', id:this.getId('directLoginsLabel'), html:"direct logins"} 166 {tag:'span', id:this.getId('directLoginsLabel'), html:"direct logins"}
167 ]} 167 ]}
168 ]}, 168 ]},
169 {tag:'div', cls:'accountInfo', children:[
170 {tag:'div', cls:'payButton', children:[
171 {tag:'a', href:'#', id:this.getId('payButton'), cls:'info', html:"info"}
172 ]},
173 {tag:'h5', html:"Account info"},
174 {tag:'div', cls:'accountStatus', children:[
175 {tag:'span', cls:'label', html:"status"},
176 {tag:'span', cls:'status', html:"early adopter"}
177 ]},
178 {tag:'div', cls:'accountLevel', children:[
179 {tag:'span', cls:'label', html:"level"},
180 // {tag:'span', cls:'level', html:"★☆☆☆"}
181 {tag:'span', cls:'level', html:"☆☆☆☆"}
182 ]},
183 {tag:'div', cls:'accountExpiration', children:[
184 {tag:'span', cls:'label', html:"expires"},
185 // {tag:'span', cls:'expriation', html:"on 26 April 2014"}
186 {tag:'span', cls:'expriation', html:"never"}
187 ]}
188 ]},
169 {tag:'a', href:'#', id:this.getId('logout'), html:"logout >"} 189 {tag:'a', href:'#', id:this.getId('logout'), html:"logout >"}
170 ]}, 190 ]},
171 {tag:'div', cls:'footer'} 191 {tag:'div', cls:'footer'}
172 ]); 192 ]);
173 193
174 MochiKit.Signal.connect(this.getElement('logout'), 'onclick', this, 'handleLogout'); 194 MochiKit.Signal.connect(this.getElement('logout'), 'onclick', this, 'handleLogout');
175 MochiKit.Signal.connect(this.getElement('lock'), 'onclick', this, 'toggleLock'); 195 MochiKit.Signal.connect(this.getElement('lock'), 'onclick', this, 'toggleLock');
196 MochiKit.Signal.connect(this.getElement('payButton'),'onclick', this, 'handlePayButton');
176 197
177 this._lockTooltip = new Clipperz.PM.UI.Common.Components.Tooltip({ 198 this._lockTooltip = new Clipperz.PM.UI.Common.Components.Tooltip({
178 element:this.getElement('lock'), 199 element:this.getElement('lock'),
179 text: "Click here to lock/unlock your account.", 200 text: "Click here to lock/unlock your account.",
180 position:'RIGHT' 201 position:'RIGHT'
181 }); 202 });
182 203
183 Clipperz.DOM.Helper.append(MochiKit.DOM.currentDocument().body, 204 Clipperz.DOM.Helper.append(MochiKit.DOM.currentDocument().body,
184 {tag:'div', id:this.getId('modalDialogWrapper'), cls:'modalDialogWrapper', children:[ 205 {tag:'div', id:this.getId('modalDialogWrapper'), cls:'modalDialogWrapper', children:[
185 {tag:'div', id:this.getId('modalDialogMask'), cls:'modalDialogMask userInfoBoxMask'} 206 {tag:'div', id:this.getId('modalDialogMask'), cls:'modalDialogMask userInfoBoxMask'}
186 ]} 207 ]}
187 ); 208 );
188 MochiKit.Style.hideElement(this.getId('modalDialogMask')); 209 MochiKit.Style.hideElement(this.getId('modalDialogMask'));
189 210
190 // this.drawUserInfoBackground(this.getElement('canvas')); 211 // this.drawUserInfoBackground(this.getElement('canvas'));
191 }, 212 },
192 213
193 //------------------------------------------------------------------------- 214 //-------------------------------------------------------------------------
215
216 'handlePayButton': function (anEvent) {
217 anEvent.preventDefault();
218 window.open('https://www.clipperz.com/pricing/', '_blank');
219 },
220
221 //-------------------------------------------------------------------------
194/* 222/*
195 'drawUserInfoBackground': function (canvas) { 223 'drawUserInfoBackground': function (canvas) {
196 var kMyDrawingFunctionWidth = 188.0; 224 var kMyDrawingFunctionWidth = 188.0;
197 var kMyDrawingFunctionHeight = 154.0; 225 var kMyDrawingFunctionHeight = 154.0;
198 226
199 var context = canvas.getContext("2d"); 227 var context = canvas.getContext("2d");
200 var color; 228 var color;
201 var resolution; 229 var resolution;
202 var alignStroke; 230 var alignStroke;
203 var path; 231 var path;
204 var pointX; 232 var pointX;
205 var pointY; 233 var pointY;