Also preload Spectrum lang file

This commit is contained in:
Kijin Sung 2022-10-30 17:16:56 +09:00
parent 7493fe14fc
commit 2b7255be7d
3 changed files with 6 additions and 5 deletions

View file

@ -1,3 +1,4 @@
spectrum.css
spectrum.js
rx_spectrum.js
i18n/jquery.spectrum-{$lang_type}.js
rx_spectrum.js

View file

@ -8,8 +8,8 @@ jQuery(function($){
}
// 컬러 피커가 내장된 브라우저에서는 내장된 컬러피커 이용
if ( $("input.rx-spectrum").prop('type') != 'color' ) {
$.getScript(request_uri + "common/js/plugins/spectrum/i18n/jquery.spectrum-"+ xe.current_lang.replace("jp", "ja").toLowerCase() +".js", function() {
if ($('input.rx-spectrum').prop('type') !== 'color') {
(function() {
var settings = {
showInput: true,
allowEmpty:true,
@ -44,6 +44,6 @@ jQuery(function($){
]
}
$('input.rx-spectrum').rx_spectrum(settings);
});
})();
}
});
});