343 lines
13 KiB
Plaintext
343 lines
13 KiB
Plaintext
<%--
|
|
Class Name : (사용자)EgovNoticeRegist.jsp
|
|
Description : 게시물 생성 화면
|
|
Modification Information
|
|
|
|
수정일 수정자 수정내용
|
|
------- -------- ---------------------------
|
|
2009.03.24 이삼섭 최초 생성
|
|
2011.08.31 JJY 경량환경 버전 생성
|
|
|
|
author : 공통서비스 개발팀 이삼섭
|
|
since : 2009.03.24
|
|
--%>
|
|
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
|
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
|
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
|
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
|
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
|
|
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator"%>
|
|
<%
|
|
pageContext.setAttribute("crlf", "\r\n");
|
|
%>
|
|
<head>
|
|
<!-- 첨부파일용 CSS -->
|
|
<script type="text/javascript" src="<c:url value="/validator.do"/>"></script>
|
|
<script src="/js/ncms_common.js"></script>
|
|
<validator:javascript formName="board" staticJavascript="false" xhtml="true" cdata="false" />
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){
|
|
$(function () {
|
|
|
|
$('#filebutton').click(function (e) {
|
|
|
|
e.preventDefault();
|
|
|
|
$('#file_temp').click();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$(".lnb").hide();// 메뉴 색상 숨기기
|
|
});
|
|
|
|
function fn_egov_regist_notice() {
|
|
if (!validateBoard(document.board)) return;
|
|
|
|
if (confirm('<spring:message code="common.regist.msg" />')) {
|
|
goWebSave();
|
|
}
|
|
}
|
|
|
|
function fn_egov_select_noticeList(){ //글쓰기는 묻고 답하기만 있음
|
|
document.searchForm.action = "<c:url value='/web/cop/bbsWeb/selectBoardList.do?bbsId=BBSMSTR_000000000654'/>";
|
|
document.searchForm.submit();
|
|
}
|
|
|
|
function changeValue(obj){
|
|
$('#atFileBasicWrite').val(obj.value);
|
|
}
|
|
|
|
|
|
function moveFunc(type){
|
|
if(type == "step02"){
|
|
location.href="/web/main/mainPage.do";
|
|
//$("#moveFrm").attr("action", "/web/cop/bbsWeb/selectBoardErrorList.do?bbsId=BBSMSTR_000000000010");
|
|
//$("#moveFrm").submit();
|
|
}else if(type == "step03"){
|
|
|
|
if($("#nttSj").val() == ""){
|
|
alert("오류제목을 입력해 주세요");
|
|
$("#nttSj").focus();
|
|
return false;
|
|
}
|
|
|
|
if($("#nttCn").val() == ""){
|
|
alert("오류내용을 입력해 주세요");
|
|
return false;
|
|
}
|
|
|
|
//$("#writeFrm").attr("action", "/web/user/lawCounsel/${siteIdx}/02/${siteMenuIdx}/lawWrite.do");
|
|
//$("#writeFrm").submit();
|
|
|
|
goSave();
|
|
|
|
}else if(type == "list"){
|
|
$("#examNo").remove();
|
|
$("#fileFuncType").remove();
|
|
$("#moveFrm").attr("action", "/gtm/case/exam/${boardIdx}/list.do");
|
|
$("#moveFrm").attr("action", "/gtm/case/exam/${boardIdx}/list.do");
|
|
$("#moveFrm").attr("action", "/web/user/exam/case/${boardIdx}/${siteMenuIdx}/examList.do");
|
|
$("#moveFrm").attr("action", "/web/user/exam/case/${boardIdx}/${siteMenuIdx}/exam${boardIdx}List.do");
|
|
$("#moveFrm").submit();
|
|
}else if(type == "del"){
|
|
if(confirm("정말 삭제 하시겠습니까?")){
|
|
$("#moveFrm").attr("action", "/gtm/case/exam/${boardIdx}/bbsDel.do");
|
|
$("#moveFrm").submit();
|
|
}
|
|
}
|
|
}
|
|
|
|
/* 글 저장 function */
|
|
function goSave(method_parm ){ //method_parm :관리자로그 메소드에서 사용.(파일업로드 부분 공통으로 사용하여, 페이지 구분을 위해)
|
|
if($('#content').length > 0){ //팝업존에서 타이틀 무조건 체크
|
|
if('' == $('#content').val()){
|
|
alert("이미지 등록시 타이틀은 필수입니다.");
|
|
return false;
|
|
}
|
|
}
|
|
|
|
/*if(undefined !=$("input[name=limitcount]").val() && ""!=$("input[name=limitcount]").val() ){
|
|
if($('#atchFileNece').length > 0 ){
|
|
if($('#tbody_fiielist').find('tr').length == 0){
|
|
alert("첨부파일을 추가해 주십시오");
|
|
return false;
|
|
}
|
|
}
|
|
|
|
}*/
|
|
|
|
var msg;
|
|
msg = "해당 첨부파일을 수정하시겠습니까?";
|
|
var data = new FormData(document.writeForm == undefined ? document.board : document.writeForm);
|
|
_fileForm2.forEach(function(obj, idx) {
|
|
if (obj) data.append("file"+idx, obj.fileObj);
|
|
});
|
|
|
|
|
|
var url = "";
|
|
url = "/web/cop/bbs/insertBoardArticleAjax.do";
|
|
/*
|
|
if($("#pageType").val() == "insert"){//게시판저장
|
|
url = "/cop/bbs/insertBoardArticleAjax.do";
|
|
}else if($("#pageType").val() == "replay"){ //게시판 답변
|
|
url = "/cop/bbs/replyBoardArticleAjax.do";
|
|
}else{
|
|
url = document.writeForm == undefined ? "/cop/bbs/updateBoardArticleAjax.do" : "/uss/ion/fms/FmsFileInsertAjax.do?logParam="+method_parm;
|
|
}
|
|
*/
|
|
|
|
$.ajax({
|
|
type: "POST",
|
|
enctype: 'multipart/form-data',
|
|
url: url,
|
|
data: data,
|
|
dataType:'json',
|
|
async: false,
|
|
processData: false,
|
|
contentType: false,
|
|
cache: false,
|
|
//timeout: 600000,
|
|
success: function (returnData, status) {
|
|
if(status == 'success'){ // status 확인 필요한가. 석세스 안뜨면 에러 가지 않나
|
|
if("fail"==returnData.result){
|
|
alert(returnData.message);
|
|
return;
|
|
}
|
|
alert("저장 되었습니다.11");
|
|
moveFunc('step02');
|
|
//goList();
|
|
} else if(status== 'fail'){
|
|
alert("저장에 실패하였습니다. 22!!");
|
|
}
|
|
},
|
|
error: function (e) { alert("저장에 실패하였습니다."); console.log("ERROR : ", e); }
|
|
});
|
|
}
|
|
</script>
|
|
|
|
<form action="" method="get" id="moveFrm">
|
|
<input type="hidden" name="examNo" id="examNo" value="${param.examNo}">
|
|
<input type="hidden" name="searchType" value="${param.searchType }">
|
|
<input type="hidden" name="searchTilte" value="${param.searchTilte }">
|
|
<input type="hidden" name="page" id="page" value="${param.page }">
|
|
<input type="hidden" name="fileFuncType" id="fileFuncType" value="exam">
|
|
</form>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
<!-- 내용s -->
|
|
<form:form commandName="searchForm" name="searchForm" method="get" action="">
|
|
<input type="hidden" name="pageIndex" value="<c:out value='${searchVO.pageIndex}'/>"/>
|
|
<input type="hidden" name="searchCnd" value="<c:out value='${searchVO.searchCnd}'/>"/>
|
|
<input type="hidden" name="searchWrd" value="<c:out value='${searchVO.searchWrd}'/>"/>
|
|
<input type="hidden" name="bbsId" value="<c:out value='${searchVO.bbsId}'/>" />
|
|
</form:form>
|
|
<form:form commandName="board" name="board" method="post" enctype="multipart/form-data">
|
|
<input type="hidden" name="pageIndex" value="<c:out value='${searchVO.pageIndex}'/>" />
|
|
<input type="hidden" name="searchCnd" value="<c:out value='${searchVO.searchCnd}'/>"/>
|
|
<input type="hidden" name="searchWrd" value="<c:out value='${searchVO.searchWrd}'/>"/>
|
|
<input type="hidden" name="previewImgs" value="" />
|
|
|
|
<input type="hidden" name="checkProhibitCn" value="" />
|
|
<input type="hidden" name="mblDn" value="<c:out value='${searchVO.mblDn}'/>" />
|
|
<input type="hidden" name="ntcrNm" value="<c:out value='${board.ntcrNm}'/>" />
|
|
<input type="hidden" name="pageType" id="pageType" value="insert" />
|
|
<input type="hidden" name="limitcount" value="<c:out value='${posAtchFileNum}'/>" />
|
|
<input type="hidden" name="atchFileNece" id="atchFileNece" value="N" /> <!-- 첨부파일 필수체크 -->
|
|
<input type="hidden" name="bbsId" id="bbsId" value="<c:out value='${brdMstrVO.bbsId}'/>" />
|
|
<input type="hidden" name="ntcrId" id="ntcrId" value="<c:out value='${board.ntcrId}'/>" />
|
|
|
|
|
|
<div class="sub_content counsel_content">
|
|
|
|
<!-- page_location -->
|
|
<ul class="page_location">
|
|
<li><i class="icon home"></i></li>
|
|
<li>게시판</li>
|
|
<li>${brdMstrVO.bbsNm}</li>
|
|
</ul>
|
|
<!-- //page_location -->
|
|
|
|
|
|
|
|
|
|
|
|
<div class="table_type_rows">
|
|
<table>
|
|
<caption><c:out value='${brdMstrVO.menuNm}' /> 등록</caption>
|
|
<colgroup>
|
|
<col style="width: 250px;">
|
|
<col style="width: auto;">
|
|
</colgroup>
|
|
<tbody>
|
|
|
|
<tr>
|
|
<th>
|
|
<p class="required_text">*<span>필수입력</span></p>오류제목
|
|
</th>
|
|
<td colspan="3">
|
|
<input type="text" class="input_text w100per" id="nttSj" name="nttSj">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>오류내용</th>
|
|
<td colspan="3">
|
|
<div class="length_wrap">
|
|
<textarea name="nttCn" id="nttCn" class="input_text" placeholder="ex) 연락처를 남겨주시면 연락드리겠습니다."></textarea>
|
|
<p class="length"><span class="color_red">0</span>/ 1300자</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<th class="req_text">
|
|
<p>첨부파일</p>
|
|
</th>
|
|
<td class="upload_area">
|
|
<!-- <input type="text" id="fileNm" size="30" class="file_input" readonly> --><!-- <button type="button" class="btnType01 btn_add_file">파일 첨부하기</button> -->
|
|
<input type="file" id="file_temp" name="file_temp" class="uploadFile" style="display:none"/>
|
|
<button type="button" id="filebutton" class="btn btn_text btn_30 blue_border btnType01 btn_add_file">파일 첨부하기</button>
|
|
<div class="file_wrap file_upload_box no_img_box" style="width:700px;">
|
|
<table class="tbType02">
|
|
<caption>첨부파일 리스트 : 파일명, 종류, 크기, 삭제</caption>
|
|
<colgroup>
|
|
<col style="width: 60%;">
|
|
<col style="width: auto;">
|
|
<col style="width: 20%;">
|
|
<col style="width: 10%;">
|
|
</colgroup>
|
|
<thead>
|
|
<!-- <th>
|
|
<input type="checkbox" id="all_check"><label for="all_check"></label>
|
|
</th> -->
|
|
<th style="text-align:center;">파일 명</th>
|
|
<th style="text-align:center;">종류</th>
|
|
<th style="text-align:center;">크기</th>
|
|
<th style="text-align:center;">삭제</th>
|
|
</thead>
|
|
<tbody class="tb_file_before">
|
|
<tr>
|
|
<td colspan="4">
|
|
<p>첨부하실 파일을 <span>마우스로 끌어서</span> 넣어주세요.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="file_wrap fileAfter file_list_div" style="width:700px;">
|
|
<table class="tbType02">
|
|
<caption>첨부파일 리스트 : 파일명, 종류, 크기, 삭제</caption>
|
|
<colgroup>
|
|
<col style="width: 60%">
|
|
<col style="width: 10%">
|
|
<col style="width: 20%">
|
|
<col style="width: 10%">
|
|
</colgroup>
|
|
<thead>
|
|
<!-- <th>
|
|
<input type="checkbox" id="all_check"><label for="all_check"></label>
|
|
</th> -->
|
|
<th style="text-align:center;">파일 명</th>
|
|
<th style="text-align:center;">종류</th>
|
|
<th style="text-align:center;">크기</th>
|
|
<th style="text-align:center;">삭제</th>
|
|
</thead>
|
|
<tbody id="tbody_fiielist" class="tb_file_after">
|
|
<c:forEach var="fileList" items="${fileList}" varStatus="status">
|
|
<tr class="item_<c:out value='${fileList.atchFileId}' />_<c:out value='${fileList.fileSn}' /> uploaded_obj">
|
|
<input type="hidden" name="fileSize" class="item_file_size" value="${fileList.fileSize}">
|
|
<td class="td_filename">
|
|
<!-- <img src="/direct/img/upload_hwp_img.png" alt="" /> -->
|
|
<span class="file_name_text"><c:out value='${fileList.orignlFileNm}' /></span>
|
|
</td>
|
|
<td class="td_filesort">
|
|
<span class="file_filesort_text" value="<c:out value="${fileList.fileExtsn}"/>"><c:out value="${fileList.fileExtsn}"/></span>
|
|
</td>
|
|
<td class="td_filesize">
|
|
<span class="file_size_text" value="<c:out value="${fileList.fileMg}"/>"><c:out value="${fileList.fileMg}"/></span>
|
|
</td>
|
|
<td>
|
|
<button type="button" class="btn btn_text btn_30 red_border btn_del" onclick="delAtchFile('<c:out value='${fileList.atchFileId}' />', '<c:out value='${fileList.fileSn}' />'); return false;" title="파일삭제">삭제</button>
|
|
</td>
|
|
</tr>
|
|
</c:forEach>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<p class="cf_text">※ 위 신청 내용에 따라 상담센터에서 유선으로 일정을 문의드릴 수 있으며, 이후 확정된 상담일자는 마이페이지 메뉴에서 확인하시기 바랍니다.</p>
|
|
|
|
<div class="btn_wrap right">
|
|
<button type="button" class="btn btn_text btn_45 darkblue_fill" onclick="javascript:moveFunc('step03')">오류등록</button>
|
|
<button type="button" class="btn btn_text btn_45 darkgray_border" onclick="javascript:moveFunc('step02')">취소</button>
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<!-- //cont -->
|
|
</form:form>
|
|
|
|
</body>
|