Ticket #6033: 6033.diff
File 6033.diff, 3.9 KB (added by , 10 years ago) |
---|
-
src/bp-templates/bp-legacy/js/buddypress.js
820 820 template = null; 821 821 822 822 // The Group Members page specifies its own template 823 if ( 'members' === object && 'groups' === css_id[1] ) {823 if ( 'members' === object && 'groups' === css_id[1] || 'home' === object && 'groups' === css_id[1] ) { 824 824 object = 'group_members'; 825 825 template = 'groups/single/members'; 826 826 } … … 892 892 } 893 893 894 894 // On the Groups Members page, we specify a template 895 if ( 'members' === object && 'groups' === scope ) {895 if ( 'members' === object && 'groups' === scope || 'home' === object && 'groups' === scope ) { 896 896 object = 'group_members'; 897 897 template = 'groups/single/members'; 898 898 } … … 951 951 } 952 952 953 953 // On the Groups Members page, we specify a template 954 if ( 'members' === object && 'groups' === css_id[1] ) {954 if ( 'members' === object && 'groups' === css_id[1] || 'home' === object && 'groups' === css_id[1] ) { 955 955 object = 'group_members'; 956 956 template = 'groups/single/members'; 957 957 } … … 1525 1525 return false; 1526 1526 }); 1527 1527 1528 /* Selecting/Deselecting all messages */1529 jq('#select-all-messages').click(function(event) {1530 if( this.checked ) {1531 jq('.message-check').each(function() {1532 this.checked = true;1533 });1534 } else {1535 jq('.message-check').each(function() {1536 this.checked = false;1537 });1538 }1539 });1540 1541 /* Make sure a 'Bulk Action' is selected before submiting the messages bulk action form */1542 jq('#messages-bulk-manage').attr('disabled', 'disabled');1543 1544 /* Remove the disabled attribute from the messages form submit button when bulk action has a value */1545 jq('#messages-select').on('change', function(){1546 jq('#messages-bulk-manage').attr('disabled', jq(this).val().length <= 0);1547 });1548 1549 /* Selecting/Deselecting all notifications */1550 jq('#select-all-notifications').click(function(event) {1551 if( this.checked ) {1552 jq('.notification-check').each(function() {1553 this.checked = true;1554 });1555 } else {1556 jq('.notification-check').each(function() {1557 this.checked = false;1558 });1559 }1560 });1561 1562 /* Make sure a 'Bulk Action' is selected before submiting the form */1563 jq('#notification-bulk-manage').attr('disabled', 'disabled');1564 1565 /* Remove the disabled attribute from the form submit button when bulk action has a value */1566 jq('#notification-select').on('change', function(){1567 jq('#notification-bulk-manage').attr('disabled', jq(this).val().length <= 0);1568 });1569 1570 1528 /* Close site wide notices in the sidebar */ 1571 1529 jq('#close-notice').on( 'click', function() { 1572 1530 jq(this).addClass('loading'); … … 1589 1547 return false; 1590 1548 }); 1591 1549 1592 /* Toolbar & wp_list_pages Java Script IE6 hover class */1550 /* Toolbar & wp_list_pages Javascript IE6 hover class */ 1593 1551 jq('#wp-admin-bar ul.main-nav li, #nav li').mouseover( function() { 1594 1552 jq(this).addClass('sfhover'); 1595 1553 }); … … 1644 1602 } 1645 1603 1646 1604 // Set the last id to request after 1647 var first_item_recorded = 0;1648 1605 jq( document ).on( 'heartbeat-send.buddypress', function( e, data ) { 1649 1606 1650 first _item_recorded= 0;1607 firstrow = 0; 1651 1608 1652 1609 // First row is default latest activity id 1653 1610 if ( jq( '#buddypress ul.activity-list li' ).first().prop( 'id' ) ) { … … 1655 1612 timestamp = jq( '#buddypress ul.activity-list li' ).first().prop( 'class' ).match( /date-recorded-([0-9]+)/ ); 1656 1613 1657 1614 if ( timestamp ) { 1658 first _item_recorded= timestamp[1];1615 firstrow = timestamp[1]; 1659 1616 } 1660 1617 } 1661 1618 1662 if ( 0 === activity_last_recorded || Number( first _item_recorded) > activity_last_recorded ) {1663 activity_last_recorded = Number( first _item_recorded);1619 if ( 0 === activity_last_recorded || Number( firstrow ) > activity_last_recorded ) { 1620 activity_last_recorded = Number( firstrow ); 1664 1621 } 1665 1622 1666 1623 data.bp_activity_last_recorded = activity_last_recorded;