Show correct contact count in right bar when changing target aspect.

This commit is contained in:
Andrej Kacian 2011-07-31 12:29:56 +02:00
parent 790c74d1a6
commit 78c3d91abd
2 changed files with 2 additions and 2 deletions

View file

@ -52,7 +52,7 @@ class AspectsController < ApplicationController
if params[:only_posts]
render :partial => 'shared/stream', :locals => {:posts => @posts}
else
@contact_count = current_user.contacts.receiving.count
@contact_count = all_selected_people.count
@aspect = :all unless params[:a_ids]
@aspect ||= @aspects.first # used in mobile

View file

@ -1,3 +1,3 @@
$('#aspect_stream_container').html("<%= escape_javascript(render('aspects/aspect_stream', :aspect => @aspect, :aspect_ids => @aspect_ids, :posts => @posts)) %>");
$('#selected_aspect_contacts').html("<%= escape_javascript(render('aspects/selected_contacts', :people => @selected_people[0..19], :count => @selected_people.size )) %>");
$('#selected_aspect_contacts').html("<%= escape_javascript(render('aspects/selected_contacts', :people => @selected_people[0..19], :count => @contact_count )) %>");
$('#aspect_stream_container a[rel*=facebox]').facebox();