Ticket #4714: 4714.patch
File 4714.patch, 11.5 KB (added by , 12 years ago) |
---|
-
bp-core/js/widget-members.js
1 1 jQuery(document).ready( function() { 2 jQuery(".widget div#members-list-options a"). live('click',2 jQuery(".widget div#members-list-options a").on('click', 3 3 function() { 4 4 var link = this; 5 5 jQuery(link).addClass('loading'); -
bp-groups/js/widget-groups.js
1 1 jQuery(document).ready( function() { 2 jQuery(".widget div#groups-list-options a"). live('click',2 jQuery(".widget div#groups-list-options a").on('click', 3 3 function() { 4 4 var link = this; 5 5 jQuery(link).addClass('loading'); -
bp-templates/bp-legacy/js/buddypress.js
29 29 height:'50px' 30 30 }); 31 31 jq.scrollTo( jq('#whats-new'), 500, { 32 offset:-125, 32 offset:-125, 33 33 easing:'easeOutQuad' 34 34 } ); 35 35 jq('#whats-new').focus(); … … 49 49 }); 50 50 51 51 /* New posts */ 52 jq("#aw-whats-new-submit"). live( 'click', function() {52 jq("#aw-whats-new-submit").on( 'click', function() { 53 53 var button = jq(this); 54 54 var form = button.parent().parent().parent().parent(); 55 55 … … 140 140 }); 141 141 142 142 /* List tabs event delegation */ 143 jq('div.activity-type-tabs'). live( 'click', function(event) {143 jq('div.activity-type-tabs').on( 'click', function(event) { 144 144 var target = jq(event.target).parent(); 145 145 146 146 if ( event.target.nodeName == 'STRONG' || event.target.nodeName == 'SPAN' ) … … 182 182 }); 183 183 184 184 /* Stream event delegation */ 185 jq('div.activity'). live( 'click', function(event) {185 jq('div.activity').on( 'click', function(event) { 186 186 var target = jq(event.target); 187 187 188 188 /* Favoriting activity stream items */ … … 322 322 }); 323 323 324 324 // Activity "Read More" links 325 jq('.activity-read-more a'). live('click', function(event) {325 jq('.activity-read-more a').on('click', function(event) { 326 326 var target = jq(event.target); 327 327 var link_id = target.parent().attr('id').split('-'); 328 328 var a_id = link_id[3]; … … 353 353 bp_legacy_theme_hide_comments(); 354 354 355 355 /* Activity list event delegation */ 356 jq('div.activity'). live( 'click', function(event) {356 jq('div.activity').on( 'click', function(event) { 357 357 var target = jq(event.target); 358 358 359 359 /* Comment / comment reply links */ … … 389 389 390 390 form.slideDown( 200 ); 391 391 jq.scrollTo( form, 500, { 392 offset:-100, 392 offset:-100, 393 393 easing:'easeOutQuad' 394 394 } ); 395 395 jq('#ac-form-' + ids[2] + ' textarea').focus(); … … 409 409 } else { 410 410 var comment_id = form_id[2]; 411 411 } 412 412 413 413 var content = jq( '#' + form.attr('id') + ' textarea' ); 414 414 415 415 /* Hide any error messages */ … … 602 602 } 603 603 } 604 604 }); 605 605 606 606 /* Link for cancelling comment forms */ 607 jq('.ac-reply-cancel'). live( 'click', function() {607 jq('.ac-reply-cancel').on( 'click', function() { 608 608 jq(this).closest('.ac-form').slideUp( 200 ); 609 609 return false; 610 610 }); … … 612 612 /**** Directory Search ****************************************************/ 613 613 614 614 /* The search form on all directory pages */ 615 jq('.dir-search'). live( 'click', function(event) {615 jq('.dir-search').on( 'click', function(event) { 616 616 if ( jq(this).hasClass('no-ajax') ) 617 617 return; 618 618 … … 631 631 /**** Tabs and Filters ****************************************************/ 632 632 633 633 /* 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) { 635 635 if ( jq(this).hasClass('no-ajax') ) 636 636 return; 637 637 … … 679 679 }); 680 680 681 681 /* All pagination links run through this function */ 682 jq('#content'). live( 'click', function(event) {682 jq('#content').on( 'click', function(event) { 683 683 var target = jq(event.target); 684 684 685 685 if ( target.hasClass('button') ) … … 719 719 /**** New Forum Directory Post **************************************/ 720 720 721 721 /* 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() { 723 723 if ( !jq('#new-topic-post').length ) 724 724 return false; 725 725 … … 734 734 }); 735 735 736 736 /* Cancel the posting of a new forum topic */ 737 jq('#submit_topic_cancel'). live( 'click', function() {737 jq('#submit_topic_cancel').on( 'click', function() { 738 738 if ( !jq('#new-topic-post').length ) 739 739 return false; 740 740 … … 743 743 }); 744 744 745 745 /* Clicking a forum tag */ 746 jq('#forum-directory-tags a'). live( 'click', function() {746 jq('#forum-directory-tags a').on( 'click', function() { 747 747 bp_filter_request( 'forums', 'tags', jq.cookie('bp-forums-scope'), 'div.forums', jq(this).html().replace( / /g, '-' ), 1, jq.cookie('bp-forums-extras') ); 748 748 return false; 749 749 }); … … 751 751 /** Invite Friends Interface ****************************************/ 752 752 753 753 /* 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() { 755 755 jq('.ajax-loader').toggle(); 756 756 757 757 var friend_id = jq(this).val(); … … 789 789 }); 790 790 791 791 /* 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() { 793 793 jq('.ajax-loader').toggle(); 794 794 795 795 var friend_id = jq(this).attr('id'); … … 818 818 jq('.field-visibility-settings').hide(); 819 819 jq('.visibility-toggle-link').on( 'click', function() { 820 820 var toggle_div = jq(this).parent(); 821 821 822 822 jq(toggle_div).fadeOut( 600, function(){ 823 823 jq(toggle_div).siblings('.field-visibility-settings').slideDown(400); 824 824 }); 825 825 826 826 return false; 827 827 } ); 828 828 829 829 jq('.field-visibility-settings-close').on( 'click', function() { 830 830 var settings_div = jq(this).parent(); 831 831 832 832 jq(settings_div).slideUp( 400, function(){ 833 833 jq(settings_div).siblings('.field-visibility-settings-toggle').fadeIn(800); 834 834 }); 835 835 836 836 return false; 837 837 } ); 838 838 … … 840 840 /** Friendship Requests **************************************/ 841 841 842 842 /* 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() { 844 844 var button = jq(this); 845 845 var li = jq(this).parents('#friend-list li'); 846 846 var action_div = jq(this).parents('li div.action'); … … 895 895 }); 896 896 897 897 /* Add / Remove friendship buttons */ 898 jq(".friendship-button a"). live('click', function() {898 jq(".friendship-button a").on('click', function() { 899 899 jq(this).parent().addClass('loading'); 900 900 var fid = jq(this).attr('id'); 901 901 fid = fid.split('-'); … … 945 945 946 946 /** Group Join / Leave Buttons **************************************/ 947 947 948 jq(".group-button a"). live('click', function() {948 jq(".group-button a").on('click', function() { 949 949 var gid = jq(this).parent().attr('id'); 950 950 gid = gid.split('-'); 951 951 gid = gid[1]; … … 989 989 /** Private Messaging ******************************************/ 990 990 991 991 /** Message search*/ 992 jq('.message-search'). live( 'click', function(event) {992 jq('.message-search').on( 'click', function(event) { 993 993 if ( jq(this).hasClass('no-ajax') ) 994 994 return; 995 995 … … 1129 1129 ); 1130 1130 1131 1131 /* 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() { 1133 1133 checkboxes_tosend = ''; 1134 1134 checkboxes = jq("#message-threads tr td input[type='checkbox']"); 1135 1135 … … 1168 1168 }); 1169 1169 1170 1170 /* Close site wide notices in the sidebar */ 1171 jq("#close-notice"). live( 'click', function() {1171 jq("#close-notice").on( 'click', function() { 1172 1172 jq(this).addClass('loading'); 1173 1173 jq('#sidebar div.error').remove(); 1174 1174 … … 1199 1199 }); 1200 1200 1201 1201 /* Clear BP cookies on logout */ 1202 jq('a.logout'). live( 'click', function() {1202 jq('a.logout').on( 'click', function() { 1203 1203 jq.cookie('bp-activity-scope', null, { 1204 1204 path: '/' 1205 1205 }); -
bp-themes/bp-default/_inc/global.js
29 29 height:'50px' 30 30 }); 31 31 jq.scrollTo( jq('textarea#whats-new'), 500, { 32 offset:-125, 32 offset:-125, 33 33 easing:'easeOutQuad' 34 34 } ); 35 35 jq('textarea#whats-new').focus(); … … 322 322 }); 323 323 324 324 // Activity "Read More" links 325 jq('.activity-read-more a'). live('click', function(event) {325 jq('.activity-read-more a').on('click', function(event) { 326 326 var target = jq(event.target); 327 327 var link_id = target.parent().attr('id').split('-'); 328 328 var a_id = link_id[3]; … … 389 389 390 390 form.slideDown( 200 ); 391 391 jq.scrollTo( form, 500, { 392 offset:-100, 392 offset:-100, 393 393 easing:'easeOutQuad' 394 394 } ); 395 395 jq('#ac-form-' + ids[2] + ' textarea').focus(); … … 780 780 }); 781 781 782 782 /* 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() { 784 784 jq('.ajax-loader').toggle(); 785 785 786 786 var friend_id = jq(this).attr('id'); … … 809 809 jq('.field-visibility-settings').hide(); 810 810 jq('.visibility-toggle-link').on( 'click', function() { 811 811 var toggle_div = jq(this).parent(); 812 812 813 813 jq(toggle_div).fadeOut( 600, function(){ 814 814 jq(toggle_div).siblings('.field-visibility-settings').slideDown(400); 815 815 }); 816 816 817 817 return false; 818 818 } ); 819 819 820 820 jq('.field-visibility-settings-close').on( 'click', function() { 821 821 var settings_div = jq(this).parent(); 822 822 823 823 jq(settings_div).slideUp( 400, function(){ 824 824 jq(settings_div).siblings('.field-visibility-settings-toggle').fadeIn(800); 825 825 }); 826 826 827 827 return false; 828 828 } ); 829 829 … … 886 886 }); 887 887 888 888 /* Add / Remove friendship buttons */ 889 jq(".friendship-button a"). live('click', function() {889 jq(".friendship-button a").on('click', function() { 890 890 jq(this).parent().addClass('loading'); 891 891 var fid = jq(this).attr('id'); 892 892 fid = fid.split('-'); … … 936 936 937 937 /** Group Join / Leave Buttons **************************************/ 938 938 939 jq(".group-button a"). live('click', function() {939 jq(".group-button a").on('click', function() { 940 940 var gid = jq(this).parent().attr('id'); 941 941 gid = gid.split('-'); 942 942 gid = gid[1]; -
bp-xprofile/admin/js/admin.js
11 11 12 12 newDiv.setAttribute('id', forWhat + '_div' + theId); 13 13 newDiv.setAttribute('class', 'sortable'); 14 14 15 15 newOption.setAttribute( 'type', 'text' ); 16 16 newOption.setAttribute( 'name', forWhat + '_option[' + theId + ']' ); 17 17 newOption.setAttribute( 'id', forWhat + '_option' + theId ); … … 107 107 jQuery( document ).ready( function() { 108 108 109 109 // Set up deleting options ajax 110 jQuery( 'a.ajax-option-delete' ). live( 'click', function() {110 jQuery( 'a.ajax-option-delete' ).on( 'click', function() { 111 111 var theId = this.id.split( '-' ); 112 112 theId = theId[1]; 113 113 … … 120 120 function( response ) {} ); 121 121 } ); 122 122 123 // 123 // 124 124 jQuery( '[id^="sort_order_"]' ).change(function() { 125 125 if ( jQuery( this ).val() != 'custom' ) { 126 126 destroySortableFieldOptions();