1/** 2 * NOTICE OF LICENSE 3 * 4 * This source file is subject to the Software License Agreement 5 * that is bundled with this package in the file LICENSE.txt. 6 * 7 * @author Peter Sliacky (Zelarg) 8 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 9 */ 10 11tc_confirmOrderValidations['inpostship'] = function () { 12 if ( 13 $('.delivery-option.inpostship ~ .tr-inpost-box').length && 14 "" == $('.inpostship-main.i-go .point-info').text() 15 ) { 16 var shippingErrorMsg = $('#thecheckout-shipping > .inner-area > .error-msg'); 17 shippingErrorMsg.text(shippingErrorMsg.text() + ' (Paczkomaty 24)'); 18 shippingErrorMsg.show(); 19 scrollToElement(shippingErrorMsg); 20 return false; 21 } else { 22 return true; 23 } 24} 25 26checkoutShippingParser.inpostship = { 27 init_once: function (elements) { 28 }, 29 30 on_ready: function() { 31 setTimeout(function(){ 32 if ('function' == typeof initInpost && 'function' == typeof inpostBindRadio) { 33 $('.delivery-option input').on('click', function(e) { 34 inpostBindRadio($(this), e); 35 }); 36 initInpost($('.delivery-option input' + ":checked")); 37 $('.delivery-options-list button').on('click', function(){ 38 var val = $('.tr-inpost-box .inpostship-main .inpost-point').val(); 39 if (val == '' && selectedPointInfo == '') { 40 $('#inpostshipmodal').modal(); 41 $('#cgv').parent().removeClass('checked'); 42 return false; 43 } 44 }); 45 } 46 47 $('#inpostshipmodal .modal-footer button').on('click', function() { 48 $('#inpostshipmodal').modal('hide'); 49 }); 50 51 $('#inpostshipmodal .modal-header button').on('click', function() { 52 $('#inpostshipmodal').modal('hide'); 53 }); 54 },300) 55 }, 56 57 delivery_option: function (element) { 58 // Initial update of warehouse combobox 59 // Rest of the code (warehouse change handler, calling saveCart, is in Custom CSS block 60 61 element.append(' \ 62 <script> \ 63 $(document).ready( \ 64 checkoutShippingParser.inpostship.on_ready \ 65 ); \ 66 </script> \ 67 '); 68 69 }, 70 71 extra_content: function (element) { 72 } 73 74}
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.