Ticket #51476: 51476-update-single-bulk.patch
File 51476-update-single-bulk.patch, 3.2 KB (added by , 3 years ago) |
---|
-
src/js/_enqueues/wp/updates.js
440 440 */ 441 441 wp.updates.updatePlugin = function( args ) { 442 442 var $updateRow, $card, $message, message; 443 443 var $adminBarUpdates = $( '#wp-admin-bar-updates' ); 444 444 445 args = _.extend( { 445 446 success: wp.updates.updatePluginSuccess, 446 447 error: wp.updates.updatePluginError … … 447 448 }, args ); 448 449 449 450 if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) { 450 451 $updateRow = $( 'tr[data-plugin="' + args.plugin + '"]' ); 451 452 $message = $updateRow.find( '.update-message' ).removeClass( 'notice-error' ).addClass( 'updating-message notice-warning' ).find( 'p' ); 452 453 message = sprintf( 453 454 /* translators: %s: Plugin name and version. */ … … 471 472 $message.data( 'originaltext', $message.html() ); 472 473 } 473 474 475 $adminBarUpdates.addClass( 'updating-message' ); 476 474 477 $message 475 478 .attr( 'aria-label', message ) 476 479 .text( __( 'Updating...' ) ); … … 496 499 */ 497 500 wp.updates.updatePluginSuccess = function( response ) { 498 501 var $pluginRow, $updateMessage, newText; 499 502 var $adminBarUpdates = $( '#wp-admin-bar-updates' ); 503 500 504 if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) { 501 505 $pluginRow = $( 'tr[data-plugin="' + response.plugin + '"]' ) 502 506 .removeClass( 'update' ) … … 509 513 newText = $pluginRow.find( '.plugin-version-author-uri' ).html().replace( response.oldVersion, response.newVersion ); 510 514 $pluginRow.find( '.plugin-version-author-uri' ).html( newText ); 511 515 516 $adminBarUpdates.removeClass( 'updating-message' ); 517 512 518 // Clear the "time to next auto-update" text. 513 519 $pluginRow.find( '.auto-update-time' ).empty(); 514 520 } else if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow ) { … … 550 556 */ 551 557 wp.updates.updatePluginError = function( response ) { 552 558 var $card, $message, errorMessage; 559 var $adminBarUpdates = $( '#wp-admin-bar-updates' ); 553 560 554 561 if ( ! wp.updates.isValidResponse( response, 'update' ) ) { 555 562 return; … … 572 579 $message = $( 'tr[data-slug="' + response.slug + '"]' ).find( '.update-message' ); 573 580 } 574 581 $message.removeClass( 'updating-message notice-warning' ).addClass( 'notice-error' ).find( 'p' ).html( errorMessage ); 575 582 $adminBarUpdates.removeClass( 'updating-message' ); 583 576 584 if ( response.pluginName ) { 577 585 $message.find( 'p' ) 578 586 .attr( -
src/wp-includes/css/admin-bar.css
588 588 top: 2px; 589 589 } 590 590 591 #wpadminbar #wp-admin-bar-updates.updating-message .ab-icon:before { 592 display: inline-block; 593 animation: rotation 2s infinite linear; 594 } 595 591 596 /** 592 597 * Search 593 598 */