Commit ebe341ec authored by Ad Schellevis's avatar Ad Schellevis

(ui) select highest visible option in hook_ipv4v6

parent 63e8e6fe
......@@ -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
......
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 to comment