279 lines
11 KiB
Plaintext
279 lines
11 KiB
Plaintext
<%--
|
|
Class Name : EgovAuthorManage.jsp
|
|
Description : EgovAuthorManage List 화면
|
|
Modification Information
|
|
수정일 수정자 수정내용
|
|
------- -------- ---------------------------
|
|
2009.03.01 lee.m.j 최초 생성
|
|
2011.08.31 JJY 경량환경 버전 생성
|
|
|
|
author : 공통서비스 개발팀 lee.m.j
|
|
since : 2009.03.01
|
|
--%>
|
|
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
|
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
|
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
|
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
|
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
|
<head>
|
|
<script type="text/javaScript">
|
|
function fnCheckAll(){ //전체 선택
|
|
$("input[name=delYn]").prop("checked",$("input[name=checkAll]").prop("checked"));
|
|
}
|
|
|
|
function fncManageChecked() {
|
|
|
|
var checkField = document.listForm.delYn;
|
|
var checkId = document.listForm.checkId;
|
|
var returnValue = "";
|
|
|
|
var returnBoolean = false;
|
|
var checkCount = 0;
|
|
|
|
if(checkField) {
|
|
if(checkField.length > 1) {
|
|
for(var i=0; i<checkField.length; i++) {
|
|
if(checkField[i].checked) {
|
|
checkField[i].value = checkId[i].value;
|
|
if(returnValue == "")
|
|
returnValue = checkField[i].value;
|
|
else
|
|
returnValue = returnValue + ";" + checkField[i].value;
|
|
checkCount++;
|
|
}
|
|
}
|
|
if(checkCount > 0)
|
|
returnBoolean = true;
|
|
else {
|
|
alert("선택된 권한이 없습니다.");
|
|
returnBoolean = false;
|
|
}
|
|
} else {
|
|
if(document.listForm.delYn.checked == false) {
|
|
alert("선택된 권한이 없습니다.");
|
|
returnBoolean = false;
|
|
}
|
|
else {
|
|
returnValue = checkId.value;
|
|
returnBoolean = true;
|
|
}
|
|
}
|
|
} else {
|
|
alert("조회된 결과가 없습니다.");
|
|
}
|
|
document.listForm.authorCodes.value = returnValue;
|
|
return returnBoolean;
|
|
}
|
|
|
|
function fncSelectAuthorList(){
|
|
var listForm = document.listForm ;
|
|
<%--<c:if test="${!empty loginId}">
|
|
if(""!= document.listForm.searchKeyword.value){
|
|
updateRecentSearch();//최근검색어 등록
|
|
}
|
|
</c:if>--%>
|
|
linkPage('1');
|
|
}
|
|
|
|
function fncSelectAuthor(author) {
|
|
var listForm = document.listForm ;
|
|
listForm.authorCode.value = author;
|
|
listForm.action = "<c:url value='/sec/ram/EgovAuthor.do'/>";
|
|
listForm.submit();
|
|
}
|
|
|
|
function fncAddAuthorInsert(){
|
|
document.listForm.action = "<c:url value='/sec/ram/EgovAuthorInsertView.do'/>";
|
|
document.listForm.submit();
|
|
|
|
}
|
|
|
|
function fncAuthorDeleteList() {
|
|
|
|
var delflag = false;
|
|
var delmessage = "";
|
|
$("input[name=delYn]:checked").each(function(){ //기본권한 삭제 방지
|
|
console.log("kerinet");
|
|
if("ROLE_ADMIN"==$(this).val() || "ROLE_USER_MEMBER"==$(this).val() || "ROLE_ANONYMOUS"==$(this).val()){
|
|
delmessage += " "+$(this).attr('id');
|
|
delflag = true;
|
|
}
|
|
});
|
|
|
|
if(delflag){
|
|
alert("필수권한인 " + delmessage +"는 삭제하실수 없습니다." ) ;
|
|
return;
|
|
}
|
|
|
|
if(fncManageChecked()) {
|
|
if(confirm("삭제하시겠습니까?")) {
|
|
document.listForm.action = "<c:url value='/sec/ram/EgovAuthorListDelete.do'/>";
|
|
document.listForm.submit();
|
|
}
|
|
}
|
|
}
|
|
|
|
function fncAddAuthorView() {
|
|
document.listForm.action = "<c:url value='/sec/ram/EgovAuthorUpdate.do'/>";
|
|
document.listForm.submit();
|
|
}
|
|
|
|
function fncSelectAuthorRole(author, roleNm) {
|
|
document.listForm.searchKeyword.value = author;
|
|
document.listForm.roleNm.value = roleNm;
|
|
document.listForm.searchSortCnd.value = '';
|
|
document.listForm.action = "<c:url value='/sec/ram/EgovAuthorRoleList.do'/>";
|
|
document.listForm.submit();
|
|
}
|
|
|
|
function linkPage(pageNo){
|
|
document.listForm.searchCondition.value = "1";
|
|
document.listForm.pageIndex.value = pageNo;
|
|
document.listForm.action = "<c:url value='/sec/ram/EgovAuthorList.do'/>";
|
|
document.listForm.submit();
|
|
}
|
|
|
|
function press() {
|
|
if (event.keyCode==13) {
|
|
fncSelectAuthorList();
|
|
}
|
|
}
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
<form:form id="listForm" name="listForm" action="<c:url value='/sec/ram/EgovAuthorList.do'/>" method="post">
|
|
<input type="hidden" name="authorCode"/>
|
|
<input type="hidden" name="authorCodes"/>
|
|
<input type="hidden" name="pageIndex" value="<c:out value='${authorManageVO.pageIndex}' default='1' />"/>
|
|
<input name="searchCondition" type="hidden" value="1" />
|
|
<input type="hidden" name="searchSortCnd" value="<c:out value="${authorManageVO.searchSortCnd}" />" />
|
|
<input type="hidden" name="searchSortOrd" value="<c:out value="${authorManageVO.searchSortOrd}" />" />
|
|
<input name="roleNm" type="hidden" />
|
|
<!-- cont -->
|
|
<div class="cont_wrap">
|
|
<div class="box">
|
|
<div class="cont_tit">
|
|
<h2>권한별롤관리</h2>
|
|
<ul class="cont_nav">
|
|
<li class="home"><a href="/"><i></i></a></li>
|
|
<li>
|
|
<p>권한관리</p>
|
|
</li>
|
|
<li><span class="cur_nav">권한별롤관리</span></li>
|
|
</ul>
|
|
</div>
|
|
<!-- cont -->
|
|
<div class="cont">
|
|
<!-- list_top -->
|
|
<div class="list_top table_top">
|
|
<p class="table_total_text">총 건수 : <span class="color_blue fw_bold"><c:out value="${paginationInfo.totalRecordCount}" /></span>건</p>
|
|
<div class="list_util search_wrap">
|
|
<c:if test="${siteId eq 'super'}">
|
|
<select name="searchConditionSite" id="searchConditionSite" title="검색조건2-검색어구분">
|
|
<c:forEach var="result" items="${siteManageList}" varStatus="status">
|
|
<option value="${result.siteId}" <c:if test="${result.siteId eq userSearchVO.searchConditionSite }">selected="selected"</c:if> >${result.siteNm}</option>
|
|
</c:forEach>
|
|
</select>
|
|
</c:if>
|
|
<select class="sel2 searchSel" id="searchCondition" name="searchCondition" title="조회조건">
|
|
<option value="" <c:if test="${empty userSearchVO.searchCondition }">selected="selected"</c:if> >전체</option>
|
|
<option value="0" <c:if test="${userSearchVO.searchCondition == '0'}">selected="selected"</c:if> >아이디</option>
|
|
<option value="1" <c:if test="${userSearchVO.searchCondition == '1'}">selected="selected"</c:if> >관리자명</option>
|
|
</select>
|
|
|
|
<input type="text" id="searchKeyword" name="searchKeyword" value="<c:out value='${userSearchVO.searchKeyword}'/>" class="search_input" placeholder="검색어를 입력하세요">
|
|
<button class="btn btn_text blue_border" onclick="fnSearch(); return false;">검색</button>
|
|
|
|
<select class="sel2" name="pageUnit" id="pageUnit" onchange="linkPage(1);" title="줄 선택" style="width: 140px">
|
|
<option value='10' <c:if test="${userSearchVO.pageUnit == '10' or userSearchVO.pageUnit == ''}">selected</c:if>>10줄</option>
|
|
<option value='20' <c:if test="${userSearchVO.pageUnit == '20'}">selected</c:if>>20줄</option>
|
|
<option value='30' <c:if test="${userSearchVO.pageUnit == '30'}">selected</c:if>>30줄</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<!-- //list_top -->
|
|
|
|
<!-- list -->
|
|
<div class="list tbType01 table-layout mt15">
|
|
<table>
|
|
<colgroup>
|
|
<col style="width: 80px;">
|
|
<col style="width: 8%;">
|
|
<col style="width: 25%;">
|
|
<col style="width: 30%;">
|
|
<col style="width: 30%;">
|
|
<col style="width: 15%;">
|
|
<col style="width: 120px;">
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<th><input type="checkbox" name="checkAll" id="checkAll" onclick="fnCheckAll();" /><label for="checkAll"></label></th>
|
|
<th scope="col">번호<button class="sort sortBtn" id="sort_SORT_NUM">▲</button></th>
|
|
<th scope="col">권한명<button class="sort sortBtn" id="sort_AUTHOR_NM">▲</button></th>
|
|
<th scope="col">권한 코드<button class="sort sortBtn" id="sort_AUTHOR_CODE">▲</button></th>
|
|
<th scope="col">설명<button class="sort sortBtn" id="sort_AUTHOR_DC">▲</button></th>
|
|
<th scope="col">등록일자<button class="sort sortBtn" id="sort_AUTHOR_CREAT_DE">▲</button></th>
|
|
<th scope="col">롤 정보</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<c:forEach var="author" items="${authorList}" varStatus="status">
|
|
<tr>
|
|
<td>
|
|
<input type="checkbox" name="delYn" id="<c:out value="${author.authorNm}"/>" value="<c:out value="${author.authorCode}"/>">
|
|
<input type="hidden" name="checkId" value="<c:out value="${author.authorCode}"/>" />
|
|
|
|
</td>
|
|
<td>
|
|
<c:if test="${authorManageVO.searchSortOrd eq 'desc' }">
|
|
<c:out value="${ ( paginationInfo.totalRecordCount - ((authorManageVO.pageIndex -1)*authorManageVO.pageUnit) ) - status.index }"/>
|
|
</c:if>
|
|
<c:if test="${authorManageVO.searchSortOrd eq 'asc' }">
|
|
<c:out value="${(authorManageVO.pageIndex - 1) * authorManageVO.pageUnit + status.count}"/>
|
|
</c:if>
|
|
</td>
|
|
<td><a href="#" onclick="fncSelectAuthor('<c:out value="${author.authorCode}"/>')"><c:out value="${author.authorNm}"/></a></td>
|
|
<td>
|
|
<c:out value="${author.authorCode}"/>
|
|
</td>
|
|
<td><c:out value="${author.authorDc}"/></td>
|
|
<td><c:out value="${author.authorCreatDe}"/></td>
|
|
<td>
|
|
<button type="button" class="btnType01" onclick="fncSelectAuthorRole('<c:out value="${author.authorCode}"/>' , '<c:out value="${author.authorNm}"/>'); return false">이동</button>
|
|
<%-- <input type="button" class="btnType1 serchBtn" onclick="fncSelectAuthorRole('<c:out value="${author.authorCode}"/>' , '<c:out value="${author.authorNm}"/>'); return false"> --%>
|
|
</td>
|
|
</tr>
|
|
</c:forEach>
|
|
<c:if test="${empty authorList}">
|
|
<tr><td colspan="8"><spring:message code="common.nodata.msg" /></td></tr>
|
|
</c:if>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- //list -->
|
|
|
|
<!-- btn_wrap -->
|
|
<div class="btn_wrap">
|
|
<button type="button" class="btn btn_text btn_46 red_border" onclick="fncAuthorDeleteList(); return false;">삭제</button>
|
|
<button type="button" class="btn btn_text btn_46 blue_fill" onclick="fncAddAuthorInsert(); return false;">등록</button>
|
|
</div>
|
|
<!-- //btn_wrap -->
|
|
|
|
<!-- 페이지 네비게이션 시작 -->
|
|
<c:if test="${!empty authorList}">
|
|
<div class="page">
|
|
<ul class="inline">
|
|
<ui:pagination paginationInfo = "${paginationInfo}" type="image" jsFunction="linkPage" />
|
|
</ul>
|
|
</div>
|
|
</c:if>
|
|
<!-- //페이지 네비게이션 끝 -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- //cont -->
|
|
</form:form>
|
|
</body>
|