상세페이지 UI 개선
Deploy EG-BIM QA Gateway / deploy (push) Successful in 56s

This commit is contained in:
root
2026-09-22 17:05:12 +09:00
parent ee5205e133
commit 176316378b
2 changed files with 13 additions and 2 deletions
+9 -2
View File
@@ -245,6 +245,11 @@
}
}
function normalizePageHeading() {
qsa('.egbim-page .section-heading h2').forEach(function (heading) { heading.textContent = '문의하기(Q&A)'; });
qsa('.egbim-page .section-heading p').forEach(function (description) { description.remove(); });
}
function showToast(message) {
const toast = qs('#toast');
if (!toast) return;
@@ -449,10 +454,11 @@
editError.hidden = true;
editError.style.display = 'none';
editForm.hidden = false;
detail.classList.add('is-editing');
editForm.scrollIntoView({ behavior: 'smooth', block: 'start' });
});
const editCancel = qs('#editCancel');
if (editCancel && editForm) editCancel.addEventListener('click', function () { editForm.hidden = true; });
if (editCancel && editForm) editCancel.addEventListener('click', function () { editForm.hidden = true; detail.classList.remove('is-editing'); });
if (editForm) editForm.addEventListener('submit', async function (event) {
event.preventDefault();
editError.hidden = true;
@@ -485,6 +491,7 @@
qs('[data-detail-content]').textContent = post.content;
qs('[data-detail-secret]').hidden = !post.secret;
editForm.hidden = true;
detail.classList.remove('is-editing');
showToast('문의가 수정되었습니다.');
} catch (error) {
editError.textContent = error.message || '문의 수정에 실패했습니다.';
@@ -614,5 +621,5 @@
});
}
document.addEventListener('DOMContentLoaded', function () { bindGlobal(); initList(); initWrite(); initDetail(); });
document.addEventListener('DOMContentLoaded', function () { normalizePageHeading(); bindGlobal(); initList(); initWrite(); initDetail(); });
})();