diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/css/header.css | 2 | ||||
-rw-r--r-- | core/js/avatar.js | 10 | ||||
-rw-r--r-- | core/templates/layout.user.php | 10 |
3 files changed, 9 insertions, 13 deletions
diff --git a/core/css/header.css b/core/css/header.css index f83ef451ce6..33eb7e25cc6 100644 --- a/core/css/header.css +++ b/core/css/header.css @@ -239,6 +239,8 @@ display: inline-block; margin-right: 5px; cursor: pointer; + height: 32px; + width: 32px; } #header .avatardiv img { opacity: 1; diff --git a/core/js/avatar.js b/core/js/avatar.js index 6835f6ef0ac..8ff136d67ca 100644 --- a/core/js/avatar.js +++ b/core/js/avatar.js @@ -1,15 +1,5 @@ $(document).ready(function(){ if (OC.currentUser) { - 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); } diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php index 9445175efcf..09630435b77 100644 --- a/core/templates/layout.user.php +++ b/core/templates/layout.user.php @@ -65,13 +65,17 @@ </a> <div id="logo-claim" style="display:none;"><?php p($theme->getLogoClaim()); ?></div> <div id="settings" class="svg"> - <span id="expand" tabindex="0" role="link"> + <div id="expand" tabindex="0" role="link"> <?php if ($_['enableAvatars']): ?> - <div class="avatardiv"></div> + <div class="avatardiv"<?php if (!$_['userAvatarSet']) { print_unescaped(' style="display: none"'); } ?>> + <?php if ($_['userAvatarSet']): ?> + <img src="<?php p(link_to('', 'index.php').'/avatar/'.$_['user_uid'].'/32?requesttoken='.$_['requesttoken']); ?>"> + <?php endif; ?> + </div> <?php endif; ?> <span id="expandDisplayName"><?php p(trim($_['user_displayname']) != '' ? $_['user_displayname'] : $_['user_uid']) ?></span> <img class="svg" alt="" src="<?php print_unescaped(image_path('', 'actions/caret.svg')); ?>" /> - </span> + </div> <div id="expanddiv"> <ul> <?php foreach($_['settingsnavigation'] as $entry):?> |