Changeset 5348
- Timestamp:
- 11/24/2011 02:04:14 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-themes/bp-default/_inc/global.js
r5259 r5348 482 482 483 483 /* Decrease the "Reply (X)" button count */ 484 var parent_li = comment_li.parents('ul#activity-stream > li'); 485 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 ) ); 484 var count_span = jq('li#' + comment_li.parents('ul#activity-stream > li').attr('id') + ' a.acomment-reply span'); 485 var new_count = count_span.html() - ( 1 + child_count ); 486 count_span.html(new_count); 487 488 /* If that was the last comment for the item, remove the has-comments class to clean up the styling */ 489 if ( 0 == new_count ) { 490 jq(comment_li.parents('ul#activity-stream > li')).removeClass('has-comments'); 491 } 486 492 } 487 493 });
Note: See TracChangeset
for help on using the changeset viewer.