Make WordPress Core

Ticket #40966: 40966.6.patch

File 40966.6.patch, 2.9 KB (added by bookdude13, 5 years ago)

Refreshed patch

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

     
    380380
    381381                if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) {
    382382                        $updateRow = $( 'tr[data-plugin="' + args.plugin + '"]' );
     383                        $updateRow.removeClass( 'update' ).addClass( 'updating' );
    383384                        $message   = $updateRow.find( '.update-message' ).removeClass( 'notice-error' ).addClass( 'updating-message notice-warning' ).find( 'p' );
    384385                        message    = wp.updates.l10n.pluginUpdatingLabel.replace( '%s', $updateRow.find( '.plugin-title strong' ).text() );
    385386                } else if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow ) {
     
    422423
    423424                if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) {
    424425                        $pluginRow     = $( 'tr[data-plugin="' + response.plugin + '"]' )
    425                                 .removeClass( 'update' )
     426                                .removeClass( 'updating' )
    426427                                .addClass( 'updated' );
    427428                        $updateMessage = $pluginRow.find( '.update-message' )
    428429                                .removeClass( 'updating-message notice-warning' )
     
    476477
    477478                if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) {
    478479                        if ( response.plugin ) {
    479                                 $message = $( 'tr[data-plugin="' + response.plugin + '"]' ).find( '.update-message' );
     480                                $updateRow = $( 'tr[data-plugin="' + response.plugin + '"]' );
     481                                $updateRow.removeClass( 'updating' ).addClass( 'update' );
     482                                $message = $updateRow.find( '.update-message' );
    480483                        } else {
    481484                                $message = $( 'tr[data-slug="' + response.slug + '"]' ).find( '.update-message' );
    482485                        }
     
    931934                }, args );
    932935
    933936                if ( 'themes-network' === pagenow ) {
    934                         $notice = $( '[data-slug="' + args.slug + '"]' ).find( '.update-message' ).removeClass( 'notice-error' ).addClass( 'updating-message notice-warning' ).find( 'p' );
     937                        $updateRow = $( '[data-slug="' + args.slug + '"]' );
     938                        $updateRow.removeClass( 'update' ).addClass( 'updating' );
     939                        $notice = $updateRow.find( '.update-message' ).removeClass( 'notice-error' ).addClass( 'updating-message notice-warning' ).find( 'p' );
    935940
    936941                } else if ( 'customize' === pagenow ) {
    937942
     
    985990                        },
    986991                        $notice, newText;
    987992
     993                $theme.removeClass( 'updating' );
     994
    988995                if ( 'customize' === pagenow ) {
    989996                        $theme = $( '.updating-message' ).siblings( '.theme-name' );
    990997
     
    10411048                        errorMessage = wp.updates.l10n.updateFailed.replace( '%s', response.errorMessage ),
    10421049                        $notice;
    10431050
     1051                $theme.removeClass( 'updating' );
     1052
    10441053                if ( ! wp.updates.isValidResponse( response, 'update' ) ) {
    10451054                        return;
    10461055                }
     
    13431352
    13441353                if ( 'themes-network' === pagenow ) {
    13451354                        if ( ! $updateRow.length ) {
    1346                                 $themeRow.addClass( 'update' ).after(
     1355                                $themeRow.removeClass( 'updating' ).addClass( 'update' ).after(
    13471356                                        updateRow( {
    13481357                                                slug: response.slug,
    13491358                                                colspan: $( '#bulk-action-form' ).find( 'thead th:not(.hidden), thead td' ).length,