fix(프로젝트): 옵션 시각 팝업 휠·마우스 오버·클릭 안 먹던 문제 — 모달 창 안에 붙임, 지우기·확인 동작·색

모달 dialog 가 열려 있으면 창 밖(body) 요소는 inert 라 popover 를 body 에 붙이면 마우스가 통과했다.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-11 14:50:55 +09:00
parent 0e6bb53c9c
commit 6e69abcfa3
13 changed files with 31 additions and 20 deletions
@@ -2,7 +2,7 @@
{% block head_extra %} {% block head_extra %}
{# 출고리스트 작성 팝업의 날짜 칸은 프로젝트 화면의 날짜 팝업을 그대로 쓴다 — project.js 는 PJ_LIB_ONLY 로 부품만 #} {# 출고리스트 작성 팝업의 날짜 칸은 프로젝트 화면의 날짜 팝업을 그대로 쓴다 — project.js 는 PJ_LIB_ONLY 로 부품만 #}
<link rel="stylesheet" href="/static/project.css?v=20261111d" /> <link rel="stylesheet" href="/static/project.css?v=20261111e" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" /> <link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
<link rel="stylesheet" href="/static/cupang.css?v=20261023d" /> <link rel="stylesheet" href="/static/cupang.css?v=20261023d" />
<script>window.PJ_LIB_ONLY = true; window.PJ_HOLIDAYS = {{ (pj_kr_holidays or {}) | tojson }};</script> <script>window.PJ_LIB_ONLY = true; window.PJ_HOLIDAYS = {{ (pj_kr_holidays or {}) | tojson }};</script>
@@ -2,7 +2,7 @@
{% block head_extra %} {% block head_extra %}
{# 프로젝트 화면 부품(설명 편집기·날짜 팝업·멤버 고르기)을 그대로 쓴다 — project.js 는 PJ_LIB_ONLY 로 부품만 #} {# 프로젝트 화면 부품(설명 편집기·날짜 팝업·멤버 고르기)을 그대로 쓴다 — project.js 는 PJ_LIB_ONLY 로 부품만 #}
<link rel="stylesheet" href="/static/project.css?v=20261111d" /> <link rel="stylesheet" href="/static/project.css?v=20261111e" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" /> <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> <script>window.PJ_LIB_ONLY = true; window.PJ_HOLIDAYS = {{ (pj_kr_holidays or {}) | tojson }};</script>
{% endblock %} {% endblock %}
@@ -129,4 +129,4 @@
document.documentElement.dataset.pjFont = pf; document.documentElement.dataset.pjFont = pf;
} catch (_) {} } catch (_) {}
</script> </script>
<script src="/static/project-options.js?v=20261111c" defer></script> <script src="/static/project-options.js?v=20261111d" defer></script>
@@ -1,7 +1,7 @@
{% extends "project/_meeting_content_base.html" if meeting_embedded else "erp_base.html" %} {% extends "project/_meeting_content_base.html" if meeting_embedded else "erp_base.html" %}
{% block head_extra %} {% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261111d" /> <link rel="stylesheet" href="/static/project.css?v=20261111e" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" /> <link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %} {% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %} {% extends "erp_base.html" %}
{% block head_extra %} {% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261111d" /> <link rel="stylesheet" href="/static/project.css?v=20261111e" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" /> <link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %} {% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %} {% extends "erp_base.html" %}
{% block head_extra %} {% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261111d" /> <link rel="stylesheet" href="/static/project.css?v=20261111e" />
<link rel="stylesheet" href="/static/project-help.css?v=20261003a" /> <link rel="stylesheet" href="/static/project-help.css?v=20261003a" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" /> <link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %} {% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %} {% extends "erp_base.html" %}
{% block head_extra %} {% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261111d" /> <link rel="stylesheet" href="/static/project.css?v=20261111e" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" /> <link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %} {% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %} {% extends "erp_base.html" %}
{% block head_extra %} {% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261111d" /> <link rel="stylesheet" href="/static/project.css?v=20261111e" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" /> <link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %} {% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %} {% extends "erp_base.html" %}
{% block head_extra %} {% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261111d" /> <link rel="stylesheet" href="/static/project.css?v=20261111e" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" /> <link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %} {% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %} {% extends "erp_base.html" %}
{% block head_extra %} {% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261111d" /> <link rel="stylesheet" href="/static/project.css?v=20261111e" />
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — self-host --> <!-- 구글 머티리얼 심볼(담당자 아이콘 등) — self-host -->
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" /> <link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
<!-- 타임라인 vis-timeline — self-host --> <!-- 타임라인 vis-timeline — self-host -->
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %} {% extends "erp_base.html" %}
{% block head_extra %} {% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261111d" /> <link rel="stylesheet" href="/static/project.css?v=20261111e" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" /> <link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %} {% endblock %}
+15 -9
View File
@@ -65,7 +65,9 @@
// ── 시각 고르기 팝업(2026-11-11) — 날짜 팝업(.pj-datepop)과 같은 카드·꼬리·파란 선택. // ── 시각 고르기 팝업(2026-11-11) — 날짜 팝업(.pj-datepop)과 같은 카드·꼬리·파란 선택.
// 시(00~23)·분(00~55, 5분 단위) 두 열, 브라우저 기본 시계처럼 돌아가지 않고 끝에서 멈춘다. // 시(00~23)·분(00~55, 5분 단위) 두 열, 브라우저 기본 시계처럼 돌아가지 않고 끝에서 멈춘다.
// 모달 창 위에 떠야 해서 popover(top layer)로 body 에 붙인다. 시 = 바꾸고 열어 둠, 분 = 바꾸고 닫음. // 모달 창 위에 떠야 해서 popover(top layer) — 단 옵션 창(dialog) **안에** 붙인다: 모달이 열려 있으면 창 밖 요소는
// inert 라 body 에 붙이면 휠·마우스 오버·클릭이 모두 안 먹었다(2026-11-11). 시 = 바꾸고 열어 둠, 분 = 바꾸고 닫음.
// [확인] = 지금 값 저장 후 닫기, [지우기] = 시각 비우고 닫기(저장 버튼을 눌러야 서버에 반영).
let timePop = null, timePopOff = null; let timePop = null, timePopOff = null;
function closeTimePop() { function closeTimePop() {
if (!timePop) return; if (!timePop) return;
@@ -96,7 +98,7 @@
'<div class="pj-dp-foot"><button type="button" class="pj-dp-link" data-tp="clear">지우기</button>' + '<div class="pj-dp-foot"><button type="button" class="pj-dp-link" data-tp="clear">지우기</button>' +
'<button type="button" class="pj-dp-link" data-tp="ok">확인</button></div>'; '<button type="button" class="pj-dp-link" data-tp="ok">확인</button></div>';
paintHead(); paintHead();
document.body.appendChild(pop); // 배율(.pj-ui-scale) 밖 dialog.appendChild(pop);
try { pop.showPopover(); } catch (_) {} try { pop.showPopover(); } catch (_) {}
function commit() { if (h) setTimeBtn(btn, h + ":" + (m || "00")); } function commit() { if (h) setTimeBtn(btn, h + ":" + (m || "00")); }
pop.addEventListener("click", function (e) { pop.addEventListener("click", function (e) {
@@ -111,19 +113,23 @@
return; return;
} }
const act = e.target.closest("[data-tp]"); const act = e.target.closest("[data-tp]");
if (act && act.dataset.tp === "clear") setTimeBtn(btn, ""); if (!act) return;
if (act) closeTimePop(); if (act.dataset.tp === "clear") { h = m = ""; setTimeBtn(btn, ""); }
else commit();
closeTimePop(); btn.focus();
}); });
// 자리 — 앵커 아래(자리 없으면 위), 꼬리가 앵커 가운데(날짜 팝업 place 와 같음) // 자리 — 앵커 아래(자리 없으면 위), 꼬리가 앵커 가운데(날짜 팝업 place 와 같음).
// 화면 배율(.pj-ui-scale zoom) 안이면 left/top 값도 배율만큼 줄어 보이므로 나눠 준다(currentCSSZoom).
const z = pop.currentCSSZoom || 1;
const r = btn.getBoundingClientRect(); const r = btn.getBoundingClientRect();
const vw = document.documentElement.clientWidth, vh = document.documentElement.clientHeight; const vw = document.documentElement.clientWidth, vh = document.documentElement.clientHeight;
const w = pop.offsetWidth, ph = pop.offsetHeight, ax = r.left + r.width / 2; const w = pop.offsetWidth * z, ph = pop.offsetHeight * z, ax = r.left + r.width / 2;
const left = Math.min(Math.max(8, ax - w / 2), vw - w - 8); const left = Math.min(Math.max(8, ax - w / 2), vw - w - 8);
const below = r.bottom + 10 + ph <= vh - 8 || r.top - 10 - ph < 8; const below = r.bottom + 10 + ph <= vh - 8 || r.top - 10 - ph < 8;
pop.classList.toggle("is-above", !below); pop.classList.toggle("is-above", !below);
pop.style.left = left + "px"; pop.style.left = left / z + "px";
pop.style.top = (below ? r.bottom + 10 : r.top - 10 - ph) + "px"; pop.style.top = (below ? r.bottom + 10 : r.top - 10 - ph) / z + "px";
pop.style.setProperty("--pj-dp-tail", Math.min(Math.max(ax - left, 16), w - 16) + "px"); pop.style.setProperty("--pj-dp-tail", Math.min(Math.max(ax - left, 16), w - 16) / z + "px");
// 고른 값이 보이게 — 열 안에서만 스크롤(맨 위 00 부터, 끝에서 멈춤) // 고른 값이 보이게 — 열 안에서만 스크롤(맨 위 00 부터, 끝에서 멈춤)
pop.querySelectorAll(".pj-tp-col").forEach(function (c) { pop.querySelectorAll(".pj-tp-col").forEach(function (c) {
const sel = c.querySelector(".is-selected"); const sel = c.querySelector(".is-selected");
+5
View File
@@ -3321,6 +3321,11 @@ label.pj-options-row[for] { cursor: pointer; }
.pj-tp-item { flex: none; height: 32px; border: 0; border-radius: 16px; background: transparent; font: inherit; font-size: 13.5px; font-variant-numeric: tabular-nums; color: var(--pj-ink); cursor: pointer; } .pj-tp-item { flex: none; height: 32px; border: 0; border-radius: 16px; background: transparent; font: inherit; font-size: 13.5px; font-variant-numeric: tabular-nums; color: var(--pj-ink); cursor: pointer; }
.pj-tp-item:hover { background: #f1f2f4; } .pj-tp-item:hover { background: #f1f2f4; }
.pj-tp-item.is-selected { background: #4573d2; color: #fff; font-weight: 600; } .pj-tp-item.is-selected { background: #4573d2; color: #fff; font-weight: 600; }
.pj-timepop .pj-dp-link { transition: background .12s, color .12s; }
.pj-timepop .pj-dp-link[data-tp="clear"]:hover { background: #fdecec; color: #b42318; }
.pj-timepop .pj-dp-link[data-tp="ok"] { color: #4573d2; }
.pj-timepop .pj-dp-link[data-tp="ok"]:hover { background: #4573d2; color: #fff; }
.pj-timepop .pj-dp-link:active { transform: translateY(1px); }
.pj-options-times:empty::before { content: "알림 없음"; font-size: 12px; color: var(--pj-ink-soft); } .pj-options-times:empty::before { content: "알림 없음"; font-size: 12px; color: var(--pj-ink-soft); }
.pj-options-allview:empty::before { content: "불러오는 중…"; padding: 6px; font-size: 12px; color: var(--pj-ink-soft); } .pj-options-allview:empty::before { content: "불러오는 중…"; padding: 6px; font-size: 12px; color: var(--pj-ink-soft); }
/* 켜기/끄기 스위치 */ /* 켜기/끄기 스위치 */