1(function($) 2{ 3 4 bookneticHooks.addAction('booking_panel_loaded', function ( booknetic ) 5 { 6 let booking_panel_js = booknetic.panel_js; 7 8 let isLocalPaymentSelected = function () 9 { 10 return booking_panel_js.find('.booknetic_payment_method.booknetic_payment_method_selected').data('payment-type') === 'local'; 11 }; 12 13 let isDepositSelected = function () 14 { 15 let selectedDeposit = booking_panel_js.find('input[name="input_deposit"]:checked'); 16 17 return selectedDeposit.length === 0 || selectedDeposit.val() == 1; 18 }; 19 20 let syncDepositView = function () 21 { 22 let hideOnLocal = booking_panel_js.find('.booknetic_hide_on_local'); 23 let depositPrice = hideOnLocal.filter('.booknetic_deposit_price'); 24 let isLocal = isLocalPaymentSelected(); 25 let showDepositPrice = ! isLocal && isDepositSelected(); 26 27 hideOnLocal.filter('.booknetic_hidden').removeClass('booknetic_hidden').hide(); 28 29 hideOnLocal.not(depositPrice).stop(true, true)[ isLocal ? 'fadeOut' : 'fadeIn' ](100); 30 depositPrice.stop(true, true)[ showDepositPrice ? 'fadeIn' : 'fadeOut' ](100); 31 32 booking_panel_js.find('.booknetic_payment_methods_footer').css('background-color', showDepositPrice ? '#F8D7DF' : 'white'); 33 }; 34 35 booking_panel_js.on('click', '.booknetic_payment_method', function () 36 { 37 if ( $(this).hasClass('booknetic_payment_method_selected') ) 38 return; 39 40 booking_panel_js.find(".booknetic_payment_method_selected").removeClass('booknetic_payment_method_selected'); 41 $(this).addClass('booknetic_payment_method_selected'); 42 43 syncDepositView(); 44 }).on( 'change', '.booknetic_deposit_radios', function() 45 { 46 syncDepositView(); 47 48 booknetic.ajax('update_prices', booknetic.ajaxParameters( { current_step: 'confirm_details' } ), function ( result ) 49 { 50 booking_panel_js.find('.booknetic_prices_box').html(result['prices_html']); 51 booking_panel_js.find('.booknetic_sum_price').text(result['sum_price_txt']); 52 booking_panel_js.find('.booknetic_deposit_amount_txt').text(result['deposit_txt']); 53 }); 54 }); 55 56 }); 57 58 bookneticHooks.addAction('before_step_loading', function( booknetic, new_step_id, old_step_id ) 59 { 60 if( new_step_id !== 'confirm_details' ) 61 return; 62 63 booknetic.stepManager.loadStandartSteps( new_step_id, old_step_id ); 64 }); 65 66 bookneticHooks.addAction('loaded_step', function( booknetic, new_step_id, old_step_id, ajaxData ) 67 { 68 if( new_step_id !== 'confirm_details' ) 69 return; 70 71 let booking_panel_js = booknetic.panel_js; 72 73 if ( ! booknetic.isMobileView() ) 74 { 75 booking_panel_js.find( '.booknetic_portlet_content' ).handleScrollBooknetic(); 76 } 77 }); 78 79})(jQuery);
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.