From 389934920deb654d6e43c9dc0f0da153d9932735 Mon Sep 17 00:00:00 2001 From: Maximilian Grundke Date: Thu, 17 Aug 2017 13:57:03 +0200 Subject: [PATCH] Add dividers and comment date to popover --- app/views/request_for_comments/show.html.erb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/views/request_for_comments/show.html.erb b/app/views/request_for_comments/show.html.erb index 52faed62..a9bf7c65 100644 --- a/app/views/request_for_comments/show.html.erb +++ b/app/views/request_for_comments/show.html.erb @@ -180,9 +180,13 @@ also, all settings from the rails model needed for the editor configuration in t return a.id - b.id; }); var popupContent = ''; - cluster.forEach(function(comment) { + cluster.forEach(function(comment, index) { + if (index !== 0) { + popupContent += '
' + } popupContent += '

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

'; + '

' + preprocess(comment.text) + '
' + + '
' + comment.date + '

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