Make WordPress Core

Ticket #51476: 51476.2.diff

File 51476.2.diff, 2.4 KB (added by audrasjb, 4 years ago)

Patch refreshed against trunk

  • src/js/_enqueues/wp/updates.js

    diff --git a/src/js/_enqueues/wp/updates.js b/src/js/_enqueues/wp/updates.js
    index e7454c0eab..c3cb60b4c5 100644
    a b  
    445445        wp.updates.updatePlugin = function( args ) {
    446446                var $updateRow, $card, $message, message;
    447447
     448                var $adminBarUpdates  = $( '#wp-admin-bar-updates' );
     449
    448450                args = _.extend( {
    449451                        success: wp.updates.updatePluginSuccess,
    450452                        error: wp.updates.updatePluginError
     
    475477                        $message.data( 'originaltext', $message.html() );
    476478                }
    477479
     480                $adminBarUpdates.addClass( 'updating-message' );
     481
    478482                $message
    479483                        .attr( 'aria-label', message )
    480484                        .text( __( 'Updating...' ) );
     
    501505        wp.updates.updatePluginSuccess = function( response ) {
    502506                var $pluginRow, $updateMessage, newText;
    503507
     508                var $adminBarUpdates = $( '#wp-admin-bar-updates' );
     509
    504510                if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) {
    505511                        $pluginRow     = $( 'tr[data-plugin="' + response.plugin + '"]' )
    506512                                .removeClass( 'update' )
     
    513519                        newText = $pluginRow.find( '.plugin-version-author-uri' ).html().replace( response.oldVersion, response.newVersion );
    514520                        $pluginRow.find( '.plugin-version-author-uri' ).html( newText );
    515521
     522                        $adminBarUpdates.removeClass( 'updating-message' );
     523
    516524                        // Clear the "time to next auto-update" text.
    517525                        $pluginRow.find( '.auto-update-time' ).empty();
    518526                } else if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow ) {
     
    555563        wp.updates.updatePluginError = function( response ) {
    556564                var $card, $message, errorMessage;
    557565
     566                var $adminBarUpdates  = $( '#wp-admin-bar-updates' );
     567
    558568                if ( ! wp.updates.isValidResponse( response, 'update' ) ) {
    559569                        return;
    560570                }
     
    577587                        }
    578588                        $message.removeClass( 'updating-message notice-warning' ).addClass( 'notice-error' ).find( 'p' ).html( errorMessage );
    579589
     590                        $adminBarUpdates.removeClass( 'updating-message' );
     591
    580592                        if ( response.pluginName ) {
    581593                                $message.find( 'p' )
    582594                                        .attr(
  • src/wp-includes/css/admin-bar.css

    diff --git a/src/wp-includes/css/admin-bar.css b/src/wp-includes/css/admin-bar.css
    index f3e16d95d7..aed5898c5e 100644
    a b html:lang(he-il) .rtl #wpadminbar * { 
    588588        top: 2px;
    589589}
    590590
     591#wpadminbar #wp-admin-bar-updates.updating-message .ab-icon:before {
     592        display: inline-block;
     593        animation: rotation 2s infinite linear;
     594}
     595
    591596/**
    592597 * Search
    593598 */