fix(project): anchor toolbar above selected cell
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261003b" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261003c" />
|
||||
<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=20261003b" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261003c" />
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
{% endblock %}
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
{% if is_admin %}
|
||||
<div class="pj-goal-foot">
|
||||
<button type="button" class="pj-btn" id="pj-goal-area-add">+ 업무 영역 추가</button>
|
||||
<span class="pj-goal-note">칸을 고치면 바로 저장됩니다. 글자를 드래그해 선택하면 선택 영역 위에서 12색 견본·크기 2px 증감·굵게·기울임·밑줄·서식 초기화를 사용할 수 있습니다. 모든 행의 셀 오른쪽 경계를 끌어 열 너비를 조절합니다. 숫자 칸을 비우면 지워집니다. 구역·항목 칸을 우클릭하거나 칸의 ⋮ 버튼(키보드 Tab·Enter, 터치)을 누르면 색·순서·줄 추가·삭제 메뉴가 나옵니다.
|
||||
<span class="pj-goal-note">칸을 고치면 바로 저장됩니다. 글자를 드래그해 선택하면 선택한 셀 상단에서 12색 견본·크기 2px 증감·굵게·기울임·밑줄·서식 초기화를 사용할 수 있습니다. 모든 행의 셀 오른쪽 경계를 끌어 열 너비를 조절합니다. 숫자 칸을 비우면 지워집니다. 구역·항목 칸을 우클릭하거나 칸의 ⋮ 버튼(키보드 Tab·Enter, 터치)을 누르면 색·순서·줄 추가·삭제 메뉴가 나옵니다.
|
||||
{%- if board.halves %} 칸을 마우스로 끌어 여러 칸을 고른 뒤 우클릭 → 셀 병합, 병합된 칸은 우클릭 → 병합 해제(글은 왼쪽 위 칸에 남음).{% endif %}
|
||||
월 이름을 누르면 그 달 주간 회의록이 열립니다.</span>
|
||||
</div>
|
||||
@@ -220,6 +220,6 @@
|
||||
{% include "project/_side_modals.html" %}
|
||||
{% include "project/_member_tasks_modal.html" %}
|
||||
|
||||
<script src="/static/project-goal-text.js?v=20261003b" defer></script>
|
||||
<script src="/static/project-goal-text.js?v=20261003c" defer></script>
|
||||
<script src="/static/project.js?v=20261003a" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261003b" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261003c" />
|
||||
<link rel="stylesheet" href="/static/project-help.css?v=20261002d" />
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
{% endblock %}
|
||||
@@ -95,7 +95,7 @@
|
||||
<b>달성</b>은 실적÷목표(100% 이상 초록)로 저절로 계산됩니다. 분기 칸 머리의 <b>‹</b> 버튼을 누르면 그 분기의 월 칸 3개가
|
||||
접히고, 다시 누르면 펼쳐집니다(접힌 상태는 내 브라우저에 기억). 월 이름을 누르면 그 달 <b>주간 회의록</b>이 열립니다.
|
||||
<b>입력은 관리자만</b> 할 수 있고(칸을 고치면 바로 저장), 다른 직원은 보기만 합니다. 관리자는 <b>+ 연도 추가</b>로 새해 목표를
|
||||
만듭니다(이전 연도의 업무 영역 구성을 그대로 가져옴). 글 칸에서 <b>글자를 드래그해 선택</b>하면 선택한 글자 위에 나타나는 엑셀 형태 서식 도구로 <b>색상·크기·굵게·기울임·밑줄</b>을 바꿀 수 있으며 선택한 글자에만 적용됩니다.
|
||||
만듭니다(이전 연도의 업무 영역 구성을 그대로 가져옴). 글 칸에서 <b>글자를 드래그해 선택</b>하면 선택한 셀 상단에 나타나는 엑셀 형태 서식 도구로 <b>색상·크기·굵게·기울임·밑줄</b>을 바꿀 수 있으며 선택한 글자에만 적용됩니다.
|
||||
위/아래 화살표가 붙은 글자 버튼은 크기를 <b>2px씩</b> 키우거나 줄입니다(10~32px). 굵게·기울임·밑줄 버튼은 다시 누르면 해당 서식을 해제합니다.
|
||||
<span class="pjh-ui">서식 초기화</span>는 선택한 글자를 기본 서식으로 되돌리며 내용은 유지합니다. 서식도 자동으로 저장됩니다. 색상은 12색의 네모 견본에서 고릅니다.
|
||||
<b>모든 행의 셀 오른쪽 경계</b>를 끌어 열 너비를 조절하고, 더블클릭하면 기본 너비로 돌아갑니다(병합 칸은 오른쪽 끝 열).
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261003b" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261003c" />
|
||||
<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=20261003b" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261003c" />
|
||||
<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=20261003b" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261003c" />
|
||||
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — self-host -->
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
<!-- 타임라인 vis-timeline — self-host -->
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "erp_base.html" %}
|
||||
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261003b" />
|
||||
<link rel="stylesheet" href="/static/project.css?v=20261003c" />
|
||||
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
||||
{% endblock %}
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
function init(table, toolbar) {
|
||||
if (!toolbar) return;
|
||||
let saved = null;
|
||||
// body 에 두어 표 스크롤과 화면 zoom 에 잘리지 않는 선택 영역 위 팝업으로 표시한다.
|
||||
// body 에 두어 표 스크롤과 화면 zoom 에 잘리지 않는 선택 셀 위 팝업으로 표시한다.
|
||||
document.body.appendChild(toolbar);
|
||||
const colorButton = toolbar.querySelector("[data-goal-format='color']");
|
||||
const colorGrid = toolbar.querySelector(".pj-goal-color-grid");
|
||||
@@ -128,10 +128,10 @@
|
||||
if (!saved || !saved.editor.isConnected) { clear(); return; }
|
||||
const sel = window.getSelection();
|
||||
if (!sel.rangeCount || sel.isCollapsed || !saved.editor.contains(sel.getRangeAt(0).commonAncestorContainer)) return;
|
||||
const range = sel.getRangeAt(0);
|
||||
if (!range.getBoundingClientRect) return; // DOM 테스트 환경에는 레이아웃이 없다.
|
||||
const rects = range.getClientRects();
|
||||
const rect = rects.length ? rects[0] : range.getBoundingClientRect();
|
||||
const cell = saved.editor.closest("td");
|
||||
if (!cell) { clear(); return; }
|
||||
// 같은 셀의 어느 줄을 선택해도 셀 상단·가운데를 기준으로 같은 위치에 둔다.
|
||||
const rect = cell.getBoundingClientRect();
|
||||
const paneRect = table.parentElement.getBoundingClientRect();
|
||||
if (rect.bottom < paneRect.top || rect.top > paneRect.bottom || rect.right < paneRect.left || rect.left > paneRect.right) {
|
||||
toolbar.hidden = true; closeColors(); return;
|
||||
|
||||
@@ -2735,15 +2735,16 @@ html[data-pj-font="nanum-square-round"] { --pj-font: "NanumSquareRound", var(--p
|
||||
.pj-goal-format [data-goal-format="reset"] { border-color: #d8dce2; margin-left: 4px; }
|
||||
.pj-goal-color-picker { position: relative; display: flex; align-items: center; }
|
||||
.pj-goal-color-toggle { gap: 5px; }
|
||||
.pj-goal-color-letter { display: flex; flex-direction: column; align-items: stretch; font-size: 17px; line-height: 18px; }
|
||||
.pj-goal-color-preview { display: block; width: 18px; height: 3px; background: #000; box-shadow: inset 0 0 0 1px #0002; }
|
||||
.pj-goal-format-chevron { width: 8px; height: 8px; }
|
||||
.pj-goal-font-letter { font-size: 16px; }
|
||||
.pj-goal-font-arrow { width: 10px; height: 14px; align-self: flex-start; margin-top: 4px; color: #2563eb; }
|
||||
/* 아이콘만 이전 크기의 80%로 축소, 버튼 높이와 초기화 버튼 정렬은 유지한다. */
|
||||
.pj-goal-color-letter { display: flex; flex-direction: column; align-items: stretch; font-size: 13.6px; line-height: 14.4px; }
|
||||
.pj-goal-color-preview { display: block; width: 14.4px; height: 2.4px; background: #000; box-shadow: inset 0 0 0 1px #0002; }
|
||||
.pj-goal-format-chevron { width: 6.4px; height: 6.4px; }
|
||||
.pj-goal-font-letter { font-size: 12.8px; }
|
||||
.pj-goal-font-arrow { width: 8px; height: 11.2px; align-self: flex-start; margin-top: 3.2px; color: #2563eb; }
|
||||
.pj-goal-size-value { min-width: 36px; text-align: center; color: var(--pj-ink-soft); font-variant-numeric: tabular-nums; }
|
||||
.pj-goal-format [data-goal-format="bold"] .pj-goal-font-letter { font-weight: 700; }
|
||||
.pj-goal-format [data-goal-format="italic"] .pj-goal-font-letter { font-style: italic; }
|
||||
.pj-goal-format [data-goal-format="underline"] .pj-goal-font-letter { text-decoration: underline; text-underline-offset: 3px; }
|
||||
.pj-goal-format [data-goal-format="underline"] .pj-goal-font-letter { text-decoration: underline; text-underline-offset: 2.4px; }
|
||||
.pj-goal-color-grid { position: absolute; bottom: calc(100% + 8px); left: 0; display: grid; grid-template-columns: repeat(6, 26px); gap: 6px; padding: 8px; background: #fff; border: 1px solid var(--pj-border); border-radius: 6px; box-shadow: 0 4px 12px #0002; }
|
||||
.pj-goal-color-grid.is-below { bottom: auto; top: calc(100% + 8px); }
|
||||
.pj-goal-text-swatch { width: 26px; height: 26px; border: 1px solid #0003; border-radius: 3px; background: var(--swatch); cursor: pointer; padding: 0; }
|
||||
|
||||
Reference in New Issue
Block a user