From 0a24a31444a92105877eb688e780e4d7a7cc7cb0 Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Thu, 19 Dec 2013 22:27:03 +0100 Subject: [PATCH] Fixed issue #8478: Numerical sliders don't use the configured decimal separator --- scripts/numeric-slider.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/numeric-slider.js b/scripts/numeric-slider.js index 05a3655a718..606d2603ba8 100644 --- a/scripts/numeric-slider.js +++ b/scripts/numeric-slider.js @@ -58,12 +58,13 @@ function doNumericSlider(qID,jsonOptions) { slide: function( event, ui ) { $(thisinput).val(ui.value); $(thisinput).triggerHandler("keyup"); - $('#slider-callout-'+myfname).text(jsonOptions.slider_prefix + ui.value + jsonOptions.slider_suffix); + displayvalue=''+ui.value; + $('#slider-callout-'+myfname).text(jsonOptions.slider_prefix + displayvalue.replace(/\./,LSvar.sLEMradix) + jsonOptions.slider_suffix); } }); // Update the value of the input if Slider start is set if(!havevalue && startvalue && jsonOptions.slider_displaycallout){ - $("#slider-callout-"+myfname).text(jsonOptions.slider_prefix + startvalue + jsonOptions.slider_suffix); + $("#slider-callout-"+myfname).text(jsonOptions.slider_prefix + startvalue.replace(/\./,LSvar.sLEMradix) + jsonOptions.slider_suffix); $(thisinput).val(startvalue); $(function() { $(thisinput).triggerHandler("keyup"); // Needed for EM @@ -77,7 +78,8 @@ function doNumericSlider(qID,jsonOptions) { $( "#container-"+myfname ).slider( "option", "value", jsonOptions.slider_startvalue ); } if(jsonOptions.slider_displaycallout && jsonOptions.slider_startvalue!="NULL"){ - $('#slider-callout-'+myfname).text(jsonOptions.slider_prefix + jsonOptions.slider_startvalue + jsonOptions.slider_suffix); + + $('#slider-callout-'+myfname).text(jsonOptions.slider_prefix + jsonOptions.slider_startvalue.replace(/\./,LSvar.sLEMradix) + jsonOptions.slider_suffix); $(thisinput).val(jsonOptions.slider_startvalue); }else{ $('#slider-callout-'+myfname).text("");