mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-21 04:12:37 +09:00
Max input slider (#196)
This commit is contained in:
1 parent
ac2a920831
commit
4d59bebbe5
1 file changed
+4
-1
@@ -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");
|
||||
|
||||
Reference in new issue
Block a user