From 1f635bb8928ad7ca7c5f851595bf9936cd0f5951 Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Wed, 25 Jul 2018 14:26:27 +0200 Subject: Use small loading indicator for avatars smaller than 32px MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- core/js/jquery.avatar.js | 6 +++++- core/js/placeholder.js | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'core/js') 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)); -- cgit v1.2.3