Make WordPress Core

Ticket #40966: 40966.3.diff

File 40966.3.diff, 1.9 KB (added by xkon, 8 years ago)

On Update only and re enable on all notices just in case.

  • src/wp-admin/js/updates.js

     
    20042004                                errorMessages = [],
    20052005                                type, action;
    20062006
     2007            if ( bulkAction == 'update-selected' ) {
     2008                // Disable the apply button while working
     2009                $bulkActionForm.find('input[type="submit"]').prop( 'disabled', true );
     2010            }
     2011
    20072012                        // Determine which type of item we're dealing with.
    20082013                        switch ( pagenow ) {
    20092014                                case 'plugins':
     
    20232028                        if ( ! itemsSelected.length ) {
    20242029                                event.preventDefault();
    20252030                                $( 'html, body' ).animate( { scrollTop: 0 } );
     2031                $bulkActionForm.find('input[type="submit"]').prop( 'disabled', false );
    20262032
    20272033                                return wp.updates.addAdminNotice( {
    20282034                                        id:        'no-items-selected',
     
    20292035                                        className: 'notice-error is-dismissible',
    20302036                                        message:   wp.updates.l10n.noItemsSelected
    20312037                                } );
     2038
    20322039                        }
    20332040
     2041
     2042
    20342043                        // Determine the type of request we're dealing with.
    20352044                        switch ( bulkAction ) {
    20362045                                case 'update-selected':
     
    20422051                                                event.preventDefault();
    20432052                                                return;
    20442053                                        }
    2045 
    20462054                                        action = bulkAction.replace( 'selected', type );
    20472055                                        break;
    20482056
     
    20542062
    20552063                        event.preventDefault();
    20562064
     2065
    20572066                        // Un-check the bulk checkboxes.
    20582067                        $bulkActionForm.find( '.manage-column [type="checkbox"]' ).prop( 'checked', false );
    20592068
     
    21232132                                }
    21242133                        } );
    21252134
     2135
     2136
    21262137                        // Reset admin notice template after #bulk-action-notice was added.
    21272138                        $document.on( 'wp-updates-notice-added', function() {
    21282139                                wp.updates.adminNotice = wp.template( 'wp-updates-admin-notice' );
     2140                $bulkActionForm.find('input[type="submit"]').prop( 'disabled', false );
    21292141                        } );
    21302142
    21312143                        // Check the queue, now that the event handlers have been added.