diff --git a/app/assets/javascripts/inbox.js b/app/assets/javascripts/inbox.js index 1df6c0abf..60fcafd91 100644 --- a/app/assets/javascripts/inbox.js +++ b/app/assets/javascripts/inbox.js @@ -105,6 +105,11 @@ $(document).ready(function(){ var self = $(this); self.popover('show'); var popup = self.data('popover').$tip[0]; + + // attach tooltips to each avatar showing the name + $(popup).find('.avatar').tooltip({ placement: 'bottom' }); + + // register handler for the close button var close = $(popup).find('.close'); close.click(function(){ self.popover('hide'); diff --git a/app/views/conversations/_participants_popover.haml b/app/views/conversations/_participants_popover.haml index d6adb542e..0e9f8a558 100644 --- a/app/views/conversations/_participants_popover.haml +++ b/app/views/conversations/_participants_popover.haml @@ -1,7 +1,10 @@ .conversation_participants_popover_content{ :"data-content-conversation-id" => conversation.id } .conversation_participants_popover - conversation.participants.limit(20).each do |participant| - = image_tag(participant.profile.image_url_small, :class => 'avatar', :title => participant.name) + = image_tag(participant.profile.image_url_small, + :class => 'avatar', + :title => participant.name, + :data => {:toggle => 'tooltip'}) - participants_count = conversation.participants.count - if participants_count > 20 %span{ :class => 'participants_left' } And #{participants_count - 20} more