Ticket #40966: 40966.6.patch
File 40966.6.patch, 2.9 KB (added by , 5 years ago) |
---|
-
src/js/_enqueues/wp/updates.js
380 380 381 381 if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) { 382 382 $updateRow = $( 'tr[data-plugin="' + args.plugin + '"]' ); 383 $updateRow.removeClass( 'update' ).addClass( 'updating' ); 383 384 $message = $updateRow.find( '.update-message' ).removeClass( 'notice-error' ).addClass( 'updating-message notice-warning' ).find( 'p' ); 384 385 message = wp.updates.l10n.pluginUpdatingLabel.replace( '%s', $updateRow.find( '.plugin-title strong' ).text() ); 385 386 } else if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow ) { … … 422 423 423 424 if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) { 424 425 $pluginRow = $( 'tr[data-plugin="' + response.plugin + '"]' ) 425 .removeClass( 'updat e' )426 .removeClass( 'updating' ) 426 427 .addClass( 'updated' ); 427 428 $updateMessage = $pluginRow.find( '.update-message' ) 428 429 .removeClass( 'updating-message notice-warning' ) … … 476 477 477 478 if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) { 478 479 if ( response.plugin ) { 479 $message = $( 'tr[data-plugin="' + response.plugin + '"]' ).find( '.update-message' ); 480 $updateRow = $( 'tr[data-plugin="' + response.plugin + '"]' ); 481 $updateRow.removeClass( 'updating' ).addClass( 'update' ); 482 $message = $updateRow.find( '.update-message' ); 480 483 } else { 481 484 $message = $( 'tr[data-slug="' + response.slug + '"]' ).find( '.update-message' ); 482 485 } … … 931 934 }, args ); 932 935 933 936 if ( 'themes-network' === pagenow ) { 934 $notice = $( '[data-slug="' + args.slug + '"]' ).find( '.update-message' ).removeClass( 'notice-error' ).addClass( 'updating-message notice-warning' ).find( 'p' ); 937 $updateRow = $( '[data-slug="' + args.slug + '"]' ); 938 $updateRow.removeClass( 'update' ).addClass( 'updating' ); 939 $notice = $updateRow.find( '.update-message' ).removeClass( 'notice-error' ).addClass( 'updating-message notice-warning' ).find( 'p' ); 935 940 936 941 } else if ( 'customize' === pagenow ) { 937 942 … … 985 990 }, 986 991 $notice, newText; 987 992 993 $theme.removeClass( 'updating' ); 994 988 995 if ( 'customize' === pagenow ) { 989 996 $theme = $( '.updating-message' ).siblings( '.theme-name' ); 990 997 … … 1041 1048 errorMessage = wp.updates.l10n.updateFailed.replace( '%s', response.errorMessage ), 1042 1049 $notice; 1043 1050 1051 $theme.removeClass( 'updating' ); 1052 1044 1053 if ( ! wp.updates.isValidResponse( response, 'update' ) ) { 1045 1054 return; 1046 1055 } … … 1343 1352 1344 1353 if ( 'themes-network' === pagenow ) { 1345 1354 if ( ! $updateRow.length ) { 1346 $themeRow. addClass( 'update' ).after(1355 $themeRow.removeClass( 'updating' ).addClass( 'update' ).after( 1347 1356 updateRow( { 1348 1357 slug: response.slug, 1349 1358 colspan: $( '#bulk-action-form' ).find( 'thead th:not(.hidden), thead td' ).length,