Files
opensem/resources/views/vendor/boilerplate/load/select2.blade.php
Ludovic CANDELLIER f9070b2ec8 Upgrade boilerplate
2021-09-22 21:01:43 +02:00

10 lines
719 B
PHP

@once
@push('plugin-css')
<link rel="stylesheet" href="{!! mix('/plugins/select2/select2.min.css', '/assets/vendor/boilerplate') !!}">
@endpush
@push('js')
<script src="{!! mix('/plugins/select2/select2.full.min.js', '/assets/vendor/boilerplate') !!}"></script>
<script src="{!! mix('/plugins/select2/i18n/'.App::getLocale().'.js', '/assets/vendor/boilerplate') !!}"></script>
<script>$.extend(true,$.fn.select2.defaults,{language:'{{ App::getLocale()}}',direction:'@lang('boilerplate::layout.direction')'});$(document).on('select2:open',(e)=>{let t = $(e.target);if(t && t.length){let id=t[0].id||t[0].name;document.querySelector(`input[aria-controls*='${id}']`).focus();}});</script>
@endpush
@endonce