diff --git a/src/main/java/nlib/col/web/RisController.java b/src/main/java/nlib/col/web/RisController.java index 30c41217..3c73cf06 100644 --- a/src/main/java/nlib/col/web/RisController.java +++ b/src/main/java/nlib/col/web/RisController.java @@ -65,8 +65,8 @@ public class RisController extends NlibCommonController * @param vo * @throws IOException */ - @RequestMapping(value="/ris/risDownload.do") - public void risDownload(HttpServletRequest request,HttpServletResponse response) throws IOException { + @RequestMapping(value="/ris/downloadRis.do") + public void downloadRis(HttpServletRequest request,HttpServletResponse response) throws IOException { RisVO vo = new RisVO(); vo.setMasterId(request.getParameter("risId")); diff --git a/src/main/webapp/WEB-INF/jsp/nlib/bbs/insertQnaForm.jsp b/src/main/webapp/WEB-INF/jsp/nlib/bbs/insertQnaForm.jsp index c06093e3..3846b929 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/bbs/insertQnaForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/bbs/insertQnaForm.jsp @@ -63,7 +63,7 @@ var oEditors = []; $(window.document).ready(function() { fn_setPageTitle("${pageTitle}"); - if(!fn_isEmpty('${message}')) { + if(!gfn_isEmpty('${message}')) { alert("${message}"); } @@ -127,7 +127,7 @@ $(window.document).ready(function() { myDropzone.on("removedfile", function(file) { var idx = delFileList.length; - if(!fn_isEmpty(file.streFileNm) && !fn_isEmpty(file.fileSn)) { + if(!gfn_isEmpty(file.streFileNm) && !gfn_isEmpty(file.fileSn)) { delFileList[idx++] = { "attachFileId" : file.attachFileId, "streFileNm" : file.streFileNm, @@ -174,7 +174,7 @@ function fn_getContent() { // 목록으로 이동 function fn_list() { - if(!fn_isEmpty($("#articleForm #title").val()) || !fn_isEmpty($("#articleForm #content").val())) { + if(!gfn_isEmpty($("#articleForm #title").val()) || !gfn_isEmpty($("#articleForm #content").val())) { if(!confirm("작성중인 글이 있습니다. 취소하시겠습니까?")) return; } @@ -199,14 +199,14 @@ function fn_save() { fn_getContent(); // 내용 작성 유무 - if(fn_isEmpty($("#title").val())) { + if(gfn_isEmpty($("#title").val())) { alert("제목을 입력하여 주시기 바랍니다."); $("#title").focus(); return false; } // 내용 작성 유무 - var ctext = fn_extractContentText($("#content").val()); + var ctext = gfn_extractContentText($("#content").val()); if(ctext.trim() == "") { alert("내용을 입력하여 주시기 바랍니다."); oEditors.getById["content"].exec("FOCUS"); @@ -214,7 +214,7 @@ function fn_save() { } // 내용 길이 체크 - var contentLen = fn_lengthBytes($("#content").val()); + var contentLen = gfn_lengthBytes($("#content").val()); if(contentLen > MAX_LEN_OF_CONTENT) { alert("내용의 길이는 " + MAX_LEN_OF_CONTENT + " bytes를 초과할 수 없습니다."); oEditors.getById["content"].exec("FOCUS"); diff --git a/src/main/webapp/WEB-INF/jsp/nlib/bbs/listAncmnts.jsp b/src/main/webapp/WEB-INF/jsp/nlib/bbs/listAncmnts.jsp index b8242aba..f6fcf41b 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/bbs/listAncmnts.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/bbs/listAncmnts.jsp @@ -40,7 +40,7 @@ fn_setPageTitle("${pageTitle}"); // 메시지 표출 - if(!fn_isEmpty('${message}')) { + if(!gfn_isEmpty('${message}')) { alert("${message}"); } @@ -71,8 +71,8 @@ // 그리드 데이터 조회 호출 function fn_searchArticle(pageIndex) { - if(fn_isEmpty(pageIndex)) pageIndex = $("#pageIndex").val(); - if(fn_isEmpty(pageIndex)) pageIndex = "1"; + if(gfn_isEmpty(pageIndex)) pageIndex = $("#pageIndex").val(); + if(gfn_isEmpty(pageIndex)) pageIndex = "1"; $("#pageIndex").val(pageIndex); var reqUrl = "${pageContext.request.contextPath}/bbs/listAncmntsAjax.do"; @@ -150,7 +150,7 @@ }); } - pageLoad("fn_searchArticle", jsonObj.pagingPageIndex, jsonObj.pagingTotRecordCount, jsonObj.pagingStartPage, jsonObj.pagingEndPage, jsonObj.pagingLastPage); + gfn_makePaging("fn_searchArticle", jsonObj.pagingPageIndex, jsonObj.pagingTotRecordCount, jsonObj.pagingStartPage, jsonObj.pagingEndPage, jsonObj.pagingLastPage); }).fail(function (jqXHR, textStatus, errorThrown) { alert("조회에 실패하였습니다. 관리자에게 문의 바랍니다."); diff --git a/src/main/webapp/WEB-INF/jsp/nlib/bbs/listFaqs.jsp b/src/main/webapp/WEB-INF/jsp/nlib/bbs/listFaqs.jsp index dd6f37c7..217bc6a9 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/bbs/listFaqs.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/bbs/listFaqs.jsp @@ -40,7 +40,7 @@ $( document ).ready(function() { fn_setPageTitle("${pageTitle}"); // 메시지 표출 - if(!fn_isEmpty('${message}')) { + if(!gfn_isEmpty('${message}')) { alert("${message}"); } @@ -108,8 +108,8 @@ $( document ).ready(function() { // 그리드 데이터 조회 호출 function fn_searchArticle(pageIndex) { - if(fn_isEmpty(pageIndex)) pageIndex = $("#pageIndex").val(); - if(fn_isEmpty(pageIndex)) pageIndex = "1"; + if(gfn_isEmpty(pageIndex)) pageIndex = $("#pageIndex").val(); + if(gfn_isEmpty(pageIndex)) pageIndex = "1"; $("#pageIndex").val(pageIndex); var reqUrl = "${pageContext.request.contextPath}/bbs/listFaqsAjax.do"; @@ -187,7 +187,7 @@ $( document ).ready(function() { } - pageLoad("fn_searchArticle", jsonObj.pagingPageIndex, jsonObj.pagingTotRecordCount, jsonObj.pagingStartPage, jsonObj.pagingEndPage, jsonObj.pagingLastPage); + gfn_makePaging("fn_searchArticle", jsonObj.pagingPageIndex, jsonObj.pagingTotRecordCount, jsonObj.pagingStartPage, jsonObj.pagingEndPage, jsonObj.pagingLastPage); }).fail(function (jqXHR, textStatus, errorThrown) { alert("조회에 실패하였습니다. 관리자에게 문의 바랍니다."); diff --git a/src/main/webapp/WEB-INF/jsp/nlib/bbs/listQnas.jsp b/src/main/webapp/WEB-INF/jsp/nlib/bbs/listQnas.jsp index 1d144273..3a6ca50f 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/bbs/listQnas.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/bbs/listQnas.jsp @@ -54,7 +54,7 @@ fn_searchArticle(); // 메시지 표출 - if(!fn_isEmpty('${message}')) { + if(!gfn_isEmpty('${message}')) { setTimeout(function() { alert("${message}"); }, 1000); // 화면 표출되도록 딜레이 줌 @@ -81,8 +81,8 @@ // 그리드 데이터 조회 호출 function fn_searchArticle(pageIndex) { - if(fn_isEmpty(pageIndex)) pageIndex = $("#pageIndex").val(); - if(fn_isEmpty(pageIndex)) pageIndex = "1"; + if(gfn_isEmpty(pageIndex)) pageIndex = $("#pageIndex").val(); + if(gfn_isEmpty(pageIndex)) pageIndex = "1"; $("#pageIndex").val(pageIndex); var reqUrl = "${pageContext.request.contextPath}/bbs/listQnasAjax.do";; @@ -164,11 +164,11 @@ } - if(!fn_isEmpty(jsonObj.message)) { + if(!gfn_isEmpty(jsonObj.message)) { alert(jsonObj.message); } - pageLoad("fn_searchArticle", jsonObj.pagingPageIndex, jsonObj.pagingTotRecordCount, jsonObj.pagingStartPage, jsonObj.pagingEndPage, jsonObj.pagingLastPage); + gfn_makePaging("fn_searchArticle", jsonObj.pagingPageIndex, jsonObj.pagingTotRecordCount, jsonObj.pagingStartPage, jsonObj.pagingEndPage, jsonObj.pagingLastPage); }).fail(function (jqXHR, textStatus, errorThrown) { alert("조회에 실패하였습니다. 관리자에게 문의 바랍니다."); @@ -178,7 +178,7 @@ function fn_changeQuestionType(searchQuestionType) { - if(!fn_isEmpty(searchQuestionType)) { + if(!gfn_isEmpty(searchQuestionType)) { alert("로그인 후, 이용하여 주시기 바랍니다."); $("#tabQnaUser").removeClass("current"); $("#tabQnaAll").addClass("current"); diff --git a/src/main/webapp/WEB-INF/jsp/nlib/bbs/selectAncmntArticle.jsp b/src/main/webapp/WEB-INF/jsp/nlib/bbs/selectAncmntArticle.jsp index 45156e46..8a6a3d35 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/bbs/selectAncmntArticle.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/bbs/selectAncmntArticle.jsp @@ -38,7 +38,7 @@ $( document ).ready(function() { fn_setPageTitle("${pageTitle}"); - if(!fn_isEmpty('${message}')) { + if(!gfn_isEmpty('${message}')) { alert("${message}"); } }); diff --git a/src/main/webapp/WEB-INF/jsp/nlib/bbs/selectQnaArticle.jsp b/src/main/webapp/WEB-INF/jsp/nlib/bbs/selectQnaArticle.jsp index 53bcb0d7..03dffc91 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/bbs/selectQnaArticle.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/bbs/selectQnaArticle.jsp @@ -38,7 +38,7 @@ $( document ).ready(function() { fn_setPageTitle("${pageTitle}"); - if(!fn_isEmpty('${message}')) { + if(!gfn_isEmpty('${message}')) { alert("${message}"); } }); diff --git a/src/main/webapp/WEB-INF/jsp/nlib/cart/listCartItems.jsp b/src/main/webapp/WEB-INF/jsp/nlib/cart/listCartItems.jsp index 3455910f..64d87796 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/cart/listCartItems.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/cart/listCartItems.jsp @@ -312,13 +312,13 @@ $(document).ready(function() { 썸네일 - + 즐겨찾기 아이콘 즐겨찾기 아이콘 - + 즐겨찾기 아이콘 즐겨찾기 아이콘 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 2ff3e40a..a511793a 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/cmm/headerSubPart.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/cmm/headerSubPart.jsp @@ -27,7 +27,7 @@ function goSearch(){ function fn_getMemberCard() { - fn_layerPopWithClass("/userInfo/getMemberQrcodeFormPopup.do", "pop-member"); + gfn_layerPopWithClass("/userInfo/getMemberQrcodeFormPopup.do", "pop-member"); } @@ -64,7 +64,7 @@ function fn_getMemberCard() {
  • -
  • +
    diff --git a/src/main/webapp/WEB-INF/jsp/nlib/cmm/home.jsp b/src/main/webapp/WEB-INF/jsp/nlib/cmm/home.jsp index 9e1c0de8..08a76cd4 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/cmm/home.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/cmm/home.jsp @@ -315,7 +315,7 @@ function fn_listPops(typeDivCd) {
diff --git a/src/main/webapp/WEB-INF/jsp/nlib/cmm/listNotifications.jsp b/src/main/webapp/WEB-INF/jsp/nlib/cmm/listNotifications.jsp index 12b49de6..50700bc7 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/cmm/listNotifications.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/cmm/listNotifications.jsp @@ -38,7 +38,7 @@ $( document ).ready(function() { fn_setPageTitle("${pageTitle}"); // 메시지 표출 - if(!fn_isEmpty('${message}')) { + if(!gfn_isEmpty('${message}')) { alert("${message}"); } @@ -100,8 +100,8 @@ $( document ).ready(function() { // 그리드 데이터 조회 호출 function fn_searchArticle(pageIndex) { - if(fn_isEmpty(pageIndex)) pageIndex = $("#pageIndex").val(); - if(fn_isEmpty(pageIndex)) pageIndex = "1"; + if(gfn_isEmpty(pageIndex)) pageIndex = $("#pageIndex").val(); + if(gfn_isEmpty(pageIndex)) pageIndex = "1"; $("#pageIndex").val(pageIndex); var reqUrl = "${pageContext.request.contextPath}/cmm/listNotificationsAjax.do"; @@ -154,7 +154,7 @@ $( document ).ready(function() { li.append($('').attr('class', 'question').on("click", function() { fn_viewDetail(this, obj.notiId); })); - if(!fn_isEmpty(obj.mngOrgNm)) li.find(".question").append($('').attr("class", "type").html("[" + obj.mngOrgNm + "]")); + if(!gfn_isEmpty(obj.mngOrgNm)) li.find(".question").append($('').attr("class", "type").html("[" + obj.mngOrgNm + "]")); else li.find(".question").append($('').attr("class", "type").html("[소장자료관]")); var unread = ""; @@ -167,7 +167,7 @@ $( document ).ready(function() { } - pageLoad("fn_searchArticle", jsonObj.pagingPageIndex, jsonObj.pagingTotRecordCount, jsonObj.pagingStartPage, jsonObj.pagingEndPage, jsonObj.pagingLastPage); + gfn_makePaging("fn_searchArticle", jsonObj.pagingPageIndex, jsonObj.pagingTotRecordCount, jsonObj.pagingStartPage, jsonObj.pagingEndPage, jsonObj.pagingLastPage); }).fail(function (request, textStatus, errorThrown) { alert("조회에 실패하였습니다. \n" + gfn_removeQuotes(request.responseText)); diff --git a/src/main/webapp/WEB-INF/jsp/nlib/collection/listInterests.jsp b/src/main/webapp/WEB-INF/jsp/nlib/collection/listInterests.jsp index 8270d6b2..ac041a3d 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/collection/listInterests.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/collection/listInterests.jsp @@ -38,7 +38,7 @@ $( document ).ready(function() { fn_setPageTitle("${pageTitle}"); // 메시지 표출 - if(!fn_isEmpty('${message}')) { + if(!gfn_isEmpty('${message}')) { alert("${message}"); } //초기 자료 조회 @@ -110,8 +110,8 @@ // 그리드 데이터 조회 호출 function fn_searchArticle(pageIndex) { - if(fn_isEmpty(pageIndex)) pageIndex = $("#pageIndex").val(); - if(fn_isEmpty(pageIndex)) pageIndex = "1"; + if(gfn_isEmpty(pageIndex)) pageIndex = $("#pageIndex").val(); + if(gfn_isEmpty(pageIndex)) pageIndex = "1"; $("#pageIndex").val(pageIndex); var reqUrl = "${pageContext.request.contextPath}/interest/listInterestsAjax.do"; @@ -190,7 +190,7 @@ t_data += "" t_data += "" t_data += "
" - if(!fn_isEmpty(obj.mngtNo)) + if(!gfn_isEmpty(obj.mngtNo)) { t_data += obj.mngtNo } @@ -199,37 +199,37 @@ t_data += "
" t_data += "자료유형 : " - if(!fn_isEmpty(obj.typeCodeNm)){ + if(!gfn_isEmpty(obj.typeCodeNm)){ t_data += obj.typeCodeNm } - if(!fn_isEmpty(obj.typeCodeNm) && !fn_isEmpty(obj.dtlsTypeDivNm)){ + if(!gfn_isEmpty(obj.typeCodeNm) && !gfn_isEmpty(obj.dtlsTypeDivNm)){ t_data += " > " } - if(fn_isEmpty(obj.typeCodeNm) && fn_isEmpty(obj.dtlsTypeDivNm)){ + if(gfn_isEmpty(obj.typeCodeNm) && gfn_isEmpty(obj.dtlsTypeDivNm)){ t_data += "-" } - if(!fn_isEmpty(obj.dtlsTypeDivNm)){ + if(!gfn_isEmpty(obj.dtlsTypeDivNm)){ t_data += obj.dtlsTypeDivNm } t_data += "" t_data += "주제분야 : " - if(!fn_isEmpty(obj.subjectNmUp)){ + if(!gfn_isEmpty(obj.subjectNmUp)){ t_data += obj.subjectNmUp } - if(!fn_isEmpty(obj.subjectNmUp) && !fn_isEmpty(obj.subjectNm)){ + if(!gfn_isEmpty(obj.subjectNmUp) && !gfn_isEmpty(obj.subjectNm)){ t_data += " > " } - if(fn_isEmpty(obj.subjectNmUp) && fn_isEmpty(obj.subjectNm)){ + if(gfn_isEmpty(obj.subjectNmUp) && gfn_isEmpty(obj.subjectNm)){ t_data += "-" } - if(!fn_isEmpty(obj.subjectNm)){ + if(!gfn_isEmpty(obj.subjectNm)){ t_data += obj.subjectNm } t_data += "" t_data += "생산기관 : " - if(!fn_isEmpty(obj.orgNm)){ + if(!gfn_isEmpty(obj.orgNm)){ t_data += obj.orgNm }else{ t_data += "-" @@ -237,7 +237,7 @@ t_data += "" t_data += "생산년도 : " - if(!fn_isEmpty(obj.creatYyyy)){ + if(!gfn_isEmpty(obj.creatYyyy)){ t_data += obj.creatYyyy }else{ t_data += "-" @@ -248,10 +248,10 @@ var t_btn = ""; //대출, 방문 가능여부 - if(!fn_isEmpty(obj.operOutRangeNm) && !fn_isEmpty(obj.operReadRangeNm)) + if(!gfn_isEmpty(obj.operOutRangeNm) && !gfn_isEmpty(obj.operReadRangeNm)) { t_btn +="
" + obj.operOutRangeNm + "
" + "
" + obj.operReadRangeNm + "
"; - }else if(!fn_isEmpty(obj.operOutRangeNm) || !fn_isEmpty(obj.operReadRangeNm)) + }else if(!gfn_isEmpty(obj.operOutRangeNm) || !gfn_isEmpty(obj.operReadRangeNm)) { t_btn +="
" + obj.operOutRangeNm + obj.operReadRangeNm + "
"; } @@ -259,7 +259,7 @@ { t_btn+= ""; } - t_btn+= ""; + t_btn+= ""; var div = $(document.createElement('div')); div.attr('class','list'); @@ -273,7 +273,7 @@ }); } - pageLoad("fn_searchArticle", jsonObj.pagingPageIndex, jsonObj.pagingTotRecordCount, jsonObj.pagingStartPage, jsonObj.pagingEndPage, jsonObj.pagingLastPage); + gfn_makePaging("fn_searchArticle", jsonObj.pagingPageIndex, jsonObj.pagingTotRecordCount, jsonObj.pagingStartPage, jsonObj.pagingEndPage, jsonObj.pagingLastPage); }).fail(function (jqXHR, textStatus, errorThrown) { alert("조회에 실패하였습니다. 관리자에게 문의 바랍니다."); diff --git a/src/main/webapp/WEB-INF/jsp/nlib/collection/searchItemDetail.jsp b/src/main/webapp/WEB-INF/jsp/nlib/collection/searchItemDetail.jsp index 564b6b8e..6d7f9e81 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/collection/searchItemDetail.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/collection/searchItemDetail.jsp @@ -117,12 +117,12 @@ function goList(){ - + - + - +
@@ -220,7 +220,7 @@ function goList(){ - +
diff --git a/src/main/webapp/WEB-INF/jsp/nlib/collection/searchList.jsp b/src/main/webapp/WEB-INF/jsp/nlib/collection/searchList.jsp index d869557d..2b8467da 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/collection/searchList.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/collection/searchList.jsp @@ -111,7 +111,7 @@ function fnSetInitialValue() //탭 $("#"+"${searchVO.collection}").parent().addClass('current'); //페이징 - pageLoad("fn_search_article",'${pageVO.pageIndex}','${pageVO.totRecordCount}','${pageVO.startPage}','${pageVO.endPage}','${pageVO.lastPage}'); + gfn_makePaging("fn_search_article",'${pageVO.pageIndex}','${pageVO.totRecordCount}','${pageVO.startPage}','${pageVO.endPage}','${pageVO.lastPage}'); //생산년도 var filter_creatYyyy = '${searchVO.filter_creatYyyy}'; @@ -159,14 +159,14 @@ function goSearchNculture() { $(sortField).attr("value","RANK/DESC"); form.appendChild(sortField); - if(!fn_isEmpty($("#query").val())) + if(!gfn_isEmpty($("#query").val())) { var query = document.createElement("input"); $(query).attr("name", "query"); $(query).attr("value", $("#query").val()); form.appendChild(query); } - if(!fn_isEmpty($("#reQuery").val())) + if(!gfn_isEmpty($("#reQuery").val())) { var reQuery = document.createElement("input"); $(reQuery).attr("name", "reQuery"); @@ -441,13 +441,13 @@ function fn_search_article(pageIndex) {
썸네일 - - @@ -498,7 +498,7 @@ function fn_search_article(pageIndex) { - +
diff --git a/src/main/webapp/WEB-INF/jsp/nlib/login/loginFormPopup.jsp b/src/main/webapp/WEB-INF/jsp/nlib/login/loginFormPopup.jsp index 53864fff..218161d7 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/login/loginFormPopup.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/login/loginFormPopup.jsp @@ -57,7 +57,7 @@

회원가입하고 대출/열람 서비스를 이용해보세요!

회원가입

- +
diff --git a/src/main/webapp/WEB-INF/jsp/nlib/member/alreadySignUpPopup.jsp b/src/main/webapp/WEB-INF/jsp/nlib/member/alreadySignUpPopup.jsp index 679e053a..33674fdf 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/member/alreadySignUpPopup.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/member/alreadySignUpPopup.jsp @@ -9,7 +9,7 @@ $(document).ready(function(){ var cnt=${cnt}; if(cnt > 0) { - fn_showLayerPop(); + gfn_showLayerPop(); } else { window.close(); } @@ -96,9 +96,9 @@ function accountLink() - +
@@ -124,13 +124,13 @@ function accountLink()
- +
diff --git a/src/main/webapp/WEB-INF/jsp/nlib/member/initPasswordFormPopup.jsp b/src/main/webapp/WEB-INF/jsp/nlib/member/initPasswordFormPopup.jsp index 632832e6..0fd3368a 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/member/initPasswordFormPopup.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/member/initPasswordFormPopup.jsp @@ -33,8 +33,8 @@ $(document).ready(function() { document.getElementById("findCancle").setAttribute("onClick", "fn_cancle()"); }else { - document.getElementById("cancle").setAttribute("onClick", "fn_closeLayerPopup()"); - document.getElementById("findCancle").setAttribute("onClick", "fn_closeLayerPopup()"); + document.getElementById("cancle").setAttribute("onClick", "gfn_closeLayerPopup()"); + document.getElementById("findCancle").setAttribute("onClick", "gfn_closeLayerPopup()"); } }); @@ -73,9 +73,9 @@ function goFindPw(){ if(previousPage == "alreadySignUpPopup") { document.initPw.action="${pageContext.request.contextPath}/member/selectAlreadySignUpMobilePopup.do"; - fn_layerPopFormSubmit("initPw",false); + gfn_layerPopFormSubmit("initPw",false); }else{ - fn_closeLayerPopup(); + gfn_closeLayerPopup(); } } @@ -98,7 +98,7 @@ function goFindPw(){ function fn_cancle() { document.initPw.action="${pageContext.request.contextPath}/member/selectAlreadySignUpMobilePopup.do"; - fn_layerPopFormSubmit("initPw",false); + gfn_layerPopFormSubmit("initPw",false); }
diff --git a/src/main/webapp/WEB-INF/jsp/nlib/member/insertMemberInfoForm.jsp b/src/main/webapp/WEB-INF/jsp/nlib/member/insertMemberInfoForm.jsp index f5c96fee..14176295 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/member/insertMemberInfoForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/member/insertMemberInfoForm.jsp @@ -144,7 +144,7 @@ $(document).ready(function() { var birthday="${loginVO.snsBirthday}"; - if(!fn_isEmpty(birthday)) + if(!gfn_isEmpty(birthday)) { var birth_yy =birthday.substr(0,4); var birth_mm =birthday.substr(4,2); @@ -162,7 +162,7 @@ $(document).ready(function() { var MobileNo="${loginVO.snsMobileNo}"; - if(!fn_isEmpty(MobileNo)) + if(!gfn_isEmpty(MobileNo)) { var mobileNo_1 = ""; var mobileNo_2 = ""; @@ -412,7 +412,7 @@ function certMobileCheck(){ $("[id^='mobileSuc']").css("display","inline-block"); $("[id^='mobileVrfctNo']").css("display","none"); document.joinForm.action="${pageContext.request.contextPath}/member/selectAlreadySignUpMobilePopup.do"; - fn_layerPopFormSubmit("joinForm",false); + gfn_layerPopFormSubmit("joinForm",false); }else { alert("인증번호가 일치하지않습니다."); diff --git a/src/main/webapp/WEB-INF/jsp/nlib/read/confirmRead.jsp b/src/main/webapp/WEB-INF/jsp/nlib/read/confirmRead.jsp index db98943c..81a56265 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/read/confirmRead.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/read/confirmRead.jsp @@ -123,10 +123,6 @@ function fn_insertReadItems() { } -function fn_changeInterest(masterId, onOff) { - alert("관심등록/삭제 준비중 : " + masterId + ", " + onOff); -} - function fn_listCartItems() { @@ -248,13 +244,13 @@ $(document).ready(function() {
썸네일 - + 즐겨찾기 아이콘 즐겨찾기 아이콘 - + 즐겨찾기 아이콘 즐겨찾기 아이콘 diff --git a/src/main/webapp/WEB-INF/jsp/nlib/read/insertReadItems.jsp b/src/main/webapp/WEB-INF/jsp/nlib/read/insertReadItems.jsp index df51a60e..264fe8c7 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/read/insertReadItems.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/read/insertReadItems.jsp @@ -101,13 +101,13 @@ function fn_listReadItems() {
썸네일 - + 즐겨찾기 아이콘 즐겨찾기 아이콘 - + 즐겨찾기 아이콘 즐겨찾기 아이콘 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 fe77bc99..dc2f5e7e 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/read/listReadItems.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/read/listReadItems.jsp @@ -40,7 +40,7 @@ fn_setPageTitle("${pageTitle}"); // 메시지 표출 - if(!fn_isEmpty('${message}')) { + if(!gfn_isEmpty('${message}')) { alert("${message}"); } @@ -71,8 +71,8 @@ function fn_search(reqStatusDivCd) { // 그리드 데이터 조회 호출 function fn_searchArticle(pageIndex) { - if(fn_isEmpty(pageIndex)) pageIndex = $("#pageIndex").val(); - if(fn_isEmpty(pageIndex)) pageIndex = "1"; + if(gfn_isEmpty(pageIndex)) pageIndex = $("#pageIndex").val(); + if(gfn_isEmpty(pageIndex)) pageIndex = "1"; $("#pageIndex").val(pageIndex); var reqUrl = "${pageContext.request.contextPath}/read/listReadItemsAjax.do"; @@ -163,7 +163,7 @@ function fn_search(reqStatusDivCd) { }); } - pageLoad("fn_searchArticle", jsonObj.pagingPageIndex, jsonObj.pagingTotRecordCount, jsonObj.pagingStartPage, jsonObj.pagingEndPage, jsonObj.pagingLastPage); + gfn_makePaging("fn_searchArticle", jsonObj.pagingPageIndex, jsonObj.pagingTotRecordCount, jsonObj.pagingStartPage, jsonObj.pagingEndPage, jsonObj.pagingLastPage); }).fail(function (jqXHR, textStatus, errorThrown) { alert("조회에 실패하였습니다. 관리자에게 문의 바랍니다."); diff --git a/src/main/webapp/WEB-INF/jsp/nlib/rent/confirmRent.jsp b/src/main/webapp/WEB-INF/jsp/nlib/rent/confirmRent.jsp index c1b54a52..05f2eced 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/rent/confirmRent.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/rent/confirmRent.jsp @@ -225,13 +225,13 @@ $(document).ready(function() {
썸네일 - + 즐겨찾기 아이콘 즐겨찾기 아이콘 - + 즐겨찾기 아이콘 즐겨찾기 아이콘 diff --git a/src/main/webapp/WEB-INF/jsp/nlib/rent/insertRentItems.jsp b/src/main/webapp/WEB-INF/jsp/nlib/rent/insertRentItems.jsp index f2ea11b3..64cc5184 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/rent/insertRentItems.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/rent/insertRentItems.jsp @@ -110,10 +110,6 @@ function fn_insertRentItems() { } -function fn_changeInterest(masterId, onOff) { - alert("관심등록/삭제 준비중 : " + masterId + ", " + onOff); -} - function fn_gotoDetail(masterId) { alert("상세보기 준비중 : " + masterId); } @@ -197,13 +193,13 @@ $(document).ready(function() {
썸네일 - + 즐겨찾기 아이콘 즐겨찾기 아이콘 - + 즐겨찾기 아이콘 즐겨찾기 아이콘 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 dae4c3c3..4351f75d 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/rent/listRentItems.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/rent/listRentItems.jsp @@ -44,7 +44,7 @@ fn_setPageTitle("${pageTitle}"); // 메시지 표출 - if(!fn_isEmpty('${message}')) { + if(!gfn_isEmpty('${message}')) { alert("${message}"); } @@ -75,8 +75,8 @@ function fn_search(bookLtRvStatusCd) { // 그리드 데이터 조회 호출 function fn_searchArticle(pageIndex) { - if(fn_isEmpty(pageIndex)) pageIndex = $("#pageIndex").val(); - if(fn_isEmpty(pageIndex)) pageIndex = "1"; + if(gfn_isEmpty(pageIndex)) pageIndex = $("#pageIndex").val(); + if(gfn_isEmpty(pageIndex)) pageIndex = "1"; $("#pageIndex").val(pageIndex); var reqUrl = "${pageContext.request.contextPath}/rent/listRentItemsAjax.do"; @@ -148,7 +148,7 @@ function fn_search(bookLtRvStatusCd) { }); } - pageLoad("fn_searchArticle", jsonObj.pagingPageIndex, jsonObj.pagingTotRecordCount, jsonObj.pagingStartPage, jsonObj.pagingEndPage, jsonObj.pagingLastPage); + gfn_makePaging("fn_searchArticle", jsonObj.pagingPageIndex, jsonObj.pagingTotRecordCount, jsonObj.pagingStartPage, jsonObj.pagingEndPage, jsonObj.pagingLastPage); }).fail(function (jqXHR, textStatus, errorThrown) { alert("조회에 실패하였습니다. 관리자에게 문의 바랍니다."); diff --git a/src/main/webapp/WEB-INF/jsp/nlib/search/getDetailedSearchFormPopup.jsp b/src/main/webapp/WEB-INF/jsp/nlib/search/getDetailedSearchFormPopup.jsp index 3baddaa1..4de5a846 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/search/getDetailedSearchFormPopup.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/search/getDetailedSearchFormPopup.jsp @@ -367,7 +367,7 @@ function detailSearchSetting(){
상세 검색 검색어와, 검색조건들을 통해서 더 정확한 정보를 찾아보세요. - 닫기 + 닫기
@@ -515,7 +515,7 @@ function detailSearchSetting(){
- +
diff --git a/src/main/webapp/WEB-INF/jsp/nlib/userInfo/getMemberQrcodeFormPopup.jsp b/src/main/webapp/WEB-INF/jsp/nlib/userInfo/getMemberQrcodeFormPopup.jsp index 85a3295e..2729b725 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/userInfo/getMemberQrcodeFormPopup.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/userInfo/getMemberQrcodeFormPopup.jsp @@ -61,7 +61,7 @@

※ 캡쳐한 회원증을 통한 자료대출 및 열람을 불허합니다.

- +
diff --git a/src/main/webapp/WEB-INF/jsp/nlib/userInfo/pwCertMyInfo.jsp b/src/main/webapp/WEB-INF/jsp/nlib/userInfo/pwCertMyInfo.jsp index e1fd6548..067c5929 100644 --- a/src/main/webapp/WEB-INF/jsp/nlib/userInfo/pwCertMyInfo.jsp +++ b/src/main/webapp/WEB-INF/jsp/nlib/userInfo/pwCertMyInfo.jsp @@ -80,7 +80,7 @@ function goPutMyInfo(){
확인 diff --git a/src/main/webapp/WEB-INF/tiles/inc-popup/menu-popup.jsp b/src/main/webapp/WEB-INF/tiles/inc-popup/menu-popup.jsp index ec9a5dfd..10e13124 100644 --- a/src/main/webapp/WEB-INF/tiles/inc-popup/menu-popup.jsp +++ b/src/main/webapp/WEB-INF/tiles/inc-popup/menu-popup.jsp @@ -2,4 +2,4 @@ <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> - + diff --git a/src/main/webapp/WEB-INF/tiles/inc/menu.jsp b/src/main/webapp/WEB-INF/tiles/inc/menu.jsp index c09b49bc..0d91613b 100644 --- a/src/main/webapp/WEB-INF/tiles/inc/menu.jsp +++ b/src/main/webapp/WEB-INF/tiles/inc/menu.jsp @@ -17,7 +17,7 @@ $(document).ready(function() { this.onclick = function() { var gotoUrl = $(this).attr("data-gotoUrl"); - if(fn_isEmpty(gotoUrl)) { + if(gfn_isEmpty(gotoUrl)) { alert("접속 정보가 없습니다. \n관리자에게 문의하여 주시기 바랍니다."); } else { location.href = gotoUrl; @@ -88,7 +88,7 @@ $(document).ready(function() {
- + diff --git a/src/main/webapp/WEB-INF/tiles/tiles-layout-detail.jsp b/src/main/webapp/WEB-INF/tiles/tiles-layout-detail.jsp index d5d96653..bcc001a9 100644 --- a/src/main/webapp/WEB-INF/tiles/tiles-layout-detail.jsp +++ b/src/main/webapp/WEB-INF/tiles/tiles-layout-detail.jsp @@ -37,7 +37,6 @@ String councilDnsHost = (String)session.getAttribute("councilDnsHost"); - ${councilNm } 소장자료관 diff --git a/src/main/webapp/WEB-INF/tiles/tiles-layout.jsp b/src/main/webapp/WEB-INF/tiles/tiles-layout.jsp index c678a515..5b0c4f84 100644 --- a/src/main/webapp/WEB-INF/tiles/tiles-layout.jsp +++ b/src/main/webapp/WEB-INF/tiles/tiles-layout.jsp @@ -37,7 +37,6 @@ String councilDnsHost = (String)session.getAttribute("councilDnsHost"); - ${councilNm } 소장자료관 diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 1f16b1f2..a8a3760b 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -92,5 +92,30 @@ 500 /common/error500.jsp + + + + Protected Resource + /* + OPTIONS + HEAD + TRACE + PUT + DELETE + PATCH + SEARCH + CONNECT + PROPFIND + PROPPATCH + MKCOL + COPY + MOVE + LOCK + UNLOCK + + + + + diff --git a/src/main/webapp/js/cart.js b/src/main/webapp/js/cart.js deleted file mode 100644 index cdb7274f..00000000 --- a/src/main/webapp/js/cart.js +++ /dev/null @@ -1,68 +0,0 @@ - -/* - * - * NLIB : 카트 JavaScript - * - * - */ - -function fn_addRentCart(masterId, ableRent , ableRead ) { - - var cartTypeCd = null; - - if(masterId == "undefined" || masterId == "") { - alert("선택된 자료 정보가 없습니다."); - return; - } - - if((ableRent === undefined || ableRent == "") || (ableRead === undefined || ableRead == "")) { - alert("선택된 자료의 상태 정보를 확인할 수 없습니다."); - return; - } - - if(ableRent) { - cartTypeCd = "1"; // 대출 - } else if(ableRead) { - cartTypeCd = "2"; // 방문열람 - } else { - alert("대출 또는 방문열람이 가능한 자료만 카트에 추가 가능합니다."); - return; - } - - $.ajax({ - url : "/cart/insertCartItemAjax.do", - contentType: "application/json; charset=utf-8", - dataType: "json", - type : "POST", - data: JSON.stringify({ - masterId : masterId, - cartTypeCd : cartTypeCd - }), - success : function(data) { - var jsonData = JSON.parse(data); - if(jsonData.code == "S") { - if(confirm(jsonData.message + "\n카트로 이동하시겠습니까?")) { - fn_gotoCart(); - } - } else { - alert(jsonData.message); - } - }, - error : function(error) { - alert(error.message); - } - }); - -} - -function fn_gotoCart() { - location.href = "/cart/listCartItems.do"; -} - -function fn_addReserveCart() { - alert("카트 추가 - 로그인"); -} - -function fn_deleteCart() { - alert("카트 삭제"); -} \ No newline at end of file diff --git a/src/main/webapp/js/default.js b/src/main/webapp/js/default.js index 999a7bac..cc9240e5 100644 --- a/src/main/webapp/js/default.js +++ b/src/main/webapp/js/default.js @@ -165,7 +165,7 @@ $(document).ready(function(){ // 상세검색 팝업 열기 $('.btn-search-detail').on('click', function () { // 클릭 시, 컨텐츠 로딩되도록 처리 (2021.10.20 NLIB 추가) : 시작 - fn_layerPopWithClass("/search/getDetailedSearchFormPopup.do", "popup pop-advanced-search"); + gfn_layerPopWithClass("/search/getDetailedSearchFormPopup.do", "popup pop-advanced-search"); // 클릭 시, 컨텐츠 로딩되도록 처리 (2021.10.20 NLIB 추가) : 종료 }); }); diff --git a/src/main/webapp/js/nlib.js b/src/main/webapp/js/nlib.js index 3c15d257..da778c70 100644 --- a/src/main/webapp/js/nlib.js +++ b/src/main/webapp/js/nlib.js @@ -7,7 +7,7 @@ // 레이어 팝업 관련 함수 //--------------------------------------------------------------------------------------------------------------- -function fn_layerPopWithClass(url, addClasses) { +function gfn_layerPopWithClass(url, addClasses) { // 클릭 시, 로딩되도록 처리 (2021.10.20) $("#NLIB_LAYER_POPUP").removeClass(); @@ -21,12 +21,11 @@ function fn_layerPopWithClass(url, addClasses) { $('html,body').addClass('no-scroll'); } -// XXXXXXXXXXX : alreadySignUpPopup.jsp > fn_showLayerPop -function fn_showLayerPop() { +function gfn_showLayerPop() { $("#NLIB_LAYER_POPUP").show(); } -function fn_layerPopFormSubmit(formName, display) { +function gfn_layerPopFormSubmit(formName, display) { var dataList = $("#" + formName).serialize(); var url = $("#" + formName).attr('action'); @@ -42,7 +41,7 @@ function fn_layerPopFormSubmit(formName, display) { }); } -function fn_closeLayerPopup() { +function gfn_closeLayerPopup() { $("#NLIB_LAYER_POPUP").html(""); $("#NLIB_LAYER_POPUP").fadeOut(); $("#NLIB_LAYER_POPUP").removeClass(); @@ -72,7 +71,7 @@ function gfn_myAlert(newAlertNum) { } var alertShowed = gfn_getCookie("_NLIB_ALERT_DONE"); - if(!fn_isEmpty(alertShowed) && alertShowed == "Y") return; + if(!gfn_isEmpty(alertShowed) && alertShowed == "Y") return; var notiHtml = '
' + @@ -87,7 +86,7 @@ function gfn_myAlert(newAlertNum) { ' ' + ' ' + '
' + - ' ' + + ' ' + '
' + '
'; fn_layerPopWithHtml(notiHtml, "pop-notice"); @@ -95,7 +94,7 @@ function gfn_myAlert(newAlertNum) { function gfn_closeMyAlert() { gfn_setCookie("_NLIB_ALERT_DONE", "Y"); - fn_closeLayerPopup(); + gfn_closeLayerPopup(); } function gfn_setCookie(cookieName, cookieValue, cookieExpire, cookiePath, cookieDomain, cookieSecure){ @@ -124,7 +123,7 @@ function gfn_getCookie(cookieName){ // 문자열 처리 관련 함수 //--------------------------------------------------------------------------------------------------------------- -function fn_isEmpty(value) { +function gfn_isEmpty(value) { if(value == null) return true; if(typeof value == "undefined") return true; if(typeof value == "string" && value == "") return true; @@ -134,12 +133,12 @@ function fn_isEmpty(value) { return false; } -function fn_unescapeHtml(escapedStr) { +function gfn_unescapeHtml(escapedStr) { var doc = new DOMParser().parseFromString(escapedStr, "text/html"); return doc.documentElement.textContent; } -function fn_lengthBytes(s) { +function gfn_lengthBytes(s) { if(s != undefined && s != "") { for(b=i=0;c=s.charCodeAt(i++);b+=c>>11?3:c>>7?2:1); return b; @@ -148,12 +147,12 @@ function fn_lengthBytes(s) { } } -function fn_extractContentText(html) { +function gfn_extractContentText(html) { return new DOMParser().parseFromString(html, "text/html").documentElement.textContent; } function gfn_removeQuotes(str) { - if(fn_isEmpty(str)) return ""; + if(gfn_isEmpty(str)) return ""; return str.replace(/"/gi, '').replace(/'/gi, ""); } @@ -162,7 +161,7 @@ function gfn_removeQuotes(str) { // RIS 처리 관련 함수 //--------------------------------------------------------------------------------------------------------------- -function risShow(risId){ +function gfn_showRis(risId){ var tag = document.createElement("div"); tag.class="popup pop-user-set pop-export"; @@ -202,10 +201,10 @@ function risShow(risId){ html+='
'; html+='
'; html+='
'; - html+=' '; - html+=' '; + html+=' '; + html+=' '; html+='
'; - html+=' '; + html+=' '; html+='
'; html+='
'; html+='
'; @@ -213,24 +212,24 @@ function risShow(risId){ $("#export-data").append(html); } -function risDownload(risId){ +function gfn_downloadRis(risId){ $("#risId").val(risId); - document.risDownloadForm.action="/ris/risDownload.do"; + document.risDownloadForm.action="/ris/downloadRis.do"; document.risDownloadForm.submit(); } -function risClose(){ +function gfn_closeRis(){ $("#export-data").remove(); } -function forgetPassword(form) +function gfn_forgetPassword(form) { $("#"+form).attr("action", "/member/initPasswordFormPopup.do"); - fn_layerPopFormSubmit(form,true); + gfn_layerPopFormSubmit(form,true); } -function fn_changeInterestBtn(masterId,onOff){ +function gfn_changeInterestBtn(masterId,onOff){ if(onOff == "on") { $.ajax({ @@ -245,7 +244,7 @@ function fn_changeInterestBtn(masterId,onOff){ return false; } $(".favorit").removeAttr("onclick"); - $(".favorit").attr("onclick","fn_changeInterestBtn('" + masterId + "','off')"); + $(".favorit").attr("onclick","gfn_changeInterestBtn('" + masterId + "','off')"); }); } if(onOff == "off") @@ -264,14 +263,14 @@ function fn_changeInterestBtn(masterId,onOff){ return false; } $(".favorit").removeAttr("onclick"); - $(".favorit").attr("onclick","fn_changeInterestBtn('" + masterId + "','on')"); + $(".favorit").attr("onclick","gfn_changeInterestBtn('" + masterId + "','on')"); },error : function(){ } }); } } -function fn_changeInterest(masterId,onOff){ +function gfn_changeInterest(masterId,onOff){ var html=""; if(onOff == "on") @@ -290,7 +289,7 @@ function fn_changeInterest(masterId,onOff){ if(result == "관심자료에 추가되었습니다.") { $("#favorites_"+masterId).removeAttr("onclick"); - $("#favorites_"+masterId).attr("onclick","fn_changeInterest('" + masterId + "','off')"); + $("#favorites_"+masterId).attr("onclick","gfn_changeInterest('" + masterId + "','off')"); $("#favorites_"+masterId).attr("title","관심자료에서 삭제합니다."); html += "\"즐겨찾기" html += "\"즐겨찾기"; @@ -310,7 +309,7 @@ function fn_changeInterest(masterId,onOff){ success : function(){ alert("선택하신 관심자료가 삭제되었습니다."); $("#favorites_"+masterId).removeAttr("onclick"); - $("#favorites_"+masterId).attr("onclick","fn_changeInterest('" + masterId + "','on')"); + $("#favorites_"+masterId).attr("onclick","gfn_changeInterest('" + masterId + "','on')"); $("#favorites_"+masterId).attr("title","관심자료로 등록합니다."); html += "\"즐겨찾기" html += "\"즐겨찾기"; @@ -322,7 +321,7 @@ function fn_changeInterest(masterId,onOff){ } -function pageLoad(fnName,pageIndex, totRecordCount, startPage, endPage, lastPage) +function gfn_makePaging(fnName,pageIndex, totRecordCount, startPage, endPage, lastPage) { $("#paging *").remove(); @@ -368,7 +367,7 @@ function pageLoad(fnName,pageIndex, totRecordCount, startPage, endPage, lastPage } function gfn_formatDateStr(yyyymmdd, defVal) { - if(fn_isEmpty(yyyymmdd)) return defVal; + if(gfn_isEmpty(yyyymmdd)) return defVal; if(yyyymmdd.length == 8) { return yyyymmdd.substr(0, 4) + "-" + yyyymmdd.substr(4,2) + "-" + yyyymmdd.substr(6); } else if(yyyymmdd.length == 6) { @@ -413,7 +412,7 @@ function gfn_setSnsShare(masterId){ $('#div_pop-sharing img').attr('data-cUrl',url); // url 모두 맵핑 if(url != null && url != ''){ - getShortUrlData(url); + gfn_getShortUrlData(url); } } function gfn_snsShare(snsType, url) { @@ -447,23 +446,7 @@ function gfn_snsShare(snsType, url) { window.open(url, name, specs); } -$( document ) -.on('click', '#div_pop-sharing img.sns-pop', function(e) { - e.preventDefault(); - gfn_snsShare($(this).attr('data-sType'),$(this).attr('data-cUrl')); -}) -.on('click', '#div_pop-sharing button.btn-close-pop', function(e) { - e.preventDefault(); - $(this).find('img').attr('data-cUrl',''); -}) -.on('click', '#div_pop-sharing button.btn-white', function(e) { - e.preventDefault(); - $('#p_link-copy').select(); //복사할 텍스트를 선택 - document.execCommand("copy") //클립보드 복사 실행 - alert('단축 URL이 복사되었습니다.') -}); - -function getShortUrlData(url) { +function gfn_getShortUrlData(url) { $.ajax({ method: 'GET', url: '/search/shorturl-data.do', @@ -475,15 +458,15 @@ function getShortUrlData(url) { var urlData = data if(urlData != null && urlData != ""){ $('#p_link-copy').val(urlData); - qrcodeMake(urlData); + gfn_makeQrcode(urlData); } else { - qrcodeMake(url); + gfn_makeQrcode(url); } }); } //QR코드 -function qrcodeMake(url) { +function gfn_makeQrcode(url) { $("#qrcode").empty(); var qrcode = new QRCode(document.getElementById("qrcode"), { colorDark : "#000000", @@ -504,7 +487,7 @@ function gfn_gotoUrl(url) { function gfn_getDetail(masterId, host) { - if(fn_isEmpty(host)) host = ""; + if(gfn_isEmpty(host)) host = ""; else host = "https://" + host + ".nculture.org"; var form = document.createElement("form"); @@ -528,7 +511,7 @@ function gfn_getDetail(masterId, host) { function gfn_rentItem(mngOrgCd, masterId) { - if(fn_isEmpty(masterId)) { + if(gfn_isEmpty(masterId)) { alert("자료ID 정보가 없습니다."); return; } @@ -560,7 +543,7 @@ function gfn_rentItem(mngOrgCd, masterId) { function gfn_reserveReadItem(mngOrgCd, masterId) { - if(fn_isEmpty(masterId)) { + if(gfn_isEmpty(masterId)) { alert("자료ID 정보가 없습니다."); return; } @@ -591,7 +574,7 @@ function gfn_reserveReadItem(mngOrgCd, masterId) { } function gfn_showMessage(msg) { - if(fn_isEmpty(msg)) return; + if(gfn_isEmpty(msg)) return; else { // 딜레이 준 후, 표출 setTimeout(function() { @@ -599,4 +582,76 @@ function gfn_showMessage(msg) { }, 500); } return; -} \ No newline at end of file +} + + +function gfn_addRentCart(masterId, ableRent , ableRead ) { + + var cartTypeCd = null; + + if(masterId == "undefined" || masterId == "") { + alert("선택된 자료 정보가 없습니다."); + return; + } + + if((ableRent === undefined || ableRent == "") || (ableRead === undefined || ableRead == "")) { + alert("선택된 자료의 상태 정보를 확인할 수 없습니다."); + return; + } + + if(ableRent) { + cartTypeCd = "1"; // 대출 + } else if(ableRead) { + cartTypeCd = "2"; // 방문열람 + } else { + alert("대출 또는 방문열람이 가능한 자료만 카트에 추가 가능합니다."); + return; + } + + $.ajax({ + url : "/cart/insertCartItemAjax.do", + contentType: "application/json; charset=utf-8", + dataType: "json", + type : "POST", + data: JSON.stringify({ + masterId : masterId, + cartTypeCd : cartTypeCd + }), + success : function(data) { + var jsonData = JSON.parse(data); + if(jsonData.code == "S") { + if(confirm(jsonData.message + "\n카트로 이동하시겠습니까?")) { + gfn_gotoCart(); + } + } else { + alert(jsonData.message); + } + }, + error : function(error) { + alert(error.message); + } + }); + +} + +function gfn_gotoCart() { + location.href = "/cart/listCartItems.do"; +} + + + +$( document ) +.on('click', '#div_pop-sharing img.sns-pop', function(e) { + e.preventDefault(); + gfn_snsShare($(this).attr('data-sType'),$(this).attr('data-cUrl')); +}) +.on('click', '#div_pop-sharing button.btn-close-pop', function(e) { + e.preventDefault(); + $(this).find('img').attr('data-cUrl',''); +}) +.on('click', '#div_pop-sharing button.btn-white', function(e) { + e.preventDefault(); + $('#p_link-copy').select(); //복사할 텍스트를 선택 + document.execCommand("copy") //클립보드 복사 실행 + alert('단축 URL이 복사되었습니다.') +});