Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Web/Components/TabSidePanel.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/gamma/js/Clipperz/PM/UI/Web/Components/TabSidePanel.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/TabSidePanel.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/TabSidePanel.js index 39a1ccb..666afe9 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/TabSidePanel.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/TabSidePanel.js | |||
@@ -1,88 +1,85 @@ | |||
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.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Web.Components'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Web.Components.TabSidePanel = function(args) { | 28 | Clipperz.PM.UI.Web.Components.TabSidePanel = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | Clipperz.PM.UI.Web.Components.TabSidePanel.superclass.constructor.call(this, args); | 30 | Clipperz.PM.UI.Web.Components.TabSidePanel.superclass.constructor.call(this, args); |
34 | 31 | ||
35 | this._element = args.element || null; | 32 | this._element = args.element || null; |
36 | 33 | ||
37 | this._slots = { | 34 | this._slots = { |
38 | }; | 35 | }; |
39 | 36 | ||
40 | return this; | 37 | return this; |
41 | } | 38 | } |
42 | 39 | ||
43 | //============================================================================= | 40 | //============================================================================= |
44 | 41 | ||
45 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.TabSidePanel, Clipperz.PM.UI.Common.Components.BaseComponent, { | 42 | Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.TabSidePanel, Clipperz.PM.UI.Common.Components.BaseComponent, { |
46 | 43 | ||
47 | //------------------------------------------------------------------------- | 44 | //------------------------------------------------------------------------- |
48 | 45 | ||
49 | 'toString': function () { | 46 | 'toString': function () { |
50 | return "Clipperz.PM.UI.Web.Components.TabSidePanel component"; | 47 | return "Clipperz.PM.UI.Web.Components.TabSidePanel component"; |
51 | }, | 48 | }, |
52 | 49 | ||
53 | //------------------------------------------------------------------------- | 50 | //------------------------------------------------------------------------- |
54 | 51 | ||
55 | 'deselectAllTabs': function() { | 52 | 'deselectAllTabs': function() { |
56 | var tabListItems; | 53 | var tabListItems; |
57 | 54 | ||
58 | tabListItems = [ | 55 | tabListItems = [ |
59 | 'cardsLI', | 56 | 'cardsLI', |
60 | // 'directLoginLI', | 57 | // 'directLoginLI', |
61 | 'accountLI', | 58 | 'accountLI', |
62 | 'dataLI', | 59 | 'dataLI', |
63 | 'toolsLI' | 60 | 'toolsLI' |
64 | ]; | 61 | ]; |
65 | 62 | ||
66 | //Clipperz.log("=== TabSidePanel.tabSelected anEvent.src().id", anEvent.src().id); | 63 | //Clipperz.log("=== TabSidePanel.tabSelected anEvent.src().id", anEvent.src().id); |
67 | for (var i in tabListItems) { | 64 | for (var i in tabListItems) { |
68 | //Clipperz.log("=== TabSidePanel.tabSelected aTabListItem", tabListItems[i]); | 65 | //Clipperz.log("=== TabSidePanel.tabSelected aTabListItem", tabListItems[i]); |
69 | MochiKit.DOM.removeElementClass(this.getId(tabListItems[i]), 'selected'); | 66 | MochiKit.DOM.removeElementClass(this.getId(tabListItems[i]), 'selected'); |
70 | } | 67 | } |
71 | }, | 68 | }, |
72 | 69 | ||
73 | 'selectTab': function(aTabName) { | 70 | 'selectTab': function(aTabName) { |
74 | this.deselectAllTabs(); | 71 | this.deselectAllTabs(); |
75 | MochiKit.DOM.addElementClass(this.getId(this.listItemIdForTabNamed(aTabName)), 'selected'); | 72 | MochiKit.DOM.addElementClass(this.getId(this.listItemIdForTabNamed(aTabName)), 'selected'); |
76 | MochiKit.Signal.signal(this, 'tabSelected', aTabName); | 73 | MochiKit.Signal.signal(this, 'tabSelected', aTabName); |
77 | }, | 74 | }, |
78 | 75 | ||
79 | 'tabNameForAnchorId': function(anId) { | 76 | 'tabNameForAnchorId': function(anId) { |
80 | var result; | 77 | var result; |
81 | 78 | ||
82 | switch(anId) { | 79 | switch(anId) { |
83 | case 'cards_tabSidePanel': | 80 | case 'cards_tabSidePanel': |
84 | result = 'cards'; | 81 | result = 'cards'; |
85 | break; | 82 | break; |
86 | // case 'directLogins_tabSidePanel': | 83 | // case 'directLogins_tabSidePanel': |
87 | // result = 'directLogins'; | 84 | // result = 'directLogins'; |
88 | // break; | 85 | // break; |