[BUGFIX] Let FormEngine Slider wizard save data again 45/45145/2
authorBenni Mack <benni@typo3.org>
Sat, 5 Dec 2015 14:45:59 +0000 (15:45 +0100)
committerAndreas Fernandez <typo3@scripting-base.de>
Sun, 6 Dec 2015 12:02:34 +0000 (13:02 +0100)
Due to a change in FormEngine slider rewrite, the parameters
do not get handed over to the TBE_EDITOR update signal,
thus any changes on the slider do not reflect the actual field
that is sent to the server again.

Using apply() correctly as well as a document.ready()
statement makes this functionality work again.

Resolves: #71977
Releases: master
Change-Id: Ib033015d0c3869da487e9163ceca303bd1b436c8
Reviewed-on: https://review.typo3.org/45145
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/backend/Resources/Public/JavaScript/ValueSlider.js

index fde9b99..9eaf405 100644 (file)
@@ -59,7 +59,7 @@ define(['jquery', 'twbs/bootstrap-slider'], function($) {
                                break;
                }
 
-               TBE_EDITOR.fieldChanged.apply(sliderCallbackParams);
+               TBE_EDITOR.fieldChanged.apply(TBE_EDITOR, sliderCallbackParams);
        };
 
        /**
@@ -88,7 +88,7 @@ define(['jquery', 'twbs/bootstrap-slider'], function($) {
        };
 
        // init if document is ready
-       $(function() {
+       $(document).ready(function() {
                ValueSlider.initializeSlider();
        });