Merge pull request #3816 from hSaria/3815-select2-width

Fixes #3815: Select2 width handling via theme
This commit is contained in:
Jeremy Stretch 2020-01-02 10:08:56 -05:00 committed by GitHub
commit 5d0ac02704
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,14 +103,16 @@ $(document).ready(function() {
placeholder: "---------", placeholder: "---------",
theme: "bootstrap", theme: "bootstrap",
templateResult: colorPickerClassCopy, templateResult: colorPickerClassCopy,
templateSelection: colorPickerClassCopy templateSelection: colorPickerClassCopy,
width: "off"
}); });
// Static choice selection // Static choice selection
$('.netbox-select2-static').select2({ $('.netbox-select2-static').select2({
allowClear: true, allowClear: true,
placeholder: "---------", placeholder: "---------",
theme: "bootstrap" theme: "bootstrap",
width: "off"
}); });
// API backed selection // API backed selection
@ -120,6 +122,7 @@ $(document).ready(function() {
allowClear: true, allowClear: true,
placeholder: "---------", placeholder: "---------",
theme: "bootstrap", theme: "bootstrap",
width: "off",
ajax: { ajax: {
delay: 500, delay: 500,
@ -299,7 +302,8 @@ $(document).ready(function() {
multiple: true, multiple: true,
allowClear: true, allowClear: true,
placeholder: "Tags", placeholder: "Tags",
theme: "bootstrap",
width: "off",
ajax: { ajax: {
delay: 250, delay: 250,
url: netbox_api_path + "extras/tags/", url: netbox_api_path + "extras/tags/",