diff --git a/app/views/layouts/_header.html.haml b/app/views/layouts/_header.html.haml
index aba33c3de..5e965db3e 100644
--- a/app/views/layouts/_header.html.haml
+++ b/app/views/layouts/_header.html.haml
@@ -34,11 +34,12 @@
= @unread_message_count
%ul#user_menu
- .right
- ▼
- .avatar
- = owner_image_tag(:thumb_small)
- = link_to current_user.name, '#'
+ %li
+ .right
+ ▼
+ .avatar
+ = owner_image_tag(:thumb_small)
+ = link_to current_user.name, '#'
%li= link_to t('.profile'), current_user.person
%li= link_to t('.settings'), edit_user_path
%li= link_to t('.logout'), destroy_user_session_path
diff --git a/public/javascripts/view.js b/public/javascripts/view.js
index 130e34d4a..06fb38cb1 100644
--- a/public/javascripts/view.js
+++ b/public/javascripts/view.js
@@ -223,18 +223,16 @@ var View = {
userMenu: {
click: function(evt) {
- if(!$(View.userMenu.selector).hasClass("active")) {
- evt.preventDefault();
- }
- $(this).toggleClass("active");
+ $(this).parent().toggleClass("active");
+ evt.preventDefault();
},
removeFocus: function(evt) {
var $target = $(evt.target);
- if(!$target.closest("#user_menu").length) {
- $(View.userMenu.selector).removeClass("active");
+ if(!$target.closest("#user_menu").length || ($target.attr('href') != undefined && $target.attr('href') != '#')) {
+ $(View.userMenu.selector).parent().removeClass("active");
}
},
- selector: "#user_menu"
+ selector: "#user_menu li:first-child"
},
webFingerForm: {
diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass
index 75adc56a7..ab9934418 100644
--- a/public/stylesheets/sass/application.sass
+++ b/public/stylesheets/sass/application.sass
@@ -178,16 +178,6 @@ header
:top 5px
:right 0
- a
- :padding
- :right 15px
- :color #CCC
- &:hover
- :text
- :decoration none
- .right
- :right 5px
-
&:hover
:background
:color #222
@@ -199,10 +189,26 @@ header
:display block
:padding 4px
:height 100%
- &:hover
- :background
- :color $blue
- :color #fff
+ &:hover
+ :background
+ :color $blue
+ :color #fff
+
+ &:first-child
+ :display inline
+ a
+ :height auto
+ :display inline
+ :padding
+ :right 15px
+ :color #CCC
+ &:hover
+ :background
+ :color #222
+ :text
+ :decoration none
+ .right
+ :right 5px
&.active
@include box-shadow(0,1px,2px,#333)