summaryrefslogtreecommitdiff
path: root/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DataPanel.js
Unidiff
Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Web/Components/DataPanel.js') (more/less context) (ignore whitespace changes)
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Web/Components/DataPanel.js22
1 files changed, 10 insertions, 12 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DataPanel.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DataPanel.js
index 462d864..23f6710 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DataPanel.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DataPanel.js
@@ -1,116 +1,114 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz Community Edition. 5This file is part of Clipperz, the online password manager.
6Clipperz Community Edition is an online password manager.
7For further information about its features and functionalities please 6For further information about its features and functionalities please
8refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
9 8
10* Clipperz Community Edition is free software: you can redistribute 9* Clipperz is free software: you can redistribute it and/or modify it
11 it and/or modify it under the terms of the GNU Affero General Public 10 under the terms of the GNU Affero General Public License as published
12 License as published by the Free Software Foundation, either version 11 by the Free Software Foundation, either version 3 of the License, or
13 3 of the License, or (at your option) any later version. 12 (at your option) any later version.
14 13
15* Clipperz Community Edition is distributed in the hope that it will 14* Clipperz is distributed in the hope that it will be useful, but
16 be useful, but WITHOUT ANY WARRANTY; without even the implied 15 WITHOUT ANY WARRANTY; without even the implied warranty of
17 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU Affero General Public License for more details. 17 See the GNU Affero General Public License for more details.
19 18
20* 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
21 License along with Clipperz Community Edition. If not, see 20 License along with Clipperz. If not, see http://www.gnu.org/licenses/.
22 <http://www.gnu.org/licenses/>.
23 21
24*/ 22*/
25 23
26Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); 24Clipperz.Base.module('Clipperz.PM.UI.Web.Components');
27 25
28Clipperz.PM.UI.Web.Components.DataPanel = function(args) { 26Clipperz.PM.UI.Web.Components.DataPanel = function(args) {
29 args = args || {}; 27 args = args || {};
30 28
31 Clipperz.PM.UI.Web.Components.DataPanel.superclass.constructor.apply(this, arguments); 29 Clipperz.PM.UI.Web.Components.DataPanel.superclass.constructor.apply(this, arguments);
32 30
33 this._initiallySelectedTab = args.selected || 'OFFLINE_COPY'; 31 this._initiallySelectedTab = args.selected || 'OFFLINE_COPY';
34 this._tabPanelControllerConfiguration = { 32 this._tabPanelControllerConfiguration = {
35 'OFFLINE_COPY': { 33 'OFFLINE_COPY': {
36 tab:'offlineCopyTab', 34 tab:'offlineCopyTab',
37 panel:'offlineCopyPanel' 35 panel:'offlineCopyPanel'
38 }, 36 },
39 'SHARING': { 37 'SHARING': {
40 tab:'sharingTab', 38 tab:'sharingTab',
41 panel:'sharingPanel' 39 panel:'sharingPanel'
42 }, 40 },
43 'IMPORT': { 41 'IMPORT': {
44 tab:'importTab', 42 tab:'importTab',
45 panel:'importPanel' 43 panel:'importPanel'
46 }, 44 },
47 'EXPORT': { 45 'EXPORT': {
48 tab:'exportTab', 46 tab:'exportTab',
49 panel:'exportPanel' 47 panel:'exportPanel'
50 } 48 }
51 }; 49 };
52 50
53 return this; 51 return this;
54} 52}
55 53
56//============================================================================= 54//=============================================================================
57 55
58Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DataPanel, Clipperz.PM.UI.Common.Components.TabPanelComponent, { 56Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DataPanel, Clipperz.PM.UI.Common.Components.TabPanelComponent, {
59 57
60 //------------------------------------------------------------------------- 58 //-------------------------------------------------------------------------
61 59
62 'toString': function () { 60 'toString': function () {
63 return "Clipperz.PM.UI.Web.Components.DataPanel component"; 61 return "Clipperz.PM.UI.Web.Components.DataPanel component";
64 }, 62 },
65 63
66 //------------------------------------------------------------------------- 64 //-------------------------------------------------------------------------
67 65
68 'renderSelf': function(/*aContainer, aPosition*/) { 66 'renderSelf': function(/*aContainer, aPosition*/) {
69 this.append(this.element(), [ 67 this.append(this.element(), [
70 {tag:'div', cls:'header', children:[ 68 {tag:'div', cls:'header', children:[
71 {tag:'div', cls:'subPanelTabs', children:[ 69 {tag:'div', cls:'subPanelTabs', children:[
72 {tag:'ul', children:[ 70 {tag:'ul', children:[
73 {tag:'li', id:this.getId('offlineCopyTab'),children:[{tag:'a', href:'#', html:'Offline copy'}], cls:'first'}, 71 {tag:'li', id:this.getId('offlineCopyTab'),children:[{tag:'a', href:'#', html:'Offline copy'}], cls:'first'},
74 {tag:'li', id:this.getId('sharingTab'), children:[{tag:'a', href:'#', html:'Sharing'}]}, 72 {tag:'li', id:this.getId('sharingTab'), children:[{tag:'a', href:'#', html:'Sharing'}]},
75 {tag:'li', id:this.getId('importTab'), children:[{tag:'a', href:'#', html:'Import'}]}, 73 {tag:'li', id:this.getId('importTab'), children:[{tag:'a', href:'#', html:'Import'}]},
76 {tag:'li', id:this.getId('exportTab'), children:[{tag:'a', href:'#', html:'Export'}]} 74 {tag:'li', id:this.getId('exportTab'), children:[{tag:'a', href:'#', html:'Export'}]}
77 ]} 75 ]}
78 ]} 76 ]}
79 ]}, 77 ]},
80 {tag:'div', cls:'body', children:[ 78 {tag:'div', cls:'body', children:[
81 {tag:'div', cls:'accountPanel', children:[ 79 {tag:'div', cls:'accountPanel', children:[
82 {tag:'div', cls:'subPanelContent', children:[ 80 {tag:'div', cls:'subPanelContent', children:[
83 {tag:'ul', children:[ 81 {tag:'ul', children:[
84 {tag:'li', id:this.getId('offlineCopyPanel'),children:[ 82 {tag:'li', id:this.getId('offlineCopyPanel'),children:[
85 // {tag:'h3', html:"Offline copy"}, 83 // {tag:'h3', html:"Offline copy"},
86 {tag:'p', html:"With just one click you can dump all your encrypted data from Clipperz servers to your hard disk and create a read-only offline version of Clipperz to be used when you are not connected to the Internet."}, 84 {tag:'p', html:"With just one click you can dump all your encrypted data from Clipperz servers to your hard disk and create a read-only offline version of Clipperz to be used when you are not connected to the Internet."},
87 {tag:'a', id:this.getId('offlineCopyDownloadLink'), href:'#', html:"Download", cls:'downloadOfflineCopy'} 85 {tag:'a', id:this.getId('offlineCopyDownloadLink'), href:'#', html:"Download", cls:'downloadOfflineCopy'}
88 ]}, 86 ]},
89 {tag:'li', id:this.getId('sharingPanel'),children:[ 87 {tag:'li', id:this.getId('sharingPanel'),children:[
90 // {tag:'h3', html:"Sharing"} 88 // {tag:'h3', html:"Sharing"}
91 ]}, 89 ]},
92 {tag:'li', id:this.getId('importPanel'), children:[ 90 {tag:'li', id:this.getId('importPanel'), children:[
93 // {tag:'h3', html:"Import"} 91 // {tag:'h3', html:"Import"}
94 ]}, 92 ]},
95 {tag:'li', id:this.getId('exportPanel'), children:[ 93 {tag:'li', id:this.getId('exportPanel'), children:[
96 // {tag:'h3', html:"Export"} 94 // {tag:'h3', html:"Export"}
97 ]} 95 ]}
98 ]} 96 ]}
99 ]} 97 ]}
100 ]} 98 ]}
101 ]}, 99 ]},
102 {tag:'div', cls:'footer'} 100 {tag:'div', cls:'footer'}
103 ]); 101 ]);
104 102
105 this.tabPanelController().setup({selected:this.initiallySelectedTab()}); 103 this.tabPanelController().setup({selected:this.initiallySelectedTab()});
106 MochiKit.Signal.connect(this.getId('offlineCopyDownloadLink'), 'onclick', this, 'downloadOfflineCopy'); 104 MochiKit.Signal.connect(this.getId('offlineCopyDownloadLink'), 'onclick', this, 'downloadOfflineCopy');
107 }, 105 },
108 106
109 'downloadOfflineCopy': function (anEvent) { 107 'downloadOfflineCopy': function (anEvent) {
110 anEvent.preventDefault(); 108 anEvent.preventDefault();
111 MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'downloadOfflineCopy', anEvent.src()); 109 MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'downloadOfflineCopy', anEvent.src());
112 }, 110 },
113 111
114 //------------------------------------------------------------------------- 112 //-------------------------------------------------------------------------
115 __syntaxFix__: "syntax fix" 113 __syntaxFix__: "syntax fix"
116}); 114});