diff --git src/wp-admin/js/updates.js src/wp-admin/js/updates.js
index cc5090c..09f3eaf 100644
|
|
|
|
| 523 | 523 | $message = $( '[data-slug="' + args.slug + '"]' ); |
| 524 | 524 | } |
| 525 | 525 | |
| 526 | | $message.text( wp.updates.l10n.installing ); |
| | 526 | if ( $message.html() !== wp.updates.l10n.installing ) { |
| | 527 | $message.data( 'originaltext', $message.html() ); |
| | 528 | } |
| 527 | 529 | |
| 528 | 530 | $message |
| 529 | 531 | .addClass( 'updating-message' ) |
| 530 | | .attr( 'aria-label', wp.updates.l10n.pluginInstallingLabel.replace( '%s', $message.data( 'name' ) ) ); |
| | 532 | .attr( 'aria-label', wp.updates.l10n.pluginInstallingLabel.replace( '%s', $message.data( 'name' ) ) ) |
| | 533 | .text( wp.updates.l10n.installing ); |
| 531 | 534 | |
| 532 | 535 | wp.a11y.speak( wp.updates.l10n.installingMsg, 'polite' ); |
| 533 | 536 | |
| … |
… |
|
| 1709 | 1712 | } else if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) { |
| 1710 | 1713 | $message = $( 'tr[data-plugin="' + job.data.plugin + '"]' ).find( '.update-message' ); |
| 1711 | 1714 | } else if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow ) { |
| 1712 | | $message = $( '.update-now.updating-message' ); |
| | 1715 | $message = $( '.updating-message' ); |
| 1713 | 1716 | } else { |
| 1714 | 1717 | $message = $updatingMessage; |
| 1715 | 1718 | } |
| 1716 | 1719 | |
| 1717 | | if ( $message ) { |
| | 1720 | if ( $message && $message.hasClass( 'updating-message' ) ) { |
| 1718 | 1721 | originalText = $message.data( 'originaltext' ); |
| 1719 | 1722 | |
| 1720 | 1723 | if ( 'undefined' === typeof originalText ) { |
| … |
… |
|
| 1724 | 1727 | $message |
| 1725 | 1728 | .removeClass( 'updating-message' ) |
| 1726 | 1729 | .html( originalText ); |
| | 1730 | |
| | 1731 | if ( 'update-plugin' === job.action ) { |
| | 1732 | $message.attr( 'aria-label', wp.updates.l10n.updateNowLabel.replace( '%s', $message.data( 'name' ) ) ); |
| | 1733 | } else if ( 'install-plugin' === job.action ) { |
| | 1734 | $message.attr( 'aria-label', wp.updates.l10n.installNowLabel.replace( '%s', $message.data( 'name' ) ) ); |
| | 1735 | } |
| 1727 | 1736 | } |
| 1728 | 1737 | |
| 1729 | 1738 | wp.a11y.speak( wp.updates.l10n.updateCancel, 'polite' ); |
| … |
… |
|
| 1999 | 2008 | |
| 2000 | 2009 | // Find all the checkboxes which have been checked. |
| 2001 | 2010 | itemsSelected.each( function( index, element ) { |
| 2002 | | var $checkbox = $( element ), |
| | 2011 | var $checkbox = $( element ), |
| 2003 | 2012 | $itemRow = $checkbox.parents( 'tr' ); |
| 2004 | 2013 | |
| 2005 | | // Un-check the box. |
| 2006 | | $checkbox.prop( 'checked', false ); |
| 2007 | | |
| 2008 | 2014 | // Only add update-able items to the update queue. |
| 2009 | 2015 | if ( 'update-selected' === bulkAction && ( ! $itemRow.hasClass( 'update' ) || $itemRow.find( 'notice-error' ).length ) ) { |
| | 2016 | |
| | 2017 | // Un-check the box. |
| | 2018 | $checkbox.prop( 'checked', false ); |
| 2010 | 2019 | return; |
| 2011 | 2020 | } |
| 2012 | 2021 | |
| … |
… |
|
| 2022 | 2031 | |
| 2023 | 2032 | // Display bulk notification for updates of any kind. |
| 2024 | 2033 | $document.on( 'wp-plugin-update-success wp-plugin-update-error wp-theme-update-success wp-theme-update-error', function( event, response ) { |
| 2025 | | var $bulkActionNotice, itemName; |
| | 2034 | var $itemRow = $( '[data-slug="' + response.slug + '"]' ), |
| | 2035 | $bulkActionNotice, itemName; |
| 2026 | 2036 | |
| 2027 | 2037 | if ( 'wp-' + response.update + '-update-success' === event.type ) { |
| 2028 | 2038 | success++; |
| 2029 | 2039 | } else { |
| 2030 | | itemName = response.pluginName ? response.pluginName : $( '[data-slug="' + response.slug + '"]' ).find( '.theme-title strong' ).text(); |
| | 2040 | itemName = response.pluginName ? response.pluginName : $itemRow.find( '.theme-title strong' ).text(); |
| 2031 | 2041 | |
| 2032 | 2042 | error++; |
| 2033 | 2043 | errorMessages.push( itemName + ': ' + response.errorMessage ); |
| 2034 | 2044 | } |
| 2035 | 2045 | |
| | 2046 | $itemRow.find( 'input[name="checked[]"]:checked' ).prop( 'checked', false ); |
| | 2047 | |
| 2036 | 2048 | wp.updates.adminNotice = wp.template( 'wp-bulk-updates-admin-notice' ); |
| 2037 | 2049 | |
| 2038 | 2050 | wp.updates.addAdminNotice( { |
diff --git src/wp-includes/script-loader.php src/wp-includes/script-loader.php
index 3a1ec18..b0d3a15 100644
|
|
|
function wp_default_scripts( &$scripts ) { |
| 616 | 616 | 'updated' => __( 'Updated!' ), |
| 617 | 617 | 'update' => __( 'Update' ), |
| 618 | 618 | 'updateNow' => __( 'Update Now' ), |
| | 619 | /* translators: %s: Plugin name and version */ |
| | 620 | 'updateNowLabel' => __( 'Update %s now' ), |
| 619 | 621 | 'updateFailedShort' => __( 'Update Failed!' ), |
| 620 | 622 | /* translators: %s: Error string for a failed update */ |
| 621 | 623 | 'updateFailed' => __( 'Update Failed: %s' ), |
diff --git tests/qunit/fixtures/updates.js tests/qunit/fixtures/updates.js
index 013536c..a01ba72 100644
|
|
|
window._wpUpdatesSettings = { |
| 9 | 9 | 'updated': 'Updated!', |
| 10 | 10 | 'update': 'Update', |
| 11 | 11 | 'updateNow': 'Update Now', |
| | 12 | 'updateNowLabel': 'Update Now', |
| 12 | 13 | 'updateFailedShort': 'Update Failed!', |
| 13 | 14 | 'updateFailed': 'Update Failed: %s', |
| 14 | 15 | 'updatingLabel': 'Updating %s...', |
| … |
… |
window._wpUpdatesSettings = { |
| 19 | 20 | 'updateCancel': 'Update canceled.', |
| 20 | 21 | 'beforeunload': 'Updates may not complete if you navigate away from this page.', |
| 21 | 22 | 'installNow': 'Install Now', |
| | 23 | 'installNowLabel': 'Update %s now', |
| 22 | 24 | 'installing': 'Installing...', |
| 23 | 25 | 'installed': 'Installed!', |
| 24 | 26 | 'installFailedShort': 'Install Failed!', |