fix: 메뉴목록관리 팝업페이지 수정

main
Kurt92 2 years ago
parent e16ce4dd38
commit c82e8a6712

@ -30,7 +30,7 @@ public interface AuthAuthorMgtMapper {
/** /**
* <pre> : </pre> * <pre> : </pre>
* *
* @param vo * @param paraMap
* @param rowBounds * @param rowBounds
* @return List<XitAuthRegMngVO> * @return List<XitAuthRegMngVO>
* @author: * @author:
@ -38,7 +38,6 @@ public interface AuthAuthorMgtMapper {
*/ */
List<XitAuthorInfoVO> selectAuthorInfos(final Map<String, Object> paraMap, final RowBounds rowBounds); List<XitAuthorInfoVO> selectAuthorInfos(final Map<String, Object> paraMap, final RowBounds rowBounds);
List<XitAuthorInfoVO> selectAuthorInfos(final Map<String, Object> paraMap); List<XitAuthorInfoVO> selectAuthorInfos(final Map<String, Object> paraMap);
/** /**
* <pre> : </pre> * <pre> : </pre>
* @param vo * @param vo

@ -44,12 +44,12 @@ public interface MenuListMgtMapper {
/** /**
* <pre> : </pre> * <pre> : </pre>
* @param vo * @param String
* @return MenuListMngVO * @return MenuListMngVO
* @author: * @author:
* @date: 2020. 3. 26. * @date: 2020. 3. 26.
*/ */
public MenuListMngVO findMenuView(MenuListMngVO vo) throws SQLException; public MenuListMngVO findMenuView(String progrmFileNm);
/** /**
* <pre> : </pre> * <pre> : </pre>

@ -40,12 +40,12 @@ public interface MenuListMgtService {
/** /**
* <pre> : </pre> * <pre> : </pre>
* @param vo * @param String
* @return MenuListMngVO * @return MenuListMngVO
* @author: * @author:
* @date: 2020. 3. 26. * @date: 2020. 3. 26.
*/ */
public MenuListMngVO findView(MenuListMngVO vo); public MenuListMngVO findView(String menuNm);
/** /**
* <pre> : </pre> * <pre> : </pre>

@ -66,13 +66,8 @@ public class MenuListMngServiceImpl implements MenuListMgtService {
} }
@Override @Override
public MenuListMngVO findView(MenuListMngVO vo) { public MenuListMngVO findView(String menuNm) {
MenuListMngVO result = null; MenuListMngVO result = menuListMngMapper.findMenuView(menuNm);
try {
result = menuListMngMapper.findMenuView(vo);
} catch (SQLException e) {
throw new RuntimeException("메뉴목록관리 상세정보 조회 FAIL::", e);
}
return result; return result;
} }

@ -14,6 +14,9 @@ import javax.servlet.http.HttpServletResponse;
import kr.xit.framework.core.model.ResultResponse; import kr.xit.framework.core.model.ResultResponse;
import kr.xit.framework.support.mybatis.MybatisUtils; import kr.xit.framework.support.mybatis.MybatisUtils;
import kr.xit.framework.support.util.Checks;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -47,14 +50,12 @@ import org.springframework.web.servlet.ModelAndView;
* @version 1.0 Copyright(c) XIT All rights reserved. * @version 1.0 Copyright(c) XIT All rights reserved.
*/ */
@Controller @Controller
//@RequestMapping(value = "/_mng_/menu/list/") @Slf4j
@RequestMapping(value = "/framework/biz/mng/menu/") @AllArgsConstructor
@RequestMapping(value = "/framework/biz/mng/menu")
public class MenuListMgtController { public class MenuListMgtController {
private static final Logger logger = LoggerFactory.getLogger(MenuListMgtController.class); private final MenuListMgtService service;
@Resource
private MenuListMgtService menuListMngService;
@Autowired @Autowired
private XitBeanValidator beanValidator; private XitBeanValidator beanValidator;
@Resource(name = "xitMessageSource") @Resource(name = "xitMessageSource")
@ -70,6 +71,27 @@ public class MenuListMgtController {
public void mngMenuMgtForm() { public void mngMenuMgtForm() {
} }
/**
* / popup page
* @param menuNo :
* @return ModelAndView
*/
@RequestMapping(value = "/mngMenuMgtPopup")
public ModelAndView mngMenuMgtPopup(final String menuNo) {
ModelAndView mav = new ModelAndView();
if(Checks.isEmpty(menuNo)){
mav.addObject("menuManageVO", new MenuListMngVO());
mav.addObject("pageTitle", "메뉴목록 생성");
} else {
mav.addObject("menuManageVO", service.findView(menuNo));
mav.addObject("pageTitle", "프로그램 정보 변경");
}
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/menu/mngMenuMgtPopup.popup");
return mav;
}
/** /**
* : * :
* Paging : parameter Map * Paging : parameter Map
@ -81,47 +103,10 @@ public class MenuListMgtController {
*/ */
@RequestMapping(value = "findsMenu_list.ajax", method={RequestMethod.GET, RequestMethod.POST}) @RequestMapping(value = "findsMenu_list.ajax", method={RequestMethod.GET, RequestMethod.POST})
public ModelAndView findsMenu(@RequestParam Map<String,Object> paraMap) { public ModelAndView findsMenu(@RequestParam Map<String,Object> paraMap) {
return ResultResponse.of(service.findList(paraMap, MybatisUtils.getPagingInfo(paraMap)));
return ResultResponse.of(menuListMngService.findList(paraMap, MybatisUtils.getPagingInfo(paraMap)));
} }
/**
* <pre> : .</pre>
* @param cmd
* @param tilesDef Type(none: tiles )
* @param model
* @return String
* @author:
* @date: 2020. 3. 26.
*/
@RequestMapping(value = "MenuListMng_{cmd}", method={RequestMethod.GET, RequestMethod.POST})
public String MenuListMng_page(@PathVariable String cmd
, @RequestParam(value="tilesDef", required=false, defaultValue="") String tilesDef
, @ModelAttribute("menuManageVO") MenuListMngVO vo
, ModelMap model) {
switch (cmd) {
case "input": //등록 페이지
case "inputs": //일괄등록 페이지
break;
case "edit": //수정 페이지
case "view": //상세 페이지
MenuListMngVO menuListMngVO = menuListMngService.findView(vo);
model.addAttribute("menuManageVO", menuListMngVO);
break;
default:
throw new RuntimeException("유효하지 않은 요청 입니다.");
}
if(!"".equals(tilesDef))
tilesDef = "."+tilesDef;
return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/menu/XitMenuListMng_"+cmd+tilesDef;
}
/** /**
* <pre> : .</pre> * <pre> : .</pre>
* @param cmd * @param cmd
@ -141,7 +126,7 @@ public class MenuListMgtController {
default: default:
throw new RuntimeException("유효하지 않은 요청 입니다."); throw new RuntimeException("유효하지 않은 요청 입니다.");
} }
return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/menu/XitMenuListMng_"+cmd+"_popup"+TILES_TYPE.POPUP.getVal(); return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/menu/XitMenuListMng_"+cmd+"_popup"+TILES_TYPE.FIMS_POPUP.getVal();
} }
/** /**
@ -181,7 +166,7 @@ public class MenuListMgtController {
} }
//처리 //처리
try { try {
menuListMngService.addProc(vo); service.addProc(vo);
message = xitMessageSource.getMessage("success.common.insert"); message = xitMessageSource.getMessage("success.common.insert");
} catch (RuntimeException e) { } catch (RuntimeException e) {
message = e.getMessage(); message = e.getMessage();
@ -214,8 +199,8 @@ public class MenuListMgtController {
if (!"".equals(fileVO.getFileName())) { if (!"".equals(fileVO.getFileName())) {
// 2011.10.07 업로드 파일에 대한 확장자를 체크 // 2011.10.07 업로드 파일에 대한 확장자를 체크
if (fileVO.getFileName().toLowerCase().endsWith(".xls") || fileVO.getFileName().toLowerCase().endsWith(".xlsx")) { if (fileVO.getFileName().toLowerCase().endsWith(".xls") || fileVO.getFileName().toLowerCase().endsWith(".xlsx")) {
if (menuListMngService.menuBndeAllDelete()) { if (service.menuBndeAllDelete()) {
message = menuListMngService.addsProc(vo, fis); message = service.addsProc(vo, fis);
} else { } else {
message = xitMessageSource.getMessage("fail.common.msg"); message = xitMessageSource.getMessage("fail.common.msg");
vo.setTmp_Cmd("EgovMenuBndeRegist Error!!"); vo.setTmp_Cmd("EgovMenuBndeRegist Error!!");
@ -257,7 +242,7 @@ public class MenuListMgtController {
fis.close(); fis.close();
} }
} catch (IOException ee) { } catch (IOException ee) {
logger.debug("{}", ee); log.debug("{}", ee);
} }
} }
} }
@ -277,7 +262,7 @@ public class MenuListMgtController {
} }
//처리 //처리
try { try {
menuListMngService.modifyProc(vo); service.modifyProc(vo);
message = xitMessageSource.getMessage("success.common.update"); message = xitMessageSource.getMessage("success.common.update");
} catch (RuntimeException e) { } catch (RuntimeException e) {
message = e.getMessage(); message = e.getMessage();
@ -291,7 +276,7 @@ public class MenuListMgtController {
case "delete": //삭제 case "delete": //삭제
//처리 //처리
try { try {
menuListMngService.removeProc(vo); service.removeProc(vo);
message = xitMessageSource.getMessage("success.common.delete"); message = xitMessageSource.getMessage("success.common.delete");
} catch (RuntimeException e) { } catch (RuntimeException e) {
message = e.getMessage(); message = e.getMessage();
@ -305,7 +290,7 @@ public class MenuListMgtController {
case "deletes": //다건 삭제 case "deletes": //다건 삭제
//처리 //처리
try { try {
menuListMngService.removesProc(checkedMenuNoForDel); service.removesProc(checkedMenuNoForDel);
message = xitMessageSource.getMessage("success.common.delete"); message = xitMessageSource.getMessage("success.common.delete");
} catch (RuntimeException e) { } catch (RuntimeException e) {
message = e.getMessage(); message = e.getMessage();

@ -4,8 +4,12 @@ import java.util.Map;
import javax.annotation.Resource; import javax.annotation.Resource;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import kr.xit.framework.biz.mng.menu.model.ProgramMngSearchVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.BindingResult; import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.ModelAttribute;
@ -36,6 +40,7 @@ import lombok.AllArgsConstructor;
* @version 1.0 Copyright(c) XIT All rights reserved. * @version 1.0 Copyright(c) XIT All rights reserved.
*/ */
@Controller @Controller
@Slf4j
@AllArgsConstructor @AllArgsConstructor
@RequestMapping(value = "/framework/biz/mng/menu") @RequestMapping(value = "/framework/biz/mng/menu")
public class ProgramMgtController { public class ProgramMgtController {
@ -51,6 +56,23 @@ public class ProgramMgtController {
public void mngProgramMgtForm() { public void mngProgramMgtForm() {
} }
@RequestMapping(value = "/XitProgramMng_FileNmSearch_popup")
public ModelAndView XitProgramMng_FileNmSearch_popup(@RequestParam final Map<String,Object> paraMap,@ModelAttribute("searchVO") ProgramMngSearchVO searchVO, ModelMap model) {
log.info("didcall");
ModelAndView mav = new ModelAndView();
mav.addObject("progrmMngVO", service.findPrograms(paraMap, MybatisUtils.getPagingInfo(paraMap)));
mav.addObject("pageTitle", "프로그램 정보 변경");
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/menu/XitProgramMng_FileNmSearch_popup.popup");
return mav;
}
/** /**
* / popup page * / popup page
* @param progrmFileNm : * @param progrmFileNm :

@ -39,19 +39,6 @@
<div id="grid"></div> <div id="grid"></div>
<script type="text/javaScript"> <script type="text/javaScript">
class Form {
constructor(grid) {
this.grid = grid;
};
search(){
grid.reloadData();
}
}
/************************************************************************** /**************************************************************************
* Global Variable * Global Variable
**************************************************************************/ **************************************************************************/

@ -225,7 +225,8 @@
}; };
const gridDatasource = { //DataSource const gridDatasource = { //DataSource
initialRequest: true, // 화면 load시 조회 안함 - default
api: { api: {
readData: { readData: {
url: '<c:url value="/framework/biz/mng/auth/findAuthRoleGrantList.do"/>' url: '<c:url value="/framework/biz/mng/auth/findAuthRoleGrantList.do"/>'
@ -236,7 +237,7 @@
}; };
GRID = TuiGrid.of(gridOptions, gridDatasource, (ev) => { GRID = TuiGrid.of(gridOptions, gridDatasource, (ev) => {
console.table('---------->>>',ev) console.table(['---------->>>t',ev])
console.log('---------->>>',ev.instance) console.log('---------->>>',ev.instance)
console.log('---------->>>',ev.responseData) console.log('---------->>>',ev.responseData)
}); });

@ -76,8 +76,8 @@ function choisProgramListSearch(vFileNm) {
</div> </div>
<!-- //검색 필드 박스 끝 --> <!-- //검색 필드 박스 끝 -->
<div id="grid"></div>
<div id="page_info"><div id="page_info_align"></div></div> <%--<div id="page_info"><div id="page_info_align"></div></div>
<!-- table add start --> <!-- table add start -->
<div class="default_tablestyle"> <div class="default_tablestyle">
<table width="100%" summary="프로그램파일명 검색목록으로 프로그램파일명 프로그램명으로 구성됨"> <table width="100%" summary="프로그램파일명 검색목록으로 프로그램파일명 프로그램명으로 구성됨">
@ -94,7 +94,7 @@ function choisProgramListSearch(vFileNm) {
</thead> </thead>
<tbody> <tbody>
<c:forEach var="result" items="${list_progrmmanage}" varStatus="status"> <c:forEach var="mav" items="${list_progrmmanage}" varStatus="status">
<!-- loop 시작 --> <!-- loop 시작 -->
<tr> <tr>
<td nowrap="nowrap"> <td nowrap="nowrap">
@ -113,10 +113,96 @@ function choisProgramListSearch(vFileNm) {
<ui:pagination paginationInfo = "${paginationInfo}" type="image" jsFunction="linkPage"/> <ui:pagination paginationInfo = "${paginationInfo}" type="image" jsFunction="linkPage"/>
</ul> </ul>
</div> </div>
<!-- //페이지 네비게이션 끝 --> <!-- //페이지 네비게이션 끝 --> --%>
</form> </form>
<script type="text/javaScript">
/* *******************************
* Grid
******************************* */
const initGrid = () => {
const gridColumns = [ //Grid 컬럼 정보(명칭,매핑 field, 기타옵션 등)
{
header: '메뉴번호',
name: 'menuNo',
width: 100,
sortable: true,
sortingType: 'desc',
align: 'center'
},
{
header: '메뉴명',
name: 'menuNm',
width: 200,
sortable: false,
align: 'center',
renderer: {
type: CustomButtonRenderer,
options: {
formatter : (props) => ({
formatter : props.grid.getRow(props.rowKey).progrmFileNm
, element: "text"
})
, eventFunction: fnBiz.fnClickMenuListBtn //function(){alert("1234")}
, eventType: "click"
}
}
},
{
header: '프로그램파일명',
name: 'progrmFileNm',
width: 200,
sortable: false,
align: 'center'
},
{
header: '메뉴설명',
name: 'menuDc',
minWidth: 200,
sortable: false,
align: 'left'
},
{
header: '상위메뉴번호',
name: 'upperMenuId',
width: 100,
sortable: false,
align: 'center'
}
];
const gridDatasource = { //DataSource
/* -----------------------
* DataSource API Setting
----------------------- */
initialRequest: false, // 화면 load시 조회 안함 - default
api: {
readData: {
url: '<c:url value="/framework/biz/mng/menu/findsMenu_list.ajax"/>'
}
}
};
const gridOptions = {
el: 'grid',
rowHeaders: ['rowNum'],
columns: gridColumns,
columnOptions: {
frozenCount: 1 //고정컬럼 갯수
, minWidth: 80 //최소 사이즈
}
};
GRID = TuiGrid.of(gridOptions, gridDatasource, (res) => {
});
}
/**************************************************************************
* initialize
**************************************************************************/
$(document).ready(function(){
initGrid();
});
</script>

@ -58,9 +58,104 @@
**************************************************************************/ **************************************************************************/
let GRID = null; let GRID = null;
/* ******************************* /* *******************************
* Grid * Biz function
******************************* */ ******************************* */
const fnBiz = {
search : function(){
GRID.reloadData();
},
add : function(){
CmmPopup.open(
'<c:url value="/framework/biz/mng/menu/mngMenuMgtPopup.do"/>'
, null
, {
width: 720
, height: 655
}
, '메뉴목록'
)
},
modify : function(){
},
remove : function(){
if(!confirm("삭제 하시겠습니까?"))
return false;
//Parameter Get
let arrKey = [];
GRID.getCheckedRows().forEach(function(row){
arrKey.push(row.menuNo);
});
//Call
document.frmSearch.checkedMenuNoForDel.value=arrKey.join(',');
document.frmSearch.action = "<c:url value='/framework/biz/mng/menu/MenuListMng_deletes_proc.do'/>";
document.frmSearch.submit();
},
pagePopup: function(props){
const rowData = props.grid.getRow(props.rowKey);
CmmPopup.open(
'<c:url value="/framework/biz/mng/menu/mngProgramMgtPopup.do"/>'
, {
progrmFileNm: rowData.progrmFileNm
}
, {
width: 720
, height: 655
}
, '프로그램 상세'
)},
fnClickMenuListBtn: function(props){
const rowData = props.grid.getRow(props.rowKey);
CmmPopup.open(
'<c:url value="/framework/biz/mng/menu/mngMenuMgtPopup.do"/>'
, {
menuNo: rowData.menuNo
}
, {
width: 720
, height: 655
}
, '프로그램 상세'
)
}
}
/**************************************************************************
* event
**************************************************************************/
$(()=>{
$('#btnSearch').on('click', () => {
fnBiz.search();
});
$("#btnRegist").on('click', () => {
fnBiz.add();
});
$("#btnRemove").on('click', () => {
fnBiz.removeData();
});
$("#allRegist_btn").on('click', () => {
fnBiz.pagePopup();
});
});
/* *******************************
* Grid
******************************* */
const initGrid = () => { const initGrid = () => {
const gridColumns = [ //Grid 컬럼 정보(명칭,매핑 field, 기타옵션 등) const gridColumns = [ //Grid 컬럼 정보(명칭,매핑 field, 기타옵션 등)
{ {
@ -80,15 +175,11 @@
renderer: { renderer: {
type: CustomButtonRenderer, type: CustomButtonRenderer,
options: { options: {
formatter: function (props) { formatter : (props) => ({
var rowData = props.grid.getRow(props.rowKey); formatter : props.grid.getRow(props.rowKey).progrmFileNm
var obj = { , element: "text"
formatter: rowData.menuNm })
, element: "text" , eventFunction: fnBiz.fnClickMenuListBtn //function(){alert("1234")}
}
return obj;
}
, eventFunction: fnMenuMgt.fnClickMenuListBtn //function(){alert("1234")}
, eventType: "click" , eventType: "click"
} }
} }
@ -139,104 +230,6 @@
}); });
} }
/* *******************************
* function
******************************* */
const fnMenuMgt = {
search : function(){
GRID.reloadData();
},
add : function(){
},
modify : function(){
},
remove : function(){
if(!confirm("삭제 하시겠습니까?"))
return false;
//Parameter Get
let arrKey = [];
GRID.getCheckedRows().forEach(function(row){
arrKey.push(row.menuNo);
});
//Call
document.frmSearch.checkedMenuNoForDel.value=arrKey.join(',');
document.frmSearch.action = "<c:url value='/framework/biz/mng/menu/MenuListMng_deletes_proc.do'/>";
document.frmSearch.submit();
},
pageLink: function(flag, url, params){
switch (flag) {
case "move": //페이지 이동
document.frmSearch.searchKeyword.value = "";
document.frmSearch.action = url;
document.frmSearch.submit();
break;
case "popup": //팝업 OPEN
this.pagePopup(flag, url, params);
break;
default:
break;
}
},
pagePopup: function(flag, url, params){
let popTitle;
let popOption;
switch (flag) {
case "detail": //상세
popTitle = "메뉴 목록 상세";
popOption = {height: 655, width:715}
break;
case "input": //등록
popTitle = "메뉴 목록 등록";
popOption = {height: 655, width:715}
break;
case "inputs": //일괄등록
popTitle = "메뉴 목록 일괄등록";
popOption = {height: 285, width:715}
break;
default:
break;
}
CmmPopup.open(url, params, popOption, popTitle);
},
fnClickMenuListBtn: function(props){
const rowData = props.grid.getRow(props.rowKey);
fnMenuMgt.pagePopup(
'detail',
"<c:url value='/framework/biz/mng/menu/MenuListMng_edit.do'/>",
{tilesDef: 'popup', menuNo: rowData.menuNo}
);
}
}
/**************************************************************************
* event
**************************************************************************/
$(()=>{
$('#btnSearch').on('click', () => {
GRID.reloadData();
GRID.refreshLayout();
});
$("#btnRegist").click(function(){
fnMenuMgt.pagePopup('input', "<c:url value='/framework/biz/mng/menu/MenuListMng_input.do'/>");
});
$("#btnRemove").click(function(){
fnMenuMgt.removeData();
});
$("#allRegist_btn").click(function(){
fnMenuMgt.pagePopup('inputs', "<c:url value='/framework/biz/mng/menu/MenuListMng_inputs.do'/>");
});
});
/************************************************************************** /**************************************************************************
* initialize * initialize
**************************************************************************/ **************************************************************************/

@ -122,6 +122,7 @@ form[name="menuManageVO"] textarea{
} }
</style> </style>
<script type="text/javaScript"> <script type="text/javaScript">
/************************************************************************** /**************************************************************************
@ -160,134 +161,118 @@ form[name="menuManageVO"] textarea{
}); });
} }
} }
/* ******************************* /* *******************************
* 메뉴목록 관리 등록화면 Functions * 메뉴목록 관리 등록화면 Functions
******************************* */ ******************************* */
var XitMenuListMng_input = { var XitMenuListMng_input = {
init: function () { init: function () {
//저장 버튼 Event 설정 //저장 버튼 Event 설정
$('#btnSave').on({ $('#btnSave').on({
click: function () { click: function () {
XitMenuListMng_input.addData(); XitMenuListMng_input.addData();
} }
}); });
$('#update_btn').on({ $('#update_btn').on({
click: function () { click: function () {
XitMenuListMng_input.modifyData(); XitMenuListMng_input.modifyData();
} }
}); });
$('#delete_btn').on({ $('#delete_btn').on({
click: function () { click: function () {
XitMenuListMng_input.removeData(); XitMenuListMng_input.removeData();
} }
}); });
$('#searchFile').on({
click: function () {
var params = "";
params += "tmp_SearchElementName=progrmFileNm"
/*XitMenuListMng_input.pagePopup('fileNmSearch', "
<c:url value='/_mng_/menu/program/ProgramMng_FileNmSearch_popup.do'/>", params);*/
XitMenuListMng_input.pagePopup('fileNmSearch', "<c:url value='/framework/biz/mng/menu/mngProgramMgtPopup'/>", params);
}
})
$(".popup").css("position", "absolute");
$(".content_header").css("display", "none");
$("#cur_loc").css("display", "none");
},
/* ========================
* 데이터 등록
======================== */
addData: function () {
if (!validateMenuManageVO(document.getElementById("menuManageVO")))
return;
var varFrom = document.getElementById("menuManageVO"); $(".popup").css("position", "absolute");
if (confirm("저장 하시겠습니까?")) { $(".content_header").css("display", "none");
var param = $(varFrom).serialize(); $("#cur_loc").css("display", "none");
$.ajax({ },
url: "<c:url value='/framework/biz/mng/menu/MenuListMng_insert_proc.do'/>", /* ========================
data: param, * 데이터 등록
type: "post", ======================== */
dataType: "json", addData: function () {
success: function (data) { if (!validateMenuManageVO(document.getElementById("menuManageVO")))
alert(data.resp.message); return;
window.opener.XitMenuListMng_list.findData();
// window.close();
},
error: function () {
} var varFrom = document.getElementById("menuManageVO");
}); if (confirm("저장 하시겠습니까?")) {
} var param = $(varFrom).serialize();
} $.ajax({
/* ======================== url: "<c:url value='/framework/biz/mng/menu/MenuListMng_insert_proc.do'/>",
* 데이터 수정 data: param,
======================== */ type: "post",
, modifyData: function () { dataType: "json",
if (!validateMenuManageVO(document.getElementById("menuManageVO"))) success: function (data) {
return; alert(data.resp.message);
window.opener.XitMenuListMng_list.findData();
// window.close();
},
error: function () {
var varFrom = document.getElementById("menuManageVO"); }
if (confirm("수정 하시겠습니까?")) { });
var param = $(varFrom).serialize(); }
$.ajax({ }
url: "<c:url value='/framework/biz/mng/menu/MenuListMng_update_proc.do'/>", /* ========================
data: param, * 데이터 수정
type: "post", ======================== */
dataType: "json", , modifyData: function () {
success: function (data) { if (!validateMenuManageVO(document.getElementById("menuManageVO")))
alert(data.resp.message); return;
window.opener.XitMenuListMng_list.findData();
window.close();
},
error: function () {
} var varFrom = document.getElementById("menuManageVO");
}); if (confirm("수정 하시겠습니까?")) {
} var param = $(varFrom).serialize();
} $.ajax({
/* ======================== url: "<c:url value='/framework/biz/mng/menu/MenuListMng_update_proc.do'/>",
* 데이터 삭제 data: param,
======================== */ type: "post",
, removeData: function () { dataType: "json",
var varFrom = document.getElementById("menuManageVO"); success: function (data) {
if (confirm("삭제 하시겠습니까?")) { alert(data.resp.message);
var param = $(varFrom).serialize(); window.opener.XitMenuListMng_list.findData();
$.ajax({ window.close();
url: "<c:url value='/framework/biz/mng/menu/MenuListMng_delete_proc.do'/>", },
data: param, error: function () {
type: "post",
dataType: "json",
success: function (data) {
alert(data.resp.message);
window.opener.XitMenuListMng_list.findData();
window.close();
},
error: function () {
} }
}); });
} }
} }
, pagePopup: function (flag, url, params) { /* ========================
var popUrl = url; * 데이터 삭제
if (!(params == undefined || params == null)) { ======================== */
popUrl += "?"; , removeData: function () {
popUrl += params; var varFrom = document.getElementById("menuManageVO");
} if (confirm("삭제 하시겠습니까?")) {
var popTitle = ''; var param = $(varFrom).serialize();
switch (flag) { $.ajax({
case "fileNmSearch": //상세 url: "<c:url value='/framework/biz/mng/menu/MenuListMng_delete_proc.do'/>",
popTitle = "파일명 목록"; data: param,
popOption = "scrollbars = yes, top=100px, left=100px, height=520px, width=805px;"; type: "post",
break; dataType: "json",
default: success: function (data) {
break; alert(data.resp.message);
} window.opener.XitMenuListMng_list.findData();
window.close();
},
error: function () {
window.open(popUrl, popTitle, popOption); }
}, });
} }
}
, pagePopup: function(props){
CmmPopup.open(
'<c:url value="/framework/biz/mng/menu/XitProgramMng_FileNmSearch_popup.do"/>'
, {}
, {
width: 720
, height: 655
}
, '프로그램 상세'
)}
}
/************************************************************************** /**************************************************************************
* event * event
@ -304,6 +289,9 @@ form[name="menuManageVO"] textarea{
$('#btnRemove').on('click', () => { $('#btnRemove').on('click', () => {
fnBiz.remove(); fnBiz.remove();
}); });
$('#searchFile').on('click', () => {
XitMenuListMng_input.pagePopup('fileNmSearch', "<c:url value='/framework/biz/mng/menu/findPrograms'/>");
});
}); });
/************************************************************************** /**************************************************************************
* initialize * initialize

@ -157,8 +157,8 @@ const TuiGrid = {
console.log('totCnt >>>>> ',$('#totCnt span').text()) console.log('totCnt >>>>> ',$('#totCnt span').text())
} }
//if(successCallback) successCallback(JSON.parse(ev.xhr.response)); if(successCallback) successCallback(JSON.parse(ev.xhr.response));
if(successCallback) successCallback(ev); //if(successCallback) successCallback(ev);
}); });
// 결과가 false인 경우 발생한 경우 // 결과가 false인 경우 발생한 경우
this.instance.on('failResponse', function(ev){ this.instance.on('failResponse', function(ev){

Loading…
Cancel
Save