Merge pull request #4870 from svbergerem/activate-hovercards
Activate hovercards in SPV and conversations
This commit is contained in:
commit
b0a4d5d439
3 changed files with 5 additions and 1 deletions
|
|
@ -34,6 +34,7 @@
|
|||
* New menu for the mobile version [#4673](https://github.com/diaspora/diaspora/pull/4673)
|
||||
* Added comment count to statistic to enable calculations of posts/comments ratios [#4799](https://github.com/diaspora/diaspora/pull/4799)
|
||||
* Add filters to notifications controller [#4814](https://github.com/diaspora/diaspora/pull/4814)
|
||||
* Activate hovercards in SPV and conversations [#4870](https://github.com/diaspora/diaspora/pull/4870)
|
||||
|
||||
# 0.3.0.3
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ app.pages.SinglePostViewer = app.views.Base.extend({
|
|||
var html_title = app.helpers.textFormatter(this.model.get("title"), this.model);
|
||||
//... and converts html to plain text
|
||||
document.title = $('<div>').html(html_title).text();
|
||||
app.hovercard.deactivate() // No hovercards for now.
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ module PeopleHelper
|
|||
def person_link(person, opts={})
|
||||
opts[:class] ||= ""
|
||||
opts[:class] << " self" if defined?(user_signed_in?) && user_signed_in? && current_user.person == person
|
||||
opts[:class] << " hovercardable" if defined?(user_signed_in?) && user_signed_in? && current_user.person != person
|
||||
remote_or_hovercard_link = Rails.application.routes.url_helpers.person_path(person).html_safe
|
||||
"<a data-hovercard='#{remote_or_hovercard_link}' href='#{remote_or_hovercard_link}' class='#{opts[:class]}' #{ ("target=" + opts[:target]) if opts[:target]}>#{h(person.name)}</a>".html_safe
|
||||
end
|
||||
|
|
@ -39,6 +40,9 @@ module PeopleHelper
|
|||
if opts[:to] == :photos
|
||||
link_to person_image_tag(person, opts[:size]), person_photos_path(person)
|
||||
else
|
||||
opts[:class] ||= ""
|
||||
opts[:class] << " self" if defined?(user_signed_in?) && user_signed_in? && current_user.person == person
|
||||
opts[:class] << " hovercardable" if defined?(user_signed_in?) && user_signed_in? && current_user.person != person
|
||||
remote_or_hovercard_link = Rails.application.routes.url_helpers.person_path(person).html_safe
|
||||
"<a href='#{remote_or_hovercard_link}' class='#{opts[:class]}' #{ ("target=" + opts[:target]) if opts[:target]}>
|
||||
#{person_image_tag(person, opts[:size])}
|
||||
|
|
|
|||
Loading…
Reference in a new issue