author | Clipperz <info@clipperz.com> | 2013-01-08 15:21:04 (UTC) |
---|---|---|
committer | Clipperz <info@clipperz.com> | 2013-01-08 15:21:04 (UTC) |
commit | 816fc35420a434b1d54ae5833d617608f7456048 (patch) (side-by-side diff) | |
tree | 95b8caf354083593d7775e4dda6f4c556b44a2d9 /frontend/gamma/js/Clipperz/PM/UI/Web | |
parent | 267603e3aa3cf0029411e67ae14018b52344c296 (diff) | |
download | clipperz-816fc35420a434b1d54ae5833d617608f7456048.zip clipperz-816fc35420a434b1d54ae5833d617608f7456048.tar.gz clipperz-816fc35420a434b1d54ae5833d617608f7456048.tar.bz2 |
Updated version of /gamma
Tons of changes, included a new draft of the mobile version (still VERY rough)
Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Web') (more/less context) (show whitespace changes)
5 files changed, 60 insertions, 18 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/AccountPanel.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/AccountPanel.js index ee6d7a3..d6b0574 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/AccountPanel.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/AccountPanel.js @@ -40,8 +40,12 @@ Clipperz.PM.UI.Web.Components.AccountPanel = function(args) { 'PASSPHRASE': { tab: 'passphraseTab', panel: 'passphrasePanel' }, + 'OTP': { + tab: 'OTPTab', + panel: 'OTPPanel' + }, 'PREFERENCES': { tab: 'preferencesTab', panel: 'preferencesPanel' }, @@ -73,8 +77,9 @@ Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.AccountPanel, Clipperz.PM.UI. {tag:'div', cls:'subPanelTabs', children:[ {tag:'ul', children:[ // {tag:'li', id:this.getId('accountTab'), children:[{tag:'a', href:'#', html:'Account'}], cls:'first'}, {tag:'li', id:this.getId('passphraseTab'), children:[{tag:'a', href:'#', html:'Passphrase'}], cls:'first'}, + {tag:'li', id:this.getId('OTPTab'), children:[{tag:'a', href:'#', html:'One Time Passwords'}]}, {tag:'li', id:this.getId('preferencesTab'), children:[{tag:'a', href:'#', html:'Preferences'}]}, {tag:'li', id:this.getId('loginHistoryTab'), children:[{tag:'a', href:'#', html:'Login history'}]} ]} ]} @@ -116,18 +121,18 @@ Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.AccountPanel, Clipperz.PM.UI. ]}, {tag:'div', cls:'clear'}, {tag:'div', cls:'confirmButton', id:this.getId('confirmationButton'), children:[ {tag:'span', html:"change passphrase"} + ]} ]}, - - {tag:'h3', cls:'manageOTP', html:"Manage One-Time Passphrases"}, - {} + {tag:'li', id:this.getId('OTPPanel'), children:[ +// {tag:'h3', html:"Manage One-Time Passphrases"} ]}, {tag:'li', id:this.getId('preferencesPanel'), children:[ - {tag:'h3', html:"-- Preferences --"} +// {tag:'h3', html:"-- Preferences --"} ]}, {tag:'li', id:this.getId('loginHistoryPanel'), children:[ - {tag:'h3', html:"-- Login History --"} +// {tag:'h3', html:"-- Login History --"} ]} ]} ]} ]} 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 @@ -81,18 +81,20 @@ Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DataPanel, Clipperz.PM.UI.Com {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"} ]} ]} ]} ]} @@ -100,8 +102,14 @@ Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DataPanel, Clipperz.PM.UI.Com {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" diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginProgress.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginProgress.js index 5d082b5..26506e7 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginProgress.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/LoginProgress.js @@ -81,11 +81,12 @@ Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LoginProgress, Clipperz.PM.UI ]} ]}, {tag:'div', cls:'footer', children:[ {tag:'div', cls:'buttonArea', id:this.getId('buttonArea'), children:[ - {tag:'div', cls:'button', id:this.getId('button'), children:[ - {tag:'a', href:'#', id:this.getId('buttonLink'), html:"cancel"} - ]} +// {tag:'div', cls:'button', id:this.getId('button'), children:[ +// {tag:'a', href:'#', id:this.getId('buttonLink'), html:"cancel"} +// ]} + {tag:'a', cls:'button', id:this.getId('button'), html:"cancel"} ]} ]} ]}); // ]); @@ -94,9 +95,10 @@ Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LoginProgress, Clipperz.PM.UI this.addComponent(new Clipperz.PM.UI.Common.Components.ProgressBar({'element':this.getElement('progressBar')})); MochiKit.Style.hideElement(this.getElement('errorBox')); - MochiKit.Signal.connect(this.getId('buttonLink'), 'onclick', this, 'cancelEventHandler'); +// MochiKit.Signal.connect(this.getId('buttonLink'), 'onclick', this, 'cancelEventHandler'); + MochiKit.Signal.connect(this.getId('button'), 'onclick', this, 'cancelEventHandler'); }, //------------------------------------------------------------------------- @@ -120,9 +122,11 @@ Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.LoginProgress, Clipperz.PM.UI //------------------------------------------------------------------------- 'showErrorMessage': function() { - this.getElement('buttonLink').innerHTML = "close"; +// this.getElement('buttonLink').innerHTML = "close"; + this.getElement('button').innerHTML = "close"; + MochiKit.DOM.addElementClass(this.getElement('button'), 'default'); MochiKit.Style.hideElement(this.getElement('progressBar')); this.getElement('title').innerHTML = "Error"; diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ToolsPanel.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ToolsPanel.js index 3ee6189..0fa369f 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ToolsPanel.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/ToolsPanel.js @@ -81,18 +81,18 @@ Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.ToolsPanel, Clipperz.PM.UI.Co {tag:'div', cls:'accountPanel', children:[ {tag:'div', cls:'subPanelContent', children:[ {tag:'ul', children:[ {tag:'li', id:this.getId('passwordGeneratorPanel'), children:[ - {tag:'h3', html:"Password generator"} +// {tag:'h3', html:"Password generator"} ]}, {tag:'li', id:this.getId('bookmarkletPanel'), children:[ - {tag:'h3', html:"Bookmarklet"} +// {tag:'h3', html:"Bookmarklet"} ]}, {tag:'li', id:this.getId('compactEditionPanel'), children:[ - {tag:'h3', html:"Compact edition"} +// {tag:'h3', html:"Compact edition"} ]}, {tag:'li', id:this.getId('httpAuthPanel'), children:[ - {tag:'h3', html:"HTTP Auth"} +// {tag:'h3', html:"HTTP Auth"} ]} ]} ]} ]} diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/AppController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/AppController.js index 9a0e744..1ab2e69 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/AppController.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/AppController.js @@ -234,8 +234,10 @@ MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.AppController.prototype, { MochiKit.Signal.connect(this.tabSidePanel(), 'tabSelected', this, 'handleTabSelected'); MochiKit.Signal.connect(this.tabSidePanel(), 'addCard', this, 'handleAddCard'); MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'addCard', this, 'handleAddCard'); + MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'downloadOfflineCopy', this, 'handleDownloadOfflineCopy'); + deferredResult = new Clipperz.Async.Deferred("AppController.run", {trace:false}); deferredResult.addMethod(this.cardsController(), 'run', {slot:this.appPage().slotNamed('cardGrid'), user:user}); // deferredResult.addMethod(this.directLoginsController(), 'run', {slot:this.appPage().slotNamed('directLoginGrid'), user:user}); @@ -320,7 +322,30 @@ MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.AppController.prototype, { MochiKit.Base.method(this.userInfoBox(), 'unlock') ], {trace:false}); }, + 'handleDownloadOfflineCopy': function (anEvent) { +console.log("AppController.handleDownloadOfflineCopy"); + var downloadHref; + + downloadHref = window.location.href.replace(/\/[^\/]*$/,'') + Clipperz_dumpUrl; + + if (Clipperz_IEisBroken == true) { + window.open(downloadHref, ""); + } else { + var deferredResult; + var newWindow; + + newWindow = window.open("", ""); + + deferredResult = new Clipperz.Async.Deferred("AppController.handleDownloadOfflineCopy", {trace:true}); + deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'echo', {'echo':"echo"}); + deferredResult.addCallback(function(aWindow) { + aWindow.location.href = downloadHref; + }, newWindow); + deferredResult.callback(); + } + }, + //============================================================================= __syntaxFix__: "syntax fix" }); |