Shipping Settings: Add busy animation to Continue button (#42688)

This commit is contained in:
Paul Sealock 2023-12-14 12:26:21 +13:00 committed by GitHub
commit a232c32c8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: update
Update Shipping Settings zone method modal spinner on modal primary button.

View File

@ -4358,6 +4358,21 @@ table.wc_shipping {
.wc-backbone-modal-back-inactive { .wc-backbone-modal-back-inactive {
display: none; display: none;
} }
#btn-next.is-busy {
background-image: linear-gradient(-45deg, #fafafa 33%, #e0e0e0 33%, #e0e0e0 70%, #fafafa 70%);
animation-duration: 2.5s;
animation-timing-function: linear;
animation-delay: 0s;
animation-iteration-count: infinite;
animation-direction: normal;
animation-fill-mode: none;
animation-play-state: running;
animation-name: components-button__busy-animation;
animation-timeline: auto;
animation-range-start: normal;
color: #757575;
}
} }
.wc-backbone-modal-add-shipping-method .wc-backbone-modal-main article { .wc-backbone-modal-add-shipping-method .wc-backbone-modal-main article {

View File

@ -526,7 +526,7 @@
if ( 'wc-modal-add-shipping-method' === target ) { if ( 'wc-modal-add-shipping-method' === target ) {
shippingMethodView.block(); shippingMethodView.block();
$('#btn-next').html('<img alt="processing" src="images/wpspin_light.gif" class="waiting" />'); $('#btn-next').addClass( 'is-busy' );
// Add method to zone via ajax call // Add method to zone via ajax call
$.post( ajaxurl + ( ajaxurl.indexOf( '?' ) > 0 ? '&' : '?' ) + 'action=woocommerce_shipping_zone_add_method', { $.post( ajaxurl + ( ajaxurl.indexOf( '?' ) > 0 ? '&' : '?' ) + 'action=woocommerce_shipping_zone_add_method', {