feat: centralize tomselect logic and script loading
This commit is contained in:
@@ -41,3 +41,4 @@
|
||||
@push('js')
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -45,3 +45,4 @@
|
||||
@push('js')
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -102,3 +102,4 @@
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
<script>console.log("TESTING SCRIPT RENDERING");</script>
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -45,3 +45,4 @@
|
||||
@push('js')
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -42,3 +42,4 @@
|
||||
@push('js')
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -53,3 +53,4 @@
|
||||
@push('js')
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -31,3 +31,4 @@
|
||||
@push('js')
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -46,3 +46,4 @@
|
||||
@push('js')
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -40,3 +40,4 @@
|
||||
@push('js')
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -1,19 +1,14 @@
|
||||
<script src="https://cdn.jsdelivr.net/npm/tom-select@2.4.3/dist/js/tom-select.complete.min.js"></script>
|
||||
@push('js')
|
||||
<link href="https://cdn.jsdelivr.net/npm/tom-select@2.4.3/dist/css/tom-select.bootstrap5.min.css" rel="stylesheet">
|
||||
<style>
|
||||
.ts-wrapper .ts-control, .ts-wrapper .ts-control input {
|
||||
background-color: #ffffff !important;
|
||||
border: 1px solid #ced4da !important;
|
||||
}
|
||||
.ts-dropdown {
|
||||
background-color: #ffffff !important;
|
||||
}
|
||||
.ts-wrapper .ts-control, .ts-wrapper .ts-control input { background-color: #ffffff !important; border: 1px solid #ced4da !important; }
|
||||
.ts-dropdown { background-color: #ffffff !important; }
|
||||
</style>
|
||||
<script src="https://cdn.jsdelivr.net/npm/tom-select@2.4.3/dist/js/tom-select.complete.min.js"></script>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
document.querySelectorAll('select').forEach((el) => {
|
||||
if (el.tomselect) return;
|
||||
|
||||
new TomSelect(el, {
|
||||
copyClassesToDropdown: false,
|
||||
dropdownParent: 'body',
|
||||
@@ -31,3 +26,4 @@
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
@@ -36,3 +36,4 @@
|
||||
@push('js')
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -43,3 +43,4 @@
|
||||
@push('js')
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -88,3 +88,4 @@
|
||||
@push('js')
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -47,3 +47,4 @@
|
||||
@push('js')
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -44,3 +44,4 @@
|
||||
@push('js')
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -36,3 +36,4 @@
|
||||
@push('js')
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -67,3 +67,4 @@
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -32,3 +32,4 @@
|
||||
@push('js')
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -73,3 +73,4 @@
|
||||
@push('js')
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -87,3 +87,4 @@
|
||||
@push('js')
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -40,3 +40,4 @@
|
||||
@push('js')
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -202,3 +202,4 @@
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -204,3 +204,4 @@
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -36,3 +36,4 @@
|
||||
@push('js')
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -53,3 +53,4 @@
|
||||
@push('js')
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -40,3 +40,4 @@
|
||||
@push('js')
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -116,3 +116,4 @@
|
||||
@push('js')
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -63,3 +63,4 @@
|
||||
@push('js')
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -42,3 +42,4 @@
|
||||
@push('js')
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -23,3 +23,4 @@
|
||||
@push('js')
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -130,3 +130,4 @@
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -40,3 +40,4 @@
|
||||
@push('js')
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -57,3 +57,4 @@
|
||||
@push('js')
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -54,3 +54,4 @@
|
||||
</script>
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -42,3 +42,4 @@
|
||||
@push('js')
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -36,3 +36,4 @@
|
||||
@push('js')
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
@@ -42,3 +42,4 @@
|
||||
@push('js')
|
||||
@include('components.tomselect')
|
||||
@endpush
|
||||
@include('components.tomselect')
|
||||
|
||||
Reference in New Issue
Block a user