Diffstat (limited to 'frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js index e2036d0..29ef516 100644 --- a/frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js +++ b/frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js | |||
@@ -1,120 +1,117 @@ | |||
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's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | 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 |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * 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 |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
31 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
32 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } | 29 | if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; } |
33 | 30 | ||
34 | //############################################################################# | 31 | //############################################################################# |
35 | 32 | ||
36 | Clipperz.PM.Components.Panels.MainPanel = function(anElement, args) { | 33 | Clipperz.PM.Components.Panels.MainPanel = function(anElement, args) { |
37 | args = args || {}; | 34 | args = args || {}; |
38 | 35 | ||
39 | Clipperz.PM.Components.Panels.MainPanel.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.Panels.MainPanel.superclass.constructor.call(this, anElement, args); |
40 | 37 | ||
41 | this._recordListDataModel = null; | 38 | this._recordListDataModel = null; |
42 | this._selectedRecord = null; | 39 | this._selectedRecord = null; |
43 | this._recordDetailComponent = null; | 40 | this._recordDetailComponent = null; |
44 | this._recordListGrid = null; | 41 | this._recordListGrid = null; |
45 | 42 | ||
46 | this._directLinkItemTemplate = null; | 43 | this._directLinkItemTemplate = null; |
47 | this._recordItemTemplate = null; | 44 | this._recordItemTemplate = null; |
48 | 45 | ||
49 | this._addNewRecordButton = null; | 46 | this._addNewRecordButton = null; |
50 | this._deleteRecordButton = null; | 47 | this._deleteRecordButton = null; |
51 | 48 | ||
52 | this._creationWizard = null; | 49 | this._creationWizard = null; |
53 | 50 | ||
54 | Clipperz.NotificationCenter.register(null, 'selectAndEnterEditMode', this, 'selectRecordAndEnterEditModeHandler'); | 51 | Clipperz.NotificationCenter.register(null, 'selectAndEnterEditMode', this, 'selectRecordAndEnterEditModeHandler'); |
55 | 52 | ||
56 | Clipperz.NotificationCenter.register(null, 'recordAdded', this, 'recordAddedHandler'); | 53 | Clipperz.NotificationCenter.register(null, 'recordAdded', this, 'recordAddedHandler'); |
57 | Clipperz.NotificationCenter.register(null, 'recordUpdated', this, 'recordUpdatedHandler'); | 54 | Clipperz.NotificationCenter.register(null, 'recordUpdated', this, 'recordUpdatedHandler'); |
58 | Clipperz.NotificationCenter.register(null, 'recordRemoved', this, 'recordRemovedHandler'); | 55 | Clipperz.NotificationCenter.register(null, 'recordRemoved', this, 'recordRemovedHandler'); |
59 | 56 | ||
60 | Clipperz.NotificationCenter.register(null, 'directLoginAdded', this, 'directLoginAddedHandler'); | 57 | Clipperz.NotificationCenter.register(null, 'directLoginAdded', this, 'directLoginAddedHandler'); |
61 | Clipperz.NotificationCenter.register(null, 'directLoginUpdated', this, 'directLoginUpdatedHandler'); | 58 | Clipperz.NotificationCenter.register(null, 'directLoginUpdated', this, 'directLoginUpdatedHandler'); |
62 | Clipperz.NotificationCenter.register(null, 'directLoginRemoved', this, 'directLoginRemovedHandler'); | 59 | Clipperz.NotificationCenter.register(null, 'directLoginRemoved', this, 'directLoginRemovedHandler'); |
63 | 60 | ||
64 | Clipperz.NotificationCenter.register(null, 'accountLocked', this, 'accountLockedHandler'); | 61 | Clipperz.NotificationCenter.register(null, 'accountLocked', this, 'accountLockedHandler'); |
65 | 62 | ||
66 | MochiKit.Signal.connect(MochiKit.DOM.currentWindow(), 'onresize', this, 'resizeModalMask'); | 63 | MochiKit.Signal.connect(MochiKit.DOM.currentWindow(), 'onresize', this, 'resizeModalMask'); |
67 | this.render(); | 64 | this.render(); |
68 | 65 | ||
69 | return this; | 66 | return this; |
70 | } | 67 | } |
71 | 68 | ||
72 | //============================================================================= | 69 | //============================================================================= |
73 | 70 | ||
74 | YAHOO.extendX(Clipperz.PM.Components.Panels.MainPanel, Clipperz.PM.Components.Panels.BasePanel, { | 71 | YAHOO.extendX(Clipperz.PM.Components.Panels.MainPanel, Clipperz.PM.Components.Panels.BasePanel, { |
75 | 72 | ||
76 | 'toString': function() { | 73 | 'toString': function() { |
77 | return "Clipperz.PM.Components.Panels.MainPanel component"; | 74 | return "Clipperz.PM.Components.Panels.MainPanel component"; |
78 | }, | 75 | }, |
79 | 76 | ||
80 | //------------------------------------------------------------------------- | 77 | //------------------------------------------------------------------------- |
81 | 78 | ||
82 | 'render': function() { | 79 | 'render': function() { |
83 | this.element().update(""); | 80 | this.element().update(""); |
84 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', id:'mainPanelTABLE', border:'0', cellspacing:'0', cellpadding:'0', children:[ | 81 | Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', id:'mainPanelTABLE', border:'0', cellspacing:'0', cellpadding:'0', children:[ |
85 | {tag:'tbody', children:[ | 82 | {tag:'tbody', children:[ |
86 | {tag:'tr', children:[ | 83 | {tag:'tr', children:[ |
87 | {tag:'td', width:'15', children:[ | 84 | {tag:'td', width:'15', children:[ |
88 | {tag:'div', cls:'mainPanelMinHeightDiv'} | 85 | {tag:'div', cls:'mainPanelMinHeightDiv'} |
89 | ]}, | 86 | ]}, |
90 | {tag:'td', valign:'top', id:'directLoginsTD', width:'200', children:[ | 87 | {tag:'td', valign:'top', id:'directLoginsTD', width:'200', children:[ |
91 | {tag:'div', id:'directLoginsBlock', children:[ | 88 | {tag:'div', id:'directLoginsBlock', children:[ |
92 | {tag:'div', cls:'directLoginsBlockHeaderBox', children:[{tag:'h3', id:'directLoginTitle', htmlString:Clipperz.PM.Strings['mainPanelDirectLoginBlockLabel']}]}, | 89 | {tag:'div', cls:'directLoginsBlockHeaderBox', children:[{tag:'h3', id:'directLoginTitle', htmlString:Clipperz.PM.Strings['mainPanelDirectLoginBlockLabel']}]}, |
93 | {tag:'div', id:'directLoginsDescription', htmlString:Clipperz.PM.Strings['mainPanelDirectLoginBlockDescription']}, | 90 | {tag:'div', id:'directLoginsDescription', htmlString:Clipperz.PM.Strings['mainPanelDirectLoginBlockDescription']}, |
94 | {tag:'ul', id:'directLogins'} | 91 | {tag:'ul', id:'directLogins'} |
95 | ]} | 92 | ]} |
96 | ]}, | 93 | ]}, |
97 | {tag:'td', width:'15', children:[ | 94 | {tag:'td', width:'15', children:[ |
98 | {tag:'div', cls:'mainPanelMinHeightDiv'} | 95 | {tag:'div', cls:'mainPanelMinHeightDiv'} |
99 | ]}, | 96 | ]}, |
100 | {tag:'td', valign:'top', children:[ | 97 | {tag:'td', valign:'top', children:[ |
101 | {tag:'div', id:'mainContent', children:[ | 98 | {tag:'div', id:'mainContent', children:[ |
102 | {tag:'div', id:'recordListBlockHeader'}, | 99 | {tag:'div', id:'recordListBlockHeader'}, |
103 | {tag:'div', id:'recordListAndDetailBlock', children:[ | 100 | {tag:'div', id:'recordListAndDetailBlock', children:[ |
104 | {tag:'table', id:'recordListAndDetailBlockTABLE', border:'0', cellspacing:'0', cellpadding:'0', children:[ | 101 | {tag:'table', id:'recordListAndDetailBlockTABLE', border:'0', cellspacing:'0', cellpadding:'0', children:[ |
105 | {tag:'tbody', children:[ | 102 | {tag:'tbody', children:[ |
106 | {tag:'tr', children:[ | 103 | {tag:'tr', children:[ |
107 | {tag:'td', valign:'top', width:'250', children:[ | 104 | {tag:'td', valign:'top', width:'250', children:[ |
108 | {tag:'div', id:'recordListBlock', children:[ | 105 | {tag:'div', id:'recordListBlock', children:[ |
109 | {tag:'div', id:'recordListFilterHeader'}, | 106 | {tag:'div', id:'recordListFilterHeader'}, |
110 | {tag:'ul', id:'records'} | 107 | {tag:'ul', id:'records'} |
111 | ]} | 108 | ]} |
112 | ]}, | 109 | ]}, |
113 | {tag:'td', id:'recordDetailSeparatorTD', rowspan:'2', valign:'top', bgcolor:'#ddddff', html:' '}, | 110 | {tag:'td', id:'recordDetailSeparatorTD', rowspan:'2', valign:'top', bgcolor:'#ddddff', html:' '}, |
114 | {tag:'td', valign:'top', children:[ | 111 | {tag:'td', valign:'top', children:[ |
115 | {tag:'div', id:'recordDetailMainBlock', children:[ | 112 | {tag:'div', id:'recordDetailMainBlock', children:[ |
116 | {tag:'div', id:'recordTitleTopBlock'}, | 113 | {tag:'div', id:'recordTitleTopBlock'}, |
117 | {tag:'div', id:'recordDetailBlock', children:[ | 114 | {tag:'div', id:'recordDetailBlock', children:[ |
118 | {tag:'div', id:'recordDetail'} | 115 | {tag:'div', id:'recordDetail'} |
119 | ]} | 116 | ]} |
120 | ]}, | 117 | ]}, |