From 03263548470f41f3b84478d9559d59ae03ceb532 Mon Sep 17 00:00:00 2001 From: Maximilian Grundke Date: Wed, 16 Aug 2017 18:27:35 +0200 Subject: [PATCH] Make popover stylable and apply default styling --- app/assets/stylesheets/request-for-comments.css.scss | 8 ++++++++ app/views/request_for_comments/show.html.erb | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/request-for-comments.css.scss b/app/assets/stylesheets/request-for-comments.css.scss index 87eeba44..6f28a6f0 100644 --- a/app/assets/stylesheets/request-for-comments.css.scss +++ b/app/assets/stylesheets/request-for-comments.css.scss @@ -21,3 +21,11 @@ .ace_tooltip { display: none !important; } + +.popover-username { + font-weight: bold; +} + +.popover-comment { + word-wrap: break-word; +} diff --git a/app/views/request_for_comments/show.html.erb b/app/views/request_for_comments/show.html.erb index 96470d05..7efa26a3 100644 --- a/app/views/request_for_comments/show.html.erb +++ b/app/views/request_for_comments/show.html.erb @@ -178,7 +178,8 @@ also, all settings from the rails model needed for the editor configuration in t } var popupContent = ''; cluster.forEach(function(comment) { - popupContent += '

' + comment.username + ': ' + preprocess(comment.text) + '

'; + popupContent += '

' + comment.username + ':
' + + '
' + preprocess(comment.text) + '

'; }); var icon = $('*[data-file-id="' + fileid + '"] > .ace_gutter > .ace_gutter-layer > div:nth-child(' + (clusterRow + 1) + ')'); icon.popover({