feat(notice): reuse project editor, date popup and member picker on the notice page
- Notice body uses the task description editor (createDescEditor, shared toolbar partial project/_desc_fmtbar.html): bold/italic/underline/strike, text color/size, lists, checklist, quote, link, clear format, image button/paste with resize; images upload to /notice/api/images - Show date uses the project date popup (enhanceDateInput) plus a time field - Recipients rendered like the project member picker (icon + name + check) - project.js exposes window.PJLib; PJ_LIB_ONLY runs only shared tooltips on non-project pages - Centered notice renders checklist/quote/list styles outside project pages too - Task window editor behavior unchanged (jsdom + Chrome regressions pass) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -75,9 +75,11 @@ def notice_admin_page(request: Request) -> HTMLResponse:
|
||||
user = _super(request)
|
||||
st = getattr(request.app.state, "notice_store", None)
|
||||
enabled = bool(st) and st.enabled()
|
||||
# 받는 사람 후보 = 등록 사용자 전원 — 프로젝트 멤버 고르기와 같은 모양(아이콘 + 이름)으로 그린다(project.js memberPickHtml)
|
||||
people = sorted(
|
||||
({"email": u["email"], "name": u.get("name") or u["email"].split("@")[0]} for u in user_store.list_all()),
|
||||
key=lambda p: p["email"],
|
||||
({"email": u["email"], "id": u["email"].split("@")[0], "name": u.get("name") or u["email"].split("@")[0],
|
||||
"avatar": u.get("picture") or ""} for u in user_store.list_all()),
|
||||
key=lambda p: p["id"],
|
||||
)
|
||||
return render_template(request, "notice/admin.html", {
|
||||
"user": user, "is_admin": is_admin(user),
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
{# 프로젝트 화면 부품(설명 편집기·날짜 팝업·멤버 고르기)을 그대로 쓴다 — project.js 는 PJ_LIB_ONLY 로 부품만 #}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261012b" />
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
<script>window.PJ_LIB_ONLY = true; window.PJ_HOLIDAYS = {{ (pj_kr_holidays or {}) | tojson }};</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
@@ -18,36 +21,39 @@
|
||||
<label class="ntc-field">제목
|
||||
<input type="text" id="ntc-title" maxlength="200" placeholder="예: 오늘 18시 서버 점검" autocomplete="off" />
|
||||
</label>
|
||||
<div class="ntc-field">내용
|
||||
<div class="ntc-editor-bar">
|
||||
<button type="button" data-cmd="bold" title="굵게"><b>B</b></button>
|
||||
<button type="button" id="ntc-image-btn" title="이미지 넣기(붙여넣기·끌어 놓기도 됩니다)">이미지</button>
|
||||
<input type="file" id="ntc-image-file" accept="image/png,image/jpeg,image/gif,image/webp" hidden multiple />
|
||||
{# 내용 — 작업 설명란과 같은 편집기(서식 도구 전체·이미지 붙여넣기/버튼·크기 조절·링크·체크리스트) #}
|
||||
<div class="ntc-field pj-desc-block ntc-desc">
|
||||
<div class="pj-desc-toolbar"><span>내용</span><span class="pj-muted-sm" id="ntc-hint"></span></div>
|
||||
{% with fmtbar_id = "ntc-fmtbar", img_input_id = "ntc-img-input" %}{% include "project/_desc_fmtbar.html" %}{% endwith %}
|
||||
<div class="pj-desc-wrap">
|
||||
<div class="pj-desc-editor" id="ntc-body" contenteditable="true" role="textbox" aria-multiline="true" aria-label="공지 내용"
|
||||
data-placeholder="공지 내용을 쓰세요… (이미지는 붙여넣기 또는 위 버튼으로 추가)"></div>
|
||||
</div>
|
||||
</div>
|
||||
{# 띄울 날짜 — 프로젝트와 같은 날짜 팝업(공휴일·오늘·지우기), 시각은 옆 칸. 둘 다 비우면 바로 #}
|
||||
<div class="ntc-field">띄울 시각 <small class="ntc-sub">한국시간 · 날짜를 비우면 바로</small>
|
||||
<div class="ntc-when">
|
||||
<input type="date" id="ntc-date" />
|
||||
<input type="time" id="ntc-time" class="ntc-time" step="300" aria-label="띄울 시각" />
|
||||
</div>
|
||||
<div class="ntc-editor" id="ntc-body" contenteditable="true" role="textbox" aria-multiline="true" aria-label="공지 내용"
|
||||
data-placeholder="공지 내용을 쓰세요. 이미지는 붙여넣거나 끌어 놓아도 됩니다."></div>
|
||||
</div>
|
||||
<label class="ntc-field">띄울 시각(한국시간 — 비우면 바로)
|
||||
<input type="datetime-local" id="ntc-show-at" />
|
||||
</label>
|
||||
<div class="ntc-field">받는 사람
|
||||
<div class="ntc-targets">
|
||||
<label><input type="radio" name="ntc-to" value="all" checked /> 전체(로그인하는 모든 사람)</label>
|
||||
<label><input type="radio" name="ntc-to" value="some" /> 고른 사람만</label>
|
||||
<div class="ntc-people" id="ntc-people" hidden>
|
||||
{% for p in people %}
|
||||
<label><input type="checkbox" value="{{ p.email }}" /> {{ p.name }} <small>{{ p.email.split('@')[0] }}</small></label>
|
||||
{% endfor %}
|
||||
<div class="ntc-to">
|
||||
<label><input type="radio" name="ntc-to" value="all" checked /> 전체(로그인하는 모든 사람)</label>
|
||||
<label><input type="radio" name="ntc-to" value="some" /> 고른 사람만</label>
|
||||
</div>
|
||||
{# 프로젝트 멤버 고르기와 같은 모양 — 아이콘 + 이름 + 체크 #}
|
||||
<div class="pj-member-picker ntc-people" id="ntc-people" hidden></div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="ntc-field" id="ntc-reshow-row" hidden style="flex-direction:row;align-items:center;font-weight:500">
|
||||
<label class="ntc-field ntc-inline" id="ntc-reshow-row" hidden>
|
||||
<input type="checkbox" id="ntc-reshow" /> 이미 [확인]한 사람에게도 다시 띄우기
|
||||
</label>
|
||||
<div class="ntc-actions">
|
||||
<button type="button" class="erp-btn erp-btn-outline" id="ntc-reset">새로 쓰기</button>
|
||||
<button type="button" class="erp-btn erp-btn-outline" id="ntc-preview">미리 보기</button>
|
||||
<button type="button" class="erp-btn" id="ntc-save">공지 만들기</button>
|
||||
<button type="button" class="pj-btn" id="ntc-reset">새로 쓰기</button>
|
||||
<button type="button" class="pj-btn" id="ntc-preview">미리 보기</button>
|
||||
<button type="button" class="pj-btn pj-btn-primary" id="ntc-save">공지 만들기</button>
|
||||
</div>
|
||||
<p class="ntc-msg" id="ntc-msg" role="alert" hidden></p>
|
||||
</section>
|
||||
@@ -58,6 +64,7 @@
|
||||
</section>
|
||||
</div>
|
||||
<script>window.NTC_PEOPLE = {{ people | tojson }};</script>
|
||||
<script src="/static/erp-notice-admin.js?v=20261012a" defer></script>
|
||||
<script src="/static/project.js?v=20261012e" defer></script>
|
||||
<script src="/static/erp-notice-admin.js?v=20261012b" defer></script>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
{# 설명란 서식 도구(작업 창·긴급 공지 관리 공용). fmtbar_id·img_input_id 를 주면 그 id 로(기본 = 작업 창 id).
|
||||
동작은 project.js createDescEditor — 버튼 data-cmd 를 그대로 쓴다. #}
|
||||
{# 서식 도구 — 모든 버튼을 같은 아이콘 글꼴(Material Symbols)·같은 크기로 그려
|
||||
한 줄에 딱 맞춰 선다(예전엔 글자·이모지가 섞여 높이가 들쭉날쭉했다). #}
|
||||
<div class="pj-desc-fmtbar" id="{{ fmtbar_id or 'pj-desc-fmtbar' }}">
|
||||
<button type="button" class="pj-desc-fmtbtn" data-cmd="bold" title="굵게 (Ctrl+B)"><span class="material-symbols-outlined">format_bold</span></button>
|
||||
<button type="button" class="pj-desc-fmtbtn" data-cmd="italic" title="기울임 (Ctrl+I)"><span class="material-symbols-outlined">format_italic</span></button>
|
||||
<button type="button" class="pj-desc-fmtbtn" data-cmd="underline" title="밑줄 (Ctrl+U)"><span class="material-symbols-outlined">format_underlined</span></button>
|
||||
<button type="button" class="pj-desc-fmtbtn" data-cmd="strikeThrough" title="취소선 (Ctrl+Shift+X)"><span class="material-symbols-outlined">format_strikethrough</span></button>
|
||||
{# 글자 색·크기(2026-10-08) — 누르면 고르는 창(body 에 붙음). 저장 때 서버가 span 의 color·font-size 만 남긴다 #}
|
||||
<button type="button" class="pj-desc-fmtbtn" data-cmd="textColor" title="글자 색"><span class="material-symbols-outlined">format_color_text</span></button>
|
||||
<button type="button" class="pj-desc-fmtbtn" data-cmd="textSize" title="글자 크기"><span class="material-symbols-outlined">format_size</span></button>
|
||||
<span class="pj-desc-fmtsep"></span>
|
||||
<button type="button" class="pj-desc-fmtbtn" data-cmd="insertUnorderedList" title="글머리 기호 목록"><span class="material-symbols-outlined">format_list_bulleted</span></button>
|
||||
<button type="button" class="pj-desc-fmtbtn" data-cmd="insertOrderedList" title="번호 매기기 목록"><span class="material-symbols-outlined">format_list_numbered</span></button>
|
||||
<button type="button" class="pj-desc-fmtbtn" data-cmd="insertCheckbox" title="체크박스 넣기"><span class="material-symbols-outlined">check_box</span></button>
|
||||
<button type="button" class="pj-desc-fmtbtn" data-cmd="formatBlock" data-arg="blockquote" title="인용구"><span class="material-symbols-outlined">format_quote</span></button>
|
||||
<span class="pj-desc-fmtsep"></span>
|
||||
<button type="button" class="pj-desc-fmtbtn" data-cmd="createLink" title="링크 삽입"><span class="material-symbols-outlined">link</span></button>
|
||||
<button type="button" class="pj-desc-fmtbtn" data-cmd="removeFormat" title="서식 지우기"><span class="material-symbols-outlined">format_clear</span></button>
|
||||
<span class="pj-desc-fmtsep"></span>
|
||||
<label class="pj-desc-fmtbtn" id="{{ (fmtbar_id ~ '-imgbtn') if fmtbar_id else 'pj-desc-imgbtn' }}" title="이미지 추가"><span class="material-symbols-outlined">image</span><input type="file" id="{{ img_input_id or 'pj-desc-img-input' }}" accept="image/*" hidden /></label>
|
||||
</div>
|
||||
@@ -292,5 +292,5 @@
|
||||
|
||||
<script src="/static/project-goal-text.js?v=20261003d" defer></script>
|
||||
<script src="/static/project-meeting-cells.js?v=20261007a" defer></script>
|
||||
<script src="/static/project.js?v=20261012d" defer></script>
|
||||
<script src="/static/project.js?v=20261012e" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -207,5 +207,5 @@
|
||||
{% include "project/_member_tasks_modal.html" %}
|
||||
|
||||
<script src="/static/project-goal-text.js?v=20261003d" defer></script>
|
||||
<script src="/static/project.js?v=20261012d" defer></script>
|
||||
<script src="/static/project.js?v=20261012e" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -101,5 +101,5 @@
|
||||
{% include "project/_side_modals.html" %}
|
||||
{% include "project/_member_tasks_modal.html" %}
|
||||
|
||||
<script src="/static/project.js?v=20261012d" defer></script>
|
||||
<script src="/static/project.js?v=20261012e" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -100,5 +100,5 @@
|
||||
"today": {{ today | tojson }}
|
||||
}
|
||||
</script>
|
||||
<script src="/static/project.js?v=20261012d" defer></script>
|
||||
<script src="/static/project.js?v=20261012e" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -108,5 +108,5 @@
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
<script src="/static/project.js?v=20261012d" defer></script>
|
||||
<script src="/static/project.js?v=20261012e" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -349,27 +349,7 @@
|
||||
<span class="pj-extra-label">설명</span>
|
||||
<span class="pj-muted-sm" id="pj-desc-hint"></span>
|
||||
</div>
|
||||
{# 서식 도구 — 모든 버튼을 같은 아이콘 글꼴(Material Symbols)·같은 크기로 그려
|
||||
한 줄에 딱 맞춰 선다(예전엔 글자·이모지가 섞여 높이가 들쭉날쭉했다). #}
|
||||
<div class="pj-desc-fmtbar" id="pj-desc-fmtbar">
|
||||
<button type="button" class="pj-desc-fmtbtn" data-cmd="bold" title="굵게 (Ctrl+B)"><span class="material-symbols-outlined">format_bold</span></button>
|
||||
<button type="button" class="pj-desc-fmtbtn" data-cmd="italic" title="기울임 (Ctrl+I)"><span class="material-symbols-outlined">format_italic</span></button>
|
||||
<button type="button" class="pj-desc-fmtbtn" data-cmd="underline" title="밑줄 (Ctrl+U)"><span class="material-symbols-outlined">format_underlined</span></button>
|
||||
<button type="button" class="pj-desc-fmtbtn" data-cmd="strikeThrough" title="취소선 (Ctrl+Shift+X)"><span class="material-symbols-outlined">format_strikethrough</span></button>
|
||||
{# 글자 색·크기(2026-10-08) — 누르면 고르는 창(body 에 붙음). 저장 때 서버가 span 의 color·font-size 만 남긴다 #}
|
||||
<button type="button" class="pj-desc-fmtbtn" data-cmd="textColor" title="글자 색"><span class="material-symbols-outlined">format_color_text</span></button>
|
||||
<button type="button" class="pj-desc-fmtbtn" data-cmd="textSize" title="글자 크기"><span class="material-symbols-outlined">format_size</span></button>
|
||||
<span class="pj-desc-fmtsep"></span>
|
||||
<button type="button" class="pj-desc-fmtbtn" data-cmd="insertUnorderedList" title="글머리 기호 목록"><span class="material-symbols-outlined">format_list_bulleted</span></button>
|
||||
<button type="button" class="pj-desc-fmtbtn" data-cmd="insertOrderedList" title="번호 매기기 목록"><span class="material-symbols-outlined">format_list_numbered</span></button>
|
||||
<button type="button" class="pj-desc-fmtbtn" data-cmd="insertCheckbox" title="체크박스 넣기"><span class="material-symbols-outlined">check_box</span></button>
|
||||
<button type="button" class="pj-desc-fmtbtn" data-cmd="formatBlock" data-arg="blockquote" title="인용구"><span class="material-symbols-outlined">format_quote</span></button>
|
||||
<span class="pj-desc-fmtsep"></span>
|
||||
<button type="button" class="pj-desc-fmtbtn" data-cmd="createLink" title="링크 삽입"><span class="material-symbols-outlined">link</span></button>
|
||||
<button type="button" class="pj-desc-fmtbtn" data-cmd="removeFormat" title="서식 지우기"><span class="material-symbols-outlined">format_clear</span></button>
|
||||
<span class="pj-desc-fmtsep"></span>
|
||||
<label class="pj-desc-fmtbtn" id="pj-desc-imgbtn" title="이미지 추가"><span class="material-symbols-outlined">image</span><input type="file" id="pj-desc-img-input" accept="image/*" hidden /></label>
|
||||
</div>
|
||||
{% include "project/_desc_fmtbar.html" %}
|
||||
<div class="pj-desc-wrap">
|
||||
<div class="pj-desc-editor" id="pj-t-desc" contenteditable="true" data-placeholder="설명을 입력하세요… (이미지는 붙여넣기 또는 위 버튼으로 추가)"></div>
|
||||
</div>
|
||||
@@ -488,5 +468,5 @@
|
||||
</script>
|
||||
|
||||
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
|
||||
<script src="/static/project.js?v=20261012d" defer></script>
|
||||
<script src="/static/project.js?v=20261012e" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -70,5 +70,5 @@
|
||||
{% include "project/_side_modals.html" %}
|
||||
{% include "project/_member_tasks_modal.html" %}
|
||||
|
||||
<script src="/static/project.js?v=20261012d" defer></script>
|
||||
<script src="/static/project.js?v=20261012e" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,12 +1,19 @@
|
||||
// 긴급 공지 관리(/notice/, 수퍼관리자) — 만들기·고치기·취소·이미지·미리 보기·확인 현황.
|
||||
// 긴급 공지 관리(/notice/, 수퍼관리자) — 만들기·고치기·취소·미리 보기·확인 현황.
|
||||
// 내용 편집기·날짜 팝업·받는 사람 고르기는 프로젝트 화면 부품 그대로(window.PJLib — project.js, PJ_LIB_ONLY):
|
||||
// · 내용 = 작업 설명란과 같은 편집기(굵게·기울임·밑줄·취소선·글자 색/크기·목록·체크리스트·인용·링크·서식 지우기·이미지
|
||||
// 붙여넣기/버튼·크기 조절), 이미지는 /notice/api/images 로 올린다.
|
||||
// · 띄울 날짜 = 아사나식 날짜 팝업(공휴일·오늘·지우기), 시각은 옆 칸.
|
||||
// · 받는 사람 = 프로젝트 멤버 고르기와 같은 아이콘 + 이름 + 체크.
|
||||
(function () {
|
||||
"use strict";
|
||||
const root = document.getElementById("ntc-root");
|
||||
if (!root) return;
|
||||
if (!root || !window.PJLib) return;
|
||||
const L = window.PJLib;
|
||||
const $ = function (id) { return document.getElementById(id); };
|
||||
const people = {};
|
||||
(window.NTC_PEOPLE || []).forEach(function (p) { people[String(p.email).toLowerCase()] = p.name; });
|
||||
const nameOf = function (e) { return people[String(e).toLowerCase()] || String(e).split("@")[0]; };
|
||||
const people = window.NTC_PEOPLE || [];
|
||||
const byEmail = {};
|
||||
people.forEach(function (p) { byEmail[String(p.email).toLowerCase()] = p; });
|
||||
const nameOf = function (e) { const p = byEmail[String(e).toLowerCase()]; return p ? p.name : String(e).split("@")[0]; };
|
||||
const esc = function (s) {
|
||||
return String(s == null ? "" : s).replace(/[&<>"']/g, function (c) {
|
||||
return { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }[c];
|
||||
@@ -32,94 +39,65 @@
|
||||
return data || {};
|
||||
}
|
||||
|
||||
const title = $("ntc-title"), body = $("ntc-body"), showAt = $("ntc-show-at"), idEl = $("ntc-id");
|
||||
const title = $("ntc-title"), dateEl = $("ntc-date"), timeEl = $("ntc-time"), idEl = $("ntc-id");
|
||||
const peopleBox = $("ntc-people"), msg = $("ntc-msg"), save = $("ntc-save");
|
||||
const say = function (text, ok) { msg.textContent = text || ""; msg.hidden = !text; msg.style.color = ok ? "#1f7a3a" : ""; };
|
||||
const say = function (text, ok) { msg.textContent = text || ""; msg.hidden = !text; msg.classList.toggle("is-ok", !!ok); };
|
||||
|
||||
// ── 내용 — 작업 설명란 편집기 ──
|
||||
const editor = L.createDescEditor({
|
||||
box: $("ntc-body"), fmtbar: $("ntc-fmtbar"), imgInput: $("ntc-img-input"), hint: $("ntc-hint"), mentions: false,
|
||||
uploadImage: async function (file) {
|
||||
const fd = new FormData();
|
||||
fd.append("file", file, file.name || "image");
|
||||
return (await api("POST", "/notice/api/images", fd, true)).image.url;
|
||||
},
|
||||
});
|
||||
// ── 날짜 — 프로젝트 날짜 팝업 ──
|
||||
L.enhanceDateInput(dateEl, { placeholder: "날짜(비우면 바로)" });
|
||||
// ── 받는 사람 — 프로젝트 멤버 고르기 모양 ──
|
||||
peopleBox.innerHTML = people.map(L.memberPickHtml).join("") || '<span class="pj-empty-sm">등록된 사람이 없습니다.</span>';
|
||||
function toAll() { return root.querySelector('input[name="ntc-to"]:checked').value === "all"; }
|
||||
root.querySelectorAll('input[name="ntc-to"]').forEach(function (r) {
|
||||
r.addEventListener("change", function () { peopleBox.hidden = toAll(); });
|
||||
});
|
||||
|
||||
// ── 본문 편집 — 굵게, 이미지(버튼·붙여넣기·끌어 놓기 → 서버에 올리고 주소로 넣는다) ──
|
||||
root.querySelector('[data-cmd="bold"]').addEventListener("click", function () { body.focus(); document.execCommand("bold"); });
|
||||
let savedRange = null;
|
||||
body.addEventListener("keyup", keepRange);
|
||||
body.addEventListener("mouseup", keepRange);
|
||||
body.addEventListener("blur", keepRange);
|
||||
function keepRange() {
|
||||
const s = window.getSelection();
|
||||
if (s.rangeCount && body.contains(s.getRangeAt(0).commonAncestorContainer)) savedRange = s.getRangeAt(0).cloneRange();
|
||||
function picked() {
|
||||
return Array.from(peopleBox.querySelectorAll("input[type=checkbox]:checked")).map(function (c) { return c.value; });
|
||||
}
|
||||
function insertNode(node) {
|
||||
body.focus();
|
||||
const s = window.getSelection();
|
||||
let r = savedRange && body.contains(savedRange.commonAncestorContainer) ? savedRange : null;
|
||||
if (!r) { r = document.createRange(); r.selectNodeContents(body); r.collapse(false); }
|
||||
r.deleteContents();
|
||||
r.insertNode(node);
|
||||
r.setStartAfter(node); r.collapse(true);
|
||||
s.removeAllRanges(); s.addRange(r);
|
||||
savedRange = r.cloneRange();
|
||||
function setPicked(emails) {
|
||||
const want = (emails || []).map(function (e) { return String(e).toLowerCase(); });
|
||||
peopleBox.querySelectorAll("input[type=checkbox]").forEach(function (c) { c.checked = want.indexOf(c.value.toLowerCase()) >= 0; });
|
||||
}
|
||||
let uploading = 0;
|
||||
async function uploadImages(files) {
|
||||
for (const f of files) {
|
||||
if (!/^image\/(png|jpeg|gif|webp)$/.test(f.type)) { say("이미지(png·jpg·gif·webp)만 넣을 수 있습니다: " + f.name); continue; }
|
||||
uploading++;
|
||||
save.disabled = true;
|
||||
try {
|
||||
const fd = new FormData();
|
||||
fd.append("file", f, f.name || "image");
|
||||
const res = await api("POST", "/notice/api/images", fd, true);
|
||||
const img = document.createElement("img");
|
||||
img.src = res.image.url;
|
||||
img.alt = f.name || "";
|
||||
insertNode(img);
|
||||
say("");
|
||||
} catch (e) { say("이미지를 올리지 못했습니다: " + e.message); }
|
||||
finally { uploading--; if (!uploading) save.disabled = false; }
|
||||
}
|
||||
}
|
||||
$("ntc-image-btn").addEventListener("click", function () { keepRange(); $("ntc-image-file").click(); });
|
||||
$("ntc-image-file").addEventListener("change", function (e) { uploadImages(Array.from(e.target.files || [])); e.target.value = ""; });
|
||||
body.addEventListener("paste", function (e) {
|
||||
const files = Array.from((e.clipboardData && e.clipboardData.files) || []).filter(function (f) { return /^image\//.test(f.type); });
|
||||
if (files.length) { e.preventDefault(); keepRange(); uploadImages(files); }
|
||||
});
|
||||
body.addEventListener("dragover", function (e) { e.preventDefault(); });
|
||||
body.addEventListener("drop", function (e) {
|
||||
const files = Array.from((e.dataTransfer && e.dataTransfer.files) || []).filter(function (f) { return /^image\//.test(f.type); });
|
||||
if (files.length) { e.preventDefault(); keepRange(); uploadImages(files); }
|
||||
});
|
||||
|
||||
// ── 저장(만들기·고치기) ──
|
||||
function showAtValue() {
|
||||
// 날짜를 비우면 바로(서버가 지금으로), 날짜만 있으면 그날 00:00, 시각까지 있으면 그 시각 — 모두 한국시간
|
||||
return dateEl.value ? dateEl.value + "T" + (timeEl.value || "00:00") : "";
|
||||
}
|
||||
function payload() {
|
||||
return {
|
||||
title: title.value.trim(), body_html: body.innerHTML, show_at: showAt.value || "",
|
||||
to_all: toAll(),
|
||||
targets: Array.from(peopleBox.querySelectorAll("input:checked")).map(function (c) { return c.value; }),
|
||||
reshow: $("ntc-reshow").checked,
|
||||
title: title.value.trim(), body_html: editor.getHtml(), show_at: showAtValue(),
|
||||
to_all: toAll(), targets: picked(), reshow: $("ntc-reshow").checked,
|
||||
};
|
||||
}
|
||||
function resetForm() {
|
||||
idEl.value = ""; title.value = ""; body.innerHTML = ""; showAt.value = "";
|
||||
idEl.value = ""; title.value = ""; editor.setHtml(""); dateEl.value = ""; timeEl.value = "";
|
||||
root.querySelector('input[name="ntc-to"][value="all"]').checked = true;
|
||||
peopleBox.hidden = true;
|
||||
peopleBox.querySelectorAll("input").forEach(function (c) { c.checked = false; });
|
||||
setPicked([]);
|
||||
$("ntc-reshow").checked = false; $("ntc-reshow-row").hidden = true;
|
||||
$("ntc-form-title").textContent = "새 긴급 공지";
|
||||
save.textContent = "공지 만들기";
|
||||
savedRange = null;
|
||||
}
|
||||
$("ntc-reset").addEventListener("click", function () { resetForm(); say(""); });
|
||||
let saving = false;
|
||||
save.addEventListener("click", async function () {
|
||||
if (saving || uploading) return;
|
||||
const p = payload();
|
||||
if (!p.title) { say("제목을 입력하세요."); title.focus(); return; }
|
||||
if (!p.to_all && !p.targets.length) { say("받는 사람을 한 명 이상 고르거나 '전체'를 고르세요."); return; }
|
||||
if (saving) return;
|
||||
saving = true; save.disabled = true;
|
||||
try {
|
||||
await editor.whenIdle(); // 이미지 올리는 중이면 끝난 뒤 저장(빠진 채 저장되지 않게)
|
||||
const p = payload();
|
||||
if (!p.title) { say("제목을 입력하세요."); title.focus(); return; }
|
||||
if (!p.to_all && !p.targets.length) { say("받는 사람을 한 명 이상 고르거나 '전체'를 고르세요."); return; }
|
||||
const id = idEl.value;
|
||||
if (id) await api("PUT", "/notice/api/notices/" + id, p);
|
||||
else await api("POST", "/notice/api/notices", p);
|
||||
@@ -131,7 +109,7 @@
|
||||
});
|
||||
|
||||
// ── 미리 보기 — 받는 사람 화면과 같은 모양 ──
|
||||
$("ntc-preview").addEventListener("click", function () { preview(title.value.trim() || "(제목 없음)", body.innerHTML); });
|
||||
$("ntc-preview").addEventListener("click", function () { preview(title.value.trim() || "(제목 없음)", editor.getHtml()); });
|
||||
function preview(t, html) {
|
||||
const box = document.createElement("div");
|
||||
box.className = "erp-notice-backdrop";
|
||||
@@ -173,9 +151,9 @@
|
||||
'<div class="ntc-item-head"><span class="ntc-state ' + st[0] + '">' + esc(st[1]) + "</span>" +
|
||||
'<span class="ntc-item-title">' + esc(n.title) + "</span>" +
|
||||
'<span class="ntc-item-acts">' +
|
||||
'<button type="button" class="erp-btn erp-btn-outline" data-act="preview">미리 보기</button>' +
|
||||
'<button type="button" class="erp-btn erp-btn-outline" data-act="edit">고치기</button>' +
|
||||
'<button type="button" class="erp-btn erp-btn-outline" data-act="cancel">' + (n.cancelled_at ? "취소 되돌리기" : "취소") + "</button>" +
|
||||
'<button type="button" class="pj-btn pj-btn-sm" data-act="preview">미리 보기</button>' +
|
||||
'<button type="button" class="pj-btn pj-btn-sm" data-act="edit">고치기</button>' +
|
||||
'<button type="button" class="pj-btn pj-btn-sm" data-act="cancel">' + (n.cancelled_at ? "취소 되돌리기" : "취소") + "</button>" +
|
||||
"</span></div>" +
|
||||
'<div class="ntc-item-meta">띄울 시각 ' + esc(shortWhen(n.show_at)) + " · 받는 사람 " + esc(who) +
|
||||
" · 만든 사람 " + esc(nameOf(n.created_by)) + "</div>" +
|
||||
@@ -194,10 +172,11 @@
|
||||
if (!n) return;
|
||||
if (b.dataset.act === "preview") { preview(n.title, n.body_html); return; }
|
||||
if (b.dataset.act === "edit") {
|
||||
idEl.value = n.id; title.value = n.title; body.innerHTML = n.body_html; showAt.value = (n.show_at || "").slice(0, 16);
|
||||
idEl.value = n.id; title.value = n.title; editor.setHtml(n.body_html);
|
||||
dateEl.value = (n.show_at || "").slice(0, 10); timeEl.value = (n.show_at || "").slice(11, 16);
|
||||
root.querySelector('input[name="ntc-to"][value="' + (n.to_all ? "all" : "some") + '"]').checked = true;
|
||||
peopleBox.hidden = n.to_all;
|
||||
peopleBox.querySelectorAll("input").forEach(function (c) { c.checked = n.targets.indexOf(c.value.toLowerCase()) >= 0; });
|
||||
setPicked(n.targets);
|
||||
$("ntc-reshow-row").hidden = false; $("ntc-reshow").checked = false;
|
||||
$("ntc-form-title").textContent = "공지 고치기";
|
||||
save.textContent = "고친 내용 저장";
|
||||
|
||||
+31
-16
@@ -27,7 +27,22 @@
|
||||
}
|
||||
.erp-notice-body p { margin: 0 0 .6em; }
|
||||
.erp-notice-body img { display: block; max-width: 100%; height: auto; margin: 8px 0; border-radius: 8px; }
|
||||
.erp-notice-body a { color: #3b6fd8; }
|
||||
.erp-notice-body a { color: #3b6fd8; text-decoration: underline; }
|
||||
/* 작업 설명란 편집기와 같은 서식(project.css .pj-desc-editor) — 프로젝트 밖 화면에서도 같게 보이게 */
|
||||
.erp-notice-body blockquote { margin: 6px 0; padding: 2px 12px; border-left: 3px solid #d5d9de; color: #565c66; }
|
||||
.erp-notice-body ul, .erp-notice-body ol { margin: 4px 0; padding-left: 22px; }
|
||||
.erp-notice-body ul.pj-checklist { list-style: none; padding-left: 24px; }
|
||||
.erp-notice-body ul.pj-checklist > li { position: relative; }
|
||||
.erp-notice-body ul.pj-checklist > li::before {
|
||||
content: ""; position: absolute; left: -22px; top: .3em; width: 14px; height: 14px;
|
||||
box-sizing: border-box; border: 1.5px solid #8f959d; border-radius: 3px; background: #fff;
|
||||
}
|
||||
.erp-notice-body ul.pj-checklist > li[data-checked="true"]::before {
|
||||
border-color: #7b68ee; background: #7b68ee center / 10px 10px no-repeat
|
||||
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.3l2.6 2.6L10 3.4' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
|
||||
}
|
||||
.erp-notice-body ul.pj-checklist > li[data-checked="true"] { color: #9aa1a9; text-decoration: line-through; }
|
||||
.erp-notice-body img[width] { height: auto; }
|
||||
.erp-notice-error { margin: 0; padding: 6px 10px; border-radius: 6px; background: #fdecec; color: #b42318; font-size: 13px; }
|
||||
.erp-notice-error[hidden] { display: none; }
|
||||
.erp-notice-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 6px; border-top: 1px solid #eceef1; }
|
||||
@@ -41,31 +56,31 @@
|
||||
.erp-notice-ok:disabled { opacity: .6; cursor: default; }
|
||||
|
||||
/* 관리 화면(/notice/) */
|
||||
.ntc-wrap { display: grid; grid-template-columns: minmax(360px, 520px) 1fr; gap: 18px; align-items: start; }
|
||||
.ntc-wrap { display: grid; grid-template-columns: minmax(420px, 640px) 1fr; gap: 18px; align-items: start; }
|
||||
@media (max-width: 1100px) { .ntc-wrap { grid-template-columns: 1fr; } }
|
||||
.ntc-card { background: #fff; border: 1px solid #e6e8eb; border-radius: 12px; padding: 18px; }
|
||||
.ntc-card h2 { margin: 0 0 12px; font-size: 16px; }
|
||||
.ntc-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; font-size: 13px; font-weight: 700; color: #3b4048; }
|
||||
.ntc-field input[type=text], .ntc-field input[type=datetime-local] {
|
||||
.ntc-field input[type=text], .ntc-time {
|
||||
font: inherit; font-weight: 500; padding: 8px 10px; border: 1px solid #d5d9de; border-radius: 8px;
|
||||
}
|
||||
.ntc-editor-bar { display: flex; gap: 4px; }
|
||||
.ntc-editor-bar button { padding: 4px 10px; border: 1px solid #d5d9de; border-radius: 6px; background: #fff; cursor: pointer; font: inherit; font-size: 12.5px; }
|
||||
.ntc-editor {
|
||||
min-height: 160px; max-height: 420px; overflow: auto; padding: 10px 12px; border: 1px solid #d5d9de; border-radius: 8px;
|
||||
font-weight: 400; font-size: 14px; line-height: 1.6; color: #2b2f36; outline: none;
|
||||
}
|
||||
.ntc-editor:focus { border-color: #7b68ee; box-shadow: 0 0 0 3px rgba(123, 104, 238, .15); }
|
||||
.ntc-editor:empty::before { content: attr(data-placeholder); color: #a0a5ad; }
|
||||
.ntc-editor img { max-width: 100%; height: auto; border-radius: 6px; }
|
||||
.ntc-targets { display: flex; flex-direction: column; gap: 6px; font-weight: 500; }
|
||||
.ntc-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 10px; max-height: 220px; overflow: auto;
|
||||
padding: 8px; border: 1px solid #e6e8eb; border-radius: 8px; }
|
||||
.ntc-sub { font-weight: 500; color: #8a9099; }
|
||||
.ntc-desc .pj-desc-toolbar { display: flex; align-items: center; gap: 8px; }
|
||||
.ntc-desc .pj-desc-wrap { position: relative; }
|
||||
.ntc-desc .pj-desc-editor { min-height: 180px; max-height: 460px; overflow: auto; font-weight: 400;
|
||||
padding: 10px 12px; border: 1px solid #d5d9de; border-radius: 8px; }
|
||||
.ntc-desc .pj-desc-editor:focus { border-color: #7b68ee; box-shadow: 0 0 0 3px rgba(123, 104, 238, .15); outline: none; }
|
||||
.ntc-when { display: flex; align-items: center; gap: 8px; font-weight: 500; }
|
||||
.ntc-time { padding: 6px 8px; }
|
||||
.ntc-targets { display: flex; flex-direction: column; gap: 8px; font-weight: 500; }
|
||||
.ntc-to { display: flex; gap: 16px; flex-wrap: wrap; }
|
||||
.ntc-people { max-height: 260px; }
|
||||
.ntc-people[hidden] { display: none; }
|
||||
.ntc-people label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; }
|
||||
.ntc-inline { flex-direction: row; align-items: center; font-weight: 500; }
|
||||
.ntc-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
|
||||
.ntc-msg { margin: 8px 0 0; font-size: 13px; color: #b42318; }
|
||||
.ntc-msg[hidden] { display: none; }
|
||||
.ntc-msg.is-ok { color: #1f7a3a; }
|
||||
.ntc-list { display: flex; flex-direction: column; gap: 10px; }
|
||||
.ntc-item { border: 1px solid #e6e8eb; border-radius: 10px; padding: 12px 14px; }
|
||||
.ntc-item-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
|
||||
|
||||
+34
-15
@@ -7511,14 +7511,23 @@
|
||||
|
||||
// ── 설명(contenteditable) — 붙여넣기/업로드로 이미지를 끼워 넣는다 ──
|
||||
function initDescEditor() {
|
||||
const box = el("pj-t-desc");
|
||||
return createDescEditor({
|
||||
box: el("pj-t-desc"), fmtbar: el("pj-desc-fmtbar"), imgInput: el("pj-desc-img-input"),
|
||||
hint: el("pj-desc-hint"), mentions: true,
|
||||
});
|
||||
}
|
||||
// 설명 편집기 본체 — 작업 창(initDescEditor)과 긴급 공지 관리 화면(window.PJLib)이 같이 쓴다.
|
||||
// cfg.box·fmtbar·imgInput·hint — 요소, cfg.mentions — @태그(작업 설명란만),
|
||||
// cfg.uploadImage(file) → Promise<이미지 주소> — 주면 그걸로 올린다(없으면 작업 첨부로, setTaskId 필요).
|
||||
function createDescEditor(cfg) {
|
||||
const box = cfg.box;
|
||||
if (!box) return null;
|
||||
// @ 를 누르면 멤버 목록 → 고르면 멘션 칩이 들어간다(수신함에 쌓인다).
|
||||
attachMentionEditor(box);
|
||||
if (cfg.mentions) attachMentionEditor(box);
|
||||
const wrap = box.parentElement;
|
||||
const imgInput = el("pj-desc-img-input");
|
||||
const hint = el("pj-desc-hint");
|
||||
let taskId = null;
|
||||
const imgInput = cfg.imgInput || null;
|
||||
const hint = cfg.hint || null;
|
||||
let taskId = cfg.uploadImage ? "custom" : null; // 자체 업로드면 늘 이미지 추가 가능
|
||||
|
||||
// ── 서식 도구 모음(간단 워드프로세서) — execCommand 는 구식 API지만
|
||||
// 크롬/엣지는 여전히 지원하고, 이미 같은 파일의 이미지 삽입에서도 쓰고
|
||||
@@ -7608,7 +7617,7 @@
|
||||
box.dispatchEvent(new Event("input", { bubbles: true }));
|
||||
});
|
||||
|
||||
const fmtbar = el("pj-desc-fmtbar");
|
||||
const fmtbar = cfg.fmtbar || null;
|
||||
if (fmtbar) {
|
||||
fmtbar.addEventListener("mousedown", function (e) { e.preventDefault(); });
|
||||
fmtbar.addEventListener("click", function (e) {
|
||||
@@ -7964,16 +7973,18 @@
|
||||
saveSelection();
|
||||
const insertAt = lastRange ? lastRange.cloneRange() : null;
|
||||
beginUpload();
|
||||
const fd = new FormData();
|
||||
fd.append("file", file);
|
||||
try {
|
||||
const results = await Promise.all([
|
||||
naturalImageSize(file),
|
||||
fetch("/project/api/tasks/" + myTaskId + "/attachments", { method: "POST", body: fd }),
|
||||
]);
|
||||
const dims = results[0], res = results[1];
|
||||
// 작업 설명란 = 그 작업 첨부로 올린다. 다른 화면(긴급 공지)은 cfg.uploadImage 가 주소를 돌려준다.
|
||||
const upload = cfg.uploadImage || async function (f) {
|
||||
const fd = new FormData();
|
||||
fd.append("file", f);
|
||||
const res = await fetch("/project/api/tasks/" + myTaskId + "/attachments", { method: "POST", body: fd });
|
||||
if (!res.ok) { let m = res.statusText; try { m = (await res.json()).detail; } catch (_) {} throw new Error(m); }
|
||||
const data = await res.json();
|
||||
return "/project/api/attachments/" + data.attachment.id + "/inline";
|
||||
};
|
||||
try {
|
||||
const results = await Promise.all([naturalImageSize(file), upload(file)]);
|
||||
const dims = results[0], imgSrc = results[1];
|
||||
if (myGen !== editorGen || myTaskId !== taskId) {
|
||||
showToast("이미지는 원래 작업의 첨부 파일로 저장됐습니다(작업 창이 바뀌어 설명에는 넣지 않았습니다).");
|
||||
return;
|
||||
@@ -7985,7 +7996,7 @@
|
||||
if (insertAt) {
|
||||
try { const sel = window.getSelection(); sel.removeAllRanges(); sel.addRange(insertAt); } catch (_) {}
|
||||
}
|
||||
insertHtmlAtCursor('<img src="/project/api/attachments/' + data.attachment.id + '/inline" alt=""' + widthAttr + '>');
|
||||
insertHtmlAtCursor('<img src="' + escapeHtml(imgSrc) + '" alt=""' + widthAttr + '>');
|
||||
} catch (e) { alert("이미지 업로드 실패: " + e.message); }
|
||||
finally { endUpload(); }
|
||||
}
|
||||
@@ -11410,7 +11421,15 @@
|
||||
poll();
|
||||
}
|
||||
|
||||
// 다른 화면이 프로젝트 부품을 같이 쓴다(긴급 공지 관리 — app/modules/notice): 설명 편집기(서식 도구 전체·이미지)·
|
||||
// 아사나식 날짜 팝업·멤버 고르기(아이콘 + 이름)·알림. window.PJ_LIB_ONLY 면 프로젝트 화면 초기화는 하지 않고
|
||||
// 공용 말풍선만 켠다(프로젝트 알림 팝업 확인·실시간 동기화 등이 그 화면에서 돌지 않게).
|
||||
window.PJLib = {
|
||||
createDescEditor: createDescEditor, enhanceDateInput: enhanceDateInput,
|
||||
memberPickHtml: memberPickHtml, showToast: showToast,
|
||||
};
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
if (window.PJ_LIB_ONLY) { initHoverTips(); return; }
|
||||
// 좌측 프로젝트 목록 — 프로젝트 화면은 initProject 가 자기 데이터로 직접 연다.
|
||||
if (!document.querySelector(".pj-project-view")) initSideTree();
|
||||
initTrash();
|
||||
|
||||
@@ -341,7 +341,7 @@
|
||||
});
|
||||
</script>
|
||||
{# 긴급 공지 — erp_base 를 쓰지 않는 화면도 같이(app/modules/notice) #}
|
||||
<link rel="stylesheet" href="/static/erp-notice.css?v=20261012a" />
|
||||
<link rel="stylesheet" href="/static/erp-notice.css?v=20261012c" />
|
||||
<script src="/static/erp-notice.js?v=20261012a" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<link rel="stylesheet" href="/static/erp-shell.css?v=20260615b" />
|
||||
<link rel="stylesheet" href="/static/erp-attach-viewer.css" />
|
||||
<link rel="stylesheet" href="/static/erp-dialog.css?v=20260930a" />
|
||||
<link rel="stylesheet" href="/static/erp-notice.css?v=20261012a" />
|
||||
<link rel="stylesheet" href="/static/erp-notice.css?v=20261012c" />
|
||||
{% block head_extra %}{% endblock %}
|
||||
</head>
|
||||
<body class="erp-body erp-app-body">
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
setInterval(refreshHealth, 30000);
|
||||
</script>
|
||||
{# 긴급 공지 — erp_base 를 쓰지 않는 화면도 같이(app/modules/notice) #}
|
||||
<link rel="stylesheet" href="/static/erp-notice.css?v=20261012a" />
|
||||
<link rel="stylesheet" href="/static/erp-notice.css?v=20261012c" />
|
||||
<script src="/static/erp-notice.js?v=20261012a" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+11
-5
@@ -15,11 +15,17 @@
|
||||
|
||||
## 화면
|
||||
|
||||
- **관리(`/notice/`)** — 제목, 내용(굵게·이미지: 버튼·붙여넣기·끌어 놓기 → 서버에 올리고 주소로 넣음), 띄울 시각(한국시간,
|
||||
비우면 바로), 받는 사람(전체 / 고른 사람 — 등록 사용자 목록), [미리 보기](받는 사람 화면과 같은 모양). 목록 = 상태(예약 · 표시 중 ·
|
||||
취소됨) · 받는 사람 · 확인 현황(확인한 사람·시각, 아직 안 한 사람). [고치기]([이미 확인한 사람에게도 다시 띄우기] 선택 가능) ·
|
||||
[취소](더 띄우지 않음, 기록은 남음) · [취소 되돌리기].
|
||||
- **표시(`static/erp-notice.js`)** — `erp_base.html` 을 쓰는 모든 화면 + 업무 모듈 첫 화면(`main.html`)·관리자 페이지(`admin.html`).
|
||||
- **관리(`/notice/`)** — 프로젝트 화면 부품을 그대로 쓴다(`project.js` 를 `window.PJ_LIB_ONLY` 로 불러 `window.PJLib` 만 —
|
||||
프로젝트 알림 팝업·실시간 동기화 등은 이 화면에서 돌지 않는다):
|
||||
· **내용** = 작업 설명란과 같은 편집기(`createDescEditor`, 서식 도구 `project/_desc_fmtbar.html` 공용 — 굵게·기울임·밑줄·취소선·
|
||||
글자 색/크기·글머리/번호 목록·체크리스트·인용·링크·서식 지우기·이미지 버튼/붙여넣기·크기 조절·더블클릭 크게 보기). @태그만 뺐다
|
||||
(공지는 작업이 아니라 수신함에 쌓일 곳이 없다). 이미지는 `/notice/api/images` 로 올린다.
|
||||
· **띄울 날짜** = 프로젝트 날짜 팝업(`enhanceDateInput` — 일요일·공휴일 빨강·오늘·지우기), 시각은 옆 칸(5분 단위). 날짜를 비우면 바로.
|
||||
· **받는 사람** = 전체 / 고른 사람 — 프로젝트 멤버 고르기와 같은 아이콘 + 이름 + 체크(`memberPickHtml`, 등록 사용자 전원).
|
||||
· [미리 보기](받는 사람 화면과 같은 모양). 목록 = 상태(예약 · 표시 중 · 취소됨) · 받는 사람 · 확인 현황(확인한 사람·시각, 아직 안 한 사람).
|
||||
[고치기]([이미 확인한 사람에게도 다시 띄우기] 선택 가능) · [취소](더 띄우지 않음, 기록은 남음) · [취소 되돌리기].
|
||||
- **표시(`static/erp-notice.js`)** — `erp_base.html` 을 쓰는 모든 화면 + 업무 모듈 첫 화면(`main.html`)·관리자 페이지(`admin.html`). 본문 서식(목록·체크리스트·인용)은
|
||||
`erp-notice.css` 가 작업 설명란과 같게 그린다(프로젝트 밖 화면에서도).
|
||||
`GET /notice/api/pending` 을 열 때·30초마다·창을 다시 볼 때 확인(띄울 시각 정밀도 ≈30초). 여러 건이면 오래된 것부터 차례대로(1/3).
|
||||
`document.body` 에 붙여 화면 배율(`.erp-app` zoom)과 무관하게 정가운데. [확인] 저장이 실패하면 창을 그대로 두고 알린다. 다른 탭·다른
|
||||
곳에서 확인·취소되면 다음 확인 때 닫힌다(같은 브라우저 다른 탭은 localStorage 신호로 바로). iframe(수신함 오른쪽 작업 창) 안에선 안 돈다.
|
||||
|
||||
Reference in New Issue
Block a user