c3b9d9c29bbd9aa8b52623663599dcd43d5e9309
[Packages/TYPO3.CMS.git] / typo3 / js / extjs / viewportConfiguration.js
1 /***************************************************************
2 * Copyright notice
3 *
4 * (c) 2010-2011 Stefan Galinski <stefan.galinski@gmail.com>
5 * All rights reserved
6 *
7 * This script is part of the TYPO3 project. The TYPO3 project is
8 * free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * The GNU General Public License can be found at
14 * http://www.gnu.org/copyleft/gpl.html.
15 * A copy is found in the textfile GPL.txt and important notices to the license
16 * from the author is found in LICENSE.txt distributed with these scripts.
17 *
18 *
19 * This script is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * This copyright notice MUST APPEAR in all copies of the script!
25 ***************************************************************/
26
27 Ext.ns('TYPO3');
28 Ext.ns('TYPO3.Viewport.Panels');
29
30 /**
31 * The Cards Configuration for the BE Module Cards
32 *
33 *
34 * @author Kay Strobach <typo3@kay-strobach.de>
35 */
36
37 TYPO3.Viewport.ContentCards = {
38 /**
39 * Add a card to either the config or if already rendered to the wrapper
40 */
41 addContentCard: function(name,config) {
42 config.id='typo3-card-'+name;
43 if (Ext.ready) {
44 Ext.getCmp('typo3-contentContainerWrapper').add(config);
45 } else {
46 this.cards.push(config);
47 }
48 },
49 cards:[
50 {
51 id: 'typo3-contentContainer',
52 border: false,
53 xtype: 'iframePanel',
54 name: 'content'
55 }
56 /**
57 * New items need to be appended here
58 * cards id needs to be prepended with typo3-card- the rest of the id is the
59 * be module name as passed it is normally in TYPO3
60 *
61 * Example for the EM:
62 *
63 *{
64 * xtype: 'iframePanel',
65 * src: 'mod.php?M=tools_em',
66 * id: 'typo3-card-tools_em'
67 *}
68 *
69 */
70 ]
71 };
72
73 /**
74 * The backend viewport configuration
75 *
76 * @author Stefan Galinski <stefan.galinski@gmail.com>
77 * @author Kay Strobach <typo3@kay-strobach.de>
78 */
79
80
81 TYPO3.Viewport.configuration = {
82 layout: 'border',
83 id: 'typo3-viewport',
84 renderTo: Ext.getBody(),
85 border: false,
86 items: [
87 {
88 layout: 'absolute',
89 region: 'north',
90 id: 'typo3-topbar',
91 height: 42,
92 contentEl: 'typo3-top-container',
93 border: false
94 },
95 {
96 layout: 'fit',
97 region: 'west',
98 id: 'typo3-module-menu',
99 floatable: true,
100 hideCollapseTool: true,
101 split: true,
102 useSplitTips: true,
103 splitTip: top.TYPO3.LLL.viewPort.tooltipModuleMenuSplit,
104 enableChildSplit: true,
105 autoScroll: true
106 },
107 {
108 region: 'center',
109 layout: 'border',
110 border: false,
111 items: [
112 {
113 region: 'west',
114 layout: 'fit',
115 id: 'typo3-navigationContainer',
116 width: 300,
117 minWidth: 20,
118 floatable: true,
119 animCollapse: false,
120 split: true,
121 enableChildSplit: true,
122 collapsible: true,
123 collapseMode: 'mini',
124 useSplitTips: true,
125 collapsibleSplitTip: top.TYPO3.LLL.viewPort.tooltipNavigationContainerSplitDrag,
126 hideCollapseTool: true,
127 hidden: true,
128 border: false,
129 name: 'navigation',
130 autoScroll: true,
131 items: [
132 {
133 id: 'typo3-navigationIframe',
134 border: false,
135 hidden: true,
136 xtype: 'iframePanel',
137 name: 'navigation'
138 }
139 ]
140 },
141 {
142 region: 'center',
143 layout: 'border',
144 items: [
145 {
146 id: 'typo3-navigationDummy',
147 region: 'west',
148 layout: 'fit',
149 border: false,
150 hidden: true,
151 floatable: true,
152 xtype: 'iframePanel',
153 width: 5
154 },
155 {
156 id: 'typo3-contentContainerWrapper',
157 layout: 'card',
158 region: 'center',
159 activeItem: 0,
160 items: TYPO3.Viewport.ContentCards.cards
161 }
162 ]
163 },
164 {
165 region: 'south',
166 xtype: 'typo3DebugPanel',
167 collapsible: true,
168 collapseMode: 'mini',
169 collapsed: true,
170 hideCollapseTool: true,
171 animCollapse: false,
172 split: true,
173 useSplitTips: true,
174 collapsibleSplitTip: top.TYPO3.LLL.viewPort.tooltipDebugPanelSplitDrag,
175 autoScroll: true,
176 hidden: true,
177 height: 200,
178 id: 'typo3-debug-console',
179 border: false
180 }
181 ]
182 }
183 ]
184 };