core: getJSFiles -> getJSPlugins

- 각각 js를 불러오기보다.. 초기화 함수를 직접 호출
- lazy loading은 어차피 나중에 새로 만들거니까 안 함.
This commit is contained in:
2021-08-30 01:14:20 +09:00
parent a6ff951c98
commit 3bd09a1aa4
30 changed files with 94 additions and 85 deletions
+5 -11
View File
@@ -1,12 +1,9 @@
import { reloadWorldMap } from "./map";
import { unwrap_any } from "./util/unwrap_any";
/*import $ from 'jquery';
import 'select2';*///TODO: processing
export function loadPlugin(): void {
export function defaultSelectCityByMap(): void {
const $target = $("#destCityID");
console.log('target', $target);
console.log('city', $target);
void reloadWorldMap({
isDetailMap: false,
clickableAll: true,
@@ -14,15 +11,12 @@ export function loadPlugin(): void {
useCachedMap: true,
selectCallback: function (city) {
const currVal = unwrap_any<string>($target.val());
$target.val(city.id).trigger("change");
$target.val(city.id);
$target.trigger("change");
if ($target.val() === null) {
$target.val(currVal).trigger("change");
$target.val(currVal).trigger("change").blur();
}
return false;
}
});
}
$(function () {
loadPlugin();
});