Ticket #37563: 37563.3.diff
File 37563.3.diff, 2.1 KB (added by , 9 years ago) |
---|
-
src/wp-admin/js/updates.js
1466 1466 return; 1467 1467 } 1468 1468 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() ); 1472 1470 1473 1471 // Remove the lock, and clear the queue. 1474 1472 wp.updates.ajaxLocked = false; … … 1982 1980 return; 1983 1981 } 1984 1982 1985 wp.updates.maybeRequestFilesystemCredentials( event );1986 1987 1983 event.preventDefault(); 1988 1984 1989 1985 // Un-check the bulk checkboxes. … … 1996 1992 var $checkbox = $( element ), 1997 1993 $itemRow = $checkbox.parents( 'tr' ); 1998 1994 1999 // Un-check the box.2000 $checkbox.prop( 'checked', false );2001 2002 1995 // Only add update-able items to the update queue. 2003 1996 if ( 'update-selected' === bulkAction && ( ! $itemRow.hasClass( 'update' ) || $itemRow.find( 'notice-error' ).length ) ) { 1997 1998 // Un-check the box. 1999 $checkbox.prop( 'checked', false ); 2004 2000 return; 2005 2001 } 2006 2002 … … 2016 2012 2017 2013 // Display bulk notification for updates of any kind. 2018 2014 $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-slug="' + response.slug + '"]' ), 2016 $bulkActionNotice, itemName; 2020 2017 2021 2018 if ( 'wp-' + response.update + '-update-success' === event.type ) { 2022 2019 success++; 2023 2020 } 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(); 2025 2022 2026 2023 error++; 2027 2024 errorMessages.push( itemName + ': ' + response.errorMessage ); 2028 2025 } 2029 2026 2027 $itemRow.find( 'input[name="checked[]"]:checked' ).prop( 'checked', false ); 2028 2030 2029 wp.updates.adminNotice = wp.template( 'wp-bulk-updates-admin-notice' ); 2031 2030 2032 2031 wp.updates.addAdminNotice( {