working ticket
This commit is contained in:
@@ -1,130 +1,130 @@
|
|||||||
@once
|
{{--@once--}}
|
||||||
<style>
|
{{-- <style>--}}
|
||||||
.select2-container { width: 100% !important; }
|
{{-- .select2-container { width: 100% !important; }--}}
|
||||||
.select2-container--default .select2-selection--single,
|
{{-- .select2-container--default .select2-selection--single,--}}
|
||||||
.select2-container--default .select2-selection--multiple {
|
{{-- .select2-container--default .select2-selection--multiple {--}}
|
||||||
min-height: 2.75rem;
|
{{-- min-height: 2.75rem;--}}
|
||||||
border-radius: 0.75rem;
|
{{-- border-radius: 0.75rem;--}}
|
||||||
border-color: rgb(63 63 70);
|
{{-- border-color: rgb(63 63 70);--}}
|
||||||
background: rgb(9 9 11);
|
{{-- background: rgb(9 9 11);--}}
|
||||||
color: rgb(244 244 245);
|
{{-- color: rgb(244 244 245);--}}
|
||||||
display: flex;
|
{{-- display: flex;--}}
|
||||||
align-items: center;
|
{{-- align-items: center;--}}
|
||||||
}
|
{{-- }--}}
|
||||||
.select2-container--default .select2-selection--multiple {
|
{{-- .select2-container--default .select2-selection--multiple {--}}
|
||||||
align-items: flex-start;
|
{{-- align-items: flex-start;--}}
|
||||||
padding: 0.25rem 0.5rem;
|
{{-- padding: 0.25rem 0.5rem;--}}
|
||||||
}
|
{{-- }--}}
|
||||||
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
{{-- .select2-container--default .select2-selection--multiple .select2-selection__choice {--}}
|
||||||
border-color: rgb(59 130 246);
|
{{-- border-color: rgb(59 130 246);--}}
|
||||||
background: rgb(30 64 175);
|
{{-- background: rgb(30 64 175);--}}
|
||||||
color: rgb(255 255 255);
|
{{-- color: rgb(255 255 255);--}}
|
||||||
border-radius: 9999px;
|
{{-- border-radius: 9999px;--}}
|
||||||
padding: 0.15rem 0.5rem;
|
{{-- padding: 0.15rem 0.5rem;--}}
|
||||||
}
|
{{-- }--}}
|
||||||
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
|
{{-- .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {--}}
|
||||||
color: rgb(255 255 255);
|
{{-- color: rgb(255 255 255);--}}
|
||||||
margin-right: 0.35rem;
|
{{-- margin-right: 0.35rem;--}}
|
||||||
}
|
{{-- }--}}
|
||||||
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
{{-- .select2-container--default .select2-selection--single .select2-selection__rendered {--}}
|
||||||
color: rgb(244 244 245);
|
{{-- color: rgb(244 244 245);--}}
|
||||||
line-height: 2.75rem;
|
{{-- line-height: 2.75rem;--}}
|
||||||
padding-left: 0.85rem;
|
{{-- padding-left: 0.85rem;--}}
|
||||||
}
|
{{-- }--}}
|
||||||
.select2-container--default .select2-selection--single .select2-selection__arrow {
|
{{-- .select2-container--default .select2-selection--single .select2-selection__arrow {--}}
|
||||||
height: 2.75rem;
|
{{-- height: 2.75rem;--}}
|
||||||
}
|
{{-- }--}}
|
||||||
.select2-dropdown {
|
{{-- .select2-dropdown {--}}
|
||||||
border-color: rgb(63 63 70);
|
{{-- border-color: rgb(63 63 70);--}}
|
||||||
background: rgb(24 24 27);
|
{{-- background: rgb(24 24 27);--}}
|
||||||
color: rgb(244 244 245);
|
{{-- color: rgb(244 244 245);--}}
|
||||||
}
|
{{-- }--}}
|
||||||
.select2-container--default .select2-results__option--highlighted[aria-selected] {
|
{{-- .select2-container--default .select2-results__option--highlighted[aria-selected] {--}}
|
||||||
background: rgb(37 99 235);
|
{{-- background: rgb(37 99 235);--}}
|
||||||
color: white;
|
{{-- color: white;--}}
|
||||||
}
|
{{-- }--}}
|
||||||
.select2-container--default .select2-results__option[aria-selected=true] {
|
{{-- .select2-container--default .select2-results__option[aria-selected=true] {--}}
|
||||||
background: rgb(39 39 42);
|
{{-- background: rgb(39 39 42);--}}
|
||||||
color: white;
|
{{-- color: white;--}}
|
||||||
}
|
{{-- }--}}
|
||||||
.select2-search__field {
|
{{-- .select2-search__field {--}}
|
||||||
background: rgb(9 9 11);
|
{{-- background: rgb(9 9 11);--}}
|
||||||
color: rgb(244 244 245);
|
{{-- color: rgb(244 244 245);--}}
|
||||||
border-color: rgb(63 63 70) !important;
|
{{-- border-color: rgb(63 63 70) !important;--}}
|
||||||
}
|
{{-- }--}}
|
||||||
</style>
|
{{-- </style>--}}
|
||||||
@endonce
|
{{--@endonce--}}
|
||||||
|
|
||||||
<script>
|
{{--<script>--}}
|
||||||
(function () {
|
{{-- (function () {--}}
|
||||||
function loadScript(src, callback) {
|
{{-- function loadScript(src, callback) {--}}
|
||||||
const existing = document.querySelector('script[src="' + src + '"]');
|
{{-- const existing = document.querySelector('script[src="' + src + '"]');--}}
|
||||||
if (existing) {
|
{{-- if (existing) {--}}
|
||||||
existing.addEventListener('load', callback, { once: true });
|
{{-- existing.addEventListener('load', callback, { once: true });--}}
|
||||||
if (existing.dataset.loaded === '1') callback();
|
{{-- if (existing.dataset.loaded === '1') callback();--}}
|
||||||
return;
|
{{-- return;--}}
|
||||||
}
|
{{-- }--}}
|
||||||
|
|
||||||
const script = document.createElement('script');
|
{{-- const script = document.createElement('script');--}}
|
||||||
script.src = src;
|
{{-- script.src = src;--}}
|
||||||
script.onload = function () {
|
{{-- script.onload = function () {--}}
|
||||||
script.dataset.loaded = '1';
|
{{-- script.dataset.loaded = '1';--}}
|
||||||
callback();
|
{{-- callback();--}}
|
||||||
};
|
{{-- };--}}
|
||||||
document.head.appendChild(script);
|
{{-- document.head.appendChild(script);--}}
|
||||||
}
|
{{-- }--}}
|
||||||
|
|
||||||
function loadStyle(href) {
|
{{-- function loadStyle(href) {--}}
|
||||||
if (document.querySelector('link[href="' + href + '"]')) return;
|
{{-- if (document.querySelector('link[href="' + href + '"]')) return;--}}
|
||||||
const link = document.createElement('link');
|
{{-- const link = document.createElement('link');--}}
|
||||||
link.rel = 'stylesheet';
|
{{-- link.rel = 'stylesheet';--}}
|
||||||
link.href = href;
|
{{-- link.href = href;--}}
|
||||||
document.head.appendChild(link);
|
{{-- document.head.appendChild(link);--}}
|
||||||
}
|
{{-- }--}}
|
||||||
|
|
||||||
function initialiseHelpdeskSelects() {
|
{{-- function initialiseHelpdeskSelects() {--}}
|
||||||
if (!window.jQuery || !window.jQuery.fn || !window.jQuery.fn.select2) return;
|
{{-- if (!window.jQuery || !window.jQuery.fn || !window.jQuery.fn.select2) return;--}}
|
||||||
|
|
||||||
window.jQuery('[data-helpdesk-select2]').each(function () {
|
{{-- window.jQuery('[data-helpdesk-select2]').each(function () {--}}
|
||||||
const select = window.jQuery(this);
|
{{-- const select = window.jQuery(this);--}}
|
||||||
|
|
||||||
if (select.data('select2')) {
|
{{-- if (select.data('select2')) {--}}
|
||||||
select.select2('destroy');
|
{{-- select.select2('destroy');--}}
|
||||||
}
|
{{-- }--}}
|
||||||
|
|
||||||
const isMultiple = this.hasAttribute('multiple');
|
{{-- const isMultiple = this.hasAttribute('multiple');--}}
|
||||||
|
|
||||||
select.select2({
|
{{-- select.select2({--}}
|
||||||
width: '100%',
|
{{-- width: '100%',--}}
|
||||||
placeholder: this.querySelector('option[value=""]')?.textContent || (isMultiple ? 'Select options' : 'Select option'),
|
{{-- placeholder: this.querySelector('option[value=""]')?.textContent || (isMultiple ? 'Select options' : 'Select option'),--}}
|
||||||
allowClear: !isMultiple
|
{{-- allowClear: !isMultiple--}}
|
||||||
});
|
{{-- });--}}
|
||||||
|
|
||||||
select.off('change.helpdesk').on('change.helpdesk', function () {
|
{{-- select.off('change.helpdesk').on('change.helpdesk', function () {--}}
|
||||||
this.dispatchEvent(new Event('change', { bubbles: true }));
|
{{-- this.dispatchEvent(new Event('change', { bubbles: true }));--}}
|
||||||
this.dispatchEvent(new Event('input', { bubbles: true }));
|
{{-- this.dispatchEvent(new Event('input', { bubbles: true }));--}}
|
||||||
});
|
{{-- });--}}
|
||||||
});
|
{{-- });--}}
|
||||||
}
|
{{-- }--}}
|
||||||
|
|
||||||
function bootHelpdeskSelects()
|
{{-- function bootHelpdeskSelects()--}}
|
||||||
{
|
{{-- {--}}
|
||||||
const initialise = () => {
|
{{-- const initialise = () => {--}}
|
||||||
if (window.jQuery?.fn?.select2) {
|
{{-- if (window.jQuery?.fn?.select2) {--}}
|
||||||
initialiseHelpdeskSelects();
|
{{-- initialiseHelpdeskSelects();--}}
|
||||||
}
|
{{-- }--}}
|
||||||
};
|
{{-- };--}}
|
||||||
|
|
||||||
if (document.readyState === 'loading') {
|
{{-- if (document.readyState === 'loading') {--}}
|
||||||
document.addEventListener('DOMContentLoaded', initialise);
|
{{-- document.addEventListener('DOMContentLoaded', initialise);--}}
|
||||||
} else {
|
{{-- } else {--}}
|
||||||
initialise();
|
{{-- initialise();--}}
|
||||||
}
|
{{-- }--}}
|
||||||
}
|
{{-- }--}}
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', bootHelpdeskSelects);
|
{{-- document.addEventListener('DOMContentLoaded', bootHelpdeskSelects);--}}
|
||||||
document.addEventListener('livewire:navigated', bootHelpdeskSelects);
|
{{-- document.addEventListener('livewire:navigated', bootHelpdeskSelects);--}}
|
||||||
document.addEventListener('livewire:updated', bootHelpdeskSelects);
|
{{-- document.addEventListener('livewire:updated', bootHelpdeskSelects);--}}
|
||||||
bootHelpdeskSelects();
|
{{-- bootHelpdeskSelects();--}}
|
||||||
})();
|
{{-- })();--}}
|
||||||
</script>
|
{{--</script>--}}
|
||||||
|
|||||||
Reference in New Issue
Block a user