refactor: goodbye bootstrap4

This commit is contained in:
2021-12-11 02:50:24 +09:00
parent 37212c9392
commit e1897964e8
13 changed files with 328 additions and 494 deletions
+12 -3
View File
@@ -124,6 +124,8 @@ declare global {
}
}
let modalImport: Modal|undefined = undefined;
$(function ($) {
@@ -223,7 +225,10 @@ $(function ($) {
const $modal = $('#importModal');
$modal.data('target', $card);
new Modal($modal[0]).show();
if(!modalImport){
modalImport = new Modal($modal[0]);
}
modalImport.show();
});
$('.btn-general-save').on('click', function () {
@@ -960,7 +965,9 @@ $(function ($) {
const $card = $modal.data('target');
importGeneralInfo($card, data.general);
new Modal($modal[0]).hide();
if(modalImport){
modalImport.hide();
}
}, errUnknown);
@@ -1009,7 +1016,9 @@ $(function ($) {
}).then(function (data: BasicGeneralListResponse | InvalidResponse) {
if (!data.result) {
alert(data.reason);
new Modal(unwrap(document.querySelector('#importModal'))).hide();
if(modalImport){
modalImport.hide();
}
return false;
}