THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

Browse Source

issue: Change sub-comment style

next
Suwon Chae 2 years ago
parent
commit
4fd614f1c4
6 changed files with 29 additions and 18 deletions
  1. +16
    -6
      app/assets/stylesheets/less/_page.less
  2. +1
    -1
      app/views/common/childComments.scala.html
  3. +1
    -1
      app/views/issue/partial_comment.scala.html
  4. +8
    -7
      app/views/issue/view.scala.html
  5. +1
    -1
      conf/messages
  6. +2
    -2
      conf/messages.ko-KR

+ 16
- 6
app/assets/stylesheets/less/_page.less View File

@ -2905,13 +2905,19 @@ label.inline-list {
.add-a-comment {
font-size: 12px;
color: #BDC3C7;
background-color: #fff;
position: relative;
right: 10px;
margin-top: -1px;
color: #00b0e8;
border: 1px solid #00b0e8;
margin-top: -32px;
padding: 0 5px;
border-radius: 3px;
display: none;
z-index: 2;
&:hover {
color: #00b0e8;
box-shadow: 1px 1px 2px #e0e0e0;
cursor: pointer;
display: block;
}
@ -2927,10 +2933,10 @@ label.inline-list {
color: red;
}
.child-comments {
.one-line-comment:last-child {
}
}
.one-line-comment {
font-size: 12px;
:hover {
background-color: #f1f1f1;
}
@ -2938,8 +2944,12 @@ label.inline-list {
.contents {
text-align: left;
margin-left: 12px;
padding: 3px 0 2px 10px;
padding: 5px 0 4px 10px;
border-bottom: 1px dashed #ccc;
.no-text-decoration {
color: #0e90d2;
}
}
.author {
text-align: right;

+ 1
- 1
app/views/common/childComments.scala.html View File

@ -59,6 +59,7 @@
User.find.byId(authorId)
}
<div class="add-a-comment pull-right">@Messages("comment.oneline.comment.placeholder")</div>
<div class="subcomment-media-body">
<div class="child-comments">
@for(comment <- posting.getComments) {
@ -75,7 +76,6 @@
}
</div>
@if(isResourceCreatable(UserApp.currentUser, posting.asResource(), resourceType)) {
<div class="add-a-comment pull-right">@Messages("comment.oneline.comment.placeholder")</div>
<div class="child-comment-input-form">
@common.child_commentForm(posting.asResource(), resourceType, getNewCommentUrl, currentComment.id)
<div class="one-line-comment-help">@Messages("comment.oneline.comment.help")</div>

+ 1
- 1
app/views/issue/partial_comment.scala.html View File

@ -104,7 +104,7 @@
<div id="comment-body-@comment.id">
@common.tasklistBar()
<div class="comment-body markdown-wrap" data-allowed-update="@isAllowedUpdate" data-via-email="@OriginalEmail.exists(comment.asResource)">@Html(Markdown.render(comment.contents, project))</div>
<div class="attachments pull-right" data-attachments="@toJson(AttachmentApp.getFileList(ResourceType.ISSUE_COMMENT.toString(), comment.id.toString()))"></div>
<div class="attachments pull-left" data-attachments="@toJson(AttachmentApp.getFileList(ResourceType.ISSUE_COMMENT.toString(), comment.id.toString()))"></div>
</div>
</div>
@common.childComments(issue, comment, ResourceType.ISSUE_COMMENT)

+ 8
- 7
app/views/issue/view.scala.html View File

@ -577,15 +577,10 @@
// Releated with one line sub-comment feature
$(".add-a-comment").on("click", function(e){
var parent = $(this).parent(".subcomment-media-body");
// Reset & Ready
$(".child-comment-input-form").css("display", "none").css("visibility", "hidden");
$(".add-a-comment").show();
$(this).hide();
var parent = $(this).parents(".comment");
// Show input form
parent.find(".child-comment-input-form").css("display", "block").css("visibility", "visible");
parent.find(".child-comment-input-form").toggle();
parent.find("textarea").on('keypress', function(e) {
// Enter to submit
@ -602,6 +597,12 @@
}).focus();
});
$(".comment").on("mouseenter tab", function () {
$(this).find(".add-a-comment").fadeIn(300);
}).on("mouseleave", function () {
$(this).find(".add-a-comment").fadeOut(300);
});
// Releated with one line sub-comment feature
$(".subcomment-author").each(function addAuthorToLastParagraphOfOnelineComment(index, el){
// append Author and addtionals to mardkown rendered contents

+ 1
- 1
conf/messages View File

@ -147,7 +147,7 @@ code.tooBigFile = This file is too big to display.
code.tooBigFileForCodeBrowser = Sorry, we cannot show a file larger than {0} bytes here.
code.unknownError = Unknown error
code.viewRaw = View Raw
comment.online.comment.help = Only parent comment author will be notified.
comment.oneline.comment.help = Only parent comment author will be notified.
comment.oneline.comment.placeholder = Add a comment
commentThread.close = Close
commentThread.open = Open

+ 2
- 2
conf/messages.ko-KR View File

@ -147,8 +147,8 @@ code.tooBigFile = 이 파일은 너무 커서 보여드릴 수 없습니다.
code.tooBigFileForCodeBrowser = 죄송하지만 {0} 바이트보다 큰 파일은 여기서는 보여드릴 수 없습니다.
code.unknownError = 알 수 없는 에러가 발생하였습니다.
code.viewRaw = Raw로 보기
comment.oneline.comment.help = 한 줄 댓글은 기본적으로 부모 댓글 작성자에게만 알림이 발송됩니다
comment.oneline.comment.placeholder = 댓글 추가
comment.oneline.comment.help = 한 줄 댓글은 멘션을 사용하지 않을 경우 부모 댓글 작성자에게만 알림이 발송됩니다.
comment.oneline.comment.placeholder = 댓글 추가
commentThread.close = 리뷰 닫기
commentThread.open = 리뷰 다시 열기
common.attach.attachIfYouSave = 표시된 파일은 글을 저장하면 첨부됩니다.

Loading…
Cancel
Save