From 0f0d48016e11d4dbc3ebfa2248747d75f1551d54 Mon Sep 17 00:00:00 2001 From: junheelee Date: Mon, 16 May 2022 12:02:52 +0900 Subject: [PATCH] =?UTF-8?q?detailView=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WEB-INF/view/jh/board/detailView.jsp | 97 +++++++++++-------- src/main/webapp/web/css/common.css | 1 + 2 files changed, 59 insertions(+), 39 deletions(-) diff --git a/src/main/webapp/WEB-INF/view/jh/board/detailView.jsp b/src/main/webapp/WEB-INF/view/jh/board/detailView.jsp index 6f1069e..e63047e 100644 --- a/src/main/webapp/WEB-INF/view/jh/board/detailView.jsp +++ b/src/main/webapp/WEB-INF/view/jh/board/detailView.jsp @@ -71,27 +71,27 @@ class="date">05.02 13:00 여기는 댓글 정보3333! - +
- - - - - - - - - - - - - - - +
+ 익명605.02 13:00 여기는 댓글의 + 댓글(답글)정보!3333 +
+ 익명605.02 13:00 여기는 댓글의 + 댓글(답글)정보!3333 +
+ 익명605.02 13:00 여기는 댓글의 + 댓글(답글)정보!3333 +
+
+
@@ -200,44 +200,63 @@ if(item.targetId==0) { var comment = "
" + + "" + "" + item.regUser + "" + "" + item.regDate + "" + + "답글" + "" + "" + item.content + "" + + "
" + + $.each(item.targetReplys, function(idx, it) { + var reply = + "
" + + /* 답글 눌렀을 때 뜨는 것 */ + "
" + + "" + + "" + it.regUser + "" + + "" + it.regDate + " + + "답글" + + "" + + "" + it.content + "" + + "
" + + "
" + }) console.log(comment) // commentBox += comment; } $(".comment-input").after(comment); - console.log("자식댓글") - var replyBox = "" - $.each(item.targetReplys, function(j, it) { - /* 자식이 있을경우에만 살이 붙음 */ - console.log(it) +// console.log("자식댓글") +// var replyBox = "" +// $.each(item.targetReplys, function(j, it) { +// /* 자식이 있을경우에만 살이 붙음 */ +// console.log(it) -// var boxbox = $('#' + it.targetId); +// // var boxbox = $('#' + it.targetId); - let rb = $("
"); //class reply-box라고 줘야함... 어케주지...... -// $('#test3').append(rb) - var targetId = it.targetId; - $('#user' + (it.targetId)).append(rb) +// let rb = $("
"); //class reply-box라고 줘야함... 어케주지...... +// // $('#test3').append(rb) +// var targetId = it.targetId; +// $('#user' + (it.targetId)).append(rb) - var reply = -// "
" + - "
" + - "" + - "" + it.regUser + "" + - "" + it.regDate + "" + - "" + - "" + it.content + "" + - "
" -// "
" - rb.append(reply); - replyBox += reply; - }) +// var reply = +// // "
" + +// "
" + +// "" + +// "" + it.regUser + "" + +// "" + it.regDate + "" + +// "답글" + +// "" + +// "" + it.content + "" + +// "
" +// // "
" +// rb.append(reply); +// replyBox += reply; +// }) }) diff --git a/src/main/webapp/web/css/common.css b/src/main/webapp/web/css/common.css index 5f9542f..1fa145d 100644 --- a/src/main/webapp/web/css/common.css +++ b/src/main/webapp/web/css/common.css @@ -58,4 +58,5 @@ button:hover{cursor:pointer;} .reply-input textarea{border:0;resize:none;width:calc(100% - 130px);height:42px;border:1px solid #999;border-radius:4px;padding:10px;} .reply-input button{width:120px;height:42px;background:#333;color:#fff;font-weight:500;border-radius:4px;} .reply-view{background:#f4f4f4;padding:14px;border-radius:4px;margin:14px 10px 0 10px;} +.reply-view-reply{background: #ffffff;padding:14px;border-radius:4px;margin:14px 10px 0 10px;} .reply-view .user{margin:0 0 10px 0;}