+9
-2
@@ -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(); });
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user