From f3d185fe410238158fe703ae95aaf2f62d985423 Mon Sep 17 00:00:00 2001
From: danielgrippi <danielgrippi@gmail.com>
Date: Wed, 6 Jul 2011 17:13:11 -0700
Subject: [PATCH] hovercard on comments

---
 app/models/person.rb                     |  2 +-
 app/models/status_message.rb             |  4 ++--
 public/stylesheets/sass/application.sass | 18 ++++++++++++++----
 spec/models/status_message_spec.rb       |  4 ++--
 4 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/app/models/person.rb b/app/models/person.rb
index c56adb3745..e67a5071fa 100644
--- a/app/models/person.rb
+++ b/app/models/person.rb
@@ -223,7 +223,7 @@ class Person < ActiveRecord::Base
     json = {
       :id => self.id,
       :name => self.name,
-      :avatar => self.profile.image_url(:thumb_small),
+      :avatar => self.profile.image_url(:thumb_medium),
       :handle => self.diaspora_handle,
       :url => "/people/#{self.id}",
       :hashtags => self.profile.tags.map{|t| "##{t.name}"}
diff --git a/app/models/status_message.rb b/app/models/status_message.rb
index 0c8e998b24..a5aed41b34 100644
--- a/app/models/status_message.rb
+++ b/app/models/status_message.rb
@@ -57,7 +57,7 @@ class StatusMessage < Post
       if opts[:plain_text]
         person ? ERB::Util.h(person.name) : ERB::Util.h($~[1])
       else
-        person ? "<a href=\"/people/#{person.id}\" class=\"mention\">@#{ERB::Util.h(person.name)}</a>" : ERB::Util.h($~[1])
+        person ? "<a href=\"/people/#{person.id}\" class=\"mention hovercardable\">@#{ERB::Util.h(person.name)}</a>" : ERB::Util.h($~[1])
       end
     end
     form_message
@@ -107,7 +107,7 @@ class StatusMessage < Post
     <activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
     <activity:object-type>http://activitystrea.ms/schema/1.0/note</activity:object-type>
   </entry>
-      XML
+    XML
   end
 
   def socket_to_user(user_or_id, opts={})
diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass
index 5faf6cf0b2..4017038562 100644
--- a/public/stylesheets/sass/application.sass
+++ b/public/stylesheets/sass/application.sass
@@ -3082,12 +3082,21 @@ ul.left_nav
   :background
     :color $background
 
+  :height 70px
+
   :padding 5px
-    :bottom 55px
+    :bottom 25px
 
   :border 1px solid #999
 
   :width 240px
+    
+  h4
+    :margin
+      :bottom 10px
+  a
+    :font
+      :weight bold !important
 
   .hovercard_footer
     :position absolute
@@ -3097,8 +3106,7 @@ ul.left_nav
       :color #eee
     :width 100%
 
-    :height 20px
-    :min-height 20px
+    :min-height 19px
 
     :font
       :size smaller
@@ -3107,7 +3115,7 @@ ul.left_nav
       :top 1px solid #ccc
 
     .footer_container
-      :padding 2px 5px
+      :padding 1px 5px
 
       .hashtags
         :overflow hidden
@@ -3118,6 +3126,8 @@ ul.left_nav
         :color #999
         :margin
           :right 4px
+        :font
+          :weight normal
 
 #hovercard_container
   :padding 10px
diff --git a/spec/models/status_message_spec.rb b/spec/models/status_message_spec.rb
index 80969ddb0c..ce2f6e5577 100644
--- a/spec/models/status_message_spec.rb
+++ b/spec/models/status_message_spec.rb
@@ -87,8 +87,8 @@ STR
     describe '#format_mentions' do
       it 'adds the links in the formated message text' do
         @sm.format_mentions(@sm.raw_message).should == <<-STR
-#{link_to('@' << @people[0].name, person_path(@people[0]), :class => 'mention')} can mention people like Raphael #{link_to('@' << @people[1].name, person_path(@people[1]), :class => 'mention')}
-can mention people like Raphaellike Raphael #{link_to('@' << @people[2].name, person_path(@people[2]), :class => 'mention')} can mention people like Raph
+#{link_to('@' << @people[0].name, person_path(@people[0]), :class => 'mention hovercardable')} can mention people like Raphael #{link_to('@' << @people[1].name, person_path(@people[1]), :class => 'mention hovercardable')}
+can mention people like Raphaellike Raphael #{link_to('@' << @people[2].name, person_path(@people[2]), :class => 'mention hovercardable')} can mention people like Raph
 STR
       end
 
-- 
GitLab