Skip to content

Commit

Permalink
Fixed issue #8478: Numerical sliders don't use the configured decimal…
Browse files Browse the repository at this point in the history
… separator
  • Loading branch information
c-schmitz committed Dec 19, 2013
1 parent c830236 commit 0a24a31
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/numeric-slider.js
Expand Up @@ -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
Expand All @@ -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("");
Expand Down

0 comments on commit 0a24a31

Please sign in to comment.