diff options
author | Julius Härtl <jus@bitgrid.net> | 2018-07-25 14:26:27 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2018-07-25 14:26:27 +0200 |
commit | 1f635bb8928ad7ca7c5f851595bf9936cd0f5951 (patch) | |
tree | 70893828423ce7289da92be80d1997c7ac7e1f1a /core | |
parent | 6d29b362003c15334577c596f676a0fb599d7bdb (diff) | |
download | nextcloud-server-1f635bb8928ad7ca7c5f851595bf9936cd0f5951.tar.gz nextcloud-server-1f635bb8928ad7ca7c5f851595bf9936cd0f5951.zip |
Use small loading indicator for avatars smaller than 32px
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'core')
-rw-r--r-- | core/js/jquery.avatar.js | 6 | ||||
-rw-r--r-- | core/js/placeholder.js | 1 |
2 files changed, 6 insertions, 1 deletions
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)); |