Skip to:
Content

BuddyPress.org

Ticket #6033: 6033.diff

File 6033.diff, 3.9 KB (added by tharsheblows, 10 years ago)

diff of buddypress.js previously uploaded

  • src/bp-templates/bp-legacy/js/buddypress.js

     
    820820                        template = null;
    821821
    822822                        // 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] ) {
    824824                                object = 'group_members';
    825825                                template = 'groups/single/members';
    826826                        }
     
    892892                }
    893893
    894894                // 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 ) {
    896896                        object = 'group_members';
    897897                        template = 'groups/single/members';
    898898                }
     
    951951                        }
    952952
    953953                        // 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] ) {
    955955                                object = 'group_members';
    956956                                template = 'groups/single/members';
    957957                        }
     
    15251525                return false;
    15261526        });
    15271527
    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 
    15701528        /* Close site wide notices in the sidebar */
    15711529        jq('#close-notice').on( 'click', function() {
    15721530                jq(this).addClass('loading');
     
    15891547                return false;
    15901548        });
    15911549
    1592         /* Toolbar & wp_list_pages JavaScript IE6 hover class */
     1550        /* Toolbar & wp_list_pages Javascript IE6 hover class */
    15931551        jq('#wp-admin-bar ul.main-nav li, #nav li').mouseover( function() {
    15941552                jq(this).addClass('sfhover');
    15951553        });
     
    16441602        }
    16451603
    16461604        // Set the last id to request after
    1647         var first_item_recorded = 0;
    16481605        jq( document ).on( 'heartbeat-send.buddypress', function( e, data ) {
    16491606
    1650                 first_item_recorded = 0;
     1607                firstrow = 0;
    16511608
    16521609                // First row is default latest activity id
    16531610                if ( jq( '#buddypress ul.activity-list li' ).first().prop( 'id' ) ) {
     
    16551612                        timestamp = jq( '#buddypress ul.activity-list li' ).first().prop( 'class' ).match( /date-recorded-([0-9]+)/ );
    16561613
    16571614                        if ( timestamp ) {
    1658                                 first_item_recorded = timestamp[1];
     1615                                firstrow = timestamp[1];
    16591616                        }
    16601617                }
    16611618
    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 );
    16641621                }
    16651622
    16661623                data.bp_activity_last_recorded = activity_last_recorded;