From 75b82024de3d291d9b4f776b01185d01fc593878 Mon Sep 17 00:00:00 2001 From: king Date: Thu, 1 Oct 2026 14:03:57 +0900 Subject: [PATCH] =?UTF-8?q?fix(project):=20=EC=9E=85=EB=A0=A5=20=EC=A4=91?= =?UTF-8?q?=20=ED=85=8C=EB=91=90=EB=A6=AC=EB=A5=BC=20=EC=B9=B8=20=EC=A0=84?= =?UTF-8?q?=EC=B2=B4=EB=A1=9C,=20=EA=B3=A0=EB=A5=B8=20=EC=B9=B8=20Del=20?= =?UTF-8?q?=EB=A1=9C=20=EB=82=B4=EC=9A=A9=20=EC=A7=80=EC=9A=B0=EA=B8=B0(Ct?= =?UTF-8?q?rl+Z=20=EB=90=98=EB=8F=8C=EB=A6=AC=EA=B8=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 목표 표·회의록: 입력 중 보라 테두리·밝은 배경을 입력칸(글 높이) 대신 칸 전체(td:focus-within)에 - 끌기·Shift+클릭으로 고른 칸에서 Del → 글 지우고 칸마다 저장, Ctrl+Z 로 바로 직전 지우기 되돌림 (입력 중일 때의 Del·Ctrl+Z 는 평소 글자 편집), 우클릭 메뉴 "내용 지우기 (Del)" - 캐시 버전 20261001m, 문서 갱신 Co-Authored-By: Claude Opus 5.5 --- .../templates/project/goal_meeting.html | 4 +-- .../project/templates/project/goals.html | 4 +-- .../project/templates/project/help.html | 2 +- .../project/templates/project/inbox.html | 4 +-- .../project/templates/project/mytasks.html | 4 +-- .../project/templates/project/project.html | 4 +-- .../project/templates/project/trash.html | 4 +-- app/static/project.css | 18 ++++++++-- app/static/project.js | 36 +++++++++++++++++++ docs/PROJECT_MODULE.md | 4 +++ 10 files changed, 68 insertions(+), 16 deletions(-) diff --git a/app/modules/project/templates/project/goal_meeting.html b/app/modules/project/templates/project/goal_meeting.html index c618899..e7c1259 100644 --- a/app/modules/project/templates/project/goal_meeting.html +++ b/app/modules/project/templates/project/goal_meeting.html @@ -1,7 +1,7 @@ {% extends "erp_base.html" %} {% block head_extra %} - + {% endblock %} @@ -246,5 +246,5 @@ {% include "project/_side_modals.html" %} {% include "project/_member_tasks_modal.html" %} - + {% endblock %} diff --git a/app/modules/project/templates/project/goals.html b/app/modules/project/templates/project/goals.html index 75cfb90..9e85a10 100644 --- a/app/modules/project/templates/project/goals.html +++ b/app/modules/project/templates/project/goals.html @@ -1,7 +1,7 @@ {% extends "erp_base.html" %} {% block head_extra %} - + {% endblock %} @@ -210,5 +210,5 @@ {% include "project/_side_modals.html" %} {% include "project/_member_tasks_modal.html" %} - + {% endblock %} diff --git a/app/modules/project/templates/project/help.html b/app/modules/project/templates/project/help.html index 157993c..8202f43 100644 --- a/app/modules/project/templates/project/help.html +++ b/app/modules/project/templates/project/help.html @@ -1,7 +1,7 @@ {% extends "erp_base.html" %} {% block head_extra %} - + {% endblock %} diff --git a/app/modules/project/templates/project/inbox.html b/app/modules/project/templates/project/inbox.html index 338f27e..0921282 100644 --- a/app/modules/project/templates/project/inbox.html +++ b/app/modules/project/templates/project/inbox.html @@ -1,7 +1,7 @@ {% extends "erp_base.html" %} {% block head_extra %} - + {% endblock %} @@ -104,5 +104,5 @@ {% include "project/_side_modals.html" %} {% include "project/_member_tasks_modal.html" %} - + {% endblock %} diff --git a/app/modules/project/templates/project/mytasks.html b/app/modules/project/templates/project/mytasks.html index 5f9b9c2..db04143 100644 --- a/app/modules/project/templates/project/mytasks.html +++ b/app/modules/project/templates/project/mytasks.html @@ -1,7 +1,7 @@ {% extends "erp_base.html" %} {% block head_extra %} - + {% endblock %} @@ -100,5 +100,5 @@ "today": {{ today | tojson }} } - + {% endblock %} diff --git a/app/modules/project/templates/project/project.html b/app/modules/project/templates/project/project.html index 4a77f27..2c0440b 100644 --- a/app/modules/project/templates/project/project.html +++ b/app/modules/project/templates/project/project.html @@ -1,7 +1,7 @@ {% extends "erp_base.html" %} {% block head_extra %} - + @@ -496,5 +496,5 @@ - + {% endblock %} diff --git a/app/modules/project/templates/project/trash.html b/app/modules/project/templates/project/trash.html index cb76f25..13d039d 100644 --- a/app/modules/project/templates/project/trash.html +++ b/app/modules/project/templates/project/trash.html @@ -1,7 +1,7 @@ {% extends "erp_base.html" %} {% block head_extra %} - + {% endblock %} @@ -70,5 +70,5 @@ {% include "project/_side_modals.html" %} {% include "project/_member_tasks_modal.html" %} - + {% endblock %} diff --git a/app/static/project.css b/app/static/project.css index 8097cf1..b55a688 100644 --- a/app/static/project.css +++ b/app/static/project.css @@ -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; } diff --git a/app/static/project.js b/app/static/project.js index 65c7aa7..d86c141 100644 --- a/app/static/project.js +++ b/app/static/project.js @@ -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); diff --git a/docs/PROJECT_MODULE.md b/docs/PROJECT_MODULE.md index 7b61e20..aad55ed 100644 --- a/docs/PROJECT_MODULE.md +++ b/docs/PROJECT_MODULE.md @@ -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`.