80 lines
2.2 KiB
Plaintext
80 lines
2.2 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<%@ page import="com.pms.common.utils.*"%>
|
|
<%@ page import="java.util.*" %>
|
|
<%@include file= "/init.jsp" %>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title><%=Constants.SYSTEM_NAME%></title>
|
|
<script type="text/javascript">
|
|
//메뉴 권한 추가
|
|
function addMenuAuthGroup(){
|
|
var leftForm = parent.menuAuthMngPopUpLeft.menuAuthLeftForm;
|
|
var menuObjid = leftForm.objid.value;
|
|
|
|
if("" == menuObjid){
|
|
Swal.fire("잘못된 접근 입니다.");
|
|
return false;
|
|
}
|
|
|
|
var rightForm = parent.menuAuthMngPopUpRight.menuAuthRightForm;
|
|
|
|
if(0 != rightForm.authGroup.length){
|
|
var checkedCnt=0;
|
|
for(var i=0;i<rightForm.authGroup.length;i++){
|
|
if(rightForm.authGroup[i].checked){
|
|
checkedCnt++;
|
|
}
|
|
}
|
|
if(0 == checkedCnt){
|
|
if(rightForm.authGroup.checked){
|
|
checkedCnt++;
|
|
}
|
|
}
|
|
if(0 < checkedCnt){
|
|
if(confirm("선택한 권한을 메뉴에 포함하시겠습니까?")){
|
|
rightForm.menuObjid.value = menuObjid;
|
|
|
|
var param = parent.menuAuthMngPopUpRight.$("#menuAuthRightForm").serialize();
|
|
|
|
$.ajax({
|
|
type : "POST",
|
|
url : "/admin/addMenuAuthGroup.do",
|
|
data : param,
|
|
dataType:"json",
|
|
async:false,
|
|
complete:function(xhr){
|
|
Swal.fire("추가하였습니다.");
|
|
parent.menuAuthMngPopUpLeft.getMenuAuthGroupList();
|
|
parent.menuAuthMngPopUpRight.searchUser();
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//메뉴 권한 삭제
|
|
function deleteMenuAuthGroup(){
|
|
var leftForm = parent.menuAuthMngPopUpLeft.menuAuthLeftForm;
|
|
var menuObjid = leftForm.objid.value;
|
|
var authGroupLength = leftForm.addedAuthGroup.length;
|
|
|
|
if(0 == authGroupLength){
|
|
Swal.fire("삭제할 대상이 없습니다.");
|
|
}else{
|
|
parent.menuAuthMngPopUpLeft.deleteMenuAuthGorup();
|
|
}
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<form name="menuAuthCenterForm" id="menuAuthCenterForm" method="POST">
|
|
<div id="btnW">
|
|
<input type="button" value="<<" class="btns" onclick="javascript:addMenuAuthGroup();">
|
|
<input type="button" value=">>" class="btns" onclick="javascript:deleteMenuAuthGroup();">
|
|
</div>
|
|
</form>
|
|
</body>
|
|
</html> |