fix(cafe24): 편집기 상단 단축키 안내·가격 표기·선택행 hover

- 편집기 바 왼쪽 문구를 단축키 안내만 남긴다. 글자 수·PC/모바일 공통은
  화면에서 쓸 일이 없어 뺐다. 옅은 파랑(#79a6dd)으로 본문과 구분한다.
- 가격을 '6900.00' 대신 '6,900원' 으로 보여준다. 원 단위 쇼핑몰이라 소수점
  아래는 언제나 .00 이므로 버린다. 숫자로 못 읽으면 받은 값을 그대로 둔다.
- 선택된 행에 마우스를 올려도 배경이 변하지 않게 한다. erp-shell.css 의
  `.erp-table tbody tr:hover` 가 특이도가 더 높아 검은 배경을 덮어쓰고
  있었다.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-19 22:50:57 +09:00
parent 8cfe963526
commit 739bb80b04
6 changed files with 36 additions and 5 deletions
+18 -1
View File
@@ -31,6 +31,7 @@ PC/모바일은 구분하지 않는다 — 적용 시 `description` 과 `mobile_
from __future__ import annotations
import logging
from decimal import Decimal
from typing import Any
from urllib.parse import urlencode
@@ -64,6 +65,22 @@ def _no_store(response: Any) -> Any:
return response
def _price(value: Any) -> str:
"""카페24 가격('6900.00') → 화면 표기('6,900원').
소수점 아래는 버린다 — 이 쇼핑몰은 원 단위라 언제나 .00 이고, 화면에 보일
이유가 없다. 숫자로 못 읽으면 받은 값을 그대로 보여준다.
"""
text = str(value or "").strip()
if not text:
return ""
try:
won = int(Decimal(text))
except (ArithmeticError, ValueError):
return text
return f"{won:,}"
def _short_dt(value: Any) -> str:
"""'2026-08-14T11:38:18+09:00''2026-08-14 11:38'."""
text = str(value or "").strip()
@@ -135,7 +152,7 @@ def _editor_ctx(st: Any, product_no: int) -> dict[str, Any]:
"product_url": api.config.product_url(product_no),
"info": {
**info,
"price": str(product.get("price") or ""),
"price": _price(product.get("price")),
"updated_date": _short_dt(product.get("updated_date")),
"summary_description": product.get("summary_description") or "",
},
@@ -78,7 +78,7 @@
<input type="hidden" name="list_query" value="{{ list_query }}" />
<div class="cf24-editor-bar">
<span class="cf24-muted">상세설명 HTML · {{ desc.description | length }}자 · PC/모바일 공통 · Ctrl+/ 주석 · Alt+↑↓ 줄 이동 · Shift+Del 줄 삭제</span>
<span class="cf24-shortcuts">단축키: 주석넣기[Ctrl+/] · 줄 이동[Alt+↑↓] · 줄 삭제[Shift+Del]</span>
<span class="cf24-editor-bar-right">
<input class="cf24-memo" type="text" name="memo" maxlength="200"
placeholder="변경 메모 (버전 이력에 남습니다)" />
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/cafe24.css?v=20260819b" />
<link rel="stylesheet" href="/static/cafe24.css?v=20260819c" />
{% endblock %}
{% block content %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/cafe24.css?v=20260814w" />
<link rel="stylesheet" href="/static/cafe24.css?v=20260819c" />
{% endblock %}
{% block content %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/cafe24.css?v=20260814w" />
<link rel="stylesheet" href="/static/cafe24.css?v=20260819c" />
{% endblock %}
{% block content %}
+14
View File
@@ -157,6 +157,13 @@
background: var(--color-rich-black, #0a0a0a);
}
/* 선택된 행은 마우스를 올려도 그대로 둔다. erp-shell.css 의
`.erp-table tbody tr:hover` 가 특이도가 더 높아 검은 배경을 덮어쓰므로
여기서 더 구체적인 선택자로 되돌린다. */
.cf24-list-table tbody tr.cf24-row.is-active:hover {
background: var(--color-rich-black, #0a0a0a);
}
.cf24-row.is-active td,
.cf24-row.is-active .cf24-col-name a {
color: #fff;
@@ -267,6 +274,13 @@
flex: 0 0 auto;
}
/* 편집기 단축키 안내 — 옅은 파랑으로 본문과 구분한다 */
.cf24-shortcuts {
font-size: var(--text-caption, 12px);
color: #79a6dd;
white-space: nowrap;
}
/* 편집 폼과 코드 칸은 **줄어들지 않는다.** 아래 「예약 적용」·「버전 이력」을 펼치면
코드 칸이 눌리는 대신 내용이 아래로 밀리고 오른쪽 칸(.cf24-pane-editor)이 스크롤된다.
flex: 1 1 auto 였을 때는 펼칠 때마다 편집기가 작아져 작업하던 위치를 잃었다. */