1var mailform_input_filesize; 2var mailform_input_filesize_sum; 3const total_upload_size_limit = 33554432; 4 5jQuery(function(){ 6 let file_inputs = jQuery('input[id^="file-input-"]'); 7 mailform_input_filesize = {}; 8 mailform_input_filesize_sum = 0; 9 file_inputs.each(function(index,elm){ 10 var fileid = jQuery(elm).attr('id'); 11 let fileid_split = fileid.split('file-input-'); 12 fileid = fileid_split[1]; 13 show_file_clear_btn(fileid); 14 jQuery(elm).change(function() { 15 show_file_clear_btn(fileid); 16 check_filesize(fileid); 17 }); 18 }); 19 let file_inputs_uploaded = jQuery('.uploaded-file-size'); 20 file_inputs_uploaded.each(function(index,elm){ 21 if(jQuery(elm).val()) { 22 var uploaded_fileid_split = jQuery(elm).attr('data-id'); 23 mailform_input_filesize[uploaded_fileid_split] = Number(jQuery(elm).val()); 24 mailform_input_filesize_sum += mailform_input_filesize[uploaded_fileid_split]; 25 } 26 }); 27}); 28 29function file_delete(fileid) { 30 var fileinput = 'file-input-'+fileid; 31 inputElement = document.getElementById(fileinput); 32 for (key in mailform_input_filesize) { 33 if(key == fileid) { 34 mailform_input_filesize_sum -= mailform_input_filesize[key]; 35 delete mailform_input_filesize[key]; 36 } 37 } 38 jQuery('#err-'+ fileid).text(''); 39 jQuery('#file-input-' + fileid).val(''); 40 jQuery('input[name="answer-uploaded-'+ fileid + '"]').val(''); 41 let mailform_mod_url = ''; 42 var action = jQuery('form#mailForm').attr('action'); 43 var action_split = action.split('/'); 44 45 for(var ii = 0; ii < action_split.length; ii++) 46 { 47 if(action_split[ii] != '' && action_split[ii] != 'step_save'){ 48 mailform_mod_url = mailform_mod_url + action_split[ii] + '/'; 49 } else if(action_split[ii] == 'step_save'){ 50 break; 51 } 52 } 53 jQuery.ajax({ 54 url : mailform_mod_url + 'delete_session_file/'+ fileid, 55 type: 'GET', 56 dataType: 'text' 57 }).done(function(name){ 58 var div = jQuery('div#filename-preview-' + fileid ); 59 if(div.html() == name) { 60 div.html(''); 61 } 62 jQuery('#file-clear-btn-'+fileid).hide(); 63 64 }).fail(function() { 65 alert('éä¿¡ã¨ã©ã¼ã§ã'); 66 return false; 67 }); 68} 69 70function check_filesize(fileid) { 71 jQuery('#err-'+fileid).text(''); 72 var fileinput = 'file-input-'+fileid; 73 inputElement = document.getElementById(fileinput); 74 mailform_input_filesize[fileid] = inputElement.files[0].size; 75 mailform_input_filesize_sum += mailform_input_filesize[fileid]; 76 if(mailform_input_filesize_sum > total_upload_size_limit) { 77 mailform_input_filesize_sum -= mailform_input_filesize[fileid]; 78 jQuery('#err-'+fileid).text('æ·»ä»ãã¡ã¤ã«ã®åè¨ãµã¤ãºã32MBãè¶ ãããã鏿ã§ãã¾ããã'); 79 delete mailform_input_filesize[fileid]; 80 jQuery('#file-clear-btn-'+fileid).hide(); 81 jQuery('#file-input-'+fileid).val(''); 82 } 83} 84 85function show_file_clear_btn(fileid){ 86 if(jQuery('#file-input-'+fileid).val() != '' || jQuery('div#filename-preview-' + fileid ).html() != ''){ 87 jQuery('#file-clear-btn-'+fileid).show(); 88 } 89} 90 91
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.