working ticket
This commit is contained in:
@@ -107,24 +107,19 @@
|
||||
});
|
||||
}
|
||||
|
||||
function bootHelpdeskSelects() {
|
||||
loadStyle('https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css');
|
||||
|
||||
const bootSelect2 = function () {
|
||||
if (window.jQuery && window.jQuery.fn && window.jQuery.fn.select2) {
|
||||
function bootHelpdeskSelects()
|
||||
{
|
||||
const initialise = () => {
|
||||
if (window.jQuery?.fn?.select2) {
|
||||
initialiseHelpdeskSelects();
|
||||
return;
|
||||
}
|
||||
|
||||
loadScript('https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js', initialiseHelpdeskSelects);
|
||||
};
|
||||
|
||||
if (window.jQuery) {
|
||||
bootSelect2();
|
||||
return;
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', initialise);
|
||||
} else {
|
||||
initialise();
|
||||
}
|
||||
|
||||
loadScript('https://code.jquery.com/jquery-3.7.1.min.js', bootSelect2);
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', bootHelpdeskSelects);
|
||||
|
||||
Reference in New Issue
Block a user