summaryrefslogtreecommitdiffstats
path: root/apps/comments
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-07-19 10:35:34 +0200
committerGitHub <noreply@github.com>2018-07-19 10:35:34 +0200
commitcc14ec962bfdee68b4be53b3873b3214450ca8da (patch)
treeb65034cae5e04612937bd2ef7e7d4f0bd7f6ed6e /apps/comments
parentb7e32df6603720c7f58b93a97b68cc841c0ad2ff (diff)
parent9771b70c8fdd31d0f54d7515f64b832b8836c57e (diff)
downloadnextcloud-server-cc14ec962bfdee68b4be53b3873b3214450ca8da.tar.gz
nextcloud-server-cc14ec962bfdee68b4be53b3873b3214450ca8da.zip
Merge pull request #10288 from nextcloud/bugfix/noid/comments-mention-inline
Fix inline avatar display for mentions in comments
Diffstat (limited to 'apps/comments')
-rw-r--r--apps/comments/css/comments.scss23
-rw-r--r--apps/comments/js/commentstabview.js6
2 files changed, 26 insertions, 3 deletions
diff --git a/apps/comments/css/comments.scss b/apps/comments/css/comments.scss
index ae1f6d71720..ffb6f04f533 100644
--- a/apps/comments/css/comments.scss
+++ b/apps/comments/css/comments.scss
@@ -155,8 +155,27 @@
cursor: pointer;
}
-#commentsTabView .comments li .message .atwho-inserted {
- margin-left: 5px;
+#commentsTabView .comments li .message .atwho-inserted,
+#commentsTabView .newCommentForm .atwho-inserted {
+ .avatar-name-wrapper {
+ display: inline;
+ vertical-align: top;
+ background-color: var(--color-background-dark);
+ border-radius: 50vh;
+ padding: 1px 7px 1px 1px;
+ .avatar {
+ img {
+ vertical-align: top;
+ }
+ height: 16px;
+ width: 16px;
+ vertical-align: middle;
+ padding: 1px;
+ margin-top: -3px;
+ margin-left: 0;
+ margin-right: 2px;
+ }
+ }
}
.atwho-view-ul * .avatar-name-wrapper {
diff --git a/apps/comments/js/commentstabview.js b/apps/comments/js/commentstabview.js
index 9477cb0c301..fc074b709ad 100644
--- a/apps/comments/js/commentstabview.js
+++ b/apps/comments/js/commentstabview.js
@@ -383,7 +383,11 @@
_postRenderItem: function($el, editionMode) {
$el.find('.has-tooltip').tooltip();
- $el.find('.avatar').each(function() {
+ $el.find('.avatar').each(function () {
+ var $this = $(this);
+ $this.avatar($this.attr('data-username'), 16);
+ });
+ $el.find('.authorRow .avatar').each(function () {
var $this = $(this);
$this.avatar($this.attr('data-username'), 32);
});