Merge pull request #10394 from nextcloud/bugfix/10381/fix-avatar-sizing

Fix avatar sizing for comments
This commit is contained in:
Morris Jobke 2018-07-25 15:04:48 +02:00 committed by GitHub
commit cf98d9c8d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 2 deletions

View File

@ -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);
});

View File

@ -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;

View File

@ -169,5 +169,6 @@
this.css('font-size', '');
this.html('');
this.removeClass('icon-loading');
this.removeClass('icon-loading-small');
};
}(jQuery));