소스정리작업

This commit is contained in:
KNKIM 2021-11-18 16:39:34 +09:00
parent 15acbbc190
commit 65af908108
12 changed files with 80 additions and 1197 deletions

View File

@ -54,36 +54,4 @@ public interface RentService
*/
public Map<String, String> getRentStats(String mbInfoId);
//
// /**
// * 반납 연기 목록을 조회한다.
// *
// * @param reqVO
// * @return
// */
// public DataApiResVO listPostpones(DataApiReqVO reqVO);
//
// /**
// * 대출 취소 목록을 조회한다.
// *
// * @param reqVO
// * @return
// */
// public DataApiResVO listCanceledRentItems(DataApiReqVO reqVO);
//
// /**
// * 대출 예약 목록을 조회한다.
// *
// * @param reqVO
// * @return
// */
// public DataApiResVO listReservations(DataApiReqVO reqVO);
//
// public DataApiResVO cancelReservations(DataApiReqVO reqVO);
//
// public DataApiResVO listRequestsForViewingItem(DataApiReqVO reqVO);
//
// public DataApiResVO selectRequestInfoForViewingItem(DataApiReqVO reqVO);
}

View File

@ -1,89 +0,0 @@
package nlib.col.service.impl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;
import nlib.restful.DataApi;
import nlib.restful.service.DataApiReqVO;
import nlib.restful.service.DataApiResVO;
@Repository("rentDAO_BK")
public class RentDAO_BK extends DataApi
{
private static final Logger log = LoggerFactory.getLogger(RentDAO.class);
/**
* 자원의 URI
*/
public static final String RESOURCE_URI = "/uac/service/col/rent";
/**
* 대출 목록 조회한다.
*
* @param reqVO
* @return
*/
public DataApiResVO listRentItems(DataApiReqVO reqVO) {
reqVO.setReqUrl(RESOURCE_URI + "/list");
return request(reqVO);
}
/**
* 반납 연기 목록을 조회한다.
*
* @param reqVO
* @return
*/
public DataApiResVO listPostpones(DataApiReqVO reqVO) {
reqVO.setReqUrl(RESOURCE_URI + "/list");
return request(reqVO);
}
/**
* 대출 취소 목록을 조회한다.
*
* @param reqVO
* @return
*/
public DataApiResVO listCanceledRentItems(DataApiReqVO reqVO) {
reqVO.setReqUrl(RESOURCE_URI + "/list");
return request(reqVO);
}
/**
* 대출 예약 목록을 조회한다.
*
* @param reqVO
* @return
*/
public DataApiResVO listReservations(DataApiReqVO reqVO) {
reqVO.setReqUrl(RESOURCE_URI + "/list");
return request(reqVO);
}
public DataApiResVO cancelReservations(DataApiReqVO reqVO) {
return null;
}
/**
* 열람 요청 목록을 조회한다.
*
* @param reqVO
* @return
*/
public DataApiResVO listRequestsForViewingItem(DataApiReqVO reqVO) {
reqVO.setReqUrl(RESOURCE_URI + "/read/list");
return request(reqVO);
}
public DataApiResVO selectRequestInfoForViewingItem(DataApiReqVO reqVO) {
reqVO.setReqUrl(RESOURCE_URI + "/read");
return request(reqVO);
}
}

View File

