Changeset 7116
- Timestamp:
- 05/28/2013 02:42:15 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-templates/bp-legacy/buddypress-functions.php
r7095 r7116 417 417 if ( ! empty( $_POST['page'] ) && '-1' != $_POST['page'] ) 418 418 $qs[] = 'page=' . absint( $_POST['page'] ); 419 420 // exludes activity just posted and avoids duplicate ids 421 if ( ! empty( $_POST['exclude_just_posted'] ) ) { 422 $just_posted = wp_parse_id_list( $_POST['exclude_just_posted'] ); 423 $qs[] = 'exclude=' . implode( ',', $just_posted ); 424 } 419 425 420 426 $object_search_text = bp_get_search_default_text( $object ); -
trunk/bp-templates/bp-legacy/js/buddypress.js
r7114 r7116 117 117 118 118 jq("#activity-stream").prepend(response); 119 jq("#activity-stream li:first").addClass('new-update ');119 jq("#activity-stream li:first").addClass('new-update just-posted'); 120 120 121 121 if ( 0 != jq("#latest-update").length ) { … … 319 319 var oldest_page = ( jq.cookie('bp-activity-oldestpage') * 1 ) + 1; 320 320 321 var just_posted = []; 322 323 jq('.activity-list li.just-posted').each( function(){ 324 just_posted.push( jq(this).attr('id').replace( 'activity-','' ) ); 325 }); 326 321 327 jq.post( ajaxurl, { 322 328 action: 'activity_get_older_updates', 323 329 'cookie': bp_get_cookies(), 324 'page': oldest_page 330 'page': oldest_page, 331 'exclude_just_posted': just_posted.join(',') 325 332 }, 326 333 function(response) -
trunk/bp-themes/bp-default/_inc/ajax.php
r7095 r7116 126 126 if ( ! empty( $_POST['page'] ) && '-1' != $_POST['page'] ) 127 127 $qs[] = 'page=' . absint( $_POST['page'] ); 128 129 // exludes activity just posted and avoids duplicate ids 130 if ( ! empty( $_POST['exclude_just_posted'] ) ) { 131 $just_posted = wp_parse_id_list( $_POST['exclude_just_posted'] ); 132 $qs[] = 'exclude=' . implode( ',', $just_posted ); 133 } 128 134 129 135 $object_search_text = bp_get_search_default_text( $object ); -
trunk/bp-themes/bp-default/_inc/global.js
r7114 r7116 117 117 118 118 jq("ul#activity-stream").prepend(response); 119 jq("ul#activity-stream li:first").addClass('new-update ');119 jq("ul#activity-stream li:first").addClass('new-update just-posted'); 120 120 121 121 if ( 0 != jq("#latest-update").length ) { … … 316 316 var oldest_page = ( jq.cookie('bp-activity-oldestpage') * 1 ) + 1; 317 317 318 var just_posted = []; 319 320 jq('.activity-list li.just-posted').each( function(){ 321 just_posted.push( jq(this).attr('id').replace( 'activity-','' ) ); 322 }); 323 318 324 jq.post( ajaxurl, { 319 325 action: 'activity_get_older_updates', 320 326 'cookie': bp_get_cookies(), 321 'page': oldest_page 327 'page': oldest_page, 328 'exclude_just_posted': just_posted.join(',') 322 329 }, 323 330 function(response)
Note: See TracChangeset
for help on using the changeset viewer.