테스트 및 보완 작업
This commit is contained in:
parent
dac6212a1e
commit
bdec9bc7ca
@ -92,6 +92,11 @@ public class ReadController extends NlibCommonController {
|
|||||||
List<CollectionVO> list = collectionService.makeInfoListOfCollectionVO(selItems, mbInfoId);
|
List<CollectionVO> list = collectionService.makeInfoListOfCollectionVO(selItems, mbInfoId);
|
||||||
List<HashMap<String, String>> listDates = readService.listDates();
|
List<HashMap<String, String>> listDates = readService.listDates();
|
||||||
|
|
||||||
|
if(StringUtil.isEmpty(readVO.getMngOrgNm()) && list != null && list.size() > 0) {
|
||||||
|
readVO.setMngOrgCd(list.get(0).getMngOrgCd());
|
||||||
|
readVO.setMngOrgNm(list.get(0).getMngOrgNm());
|
||||||
|
}
|
||||||
|
|
||||||
model.addAttribute("readVO", readVO);
|
model.addAttribute("readVO", readVO);
|
||||||
model.addAttribute("list", list);
|
model.addAttribute("list", list);
|
||||||
model.addAttribute("listDates", listDates);
|
model.addAttribute("listDates", listDates);
|
||||||
|
|||||||
@ -33,90 +33,14 @@
|
|||||||
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>
|
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var BTN_APP_PREFIX = "대출신청/예약";
|
|
||||||
|
|
||||||
$( document ).ready(function() {
|
$( document ).ready(function() {
|
||||||
|
|
||||||
$("[id^=chk_item_]").prop("disabled", true);
|
if("${message}" != "") alert("${message}");
|
||||||
$("[id^=chk_all_]").prop("disabled", true);
|
|
||||||
|
|
||||||
$("[id=selMngOrgCd]").change(function(obj) {
|
|
||||||
var checked = $(this).prop("checked");
|
|
||||||
var mngOrgCd = $(this).val();
|
|
||||||
|
|
||||||
if(checked) {
|
|
||||||
// uncheck others and disable
|
|
||||||
// enable
|
|
||||||
//$("[id^=chk_item_" + mngOrgCd + "]").prop("checked", false);
|
|
||||||
$("[id^=chk_item_" + mngOrgCd + "]").prop("disabled", false);
|
|
||||||
$("[id^=chk_all_" + mngOrgCd + "]").prop("disabled", false);
|
|
||||||
|
|
||||||
$("[id^=chk_item_]").not("[id^=chk_item_" + mngOrgCd + "]").prop("checked", false);
|
|
||||||
$("[id^=chk_item_]").not("[id^=chk_item_" + mngOrgCd + "]").prop("disabled", true);
|
|
||||||
|
|
||||||
$("[id^=chk_all_]").not("[id^=chk_all_" + mngOrgCd + "]").prop("checked", false);
|
|
||||||
$("[id^=chk_all_]").not("[id^=chk_all_" + mngOrgCd + "]").prop("disabled", true);
|
|
||||||
|
|
||||||
}
|
|
||||||
$("#mngOrgCd").val(mngOrgCd);
|
|
||||||
$("[id^=chk_item_" + mngOrgCd + "]").filter(":first").trigger("change");
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
$("[id^=chk_item_]").change(function(obj) {
|
|
||||||
var mngOrgCd = $(this).attr("id").substr(9);
|
|
||||||
|
|
||||||
var totNum = $("[id^=chk_item_" + mngOrgCd + "]").length;
|
|
||||||
var selNum = $("[id^=chk_item_" + mngOrgCd + "]:checked").length;
|
|
||||||
|
|
||||||
var checked = false;
|
|
||||||
if(totNum <= selNum) checked = true;
|
|
||||||
$("[id^=chk_all_" + mngOrgCd + "]").prop("checked", checked);
|
|
||||||
|
|
||||||
$("#btnApp").val(BTN_APP_PREFIX + " (" + selNum + ")");
|
|
||||||
$("#appCnt").text("(" + selNum + ")");
|
|
||||||
});
|
|
||||||
|
|
||||||
$("[id^=selMngOrgCd]").filter(":first").prop("checked", true);
|
|
||||||
$("[id^=selMngOrgCd]").filter(":first").trigger("change",true);
|
|
||||||
|
|
||||||
}); // document ready
|
}); // document ready
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 선택한 게시글 상세 보기로 이동
|
|
||||||
function fn_viewDetail(articleNo) {
|
|
||||||
$("#articleNo").val(articleNo);
|
|
||||||
$("#articleForm").attr("action", "${pageContext.request.contextPath}/board/selectNotice.do");
|
|
||||||
$("#articleForm").submit();
|
|
||||||
}
|
|
||||||
|
|
||||||
function fn_insertRentItems() {
|
|
||||||
|
|
||||||
<sec:authorize access="not isAuthenticated()">
|
|
||||||
alert("먼저 로그인하신 후, 이용해 주시기 바랍니다.");
|
|
||||||
</sec:authorize>
|
|
||||||
|
|
||||||
<sec:authorize access="isAuthenticated()">
|
|
||||||
if($("#selItems").val() == "" || $("#selItems").val() == ",") {
|
|
||||||
alert("대출할 대상정보가 없습니다.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$("#frm").attr("action","${pageContext.request.contextPath}/rent/insertRentItems.do");
|
|
||||||
$("#frm").submit();
|
|
||||||
</sec:authorize>
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function fn_changeInterest(masterId, onOff) {
|
|
||||||
alert("관심등록/삭제 준비중 : " + masterId + ", " + onOff);
|
|
||||||
}
|
|
||||||
|
|
||||||
function fn_gotoDetail(masterId) {
|
|
||||||
alert("상세보기 준비중 : " + masterId);
|
|
||||||
}
|
|
||||||
|
|
||||||
function fn_searchHome() {
|
function fn_searchHome() {
|
||||||
location.href = "/search/searchList.do";
|
location.href = "/search/searchList.do";
|
||||||
}
|
}
|
||||||
@ -125,28 +49,6 @@ function fn_listReadItems() {
|
|||||||
location.href = "/read/listReadItems.do";
|
location.href = "/read/listReadItems.do";
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function() {
|
|
||||||
|
|
||||||
/* 탭메뉴 */
|
|
||||||
var selectedIdx = '> li:eq(' + (${cartTypeCd } -1) + ')';
|
|
||||||
$('.cartTab ul.tabs').addClass('active').find(selectedIdx).addClass('current');
|
|
||||||
|
|
||||||
$('.tab ul.tabs li a').click(function (g) {
|
|
||||||
var tab = $(this).closest('.tab'),
|
|
||||||
index = $(this).closest('li').index();
|
|
||||||
|
|
||||||
tab.find('ul.tabs > li').removeClass('current');
|
|
||||||
$(this).closest('li').addClass('current');
|
|
||||||
|
|
||||||
tab.find('.tab_content').find('div.tabs_item').not('div.tabs_item:eq(' + index + ')').hide();
|
|
||||||
tab.find('.tab_content').find('div.tabs_item:eq(' + index + ')').show();
|
|
||||||
g.preventDefault();
|
|
||||||
});
|
|
||||||
|
|
||||||
if("${message}" != "") alert("${message}");
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -192,43 +94,43 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
<c:set var="totCnt" value="0" />
|
<c:set var="totCnt" value="0" />
|
||||||
|
|
||||||
<c:forEach var="rent" items="${list}" varStatus="status">
|
<c:forEach var="read" items="${list}" varStatus="status">
|
||||||
<!-- 행 : 시작 -->
|
<!-- 행 : 시작 -->
|
||||||
<div class="list">
|
<div class="list">
|
||||||
<div class="t-data">
|
<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>
|
<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='${cart.MUseYn == "Y"}'>
|
<c:if test='${read.MUseYn == "Y"}'>
|
||||||
<span class="favorites" onclick="fn_changeInterest('${rent.masterId }', 'off')" title="관심자료에서 삭제합니다.">
|
<span id="favorites_${read.masterId}" class="favorites" onclick="fn_changeInterest('${read.masterId }', 'off')" title="관심자료에서 삭제합니다.">
|
||||||
<img src="/images/icon/icon-cart-Favorites-on.png" class="off" alt="즐겨찾기 아이콘">
|
<img src="/images/icon/icon-cart-Favorites-on.png" class="off" alt="즐겨찾기 아이콘">
|
||||||
<img src="/images/icon/icon-cart-Favorites.png" class="on" alt="즐겨찾기 아이콘">
|
<img src="/images/icon/icon-cart-Favorites.png" class="on" alt="즐겨찾기 아이콘">
|
||||||
</span>
|
</span>
|
||||||
</c:if>
|
</c:if>
|
||||||
<c:if test='${rent.MUseYn != "Y"}'>
|
<c:if test='${read.MUseYn != "Y"}'>
|
||||||
<span class="favorites" onclick="fn_changeInterest('${rent.masterId }', 'on')" title="관심자료로 등록합니다.">
|
<span class="favorites" onclick="fn_changeInterest('${read.masterId }', 'on')" title="관심자료로 등록합니다.">
|
||||||
<img src="/images/icon/icon-cart-Favorites.png" class="off" alt="즐겨찾기 아이콘">
|
<img src="/images/icon/icon-cart-Favorites.png" class="off" alt="즐겨찾기 아이콘">
|
||||||
<img src="/images/icon/icon-cart-Favorites-on.png" class="on" alt="즐겨찾기 아이콘">
|
<img src="/images/icon/icon-cart-Favorites-on.png" class="on" alt="즐겨찾기 아이콘">
|
||||||
</span>
|
</span>
|
||||||
</c:if> </div>
|
</c:if> </div>
|
||||||
<div class="type">
|
<div class="type">
|
||||||
<c:if test="${rent.openDivCd != '3' }">
|
<c:if test="${read.ableOnline }">
|
||||||
<span class="online">온라인열람</span>
|
<span class="online">온라인열람</span>
|
||||||
</c:if>
|
</c:if>
|
||||||
|
|
||||||
<c:if test="${rent.operOutRangeCd == '01' }">
|
<c:if test="${read.ableRent }">
|
||||||
<span class="loan">대출</span>
|
<span class="loan">대출</span>
|
||||||
</c:if>
|
</c:if>
|
||||||
|
|
||||||
<c:if test="${rent.operReadRangeCd != '03' }">
|
<c:if test="${read.ableRead }">
|
||||||
<span class="visit">방문열람</span>
|
<span class="visit">방문열람</span>
|
||||||
</c:if>
|
</c:if>
|
||||||
</div>
|
</div>
|
||||||
<div class="title"><a href="javascript:void(0)" onclick="fn_gotoDetail('${rent.masterId }')" title="상세보기">${rent.title }</a></div>
|
<div class="title"><a href="javascript:void(0)" onclick="gfn_getDetail('${read.masterId }')" title="상세보기">${read.title }</a></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="t-state"><p>${rent.useStatusNm }</p></div>
|
<div class="t-state"><p>${read.useStatusNm }</p></div>
|
||||||
<div class="t-date">${rent.rtnExpctDd }</div>
|
<div class="t-date">${read.rtnExpctDd }</div>
|
||||||
<div class="t-reser poss">${rent.bookLtRvStatusNm }
|
<div class="t-reser poss">${read.bookLtRvStatusNm }
|
||||||
<c:if test='${not empty rent.rsrvDd }'>
|
<c:if test='${not empty read.rsrvDd }'>
|
||||||
(${rent.rsrvDd })
|
(${read.rsrvDd })
|
||||||
</c:if>
|
</c:if>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -251,7 +153,7 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
<c:if test='${readVO.resultCode != "S"}'>
|
<c:if test='${readVO.resultCode != "S"}'>
|
||||||
<div class="compl-text">처리에 실패하였습니다.</div>
|
<div class="compl-text">처리에 실패하였습니다.</div>
|
||||||
<div class="compl-date">${readVO.resultMessage } (${readVO.resultCode })</div>
|
<div class="compl-date">${readVO.resultMessage }</div>
|
||||||
</c:if>
|
</c:if>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user