1$( document ).ready( function () { 2 3 var spinner = $( "<img src='" + ACC.config.commonResourcePath + "/images/spinner.gif' />" ); 4 5 function bindCountrySpecificAddressForms (){ 6 $(document).on("change",'#adyenCountrySelector select', function (){ 7 var options = { 8 'addressCode': '', 9 'countryIsoCode': $(this).val() 10 }; 11 displayCountrySpecificAddressForm(options, showAddressFormButtonPanel); 12 }); 13 14 } 15 16 function showAddressFormButtonPanel () { 17 if ($('#adyenCountrySelector :input').val() !== '') 18 { 19 $('#addressform_button_panel').show(); 20 } 21 } 22 23 function displayCountrySpecificAddressForm (options, callback) 24 { 25 $.ajax({ 26 url: ACC.config.encodedContextPath + '/adyen/my-account/addressform', 27 async: true, 28 data: options, 29 dataType: "html", 30 beforeSend: function () 31 { 32 $("#i18nAddressForm").html(spinner); 33 } 34 }).done(function (data) 35 { 36 $("#i18nAddressForm").html($(data).html()); 37 if (typeof callback == 'function') 38 { 39 callback.call(); 40 } 41 42 for (const phoneInputPhoneNumber of document.querySelectorAll('input[type=text][name="billingAddress.phoneNumber"]')) { 43 phoneInputPhoneNumber.addEventListener('change', phoneFormatter, false); 44 phoneInputPhoneNumber.addEventListener('blur', phoneFormatter, false); 45 } 46 47 for (const phoneInput of document.querySelectorAll('input[type=text][name=phone]')) { 48 phoneInput.addEventListener('change', phoneFormatter, false); 49 phoneInput.addEventListener('blur', phoneFormatter, false); 50 } 51 }); 52 } 53 54 bindCountrySpecificAddressForms(); 55 56 function phoneFormatter(event) { 57 const input = event.target; 58 let rawValue = input.value; 59 if (rawValue && rawValue.length) { 60 const prefix = rawValue[0] === '+' ? '+' : ''; 61 input.value = prefix + input.value.replace(/[^0-9]/g, ""); 62 } 63 } 64 65} );
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.