feat(notice): reuse project editor, date popup and member picker on the notice page

- Notice body uses the task description editor (createDescEditor, shared toolbar partial
  project/_desc_fmtbar.html): bold/italic/underline/strike, text color/size, lists, checklist,
  quote, link, clear format, image button/paste with resize; images upload to /notice/api/images
- Show date uses the project date popup (enhanceDateInput) plus a time field
- Recipients rendered like the project member picker (icon + name + check)
- project.js exposes window.PJLib; PJ_LIB_ONLY runs only shared tooltips on non-project pages
- Centered notice renders checklist/quote/list styles outside project pages too
- Task window editor behavior unchanged (jsdom + Chrome regressions pass)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-12 14:44:33 +09:00
parent 833dbb5fdf
commit c69bc0e9f3
17 changed files with 195 additions and 164 deletions
+31 -16
View File
@@ -27,7 +27,22 @@
}
.erp-notice-body p { margin: 0 0 .6em; }
.erp-notice-body img { display: block; max-width: 100%; height: auto; margin: 8px 0; border-radius: 8px; }
.erp-notice-body a { color: #3b6fd8; }
.erp-notice-body a { color: #3b6fd8; text-decoration: underline; }
/* 작업 설명란 편집기와 같은 서식(project.css .pj-desc-editor) — 프로젝트 밖 화면에서도 같게 보이게 */
.erp-notice-body blockquote { margin: 6px 0; padding: 2px 12px; border-left: 3px solid #d5d9de; color: #565c66; }
.erp-notice-body ul, .erp-notice-body ol { margin: 4px 0; padding-left: 22px; }
.erp-notice-body ul.pj-checklist { list-style: none; padding-left: 24px; }
.erp-notice-body ul.pj-checklist > li { position: relative; }
.erp-notice-body ul.pj-checklist > li::before {
content: ""; position: absolute; left: -22px; top: .3em; width: 14px; height: 14px;
box-sizing: border-box; border: 1.5px solid #8f959d; border-radius: 3px; background: #fff;
}
.erp-notice-body ul.pj-checklist > li[data-checked="true"]::before {
border-color: #7b68ee; background: #7b68ee center / 10px 10px no-repeat
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.3l2.6 2.6L10 3.4' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.erp-notice-body ul.pj-checklist > li[data-checked="true"] { color: #9aa1a9; text-decoration: line-through; }
.erp-notice-body img[width] { height: auto; }
.erp-notice-error { margin: 0; padding: 6px 10px; border-radius: 6px; background: #fdecec; color: #b42318; font-size: 13px; }
.erp-notice-error[hidden] { display: none; }
.erp-notice-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 6px; border-top: 1px solid #eceef1; }
@@ -41,31 +56,31 @@
.erp-notice-ok:disabled { opacity: .6; cursor: default; }
/* 관리 화면(/notice/) */
.ntc-wrap { display: grid; grid-template-columns: minmax(360px, 520px) 1fr; gap: 18px; align-items: start; }
.ntc-wrap { display: grid; grid-template-columns: minmax(420px, 640px) 1fr; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .ntc-wrap { grid-template-columns: 1fr; } }
.ntc-card { background: #fff; border: 1px solid #e6e8eb; border-radius: 12px; padding: 18px; }
.ntc-card h2 { margin: 0 0 12px; font-size: 16px; }
.ntc-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; font-size: 13px; font-weight: 700; color: #3b4048; }
.ntc-field input[type=text], .ntc-field input[type=datetime-local] {
.ntc-field input[type=text], .ntc-time {
font: inherit; font-weight: 500; padding: 8px 10px; border: 1px solid #d5d9de; border-radius: 8px;
}
.ntc-editor-bar { display: flex; gap: 4px; }
.ntc-editor-bar button { padding: 4px 10px; border: 1px solid #d5d9de; border-radius: 6px; background: #fff; cursor: pointer; font: inherit; font-size: 12.5px; }
.ntc-editor {
min-height: 160px; max-height: 420px; overflow: auto; padding: 10px 12px; border: 1px solid #d5d9de; border-radius: 8px;
font-weight: 400; font-size: 14px; line-height: 1.6; color: #2b2f36; outline: none;
}
.ntc-editor:focus { border-color: #7b68ee; box-shadow: 0 0 0 3px rgba(123, 104, 238, .15); }
.ntc-editor:empty::before { content: attr(data-placeholder); color: #a0a5ad; }
.ntc-editor img { max-width: 100%; height: auto; border-radius: 6px; }
.ntc-targets { display: flex; flex-direction: column; gap: 6px; font-weight: 500; }
.ntc-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 10px; max-height: 220px; overflow: auto;
padding: 8px; border: 1px solid #e6e8eb; border-radius: 8px; }
.ntc-sub { font-weight: 500; color: #8a9099; }
.ntc-desc .pj-desc-toolbar { display: flex; align-items: center; gap: 8px; }
.ntc-desc .pj-desc-wrap { position: relative; }
.ntc-desc .pj-desc-editor { min-height: 180px; max-height: 460px; overflow: auto; font-weight: 400;
padding: 10px 12px; border: 1px solid #d5d9de; border-radius: 8px; }
.ntc-desc .pj-desc-editor:focus { border-color: #7b68ee; box-shadow: 0 0 0 3px rgba(123, 104, 238, .15); outline: none; }
.ntc-when { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.ntc-time { padding: 6px 8px; }
.ntc-targets { display: flex; flex-direction: column; gap: 8px; font-weight: 500; }
.ntc-to { display: flex; gap: 16px; flex-wrap: wrap; }
.ntc-people { max-height: 260px; }
.ntc-people[hidden] { display: none; }
.ntc-people label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; }
.ntc-inline { flex-direction: row; align-items: center; font-weight: 500; }
.ntc-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.ntc-msg { margin: 8px 0 0; font-size: 13px; color: #b42318; }
.ntc-msg[hidden] { display: none; }
.ntc-msg.is-ok { color: #1f7a3a; }
.ntc-list { display: flex; flex-direction: column; gap: 10px; }
.ntc-item { border: 1px solid #e6e8eb; border-radius: 10px; padding: 12px 14px; }
.ntc-item-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }