summaryrefslogtreecommitdiffstats
path: root/core/js/avatar.js
diff options
context:
space:
mode:
authorJan-Christoph Borchardt <hey@jancborchardt.net>2014-02-20 13:37:23 +0100
committerJan-Christoph Borchardt <hey@jancborchardt.net>2014-02-20 13:37:23 +0100
commit20b740f8e4674ab16f44127bc809a35b8db24910 (patch)
treecd0793b8d7f51efc0de3db6b242b79bdfe4ef585 /core/js/avatar.js
parent92d57cb5a7de41e576c9cbd3fae70e9802561187 (diff)
downloadnextcloud-server-20b740f8e4674ab16f44127bc809a35b8db24910.tar.gz
nextcloud-server-20b740f8e4674ab16f44127bc809a35b8db24910.zip
do not show display name on mobile when profile picture is present
Diffstat (limited to 'core/js/avatar.js')
-rw-r--r--core/js/avatar.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/js/avatar.js b/core/js/avatar.js
index c54c4068768..67d6b9b7b95 100644
--- a/core/js/avatar.js
+++ b/core/js/avatar.js
@@ -1,6 +1,13 @@
$(document).ready(function(){
if (OC.currentUser) {
- $('#header .avatardiv').avatar(OC.currentUser, 32, undefined, true);
+ var callback = function() {
+ // do not show display name on mobile when profile picture is present
+ if($('#header .avatardiv').children().length > 0) {
+ $('#header .avatardiv').addClass('avatardiv-shown');
+ }
+ };
+
+ $('#header .avatardiv').avatar(OC.currentUser, 32, undefined, true, callback);
// Personal settings
$('#avatar .avatardiv').avatar(OC.currentUser, 128);
}