mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
Max input slider (#197)
This commit is contained in:
parent
359df1a0a9
commit
a94e9d0a03
@ -54,7 +54,7 @@ define(function(require) {
|
||||
tick_val += opts.tick_size;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sliderId += 1;
|
||||
return TemplateHTML(opts);
|
||||
}
|
||||
@ -62,7 +62,10 @@ define(function(require) {
|
||||
function _initialSetup() {
|
||||
$(document).off("input", "input.uinput-slider-val");
|
||||
$(document).on("input", "input.uinput-slider-val", function(){
|
||||
var max = $("input[type=number]", $(this).closest('.uinput-slider-container')).attr('max');
|
||||
$("input[type=range]", $(this).closest('.uinput-slider-container')).val( this.value );
|
||||
if(this.value > max)
|
||||
$("input[type=number]", $(this).closest('.uinput-slider-container')).val(max);
|
||||
});
|
||||
|
||||
$(document).off("input", "input.uinput-slider");
|
||||
|
Loading…
x
Reference in New Issue
Block a user