use tooltip plugin to display the name under the avatar
(temporary solution until the proposed solution from the [pull request](https://github.com/diaspora/diaspora/pull/4149) is implemented)
This commit is contained in:
parent
c2a9cb55ef
commit
f694a40992
2 changed files with 9 additions and 1 deletions
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue