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
|
def index
|
||||||
if target
|
if target
|
||||||
@likes = target.likes.includes(:author => :profile)
|
@likes = target.likes.includes(:author => :profile)
|
||||||
|
@people = @likes.map{|x| x.author}
|
||||||
render :layout => false
|
render :layout => false
|
||||||
else
|
else
|
||||||
render :nothing => true, :status => 404
|
render :nothing => true, :status => 404
|
||||||
|
|
|
||||||
|
|
@ -2,5 +2,6 @@
|
||||||
-# licensed under the Affero General Public License version 3 or later. See
|
-# licensed under the Affero General Public License version 3 or later. See
|
||||||
-# the COPYRIGHT file.
|
-# 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: {
|
contacts_on_side: {
|
||||||
bind: function() {
|
bind: function() {
|
||||||
$("#selected_aspect_contacts .avatar").twipsy({
|
$("#selected_aspect_contacts .avatar").twipsy({
|
||||||
live: true,
|
live: true
|
||||||
placement: 'right'
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
like_avatars: {
|
||||||
|
bind: function() {
|
||||||
|
$(".likes_list .avatar").twipsy({
|
||||||
|
live: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,10 @@
|
||||||
|
|
||||||
$.get(self.expander.attr('href'), function(data) {
|
$.get(self.expander.attr('href'), function(data) {
|
||||||
self.loadingImage.fadeOut(100, function() {
|
self.loadingImage.fadeOut(100, function() {
|
||||||
self.likesList.html(data)
|
self.expander.fadeOut(100, function(){
|
||||||
.fadeToggle(100);
|
self.likesList.html(data)
|
||||||
|
.fadeToggle(100);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -749,7 +749,6 @@ form.new_comment
|
||||||
:margin
|
:margin
|
||||||
:left 5px
|
:left 5px
|
||||||
|
|
||||||
|
|
||||||
.stream.show
|
.stream.show
|
||||||
ul.comments
|
ul.comments
|
||||||
li
|
li
|
||||||
|
|
@ -2258,8 +2257,6 @@ ul.show_comments,
|
||||||
:color #999
|
:color #999
|
||||||
|
|
||||||
.likes_container
|
.likes_container
|
||||||
:margin
|
|
||||||
:bottom -4px
|
|
||||||
:padding 4px
|
:padding 4px
|
||||||
|
|
||||||
ul.show_comments,
|
ul.show_comments,
|
||||||
|
|
@ -3429,3 +3426,9 @@ a.toggle_selector
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
@include opacity(1)
|
@include opacity(1)
|
||||||
|
|
||||||
|
.likes_list
|
||||||
|
.avatar
|
||||||
|
:float none
|
||||||
|
:height 20px
|
||||||
|
:width 20px
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue