fixes
This commit is contained in:
@@ -1,23 +1,27 @@
|
||||
@if(!defined('LOAD_SELECT2'))
|
||||
@push('scripts')
|
||||
<script src="{{ asset('/assets/plugins/select2/js/select2.full.min.js') }}"></script>
|
||||
<script src="{{ asset('/assets/plugins/select2/js/i18n/' . App::getLocale() .'.js') }}"></script>
|
||||
<script src="/assets/plugins/select2/js/select2.full.min.js"></script>
|
||||
<script src="/assets/plugins/select2/js/i18n/" . App::getLocale() . ".js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
function initSelect2() {
|
||||
$(".select2").select2({
|
||||
function initSelect2(sel) {
|
||||
var selector = (typeof(sel) == 'undefined') ? '.select2' : sel;
|
||||
$(selector).select2({
|
||||
placeholder: "{{ __('select_a_value') }}",
|
||||
allowClear: false,
|
||||
width: {
|
||||
value: '100%'
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('select2:open', () => {
|
||||
document.querySelector('.select2-search__field').focus();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
@push('css')
|
||||
<link rel="stylesheet" href="{!! asset('/assets/plugins/select2/css/select2.min.css') !!}">
|
||||
<link rel="stylesheet" href="/assets/plugins/select2/css/select2.min.css">
|
||||
@endpush
|
||||
@php(define('LOAD_SELECT2', true))
|
||||
@endif
|
||||
Reference in New Issue
Block a user