feat(project): 리스트 행 배경에 프로젝트 색 연하게 + 타임라인 확대구간 기억
- 리스트: 각 행 배경을 프로젝트 색 8%로 칠함 - 타임라인: 보던 확대/이동 구간을 localStorage(pj_tl_window)에 저장, 재렌더·탭전환 시 복원(초기화 방지) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -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=20260625v" />
|
<link rel="stylesheet" href="/static/project.css?v=20260625w" />
|
||||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
@@ -167,5 +167,5 @@
|
|||||||
<script>
|
<script>
|
||||||
window.PJ_COLORS = {{ ["#4573d2","#37a3a3","#62a420","#e8a33d","#e8384f","#aa62e3","#f06a6a","#5a6772"] | tojson }};
|
window.PJ_COLORS = {{ ["#4573d2","#37a3a3","#62a420","#e8a33d","#e8384f","#aa62e3","#f06a6a","#5a6772"] | tojson }};
|
||||||
</script>
|
</script>
|
||||||
<script src="/static/project.js?v=20260625v" defer></script>
|
<script src="/static/project.js?v=20260625w" defer></script>
|
||||||
{% 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=20260625v" />
|
<link rel="stylesheet" href="/static/project.css?v=20260625w" />
|
||||||
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — 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 -->
|
||||||
@@ -290,5 +290,5 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
|
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
|
||||||
<script src="/static/project.js?v=20260625v" defer></script>
|
<script src="/static/project.js?v=20260625w" defer></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -548,6 +548,23 @@
|
|||||||
const t = tasks.find(function (x) { return x.id === props.items[0]; });
|
const t = tasks.find(function (x) { return x.id === props.items[0]; });
|
||||||
if (t) openTaskModal(t);
|
if (t) openTaskModal(t);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 확대/이동(보던 구간) 기억 — 저장된 창이 있으면 복원, 사용자가 바꾸면 저장.
|
||||||
|
const saved = loadTLWindow();
|
||||||
|
if (saved) timeline.setWindow(new Date(saved.start), new Date(saved.end), { animation: false });
|
||||||
|
timeline.on("rangechanged", function (p) { saveTLWindow(p.start, p.end); });
|
||||||
|
}
|
||||||
|
function loadTLWindow() {
|
||||||
|
try {
|
||||||
|
const r = JSON.parse(localStorage.getItem("pj_tl_window") || "null");
|
||||||
|
return (r && r.start && r.end) ? r : null;
|
||||||
|
} catch (_) { return null; }
|
||||||
|
}
|
||||||
|
function saveTLWindow(s, e) {
|
||||||
|
try {
|
||||||
|
localStorage.setItem("pj_tl_window",
|
||||||
|
JSON.stringify({ start: new Date(s).toISOString(), end: new Date(e).toISOString() }));
|
||||||
|
} catch (_) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ── 보드 (칸반) — 전체 프로젝트를 단계 '이름' 기준 컬럼으로 묶음 ──
|
// ── 보드 (칸반) — 전체 프로젝트를 단계 '이름' 기준 컬럼으로 묶음 ──
|
||||||
@@ -703,6 +720,9 @@
|
|||||||
rows.forEach(function (t) {
|
rows.forEach(function (t) {
|
||||||
const tr = document.createElement("tr");
|
const tr = document.createElement("tr");
|
||||||
if (t.completed_at) tr.className = "is-done";
|
if (t.completed_at) tr.className = "is-done";
|
||||||
|
// 행 배경 = 프로젝트 색 연하게(10%)
|
||||||
|
const pc = t.project_color || "#4573d2";
|
||||||
|
tr.style.background = pc + "14";
|
||||||
tr.innerHTML = LIST_COLS.map(function (c) {
|
tr.innerHTML = LIST_COLS.map(function (c) {
|
||||||
return "<td>" + escapeHtml(String(c.text(t))) + "</td>";
|
return "<td>" + escapeHtml(String(c.text(t))) + "</td>";
|
||||||
}).join("");
|
}).join("");
|
||||||
|
|||||||
Reference in New Issue
Block a user