From b0c9380114f01917e68804da7608dfc9d0eab972 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Tue, 26 Sep 2017 22:50:16 +0200 Subject: [PATCH] Don't show placeholder when we have loaded the avatar image Fixes #6618 Else it shows up as background to transparent avatars Signed-off-by: Roeland Jago Douma --- core/js/jquery.avatar.js | 1 + core/js/placeholder.js | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/core/js/jquery.avatar.js b/core/js/jquery.avatar.js index fae100fda2..a320496e25 100644 --- a/core/js/jquery.avatar.js +++ b/core/js/jquery.avatar.js @@ -148,6 +148,7 @@ $div.show(); $div.text(''); $div.append(img); + $div.clearimageplaceholder(); }; img.width = size; diff --git a/core/js/placeholder.js b/core/js/placeholder.js index b8075b5397..f173e73867 100644 --- a/core/js/placeholder.js +++ b/core/js/placeholder.js @@ -148,4 +148,13 @@ this.html(text[0].toUpperCase()); } }; + + $.fn.clearimageplaceholder = function() { + this.css('background-color', ''); + this.css('color', ''); + this.css('font-weight', ''); + this.css('text-align', ''); + this.css('line-height', ''); + this.css('font-size', ''); + }; }(jQuery));