[FOLLOWUP][!!!][TASK] Rewrite ValueSlider to AMD module 86/39586/2
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Sun, 17 May 2015 06:12:10 +0000 (08:12 +0200)
committerPhilipp Gampe <philipp.gampe@typo3.org>
Sun, 17 May 2015 10:13:29 +0000 (12:13 +0200)
The slider object bound to "renderTooltipValue" does not contain
the configuration set in the DOM by data attributes. Get the
element containing these attributes and us this instead.

Resolves: #66991
Releases: master
Change-Id: Ib8df38bc84cf9848b55995619d952b300dec0540
Reviewed-on: http://review.typo3.org/39586
Reviewed-by: Benjamin Kott <info@bk2k.info>
Tested-by: Benjamin Kott <info@bk2k.info>
Reviewed-by: Philipp Gampe <philipp.gampe@typo3.org>
Tested-by: Philipp Gampe <philipp.gampe@typo3.org>
typo3/sysext/backend/Resources/Public/JavaScript/ValueSlider.js

index a7068ee..8a770bf 100644 (file)
@@ -74,8 +74,8 @@ define('TYPO3/CMS/Backend/ValueSlider', ['jquery', 'twbs/bootstrap-slider'], fun
         */
        ValueSlider.renderTooltipValue = function(value) {
                var renderedValue,
-                       data = $(this).data();
-
+                       $slider = $('[data-slider-id="' + $(this).get(0).id + '"]'),
+                       data = $slider.data();
                switch (data.sliderValueType) {
                        case 'array':
                                var $foreignField = $('[name="' + data.sliderItemName + '"]');