1ACC.checkout = { 2 3 _autoload: [ 4 "bindCheckO", 5 "bindForms", 6 "bindSavedPayments" 7 ], 8 9 10 bindForms:function(){ 11 12 $(document).on("click","#addressSubmit",function(e){ 13 e.preventDefault(); 14 window.location.href = '/checkout/multi/delivery-address/next'; 15 }) 16 17 $(document).on("click","#deliveryMethodSubmit",function(e){ 18 e.preventDefault(); 19 $('#selectDeliveryMethodForm').submit(); 20 }) 21 22 $(document).on("click","#deliveryDateSubmit",function(e){ 23 e.preventDefault(); 24 $('#selectDeliveryDateForm').submit(); 25 }) 26 }, 27 28 bindSavedPayments:function(){ 29 $(document).on("click",".js-saved-payments",function(e){ 30 e.preventDefault(); 31 32 var title = $("#savedpaymentstitle").html(); 33 34 $.colorbox({ 35 href: "#savedpaymentsbody", 36 inline:true, 37 maxWidth:"100%", 38 opacity:0.7, 39 //width:"320px", 40 title: title, 41 close:'<span class="glyphicon glyphicon-remove"></span>', 42 onComplete: function(){ 43 } 44 }); 45 }) 46 }, 47 48 bindCheckO: function () 49 { 50 var cartEntriesError = false; 51 52 // Alternative checkout flows options 53 $('.doFlowSelectedChange').change(function () 54 { 55 if ('multistep-pci' == $('#selectAltCheckoutFlow').val()) 56 { 57 $('#selectPciOption').show(); 58 } 59 else 60 { 61 $('#selectPciOption').hide(); 62 63 } 64 }); 65 66 67 68 $('.js-continue-shopping-button').click(function () 69 { 70 var checkoutUrl = $(this).data("continueShoppingUrl"); 71 window.location = checkoutUrl; 72 }); 73 74 $('.js-create-quote-button').click(function () 75 { 76 $(this).prop("disabled", true); 77 var createQuoteUrl = $(this).data("createQuoteUrl"); 78 window.location = createQuoteUrl; 79 }); 80 81 82 $('.expressCheckoutButton').click(function() 83 { 84 document.getElementById("expressCheckoutCheckbox").checked = true; 85 }); 86 87 $(document).on("input",".confirmGuestEmail,.guestEmail",function(){ 88 89 var orginalEmail = $(".guestEmail").val(); 90 var confirmationEmail = $(".confirmGuestEmail").val(); 91 92 if(orginalEmail === confirmationEmail){ 93 $(".guestCheckoutBtn").removeAttr("disabled"); 94 }else{ 95 $(".guestCheckoutBtn").attr("disabled","disabled"); 96 } 97 }); 98 99 $('.js-continue-checkout-button').click(function () 100 { 101 $(this).prop("disabled", true); 102 var checkoutUrl = $(this).data("checkoutUrl"); 103 104 cartEntriesError = ACC.pickupinstore.validatePickupinStoreCartEntires(); 105 if (!cartEntriesError) 106 { 107 var expressCheckoutObject = $('.express-checkout-checkbox'); 108 if(expressCheckoutObject.is(":checked")) 109 { 110 window.location = expressCheckoutObject.data("expressCheckoutUrl"); 111 } 112 else 113 { 114 var flow = $('#selectAltCheckoutFlow').val(); 115 if ( flow == undefined || flow == '' || flow == 'select-checkout') 116 { 117 // No alternate flow specified, fallback to default behaviour 118 window.location = checkoutUrl; 119 } 120 else 121 { 122 // Fix multistep-pci flow 123 if ('multistep-pci' == flow) 124 { 125 flow = 'multistep'; 126 } 127 var pci = $('#selectPciOption').val(); 128 129 // Build up the redirect URL 130 var redirectUrl = checkoutUrl + '/select-flow?flow=' + flow + '&pci=' + pci; 131 window.location = redirectUrl; 132 } 133 } 134 } 135 return false; 136 }); 137 138 $('.select-address-btn').click(function () { 139 $(this).closest("form").submit(); 140 $('.select-address-btn').attr('disabled', 'disabled'); 141 }); 142 } 143 144};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.