@ -232,57 +232,4 @@ public class RentServiceImpl implements RentService
return retMap;
}
//
// /*
// * 반납 연기 목록을 조회한다.
// *
// * (non-Javadoc)
// * @see nlib.col.service.RentService#listPostpones(nlib.restful.service.DataApiReqVO)
// */
// public DataApiResVO listPostpones(DataApiReqVO reqVO) {
// return rentDAO.listPostpones(reqVO);
// }
// /*
// * 대출 취소 목록을 조회한다.
// *
// * (non-Javadoc)
// * @see nlib.col.service.RentService#listCanceledRentItems(nlib.restful.service.DataApiReqVO)
// */
// public DataApiResVO listCanceledRentItems(DataApiReqVO reqVO) {
// return rentDAO.listCanceledRentItems(reqVO);
// }
//
// /*
// * 대출 예약 목록을 조회한다.
// *
// * (non-Javadoc)
// * @see nlib.col.service.RentService#listReservations(nlib.restful.service.DataApiReqVO)
// */
// public DataApiResVO listReservations(DataApiReqVO reqVO) {
// return rentDAO.listReservations(reqVO);
// }
//
// public DataApiResVO cancelReservations(DataApiReqVO reqVO) {
// return null;
// }
//
// /*
// * 열람 요청 목록을 조회한다.
// *
// * (non-Javadoc)
// * @see nlib.col.service.RentService#listRequestsForViewingItem(nlib.restful.service.DataApiReqVO)
// */
// public DataApiResVO listRequestsForViewingItem(DataApiReqVO reqVO) {
// return rentDAO.listRequestsForViewingItem(reqVO);
// }
// /*
// * 열람 요청 상세 조회한다.
// *
// * (non-Javadoc)
// * @see nlib.col.service.RentService#listRequestsForViewingItem(nlib.restful.service.DataApiReqVO)
// */
// public DataApiResVO selectRequestInfoForViewingItem(DataApiReqVO reqVO) {
// return rentDAO.selectRequestInfoForViewingItem(reqVO);
// }
}

View File

