1const callAjax = async (url, dataPost, typeData, method, csrfToken, check_loading, class1)=>{ 2 3 // add modal bootstrap loading 4 jQuery('#loading_spinner').remove(); 5 jQuery('#popup_notyfy').remove(); 6 var html_spiner_full = '<div id="loading_spinner" class="modal" role="dialog" data-bs-backdrop="static" data-bs-keyboard="false" style="padding-right:0px !important">' 7 html_spiner_full += '<div class="modal-dialog">' 8 html_spiner_full += '<div class="loading_spinner"></div></div></div>' 9 $('body').append(html_spiner_full); 10 11 try { 12 const result = await $.ajax({ 13 type: method, 14 url: url, 15 dataType: typeData, 16 data: dataPost, 17 headers: { 'X-CSRF-Token': csrfToken }, 18 beforeSend: function () { 19 if(check_loading == 1){ 20 $('#loading_spinner').modal('show'); 21 }else{ 22 $('#'+class1).html('<i class="fa fa-spinner fa-pulse fa-3x fa-fw margin-bottom" style="color: #3faf40;"></i>'); 23 } 24 }, 25 success: function (response) { 26 // success 27 }, 28 complete: function () { 29 $('#loading_spinner').modal('hide'); 30 }, 31 }); 32 return result; 33 } catch (e) { 34 return false; 35 } 36} 37 38function showModalMessege(content = '', title = '', color = ''){ 39 content = content === '' ? 'Vui lòng thêm ná»i dung !' : content; 40 title = title === '' ? 'Thông báo' : title; 41 color = color === '' ? '#0033FF' : color; 42 if ($('#popup_notyfy').is(':visible')) { 43 return; 44 } 45 jQuery('#popup_notyfy').remove(); 46 var element_modal = '<div class="modal" id="popup_notyfy" data-bs-backdrop="static" data-bs-keyboard="false" >\ 47 <div class="modal-dialog content_popup">\ 48 <div class="modal-content">\ 49 <div class="modal-header">\ 50 <h4 class="modal-title" id="myModalLabel" style="display: inline-block;">'+title+'</h4>\ 51 <button type="button" class="close" data-bs-dismiss="modal" aria-hidden="true"><i class="fa fa-times"></i></button>\ 52 </div>\ 53 <div class="modal-body">\ 54 <input type="hidden" class="key_del"/>\ 55 <p class="text_del" style="color: #000;font-size: 13px;">'+content+'</p>\ 56 <p class="debug-url"></p>\ 57 </div>\ 58 <div class="modal-footer">\ 59 <input type="button" class="btn btn-primary" data-bs-dismiss="modal" aria-hidden="true" value="'+ MSG_LANG_47 +'">\ 60 </div>\ 61 </div>\ 62 </div>\ 63 </div>'; 64 65 $('body').append(element_modal); 66 $('#popup_notyfy').modal('show'); 67}
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.