Commit c44710dd by Kálmán Viktor

dashboard: don't change input values if they are wrong

parent e57d3c44
...@@ -457,11 +457,12 @@ function addSliderMiscs() { ...@@ -457,11 +457,12 @@ function addSliderMiscs() {
$(".cpu-count-slider").bind("slider:changed", function (event, data) { $(".cpu-count-slider").bind("slider:changed", function (event, data) {
var value = data.value + 0; var value = data.value + 0;
$(".cpu-count-input").val(value); $(".cpu-count-input").val(parseInt(value));
}); });
$(".cpu-count-input").bind("input", function() { $(".cpu-count-input").bind("input", function() {
var val = $(this).val(); var val = parseInt($(this).val());
if(!val) return;
$(".cpu-count-slider").simpleSlider("setValue", val); $(".cpu-count-slider").simpleSlider("setValue", val);
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment