Index: t3lib/class.t3lib_tceforms.php
===================================================================
--- t3lib/class.t3lib_tceforms.php (revision 5906)
+++ t3lib/class.t3lib_tceforms.php (working copy)
@@ -5246,9 +5246,21 @@
$GLOBALS['SOBE']->doc->loadPrototype();
$GLOBALS['SOBE']->doc->loadExtJS();
- $GLOBALS['SOBE']->doc->addStyleSheet('ext.resizable', $this->backPath . '../t3lib/js/extjs/ux/resize.css');
+
+ // make textareas resizable and flexible
+ if (!($GLOBALS['BE_USER']->uc['rezizeTextareas'] == '0' && $GLOBALS['BE_USER']->uc['rezizeTextareas_Flexible'] == '0')) {
+ $GLOBALS['SOBE']->doc->addStyleSheet('ext.resizable', $this->backPath . '../t3lib/js/extjs/ux/resize.css');
+ $this->loadJavascriptLib('../t3lib/js/extjs/ux/ext.resizable.js');
+ }
+ $resizableSettings = array(
+ 'textareaMaxHeight' => $GLOBALS['BE_USER']->uc['rezizeTextareas_MaxHeight'] >0 ? $GLOBALS['BE_USER']->uc['rezizeTextareas_MaxHeight'] : '600',
+ 'textareaFlexible' => (!$GLOBALS['BE_USER']->uc['rezizeTextareas_Flexible'] == '0'),
+ 'textareaResize' => (!$GLOBALS['BE_USER']->uc['rezizeTextareas'] == '0'),
+ );
+ $GLOBALS['SOBE']->doc->addInlineSettingArray('', $resizableSettings);
+
$this->loadJavascriptLib('../t3lib/jsfunc.evalfield.js');
- $this->loadJavascriptLib('../t3lib/js/extjs/ux/ext.resizable.js');
+
// @TODO: Change to loadJavascriptLib(), but fix "TS = new typoScript()" issue first - see bug #9494
$jsFile[] = '';
@@ -5258,10 +5270,10 @@
'dateFormat' => array('j-n-Y', 'G:i j-n-Y'),
'dateFormatUS' => array('n-j-Y', 'G:i n-j-Y'),
);
- $out .= '
- Ext.ns("TYPO3");
- TYPO3.settings = ' . json_encode($typo3Settings) . ';';
+ $GLOBALS['SOBE']->doc->addInlineSettingArray('', $typo3Settings);
+
+
$this->loadJavascriptLib('../t3lib/js/extjs/tceforms.js');
// if IRRE fields were processed, add the JavaScript functions:
Index: t3lib/js/extjs/tceforms.js
===================================================================
--- t3lib/js/extjs/tceforms.js (revision 5906)
+++ t3lib/js/extjs/tceforms.js (working copy)
@@ -75,15 +75,21 @@
convertTextareasResizable: function() {
var textAreas = Ext.select("*[id^=tceforms-textarea-]");
textAreas.each(function(element) {
- element.addClass('resizable');
- var elasticTextarea = new Ext.ux.elasticTextArea().applyTo(element.dom.id, {
- minHeight: 50
- });
- var dwrapped = new Ext.Resizable(element.dom.id, {
- minWidth: 300,
- minHeight: 50,
- dynamic: true
- });
+ if (TYPO3.settings.textareaFlexible) {
+ var elasticTextarea = new Ext.ux.elasticTextArea().applyTo(element.dom.id, {
+ minHeight: 50,
+ maxHeight: TYPO3.settings.textareaMaxHeight
+ });
+ }
+ if (TYPO3.settings.textareaResize) {
+ element.addClass('resizable');
+ var dwrapped = new Ext.Resizable(element.dom.id, {
+ minWidth: 300,
+ minHeight: 50,
+ maxHeight: TYPO3.settings.textareaMaxHeight,
+ dynamic: true
+ });
+ }
});
}
Index: typo3/sysext/setup/ext_tables.php
===================================================================
--- typo3/sysext/setup/ext_tables.php (revision 5906)
+++ typo3/sysext/setup/ext_tables.php (working copy)
@@ -138,11 +138,27 @@
'type' => 'check',
'label' => 'LLL:EXT:setup/mod/locallang.xml:enableFlashUploader',
'csh' => 'enableFlashUploader',
- )
+ ),
+ 'rezizeTextareas' => array(
+ 'type' => 'check',
+ 'label' => 'LLL:EXT:setup/mod/locallang.xml:rezizeTextareas',
+ 'csh' => 'rezizeTextareas',
+ ),
+ 'rezizeTextareas_MaxHeight' => array(
+ 'type' => 'text',
+ 'label' => 'LLL:EXT:setup/mod/locallang.xml:rezizeTextareas_MaxHeight',
+ 'csh' => 'rezizeTextareas_MaxHeight',
+ 'default' => 600,
+ ),
+ 'rezizeTextareas_Flexible' => array(
+ 'type' => 'check',
+ 'label' => 'LLL:EXT:setup/mod/locallang.xml:rezizeTextareas_Flexible',
+ 'csh' => 'rezizeTextareas_Flexible',
+ ),
),
'showitem' => '--div--;LLL:EXT:setup/mod/locallang.xml:personal_data,realName,email,emailMeAtLogin,password,password2,lang,
--div--;LLL:EXT:setup/mod/locallang.xml:opening,condensedMode,noMenuMode,startModule,thumbnailsByDefault,helpText,edit_showFieldHelp,titleLen,
- --div--;LLL:EXT:setup/mod/locallang.xml:editFunctionsTab,edit_RTE,edit_wideDocument,edit_docModuleUpload,enableFlashUploader,disableCMlayers,copyLevels,recursiveDelete,
+ --div--;LLL:EXT:setup/mod/locallang.xml:editFunctionsTab,edit_RTE,edit_wideDocument,edit_docModuleUpload,enableFlashUploader,rezizeTextareas,rezizeTextareas_MaxHeight,rezizeTextareas_Flexible,disableCMlayers,copyLevels,recursiveDelete,
--div--;LLL:EXT:setup/mod/locallang.xml:adminFunctions,simulate'
);
Index: typo3/sysext/setup/locallang_csh_mod.xml
===================================================================
--- typo3/sysext/setup/locallang_csh_mod.xml (revision 5906)
+++ typo3/sysext/setup/locallang_csh_mod.xml (working copy)
@@ -73,6 +73,12 @@
+
+
+
+
+
+