Skip to:
Content

BuddyPress.org

Ticket #2587: 2587.003.patch

File 2587.003.patch, 1.2 KB (added by r-a-y, 15 years ago)
  • buddypress/bp-themes/bp-default/_inc/global.js

     
    247247                                jq("#content ul.activity-list").append(response.contents);
    248248
    249249                                target.parent().hide();
     250                                bp_dtheme_hide_comments();
    250251                        }, 'json' );
    251252
    252253                        return false;
     
    11991200                        var comment_count = jq('li#' + parent_li.attr('id') + ' a.acomment-reply span').html();
    12001201
    12011202                comment_lis.each( function(i) {
     1203                        /* hide second-level+ comments */
     1204                        var comment_child_parent = jq(this).children('ul').children('li');
     1205                        var comment_child_lis = jq(this).find('li');
     1206
     1207                        if ( comment_child_lis.length != 0 ) {
     1208                                comment_child_parent.each( function(i) {
     1209
     1210                                        jq(this).addClass('hidden');
     1211                                        jq(this).toggle();
     1212
     1213                                        if ( !i )
     1214                                                jq(this).before( '<li class="show-all"><a href="#' + comment_child_parent.attr('id') + '" title="' + bp_terms_show_all_comments + '">' + bp_terms_show_all + ' ' + comment_child_lis.size() + ' ' + bp_terms_comments + '</a></li>' );
     1215
     1216                                });
     1217                        }
     1218
    12021219                        /* Show the latest 5 root comments */
    12031220                        if ( i < comment_lis.length - 5 ) {
    12041221                                jq(this).addClass('hidden');