From 4c9a9199ada15556736522c68c7109baa5d82636 Mon Sep 17 00:00:00 2001 From: king Date: Sat, 26 Sep 2026 15:16:24 +0900 Subject: [PATCH] =?UTF-8?q?fix(project):=20=EC=BA=98=EB=A6=B0=EB=8D=94=20?= =?UTF-8?q?=E2=80=94=20=EB=8C=93=EA=B8=80=20=EC=95=84=EC=9D=B4=EC=BD=98?= =?UTF-8?q?=EC=9D=80=20=EB=8C=80=ED=99=94=EC=B0=BD=EB=A7=8C,=20=ED=95=9C?= =?UTF-8?q?=20=EB=8B=AC=EC=9D=B4=20=EC=8A=A4=ED=81=AC=EB=A1=A4=20=EC=97=86?= =?UTF-8?q?=EC=9D=B4,=20=EB=A7=89=EB=8C=80=EA=B0=80=20=EA=B3=B5=ED=9C=B4?= =?UTF-8?q?=EC=9D=BC=20=EC=9D=B4=EB=A6=84=EC=9D=84=20=EC=95=88=20=EA=B0=80?= =?UTF-8?q?=EB=A6=AC=EA=B2=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 캘린더 막대의 댓글 말풍선을 누르면 막대 누르기(편집 창 열기·드래그)를 시작하지 않는다 — 댓글 대화창만 열린다 - 캘린더 보기를 세로로 채우고 주(행)가 남은 높이를 나눠 씀(주 최소 134px → 82px), 주마다 막대 줄 수를 실제 높이로 계산(다 들어가면 전부, 넘치면 "+N 더"), 창 크기가 바뀌면 다시 계산 - 공휴일 이름을 날짜 숫자와 한 줄에 — 34px 아래부터 그리는 막대에 가려지지 않음 - 정적 파일 버전 20260926t Co-Authored-By: Claude Opus 5.5 --- .../project/templates/project/help.html | 4 ++-- .../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 | 16 ++++++++++++++-- 7 files changed, 38 insertions(+), 16 deletions(-) diff --git a/app/modules/project/templates/project/help.html b/app/modules/project/templates/project/help.html index 54d5aea..3c0f880 100644 --- a/app/modules/project/templates/project/help.html +++ b/app/modules/project/templates/project/help.html @@ -1,8 +1,8 @@ {% 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 8d517bf..3e99321 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 %} @@ -101,5 +101,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 e204edf..9105fab 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 b8b522d..adb2077 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 %} - + @@ -473,5 +473,5 @@ - + {% endblock %} diff --git a/app/modules/project/templates/project/trash.html b/app/modules/project/templates/project/trash.html index 411e3d6..056b8bc 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 3d5b2d4..45e9730 100644 --- a/app/static/project.css +++ b/app/static/project.css @@ -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열 그리드로 겹쳐 그림 */ diff --git a/app/static/project.js b/app/static/project.js index 119e6ec..cd02db3 100644 --- a/app/static/project.js +++ b/app/static/project.js @@ -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;