[BUGFIX] Use correct getter for FormEngine input name in Slider 36/43636/2
authorWouter Wolters <typo3@wouterwolters.nl>
Tue, 29 Sep 2015 21:52:06 +0000 (23:52 +0200)
committerAndreas Fernandez <typo3@scripting-base.de>
Wed, 30 Sep 2015 14:30:19 +0000 (16:30 +0200)
Slider still fetches on name in JavaScript instead of the new
data attribute.

Resolves: #70195
Releases: master
Change-Id: I0c205e547c33f3fe3c3c8a4df1bbb44ae154be56
Reviewed-on: http://review.typo3.org/43636
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
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 8a770bf..9964359 100644 (file)
@@ -44,7 +44,7 @@ define('TYPO3/CMS/Backend/ValueSlider', ['jquery', 'twbs/bootstrap-slider'], fun
         */
        ValueSlider.updateValue = function(e) {
                var $slider = $(e.currentTarget),
-                       $foreignField = $('[name="' + $slider.data('sliderItemName') + '"]'),
+                       $foreignField = $('[data-formengine-input-name="' + $slider.data('sliderItemName') + '"]'),
                        elementType = $slider.data('sliderElementType'),
                        sliderField = $slider.data('sliderField'),
                        sliderCallback = $slider.data('sliderCallback');
@@ -78,7 +78,7 @@ define('TYPO3/CMS/Backend/ValueSlider', ['jquery', 'twbs/bootstrap-slider'], fun
                        data = $slider.data();
                switch (data.sliderValueType) {
                        case 'array':
-                               var $foreignField = $('[name="' + data.sliderItemName + '"]');
+                               var $foreignField = $('[data-formengine-input-name="' + data.sliderItemName + '"]');
                                renderedValue = $foreignField.find('option').eq(value).text();
                                break;
                        case 'double':