Changeset 12833
- Timestamp:
- 01/11/2021 04:32:53 PM (4 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/js/mentions.js
r12711 r12833 21 21 */ 22 22 $.fn.bp_mentions = function( options ) { 23 if ( $.isArray( options ) ) {23 if ( Array.isArray( options ) ) { 24 24 options = { data: options }; 25 25 } -
trunk/src/bp-templates/bp-legacy/js/buddypress.js
r12805 r12833 50 50 51 51 /* Textarea focus */ 52 $whats_new. focus( function(){52 $whats_new.on( 'focus', function() { 53 53 jq( '#whats-new-options' ).slideDown(); 54 54 … … 81 81 } 82 82 } 83 } );83 } ); 84 84 85 85 /* For the "What's New" form, do the following on focusout. */ … … 125 125 } else { 126 126 // Checkboxes/dropdown list can have multiple selected value 127 if ( ! jq.isArray( inputs[ input.name ] ) ) {127 if ( ! Array.isArray( inputs[ input.name ] ) ) { 128 128 inputs[ input.name ] = new Array( inputs[ input.name ], input.value ); 129 129 } else { … … 276 276 277 277 /* Activity filter select */ 278 jq( '#activity-filter-select select').change(function() {278 jq( '#activity-filter-select select' ).on( 'change', function() { 279 279 var selected_tab = jq( 'div.activity-type-tabs li.selected' ), 280 280 filter = jq(this).val(), … … 290 290 291 291 return false; 292 } );292 } ); 293 293 294 294 /* Stream event delegation */ … … 801 801 802 802 /* Escape Key Press for cancelling comment forms */ 803 jq(document). keydown(function(e) {803 jq(document).on( 'keydown', function(e) { 804 804 e = e || window.event; 805 805 if (e.target) { … … 899 899 900 900 /* When the filter select box is changed re-query */ 901 jq( 'li.filter select').change(function() {901 jq( 'li.filter select' ).on( 'change', function() { 902 902 var el, 903 903 css_id, object, scope, filter, search_terms, template, … … 945 945 946 946 return false; 947 } );947 } ); 948 948 949 949 /* All pagination links run through this function */ … … 1165 1165 } ); 1166 1166 1167 jq( '#profile-edit-form input:not(:submit), #profile-edit-form textarea, #profile-edit-form select, #signup_form input:not(:submit), #signup_form textarea, #signup_form select').change(function() {1167 jq( '#profile-edit-form input:not(:submit), #profile-edit-form textarea, #profile-edit-form select, #signup_form input:not(:submit), #signup_form textarea, #signup_form select' ).on( 'change', function() { 1168 1168 var shouldconfirm = true; 1169 1169 … … 1177 1177 } 1178 1178 }; 1179 } );1179 } ); 1180 1180 1181 1181 /** Friendship Requests **************************************/ … … 1420 1420 1421 1421 /* AJAX send reply functionality */ 1422 jq( '#send_reply_button').click(1422 jq( '#send_reply_button' ).on( 'click', 1423 1423 function() { 1424 1424 var order = jq('#messages_order').val() || 'ASC', … … 1492 1492 1493 1493 /* Selecting/Deselecting all messages */ 1494 jq( '#select-all-messages').click(function(event) {1495 if ( this.checked ) {1496 jq( '.message-check').each(function() {1494 jq( '#select-all-messages' ).on( 'click', function() { 1495 if ( this.checked ) { 1496 jq( '.message-check' ).each( function() { 1497 1497 this.checked = true; 1498 } );1498 } ); 1499 1499 } else { 1500 jq( '.message-check').each(function() {1500 jq( '.message-check' ).each( function() { 1501 1501 this.checked = false; 1502 } );1503 } 1504 } );1502 } ); 1503 } 1504 } ); 1505 1505 1506 1506 /* Make sure a 'Bulk Action' is selected before submitting the messages bulk action form */ … … 1591 1591 1592 1592 /* Selecting/Deselecting all notifications */ 1593 jq( '#select-all-notifications').click(function(event) {1594 if ( this.checked ) {1595 jq( '.notification-check').each(function() {1593 jq( '#select-all-notifications' ).on( 'click', function() { 1594 if ( this.checked ) { 1595 jq( '.notification-check' ).each( function() { 1596 1596 this.checked = true; 1597 } );1597 } ); 1598 1598 } else { 1599 jq( '.notification-check').each(function() {1599 jq( '.notification-check' ).each( function() { 1600 1600 this.checked = false; 1601 } );1602 } 1603 } );1601 } ); 1602 } 1603 } ); 1604 1604 1605 1605 /* Make sure a 'Bulk Action' is selected before submitting the form */ … … 1635 1635 1636 1636 /* Toolbar & wp_list_pages JavaScript IE6 hover class */ 1637 jq('#wp-admin-bar ul.main-nav li, #nav li'). mouseover(function() {1637 jq('#wp-admin-bar ul.main-nav li, #nav li').on( 'mouseover', function() { 1638 1638 jq(this).addClass('sfhover'); 1639 1639 }); 1640 1640 1641 jq('#wp-admin-bar ul.main-nav li, #nav li'). mouseout(function() {1641 jq('#wp-admin-bar ul.main-nav li, #nav li').on( 'mouseout', function() { 1642 1642 jq(this).removeClass('sfhover'); 1643 1643 }); -
trunk/src/bp-xprofile/admin/js/admin.js
r12829 r12833 172 172 } 173 173 174 titleprompt. click(function(){174 titleprompt.on( 'click', function(){ 175 175 jQuery(this).addClass('screen-reader-text'); 176 176 title.focus(); 177 177 }); 178 178 179 title. blur(function(){179 title.on( 'blur', function(){ 180 180 if ( '' === this.value ) { 181 181 titleprompt.removeClass('screen-reader-text'); 182 182 } 183 }). focus(function(){183 }).on( 'focus', function(){ 184 184 titleprompt.addClass('screen-reader-text'); 185 }). keydown(function(e){185 }).on( 'keydown', function(e){ 186 186 titleprompt.addClass('screen-reader-text'); 187 187 jQuery(this).unbind(e); … … 192 192 193 193 // Set focus in Field Title, if we're on the right page. 194 jQuery( '#bp-xprofile-add-field #title' ). focus();194 jQuery( '#bp-xprofile-add-field #title' ).trigger( 'focus' ); 195 195 196 196 // Set up the notice that shows when no member types are selected for a field. … … 215 215 216 216 // Set up the sort order change actions. 217 jQuery( '[id^="sort_order_"]' ). change(function() {217 jQuery( '[id^="sort_order_"]' ).on( 'change', function() { 218 218 if ( jQuery( this ).val() !== 'custom' ) { 219 219 destroySortableFieldOptions(); … … 221 221 enableSortableFieldOptions( jQuery('#fieldtype :selected').val() ); 222 222 } 223 } );223 } ); 224 224 225 225 // Show object if JS is enabled. … … 277 277 var $date_format_custom_value = jQuery( '#date-format-custom-value' ); 278 278 var $date_format_sample = jQuery( '#date-format-custom-sample' ); 279 $date_format. click(function( e ) {279 $date_format.on( 'click', function( e ) { 280 280 switch ( e.target.value ) { 281 281 case 'elapsed' : … … 296 296 // Clicking into the custom date format field should select the Custom radio button. 297 297 var $date_format_custom = jQuery( '#date-format-custom' ); 298 $date_format_custom_value. focus(function() {298 $date_format_custom_value.on( 'focus', function() { 299 299 $date_format_custom.prop( 'checked', 'checked' ); 300 300 } ); … … 302 302 // Validate custom date field. 303 303 var $date_format_spinner = jQuery( '#date-format-custom-spinner' ); 304 $date_format_custom_value. change(function( e ) {304 $date_format_custom_value.on( 'change', function( e ) { 305 305 $date_format_spinner.addClass( 'is-active' ); 306 306 jQuery.post( ajaxurl, {
Note: See TracChangeset
for help on using the changeset viewer.