diff --git a/resources/assets/js/forms.js b/resources/assets/js/forms.js index ef81abbb..9f307d19 100644 --- a/resources/assets/js/forms.js +++ b/resources/assets/js/forms.js @@ -1,4 +1,5 @@ const moment = require('moment'); +require('select2') /** * Sets all checkboxes to the wanted state @@ -171,6 +172,15 @@ $(function () { }); }); +/** + * Enable select2 + */ +$(function () { + $.fn.select2.defaults.set('theme', 'bootstrap'); + + $('select').select2(); +}); + /** * Set the filter selects to latest state * diff --git a/resources/assets/themes/base.less b/resources/assets/themes/base.less index aac32b8f..43969962 100644 --- a/resources/assets/themes/base.less +++ b/resources/assets/themes/base.less @@ -1,5 +1,7 @@ @import "../../../node_modules/bootstrap/less/bootstrap"; @import "../../../node_modules/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css"; +@import "../../../node_modules/select2/dist/css/select2.min.css"; +@import "../../../node_modules/select2-bootstrap-theme/src/select2-bootstrap.less"; @import "error"; body { @@ -141,6 +143,10 @@ table a > .icon-icon_angel { background-color: @panel-danger-heading-bg; } +.select2-dropdown { + background-color: @brand-primary; +} + .selection .checkbox { display: block; }