1(function($) 2{ 3 "use strict"; 4 5 $(document).ready( function() 6 { 7 $('body').append('<div class="bkntc_booking_modal" style="display: none">\n' + 8 '\n' + 9 ' <div class="content">\n' + 10 ' <div class="close_icon">\n' + 11 ' <svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"\n' + 12 ' width="20" height="20"\n' + 13 ' viewBox="0 0 24 24"\n' + 14 ' style=" fill:#000000;"><path d="M 4.7070312 3.2929688 L 3.2929688 4.7070312 L 10.585938 12 L 3.2929688 19.292969 L 4.7070312 20.707031 L 12 13.414062 L 19.292969 20.707031 L 20.707031 19.292969 L 13.414062 12 L 20.707031 4.7070312 L 19.292969 3.2929688 L 12 10.585938 L 4.7070312 3.2929688 z"></path></svg>\n' + 15 ' </div>\n' + 16 ' <div class="body">\n' + 17 '\n' + 18 ' </div>\n' + 19 ' </div>\n' + 20 '</div>'); 21 22 let modal = $('.bkntc_booking_modal'); 23 let modalX = modal.find('.close_icon'); 24 let modalBody = modal.find('.body'); 25 26 let closeModal = function () 27 { 28 modal.css('display' ,'none'); 29 modalBody.html('') 30 $("html,body").css('overflow','visible'); 31 }; 32 33 $(document).on('click', '.bnktc_booking_popup_btn', function (e) 34 { 35 e.preventDefault(); 36 let data = {}; 37 let btn = $(this); 38 let tenantId = $(this).attr('data-tenant-id'); 39 40 data['action'] = 'bkntc_get_booking_panel'; 41 data['_ajax_nonce'] = window.BookneticData.ajax_nonce; 42 data['location'] = $(this).attr('data-location'); 43 data['location_category'] = $(this).attr('data-location-category'); 44 data['staff'] = $(this).attr('data-staff'); 45 data['show_service'] = $(this).attr('data-show-service'); 46 data['service'] = $(this).attr('data-service'); 47 data['category'] = $(this).attr('data-category'); 48 data['theme'] = $(this).attr('data-theme'); 49 50 if( tenantId > 0 ){ 51 data['tenant_id'] = $(this).attr('data-tenant-id'); 52 } 53 54 var ajaxObject = 55 { 56 url: window.BookneticData.ajax_url, 57 method: 'POST', 58 data: data, 59 success: function ( result ) 60 { 61 result = $(result); 62 63 result.filter('link[rel="stylesheet"]').each(function() { 64 let linkId = $(this).attr('id'); 65 if ( !linkId || !document.getElementById(linkId) ) { 66 $(this).appendTo(document.head); 67 } 68 }); 69 70 let panel = result.not('link[rel="stylesheet"]'); 71 72 if( tenantId > 0 ){ 73 panel.data('tenant_id', tenantId); 74 } 75 76 modalX.css('display', 'flex'); 77 modalBody.empty().append( panel ); 78 }, 79 error: function (jqXHR, exception) 80 { 81 closeModal(); 82 } 83 }; 84 85 modal.css('display' ,'flex'); 86 modalX.css('display', 'none'); 87 modalBody.append('<div class="bkntc_loader_div"><img class="btn_preloader" src="'+ window.BookneticData.assets_url +'/icons/loading.svg"></div>'); 88 $("html,body").css('overflow','hidden'); 89 $.ajax( ajaxObject ); 90 }); 91 92 $(".bkntc_booking_modal .close_icon").on('click', closeModal); 93 }); 94 95})(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.