1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

initial static select2 fields

This commit is contained in:
John Anderson
2019-01-03 23:02:05 -05:00
parent 5285b6926f
commit 81a0889568
4 changed files with 27 additions and 3 deletions

View File

@ -81,9 +81,17 @@ $(document).ready(function() {
return rendered_url
}
// Static choice selection
$('.netbox-select2-static').select2({
allowClear: true,
placeholder: "---------",
})
// API backed single selection
// Includes live search and chained fields
$('.netbox-select2-api').select2({
allowClear: true,
placeholder: "---------",
ajax: {
delay: 500,
url: function(params) {