[Notice] Announcing the End of Demo Server [Read me]
doortts doortts 2018-09-14
issue: Change sub-comment style
@4fd614f1c46e9abc63922ae1640fc289af9a44e5
app/assets/stylesheets/less/_page.less
--- app/assets/stylesheets/less/_page.less
+++ app/assets/stylesheets/less/_page.less
@@ -2905,13 +2905,19 @@
 
             .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 @@
                     color: red;
                 }
                 .child-comments {
+                    .one-line-comment:last-child {
+                    }
                 }
                 .one-line-comment {
-                    font-size: 12px;
-
                     :hover {
                        background-color: #f1f1f1;
                     }
@@ -2938,8 +2944,12 @@
                     .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;
app/views/common/childComments.scala.html
--- app/views/common/childComments.scala.html
+++ app/views/common/childComments.scala.html
@@ -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>
app/views/issue/partial_comment.scala.html
--- app/views/issue/partial_comment.scala.html
+++ app/views/issue/partial_comment.scala.html
@@ -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)
app/views/issue/view.scala.html
--- app/views/issue/view.scala.html
+++ app/views/issue/view.scala.html
@@ -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
conf/messages
--- conf/messages
+++ conf/messages
@@ -147,7 +147,7 @@
 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
conf/messages.ko-KR
--- conf/messages.ko-KR
+++ conf/messages.ko-KR
@@ -147,8 +147,8 @@
 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 = 표시된 파일은 글을 저장하면 첨부됩니다.
Add a comment
List