1/* Coa íì¼ ë¤ì´ë¡ë ì»´í¬ëí¸ ì´ê¸°í (길ì´ì ë°ë¡ ë¶ë¦¬)*/ 2function Coa_InitCustom(area_id, folder_nm, file_type, callback_fn, colum_nm) { 3 Coa.FileCollection = [], 4 Coa.Init({ 5 "error": function (res) { 6 console.log(res); 7 }, 8 "complete": function (res) { 9 for (var i = 0, j = res.length; i < j; i++) { 10 var data = $.parseJSON(res[i]); 11 12 var inputs = [ 13 { name: 'file_path', value: data.FILE_PATH }, 14 { name: 'file_type', value: data.FILE_TYPE }, 15 { name: 'origin_nm', value: data.ORIGIN_NM }, 16 { name: 'uuid_nm' , value: data.UUID_NM }, 17 { name: 'file_size', value: data.FILE_SIZE }, 18 ]; 19 20 //í¼ì ì¶ê° 21 AppendInputHidden(inputs, 'frm'); 22 AppendInputHidden(inputs, 'historyForm'); //ì°í ì¶ê°ì© 23 } 24 if ( callback_fn instanceof Function ) { 25 $("#columNm").val(colum_nm); 26 callback_fn(); 27 } 28 }, 29 "data": { 30 "folder_nm" : folder_nm, 31 "file_type" : file_type 32 }, 33 "area_id": area_id, 34 "upload_url": "/commonFile/fileUpload.do", 35 "item_size": 2000000000, 36 "is_upload_btn": false, 37 "is_delete_btn": true , 38 "permit_ext": [ "zip" , "pdf" , "jpg" , "png" , "bmp" , "hwp" , "doc" , "docx" , "xls" , "xlsx" , "ppt" , "pptx" , "hwpx"] , 39 "no_permit_ext": [ "exe" , "dll" , "bat" , "java" , "jsp" , "html" , "htm" , "asp" , "cs" , "css" , "js" , "aspx" , "ascx" , "php" , "sql" , "msi"] 40 }); 41 42} 43 44/* input hidden ì¶ê° */ 45function AppendInputHidden(inputs, form_nm){
46 inputs.forEach(function(item) { 47 var input = document.createElement('input'); 48 input.type = 'hidden'; 49 input.name = item.name; 50 input.value = item.value; 51 $("#" + form_nm).append(input); 52 }); 53} 54 55/* íì¼ ë¤ì´ë¡ë */ 56function fileDownload(fileNo, fileSeq) { 57 58 $("form#filedownloadForm").remove(); 59 60 //[1]Validate 61 if( G_IsEmpty(fileNo) || G_IsEmpty(fileSeq) ){ 62 alert("íì¼ ë¤ì´ë¡ëì ì¤í¨íììµëë¤."); 63 return false; 64 } 65 66 //[2]ë¤ì´ë¡ë를 ìí ê°ìí¼ ìì± 67 var oFileForm = $("<form/>",{ 68 id : "filedownloadForm", 69 name : "filedownloadForm", 70 target : "_self", 71 method : "POST", 72 action : "/commonFile/fileDownload.do" 73 }); 74 oFileForm.append("<input type='hidden' id='fileNo' name='fileNo' value='" + fileNo + "'/>"); 75 oFileForm.append("<input type='hidden' id='fileSeq' name='fileSeq' value='" + fileSeq + "'/>"); 76 $("body").append(oFileForm); 77 oFileForm.submit(); 78 79} 80 81/* ë ¼ë¦¬ì íì¼ ìì */ 82function fileDeleteLogi(obj, fileNo, fileSeq) { 83 84 var rmvObj = $(obj).closest("tr"); 85 var fileBody = $(obj).closest("tbody"); 86 87 //[1]Validate 88 if( G_IsEmpty(fileNo) || G_IsEmpty(fileSeq) ){ 89 alert("íì¼ ìì ì ì¤í¨íììµëë¤."); 90 return false; 91 } 92 //[2]íì¼ìì ajax 93 if ( confirm("íì¼ì ìì íìê² ìµëê¹?") ) { 94 $.ajax({ 95 url : "/commonFile/fileLogicalDelete.do", 96 type : "POST", 97 dataType : "json", 98 traditional : true, 99 data : { 100 "fileNo" : fileNo, 101 "fileSeq": fileSeq 102 }, 103 error : function(e){ 104 //console.log(e); 105 alert("íì¼ ìì ì ì¤í¨íììµëë¤."+e.status); 106 return false; 107 }, 108 success : function(result){ 109 if ( result ) { 110 rmvObj.remove(); 111 if ( fileBody.children().length == 0 ) { 112 fileBody.html("<tr><th class='center' colspan='2'>ë±ë¡ë íì¼ì´ ììµëë¤.</th></tr>"); 113 } 114 } else { 115 console.log (result); 116 alert("íì¼ ìì ì ì¤í¨íììµëë¤."); 117 } 118 } 119 }); 120 } 121 122} 123 124/* 물리ì íì¼ ìì */ 125function fileDeletePhysi(obj, fileNo, fileSeq) { 126 127 var rmvObj = $(obj).closest("tr"); 128 var fileBody = $(obj).closest("tbody"); 129 130 //[1]Validate 131 if( G_IsEmpty(fileNo) || G_IsEmpty(fileSeq) ){ 132 alert("íì¼ ìì ì ì¤í¨íììµëë¤."); 133 return false; 134 } 135 //[2]íì¼ìì ajax 136 if ( confirm("íì¼ì ìì íìê² ìµëê¹?") ) { 137 $.ajax({ 138 url : "/commonFile/filePhysicalDelete.do", 139 type : "POST", 140 dataType : "json", 141 traditional : true, 142 data : { 143 "fileNo" : fileNo, 144 "fileSeq": fileSeq 145 }, 146 error : function(e){ 147 //console.log(e); 148 alert("íì¼ ìì ì ì¤í¨íììµëë¤."+e.status); 149 return false; 150 }, 151 success : function(result){ 152 if ( result ) { 153 rmvObj.remove(); 154 if ( fileBody.children().length == 0 ) { 155 fileBody.html("<tr><th class='center' colspan='2'>ë±ë¡ë íì¼ì´ ììµëë¤.</th></tr>"); 156 } 157 } else { 158 console.log (result); 159 alert("íì¼ ìì ì ì¤í¨íììµëë¤."); 160 } 161 } 162 }); 163 } 164 165}
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.