Skip to:
Content

BuddyPress.org

Ticket #2587: 2587.002.patch

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

     
    12071207                                if ( !i )
    12081208                                        jq(this).before( '<li class="show-all"><a href="#' + parent_li.attr('id') + '/show-all/" title="' + bp_terms_show_all_comments + '">' + bp_terms_show_all + ' ' + comment_count + ' ' + bp_terms_comments + '</a></li>' );
    12091209                        }
     1210                        else {
     1211                                var comment_child_parent = jq(this).children('ul').children('li');
     1212                                var comment_child_lis = jq(this).find('li');
     1213
     1214                                if ( comment_child_lis.length != 0 ) {
     1215                                        comment_child_parent.each( function(i) {
     1216
     1217                                                jq(this).addClass('hidden');
     1218                                                jq(this).toggle();
     1219
     1220                                                if ( !i )
     1221                                                        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>' );
     1222                                        });
     1223                                }                       
     1224                        }
    12101225                });
    12111226
    12121227        });