From 0b1f2f7ca3733ff9a78f14e49b438884871b7d49 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Fri, 5 Aug 2016 22:56:53 +0000 Subject: [PATCH] Update/Install: Remove the `.notice-error` class before adding classes for the update process. Prevents displaying an update message with error styling. Props obenland. Props SergeyBiryukov for review. Fixes #37550. git-svn-id: https://develop.svn.wordpress.org/trunk@38209 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/js/updates.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-admin/js/updates.js b/src/wp-admin/js/updates.js index cc5090cc75..5056fa0f92 100644 --- a/src/wp-admin/js/updates.js +++ b/src/wp-admin/js/updates.js @@ -350,7 +350,7 @@ if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) { $updateRow = $( 'tr[data-plugin="' + args.plugin + '"]' ); - $message = $updateRow.find( '.update-message' ).addClass( 'updating-message' ).find( 'p' ); + $message = $updateRow.find( '.update-message' ).removeClass( 'notice-error' ).addClass( 'updating-message notice-warning' ).find( 'p' ); message = wp.updates.l10n.updatingLabel.replace( '%s', $updateRow.find( '.plugin-title strong' ).text() ); } else if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow ) { $card = $( '.plugin-card-' + args.slug ); @@ -900,7 +900,7 @@ }, args ); if ( 'themes-network' === pagenow ) { - $notice = $( '[data-slug="' + args.slug + '"]' ).find( '.update-message' ).addClass( 'updating-message' ).find( 'p' ); + $notice = $( '[data-slug="' + args.slug + '"]' ).find( '.update-message' ).removeClass( 'notice-error' ).addClass( 'updating-message notice-warning' ).find( 'p' ); } else { $notice = $( '#update-theme' ).closest( '.notice' ).removeClass( 'notice-large' ); @@ -2027,7 +2027,7 @@ if ( 'wp-' + response.update + '-update-success' === event.type ) { success++; } else { - itemName = response.pluginName ? response.pluginName : $( '[data-slug="' + response.slug + '"]' ).find( '.theme-title strong' ).text(); + itemName = response.pluginName ? response.pluginName : $( '[data-slug="' + response.slug + '"]' ).find( '.column-primary strong' ).text(); error++; errorMessages.push( itemName + ': ' + response.errorMessage );