summaryrefslogtreecommitdiffstats
path: root/core/js/jquery.avatar.js
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2017-09-20 17:19:35 +0200
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2017-09-20 17:19:35 +0200
commitff71dd07a6db2b9fb60e1b756eac84ef103cabe0 (patch)
tree7a5067d557165e6707594ac680f02083d7448131 /core/js/jquery.avatar.js
parente43400eddbfdac765c8dcc5d90b4398e304dbaaf (diff)
downloadnextcloud-server-ff71dd07a6db2b9fb60e1b756eac84ef103cabe0.tar.gz
nextcloud-server-ff71dd07a6db2b9fb60e1b756eac84ef103cabe0.zip
Unify appearance of avatars for undefined and unknown users
When calling the jQuery avatar plugin with a user that did not exist (that is, users for which "/avatar/{user}/{size}" return a JSON response with an empty "displayname" value) "?" on a grey background was shown. However, if the jQuery avatar plugin was called with an undefined JavaScript value then "?" was shown on a bluish background. This commit unifies both cases to use the grey background. The unit tests were also modified to ensure that the grey background is used in both cases. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'core/js/jquery.avatar.js')
-rw-r--r--core/js/jquery.avatar.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/js/jquery.avatar.js b/core/js/jquery.avatar.js
index 29d019baea7..5813a80646f 100644
--- a/core/js/jquery.avatar.js
+++ b/core/js/jquery.avatar.js
@@ -73,6 +73,7 @@
user = this.data('user');
} else {
this.imageplaceholder('?');
+ this.css('background-color', '#b9b9b9');
return;
}
}