1// naming convention: PacketerCheckoutModule + moduleId (first letter in upper case) 2 3var PacketeryCheckoutModulePs16 = { 4 5 isActive: function () { 6 var isCorrectVersion = PacketaModule.tools.isPS16(); 7 return isCorrectVersion && this.findDeliveryOptions().length > 0; 8 }, 9 10 getSelectedInput: function () { 11 return $('.delivery_option input:checked'); 12 }, 13 14 findDeliveryOptions: function () { 15 return $('#carrier_area .delivery_option input'); 16 }, 17 18 enableSubmitButton: function () { 19 /* Reenable disabled elements if carrier is not packetery */ 20 $('#cgv').attr('disabled', false); // terms of service checkbox 21 $('p.payment_module a').off('click.packeteryButtonDisabled'); 22 23 var processCarrier = $('button[name=processCarrier]'); 24 if (processCarrier.length > 0) { 25 $('button[name=processCarrier]') 26 .attr('disabled', false) 27 .removeClass('disabled') 28 .css('pointer-events', 'auto'); 29 } 30 }, 31 32 disableSubmitButton: function () { 33 var processCarrier = $('button[name=processCarrier]'); 34 if (processCarrier.length > 0) { 35 $('button[name=processCarrier]') 36 .attr('disabled', true) 37 .addClass('disabled') 38 .css('pointer-events', 'none'); 39 } 40 41 /* disable cgv checkbox - cannot continue without selecting pickup point */ 42 $('#cgv').attr('disabled', true); // terms of service checkbox 43 44 /* unbind click events from payment links and disable them - cannot continue without selecting a pickup point */ 45 $('p.payment_module a').off('click.packeteryButtonDisabled').on('click.packeteryButtonDisabled', function (e) { 46 var errorText = $('.packetery-message-pickup-point-not-selected-error').data('content'); 47 alert(errorText); 48 e.preventDefault(); 49 return false; 50 }); 51 }, 52 53 hideValidationErrors: function () { 54 }, 55 56 getExtraContentContainer: function ($selectedInput) { 57 return $selectedInput.closest('tr').find('td:nth-child(3)'); 58 }, 59 60 getExtraContentSelector: function () { 61 return '.carrier-extra-content'; 62 } 63};
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.