Change select2 to 4.0.13 and fix autofocus. Other minor cosmetic fix

This commit is contained in:
Deon George 2021-10-19 22:38:52 +11:00
parent 30fd916646
commit 3adf7c73b6
5 changed files with 20 additions and 7 deletions

View File

@ -15,7 +15,9 @@ class PacketInfo extends Command
*
* @var string
*/
protected $signature = 'packet:info {pkt : Packet to process} {zone? : Zone the packet is from}';
protected $signature = 'packet:info'
.' {pkt : Packet to process}'
.' {zone? : Zone the packet is from}';
/**
* The console command description.

View File

@ -0,0 +1,8 @@
$(document).on('select2:open',(event) => {
const searchField = document.querySelector(
`.select2-search__field[aria-controls="select2-${event.target.getAttribute('data-select2-id')}-results"]`,
);
if (searchField) {
searchField.focus();
}
});

View File

@ -198,10 +198,11 @@ use App\Models\Setup;
@endsection
@section('page-css')
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css">
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/css/select2.min.css">
@append
@section('page-scripts')
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/js/select2.min.js"></script>
<script type="text/javascript" src="{{ asset('/plugin/select2/fix-autofocus.js') }}"></script>
<script type="text/javascript">
$(document).ready(function() {

View File

@ -112,10 +112,11 @@ Move Address
@endsection
@section('page-css')
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css">
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/css/select2.min.css">
@append
@section('page-scripts')
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/js/select2.min.js"></script>
<script type="text/javascript" src="{{ asset('/plugin/select2/fix-autofocus.js') }}"></script>
<script type="text/javascript">
$(document).ready(function() {

View File

@ -178,10 +178,11 @@
@endsection
@section('page-css')
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css">
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/css/select2.min.css">
@append
@section('page-scripts')
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/js/select2.min.js"></script>
<script type="text/javascript" src="{{ asset('/plugin/select2/fix-autofocus.js') }}"></script>
<script type="text/javascript">
$(document).ready(function() {