[BUGFIX] Fix save of Template with t3editor installed 79/43179/4
authorWouter Wolters <typo3@wouterwolters.nl>
Thu, 10 Sep 2015 19:50:17 +0000 (21:50 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 11 Sep 2015 09:41:16 +0000 (11:41 +0200)
The save button's type had been removed from the button,
which caused the click event not being triggered anymore.
This changes the check to use the button name instead.

Resolves: #69622
Releases: master
Change-Id: I0974032a184a1db421bf8f2a2691ac5dd6473d97
Reviewed-on: http://review.typo3.org/43179
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/t3editor/Resources/Public/JavaScript/T3editor.js

index 51ed20f..7e1a5ba 100644 (file)
@@ -67,7 +67,7 @@ define('TYPO3/CMS/T3editor/T3editor', ['jquery'], function ($) {
         * Initializes editor events
         */
        T3editor.initializeEditorEvents = function(codemirror) {
-               $('input[type="submit"], button[type="submit"]').on('click', function(e) {
+               $('button[name^="_save"]').on('click', function(e) {
                        codemirror.options.originalTextarea.val(codemirror.editor.getCode());
                });
 
@@ -226,4 +226,4 @@ define('TYPO3/CMS/T3editor/T3editor', ['jquery'], function ($) {
 
        TYPO3.T3editor = T3editor;
        return T3editor;
-});
\ No newline at end of file
+});