updated plugin GP Premium
version 1.12.2
This commit is contained in:
@ -830,3 +830,24 @@
|
||||
pointer-events: none;
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
.refresh-sites a:first-child:before {
|
||||
font: normal 20px/.5 dashicons;
|
||||
speak: none;
|
||||
display: inline-block;
|
||||
padding: 0;
|
||||
top: 9px;
|
||||
left: -4px;
|
||||
position: relative;
|
||||
vertical-align: top;
|
||||
content: "\f463";
|
||||
}
|
||||
|
||||
.refresh-sites a:first-child.loading:before {
|
||||
animation: rotation 1s infinite linear;
|
||||
}
|
||||
|
||||
.refresh-sites a:first-child.success:before {
|
||||
content: "\f147";
|
||||
color: #46b450;
|
||||
}
|
||||
|
@ -910,4 +910,20 @@ jQuery( document ).ready( function($) {
|
||||
$( 'body' ).removeClass( 'site-import-content-exists' );
|
||||
$( 'body' ).removeClass( 'site-import-data-exists' );
|
||||
} );
|
||||
|
||||
$( '.refresh-sites a:first-child' ).on( 'click', function( e ) {
|
||||
var $thisButton = $( this ); // eslint-disable-line no-var
|
||||
e.preventDefault();
|
||||
|
||||
$thisButton.removeClass( 'success' ).addClass( 'loading' );
|
||||
|
||||
$.post( ajaxurl, {
|
||||
action: 'generate_sites_refresh_sites',
|
||||
_nonce: $thisButton.data( 'nonce' ),
|
||||
} ).done( function() {
|
||||
$thisButton.removeClass( 'loading' ).addClass( 'success' );
|
||||
$thisButton.hide();
|
||||
$thisButton.next( '.button' ).show();
|
||||
} );
|
||||
} );
|
||||
} );
|
||||
|
Reference in New Issue
Block a user