hopefully finally fix #946

This commit is contained in:
MrZYX 2011-04-11 19:01:16 +02:00
parent e91c153257
commit 440fd26c14
3 changed files with 31 additions and 26 deletions

View file

@ -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

View file

@ -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: {

View file

@ -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)