Moved applyChosen() function from \skins\classic\includes\functions.php
Also moved the call to applyChosen() after loading the documentpull/3910/head
parent
9068a5be85
commit
200815e2c3
|
@ -373,6 +373,8 @@ if ( currentView != 'none' && currentView != 'login' ) {
|
|||
.done(optionhelpModal)
|
||||
.fail(logAjaxFail);
|
||||
});
|
||||
|
||||
applyChosen();
|
||||
});
|
||||
|
||||
// After retieving modal html via Ajax, this will insert it into the DOM
|
||||
|
@ -1100,6 +1102,15 @@ function isMobile() {
|
|||
return result;
|
||||
}
|
||||
|
||||
function applyChosen() {
|
||||
const limit_search_threshold = 10;
|
||||
|
||||
$j('.chosen').chosen('destroy');
|
||||
$j('.chosen').not('.chosen-full-width, .chosen-auto-width').chosen({disable_search_threshold: limit_search_threshold});
|
||||
$j('.chosen.chosen-full-width').chosen({disable_search_threshold: limit_search_threshold, width: "100%"});
|
||||
$j('.chosen.chosen-auto-width').chosen({disable_search_threshold: limit_search_threshold, width: "auto"});
|
||||
}
|
||||
|
||||
const font = new FontFaceObserver('Material Icons', {weight: 400});
|
||||
font.load().then(function() {
|
||||
$j('.material-icons').css('display', 'inline-block');
|
||||
|
|
Loading…
Reference in New Issue