feat(project): asana icons, 12-col colors, bold sections, all-view menu, desc text color/size

- Project edit modal: color palette 12 columns; icon tabs [기본 아이콘] /
  [아사나 아이콘] (33 filled icons, value "asana:<name>", 6KB subset font
  material-symbols-asana.woff2)
- Section names bold (board column, list group, rename input)
- Inbox: clicking the left inbox area closes the task side panel
- Replace top-right scope toggle with admin-only sidebar "전체 보기"
  (?scope=all, switches in place on project pages)
- Description editor: text color and size; server keeps only validated
  color / font-size on plain spans (desc_inline_style)
- Fix goals_meeting_ui [2e] for manual monthly target; bump asset versions

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-08 13:22:35 +09:00
parent 90fb06c48c
commit 11e9803965
19 changed files with 367 additions and 60 deletions
+34 -6
View File
@@ -315,7 +315,8 @@ html.pj-side-resizing, html.pj-side-resizing * { cursor: col-resize !important;
border-bottom: 1px solid #e2e4ea;
}
/* 세션 제목 — 아사나 보드의 16px/20px, 굵기 500 */
.pj-col-name { font-size: var(--pj-section-size); font-weight: 500; line-height: var(--pj-section-leading); }
/* 섹션 이름은 굵게(2026-10-08) */
.pj-col-name { font-size: var(--pj-section-size); font-weight: 700; line-height: var(--pj-section-leading); }
/* 세션 기본 담당자 아이콘 — 이름 옆에 작게 */
.pj-col-assignee { display: inline-flex; align-items: center; flex: 0 0 auto; }
.pj-col-assignee .pj-avatar { width: 20px; height: 20px; box-shadow: 0 0 0 1.5px #fff; }
@@ -331,7 +332,7 @@ html.pj-side-resizing, html.pj-side-resizing * { cursor: col-resize !important;
.pj-col-name.pj-col-name-editable:hover { background: rgba(0,0,0,.06); }
.pj-col-head-colored .pj-col-name.pj-col-name-editable:hover { background: rgba(255,255,255,.22); }
.pj-col-name-input {
font: inherit; font-size: var(--pj-section-size); font-weight: 500; color: var(--pj-ink);
font: inherit; font-size: var(--pj-section-size); font-weight: 700; color: var(--pj-ink);
min-width: 0; flex: 1 1 auto; max-width: 70%; padding: 2px 6px;
border: 1px solid var(--pj-accent); border-radius: 6px; background: #fff; outline: none; line-height: var(--pj-section-leading);
}
@@ -499,6 +500,7 @@ html.pj-side-resizing, html.pj-side-resizing * { cursor: col-resize !important;
border-bottom: 1px solid var(--pj-border) !important; white-space: nowrap; line-height: var(--pj-section-leading);
}
.pj-list-group-caret { font-size: 18px; color: var(--pj-ink-soft); }
.pj-list-group-name { font-weight: 700; }
.pj-list-group-count {
color: var(--pj-ink-soft); font-weight: 700; font-size: 11px; background: #eef0f2;
border-radius: 999px; min-width: 20px; height: 20px; padding: 0 6px;
@@ -899,7 +901,8 @@ html.pj-ui-scale #pj-timeline { zoom: calc(1 / var(--pj-z)); --tz: var(--pj-z);
.pj-btn-complete.is-done { background: #f2f2f4; color: #6b6f76; border-color: var(--pj-border); }
/* 색상표(아사나) — 8칸씩 둥근 네모, 고른 색엔 체크 */
.pj-color-palette, #pj-f-colors { display: grid; grid-template-columns: repeat(8, 26px); gap: 8px; margin-top: 6px; }
/* 12칸씩(2026-10-08) — 32색이 3줄 */
.pj-color-palette, #pj-f-colors { display: grid; grid-template-columns: repeat(12, 26px); gap: 8px; margin-top: 6px; }
.pj-color-swatch {
position: relative; width: 26px; height: 26px; padding: 0; border: none; border-radius: 6px; cursor: pointer;
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
@@ -912,10 +915,22 @@ html.pj-ui-scale #pj-timeline { zoom: calc(1 / var(--pj-z)); --tz: var(--pj-z);
}
.pj-color-swatch.is-dark.is-active::after { color: #fff; }
/* 프로젝트 아이콘 고르기(아사나) — 회색 아이콘 격자, 고른 것은 보라 강조. 길면 칸 안에서 스크롤 */
.pj-icon-palette {
.pj-icon-palette { margin-top: 6px; }
.pj-icon-grid {
/* 높이 제한 없음 — 아이콘 전부가 스크롤 없이 보이고 팝업이 그만큼 길어진다 */
display: grid; grid-template-columns: repeat(auto-fill, 38px); gap: 6px; margin-top: 6px; padding: 2px;
display: grid; grid-template-columns: repeat(auto-fill, 38px); gap: 6px; padding: 2px;
}
/* [기본 아이콘] [아사나 아이콘] 탭 — "아이콘" 글자 오른쪽 */
.pj-icon-tabs { display: inline-flex; gap: 2px; margin-left: 10px; padding: 2px; border-radius: 8px; background: #f1f2f4; vertical-align: middle; }
.pj-icon-tab { border: none; background: transparent; padding: 3px 10px; border-radius: 6px; font: inherit; font-size: 12.5px; color: var(--pj-ink-soft); cursor: pointer; }
.pj-icon-tab:hover { color: var(--pj-ink); }
.pj-icon-tab.is-active { background: #fff; color: var(--pj-ink); font-weight: 600; box-shadow: 0 1px 2px rgba(16, 24, 40, .12); }
/* 아사나 아이콘 — 채워진 모양(Material Symbols FILL 1, 쓰는 33개만 담은 글꼴). 값은 "asana:이름" */
@font-face {
font-family: "Material Symbols Asana"; font-style: normal; font-weight: 400; font-display: block;
src: url(/static/vendor/material-symbols/material-symbols-asana.woff2) format("woff2");
}
.material-symbols-outlined.pj-ic-asana { font-family: "Material Symbols Asana"; }
.pj-icon-pick {
width: 38px; height: 38px; padding: 0; border: none; border-radius: 8px; background: transparent;
color: #6d6e6f; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
@@ -1145,7 +1160,7 @@ html.pj-ui-scale #pj-timeline { zoom: calc(1 / var(--pj-z)); --tz: var(--pj-z);
/* ── 보드 단계 컨트롤 ── */
.pj-col-head { position: relative; }
.pj-col-name { font-weight: 500; font-size: var(--pj-section-size); line-height: var(--pj-section-leading); }
.pj-col-name { font-weight: 700; font-size: var(--pj-section-size); line-height: var(--pj-section-leading); }
.pj-icon-btn[disabled] { opacity: .3; cursor: default; }
.pj-add-stage { width: 100%; padding: 10px; border: 1px dashed #c9cdd3; border-radius: 12px; background: #fff; color: #6b7280; font-size: 13px; font-weight: 600; cursor: pointer; }
.pj-add-stage:hover { border-color: #1e1f21; color: #1e1f21; }
@@ -3009,3 +3024,16 @@ html[data-pj-font="nanum-square-round"] { --pj-font: "NanumSquareRound", var(--p
.pj-notifier-back:hover { color: var(--pj-accent-dark); text-decoration: underline; }
.pj-inbox-notifier { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.pj-inbox-notifier .material-symbols-outlined { font-size: 18px; }
/* 설명란 글자 색·크기 고르기(2026-10-08) — body 에 붙는 작은 창 */
.pj-desc-stylepop {
position: fixed; z-index: 1200; display: flex; gap: 4px; padding: 6px; background: #fff;
border: 1px solid var(--pj-border); border-radius: 10px; box-shadow: 0 8px 24px rgba(16, 24, 40, .16);
}
.pj-desc-stylepop.is-size { flex-direction: column; min-width: 120px; }
.pj-desc-stylepop button {
border: none; background: transparent; border-radius: 6px; cursor: pointer; font: inherit; color: var(--pj-ink);
padding: 4px 8px; text-align: left; line-height: 1.3;
}
.pj-desc-stylepop button:hover { background: #f1f2f4; }
.pj-desc-colorchip { display: inline-block; width: 22px; text-align: center; font-weight: 700; font-size: 15px; }
+166 -20
View File
@@ -1202,29 +1202,57 @@
return function () { return selected; };
}
// ── 프로젝트 아이콘(아사나식) — window.PJ_ICONS(Material Symbols 이름) 격자.
// 첫 칸 "Aa" = 아이콘 없음(프로젝트 색 + 이름 첫 글자). 반환 = 지금 고른 이름("" = 없음).
// ── 프로젝트 아이콘(아사나식) — [기본 아이콘] window.PJ_ICONS(Material Symbols 외곽선) /
// [아사나 아이콘] window.PJ_ASANA_ICONS(채워진 모양, 값은 "asana:" + 이름) 두 탭. 탭은 "아이콘" 글자 오른쪽(.pj-icon-tabs).
// 첫 칸 "Aa" = 아이콘 없음(프로젝트 색 + 이름 첫 글자). 반환 = 지금 고른 값("" = 없음).
const ASANA_IC = "asana:";
function projIconSpan(icon, cls) {
const v = String(icon || ""), a = v.indexOf(ASANA_IC) === 0;
return '<span class="material-symbols-outlined' + (cls ? " " + cls : "") + (a ? " pj-ic-asana" : "") + '">' +
escapeHtml(a ? v.slice(ASANA_IC.length) : v) + "</span>";
}
function renderIconPalette(container, initial) {
if (!container) return function () { return ""; };
const icons = window.PJ_ICONS || [];
let selected = initial && icons.indexOf(initial) >= 0 ? initial : "";
container.innerHTML = [""].concat(icons).map(function (ic) {
return '<button type="button" class="pj-icon-pick' + (ic === selected ? " is-active" : "") +
'" data-icon="' + ic + '" title="' + (ic ? "아이콘" : "아이콘 없음(첫 글자)") + '">' +
(ic ? '<span class="material-symbols-outlined">' + ic + "</span>" : '<span class="pj-icon-pick-aa">Aa</span>') +
"</button>";
}).join("");
container.querySelectorAll(".pj-icon-pick").forEach(function (b) {
b.addEventListener("click", function () {
selected = b.dataset.icon;
container.querySelectorAll(".pj-icon-pick").forEach(function (x) { x.classList.toggle("is-active", x === b); });
});
});
const basic = window.PJ_ICONS || [];
const asana = (window.PJ_ASANA_ICONS || []).map(function (n) { return ASANA_IC + n; });
const known = basic.concat(asana);
let selected = initial && known.indexOf(initial) >= 0 ? initial : "";
let tab = selected.indexOf(ASANA_IC) === 0 ? "asana" : "basic";
const tabsHost = container.parentElement && container.parentElement.querySelector(".pj-icon-tabs");
function paint() {
if (tabsHost) {
tabsHost.innerHTML = asana.length
? '<button type="button" class="pj-icon-tab' + (tab === "basic" ? " is-active" : "") + '" data-tab="basic">기본 아이콘</button>' +
'<button type="button" class="pj-icon-tab' + (tab === "asana" ? " is-active" : "") + '" data-tab="asana">아사나 아이콘</button>'
: "";
}
const list = tab === "asana" ? asana : basic;
container.innerHTML = '<div class="pj-icon-grid">' + [""].concat(list).map(function (ic) {
return '<button type="button" class="pj-icon-pick' + (ic === selected ? " is-active" : "") +
'" data-icon="' + escapeHtml(ic) + '" title="' + (ic ? "아이콘" : "아이콘 없음(첫 글자)") + '">' +
(ic ? projIconSpan(ic) : '<span class="pj-icon-pick-aa">Aa</span>') + "</button>";
}).join("") + "</div>";
}
container.onclick = function (e) {
const b = e.target.closest(".pj-icon-pick");
if (!b) return;
selected = b.dataset.icon;
container.querySelectorAll(".pj-icon-pick").forEach(function (x) { x.classList.toggle("is-active", x === b); });
};
if (tabsHost) {
tabsHost.onclick = function (e) {
const t = e.target.closest(".pj-icon-tab");
if (!t || t.dataset.tab === tab) return;
tab = t.dataset.tab;
paint();
};
}
paint();
return function () { return selected; };
}
// 프로젝트 배지 안쪽 — 아이콘이 있으면 흰 아이콘, 없으면 이름 첫 글자(사이드바 목록·제목 공용).
function projBadgeInner(p) {
if (p && p.icon) return '<span class="material-symbols-outlined pj-proj-ic">' + escapeHtml(p.icon) + "</span>";
if (p && p.icon) return projIconSpan(p.icon, "pj-proj-ic");
return escapeHtml(((p && p.name) || "?").trim().charAt(0).toUpperCase() || "?");
}
@@ -3112,7 +3140,7 @@
const pillEl = document.querySelector(".pj-project-title-pill");
if (pillEl) {
pillEl.innerHTML =
'<span class="material-symbols-outlined pj-pill-ic">' + escapeHtml(currentProject.icon || "folder") + "</span>" +
projIconSpan(currentProject.icon || "folder", "pj-pill-ic") +
'<span class="pj-pill-name">' + escapeHtml(currentProject.name || "") + "</span>";
pillEl.style.setProperty("--pj-color", currentProject.color || "#4573d2");
pillEl.classList.toggle("is-light", isLightColor(currentProject.color || "#4573d2"));
@@ -3365,6 +3393,32 @@
});
}
if (moveScopeHighlight) moveScopeHighlight(false);
// 전체 보기(2026-10-08) — 오른쪽 위 토글 대신 왼쪽 메뉴 "전체 보기"(관리자만, ?scope=all). 토글은 숨겨 두고 상태만 쓴다.
const allViewLink = el("pj-side-allview");
function applyAllScope(on) {
viewScope = on ? "all" : "project";
if (scopeToggle) scopeToggle.querySelectorAll("[data-scope]").forEach(function (b) {
b.classList.toggle("is-active", b.dataset.scope === viewScope);
});
const titleWrap = el("pj-title-wrap");
if (titleWrap) titleWrap.classList.toggle("is-all-scope", on);
if (allViewLink) allViewLink.classList.toggle("is-active", on);
document.querySelectorAll(".pj-tree-li[data-id='" + projectId + "'] > .pj-tree-row").forEach(function (r) {
r.classList.toggle("is-active", !on);
});
}
if (isAdmin && new URLSearchParams(location.search).get("scope") === "all") applyAllScope(true); // 첫 그리기 전에
if (allViewLink && isAdmin) {
allViewLink.addEventListener("click", function (e) {
if (e.ctrlKey || e.metaKey || e.shiftKey || e.button === 1) return;
e.preventDefault(); // 같은 화면 안에서 바로 전환
applyAllScope(true);
try { const u = new URL(location.href); u.searchParams.set("scope", "all"); history.replaceState(null, "", u); } catch (_) {}
fillAssigneeFilter();
renderView(currentView);
updateFilterSummary();
});
}
let calResizeTimer = null;
window.addEventListener("resize", function () {
@@ -7479,6 +7533,11 @@
});
return;
}
// 글자 색·크기 — 고르는 창을 띄우고, 고르면 선택한 글자에 적용
if (cmd === "textColor" || cmd === "textSize") {
openStylePop(btn, cmd);
return;
}
// 체크리스트 — 글머리 목록처럼 켜고 끈다(줄마다 체크박스).
if (cmd === "insertCheckbox") {
toggleChecklist();
@@ -7500,10 +7559,92 @@
if (cmd === "createLink") normalizeEditorLinks(box);
updateFmtState();
});
// ── 글자 색·크기(2026-10-08) — execCommand 가 만든 <font> 를 곧바로 <span style> 로 바꾼다
// (서버 sanitize 는 span 의 color·font-size 만 받는다, store.desc_inline_style). "기본"은 표시용 색(#010203)·
// 크기 7 로 한 번 감싼 뒤 그 범위 안의 색/크기를 모두 지운다.
const TEXT_COLORS = [
["", "기본"], ["#e03e3e", "빨강"], ["#d9730d", "주황"], ["#dfab01", "노랑"], ["#0f7b6c", "초록"],
["#0b6e99", "파랑"], ["#4573d2", "하늘"], ["#6940a5", "보라"], ["#ad1a72", "분홍"], ["#787774", "회색"],
];
const TEXT_SIZES = [["12px", "작게"], ["", "보통"], ["18px", "크게"], ["22px", "더 크게"], ["28px", "제목"]];
const RESET_COLOR = "#010203";
let stylePop = null;
function closeStylePop() {
if (!stylePop) return;
stylePop.remove();
stylePop = null;
document.removeEventListener("mousedown", onStyleDoc, true);
}
function onStyleDoc(e) { if (stylePop && !stylePop.contains(e.target) && !e.target.closest(".pj-desc-fmtbtn")) closeStylePop(); }
function stripInside(node, prop) {
node.querySelectorAll("span[style]").forEach(function (sp) {
sp.style.removeProperty(prop);
if (!sp.getAttribute("style")) sp.removeAttribute("style");
});
}
function fontsToSpans(kind, value) {
box.querySelectorAll("font").forEach(function (f) {
const span = document.createElement("span");
const c = (f.getAttribute("color") || "").toLowerCase(), sz = f.getAttribute("size");
while (f.firstChild) span.appendChild(f.firstChild);
if (c) {
if (kind === "color") stripInside(span, "color");
if (c !== RESET_COLOR) span.style.color = c;
}
if (sz === "7" && kind === "size") {
stripInside(span, "font-size");
if (value) span.style.fontSize = value;
}
if (span.getAttribute("style")) f.replaceWith(span);
else f.replaceWith.apply(f, Array.prototype.slice.call(span.childNodes));
});
}
function applyTextStyle(kind, value, range) {
box.focus();
const sel = window.getSelection();
if (range) { sel.removeAllRanges(); sel.addRange(range); }
if (!sel.rangeCount || sel.isCollapsed) { showToast("바꿀 글자를 먼저 선택하세요.", "info"); return; }
try { document.execCommand("styleWithCSS", false, false); } catch (_) {}
try {
if (kind === "color") document.execCommand("foreColor", false, value || RESET_COLOR);
else document.execCommand("fontSize", false, "7");
} catch (_) {}
fontsToSpans(kind, value);
box.dispatchEvent(new Event("input", { bubbles: true }));
}
function openStylePop(btn, cmd) {
if (stylePop) { const same = stylePop.dataset.cmd === cmd; closeStylePop(); if (same) return; }
const sel = window.getSelection();
const range = sel && sel.rangeCount && box.contains(sel.anchorNode) ? sel.getRangeAt(0).cloneRange() : null;
stylePop = document.createElement("div");
stylePop.className = "pj-desc-stylepop" + (cmd === "textColor" ? " is-color" : " is-size");
stylePop.dataset.cmd = cmd;
stylePop.innerHTML = cmd === "textColor"
? TEXT_COLORS.map(function (c) {
return '<button type="button" data-v="' + c[0] + '" title="' + c[1] + '">' +
'<span class="pj-desc-colorchip" style="color:' + (c[0] || "var(--pj-ink)") + '">가</span></button>';
}).join("")
: TEXT_SIZES.map(function (z) {
return '<button type="button" data-v="' + z[0] + '"><span style="font-size:' + (z[0] || "var(--pj-text-size)") + '">' + z[1] + "</span></button>";
}).join("");
document.body.appendChild(stylePop); // 화면 배율(.pj-ui-scale) 밖 — body 에
const r = btn.getBoundingClientRect();
stylePop.style.left = Math.max(8, Math.min(r.left, document.documentElement.clientWidth - stylePop.offsetWidth - 8)) + "px";
stylePop.style.top = (r.bottom + 4) + "px";
stylePop.addEventListener("mousedown", function (e) { e.preventDefault(); }); // 편집칸 선택 유지
stylePop.addEventListener("click", function (e) {
const b = e.target.closest("button[data-v]");
if (!b) return;
applyTextStyle(cmd === "textColor" ? "color" : "size", b.dataset.v, range);
closeStylePop();
updateFmtState();
});
setTimeout(function () { document.addEventListener("mousedown", onStyleDoc, true); }, 0);
}
function updateFmtState() {
fmtbar.querySelectorAll(".pj-desc-fmtbtn[data-cmd]").forEach(function (btn) {
const cmd = btn.dataset.cmd;
if (cmd === "createLink" || cmd === "removeFormat") return;
if (cmd === "createLink" || cmd === "removeFormat" || cmd === "textColor" || cmd === "textSize") return;
const inChecklist = !!closestIn(selNode(), "ul.pj-checklist");
let active = false;
if (cmd === "insertCheckbox") active = inChecklist;
@@ -8490,7 +8631,12 @@
// 캡처 단계 — 각 목록의 읽음 처리(버블 단계)는 그대로 돈다.
document.addEventListener("click", function (e) {
const a = e.target.closest && e.target.closest(".pj-inbox-go[data-task-id]");
if (!a) return;
if (!a) {
// 작업 창이 열린 채 왼쪽 수신함 영역을 누르면 작업 창을 닫는다(2026-10-08). 메뉴·모달·알림 팝업 안은 제외.
if (panel && panel.classList.contains("is-open") && e.target.closest &&
e.target.closest(".pj-inbox-view") && !e.target.closest(".pj-inbox-panel, .pj-modal, .pj-ctxmenu, .pj-alert-pop")) close();
return;
}
if (e.ctrlKey || e.metaKey || e.shiftKey || e.button === 1) return; // 새 탭 열기는 그대로
e.preventDefault();
open(a.getAttribute("href"), a.closest(".pj-inbox-item"));
Binary file not shown.