Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Web/Components') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/gamma/js/Clipperz/PM/UI/Web/Components/PageHeader.js | 4 | ||||
-rw-r--r-- | frontend/gamma/js/Clipperz/PM/UI/Web/Components/UserInfoBox.js | 32 |
2 files changed, 32 insertions, 4 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PageHeader.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PageHeader.js index 5e49fb5..3c57f67 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PageHeader.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PageHeader.js | |||
@@ -1,189 +1,189 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2013 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz, the online password manager. | 5 | This file is part of Clipperz, the online password manager. |
6 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
7 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
8 | 8 | ||
9 | * Clipperz is free software: you can redistribute it and/or modify it | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
10 | under the terms of the GNU Affero General Public License as published | 10 | under the terms of the GNU Affero General Public License as published |
11 | by the Free Software Foundation, either version 3 of the License, or | 11 | by the Free Software Foundation, either version 3 of the License, or |
12 | (at your option) any later version. | 12 | (at your option) any later version. |
13 | 13 | ||
14 | * Clipperz is distributed in the hope that it will be useful, but | 14 | * Clipperz is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
18 | 18 | ||
19 | * 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 |
20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
21 | 21 | ||
22 | */ | 22 | */ |
23 | 23 | ||
24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
25 | 25 | ||
26 | Clipperz.PM.UI.Web.Components.PageHeader = function(args) { | 26 | Clipperz.PM.UI.Web.Components.PageHeader = function(args) { |
27 | args = args || {}; | 27 | args = args || {}; |
28 | 28 | ||
29 | Clipperz.PM.UI.Web.Components.PageHeader.superclass.constructor.apply(this, arguments); | 29 | Clipperz.PM.UI.Web.Components.PageHeader.superclass.constructor.apply(this, arguments); |
30 | this._newsIsOpen = args.newsIsOpen || false; | 30 | this._newsIsOpen = args.newsIsOpen || false; |
31 | this._animationDuration = args.animationDuration || 0.5; | 31 | this._animationDuration = args.animationDuration || 0.5; |
32 | 32 | ||
33 | this._offset = 82; | 33 | this._offset = 82; |
34 | 34 | ||
35 | return this; | 35 | return this; |
36 | } | 36 | } |
37 | 37 | ||
38 | //============================================================================= | 38 | //============================================================================= |
39 | 39 | ||
40 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.PageHeader, Clipperz.PM.UI.Common.Components.BaseComponent, { | 40 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.PageHeader, Clipperz.PM.UI.Common.Components.BaseComponent, { |
41 | 41 | ||
42 | //------------------------------------------------------------------------- | 42 | //------------------------------------------------------------------------- |
43 | 43 | ||
44 | 'toString': function () { | 44 | 'toString': function () { |
45 | return "Clipperz.PM.UI.Web.Components.PageHeader component"; | 45 | return "Clipperz.PM.UI.Web.Components.PageHeader component"; |
46 | }, | 46 | }, |
47 | 47 | ||
48 | //------------------------------------------------------------------------- | 48 | //------------------------------------------------------------------------- |
49 | 49 | ||
50 | 'iframeURL': function () { | 50 | 'iframeURL': function () { |
51 | // return './rss_view.html'; | 51 | // return './rss_view.html'; |
52 | return 'http://www.clipperz.com/files/clipperz.com/appTips/index.html'; | 52 | return 'https://www.clipperz.com/tips/index.html'; |
53 | }, | 53 | }, |
54 | 54 | ||
55 | //------------------------------------------------------------------------- | 55 | //------------------------------------------------------------------------- |
56 | 56 | ||
57 | 'renderSelf': function(/*aContainer, aPosition*/) { | 57 | 'renderSelf': function(/*aContainer, aPosition*/) { |
58 | this.append(this.element(), [ | 58 | this.append(this.element(), [ |
59 | {tag:'div', id:'miscLinks', children:[ | 59 | {tag:'div', id:'miscLinks', children:[ |
60 | {tag:'ul', children:[ | 60 | {tag:'ul', children:[ |
61 | {tag:'li', children:[{tag:'a', id:'donateHeaderLink', stringID:'pageHeader.donation', href:'http://www.clipperz.com/donations', target:'_blank', html:Clipperz.PM.Strings.getValue('pageHeader.donation')}]}, | 61 | {tag:'li', children:[{tag:'a', id:'donateHeaderLink', stringID:'pageHeader.donation', href:'http://www.clipperz.com/donations', target:'_blank', html:Clipperz.PM.Strings.getValue('pageHeader.donation')}]}, |
62 | {tag:'li', children:[{tag:'a', id:'forumHeaderLink', stringID:'pageHeader.forum', href:'http://www.clipperz.com/forum', target:'_blank', html:Clipperz.PM.Strings.getValue('pageHeader.forum')}]}, | 62 | {tag:'li', children:[{tag:'a', id:'forumHeaderLink', stringID:'pageHeader.forum', href:'http://www.clipperz.com/forum', target:'_blank', html:Clipperz.PM.Strings.getValue('pageHeader.forum')}]}, |
63 | {tag:'li', children:[{tag:'a', id:'creditsHeaderLink', stringID:'pageHeader.credits', href:'http://www.clipperz.com/credits', target:'_blank', html:Clipperz.PM.Strings.getValue('pageHeader.credits')}]}, | 63 | // {tag:'li', children:[{tag:'a', id:'creditsHeaderLink', stringID:'pageHeader.credits', href:'http://www.clipperz.com/credits', target:'_blank', html:Clipperz.PM.Strings.getValue('pageHeader.credits')}]}, |
64 | {tag:'li', children:[{tag:'a', id:'feedbackHeaderLink', stringID:'pageHeader.feedback', href:'http://www.clipperz.com/contact', target:'_blank', html:Clipperz.PM.Strings.getValue('pageHeader.feedback')}]}, | 64 | {tag:'li', children:[{tag:'a', id:'feedbackHeaderLink', stringID:'pageHeader.feedback', href:'http://www.clipperz.com/contact', target:'_blank', html:Clipperz.PM.Strings.getValue('pageHeader.feedback')}]}, |
65 | {tag:'li', children:[{tag:'a', id:'helpHeaderLink', stringID:'pageHeader.help', href:'http://www.clipperz.com/support/user_guide',target:'_blank', html:Clipperz.PM.Strings.getValue('pageHeader.help')}]} | 65 | {tag:'li', children:[{tag:'a', id:'helpHeaderLink', stringID:'pageHeader.help', href:'http://www.clipperz.com/support/user_guide',target:'_blank', html:Clipperz.PM.Strings.getValue('pageHeader.help')}]} |
66 | ]} | 66 | ]} |
67 | ]}, | 67 | ]}, |
68 | {tag:'div', id:'logoFrame', children:[ | 68 | {tag:'div', id:'logoFrame', children:[ |
69 | {tag:'a', href:'http://www.clipperz.com', target:'_blank', children:[ | 69 | {tag:'a', href:'http://www.clipperz.com', target:'_blank', children:[ |
70 | // {tag:'h1', cls:'logo', html:"clipperz"}, | 70 | // {tag:'h1', cls:'logo', html:"clipperz"}, |
71 | {tag:'canvas', id:this.getId('logo'), cls:'logo'}, | 71 | {tag:'canvas', id:this.getId('logo'), cls:'logo'}, |
72 | {tag:'h5', cls:'clipperzPayoff', html:"keep it to yourself!"} | 72 | {tag:'h5', cls:'clipperzPayoff', html:"keep it to yourself!"} |
73 | ]} | 73 | ]} |
74 | ]}, | 74 | ]}, |
75 | {tag:'div', id:'news', cls:'hidden', children:[ | 75 | {tag:'div', id:'news', cls:'hidden', children:[ |
76 | // {tag:'div', cls:'close', children:[ | 76 | // {tag:'div', cls:'close', children:[ |
77 | // {tag:'a', href:'#', id:this.getId('closeTips'), html:'x'} | 77 | // {tag:'a', href:'#', id:this.getId('closeTips'), html:'x'} |
78 | // ]}, | 78 | // ]}, |
79 | {tag:'div', id:'newsframe', children:[ | 79 | {tag:'div', id:'newsframe', children:[ |
80 | {tag:'iframe', id:this.getId('iframe'), src:this.iframeURL()} | 80 | {tag:'iframe', id:this.getId('iframe'), src:this.iframeURL()} |
81 | ]}, | 81 | ]}, |
82 | {tag:'div', id:this.getId('newsGrip'), cls:'grip', children:[ | 82 | {tag:'div', id:this.getId('newsGrip'), cls:'grip', children:[ |
83 | {tag:'div', cls:'gripHandler', children:[]} | 83 | {tag:'div', cls:'gripHandler', children:[]} |
84 | ]} | 84 | ]} |
85 | ]}, | 85 | ]}, |
86 | {tag:'div', id:'featureTabs', children:[ | 86 | {tag:'div', id:'featureTabs', children:[ |
87 | {tag:'table', children:[{tag:'tr', children:[ | 87 | {tag:'table', children:[{tag:'tr', children:[ |
88 | {tag:'td', children:[{tag:'div', id:'feature_store', children:[{tag:'canvas', cls:'featureIcon', id:this.getId('storeIcon')}, {tag:'span', html:"Store and manage your password and online credentials"}]}]}, | 88 | {tag:'td', children:[{tag:'div', id:'feature_store', children:[{tag:'canvas', cls:'featureIcon', id:this.getId('storeIcon')}, {tag:'span', html:"Store and manage your password and online credentials"}]}]}, |
89 | {tag:'td', children:[{tag:'div', id:'feature_protect', children:[{tag:'canvas', cls:'featureIcon', id:this.getId('protectIcon')}, {tag:'span', html:"Protect all your sensitive data"}]}]}, | 89 | {tag:'td', children:[{tag:'div', id:'feature_protect', children:[{tag:'canvas', cls:'featureIcon', id:this.getId('protectIcon')}, {tag:'span', html:"Protect all your sensitive data"}]}]}, |
90 | {tag:'td', children:[{tag:'div', id:'feature_directLogin', children:[{tag:'canvas', cls:'featureIcon', id:this.getId('directLoginIcon')},{tag:'span', html:"Login to your web services without entering any username or password"}]}]}, | 90 | {tag:'td', children:[{tag:'div', id:'feature_directLogin', children:[{tag:'canvas', cls:'featureIcon', id:this.getId('directLoginIcon')},{tag:'span', html:"Login to your web services without entering any username or password"}]}]}, |
91 | {tag:'td', children:[{tag:'div', id:'feature_share', children:[{tag:'canvas', cls:'featureIcon', id:this.getId('shareIcon')}, {tag:'span', html:"Share secret with family members and associates"}]}]} | 91 | {tag:'td', children:[{tag:'div', id:'feature_share', children:[{tag:'canvas', cls:'featureIcon', id:this.getId('shareIcon')}, {tag:'span', html:"Share secret with family members and associates"}]}]} |
92 | ]}]} | 92 | ]}]} |
93 | ]} | 93 | ]} |
94 | ]); | 94 | ]); |
95 | 95 | ||
96 | Clipperz.PM.UI.Canvas.features.store(this.getElement('storeIcon'), "#ffffff"); | 96 | Clipperz.PM.UI.Canvas.features.store(this.getElement('storeIcon'), "#ffffff"); |
97 | Clipperz.PM.UI.Canvas.features.protect(this.getElement('protectIcon'), "#ffffff"); | 97 | Clipperz.PM.UI.Canvas.features.protect(this.getElement('protectIcon'), "#ffffff"); |
98 | Clipperz.PM.UI.Canvas.features.directLogin(this.getElement('directLoginIcon'), "#ffffff"); | 98 | Clipperz.PM.UI.Canvas.features.directLogin(this.getElement('directLoginIcon'), "#ffffff"); |
99 | Clipperz.PM.UI.Canvas.features.share(this.getElement('shareIcon'), "#ffffff", "#ffffff", "#ff0000"); | 99 | Clipperz.PM.UI.Canvas.features.share(this.getElement('shareIcon'), "#ffffff", "#ffffff", "#ff0000"); |
100 | 100 | ||
101 | MochiKit.Signal.connect(this.getElement('newsGrip'), 'onclick', this, 'toggleTips'); | 101 | MochiKit.Signal.connect(this.getElement('newsGrip'), 'onclick', this, 'toggleTips'); |
102 | MochiKit.Signal.connect(this.getElement('iframe'), 'onload', this, 'handleIframeDidLoad'); | 102 | MochiKit.Signal.connect(this.getElement('iframe'), 'onload', this, 'handleIframeDidLoad'); |
103 | this.setLogoDefaultColors(); | 103 | this.setLogoDefaultColors(); |
104 | }, | 104 | }, |
105 | 105 | ||
106 | //------------------------------------------------------------------------- | 106 | //------------------------------------------------------------------------- |
107 | 107 | ||
108 | 'switchToLoggedMode': function() { | 108 | 'switchToLoggedMode': function() { |
109 | // MochiKit.Style.addElementClass(this.element(), 'logged'); | 109 | // MochiKit.Style.addElementClass(this.element(), 'logged'); |
110 | MochiKit.Style.hideElement('featureTabs'); | 110 | MochiKit.Style.hideElement('featureTabs'); |
111 | }, | 111 | }, |
112 | 112 | ||
113 | //------------------------------------------------------------------------- | 113 | //------------------------------------------------------------------------- |
114 | 114 | ||
115 | 'animationDuration': function () { | 115 | 'animationDuration': function () { |
116 | return this._animationDuration; | 116 | return this._animationDuration; |
117 | }, | 117 | }, |
118 | 118 | ||
119 | 'offset': function () { | 119 | 'offset': function () { |
120 | return this._offset; | 120 | return this._offset; |
121 | }, | 121 | }, |
122 | 122 | ||
123 | //------------------------------------------------------------------------- | 123 | //------------------------------------------------------------------------- |
124 | 124 | ||
125 | 'isNewsOpen': function () { | 125 | 'isNewsOpen': function () { |
126 | return this._newsIsOpen; | 126 | return this._newsIsOpen; |
127 | }, | 127 | }, |
128 | 128 | ||
129 | 'toggleNewsIsOpen': function () { | 129 | 'toggleNewsIsOpen': function () { |
130 | this._newsIsOpen = !this._newsIsOpen; | 130 | this._newsIsOpen = !this._newsIsOpen; |
131 | }, | 131 | }, |
132 | 132 | ||
133 | 'toggleTips': function(anEvent) { | 133 | 'toggleTips': function(anEvent) { |
134 | anEvent.preventDefault(); | 134 | anEvent.preventDefault(); |
135 | 135 | ||
136 | if (this.isNewsOpen() == true) { | 136 | if (this.isNewsOpen() == true) { |
137 | MochiKit.Visual.Move(Clipperz.DOM.get('news'), { | 137 | MochiKit.Visual.Move(Clipperz.DOM.get('news'), { |
138 | x: 0, | 138 | x: 0, |
139 | y: -this.offset(), | 139 | y: -this.offset(), |
140 | mode: 'relative', | 140 | mode: 'relative', |
141 | duration: this.animationDuration(), | 141 | duration: this.animationDuration(), |
142 | beforeStart: function () { | 142 | beforeStart: function () { |
143 | MochiKit.DOM.setElementClass(Clipperz.DOM.get('news'), 'hiding'); | 143 | MochiKit.DOM.setElementClass(Clipperz.DOM.get('news'), 'hiding'); |
144 | }, | 144 | }, |
145 | afterFinish: function () { | 145 | afterFinish: function () { |
146 | Clipperz.DOM.get('newsframe').innerHTML = ""; | 146 | Clipperz.DOM.get('newsframe').innerHTML = ""; |
147 | MochiKit.DOM.setElementClass(Clipperz.DOM.get('news'), 'hidden'); | 147 | MochiKit.DOM.setElementClass(Clipperz.DOM.get('news'), 'hidden'); |
148 | } | 148 | } |
149 | }) | 149 | }) |
150 | this.toggleNewsIsOpen(); | 150 | this.toggleNewsIsOpen(); |
151 | } else { | 151 | } else { |
152 | MochiKit.DOM.addElementClass('newsframe', 'loading'); | 152 | MochiKit.DOM.addElementClass('newsframe', 'loading'); |
153 | MochiKit.Visual.Move(Clipperz.DOM.get('news'), { | 153 | MochiKit.Visual.Move(Clipperz.DOM.get('news'), { |
154 | x: 0, | 154 | x: 0, |
155 | y: this.offset(), | 155 | y: this.offset(), |
156 | mode: 'relative', | 156 | mode: 'relative', |
157 | duration: this.animationDuration(), | 157 | duration: this.animationDuration(), |
158 | beforeStart: MochiKit.Base.bind(function () { | 158 | beforeStart: MochiKit.Base.bind(function () { |
159 | this.append(Clipperz.DOM.get('newsframe'), {tag:'iframe', id:this.getId('iframe'), src:this.iframeURL()}); | 159 | this.append(Clipperz.DOM.get('newsframe'), {tag:'iframe', id:this.getId('iframe'), src:this.iframeURL()}); |
160 | 160 | ||
161 | MochiKit.Signal.connect(this.getElement('iframe'), 'onload', this, 'handleIframeDidLoad'); | 161 | MochiKit.Signal.connect(this.getElement('iframe'), 'onload', this, 'handleIframeDidLoad'); |
162 | MochiKit.DOM.setElementClass(Clipperz.DOM.get('news'), 'opening'); | 162 | MochiKit.DOM.setElementClass(Clipperz.DOM.get('news'), 'opening'); |
163 | }, this), | 163 | }, this), |
164 | afterFinish: function () { | 164 | afterFinish: function () { |
165 | MochiKit.DOM.setElementClass(Clipperz.DOM.get('news'), 'open'); | 165 | MochiKit.DOM.setElementClass(Clipperz.DOM.get('news'), 'open'); |
166 | } | 166 | } |
167 | }) | 167 | }) |
168 | this.toggleNewsIsOpen(); | 168 | this.toggleNewsIsOpen(); |
169 | } | 169 | } |
170 | }, | 170 | }, |
171 | 171 | ||
172 | 'setLogoDefaultColors': function () { | 172 | 'setLogoDefaultColors': function () { |
173 | Clipperz.PM.UI.Canvas.logo.normal(this.getElement('logo'), "clipperz", "28.0pt", "#ffffff"); | 173 | Clipperz.PM.UI.Canvas.logo.normal(this.getElement('logo'), "clipperz", "28.0pt", "#ffffff"); |
174 | }, | 174 | }, |
175 | 175 | ||
176 | //------------------------------------------------------------------------- | 176 | //------------------------------------------------------------------------- |
177 | 177 | ||
178 | 'handleIframeDidLoad': function (anEvent) { | 178 | 'handleIframeDidLoad': function (anEvent) { |
179 | if (this.isNewsOpen() == false) { | 179 | if (this.isNewsOpen() == false) { |
180 | this.toggleTips(anEvent); | 180 | this.toggleTips(anEvent); |
181 | } | 181 | } |
182 | 182 | ||
183 | MochiKit.DOM.removeElementClass('newsframe', 'loading'); | 183 | MochiKit.DOM.removeElementClass('newsframe', 'loading'); |
184 | MochiKit.Signal.disconnectAllTo(this.getElement('iframe')); | 184 | MochiKit.Signal.disconnectAllTo(this.getElement('iframe')); |
185 | }, | 185 | }, |
186 | 186 | ||
187 | //------------------------------------------------------------------------- | 187 | //------------------------------------------------------------------------- |
188 | __syntaxFix__: "syntax fix" | 188 | __syntaxFix__: "syntax fix" |
189 | }); | 189 | }); |
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 | |||
@@ -1,337 +1,365 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2013 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz, the online password manager. | 5 | This file is part of Clipperz, the online password manager. |
6 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
7 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
8 | 8 | ||
9 | * Clipperz is free software: you can redistribute it and/or modify it | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
10 | under the terms of the GNU Affero General Public License as published | 10 | under the terms of the GNU Affero General Public License as published |
11 | by the Free Software Foundation, either version 3 of the License, or | 11 | by the Free Software Foundation, either version 3 of the License, or |
12 | (at your option) any later version. | 12 | (at your option) any later version. |
13 | 13 | ||
14 | * Clipperz is distributed in the hope that it will be useful, but | 14 | * Clipperz is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
18 | 18 | ||
19 | * 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 |
20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
21 | 21 | ||
22 | */ | 22 | */ |
23 | 23 | ||
24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 24 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
25 | 25 | ||
26 | Clipperz.PM.UI.Web.Components.UserInfoBox = function(args) { | 26 | Clipperz.PM.UI.Web.Components.UserInfoBox = function(args) { |
27 | args = args || {}; | 27 | args = args || {}; |
28 | 28 | ||
29 | Clipperz.PM.UI.Web.Components.UserInfoBox.superclass.constructor.apply(this, arguments); | 29 | Clipperz.PM.UI.Web.Components.UserInfoBox.superclass.constructor.apply(this, arguments); |
30 | 30 | ||
31 | this._slots = {}; | 31 | this._slots = {}; |
32 | this._isLocked = false; | 32 | this._isLocked = false; |
33 | this._lockTooltip = null; | 33 | this._lockTooltip = null; |
34 | 34 | ||
35 | return this; | 35 | return this; |
36 | } | 36 | } |
37 | 37 | ||
38 | //============================================================================= | 38 | //============================================================================= |
39 | 39 | ||
40 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.UserInfoBox, Clipperz.PM.UI.Common.Components.BaseComponent, { | 40 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.UserInfoBox, Clipperz.PM.UI.Common.Components.BaseComponent, { |
41 | 41 | ||
42 | //------------------------------------------------------------------------- | 42 | //------------------------------------------------------------------------- |
43 | 43 | ||
44 | 'toString': function () { | 44 | 'toString': function () { |
45 | return "Clipperz.PM.UI.Web.Components.UserInfoBox component"; | 45 | return "Clipperz.PM.UI.Web.Components.UserInfoBox component"; |
46 | }, | 46 | }, |
47 | 47 | ||
48 | //------------------------------------------------------------------------- | 48 | //------------------------------------------------------------------------- |
49 | 49 | ||
50 | 'handleLogout': function(anEvent) { | 50 | 'handleLogout': function(anEvent) { |
51 | //Clipperz.log(">>> UserInfoBox.handleLogout"); | 51 | //Clipperz.log(">>> UserInfoBox.handleLogout"); |
52 | anEvent.preventDefault(); | 52 | anEvent.preventDefault(); |
53 | MochiKit.Signal.signal(this, 'logout'); | 53 | MochiKit.Signal.signal(this, 'logout'); |
54 | //Clipperz.log("<<< UserInfoBox.handleLogout"); | 54 | //Clipperz.log("<<< UserInfoBox.handleLogout"); |
55 | }, | 55 | }, |
56 | 56 | ||
57 | //------------------------------------------------------------------------- | 57 | //------------------------------------------------------------------------- |
58 | 58 | ||
59 | 'lockTooltip': function () { | 59 | 'lockTooltip': function () { |
60 | return this._lockTooltip; | 60 | return this._lockTooltip; |
61 | }, | 61 | }, |
62 | 62 | ||
63 | //------------------------------------------------------------------------- | 63 | //------------------------------------------------------------------------- |
64 | 64 | ||
65 | 'isLocked': function () { | 65 | 'isLocked': function () { |
66 | return this._isLocked; | 66 | return this._isLocked; |
67 | }, | 67 | }, |
68 | 68 | ||
69 | 'setIsLocked': function (aValue) { | 69 | 'setIsLocked': function (aValue) { |
70 | this._isLocked = aValue; | 70 | this._isLocked = aValue; |
71 | }, | 71 | }, |
72 | 72 | ||
73 | 'toggleLock': function(anEvent) { | 73 | 'toggleLock': function(anEvent) { |
74 | var deferredResult; | 74 | var deferredResult; |
75 | var shouldLock; | 75 | var shouldLock; |
76 | 76 | ||
77 | anEvent.preventDefault(); | 77 | anEvent.preventDefault(); |
78 | this.lockTooltip().hide(); | 78 | this.lockTooltip().hide(); |
79 | 79 | ||
80 | shouldLock = (this.isLocked() == false); | 80 | shouldLock = (this.isLocked() == false); |
81 | 81 | ||
82 | if (shouldLock) { | 82 | if (shouldLock) { |
83 | var maskElement; | 83 | var maskElement; |
84 | 84 | ||
85 | this.setIsLocked(true); | 85 | this.setIsLocked(true); |
86 | maskElement = this.getId('modalDialogMask'); | 86 | maskElement = this.getId('modalDialogMask'); |
87 | deferredResult = Clipperz.Async.callbacks("UserInfoBox.toggleLock [lock]", [ | 87 | deferredResult = Clipperz.Async.callbacks("UserInfoBox.toggleLock [lock]", [ |
88 | MochiKit.Base.partial(MochiKit.DOM.addElementClass, this.element(), 'locked'), | 88 | MochiKit.Base.partial(MochiKit.DOM.addElementClass, this.element(), 'locked'), |
89 | MochiKit.Base.partial(Clipperz.Visual.deferredAnimation, MochiKit.Visual.appear, maskElement, {from:0.0, to:0.75, duration:0.5}), | 89 | MochiKit.Base.partial(Clipperz.Visual.deferredAnimation, MochiKit.Visual.appear, maskElement, {from:0.0, to:0.75, duration:0.5}), |
90 | MochiKit.Base.method(Clipperz.PM.RunTime.mainController, 'setPassphraseDelegate', MochiKit.Base.method(this, 'askForPassphrase')), | 90 | MochiKit.Base.method(Clipperz.PM.RunTime.mainController, 'setPassphraseDelegate', MochiKit.Base.method(this, 'askForPassphrase')), |
91 | MochiKit.Base.partial(MochiKit.Signal.signal, this, 'lock') | 91 | MochiKit.Base.partial(MochiKit.Signal.signal, this, 'lock') |
92 | ], {trace:false}); | 92 | ], {trace:false}); |
93 | } else { | 93 | } else { |
94 | deferredResult = Clipperz.Async.callbacks("UserInfoBox.toggleLock [unlock]", [ | 94 | deferredResult = Clipperz.Async.callbacks("UserInfoBox.toggleLock [unlock]", [ |
95 | MochiKit.Base.partial(MochiKit.Signal.signal, this, 'unlock') | 95 | MochiKit.Base.partial(MochiKit.Signal.signal, this, 'unlock') |
96 | ], {trace:false}); | 96 | ], {trace:false}); |
97 | } | 97 | } |
98 | 98 | ||
99 | return deferredResult; | 99 | return deferredResult; |
100 | }, | 100 | }, |
101 | 101 | ||
102 | //------------------------------------------------------------------------- | 102 | //------------------------------------------------------------------------- |
103 | 103 | ||
104 | 'unlock': function () { | 104 | 'unlock': function () { |
105 | var deferredResult; | 105 | var deferredResult; |
106 | var maskElement; | 106 | var maskElement; |
107 | 107 | ||
108 | this.setIsLocked(false); | 108 | this.setIsLocked(false); |
109 | maskElement = this.getId('modalDialogMask'); | 109 | maskElement = this.getId('modalDialogMask'); |
110 | 110 | ||
111 | deferredResult = Clipperz.Async.callbacks("UserInfoBox.unlock", [ | 111 | deferredResult = Clipperz.Async.callbacks("UserInfoBox.unlock", [ |
112 | MochiKit.Base.partial(Clipperz.Visual.deferredAnimation, MochiKit.Visual.fade, maskElement, {from:0.75, to:0.0, duration:0.5}), | 112 | MochiKit.Base.partial(Clipperz.Visual.deferredAnimation, MochiKit.Visual.fade, maskElement, {from:0.75, to:0.0, duration:0.5}), |
113 | // Clipperz.Visual.deferredAnimation(MochiKit.Visual.fade, maskElement, {from:0.75, to:0.0, duration:0.5}), | 113 | // Clipperz.Visual.deferredAnimation(MochiKit.Visual.fade, maskElement, {from:0.75, to:0.0, duration:0.5}), |
114 | MochiKit.Base.partial(MochiKit.DOM.removeElementClass, this.element(), 'locked') | 114 | MochiKit.Base.partial(MochiKit.DOM.removeElementClass, this.element(), 'locked') |
115 | ], {trace:false}); | 115 | ], {trace:false}); |
116 | }, | 116 | }, |
117 | 117 | ||
118 | //------------------------------------------------------------------------- | 118 | //------------------------------------------------------------------------- |
119 | 119 | ||
120 | 'askForPassphrase': function () { | 120 | 'askForPassphrase': function () { |
121 | varunlockPasswordComponent; | 121 | varunlockPasswordComponent; |
122 | /* | 122 | /* |
123 | vardeferredResult; | 123 | vardeferredResult; |
124 | 124 | ||
125 | deferredResult = new Clipperz.Async.Deferred("UserInfoBox.askForPassphrase", {trace:false}); | 125 | deferredResult = new Clipperz.Async.Deferred("UserInfoBox.askForPassphrase", {trace:false}); |
126 | deferredResult.addCallback(MochiKit.Async.succeed, 'test'); | 126 | deferredResult.addCallback(MochiKit.Async.succeed, 'test'); |
127 | 127 | ||
128 | deferredResult.callback(); | 128 | deferredResult.callback(); |
129 | 129 | ||
130 | return deferredResult; | 130 | return deferredResult; |
131 | */ | 131 | */ |
132 | unlockPasswordComponent = new Clipperz.PM.UI.Web.Components.UnlockPasswordComponent({ | 132 | unlockPasswordComponent = new Clipperz.PM.UI.Web.Components.UnlockPasswordComponent({ |
133 | 'title':"Unlock account", | 133 | 'title':"Unlock account", |
134 | 'text': "Insert the passprase to unlock the account", | 134 | 'text': "Insert the passprase to unlock the account", |
135 | 'type': 'INFO', | 135 | 'type': 'INFO', |
136 | 'buttons': [ | 136 | 'buttons': [ |
137 | {text:"Cancel",result:'CANCEL'}, | 137 | {text:"Cancel",result:'CANCEL'}, |
138 | {text:"Unlock", result:'OK',isDefault:true} | 138 | {text:"Unlock", result:'OK',isDefault:true} |
139 | ], | 139 | ], |
140 | 'openFromElement': this.getElement('lock'), | 140 | 'openFromElement': this.getElement('lock'), |
141 | 'onOkCloseToElement': null, | 141 | 'onOkCloseToElement': null, |
142 | 'onCancelCloseToElement':this.getId('lock') | 142 | 'onCancelCloseToElement':this.getId('lock') |
143 | }); | 143 | }); |
144 | 144 | ||
145 | return unlockPasswordComponent.getPassphrase(); | 145 | return unlockPasswordComponent.getPassphrase(); |
146 | }, | 146 | }, |
147 | 147 | ||
148 | //========================================================================= | 148 | //========================================================================= |
149 | 149 | ||
150 | 'renderSelf': function(/*aContainer, aPosition*/) { | 150 | 'renderSelf': function(/*aContainer, aPosition*/) { |
151 | this.append(this.element(), [ | 151 | this.append(this.element(), [ |
152 | // {tag:'canvas', id:this.getId('canvas'), cls:'canvas', width:'188', height:'154'}, | 152 | // {tag:'canvas', id:this.getId('canvas'), cls:'canvas', width:'188', height:'154'}, |
153 | {tag:'div', cls:'header', children:[ | 153 | {tag:'div', cls:'header', children:[ |
154 | {tag:'h1', html:"Welcome"}, | 154 | {tag:'h1', html:"Welcome"}, |
155 | {tag:'a', cls:'lockButton', href:'#', id:this.getId('lock'), html:' '} | 155 | {tag:'a', cls:'lockButton', href:'#', id:this.getId('lock'), html:' '} |
156 | ]}, | 156 | ]}, |
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; |
206 | var controlPoint1X; | 234 | var controlPoint1X; |
207 | var controlPoint1Y; | 235 | var controlPoint1Y; |
208 | var controlPoint2X; | 236 | var controlPoint2X; |
209 | var controlPoint2Y; | 237 | var controlPoint2Y; |
210 | var gradient; | 238 | var gradient; |
211 | if (window.devicePixelRatio) | 239 | if (window.devicePixelRatio) |
212 | resolution = window.devicePixelRatio; | 240 | resolution = window.devicePixelRatio; |
213 | else | 241 | else |
214 | resolution = 1.0; | 242 | resolution = 1.0; |
215 | resolution *= 0.5 * (canvas.width / kMyDrawingFunctionWidth + canvas.height / kMyDrawingFunctionHeight); | 243 | resolution *= 0.5 * (canvas.width / kMyDrawingFunctionWidth + canvas.height / kMyDrawingFunctionHeight); |
216 | 244 | ||
217 | context.save(); | 245 | context.save(); |
218 | context.scale(canvas.width / kMyDrawingFunctionWidth, canvas.height / kMyDrawingFunctionHeight); | 246 | context.scale(canvas.width / kMyDrawingFunctionWidth, canvas.height / kMyDrawingFunctionHeight); |
219 | context.clearRect(0.0, 0.0, kMyDrawingFunctionWidth, kMyDrawingFunctionHeight); | 247 | context.clearRect(0.0, 0.0, kMyDrawingFunctionWidth, kMyDrawingFunctionHeight); |
220 | 248 | ||
221 | // Setup for Shadow Effect | 249 | // Setup for Shadow Effect |
222 | color = "rgba(0.0%, 0.0%, 0.0%, 0.667)"; | 250 | color = "rgba(0.0%, 0.0%, 0.0%, 0.667)"; |
223 | context.save(); | 251 | context.save(); |
224 | context.shadowColor = color; | 252 | context.shadowColor = color; |
225 | context.shadowBlur = 3.0; | 253 | context.shadowBlur = 3.0; |
226 | context.shadowOffsetX = 5.729 * Math.cos(7.592) * resolution; | 254 | context.shadowOffsetX = 5.729 * Math.cos(7.592) * resolution; |
227 | context.shadowOffsetY = 5.729 * Math.sin(7.592) * resolution; | 255 | context.shadowOffsetY = 5.729 * Math.sin(7.592) * resolution; |
228 | 256 | ||
229 | // Layer 1 | 257 | // Layer 1 |
230 | 258 | ||
231 | alignStroke = 0.0; | 259 | alignStroke = 0.0; |
232 | context.beginPath(); | 260 | context.beginPath(); |
233 | pointX = 169.5; | 261 | pointX = 169.5; |
234 | pointY = 141.5; | 262 | pointY = 141.5; |
235 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | 263 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; |
236 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | 264 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; |
237 | context.moveTo(pointX, pointY); | 265 | context.moveTo(pointX, pointY); |
238 | pointX = 177.5; | 266 | pointX = 177.5; |
239 | pointY = 133.5; | 267 | pointY = 133.5; |
240 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | 268 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; |
241 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | 269 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; |
242 | controlPoint1X = 173.889; | 270 | controlPoint1X = 173.889; |
243 | controlPoint1Y = 141.5; | 271 | controlPoint1Y = 141.5; |
244 | controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; | 272 | controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; |
245 | controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; | 273 | controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; |
246 | controlPoint2X = 177.5; | 274 | controlPoint2X = 177.5; |
247 | controlPoint2Y = 137.889; | 275 | controlPoint2Y = 137.889; |
248 | controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; | 276 | controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; |
249 | controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; | 277 | controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; |
250 | context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); | 278 | context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); |
251 | pointX = 177.5; | 279 | pointX = 177.5; |
252 | pointY = 19.5; | 280 | pointY = 19.5; |
253 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | 281 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; |
254 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | 282 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; |
255 | context.lineTo(pointX, pointY); | 283 | context.lineTo(pointX, pointY); |
256 | pointX = 169.5; | 284 | pointX = 169.5; |
257 | pointY = 11.5; | 285 | pointY = 11.5; |
258 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | 286 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; |
259 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | 287 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; |
260 | controlPoint1X = 177.5; | 288 | controlPoint1X = 177.5; |
261 | controlPoint1Y = 15.111; | 289 | controlPoint1Y = 15.111; |
262 | controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; | 290 | controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; |
263 | controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; | 291 | controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; |
264 | controlPoint2X = 173.889; | 292 | controlPoint2X = 173.889; |
265 | controlPoint2Y = 11.5; | 293 | controlPoint2Y = 11.5; |
266 | controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; | 294 | controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; |
267 | controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; | 295 | controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; |
268 | context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); | 296 | context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); |
269 | pointX = 18.5; | 297 | pointX = 18.5; |
270 | pointY = 11.5; | 298 | pointY = 11.5; |
271 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | 299 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; |
272 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | 300 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; |
273 | context.lineTo(pointX, pointY); | 301 | context.lineTo(pointX, pointY); |
274 | pointX = 10.5; | 302 | pointX = 10.5; |
275 | pointY = 19.5; | 303 | pointY = 19.5; |
276 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | 304 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; |
277 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | 305 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; |
278 | controlPoint1X = 14.111; | 306 | controlPoint1X = 14.111; |
279 | controlPoint1Y = 11.5; | 307 | controlPoint1Y = 11.5; |
280 | controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; | 308 | controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; |
281 | controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; | 309 | controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; |
282 | controlPoint2X = 10.5; | 310 | controlPoint2X = 10.5; |
283 | controlPoint2Y = 15.111; | 311 | controlPoint2Y = 15.111; |
284 | controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; | 312 | controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; |
285 | controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; | 313 | controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; |
286 | context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); | 314 | context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); |
287 | pointX = 10.5; | 315 | pointX = 10.5; |
288 | pointY = 133.5; | 316 | pointY = 133.5; |
289 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | 317 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; |
290 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | 318 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; |
291 | context.lineTo(pointX, pointY); | 319 | context.lineTo(pointX, pointY); |
292 | pointX = 18.5; | 320 | pointX = 18.5; |
293 | pointY = 141.5; | 321 | pointY = 141.5; |
294 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | 322 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; |
295 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | 323 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; |
296 | controlPoint1X = 10.5; | 324 | controlPoint1X = 10.5; |
297 | controlPoint1Y = 137.889; | 325 | controlPoint1Y = 137.889; |
298 | controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; | 326 | controlPoint1X = (Math.round(resolution * controlPoint1X + alignStroke) - alignStroke) / resolution; |
299 | controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; | 327 | controlPoint1Y = (Math.round(resolution * controlPoint1Y + alignStroke) - alignStroke) / resolution; |
300 | controlPoint2X = 14.111; | 328 | controlPoint2X = 14.111; |
301 | controlPoint2Y = 141.5; | 329 | controlPoint2Y = 141.5; |
302 | controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; | 330 | controlPoint2X = (Math.round(resolution * controlPoint2X + alignStroke) - alignStroke) / resolution; |
303 | controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; | 331 | controlPoint2Y = (Math.round(resolution * controlPoint2Y + alignStroke) - alignStroke) / resolution; |
304 | context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); | 332 | context.bezierCurveTo(controlPoint1X, controlPoint1Y, controlPoint2X, controlPoint2Y, pointX, pointY); |
305 | pointX = 169.5; | 333 | pointX = 169.5; |
306 | pointY = 141.5; | 334 | pointY = 141.5; |
307 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; | 335 | pointX = (Math.round(resolution * pointX + alignStroke) - alignStroke) / resolution; |
308 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; | 336 | pointY = (Math.round(resolution * pointY + alignStroke) - alignStroke) / resolution; |
309 | context.lineTo(pointX, pointY); | 337 | context.lineTo(pointX, pointY); |
310 | context.closePath(); | 338 | context.closePath(); |
311 | gradient = context.createLinearGradient(94.0, 11.5, 94.0, 141.5); | 339 | gradient = context.createLinearGradient(94.0, 11.5, 94.0, 141.5); |
312 | color = "#EE9B69"; | 340 | color = "#EE9B69"; |
313 | gradient.addColorStop(0.0, color); | 341 | gradient.addColorStop(0.0, color); |
314 | color = "#E38D62"; | 342 | color = "#E38D62"; |
315 | gradient.addColorStop(1.0, color); | 343 | gradient.addColorStop(1.0, color); |
316 | context.fillStyle = gradient; | 344 | context.fillStyle = gradient; |
317 | context.fill(); | 345 | context.fill(); |
318 | 346 | ||
319 | // Shadow Effect | 347 | // Shadow Effect |
320 | context.restore(); | 348 | context.restore(); |
321 | 349 | ||
322 | context.restore(); | 350 | context.restore(); |
323 | }, | 351 | }, |
324 | */ | 352 | */ |
325 | //------------------------------------------------------------------------- | 353 | //------------------------------------------------------------------------- |
326 | 354 | ||
327 | 'updateUserDetails': function (someUserInfo) { | 355 | 'updateUserDetails': function (someUserInfo) { |
328 | varelementName; | 356 | varelementName; |
329 | 357 | ||
330 | for (elementName in someUserInfo) { | 358 | for (elementName in someUserInfo) { |
331 | this.getElement(elementName).innerHTML = someUserInfo[elementName]; | 359 | this.getElement(elementName).innerHTML = someUserInfo[elementName]; |
332 | } | 360 | } |
333 | }, | 361 | }, |
334 | 362 | ||
335 | //------------------------------------------------------------------------- | 363 | //------------------------------------------------------------------------- |
336 | __syntaxFix__: "syntax fix" | 364 | __syntaxFix__: "syntax fix" |
337 | }); | 365 | }); |