74 lines
1.8 KiB
Plaintext
74 lines
1.8 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<%@ page import="com.pms.common.utils.*"%>
|
|
<%@ page import="java.util.*" %>
|
|
<%@include file= "/init.jsp" %>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title><%=Constants.SYSTEM_NAME%></title>
|
|
<script>
|
|
$(function () {
|
|
fnc_setFileDropZone("dropzone", "111", "TEST_DOC", "테스트 첨부파일", "fn_fileCallback");
|
|
});
|
|
|
|
function fn_fileCallback(){
|
|
var params = new FormData();
|
|
params.append("targetObjId", "111");
|
|
params.append("docType", "TEST_DOC");
|
|
|
|
$.ajax({
|
|
url:"/common/getFileList.do",
|
|
type:"POST",
|
|
data:{"targetObjId":"111", "docType":"TEST_DOC"},
|
|
dataType:"json",
|
|
async:true,
|
|
success:function(data){
|
|
$(".dataTr").remove();
|
|
$.each(data, function(i){
|
|
//Swal.fire("File Name : "+data[i].REAL_FILE_NAME);
|
|
|
|
var s = "<tr class='dataTr'>";
|
|
s += "<td><a href='javascript:fnc_downloadFile(\""+data[i].OBJID+"\")'>"+data[i].REAL_FILE_NAME+"</a></td>";
|
|
s += "<td>"+data[i].FILE_SIZE+"</td>";
|
|
s += "<td><a href='javascript:fnc_deleteFile(\""+data[i].OBJID+"\", \"fn_fileCallback\")'>"+data[i].OBJID+"</a></td>";
|
|
s += "</tr>";
|
|
$("#fileListTable").append(s);
|
|
});
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
</script>
|
|
<style>
|
|
#dropzone
|
|
{
|
|
border:2px dotted #3292A2;
|
|
width:90%;
|
|
height:50px;
|
|
color:#92AAB0;
|
|
text-align:center;
|
|
font-size:24px;
|
|
padding-top:12px;
|
|
margin-top:10px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<form name="form1" action="" method="post">
|
|
<center>
|
|
<div id="dropzone">Drag & Drop Files Here</div>
|
|
<table id="fileListTable" border="1">
|
|
<tr align="center">
|
|
<td><b>File Name</b></td>
|
|
<td><b>File Size</b></td>
|
|
<td><b>Delete</b></td>
|
|
</tr>
|
|
</table>
|
|
</center>
|
|
</form>
|
|
</body>
|
|
</html> |