Fixed bug #8049: Save button don't work when deactivating t3editor
authorDmitry Dulepov <dmitry.dulepov@gmail.com>
Tue, 20 May 2008 11:41:40 +0000 (11:41 +0000)
committerDmitry Dulepov <dmitry.dulepov@gmail.com>
Tue, 20 May 2008 11:41:40 +0000 (11:41 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3672 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/t3editor/jslib/t3editor.js

index e9eca1f..f223226 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2008-05-20  Dmitry Dulepov  <dmitry@typo3.org>
 
-       * Fixed bug #8263 t3editor should not highlight decimals (thanks to Tobias Liebig)
+       * Fixed bug #8263: t3editor should not highlight decimals (thanks to Tobias Liebig)
+       * Fixed bug #8049: Save button don't work when deactivating t3editor (thanks to Tobias Liebig)
 
 2008-05-20  Ingo Renner  <ingo@typo3.org>
 
index f77c43c..1f391c8 100755 (executable)
@@ -357,18 +357,18 @@ T3editor.prototype = {
                                this.textarea.value = this.mirror.editor.getCode();
                                this.outerdiv.hide();
                                this.textarea.show();
-                               /* this.saveButtons.each(function(button) {
-                                       Event.stopObserving(button, 'click', this.saveAjaxEvent);
+                               this.saveButtons.each(function(button) {
+                                       Event.stopObserving(button,'click',this.saveFunctionEvent);
                                }.bind(this));
-                               */
+                               
                        } else {
                                this.mirror.editor.importCode(this.textarea.value);
                                this.textarea.hide();
                                this.outerdiv.show();
-                               /* this.saveButtons.each(function(button) {
-                                       Event.observe(button, 'click', this.saveAjaxEvent);
+                               this.saveButtons.each(function(button) {
+                                       this.saveFunctionEvent = this.saveFunction.bind(this);
+                                       Event.observe(button,'click',this.saveFunctionEvent);
                                }.bind(this));
-                               */
                        }
                },
                
@@ -453,14 +453,14 @@ if (document.characterSet != "UTF-8") {
  */
 function t3editor_toggleEditor(checkbox, index) {
        if (!Prototype.Browser.MobileSafari
-               && !Prototype.Browser.IE
                && !Prototype.Browser.WebKit) {
                
                if (index == undefined) {
                        $$('textarea.t3editor').each(
-                       function(textarea, i) {
-                               t3editor_toggleEditor(checkbox, i);
-                       });
+                               function(textarea, i) {
+                                       t3editor_toggleEditor(checkbox, i);
+                               }
+                       );
                } else {
                        if (t3e_instances[index] != undefined) {
                                var t3e = t3e_instances[index];
@@ -477,7 +477,6 @@ function t3editor_toggleEditor(checkbox, index) {
 
 
 if (!Prototype.Browser.MobileSafari
-       // && !Prototype.Browser.IE
        && !Prototype.Browser.WebKit) {
        
        // everything ready: turn textarea's into fancy editors