This commit is contained in:
+6
-1
@@ -405,6 +405,10 @@
|
||||
function initDetail() {
|
||||
const detail = qs('#detail');
|
||||
if (!detail) return;
|
||||
const detailListLink = qs('.detail-actions > a', detail);
|
||||
if (detailListLink) detailListLink.textContent = '목록으로';
|
||||
const bottomBackButton = qs('#backButton', detail);
|
||||
if (bottomBackButton && bottomBackButton.parentElement) bottomBackButton.parentElement.remove();
|
||||
const id = new URLSearchParams(window.location.search).get('id') || 'EG-1048';
|
||||
const post = getPosts().find(function (item) { return item.id === id; });
|
||||
if (!post) {
|
||||
@@ -596,6 +600,8 @@
|
||||
});
|
||||
const commentImages = qs('#commentImages');
|
||||
const commentImagePreview = qs('#commentImagePreview');
|
||||
const commentImageLabel = qs('label[for="commentImages"]');
|
||||
if (commentImageLabel) commentImageLabel.textContent = '댓글 이미지 첨부';
|
||||
if (commentImages && commentImagePreview) commentImages.addEventListener('change', function () {
|
||||
const files = Array.prototype.slice.call(commentImages.files || []);
|
||||
commentImagePreview.innerHTML = files.filter(function (file) { return /^image\//i.test(file.type); }).map(function (file) {
|
||||
@@ -606,7 +612,6 @@
|
||||
refreshRemoteStatus(post).then(function (changed) {
|
||||
if (changed) qs('[data-detail-status]').textContent = normalizeStatus(post.status) || '공지';
|
||||
});
|
||||
qs('#backButton').addEventListener('click', function () { window.location.href = 'index.html'; });
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () { bindGlobal(); initList(); initWrite(); initDetail(); });
|
||||
|
||||
Reference in New Issue
Block a user