157 lines
4.0 KiB
Plaintext
157 lines
4.0 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>
|
|
<style type="text/css">
|
|
#uploadedFileArea, #specAttachFileList, #reqAttachFileList, #resAttachFileList {
|
|
height: auto;
|
|
}
|
|
</style>
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function(){
|
|
fnc_setFileDropZone("dropzone", "${commentsMap.OBJID}", "CONTENTS_ATTACH_CODE", "댓글 첨부파일", "fn_fileCallback",false);
|
|
|
|
//파일을 불러옴
|
|
fn_fileCallback();
|
|
|
|
});
|
|
|
|
//게시물 닫기
|
|
function closeComentsPopUp(){
|
|
window.close();
|
|
}
|
|
|
|
|
|
//댓글 저장 기능
|
|
function saveComment(){
|
|
if(confirm("댓글을 저장하시겠습니까?")){
|
|
$.ajax({
|
|
type : "POST",
|
|
url : "/notice/saveContents.do",
|
|
data:$("#form1").serialize(),
|
|
dataType:"JSON",
|
|
async:false,
|
|
error: function(jqxhr, status, error){
|
|
},
|
|
success: function(data){
|
|
|
|
Swal.fire(data.msg);
|
|
|
|
if(data.result){
|
|
opener.document.form1.action="/notice/openNoticeFormPopUp.do";
|
|
opener.document.form1.submit();
|
|
|
|
self.close();
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//게시물 닫기
|
|
function closed(){
|
|
opener.fn_search();
|
|
self.close();
|
|
}
|
|
|
|
function fn_fileCallback(){
|
|
|
|
//첨부파일 목록을 새로 불러들임.
|
|
$("#uploadedFileArea").empty();
|
|
|
|
$.ajax({
|
|
url:"/common/getFileList.do",
|
|
type:"POST",
|
|
data:{"targetObjId":"${commentsMap.OBJID}", "docType":"CONTENTS_ATTACH_CODE"},
|
|
dataType:"json",
|
|
async:true,
|
|
success:function(data){
|
|
|
|
if(0 < data.length){
|
|
//파일드롭다운 영역 hide
|
|
//첨부파일 목록 영역 show
|
|
$("#specAttachFileList").show();
|
|
|
|
$.each(data, function(i){
|
|
var appendText = "";
|
|
appendText+= "<tr>";
|
|
appendText+= " <td><a href='javascript:fnc_downloadFile(\""+data[i].OBJID+"\")'>"+data[i].REAL_FILE_NAME+"</a></td>";
|
|
appendText+= " <td><div class='delete_btn' onclick='javascript:fnc_deleteFile(\""+data[i].OBJID+"\", \"fn_fileCallback\")'></div></td>";
|
|
appendText+= "</tr>";
|
|
|
|
$("#uploadedFileArea").append(appendText);
|
|
});
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
|
|
</script>
|
|
|
|
</head>
|
|
<body class="backcolor_light_blue">
|
|
|
|
<form name="form1" id="form1" method="post" >
|
|
<input type="hidden" name="OBJID" id="OBJID" value="${commentsMap.OBJID}">
|
|
<input type="hidden" name="POST_OBJID" id="POST_OBJID" value="${commentsMap.POST_OBJID}">
|
|
<section>
|
|
<div class="plm_menu_name">
|
|
<h2>
|
|
<span>댓글 작성</span>
|
|
</h2>
|
|
</div>
|
|
<div id="businessPopupFormWrap">
|
|
<table class="pmsPopupForm">
|
|
<colgroup>
|
|
<col width="12%">
|
|
<col width="75%">
|
|
<col width="10%">
|
|
<col width="3%">
|
|
</colgroup>
|
|
<tr>
|
|
<td class="input_title"><label for="">내용</label></td>
|
|
<td colspan="3">
|
|
<textarea class="" style="width:100%;" rows="10" name="CONTENTS" id="CONTENTS" placeholder="내용을 입력하세요.">${commentsMap.CONTENTS}</textarea>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title" rowspan="2">
|
|
<label for="">첨부파일</label>
|
|
</td>
|
|
<td colspan="3">
|
|
<div id="dropzone" class="dropzone" style="width:98.8%;">Drag & Drop Files Here</div>
|
|
<div id="specAttachFileList" style="height:50px;">
|
|
<table id="uploadedFileAreaTable" class="spec_data_in_table">
|
|
<colgroup>
|
|
<col width="*">
|
|
<col width="3%">
|
|
</colgroup>
|
|
<tbody id="uploadedFileArea">
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<div class="btnCenterWrap">
|
|
<center class="center_btns_wrap">
|
|
<input type="button" id="saveBtn" value="저장" class="plm_btns" onclick="javascript:saveComment();">
|
|
<input type="button" id="closeBtn" value="닫기" class="plm_btns" onclick="javascript:closeComentsPopUp();">
|
|
</center>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</form>
|
|
</body>
|
|
</html> |