Changeset 7470
- Timestamp:
- 10/23/2013 07:11:32 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-templates/bp-legacy/js/buddypress.js
r7458 r7470 750 750 var object = css_id[0]; 751 751 var search_terms = false; 752 var pagination_id = jq(target).closest('.pagination-links').attr('id'); 752 753 753 754 if ( jq('div.dir-search input').length ) … … 760 761 else 761 762 var page_number = Number( jq(target).html() ); 762 763 bp_filter_request( object, jq.cookie('bp-' + object + '-filter'), jq.cookie('bp-' + object + '-scope'), 'div.' + object, search_terms, page_number, jq.cookie('bp-' + object + '-extras') ); 763 764 if ( pagination_id.indexOf( 'pag-bottom' ) !== -1 ) { 765 var caller = 'pag-bottom'; 766 } else { 767 var caller = null; 768 } 769 770 bp_filter_request( object, jq.cookie('bp-' + object + '-filter'), jq.cookie('bp-' + object + '-scope'), 'div.' + object, search_terms, page_number, jq.cookie('bp-' + object + '-extras'), caller ); 764 771 765 772 return false; … … 1377 1384 1378 1385 /* Filter the current content list (groups/members/blogs/topics) */ 1379 function bp_filter_request( object, filter, scope, target, search_terms, page, extras ) {1386 function bp_filter_request( object, filter, scope, target, search_terms, page, extras, caller ) { 1380 1387 if ( 'activity' == object ) 1381 1388 return false; … … 1424 1431 function(response) 1425 1432 { 1426 jq(target).fadeOut( 100, function() { 1427 jq(this).html(response); 1428 jq(this).fadeIn(100); 1429 }); 1433 /* animate to top if called from bottom pagination */ 1434 if ( caller == 'pag-bottom' && jq('#subnav').length ) { 1435 var top = jq('#subnav').parent(); 1436 jq('html,body').animate({scrollTop: top.offset().top}, 'slow', function() { 1437 jq(target).fadeOut( 100, function() { 1438 jq(this).html(response); 1439 jq(this).fadeIn(100); 1440 }); 1441 }); 1442 1443 } else { 1444 jq(target).fadeOut( 100, function() { 1445 jq(this).html(response); 1446 jq(this).fadeIn(100); 1447 }); 1448 } 1449 1430 1450 jq('.item-list-tabs li.selected').removeClass('loading'); 1431 1451 }); -
trunk/bp-themes/bp-default/_inc/global.js
r7443 r7470 736 736 var object = css_id[0]; 737 737 var search_terms = false; 738 var pagination_id = jq(target).closest('.pagination-links').attr('id'); 738 739 739 740 if ( jq('div.dir-search input').length ) … … 746 747 else 747 748 var page_number = Number( jq(target).html() ); 748 749 bp_filter_request( object, jq.cookie('bp-' + object + '-filter'), jq.cookie('bp-' + object + '-scope'), 'div.' + object, search_terms, page_number, jq.cookie('bp-' + object + '-extras') ); 749 750 if ( pagination_id.indexOf( 'pag-bottom' ) !== -1 ) { 751 var caller = 'pag-bottom'; 752 } else { 753 var caller = null; 754 } 755 756 bp_filter_request( object, jq.cookie('bp-' + object + '-filter'), jq.cookie('bp-' + object + '-scope'), 'div.' + object, search_terms, page_number, jq.cookie('bp-' + object + '-extras'), caller ); 750 757 751 758 return false; … … 1343 1350 1344 1351 /* Filter the current content list (groups/members/blogs/topics) */ 1345 function bp_filter_request( object, filter, scope, target, search_terms, page, extras ) {1352 function bp_filter_request( object, filter, scope, target, search_terms, page, extras, caller ) { 1346 1353 if ( 'activity' == object ) 1347 1354 return false; … … 1390 1397 function(response) 1391 1398 { 1392 jq(target).fadeOut( 100, function() { 1393 jq(this).html(response); 1394 jq(this).fadeIn(100); 1395 }); 1399 /* animate to top if called from bottom pagination */ 1400 if ( caller == 'pag-bottom' && jq('#subnav').length ) { 1401 var top = jq('#subnav').parent(); 1402 jq('html,body').animate({scrollTop: top.offset().top}, 'slow', function() { 1403 jq(target).fadeOut( 100, function() { 1404 jq(this).html(response); 1405 jq(this).fadeIn(100); 1406 }); 1407 }); 1408 1409 } else { 1410 jq(target).fadeOut( 100, function() { 1411 jq(this).html(response); 1412 jq(this).fadeIn(100); 1413 }); 1414 } 1415 1396 1416 jq('.item-list-tabs li.selected').removeClass('loading'); 1397 1417 });
Note: See TracChangeset
for help on using the changeset viewer.