Index: typo3/sysext/t3editor/res/jslib/fileedit.js =================================================================== --- typo3/sysext/t3editor/res/jslib/fileedit.js (revision 0) +++ typo3/sysext/t3editor/res/jslib/fileedit.js (revision 0) @@ -0,0 +1,27 @@ +Ext.onReady(function() { + Ext.select('.t3-icon-document-save, .t3-icon-document-save-close').each(function(element) { + var link = element.up('a'); + if (link) { + link.dom.setAttribute( + 'onclick', + link.dom.getAttribute('onclick').replace('document.editform.submit();', '') + ); + link.on('click', function(event, target) { + event.stopEvent(); + if (Ext.get(target).hasClass('t3-icon-document-save')) { + if (!T3editor.instances[0].disabled) { + T3editor.instances[0].saveFunctionEvent(); + } else { + document.editform.submit(); + } + } else { + if (!T3editor.instances[0].disabled) { + T3editor.instances[0].updateTextareaEvent(); + } + document.editform.submit(); + } + return false; + }); + } + }); +}); Index: typo3/sysext/t3editor/res/jslib/t3editor.js =================================================================== --- typo3/sysext/t3editor/res/jslib/t3editor.js (revision 10275) +++ typo3/sysext/t3editor/res/jslib/t3editor.js (working copy) @@ -95,6 +95,7 @@ saveButtons: null, updateTextareaEvent: null, adjustWidth: -30, + disabled: false, init: function() { var textareaDim = $(this.textarea).getDimensions(); @@ -189,6 +190,7 @@ // toggle between the textarea and t3editor toggleView: function(disable) { $(this.outerdiv).fire('t3editor:toggleView', {t3editor: this, disable: disable}); + this.disabled = disable; if (disable) { this.textarea.value = this.mirror.editor.getCode(); this.outerdiv.hide(); Index: typo3/sysext/t3editor/classes/class.tx_t3editor_hooks_fileedit.php =================================================================== --- typo3/sysext/t3editor/classes/class.tx_t3editor_hooks_fileedit.php (revision 10275) +++ typo3/sysext/t3editor/classes/class.tx_t3editor_hooks_fileedit.php (working copy) @@ -86,6 +86,7 @@ return; } $pObj->JScode .= $t3editor->getJavascriptCode($pObj); + $pObj->loadJavascriptLib(t3lib_extmgm::extRelPath('t3editor') . 'res/jslib/fileedit.js'); } } Index: typo3/sysext/t3editor/ext_emconf.php =================================================================== --- typo3/sysext/t3editor/ext_emconf.php (revision 10275) +++ typo3/sysext/t3editor/ext_emconf.php (working copy) @@ -3,7 +3,7 @@ ######################################################################## # Extension Manager/Repository config file for ext "t3editor". # -# Auto generated 22-01-2011 20:11 +# Auto generated 24-01-2011 09:47 # # Manual updates: # Only the data in the array - everything else is removed by next @@ -34,7 +34,7 @@ 'CGLcompliance' => '', 'CGLcompliance_note' => '', 'version' => '1.5.0', - '_md5_values_when_last_written' => 'a:28:{s:7:"LICENSE";s:4:"c17d";s:12:"ext_icon.gif";s:4:"7eb5";s:17:"ext_localconf.php";s:4:"3b52";s:14:"ext_tables.php";s:4:"7dff";s:13:"locallang.xml";s:4:"fa0e";s:29:"classes/class.tx_t3editor.php";s:4:"509a";s:44:"classes/class.tx_t3editor_hooks_fileedit.php";s:4:"bcae";s:50:"classes/class.tx_t3editor_hooks_tstemplateinfo.php";s:4:"2d87";s:62:"classes/ts_codecompletion/class.tx_t3editor_codecompletion.php";s:4:"baa9";s:59:"classes/ts_codecompletion/class.tx_t3editor_tsrefloader.php";s:4:"94f6";s:23:"icons/loader_eeeeee.gif";s:4:"83a4";s:21:"res/css/csscolors.css";s:4:"3845";s:20:"res/css/jscolors.css";s:4:"e5a0";s:24:"res/css/sparqlcolors.css";s:4:"40ba";s:20:"res/css/t3editor.css";s:4:"454d";s:26:"res/css/t3editor_inner.css";s:4:"7b52";s:28:"res/css/typoscriptcolors.css";s:4:"e060";s:21:"res/css/xmlcolors.css";s:4:"847a";s:21:"res/jslib/t3editor.js";s:4:"765d";s:45:"res/jslib/parse_typoscript/parsetyposcript.js";s:4:"c8af";s:48:"res/jslib/parse_typoscript/tokenizetyposcript.js";s:4:"dce5";s:47:"res/jslib/ts_codecompletion/completionresult.js";s:4:"ba5f";s:48:"res/jslib/ts_codecompletion/descriptionPlugin.js";s:4:"87a5";s:47:"res/jslib/ts_codecompletion/tscodecompletion.js";s:4:"8140";s:39:"res/jslib/ts_codecompletion/tsparser.js";s:4:"ab5c";s:36:"res/jslib/ts_codecompletion/tsref.js";s:4:"969e";s:27:"res/templates/t3editor.html";s:4:"4133";s:19:"res/tsref/tsref.xml";s:4:"9f7b";}', + '_md5_values_when_last_written' => 'a:29:{s:7:"LICENSE";s:4:"c17d";s:12:"ext_icon.gif";s:4:"7eb5";s:17:"ext_localconf.php";s:4:"3b52";s:14:"ext_tables.php";s:4:"7dff";s:13:"locallang.xml";s:4:"fa0e";s:29:"classes/class.tx_t3editor.php";s:4:"509a";s:44:"classes/class.tx_t3editor_hooks_fileedit.php";s:4:"ab8c";s:50:"classes/class.tx_t3editor_hooks_tstemplateinfo.php";s:4:"2d87";s:62:"classes/ts_codecompletion/class.tx_t3editor_codecompletion.php";s:4:"baa9";s:59:"classes/ts_codecompletion/class.tx_t3editor_tsrefloader.php";s:4:"94f6";s:23:"icons/loader_eeeeee.gif";s:4:"83a4";s:21:"res/css/csscolors.css";s:4:"3845";s:20:"res/css/jscolors.css";s:4:"e5a0";s:24:"res/css/sparqlcolors.css";s:4:"40ba";s:20:"res/css/t3editor.css";s:4:"454d";s:26:"res/css/t3editor_inner.css";s:4:"7b52";s:28:"res/css/typoscriptcolors.css";s:4:"e060";s:21:"res/css/xmlcolors.css";s:4:"847a";s:21:"res/jslib/fileedit.js";s:4:"cde1";s:21:"res/jslib/t3editor.js";s:4:"d87b";s:45:"res/jslib/parse_typoscript/parsetyposcript.js";s:4:"c8af";s:48:"res/jslib/parse_typoscript/tokenizetyposcript.js";s:4:"dce5";s:47:"res/jslib/ts_codecompletion/completionresult.js";s:4:"ba5f";s:48:"res/jslib/ts_codecompletion/descriptionPlugin.js";s:4:"87a5";s:47:"res/jslib/ts_codecompletion/tscodecompletion.js";s:4:"8140";s:39:"res/jslib/ts_codecompletion/tsparser.js";s:4:"ab5c";s:36:"res/jslib/ts_codecompletion/tsref.js";s:4:"969e";s:27:"res/templates/t3editor.html";s:4:"4133";s:19:"res/tsref/tsref.xml";s:4:"9f7b";}', 'constraints' => array( 'depends' => array( 'php' => '5.1.0-0.0.0',