summaryrefslogtreecommitdiff
path: root/frontend/gamma/js/Clipperz/PM/UI/Common/Components/BaseComponent.js
Unidiff
Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Common/Components/BaseComponent.js') (more/less context) (ignore whitespace changes)
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Common/Components/BaseComponent.js15
1 files changed, 6 insertions, 9 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/BaseComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/BaseComponent.js
index 26f2fc4..2a03fdf 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/BaseComponent.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/BaseComponent.js
@@ -1,120 +1,117 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29Clipperz.Base.module('Clipperz.PM.UI.Common.Components'); 26Clipperz.Base.module('Clipperz.PM.UI.Common.Components');
30 27
31//############################################################################# 28//#############################################################################
32 29
33var _Clipperz_PM_Components_base_id_ = 0; 30var _Clipperz_PM_Components_base_id_ = 0;
34 31
35//############################################################################# 32//#############################################################################
36 33
37Clipperz.PM.UI.Common.Components.BaseComponent = function(args) { 34Clipperz.PM.UI.Common.Components.BaseComponent = function(args) {
38 args = args || {}; 35 args = args || {};
39 Clipperz.PM.UI.Common.Components.BaseComponent.superclass.constructor.call(this, args); 36 Clipperz.PM.UI.Common.Components.BaseComponent.superclass.constructor.call(this, args);
40 37
41 this._element = args.element || null; 38 this._element = args.element || null;
42 this._ids = {}; 39 this._ids = {};
43 40
44 this._slots = {}; 41 this._slots = {};
45 this._slotComponents = {}; 42 this._slotComponents = {};
46 43
47 this._components = {}; 44 this._components = {};
48 45
49 this._cachedSlots = {}; 46 this._cachedSlots = {};
50 47
51 this._isModal = false; 48 this._isModal = false;
52 49
53 this._isActive = false; 50 this._isActive = false;
54 this._elementUsedToEnterModalState; 51 this._elementUsedToEnterModalState;
55 52
56 this._isFullyRendered = false; 53 this._isFullyRendered = false;
57 this._renderingWaitingQueue = []; 54 this._renderingWaitingQueue = [];
58 55
59 //this._slots = { 56 //this._slots = {
60 // 'header':'header', 57 // 'header':'header',
61 // 'body': 'body', 58 // 'body': 'body',
62 // 'footer':'footer' 59 // 'footer':'footer'
63 //}; 60 //};
64 61
65 return this; 62 return this;
66} 63}
67 64
68//============================================================================= 65//=============================================================================
69 66
70//TODO get back to MochiKit.Base.update as we are not extending anything 67//TODO get back to MochiKit.Base.update as we are not extending anything
71//MochiKit.Base.update(Clipperz.PM.UI.Common.Components.BaseComponent.prototype, { 68//MochiKit.Base.update(Clipperz.PM.UI.Common.Components.BaseComponent.prototype, {
72Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.BaseComponent, /*Ext.Component*/ Object, { 69Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.BaseComponent, /*Ext.Component*/ Object, {
73 70
74 'isClipperzPMComponent': true, 71 'isClipperzPMComponent': true,
75 72
76 //------------------------------------------------------------------------- 73 //-------------------------------------------------------------------------
77 74
78 'toString': function () { 75 'toString': function () {
79 return "Clipperz.PM.UI.Common.Components.BaseComponent component"; 76 return "Clipperz.PM.UI.Common.Components.BaseComponent component";
80 }, 77 },
81 78
82 'componentId': function () { 79 'componentId': function () {
83 return this.getId('_id_'); 80 return this.getId('_id_');
84 }, 81 },
85 82
86 //------------------------------------------------------------------------- 83 //-------------------------------------------------------------------------
87/* 84/*
88 'slots': function() { 85 'slots': function() {
89 return this._slots; 86 return this._slots;
90 }, 87 },
91*/ 88*/
92 'slotComponents': function() { 89 'slotComponents': function() {
93 return this._slotComponents; 90 return this._slotComponents;
94 }, 91 },
95 92
96 //------------------------------------------------------------------------- 93 //-------------------------------------------------------------------------
97 94
98 'components': function () { 95 'components': function () {
99 return this._components; 96 return this._components;
100 }, 97 },
101 98
102 'addComponent': function (aComponent) { 99 'addComponent': function (aComponent) {
103 this.components()[aComponent.componentId()] = aComponent; 100 this.components()[aComponent.componentId()] = aComponent;
104 }, 101 },
105 102
106 'removeComponent': function (aComponent) { 103 'removeComponent': function (aComponent) {
107 var componentId; 104 var componentId;
108 105
109 componentId = aComponent.componentId(); 106 componentId = aComponent.componentId();
110 this.components()[componentId].remove(); 107 this.components()[componentId].remove();
111 delete this.components()[componentId]; 108 delete this.components()[componentId];
112 }, 109 },
113 110
114 //------------------------------------------------------------------------- 111 //-------------------------------------------------------------------------
115/* 112/*
116 'domHelper': function() { 113 'domHelper': function() {
117 return Clipperz.YUI.DomHelper; 114 return Clipperz.YUI.DomHelper;
118 }, 115 },
119 */ 116 */
120 //------------------------------------------------------------------------- 117 //-------------------------------------------------------------------------