forked from devsam/core
misc: bootstrap4 toast 사용코드 제거
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
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 { getIconPath } from "@util/getIconPath";
|
||||
import { mb_strwidth } from "@util/mb_strwidth";
|
||||
@@ -41,7 +41,5 @@ exportWindow(TemplateEngine, 'TemplateEngine');
|
||||
exportWindow(getIconPath, 'getIconPath');
|
||||
exportWindow(activateFlip, 'activateFlip');
|
||||
exportWindow(errUnknown, 'errUnknown');
|
||||
exportWindow(errUnknownToast, 'errUnknownToast');
|
||||
exportWindow(quickReject, 'quickReject');
|
||||
exportWindow(nl2br, 'nl2br');
|
||||
exportWindow(initTooltip, 'initTooltip');
|
||||
+1
-19
@@ -1,5 +1,5 @@
|
||||
import $ from "jquery";
|
||||
import { Tooltip } from "bootstrap";
|
||||
import { Tooltip } from "bootstrap";
|
||||
import { trim } from "lodash";
|
||||
|
||||
/**
|
||||
@@ -127,24 +127,6 @@ export function errUnknown(): void {
|
||||
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) {
|
||||
return text.replace(/<\s*\/?br\s*[\/]?>/gi, '\n');
|
||||
|
||||
+9
-2
@@ -15,7 +15,7 @@ import { unwrap } from '@util/unwrap';
|
||||
import { auto500px } from '@util/auto500px';
|
||||
import { htmlReady } from '@util/htmlReady';
|
||||
|
||||
$(function ($) {
|
||||
htmlReady(() => {
|
||||
$('.refreshPage').click(function () {
|
||||
document.location.reload();
|
||||
return false;
|
||||
@@ -36,6 +36,13 @@ $(function ($) {
|
||||
|
||||
activateFlip();
|
||||
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;
|
||||
|
||||
function init() {
|
||||
if(finInit){
|
||||
if (finInit) {
|
||||
return false;
|
||||
}
|
||||
const _nationMsgBox = document.getElementById('nation-msg-box');
|
||||
|
||||
Reference in New Issue
Block a user