Make popover stylable and apply default styling

This commit is contained in:
Maximilian Grundke
2017-08-16 18:27:35 +02:00
parent b5c997e8a9
commit 0326354847
2 changed files with 10 additions and 1 deletions

View File

@@ -21,3 +21,11 @@
.ace_tooltip {
display: none !important;
}
.popover-username {
font-weight: bold;
}
.popover-comment {
word-wrap: break-word;
}

View File

@@ -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 += '<p><b>' + comment.username + '</b>: ' + preprocess(comment.text) + '<p>';
popupContent += '<p><div class="popover-username">' + comment.username + ':</div>' +
'<div class="popover-comment">' + preprocess(comment.text) + '</div><p>';
});
var icon = $('*[data-file-id="' + fileid + '"] > .ace_gutter > .ace_gutter-layer > div:nth-child(' + (clusterRow + 1) + ')');
icon.popover({