diff --git bp-themes/bp-default/_inc/global.js bp-themes/bp-default/_inc/global.js
index c62d161..ded0663 100644
|
|
jq(document).ready( function() { |
449 | 449 | |
450 | 450 | /* Decrease the "Reply (X)" button count */ |
451 | 451 | var parent_li = comment_li.parents('ul#activity-stream > li'); |
452 | | jq('li#' + parent_li.attr('id') + ' a.acomment-reply span').html( jq('li#' + parent_li.attr('id') + ' a.acomment-reply span').html() - ( 1 + child_count ) ); |
| 452 | var count_span = jq('li#' + parent_li.attr('id') + ' a.acomment-reply span'); |
| 453 | var current_count = jq(count_span).html(); |
| 454 | |
| 455 | var new_count = current_count - ( 1 + child_count ); |
| 456 | jq(count_span).html(new_count); |
| 457 | |
| 458 | /* If that was the last comment for the item, remove the has-comments class to clean up the styling */ |
| 459 | if ( 0 == new_count ) { |
| 460 | jq(comment_li.parents('ul#activity-stream > li')).removeClass('has-comments'); |
| 461 | } |
453 | 462 | } |
454 | 463 | }); |
455 | 464 | |