move avatar into clickable area of user menu

This commit is contained in:
Jan-Christoph Borchardt 2014-02-20 13:36:52 +01:00
parent 3e2c56157b
commit 92d57cb5a7
3 changed files with 10 additions and 8 deletions

View file

@ -37,11 +37,12 @@ body { background:#fefefe; font:normal .8em/1.6em "Helvetica Neue",Helvetica,Ari
.header-right { float:right; vertical-align:middle; padding:0.5em; }
.header-right > * { vertical-align:middle; }
/* Profile picture in header */
#header .avatardiv {
float: left;
display: inline-block;
margin-right: 5px;
}
#header .avatardiv img {
opacity: 1;
}
@ -708,12 +709,11 @@ label.infield { cursor:text !important; top:1.05em; left:.85em; }
/* USER MENU */
#settings {
float: right;
margin-top: 7px;
margin-left: 10px;
color: #bbb;
}
#expand {
padding: 15px 15px 15px 5px;
display: block;
padding: 7px 12px 6px 7px;
cursor: pointer;
font-weight: bold;
}

View file

@ -860,6 +860,7 @@ function initCore() {
// checkShowCredentials();
// $('input#user, input#password').keyup(checkShowCredentials);
// user menu
$('#settings #expand').keydown(function(event) {
if (event.which === 13 || event.which === 32) {
$('#expand').click()
@ -872,7 +873,8 @@ function initCore() {
$('#settings #expanddiv').click(function(event){
event.stopPropagation();
});
$(document).click(function(){//hide the settings menu when clicking outside it
//hide the user menu when clicking outside it
$(document).click(function(){
$('#settings #expanddiv').slideUp(200);
});

View file

@ -50,12 +50,12 @@
<div id="logo-claim" style="display:none;"><?php p($theme->getLogoClaim()); ?></div>
<div id="settings" class="svg">
<span id="expand" tabindex="0" role="link">
<?php if ($_['enableAvatars']): ?>
<div class="avatardiv"></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>
<?php if ($_['enableAvatars']): ?>
<div class="avatardiv"></div>
<?php endif; ?>
<div id="expanddiv">
<ul>
<?php foreach($_['settingsnavigation'] as $entry):?>