diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-07-25 15:04:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-25 15:04:48 +0200 |
commit | cf98d9c8d3f80b65b186613f1d3b7532ed3e566b (patch) | |
tree | 70893828423ce7289da92be80d1997c7ac7e1f1a | |
parent | 70fa73404f9de1545e9907668a9369346cc66507 (diff) | |
parent | 1f635bb8928ad7ca7c5f851595bf9936cd0f5951 (diff) | |
download | nextcloud-server-cf98d9c8d3f80b65b186613f1d3b7532ed3e566b.tar.gz nextcloud-server-cf98d9c8d3f80b65b186613f1d3b7532ed3e566b.zip |
Merge pull request #10394 from nextcloud/bugfix/10381/fix-avatar-sizing
Fix avatar sizing for comments
-rw-r--r-- | apps/comments/js/commentstabview.js | 6 | ||||
-rw-r--r-- | core/js/jquery.avatar.js | 6 | ||||
-rw-r--r-- | core/js/placeholder.js | 1 |
3 files changed, 11 insertions, 2 deletions
diff --git a/apps/comments/js/commentstabview.js b/apps/comments/js/commentstabview.js index c3903674e84..db38d055af4 100644 --- a/apps/comments/js/commentstabview.js +++ b/apps/comments/js/commentstabview.js @@ -386,7 +386,11 @@ _postRenderItem: function($el, editionMode) { $el.find('.has-tooltip').tooltip(); - $el.find('.avatar').each(function () { + var inlineAvatars = $el.find('.message .avatar'); + if ($($el.context).hasClass('message')) { + inlineAvatars = $el.find('.avatar'); + } + inlineAvatars.each(function () { var $this = $(this); $this.avatar($this.attr('data-username'), 16); }); diff --git a/core/js/jquery.avatar.js b/core/js/jquery.avatar.js index 6da86341c1e..7384804c9d4 100644 --- a/core/js/jquery.avatar.js +++ b/core/js/jquery.avatar.js @@ -133,7 +133,11 @@ } }; - $div.addClass('icon-loading'); + if (size < 32) { + $div.addClass('icon-loading-small'); + } else { + $div.addClass('icon-loading'); + } img.width = size; img.height = size; img.src = url; diff --git a/core/js/placeholder.js b/core/js/placeholder.js index 81f0b12e61a..7c1bd724550 100644 --- a/core/js/placeholder.js +++ b/core/js/placeholder.js @@ -169,5 +169,6 @@ this.css('font-size', ''); this.html(''); this.removeClass('icon-loading'); + this.removeClass('icon-loading-small'); }; }(jQuery)); |