mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 00:24:40 +00:00
(ui) select highest visible option in hook_ipv4v6
This commit is contained in:
parent
63e8e6fe3e
commit
ebe341ec2f
@ -45,12 +45,15 @@ function hook_ipv4v6(classname, data_id) {
|
||||
} else {
|
||||
$(this).removeClass('hidden');
|
||||
}
|
||||
}).promise().done(function(){
|
||||
// when select list uses selectpicker, refresh
|
||||
if ($("#"+selectlist_id).hasClass('selectpicker')) {
|
||||
$("#"+selectlist_id).selectpicker('refresh');
|
||||
}
|
||||
});
|
||||
// select highest visible option
|
||||
if (parseInt($("#"+selectlist_id).val()) > 32 && itemValue.indexOf(":") == -1) {
|
||||
$("#"+selectlist_id+' option[value=32]').attr('selected','selected');
|
||||
}
|
||||
// when select list uses selectpicker, refresh
|
||||
if ($("#"+selectlist_id).hasClass('selectpicker')) {
|
||||
$("#"+selectlist_id).selectpicker('refresh');
|
||||
}
|
||||
});
|
||||
}
|
||||
// trigger initial onChange event
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user