misc: bootstrap4 toast 사용코드 제거

This commit is contained in:
2021-12-11 03:21:47 +09:00
parent 5819045a01
commit 111a81766e
3 changed files with 11 additions and 24 deletions
+1 -3
View File
@@ -1,5 +1,5 @@
import { exportWindow } from "@util/exportWindow"; import { exportWindow } from "@util/exportWindow";
import { activateFlip, errUnknown, errUnknownToast, quickReject, initTooltip } from "@/common_legacy"; import { activateFlip, errUnknown, initTooltip } from "@/common_legacy";
import { isBrightColor } from "@util/isBrightColor"; import { isBrightColor } from "@util/isBrightColor";
import { getIconPath } from "@util/getIconPath"; import { getIconPath } from "@util/getIconPath";
import { mb_strwidth } from "@util/mb_strwidth"; import { mb_strwidth } from "@util/mb_strwidth";
@@ -41,7 +41,5 @@ exportWindow(TemplateEngine, 'TemplateEngine');
exportWindow(getIconPath, 'getIconPath'); exportWindow(getIconPath, 'getIconPath');
exportWindow(activateFlip, 'activateFlip'); exportWindow(activateFlip, 'activateFlip');
exportWindow(errUnknown, 'errUnknown'); exportWindow(errUnknown, 'errUnknown');
exportWindow(errUnknownToast, 'errUnknownToast');
exportWindow(quickReject, 'quickReject');
exportWindow(nl2br, 'nl2br'); exportWindow(nl2br, 'nl2br');
exportWindow(initTooltip, 'initTooltip'); exportWindow(initTooltip, 'initTooltip');
+1 -19
View File
@@ -1,5 +1,5 @@
import $ from "jquery"; import $ from "jquery";
import { Tooltip } from "bootstrap"; import { Tooltip } from "bootstrap";
import { trim } from "lodash"; import { trim } from "lodash";
/** /**
@@ -127,24 +127,6 @@ export function errUnknown(): void {
alert('작업을 실패했습니다.'); alert('작업을 실패했습니다.');
} }
export function errUnknownToast(): void {
$.toast({
title: '에러!',
content: '작업을 실패했습니다.',
type: 'danger',
delay: 5000
});
}
export function quickReject<T>(errMsg: string): JQuery.Promise<T> {
if (errMsg === undefined) {
errMsg = '작업을 실패했습니다.';
}
const deferred = $.Deferred();
void deferred.reject(errMsg);
return deferred.promise();
}
/* /*
function br2nl (text) { function br2nl (text) {
return text.replace(/<\s*\/?br\s*[\/]?>/gi, '\n'); return text.replace(/<\s*\/?br\s*[\/]?>/gi, '\n');
+9 -2
View File
@@ -15,7 +15,7 @@ import { unwrap } from '@util/unwrap';
import { auto500px } from '@util/auto500px'; import { auto500px } from '@util/auto500px';
import { htmlReady } from '@util/htmlReady'; import { htmlReady } from '@util/htmlReady';
$(function ($) { htmlReady(() => {
$('.refreshPage').click(function () { $('.refreshPage').click(function () {
document.location.reload(); document.location.reload();
return false; return false;
@@ -36,6 +36,13 @@ $(function ($) {
activateFlip(); activateFlip();
initTooltip(); initTooltip();
const customCSS = localStorage.getItem('sam_customCSS');
if (customCSS) {
const $style = $('<style type="text/css"></style>');
$style.text(customCSS);
$style.appendTo($('head'));
}
}); });
(() => { (() => {
@@ -47,7 +54,7 @@ $(function ($) {
let nationMsgHeight: number | undefined = undefined; let nationMsgHeight: number | undefined = undefined;
function init() { function init() {
if(finInit){ if (finInit) {
return false; return false;
} }
const _nationMsgBox = document.getElementById('nation-msg-box'); const _nationMsgBox = document.getElementById('nation-msg-box');