fixed some styling/positioning. don't display a hovercard for the current user's person links

This commit is contained in:
danielgrippi 2011-07-06 01:23:30 -07:00
parent a96b77555e
commit d51e9431a6
3 changed files with 19 additions and 13 deletions

View file

@ -59,6 +59,8 @@ module ApplicationHelper
end
def person_link(person, opts={})
opts[:class] ||= ""
opts[:class] << " self" if current_user.person == person
"<a href='/people/#{person.id}' class='#{opts[:class]}'>
#{h(person.name)}
</a>".html_safe

View file

@ -12,15 +12,15 @@
tip: $("#hovercard"),
dropdownContainer: $("#hovercard_dropdown_container"),
offset: {
left: -80,
top: -15
left: 0,
top: 18
},
personLink: $("#hovercard").find("a.person"),
avatar: $("#hovercard").find(".avatar"),
dropdown: $("#hovercard").find(".dropdown_list")
};
$(document.body).delegate("a.author", "hover", self.handleHoverEvent);
$(document.body).delegate("a.author:not(.self)", "hover", self.handleHoverEvent);
self.hoverCard.tip.hover(self.hoverCardHover, self.clearTimeout);
Diaspora.widgets.subscribe("aspectDropdown/updated aspectDropdown/blurred", function(evt, personId, dropdownHtml) {
@ -69,7 +69,7 @@
self.dropdownCache.get(self.target.attr("href") + "/aspect_membership_button", function(dropdown) {
self.hoverCard.dropdownContainer.html(dropdown);
self.hoverCard.tip.fadeIn('fast');
self.hoverCard.tip.fadeIn(140);
});
};
@ -79,9 +79,8 @@
function callback() {
self.timeout = clearTimeout(self.timeout);
self.hoverCard.tip.fadeOut("fast", function(){
self.hoverCard.dropdownContainer.html("");
});
self.hoverCard.tip.hide();
self.hoverCard.dropdownContainer.html("");
};
if((typeof delayed === "boolean" && delayed) || (typeof delayed === "object" && delayed.type === "mouseleave")) {

View file

@ -3072,9 +3072,7 @@ ul.left_nav
#hovercard
@include border-radius(2px)
@include dropdown-shadow
@include box-shadow(0,0,12px,#444)
@include box-shadow(0,0,5px,#666)
.avatar
:position relative
@ -3087,12 +3085,13 @@ ul.left_nav
:display none
:background
:color $background
:padding 5px
:bottom 25px
:bottom 28px
:border 1px solid #999
:width 240px
:width 220px
:z
:index 10
@ -3105,5 +3104,11 @@ ul.left_nav
:color #eee
:width 100%
:font
:size smaller
:border
:top 1px solid #ccc
.footer_container
:padding 0 10px
:padding 2px 5px