diff --git a/app/controllers/likes_controller.rb b/app/controllers/likes_controller.rb index d8a49fad4518f781de94f760ee8f42621e128d90..deedb753a40eb4e1967795bb68956a8bb9db8043 100644 --- a/app/controllers/likes_controller.rb +++ b/app/controllers/likes_controller.rb @@ -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 diff --git a/app/views/likes/_likes.haml b/app/views/likes/_likes.haml index a3cc3aee7de7d5361bec328d1330ac20cd9eb330..a2e89298d0c4d49f5085ca39c775a82f14166ce4 100644 --- a/app/views/likes/_likes.haml +++ b/app/views/likes/_likes.haml @@ -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) diff --git a/public/javascripts/view.js b/public/javascripts/view.js index e2e09f0e567375066a1c43396a379956650041a0..2201a712ba86be3a4477be00df09e494dec656a5 100644 --- a/public/javascripts/view.js +++ b/public/javascripts/view.js @@ -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 }); } }, diff --git a/public/javascripts/widgets/likes.js b/public/javascripts/widgets/likes.js index b7c7ad89d970bc66e638e2fe95ae68b2638b91db..fb233e9fcfe8cd9bc8e03155bddfdb118c867bdc 100644 --- a/public/javascripts/widgets/likes.js +++ b/public/javascripts/widgets/likes.js @@ -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); + }); }); }); } diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 06b7ca75e433696e42ab4bef52a6c35f6532e197..ff00e49151899858583645fb6e6d21dc8d4932ff 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -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