diff --git src/wp-admin/js/updates.js src/wp-admin/js/updates.js
index 5056fa0..4db628b 100644
|
|
|
713 | 713 | * decorated with an abort() method. |
714 | 714 | */ |
715 | 715 | wp.updates.deletePlugin = function( args ) { |
716 | | var $message = $( '[data-plugin="' + args.plugin + '"]' ).find( '.update-message p' ); |
| 716 | var $message = $( '[data-plugin="' + args.plugin + '"]' ).find( '.row-actions a.delete' ); |
717 | 717 | |
718 | 718 | args = _.extend( { |
719 | 719 | success: wp.updates.deletePluginSuccess, |
720 | 720 | error: wp.updates.deletePluginError |
721 | 721 | }, args ); |
722 | 722 | |
723 | | if ( $message.html() !== wp.updates.l10n.updating ) { |
724 | | $message.data( 'originaltext', $message.html() ); |
| 723 | if ( $message.html() !== wp.updates.l10n.deleting ) { |
| 724 | $message |
| 725 | .data( 'originaltext', $message.html() ) |
| 726 | .text( wp.updates.l10n.deleting ) |
725 | 727 | } |
726 | 728 | |
727 | 729 | wp.a11y.speak( wp.updates.l10n.deleting, 'polite' ); |
… |
… |
|
1165 | 1167 | * decorated with an abort() method. |
1166 | 1168 | */ |
1167 | 1169 | wp.updates.deleteTheme = function( args ) { |
1168 | | var $button = $( '.theme-actions .delete-theme' ); |
| 1170 | var $button; |
| 1171 | |
| 1172 | if ( 'themes' === pagenow ) { |
| 1173 | $button = $( '.theme-actions .delete-theme' ) |
| 1174 | } else if ( 'themes-network' === pagenow ) { |
| 1175 | $button = $( '[data-slug="' + args.slug + '"]' ).find( '.row-actions a.delete' ); |
| 1176 | } |
1169 | 1177 | |
1170 | 1178 | args = _.extend( { |
1171 | 1179 | success: wp.updates.deleteThemeSuccess, |
… |
… |
|
1173 | 1181 | }, args ); |
1174 | 1182 | |
1175 | 1183 | if ( $button.html() !== wp.updates.l10n.deleting ) { |
1176 | | $button.data( 'originaltext', $button.html() ); |
| 1184 | $button |
| 1185 | .data( 'originaltext', $button.html() ) |
| 1186 | .text( wp.updates.l10n.deleting ); |
1177 | 1187 | } |
1178 | 1188 | |
1179 | | $button.text( wp.updates.l10n.deleting ); |
1180 | 1189 | wp.a11y.speak( wp.updates.l10n.deleting, 'polite' ); |
1181 | 1190 | |
1182 | 1191 | // Remove previous error messages, if any. |
… |
… |
|
1707 | 1716 | if ( 'import' === pagenow ) { |
1708 | 1717 | $updatingMessage.removeClass( 'updating-message' ); |
1709 | 1718 | } else if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) { |
1710 | | $message = $( 'tr[data-plugin="' + job.data.plugin + '"]' ).find( '.update-message' ); |
| 1719 | if ( 'update-plugin' === job.action ) { |
| 1720 | $message = $( 'tr[data-plugin="' + job.data.plugin + '"]' ).find( '.update-message' ); |
| 1721 | } else if ( 'delete-plugin' === job.action ) { |
| 1722 | $message = $( '[data-plugin="' + job.data.plugin + '"]' ).find( '.row-actions a.delete' ); |
| 1723 | } |
1711 | 1724 | } else if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow ) { |
1712 | 1725 | $message = $( '.update-now.updating-message' ); |
| 1726 | } else if ( 'themes' === pagenow || 'themes-network' === pagenow ) { |
| 1727 | if ( 'update-theme' === job.action ) { |
| 1728 | $message = $( '[data-slug="' + job.data.slug + '"]' ).find( '.update-message' ); |
| 1729 | } else if ( 'delete-theme' === job.action ) { |
| 1730 | if ( 'themes-network' === pagenow ) { |
| 1731 | $message = $( '[data-slug="' + job.data.slug + '"]' ).find( '.row-actions a.delete' ); |
| 1732 | } else { |
| 1733 | $message = $( '.theme-actions .delete-theme' ); |
| 1734 | } |
| 1735 | } |
1713 | 1736 | } else { |
1714 | 1737 | $message = $updatingMessage; |
1715 | 1738 | } |