demarches-normaliennes/app/javascript/new_design/select2.js
2019-08-13 17:03:55 +01:00

23 lines
534 B
JavaScript

import $ from 'jquery';
import 'select2';
addEventListener('ds:page:update', () => {
$('select.select2').select2({
language: 'fr',
width: '100%'
});
$('.columns-form select.select2-limited').select2({
language: 'fr',
placeholder: 'Sélectionnez des colonnes',
maximumSelectionLength: '5',
width: '300px'
});
$('.recipients-form select.select2-limited').select2({
language: 'fr',
placeholder: 'Sélectionnez des instructeurs',
maximumSelectionLength: '30',
width: '300px'
});
});