메뉴관리 개발중
This commit is contained in:
parent
700ae42078
commit
907807b339
@ -545,6 +545,15 @@ public class EgovMenuCreateManageController {
|
|||||||
ModelAndView modelAndView = new ModelAndView();
|
ModelAndView modelAndView = new ModelAndView();
|
||||||
modelAndView.setViewName("jsonView");
|
modelAndView.setViewName("jsonView");
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
|
|
||||||
|
//하위노드가 있는 메뉴의 경우 타입을 변경 하지 못하도록 수정
|
||||||
|
if(
|
||||||
|
menuCreatVO.getExistChildNode().equals("Y")
|
||||||
|
&& "M".equals(menuManageVO.getMenuType())) {
|
||||||
|
modelAndView.addObject("status", "menuInNode");
|
||||||
|
return modelAndView;
|
||||||
|
}
|
||||||
|
|
||||||
try{
|
try{
|
||||||
try{
|
try{
|
||||||
if(!menuManageVO.getTmp_Id().equals(menuManageVO.getMenuNo()+"")){ //매뉴번호 변경시
|
if(!menuManageVO.getTmp_Id().equals(menuManageVO.getMenuNo()+"")){ //매뉴번호 변경시
|
||||||
@ -718,11 +727,12 @@ public class EgovMenuCreateManageController {
|
|||||||
try {
|
try {
|
||||||
//선택한 menuNo 모든 권한을 삭제
|
//선택한 menuNo 모든 권한을 삭제
|
||||||
menuCreateManageService.deleteMenu(menuManageVO);
|
menuCreateManageService.deleteMenu(menuManageVO);
|
||||||
for(String author : menuManageVO.getAuthorChkList()) {
|
if(menuManageVO.getAuthorChkList() != null && menuManageVO.getAuthorChkList().size() > 0) {
|
||||||
menuManageVO.setAuthorCode(author);
|
for(String author : menuManageVO.getAuthorChkList()) {
|
||||||
menuCreateManageService.insertMenu(menuManageVO);
|
menuManageVO.setAuthorCode(author);
|
||||||
|
menuCreateManageService.insertMenu(menuManageVO);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
modelAndView.addObject("status", "authorFail");
|
modelAndView.addObject("status", "authorFail");
|
||||||
return modelAndView;
|
return modelAndView;
|
||||||
|
|||||||
@ -206,6 +206,13 @@ function jstreeInit() {
|
|||||||
|
|
||||||
})
|
})
|
||||||
.on('create_node.jstree', function(e, data) {
|
.on('create_node.jstree', function(e, data) {
|
||||||
|
|
||||||
|
if($("#menuType option:selected").val() != "M"){
|
||||||
|
alert("타입이 메뉴가 아니면 하위 메뉴를 등로 할 수 없습니다.")
|
||||||
|
location.reload(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (confirm("메뉴를 추가하시겠습니까?")){
|
if (confirm("메뉴를 추가하시겠습니까?")){
|
||||||
var instance = data.instance;
|
var instance = data.instance;
|
||||||
var menuNm = data.text;
|
var menuNm = data.text;
|
||||||
@ -549,6 +556,8 @@ function initShowUrl(init){
|
|||||||
if($('#itn_organization').jstree('get_selected')[0] != null){
|
if($('#itn_organization').jstree('get_selected')[0] != null){
|
||||||
if(instance.get_node($('#itn_organization').jstree('get_selected')[0]).children.length != 0){
|
if(instance.get_node($('#itn_organization').jstree('get_selected')[0]).children.length != 0){
|
||||||
alert("하위 메뉴가 있을경우는 다른타입으로 변경할수 없습니다.");
|
alert("하위 메뉴가 있을경우는 다른타입으로 변경할수 없습니다.");
|
||||||
|
$("#menuType option").attr("selected", false);
|
||||||
|
$("#menuType option[value='M']").attr("seleted", "selected");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user