Diffstat (limited to 'frontend/beta/js/Clipperz/YUI/IBLayoutRegion.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/beta/js/Clipperz/YUI/IBLayoutRegion.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/frontend/beta/js/Clipperz/YUI/IBLayoutRegion.js b/frontend/beta/js/Clipperz/YUI/IBLayoutRegion.js index 2fd4377..f8e0cb1 100644 --- a/frontend/beta/js/Clipperz/YUI/IBLayoutRegion.js +++ b/frontend/beta/js/Clipperz/YUI/IBLayoutRegion.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.YUI) == 'undefined') { Clipperz.YUI = {}; } | 27 | if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; } |
31 | 28 | ||
32 | 29 | ||
33 | Clipperz.YUI.IBLayoutRegion = function(aManager, aName, aConfig) { | 30 | Clipperz.YUI.IBLayoutRegion = function(aManager, aName, aConfig) { |
34 | this._configuration = aConfig; | 31 | this._configuration = aConfig; |
35 | 32 | ||
36 | //Clipperz.YUI.IBLayoutRegion.superclass.constructor.call(); | 33 | //Clipperz.YUI.IBLayoutRegion.superclass.constructor.call(); |
37 | Clipperz.YUI.IBLayoutRegion.superclass.constructor.call(this, aManager, aConfig, aName); | 34 | Clipperz.YUI.IBLayoutRegion.superclass.constructor.call(this, aManager, aConfig, aName); |
38 | }; | 35 | }; |
39 | 36 | ||
40 | YAHOO.extendX(Clipperz.YUI.IBLayoutRegion, YAHOO.ext.LayoutRegion, { | 37 | YAHOO.extendX(Clipperz.YUI.IBLayoutRegion, YAHOO.ext.LayoutRegion, { |
41 | 38 | ||
42 | 'toString': function() { | 39 | 'toString': function() { |
43 | return "IBLayoutRegion (" + this.name() + ")"; | 40 | return "IBLayoutRegion (" + this.name() + ")"; |
44 | }, | 41 | }, |
45 | 42 | ||
46 | //----------------------------------------------------- | 43 | //----------------------------------------------------- |
47 | 44 | ||
48 | 'name': function() { | 45 | 'name': function() { |
49 | return this.position; | 46 | return this.position; |
50 | }, | 47 | }, |
51 | 48 | ||
52 | //----------------------------------------------------- | 49 | //----------------------------------------------------- |
53 | 50 | ||
54 | 'manager': function() { | 51 | 'manager': function() { |
55 | return this.mgr; | 52 | return this.mgr; |
56 | }, | 53 | }, |
57 | 54 | ||
58 | 'configuration': function() { | 55 | 'configuration': function() { |
59 | return this._configuration; | 56 | return this._configuration; |
60 | }, | 57 | }, |
61 | 58 | ||
62 | //----------------------------------------------------- | 59 | //----------------------------------------------------- |
63 | 60 | ||
64 | 'getAttributeValue': function(anAttribute) { | 61 | 'getAttributeValue': function(anAttribute) { |
65 | var result; | 62 | var result; |
66 | 63 | ||
67 | switch(anAttribute) { | 64 | switch(anAttribute) { |
68 | case "top": | 65 | case "top": |
69 | result = this.element().getTop(); | 66 | result = this.element().getTop(); |
70 | break; | 67 | break; |
71 | case "left": | 68 | case "left": |
72 | result = this.element().getLeft(); | 69 | result = this.element().getLeft(); |
73 | break; | 70 | break; |
74 | case "bottom": | 71 | case "bottom": |
75 | result = this.element().getBottom(); | 72 | result = this.element().getBottom(); |
76 | break; | 73 | break; |
77 | case "right": | 74 | case "right": |
78 | result = this.element().getRight(); | 75 | result = this.element().getRight(); |
79 | break; | 76 | break; |
80 | case "height": | 77 | case "height": |
81 | result = this.element().getHeight(); | 78 | result = this.element().getHeight(); |
82 | break; | 79 | break; |
83 | case "width": | 80 | case "width": |
84 | result = this.element().getWidth(); | 81 | result = this.element().getWidth(); |
85 | break; | 82 | break; |
86 | } | 83 | } |
87 | //MochiKit.Logging.logDebug("--- " + this.name() + " [" + anAttribute + "] = " + result); | 84 | //MochiKit.Logging.logDebug("--- " + this.name() + " [" + anAttribute + "] = " + result); |
88 | 85 | ||
89 | return result; | 86 | return result; |
90 | }, | 87 | }, |
91 | 88 | ||
92 | //----------------------------------------------------- | 89 | //----------------------------------------------------- |
93 | 90 | ||
94 | 'normalizeConfigureValue': function(aConfigurationValue) { | 91 | 'normalizeConfigureValue': function(aConfigurationValue) { |
95 | var result; | 92 | var result; |
96 | 93 | ||
97 | //MochiKit.Logging.logDebug("--- normalizeConfigureValue - " + aConfigurationValue); | 94 | //MochiKit.Logging.logDebug("--- normalizeConfigureValue - " + aConfigurationValue); |
98 | if (typeof(aConfigurationValue) == 'number') { | 95 | if (typeof(aConfigurationValue) == 'number') { |
99 | result = aConfigurationValue; | 96 | result = aConfigurationValue; |
100 | } else if (aConfigurationValue == 'auto') { | 97 | } else if (aConfigurationValue == 'auto') { |
101 | result = aConfigurationValue; | 98 | result = aConfigurationValue; |
102 | } else { | 99 | } else { |
103 | var splitValues; | 100 | var splitValues; |
104 | var referenceValue; | 101 | var referenceValue; |
105 | var deltaValue; | 102 | var deltaValue; |
106 | var targetRegion; | 103 | var targetRegion; |
107 | var targetAttribute; | 104 | var targetAttribute; |
108 | 105 | ||
109 | splitValues = aConfigurationValue.split('+'); | 106 | splitValues = aConfigurationValue.split('+'); |
110 | referenceValue = Clipperz.Base.trim(splitValues[0]); | 107 | referenceValue = Clipperz.Base.trim(splitValues[0]); |
111 | deltaValue = Clipperz.Base.trim(splitValues[1] || ""); | 108 | deltaValue = Clipperz.Base.trim(splitValues[1] || ""); |
112 | 109 | ||
113 | splitValues = referenceValue.split('.'); | 110 | splitValues = referenceValue.split('.'); |
114 | targetRegion = splitValues[0]; | 111 | targetRegion = splitValues[0]; |
115 | targetAttribute = splitValues[1]; | 112 | targetAttribute = splitValues[1]; |
116 | 113 | ||
117 | //MochiKit.Logging.logDebug("> " + aConfigurationValue); | 114 | //MochiKit.Logging.logDebug("> " + aConfigurationValue); |
118 | //MochiKit.Logging.logDebug(">> manager: " + this.manager()); | 115 | //MochiKit.Logging.logDebug(">> manager: " + this.manager()); |
119 | //MochiKit.Logging.logDebug(">> targetRegion: " + targetRegion); | 116 | //MochiKit.Logging.logDebug(">> targetRegion: " + targetRegion); |
120 | //MochiKit.Logging.logDebug(">>> " + this.manager().getRegion(targetRegion)); | 117 | //MochiKit.Logging.logDebug(">>> " + this.manager().getRegion(targetRegion)); |