Commit b7d1af0c authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(ui) select highest visible option in hook_ipv4v6

(cherry picked from commit ebe341ec)
parent a7988481
...@@ -45,12 +45,15 @@ function hook_ipv4v6(classname, data_id) { ...@@ -45,12 +45,15 @@ function hook_ipv4v6(classname, data_id) {
} else { } else {
$(this).removeClass('hidden'); $(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 // 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