fix(project): 연간 목표 — 월 칸 너비 85px, 영역 색에 색 없음 + 연한 16색
- 표 칸 너비를 여백 포함(border-box)으로 — 150px 이 padding 만큼 171px 로 늘던 문제, 월 칸 85px - 좁아진 칸에 맞춰 숫자·글 칸 안쪽 여백 6px - 색 바꾸기 팝업: 맨 위 색 없음(흰 배경) + 연한 16색(8칸×2줄, 기존 8색 포함) - project.js/css 캐시 버전 20260930b Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+10
-7
@@ -7632,23 +7632,26 @@
|
||||
closeColorPop();
|
||||
colorPop = document.createElement("div");
|
||||
colorPop.className = "pj-goal-colorpop";
|
||||
colorPop.innerHTML = colors.map(function (c) {
|
||||
return '<button type="button" class="pj-goal-swatch' + (c === current ? " is-on" : "") +
|
||||
'" data-c="' + c + '" style="background:' + c + '"></button>';
|
||||
}).join("");
|
||||
// 맨 위 "색 없음"(흰 배경, 빈 값) + 연한 16색(8칸×2줄)
|
||||
colorPop.innerHTML = '<button type="button" class="pj-goal-swatch-none' + (!current ? " is-on" : "") +
|
||||
'" data-c=""><span class="pj-goal-swatch-x"></span>색 없음</button>' +
|
||||
colors.map(function (c) {
|
||||
return '<button type="button" class="pj-goal-swatch' + (c === current ? " is-on" : "") +
|
||||
'" data-c="' + c + '" style="background:' + c + '"></button>';
|
||||
}).join("");
|
||||
document.body.appendChild(colorPop);
|
||||
const r = anchor.getBoundingClientRect();
|
||||
const w = colorPop.offsetWidth;
|
||||
colorPop.style.left = Math.max(8, Math.min(r.left, document.documentElement.clientWidth - w - 8)) + "px";
|
||||
colorPop.style.top = (r.bottom + 6) + "px";
|
||||
colorPop.addEventListener("click", async function (e) {
|
||||
const sw = e.target.closest(".pj-goal-swatch");
|
||||
const sw = e.target.closest(".pj-goal-swatch, .pj-goal-swatch-none");
|
||||
if (!sw) return;
|
||||
const c = sw.dataset.c;
|
||||
closeColorPop();
|
||||
try {
|
||||
await api("PUT", "/project/api/goals/areas/" + areaId, { color: c });
|
||||
tbody.style.setProperty("--goal-bg", c);
|
||||
await api("PUT", "/project/api/goals/areas/" + areaId, { color: c || "none" });
|
||||
tbody.style.setProperty("--goal-bg", c || "#fff");
|
||||
anchor.dataset.color = c;
|
||||
} catch (err) { showToast("색 변경 실패: " + err.message, "error"); }
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user