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.
Built from https://develop.svn.wordpress.org/trunk@38209


git-svn-id: http://core.svn.wordpress.org/trunk@38150 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2016-08-05 22:57:29 +00:00
parent 427f4b625d
commit 1cef5f60f9
3 changed files with 6 additions and 6 deletions

View File

@ -350,7 +350,7 @@
if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) { if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) {
$updateRow = $( 'tr[data-plugin="' + args.plugin + '"]' ); $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() ); message = wp.updates.l10n.updatingLabel.replace( '%s', $updateRow.find( '.plugin-title strong' ).text() );
} else if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow ) { } else if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow ) {
$card = $( '.plugin-card-' + args.slug ); $card = $( '.plugin-card-' + args.slug );
@ -900,7 +900,7 @@
}, args ); }, args );
if ( 'themes-network' === pagenow ) { 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 { } else {
$notice = $( '#update-theme' ).closest( '.notice' ).removeClass( 'notice-large' ); $notice = $( '#update-theme' ).closest( '.notice' ).removeClass( 'notice-large' );
@ -2027,7 +2027,7 @@
if ( 'wp-' + response.update + '-update-success' === event.type ) { if ( 'wp-' + response.update + '-update-success' === event.type ) {
success++; success++;
} else { } 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++; error++;
errorMessages.push( itemName + ': ' + response.errorMessage ); errorMessages.push( itemName + ': ' + response.errorMessage );

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.7-alpha-38207'; $wp_version = '4.7-alpha-38209';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.