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
This commit is contained in:
parent
8317d0735a
commit
0b1f2f7ca3
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue