summaryrefslogtreecommitdiff
path: root/frontend/gamma/js/Clipperz/PM/UI/Web/Components/PageHeader.js
Unidiff
Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Web/Components/PageHeader.js') (more/less context) (ignore whitespace changes)
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Web/Components/PageHeader.js4
1 files changed, 2 insertions, 2 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
3Copyright 2008-2013 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz, the online password manager. 5This file is part of Clipperz, the online password manager.
6For further information about its features and functionalities please 6For further information about its features and functionalities please
7refer to http://www.clipperz.com. 7refer 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
24Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); 24Clipperz.Base.module('Clipperz.PM.UI.Web.Components');
25 25
26Clipperz.PM.UI.Web.Components.PageHeader = function(args) { 26Clipperz.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
40Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.PageHeader, Clipperz.PM.UI.Common.Components.BaseComponent, { 40Clipperz.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});