@ -46,7 +46,6 @@ function fn_getMemberCard() {
<div class="search-input">
<input type="text" placeholder="" title="검색어 입력" name="query" id="top_query" class="ark_query" value="" autocomplete="off"><label for="top_query" style="display:none">검색어</label>
<button type="button" class="btn-search" id="searchHeaderButton" onclick="goSearch();"><span>검색</span></button>
<!-- <button type="button" class="btn-search-detail" id="btn-search-detail-cl" onclick="javascript:fn_layerPop('${pageContext.request.contextPath}/search/getDetailedSearchFormPopup.do');">상세검색</button> -->
<button type="button" class="btn-search-detail" id="btn-search-detail-cl">상세<span>검색</span></button>
</div>
<div class="condition_sear">

View File

@ -124,12 +124,12 @@ function fn_search(reqStatusDivCd) {
div.attr('class', 'list');
div.append($('<div />').attr('class', 'n-cultural').html("[" + obj.mngOrgNm + "]"));
div.append($('<div />').attr('class', 'n-data').html("<a href=\"javascript:void(0)\" onclick=\"fn_viewDetail('" + obj.masterId + "')\">" + obj.title + "</a>"));
div.append($('<div />').attr('class', 'n-subscription').html('<span class="date">' + fn_formatDateStr(obj.reqDd,"-") + '</span>')); /* 신청일자 */
div.append($('<div />').attr('class', 'n-subscription').html('<span class="date">' + gfn_formatDateStr(obj.reqDd,"-") + '</span>')); /* 신청일자 */
div.append($('<div />').attr('class', 'n-visit').html(
'<span class="date">' + fn_formatDateStr(obj.hopeReqPridDtmFrom,"-") + '</span><span class="date">' + fn_formatDateStr(obj.hopeReqPridDtmTo,"-") + '</span>'
'<span class="date">' + gfn_formatDateStr(obj.hopeReqPridDtmFrom,"-") + '</span><span class="date">' + gfn_formatDateStr(obj.hopeReqPridDtmTo,"-") + '</span>'
)); /* 희망열람기간 */
div.append($('<div />').attr('class', 'n-return').html(
'<span class="date">' + fn_formatDateStr(obj.reqPsblDtmFrom,"-") + '</span><span class="date">' + fn_formatDateStr(obj.reqPsblDtmTo,"-") + '</span>'
'<span class="date">' + gfn_formatDateStr(obj.reqPsblDtmFrom,"-") + '</span><span class="date">' + gfn_formatDateStr(obj.reqPsblDtmTo,"-") + '</span>'
)); /* 방문예정일자 */
var statusHtml1 = "";
@ -141,17 +141,17 @@ function fn_search(reqStatusDivCd) {
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>';
} else if(obj.reqStatusDivCd == "A1") { // 승인
statusHtml1 = '<span class="ti poss">' + obj.reqStatusDivNm + '<span class="da">' + fn_formatDateStr(obj.modDd,"-") + '</span></span>';
statusHtml1 = '<span class="ti poss">' + obj.reqStatusDivNm + '<span class="da">' + gfn_formatDateStr(obj.modDd,"-") + '</span></span>';
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>';
statusHtml1 = '<span class="ti poss">' + obj.reqStatusDivNm + '<span class="da">' + gfn_formatDateStr(obj.modDd,"-") + '</span></span>';
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>';
statusHtml1 = '<span class="ti imposs">' + obj.reqStatusDivNm + '<span class="da">' + gfn_formatDateStr(obj.modDd,"-") + '</span></span>';
statusHtml2 = '';
} else if(obj.reqStatusDivCd == "C" || obj.reqStatusDivCd == "D") { // 취소, 미열람
statusHtml1 = '<span class="ti imposs">' + obj.reqStatusDivNm + '<span class="da">' + fn_formatDateStr(obj.modDd,"-") + '</span></span>';
statusHtml1 = '<span class="ti imposs">' + obj.reqStatusDivNm + '<span class="da">' + gfn_formatDateStr(obj.modDd,"-") + '</span></span>';
statusHtml2 = '';
}

View File

@ -1,159 +0,0 @@
<%
/**
* <pre>
* @Class Name : listCanceledRentItems.jsp
*
* @Description : 대출 취소목록을 조회한다.
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 7. 21. JSYOO 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP JSYOO
* @since 2021. 7. 21.
* @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>
<!-- 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>
window.onload = function() {
//=======================================================
// 그리드 생성 환경설정
//=======================================================
$("#jsGrid").jsGrid({
pageSize : $("#pageSize").val(),
controller: {
loadData: function (filter) { // 그리드에 데이터를 가져올 때 실팽되는 함수
var data = $.Deferred();
//======================================
// 요청 정보 구성 : 시작 (각 요청에 맞게 조정)
//======================================
var reqUrl = "${pageContext.request.contextPath}/rent/listCanceledRentItemsAjax.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
},
//======================================
// 그리드 컬럼 정의 (각 요청에 맞게 조정)
//======================================
fields: [
{ title:"번호", name: "articleNo" , type: "number" , width: 50, align: "center"},
{ title:"자료명", name: "rentItem", type: "text" , width: 200, align: "center" },
{ title:"관리번호", name: "ctrlNum", type: "number", width: 50, align: "center" },
{ title:"저자", name: "author", type: "text", width: 100, align: "center"},
{ title:"출판사", name: "publisher", type: "text", width: 100, align: "center"},
{ title:"취소일자", name: "rentDate", type: "text", width: 100, align: "center"}
]
});
// 페이지 크기 변경시 재조회
$("#pageSize").on("change", function(e) {
fn_search_article($("#pageSize").val(), 1);
});
// 검색 버튼 클릭
$("#btnSearch").on("click", function(e) {
fn_search_article($("#pageSize").val(), 1);
});
//초기 자료 조회
fn_search_article();
}; // window.onload
// 그리드 데이터 조회 호출
function fn_search_article(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>
<form name="articleForm" id="articleForm"
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" 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,170 +0,0 @@
<%
/**
* <pre>
* @Class Name : listPostpones.jsp
*
* @Description : 반납 연기 목록을 조회한다.
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 7. 30. JSYOO 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP JSYOO
* @since 2021. 7. 30.
* @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>
<!-- 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>
window.onload = function() {
//=======================================================
// 그리드 생성 환경설정
//=======================================================
$("#jsGrid").jsGrid({
pageSize : $("#pageSize").val(),
controller: {
loadData: function (filter) { // 그리드에 데이터를 가져올 때 실팽되는 함수
var data = $.Deferred();
//======================================
// 요청 정보 구성 : 시작 (각 요청에 맞게 조정)
//======================================
var reqUrl = "${pageContext.request.contextPath}/rent/listPostponesAjax.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"];
},
//======================================
// 그리드 컬럼 정의 (각 요청에 맞게 조정)
//======================================
fields: [
{ title:"번호", name: "articleNo" , type: "number" , width: 50, align: "center"},
{ title:"자료명", name: "rentItem", type: "text" , width: 200, align: "center" },
{ title:"관리번호", name: "ctrlNum", type: "number", width: 50, align: "center" },
{ title:"저자", name: "author", type: "text", width: 100, align: "center"},
{ title:"출판사", name: "publisher", type: "text", width: 100, align: "center"},
{ title:"대여일", name: "rentDate", type: "text", width: 100, align: "center"},
{ title:"반납예정일", name: "retDueDate", type: "text", width: 100, align: "center"}
]
});
// 페이지 크기 변경시 재조회
$("#pageSize").on("change", function(e) {
fn_search_article($("#pageSize").val(), 1);
});
// 검색 버튼 클릭
$("#btnSearch").on("click", function(e) {
fn_search_article($("#pageSize").val(), 1);
});
//초기 자료 조회
fn_search_article();
}; // window.onload
// 그리드 데이터 조회 호출
function fn_search_article(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>
<form name="articleForm" id="articleForm"
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" value="검색" />
<div id="jsGrid" name="jsGrid" style="height: 100%"></div>
<input type="text" name="articleNo" id="articleNo" value="" title="선택글번호" readonly />
<input type="button" value="대출 취소목록" onClick="location.href='${pageContext.request.contextPath}/rent/listCanceledRentItems.do'">
<input type="button" value="반납 연기" onClick="location.href='${pageContext.request.contextPath}/rent/listCanceledRentItems.do'">
</form>
</body>
</html>

View File

@ -127,9 +127,9 @@ function fn_search(bookLtRvStatusCd) {
div.attr('class', 'list');
div.append($('<div />').attr('class', 'n-cultural').html("[" + obj.mngOrgNm + "]"));
div.append($('<div />').attr('class', 'n-data').html("<a href=\"javascript:void(0)\" onclick=\"fn_viewDetail('" + obj.masterId + "')\">" + obj.title + "</a>"));
div.append($('<div />').attr('class', 'n-reservation').html(fn_formatDateStr(obj.rsrvDd,"-"))); /* 대출신청예약일자 */
div.append($('<div />').attr('class', 'n-expiry').html(fn_formatDateStr(obj.rsrvExpctDd,"-"))); /* 대출예약만료일자 */
div.append($('<div />').attr('class', 'n-return').html(fn_formatDateStr(obj.rtnExpctDd,"-"))); /* 반납일자 */
div.append($('<div />').attr('class', 'n-reservation').html(gfn_formatDateStr(obj.rsrvDd,"-"))); /* 대출신청예약일자 */
div.append($('<div />').attr('class', 'n-expiry').html(gfn_formatDateStr(obj.rsrvExpctDd,"-"))); /* 대출예약만료일자 */
div.append($('<div />').attr('class', 'n-return').html(gfn_formatDateStr(obj.rtnExpctDd,"-"))); /* 반납일자 */
var statusHtml = "";
if(obj.bookLtRvStatusCd == null) {
@ -137,7 +137,7 @@ function fn_search(bookLtRvStatusCd) {
} else if(obj.bookLtRvStatusCd.startsWith("A")) {
statusHtml = "<button type='button' onclick='fn_cancel(\"" + obj.title + "\",\"" + obj.bookLtRvStatusNm + "\",\"" + obj.mngOrgCd + "\", \"" + obj.rsrvId + "\")'>취소</button>";
} else if(obj.bookLtRvStatusCd.startsWith("R")) {
statusHtml = "&nbsp;<span>" + fn_formatDateStr(obj.rtnDd,"-") + "</span>";
statusHtml = "&nbsp;<span>" + gfn_formatDateStr(obj.rtnDd,"-") + "</span>";
}
div.append($('<div />').attr('class', 'n-use').html("<span>" + obj.bookLtRvStatusNm + "</span>" + statusHtml));

View File

@ -1,179 +0,0 @@
<%
/**
* <pre>
* @Class Name : listRequestsForViewingItem.jsp
*
* @Description : 열람 요청을 조회한다.
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 7. 21. JSYOO 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP JSYOO
* @since 2021. 7. 21.
* @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>
<!-- 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">
window.onload = function() {
//=======================================================
// 그리드 생성 환경설정
//=======================================================
$("#jsGrid").jsGrid({
pageSize : $("#pageSize").val(),
controller: {
loadData: function (filter) { // 그리드에 데이터를 가져올 때 실팽되는 함수
var data = $.Deferred();
//======================================
// 요청 정보 구성 : 시작 (각 요청에 맞게 조정)
//======================================
var reqUrl = "${pageContext.request.contextPath}/rent/listRequestsForViewingItemAjax.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_view_detail(articleNo);
},
//======================================
// 그리드 컬럼 정의 (각 요청에 맞게 조정)
//======================================
fields: [
{ title:"번호", name: "articleNo" , type: "number" , width: 50, align: "center"},
{ title:"자료명", name: "rentItem", type: "text" , width: 200, align: "center" },
{ title:"관리번호", name: "ctrlNum", type: "number", width: 50, align: "center" },
{ title:"저자", name: "author", type: "text", width: 100, align: "center"},
{ title:"출판사", name: "publisher", type: "text", width: 100, align: "center"},
{ title:"요청일자", name: "reqDate", type: "text", width: 100, align: "center"},
{ title:"상태", name: "state", type: "text", width: 100, align: "center"},
{ title:"열람기간", name: "readingPeriod", type: "text", width: 80, align: "center"}
]
});
// 페이지 크기 변경시 재조회
$("#pageSize").on("change", function(e) {
fn_search_article($("#pageSize").val(), 1);
});
// 검색 버튼 클릭
$("#btnSearch").on("click", function(e) {
fn_search_article($("#pageSize").val(), 1);
});
//초기 자료 조회
fn_search_article();
}; // window.onload
// 선택한 게시글 상세 보기로 이동
function fn_view_detail(articleNo) {
$("#articleNo").val(articleNo);
$("#articleForm").attr("action", "${pageContext.request.contextPath}/rent/selectRequestInfoForViewingItem.do");
$("#articleForm").submit();
}
// 그리드 데이터 조회 호출
function fn_search_article(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>
<form name="articleForm" id="articleForm"
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" 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,187 +0,0 @@
<%
/**
* <pre>
* @Class Name : listReserVations.jsp
*
* @Description : 대출 예약 목록을 조회한다.
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 7. 21. JSYOO 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP JSYOO
* @since 2021. 7. 21.
* @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>
<!-- 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">
window.onload = function() {
//=======================================================
// 그리드 생성 환경설정
//=======================================================
$("#jsGrid").jsGrid({
pageSize : $("#pageSize").val(),
controller: {
loadData: function (filter) { // 그리드에 데이터를 가져올 때 실팽되는 함수
var data = $.Deferred();
//======================================
// 요청 정보 구성 : 시작 (각 요청에 맞게 조정)
//======================================
var reqUrl = "${pageContext.request.contextPath}/rent/listReservationsAjax.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_view_detail(articleNo);
},
//======================================
// 그리드 컬럼 정의 (각 요청에 맞게 조정)
//======================================
fields: [
{ title:"번호", name: "articleNo" , type: "number" , width: 50, align: "center"},
{ title:"자료명", name: "rentItem", type: "text" , width: 200, align: "center" },
{ title:"관리번호", name: "ctrlNum", type: "number", width: 50, align: "center" },
{ title:"저자", name: "author", type: "text", width: 100, align: "center"},
{ title:"출판사", name: "publisher", type: "text", width: 100, align: "center"},
{ title:"예약일", name: "rentDate", type: "text", width: 100, align: "center"},
{ title:"반납예정일", name: "retDueDate", type: "text", width: 100, align: "center"},
{ title:"예약취소", name:"", type: "text", width: 80, align: "center" , itemTemplate: function (_, item) {
var btn = $("<button type='button'>").text("취소").click(function (e) {
alert("Clicked!");
e.stopPropagation();
});
return $("<div>").append(item.loanExtension).append("&nbsp;&nbsp;&nbsp;").append(btn);
}
}
]
});
// 페이지 크기 변경시 재조회
$("#pageSize").on("change", function(e) {
fn_search_article($("#pageSize").val(), 1);
});
// 검색 버튼 클릭
$("#btnSearch").on("click", function(e) {
fn_search_article($("#pageSize").val(), 1);
});
//초기 자료 조회
fn_search_article();
}; // window.onload
// 선택한 게시글 상세 보기로 이동
function fn_view_detail(articleNo) {
$("#articleNo").val(articleNo);
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/selectQnA.do");
$("#articleForm").submit();
}
// 그리드 데이터 조회 호출
function fn_search_article(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>
<form name="articleForm" id="articleForm"
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" 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,169 +0,0 @@
<%
/**
* <pre>
* @Class Name : selectRequestInfoForViewingItem.jsp
*
* @Description : 열람요청 상세내용을 조회한다.
*
*
* @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
*
* </pre>
*
* @ ------------ -------- ---------------------------
* @ 수정일 수정자 수정내용
* @ ------------ -------- ---------------------------
* @ 2021. 7. 30. JSYOO 최초 생성
*
*
* @author 이씨플라자 * DIGITALSHIP JSYOO
* @since 2021. 7. 30.
* @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}/rent/selectRequestInfoForViewingItem.do");
$("#articleForm").submit();
}
// 선택한 게시글 상세 보기로 이동
function fn_list() {
$("#articleForm").attr("action", "${pageContext.request.contextPath}/rent/listRequestForViewingItem.do");
$("#articleForm").submit();
}
// 수정 화면 이동
function fn_updateForm(passwd) {
if(passwd == null || passwd == "") {
alert("수정을 위한 게시물의 비밀번호를 입력하여 주시기 바랍니다.");
return;
}
$("#articlePassword").val(passwd);
$("#articleForm").attr("action", "${pageContext.request.contextPath}/rent/updateRequestInfoForViewingItemForm.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}/rent/deleteRequestInfoForViewingItem.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/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="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">${article.contentQeustFile}</td>
</tr>
<tr>
<th rowspan="2">답변내용</th>
<td colspan="4">${article.contentReply}</td>
</tr>
<tr>
<td colspan="4">${article.contentReplyFile}</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>
</body>
</html>

View File

@ -1,89 +1,44 @@
/*
*
* NLIB 공통 JavaScript
*
*
*/
var CONTEXT_PATH = "";
//---------------------------------------------------------------------------------------------------------------
// 레이어 팝업 관련 함수
//---------------------------------------------------------------------------------------------------------------
// 팝업으로 비밀번호를 입력받아서 콜백함수에 전달한다.
function fn_promptPassword(msg, placeholder, callbackFucName) {
var options = "top=200, left=200, width=300, height=200, status=no, menubar=no, toolbar=yes, resizable=no";
var thePrompt = window.open("", "_NLIB_POMPT_PASSWORD", options);
var theHTML = "<html><head><title>" + placeholder + "</title><style type='text/css'> body { background-color: #ffd; } button { margin: 10px; }</style></head><body>";
function fn_layerPopWithClass(url, addClasses) {
// 클릭 시, 로딩되도록 처리 (2021.10.20)
$("#NLIB_LAYER_POPUP").removeClass();
$("#NLIB_LAYER_POPUP").addClass(addClasses);
$("#NLIB_LAYER_POPUP").load(url);
theHTML += "<p>" + msg + "</p>";
theHTML += "<br/>";
theHTML += "비밀번호: <input type='text' id='thePass' placeholder='" + placeholder + "'/>";
theHTML += "&nbsp;<br />";
theHTML += "&nbsp;<br />";
theHTML += "<button title='확인' id='thePromptOk' onclick='opener.parent." + callbackFucName + "("
+ "document.getElementById(\"thePass\").value); window.close();'>확인</button>";
theHTML += "<button title='취소' id='thePromptClose' onclick='window.close();'>취소</button>";
theHTML += "</body></html>";
var classes = addClasses.split(" ");
thePrompt.document.body.innerHTML = theHTML;
}
/**
* ID를 name 으로 하는 객체의 값을 숫자(10진수) 변환하여 리턴한다.
* 값이 적절하지 않은 경우, defaultValue를 리턴한다.
*
* @param name
* @param defaultValue
* @returns
*/
function fn_getIntValue(name, defaultValue) {
var val = $("#" + name).val();
try {
return parseInt(val, 10);
} catch(error) {
console.error(error);
return defaultValue;
}
}
const POPUP_DEFAULT_WIDTH = 600; // 팝업 기본 창 가로 크기
const POPUP_DEFAULT_HEIGHT = 600; // 팝업 기본 창 세로 크기
/**
* 팝업을 생성하고 해당 URL로 접속한다.
*
* @param url
* @param popName
* @param width 생략 POPUP_DEFAULT_WIDTH
* @param height 생략 POPUP_DEFAULT_HEIGHT
* @returns
*/
function openPopup(url, popName, width, height) {
var options = "top=10, left=10, width=" + (width?width:POPUP_DEFAULT_WIDTH) + ", height=" + (height?height:POPUP_DEFAULT_HEIGHT) + ", status=no, menubar=no, toolbar=yes, resizable=no";
window.open(url, popName, options);
}
function validEmail(email) {
if(!email) return false;
const re = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return re.test(String(email).toLowerCase());
}
function fn_openLayerPopup(title, content, linkName, linkUrl) {
$("div[name='NLIB_LAYER_POPUP']." + classes[0]).fadeIn();
var layerPopupHtml =
"<h2>" + title + "</h2><br/>" +
"<div>" + content + "</div><br/>" +
"<br/>&nbsp;" +
"<div style='text-align:center;'><a href='#' onclick='fn_closeLayerPopup()'>[확인]</a>";
if(linkUrl != null) {
layerPopupHtml += "&nbsp;&nbsp;&nbsp;&nbsp;<a href='" + linkUrl + "'>[" + linkName + "]</a>";
}
layerPopupHtml += "</div>";
$(layerPopupHtml).appendTo("#NLIB_LAYER_POPUP");
$('html,body').addClass('no-scroll');
}
// XXXXXXXXXXX : alreadySignUpPopup.jsp > fn_showLayerPop
function fn_showLayerPop() {
$("#NLIB_LAYER_POPUP").show();
console.log(layerPopupHtml);
}
function fn_layerPopFormSubmit(formName, display) {
var dataList = $("#" + formName).serialize();
var url = $("#" + formName).attr('action');
if(display) $("#NLIB_LAYER_POPUP").show();
else $("#NLIB_LAYER_POPUP").hide();
$.ajax({
type: "post",
url: url,
data: dataList
}).done(function(response){
$("#NLIB_LAYER_POPUP").empty().append(response);
});
}
function fn_closeLayerPopup() {
@ -93,6 +48,21 @@ function fn_closeLayerPopup() {
$('html,body').removeClass('no-scroll');
}
function fn_layerPopWithHtml(cHtml, addClasses) {
$("#NLIB_LAYER_POPUP").removeClass();
$("#NLIB_LAYER_POPUP").addClass(addClasses);
$("#NLIB_LAYER_POPUP").html(cHtml);
$("#NLIB_LAYER_POPUP").show();
var classes = addClasses.split(" ");
$("div[name='NLIB_LAYER_POPUP']." + classes[0]).fadeIn();
}
//---------------------------------------------------------------------------------------------------------------
// 알림 관련 함수
//---------------------------------------------------------------------------------------------------------------
function gfn_myAlert(newAlertNum) {
if(newAlertNum == "undefined" || newAlertNum == null || newAlertNum < 1) {
@ -147,57 +117,10 @@ function gfn_getCookie(cookieName){
return cookieValue;
}
function fn_layerPopWithHtml(cHtml, addClasses) {
$("#NLIB_LAYER_POPUP").removeClass();
$("#NLIB_LAYER_POPUP").addClass(addClasses);
$("#NLIB_LAYER_POPUP").html(cHtml);
$("#NLIB_LAYER_POPUP").show();
var classes = addClasses.split(" ");
$("div[name='NLIB_LAYER_POPUP']." + classes[0]).fadeIn();
}
function fn_layerPopWithClass(url, addClasses) {
// 클릭 시, 로딩되도록 처리 (2021.10.20)
$("#NLIB_LAYER_POPUP").removeClass();
$("#NLIB_LAYER_POPUP").addClass(addClasses);
$("#NLIB_LAYER_POPUP").load(url);
var classes = addClasses.split(" ");
$("div[name='NLIB_LAYER_POPUP']." + classes[0]).fadeIn();
$('html,body').addClass('no-scroll');
}
function fn_layerPop(url, classes) {
$("#NLIB_LAYER_POPUP").load(url);
$("#NLIB_LAYER_POPUP").show();
$('.pop-advanced-search').fadeIn();
$('html,body').addClass('no-scroll');
}
function fn_showLayerPop() {
$("#NLIB_LAYER_POPUP").show();
}
function fn_layerPopFormSubmit(formName, display) {
var dataList = $("#" + formName).serialize();
var url = $("#" + formName).attr('action');
if(display) $("#NLIB_LAYER_POPUP").show();
else $("#NLIB_LAYER_POPUP").hide();
$.ajax({
type: "post",
url: url,
data: dataList
}).done(function(response){
$("#NLIB_LAYER_POPUP").empty().append(response);
});
}
//---------------------------------------------------------------------------------------------------------------
// 문자열 처리 관련 함수
//---------------------------------------------------------------------------------------------------------------
function fn_isEmpty(value) {
if(value == null) return true;
@ -227,6 +150,16 @@ function fn_extractContentText(html) {
return new DOMParser().parseFromString(html, "text/html").documentElement.textContent;
}
function gfn_removeQuotes(str) {
if(fn_isEmpty(str)) return "";
return str.replace(/"/gi, '').replace(/'/gi, "");
}
//---------------------------------------------------------------------------------------------------------------
// RIS 처리 관련 함수
//---------------------------------------------------------------------------------------------------------------
function risShow(risId){
var tag = document.createElement("div");
@ -278,6 +211,13 @@ function risShow(risId){
$("#export-data").append(html);
}
function risDownload(risId){
$("#risId").val(risId);
document.risDownloadForm.action="/ris/risDownload.do";
document.risDownloadForm.submit();
}
function risClose(){
$("#export-data").remove();
}
@ -288,12 +228,6 @@ function forgetPassword(form)
fn_layerPopFormSubmit(form,true);
}
function risDownload(risId){
$("#risId").val(risId);
document.risDownloadForm.action="/ris/risDownload.do";
document.risDownloadForm.submit();
}
function fn_changeInterestBtn(masterId,onOff){
if(onOff == "on")
{
@ -431,15 +365,7 @@ function pageLoad(fnName,pageIndex, totRecordCount, startPage, endPage, lastPage
$("#paging").html(html);
}
// 자료 상세보기
function fn_viewItemDetailInfo(masterId){
$("#FRM_ITEM_DETAIL input[name=masterId]").val(masterId);
$("#FRM_ITEM_DETAIL").attr("action","/search/searchItemDetail.do");
$("#FRM_ITEM_DETAIL").submit();
}
function fn_formatDateStr(yyyymmdd, defVal) {
function gfn_formatDateStr(yyyymmdd, defVal) {
if(fn_isEmpty(yyyymmdd)) return defVal;
if(yyyymmdd.length == 8) {
return yyyymmdd.substr(0, 4) + "-" + yyyymmdd.substr(4,2) + "-" + yyyymmdd.substr(6);
@ -456,6 +382,7 @@ function fn_formatDateStr(yyyymmdd, defVal) {
var DOC_VIEW_URL = "https://port.nculture.org/npdfView.do?npdf=N";
var VIDEO_VIEW_URL = "https://port.nculture.org/nvodView.do?nvod=N";
var IMAGE_VIEW_URL = "https://port.nculture.org/nImageView.do?nImage=N";
function gfn_showDocPdf(interfaceId,masterId,typeDivCd,dtlsTypeDivCd) {
var url="";
@ -522,6 +449,7 @@ $( document ).on('click' , 'button.share', function (e) {
getShortUrlData(tUrl);
}
});
$( document )
.on('click', '#div_pop-sharing img.sns-pop', function(e) {
e.preventDefault();
@ -664,9 +592,3 @@ function gfn_reserveReadItem(mngOrgCd, masterId) {
return;
}
function gfn_removeQuotes(str) {
if(fn_isEmpty(str)) return "";
return str.replace(/"/gi, '').replace(/'/gi, "");
}