5f71dd27f553ee3de77db88ceb226fdd3b31a8eb
1 /***************************************************************
4 * (c) 2010 Workspaces Team (http://forge.typo3.org/projects/show/typo3v4-workspaces)
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.
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.
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.
24 * This copyright notice MUST APPEAR in all copies of the script!
25 ***************************************************************/
27 Ext
.onReady(function() {
28 var iconClsChecked
= 't3-icon t3-icon-status t3-icon-status-status t3-icon-status-checked';
29 var iconClsEmpty
= 't3-icon t3-icon-empty t3-icon-empty-empty t3-icon-empty';
30 var viewport
= new Ext
.Viewport({
34 region
: 'center', // a center region is ALWAYS required for border layout
38 ptype
: 'Ext.ux.plugins.TabStripContainer',
50 id
: 'sizeSliderButtonLive',
52 text
: TYPO3
.LLL
.Workspaces
.livePreview
,
53 tooltip
: TYPO3
.LLL
.Workspaces
.livePreviewDetail
,
58 Ext
.getCmp('sizeSlider').setValue(0);
74 fn
: function resizeFromValue(slider
, newValue
, thumb
) {
75 var height
= Ext
.getCmp('wsPanel').getHeight();
76 Ext
.getCmp('liveContainer').setHeight(height
* (100 - newValue
) / 100);
77 //Ext.getCmp('visualPanel').setHeight(height);
84 id
: 'sizeSliderButtonWorkspace',
86 text
: TYPO3
.LLL
.Workspaces
.workspacePreview
,
87 tooltip
: TYPO3
.LLL
.Workspaces
.workspacePreviewDetail
,
92 Ext
.getCmp('sizeSlider').setValue(100);
101 id
: 'visual-mode-toolbar',
103 iconCls
: 'x-btn-icon t3-icon t3-icon-actions t3-icon-actions-system t3-icon-system-options-view',
104 id
: 'visual-mode-options',
106 id
: 'visual-mode-selector',
108 text
: TYPO3
.LLL
.Workspaces
.modeSlider
,
109 id
: 'visual-mode-selector-slider',
110 iconCls
: iconClsChecked
,
112 Ext
.getCmp('visualPanel-hbox').hide();
113 Ext
.getCmp('visualPanel-vbox').hide();
114 Ext
.getCmp('visualPanel').show();
115 Ext
.getCmp('slider').show();
116 Ext
.select('#visual-mode-selector ul li a img.t3-icon-status-checked').removeClass(iconClsChecked
.split(" "))
117 Ext
.getCmp('visual-mode-selector-slider').setIconClass(iconClsChecked
);
118 Ext
.getCmp('visual-mode-selector-hbox').setIconClass(iconClsEmpty
);
119 Ext
.getCmp('visual-mode-selector-vbox').setIconClass(iconClsEmpty
);
122 text
: TYPO3
.LLL
.Workspaces
.modeVbox
,
123 id
: 'visual-mode-selector-vbox',
124 iconCls
: iconClsEmpty
,
125 handler: function() {
126 Ext
.getCmp('visualPanel-hbox').hide();
127 Ext
.getCmp('visualPanel-vbox').show();
128 Ext
.getCmp('visualPanel').hide();
129 Ext
.getCmp('slider').hide();
130 Ext
.select('#visual-mode-selector ul li a img.t3-icon-status-checked').removeClass(iconClsChecked
.split(" "))
131 Ext
.getCmp('visual-mode-selector-slider').setIconClass(iconClsEmpty
);
132 Ext
.getCmp('visual-mode-selector-vbox').setIconClass(iconClsChecked
)
133 Ext
.getCmp('visual-mode-selector-hbox').setIconClass(iconClsEmpty
);
136 text
: TYPO3
.LLL
.Workspaces
.modeHbox
,
137 id
: 'visual-mode-selector-hbox',
138 iconCls
: iconClsEmpty
,
140 Ext
.getCmp('visualPanel-hbox').show();
141 Ext
.getCmp('visualPanel-vbox').hide();
142 Ext
.getCmp('visualPanel').hide();
143 Ext
.getCmp('slider').hide();
144 Ext
.select('#visual-mode-selector ul li a img.t3-icon-status-checked').removeClass(iconClsChecked
.split(" "))
145 Ext
.getCmp('visual-mode-selector-slider').setIconClass(iconClsEmpty
);
146 Ext
.getCmp('visual-mode-selector-vbox').setIconClass(iconClsEmpty
);
147 Ext
.getCmp('visual-mode-selector-hbox').setIconClass(iconClsChecked
);
155 title
: TYPO3
.LLL
.Workspaces
.visualPreview
,
178 xtype
: 'iframePanel',
190 bodyStyle
: 'height:0px;border-bottom: 2px solid red;',
193 xtype
: 'iframePanel',
211 id
: 'visualPanel-hbox',
213 xtype
: 'iframePanel',
221 xtype
: 'iframePanel',
223 id
: 'livePanel-hbox',
238 id
: 'visualPanel-vbox',
240 xtype
: 'iframePanel',
248 xtype
: 'iframePanel',
250 id
: 'livePanel-vbox',
259 title
: TYPO3
.LLL
.Workspaces
.listView
,
263 xtype
: 'iframePanel',