From 290f5d8873578554d852d64dca8f7af23d1d4e74 Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Tue, 12 Aug 2014 08:57:27 +0200 Subject: [PATCH] Adding rich text for comments in issues, tasks and user stories --- app/coffee/modules/common.coffee | 8 ++++---- app/partials/views/modules/comments.jade | 4 ++-- app/styles/modules/common/comments.scss | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/coffee/modules/common.coffee b/app/coffee/modules/common.coffee index 48c6cf90..ab7e071d 100644 --- a/app/coffee/modules/common.coffee +++ b/app/coffee/modules/common.coffee @@ -139,7 +139,7 @@ ChangeDirective = -> <% } %>

- <%- comment %> + <%= comment %>

<%- creationDate %> @@ -162,7 +162,7 @@ ChangeDirective = ->

- <%- comment %> + <%= comment %>

""") @@ -280,7 +280,7 @@ ChangeDirective = -> avatar: getUserAvatar(comment.user.pk) userFullName: getUserFullName(comment.user.pk) creationDate: moment(comment.created_at).format("YYYY/MM/DD HH:mm") - comment: comment.comment + comment: comment.comment_html changesText: buildChangesText(comment) hasChanges: countChanges(comment) > 0 }) @@ -294,7 +294,7 @@ ChangeDirective = -> avatar: getUserAvatar(change.user.pk) userFullName: getUserFullName(change.user.pk) creationDate: moment(change.created_at).format("YYYY/MM/DD HH:mm") - comment: change.comment + comment: change.comment_html }) $el.html(html) diff --git a/app/partials/views/modules/comments.jade b/app/partials/views/modules/comments.jade index 3e0fe352..0928fa02 100644 --- a/app/partials/views/modules/comments.jade +++ b/app/partials/views/modules/comments.jade @@ -2,8 +2,8 @@ section.us-comments div.add-comment(tg-check-permission, tg-toggle-comment, permission="modify_"+commentModel) - textarea(placeholder="Write here a new commet", ng-model="commentModel.comment") - a.button.button-green(href="", title="Comment") Comment + textarea(placeholder="Write here a new commet", ng-model="commentModel.comment", tg-markitup) + a.button.button-green.save-comment(href="", title="Comment") Comment div.comment-list //common.coffee div.comment-single(tg-change, mode="comment", ng-model="comment", ng-repeat="comment in comments") diff --git a/app/styles/modules/common/comments.scss b/app/styles/modules/common/comments.scss index d0459112..ad8c4bb9 100644 --- a/app/styles/modules/common/comments.scss +++ b/app/styles/modules/common/comments.scss @@ -6,7 +6,7 @@ margin-bottom: .5rem; min-height: inherit; } - a { + a.save-comment { color: $white; float: right; }