diff options
author | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2014-02-20 13:36:52 +0100 |
---|---|---|
committer | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2014-02-20 13:36:52 +0100 |
commit | 92d57cb5a7de41e576c9cbd3fae70e9802561187 (patch) | |
tree | a4f6ad71b58c83a9cba3ede9e803d8c3e6e5b386 /core | |
parent | 3e2c56157bfb20fbc48bdf668bd56fb47bd7cc1f (diff) | |
download | nextcloud-server-92d57cb5a7de41e576c9cbd3fae70e9802561187.tar.gz nextcloud-server-92d57cb5a7de41e576c9cbd3fae70e9802561187.zip |
move avatar into clickable area of user menu
Diffstat (limited to 'core')
-rw-r--r-- | core/css/styles.css | 8 | ||||
-rw-r--r-- | core/js/js.js | 4 | ||||
-rw-r--r-- | core/templates/layout.user.php | 6 |
3 files changed, 10 insertions, 8 deletions
diff --git a/core/css/styles.css b/core/css/styles.css index c17d0a9bc07..1c80a3ea160 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -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; } diff --git a/core/js/js.js b/core/js/js.js index d4d2583f1e5..59d48806418 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -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); }); diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php index bc1c700402e..8b9e1e0f4fe 100644 --- a/core/templates/layout.user.php +++ b/core/templates/layout.user.php @@ -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):?> |