fix(project): 입력 중 테두리를 칸 전체로, 고른 칸 Del 로 내용 지우기(Ctrl+Z 되돌리기)

- 목표 표·회의록: 입력 중 보라 테두리·밝은 배경을 입력칸(글 높이) 대신 칸 전체(td:focus-within)에
- 끌기·Shift+클릭으로 고른 칸에서 Del → 글 지우고 칸마다 저장, Ctrl+Z 로 바로 직전 지우기 되돌림
  (입력 중일 때의 Del·Ctrl+Z 는 평소 글자 편집), 우클릭 메뉴 "내용 지우기 (Del)"
- 캐시 버전 20261001m, 문서 갱신

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 14:03:57 +09:00
parent 4af1ad8848
commit 75b82024de
10 changed files with 68 additions and 16 deletions
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001l" />
<link rel="stylesheet" href="/static/project.css?v=20261001m" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -246,5 +246,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20261001l" defer></script>
<script src="/static/project.js?v=20261001m" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001l" />
<link rel="stylesheet" href="/static/project.css?v=20261001m" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -210,5 +210,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20261001l" defer></script>
<script src="/static/project.js?v=20261001m" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001l" />
<link rel="stylesheet" href="/static/project.css?v=20261001m" />
<link rel="stylesheet" href="/static/project-help.css?v=20260926v" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001l" />
<link rel="stylesheet" href="/static/project.css?v=20261001m" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -104,5 +104,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20261001l" defer></script>
<script src="/static/project.js?v=20261001m" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001l" />
<link rel="stylesheet" href="/static/project.css?v=20261001m" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -100,5 +100,5 @@
"today": {{ today | tojson }}
}
</script>
<script src="/static/project.js?v=20261001l" defer></script>
<script src="/static/project.js?v=20261001m" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001l" />
<link rel="stylesheet" href="/static/project.css?v=20261001m" />
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — self-host -->
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
<!-- 타임라인 vis-timeline — self-host -->
@@ -496,5 +496,5 @@
</script>
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
<script src="/static/project.js?v=20261001l" defer></script>
<script src="/static/project.js?v=20261001m" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001l" />
<link rel="stylesheet" href="/static/project.css?v=20261001m" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -70,5 +70,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20261001l" defer></script>
<script src="/static/project.js?v=20261001m" defer></script>
{% endblock %}
+15 -3
View File
@@ -2100,7 +2100,12 @@ textarea.pj-goal-text {
display: block; width: 100%; box-sizing: border-box; min-height: 46px; padding: 6px; border: none;
background: transparent; font: inherit; line-height: 1.5; color: inherit; resize: none; overflow: hidden;
}
textarea.pj-goal-text:focus { outline: 2px solid var(--pj-accent); outline-offset: -2px; background: rgba(255, 255, 255, .75); }
/* 입력 중인 칸 — 테두리·밝은 배경은 입력칸(글 높이만큼)이 아니라 칸 전체(td)에 */
textarea.pj-goal-text:focus { outline: none; }
.pj-goal-table td.pj-goal-texttd:focus-within {
box-shadow: inset 0 0 0 2px var(--pj-accent);
background-image: linear-gradient(rgba(255, 255, 255, .75), rgba(255, 255, 255, .75));
}
textarea.pj-goal-text::placeholder { color: rgba(0, 0, 0, .3); }
.pj-goal-text-ro { min-height: 46px; padding: 6px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.pj-goal-area td.is-now { box-shadow: inset 2px 0 0 rgba(123, 104, 238, .35), inset -2px 0 0 rgba(123, 104, 238, .35); }
@@ -2320,14 +2325,21 @@ textarea.pj-meet-text, .pj-meet-notes textarea {
display: block; width: 100%; box-sizing: border-box; min-height: 38px; padding: 6px; border: none; background: transparent;
font: inherit; line-height: 1.5; color: inherit; resize: none; overflow: hidden;
}
textarea.pj-meet-text:focus, .pj-meet-notes textarea:focus { outline: 2px solid var(--pj-accent); outline-offset: -2px; background: rgba(255, 255, 255, .8); }
textarea.pj-meet-text:focus { outline: none; }
.pj-meet-notes textarea:focus { outline: 2px solid var(--pj-accent); outline-offset: -2px; background: rgba(255, 255, 255, .8); }
/* 입력 중인 칸 — 칸 전체(td) 테두리 */
.pj-meet-table td:focus-within:not(.pj-meet-c-eval) {
box-shadow: inset 0 0 0 2px var(--pj-accent);
background-image: linear-gradient(rgba(255, 255, 255, .8), rgba(255, 255, 255, .8));
}
.pj-meet-ro { min-height: 38px; padding: 6px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.pj-meet-table td.pj-meet-c-amt { text-align: right; vertical-align: middle; padding: 0 6px; font-variant-numeric: tabular-nums; }
input.pj-meet-amount {
display: block; width: 100%; box-sizing: border-box; height: 34px; padding: 0 4px; border: none; background: transparent;
font: inherit; text-align: right; font-variant-numeric: tabular-nums;
}
input.pj-meet-amount:focus { outline: 2px solid var(--pj-accent); outline-offset: -2px; background: #fff; }
input.pj-meet-amount:focus { outline: none; background: transparent; }
.pj-meet-kpi input.pj-meet-amount:focus { outline: 2px solid var(--pj-accent); outline-offset: -1px; }
input.pj-meet-amount::placeholder { color: rgba(0, 0, 0, .28); }
.pj-meet-auto { color: #1d4ed8; font-weight: 600; }
.pj-meet-market.is-off { background: #fdecec; color: #b42318; }
+36
View File
@@ -8698,6 +8698,39 @@
} catch (err) { showToast("병합 해제 실패: " + err.message, "error"); }
};
// 고른 칸 내용 지우기(엑셀 Del) — 칸마다 바로 저장. 바로 직전 지우기는 Ctrl+Z 로 되돌린다(입력 중이 아닐 때).
let lastCleared = null; // [[textarea, 예전 글], …]
const clearSel = async function (s) {
const tas = s.cells.filter(function (c) { return hits(c, s); })
.map(function (c) { return c.td.querySelector("textarea.pj-goal-text"); })
.filter(function (ta) { return ta && ta.value !== ""; });
if (!tas.length) return;
lastCleared = tas.map(function (ta) { return [ta, ta.value]; });
tas.forEach(function (ta) { ta.value = ""; fit(ta); });
await Promise.all(tas.map(saveText));
showToast(tas.length + "칸 내용을 지웠습니다 — Ctrl+Z 로 되돌리기");
};
const undoClear = async function () {
const list = (lastCleared || []).filter(function (x) { return document.contains(x[0]); });
lastCleared = null;
if (!list.length) return;
list.forEach(function (x) { x[0].value = x[1]; fit(x[0]); });
await Promise.all(list.map(function (x) { return saveText(x[0]); }));
showToast(list.length + "칸 내용을 되돌렸습니다");
};
const typing = function () {
const a = document.activeElement;
return !!(a && (a.matches("textarea, input, select") || a.isContentEditable));
};
document.addEventListener("keydown", function (e) {
if (typing()) return;
if (e.key === "Delete" && sel) { e.preventDefault(); clearSel(sel); }
else if ((e.ctrlKey || e.metaKey) && !e.shiftKey && (e.key === "z" || e.key === "Z") && lastCleared) {
e.preventDefault();
undoClear();
}
});
// 끌어서 고르기 — 다른 칸으로 넘어가는 순간부터 범위 선택(글 선택·입력칸 포커스는 막는다)
table.addEventListener("mousedown", function (e) {
if (e.button !== 0) return;
@@ -8759,6 +8792,9 @@
items.push({ label: "병합 해제" + (mergedIn.length > 1 ? " (" + mergedIn.length + "곳)" : ""), icon: menuIcon("call_split"),
onClick: function () { clearMergeSel(); unmerge(mergedIn); } });
}
if (inSel.some(function (c) { const t = c.td.querySelector("textarea.pj-goal-text"); return t && t.value; })) {
items.push({ label: "내용 지우기 (Del)", icon: menuIcon("ink_eraser"), onClick: function () { clearSel(s); } });
}
if (td.dataset.month === "0" && s.n === 1) { // 3열(연간 칸) 하나 우클릭 — 줄 추가·삭제도
const r = yearCellRows(td);
if (items.length) items.push(null);
+4
View File
@@ -577,6 +577,10 @@ description 을 항상 HTML로 취급하기 때문). 두 번 실행하면 이중
- **칸 아무 곳이나 눌러 입력**(엑셀처럼) — 글 칸(textarea)은 글 높이만큼이라, 옆 칸 글이 길거나 세로 병합으로 칸이 길면 아래쪽을 눌러도
입력이 안 됐다. 이제 업무 영역 글 칸(`td.pj-goal-texttd`)·회의록 글/금액 칸 아무 곳이나 누르면 그 칸 입력으로 들어가고 커서는 글 끝.
칸 전체가 글 입력 마우스 모양. Shift+클릭(범위 고르기)·끌기(병합 선택)는 그대로.
입력 중 테두리·밝은 배경도 입력칸이 아니라 **칸 전체**(`td:focus-within`, 회의록 표도 같음).
- **고른 칸 내용 지우기(엑셀 Del)** — 끌기·Shift+클릭으로 고른 범위에서 Del → 범위 안 글 칸을 비우고 칸마다 바로 저장, 안내 토스트.
바로 직전 지우기는 **Ctrl+Z** 로 되돌림(되돌린 값도 저장). 입력 중(글 칸에 커서)일 때의 Del·Ctrl+Z 는 평소 글자 편집.
우클릭 메뉴에도 "내용 지우기 (Del)"(`ink_eraser`, 고른 범위에 글이 있을 때).
- **우클릭 메뉴 아이콘** — `menuIcon(name)`(Material Symbols)을 `showContextMenu` 항목 `icon` 에: 위에 줄 추가 `add_row_above` ·
아래에 줄 추가 `add_row_below` · 줄 삭제 `delete`(빨강) · 셀 병합 `cell_merge` · 병합 해제 `call_split` · 항목 칸 나누기
`horizontal_split` · (회의록) 위로/아래로 `arrow_upward`/`arrow_downward` · 쇼핑몰 연결 `link` · 연결 안 함 `link_off` · 쇼핑몰 `storefront`.