Admin: Site Health JavaScript minor clean-up.

See #46573.


git-svn-id: https://develop.svn.wordpress.org/trunk@44988 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrea Fercia 2019-03-23 16:38:48 +00:00
parent 448ed1adfc
commit c2fd19e12d
1 changed files with 3 additions and 5 deletions

View File

@ -23,7 +23,7 @@ jQuery( document ).ready( function( $ ) {
$( '.copy-field-success', $wrapper ).addClass( 'visible' );
$( this ).focus();
wp.a11y.speak( SiteHealth.string.site_info_copied, 'polite' );
wp.a11y.speak( SiteHealth.string.site_info_copied );
}
} );
@ -107,7 +107,7 @@ jQuery( document ).ready( function( $ ) {
pct = ( ( 100 - val ) / 100 ) * c;
$circle.css({ strokeDashoffset: pct } );
$circle.css( { strokeDashoffset: pct } );
if ( 1 > parseInt( SiteHealth.site_status.issues.critical, 0 ) ) {
$( '#health-check-issues-critical' ).addClass( 'hidden' );
@ -133,8 +133,6 @@ jQuery( document ).ready( function( $ ) {
$progressBar.attr( 'data-pct', val );
$progressBar.attr( 'aria-valuenow', val );
$( '.health-check-body' ).attr( 'aria-hidden', false );
$.post(
ajaxurl,
{
@ -144,7 +142,7 @@ jQuery( document ).ready( function( $ ) {
}
);
wp.a11y.speak( SiteHealth.string.site_health_complete_screen_reader.replace( '%s', val + '%' ), 'polite' );
wp.a11y.speak( SiteHealth.string.site_health_complete_screen_reader.replace( '%s', val + '%' ) );
}
/**