Skip to content

Commit

Permalink
Merge pull request #515 from nickkos101/patch-1
Browse files Browse the repository at this point in the history
Updated to match the default alert behavior.
  • Loading branch information
kcppdevelopers committed Aug 7, 2016
2 parents 5a3cb56 + 55cf0d3 commit 21fe176
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions assets/js/angelleye-frontend.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
jQuery(document).ready(function ($){
if (angelleye_frontend.is_product == "yes"){
jQuery("#paypal_ec_button_product input, input.single_variation_wrap_angelleye").click(function(){
$( '.cart' ).block({
message: null,
overlayCSS: {
background: '#fff',
opacity: 0.6
}
});
var angelleye_action = $(this).data('action');
$('form.cart').attr( 'action', angelleye_action );
$(this).attr('disabled', 'disabled');
$('form.cart').submit();
return false;
if (!$('.woocommerce-variation-add-to-cart').hasClass('woocommerce-variation-add-to-cart-disabled')) {
$( '.cart' ).block({
message: null,
overlayCSS: {
background: '#fff',
opacity: 0.6
}
});
var angelleye_action = $(this).data('action');
$('form.cart').attr( 'action', angelleye_action );
$(this).attr('disabled', 'disabled');
$('form.cart').submit();
return false;
}
});
}
if (angelleye_frontend.is_cart == "yes"){
Expand Down

0 comments on commit 21fe176

Please sign in to comment.