Diffstat (limited to 'frontend/beta/js/Clipperz/PM/Components/BaseComponent.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/beta/js/Clipperz/PM/Components/BaseComponent.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/frontend/beta/js/Clipperz/PM/Components/BaseComponent.js b/frontend/beta/js/Clipperz/PM/Components/BaseComponent.js index 67e257b..f3a3902 100644 --- a/frontend/beta/js/Clipperz/PM/Components/BaseComponent.js +++ b/frontend/beta/js/Clipperz/PM/Components/BaseComponent.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 | 29 | ||
33 | //############################################################################# | 30 | //############################################################################# |
34 | 31 | ||
35 | var _Clipperz_PM_Components_Panels_base_id_ = 0; | 32 | var _Clipperz_PM_Components_Panels_base_id_ = 0; |
36 | 33 | ||
37 | //############################################################################# | 34 | //############################################################################# |
38 | 35 | ||
39 | Clipperz.PM.Components.BaseComponent = function(anElement, args) { | 36 | Clipperz.PM.Components.BaseComponent = function(anElement, args) { |
40 | args = args || {}; | 37 | args = args || {}; |
41 | //MochiKit.Base.bindMethods(this); | 38 | //MochiKit.Base.bindMethods(this); |
42 | //Clipperz.PM.Components.BaseComponent.superclass.constructor.call(this, args); | 39 | //Clipperz.PM.Components.BaseComponent.superclass.constructor.call(this, args); |
43 | 40 | ||
44 | this._element = anElement; | 41 | this._element = anElement; |
45 | this._ids = {}; | 42 | this._ids = {}; |
46 | 43 | ||
47 | return this; | 44 | return this; |
48 | } | 45 | } |
49 | 46 | ||
50 | //============================================================================= | 47 | //============================================================================= |
51 | 48 | ||
52 | //MochiKit.Base.update(Clipperz.PM.Components.BaseComponent.prototype, { | 49 | //MochiKit.Base.update(Clipperz.PM.Components.BaseComponent.prototype, { |
53 | YAHOO.extendX(Clipperz.PM.Components.BaseComponent, YAHOO.ext.util.Observable, { | 50 | YAHOO.extendX(Clipperz.PM.Components.BaseComponent, YAHOO.ext.util.Observable, { |
54 | 51 | ||
55 | 'isClipperzPMComponent': true, | 52 | 'isClipperzPMComponent': true, |
56 | 53 | ||
57 | //------------------------------------------------------------------------- | 54 | //------------------------------------------------------------------------- |
58 | 55 | ||
59 | 'toString': function () { | 56 | 'toString': function () { |
60 | return "Clipperz.PM.Components.BaseComponent component"; | 57 | return "Clipperz.PM.Components.BaseComponent component"; |
61 | }, | 58 | }, |
62 | 59 | ||
63 | //------------------------------------------------------------------------- | 60 | //------------------------------------------------------------------------- |
64 | 61 | ||
65 | 'domHelper': function() { | 62 | 'domHelper': function() { |
66 | return Clipperz.YUI.DomHelper; | 63 | return Clipperz.YUI.DomHelper; |
67 | }, | 64 | }, |
68 | 65 | ||
69 | //------------------------------------------------------------------------- | 66 | //------------------------------------------------------------------------- |
70 | 67 | ||
71 | 'element': function() { | 68 | 'element': function() { |
72 | //MochiKit.Logging.logDebug(">>> BaseComponent.element"); | 69 | //MochiKit.Logging.logDebug(">>> BaseComponent.element"); |
73 | return this._element; | 70 | return this._element; |
74 | }, | 71 | }, |
75 | 72 | ||
76 | 'setElement': function(aValue) { | 73 | 'setElement': function(aValue) { |
77 | this._element = aValue; | 74 | this._element = aValue; |
78 | }, | 75 | }, |
79 | 76 | ||
80 | //----------------------------------------------------- | 77 | //----------------------------------------------------- |
81 | 78 | ||
82 | 'remove': function() { | 79 | 'remove': function() { |
83 | //MochiKit.Logging.logDebug(">>> BaseComponent.remove"); | 80 | //MochiKit.Logging.logDebug(">>> BaseComponent.remove"); |
84 | Clipperz.NotificationCenter.unregister(this); | 81 | Clipperz.NotificationCenter.unregister(this); |
85 | MochiKit.Signal.disconnectAllTo(this); | 82 | MochiKit.Signal.disconnectAllTo(this); |
86 | //MochiKit.Logging.logDebug("<<< BaseComponent.remove"); | 83 | //MochiKit.Logging.logDebug("<<< BaseComponent.remove"); |
87 | }, | 84 | }, |
88 | 85 | ||
89 | //------------------------------------------------------------------------- | 86 | //------------------------------------------------------------------------- |
90 | 87 | ||
91 | 'getId': function(aValue) { | 88 | 'getId': function(aValue) { |
92 | varresult; | 89 | varresult; |
93 | 90 | ||
94 | result = this._ids[aValue]; | 91 | result = this._ids[aValue]; |
95 | 92 | ||
96 | if (typeof(result) == 'undefined') { | 93 | if (typeof(result) == 'undefined') { |
97 | _Clipperz_PM_Components_Panels_base_id_ ++; | 94 | _Clipperz_PM_Components_Panels_base_id_ ++; |
98 | 95 | ||
99 | result = "Clipperz_PM_Components_Panels_" + aValue + "_" + _Clipperz_PM_Components_Panels_base_id_; | 96 | result = "Clipperz_PM_Components_Panels_" + aValue + "_" + _Clipperz_PM_Components_Panels_base_id_; |
100 | this._ids[aValue] = result; | 97 | this._ids[aValue] = result; |
101 | //MochiKit.Logging.logDebug(">>> getId(" + aValue + ") = " + result); | 98 | //MochiKit.Logging.logDebug(">>> getId(" + aValue + ") = " + result); |
102 | } else { | 99 | } else { |
103 | //MochiKit.Logging.logDebug("<<< getId(" + aValue + ") = " + result); | 100 | //MochiKit.Logging.logDebug("<<< getId(" + aValue + ") = " + result); |
104 | } | 101 | } |
105 | 102 | ||
106 | return result; | 103 | return result; |
107 | }, | 104 | }, |
108 | 105 | ||
109 | 'getDom': function(aValue) { | 106 | 'getDom': function(aValue) { |
110 | return YAHOO.util.Dom.get(this.getId(aValue)); | 107 | return YAHOO.util.Dom.get(this.getId(aValue)); |
111 | }, | 108 | }, |
112 | 109 | ||
113 | 'getElement': function(aValue) { | 110 | 'getElement': function(aValue) { |
114 | return YAHOO.ext.Element.get(this.getId(aValue)); | 111 | return YAHOO.ext.Element.get(this.getId(aValue)); |
115 | }, | 112 | }, |
116 | 113 | ||
117 | 'getActor': function(aValue, anAnimator) { | 114 | 'getActor': function(aValue, anAnimator) { |
118 | return new YAHOO.ext.Actor(this.getDom(aValue), anAnimator); | 115 | return new YAHOO.ext.Actor(this.getDom(aValue), anAnimator); |
119 | }, | 116 | }, |
120 | 117 | ||