Make WordPress Core

Ticket #37563: 37563.2.diff

File 37563.2.diff, 2.1 KB (added by obenland, 9 years ago)
  • src/wp-admin/js/updates.js

     
    14661466                        return;
    14671467                }
    14681468
    1469                 _.each( wp.updates.queue, function( job ) {
    1470                         $document.trigger( 'credential-modal-cancel', job );
    1471                 } );
     1469                $document.trigger( 'credential-modal-cancel', wp.updates.queue.pop() );
    14721470
    14731471                // Remove the lock, and clear the queue.
    14741472                wp.updates.ajaxLocked = false;
     
    19821980                                        return;
    19831981                        }
    19841982
    1985                         wp.updates.maybeRequestFilesystemCredentials( event );
    1986 
    19871983                        event.preventDefault();
    19881984
    19891985                        // Un-check the bulk checkboxes.
     
    19961992                                var $checkbox  = $( element ),
    19971993                                        $itemRow = $checkbox.parents( 'tr' );
    19981994
    1999                                 // Un-check the box.
    2000                                 $checkbox.prop( 'checked', false );
    2001 
    20021995                                // Only add update-able items to the update queue.
    20031996                                if ( 'update-selected' === bulkAction && ( ! $itemRow.hasClass( 'update' ) || $itemRow.find( 'notice-error' ).length ) ) {
     1997
     1998                                        // Un-check the box.
     1999                                        $checkbox.prop( 'checked', false );
    20042000                                        return;
    20052001                                }
    20062002
     
    20162012
    20172013                        // Display bulk notification for updates of any kind.
    20182014                        $document.on( 'wp-plugin-update-success wp-plugin-update-error wp-theme-update-success wp-theme-update-error', function( event, response ) {
    2019                                 var $bulkActionNotice, itemName;
     2015                                var $itemRow = $( '[data-plugin="' + response.plugin + '"]' ),
     2016                                        $bulkActionNotice, itemName;
    20202017
    20212018                                if ( 'wp-' + response.update + '-update-success' === event.type ) {
    20222019                                        success++;
    20232020                                } else {
    2024                                         itemName = response.pluginName ? response.pluginName : $( '[data-slug="' + response.slug + '"]' ).find( '.theme-title strong' ).text();
     2021                                        itemName = response.pluginName ? response.pluginName : $itemRow.find( '.theme-title strong' ).text();
    20252022
    20262023                                        error++;
    20272024                                        errorMessages.push( itemName + ': ' + response.errorMessage );
    20282025                                }
    20292026
     2027                                $itemRow.find( 'input[name="checked[]"]:checked' ).prop( 'checked', false );
     2028
    20302029                                wp.updates.adminNotice = wp.template( 'wp-bulk-updates-admin-notice' );
    20312030
    20322031                                wp.updates.addAdminNotice( {