Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/AppController.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/AppController.js | 15 |
1 files changed, 6 insertions, 9 deletions
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 05563bf..9a0e744 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/AppController.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/AppController.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 | Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Controllers.AppController = function(args) { | 28 | Clipperz.PM.UI.Web.Controllers.AppController = function(args) { |
32 | 29 | ||
33 | this._user = null; | 30 | this._user = null; |
34 | this._tabSlotNames = { | 31 | this._tabSlotNames = { |
35 | //tabName: slotName | 32 | //tabName: slotName |
36 | 'cards': 'cardGrid', | 33 | 'cards': 'cardGrid', |
37 | // 'directLogins':'directLoginGrid', | 34 | // 'directLogins':'directLoginGrid', |
38 | 'account': 'accountPanel', | 35 | 'account': 'accountPanel', |
39 | 'data': 'dataPanel', | 36 | 'data': 'dataPanel', |
40 | 'tools': 'toolsPanel' | 37 | 'tools': 'toolsPanel' |
41 | }; | 38 | }; |
42 | 39 | ||
43 | //controllers | 40 | //controllers |
44 | this._cardsController= null; | 41 | this._cardsController= null; |
45 | //this._directLoginsController = null; | 42 | //this._directLoginsController = null; |
46 | this._filterController = null; //new Clipperz.PM.UI.Web.Controllers.FilterController(); | 43 | this._filterController = null; //new Clipperz.PM.UI.Web.Controllers.FilterController(); |
47 | 44 | ||
48 | //components | 45 | //components |
49 | this._appPage = null; | 46 | this._appPage = null; |
50 | this._userInfoBox = null; | 47 | this._userInfoBox = null; |
51 | this._tabSidePanel = null; | 48 | this._tabSidePanel = null; |
52 | 49 | ||
53 | // MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'editCard', this, 'handleEditCard'); | 50 | // MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'editCard', this, 'handleEditCard'); |
54 | // MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'deleteCard',this, 'handleDeleteCard'); | 51 | // MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'deleteCard',this, 'handleDeleteCard'); |
55 | 52 | ||
56 | MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'userDataSuccessfullySaved',this, 'userDataSuccessfullySavedHandler'); | 53 | MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'userDataSuccessfullySaved',this, 'userDataSuccessfullySavedHandler'); |
57 | 54 | ||
58 | return this; | 55 | return this; |
59 | } | 56 | } |
60 | 57 | ||
61 | MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.AppController.prototype, { | 58 | MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.AppController.prototype, { |
62 | 59 | ||
63 | 'toString': function() { | 60 | 'toString': function() { |
64 | return "Clipperz.PM.UI.Web.Controllers.AppController"; | 61 | return "Clipperz.PM.UI.Web.Controllers.AppController"; |
65 | }, | 62 | }, |
66 | 63 | ||
67 | //----------------------------------------------------------------------------- | 64 | //----------------------------------------------------------------------------- |
68 | 65 | ||
69 | 'setUser': function(anUser) { | 66 | 'setUser': function(anUser) { |
70 | this._user = anUser; | 67 | this._user = anUser; |
71 | }, | 68 | }, |
72 | 69 | ||
73 | 'user': function() { | 70 | 'user': function() { |
74 | return this._user; | 71 | return this._user; |
75 | }, | 72 | }, |
76 | 73 | ||
77 | //----------------------------------------------------------------------------- | 74 | //----------------------------------------------------------------------------- |
78 | /* | 75 | /* |
79 | 'tabSlotNames': function() { | 76 | 'tabSlotNames': function() { |
80 | return this._tabSlotNames; | 77 | return this._tabSlotNames; |
81 | }, | 78 | }, |
82 | */ | 79 | */ |
83 | 'slotNameForTab': function(aTabName) { | 80 | 'slotNameForTab': function(aTabName) { |
84 | return this._tabSlotNames[aTabName]; | 81 | return this._tabSlotNames[aTabName]; |
85 | }, | 82 | }, |
86 | 83 | ||
87 | 'hideAllAppPageTabSlots': function() { | 84 | 'hideAllAppPageTabSlots': function() { |
88 | var aTabName; | 85 | var aTabName; |
89 | 86 | ||
90 | for (aTabName in this._tabSlotNames) { | 87 | for (aTabName in this._tabSlotNames) { |
91 | this.appPage().hideSlot(this.slotNameForTab(aTabName)); | 88 | this.appPage().hideSlot(this.slotNameForTab(aTabName)); |
92 | } | 89 | } |
93 | }, | 90 | }, |
94 | 91 | ||
95 | //----------------------------------------------------------------------------- | 92 | //----------------------------------------------------------------------------- |
96 | 93 | ||
97 | 'appPage': function() { | 94 | 'appPage': function() { |
98 | if (this._appPage == null) { | 95 | if (this._appPage == null) { |
99 | this._appPage = new Clipperz.PM.UI.Web.Components.AppPage(); | 96 | this._appPage = new Clipperz.PM.UI.Web.Components.AppPage(); |
100 | } | 97 | } |
101 | 98 | ||
102 | return this._appPage; | 99 | return this._appPage; |
103 | }, | 100 | }, |
104 | 101 | ||
105 | //----------------------------------------------------------------------------- | 102 | //----------------------------------------------------------------------------- |
106 | 103 | ||
107 | 'tabSidePanel': function() { | 104 | 'tabSidePanel': function() { |
108 | if (this._tabSidePanel == null) { | 105 | if (this._tabSidePanel == null) { |
109 | this._tabSidePanel = new Clipperz.PM.UI.Web.Components.TabSidePanel(); | 106 | this._tabSidePanel = new Clipperz.PM.UI.Web.Components.TabSidePanel(); |
110 | } | 107 | } |
111 | 108 | ||
112 | return this._tabSidePanel; | 109 | return this._tabSidePanel; |
113 | }, | 110 | }, |
114 | 111 | ||
115 | //----------------------------------------------------------------------------- | 112 | //----------------------------------------------------------------------------- |
116 | 113 | ||
117 | 'userInfoBox': function() { | 114 | 'userInfoBox': function() { |
118 | if (this._userInfoBox == null) { | 115 | if (this._userInfoBox == null) { |
119 | this._userInfoBox = new Clipperz.PM.UI.Web.Components.UserInfoBox(); | 116 | this._userInfoBox = new Clipperz.PM.UI.Web.Components.UserInfoBox(); |
120 | 117 | ||