Browse Source

Ajustes na função de block.

master
Guilherme Capanema 6 years ago
parent
commit
049a5887ee
1 changed files with 7 additions and 6 deletions
  1. +7
    -6
      public/js/wc-fvc-public.js

+ 7
- 6
public/js/wc-fvc-public.js View File

@ -6,10 +6,10 @@
* Initialize actions.
*/
init: function() {
$( document.body ).on( 'submit', '.woocommerce-shipping-calculator', function(event) {
$( document.body ).on( 'submit', 'form.woocommerce-shipping-calculator', function(event) {
event.preventDefault();
WC_Fvc.block();
WC_Fvc.block('form.woocommerce-shipping-calculator, div.cart_totals');
var cep = $('#calc_shipping_postcode').val();
@ -28,6 +28,7 @@
$('#calc_shipping_state').val(address.data.state).change();
$('#calc_shipping_city').val(address.data.city).change();
}
WC_Fvc.unblock('form.woocommerce-shipping-calculator, div.cart_totals');
},
});
});
@ -36,8 +37,8 @@
/**
* Block shipping form.
*/
block: function() {
$('.woocommerce-shipping-calculator, div.cart_totals')
block: function(elements) {
$(elements)
.addClass('processing')
.block({
message: null,
@ -51,8 +52,8 @@
/**
* Unblock checkout.
*/
unblock: function() {
$('.woocommerce-shipping-calculator, div.cart_totals')
unblock: function(elements) {
$(elements)
.removeClass('processing')
.unblock();
},


Loading…
Cancel
Save