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) (unidiff) | |
tree | 95b8caf354083593d7775e4dda6f4c556b44a2d9 /frontend/gamma/js/Clipperz/PM/UI/Web/Components/DataPanel.js | |
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/Components/DataPanel.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/gamma/js/Clipperz/PM/UI/Web/Components/DataPanel.js | 18 |
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 | |||
@@ -1,108 +1,116 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz Community Edition. |
6 | Clipperz Community Edition is an online password manager. | 6 | Clipperz Community Edition is an online password manager. |
7 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 8 | refer to http://www.clipperz.com. |
9 | 9 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
11 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
12 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
13 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
14 | 14 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
19 | 19 | ||
20 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
22 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
23 | 23 | ||
24 | */ | 24 | */ |
25 | 25 | ||
26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
27 | 27 | ||
28 | Clipperz.PM.UI.Web.Components.DataPanel = function(args) { | 28 | Clipperz.PM.UI.Web.Components.DataPanel = function(args) { |
29 | args = args || {}; | 29 | args = args || {}; |
30 | 30 | ||
31 | Clipperz.PM.UI.Web.Components.DataPanel.superclass.constructor.apply(this, arguments); | 31 | Clipperz.PM.UI.Web.Components.DataPanel.superclass.constructor.apply(this, arguments); |
32 | 32 | ||
33 | this._initiallySelectedTab = args.selected || 'OFFLINE_COPY'; | 33 | this._initiallySelectedTab = args.selected || 'OFFLINE_COPY'; |
34 | this._tabPanelControllerConfiguration = { | 34 | this._tabPanelControllerConfiguration = { |
35 | 'OFFLINE_COPY': { | 35 | 'OFFLINE_COPY': { |
36 | tab:'offlineCopyTab', | 36 | tab:'offlineCopyTab', |
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 | ||
58 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.DataPanel, Clipperz.PM.UI.Common.Components.TabPanelComponent, { | 58 | Clipperz.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 | }); |