1document.addEventListener('DOMContentLoaded', function() { 2 const popupForm = $('.popup-modal'), 3 docWrapper = $('body'), 4 modalButton = $('.modal-popup-btn'); 5 6 popupForm.on('click', function(event){ 7 if ($(event.target).closest('.popup-modal__body, .modal-popup-btn').length) { 8 return 9 } else { 10 popupForm.removeClass('open') 11 docWrapper.removeClass('overflow_h') 12 } 13 }); 14 15 $('.popup-modal__close').on('click', function(){ 16 popupForm.removeClass('open') 17 docWrapper.removeClass('overflow_h') 18 }); 19 20 modalButton.on('click', function(event){ 21 if (event.target.tagName == 'A') { 22 return; 23 } 24 let formUrl = `/-/x-api/v1/public/?method=form/postform¶m[form_id]=${$(this).data('url')}¶m[tpl]=popup_form.tpl` 25 26 $.ajax({ 27 url: formUrl, 28 dataType: 'json', 29 success: function(response) { 30 if (!response.result.error) { 31 $('.popup-modal .for-form-js').html(response.result.html) 32 popupForm.addClass('open') 33 docWrapper.addClass('overflow_h') 34 } 35 } 36 }) 37 }); 38});
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.