Merge remote-tracking branch 'origin/master'

This commit is contained in:
JSYOO 2021-11-12 18:37:24 +09:00
commit 15c8bbc80e
24 changed files with 1035 additions and 2476 deletions

View File

@ -17,6 +17,9 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import nlib.bbs.service.ArticleVO;
import nlib.bbs.service.BoardService;
import nlib.bbs.service.QnaService;
import nlib.cmm.NlibCommonController;
import nlib.cmm.service.CodeService;
import nlib.cmm.service.MainService;
@ -65,6 +68,12 @@ public class MainController extends NlibCommonController {
@Resource(name = "mainService")
private MainService mainService;
@Resource(name = "ancmntService")
private BoardService ancmntService;
@Resource(name = "qnaService")
private QnaService qnaService;
@RequestMapping( {"/index.do"} )
public String setContent(
HttpServletRequest request,
@ -78,6 +87,10 @@ public class MainController extends NlibCommonController {
String mngOrgCd = getCurCouncilCd(request);
//------------------------------------------------
// 추천 자료 관련
//------------------------------------------------
// 추천키워드
List<Map<String, String>> listKeywords = mainService.listKeywords(mngOrgCd);
model.addAttribute("listKeywords", listKeywords);
@ -107,10 +120,27 @@ public class MainController extends NlibCommonController {
model.addAttribute("listPops", listPops);
model.addAttribute("listTypeDivCodes", listTypeDivCodes);
// 온라인자료관
model.addAttribute("listOnline", mainService.listOnline(mngOrgCd));
//------------------------------------------------
// 게시판관련
//------------------------------------------------
ArticleVO searchArticleVO = new ArticleVO();
searchArticleVO.setPageIndex(1);
searchArticleVO.setPageSize(3);
searchArticleVO.setMngOrgCd(getCurCouncilCd(request));
// 공지사항
List<ArticleVO> listAncmnt = ancmntService.listArticles(searchArticleVO);
model.addAttribute("listAncmnt", listAncmnt);
// Q&A
String mbInfoId = getMbInfoId(request);
searchArticleVO.setLoginedMbInfoId(mbInfoId);
List<ArticleVO> listQna = qnaService.listArticles(searchArticleVO);
model.addAttribute("listQna", listQna);
return "nlib/cmm/home";
}

View File

@ -47,7 +47,7 @@ public interface ReadService {
* @param mngOrgCd
* @return
*/
public List<CollectionVO> insertReadItems(List<CollectionVO> list, String mbInfoId, CollectionVO readVO) throws Exception;
public List<CollectionVO> insertReadItems(List<CollectionVO> list, String mbInfoId, CollectionVO readVO, boolean fromCart) throws Exception;
/**

View File

@ -27,6 +27,9 @@ public class ReadServiceImpl implements ReadService {
@Resource(name="readDAO")
private ReadDAO readDAO;
@Resource(name="cartDAO")
private CartDAO cartDAO;
@Resource(name="informService")
private InformService informService;
@ -53,7 +56,7 @@ public class ReadServiceImpl implements ReadService {
* @param mngOrgCd
* @return
*/
public List<CollectionVO> insertReadItems(List<CollectionVO> list, String mbInfoId, CollectionVO readVO) throws Exception {
public List<CollectionVO> insertReadItems(List<CollectionVO> list, String mbInfoId, CollectionVO readVO, boolean fromCart) throws Exception {
if(list == null || list.size() < 1) {
log.error("insertReadItems > 열람 신청 대상 목록이 없습니다.");
@ -130,9 +133,26 @@ public class ReadServiceImpl implements ReadService {
reqVO.putInfoItem("jsonMasterId", jsonMasterId);
resVO = dataApi.request(reqVO);
CollectionVO rVO = null;
cVO.setResult(resVO.getResultCode(), resVO.getResultMessage());
// 카트에서 신청하여 성공한 경우, 카트 처리완료 변경 작업
if(resVO != null && resVO.getResultCode() != null && resVO.getResultCode().startsWith("S") && fromCart) {
CollectionVO vVO = null;
for(int i=0; i<list.size(); i++) {
vVO = list.get(i);
if(StringUtil.isEmpty(vVO.getMasterId())) continue;
// 카트에서의 처리 여부 업데이트
if(fromCart) {
vVO.setMbInfoId(mbInfoId);
vVO.setCartProcDivCd("V"); // 방문열람신청완료
vVO.setModId(mbInfoId);
int retUpdateProc = cartDAO.changeCartProcDivCd(vVO);
log.debug("insertReadItems > changeCartProcDivCd=" + retUpdateProc);
}
}
}
readVO.setResultCode(resVO.getResultCode());
readVO.setResultMessage(resVO.getResultMessage());
@ -140,8 +160,8 @@ public class ReadServiceImpl implements ReadService {
if(StringUtil.startsWithIgnoreCase(resVO.getResultCode(), "S")) {
readVO.setHopeReqPridDtmFrom(StringUtil.formatDateStr(resVO.getInfoItem("hopeReqPridDtmFrom", ""),""));
readVO.setHopeReqPridDtmTo(StringUtil.formatDateStr(resVO.getInfoItem("hopeReqPridDtmTo", ""),""));
readVO.setRsrvId(resVO.getInfoItem("reqId", "")); // 열람신청번호
readVO.setRsrvId(resVO.getInfoItem("reqDd", "")); // 열람신청일자
readVO.setReqId(resVO.getInfoItem("reqId", "")); // 열람신청번호
readVO.setReqDd(resVO.getInfoItem("reqDd", "")); // 열람신청일자
readVO.setSelItems(resVO.getInfoItem("masterId")); // 자료번호
} else {
readVO.setRsrvId(null); // 열람신청번호

View File

@ -149,7 +149,7 @@ public class ReadController extends NlibCommonController {
List<CollectionVO> list = collectionService.makeListOfCollectionVO(selItems);
list = readService.insertReadItems(list, mbInfoId, readVO);
list = readService.insertReadItems(list, mbInfoId, readVO, fromCart);
list = collectionService.setDetailInfoForList(list, mbInfoId, NlibProperty.getString("thumbnail.image.url.small"));
model.addAttribute("readVO", readVO);
@ -267,15 +267,15 @@ public class ReadController extends NlibCommonController {
resultMessage = "로그인하신 후, 이용바랍니다.";
}
if(StringUtil.isEmpty(searchVO.getMngOrgCd())) {
if(resultMessage != null && StringUtil.isEmpty(searchVO.getMngOrgCd())) {
resultMessage = "문화원정보가 부적합합니다. 다시 요청하여 주시기 바랍니다.";
}
if(StringUtil.isEmpty(searchVO.getReqId())) {
if(resultMessage != null && StringUtil.isEmpty(searchVO.getReqId())) {
resultMessage = "취소할 방문열람신청번호 정보가 부적합합니다. 다시 요청하여 주시기 바랍니다.";
}
if(StringUtil.isEmpty(searchVO.getMasterId())) {
if(resultMessage != null && StringUtil.isEmpty(searchVO.getMasterId())) {
resultMessage = "취소할 자료정보 정보가 부적합합니다. 다시 요청하여 주시기 바랍니다.";
}

View File

@ -273,11 +273,9 @@ public class StringUtil extends StringUtils {
if(isEmpty(dateStr)) return defaultStr;
String tmpDateStr = dateStr.trim();
switch(tmpDateStr.length()) {
case 4 : return dateStr; // 연도만 있는 경우
case 6 : return tmpDateStr.substring(0, 4) + "-" + tmpDateStr.substring(4); // YYYY-MM
case 8 : return tmpDateStr.substring(0, 4) + "-" + tmpDateStr.substring(4, 6) + "-" + tmpDateStr.substring(6); // YYYY-MM-DD
}
if(4 <= tmpDateStr.length() && tmpDateStr.length() < 6) return tmpDateStr.substring(0, 4); // 연도만 있는 경우
else if(6 <= tmpDateStr.length() && tmpDateStr.length() < 8) return tmpDateStr.substring(0, 4) + "-" + tmpDateStr.substring(4, 6); // YYYY-MM
else if(8 <= tmpDateStr.length()) return tmpDateStr.substring(0, 4) + "-" + tmpDateStr.substring(4, 6) + "-" + tmpDateStr.substring(6, 8); // YYYY-MM-DD
return defaultStr;
}

View File

@ -21,7 +21,6 @@
AND RM.REG_STATUS = 'REG_OK'
AND RM.USE_FLAG = 'Y'
AND RM.OPER_READ_RANGE_CD IN ('01','02')
AND IFNULL(RM.BOOKCASE_ID, '') != '' /* 서가배치자료 */
) T
GROUP BY T.KEY_NAME
ORDER BY CNT DESC, T.KEY_NAME
@ -137,35 +136,31 @@
, M.DTLS_TYPE_DIV_CD
, C2.S_CODE_NM DTLS_TYPE_DIV_NM
, M.SUBJECT_CODE
, CONCAT(
NVL((
SELECT CONCAT(CLSF_NM, ' > ')
FROM CT_CLSF
WHERE CLSF_ID = (
SELECT UP_CLSF_ID FROM CT_CLSF
WHERE CLSF_ID = CAST(M.SUBJECT_CODE AS CHAR(35)) )
AND UP_CLSF_ID = '2') , '')
, (SELECT CLSF_NM FROM CT_CLSF WHERE CLSF_ID = CAST(M.SUBJECT_CODE AS CHAR(35)))
) AS SUBJECT_NM
, ( SELECT CLSF_NM
FROM CT_CLSF
WHERE CLSF_ID = (
SELECT UP_CLSF_ID FROM CT_CLSF
WHERE CLSF_ID = CAST(M.SUBJECT_CODE AS CHAR(35)) )
AND UP_CLSF_ID = '2') AS SUBJECT_NM_UP
, (SELECT CLSF_NM FROM CT_CLSF WHERE CLSF_ID = CAST(M.SUBJECT_CODE AS CHAR(35))) AS SUBJECT_NM
, M.MOD_DD
, M.ORG_NM
, M.CREAT_YYYY
, M.RPRS_THUMB_URL
, IFNULL(M.M_INTERFACE_ID, IFNULL(M.INTERFACE_ID, '')) AS INTERFACE_ID
, IFNULL(M.M_INTERFACE_ID, '') AS INTERFACE_ID
FROM RG_MASTER M
LEFT OUTER JOIN SM_CODE_S C1 ON M.TYPE_DIV_CD = C1.S_CODE_ID AND C1.L_CODE_ID = 'MASTER_TYPE_DIV_CD'
LEFT OUTER JOIN SM_CODE_S C2 ON M.DTLS_TYPE_DIV_CD = C2.S_CODE_ID AND C2.L_CODE_ID = 'DTLS_TYPE_DIV_CD'
WHERE M.MNG_ORG_CD = #{mngOrgCd}
AND M.OPEN_DIV_CD = '1' /* 공개구분 : 공개 */
AND M.REG_STATUS = 'REG_OK' /* 등록상태 : 등록완료 */
/* AND M.REG_STATUS = 'REG_OK' -- DDDDDDDDDDDDDDDDD 확인데이터 없어서 임시 주석 막음 */ /* 등록상태 : 등록완료 */
AND M.USE_FLAG = 'Y'
AND IFNULL(M.PE_STATUS, '') = '' /* 보존상태 */
AND M.DIGITAL_READ_YN = 'Y' /* 디지탈열람여부 */
/* AND IFNULL(M.RPRS_THUMB_URL, '') != '' */ /* 썸네일존재하는 건 */
AND IFNULL(M.M_INTERFACE_ID, IFNULL(M.INTERFACE_ID, '')) != ''/* IF존재하는 건 */
AND IFNULL(M.M_INTERFACE_ID, '') != ''/* IF존재하는 건 */
ORDER BY M.MOD_DD DESC
LIMIT 10
]]>
</select>
</mapper>

View File

@ -57,6 +57,7 @@
WHERE MB_INFO_ID = #{mbInfoId}
AND MASTER_ID = #{masterId}
AND DELETE_YN = 'N'
AND IFNULL(A.CART_PROC_DIV_CD, 'N') = 'N'
</select>
<insert id="insertCartItem" parameterType="CollectionVO">

View File

@ -85,9 +85,9 @@ list.paging.page.size = 10
#----------------------------------------
# \ucca8\ubd80\ud30c\uc77c \ucd5c\uc0c1\uc704 \uc704\uce58
# \ub85c\uceec LLLLLLLLLLLLLLL
fileupload.base.path = C:/iams/workspace/nlib/data/fileupload
#fileupload.base.path = C:/iams/workspace/nlib/data/fileupload
# \uac1c\ubc1c\uc11c\ubc84
#fileupload.base.path = /apps/tomcat/apache-tomcat-8.5.46_nlib/webapps/data/fileupload
fileupload.base.path = /apps/tomcat/apache-tomcat-8.5.46_nlib/webapps/data/fileupload
# \uc784\uc2dc \uc800\uc7a5 \uc704\uce58
fileupload.temp.subpath = /temp
@ -98,13 +98,13 @@ fileupload.bbs.ancmnt.subpath = /bbs/ancmnt
# \uba54\uc77c \uacbd\ub85c
# \ub85c\uceec LLLLLLLLLLLLLLL
mailing.sender.membership.signUpTemplate = C:/iams/workspace/nlib/src/main/webapp/WEB-INF/template/mail/signUp_mail_template.html
mailing.sender.membership.pwdTemplate = C:/iams/workspace/nlib/src/main/webapp/WEB-INF/template/mail/pwd_mail_template.html
mailing.sender.membership.certTemplate = C:/iams/workspace/nlib/src/main/webapp/WEB-INF/template/mail/cert_mail_template.html
#mailing.sender.membership.signUpTemplate = C:/iams/workspace/nlib/src/main/webapp/WEB-INF/template/mail/signUp_mail_template.html
#mailing.sender.membership.pwdTemplate = C:/iams/workspace/nlib/src/main/webapp/WEB-INF/template/mail/pwd_mail_template.html
#mailing.sender.membership.certTemplate = C:/iams/workspace/nlib/src/main/webapp/WEB-INF/template/mail/cert_mail_template.html
# \uac1c\ubc1c\uc11c\ubc84
#mailing.sender.membership.signUpTemplate = /apps/tomcat/apache-tomcat-8.5.46_nlib/webapps/nlib/WEB-INF/template/mail/signUp_mail_template.html
#mailing.sender.membership.pwdTemplate = /apps/tomcat/apache-tomcat-8.5.46_nlib/webapps/nlib/WEB-INF/template/mail/pwd_mail_template.html
#mailing.sender.membership.certTemplate = /apps/tomcat/apache-tomcat-8.5.46_nlib/webapps/nlib/WEB-INF/template/mail/cert_mail_template.html
mailing.sender.membership.signUpTemplate = /apps/tomcat/apache-tomcat-8.5.46_nlib/webapps/nlib/WEB-INF/template/mail/signUp_mail_template.html
mailing.sender.membership.pwdTemplate = /apps/tomcat/apache-tomcat-8.5.46_nlib/webapps/nlib/WEB-INF/template/mail/pwd_mail_template.html
mailing.sender.membership.certTemplate = /apps/tomcat/apache-tomcat-8.5.46_nlib/webapps/nlib/WEB-INF/template/mail/cert_mail_template.html
#\uba54\uc77c \uc774\ubbf8\uc9c0 \uacbd\ub85c
# \ub85c\uceec

View File

@ -1,83 +0,0 @@
<%
/**
* <pre>
* @Class Name : getSampleInfo.jsp
*
* @Description : RESTful API 호출 샘플
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 6. 15. KNKIM 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP KNKIM
* @since 2021. 6. 15.
* @version 1.0
*
*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ 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" %>
<c:set var="pageTitle">QRCode 회원정보</c:set>
<!DOCTYPE html>
<html>
<head>
<title>${pageTitle}</title>
<!-- W2UI -->
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/w2ui/w2ui-nlib.css" />
<script type="text/javascript" src="${pageContext.request.contextPath}/js/w2ui/w2ui-1.5.min.js"></script>
</head>
<body>
<!-- javascript warning tag -->
<noscript class="noScriptTitle"><spring:message code="common.noScriptTitle.msg" /></noscript>
<form:form commandName="reqInfo"
action="${pageContext.request.contextPath}/sample/barcode/getMemberQRCode.do" method="post"
target="_blank"
onSubmit="fncAuthorInsert(document.forms[0]); return false;">
<div id="grid" style="width: 100%; height: 250px;"></div>
</form:form>
<script type="text/javaScript" language="javascript">
$(function () {
$('#grid').w2grid({
name: 'grid',
header: 'List of Names',
columns: [
{ field: 'fname', text: '이름', size: '30%' },
{ field: 'lname', text: '성명', size: '30%' },
{ field: 'email', text: '이메일', size: '40%' },
{ field: 'sdate', text: '시작일자', size: '120px' }
],
records: [
{ recid: 1, fname: "Peter", lname: "Jeremia", email: 'peter@mail.com', sdate: '2/1/2010' },
{ recid: 2, fname: "Bruce", lname: "Wilkerson", email: 'bruce@mail.com', sdate: '6/1/2010' },
{ recid: 3, fname: "John", lname: "McAlister", email: 'john@mail.com', sdate: '1/16/2010' },
{ recid: 4, fname: "Ravi", lname: "Zacharies", email: 'ravi@mail.com', sdate: '3/13/2007' },
{ recid: 5, fname: "William", lname: "Dembski", email: 'will@mail.com', sdate: '9/30/2011' },
{ recid: 6, fname: "David", lname: "Peterson", email: 'david@mail.com', sdate: '4/5/2010' }
]
});
});
</script>
</body>
</html>

View File

@ -1,207 +0,0 @@
<%
/**
* <pre>
* @Class Name : insertQnAForm.jsp
*
* @Description : 묻고답하기 등록화면을 표출한다.
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 7. 13. KNKIM 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP KNKIM
* @since 2021. 7. 13.
* @version 1.0
*
*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ 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" %>
<c:set var="pageTitle">묻고답하기 - 등록</c:set>
<!DOCTYPE html>
<html>
<head>
<title>${pageTitle}</title>
<!-- File Upload : 시작 -->
<link rel="stylesheet" href="${pageContext.request.contextPath}/js/fileupload/dropzone.css" />
<link rel="stylesheet" href="${pageContext.request.contextPath}/js/fileupload/style.css" />
<script src="${pageContext.request.contextPath}/js/fileupload/dropzone.js"></script>
<!-- File Upload : 종료 -->
<script type="text/javaScript">
var myDropzone = null; <% // 파일드롭다운 객체 %>
var fileList = new Array(); <% // 업로드된 파일 정보 %>
var IN_PROC = false; <% // 현재 상태가 업로드처리중에 있는지 여부 %>
$(document).ready(function() {
// 파일업로드 객체 생성
myDropzone = new Dropzone("form#myDropzone", { url: "${pageContext.request.contextPath}/fileupload/uploadFilesAjax.do?subPathKey=fileupload.bbs.qna.subpath"});
// 각 파일별 업로드 성공시 호출됨 (1th called)
myDropzone.on("success", function(file, responseText) {
var jobj = JSON.parse(responseText);
console.log("file upload success : responseText = " + responseText);
console.log("fileUpDone count : " + fileList.length);
var idx = fileList.length;
fileList[idx] = {
"orignlFileNm" : jobj[0].orignlFileNm,
"streFileNm" : jobj[0].streFileNm,
"fileMg" : jobj[0].fileMg,
};
console.log("success : " + file.name + " -> " + "data > " + jobj[0].streFileNm);
//alert("file : status " + file.status);
});
// 각 파일별 업로드 처리 완료 시 호출됨 (2th called)
myDropzone.on("complete", function(file) {
console.log("개별 파일 처리 완료 > file = " + JSON.stringify(file));
});
// 모든 업로드 처리 완료 시 호출됨
myDropzone.on("queuecomplete", function() {
var targetCnt = this.getAcceptedFiles().length;
var uploadCnt = fileList.length;
if(uploadCnt > 0) {
$("#fileList").val(JSON.stringify(JSON.stringify(fileList)));
}
if(IN_PROC) {
if(targetCnt > 0 && targetCnt != uploadCnt) {
alert("총 " + targetCnt + "건의 첨부파일 중 " + uploadCnt + "건이 정상적으로 업로드 되었습니다. 게시물 등록을 계속 진행합니다.");
}
fn_insertSubmit();
}
});
});
// 목록으로 이동
function fn_list() {
$('#articleForm').removeAttr('onsubmit');
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/listQnAs.do");
$("#articleForm").submit();
}
// 등록 처리
function fn_insert() {
if(!validEmail($("#email").val())) {
alert("이메일 형식에 맞지 않습니다. 다시 확인하여 주시기 바랍니다.");
$("#email").focus();
return false;
}
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/insertQnA.do");
if(!confirm("저장하시겠습니까?")) return false;
IN_PROC = true;
// 파일 업로드 처리
if(myDropzone.getAcceptedFiles().length > 0) {
myDropzone.processQueue();
return false;
}
return true;
}
//등록 처리
function fn_insertSubmit() {
$('#articleForm').removeAttr('onsubmit');
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/insertQnA.do");
$("#articleForm").submit();
}
</script>
</head>
<body>
<h1>${pageTitle }</h1>
메시지 : <span style="color:red;">${message }</span>
<br />
<form name="articleForm" id="articleForm"
action="${pageContext.request.contextPath}/board/insertQnA.do"
method="post"
onsubmit="return fn_insert();">
<!-- HIDDEN 영역 : 시작 -->
<input type="text" name="pageIndex" id="pageIndex" title="페이지번호" value="${pageIndex}" readonly />
<input type="text" name="pageSize" id="pageSize" title="목록에 보여줄 글 개수" value="${pageSize}" readonly />
<input type="text" name="searchKeyword" id="searchKeyword" title="검색어" value="${searchKeyword}" readonly />
<input type="text" name="fileList" id="fileList" title="업로드파일목록" value="" readonly />
&nbsp;<br/>
&nbsp;<br/>
<table class="table_content" style="width:100% !important;">
<tr>
<th>제목</th>
<td><input type="text" name="title" id="title" title="제목" value="${title}" size="100" maxlength="200" required /></td>
</tr>
<tr>
<th>작성자</th>
<td><input type="text" name="regUserName" id="regUserName" title="작성자" value="${regUserName}" size="100" maxlength="200" required /></td>
</tr>
<tr>
<th>비밀번호</th>
<td><input type="text" name="articlePassword" id="articlePassword" title="비밀번호" value="${articlePassword}" size="100" maxlength="200" required /><br/>
* 비밀번호 : SHA-256 암호화 처리 후, DB에 저장되며, 웹 화면에 표출될 때는 Aria로 AuthKey를 Salt값으로 하여 재암호화처리하고 BASE64로 다시한번 인코딩하여 표출함
</td>
</tr>
<tr>
<th>이메일</th>
<td><input type="email" name="email" id="email" title="이메일" value="${email}" size="100" maxlength="200" required /></td>
</tr>
<tr>
<th>질문내용</th>
<td><textarea name="contentQeust" id="contentQeust" cols="80" rows="10" required >${contentQeust}</textarea></td>
</tr>
</table>
<br/>
<input type="button" name="btnCancel" id="btnCancel" title="취소버튼" class="float" value="취소"
onclick="fn_list()" />
<input type="submit" name="btnSave" id="btnSave" title="저장버튼" class="float" value="저장" />
</form>
&nbsp;<br/>
&nbsp;<br/>
&nbsp;<br/>
<div id="dropzone">
<form id="myDropzone" name="myDropzone"
action="${pageContext.request.contextPath}/fileupload/uploadFile.do"
class="dropzone needsclick" >
<div class="dz-message needsclick">
<button type="button" class="dz-button">Drop files here or click to select files.</button><br />
<span class="note needsclick">이곳에 파일을 끌어다 놓거나, 클릭하여 올릴 파일을 선택하세요.</span>
</div>
</form>
</div>
</body>
</html>

View File

@ -1,253 +0,0 @@
<%
/**
* <pre>
* @Class Name : listFAQs.jsp
*
* @Description : FAQ 목록 화면
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 8. 3. KNKIM 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP KNKIM
* @since 2021. 8. 3.
* @version 1.0
*
*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ 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" %>
<c:set var="pageTitle">FAQ</c:set>
<!DOCTYPE html>
<html lang="ko">
<head>
<title>${pageTitle}</title>
<!-- GRID -->
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/js/jsgrid/nlib-jsgrid.css" />
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/js/jsgrid/nlib-jsgrid-theme.css" />
<script src="${pageContext.request.contextPath}/js/jsgrid/nlib-jsgrid.js"></script>
<script type="text/javaScript" language="javascript">
$( document ).ready(function() {
//=======================================================
// 그리드 생성 환경설정
//=======================================================
$("#jsGrid").jsGrid({
pageSize : $("#pageSize").val(),
scrollOffset:0,
controller: {
loadData: function (filter) { // 그리드에 데이터를 가져올 때 실팽되는 함수
var data = $.Deferred();
//======================================
// 요청 정보 구성 : 시작 (각 요청에 맞게 조정)
//======================================
var reqUrl = "${pageContext.request.contextPath}/board/listFAQsAjax.do";
var faqType = document.articleForm.faqType.value;
var searchKeyword = document.articleForm.searchKeyword.value;
var pageIndex = ( filter && filter.pageIndex ? filter.pageIndex : $("#pageIndex").val());
var pageSize = ( filter && filter.pageSize ? filter.pageSize : $("#pageSize").val());
$("#pageIndex").val(pageIndex);
var inputData = {
"searchKeyword" : searchKeyword
, "pageIndex" : pageIndex
, "pageSize": pageSize
, "faqType": faqType};
//--------------------------------------
// 요청 처리
//--------------------------------------
$.ajax({
type: "post",
contentType: "application/json; charset=utf-8",
url: reqUrl,
dataType: "json",
data: JSON.stringify(inputData),
}).done(function(response){
<%
// 그리드 데이터 예시 :
// (1) 페이징 클라이언트에서 수행하는 경우(pageloading = false) : [{ "articleNo": 1, "articleType": "01" }, { "articleNo": 2, "articleType": "02" }]
// (2) 페이징 서버에서 수행하는 경우(pageloading = true) : {data: [{...}], itemsCount: 255}
%>
data.resolve(JSON.parse(response));
});
return data.promise();
} // loadData
},
rowClick: function(args) { // 행 클릭 시, 실행되는 이벤트 함수
// 클릭된 행의 자료 객체
var getData = args.item;
// 추출할 컬럼의 데이터 가져오기
var articleNo = getData["articleNo"];
var selectedRow = $("#jsGrid").find('table tr.jsgrid-selected-row');
// 상세 내용 보기
fn_viewDetail(articleNo, selectedRow);
},
//======================================
// 그리드 컬럼 정의 (각 요청에 맞게 조정)
//======================================
fields: [
{ title:"구분", name: "articleGubun" , type: "text", width: 100, align: "center"},
{ title:"유형", name: "faqType" , type: "text", width: 100, align: "center"},
{ title:"제목", name: "title" , type: "text", width: 200, align: "left" }
]
});
// 페이지 크기 변경시 재조회
$("#pageSize").on("change", function(e) {
fn_searchArticle($("#pageSize").val(), 1);
});
// 유형 변경시 재조회
$("#faqType").on("change", function(e) {
fn_searchArticle($("#pageSize").val(), 1);
});
// 검색 버튼 클릭
$("#btnSearch").on("click", function(e) {
fn_searchArticle($("#pageSize").val(), 1);
});
//초기 자료 조회
fn_searchArticle();
}); // document ready
// 선택한 게시글 상세 보기로 이동
function fn_viewDetail(articleNo, selectedRow) {
var $selectedRow = $(selectedRow);
var reqUrl = "${pageContext.request.contextPath}/board/selectFAQAjax.do";
var searchKeyword = document.articleForm.searchKeyword.value;
var pageIndex = $("#pageIndex").val();
var pageSize = $("#pageSize").val();
var faqType = document.articleForm.faqType.value;
var inputData = {
"searchKeyword" : searchKeyword
, "pageIndex" : pageIndex
, "pageSize": pageSize
, "faqType": faqType};
//--------------------------------------
// 요청 처리
//--------------------------------------
$.ajax({
type: "post",
contentType: "application/json; charset=utf-8",
url: reqUrl,
dataType: "json",
data: JSON.stringify(inputData),
}).done(function(response){
var jsonObj = JSON.parse(response);
$("#jsGrid").find('table tr.answer').remove();
//alert("DDDDDDDD remove = " + $("#jsGrid")[0].scrollHeight);
$selectedRow.after("<tr class='answer'><td colspan='3'>" + jsonObj.content
+ "<br/>" + jsonObj.content
+ "<br/>" + jsonObj.content
+ "<br/>" + jsonObj.content
+ "<br/>" + jsonObj.content
+ "</td></tr>");
//alert("DDDDDDDD add = " + $("#jsGrid")[0].scrollHeight);
//$("#jsGrid").find('table.jsgrid-table.jsgrid-grid-body').height($("#jsGrid").find('table.jsgrid-table')[0].scrollHeight + 100);
});
$("#jsGrid").closest('.ui-jqgrid-bdiv').width($("#jsGrid").closest('.ui-jqgrid-bdiv').width() + 1);
}
// 게시글 작성으로 이동
function fn_newArticle() {
$("#articleNo").val("");
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/insertFAQForm.do");
$("#articleForm").submit();
}
// 그리드 데이터 조회 호출
function fn_searchArticle(pageSize, pageIndex) {
$("#jsGrid").jsGrid("search"
, {'pageSize' : (pageSize ? pageSize : fn_getIntValue("pageSize", ${pageSize}) ),
'pageIndex' : (pageIndex ? pageIndex : fn_getIntValue("pageIndex", 1))
}
);
}
function fn_changeFaqType(selectedFaqType) {
$('#faqType').val(selectedFaqType).trigger('change');
}
</script>
</head>
<body>
<h1>${pageTitle }</h1>
메시지 : ${message}
&nbsp;<br/>
<form name="articleForm" id="articleForm"
action="${pageContext.request.contextPath}/board/listFAQs.do"
method="post">
<!-- 검색조건 -->
<select name="pageSize" id="pageSize" title="목록에 보여줄 글 개수">
<c:forEach var="pageSizeItem" items="${pageSizeCodes}" varStatus="status">
<option value="<c:out value="${pageSizeItem.code }" />" <c:if test="${pageSizeItem.code == pageSize }">selected</c:if> ><c:out value="${pageSizeItem.name }" /></option>
</c:forEach>
</select>
<select name="faqType" id="faqType" title="공지사항 유형">
<option value="">유형</option>
<c:forEach var="faqTypeItem" items="${faqTypeCodes}" varStatus="status">
<option value="<c:out value="${faqTypeItem.code }" />" <c:if test="${faqTypeItem.code == faqType }">selected</c:if> ><c:out value="${faqTypeItem.name }" /></option>
</c:forEach>
</select>
<input type="text" name="pageIndex" id="pageIndex" title="페이지번호" value="${pageIndex }" size="5" maxlength="5" />
<input type="text" name="searchKeyword" id="searchKeyword" title="검색어" value="${searchKeyword }" size="35" maxlength="50" />
<input type="button" name="btnSearch" id="btnSearch" title="검색버튼" value="검색" />
<br/>
<a href="javascript:void(0)" onclick="fn_changeFaqType('')" <c:if test="${'' == faqType }"> class="selected" </c:if> >전체</a>
<c:forEach var="faqTypeItem" items="${faqTypeCodes}" varStatus="status">
<a href="javascript:void(0)" onclick="fn_changeFaqType('<c:out value="${faqTypeItem.code }" />')" <c:if test="${faqTypeItem.code == faqType }"> class="selected" </c:if> ><c:out value="${faqTypeItem.name }" /></a>
</c:forEach>
<div id="jsGrid" name="jsGrid" style="height: 100%"></div>
<input type="text" name="articleNo" id="articleNo" value="" title="선택글번호" readonly />
</form>
</body>
</html>

View File

@ -1,236 +0,0 @@
<%
/**
* <pre>
* @Class Name : listNotices.jsp
*
* @Description : 공지사항 목록을 조회한다.
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 6. 15. KNKIM 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP KNKIM
* @since 2021. 6. 15.
* @version 1.0
*
*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ 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" %>
<c:set var="pageTitle">공지사항</c:set>
<!DOCTYPE html>
<html lang="ko">
<head>
<title>${pageTitle}</title>
<!-- GRID -->
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/js/jsgrid/nlib-jsgrid.css" />
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/js/jsgrid/nlib-jsgrid-theme.css" />
<script src="${pageContext.request.contextPath}/js/jsgrid/nlib-jsgrid.js"></script>
<script type="text/javaScript" language="javascript">
$(function() {
alert("ok");
});
$( document ).ready(function() {
var MyDateField = function(config) {
jsGrid.Field.call(this, config);
};
MyDateField.prototype = new jsGrid.Field({
sorter: function(date1, date2) {
return new Date(date1) - new Date(date2);
},
itemTemplate: function(value) {
return new Date(value).toDateString();
},
insertTemplate: function(value) {
return this._insertPicker = $("<input>").datepicker({ defaultDate: new Date() });
},
editTemplate: function(value) {
return this._editPicker = $("<input>").datepicker().datepicker("setDate", new Date(value));
},
insertValue: function() {
return this._insertPicker.datepicker("getDate").toISOString();
},
editValue: function() {
return this._editPicker.datepicker("getDate").toISOString();
}
});
jsGrid.fields.myDateField = MyDateField;
//=======================================================
// 그리드 생성 환경설정
//=======================================================
$("#jsGrid").jsGrid({
pageSize : $("#pageSize").val(),
controller: {
loadData: function (filter) { // 그리드에 데이터를 가져올 때 실팽되는 함수
var data = $.Deferred();
//======================================
// 요청 정보 구성 : 시작 (각 요청에 맞게 조정)
//======================================
var reqUrl = "${pageContext.request.contextPath}/board/listNoticesAjax.do";
var articleType = document.articleForm.articleType.value;
var searchKeyword = document.articleForm.searchKeyword.value;
var pageIndex = ( filter && filter.pageIndex ? filter.pageIndex : $("#pageIndex").val());
var pageSize = ( filter && filter.pageSize ? filter.pageSize : $("#pageSize").val());
$("#pageIndex").val(pageIndex);
var inputData = {
"searchKeyword" : searchKeyword
, "pageIndex" : pageIndex
, "pageSize": pageSize
, "articleType": articleType};
//--------------------------------------
// 요청 처리
//--------------------------------------
$.ajax({
type: "post",
contentType: "application/json; charset=utf-8",
url: reqUrl,
dataType: "json",
data: JSON.stringify(inputData),
}).done(function(response){
<%
// 그리드 데이터 예시 :
// (1) 페이징 클라이언트에서 수행하는 경우(pageloading = false) : [{ "articleNo": 1, "articleType": "01" }, { "articleNo": 2, "articleType": "02" }]
// (2) 페이징 서버에서 수행하는 경우(pageloading = true) : {data: [{...}], itemsCount: 255}
%>
data.resolve(JSON.parse(response));
});
return data.promise();
} // loadData
},
rowClick: function(args) { // 행 클릭 시, 실행되는 이벤트 함수
// 클릭된 행의 자료 객체
var getData = args.item;
// 추출할 컬럼의 데이터 가져오기
var articleNo = getData["articleNo"];
// 상세 내용 보기
fn_viewDetail(articleNo);
},
//======================================
// 그리드 컬럼 정의 (각 요청에 맞게 조정)
//======================================
fields: [
{ title:"상시공지", name: "noticeTop", type: "text", width: 50, align: "center"},
{ title:"번호", name: "articleNo" , type: "number", width: 50, align: "center"},
{ title:"유형", name: "articleType" , type: "text", width: 100, align: "center"},
{ title:"제목", name: "title" , type: "text", width: 200, align: "left" },
{ title:"작성자", name: "regUserName", type: "text", width: 50, align: "center" },
{ title:"등록일", name: "regDate" , type: "text", width: 100, align: "center"},
{ title:"최근", name: "new" , type: "text", width: 100, align: "center"}
]
});
// 페이지 크기 변경시 재조회
$("#pageSize").on("change", function(e) {
fn_searchArticle($("#pageSize").val(), 1);
});
// 검색 버튼 클릭
$("#btnSearch").on("click", function(e) {
fn_searchArticle($("#pageSize").val(), 1);
});
//초기 자료 조회
fn_searchArticle();
}); // document ready
// 선택한 게시글 상세 보기로 이동
function fn_viewDetail(articleNo) {
$("#articleNo").val(articleNo);
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/selectNotice.do");
$("#articleForm").submit();
}
// 게시글 작성으로 이동
function fn_newArticle() {
$("#articleNo").val("");
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/insertNoticeForm.do");
$("#articleForm").submit();
}
// 그리드 데이터 조회 호출
function fn_searchArticle(pageSize, pageIndex) {
$("#jsGrid").jsGrid("search"
, {'pageSize' : (pageSize ? pageSize : fn_getIntValue("pageSize", ${pageSize}) ),
'pageIndex' : (pageIndex ? pageIndex : fn_getIntValue("pageIndex", 1))
}
);
}
</script>
</head>
<body>
<h1>${pageTitle }</h1>
메시지 : ${message}
&nbsp;<br/>
<form name="articleForm" id="articleForm"
action="${pageContext.request.contextPath}/board/listNotices.do"
method="post">
<!-- 검색조건 -->
<select name="pageSize" id="pageSize" title="목록에 보여줄 글 개수">
<c:forEach var="pageSizeItem" items="${pageSizeCodes}" varStatus="status">
<option value="<c:out value="${pageSizeItem.code }" />" <c:if test="${pageSizeItem.code == pageSize }">selected</c:if> ><c:out value="${pageSizeItem.name }" /></option>
</c:forEach>
</select>
<select name="articleType" id="articleType" title="공지사항 유형">
<option value="">유형</option>
<c:forEach var="articleTypeItem" items="${articleTypeCodes}" varStatus="status">
<option value="<c:out value="${articleTypeItem.code }" />" <c:if test="${articleTypeItem.code == articleType }">selected</c:if> ><c:out value="${articleTypeItem.name }" /></option>
</c:forEach>
</select>
<input type="text" name="pageIndex" id="pageIndex" title="페이지번호" value="${pageIndex }" size="5" maxlength="5" />
<input type="text" name="searchKeyword" id="searchKeyword" title="검색어" value="${searchKeyword }" size="35" maxlength="50" />
<input type="button" name="btnSearch" id="btnSearch" title="검색버튼" value="검색" />
<div id="jsGrid" name="jsGrid" style="height: 100%"></div>
<input type="text" name="articleNo" id="articleNo" value="" title="선택글번호" readonly />
</form>
</body>
</html>

View File

@ -1,192 +0,0 @@
<%
/**
* <pre>
* @Class Name : listQnAs.jsp
*
* @Description : 묻고답하기 목록을 조회한다.
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 7. 13. KNKIM 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP KNKIM
* @since 2021. 7. 13.
* @version 1.0
*
*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ 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" %>
<c:set var="pageTitle">묻고답하기</c:set>
<!DOCTYPE html>
<html lang="ko">
<head>
<title>${pageTitle}</title>
<!-- GRID -->
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/js/jsgrid/nlib-jsgrid.css" />
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/js/jsgrid/nlib-jsgrid-theme.css" />
<script src="${pageContext.request.contextPath}/js/jsgrid/nlib-jsgrid.js"></script>
<script type="text/javaScript" language="javascript">
$( document ).ready(function() {
//=======================================================
// 그리드 생성 환경설정
//=======================================================
$("#jsGrid").jsGrid({
pageSize : $("#pageSize").val(),
controller: {
loadData: function (filter) { // 그리드에 데이터를 가져올 때 실팽되는 함수
var data = $.Deferred();
//======================================
// 요청 정보 구성 : 시작 (각 요청에 맞게 조정)
//======================================
var reqUrl = "${pageContext.request.contextPath}/board/listQnAsAjax.do";
var searchKeyword = document.articleForm.searchKeyword.value;
var pageIndex = ( filter && filter.pageIndex ? filter.pageIndex : $("#pageIndex").val());
var pageSize = ( filter && filter.pageSize ? filter.pageSize : $("#pageSize").val());
$("#pageIndex").val(pageIndex);
var inputData = {
"searchKeyword" : searchKeyword
, "pageIndex" : pageIndex
, "pageSize": pageSize};
//--------------------------------------
// 요청 처리
//--------------------------------------
$.ajax({
type: "post",
contentType: "application/json; charset=utf-8",
url: reqUrl,
dataType: "json",
data: JSON.stringify(inputData),
}).done(function(response){
<%
// 그리드 데이터 예시 :
// (1) 페이징 클라이언트에서 수행하는 경우(pageloading = false) : [{ "articleNo": 1, "articleType": "01" }, { "articleNo": 2, "articleType": "02" }]
// (2) 페이징 서버에서 수행하는 경우(pageloading = true) : {data: [{...}], itemsCount: 255}
%>
data.resolve(JSON.parse(response));
});
return data.promise();
} // loadData
},
rowClick: function(args) { // 행 클릭 시, 실행되는 이벤트 함수
// 클릭된 행의 자료 객체
var getData = args.item;
// 추출할 컬럼의 데이터 가져오기
var articleNo = getData["articleNo"];
// 상세 내용 보기
fn_viewDetail(articleNo);
},
//======================================
// 그리드 컬럼 정의 (각 요청에 맞게 조정)
//======================================
fields: [
{ title:"번호", name: "articleNo" , type: "number" , width: 50, align: "center"},
{ title:"제목", name: "title", type: "text" , width: 200, align: "left" },
{ title:"작성자", name: "writerName", type: "number", width: 50, align: "center" },
{ title:"등록일", name: "regDate", type: "text", width: 100, align: "center"},
{ title:"상태", name: "replyStatus", type: "text", width: 80, align: "center" }
]
});
// 페이지 크기 변경시 재조회
$("#pageSize").on("change", function(e) {
fn_searchArticle($("#pageSize").val(), 1);
});
// 검색 버튼 클릭
$("#btnSearch").on("click", function(e) {
fn_searchArticle($("#pageSize").val(), 1);
});
//초기 자료 조회
fn_searchArticle();
}); // document ready
// 선택한 게시글 상세 보기로 이동
function fn_viewDetail(articleNo) {
$("#articleNo").val(articleNo);
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/selectQnA.do");
$("#articleForm").submit();
}
// 게시글 작성으로 이동
function fn_newArticle() {
$("#articleNo").val("");
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/insertQnAForm.do");
$("#articleForm").submit();
}
// 그리드 데이터 조회 호출
function fn_searchArticle(pageSize, pageIndex) {
$("#jsGrid").jsGrid("search"
, {'pageSize' : (pageSize ? pageSize : fn_getIntValue("pageSize", ${pageSize}) ),
'pageIndex' : (pageIndex ? pageIndex : fn_getIntValue("pageIndex", 1))
}
);
}
</script>
</head>
<body>
<h1>${pageTitle }</h1>
메시지 : ${message}
&nbsp;<br/>
<form name="articleForm" id="articleForm"
action="${pageContext.request.contextPath}/board/listQnAs.do"
method="post">
<!-- 검색조건 -->
<select name="pageSize" id="pageSize" title="목록에 보여줄 글 개수">
<c:forEach var="pageSizeItem" items="${pageSizeCodes}" varStatus="status">
<option value="<c:out value="${pageSizeItem.code }" />" <c:if test="${pageSizeItem.code == pageSize }">selected</c:if> ><c:out value="${pageSizeItem.name }" /></option>
</c:forEach>
</select>
<input type="text" name="pageIndex" id="pageIndex" title="페이지번호" value="${pageIndex }" size="5" maxlength="5" />
<input type="text" name="searchKeyword" id="searchKeyword" title="검색어" value="${searchKeyword }" size="35" maxlength="50" />
<input type="button" name="btnSearch" id="btnSearch" title="검색버튼" value="검색" />
<div id="jsGrid" name="jsGrid" style="height: 100%"></div>
<button type="button" name="btnNew" id="btnNew" class="float" title="글쓰기버튼"
onclick="fn_newArticle()">글쓰기</button>
<input type="text" name="articleNo" id="articleNo" value="" title="선택글번호" readonly />
</form>
</body>
</html>

View File

@ -1,197 +0,0 @@
<%
/**
* <pre>
* @Class Name : selectNotice.jsp
*
* @Description : 공지사항 상세내용을 조회한다.
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 7. 22. KNKIM 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP KNKIM
* @since 2021. 7. 22.
* @version 1.0
*
*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ 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" %>
<c:set var="pageTitle">공지사항 - 상세조회</c:set>
<!DOCTYPE html>
<html lang="ko">
<head>
<title>${pageTitle}</title>
<script type="text/javaScript" language="javascript">
$(function() {
alert("ok");
});
// 이전글/다음글 상세 보기로 이동
function fn_view_detail(articleNo) {
$("#articleNo").val(articleNo);
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/selectNotice.do");
$("#articleForm").submit();
}
// 목록으로 이동
function fn_list() {
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/listNotices.do");
$("#articleForm").submit();
}
// 수정 화면 이동
function fn_updateForm(passwd) {
if(passwd == null || passwd == "") {
alert("수정을 위한 게시물의 비밀번호를 입력하여 주시기 바랍니다.");
return;
}
$("#articlePassword").val(passwd);
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/updateNoticeForm.do");
$("#articleForm").submit();
}
// 수정위한 비밀번호 확인
function fn_updatePassword() {
fn_promptPassword("수정을 위한 글 비밀번호를 입력하여 주시기 바랍니다.", "111", "fn_updateForm")
}
// 삭제위한 비밀번호 확인
function fn_deletePassword() {
fn_promptPassword("삭제를 위한 글 비밀번호를 입력하여 주시기 바랍니다.", "111", "fn_delete")
}
// 삭제 처리
function fn_delete(passwd) {
if(passwd == null || passwd == "") {
alert("삭제를 위한 게시물의 비밀번호를 입력하여 주시기 바랍니다.");
return;
}
$("#articlePassword").val(passwd);
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/deleteNotice.do");
$("#articleForm").submit();
}
// 파일 다운로드
function fn_downloadFile(fid, fname) {
if(fid == null || fid.trim().length < 1) {
alert("파일정보를 확인해 주시기 바랍니다.[1]");
return;
}
if(fname == null || fname.trim().length < 1) {
alert("파일정보를 확인해 주시기 바랍니다.[2]");
return;
}
$("#fid").val(fid);
$("#fname").val(fname);
$("#downloadFileForm").submit();
}
</script>
</head>
<body>
<h1>${pageTitle }</h1>
메시지 : <span style="color:red;">${message }</span>
<br />
<form name="articleForm" id="articleForm"
action="${pageContext.request.contextPath}/board/listNotices.do"
method="post">
<!-- HIDDEN 영역 : 시작 -->
<input type="text" name="pageIndex" id="pageIndex" title="페이지번호" value="${pageIndex}" readonly />
<input type="text" name="pageSize" id="pageSize" title="목록에 보여줄 글개수" value="${pageSize}" readonly />
<input type="text" name="searchKeyword" id="searchKeyword" title="검색어" value="${searchKeyword}" readonly />
<input type="text" name="articleNo" id="articleNo" title="선택글번호" value="${articleNo}" readonly />
<input type="text" name="articleType" id="articleType" title="유형" value="${articleType}" readonly />
<!-- HIDDEN 영역 : 종료 -->
<table class="table_content" style="width:100% !important; margin-top: 20px;">
<tr>
<th>유형</th>
<td>${article.articleTypeName }</td>
<th>작성일</th>
<td>${article.regDate }</td>
</tr>
<tr>
<th rowspan="1">제목</th>
<td colspan="3">${article.title}</td>
</tr>
<tr>
<th rowspan="1">질문내용</th>
<td colspan="3">${article.contentNotice}</td>
</tr>
<tr>
<td colspan="4">
<%
// 파일정보 : 저장파일ID=원파일명
%>
<c:set var="contentNoticeFileList" value="${fn:split(article.contentNoticeFile,';')}" />
<c:forEach var="contentNoticeFileItem" items="${contentNoticeFileList }">
<c:set var="fInfo" value="${fn:split(contentNoticeFileItem,'=')}" />
<a href="javascript:void(0);" onclick="fn_downloadFile('${fInfo[0]}', '${fInfo[1]}')">${fInfo[1]}</a><br/>
</c:forEach>
</td>
</tr>
</table>
<br/>
<table class="table_content" style="width:100% !important;">
<tr>
<th>이전글</th>
<td>${preArticle.articleTypeName }</td>
<td><a href="javascript:void(0)" onclick="fn_view_detail('${preArticle.articleNo }')">${preArticle.title }</a></td>
<th>작성일 : ${preArticle.regDate }</th>
</tr>
<tr>
<th>다음글</th>
<td>${nextArticle.articleTypeName }</td>
<td><a href="javascript:void(0)" onclick="fn_view_detail('${nextArticle.articleNo }')">${nextArticle.title }</a></td>
<th>작성일 : ${nextArticle.regDate }</th>
</tr>
</table>
<!-- 관련 작업 버튼 -->
<button type="button" name="btnList" id="btnList" class="float"
onclick="fn_list()">목록</button>
</form>
<br />
<!-- 첨부파일 다운로드용 폼 -->
<form name="downloadFileForm" id="downloadFileForm"
action="${pageContext.request.contextPath}/fileupload/downloadFiles.do"
method="post">
<input type="text" name="subPathKey" id="subPathKey" value="fileupload.bbs.qna.subpath" readonly />
<input type="text" name="fid" id="fid" value="" readonly />
<input type="text" name="fname" id="fname" value="" readonly />
</form>
</body>
</html>

View File

@ -1,217 +0,0 @@
<%
/**
* <pre>
* @Class Name : selectQnA.jsp
*
* @Description : 묻고답하기 상세내용을 조회한다.
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 7. 22. KNKIM 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP KNKIM
* @since 2021. 7. 22.
* @version 1.0
*
*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ 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" %>
<c:set var="pageTitle">묻고답하기 - 상세조회</c:set>
<!DOCTYPE html>
<html lang="ko">
<head>
<title>${pageTitle}</title>
<script type="text/javaScript" language="javascript">
// 이전글/다음글 상세 보기로 이동
function fn_view_detail(articleNo) {
$("#articleNo").val(articleNo);
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/selectQnA.do");
$("#articleForm").submit();
}
// 목록으로 이동
function fn_list() {
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/listQnAs.do");
$("#articleForm").submit();
}
// 수정 화면 이동
function fn_updateForm(passwd) {
if(passwd == null || passwd == "") {
alert("수정을 위한 게시물의 비밀번호를 입력하여 주시기 바랍니다.");
return;
}
$("#articlePassword").val(passwd);
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/updateQnAForm.do");
$("#articleForm").submit();
}
// 수정위한 비밀번호 확인
function fn_updatePassword() {
fn_promptPassword("수정을 위한 글 비밀번호를 입력하여 주시기 바랍니다.", "111", "fn_updateForm")
}
// 삭제위한 비밀번호 확인
function fn_deletePassword() {
fn_promptPassword("삭제를 위한 글 비밀번호를 입력하여 주시기 바랍니다.", "111", "fn_delete")
}
// 삭제 처리
function fn_delete(passwd) {
if(passwd == null || passwd == "") {
alert("삭제를 위한 게시물의 비밀번호를 입력하여 주시기 바랍니다.");
return;
}
$("#articlePassword").val(passwd);
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/deleteQnA.do");
$("#articleForm").submit();
}
// 파일 다운로드
function fn_downloadFile(fid, fname) {
if(fid == null || fid.trim().length < 1) {
alert("파일정보를 확인해 주시기 바랍니다.[1]");
return;
}
if(fname == null || fname.trim().length < 1) {
alert("파일정보를 확인해 주시기 바랍니다.[2]");
return;
}
$("#fid").val(fid);
$("#fname").val(fname);
$("#downloadFileForm").submit();
}
</script>
</head>
<body>
<h1>${pageTitle }</h1>
메시지 : <span style="color:red;">${message }</span>
<br />
<form name="articleForm" id="articleForm"
action="${pageContext.request.contextPath}/board/listQnAs.do"
method="post">
<!-- HIDDEN 영역 : 시작 -->
<input type="text" name="pageIndex" id="pageIndex" title="페이지번호" value="${pageIndex}" readonly />
<input type="text" name="pageSize" id="pageSize" title="목록에 보여줄 글개수" value="${pageSize}" readonly />
<input type="text" name="searchKeyword" id="searchKeyword" title="검색어" value="${searchKeyword}" readonly />
<input type="text" name="articleNo" id="articleNo" title="선택글번호" value="${articleNo}" readonly />
<input type="text" name="articleType" id="articleType" title="유형" value="${articleType}" readonly />
<input type="text" name="articlePassword" id="articlePassword" title="글비밀번호" value="${articlePassword}" readonly />
<!-- HIDDEN 영역 : 종료 -->
<table class="table_content" style="width:100% !important; margin-top: 20px;">
<tr>
<th>유형</th>
<td>${article.articleTypeName }</td>
<th>작성자 : ${article.regUserName }</th>
<th>작성일 : ${article.regDate }</th>
<th>상태 : ${article.repStatus }</th>
</tr>
<tr>
<th rowspan="2">질문내용</th>
<td colspan="4">${article.contentQeust}</td>
</tr>
<tr>
<td colspan="4">
<%
// 파일정보 : 저장파일ID=원파일명
%>
<c:set var="contentQeustFileList" value="${fn:split(article.contentQeustFile,';')}" />
<c:forEach var="contentQuestFileItem" items="${contentQeustFileList }">
<c:set var="fInfo" value="${fn:split(contentQuestFileItem,'=')}" />
<a href="javascript:void(0);" onclick="fn_downloadFile('${fInfo[0]}', '${fInfo[1]}')">${fInfo[1]}</a><br/>
</c:forEach>
</td>
</tr>
<tr>
<th rowspan="2">답변내용</th>
<td colspan="4">${article.contentReply}</td>
</tr>
<tr>
<td colspan="4">
<%
// 파일정보 : 저장파일ID=원파일명
%>
<c:set var="contentReplyFileList" value="${fn:split(article.contentReplyFile,';')}" />
<c:forEach var="contentReplyFileItem" items="${contentReplyFileList }">
<c:set var="fInfo" value="${fn:split(contentReplyFileItem,'=')}" />
<a href="javascript:void(0);" onclick="fn_downloadFile('${fInfo[0]}', '${fInfo[1]}')">${fInfo[1]}</a><br/>
</c:forEach>
</td>
</tr>
</table>
<br/>
<table class="table_content" style="width:100% !important;">
<tr>
<th>이전글</th>
<td>${preArticle.articleTypeName }</td>
<td><a href="javascript:void(0)" onclick="fn_view_detail('${preArticle.articleNo }')">${preArticle.title }</a></td>
<th>작성자 : ${preArticle.regUserName }</th>
<th>작성일 : ${preArticle.regDate }</th>
<th>상태 : ${preArticle.repStatus }</th>
</tr>
<tr>
<th>다음글</th>
<td>${nextArticle.articleTypeName }</td>
<td><a href="javascript:void(0)" onclick="fn_view_detail('${nextArticle.articleNo }')">${nextArticle.title }</a></td>
<th>작성자 : ${nextArticle.regUserName }</th>
<th>작성일 : ${nextArticle.regDate }</th>
<th>상태 : ${nextArticle.repStatus }</th>
</tr>
</table>
<!-- 관련 작업 버튼 -->
<button type="button" name="btnList" id="btnList" class="float"
onclick="fn_list()">목록</button>
<button type="button" name="btnUpdate" id="btnUpdate" class="float"
onclick="fn_updatePassword()">수정</button>
<button type="button" name="btnDelete" id="btnDelete" class="float"
onclick="fn_deletePassword()">삭제</button>
</form>
<br />
<!-- 첨부파일 다운로드용 폼 -->
<form name="downloadFileForm" id="downloadFileForm"
action="${pageContext.request.contextPath}/fileupload/downloadFiles.do"
method="post">
<input type="text" name="subPathKey" id="subPathKey" value="fileupload.bbs.qna.subpath" readonly />
<input type="text" name="fid" id="fid" value="" readonly />
<input type="text" name="fname" id="fname" value="" readonly />
</form>
</body>
</html>

View File

@ -1,133 +0,0 @@
<%
/**
* <pre>
* @Class Name : updateQnAForm.jsp
*
* @Description : 묻고답하기 수정화면을 표출한다.
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 7. 23. KNKIM 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP KNKIM
* @since 2021. 7. 23.
* @version 1.0
*
*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ 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" %>
<c:set var="pageTitle">묻고답하기 - 수정</c:set>
<!DOCTYPE html>
<html>
<head>
<title>${pageTitle}</title>
<script type="text/javaScript">
//선택한 게시글 상세 보기로 이동
function fn_viewDetail(articleNo) {
$('#articleForm').removeAttr('onsubmit');
$("#articleNo").val(articleNo);
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/selectQnA.do");
$("#articleForm").submit();
}
// 선택한 게시글 상세 보기로 이동
function fn_list() {
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/listQnAs.do");
$("#articleForm").submit();
}
// 수정 처리
function fn_update() {
if(!validEmail($("#email").val())) {
alert("이메일 형식에 맞지 않습니다. 다시 확인하여 주시기 바랍니다.");
$("#email").focus();
return false;
}
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/updateQnA.do");
if(!confirm("저장하시겠습니까?")) return false;
return true;
}
</script>
</head>
<body>
<h1>${pageTitle }</h1>
메시지 : <span style="color:red;">${message }</span>
<br />
<form name="articleForm" id="articleForm"
action="${pageContext.request.contextPath}/board/updateQnA.do"
method="post"
onsubmit="return fn_update();">
<!-- HIDDEN 영역 : 시작 -->
<input type="text" name="pageIndex" id="pageIndex" title="페이지번호" value="${pageIndex}" readonly />
<input type="text" name="pageSize" id="pageSize" title="목록에 보여줄 글 개수" value="${pageSize}" readonly />
<input type="text" name="searchKeyword" id="searchKeyword" title="검색어" value="${searchKeyword}" readonly />
<input type="text" name="articleNo" id="articleNo" title="선택글번호" value="${articleNo}" readonly />
&nbsp;<br/>
&nbsp;<br/>
<table class="table_content" style="width:100% !important;">
<tr>
<th>제목</th>
<td><input type="text" name="title" id="title" title="제목" value="${article.title}" size="100" maxlength="200" required /></td>
</tr>
<tr>
<th>작성자</th>
<td><input type="text" name="regUserName" id="regUserName" title="작성자" value="${article.regUserName}" size="100" maxlength="200" required /></td>
</tr>
<tr>
<th>이메일</th>
<td><input type="email" name="email" id="email" title="이메일" value="${article.email}" size="100" maxlength="200" required /></td>
</tr>
<tr>
<th>기존비밀번호</th>
<td><input type="text" name="encArticlePassword" id="encArticlePassword" title="제목" value="${encArticlePassword}" size="100" maxlength="200" /></td>
</tr>
<tr>
<th>비밀번호<br/>(변경시 입력)</th>
<td><input type="text" name="articlePassword" id="articlePassword" title="비밀번호" value="" size="100" maxlength="200" /><br/>
</td>
</tr>
<tr>
<th>질문내용</th>
<td><textarea name="contentQeust" id="contentQeust" cols="80" rows="10">${article.contentQeust}</textarea></td>
</tr>
</table>
<br/>
<input type="button" name="btnCancel" id="btnCancel" title="취소버튼" class="float" value="취소"
onclick="fn_viewDetail('${articleNo}')" />
<input type="submit" name="btnSave" id="btnSave" title="저장버튼" class="float" value="저장" />
</form>
</body>
</html>

View File

@ -158,15 +158,6 @@ function fn_changeCartItems(cartTypeCd, cartTypeNm) {
$("#frm").submit();
}
function fn_changeInterest(masterId, onOff) {
alert("관심등록/삭제 준비중 : " + masterId + ", " + onOff);
}
function fn_gotoDetail(masterId) {
alert("상세보기 준비중 : " + masterId);
}
// 대출신청으로 이동
function fn_appRent() {
@ -237,11 +228,10 @@ $(document).ready(function() {
</script>
<form name="frm" id="frm" action="${pageContext.request.contextPath}/cart/listCartItems.do" method="post">
<input type="text" id="cartTypeCd" name="cartTypeCd" value="${cartTypeCd }" />
<input type="text" id="mngOrgNm" name="mngOrgNm" value="${mngOrgNm }" />
<input type="text" id="mngOrgCd" name="mngOrgCd" value="" />
<input type="text" id="selItems" name="selItems" value="" />
<input type="hidden" id="cartTypeCd" name="cartTypeCd" value="${cartTypeCd }" />
<input type="hidden" id="mngOrgNm" name="mngOrgNm" value="${mngOrgNm }" />
<input type="hidden" id="mngOrgCd" name="mngOrgCd" value="" />
<input type="hidden" id="selItems" name="selItems" value="" />
<!-- 카트 섹션 -->
<section class="location cart">
@ -311,17 +301,17 @@ $(document).ready(function() {
<div class="t-chk"><input type="checkbox" name="chk_item_${cart.mngOrgCd }" id="chk_item_${cart.mngOrgCd }" value="${cart.masterId }" ></div>
<div class="t-data">
<div class="img">${cart.interestYn }
<a href="javascript:void(0)"><img src="${cart.rprsThumbUrl }" alt="" width="60" height="91" title="상세보기" onclick="fn_gotoDetail('${cart.masterId }')"></a>
<a href="javascript:void(0)"><img src="${cart.rprsThumbUrl }" alt="" width="60" height="91" title="상세보기" onclick="gfn_getDetail('${cart.masterId }')"></a>
<sec:authorize access="isAuthenticated()">
<c:if test='${cart.MUseYn == "Y"}'>
<span class="favorites" onclick="fn_changeInterest('${cart.masterId }', 'off')" title="관심자료에서 삭제합니다.">
<span id="favorites_${cart.masterId }" class="favorites" onclick="fn_changeInterestBtn('${cart.masterId }', 'off')" title="관심자료에서 삭제합니다.">
<img src="/images/icon/icon-cart-Favorites-on.png" class="off" alt="즐겨찾기 아이콘">
<img src="/images/icon/icon-cart-Favorites.png" class="on" alt="즐겨찾기 아이콘">
</span>
</c:if>
<c:if test='${cart.MUseYn != "Y"}'>
<span class="favorites" onclick="fn_changeInterest('${cart.masterId }', 'on')" title="관심자료로 등록합니다.">
<span class="favorites" onclick="fn_changeInterestBtn('${cart.masterId }', 'on')" title="관심자료로 등록합니다.">
<img src="/images/icon/icon-cart-Favorites.png" class="off" alt="즐겨찾기 아이콘">
<img src="/images/icon/icon-cart-Favorites-on.png" class="on" alt="즐겨찾기 아이콘">
</span>
@ -342,7 +332,7 @@ $(document).ready(function() {
</c:if>
</div>
<div class="title"><a href="javascript:void(0)" onclick="fn_gotoDetail('${cart.masterId }')" title="상세보기">${cart.title }</a></div>
<div class="title"><a href="javascript:void(0)" onclick="gfn_getDetail('${cart.masterId }')" title="상세보기">${cart.title }</a></div>
</div>
<div class="t-state <c:if test="${cart.useStatus != '03' and cart.useStatus != '06' }">poss</c:if> <c:if test="${cart.useStatus == '03' or cart.useStatus == '06' }">imposs</c:if>"><p>${cart.useStatusNm }</p></div>
<div class="t-date">${cart.rtnExpctDd }</div>

View File

@ -29,6 +29,43 @@ function fn_search(keyword) {
return;
}
function fn_viewAncmnt(articleId) {
var form = document.createElement("form");
form.style.display = "none";
$(form).attr("action", "/bbs/selectAncmntArticle.do");
$(form).attr("method", "post");
var element = document.createElement("input");
$(element).attr("name", "articleId");
$(element).attr("value", articleId);
form.appendChild(element);
document.body.appendChild(form);
form.submit();
document.body.removeChild(form);
return;
}
function fn_viewQna(articleId) {
var form = document.createElement("form");
form.style.display = "none";
$(form).attr("action", "/bbs/selectQnaArticle.do");
$(form).attr("method", "post");
var element = document.createElement("input");
$(element).attr("name", "articleId");
$(element).attr("value", articleId);
form.appendChild(element);
document.body.appendChild(form);
form.submit();
document.body.removeChild(form);
return;
}
function fn_listPops(typeDivCd) {
$("div.tab_content div.tabs_item").hide();
$("#listPops_" + typeDivCd).show();
@ -204,14 +241,14 @@ function fn_listPops(typeDivCd) {
<div class="detail-cover">
<strong>${itemOnline.title }</strong>
<ul>
<li><em>주제유형</em><c:if test="${empty itemOnline.subjectNm }">-</c:if>${itemOnline.subjectNm }</li>
<li><em>주제분야</em>문화유산</li>
<li><em>자료유형</em><c:if test="${empty itemOnline.typeDivNm }">-</c:if>${itemOnline.typeDivNm }</li>
<li><em>주제분야</em><c:if test="${empty itemOnline.subjectNmUp }">-</c:if>${itemOnline.subjectNmUp }</li>
<li><em>생산기관</em><c:if test="${empty itemOnline.orgNm }">-</c:if>${itemOnline.orgNm }</span></li>
<li><em>생산년도</em><c:if test="${empty itemOnline.creatYyyy }">-</c:if>${itemOnline.creatYyyy }</li>
</ul>
<div class="btn-box">
<div class="view"><a href="javascript:void(0)" onclick="gfn_showDocPdf('${itemOnline.interfaceId }')">원문보기</a></div>
<div class="RIS"><a href="#">RIS</a></div>
<div class="RIS"><a href="javascript:void(0)" onclick="risShow('${itemOnline.masterId }')">RIS</a></div>
</div>
</div>
</div>
@ -236,68 +273,45 @@ function fn_listPops(typeDivCd) {
<div class="Fl notice">
<div class="ti"><span>공지사항</span><a href="javascript:void(0)" onclick="location.href='/bbs/listAncmnts.do';"><span>더보기 <img src="/images/icon/icon-more.png" alt="더보기 아이콘"></span></a></div>
<div class="con">
<c:forEach var="itemAncmnt" items="${listAncmnt }">
<div class="list">
<a href="#">
<div class="box"><p>05</p><p>21.09</p></div>
<a href="javascript:void(0)" onclick="fn_viewAncmnt('${itemAncmnt.articleId}')">
<div class="box"><p>${fn:substring(itemAncmnt.regDd,8,10) }</p><p> ${fn:substring(itemAncmnt.regDd,2,4) }.${fn:substring(itemAncmnt.regDd,5,7) }</p></div>
<div class="text">
<p>[공지] 경주문화원에 오신걸 환영합니다.<img src="/images/icon/icon-file.png" class="file" alt="파일 아이콘"></p>
</div>
</a>
</div>
<div class="list">
<a href="#">
<div class="box"><p>05</p><p>21.09</p></div>
<div class="text">
<p>소장자료관 이용 시 주의사항 안내<img src="/images/icon/icon-file.png" class="file" alt="파일 아이콘"></p>
</div>
</a>
</div>
<div class="list">
<a href="#">
<div class="box"><p>05</p><p>21.09</p></div>
<div class="text">
<p>[공지] 2021 문화원 휴관일 안내 드립니다.</p>
<p><c:if test='${itemAncmnt.notiYn == "Y"}'>[공지]</c:if>${itemAncmnt.title}
<c:if test='${itemAncmnt.attachYn == "Y"}'><img src="/images/icon/icon-file.png" class="file" alt="파일 아이콘"></c:if></p>
</div>
</a>
</div>
</c:forEach>
</div>
</div>
<div class="Fl qna">
<div class="ti"><span>Q&amp;A</span><a href="javascript:void(0)" onclick="location.href='/bbs/listQnas.do';"><span>더보기 <img src="/images/icon/icon-more.png" alt="더보기 아이콘"></span></a></div>
<div class="con">
<c:forEach var="itemQna" items="${listQna }">
<div class="list">
<a href="#">
<div class="box"><p>05</p><p>21.09</p></div>
<a href="javascript:void(0)" onclick="fn_viewQna('${itemQna.articleId}')">
<div class="box"><p>${fn:substring(itemQna.regDd,8,10) }</p><p> ${fn:substring(itemQna.regDd,2,4) }.${fn:substring(itemQna.regDd,5,7) }</p></div>
<div class="text">
<p>[공지] 경주문화원에 오신걸 환영합니다.<img src="/images/icon/icon-password.png" class="pw" alt="잠금 아이콘"></p>
</div>
<div class="answer">
<p>답변대기</p>
</div>
</a>
</div>
<div class="list">
<a href="#">
<div class="box"><p>05</p><p>21.09</p></div>
<div class="text">
<p>소장자료관 이용 시 주의사항 안내<img src="/images/icon/icon-password.png" class="pw" alt="잠금 아이콘"></p>
</div>
<div class="answer">
<p>답변대기</p>
</div>
</a>
</div>
<div class="list">
<a href="#">
<div class="box"><p>05</p><p>21.09</p></div>
<div class="text">
<p>[공지] 2021 문화원 휴관일 안내 드립니다.</p>
<p>${itemQna.title}
<c:if test='${itemQna.attachYn == "Y"}'><img src="/images/icon/icon-file.png" class="file" alt="파일 아이콘"></c:if>
<c:if test='${itemQna.secretYn == "Y"}'><img src="/images/icon/icon-password.png" class="pw" alt="잠금 아이콘"></c:if>
</p>
</div>
<c:if test='${itemQna.answerYn == "Y"}'>
<div class="answer suc">
<p>답변완료</p>
</div>
</c:if>
<c:if test='${itemQna.answerYn != "Y"}'>
<div class="answer">
<p>답변대기</p>
</div>
</c:if>
</a>
</div>
</c:forEach>
</div>
</div>
</div>

View File

@ -1,459 +1,459 @@
<%
/**
* <pre>
* @Class Name : searchList.jsp
*
* @Description : 소장 자료를 조회한다.
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 10. 13. JSYOO 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP JSYOO
* @since 2021. 10. 13.
* @version 1.0
*
*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ 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"%>
<c:set var="pageTitle">소장 자료</c:set>
<!DOCTYPE html>
<html>
<head>
<style>
</style>
<title>${pageTitle}</title>
<!-- GRID -->
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/js/jsgrid/nlib-jsgrid.css" />
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/js/jsgrid/nlib-jsgrid-theme.css" />
<script src="${pageContext.request.contextPath}/js/jquery-ui/jquery-ui.js"></script>
<script src="${pageContext.request.contextPath}/js/jsgrid/nlib-jsgrid.js"></script>
<script src="${pageContext.request.contextPath}/js/search/util.js"></script>
<script src="${pageContext.request.contextPath}/js/search/reference.js"></script>
<script type="text/javaScript" language="javascript">
window.onload = function() {
<%//상단 검색바 셋팅%>
$("#top_query").val('${searchVO.query}');
if(sfield == "TITLE")
{
$("#sfield").val(sfield);
}
var sfield = '${searchVO.sfield}';
if(sfield == "TITLE")
{
$("#sfield").val(sfield);
}
// 페이지 크기 변경시 재조회
$("#pageSize").on("change", function(e) {
fnFilterSch();
});
// 검색 버튼 클릭
$("#btnSearch").on("click", function(e) {
fn_search_article(1);
});
$("#referencelistForm input:checkbox[name='reQueryChk']").on('change', function() {
if ( $(this).prop('checked') )
{
$("#query").css("display","none");
$("#reQuery").css("display","inline-block");
$("#reQueryChk").val("reQuery");
}else{
$("#reQuery").css("display","none");
$("#query").css("display","inline-block");
$("#reQueryChk").val("query");
}
});
//초기값
fnSetInitialValue();
//생산년도적용버튼
filter_creatYyyyAply();
//필터클릭체크
reference_filterClk();
//필터삭제
reference_filterDel();
//필터삭제(상세검색에 추가된부분)
reference_detailFilterDel();
fnLabel_reference();
//초기화
reference_filterReset();
}; // window.onload
//페이지 로드시 초기값셋팅
function fnSetInitialValue()
{
//탭
$("#"+"${searchVO.collection}").parent().addClass('current');
//페이징
pageLoad("fn_search_article",'${pageVO.pageIndex}','${pageVO.totRecordCount}','${pageVO.startPage}','${pageVO.endPage}','${pageVO.lastPage}');
//생산년도
var filter_creatYyyy = '${searchVO.filter_creatYyyy}';
var creatYyyyYn = '${searchVO.creatYyyyYn}';
if(filter_creatYyyy == "date")
{
$("#m-year-2").prop('checked',true);
$("#creatYyyyStart").val("${searchVO.creatYyyyStart}");
$("#creatYyyyEnd").val("${searchVO.creatYyyyEnd}");
if(creatYyyyYn == "Y")
{
$("#creatYyyyYn").prop('checked',true);
}
}else{
$("#m-year-1").prop('checked',true);
}
}
//탭 이동
function fnTabMoveSch(collection){
$("#collection").val(collection);
fnFilterSch();
}
function fnFilterSch(){
document.referencelistForm.action="/search/searchList.do";
document.referencelistForm.submit();
}
//상세보기
function goDetail(masterId){
$("#masterId").val(masterId);
document.referencelistForm.action="/search/searchItemDetail.do";
document.referencelistForm.submit();
}
// 페이징 검색
function fn_search_article(pageIndex) {
$("#pageIndex").val(pageIndex);
fnFilterSch();
}
</script>
</head>
<body>
<!-- 소장자료 섹션 -->
<form name="referencelistForm" id="referencelistForm" method="post" action="/search/searchList.do">
<input type="hidden" name="collection" id="collection" value="<c:out value='${searchVO.collection}'/>" />
<input type="hidden" id="pageIndex" name="pageIndex" title="페이지번호" value="<c:out value='${searchVO.pageIndex }' />"/>
<input type="hidden" id="masterId" name="masterId" value="" />
<input type="hidden" id="filter_creatYyyy" name="filter_creatYyyy" value="<c:out value='${searchVO.filter_creatYyyy}'/>" />
<input type="hidden" name="filter_class" value="<c:out value='${searchVO.filter_class}'/>" />
<input type="hidden" name="filter_category" value="<c:out value='${searchVO.filter_category}'/>"/>
<input type="hidden" id="filter_agency" name="filter_agency" value="<c:out value='${searchVO.filter_agency}'/>"/>
<input type="hidden" id="filter_mylist" name="filter_mylist" value="<c:out value='${searchVO.filter_mylist}'/>"/>
<input type="hidden" id="bookIndex" name="bookIndex" value="<c:out value='${searchVO.bookIndex}'/>"/>
<input type="hidden" id="mngtNo" name="mngtNo" value="<c:out value='${searchVO.mngtNo}'/>"/>
<input type="hidden" id="createStartDate" name="createStartDate" value="<c:out value='${searchVO.createStartDate}'/>"/>
<input type="hidden" id="createEndDate" name="createEndDate" value="<c:out value='${searchVO.createEndDate}'/>"/>
<input type="hidden" id="ageCode" name="ageCode" value="<c:out value='${searchVO.ageCode}'/>"/>
<input type="hidden" id="collectionList" name="collectionList" value="<c:out value='${searchVO.collectionList}'/>"/>
<input type="hidden" id="realQuery" name="realQuery" value="<c:out value='${searchVO.realQuery}'/>"/>
<div class="location data">
<h2 class="blind">소장자료 섹션영역</h2>
<div class="inner">
<div class="row-top">
<div class="location-box">
<ul class="loc">
<li>HOME</li>
<li class="on">소장자료</li>
</ul>
<ul class="tit">
<li><span>소장</span>자료</li>
</ul>
</div>
<div class="arr"><img src="/images/icon/icon-join-arr2.png" alt="화살표 아이콘"></div>
</div>
<div class="contents row-bottom">
<div class="data-box">
<div class="article-side">
<section class="filter-wrap">
<div class="filter-head">
<h2>검색필터</h2>
<button type="button" class="btn-filter-reset">초기화</button>
</div>
<div class="choice-condition">
<ul id="reference_fillter_append">
</ul>
</div>
<div class="filter-condition">
<div class="filter">
<div class="filter-tit">
<h3>자료유형</h3>
</div>
<div class="filter-list">
<ul id="ul_category1List">
<li>
<c:forEach var="firstClassList" items="${firstClassList}" varStatus="fcStatus">
<li>
<div class="depth-1 <c:if test="${fn:contains(searchVO.filter_class, firstClassList.column1) }"> on</c:if>">
<div class="check">
<input type="checkbox" value="${firstClassList.column1}" name="first_class" id="data-type-chk${fcStatus.index+1}" <c:if test="${fn:contains(searchVO.filter_class, firstClassList.column1) }">checked="checked"</c:if> />
<label for="data-type-chk${fcStatus.index+1}">${firstClassList.sCodeNm}(<span>${firstClassList.cnt }</span>) </label>
</div>
</div>
<ul class="depth-2">
<c:forEach var="secondClassList" items="${secondClassList}" varStatus="seStatus">
<c:if test="${firstClassList.column1 eq secondClassList.column2 }">
<li>
<div class="check"><input type="checkbox" value="${secondClassList.sCodeId}" name="second_class" id="data-type-chk${fcStatus.index+1}-${seStatus.index+1}" <c:if test="${fn:contains(searchVO.second_class, secondClassList.sCodeId) }">checked="checked"</c:if> />
<label for="data-type-chk${fcStatus.index+1}-${seStatus.index+1}">${secondClassList.sCodeNm}(<span>${secondClassList.cnt }</span>)</label>
</div>
</li>
</c:if>
</c:forEach>
</ul>
</li>
</c:forEach>
</li>
</ul>
</div>
<button type="button" class="btn-toggle-more">더보기</button>
</div>
<div class="filter">
<div class="filter-tit">
<h3>주제분야</h3>
<button type="button" class="btn-toggle">닫기</button>
</div>
<div class="filter-list">
<ul id="ul_category2List">
<c:set var="count" value="0" />
<c:forEach var="firstCategoryInfo" items="${firstCategoryList}" varStatus="status">
<c:if test="${firstCategoryInfo.upClsfId eq '2' }">
<li>
<div class="depth-1 <c:if test="${fn:contains(searchVO.filter_category, firstCategoryInfo.clsfId) }"> on</c:if>">
<div class="check"><input type="checkbox" value="${firstCategoryInfo.clsfId}" id="theme-chk${count+1}" name="first_category" <c:if test="${fn:contains(searchVO.filter_category, firstCategoryInfo.clsfId) }">checked="checked"</c:if>/><label for="theme-chk${count+1}">${firstCategoryInfo.clsfNm}(<span>${firstCategoryInfo.cnt}</span>)</label></div>
</div>
<ul class="depth-2">
<c:forEach var="secondCategoryInfo" items="${secondCategoryList}" varStatus="seStatus">
<c:if test="${firstCategoryInfo.clsfId eq secondCategoryInfo.upClsfId }">
<li><div class="check"><input type="checkbox" value="${secondCategoryInfo.clsfId}" id="theme-chk${count+1}-${seStatus.index+1}" name="second_category" <c:if test="${fn:contains(searchVO.second_category, secondCategoryInfo.clsfId) }">checked="checked"</c:if>/><label for="theme-chk${count+1}-${seStatus.index+1}">${secondCategoryInfo.clsfNm}(<span>${secondCategoryInfo.cnt}</span>)</label></div></li>
</c:if>
</c:forEach>
</ul>
</li>
<c:set var="count" value="${count+1 }" />
</c:if>
</c:forEach>
</ul>
</div>
<button type="button" class="btn-toggle-more">더보기</button>
</div>
<div class="filter">
<div class="filter-tit">
<h3>생산년도</h3>
</div>
<div class="filter-list year">
<ul>
<li>
<label for="m-year-1"><input type="radio" id="m-year-1" name="m-year" value="all">전체</label>
</li>
<li>
<label for="m-year-2-1"><input type="radio" id="m-year-2" name="m-year" value="date">
<input type="text" id="creatYyyyStart" name="creatYyyyStart" onKeyup="this.value=this.value.replace(/[^0-9]/g,'');" maxlength='4' placeholder="예) 2017"> ~ <input type="text" id="creatYyyyEnd" name="creatYyyyEnd" onKeyup="this.value=this.value.replace(/[^0-9]/g,'');" maxlength='4' placeholder="예) 2018">
</label>
</li>
<li>
<input type="checkbox" id="creatYyyyYn" name="creatYyyyYn" value="Y">미상포함
</li>
</ul>
</div>
<button type="button" class="btn-apply">적용</button>
</div>
<div class="filter nodepth">
<div class="filter-tit">
<h3>생산기관</h3>
</div>
<div class="filter-list">
<ul id="ul_category3List">
<c:forEach var="result" items="${searchVO.orgCountList}" varStatus="status">
<li>
<div class="depth-1">
<div class="check"><input type="checkbox" id="agency-chk${status.index+1}" value="${result.org_nm}" name="first_agency" <c:if test="${fn:contains(searchVO.filter_agency,result.org_nm)}">checked="checked"</c:if>/><label for="agency-chk${status.index+1}">${result.org_nm}(${result.org_cnt})</label></div>
</div>
</li>
</c:forEach>
</ul>
</div>
<button type="button" class="btn-toggle-more">더보기</button>
</div>
</div>
</section>
</div>
<div class="list-box culture-box">
<div class="tab">
<ul class="tabs">
<li><a href="#" id="lib_total" onclick="fnTabMoveSch('lib_total');">전체<span>(<c:out value="${searchVO.lib_total_totalCount}"/>)</span></a></li>
<li><a href="#" id="lib_offline" onclick="fnTabMoveSch('lib_offline');">방문열람<span>(<c:out value="${searchVO.lib_offline_totalCount}"/>)</span></a></li>
<li><a href="#" id="lib_loan" onclick="fnTabMoveSch('lib_loan');">대출<span>(<c:out value="${searchVO.lib_loan_totalCount}"/>)</span></a></li>
<li><a href="#" id="lib_online" onclick="fnTabMoveSch('lib_online');">온라인열람<span>(<c:out value="${searchVO.lib_online_totalCount}"/>)</span></a></li>
<li><a href="#" id="lib_etc" onclick="fnTabMoveSch('lib_etc');">기타<span>(<c:out value="${searchVO.lib_etc_totalCount}"/>)</span></a></li>
</ul>
<div class="title">
<c:choose>
<c:when test="${searchVO.realQuery ne '' && (!empty searchVO.realQuery) }">
<span class="count"><strong>${searchVO.realQuery}</strong>에 대한 검색결과는 총 <em>
<fmt:formatNumber value="${searchVO.totalCount}" pattern="#,###" /></em>건 입니다.
</span>
</c:when>
<c:otherwise>
<span class="count">총<em><fmt:formatNumber value="${searchVO.totalCount}" pattern="#,###" /></em> 건</span>
</c:otherwise>
</c:choose>
<div class="list-search-wrap list-top">
<div class="re-search">
<label for="reQueryChk"><input type="checkbox" id="reQueryChk" name="reQueryChk" value="query" <c:if test="${searchVO.reQueryChk eq 'reQuery' }">checked="checked"</c:if>>결과 내 재검색</label>
</div>
<div class="list-select page-size">
<select name="pageSize" id="pageSize" title="리스트 개수 선택">
<c:forEach var="pageSizeItem" items="${pageSizeCodes}" varStatus="status">
<fmt:parseNumber var="i" value="${pageSizeItem.sCodeId}"/>
<option value="<c:out value="${i}" />" <c:if test="${i == searchVO.pageSize }">selected</c:if> ><c:out value="${pageSizeItem.sCodeNm }" /></option>
</c:forEach>
</select>
</div>
<div class="list-input">
<input type="text" name="query" id="query" title="검색어" <c:if test="${!(searchVO.reQueryChk eq 'query') }">style="display:none;"</c:if> placeholder="검색어를 입력하세요." value="${searchVO.query}" maxlength="50" />
<input type="text" name="reQuery" id="reQuery" title="재검색" <c:if test="${!(searchVO.reQueryChk eq 'reQuery') }">style="display:none;"</c:if> placeholder="결과내재검색" value="${searchVO.reQuery}" maxlength="50" />
<button type="submit">검색</button>
</div>
</div>
</div>
<div class="tab_content">
<div class="tabs_item">
<div class="inner">
<div class="list-cart-wrap">
<div class="list-data">
<div class="list t-tit-line">
<div class="t-data">자료정보</div>
<div class="t-btn nomagin">이용</div>
</div>
<c:forEach var="result" items="${searchVO.resultList}"> <!-- 리스트 출력 시작 -->
<div class="list">
<div class="t-data">
<div class="img"><a href="javascript:void(0)"><img src="${result.rprsThumbUrlWithDefault }" alt="" width="60" height="91" title="상세보기" onclick="goDetail('${result.masterId}');"></a>
<sec:authorize access="isAuthenticated()">
<c:if test='${result.MUseYn == "Y"}'>
<span id="favorites_${result.masterId}" class="favorites" onclick="fn_changeInterest('${result.masterId }', 'off')" title="관심자료에서 삭제합니다.">
<img src="/images/icon/icon-cart-Favorites-on.png" class="off" alt="즐겨찾기 아이콘">
<img src="/images/icon/icon-cart-Favorites.png" class="on" alt="즐겨찾기 아이콘">
</span>
</c:if>
<c:if test='${result.MUseYn != "Y"}'>
<span id="favorites_${result.masterId}" class="favorites" onclick="fn_changeInterest('${result.masterId }', 'on')" title="관심자료로 등록합니다.">
<img src="/images/icon/icon-cart-Favorites.png" class="off" alt="즐겨찾기 아이콘">
<img src="/images/icon/icon-cart-Favorites-on.png" class="on" alt="즐겨찾기 아이콘">
</span>
</c:if>
</sec:authorize>
</div>
<div class="type">
<c:if test="${(!empty result.openDivCd) && (result.openDivCd ne '3') }">
<span class="online">온라인열람</span>
</c:if>
<c:if test="${(!empty result.operOutRangeCd) && (result.operOutRangeCd ne '02')}">
<span class="loan">대출</span>
</c:if>
<c:if test="${(!empty result.operReadRangeCd) && (result.operReadRangeCd ne '03')}">
<span class="visit">방문열람</span>
</c:if>
<c:if test="${!((!empty result.openDivCd) && (result.openDivCd ne '3')) && !((!empty result.operOutRangeCd) && (result.operOutRangeCd ne '02')) && !((!empty result.operReadRangeCd) && (result.operReadRangeCd ne '03')) }">
<span class="etc">기타</span>
</c:if>
</div>
<div class="title"><a href="javascript:void(0)" onclick="goDetail('${result.masterId}');"><c:out value="${result.title}"/></a></div>
<div class="code"><c:out value="${result.mngtNo}"/></div>
<div class="subject">
<c:if test="${!empty result.typeCodeNm}">
<span>자료유형 : ${result.typeCodeNm} &#62; ${result.dtlsTypeDivNm}</span>
</c:if>
<c:if test="${!empty result.subjectNmUp}">
<span>주제분야 : ${result.subjectNmUp} &#62; ${result.subjectNm }</span>
</c:if>
<c:if test="${!empty result.orgNm }">
<span>생산기관 : ${result.orgNm }</span>
</c:if>
<c:if test="${!empty result.creatYyyy}">
<span>생산년도 : ${result.creatYyyy }</span>
</c:if>
</div>
</div>
<div class="t-btn nomagin">
<c:choose>
<c:when test="${(!empty result.operOutRangeNm) && (!empty result.operReadRangeNm)}">
<p>${result.operOutRangeNm}<br>${result.operReadRangeNm}</p>
</c:when>
<c:otherwise>
<c:if test="${(!empty result.operOutRangeNm) || (!empty result.operReadRangeNm) }">
<p>${result.operOutRangeNm}${result.operReadRangeNm}</p>
</c:if>
</c:otherwise>
</c:choose>
<c:if test="${(!empty result.openDivCd) && (result.openDivCd ne '3') && (!empty result.interfaceId)}">
<button type="button" class="btn-color" onclick="gfn_showDocPdf('${result.interfaceId}')";>원문보기</button>
</c:if>
<button type="button" class="btn-gray" onclick="risShow('${result.masterId}')";>RIS</button>
</div>
</div>
</c:forEach> <!-- 리스트 출력 끝부분 -->
<c:if test = "${fn:length(searchVO.resultList) < 1}">
<li class="no-result">
<span>검색결과가 없습니다.</span>
</li>
</c:if>
</div>
</div>
<ul id="paging" class="paging">
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</body>
</html>
<%
/**
* <pre>
* @Class Name : searchList.jsp
*
* @Description : 소장 자료를 조회한다.
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 10. 13. JSYOO 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP JSYOO
* @since 2021. 10. 13.
* @version 1.0
*
*/
%>
<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ 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"%>
<c:set var="pageTitle">소장 자료</c:set>
<!DOCTYPE html>
<html>
<head>
<style>
</style>
<title>${pageTitle}</title>
<!-- GRID -->
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/js/jsgrid/nlib-jsgrid.css" />
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/js/jsgrid/nlib-jsgrid-theme.css" />
<script src="${pageContext.request.contextPath}/js/jquery-ui/jquery-ui.js"></script>
<script src="${pageContext.request.contextPath}/js/jsgrid/nlib-jsgrid.js"></script>
<script src="${pageContext.request.contextPath}/js/search/util.js"></script>
<script src="${pageContext.request.contextPath}/js/search/reference.js"></script>
<script type="text/javaScript" language="javascript">
window.onload = function() {
<%//상단 검색바 셋팅%>
$("#top_query").val('${searchVO.query}');
if(sfield == "TITLE")
{
$("#sfield").val(sfield);
}
var sfield = '${searchVO.sfield}';
if(sfield == "TITLE")
{
$("#sfield").val(sfield);
}
// 페이지 크기 변경시 재조회
$("#pageSize").on("change", function(e) {
fnFilterSch();
});
// 검색 버튼 클릭
$("#btnSearch").on("click", function(e) {
fn_search_article(1);
});
$("#referencelistForm input:checkbox[name='reQueryChk']").on('change', function() {
if ( $(this).prop('checked') )
{
$("#query").css("display","none");
$("#reQuery").css("display","inline-block");
$("#reQueryChk").val("reQuery");
}else{
$("#reQuery").css("display","none");
$("#query").css("display","inline-block");
$("#reQueryChk").val("query");
}
});
//초기값
fnSetInitialValue();
//생산년도적용버튼
filter_creatYyyyAply();
//필터클릭체크
reference_filterClk();
//필터삭제
reference_filterDel();
//필터삭제(상세검색에 추가된부분)
reference_detailFilterDel();
fnLabel_reference();
//초기화
reference_filterReset();
}; // window.onload
//페이지 로드시 초기값셋팅
function fnSetInitialValue()
{
//탭
$("#"+"${searchVO.collection}").parent().addClass('current');
//페이징
pageLoad("fn_search_article",'${pageVO.pageIndex}','${pageVO.totRecordCount}','${pageVO.startPage}','${pageVO.endPage}','${pageVO.lastPage}');
//생산년도
var filter_creatYyyy = '${searchVO.filter_creatYyyy}';
var creatYyyyYn = '${searchVO.creatYyyyYn}';
if(filter_creatYyyy == "date")
{
$("#m-year-2").prop('checked',true);
$("#creatYyyyStart").val("${searchVO.creatYyyyStart}");
$("#creatYyyyEnd").val("${searchVO.creatYyyyEnd}");
if(creatYyyyYn == "Y")
{
$("#creatYyyyYn").prop('checked',true);
}
}else{
$("#m-year-1").prop('checked',true);
}
}
//탭 이동
function fnTabMoveSch(collection){
$("#collection").val(collection);
fnFilterSch();
}
function fnFilterSch(){
document.referencelistForm.action="/search/searchList.do";
document.referencelistForm.submit();
}
//상세보기
function goDetail(masterId){
$("#masterId").val(masterId);
document.referencelistForm.action="/search/searchItemDetail.do";
document.referencelistForm.submit();
}
// 페이징 검색
function fn_search_article(pageIndex) {
$("#pageIndex").val(pageIndex);
fnFilterSch();
}
</script>
</head>
<body>
<!-- 소장자료 섹션 -->
<form name="referencelistForm" id="referencelistForm" method="post" action="/search/searchList.do">
<input type="hidden" name="collection" id="collection" value="<c:out value='${searchVO.collection}'/>" />
<input type="hidden" id="pageIndex" name="pageIndex" title="페이지번호" value="<c:out value='${searchVO.pageIndex }' />"/>
<input type="hidden" id="masterId" name="masterId" value="" />
<input type="hidden" id="filter_creatYyyy" name="filter_creatYyyy" value="<c:out value='${searchVO.filter_creatYyyy}'/>" />
<input type="hidden" name="filter_class" value="<c:out value='${searchVO.filter_class}'/>" />
<input type="hidden" name="filter_category" value="<c:out value='${searchVO.filter_category}'/>"/>
<input type="hidden" id="filter_agency" name="filter_agency" value="<c:out value='${searchVO.filter_agency}'/>"/>
<input type="hidden" id="filter_mylist" name="filter_mylist" value="<c:out value='${searchVO.filter_mylist}'/>"/>
<input type="hidden" id="bookIndex" name="bookIndex" value="<c:out value='${searchVO.bookIndex}'/>"/>
<input type="hidden" id="mngtNo" name="mngtNo" value="<c:out value='${searchVO.mngtNo}'/>"/>
<input type="hidden" id="createStartDate" name="createStartDate" value="<c:out value='${searchVO.createStartDate}'/>"/>
<input type="hidden" id="createEndDate" name="createEndDate" value="<c:out value='${searchVO.createEndDate}'/>"/>
<input type="hidden" id="ageCode" name="ageCode" value="<c:out value='${searchVO.ageCode}'/>"/>
<input type="hidden" id="collectionList" name="collectionList" value="<c:out value='${searchVO.collectionList}'/>"/>
<input type="hidden" id="realQuery" name="realQuery" value="<c:out value='${searchVO.realQuery}'/>"/>
<div class="location data">
<h2 class="blind">소장자료 섹션영역</h2>
<div class="inner">
<div class="row-top">
<div class="location-box">
<ul class="loc">
<li>HOME</li>
<li class="on">소장자료</li>
</ul>
<ul class="tit">
<li><span>소장</span>자료</li>
</ul>
</div>
<div class="arr"><img src="/images/icon/icon-join-arr2.png" alt="화살표 아이콘"></div>
</div>
<div class="contents row-bottom">
<div class="data-box">
<div class="article-side">
<section class="filter-wrap">
<div class="filter-head">
<h2>검색필터</h2>
<button type="button" class="btn-filter-reset">초기화</button>
</div>
<div class="choice-condition">
<ul id="reference_fillter_append">
</ul>
</div>
<div class="filter-condition">
<div class="filter">
<div class="filter-tit">
<h3>자료유형</h3>
</div>
<div class="filter-list">
<ul id="ul_category1List">
<li>
<c:forEach var="firstClassList" items="${firstClassList}" varStatus="fcStatus">
<li>
<div class="depth-1 <c:if test="${fn:contains(searchVO.filter_class, firstClassList.column1) }"> on</c:if>">
<div class="check">
<input type="checkbox" value="${firstClassList.column1}" name="first_class" id="data-type-chk${fcStatus.index+1}" <c:if test="${fn:contains(searchVO.filter_class, firstClassList.column1) }">checked="checked"</c:if> />
<label for="data-type-chk${fcStatus.index+1}">${firstClassList.sCodeNm}(<span>${firstClassList.cnt }</span>) </label>
</div>
</div>
<ul class="depth-2">
<c:forEach var="secondClassList" items="${secondClassList}" varStatus="seStatus">
<c:if test="${firstClassList.column1 eq secondClassList.column2 }">
<li>
<div class="check"><input type="checkbox" value="${secondClassList.sCodeId}" name="second_class" id="data-type-chk${fcStatus.index+1}-${seStatus.index+1}" <c:if test="${fn:contains(searchVO.second_class, secondClassList.sCodeId) }">checked="checked"</c:if> />
<label for="data-type-chk${fcStatus.index+1}-${seStatus.index+1}">${secondClassList.sCodeNm}(<span>${secondClassList.cnt }</span>)</label>
</div>
</li>
</c:if>
</c:forEach>
</ul>
</li>
</c:forEach>
</li>
</ul>
</div>
<button type="button" class="btn-toggle-more">더보기</button>
</div>
<div class="filter">
<div class="filter-tit">
<h3>주제분야</h3>
<button type="button" class="btn-toggle">닫기</button>
</div>
<div class="filter-list">
<ul id="ul_category2List">
<c:set var="count" value="0" />
<c:forEach var="firstCategoryInfo" items="${firstCategoryList}" varStatus="status">
<c:if test="${firstCategoryInfo.upClsfId eq '2' }">
<li>
<div class="depth-1 <c:if test="${fn:contains(searchVO.filter_category, firstCategoryInfo.clsfId) }"> on</c:if>">
<div class="check"><input type="checkbox" value="${firstCategoryInfo.clsfId}" id="theme-chk${count+1}" name="first_category" <c:if test="${fn:contains(searchVO.filter_category, firstCategoryInfo.clsfId) }">checked="checked"</c:if>/><label for="theme-chk${count+1}">${firstCategoryInfo.clsfNm}(<span>${firstCategoryInfo.cnt}</span>)</label></div>
</div>
<ul class="depth-2">
<c:forEach var="secondCategoryInfo" items="${secondCategoryList}" varStatus="seStatus">
<c:if test="${firstCategoryInfo.clsfId eq secondCategoryInfo.upClsfId }">
<li><div class="check"><input type="checkbox" value="${secondCategoryInfo.clsfId}" id="theme-chk${count+1}-${seStatus.index+1}" name="second_category" <c:if test="${fn:contains(searchVO.second_category, secondCategoryInfo.clsfId) }">checked="checked"</c:if>/><label for="theme-chk${count+1}-${seStatus.index+1}">${secondCategoryInfo.clsfNm}(<span>${secondCategoryInfo.cnt}</span>)</label></div></li>
</c:if>
</c:forEach>
</ul>
</li>
<c:set var="count" value="${count+1 }" />
</c:if>
</c:forEach>
</ul>
</div>
<button type="button" class="btn-toggle-more">더보기</button>
</div>
<div class="filter">
<div class="filter-tit">
<h3>생산년도</h3>
</div>
<div class="filter-list year">
<ul>
<li>
<label for="m-year-1"><input type="radio" id="m-year-1" name="m-year" value="all">전체</label>
</li>
<li>
<label for="m-year-2-1"><input type="radio" id="m-year-2" name="m-year" value="date">
<input type="text" id="creatYyyyStart" name="creatYyyyStart" onKeyup="this.value=this.value.replace(/[^0-9]/g,'');" maxlength='4' placeholder="예) 2017"> ~ <input type="text" id="creatYyyyEnd" name="creatYyyyEnd" onKeyup="this.value=this.value.replace(/[^0-9]/g,'');" maxlength='4' placeholder="예) 2018">
</label>
</li>
<li>
<input type="checkbox" id="creatYyyyYn" name="creatYyyyYn" value="Y">미상포함
</li>
</ul>
</div>
<button type="button" class="btn-apply">적용</button>
</div>
<div class="filter nodepth">
<div class="filter-tit">
<h3>생산기관</h3>
</div>
<div class="filter-list">
<ul id="ul_category3List">
<c:forEach var="result" items="${searchVO.orgCountList}" varStatus="status">
<li>
<div class="depth-1">
<div class="check"><input type="checkbox" id="agency-chk${status.index+1}" value="${result.org_nm}" name="first_agency" <c:if test="${fn:contains(searchVO.filter_agency,result.org_nm)}">checked="checked"</c:if>/><label for="agency-chk${status.index+1}">${result.org_nm}(${result.org_cnt})</label></div>
</div>
</li>
</c:forEach>
</ul>
</div>
<button type="button" class="btn-toggle-more">더보기</button>
</div>
</div>
</section>
</div>
<div class="list-box culture-box">
<div class="tab">
<ul class="tabs">
<li><a href="#" id="lib_total" onclick="fnTabMoveSch('lib_total');">전체<span>(<c:out value="${searchVO.lib_total_totalCount}"/>)</span></a></li>
<li><a href="#" id="lib_offline" onclick="fnTabMoveSch('lib_offline');">방문열람<span>(<c:out value="${searchVO.lib_offline_totalCount}"/>)</span></a></li>
<li><a href="#" id="lib_loan" onclick="fnTabMoveSch('lib_loan');">대출<span>(<c:out value="${searchVO.lib_loan_totalCount}"/>)</span></a></li>
<li><a href="#" id="lib_online" onclick="fnTabMoveSch('lib_online');">온라인열람<span>(<c:out value="${searchVO.lib_online_totalCount}"/>)</span></a></li>
<li><a href="#" id="lib_etc" onclick="fnTabMoveSch('lib_etc');">기타<span>(<c:out value="${searchVO.lib_etc_totalCount}"/>)</span></a></li>
</ul>
<div class="title">
<c:choose>
<c:when test="${searchVO.realQuery ne '' && (!empty searchVO.realQuery) }">
<span class="count"><strong>${searchVO.realQuery}</strong>에 대한 검색결과는 총 <em>
<fmt:formatNumber value="${searchVO.totalCount}" pattern="#,###" /></em>건 입니다.
</span>
</c:when>
<c:otherwise>
<span class="count">총<em><fmt:formatNumber value="${searchVO.totalCount}" pattern="#,###" /></em> 건</span>
</c:otherwise>
</c:choose>
<div class="list-search-wrap list-top">
<div class="re-search">
<label for="reQueryChk"><input type="checkbox" id="reQueryChk" name="reQueryChk" value="query" <c:if test="${searchVO.reQueryChk eq 'reQuery' }">checked="checked"</c:if>>결과 내 재검색</label>
</div>
<div class="list-select page-size">
<select name="pageSize" id="pageSize" title="리스트 개수 선택">
<c:forEach var="pageSizeItem" items="${pageSizeCodes}" varStatus="status">
<fmt:parseNumber var="i" value="${pageSizeItem.sCodeId}"/>
<option value="<c:out value="${i}" />" <c:if test="${i == searchVO.pageSize }">selected</c:if> ><c:out value="${pageSizeItem.sCodeNm }" /></option>
</c:forEach>
</select>
</div>
<div class="list-input">
<input type="text" name="query" id="query" title="검색어" <c:if test="${!(searchVO.reQueryChk eq 'query') }">style="display:none;"</c:if> placeholder="검색어를 입력하세요." value="${searchVO.query}" maxlength="50" />
<input type="text" name="reQuery" id="reQuery" title="재검색" <c:if test="${!(searchVO.reQueryChk eq 'reQuery') }">style="display:none;"</c:if> placeholder="결과내재검색" value="${searchVO.reQuery}" maxlength="50" />
<button type="submit">검색</button>
</div>
</div>
</div>
<div class="tab_content">
<div class="tabs_item">
<div class="inner">
<div class="list-cart-wrap">
<div class="list-data">
<div class="list t-tit-line">
<div class="t-data">자료정보</div>
<div class="t-btn nomagin">이용</div>
</div>
<c:forEach var="result" items="${searchVO.resultList}"> <!-- 리스트 출력 시작 -->
<div class="list">
<div class="t-data">
<div class="img"><a href="javascript:void(0)"><img src="${result.rprsThumbUrlWithDefault }" alt="" width="60" height="91" title="상세보기" onclick="goDetail('${result.masterId}');"></a>
<sec:authorize access="isAuthenticated()">
<c:if test='${result.MUseYn == "Y"}'>
<span id="favorites_${result.masterId}" class="favorites" onclick="fn_changeInterest('${result.masterId }', 'off')" title="관심자료에서 삭제합니다.">
<img src="/images/icon/icon-cart-Favorites-on.png" class="off" alt="즐겨찾기 아이콘">
<img src="/images/icon/icon-cart-Favorites.png" class="on" alt="즐겨찾기 아이콘">
</span>
</c:if>
<c:if test='${result.MUseYn != "Y"}'>
<span id="favorites_${result.masterId}" class="favorites" onclick="fn_changeInterest('${result.masterId }', 'on')" title="관심자료로 등록합니다.">
<img src="/images/icon/icon-cart-Favorites.png" class="off" alt="즐겨찾기 아이콘">
<img src="/images/icon/icon-cart-Favorites-on.png" class="on" alt="즐겨찾기 아이콘">
</span>
</c:if>
</sec:authorize>
</div>
<div class="type">
<c:if test="${(!empty result.openDivCd) && (result.openDivCd ne '3') }">
<span class="online">온라인열람</span>
</c:if>
<c:if test="${(!empty result.operOutRangeCd) && (result.operOutRangeCd ne '02')}">
<span class="loan">대출</span>
</c:if>
<c:if test="${(!empty result.operReadRangeCd) && (result.operReadRangeCd ne '03')}">
<span class="visit">방문열람</span>
</c:if>
<c:if test="${!((!empty result.openDivCd) && (result.openDivCd ne '3')) && !((!empty result.operOutRangeCd) && (result.operOutRangeCd ne '02')) && !((!empty result.operReadRangeCd) && (result.operReadRangeCd ne '03')) }">
<span class="etc">기타</span>
</c:if>
</div>
<div class="title"><a href="javascript:void(0)" onclick="goDetail('${result.masterId}');"><c:out value="${result.title}"/></a></div>
<div class="code"><c:out value="${result.mngtNo}"/></div>
<div class="subject">
<c:if test="${!empty result.typeCodeNm}">
<span>자료유형 : ${result.typeCodeNm} &#62; ${result.dtlsTypeDivNm}</span>
</c:if>
<c:if test="${!empty result.subjectNmUp}">
<span>주제분야 : ${result.subjectNmUp} &#62; ${result.subjectNm }</span>
</c:if>
<c:if test="${!empty result.orgNm }">
<span>생산기관 : ${result.orgNm }</span>
</c:if>
<c:if test="${!empty result.creatYyyy}">
<span>생산년도 : ${result.creatYyyy }</span>
</c:if>
</div>
</div>
<div class="t-btn nomagin">
<c:choose>
<c:when test="${(!empty result.operOutRangeNm) && (!empty result.operReadRangeNm)}">
<p>${result.operOutRangeNm}<br>${result.operReadRangeNm}</p>
</c:when>
<c:otherwise>
<c:if test="${(!empty result.operOutRangeNm) || (!empty result.operReadRangeNm) }">
<p>${result.operOutRangeNm}${result.operReadRangeNm}</p>
</c:if>
</c:otherwise>
</c:choose>
<c:if test="${(!empty result.openDivCd) && (result.openDivCd ne '3') && (!empty result.interfaceId)}">
<button type="button" class="btn-color" onclick="gfn_showDocPdf('${result.interfaceId}')";>원문보기</button>
</c:if>
<button type="button" class="btn-gray" onclick="risShow('${result.masterId}')";>RIS</button>
</div>
</div>
</c:forEach> <!-- 리스트 출력 끝부분 -->
<c:if test = "${fn:length(searchVO.resultList) < 1}">
<li class="no-result">
<span>검색결과가 없습니다.</span>
</li>
</c:if>
</div>
</div>
<ul id="paging" class="paging">
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</body>
</html>

View File

@ -294,7 +294,7 @@ $(document).ready(function() {
<div class="v-date">
<select id="hopeReqPridDtmFrom" name="hopeReqPridDtmFrom">
<c:forEach var="dtItem" items="${listDates}" varStatus="status">
<option value="${dtItem.dt }">${dtItem.dt } (${dtItem.dtName })</option>
<option value="${dtItem.dt }">${dtItem.dt }</option>
</c:forEach>
</select>
<span>에서</span>
@ -302,7 +302,7 @@ $(document).ready(function() {
<c:forEach var="dtItem" items="${listDates}" varStatus="status">
<option value="${dtItem.dt }"
<c:if test='${status.count == 2}'>selected</c:if>
>${dtItem.dt } (${dtItem.dtName })</option>
>${dtItem.dt }</option>
</c:forEach>
</select>
<span>사이</span>

View File

@ -244,12 +244,12 @@ $(document).ready(function() {
<div class="compl-box">
<div class="compl-icon"><img src="/images/icon/icon-cart-com.png" alt="체크 아이콘"></div>
<c:if test='${readVO.resultMessage == "S"}'>
<div class="compl-text">자료 <span>${totCnt}</span>건 방문열람신청이 접수되었습니다. [${readVO.rsrvId}]</div>
<c:if test='${readVO.resultCode == "S"}'>
<div class="compl-text">자료 <span>${totCnt}</span>건 방문열람신청이 접수되었습니다.</div>
<div class="compl-date">(희망방문일자: ${readVO.hopeReqPridDtmFrom} ~ ${readVO.hopeReqPridDtmTo})</div>
</c:if>
<c:if test='${readVO.resultMessage != "S"}'>
<c:if test='${readVO.resultCode != "S"}'>
<div class="compl-text">처리에 실패하였습니다.</div>
<div class="compl-date">${readVO.resultMessage } (${readVO.resultCode })</div>
</c:if>

View File

@ -134,17 +134,19 @@ function fn_search(reqStatusDivCd) {
var statusHtml1 = "";
var statusHtml2 = "";
var statusHtml3 = "";
if(obj.reqStatusDivCd == null) {
statusHtml1 = '<span class="ti imposs">-<span class="da"></span></span>';
} else if(obj.reqStatusDivCd == "A0") { // 신청
statusHtml1 = '<span class="ti imposs">' + obj.reqStatusDivNm + '<span class="da"></span></span>';
statusHtml2 = '<button type="button" onclick="fn_cancel(\"' + obj.title + '\",\"' + obj.mngOrgCd + '\", \"' + obj.reqId + '\", \"' + obj.masterId + '\")>취소</button>';
statusHtml2 = '<button type="button" onclick="fn_cancel(\'' + obj.title + '\',\'' + obj.mngOrgCd + '\', \'' + obj.reqId + '\', \'' + obj.masterId + '\')">취소</button>';
} else if(obj.reqStatusDivCd == "A1") { // 승인
statusHtml1 = '<span class="ti poss">' + obj.reqStatusDivNm + '<span class="da">' + fn_formatDateStr(obj.modDd,"-") + '</span></span>';
statusHtml2 = '<button type="button" onclick="fn_cancel(\"' + obj.title + '\",\"' + obj.mngOrgCd + '\", \"' + obj.reqId + '\", \"' + obj.masterId + '\")>취소</button>';
statusHtml2 = '<button type="button" onclick="fn_cancel(\'' + obj.title + '\',\'' + obj.mngOrgCd + '\', \'' + obj.reqId + '\', \'' + obj.masterId + '\')">취소</button>';
} else if(obj.reqStatusDivCd == "A2") { // 반려
statusHtml1 = '<span class="ti poss">' + obj.reqStatusDivNm + '<span class="da">' + fn_formatDateStr(obj.modDd,"-") + '</span></span>';
statusHtml2 = '<button type="button" onclick="fn_reson(\"' + obj.title + '\",\"' + obj.mngOrgCd + '\", \"' + obj.reqId + '\", \"' + obj.masterId + '\")>사유</button>';
statusHtml2 = '<button type="button" onclick="fn_reson(\'' + obj.reqId + '\')">사유</button>';
statusHtml3 = '<div id="rejected_reason_' + obj.reqId + '" style="display:none;">' + obj.rtnCont + '</div>';
} else if(obj.reqStatusDivCd == "R") { // 열람완료
statusHtml1 = '<span class="ti imposs">' + obj.reqStatusDivNm + '<span class="da">' + fn_formatDateStr(obj.modDd,"-") + '</span></span>';
statusHtml2 = '';
@ -153,7 +155,7 @@ function fn_search(reqStatusDivCd) {
statusHtml2 = '';
}
div.append($('<div />').attr('class', 'n-state').html(statusHtml1 + statusHtml2));
div.append($('<div />').attr('class', 'n-state').html(statusHtml1 + statusHtml2 + statusHtml3));
$("div.list-data").append(div);
@ -166,6 +168,16 @@ function fn_search(reqStatusDivCd) {
alert("조회에 실패하였습니다. 관리자에게 문의 바랍니다.");
});
}
function fn_reson(reqId) {
$("#divRejectedReasonDetail").html($("#rejected_reason_" + reqId).text());
$("#divRejectedReason").fadeIn();
}
function fn_closeReason() {
$("#divRejectedReason").fadeOut();
$("#divRejectedReasonDetail").html("");
}
function fn_cancel(title, mngOrgCd, reqId, masterId) {
@ -292,3 +304,20 @@ function fn_search(reqStatusDivCd) {
</div>
<!-- 소장자료 반려 팝업 -->
<div id="divRejectedReason" class="pop-return" style="display:none;">
<div class="row Title">
<p>지방문화원 소장자료</p>
<h3>반려사유</h3>
</div>
<div class="inner">
<div class="row Text">
<div class="text-box mCustomScrollbar" data-mcs-theme="dark-2" id="divRejectedReasonDetail"></div>
</div>
<div class="row btn-box">
<button type="button" class="btn btn-color" onclick="fn_closeReason()">확인</button>
</div>
<button type="button" class="return-close" onclick="fn_closeReason()"></button>
</div>
<div class="Bg"></div>
</div>

View File

@ -284,8 +284,8 @@ transition: all 0.2s ease-in-out;
.sec6 .onlineSwiper .items .List a.inner {display:block;}
.sec6 .onlineSwiper .items .List .inner.light-type {color:#666;background-color:#fff;}
.sec6 .onlineSwiper .items .List .inner div.thumbnail {overflow:hidden;position:relative;background-color:#f8f8f8;}
.sec6 .onlineSwiper .items .List .inner div.thumbnail span.image-frame {display:block;height:100%;background:url('/images/img/img-no-image.gif') no-repeat 50% 0;background-size:contain;}
.sec6 .onlineSwiper .items .List .inner div.thumbnail span.image-frame img {width:100%;height:100%;}
.sec6 .onlineSwiper .items .List .inner div.thumbnail span.image-frame {display:block;display:flex;align-items:center;height:350px;background:url('/images/img/img-no-image.gif') no-repeat 50% 0;background-size:contain;}
.sec6 .onlineSwiper .items .List .inner div.thumbnail span.image-frame img {width:100%;vertical-align:middle;}
.sec6 .onlineSwiper .items .List .inner div.thumbnail div.detail-cover {position:absolute;left:0;right:0;top:0;height:100%;padding:0% 15px;border:1px solid #2e2e2e;font-size:12px;text-align:left;color:#fff;background-color:rgba(0,0,0,0.8);opacity:0;border-radius:10px;transition:opacity 0.3s ease;}
.sec6 .onlineSwiper .items .List .inner div.thumbnail div.detail-cover strong {display:block;margin:30px 0px 20px;font-size:18px;height:55px;overflow:hidden;}
.sec6 .onlineSwiper .items .List .inner div.thumbnail div.detail-cover ul li {line-height:23px;font-weight:100;}

View File

@ -1,383 +1,383 @@
//filter clk evt
function reference_filterClk(){
$(document).on("click","#referencelistForm [name=second_class],#referencelistForm [name=second_category],#referencelistForm [name=first_agency]",function(){
//first chk
if( $(this).parents('.depth-2').find('input:checkbox[name="' + event.target.name + '"]:checked').length >= 1){
$(this).parents('.depth-2').siblings('.depth-1').find('input').prop("checked", true);
}else{
$(this).parents('.depth-2').siblings('.depth-1').find('input').prop("checked", false);
}
//filter_mylist clk array
var filter_mylist = "";
var filter_mylist_clk = "";
var filter_agency = "";
var filter_agency_clk = "";
filter_agency = $('#filter_agency').val();
filter_mylist = $('#filter_mylist').val();
if($(this).attr('name') == 'second_class'){
filter_mylist_clk = 'class_'+$(this).val() +',';
}else if($(this).attr('name') == 'second_category'){
filter_mylist_clk = 'category_'+$(this).val() +',';
}else if($(this).attr('name') == 'first_agency'){
filter_mylist_clk = 'agency_'+$(this).val() +',';
//생산기관은 1depth 이므로 별도처리
filter_agency_clk = $(this).val() +",";
}
//생산기관은 1depth 이므로 별도처리
if($(this).is(":checked")){
filter_mylist += filter_mylist_clk;
filter_agency += filter_agency_clk;
}else{
filter_mylist = filter_mylist.replace(filter_mylist_clk,'');
filter_agency = filter_agency.replace(filter_agency,'');
}
$('#filter_mylist').val(filter_mylist);
$('#filter_agency').val(filter_agency);
//depth-1
var on_classArr = document.querySelectorAll("div.depth-1.on");
var filter_class = "" ;
var filter_category = "" ;
for(var i=0; i<on_classArr.length; i++){
if($(on_classArr[i]).find('input').attr('name') == 'first_class') {
filter_class = $(on_classArr[i]).find('input').val();
}else{
filter_category = $(on_classArr[i]).find('input').val();
}
}
var listForm = document.forms["referencelistForm"];
listForm.pageIndex.value = 1;
listForm.filter_class.value = filter_class;
listForm.filter_category.value = filter_category;
fnFilterSch();
});
}
function filter_creatYyyyAply(){
$(document).on("click","#referencelistForm button[class^='btn-apply']",function(){
var filter_mylist = "";
filter_mylist = $('#filter_mylist').val();
//전체
if($("#m-year-1").is(':checked') == true)
{
$("#filter_creatYyyy").val("all");
filter_mylist = filter_mylist.replace("creat_all","");
filter_mylist = filter_mylist.replace("creat_date,","");
filter_mylist += "creat_all,";
$("#filter_mylist").val(filter_mylist);
}
//생산년도 검색
if($("#m-year-2").is(':checked') == true)
{
if($("#creatYyyyStart").val() == "")
{
alert("생산년도 검색 시작일자를 입력해주세요.");
return false;
}
if($("#creatYyyyEnd").val() == "")
{
alert("생산년도 검색 종료일자를 입력해주세요.");
return false;
}
$("#filter_creatYyyy").val("date");
filter_mylist = filter_mylist.replace("creat_all","");
filter_mylist = filter_mylist.replace("creat_date,","");
filter_mylist += "creat_date,";
$("#filter_mylist").val(filter_mylist);
}
fnFilterSch();
});
}
//초기화
function reference_filterReset(){
$(document).on("click","#referencelistForm button[class^='btn-filter-reset']",function(){
$("#pageIndex").val("1");
$("#filter_creatYyyy").val("");
$("#creatYyyyStart").val("");
$("#creatYyyyEnd").val("");
$("#filter_class").val("");
$("#filter_category").val("");
$("#filter_agency").val("");
$("#filter_mylist").val("");
$("#referencelistForm [name=first_class],#referencelistForm [name=second_class],#referencelistForm [name=first_category],#referencelistForm [name=second_category],#referencelistForm [name=creatYyyyYn],#referencelistForm [name=first_agency]").prop("checked", false);
fnFilterSch();
});
}
//reference 결과 필터 del 클릭
function reference_filterDel(){
$(document).on("click","#referencelistForm button[id^='c_cate_data-type-chk'],#referencelistForm button[id^='j_cate_theme-chk'],#referencelistForm button[name=first_agency_del]",function(){
var s_cate_id = $(this).attr("id");
s_cate_id = s_cate_id.substring(s_cate_id.lastIndexOf("_")+1);
var reference_gubun_name = "";
if( $(this).attr('id').indexOf("theme-chk") != -1){
reference_gubun_name = "second_category";
}else if( $(this).attr('id').indexOf("data-type-chk")!= -1){
reference_gubun_name = "second_class";
}
//first
var first_nm = $(this).attr('id').replace('c_cate_', '').replace('j_cate_', '');
first_nm = first_nm.substring(0,first_nm.indexOf("_",-2)); //data-type-chk1-4
first_nm = first_nm.substring(0,first_nm.lastIndexOf("-")) ; //data-type-chk1
if($("#referencelistForm input:checkbox[id^='"+ first_nm +"-']:checked").length ==1){
$("input:checkbox[id='" + first_nm + "']").prop("checked", false);
}
//second
$("#referencelistForm input[name='"+ reference_gubun_name+ "']:input[value='"+s_cate_id+"']").each(function () {
$(this).prop("checked",false);
});
//filter_mylist clk array remove
var filter_mylist = "";
var filter_mylist_clk = "";
var filter_agency = "";
var filter_agency_clk = "";
filter_agency = $('#filter_agency').val();
filter_mylist = $('#filter_mylist').val();
if($(this).attr('id').indexOf('c_cate_data-type') >= 0 ){
filter_mylist_clk = 'class_'+ s_cate_id +',';
}else if($(this).attr('id').indexOf('j_cate_theme')>= 0 ){
filter_mylist_clk = 'category_'+ s_cate_id +',';
}else if($(this).attr('name').indexOf('first_agency_del')>= 0 ){
filter_mylist_clk = 'agency_'+ $(this).val() +',';
filter_agency_clk = $(this).val() +',';
}
filter_agency = filter_agency.replace(filter_agency_clk,'');
filter_mylist = filter_mylist.replace(filter_mylist_clk,'');
$('#filter_agency').val(filter_agency);
$('#filter_mylist').val(filter_mylist);
//depth-1
var on_classArr = document.querySelectorAll("div.depth-1.on");
var filter_class = "" ;
var filter_category = "" ;
for(var i=0; i<on_classArr.length; i++){
if($(on_classArr[i]).find('input').attr('name') == 'first_class') {
filter_class = $(on_classArr[i]).find('input').val();
}else{
filter_category = $(on_classArr[i]).find('input').val();
}
}
var listForm = document.forms["referencelistForm"];
listForm.pageIndex.value = 1;
listForm.filter_class.value = filter_class;
listForm.filter_category.value = filter_category;
fnFilterSch();
});
}
//reference 결과 필터 del 클릭(상세검색에 추가된 부분)
function reference_detailFilterDel(){
$(document).on("click","#referencelistForm .detailFilter",function(){
var filter_mylist = "";
var deleteFilterId = "";
filter_mylist = $('#filter_mylist').val();
deleteFilterId = $(this).attr('name').substring($(this).attr('name').indexOf("_",0)+1);
if($(this).attr('name') == "search_ageCode" && $(this).attr('name') == "search_collectionList")
{
if($("input[name="+$(this).attr('name')+"]").length == 1)
{
filter_mylist = filter_mylist.replace($(this).attr('name')+",",'');
}
var deleteFilterArr = $("#" + deleteFilterId).val().split(",");
$("#" + deleteFilterId).val(deleteFilterArr[0]);
for(var i=1; i < deleteFilterArr.length ; i++){
if($(this).val() != deleteFilterArr[i])
{
$("#" + deleteFilterId).val(",",deleteFilterArr[i]);
}
}
}else
{
filter_mylist = filter_mylist.replace($(this).attr('name')+",",'');
$("#" + deleteFilterId).val($("#" + deleteFilterId).val().replace($(this).val(),''));
}
fnFilterSch();
});
}
function fnLabel_reference(){
var mylist_arr = $("#referencelistForm [name=filter_mylist]").val().split(",");
var comparisonData;
for(var j=0; j < mylist_arr.length ; j++){
if(mylist_arr[j].indexOf("class") >= 0){
var checked = document.querySelectorAll("#referencelistForm [name='second_class']:checked");
for(var i=0; i<checked.length; i++){
var checkVal = util.xssCheck($(checked[i]).val());
if(mylist_arr[j].indexOf(checkVal) >= 0 ){
var second_cate_id = "c_cate_"+ $(checked[i]).attr('id') +"_id_" +checkVal ;
var first_cate_nm =$(checked[i]).parents('.depth-2').siblings('.depth-1').find('label').text();
var second_cate_nm = $(checked[i]).next().text();
first_cate_nm = first_cate_nm.substring(0,first_cate_nm.indexOf("(",-1));
second_cate_nm = second_cate_nm.substring(0,second_cate_nm.lastIndexOf("("));
if(comparisonData != second_cate_id){
first_cate_nm = util.xssCheck(first_cate_nm);
second_cate_nm = util.xssCheck(second_cate_nm);
second_cate_id = util.xssCheck(second_cate_id);
$("#reference_fillter_append").append("<li>"+ first_cate_nm + " &#62; "+ second_cate_nm + "<button type=\"button\" name=\"first_agency_del\" class=\"btn-del-filter\" id=\""+second_cate_id+"\">삭제</button></li>").text();
comparisonData = second_cate_id;
}
}
}
}
else if(mylist_arr[j].indexOf("category") >= 0){
var checked = document.querySelectorAll("#referencelistForm [name='second_category']:checked");
var comparisonData;
//필터라벨
for(var i=0; i<checked.length; i++){
var checkVal = util.xssCheck($(checked[i]).val());
if(mylist_arr[j].indexOf(checkVal) >= 0 ){
var second_cate_id = "j_cate_"+ $(checked[i]).attr('id') +"_id_" +checkVal ;
var first_cate_nm =$(checked[i]).parents('.depth-2').siblings('.depth-1').find('input').next().text();
var second_cate_nm = $(checked[i]).next().text();
first_cate_nm = first_cate_nm.substring(0,first_cate_nm.indexOf("(",-1));
second_cate_nm = second_cate_nm.substring(0,second_cate_nm.indexOf("(",-1));
if(comparisonData != second_cate_id){
first_cate_nm = util.xssCheck(first_cate_nm);
second_cate_nm = util.xssCheck(second_cate_nm);
second_cate_id = util.xssCheck(second_cate_id);
$("#reference_fillter_append").append("<li>"+ first_cate_nm + " &#62; "+ second_cate_nm + "<button type=\"button\" class=\"btn-del-filter\" id=\""+second_cate_id+"\">삭제</button></li>").text();
comparisonData = second_cate_id;
}
}
}
}
else if(mylist_arr[j].indexOf("creat_all") >= 0){
$("#reference_fillter_append").append("<li>생산년도 &#62; 전체<button type=\"button\" class=\"btn-del-filter\" id=\""+second_cate_id+"\">삭제</button></li>").text();
}
else if(mylist_arr[j].indexOf("creat_date") >= 0){
$("#reference_fillter_append").append("<li>생산년도 &#62; " + $("#creatYyyyStart").val() + "~" + $("#creatYyyyEnd").val() +"<button type=\"button\" class=\"btn-del-filter\" id=\""+second_cate_id+"\">삭제</button></li>").text();
}else if(mylist_arr[j].indexOf("agency") >= 0){
var second_cate_nm = mylist_arr[j].substring(mylist_arr[j].indexOf("_")+1);
$("#reference_fillter_append").append("<li>생산기관 &#62; "+ second_cate_nm + "<button type=\"button\" class=\"btn-del-filter\" id=\"\" name=\"first_agency_del\" >삭제</button></li>").text();
}else if(mylist_arr[j].indexOf("search_query") >= 0){
$("#reference_fillter_append").append("<li>검색어 &#62; "+ $("#realQuery").val() + "<button type=\"button\" class=\"btn-del-filter detailFilter\" id=\"\" name=\"search_query\">삭제</button></li>").text();
}else if(mylist_arr[j].indexOf("search_bookIndex") >= 0){
$("#reference_fillter_append").append("<li>목차 &#62; "+ $("#bookIndex").val() + "<button type=\"button\" class=\"btn-del-filter detailFilter\" id=\"\" name=\"search_bookIndex\">삭제</button></li>").text();
}else if(mylist_arr[j].indexOf("search_mngtNo") >= 0){
$("#reference_fillter_append").append("<li>관리번호 &#62; "+ $("#mngtNo").val() + "<button type=\"button\" class=\"btn-del-filter detailFilter\" id=\"\" name=\"search_mngtNo\">삭제</button></li>").text();
}else if(mylist_arr[j].indexOf("search_era") >= 0){
$("#reference_fillter_append").append("<li>연대 &#62; "+ $("#createStartDate").val() + "~" + $("#createEndDate").val() + "<button type=\"button\" class=\"btn-del-filter detailFilter\" id=\"\" name=\"search_era\">삭제</button></li>").text();
}else if(mylist_arr[j].indexOf("search_ageCode") >= 0){
var ageCode_arr = $("#referencelistForm [name=ageCode]").val().split(",");
for(var i=0; i < ageCode_arr.length ; i++)
{
$("#reference_fillter_append").append("<li>시대 &#62; "+ ageCodeNm(ageCode_arr[i]) + "<button type=\"button\" class=\"btn-del-filter detailFilter\" id=\"\" name=\"search_ageCode\" value=\"" + ageCode_arr[i] + "\">삭제</button></li>").text();
}
}else if(mylist_arr[j].indexOf("search_collectionList") >= 0){
var collectionList_arr = $("#referencelistForm [name=collectionList]").val().split(",");
for(var i=0; i < collectionList_arr.length ; i++)
{
$("#reference_fillter_append").append("<li>이용구분 &#62; "+ collectionNm(collectionList_arr[i]) + "<button type=\"button\" class=\"btn-del-filter detailFilter\" id=\"\" name=\"search_collectionList\" value=\"" + collectionList_arr[i] + "\">삭제</button></li>").text();
}
}
} //for end
}
function ageCodeNm(ageCode){
if(ageCode == null)
{
return ageCode;
}
if(ageCode == "03") return "선사";
if(ageCode == "04|05|06") return "고대";
if(ageCode == "07") return "고려";
if(ageCode == "08") return "조선";
if(ageCode == "11|12") return "근대";
if(ageCode == "13|14") return "현대";
if(ageCode == "02") return "시대미상";
return ageCode;
}
function collectionNm(collection){
if(collection == null)
{
return collection;
}
if(collection == "lib_online") return "온라인열람";
if(collection == "lib_loan") return "대출";
if(collection == "lib_offline") return "열람";
if(collection == "lib_etc") return "기타";
return collection;
}
function fnLabel_reference_detail(){
$('#referencelistForm input[name=sojang_council]').prop("checked",false);
$('#referencelistForm input[name=sido_name]').prop("checked",false);
$("#referencelistForm .cmm-list-chk").each(function (index, item) {
$(this).prop("checked",true);
});
$("#reference_council_append").empty();
var mylist_arr = $("#referencelistForm [name=filter_mylist]").val().split(",");
for(var j=0; j < mylist_arr.length ; j++){
if(mylist_arr[j].indexOf("council") >= 0){
var checked = document.querySelectorAll("#referencelistForm [name='sojang_council']:checked");
for(var i=0; i<checked.length; i++){
var checkVal = util.xssCheck($(checked[i]).val());
if(mylist_arr[j].indexOf(checkVal) >= 0 ){
var second_cate_id = $(checked[i]).attr('id')+"_id";
var second_cate_id_del = $(checked[i]).attr('id')+"_id_del";
var first_cate_nm =$(checked[i]).parents('.depth-2').siblings('.depth-1').find('input').next().text();
var second_cate_nm = $(checked[i]).next().text();
first_cate_nm = first_cate_nm.substring(0,first_cate_nm.indexOf("(",-1));
second_cate_nm = second_cate_nm.substring(0,second_cate_nm.indexOf("(",-1));
second_cate_id = util.xssCheck(second_cate_id);
second_cate_id_del = util.xssCheck(second_cate_id_del);
first_cate_nm = util.xssCheck(first_cate_nm);
second_cate_nm = util.xssCheck(second_cate_nm);
$("#reference_council_append").append("<li id=\""+second_cate_id+"\"><button type=\"button\" title=\"삭제\" id=\""+second_cate_id_del+"\"><span class=\"sign\">"+ first_cate_nm+" &gt; </span>"+ second_cate_nm+"</button></li>");
}
}
}//if end
}//for end
var checked2 = document.querySelectorAll("#referencelistForm [name='sido_name']:checked");
for(var i=0; i<checked2.length; i++){
$(checked2[i]).prop("checked", true);
}
}
function fnFilterSch(){
document.referencelistForm.action="/search/searchList.do";
document.referencelistForm.submit();
}
//filter clk evt
function reference_filterClk(){
$(document).on("click","#referencelistForm [name=second_class],#referencelistForm [name=second_category],#referencelistForm [name=first_agency]",function(){
//first chk
if( $(this).parents('.depth-2').find('input:checkbox[name="' + event.target.name + '"]:checked').length >= 1){
$(this).parents('.depth-2').siblings('.depth-1').find('input').prop("checked", true);
}else{
$(this).parents('.depth-2').siblings('.depth-1').find('input').prop("checked", false);
}
//filter_mylist clk array
var filter_mylist = "";
var filter_mylist_clk = "";
var filter_agency = "";
var filter_agency_clk = "";
filter_agency = $('#filter_agency').val();
filter_mylist = $('#filter_mylist').val();
if($(this).attr('name') == 'second_class'){
filter_mylist_clk = 'class_'+$(this).val() +',';
}else if($(this).attr('name') == 'second_category'){
filter_mylist_clk = 'category_'+$(this).val() +',';
}else if($(this).attr('name') == 'first_agency'){
filter_mylist_clk = 'agency_'+$(this).val() +',';
//생산기관은 1depth 이므로 별도처리
filter_agency_clk = $(this).val() +",";
}
//생산기관은 1depth 이므로 별도처리
if($(this).is(":checked")){
filter_mylist += filter_mylist_clk;
filter_agency += filter_agency_clk;
}else{
filter_mylist = filter_mylist.replace(filter_mylist_clk,'');
filter_agency = filter_agency.replace(filter_agency,'');
}
$('#filter_mylist').val(filter_mylist);
$('#filter_agency').val(filter_agency);
//depth-1
var on_classArr = document.querySelectorAll("div.depth-1.on");
var filter_class = "" ;
var filter_category = "" ;
for(var i=0; i<on_classArr.length; i++){
if($(on_classArr[i]).find('input').attr('name') == 'first_class') {
filter_class = $(on_classArr[i]).find('input').val();
}else{
filter_category = $(on_classArr[i]).find('input').val();
}
}
var listForm = document.forms["referencelistForm"];
listForm.pageIndex.value = 1;
listForm.filter_class.value = filter_class;
listForm.filter_category.value = filter_category;
fnFilterSch();
});
}
function filter_creatYyyyAply(){
$(document).on("click","#referencelistForm button[class^='btn-apply']",function(){
var filter_mylist = "";
filter_mylist = $('#filter_mylist').val();
//전체
if($("#m-year-1").is(':checked') == true)
{
$("#filter_creatYyyy").val("all");
filter_mylist = filter_mylist.replace("creat_all","");
filter_mylist = filter_mylist.replace("creat_date,","");
filter_mylist += "creat_all,";
$("#filter_mylist").val(filter_mylist);
}
//생산년도 검색
if($("#m-year-2").is(':checked') == true)
{
if($("#creatYyyyStart").val() == "")
{
alert("생산년도 검색 시작일자를 입력해주세요.");
return false;
}
if($("#creatYyyyEnd").val() == "")
{
alert("생산년도 검색 종료일자를 입력해주세요.");
return false;
}
$("#filter_creatYyyy").val("date");
filter_mylist = filter_mylist.replace("creat_all","");
filter_mylist = filter_mylist.replace("creat_date,","");
filter_mylist += "creat_date,";
$("#filter_mylist").val(filter_mylist);
}
fnFilterSch();
});
}
//초기화
function reference_filterReset(){
$(document).on("click","#referencelistForm button[class^='btn-filter-reset']",function(){
$("#pageIndex").val("1");
$("#filter_creatYyyy").val("");
$("#creatYyyyStart").val("");
$("#creatYyyyEnd").val("");
$("#filter_class").val("");
$("#filter_category").val("");
$("#filter_agency").val("");
$("#filter_mylist").val("");
$("#referencelistForm [name=first_class],#referencelistForm [name=second_class],#referencelistForm [name=first_category],#referencelistForm [name=second_category],#referencelistForm [name=creatYyyyYn],#referencelistForm [name=first_agency]").prop("checked", false);
fnFilterSch();
});
}
//reference 결과 필터 del 클릭
function reference_filterDel(){
$(document).on("click","#referencelistForm button[id^='c_cate_data-type-chk'],#referencelistForm button[id^='j_cate_theme-chk'],#referencelistForm button[name=first_agency_del]",function(){
var s_cate_id = $(this).attr("id");
s_cate_id = s_cate_id.substring(s_cate_id.lastIndexOf("_")+1);
var reference_gubun_name = "";
if( $(this).attr('id').indexOf("theme-chk") != -1){
reference_gubun_name = "second_category";
}else if( $(this).attr('id').indexOf("data-type-chk")!= -1){
reference_gubun_name = "second_class";
}
//first
var first_nm = $(this).attr('id').replace('c_cate_', '').replace('j_cate_', '');
first_nm = first_nm.substring(0,first_nm.indexOf("_",-2)); //data-type-chk1-4
first_nm = first_nm.substring(0,first_nm.lastIndexOf("-")) ; //data-type-chk1
if($("#referencelistForm input:checkbox[id^='"+ first_nm +"-']:checked").length ==1){
$("input:checkbox[id='" + first_nm + "']").prop("checked", false);
}
//second
$("#referencelistForm input[name='"+ reference_gubun_name+ "']:input[value='"+s_cate_id+"']").each(function () {
$(this).prop("checked",false);
});
//filter_mylist clk array remove
var filter_mylist = "";
var filter_mylist_clk = "";
var filter_agency = "";
var filter_agency_clk = "";
filter_agency = $('#filter_agency').val();
filter_mylist = $('#filter_mylist').val();
if($(this).attr('id').indexOf('c_cate_data-type') >= 0 ){
filter_mylist_clk = 'class_'+ s_cate_id +',';
}else if($(this).attr('id').indexOf('j_cate_theme')>= 0 ){
filter_mylist_clk = 'category_'+ s_cate_id +',';
}else if($(this).attr('name').indexOf('first_agency_del')>= 0 ){
filter_mylist_clk = 'agency_'+ $(this).val() +',';
filter_agency_clk = $(this).val() +',';
}
filter_agency = filter_agency.replace(filter_agency_clk,'');
filter_mylist = filter_mylist.replace(filter_mylist_clk,'');
$('#filter_agency').val(filter_agency);
$('#filter_mylist').val(filter_mylist);
//depth-1
var on_classArr = document.querySelectorAll("div.depth-1.on");
var filter_class = "" ;
var filter_category = "" ;
for(var i=0; i<on_classArr.length; i++){
if($(on_classArr[i]).find('input').attr('name') == 'first_class') {
filter_class = $(on_classArr[i]).find('input').val();
}else{
filter_category = $(on_classArr[i]).find('input').val();
}
}
var listForm = document.forms["referencelistForm"];
listForm.pageIndex.value = 1;
listForm.filter_class.value = filter_class;
listForm.filter_category.value = filter_category;
fnFilterSch();
});
}
//reference 결과 필터 del 클릭(상세검색에 추가된 부분)
function reference_detailFilterDel(){
$(document).on("click","#referencelistForm .detailFilter",function(){
var filter_mylist = "";
var deleteFilterId = "";
filter_mylist = $('#filter_mylist').val();
deleteFilterId = $(this).attr('name').substring($(this).attr('name').indexOf("_",0)+1);
if($(this).attr('name') == "search_ageCode" && $(this).attr('name') == "search_collectionList")
{
if($("input[name="+$(this).attr('name')+"]").length == 1)
{
filter_mylist = filter_mylist.replace($(this).attr('name')+",",'');
}
var deleteFilterArr = $("#" + deleteFilterId).val().split(",");
$("#" + deleteFilterId).val(deleteFilterArr[0]);
for(var i=1; i < deleteFilterArr.length ; i++){
if($(this).val() != deleteFilterArr[i])
{
$("#" + deleteFilterId).val(",",deleteFilterArr[i]);
}
}
}else
{
filter_mylist = filter_mylist.replace($(this).attr('name')+",",'');
$("#" + deleteFilterId).val($("#" + deleteFilterId).val().replace($(this).val(),''));
}
fnFilterSch();
});
}
function fnLabel_reference(){
var mylist_arr = $("#referencelistForm [name=filter_mylist]").val().split(",");
var comparisonData;
for(var j=0; j < mylist_arr.length ; j++){
if(mylist_arr[j].indexOf("class") >= 0){
var checked = document.querySelectorAll("#referencelistForm [name='second_class']:checked");
for(var i=0; i<checked.length; i++){
var checkVal = util.xssCheck($(checked[i]).val());
if(mylist_arr[j].indexOf(checkVal) >= 0 ){
var second_cate_id = "c_cate_"+ $(checked[i]).attr('id') +"_id_" +checkVal ;
var first_cate_nm =$(checked[i]).parents('.depth-2').siblings('.depth-1').find('label').text();
var second_cate_nm = $(checked[i]).next().text();
first_cate_nm = first_cate_nm.substring(0,first_cate_nm.indexOf("(",-1));
second_cate_nm = second_cate_nm.substring(0,second_cate_nm.lastIndexOf("("));
if(comparisonData != second_cate_id){
first_cate_nm = util.xssCheck(first_cate_nm);
second_cate_nm = util.xssCheck(second_cate_nm);
second_cate_id = util.xssCheck(second_cate_id);
$("#reference_fillter_append").append("<li>"+ first_cate_nm + " &#62; "+ second_cate_nm + "<button type=\"button\" name=\"first_agency_del\" class=\"btn-del-filter\" id=\""+second_cate_id+"\">삭제</button></li>").text();
comparisonData = second_cate_id;
}
}
}
}
else if(mylist_arr[j].indexOf("category") >= 0){
var checked = document.querySelectorAll("#referencelistForm [name='second_category']:checked");
var comparisonData;
//필터라벨
for(var i=0; i<checked.length; i++){
var checkVal = util.xssCheck($(checked[i]).val());
if(mylist_arr[j].indexOf(checkVal) >= 0 ){
var second_cate_id = "j_cate_"+ $(checked[i]).attr('id') +"_id_" +checkVal ;
var first_cate_nm =$(checked[i]).parents('.depth-2').siblings('.depth-1').find('input').next().text();
var second_cate_nm = $(checked[i]).next().text();
first_cate_nm = first_cate_nm.substring(0,first_cate_nm.indexOf("(",-1));
second_cate_nm = second_cate_nm.substring(0,second_cate_nm.indexOf("(",-1));
if(comparisonData != second_cate_id){
first_cate_nm = util.xssCheck(first_cate_nm);
second_cate_nm = util.xssCheck(second_cate_nm);
second_cate_id = util.xssCheck(second_cate_id);
$("#reference_fillter_append").append("<li>"+ first_cate_nm + " &#62; "+ second_cate_nm + "<button type=\"button\" class=\"btn-del-filter\" id=\""+second_cate_id+"\">삭제</button></li>").text();
comparisonData = second_cate_id;
}
}
}
}
else if(mylist_arr[j].indexOf("creat_all") >= 0){
$("#reference_fillter_append").append("<li>생산년도 &#62; 전체<button type=\"button\" class=\"btn-del-filter\" id=\""+second_cate_id+"\">삭제</button></li>").text();
}
else if(mylist_arr[j].indexOf("creat_date") >= 0){
$("#reference_fillter_append").append("<li>생산년도 &#62; " + $("#creatYyyyStart").val() + "~" + $("#creatYyyyEnd").val() +"<button type=\"button\" class=\"btn-del-filter\" id=\""+second_cate_id+"\">삭제</button></li>").text();
}else if(mylist_arr[j].indexOf("agency") >= 0){
var second_cate_nm = mylist_arr[j].substring(mylist_arr[j].indexOf("_")+1);
$("#reference_fillter_append").append("<li>생산기관 &#62; "+ second_cate_nm + "<button type=\"button\" class=\"btn-del-filter\" id=\"\" name=\"first_agency_del\" >삭제</button></li>").text();
}else if(mylist_arr[j].indexOf("search_query") >= 0){
$("#reference_fillter_append").append("<li>검색어 &#62; "+ $("#realQuery").val() + "<button type=\"button\" class=\"btn-del-filter detailFilter\" id=\"\" name=\"search_query\">삭제</button></li>").text();
}else if(mylist_arr[j].indexOf("search_bookIndex") >= 0){
$("#reference_fillter_append").append("<li>목차 &#62; "+ $("#bookIndex").val() + "<button type=\"button\" class=\"btn-del-filter detailFilter\" id=\"\" name=\"search_bookIndex\">삭제</button></li>").text();
}else if(mylist_arr[j].indexOf("search_mngtNo") >= 0){
$("#reference_fillter_append").append("<li>관리번호 &#62; "+ $("#mngtNo").val() + "<button type=\"button\" class=\"btn-del-filter detailFilter\" id=\"\" name=\"search_mngtNo\">삭제</button></li>").text();
}else if(mylist_arr[j].indexOf("search_era") >= 0){
$("#reference_fillter_append").append("<li>연대 &#62; "+ $("#createStartDate").val() + "~" + $("#createEndDate").val() + "<button type=\"button\" class=\"btn-del-filter detailFilter\" id=\"\" name=\"search_era\">삭제</button></li>").text();
}else if(mylist_arr[j].indexOf("search_ageCode") >= 0){
var ageCode_arr = $("#referencelistForm [name=ageCode]").val().split(",");
for(var i=0; i < ageCode_arr.length ; i++)
{
$("#reference_fillter_append").append("<li>시대 &#62; "+ ageCodeNm(ageCode_arr[i]) + "<button type=\"button\" class=\"btn-del-filter detailFilter\" id=\"\" name=\"search_ageCode\" value=\"" + ageCode_arr[i] + "\">삭제</button></li>").text();
}
}else if(mylist_arr[j].indexOf("search_collectionList") >= 0){
var collectionList_arr = $("#referencelistForm [name=collectionList]").val().split(",");
for(var i=0; i < collectionList_arr.length ; i++)
{
$("#reference_fillter_append").append("<li>이용구분 &#62; "+ collectionNm(collectionList_arr[i]) + "<button type=\"button\" class=\"btn-del-filter detailFilter\" id=\"\" name=\"search_collectionList\" value=\"" + collectionList_arr[i] + "\">삭제</button></li>").text();
}
}
} //for end
}
function ageCodeNm(ageCode){
if(ageCode == null)
{
return ageCode;
}
if(ageCode == "03") return "선사";
if(ageCode == "04|05|06") return "고대";
if(ageCode == "07") return "고려";
if(ageCode == "08") return "조선";
if(ageCode == "11|12") return "근대";
if(ageCode == "13|14") return "현대";
if(ageCode == "02") return "시대미상";
return ageCode;
}
function collectionNm(collection){
if(collection == null)
{
return collection;
}
if(collection == "lib_online") return "온라인열람";
if(collection == "lib_loan") return "대출";
if(collection == "lib_offline") return "열람";
if(collection == "lib_etc") return "기타";
return collection;
}
function fnLabel_reference_detail(){
$('#referencelistForm input[name=sojang_council]').prop("checked",false);
$('#referencelistForm input[name=sido_name]').prop("checked",false);
$("#referencelistForm .cmm-list-chk").each(function (index, item) {
$(this).prop("checked",true);
});
$("#reference_council_append").empty();
var mylist_arr = $("#referencelistForm [name=filter_mylist]").val().split(",");
for(var j=0; j < mylist_arr.length ; j++){
if(mylist_arr[j].indexOf("council") >= 0){
var checked = document.querySelectorAll("#referencelistForm [name='sojang_council']:checked");
for(var i=0; i<checked.length; i++){
var checkVal = util.xssCheck($(checked[i]).val());
if(mylist_arr[j].indexOf(checkVal) >= 0 ){
var second_cate_id = $(checked[i]).attr('id')+"_id";
var second_cate_id_del = $(checked[i]).attr('id')+"_id_del";
var first_cate_nm =$(checked[i]).parents('.depth-2').siblings('.depth-1').find('input').next().text();
var second_cate_nm = $(checked[i]).next().text();
first_cate_nm = first_cate_nm.substring(0,first_cate_nm.indexOf("(",-1));
second_cate_nm = second_cate_nm.substring(0,second_cate_nm.indexOf("(",-1));
second_cate_id = util.xssCheck(second_cate_id);
second_cate_id_del = util.xssCheck(second_cate_id_del);
first_cate_nm = util.xssCheck(first_cate_nm);
second_cate_nm = util.xssCheck(second_cate_nm);
$("#reference_council_append").append("<li id=\""+second_cate_id+"\"><button type=\"button\" title=\"삭제\" id=\""+second_cate_id_del+"\"><span class=\"sign\">"+ first_cate_nm+" &gt; </span>"+ second_cate_nm+"</button></li>");
}
}
}//if end
}//for end
var checked2 = document.querySelectorAll("#referencelistForm [name='sido_name']:checked");
for(var i=0; i<checked2.length; i++){
$(checked2[i]).prop("checked", true);
}
}
function fnFilterSch(){
document.referencelistForm.action="/search/searchList.do";
document.referencelistForm.submit();
}