Fixes
This commit is contained in:
@@ -5,9 +5,7 @@
|
||||
])
|
||||
|
||||
@section('content')
|
||||
|
||||
{{ Form::open(['route' => 'Admin.Botanic.Species.store', 'id' => 'form', 'autocomplete' => 'off', 'files' => true]) }}
|
||||
@include('Admin.Botanic.Species.form')
|
||||
</form>
|
||||
|
||||
@endsection
|
||||
|
||||
@@ -5,10 +5,8 @@
|
||||
])
|
||||
|
||||
@section('content')
|
||||
|
||||
{{ Form::open(['route' => 'Admin.Botanic.Species.store', 'id' => 'form', 'autocomplete' => 'off', 'files' => true]) }}
|
||||
<input type="hidden" name="id" value="{{ $specie['id'] }}">
|
||||
<input type="hidden" name="id" id="id" value="{{ $specie['id'] }}">
|
||||
@include('Admin.Botanic.Species.form')
|
||||
</form>
|
||||
|
||||
@endsection
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
@include('boilerplate::load.fileinput')
|
||||
@include('boilerplate::load.select2')
|
||||
@include('boilerplate::load.tinymce')
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-8">
|
||||
<div class="row mb-3">
|
||||
@@ -43,7 +39,7 @@
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
@include('components.uploader.widget', ['load_url' => route('Admin.Botanic.Species.getImages', ['id' => $specie['id'] ?? false]), 'delete_url' => route('Admin.Botanic.Species.deleteImage'), 'name' => 'images'])
|
||||
@include('components.uploader.widget', ['load_url' => ($specie['id'] ?? false) ? route('Admin.Botanic.Species.getImages', ['id' => $specie['id']]) : null, 'delete_url' => route('Admin.Botanic.Species.deleteImage'), 'name' => 'images'])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -53,9 +49,7 @@
|
||||
@include('load.form.editor')
|
||||
@include('load.form.save')
|
||||
@include('load.form.select2')
|
||||
|
||||
@include('load.form.upload.fileinput')
|
||||
@include('boilerplate::load.tinymce')
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</button>
|
||||
@if ($can_edit ?? true)
|
||||
<button type="button" class="btn btn-xs btn-outline-danger">
|
||||
<i class="fas fa-trash" data-index="{{ $key }}"></i>
|
||||
<i class="fas fa-trash" data-index="{{ $key }}" data-id="{{ $image['id'] }}"></i>
|
||||
</button>
|
||||
@endif
|
||||
</figcaption>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
@endcomponent
|
||||
|
||||
@include('boilerplate::load.fileinput')
|
||||
@include('load.form.upload.fileinput')
|
||||
|
||||
@if ($no_popup ?? true)
|
||||
@push('js')
|
||||
@@ -52,9 +52,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
@if ($load_url)
|
||||
$(function() {
|
||||
{{ $prefix ?? '' }}loadImages();
|
||||
});
|
||||
@endif
|
||||
</script>
|
||||
|
||||
@if ($no_popup ?? true)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@if(!defined('LOAD_SELECT2'))
|
||||
@push('scripts')
|
||||
<script src="/assets/plugins/select2/js/select2.full.min.js"></script>
|
||||
<script src="/assets/plugins/select2/js/i18n/" . App::getLocale() . ".js"></script>
|
||||
<script src="/assets/plugins/select2/js/i18n/{{ App::getLocale() }}.js"></script>
|
||||
|
||||
<script>
|
||||
function initSelect2(sel) {
|
||||
@@ -14,9 +14,15 @@
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('select2:open', () => {
|
||||
document.querySelector('.select2-search__field').focus();
|
||||
});
|
||||
$(document).on('select2:open',(e) => {
|
||||
let t = $(e.target);
|
||||
console.log(t);
|
||||
if (t && t.length) {
|
||||
let id = t[0].id || t[0].name;
|
||||
let item = document.querySelector(`input[aria-controls*='${id}']`);
|
||||
return item ? item.focus() : false;
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
Reference in New Issue
Block a user