Ticket #51476: 51476.3.diff
File 51476.3.diff, 2.3 KB (added by , 4 years ago) |
---|
-
src/js/_enqueues/wp/updates.js
443 443 * decorated with an abort() method. 444 444 */ 445 445 wp.updates.updatePlugin = function( args ) { 446 var $updateRow, $card, $message, message; 446 var $updateRow, $card, $message, message, 447 $adminBarUpdates = $( '#wp-admin-bar-updates' ); 447 448 448 449 args = _.extend( { 449 450 success: wp.updates.updatePluginSuccess, … … 471 472 $card.removeClass( 'plugin-card-update-failed' ).find( '.notice.notice-error' ).remove(); 472 473 } 473 474 475 $adminBarUpdates.addClass( 'spin' ); 476 474 477 if ( $message.html() !== __( 'Updating...' ) ) { 475 478 $message.data( 'originaltext', $message.html() ); 476 479 } … … 499 502 * @param {string} response.newVersion New version of the plugin. 500 503 */ 501 504 wp.updates.updatePluginSuccess = function( response ) { 502 var $pluginRow, $updateMessage, newText; 505 var $pluginRow, $updateMessage, newText, 506 $adminBarUpdates = $( '#wp-admin-bar-updates' ); 503 507 504 508 if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) { 505 509 $pluginRow = $( 'tr[data-plugin="' + response.plugin + '"]' ) … … 521 525 .addClass( 'button-disabled updated-message' ); 522 526 } 523 527 528 $adminBarUpdates.removeClass( 'spin' ); 529 524 530 $updateMessage 525 531 .attr( 526 532 'aria-label', … … 553 559 * @param {string} response.errorMessage The error that occurred. 554 560 */ 555 561 wp.updates.updatePluginError = function( response ) { 556 var $card, $message, errorMessage; 562 var $card, $message, errorMessage, 563 $adminBarUpdates = $( '#wp-admin-bar-updates' ); 557 564 558 565 if ( ! wp.updates.isValidResponse( response, 'update' ) ) { 559 566 return; … … 631 638 } ); 632 639 } 633 640 641 $adminBarUpdates.removeClass( 'spin' ); 642 634 643 wp.a11y.speak( errorMessage, 'assertive' ); 635 644 636 645 $document.trigger( 'wp-plugin-update-error', response ); -
src/wp-includes/css/admin-bar.css
588 588 top: 2px; 589 589 } 590 590 591 #wpadminbar #wp-admin-bar-updates.spin .ab-icon:before { 592 display: inline-block; 593 animation: rotation 2s infinite linear; 594 } 595 591 596 /** 592 597 * Search 593 598 */