Ticket #2587: buy-me-toys.diff
| File buy-me-toys.diff, 4.5 KB (added by , 15 years ago) |
|---|
-
_inc/css/default.css
1021 1021 /* > Activity Stream Listing 1022 1022 -------------------------------------------------------------- */ 1023 1023 1024 div.show-hidden a { 1025 position: absolute; 1026 right: 0; 1027 top: 7px; 1028 font-size: .9em; 1029 background-color: #eee; 1030 text-decoration: none; 1031 padding: 3px 6px; 1032 } 1033 1024 1034 ul.activity-list li { 1025 1035 padding: 20px 0 0 0; 1026 1036 overflow: hidden; -
_inc/global.js
430 430 431 431 return false; 432 432 } 433 434 /* Showing hidden comments - pause for half a second */ 435 if ( target.parent().hasClass('show-hidden') ) { 436 target.parent().addClass('loading'); 437 438 setTimeout( function() { 439 target.parent().parent().parent().find('ul.acomment-container li').slideDown(200, function() { 440 target.parent().parent().find('.show-hidden').fadeOut( 200 ); 441 }); 442 }, 600 ); 443 444 return false; 445 } 433 446 }); 434 447 435 448 /* Escape Key Press for cancelling comment forms */ … … 1180 1193 }, 'json' ); 1181 1194 } 1182 1195 1183 /* Hide long lists of activity comments, only show the latest five root comments. */1184 1196 function bp_dtheme_hide_comments() { 1197 1198 // Set thresholds for when 'More' clickables will appear' 1199 var large_threshold = 10; 1200 var small_threshold = 1; 1201 1202 // Check for activity comments 1203 var comments_divs = jq('div.activity-comments'); 1204 1205 // Loop through each div.activity-comments 1206 comments_divs.each( function(i) { 1207 1208 // The top-most parent activity div in a hierarchy 1209 var comments_div = jq(this); 1210 1211 // Recursive replies within the current top-most activity item 1212 //var comment_replies = comments_div.children('li'); 1213 var comment_replies = comments_div.children('ul.acomment-container').children('li'); 1214 1215 var comment_replies_count = comment_replies.size(); 1216 var comment_replies_total = comment_replies.find('ul.acomment-container li').size(); 1217 1218 // There are enough immediate replies to hide some 1219 comment_replies.each( function() { 1220 var this_reply = jq(this); 1221 1222 var comment_nested_replies = this_reply.children('ul.acomment-container').children('li'); 1223 var comment_nested_replies_count = this_reply.find('ul.acomment-container li').size(); 1224 1225 comment_nested_replies.before( '<div class="show-hidden"><a href="#' + comment_replies.parent( 'li' ).attr( 'id' ) + '/show-all/" title="' + BP_DTheme.show_all_comments + '">' + BP_DTheme.show_all + ' ' + comment_nested_replies_count + ' ' + BP_DTheme.comments + '</a></div>' ); 1226 1227 comment_nested_replies.each( function() { 1228 var nested_reply = jq(this); 1229 1230 nested_reply.addClass('hidden'); 1231 nested_reply.toggle(); 1232 }); 1233 }); 1234 }); 1235 } 1236 1237 /* Hide long lists of activity comments, only show the latest five root comments. */ 1238 function bp_dtheme_hide_comments_old() { 1185 1239 var comments_divs = jq('div.activity-comments'); 1186 1240 1187 1241 if ( !comments_divs.length ) … … 1205 1259 jq(this).toggle(); 1206 1260 1207 1261 if ( !i ) 1208 jq(this).before( '<li class="show- all"><a href="#' + parent_li.attr('id') + '/show-all/" title="' + BP_DTheme.show_all_comments + '">' + BP_DTheme.show_all + ' ' + comment_count + ' ' + BP_DTheme.comments + '</a></li>' );1262 jq(this).before( '<li class="show-hidden"><a href="#' + parent_li.attr('id') + '/show-all/" title="' + BP_DTheme.show_all_comments + '">' + BP_DTheme.show_all + ' ' + comment_count + ' ' + BP_DTheme.comments + '</a></li>' ); 1209 1263 } 1210 1264 }); 1211 1265 -
functions.php
27 27 'accepted' => __( 'Accepted', 'buddypress' ), 28 28 'rejected' => __( 'Rejected', 'buddypress' ), 29 29 'show_all_comments' => __( 'Show all comments for this thread', 'buddypress' ), 30 'show_all' => __( 'Show all', 'buddypress' ),31 'comments' => __( ' comments', 'buddypress' ),30 'show_all' => __( 'Show', 'buddypress' ), 31 'comments' => __( 'more', 'buddypress' ), 32 32 'close' => __( 'Close', 'buddypress' ), 33 33 'mention_explain' => sprintf( __( "%s is a unique identifier for %s that you can type into any message on this site. %s will be sent a notification and a link to your message any time you use it.", 'buddypress' ), '@' . bp_get_displayed_user_username(), bp_get_user_firstname( bp_get_displayed_user_fullname() ), bp_get_user_firstname( bp_get_displayed_user_fullname() ) ) 34 34 );