Skip to:
Content

BuddyPress.org

Ticket #4714: 4714.patch

File 4714.patch, 11.5 KB (added by cnorris23, 12 years ago)
  • bp-core/js/widget-members.js

     
    11jQuery(document).ready( function() {
    2         jQuery(".widget div#members-list-options a").live('click',
     2        jQuery(".widget div#members-list-options a").on('click',
    33                function() {
    44                        var link = this;
    55                        jQuery(link).addClass('loading');
  • bp-groups/js/widget-groups.js

     
    11jQuery(document).ready( function() {
    2         jQuery(".widget div#groups-list-options a").live('click',
     2        jQuery(".widget div#groups-list-options a").on('click',
    33                function() {
    44                        var link = this;
    55                        jQuery(link).addClass('loading');
  • bp-templates/bp-legacy/js/buddypress.js

     
    2929                        height:'50px'
    3030                });
    3131                jq.scrollTo( jq('#whats-new'), 500, {
    32                         offset:-125, 
     32                        offset:-125,
    3333                        easing:'easeOutQuad'
    3434                } );
    3535                jq('#whats-new').focus();
     
    4949        });
    5050
    5151        /* New posts */
    52         jq("#aw-whats-new-submit").live( 'click', function() {
     52        jq("#aw-whats-new-submit").on( 'click', function() {
    5353                var button = jq(this);
    5454                var form = button.parent().parent().parent().parent();
    5555
     
    140140        });
    141141
    142142        /* List tabs event delegation */
    143         jq('div.activity-type-tabs').live( 'click', function(event) {
     143        jq('div.activity-type-tabs').on( 'click', function(event) {
    144144                var target = jq(event.target).parent();
    145145
    146146                if ( event.target.nodeName == 'STRONG' || event.target.nodeName == 'SPAN' )
     
    182182        });
    183183
    184184        /* Stream event delegation */
    185         jq('div.activity').live( 'click', function(event) {
     185        jq('div.activity').on( 'click', function(event) {
    186186                var target = jq(event.target);
    187187
    188188                /* Favoriting activity stream items */
     
    322322        });
    323323
    324324        // Activity "Read More" links
    325         jq('.activity-read-more a').live('click', function(event) {
     325        jq('.activity-read-more a').on('click', function(event) {
    326326                var target = jq(event.target);
    327327                var link_id = target.parent().attr('id').split('-');
    328328                var a_id = link_id[3];
     
    353353                bp_legacy_theme_hide_comments();
    354354
    355355        /* Activity list event delegation */
    356         jq('div.activity').live( 'click', function(event) {
     356        jq('div.activity').on( 'click', function(event) {
    357357                var target = jq(event.target);
    358358
    359359                /* Comment / comment reply links */
     
    389389
    390390                        form.slideDown( 200 );
    391391                        jq.scrollTo( form, 500, {
    392                                 offset:-100, 
     392                                offset:-100,
    393393                                easing:'easeOutQuad'
    394394                        } );
    395395                        jq('#ac-form-' + ids[2] + ' textarea').focus();
     
    409409                        } else {
    410410                                var comment_id = form_id[2];
    411411                        }
    412                        
     412
    413413                        var content = jq( '#' + form.attr('id') + ' textarea' );
    414414
    415415                        /* Hide any error messages */
     
    602602                        }
    603603                }
    604604        });
    605        
     605
    606606        /* Link for cancelling comment forms */
    607         jq('.ac-reply-cancel').live( 'click', function() {
     607        jq('.ac-reply-cancel').on( 'click', function() {
    608608                jq(this).closest('.ac-form').slideUp( 200 );
    609609                return false;
    610610        });
     
    612612        /**** Directory Search ****************************************************/
    613613
    614614        /* The search form on all directory pages */
    615         jq('.dir-search').live( 'click', function(event) {
     615        jq('.dir-search').on( 'click', function(event) {
    616616                if ( jq(this).hasClass('no-ajax') )
    617617                        return;
    618618
     
    631631        /**** Tabs and Filters ****************************************************/
    632632
    633633        /* When a navigation tab is clicked - e.g. | All Groups | My Groups | */
    634         jq('div.item-list-tabs').live( 'click', function(event) {
     634        jq('div.item-list-tabs').on( 'click', function(event) {
    635635                if ( jq(this).hasClass('no-ajax') )
    636636                        return;
    637637
     
    679679        });
    680680
    681681        /* All pagination links run through this function */
    682         jq('#content').live( 'click', function(event) {
     682        jq('#content').on( 'click', function(event) {
    683683                var target = jq(event.target);
    684684
    685685                if ( target.hasClass('button') )
     
    719719        /**** New Forum Directory Post **************************************/
    720720
    721721        /* Hit the "New Topic" button on the forums directory page */
    722         jq('a.show-hide-new').live( 'click', function() {
     722        jq('a.show-hide-new').on( 'click', function() {
    723723                if ( !jq('#new-topic-post').length )
    724724                        return false;
    725725
     
    734734        });
    735735
    736736        /* Cancel the posting of a new forum topic */
    737         jq('#submit_topic_cancel').live( 'click', function() {
     737        jq('#submit_topic_cancel').on( 'click', function() {
    738738                if ( !jq('#new-topic-post').length )
    739739                        return false;
    740740
     
    743743        });
    744744
    745745        /* Clicking a forum tag */
    746         jq('#forum-directory-tags a').live( 'click', function() {
     746        jq('#forum-directory-tags a').on( 'click', function() {
    747747                bp_filter_request( 'forums', 'tags', jq.cookie('bp-forums-scope'), 'div.forums', jq(this).html().replace( / /g, '-' ), 1, jq.cookie('bp-forums-extras') );
    748748                return false;
    749749        });
     
    751751        /** Invite Friends Interface ****************************************/
    752752
    753753        /* Select a user from the list of friends and add them to the invite list */
    754         jq("#invite-list input").live( 'click', function() {
     754        jq("#invite-list input").on( 'click', function() {
    755755                jq('.ajax-loader').toggle();
    756756
    757757                var friend_id = jq(this).val();
     
    789789        });
    790790
    791791        /* Remove a user from the list of users to invite to a group */
    792         jq("#friend-list li a.remove").live('click', function() {
     792        jq("#friend-list li a.remove").on('click', function() {
    793793                jq('.ajax-loader').toggle();
    794794
    795795                var friend_id = jq(this).attr('id');
     
    818818        jq('.field-visibility-settings').hide();
    819819        jq('.visibility-toggle-link').on( 'click', function() {
    820820                var toggle_div = jq(this).parent();
    821                
     821
    822822                jq(toggle_div).fadeOut( 600, function(){
    823823                        jq(toggle_div).siblings('.field-visibility-settings').slideDown(400);
    824824                });
    825                
     825
    826826                return false;
    827827        } );
    828828
    829829        jq('.field-visibility-settings-close').on( 'click', function() {
    830830                var settings_div = jq(this).parent();
    831                
     831
    832832                jq(settings_div).slideUp( 400, function(){
    833833                        jq(settings_div).siblings('.field-visibility-settings-toggle').fadeIn(800);
    834834                });
    835                
     835
    836836                return false;
    837837        } );
    838838
     
    840840        /** Friendship Requests **************************************/
    841841
    842842        /* Accept and Reject friendship request buttons */
    843         jq("#friend-list a.accept, #friend-list a.reject").live( 'click', function() {
     843        jq("#friend-list a.accept, #friend-list a.reject").on( 'click', function() {
    844844                var button = jq(this);
    845845                var li = jq(this).parents('#friend-list li');
    846846                var action_div = jq(this).parents('li div.action');
     
    895895        });
    896896
    897897        /* Add / Remove friendship buttons */
    898         jq(".friendship-button a").live('click', function() {
     898        jq(".friendship-button a").on('click', function() {
    899899                jq(this).parent().addClass('loading');
    900900                var fid = jq(this).attr('id');
    901901                fid = fid.split('-');
     
    945945
    946946        /** Group Join / Leave Buttons **************************************/
    947947
    948         jq(".group-button a").live('click', function() {
     948        jq(".group-button a").on('click', function() {
    949949                var gid = jq(this).parent().attr('id');
    950950                gid = gid.split('-');
    951951                gid = gid[1];
     
    989989        /** Private Messaging ******************************************/
    990990
    991991        /** Message search*/
    992         jq('.message-search').live( 'click', function(event) {
     992        jq('.message-search').on( 'click', function(event) {
    993993                if ( jq(this).hasClass('no-ajax') )
    994994                        return;
    995995
     
    11291129        );
    11301130
    11311131        /* Bulk delete messages */
    1132         jq("#delete_inbox_messages, #delete_sentbox_messages").live( 'click', function() {
     1132        jq("#delete_inbox_messages, #delete_sentbox_messages").on( 'click', function() {
    11331133                checkboxes_tosend = '';
    11341134                checkboxes = jq("#message-threads tr td input[type='checkbox']");
    11351135
     
    11681168        });
    11691169
    11701170        /* Close site wide notices in the sidebar */
    1171         jq("#close-notice").live( 'click', function() {
     1171        jq("#close-notice").on( 'click', function() {
    11721172                jq(this).addClass('loading');
    11731173                jq('#sidebar div.error').remove();
    11741174
     
    11991199        });
    12001200
    12011201        /* Clear BP cookies on logout */
    1202         jq('a.logout').live( 'click', function() {
     1202        jq('a.logout').on( 'click', function() {
    12031203                jq.cookie('bp-activity-scope', null, {
    12041204                        path: '/'
    12051205                });
  • bp-themes/bp-default/_inc/global.js

     
    2929                        height:'50px'
    3030                });
    3131                jq.scrollTo( jq('textarea#whats-new'), 500, {
    32                         offset:-125, 
     32                        offset:-125,
    3333                        easing:'easeOutQuad'
    3434                } );
    3535                jq('textarea#whats-new').focus();
     
    322322        });
    323323
    324324        // Activity "Read More" links
    325         jq('.activity-read-more a').live('click', function(event) {
     325        jq('.activity-read-more a').on('click', function(event) {
    326326                var target = jq(event.target);
    327327                var link_id = target.parent().attr('id').split('-');
    328328                var a_id = link_id[3];
     
    389389
    390390                        form.slideDown( 200 );
    391391                        jq.scrollTo( form, 500, {
    392                                 offset:-100, 
     392                                offset:-100,
    393393                                easing:'easeOutQuad'
    394394                        } );
    395395                        jq('#ac-form-' + ids[2] + ' textarea').focus();
     
    780780        });
    781781
    782782        /* Remove a user from the list of users to invite to a group */
    783         jq("#friend-list li a.remove").live('click', function() {
     783        jq("#friend-list li a.remove").on('click', function() {
    784784                jq('.ajax-loader').toggle();
    785785
    786786                var friend_id = jq(this).attr('id');
     
    809809        jq('.field-visibility-settings').hide();
    810810        jq('.visibility-toggle-link').on( 'click', function() {
    811811                var toggle_div = jq(this).parent();
    812                
     812
    813813                jq(toggle_div).fadeOut( 600, function(){
    814814                        jq(toggle_div).siblings('.field-visibility-settings').slideDown(400);
    815815                });
    816                
     816
    817817                return false;
    818818        } );
    819819
    820820        jq('.field-visibility-settings-close').on( 'click', function() {
    821821                var settings_div = jq(this).parent();
    822                
     822
    823823                jq(settings_div).slideUp( 400, function(){
    824824                        jq(settings_div).siblings('.field-visibility-settings-toggle').fadeIn(800);
    825825                });
    826                
     826
    827827                return false;
    828828        } );
    829829
     
    886886        });
    887887
    888888        /* Add / Remove friendship buttons */
    889         jq(".friendship-button a").live('click', function() {
     889        jq(".friendship-button a").on('click', function() {
    890890                jq(this).parent().addClass('loading');
    891891                var fid = jq(this).attr('id');
    892892                fid = fid.split('-');
     
    936936
    937937        /** Group Join / Leave Buttons **************************************/
    938938
    939         jq(".group-button a").live('click', function() {
     939        jq(".group-button a").on('click', function() {
    940940                var gid = jq(this).parent().attr('id');
    941941                gid = gid.split('-');
    942942                gid = gid[1];
  • bp-xprofile/admin/js/admin.js

     
    1111
    1212        newDiv.setAttribute('id', forWhat + '_div' + theId);
    1313        newDiv.setAttribute('class', 'sortable');
    14        
     14
    1515        newOption.setAttribute( 'type', 'text' );
    1616        newOption.setAttribute( 'name', forWhat + '_option[' + theId + ']' );
    1717        newOption.setAttribute( 'id', forWhat + '_option' + theId );
     
    107107jQuery( document ).ready( function() {
    108108
    109109        // Set up deleting options ajax
    110         jQuery( 'a.ajax-option-delete' ).live( 'click', function() {
     110        jQuery( 'a.ajax-option-delete' ).on( 'click', function() {
    111111                var theId = this.id.split( '-' );
    112112                theId = theId[1];
    113113
     
    120120                function( response ) {} );
    121121        } );
    122122
    123         // 
     123        //
    124124        jQuery( '[id^="sort_order_"]' ).change(function() {
    125125                if ( jQuery( this ).val() != 'custom' ) {
    126126                        destroySortableFieldOptions();