Diffstat (limited to 'frontend/beta/js/Clipperz/YUI/IBLayoutManager.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/beta/js/Clipperz/YUI/IBLayoutManager.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/frontend/beta/js/Clipperz/YUI/IBLayoutManager.js b/frontend/beta/js/Clipperz/YUI/IBLayoutManager.js index 626b699..6e2138e 100644 --- a/frontend/beta/js/Clipperz/YUI/IBLayoutManager.js +++ b/frontend/beta/js/Clipperz/YUI/IBLayoutManager.js | |||
@@ -1,114 +1,111 @@ | |||
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.IBLayoutManager = function(container, config) { | 30 | Clipperz.YUI.IBLayoutManager = function(container, config) { |
34 | var regionName; | 31 | var regionName; |
35 | varelement; | 32 | varelement; |
36 | 33 | ||
37 | config = config || {}; | 34 | config = config || {}; |
38 | 35 | ||
39 | Clipperz.YUI.IBLayoutManager.superclass.constructor.call(this, container); | 36 | Clipperz.YUI.IBLayoutManager.superclass.constructor.call(this, container); |
40 | this.hideOnLayout = config.hideOnLayout || false; | 37 | this.hideOnLayout = config.hideOnLayout || false; |
41 | 38 | ||
42 | element = YAHOO.ext.Element.get(container); | 39 | element = YAHOO.ext.Element.get(container); |
43 | element.setStyle('position', 'absolute'); | 40 | element.setStyle('position', 'absolute'); |
44 | element.setStyle('overflow', 'hidden'); | 41 | element.setStyle('overflow', 'hidden'); |
45 | 42 | ||
46 | for (regionName in config.regions) { | 43 | for (regionName in config.regions) { |
47 | var newRegion; | 44 | var newRegion; |
48 | 45 | ||
49 | newRegion = new new Clipperz.YUI.IBLayoutRegion(this, regionName, config.regions[regionName]); | 46 | newRegion = new new Clipperz.YUI.IBLayoutRegion(this, regionName, config.regions[regionName]); |
50 | this.addRegion(regionName, newRegion); | 47 | this.addRegion(regionName, newRegion); |
51 | } | 48 | } |
52 | 49 | ||
53 | this.layout(); | 50 | this.layout(); |
54 | }; | 51 | }; |
55 | 52 | ||
56 | YAHOO.extendX(Clipperz.YUI.IBLayoutManager, YAHOO.ext.LayoutManager, { | 53 | YAHOO.extendX(Clipperz.YUI.IBLayoutManager, YAHOO.ext.LayoutManager, { |
57 | 54 | ||
58 | 'toString': function() { | 55 | 'toString': function() { |
59 | return "IBLayoutManager (" + this.el.id + ")"; | 56 | return "IBLayoutManager (" + this.el.id + ")"; |
60 | }, | 57 | }, |
61 | 58 | ||
62 | //----------------------------------------------------- | 59 | //----------------------------------------------------- |
63 | 60 | ||
64 | 'add': function(aName, aPanel) { | 61 | 'add': function(aName, aPanel) { |
65 | var regionName; | 62 | var regionName; |
66 | 63 | ||
67 | regionName = aName.toLowerCase(); | 64 | regionName = aName.toLowerCase(); |
68 | return this.regions[regionName].add(aPanel); | 65 | return this.regions[regionName].add(aPanel); |
69 | }, | 66 | }, |
70 | 67 | ||
71 | //----------------------------------------------------- | 68 | //----------------------------------------------------- |
72 | 69 | ||
73 | 'addRegion': function(aRegion) { | 70 | 'addRegion': function(aRegion) { |
74 | var regionName; | 71 | var regionName; |
75 | 72 | ||
76 | regionName = aRegion.name().toLowerCase(); | 73 | regionName = aRegion.name().toLowerCase(); |
77 | if (!this.regions[regionName]) { | 74 | if (!this.regions[regionName]) { |
78 | //MochiKit.Logging.logDebug("--- adding region with name: " + aRegion.name()); | 75 | //MochiKit.Logging.logDebug("--- adding region with name: " + aRegion.name()); |
79 | this.regions[regionName] = aRegion; | 76 | this.regions[regionName] = aRegion; |
80 | } else { | 77 | } else { |
81 | // ???? | 78 | // ???? |
82 | } | 79 | } |
83 | 80 | ||
84 | return aRegion; | 81 | return aRegion; |
85 | }, | 82 | }, |
86 | 83 | ||
87 | //----------------------------------------------------- | 84 | //----------------------------------------------------- |
88 | 85 | ||
89 | 'getRegion': function(target){ | 86 | 'getRegion': function(target){ |
90 | return this.regions[target.toLowerCase()]; | 87 | return this.regions[target.toLowerCase()]; |
91 | }, | 88 | }, |
92 | 89 | ||
93 | //----------------------------------------------------- | 90 | //----------------------------------------------------- |
94 | 91 | ||
95 | 'layout': function(){ | 92 | 'layout': function(){ |
96 | varregion; | 93 | varregion; |
97 | 94 | ||
98 | //MochiKit.Logging.logDebug(">>> IBLayoutManager.layout - regions: " + Clipperz.Base.serializeJSON(MochiKit.Base.keys(this.regions))); | 95 | //MochiKit.Logging.logDebug(">>> IBLayoutManager.layout - regions: " + Clipperz.Base.serializeJSON(MochiKit.Base.keys(this.regions))); |
99 | for (region in this.regions) { | 96 | for (region in this.regions) { |
100 | //MochiKit.Logging.logDebug("--- IBLayoutManager.layout - region: " + region); | 97 | //MochiKit.Logging.logDebug("--- IBLayoutManager.layout - region: " + region); |
101 | this.regions[region].layout(); | 98 | this.regions[region].layout(); |
102 | } | 99 | } |
103 | //MochiKit.Logging.logDebug("<<< IBLayoutManager.layout"); | 100 | //MochiKit.Logging.logDebug("<<< IBLayoutManager.layout"); |
104 | }, | 101 | }, |
105 | 102 | ||
106 | //----------------------------------------------------- | 103 | //----------------------------------------------------- |
107 | 104 | ||
108 | 'getSize': function() { | 105 | 'getSize': function() { |
109 | return this.el.getSize(); | 106 | return this.el.getSize(); |
110 | }, | 107 | }, |
111 | 108 | ||
112 | //----------------------------------------------------- | 109 | //----------------------------------------------------- |
113 | __syntaxFix__: '__syntaxFix__' | 110 | __syntaxFix__: '__syntaxFix__' |
114 | }); | 111 | }); |