fix(project): 캘린더 — 댓글 아이콘은 대화창만, 한 달이 스크롤 없이, 막대가 공휴일 이름을 안 가리게

- 캘린더 막대의 댓글 말풍선을 누르면 막대 누르기(편집 창 열기·드래그)를
  시작하지 않는다 — 댓글 대화창만 열린다
- 캘린더 보기를 세로로 채우고 주(행)가 남은 높이를 나눠 씀(주 최소 134px → 82px),
  주마다 막대 줄 수를 실제 높이로 계산(다 들어가면 전부, 넘치면 "+N 더"),
  창 크기가 바뀌면 다시 계산
- 공휴일 이름을 날짜 숫자와 한 줄에 — 34px 아래부터 그리는 막대에 가려지지 않음
- 정적 파일 버전 20260926t

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-26 15:16:24 +09:00
parent 6a778a3702
commit 4c9a9199ad
7 changed files with 38 additions and 16 deletions
@@ -1,8 +1,8 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20260926s" />
<link rel="stylesheet" href="/static/project-help.css?v=20260926s" />
<link rel="stylesheet" href="/static/project.css?v=20260926t" />
<link rel="stylesheet" href="/static/project-help.css?v=20260926t" />
<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=20260926s" />
<link rel="stylesheet" href="/static/project.css?v=20260926t" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -101,5 +101,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20260926s" defer></script>
<script src="/static/project.js?v=20260926t" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20260926s" />
<link rel="stylesheet" href="/static/project.css?v=20260926t" />
<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=20260926s" defer></script>
<script src="/static/project.js?v=20260926t" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20260926s" />
<link rel="stylesheet" href="/static/project.css?v=20260926t" />
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — self-host -->
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
<!-- 타임라인 vis-timeline — self-host -->
@@ -473,5 +473,5 @@
</script>
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
<script src="/static/project.js?v=20260926s" defer></script>
<script src="/static/project.js?v=20260926t" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20260926s" />
<link rel="stylesheet" href="/static/project.css?v=20260926t" />
<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=20260926s" defer></script>
<script src="/static/project.js?v=20260926t" defer></script>
{% endblock %}
+14 -4
View File
@@ -400,15 +400,25 @@
.pj-today-btn { margin-left: auto; }
.pj-cal { border: 1px solid #e5e5e5; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
/* 캘린더 — 한 달이 스크롤 없이 화면에 다 들어가게: 보기 영역을 세로로 채우고 주(행)들이 남은 높이를
똑같이 나눠 쓴다(막대 줄 수는 JS 가 실제 높이로 계산, 넘치면 "+N 더"). */
.pj-view[data-view="calendar"]:not([hidden]) { display: flex; flex-direction: column; overflow: hidden; }
.pj-view[data-view="calendar"] .pj-cal-head { flex: none; }
.pj-view[data-view="calendar"] .pj-cal { flex: 1 1 auto; min-height: 0; }
.pj-view[data-view="calendar"] .pj-wd-row { flex: none; }
.pj-wd-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: #f2f2f2; border-bottom: 1px solid #e5e5e5; }
.pj-wd { text-align: center; padding: 8px 0; font-size: 15px; font-weight: 600; color: #0a0a0a; border-right: 1px solid #e5e5e5; }
.pj-wd:last-child { border-right: none; }
/* 주(week) — 날짜 셀 위에 bar 레이어 오버레이. 6주가 높이 균등 분할. */
.pj-week { position: relative; border-bottom: 1px solid #e5e5e5; flex: 1 1 0; min-height: 134px; display: flex; flex-direction: column; }
.pj-week { position: relative; border-bottom: 1px solid #e5e5e5; flex: 1 1 0; min-height: 82px; display: flex; flex-direction: column; }
.pj-week:last-child { border-bottom: none; }
.pj-week-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); flex: 1 1 auto; min-height: 0; }
.pj-day { height: 100%; border-right: 1px solid #e5e5e5; padding: 6px 8px; box-sizing: border-box; }
/* 날짜 칸 — 날짜 숫자와 공휴일 이름을 한 줄에(막대는 34px 아래부터라 공휴일 이름을 가리지 않는다) */
.pj-day {
height: 100%; border-right: 1px solid #e5e5e5; padding: 6px 8px; box-sizing: border-box;
display: flex; align-items: baseline; gap: 6px; min-width: 0;
}
.pj-day:last-child { border-right: none; }
.pj-day-num { font-size: 20px; font-weight: 600; color: #0a0a0a; }
.pj-out { background: #fafafa; }
@@ -423,8 +433,8 @@
#pj-timeline .vis-time-axis .vis-text.pj-tl-blue { color: #1d4ed8; }
#pj-timeline .vis-time-axis .vis-text.pj-tl-red { color: #c22b10; }
.pj-day-holiday {
display: block; font-size: 10.5px; color: #c22b10; font-weight: 600;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px;
display: block; flex: 1 1 auto; min-width: 0; font-size: 11px; color: #c22b10; font-weight: 600;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* bar 오버레이 — 날짜 숫자 아래(top)부터 7열 그리드로 겹쳐 그림 */
+14 -2
View File
@@ -2329,6 +2329,12 @@
}
if (moveScopeHighlight) moveScopeHighlight(false);
let calResizeTimer = null;
window.addEventListener("resize", function () {
if (currentView !== "calendar") return;
clearTimeout(calResizeTimer);
calResizeTimer = setTimeout(renderCalendar, 150);
});
function renderView(view) {
if (view === "calendar") renderCalendar();
else if (view === "timeline") renderTimeline();
@@ -2434,10 +2440,14 @@
const cont = weekEl.querySelector(".pj-week-bars");
cont.innerHTML = "";
// 이 주에 들어갈 막대 줄 수 — 달력이 화면 높이에 맞춰 줄어들므로 실제 높이로 센다
// (줄 22px + 간격 2px). 다 들어가면 전부, 넘치면 맨 아래 한 줄은 "+N 더" 자리.
const fitRows = cont.clientHeight ? Math.max(1, Math.floor((cont.clientHeight + 2) / 24)) : MAX_LANES + 1;
const maxLanes = lanesSorted.length <= fitRows ? fitRows : Math.max(1, fitRows - 1);
const overflow = [0, 0, 0, 0, 0, 0, 0];
bars.forEach(function (b) {
const row = rankOf[b.lane];
if (row >= MAX_LANES) { // 넘침 → 그 칸들 +N 카운트
if (row >= maxLanes) { // 넘침 → 그 칸들 +N 카운트
for (var c = b.startCol; c < b.startCol + b.span; c++) overflow[c]++;
return;
}
@@ -2458,7 +2468,7 @@
const m = document.createElement("div");
m.className = "pj-bar-more";
m.style.gridColumn = (col + 1) + " / span 1";
m.style.gridRow = (MAX_LANES + 1);
m.style.gridRow = (maxLanes + 1);
m.dataset.date = dayEls[col].dataset.date;
m.textContent = "+" + overflow[col] + " 더";
cont.appendChild(m);
@@ -2478,6 +2488,8 @@
});
bar.addEventListener("mousedown", function (e) {
if (e.button !== 0) return;
// 댓글 말풍선 — 댓글 대화창만 연다(문서 클릭 처리). 편집 창·드래그는 시작하지 않는다.
if (e.target.closest && e.target.closest(".pj-cmt-badge")) return;
e.preventDefault();
const taskId = bar.dataset.taskId;
const sx = e.clientX, sy = e.clientY;