fixed a comment counting bug, and the show_all_comments message when the comment count was three
This commit is contained in:
parent
efee7682e2
commit
5f1f28923f
2 changed files with 2 additions and 2 deletions
|
|
@ -7,7 +7,7 @@ module StreamHelper
|
||||||
def comment_toggle(count)
|
def comment_toggle(count)
|
||||||
if count == 0
|
if count == 0
|
||||||
link_to "#{t('comments.new_comment.comment').downcase}", '#', :class => "show_post_comments"
|
link_to "#{t('comments.new_comment.comment').downcase}", '#', :class => "show_post_comments"
|
||||||
elsif count < 3
|
elsif count <= 3
|
||||||
link_to "#{t('stream_helper.hide_comments')} (#{count})", '#', :class => "show_post_comments"
|
link_to "#{t('stream_helper.hide_comments')} (#{count})", '#', :class => "show_post_comments"
|
||||||
else
|
else
|
||||||
link_to "#{t('stream_helper.show_comments')} (#{count})", '#', :class => "show_post_comments"
|
link_to "#{t('stream_helper.show_comments')} (#{count})", '#', :class => "show_post_comments"
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ processPerson: function(response){
|
||||||
|
|
||||||
if(toggler.length > 0){
|
if(toggler.length > 0){
|
||||||
toggler.html(
|
toggler.html(
|
||||||
toggler.html().replace(/\d+/,$('.comments', post)[0].childElementCount -1)
|
toggler.html().replace(/\d+/,$('.comments', post).find('li').length -1)
|
||||||
);
|
);
|
||||||
|
|
||||||
if( !$(".comments", post).is(':visible') ){
|
if( !$(".comments", post).is(':visible') ){
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue