avatars for likes
This commit is contained in:
parent
302ef968bc
commit
b879070744
5 changed files with 23 additions and 8 deletions
|
|
@ -51,6 +51,7 @@ class LikesController < ApplicationController
|
|||
def index
|
||||
if target
|
||||
@likes = target.likes.includes(:author => :profile)
|
||||
@people = @likes.map{|x| x.author}
|
||||
render :layout => false
|
||||
else
|
||||
render :nothing => true, :status => 404
|
||||
|
|
|
|||
|
|
@ -2,5 +2,6 @@
|
|||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
= notification_people_link(nil, likes.map{|x| x.author})
|
||||
- @people[0..17].each do |person|
|
||||
= person_image_link(person)
|
||||
|
||||
|
|
|
|||
|
|
@ -129,11 +129,19 @@ var View = {
|
|||
});
|
||||
}
|
||||
},
|
||||
|
||||
contacts_on_side: {
|
||||
bind: function() {
|
||||
$("#selected_aspect_contacts .avatar").twipsy({
|
||||
live: true,
|
||||
placement: 'right'
|
||||
live: true
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
like_avatars: {
|
||||
bind: function() {
|
||||
$(".likes_list .avatar").twipsy({
|
||||
live: true
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -21,8 +21,10 @@
|
|||
|
||||
$.get(self.expander.attr('href'), function(data) {
|
||||
self.loadingImage.fadeOut(100, function() {
|
||||
self.likesList.html(data)
|
||||
.fadeToggle(100);
|
||||
self.expander.fadeOut(100, function(){
|
||||
self.likesList.html(data)
|
||||
.fadeToggle(100);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -749,7 +749,6 @@ form.new_comment
|
|||
:margin
|
||||
:left 5px
|
||||
|
||||
|
||||
.stream.show
|
||||
ul.comments
|
||||
li
|
||||
|
|
@ -2258,8 +2257,6 @@ ul.show_comments,
|
|||
:color #999
|
||||
|
||||
.likes_container
|
||||
:margin
|
||||
:bottom -4px
|
||||
:padding 4px
|
||||
|
||||
ul.show_comments,
|
||||
|
|
@ -3429,3 +3426,9 @@ a.toggle_selector
|
|||
|
||||
&:hover
|
||||
@include opacity(1)
|
||||
|
||||
.likes_list
|
||||
.avatar
|
||||
:float none
|
||||
:height 20px
|
||||
:width 20px
|
||||
|
|
|
|||
Loading…
Reference in a new issue