Skip to content
Extraits de code Groupes Projets
Valider cd241ee9 rédigé par Steffen van Bergerem's avatar Steffen van Bergerem
Parcourir les fichiers

Hovercards! Everywhere!

parent 029520a3
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -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])}
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter