fix(project): 타임라인이 통째로 안 보이던 문제 + 정적 파일 캐시 버전 올림

- vis 는 첫 rangechanged 뒤의 changed 에서야 타임라인을 보이게 하는데, changed 안에서 setWindow 한
  범위의 rangechanged 가 비동기로 늦게 와 다시 그리지 않아 visibility:hidden 로 남던 문제 —
  rangechanged 에서 아직 숨어 있으면 redraw()
- project.js/css 캐시 버전(?v=)을 20260929e 로 — 그동안 파일을 고치고도 올리지 않아
  브라우저가 예전 파일을 쓸 수 있었다

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-29 14:29:37 +09:00
parent 72c23011fe
commit d2a65e5c37
7 changed files with 21 additions and 9 deletions
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20260929c" />
<link rel="stylesheet" href="/static/project.css?v=20260929e" />
<link rel="stylesheet" href="/static/project-help.css?v=20260926v" />
<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=20260929c" />
<link rel="stylesheet" href="/static/project.css?v=20260929e" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -104,5 +104,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20260929d" defer></script>
<script src="/static/project.js?v=20260929e" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20260929c" />
<link rel="stylesheet" href="/static/project.css?v=20260929e" />
<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=20260929d" defer></script>
<script src="/static/project.js?v=20260929e" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20260929c" />
<link rel="stylesheet" href="/static/project.css?v=20260929e" />
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — self-host -->
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
<!-- 타임라인 vis-timeline — self-host -->
@@ -491,5 +491,5 @@
</script>
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
<script src="/static/project.js?v=20260929d" defer></script>
<script src="/static/project.js?v=20260929e" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20260929c" />
<link rel="stylesheet" href="/static/project.css?v=20260929e" />
<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=20260929d" defer></script>
<script src="/static/project.js?v=20260929e" defer></script>
{% endblock %}
+8
View File
@@ -3533,6 +3533,14 @@
}
fitted = true;
});
// 첫 표시 보장 — vis 는 "changed" 때 첫 범위 변경(rangechanged)이 끝났는지 보고서야
// 타임라인을 보이게 한다(그 전엔 visibility:hidden). 위에서 바꾼 범위의 rangechanged 는
// 비동기로 늦게 오고, 첫 그리기 전이라 vis 가 다시 그리지 않아 다음 changed 가 없으면
// 타임라인이 통째로 안 보인다. rangechanged 뒤에도 숨어 있으면 한 번 더 그린다.
timeline.on("rangechanged", function () {
const root = node.querySelector(".vis-timeline");
if (timeline && root && root.style.visibility === "hidden") timeline.redraw();
});
}
tlToggleSubs = function (id) {
const parent = itemsDS.get(id);
+4
View File
@@ -209,6 +209,10 @@
바뀜). 사용자가 옮긴 구간은 localStorage `pj_tl_window2`. **축소 한계** — 칸 폭을 잴 때마다 `zoomMax` 를
"하루 = 날짜 글자 폭"이 되는 구간 길이로 두어 Ctrl+휠로 그보다 줄여지지 않는다(더 줄이면 vis 가 이틀 간격
라벨로 바꿔 날짜가 빠진다). 저장된 구간이 한계보다 넓으면 줄인다.
**첫 표시 주의** — vis 는 생성 옵션에 start/end 가 있으면 첫 `rangechanged` 가 끝난 뒤의 `changed` 에서야
루트를 `visibility:visible` 로 바꾼다. 우리가 `changed` 안에서 `setWindow` 하면 그 `rangechanged` 는 비동기로
늦게 오고 vis 는 첫 그리기 전이라 다시 그리지 않아 **타임라인이 통째로 안 보인다** → `rangechanged` 에서
아직 숨어 있으면 `redraw()`. (`changed` 안에서 바로 `redraw()` 는 vis 의 프레임당 1회 제한에 걸려 무시됨)
**날짜 라벨 색·휴일 이름** — vis 는 라벨을 xss 필터(태그만, class 불가)를 거쳐 innerHTML 로 넣으므로 색은
태그로 싣는다: 빨강(일요일·공휴일) `<em>`, 파랑(토요일) `<i>`, 공휴일 이름 `<br><abbr title=전체이름>줄인이름`
(캘린더 날짜 팝업과 같은 `HOLIDAY_SHORT`·"대체휴일" 규칙). 예전의 "그린 뒤 class 달기(paintTLDays)"는