소스 재 커밋

This commit is contained in:
JSYOO 2021-11-12 18:39:31 +09:00
parent fe3b676241
commit 0bb4c29f6d
5 changed files with 386 additions and 304 deletions

View File

@ -155,7 +155,7 @@
$.each(jsonObj.data,function(key,obj) {
var t_data = "";
var count = 0;
t_data += "<div class=\"img\"><a><img src=\"" + obj.rprsThumbUrl + "\"</a>";
t_data += "<div class=\"img\"><a><img src=\"" + obj.rprsThumbUrlWithDefault + "\"</a>";
t_data += "<span id=\"favorites_" + obj.masterId + "\" class=\"favorites\" onclick=\"deleteInterests('single','" + obj.masterId + "');\"><img src=\"/images/icon/icon-cart-Favorites-on.png\" class=\"off\" alt=\"즐겨찾기 아이콘\"><img src=\"/images/icon/icon-cart-Favorites.png\" class=\"on\" alt=\"즐겨찾기 아이콘\"></span></div>";
t_data += "<div class=\"type\">"
if(obj.openDivCd != "3")
@ -222,9 +222,9 @@
{
t_btn +="<p>" + obj.operOutRangeNm + obj.operReadRangeNm + "</p>";
}
if(!fn_isEmpty(obj.interfaceId) && !fn_isEmpty(obj.openDivCd) && obj.openDivCd != '3')
if(!fn_isEmpty(obj.interfaceId) && !fn_isEmpty(obj.openDivCd) && obj.openDivCd != '3' && obj.digitalReadYn == 'Y')
{
t_btn+= "<button type=\"button\" class=\"btn-color\" onclick=\"docView('${pdfUri}','" + obj.interfaceId + "');\">원문보기</button>";
t_btn+= "<button type=\"button\" class=\"btn-color\" onclick=\"gfn_showDocPdf('" + obj.interfaceId + "');\">원문보기</button>";
}
t_btn+= "<button type=\"button\" class=\"btn-gray\" onclick=\"risShow('" + obj.masterId +"');\">RIS</button>";

View File

@ -70,6 +70,14 @@ function goList(){
<input type="hidden" name="reQueryChk" value="<c:out value='${searchVO.reQueryChk}'/>"/>
<input type="hidden" name="query" value="<c:out value='${searchVO.query}'/>"/>
<input type="hidden" name="reQuery" value="<c:out value='${searchVO.reQuery}'/>"/>
<input type="hidden" name="bookIndex" value="<c:out value='${searchVO.bookIndex}'/>"/>
<input type="hidden" name="mngtNo" value="<c:out value='${searchVO.mngtNo}'/>"/>
<input type="hidden" name="createStartDate" value="<c:out value='${searchVO.createStartDate}'/>"/>
<input type="hidden" name="createEndDate" value="<c:out value='${searchVO.createEndDate}'/>"/>
<input type="hidden" name="ageCode" value="<c:out value='${searchVO.ageCode}'/>"/>
<input type="hidden" name="collectionList" value="<c:out value='${searchVO.collectionList}'/>"/>
<input type="hidden" name="realQuery" value="<c:out value='${searchVO.realQuery}'/>"/>
<h2 class="blind">소장자료 상세페이지 섹션영역</h2>
<div class="inner">
@ -96,14 +104,13 @@ function goList(){
</div>
</div>
<div class="tit"><c:out value="${result.title}"/></div>
<div class="img"><img src="<c:out value="${result.rprsThumbUrl}"/>" alt="썸네일"></div>
<div class="img"><img src="<c:out value="${result.rprsThumbUrlWithDefault}"/>" alt="썸네일"></div>
</div>
<div class="right">
<div class="con-1">
<%-- <c:if test="${(!empty result.openDivCd) && (result.openDivCd ne '3') && (!empty result.interfaceId)}">
<button type="button" class="view" onclick="docView('<c:out value="${result.interfaceId}"/>')";>원문보기</button>
</c:if> --%>
<button type="button" class="view" onclick="docView('${pdfUri}','3568')";>원문보기</button>
<c:if test="${(!empty result.openDivCd) && (result.openDivCd ne '3') && (!empty result.interfaceId) && result.digitalReadYn eq 'Y'}">
<button type="button" class="view" onclick="gfn_showDocPdf('<c:out value="${result.interfaceId}"/>')";>원문보기</button>
</c:if>
<button type="button" class="ris" onclick="risShow('<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>
@ -121,58 +128,92 @@ function goList(){
<ul>
<li>
<span>자료유형</span>
<span><c:out value="${result.typeCodeNm}"/> &#62; <c:out value="${result.dtlsTypeDivNm}"/></span>
<span>
<c:out value="${result.typeCodeNm}"/>
<c:choose>
<c:when test="${!empty result.typeCodeNm or !empty result.dtlsTypeDivNm}">
<c:choose>
<c:when test="${!empty result.typeCodeNm and !empty result.dtlsTypeDivNm}">
&#62;
</c:when>
</c:choose>
</c:when>
<c:otherwise>
-
</c:otherwise>
</c:choose>
<c:out value="${result.dtlsTypeDivNm}"/>
</span>
</li>
<li>
<span>연대</span>
<span><c:if test = "${result.chronologicalCodeStartNm ne '해당없음'}"><c:out value="${result.chronologicalCodeStartNm}"/>년부터 <c:out value="${result.chronologicalCodeEndNm}"/>까지</c:if></span>
<span>
<c:if test="${!empty result.chronologicalCodeStartNm}"><c:out value="${result.chronologicalCodeStartNm}"/>년부터 </c:if>
<c:if test="${!empty result.chronologicalCodeEndNm}"><c:out value="${result.chronologicalCodeEndNm}"/>까지</c:if>
<c:if test="${empty result.chronologicalCodeStartNm and empty result.chronologicalCodeEndNm }">-</c:if>
</span>
</li>
<li>
<span>주제분야</span>
<span><c:out value="${result.subjectNmUp}"/> &#62; <c:out value="${result.subjectNm}"/></span>
<span>
<c:out value="${result.subjectNmUp}"/>
<c:choose>
<c:when test="${!empty result.subjectNmUp or !empty result.subjectNm}">
<c:choose>
<c:when test="${!empty result.subjectNmUp and !empty result.subjectNm}">
&#62;
</c:when>
</c:choose>
</c:when>
<c:otherwise>
-
</c:otherwise>
</c:choose>
<c:out value="${result.subjectNm}"/>
</span>
</li>
<li>
<span>저자</span>
<span><c:out value="${result.bookAuthor}"/></span>
<span><c:if test="${empty result.bookAuthor}">-</c:if><c:out value="${result.bookAuthor}"/></span>
</li>
<li>
<span>생산기관</span>
<span><c:out value="${result.orgNm}"/></span>
<span><c:if test="${empty result.orgNm}">-</c:if><c:out value="${result.orgNm}"/></span>
</li>
<li>
<span>출판사</span>
<span><c:out value="${result.bookPublisher}"/></span>
<span><c:if test="${empty result.bookPublisher}">-</c:if><c:out value="${result.bookPublisher}"/></span>
</li>
<li>
<span>생산년도</span>
<span><c:out value="${result.creatYyyy}"/></span>
<span><c:if test="${empty result.creatYyyy}">-</c:if><c:out value="${result.creatYyyy}"/></span>
</li>
<li>
<span>발간유형</span>
<span><c:out value="${result.bookPlbcTypeNm}"/></span>
<span><c:if test="${empty result.bookPlbcTypeNm}">-</c:if><c:out value="${result.bookPlbcTypeNm}"/></span>
</li>
<li>
<span>테마</span>
<span><c:out value="${result.themeCodeNm}"/></span>
<span><c:if test="${empty result.themeCodeNm}">-</c:if><c:out value="${result.themeCodeNm}"/></span>
</li>
<li>
<span>발간매체</span>
<span><c:out value="${result.bookPlbcMda}"/></span>
<span><c:if test="${empty result.bookPlbcMda}">-</c:if><c:out value="${result.bookPlbcMda}"/></span>
</li>
<li>
<span>시대</span>
<span><c:out value="${result.ageCodeNm}"/></span>
<span><c:if test="${empty result.ageCodeNm}">-</c:if><c:out value="${result.ageCodeNm}"/></span>
</li>
<li>
<span>청구기호</span>
<span><c:out value="${result.bookCallNo}"/></span>
<span><c:if test="${empty result.bookCallNo}">-</c:if><c:out value="${result.bookCallNo}"/></span>
</li>
</ul>
</div>
<div class="b-btn">
<button type="button" class="btn btn-color" onclick="fn_gotoRent()">대출예약</button>
<button type="button" class="btn btn-green" onclick="fn_gotoRead()">방문열람신청</button>
<button type="button" class="btn btn-orange" onclick="fn_addRentCart('${result.masterId}')">카트담기</button>
<button type="button" class="btn btn-color" onclick="gfn_rentItem('${result.masterId}')">대출예약</button>
<button type="button" class="btn btn-green" onclick="gfn_reserveReadItem('${result.masterId}')">방문열람신청</button>
<button type="button" class="btn btn-orange" onclick="fn_addRentCart('${result.masterId}', '${result.useStatus}')">카트담기</button>
</div>
<div class="keyword">
<span class="first">키워드</span>

View File

@ -137,6 +137,13 @@ function fnTabMoveSch(collection){
fnFilterSch();
}
function fnFilterSch(){
if($("#query").val() != "" && $("#reQuery").val() != "")
{
if($("#filter_mylist").val().indexOf("search_query") == 0)
{
$("#filter_mylist").val($("#filter_mylist").val() + "search_query,");
}
}
document.referencelistForm.action="/search/searchList.do";
document.referencelistForm.submit();
}
@ -166,8 +173,8 @@ function fn_search_article(pageIndex) {
<input type="hidden" id="filter_creatYyyy" name="filter_creatYyyy" value="<c:out value='${searchVO.filter_creatYyyy}'/>" />
<input type="hidden" name="filter_class" value="<c:out value='${searchVO.filter_class}'/>" />
<input type="hidden" name="filter_category" value="<c:out value='${searchVO.filter_category}'/>"/>
<input type="hidden" id="filter_class" name="filter_class" value="<c:out value='${searchVO.filter_class}'/>" />
<input type="hidden" id="filter_category" name="filter_category" value="<c:out value='${searchVO.filter_category}'/>"/>
<input type="hidden" id="filter_agency" name="filter_agency" value="<c:out value='${searchVO.filter_agency}'/>"/>
<input type="hidden" id="filter_mylist" name="filter_mylist" value="<c:out value='${searchVO.filter_mylist}'/>"/>
<input type="hidden" id="bookIndex" name="bookIndex" value="<c:out value='${searchVO.bookIndex}'/>"/>
@ -316,11 +323,21 @@ function fn_search_article(pageIndex) {
<div class="list-box culture-box">
<div class="tab">
<ul class="tabs">
<c:if test="${empty searchVO.collectionList or fn:contains(searchVO.collectionList, 'lib_total') }">
<li><a href="#" id="lib_total" onclick="fnTabMoveSch('lib_total');">전체<span>(<c:out value="${searchVO.lib_total_totalCount}"/>)</span></a></li>
</c:if>
<c:if test="${empty searchVO.collectionList or fn:contains(searchVO.collectionList, 'lib_offline') }">
<li><a href="#" id="lib_offline" onclick="fnTabMoveSch('lib_offline');">방문열람<span>(<c:out value="${searchVO.lib_offline_totalCount}"/>)</span></a></li>
</c:if>
<c:if test="${empty searchVO.collectionList or fn:contains(searchVO.collectionList, 'lib_loan') }">
<li><a href="#" id="lib_loan" onclick="fnTabMoveSch('lib_loan');">대출<span>(<c:out value="${searchVO.lib_loan_totalCount}"/>)</span></a></li>
</c:if>
<c:if test="${empty searchVO.collectionList or fn:contains(searchVO.collectionList, 'lib_online') }">
<li><a href="#" id="lib_online" onclick="fnTabMoveSch('lib_online');">온라인열람<span>(<c:out value="${searchVO.lib_online_totalCount}"/>)</span></a></li>
</c:if>
<c:if test="${empty searchVO.collectionList or fn:contains(searchVO.collectionList, 'lib_etc') }">
<li><a href="#" id="lib_etc" onclick="fnTabMoveSch('lib_etc');">기타<span>(<c:out value="${searchVO.lib_etc_totalCount}"/>)</span></a></li>
</c:if>
</ul>
<div class="title">
@ -401,18 +418,10 @@ function fn_search_article(pageIndex) {
<div class="title"><a href="javascript:void(0)" onclick="goDetail('${result.masterId}');"><c:out value="${result.title}"/></a></div>
<div class="code"><c:out value="${result.mngtNo}"/></div>
<div class="subject">
<c:if test="${!empty result.typeCodeNm}">
<span>자료유형 : ${result.typeCodeNm} &#62; ${result.dtlsTypeDivNm}</span>
</c:if>
<c:if test="${!empty result.subjectNmUp}">
<span>주제분야 : ${result.subjectNmUp} &#62; ${result.subjectNm }</span>
</c:if>
<c:if test="${!empty result.orgNm }">
<span>생산기관 : ${result.orgNm }</span>
</c:if>
<c:if test="${!empty result.creatYyyy}">
<span>생산년도 : ${result.creatYyyy }</span>
</c:if>
<span>자료유형 : <c:if test="${empty result.typeCodeNm and empty result.dtlsTypeDivNm}">-</c:if> ${result.typeCodeNm}<c:if test="${!empty result.typeCodeNm and !empty result.dtlsTypeDivNm}"> &#62; </c:if>${result.dtlsTypeDivNm}</span>
<span>주제분야 : <c:if test="${empty result.subjectNmUp and empty result.subjectNm}">-</c:if> ${result.subjectNmUp}<c:if test="${!empty result.subjectNmUp and !empty result.subjectNm}"> &#62; </c:if>${result.subjectNm }</span>
<span>생산기관 : <c:if test="${empty result.orgNm }">-</c:if>${result.orgNm }</span>
<span>생산년도 : <c:if test="${empty result.creatYyyy }">-</c:if>${result.creatYyyy }</span>
</div>
</div>
<div class="t-btn nomagin">
@ -426,7 +435,7 @@ function fn_search_article(pageIndex) {
</c:if>
</c:otherwise>
</c:choose>
<c:if test="${(!empty result.openDivCd) && (result.openDivCd ne '3') && (!empty result.interfaceId)}">
<c:if test="${(!empty result.openDivCd) && (result.openDivCd ne '3') && (!empty result.interfaceId) && result.digitalReadYn eq 'Y'}">
<button type="button" class="btn-color" onclick="gfn_showDocPdf('${result.interfaceId}')";>원문보기</button>
</c:if>
<button type="button" class="btn-gray" onclick="risShow('${result.masterId}')";>RIS</button>

View File

@ -275,6 +275,10 @@ function fn_changeInterestBtn(masterId,onOff){
data: {"masterId" : masterId}
}).done(function(result){
alert(result);
if(result == "로그인 후 이용하실 수 있습니다.")
{
return false;
}
$(".favorit").removeAttr("onclick");
$(".favorit").attr("onclick","fn_changeInterestBtn('" + masterId + "','off')");
});
@ -288,8 +292,12 @@ function fn_changeInterestBtn(masterId,onOff){
type : "POST",
async: false,
data : {"masterIdList" : masterIdArray},
success : function(){
alert("선택하신 관심자료가 삭제되었습니다.");
success : function(result){
alert(result);
if(result == "로그인 후 이용하실 수 있습니다.")
{
return false;
}
$(".favorit").removeAttr("onclick");
$(".favorit").attr("onclick","fn_changeInterestBtn('" + masterId + "','on')");
},error : function(){
@ -310,6 +318,10 @@ function fn_changeInterest(masterId,onOff){
data: {"masterId" : masterId}
}).done(function(result){
alert(result);
if(result == "로그인 후 이용하실 수 있습니다.")
{
return false;
}
if(result == "관심자료에 추가되었습니다.")
{
$("#favorites_"+masterId).removeAttr("onclick");
@ -344,15 +356,6 @@ function fn_changeInterest(masterId,onOff){
}
}
function insertInterest(masterId){
$.ajax({
type: "post",
url: "/interest/insertInterest.ajax",
data: {"masterId" : masterId}
}).done(function(result){
alert(result);
});
}
function pageLoad(fnName,pageIndex, totRecordCount, startPage, endPage, lastPage)
{

View File

@ -110,6 +110,17 @@ function reference_filterReset(){
$("#filter_category").val("");
$("#filter_agency").val("");
$("#filter_mylist").val("");
$("#bookIndex").val("");
$("#mngtNo").val("");
$("#createStartDate").val("");
$("#createEndDate").val("");
$("#ageCode").val("");
$("#collectionList").val("");
$("#realQuery").val("");
$("#reQueryChk").val("query");
$("#query").val("");
$("#reQuery").val("");
$("#collection").val("lib_total");
$("#referencelistForm [name=first_class],#referencelistForm [name=second_class],#referencelistForm [name=first_category],#referencelistForm [name=second_category],#referencelistForm [name=creatYyyyYn],#referencelistForm [name=first_agency]").prop("checked", false);
fnFilterSch();
});
@ -193,23 +204,40 @@ function reference_detailFilterDel(){
$(document).on("click","#referencelistForm .detailFilter",function(){
var filter_mylist = "";
var deleteFilterId = "";
var count = 0;
filter_mylist = $('#filter_mylist').val();
deleteFilterId = $(this).attr('name').substring($(this).attr('name').indexOf("_",0)+1);
if($(this).attr('name') == "search_ageCode" && $(this).attr('name') == "search_collectionList")
if($(this).attr('name') == "search_ageCode" || $(this).attr('name') == "search_collectionList")
{
if($("input[name="+$(this).attr('name')+"]").length == 1)
if($(".filter-wrap button[name="+$(this).attr('name')+"]").length == 1)
{
filter_mylist = filter_mylist.replace($(this).attr('name')+",",'');
}
$("#" + deleteFilterId).val("");
}else{
var deleteFilterArr = $("#" + deleteFilterId).val().split(",");
$("#" + deleteFilterId).val(deleteFilterArr[0]);
for(var i=1; i < deleteFilterArr.length ; i++){
if($(this).val() != deleteFilterArr[i])
{
$("#" + deleteFilterId).val(",",deleteFilterArr[i]);
if(count == 0)
{
$("#" + deleteFilterId).val(deleteFilterArr[i]);
}else
{
$("#" + deleteFilterId).val("," + deleteFilterArr[i]);
}
count+= 1;
}
//탭 필터 지웠을 시 다른탭 셀렉트
if($(this).attr('name') == "search_collectionList" && count == 1)
{
$("#collection").val(deleteFilterArr[i]);
}
}
}
}else
@ -217,6 +245,7 @@ function reference_detailFilterDel(){
filter_mylist = filter_mylist.replace($(this).attr('name')+",",'');
$("#" + deleteFilterId).val($("#" + deleteFilterId).val().replace($(this).val(),''));
}
$("#filter_mylist").val(filter_mylist);
fnFilterSch();
});
}