diff --git a/src/main/resources/static/js/publicBoard/publicBoard.js b/src/main/resources/static/js/publicBoard/publicBoard.js index dd9631c1..2ca51dd4 100644 --- a/src/main/resources/static/js/publicBoard/publicBoard.js +++ b/src/main/resources/static/js/publicBoard/publicBoard.js @@ -26,13 +26,13 @@ $(document).on('click', '#commentSaveBtn', function (){ xhr.setRequestHeader($("[name='_csrf_header']").val(), $("[name='_csrf']").val()); }, success : function(html) { - $("#commentDiv").append(html) const parentComment = $("#parentComment"); - if(parentComment.val()){ - commentFormReset(); - parentComment.val(''); - $("#commentFormHome").append($("#commentForm")) + if(!parentComment.val()){ + $("#commentDiv").append(html) + }else{ + $("#addedCommentHome"+parentComment.val()).append(html); } + commentFormReset(); alert("저장되었습니다."); contentFade("out"); }, @@ -46,11 +46,11 @@ $(document).on('click', '#commentSaveBtn', function (){ }) $(document).on('click', '.childCommentBtn', function (){ - const childCommentDiv = $(this).parents(".commentRow").find(".childCommentDiv") - childCommentDiv.show(); + const childCommentFormDiv = $(this).parents(".commentRow").find(".childCommentFormDiv") + childCommentFormDiv.show(); $("#parentComment").val($(this).parents(".commentRow").find(".commentKey").val()); $("#childFormRemoveBtn").show(); - childCommentDiv.empty().append($("#commentForm")) + childCommentFormDiv.empty().append($("#commentForm")) }) $(document).on('click', '#childFormRemoveBtn', function (){ commentFormReset(); @@ -59,7 +59,7 @@ $(document).on('click', '.deleteCommentBtn', function (){ const commentRow = $(this).parents(".commentRow"); const publicKey = Number(commentRow.find(".publicKey").val()); const commentKey = Number(commentRow.find(".commentKey").val()); - $.ajax({ + /*$.ajax({ type : 'POST', data : JSON.stringify({publicKey: publicKey, commentKey: commentKey}), url : "/publicBoard/deleteComment", @@ -76,7 +76,7 @@ $(document).on('click', '.deleteCommentBtn', function (){ alert("삭제를 실패하였습니다.") contentFade("out"); } - }) + })*/ }) function getEditModal(publicKey, publicType){ diff --git a/src/main/resources/templates/publicBoard/commentDiv.html b/src/main/resources/templates/publicBoard/commentDiv.html index c02bd86d..b0aa019d 100644 --- a/src/main/resources/templates/publicBoard/commentDiv.html +++ b/src/main/resources/templates/publicBoard/commentDiv.html @@ -1,57 +1,68 @@ -
+
- -
-
- -
-
- -
-
-
-
- -
-
- -
-
- -
-
- - -
-
- +
+
+
+ +
+
+ +
+
-
- - +
- +
-
+
+
+
+ +
+
+ + +
+ + +
+
+
+ +
+
-
-
+
+
+ +
+
+ + +
+
+
+
+
+
\ No newline at end of file diff --git a/src/main/resources/templates/publicBoard/notice/noticeEditModal.html b/src/main/resources/templates/publicBoard/notice/noticeEditModal.html index f9efbb32..da78cfc1 100644 --- a/src/main/resources/templates/publicBoard/notice/noticeEditModal.html +++ b/src/main/resources/templates/publicBoard/notice/noticeEditModal.html @@ -36,20 +36,20 @@
-
+
-
+
-
+

클릭 또는 드레그하여 파일을 업로드 해주세요. diff --git a/src/main/resources/templates/publicBoard/notice/noticePage.html b/src/main/resources/templates/publicBoard/notice/noticePage.html index d9d74f2b..656c8913 100644 --- a/src/main/resources/templates/publicBoard/notice/noticePage.html +++ b/src/main/resources/templates/publicBoard/notice/noticePage.html @@ -147,7 +147,7 @@