diff --git src/js/_enqueues/wp/updates.js src/js/_enqueues/wp/updates.js
index d7e0de1c39..2537b2e681 100644
|
|
|
953 | 953 | $notice = $notice.addClass( 'updating-message' ).find( 'p' ); |
954 | 954 | } |
955 | 955 | |
956 | | if ( $notice.html() !== wp.updates.l10n.updating ) { |
957 | | $notice.data( 'originaltext', $notice.html() ); |
958 | | } |
| 956 | // #37669 |
| 957 | // Shiny Updates: Cancelling the filesystem credentials when updating within the |
| 958 | // pop-up prevents updating again (without closing/opening) and leaves UI artefacts |
| 959 | $notice.each( function( index, n ) { |
| 960 | $n = $(n); |
| 961 | if ( $n.html() !== wp.updates.l10n.updating ) { |
| 962 | $n.data( 'originaltext', $n.html() ); |
| 963 | } |
| 964 | } ); |
959 | 965 | |
960 | 966 | wp.a11y.speak( wp.updates.l10n.updatingMsg, 'polite' ); |
961 | 967 | $notice.text( wp.updates.l10n.updating ); |
… |
… |
|
1800 | 1806 | $message = $updatingMessage; |
1801 | 1807 | } |
1802 | 1808 | |
1803 | | if ( $message && $message.hasClass( 'updating-message' ) ) { |
1804 | | originalText = $message.data( 'originaltext' ); |
| 1809 | // #37669 |
| 1810 | // Shiny Updates: Cancelling the filesystem credentials when updating within the |
| 1811 | // pop-up prevents updating again (without closing/opening) and leaves UI artefacts |
| 1812 | $message.each( function( index, msg ) { |
| 1813 | $msg = $(msg); |
| 1814 | if ( $msg.hasClass( 'updating-message' ) ) { |
| 1815 | originalText = $msg.data( 'originaltext' ); |
1805 | 1816 | |
1806 | | if ( 'undefined' === typeof originalText ) { |
1807 | | originalText = $( '<p>' ).html( $message.find( 'p' ).data( 'originaltext' ) ); |
1808 | | } |
| 1817 | if ( 'undefined' === typeof originalText ) { |
| 1818 | originalText = $( '<p>' ).html( $msg.find( 'p' ).data( 'originaltext' ) ); |
| 1819 | } |
1809 | 1820 | |
1810 | | $message |
1811 | | .removeClass( 'updating-message' ) |
1812 | | .html( originalText ); |
1813 | | |
1814 | | if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow ) { |
1815 | | if ( 'update-plugin' === job.action ) { |
1816 | | $message.attr( 'aria-label', wp.updates.l10n.pluginUpdateNowLabel.replace( '%s', $message.data( 'name' ) ) ); |
1817 | | } else if ( 'install-plugin' === job.action ) { |
1818 | | $message.attr( 'aria-label', wp.updates.l10n.pluginInstallNowLabel.replace( '%s', $message.data( 'name' ) ) ); |
| 1821 | $msg |
| 1822 | .removeClass( 'updating-message' ) |
| 1823 | .html( originalText ); |
| 1824 | |
| 1825 | if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow ) { |
| 1826 | if ( 'update-plugin' === job.action ) { |
| 1827 | $msg.attr( 'aria-label', wp.updates.l10n.pluginUpdateNowLabel.replace( '%s', $msg.data( 'name' ) ) ); |
| 1828 | } else if ( 'install-plugin' === job.action ) { |
| 1829 | $msg.attr( 'aria-label', wp.updates.l10n.pluginInstallNowLabel.replace( '%s', $msg.data( 'name' ) ) ); |
| 1830 | } |
1819 | 1831 | } |
1820 | 1832 | } |
1821 | | } |
| 1833 | } ); |
| 1834 | |
| 1835 | wp.a11y.speak( wp.updates.l10n.updateCancel, 'polite' ); |
1822 | 1836 | |
1823 | 1837 | wp.a11y.speak( wp.updates.l10n.updateCancel, 'polite' ); |
1824 | 1838 | } ); |
diff --git src/wp-admin/themes.php src/wp-admin/themes.php
index 244f573ce6..65e7ab58f4 100644
|
|
if ( ! is_multisite() && current_user_can( 'edit_themes' ) && $broken_themes ) { |
564 | 564 | </p> |
565 | 565 | |
566 | 566 | <# if ( data.hasUpdate ) { #> |
567 | | <div class="notice notice-warning notice-alt notice-large"> |
568 | | <h3 class="notice-title"><?php _e( 'Update Available' ); ?></h3> |
569 | | {{{ data.update }}} |
| 567 | <div data-slug="{{ data.id }}"> |
| 568 | <div class="update-message notice notice-warning notice-alt notice-large"> |
| 569 | <h3 class="notice-title"><?php _e( 'Update Available' ); ?></h3> |
| 570 | {{{ data.update }}} |
| 571 | </div> |
570 | 572 | </div> |
571 | 573 | <# } #> |
572 | 574 | <p class="theme-description">{{{ data.description }}}</p> |