nlib.js 함수명 정리 작업

This commit is contained in:
KNKIM 2021-11-30 09:33:48 +09:00
parent 766275be4b
commit 7130ee6299
35 changed files with 236 additions and 234 deletions

View File

@ -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"));

View File

@ -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");

View File

@ -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("조회에 실패하였습니다. 관리자에게 문의 바랍니다.");

View File

@ -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("조회에 실패하였습니다. 관리자에게 문의 바랍니다.");

View File

@ -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) {
<sec:authorize access="not isAuthenticated()">
if(!fn_isEmpty(searchQuestionType)) {
if(!gfn_isEmpty(searchQuestionType)) {
alert("로그인 후, 이용하여 주시기 바랍니다.");
$("#tabQnaUser").removeClass("current");
$("#tabQnaAll").addClass("current");

View File

@ -38,7 +38,7 @@
$( document ).ready(function() {
fn_setPageTitle("${pageTitle}");
if(!fn_isEmpty('${message}')) {
if(!gfn_isEmpty('${message}')) {
alert("${message}");
}
});

View File

@ -38,7 +38,7 @@
$( document ).ready(function() {
fn_setPageTitle("${pageTitle}");
if(!fn_isEmpty('${message}')) {
if(!gfn_isEmpty('${message}')) {
alert("${message}");
}
});

View File

@ -312,13 +312,13 @@ $(document).ready(function() {
<a href="javascript:void(0)"><img src="${cart.rprsThumbUrlWithDefaultSmall }" alt="썸네일" width="60" height="91" title="상세보기" onclick="gfn_getDetail('${cart.masterId }')"></a>
<sec:authorize access="isAuthenticated()">
<c:if test='${cart.MUseYn == "Y"}'>
<span id="favorites_${cart.masterId }" class="favorites" onclick="fn_changeInterest('${cart.masterId }', 'off')" title="관심자료에서 삭제합니다.">
<span id="favorites_${cart.masterId }" class="favorites" onclick="gfn_changeInterest('${cart.masterId }', 'off')" title="관심자료에서 삭제합니다.">
<img src="/images/icon/icon-cart-Favorites-on.png" class="off" alt="즐겨찾기 아이콘">
<img src="/images/icon/icon-cart-Favorites.png" class="on" alt="즐겨찾기 아이콘">
</span>
</c:if>
<c:if test='${cart.MUseYn != "Y"}'>
<span id="favorites_${cart.masterId }" class="favorites" onclick="fn_changeInterestBtn('${cart.masterId }', 'on')" title="관심자료로 등록합니다.">
<span id="favorites_${cart.masterId }" class="favorites" onclick="gfn_changeInterestBtn('${cart.masterId }', 'on')" title="관심자료로 등록합니다.">
<img src="/images/icon/icon-cart-Favorites.png" class="off" alt="즐겨찾기 아이콘">
<img src="/images/icon/icon-cart-Favorites-on.png" class="on" alt="즐겨찾기 아이콘">
</span>

View File

@ -27,7 +27,7 @@ function goSearch(){
function fn_getMemberCard() {
fn_layerPopWithClass("/userInfo/getMemberQrcodeFormPopup.do", "pop-member");
gfn_layerPopWithClass("/userInfo/getMemberQrcodeFormPopup.do", "pop-member");
}
</script>
@ -64,7 +64,7 @@ function fn_getMemberCard() {
<ul>
<sec:authorize access="not isAuthenticated()">
<li>
<a href="javascript:void(0)" onclick='fn_layerPopWithClass("/login/loginFormPopup.do", "pop-login")' title="${councilNm}(${councilCd})" class="login-btn">로그인</a></li>
<a href="javascript:void(0)" onclick='gfn_layerPopWithClass("/login/loginFormPopup.do", "pop-login")' title="${councilNm}(${councilCd})" class="login-btn">로그인</a></li>
</sec:authorize>
<sec:authorize access="isAuthenticated()">
<sec:authentication property="principal.name" var="userName" />

View File

@ -315,7 +315,7 @@ function fn_listPops(typeDivCd) {
</ul>
<div class="btn-box">
<div class="view"><a href="javascript:void(0)" onclick="gfn_showDocPdf('${itemOnline.interfaceId }','${itemOnline.masterId }','${itemOnline.typeDivCd}','${itemOnline.dtlsTypeDivCd}')">원문보기</a></div>
<div class="RIS"><a href="javascript:void(0)" onclick="risShow('${itemOnline.masterId }')">RIS</a></div>
<div class="RIS"><a href="javascript:void(0)" onclick="gfn_showRis('${itemOnline.masterId }')">RIS</a></div>
</div>
</div>
</div>

View File

@ -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($('<button type="button"></button>').attr('class', 'question').on("click", function() {
fn_viewDetail(this, obj.notiId);
}));
if(!fn_isEmpty(obj.mngOrgNm)) li.find(".question").append($('<span />').attr("class", "type").html("[" + obj.mngOrgNm + "]"));
if(!gfn_isEmpty(obj.mngOrgNm)) li.find(".question").append($('<span />').attr("class", "type").html("[" + obj.mngOrgNm + "]"));
else li.find(".question").append($('<span />').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));

View File

@ -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 += "</div>"
t_data += "<div class=\"title\"><a href=\"#\">" + obj.title + "</a></div>"
t_data += "<div class=\"code\">"
if(!fn_isEmpty(obj.mngtNo))
if(!gfn_isEmpty(obj.mngtNo))
{
t_data += obj.mngtNo
}
@ -199,37 +199,37 @@
t_data += "<div class=\"subject\">"
t_data += "<span>자료유형 : "
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 += " &#62; "
}
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 += "</span>"
t_data += "<span>주제분야 : "
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 += " &#62; "
}
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 += "</span>"
t_data += "<span>생산기관 : "
if(!fn_isEmpty(obj.orgNm)){
if(!gfn_isEmpty(obj.orgNm)){
t_data += obj.orgNm
}else{
t_data += "-"
@ -237,7 +237,7 @@
t_data += "</span>"
t_data += "<span>생산년도 : "
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 +="<div>" + obj.operOutRangeNm + "</div>" + "<div>" + obj.operReadRangeNm + "</div>";
}else if(!fn_isEmpty(obj.operOutRangeNm) || !fn_isEmpty(obj.operReadRangeNm))
}else if(!gfn_isEmpty(obj.operOutRangeNm) || !gfn_isEmpty(obj.operReadRangeNm))
{
t_btn +="<div>" + obj.operOutRangeNm + obj.operReadRangeNm + "</div>";
}
@ -259,7 +259,7 @@
{
t_btn+= "<button type=\"button\" class=\"btn-color\" onclick=\"gfn_showDocPdf('" + obj.interfaceId + "','" + obj.masterId + "','" + obj.typeDivCd + "','" + obj.dtlsTypeDivCd + "');\">원문보기</button>";
}
t_btn+= "<button type=\"button\" class=\"btn-gray btn-ris\" onclick=\"risShow('" + obj.masterId +"');\">RIS</button>";
t_btn+= "<button type=\"button\" class=\"btn-gray btn-ris\" onclick=\"gfn_showRis('" + obj.masterId +"');\">RIS</button>";
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("조회에 실패하였습니다. 관리자에게 문의 바랍니다.");

View File

@ -117,12 +117,12 @@ function goList(){
<c:if test="${result.ableOnline eq true}">
<button type="button" class="view" onclick="gfn_showDocPdf('<c:out value="${result.interfaceId}"/>','<c:out value="${result.masterId}"/>','<c:out value="${result.typeDivCd}"/>','<c:out value="${result.dtlsTypeDivCd}"/>')";>원문보기</button>
</c:if>
<button type="button" class="ris" onclick="risShow('<c:out value="${result.masterId}"/>');">RIS</button>
<button type="button" class="ris" onclick="gfn_showRis('<c:out value="${result.masterId}"/>');">RIS</button>
<c:if test='${result.MUseYn == "Y"}'>
<button type="button" class="favorit" onclick="fn_changeInterestBtn('${result.masterId }', 'off');">즐겨찾기</button>
<button type="button" class="favorit" onclick="gfn_changeInterestBtn('${result.masterId }', 'off');">즐겨찾기</button>
</c:if>
<c:if test='${result.MUseYn != "Y"}'>
<button type="button" class="favorit" onclick="fn_changeInterestBtn('${result.masterId }', 'on');">즐겨찾기</button>
<button type="button" class="favorit" onclick="gfn_changeInterestBtn('${result.masterId }', 'on');">즐겨찾기</button>
</c:if>
<button type="button" class="share" onclick="gfn_setSnsShare('<c:out value="${result.masterId}"/>')";>공유</button>
</div>
@ -220,7 +220,7 @@ function goList(){
<c:if test="${result.ableReadNow }"><button type="button" class="btn btn-green" onclick="gfn_reserveReadItem('${result.mngOrgCd}', '${result.masterId}')">방문열람신청</button></c:if>
<c:if test="${result.ableRent or result.ableRead }">
<button type="button" class="btn btn-orange" onclick="fn_addRentCart('${result.masterId}', '${result.ableRent}', '${result.ableRead}')">카트담기</button>
<button type="button" class="btn btn-orange" onclick="gfn_addRentCart('${result.masterId}', '${result.ableRent}', '${result.ableRead}')">카트담기</button>
</c:if>
</div>
<c:if test="${fn:length(keywordList) > 0 }">

View File

@ -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) {
<div class="t-data">
<div class="img"><a href="javascript:void(0)"><img src="${result.rprsThumbUrlWithDefaultSmall }" alt="썸네일" width="60" height="91" title="상세보기" onclick="goDetail('${result.masterId}');"></a>
<c:if test='${result.MUseYn == "Y"}'>
<button id="favorites_${result.masterId}" class="favorites" onclick="fn_changeInterest('${result.masterId }', 'off')" title="관심자료에서 삭제합니다.">
<button id="favorites_${result.masterId}" class="favorites" onclick="gfn_changeInterest('${result.masterId }', 'off')" title="관심자료에서 삭제합니다.">
<img src="/images/icon/icon-cart-Favorites-on.png" class="off" alt="즐겨찾기 아이콘">
<img src="/images/icon/icon-cart-Favorites.png" class="on" alt="즐겨찾기 아이콘">
</button>
</c:if>
<c:if test='${result.MUseYn != "Y"}'>
<button id="favorites_${result.masterId}" class="favorites" onclick="fn_changeInterest('${result.masterId }', 'on')" title="관심자료로 등록합니다.">
<button id="favorites_${result.masterId}" class="favorites" onclick="gfn_changeInterest('${result.masterId }', 'on')" title="관심자료로 등록합니다.">
<img src="/images/icon/icon-cart-Favorites.png" class="off" alt="즐겨찾기 아이콘">
<img src="/images/icon/icon-cart-Favorites-on.png" class="on" alt="즐겨찾기 아이콘">
</button>
@ -498,7 +498,7 @@ function fn_search_article(pageIndex) {
<c:if test="${result.ableOnline eq true}">
<button type="button" class="btn-color" title="새창열기" onclick="gfn_showDocPdf('${result.interfaceId}','${result.masterId}','${result.typeDivCd}','${result.dtlsTypeDivCd}')";>원문보기</button>
</c:if>
<button type="button" class="btn-gray btn-ris" onclick="risShow('${result.masterId}');">RIS</button>
<button type="button" class="btn-gray btn-ris" onclick="gfn_showRis('${result.masterId}');">RIS</button>
</div>
</div>
</c:forEach> <!-- 리스트 출력 끝부분 -->

View File

@ -57,7 +57,7 @@
<p>회원가입하고 <span>대출/열람 서비스</span>를 이용해보세요!</p>
<p><a href="javascript:void(0)" onclick="fn_signUp()" class="join">회원가입</a></p>
</div>
<button type="button" class="login-close" onclick="fn_closeLayerPopup()"></button>
<button type="button" class="login-close" onclick="gfn_closeLayerPopup()"></button>
</div>
<div class="Bg"></div>

View File

@ -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()
</c:forEach>
</div>
<div class="row btn">
<p><a href="javascript:void(0);" class="cancel" onclick="fn_closeLayerPopup();">아니요, 내가 아닙니다.</a></p>
<p><a href="javascript:void(0);" class="cancel" onclick="gfn_closeLayerPopup();">아니요, 내가 아닙니다.</a></p>
</div>
<button type="button" class="login-close" onclick="fn_closeLayerPopup();"></button>
<button type="button" class="login-close" onclick="gfn_closeLayerPopup();"></button>
</div>
<div class="Bg"></div>
</div>
@ -124,13 +124,13 @@ function accountLink()
<div class="passwd"><label for="password" style="display:none;">비밀번호</label><input type="password" id="selectPassword" name="selectPassword" placeholder="비밀번호"></div>
</div>
<div class="row btn">
<p><a href="javascript:void(0);" class="cancel" onclick="forgetPassword('selectAccountForm');">비밀번호를 잊으셨나요? &gt;</a></p>
<p><a href="javascript:void(0);" class="cancel" onclick="gfn_forgetPassword('selectAccountForm');">비밀번호를 잊으셨나요? &gt;</a></p>
</div>
<div class="row btn-box">
<button type="button" class="btn btn-gray" onclick="goPrevious();" id="cancel">이전으로</button>
<button type="button" class="btn btn-color" onclick="accountLink();" >계정 연결하기</button>
</div>
<button type="button" class="login-close" onclick="fn_closeLayerPopup();"></button>
<button type="button" class="login-close" onclick="gfn_closeLayerPopup();"></button>
</div>
<div class="Bg"></div>
</div>

View File

@ -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);
}
</script>
<div class="pop-find">

View File

@ -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("인증번호가 일치하지않습니다.");

View File

@ -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() {
<div class="t-data">
<div class="img"><a href="javascript:void(0)"><img src="${read.rprsThumbUrlWithDefaultSmall }" alt="썸네일" width="60" height="91" title="상세보기" onclick="gfn_getDetail('${read.masterId }')"></a>
<c:if test='${read.MUseYn == "Y"}'>
<span id="favorites_${read.masterId}" class="favorites" onclick="fn_changeInterest('${read.masterId }', 'off')" title="관심자료에서 삭제합니다.">
<span id="favorites_${read.masterId}" class="favorites" onclick="gfn_changeInterest('${read.masterId }', 'off')" title="관심자료에서 삭제합니다.">
<img src="/images/icon/icon-cart-Favorites-on.png" class="off" alt="즐겨찾기 아이콘">
<img src="/images/icon/icon-cart-Favorites.png" class="on" alt="즐겨찾기 아이콘">
</span>
</c:if>
<c:if test='${read.MUseYn != "Y"}'>
<span id="favorites_${read.masterId}" class="favorites" onclick="fn_changeInterest('${read.masterId }', 'on')" title="관심자료로 등록합니다.">
<span id="favorites_${read.masterId}" class="favorites" onclick="gfn_changeInterest('${read.masterId }', 'on')" title="관심자료로 등록합니다.">
<img src="/images/icon/icon-cart-Favorites.png" class="off" alt="즐겨찾기 아이콘">
<img src="/images/icon/icon-cart-Favorites-on.png" class="on" alt="즐겨찾기 아이콘">
</span>

View File

@ -101,13 +101,13 @@ function fn_listReadItems() {
<div class="t-data">
<div class="img"><a href="javascript:void(0)"><img src="${read.rprsThumbUrlWithDefaultSmall }" alt="썸네일" width="60" height="91" title="상세보기" onclick="gfn_getDetail('${read.masterId }')"></a>
<c:if test='${read.MUseYn == "Y"}'>
<span id="favorites_${read.masterId}" class="favorites" onclick="fn_changeInterest('${read.masterId }', 'off')" title="관심자료에서 삭제합니다.">
<span id="favorites_${read.masterId}" class="favorites" onclick="gfn_changeInterest('${read.masterId }', 'off')" title="관심자료에서 삭제합니다.">
<img src="/images/icon/icon-cart-Favorites-on.png" class="off" alt="즐겨찾기 아이콘">
<img src="/images/icon/icon-cart-Favorites.png" class="on" alt="즐겨찾기 아이콘">
</span>
</c:if>
<c:if test='${read.MUseYn != "Y"}'>
<span class="favorites" onclick="fn_changeInterest('${read.masterId }', 'on')" title="관심자료로 등록합니다.">
<span class="favorites" onclick="gfn_changeInterest('${read.masterId }', 'on')" title="관심자료로 등록합니다.">
<img src="/images/icon/icon-cart-Favorites.png" class="off" alt="즐겨찾기 아이콘">
<img src="/images/icon/icon-cart-Favorites-on.png" class="on" alt="즐겨찾기 아이콘">
</span>

View File

@ -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("조회에 실패하였습니다. 관리자에게 문의 바랍니다.");

View File

@ -225,13 +225,13 @@ $(document).ready(function() {
<div class="t-data">
<div class="img"><a href="javascript:void(0)"><img src="${rent.rprsThumbUrlWithDefaultSmall }" alt="썸네일" width="60" height="91" title="상세보기" onclick="gfn_getDetail('${rent.masterId }')"></a>
<c:if test='${rent.MUseYn == "Y"}'>
<span id="favorites_${rent.masterId}" class="favorites" onclick="fn_changeInterest('${rent.masterId }', 'off')" title="관심자료에서 삭제합니다.">
<span id="favorites_${rent.masterId}" class="favorites" onclick="gfn_changeInterest('${rent.masterId }', 'off')" title="관심자료에서 삭제합니다.">
<img src="/images/icon/icon-cart-Favorites-on.png" class="off" alt="즐겨찾기 아이콘">
<img src="/images/icon/icon-cart-Favorites.png" class="on" alt="즐겨찾기 아이콘">
</span>
</c:if>
<c:if test='${rent.MUseYn != "Y"}'>
<span id="favorites_${rent.masterId}" class="favorites" onclick="fn_changeInterest('${rent.masterId }', 'on')" title="관심자료로 등록합니다.">
<span id="favorites_${rent.masterId}" class="favorites" onclick="gfn_changeInterest('${rent.masterId }', 'on')" title="관심자료로 등록합니다.">
<img src="/images/icon/icon-cart-Favorites.png" class="off" alt="즐겨찾기 아이콘">
<img src="/images/icon/icon-cart-Favorites-on.png" class="on" alt="즐겨찾기 아이콘">
</span>

View File

@ -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() {
<div class="t-data">
<div class="img"><a href="javascript:void(0)"><img src="${rent.rprsThumbUrlWithDefaultSmall }" alt="썸네일" width="60" height="91" title="상세보기" onclick="fn_gotoDetail('${rent.masterId }')"></a>
<c:if test='${rent.MUseYn == "Y"}'>
<span id="favorites_${rent.masterId}" class="favorites" onclick="fn_changeInterest('${rent.masterId }', 'off')" title="관심자료에서 삭제합니다.">
<span id="favorites_${rent.masterId}" class="favorites" onclick="gfn_changeInterest('${rent.masterId }', 'off')" title="관심자료에서 삭제합니다.">
<img src="/images/icon/icon-cart-Favorites-on.png" class="off" alt="즐겨찾기 아이콘">
<img src="/images/icon/icon-cart-Favorites.png" class="on" alt="즐겨찾기 아이콘">
</span>
</c:if>
<c:if test='${rent.MUseYn != "Y"}'>
<span id="favorites_${rent.masterId}" class="favorites" onclick="fn_changeInterest('${rent.masterId }', 'on')" title="관심자료로 등록합니다.">
<span id="favorites_${rent.masterId}" class="favorites" onclick="gfn_changeInterest('${rent.masterId }', 'on')" title="관심자료로 등록합니다.">
<img src="/images/icon/icon-cart-Favorites.png" class="off" alt="즐겨찾기 아이콘">
<img src="/images/icon/icon-cart-Favorites-on.png" class="on" alt="즐겨찾기 아이콘">
</span>

View File

@ -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("조회에 실패하였습니다. 관리자에게 문의 바랍니다.");

View File

@ -367,7 +367,7 @@ function detailSearchSetting(){
<div class="Title">
<span>상세 검색</span>
<span>검색어와, 검색조건들을 통해서 더 정확한 정보를 찾아보세요.</span>
<span><a href="javascript:;" class="btn-close-pop" onclick="fn_closeLayerPopup();"><img src="/images/btn/btn-pop-close.png" alt="닫기"></a></span>
<span><a href="javascript:;" class="btn-close-pop" onclick="gfn_closeLayerPopup();"><img src="/images/btn/btn-pop-close.png" alt="닫기"></a></span>
</div>
<form action="/search/searchList.do" method="POST" id="d_referencelistForm" name="d_referencelistForm" class="mCustomScrollbar" data-mcs-theme="dark-2">
<input type="hidden" id="d_filter_class" name="filter_class">
@ -515,7 +515,7 @@ function detailSearchSetting(){
<div class="btn-wrap">
<button type="button" class="btn btn-white" id="cmm_popudp_del" onclick="allReset();">초기화</button>
<button type="button" onclick="d_search();" class="btn btn-color" id="cmm_popudp_submit">검색</button>
<button type="button" class="btn btn-gray btn-close-pop" onclick="fn_closeLayerPopup();">닫기</button>
<button type="button" class="btn btn-gray btn-close-pop" onclick="gfn_closeLayerPopup();">닫기</button>
</div>
</form>
</div>

View File

@ -61,7 +61,7 @@
<div class="text">
<p>※ 캡쳐한 회원증을 통한 자료대출 및 열람을 불허합니다.</p>
</div>
<button type="button" class="member-close" onclick="fn_closeLayerPopup()"></button>
<button type="button" class="member-close" onclick="gfn_closeLayerPopup()"></button>
<div class="innerbg"></div>
</div>
<div class="Bg"></div>

View File

@ -80,7 +80,7 @@ function goPutMyInfo(){
</div>
<div class="box">
<p><label for="password" style="display:none;">비밀번호</label><input type="password" id="password" name="password" placeholder="비밀번호" onKeypress="javascript:if(event.keyCode==13) {goPutMyInfo();}"></p>
<p><a href="javascript:void(0);" class="cancel" onclick="forgetPassword('pwInputForm');">비밀번호를 잊으셨나요? &gt;</a></p>
<p><a href="javascript:void(0);" class="cancel" onclick="gfn_forgetPassword('pwInputForm');">비밀번호를 잊으셨나요? &gt;</a></p>
</div>
<div class="btn-box">
<a href="javascript:void(0)" class="btn btn-color" onclick="goPutMyInfo();">확인</a>

View File

@ -2,4 +2,4 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<!-- <a href="javascript:void(0);" onclick="fn_closeLayerPopup()" class="floatRight">닫기</a> -->
<!-- <a href="javascript:void(0);" onclick="gfn_closeLayerPopup()" class="floatRight">닫기</a> -->

View File

@ -17,7 +17,7 @@ $(document).ready(function() {
<sec:authorize access="isAuthenticated()">
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() {
<div class="btns_box">
<sec:authorize access="not isAuthenticated()">
<button type="button" class="btn_login login-btn" onclick='fn_layerPopWithClass("/login/loginFormPopup.do", "pop-login")'>로그인</button>
<button type="button" class="btn_login login-btn" onclick='gfn_layerPopWithClass("/login/loginFormPopup.do", "pop-login")'>로그인</button>
</sec:authorize>
<sec:authorize access="isAuthenticated()">

View File

@ -37,7 +37,6 @@ String councilDnsHost = (String)session.getAttribute("councilDnsHost");
<script src="/js/default.js"></script>
<script src="/js/nlib.js"></script>
<script src="/js/cart.js"></script>
<title>${councilNm } 소장자료관</title>

View File

@ -37,7 +37,6 @@ String councilDnsHost = (String)session.getAttribute("councilDnsHost");
<script src="/js/default.js"></script>
<script src="/js/nlib.js"></script>
<script src="/js/cart.js"></script>
<title>${councilNm } 소장자료관</title>

View File

@ -93,4 +93,29 @@
<location>/common/error500.jsp</location>
</error-page>
<security-constraint>
<web-resource-collection>
<web-resource-name>Protected Resource</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>OPTIONS</http-method>
<http-method>HEAD</http-method>
<http-method>TRACE</http-method>
<http-method>PUT</http-method>
<http-method>DELETE</http-method>
<http-method>PATCH</http-method>
<http-method>SEARCH</http-method>
<http-method>CONNECT</http-method>
<http-method>PROPFIND</http-method>
<http-method>PROPPATCH</http-method>
<http-method>MKCOL</http-method>
<http-method>COPY</http-method>
<http-method>MOVE</http-method>
<http-method>LOCK</http-method>
<http-method>UNLOCK</http-method>
</web-resource-collection>
<auth-constraint>
<role-name></role-name>
</auth-constraint>
</security-constraint>
</web-app>

View File

@ -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("카트 삭제");
}

View File

@ -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 추가) : 종료
});
});

View File

@ -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 =
'<div class="row Title">' +
@ -87,7 +86,7 @@ function gfn_myAlert(newAlertNum) {
' <button type="button" class="btn btn-color" onclick="gfn_closeMyAlert()">확인</button>' +
' <button type="submit" class="btn btn-green" onclick="location.href = \'/cmm/listNotifications.do\'; ">알림 목록으로</button>' +
' </div>' +
' <button type="button" class="notice-close" onclick="fn_closeLayerPopup()"></button>' +
' <button type="button" class="notice-close" onclick="gfn_closeLayerPopup()"></button>' +
'</div>' +
'<div class="Bg"></div>';
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+=' </div>';
html+=' </div>';
html+=' <div class="row btn-box">';
html+=' <button type="button" class="btn btn-color" id="risExport" onclick="risDownload(\''+risId+'\');">내보내기</button>';
html+=' <button type="submit" class="btn btn-gray" onclick="risClose();">닫기</button>';
html+=' <button type="button" class="btn btn-color" id="risExport" onclick="gfn_downloadRis(\''+risId+'\');">내보내기</button>';
html+=' <button type="submit" class="btn btn-gray" onclick="gfn_closeRis();">닫기</button>';
html+=' </div>';
html+=' <button type="button" class="serge-close" onclick="risClose();"></button>';
html+=' <button type="button" class="serge-close" onclick="gfn_closeRis();"></button>';
html+='</div>';
html+='<div class="Bg"></div>';
html+='</div>';
@ -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 += "<img src=\"/images/icon/icon-cart-Favorites-on.png\" class=\"off\" alt=\"즐겨찾기 아이콘\">"
html += "<img src=\"/images/icon/icon-cart-Favorites.png\" class=\"on\" alt=\"즐겨찾기 아이콘\">";
@ -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 += "<img src=\"/images/icon/icon-cart-Favorites.png\" class=\"off\" alt=\"즐겨찾기 아이콘\">"
html += "<img src=\"/images/icon/icon-cart-Favorites-on.png\" class=\"on\" alt=\"즐겨찾기 아이콘\">";
@ -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() {
@ -600,3 +583,75 @@ function gfn_showMessage(msg) {
}
return;
}
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이 복사되었습니다.')
});