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.js18
1 files changed, 13 insertions, 5 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 d2f1045..462d864 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DataPanel.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DataPanel.js
@@ -37,72 +37,80 @@ Clipperz.PM.UI.Web.Components.DataPanel = function(args) {
37 panel:'offlineCopyPanel' 37 panel:'offlineCopyPanel'
38 }, 38 },
39 'SHARING': { 39 'SHARING': {
40 tab:'sharingTab', 40 tab:'sharingTab',
41 panel:'sharingPanel' 41 panel:'sharingPanel'
42 }, 42 },
43 'IMPORT': { 43 'IMPORT': {
44 tab:'importTab', 44 tab:'importTab',
45 panel:'importPanel' 45 panel:'importPanel'
46 }, 46 },
47 'EXPORT': { 47 'EXPORT': {
48 tab:'exportTab', 48 tab:'exportTab',
49 panel:'exportPanel' 49 panel:'exportPanel'
50 } 50 }
51 }; 51 };
52 52
53 return this; 53 return this;
54} 54}
55 55
56//============================================================================= 56//=============================================================================
57 57
58Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DataPanel, Clipperz.PM.UI.Common.Components.TabPanelComponent, { 58Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DataPanel, Clipperz.PM.UI.Common.Components.TabPanelComponent, {
59 59
60 //------------------------------------------------------------------------- 60 //-------------------------------------------------------------------------
61 61
62 'toString': function () { 62 'toString': function () {
63 return "Clipperz.PM.UI.Web.Components.DataPanel component"; 63 return "Clipperz.PM.UI.Web.Components.DataPanel component";
64 }, 64 },
65 65
66 //------------------------------------------------------------------------- 66 //-------------------------------------------------------------------------
67 67
68 'renderSelf': function(/*aContainer, aPosition*/) { 68 'renderSelf': function(/*aContainer, aPosition*/) {
69 this.append(this.element(), [ 69 this.append(this.element(), [
70 {tag:'div', cls:'header', children:[ 70 {tag:'div', cls:'header', children:[
71 {tag:'div', cls:'subPanelTabs', children:[ 71 {tag:'div', cls:'subPanelTabs', children:[
72 {tag:'ul', children:[ 72 {tag:'ul', children:[
73 {tag:'li', id:this.getId('offlineCopyTab'),children:[{tag:'a', href:'#', html:'Offline copy'}], cls:'first'}, 73 {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'}]}, 74 {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'}]}, 75 {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'}]} 76 {tag:'li', id:this.getId('exportTab'), children:[{tag:'a', href:'#', html:'Export'}]}
77 ]} 77 ]}
78 ]} 78 ]}
79 ]}, 79 ]},
80 {tag:'div', cls:'body', children:[ 80 {tag:'div', cls:'body', children:[
81 {tag:'div', cls:'accountPanel', children:[ 81 {tag:'div', cls:'accountPanel', children:[
82 {tag:'div', cls:'subPanelContent', children:[ 82 {tag:'div', cls:'subPanelContent', children:[
83 {tag:'ul', children:[ 83 {tag:'ul', children:[
84 {tag:'li', id:this.getId('offlineCopyPanel'),children:[ 84 {tag:'li', id:this.getId('offlineCopyPanel'),children:[
85 {tag:'h3', html:"Offline copy"} 85 // {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."},
87 {tag:'a', id:this.getId('offlineCopyDownloadLink'), href:'#', html:"Download", cls:'downloadOfflineCopy'}
86 ]}, 88 ]},
87 {tag:'li', id:this.getId('sharingPanel'),children:[ 89 {tag:'li', id:this.getId('sharingPanel'),children:[
88 {tag:'h3', html:"Sharing"} 90 // {tag:'h3', html:"Sharing"}
89 ]}, 91 ]},
90 {tag:'li', id:this.getId('importPanel'), children:[ 92 {tag:'li', id:this.getId('importPanel'), children:[
91 {tag:'h3', html:"Import"} 93 // {tag:'h3', html:"Import"}
92 ]}, 94 ]},
93 {tag:'li', id:this.getId('exportPanel'), children:[ 95 {tag:'li', id:this.getId('exportPanel'), children:[
94 {tag:'h3', html:"Export"} 96 // {tag:'h3', html:"Export"}
95 ]} 97 ]}
96 ]} 98 ]}
97 ]} 99 ]}
98 ]} 100 ]}
99 ]}, 101 ]},
100 {tag:'div', cls:'footer'} 102 {tag:'div', cls:'footer'}
101 ]); 103 ]);
102 104
103 this.tabPanelController().setup({selected:this.initiallySelectedTab()}); 105 this.tabPanelController().setup({selected:this.initiallySelectedTab()});
106 MochiKit.Signal.connect(this.getId('offlineCopyDownloadLink'), 'onclick', this, 'downloadOfflineCopy');
104 }, 107 },
105 108
109 'downloadOfflineCopy': function (anEvent) {
110 anEvent.preventDefault();
111 MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'downloadOfflineCopy', anEvent.src());
112 },
113
106 //------------------------------------------------------------------------- 114 //-------------------------------------------------------------------------
107 __syntaxFix__: "syntax fix" 115 __syntaxFix__: "syntax fix"
108}); 116});