Fixed bug #17268: t3editor dont save the deactivated state in fileadmin/fileedit
authorTobias Liebig <mail@etobi.de>
Mon, 24 Jan 2011 21:20:14 +0000 (21:20 +0000)
committerTobias Liebig <mail@etobi.de>
Mon, 24 Jan 2011 21:20:14 +0000 (21:20 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@10285 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/t3editor/classes/class.tx_t3editor.php
typo3/sysext/t3editor/ext_emconf.php
typo3/sysext/t3editor/res/jslib/t3editor.js

index 332d4a4..9474f0e 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,6 +16,7 @@
 
        * Fixed bug #17078: in fileadmin saving changes from t3editor doesn't work
        * Fixed bug #17270: t3editor not enabled when editing .php/.inc files
+       * Fixed bug #17268: t3editor dont save the "deactivated" state in fileadmin/fileedit
 
 2011-01-24  Francois Suter  <francois.suter@typo3.org>
 
index cbaea3a..0329efb 100644 (file)
@@ -132,31 +132,11 @@ class tx_t3editor implements t3lib_Singleton {
         * @return      void
         */
        public function __construct() {
-               $this->checkEditorIsDisabled();
-
                        // disable pmktextarea to avoid conflicts (thanks Peter Klein for this suggestion)
                $GLOBALS["BE_USER"]->uc['disablePMKTextarea'] = 1;
        }
 
        /**
-        * check if the t3editor should be disabled (by a POST value)
-        */
-       protected function checkEditorIsDisabled() {
-               $editorIsDisabled = t3lib_div::_POST('t3editor_disableEditor');
-
-               if (!empty($editorIsDisabled)) {
-                       $editorIsDisabled = ($editorIsDisabled == 'true');
-               } else {
-                       $editorIsDisabled = $GLOBALS['BE_USER']->uc['disableT3Editor'];
-               }
-
-               if ($GLOBALS['BE_USER']->uc['disableT3Editor'] != $editorIsDisabled) {
-                       $GLOBALS['BE_USER']->uc['disableT3Editor'] = $editorIsDisabled;
-                       $GLOBALS['BE_USER']->writeUC();
-               }
-       }
-
-       /**
         * Retrieves JavaScript code (header part) for editor
         *
         * @param       template        $doc
index f5ffc2c..9b00add 100755 (executable)
@@ -3,7 +3,7 @@
 ########################################################################
 # Extension Manager/Repository config file for ext "t3editor".
 #
-# Auto generated 24-01-2011 15:41
+# Auto generated 24-01-2011 22:18
 #
 # Manual updates:
 # Only the data in the array - everything else is removed by next
@@ -34,7 +34,7 @@ $EM_CONF[$_EXTKEY] = array(
        'CGLcompliance' => '',
        'CGLcompliance_note' => '',
        'version' => '1.5.0',
-       '_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:"e87e";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";}',
+       '_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:"6573";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:"e87e";s:21:"res/jslib/t3editor.js";s:4:"079a";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',
index 4ed088a..8dc1c2d 100644 (file)
@@ -280,6 +280,13 @@ T3editor.toggleEditor = function(checkbox, index) {
                && !Prototype.Browser.WebKit) {
 
                if (index == undefined) {
+                       if (top.TYPO3.BackendUserSettings) {
+                               top.TYPO3.BackendUserSettings.ExtDirect.set(
+                                       'disableT3Editor',
+                                       checkbox.checked,
+                                       function(response) {}
+                               );
+                       }
                        $$('textarea.t3editor').each(
                                function(textarea, i) {
                                        T3editor.toggleEditor(checkbox, i);