summaryrefslogtreecommitdiff
path: root/frontend/gamma/js/Clipperz/PM/UI/Web/Components/DataPanel.js
Side-by-side diff
Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Web/Components/DataPanel.js') (more/less context) (show whitespace changes)
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Web/Components/DataPanel.js16
1 files changed, 12 insertions, 4 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) {
panel: 'offlineCopyPanel'
},
'SHARING': {
tab: 'sharingTab',
panel: 'sharingPanel'
},
'IMPORT': {
tab: 'importTab',
panel: 'importPanel'
},
'EXPORT': {
tab: 'exportTab',
panel: 'exportPanel'
}
};
return this;
}
//=============================================================================
Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DataPanel, Clipperz.PM.UI.Common.Components.TabPanelComponent, {
//-------------------------------------------------------------------------
'toString': function () {
return "Clipperz.PM.UI.Web.Components.DataPanel component";
},
//-------------------------------------------------------------------------
'renderSelf': function(/*aContainer, aPosition*/) {
this.append(this.element(), [
{tag:'div', cls:'header', children:[
{tag:'div', cls:'subPanelTabs', children:[
{tag:'ul', children:[
{tag:'li', id:this.getId('offlineCopyTab'), children:[{tag:'a', href:'#', html:'Offline copy'}], cls:'first'},
{tag:'li', id:this.getId('sharingTab'), children:[{tag:'a', href:'#', html:'Sharing'}]},
{tag:'li', id:this.getId('importTab'), children:[{tag:'a', href:'#', html:'Import'}]},
{tag:'li', id:this.getId('exportTab'), children:[{tag:'a', href:'#', html:'Export'}]}
]}
]}
]},
{tag:'div', cls:'body', children:[
{tag:'div', cls:'accountPanel', children:[
{tag:'div', cls:'subPanelContent', children:[
{tag:'ul', children:[
{tag:'li', id:this.getId('offlineCopyPanel'), children:[
- {tag:'h3', html:"Offline copy"}
+// {tag:'h3', html:"Offline copy"},
+ {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."},
+ {tag:'a', id:this.getId('offlineCopyDownloadLink'), href:'#', html:"Download", cls:'downloadOfflineCopy'}
]},
{tag:'li', id:this.getId('sharingPanel'), children:[
- {tag:'h3', html:"Sharing"}
+// {tag:'h3', html:"Sharing"}
]},
{tag:'li', id:this.getId('importPanel'), children:[
- {tag:'h3', html:"Import"}
+// {tag:'h3', html:"Import"}
]},
{tag:'li', id:this.getId('exportPanel'), children:[
- {tag:'h3', html:"Export"}
+// {tag:'h3', html:"Export"}
]}
]}
]}
]}
]},
{tag:'div', cls:'footer'}
]);
this.tabPanelController().setup({selected:this.initiallySelectedTab()});
+ MochiKit.Signal.connect(this.getId('offlineCopyDownloadLink'), 'onclick', this, 'downloadOfflineCopy');
+ },
+
+ 'downloadOfflineCopy': function (anEvent) {
+ anEvent.preventDefault();
+ MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'downloadOfflineCopy', anEvent.src());
},
//-------------------------------------------------------------------------
__syntaxFix__: "syntax fix"
});