diff --git a/src/main/java/nlib/col/service/RentService.java b/src/main/java/nlib/col/service/RentService.java index 0a1a7d59..98044cb0 100644 --- a/src/main/java/nlib/col/service/RentService.java +++ b/src/main/java/nlib/col/service/RentService.java @@ -54,36 +54,4 @@ public interface RentService */ public Map 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); - - } \ No newline at end of file diff --git a/src/main/java/nlib/col/service/impl/RentDAO_BK.java b/src/main/java/nlib/col/service/impl/RentDAO_BK.java deleted file mode 100644 index 852bc689..00000000 --- a/src/main/java/nlib/col/service/impl/RentDAO_BK.java +++ /dev/null @@ -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); - } - - -} \ No newline at end of file diff --git a/src/main/java/nlib/col/service/impl/RentServiceImpl.java b/src/main/java/nlib/col/service/impl/RentServiceImpl.java index 71eb691e..f1ab680c 100644 --- a/src/main/java/nlib/col/service/impl/RentServiceImpl.java +++ b/src/main/java/nlib/col/service/impl/RentServiceImpl.java @@ -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); -// } } \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/nlib/cmm/headerSubPart.jsp b/src/main/webapp/WEB-INF/jsp/nlib/cmm/headerSubPart.jsp index c3012989..35906267 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/cmm/headerSubPart.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/cmm/headerSubPart.jsp @@ -46,7 +46,6 @@ function fn_getMemberCard() {
-
diff --git a/src/main/webapp/WEB-INF/jsp/nlib/read/listReadItems.jsp b/src/main/webapp/WEB-INF/jsp/nlib/read/listReadItems.jsp index ef4b370e..e69748a1 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/read/listReadItems.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/read/listReadItems.jsp @@ -124,12 +124,12 @@ function fn_search(reqStatusDivCd) { div.attr('class', 'list'); div.append($('
').attr('class', 'n-cultural').html("[" + obj.mngOrgNm + "]")); div.append($('
').attr('class', 'n-data').html("" + obj.title + "")); - div.append($('
').attr('class', 'n-subscription').html('' + fn_formatDateStr(obj.reqDd,"-") + '')); /* 신청일자 */ + div.append($('
').attr('class', 'n-subscription').html('' + gfn_formatDateStr(obj.reqDd,"-") + '')); /* 신청일자 */ div.append($('
').attr('class', 'n-visit').html( - '' + fn_formatDateStr(obj.hopeReqPridDtmFrom,"-") + '' + fn_formatDateStr(obj.hopeReqPridDtmTo,"-") + '' + '' + gfn_formatDateStr(obj.hopeReqPridDtmFrom,"-") + '' + gfn_formatDateStr(obj.hopeReqPridDtmTo,"-") + '' )); /* 희망열람기간 */ div.append($('
').attr('class', 'n-return').html( - '' + fn_formatDateStr(obj.reqPsblDtmFrom,"-") + '' + fn_formatDateStr(obj.reqPsblDtmTo,"-") + '' + '' + gfn_formatDateStr(obj.reqPsblDtmFrom,"-") + '' + gfn_formatDateStr(obj.reqPsblDtmTo,"-") + '' )); /* 방문예정일자 */ var statusHtml1 = ""; @@ -141,17 +141,17 @@ function fn_search(reqStatusDivCd) { statusHtml1 = '' + obj.reqStatusDivNm + ''; statusHtml2 = ''; } else if(obj.reqStatusDivCd == "A1") { // 승인 - statusHtml1 = '' + obj.reqStatusDivNm + '' + fn_formatDateStr(obj.modDd,"-") + ''; + statusHtml1 = '' + obj.reqStatusDivNm + '' + gfn_formatDateStr(obj.modDd,"-") + ''; statusHtml2 = ''; } else if(obj.reqStatusDivCd == "A2") { // 반려 - statusHtml1 = '' + obj.reqStatusDivNm + '' + fn_formatDateStr(obj.modDd,"-") + ''; + statusHtml1 = '' + obj.reqStatusDivNm + '' + gfn_formatDateStr(obj.modDd,"-") + ''; statusHtml2 = ''; statusHtml3 = ''; } else if(obj.reqStatusDivCd == "R") { // 열람완료 - statusHtml1 = '' + obj.reqStatusDivNm + '' + fn_formatDateStr(obj.modDd,"-") + ''; + statusHtml1 = '' + obj.reqStatusDivNm + '' + gfn_formatDateStr(obj.modDd,"-") + ''; statusHtml2 = ''; } else if(obj.reqStatusDivCd == "C" || obj.reqStatusDivCd == "D") { // 취소, 미열람 - statusHtml1 = '' + obj.reqStatusDivNm + '' + fn_formatDateStr(obj.modDd,"-") + ''; + statusHtml1 = '' + obj.reqStatusDivNm + '' + gfn_formatDateStr(obj.modDd,"-") + ''; statusHtml2 = ''; } diff --git a/src/main/webapp/WEB-INF/jsp/nlib/rent/listCanceledRentItems.jsp b/src/main/webapp/WEB-INF/jsp/nlib/rent/listCanceledRentItems.jsp deleted file mode 100644 index 65c7f14c..00000000 --- a/src/main/webapp/WEB-INF/jsp/nlib/rent/listCanceledRentItems.jsp +++ /dev/null @@ -1,159 +0,0 @@ -<% -/** - *
- * @Class Name : listCanceledRentItems.jsp
- * 
- * @Description : 대출 취소목록을 조회한다.
- * 
- * 
- * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
- *
- * 
- * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 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" %> - -대출 취소 목록 - - - - -${pageTitle} - - - - - - - - - - - -

${pageTitle }

- -
- - - - - - - - -
- - -
- - - diff --git a/src/main/webapp/WEB-INF/jsp/nlib/rent/listPostpones.jsp b/src/main/webapp/WEB-INF/jsp/nlib/rent/listPostpones.jsp deleted file mode 100644 index 6bf38472..00000000 --- a/src/main/webapp/WEB-INF/jsp/nlib/rent/listPostpones.jsp +++ /dev/null @@ -1,170 +0,0 @@ -<% -/** - *
- * @Class Name : listPostpones.jsp
- * 
- * @Description : 반납 연기 목록을 조회한다.
- * 
- * 
- * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
- *
- * 
- * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 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" %> - -반납 연기 목록 - - - - -${pageTitle} - - - - - - - - - - - -

${pageTitle }

- -
- - - - - - - - -
- - - - -
- - - \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/nlib/rent/listRentItems.jsp b/src/main/webapp/WEB-INF/jsp/nlib/rent/listRentItems.jsp index 6682df29..e7e221f5 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/rent/listRentItems.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/rent/listRentItems.jsp @@ -127,9 +127,9 @@ function fn_search(bookLtRvStatusCd) { div.attr('class', 'list'); div.append($('
').attr('class', 'n-cultural').html("[" + obj.mngOrgNm + "]")); div.append($('
').attr('class', 'n-data').html("" + obj.title + "")); - div.append($('
').attr('class', 'n-reservation').html(fn_formatDateStr(obj.rsrvDd,"-"))); /* 대출신청예약일자 */ - div.append($('
').attr('class', 'n-expiry').html(fn_formatDateStr(obj.rsrvExpctDd,"-"))); /* 대출예약만료일자 */ - div.append($('
').attr('class', 'n-return').html(fn_formatDateStr(obj.rtnExpctDd,"-"))); /* 반납일자 */ + div.append($('
').attr('class', 'n-reservation').html(gfn_formatDateStr(obj.rsrvDd,"-"))); /* 대출신청예약일자 */ + div.append($('
').attr('class', 'n-expiry').html(gfn_formatDateStr(obj.rsrvExpctDd,"-"))); /* 대출예약만료일자 */ + div.append($('
').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 = ""; } else if(obj.bookLtRvStatusCd.startsWith("R")) { - statusHtml = " " + fn_formatDateStr(obj.rtnDd,"-") + ""; + statusHtml = " " + gfn_formatDateStr(obj.rtnDd,"-") + ""; } div.append($('
').attr('class', 'n-use').html("" + obj.bookLtRvStatusNm + "" + statusHtml)); diff --git a/src/main/webapp/WEB-INF/jsp/nlib/rent/listRequestsForViewingItem.jsp b/src/main/webapp/WEB-INF/jsp/nlib/rent/listRequestsForViewingItem.jsp deleted file mode 100644 index e87ff90b..00000000 --- a/src/main/webapp/WEB-INF/jsp/nlib/rent/listRequestsForViewingItem.jsp +++ /dev/null @@ -1,179 +0,0 @@ -<% -/** - *
- * @Class Name : listRequestsForViewingItem.jsp
- * 
- * @Description : 열람 요청을 조회한다.
- * 
- * 
- * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
- *
- * 
- * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 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" %> - -열람 요청 - - - - -${pageTitle} - - - - - - - - - - - -

${pageTitle }

- -
- - - - - - - - -
- -
- - - diff --git a/src/main/webapp/WEB-INF/jsp/nlib/rent/listReservations.jsp b/src/main/webapp/WEB-INF/jsp/nlib/rent/listReservations.jsp deleted file mode 100644 index 6050bbfa..00000000 --- a/src/main/webapp/WEB-INF/jsp/nlib/rent/listReservations.jsp +++ /dev/null @@ -1,187 +0,0 @@ -<% -/** - *
- * @Class Name : listReserVations.jsp
- * 
- * @Description : 대출 예약 목록을 조회한다.
- * 
- * 
- * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
- *
- * 
- * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 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" %> - -대출 예약 목록 - - - - -${pageTitle} - - - - - - - - - - - -

${pageTitle }

- -
- - - - - - - - -
- - -
- - - diff --git a/src/main/webapp/WEB-INF/jsp/nlib/rent/selectRequestInfoForViewingItem.jsp b/src/main/webapp/WEB-INF/jsp/nlib/rent/selectRequestInfoForViewingItem.jsp deleted file mode 100644 index 64993956..00000000 --- a/src/main/webapp/WEB-INF/jsp/nlib/rent/selectRequestInfoForViewingItem.jsp +++ /dev/null @@ -1,169 +0,0 @@ -<% -/** - *
- * @Class Name : selectRequestInfoForViewingItem.jsp
- * 
- * @Description : 열람요청 상세내용을 조회한다.
- * 
- * 
- * @프로젝트명: 지방문화원 통합자료관리시스템 구축사업 (2021)
- *
- * 
- * - * @ ------------ -------- --------------------------- - * @ 수정일 수정자 수정내용 - * @ ------------ -------- --------------------------- - * @ 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" %> - -열람요청 - 상세조회 - - - - -${pageTitle} - - - - - - - -

${pageTitle }

- -메시지 : ${message } -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
유형${article.articleTypeName }작성자 : ${article.regUserName }작성일 : ${article.regDate }상태 : ${article.repStatus }
질문내용${article.contentQeust}
${article.contentQeustFile}
답변내용${article.contentReply}
${article.contentReplyFile}
- -
- - - - - - - - - - - - - - - - - - -
이전글${preArticle.articleTypeName }${preArticle.title }작성자 : ${preArticle.regUserName }작성일 : ${preArticle.regDate }상태 : ${preArticle.repStatus }
다음글${nextArticle.articleTypeName }${nextArticle.title }작성자 : ${nextArticle.regUserName }작성일 : ${nextArticle.regDate }상태 : ${nextArticle.repStatus }
- - - - -
- - - diff --git a/src/main/webapp/js/default.js_20211022 b/src/main/webapp/js/default.js_20211022 deleted file mode 100644 index f0fcbafd..00000000 --- a/src/main/webapp/js/default.js_20211022 +++ /dev/null @@ -1,460 +0,0 @@ -$(document).ready(function(){ - - /* 상단 메뉴 Fixed */ - $( window ).scroll(function() { - var TopVal = $( window ).scrollTop(); - var TopFixed1 = 300; - var TopFixed2 = 303; - if( TopFixed1 <= TopVal){ - $("#header").removeClass("scroll_off"); - $("#header").addClass("scroll_on"); - $(".nav-wrap").removeClass("scroll_off"); - $(".nav-wrap").addClass("scroll_on"); - }else{ - $("#header").removeClass("scroll_on"); - $("#header").addClass("scroll_off"); - $(".nav-wrap").removeClass("scroll_on"); - $(".nav-wrap").addClass("scroll_off"); - } - }); - - /* 메인 메뉴 반응형 */ - jQuery(function($) { - $.fn.responsivenav = function(args) { - // Default settings - var defaults = { - responsive: true, - width: 768, // Responsive width - button: $(this).attr('id')+'-button', // Menu button id - animation: { // Menu animation - effect: 'slide', // Accepts 'slide' or 'fade' - show: 150, - hide: 100 - }, - selected: 'selected', // Selected class - arrow: 'downarrow' // Dropdown arrow class - }; - var settings = $.extend(defaults, args); - // Initialize the menu and the button - init($(this).attr('id'), settings.button); - - function init(menuid, buttonid) { - setupMenu(menuid, buttonid); - // Add a handler function for the resize and orientationchange event - $(window).bind('resize orientationchange', function(){ resizeMenu(menuid, buttonid); }); - // Trigger initial resize - resizeMenu(menuid, buttonid); - } - - function setupMenu(menuid, buttonid) { - var $mainmenu = $('#'+menuid+'>ul'); - var $headers = $mainmenu.find("ul").parent(); - // Add dropdown arrows - $headers.each(function(i) { - var $curobj = $(this); - $curobj.children('a:eq(0)').append(''); - }); - - if ( settings.responsive ) { - // Menu button click event - // Displays top-level menu items - $('#'+buttonid).click(function(e) { - e.preventDefault(); - - if ( isSelected($('#'+buttonid)) ) { - // Close menu - collapseChildren('#'+menuid); - animateHide($('#'+menuid), $('#'+buttonid)); - } else { - // Open menu - animateShow($('#'+menuid), $('#'+buttonid)); - } - }); - } - } - - function resizeMenu(menuid, buttonid) { - var $ww = document.body.clientWidth; - // Add mobile class to elements for CSS use - // instead of relying on media-query support - if ( $ww > settings.width || !settings.responsive) { - $('#'+menuid).removeClass('mobile'); - $('#'+buttonid).removeClass('mobile'); - } else { - $('#'+menuid).addClass('mobile'); - $('#'+buttonid).addClass('mobile'); - } - - var $headers = $('#'+menuid+'>ul').find('ul').parent(); - - $headers.each(function(i) { - var $curobj = $(this); - var $link = $curobj.children('a:eq(0)'); - var $subul = $curobj.find('ul:eq(0)'); - - // Unbind events - $curobj.unbind('mouseenter mouseleave'); - $link.unbind('click'); - animateHide($curobj.children('ul:eq(0)')); - - if ( $ww > settings.width || !settings.responsive ) { - // Full menu - $curobj.hover(function(e) { - var $targetul = $(this).children('ul:eq(0)'); - - var $dims = { w: this.offsetWidth, - h: this.offsetHeight, - subulw: $subul.outerWidth(), - subulh: $subul.outerHeight() - }; - var $istopheader = $curobj.parents('ul').length == 1 ? true : false; - $subul.css($istopheader ? {} : { top: 0 }); - var $offsets = { left: $(this).offset().left, - top: $(this).offset().top - }; - var $menuleft = $istopheader ? 0 : $dims.w; - $menuleft = ( $offsets.left + $menuleft + $dims.subulw > $(window).width() ) ? ( $istopheader ? -$dims.subulw + $dims.w : -$dims.w ) : $menuleft; - $targetul.css({ left:$menuleft+'px', - width:$dims.subulw+'px' - }); - - animateShow($targetul); - }, - function(e) { - var $targetul = $(this).children('ul:eq(0)'); - animateHide($targetul); - }); - } else { - // Compact menu - $link.click(function(e) { - e.preventDefault(); - - var $targetul = $curobj.children('ul:eq(0)'); - if ( isSelected($curobj) ) { - collapseChildren($targetul); - animateHide($targetul); - } else { - //collapseSiblings($curobj); - animateShow($targetul); - } - }); - } - }); - - collapseChildren('#'+menuid); - - if ( settings.responsive && isSelected($('#'+buttonid)) ) { - //collapseChildren('#'+menuid); - $('#'+menuid).hide(); - $('#'+menuid).removeAttr('style'); - $('#'+buttonid).removeClass(settings.selected); - } - } - - function collapseChildren(elementid) { - // Closes all submenus of the specified element - var $headers = $(elementid).find('ul'); - $headers.each(function(i) { - if ( isSelected($(this).parent()) ) { - animateHide($(this)); - } - }); - } - - function collapseSiblings(element) { - var $siblings = element.siblings('li'); - $siblings.each(function(i) { - collapseChildren($(this)); - }); - } - - function isSelected(element) { - return element.hasClass(settings.selected); - } - - function animateShow(menu, button) { - if ( !button ) { var button = menu.parent(); } - - button.addClass(settings.selected); - - if ( settings.animation.effect == 'fade' ) { - menu.fadeIn(settings.animation.show); - $(".BG").fadeIn("fast"); - } else if ( settings.animation.effect == 'slide' ) { - menu.slideDown(settings.animation.show); - $(".BG").fadeIn("fast"); - } else { - menu.show(); - menu.removeClass('hide'); - } - } - - function animateHide(menu, button) { - if ( !button ) { var button = menu.parent(); } - - if ( settings.animation.effect == 'fade' ) { - menu.fadeOut(settings.animation.hide, function() { - menu.removeAttr('style'); - button.removeClass(settings.selected); - $(".BG").fadeOut("fast"); - }); - } else if ( settings.animation.effect == 'slide' ) { - menu.slideUp(settings.animation.hide, function() { - menu.removeAttr('style'); - button.removeClass(settings.selected); - $(".BG").fadeOut("fast"); - }); - } else { - menu.hide(); - menu.addClass('hide'); - menu.removeAttr('style'); - button.removeClass(settings.selected); - } - } - $(".BG").click(function(){ - $(".BG").fadeOut("fast"); - $("#primary-nav.mobile").hide(); - $("#primary-nav-button").removeClass("selected"); - }); - }; - }); - - jQuery(function ($) { - $('#primary-nav').responsivenav(); - $('#top-nav').responsivenav({responsive:false}); - }); - /* 메인 메뉴 반응형 end */ - - /* 인기자료 탭메뉴 */ - (function ($) { - $('.tab ul.tabs').addClass('active').find('> li:eq(0)').addClass('current'); - $('.tab ul.tabs li a').click(function (g) { - var tab = $(this).closest('.tab'), - index = $(this).closest('li').index(); - - tab.find('ul.tabs > li').removeClass('current'); - $(this).closest('li').addClass('current'); - - tab.find('.tab_content').find('div.tabs_item').not('div.tabs_item:eq(' + index + ')').hide(); - tab.find('.tab_content').find('div.tabs_item:eq(' + index + ')').show(); - g.preventDefault(); - }); - })(jQuery); - - /* 푸터 관련사이트 */ - $(".family_site").click(function(){ - $(this).toggleClass("on"); - $(this) .find(".site_depth").slideToggle("fast"); - }); - - /* 로그인 팝업 */ - $(".login-btn").click(function(){ - $(".pop-login").fadeIn(); - }); - $(".pop-login .login-close").click(function(){ - $(".pop-login").fadeOut(); - }); - - /* 로그인 연결 팝업 */ - $(".login-connect-btn").click(function(){ - $(".pop-login-connect").fadeIn(); - }); - $(".pop-login-connect .login-close").click(function(){ - $(".pop-login-connect").fadeOut(); - }); - - /* 로그인 연결 패스워드 팝업 */ - $(".login-password-btn").click(function(){ - $(".pop-login-password").fadeIn(); - }); - $(".pop-login-password .login-close").click(function(){ - $(".pop-login-password").fadeOut(); - }); - - // scroll top button - $(window).scroll(function() { - var $window = $(window); - var $document = $(document); - var $footer = $('#footer'); - var $scrollBtn = $('#btn-go-top'); - - $scrollBtn.on('click', function () { - $("html, body").stop().animate({ - scrollTop: 0 - }, 600); - return false; - }); - - btnXPosition(); - $window.resize(function () { - btnXPosition(); - }); - - // top버튼 x좌표설정 - function btnXPosition() { - var rightPosition = ($document.width() - 1756) / 2 - - // X position - if($document.width() > 1756) { - //$scrollBtn.css('right', rightPosition); - $scrollBtn.css('right', '25px'); - } else { - $scrollBtn.css('right', '25px'); - } - } - - $window.on('scroll', function () { - if ($window.scrollTop() < $document.height() - $window.height() - $footer.outerHeight() + 37) { - $scrollBtn.addClass('go-top-fix'); - } else { - $scrollBtn.removeClass('go-top-fix'); - } - - if ($window.scrollTop() < ($window.height() / 3)) { - $scrollBtn.addClass('go-top-hide'); - } else { - $scrollBtn.removeClass('go-top-hide'); - } - }); - }); - - // 상세검색 팝업 - 문화원정보 선택영역 초기작업 메서드 분리 - jQuery(function($) { - var depth2H = 0; - $('.pop-advanced-search .depth1-check input').each(function () { - - if ($(this).is(":checked")) { // 활성화 line에 높이 잡아주기 - $('.depth1').removeClass('on'); - $(this).parents('.depth1').addClass('on'); - depth2H = $(this).parents('.depth1-check').next('.depth2').outerHeight(); - $(this).parents('.line').siblings('.line').attr('style', ''); - $(this).parents('.line').height(depth2H + 50); - } - - var tabLabel = $(this).next().text(); - $(this).parent('.depth1-check').append(''); - - $(this).siblings('.tab-name').on('click', function() { - $('.depth1').removeClass('on'); - $(this).parents('.depth1').addClass('on'); - depth2H = $(this).parents('.depth1-check').next('.depth2').outerHeight(); - $('.line').attr('style', ''); - $(this).parents('.line').height(depth2H + 50); - }); - - }); - - $('.pop-advanced-search .depth2 input').change(function() { - if ($(this).is(':checked')) { - $(this).parents('.depth2').siblings('.depth1-check').find('input').prop('checked', true); - } else { - if ($(this).parents('.depth2').find('input:checked').length <= 0) { - $(this).parents('.depth2').siblings('.depth1-check').find('input').prop('checked', false); - } - } - }); - - // depth-1 열고 닫기 - $('.filter-tit .btn-toggle').on('click', function() { - if($(this).text() == '닫기') { - $(this).text('열기'); - $(this).parent('.filter-tit').siblings('.filter-list').stop().slideUp(); - $('.filter .btn-toggle-more').css('display','none'); - } else { - $(this).text('닫기'); - $(this).parent('.filter-tit').siblings('.filter-list').stop().slideDown(); - $('.filter .btn-toggle-more').css('display','block'); - } - }); - - // depth-2 열고 닫기 - $('.filter .depth-1 .btn-toggle').on('click', function () { - var _this = $(this).parents('li').index(); - if ($(this).text() == '닫기') { - $(this).text('열기'); - $(this).siblings('.check').find('.tab-name').trigger("click"); - } else { - $(this).text('닫기'); - $(this).siblings('.check').find('.tab-name').trigger("click"); - } - }); - - $('.filter-wrap .tab-name').on('click', function() { - if ($('body').hasClass('pop-filter')) { - $(this).parents('.depth-1').removeClass('on'); - } - }); - - // 상세검색 팝업 열기 - $('.btn-search-detail').on('click', function () { - - // 클릭 시, 컨텐츠 로딩되도록 처리 (2021.10.20) - $("#NLIB_LAYER_POPUP").addClass("popup pop-advanced-search"); - $("#NLIB_LAYER_POPUP").load("/search/getDetailedSearchFormPopup.do"); - - $('.pop-advanced-search').fadeIn(); - $('html,body').addClass('no-scroll'); - }); - - //팝업닫기버튼 클릭 - $('.btn-close-pop').on('click', function () { - $(this).parents('.popup').fadeOut(); - $('html,body').removeClass('no-scroll'); - }); - }); - - // 회원가입 셀렉트박스 - jQuery(function($) { - var now = new Date(); - var year = now.getFullYear(); - var mon = (now.getMonth() + 1) > 9 ? ''+(now.getMonth() + 1) : '0'+(now.getMonth() + 1); - var day = (now.getDate()) > 9 ? ''+(now.getDate()) : '0'+(now.getDate()); - // 년도 - for(var i = 1900 ; i <= year ; i++) { - $('#year').append(''); - } - - // 월별 - for(var i=1; i <= 12; i++) { - var mm = i > 9 ? i : "0"+i ; - $('#month').append(''); - } - - // 일별 - for(var i=1; i <= 31; i++) { - var dd = i > 9 ? i : "0"+i ; - $('#day').append(''); - } - $("#year > option[value="+year+"]").attr("selected", "true"); - $("#month > option[value="+mon+"]").attr("selected", "true"); - $("#day > option[value="+day+"]").attr("selected", "true"); - }); - - // 회원가입 체크박스 - $('input.sex[type="checkbox"]').bind('click',function() { - $('input.sex[type="checkbox"]').not(this).prop("checked", false); - }); - - // 회원가입 체크박스 - $('input.ser-chk1[type="checkbox"]').bind('click',function() { - $('input.ser-chk1-1[type="checkbox"]').not(this).prop("checked", true); - - if($("input.ser-chk1").prop("checked")){ - $("input.ser-chk1-1[type=checkbox]").prop("checked",true); - }else{ - $("input.ser-chk1-1[type=checkbox]").prop("checked",false); - } - }); - - // 회원가입 체크박스 - $('input.ser-chk2[type="checkbox"]').bind('click',function() { - $('input.ser-chk2-2[type="checkbox"]').not(this).prop("checked", true); - - if($("input.ser-chk2").prop("checked")){ - $("input.ser-chk2-2[type=checkbox]").prop("checked",true); - }else{ - $("input.ser-chk2-2[type=checkbox]").prop("checked",false); - } - }); - -}); \ No newline at end of file diff --git a/src/main/webapp/js/nlib.js b/src/main/webapp/js/nlib.js index 4ad7df22..3094a695 100644 --- a/src/main/webapp/js/nlib.js +++ b/src/main/webapp/js/nlib.js @@ -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 = "" + placeholder + ""; +function fn_layerPopWithClass(url, addClasses) { + // 클릭 시, 로딩되도록 처리 (2021.10.20) + $("#NLIB_LAYER_POPUP").removeClass(); + $("#NLIB_LAYER_POPUP").addClass(addClasses); + $("#NLIB_LAYER_POPUP").load(url); - theHTML += "

" + msg + "

"; - theHTML += "
"; - theHTML += "비밀번호: "; - theHTML += " 
"; - theHTML += " 
"; - theHTML += ""; - theHTML += ""; - theHTML += ""; + 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 = - "

" + title + "


" + - "
" + content + "

" + - "
 " + - "
[확인]"; - - if(linkUrl != null) { - layerPopupHtml += "    [" + linkName + "]"; - } - layerPopupHtml += "
"; - $(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, ""); -} \ No newline at end of file