Merge branch 'feat-program' into dev

main
minuk926 2 years ago
commit bf6c77f2a1

@ -37,7 +37,7 @@ public interface ProgramMngMapper {
* @author: * @author:
* @date: 2020. 3. 26. * @date: 2020. 3. 26.
*/ */
ProgramMngVO selectProgram(final ProgramMngVO vo); ProgramMngVO selectProgram(final String progrmFileName);
int updateProgram(final ProgramMngVO vo); int updateProgram(final ProgramMngVO vo);
@ -46,6 +46,5 @@ public interface ProgramMngMapper {
* <pre> : </pre> * <pre> : </pre>
* @date: 2020. 3. 27. * @date: 2020. 3. 27.
*/ */
int deleteProgram(final ProgramMngVO vo); int deleteProgram(final String programFileNm);
} }

@ -20,7 +20,7 @@ import kr.xit.framework.biz.mng.menu.model.ProgramMngVO;
public interface ProgramMngService { public interface ProgramMngService {
/** /**
* <pre> : </pre> * <pre> : </pre>
* @param map * @param map
* @return List<XitProgramMngVO> * @return List<XitProgramMngVO>
* @author: * @author:
@ -29,16 +29,16 @@ public interface ProgramMngService {
List<ProgramMngVO> findPrograms(final Map<String, Object> paramMap, final RowBounds rowBounds); List<ProgramMngVO> findPrograms(final Map<String, Object> paramMap, final RowBounds rowBounds);
/** /**
* <pre> : </pre> * <pre> : </pre>
* @param vo * @param vo
* @return XitProgramMngVO * @return XitProgramMngVO
* @author: * @author:
* @date: 2020. 3. 26. * @date: 2020. 3. 26.
*/ */
ProgramMngVO findProgram(final ProgramMngVO vo); ProgramMngVO findProgram(final String progrmFileNm);
/** /**
* <pre> : </pre> * <pre> : </pre>
* @param vo void * @param vo void
* @author: * @author:
* @date: 2020. 3. 26. * @date: 2020. 3. 26.
@ -46,7 +46,7 @@ public interface ProgramMngService {
int addProgram(final ProgramMngVO vo); int addProgram(final ProgramMngVO vo);
/** /**
* <pre> : </pre> * <pre> : </pre>
* @param vo void * @param vo void
* @author: * @author:
* @date: 2020. 3. 26. * @date: 2020. 3. 26.
@ -54,19 +54,10 @@ public interface ProgramMngService {
int modifyProgram(final ProgramMngVO vo); int modifyProgram(final ProgramMngVO vo);
/** /**
* <pre> : </pre> * <pre> : </pre>
* @param vo void * @param vo void
* @author: * @author:
* @date: 2020. 3. 26. * @date: 2020. 3. 26.
*/ */
int removeProgram(final ProgramMngVO vo); int removeProgram(final String programFileNm);
/**
* <pre> : </pre>
* @param progrmFileNms void
* @author:
* @date: 2020. 3. 27.
*/
void removePrograms(final String progrmFileNms);
} }

@ -30,8 +30,8 @@ public class ProgramMngServiceImpl implements ProgramMngService {
} }
@Override @Override
public ProgramMngVO findProgram(final ProgramMngVO vo) { public ProgramMngVO findProgram(final String progrmFileNm) {
return programMngMapper.selectProgram(vo); return programMngMapper.selectProgram(progrmFileNm);
} }
@Override @Override
@ -62,24 +62,8 @@ public class ProgramMngServiceImpl implements ProgramMngService {
} }
@Override @Override
public int removeProgram(final ProgramMngVO vo) { public int removeProgram(final String programFileNm) {
return programMngMapper.deleteProgram(vo); return programMngMapper.deleteProgram(programFileNm);
} }
@Override
public void removePrograms(final String progrmFileNms) {
String[] delProgrmFileNm = progrmFileNms.split(",");
if (delProgrmFileNm == null || (delProgrmFileNm.length == 0)) {
throw BizRuntimeException.create(MessageKey.CMM_UPDATE_FAIL);
}
String [] arrProgrmFileNm = progrmFileNms.split(",");
for (int i=0; i<arrProgrmFileNm.length ; i++){
ProgramMngVO vo = new ProgramMngVO();
vo.setProgrmFileNm(arrProgrmFileNm[i]);
//this.removeProc(vo);
}
}
} }

@ -37,6 +37,7 @@ import kr.xit.framework.support.exception.BizRuntimeException;
import kr.xit.framework.support.mybatis.MybatisUtils; import kr.xit.framework.support.mybatis.MybatisUtils;
import kr.xit.framework.support.util.AjaxMessageMapRenderer; import kr.xit.framework.support.util.AjaxMessageMapRenderer;
import kr.xit.framework.support.util.AjaxUtils; import kr.xit.framework.support.util.AjaxUtils;
import kr.xit.framework.support.util.Checks;
import kr.xit.framework.support.util.constants.MessageKey; import kr.xit.framework.support.util.constants.MessageKey;
/** /**
@ -76,14 +77,21 @@ public class ProgramMngController {
public void mngProgramMgtFrom() { public void mngProgramMgtFrom() {
} }
/* /**
@RequestMapping(value = "mngProgramMgtFrom2", method={RequestMethod.GET, RequestMethod.POST}) * / popup page
public ModelAndView mngProgramMgtFrom2() { * @param progrmFileNm :
* @return ModelAndView
*/
@RequestMapping(value = "/mngProgramMgtPopup", method={RequestMethod.GET, RequestMethod.POST})
public ModelAndView mngProgramMgtPopup(@RequestParam(required = false) String progrmFileNm) {
ModelAndView mav = new ModelAndView(); ModelAndView mav = new ModelAndView();
mav.setViewName("/framework/biz/mng/menu/mngProgramMgtFrom");
mav.setViewName(FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/menu/mngProgramMgtPopup.popup");
if(Checks.isEmpty(progrmFileNm)) mav.addObject("progrmMngVO", new ProgramMngVO());
else mav.addObject("progrmMngVO", programMngService.findProgram(progrmFileNm));
return mav; return mav;
} }
*/
/** /**
* : * :
@ -102,323 +110,72 @@ public class ProgramMngController {
return ResultResponse.of(programMngService.findPrograms(paramMap, MybatisUtils.getPagingInfo(paramMap))); return ResultResponse.of(programMngService.findPrograms(paramMap, MybatisUtils.getPagingInfo(paramMap)));
} }
/**
*
* @param progrmMngVO
* @param bindingResult
* @return ModelAndView
*/
@PostMapping(value = "/addProgram") @PostMapping(value = "/addProgram")
public ModelAndView addProgram( public ModelAndView addProgram(
@ModelAttribute("progrmMngVO") final ProgramMngVO vo @ModelAttribute final ProgramMngVO progrmMngVO
, final BindingResult bindingResult , final BindingResult bindingResult
) { ) {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
//유효성 확인 //유효성 확인
//2020.11.24. 주석처리 beanValidator.validate(progrmMngVO, bindingResult);
beanValidator.validate(vo, bindingResult);
// beanValidator.validate("progrmMngVO", vo, bindingResult); // beanValidator.validate("progrmMngVO", vo, bindingResult);
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
throw BizRuntimeException.create(MessageKey.CMM_INSERT_FAIL); throw BizRuntimeException.create(MessageKey.CMM_INSERT_FAIL);
}else {
if (vo.getProgrmDc() == null || vo.getProgrmDc().equals("")) {
vo.setProgrmDc(" ");
}
} }
programMngService.addProgram(vo); programMngService.addProgram(progrmMngVO);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS); AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS);
return mav; return mav;
} }
/**
*
* @param progrmMngVO
* @param bindingResult
* @return ModelAndView
*/
@PostMapping(value = "/modifyProgram") @PostMapping(value = "/modifyProgram")
public ModelAndView modifyProgram( public ModelAndView modifyProgram(
@ModelAttribute("progrmMngVO") final ProgramMngVO vo @ModelAttribute final ProgramMngVO progrmMngVO
, final BindingResult bindingResult , final BindingResult bindingResult
) { ) {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
//유효성 확인 //유효성 확인
//2020.11.24. 주석처리 beanValidator.validate(progrmMngVO, bindingResult);
beanValidator.validate(vo, bindingResult);
// beanValidator.validate("progrmMngVO", vo, bindingResult); // beanValidator.validate("progrmMngVO", vo, bindingResult);
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
throw BizRuntimeException.create(MessageKey.CMM_UPDATE_FAIL); throw BizRuntimeException.create(MessageKey.CMM_UPDATE_FAIL);
}else {
if (vo.getProgrmDc() == null || vo.getProgrmDc().equals("")) {
vo.setProgrmDc(" ");
}
} }
programMngService.modifyProgram(vo); programMngService.modifyProgram(progrmMngVO);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_UPDATE_SUCCESS); AjaxMessageMapRenderer.success(mav, MessageKey.CMM_UPDATE_SUCCESS);
return mav; return mav;
} }
/**
* <pre> : .</pre>
* @param cmd
* @param tilesDef Type(none: tiles )
* @param model
* @return String
* @author:
* @date: 2020. 3. 26.
*/
@RequestMapping(value = "/program_{cmd}", method={RequestMethod.GET, RequestMethod.POST})
public String ProgramMng_page(@PathVariable final String cmd
, @RequestParam(value="tilesDef", required=false, defaultValue="") String tilesDef
, @ModelAttribute("progrmMngVO") ProgramMngVO vo
, ModelMap model) {
switch (cmd) {
case "input": //등록 페이지
break;
case "edit": //수정 페이지
case "view": //상세 페이지
ProgramMngVO programMngVO = programMngService.findProgram(vo);
model.addAttribute("progrmMngVO", programMngVO);
break;
default:
throw new RuntimeException("유효하지 않은 요청 입니다.");
}
if(!"".equals(tilesDef))
tilesDef = "."+tilesDef;
return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/menu/mngProgramMgt_"+cmd+tilesDef;
}
/**
* <pre> : .</pre>
* @param cmd
* @param model
* @return String
* @author:
* @date: 2020. 3. 26.
*/
@RequestMapping(value = "/program_{cmd}_popup", method={RequestMethod.GET, RequestMethod.POST})
public String ProgramMng_page_popup(@PathVariable String cmd
, @ModelAttribute("searchVO") ProgramMngSearchVO searchVO
, @ModelAttribute("progrmMngVO") ProgramMngVO vo, ModelMap model) {
switch (cmd) {
case "FileNmSearch": //프로그램 파일명 조회 페이지
// 내역 조회
searchVO.setPageUnit(PAGE_UNIT);
searchVO.setPageSize(PAGE_SIZE);
/** pageing */
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
paginationInfo.setPageSize(searchVO.getPageSize());
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
/*model.addAttribute("list_progrmmanage", xitProgramMngService.findList(searchVO));*/
model.addAttribute("searchVO", searchVO);
//int totCnt = programMngService.findListTotCnt(searchVO);
//paginationInfo.setTotalRecordCount(totCnt);
model.addAttribute("paginationInfo", paginationInfo);
break;
case "input" :
break;
case "edit" :
ProgramMngVO xitProgramMngVO = programMngService.findProgram(vo);
model.addAttribute("progrmMngVO", xitProgramMngVO);
break;
default:
throw new RuntimeException("유효하지 않은 요청 입니다.");
}
return FrameworkConstants.FRAMEWORK_JSP_BASE_PATH +"mng/menu/mngProgramMgt_"+cmd+"_popup"+TILES_TYPE.POPUP.getVal();
}
/**
* <pre> : CUD </pre>
* @return String
* @author:
* @throws IOException
* @throws ServletException
* @date: 2020. 3. 25.
*/
@RequestMapping(value = {"/program_{cmd}_proc"}, method=RequestMethod.POST)
public void ProgramMng_cmd_proc(@PathVariable String cmd
,@ModelAttribute("progrmMngVO") ProgramMngVO vo
,@RequestParam(value="checkedProgrmFileNmForDel", required=false, defaultValue="") String checkedProgrmFileNmForDel
,BindingResult bindingResult
,Model model
,HttpServletRequest request
,HttpServletResponse response
) throws ServletException, IOException {
/** /**
* *
* @param progrmFileNm
* @return ModelAndView
*/ */
String sLocationUrl = "forward:/framework/biz/mng/menu/programList.do"; @PostMapping(value = "/removeProgram")
String message = null; public ModelAndView removeProgram(
switch (cmd) { final String progrmFileNm
case "insert": //등록 ) {
//유효성 확인 ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
//2020.11.24. 주석처리
beanValidator.validate(vo, bindingResult);
// beanValidator.validate("progrmMngVO", vo, bindingResult);
if (bindingResult.hasErrors()) {
// throw new RuntimeException(xitMessageSource.getMessage("fail.common.insert"));
message = xitMessageSource.getMessage("fail.common.insert");
sLocationUrl = "forward:/framework/biz/mng/menu/program_input.do";
break;
}
if (vo.getProgrmDc() == null || vo.getProgrmDc().equals("")) {
vo.setProgrmDc(" ");
}
//처리
programMngService.addProgram(vo);
message = xitMessageSource.getMessage("success.common.insert");
break;
// case "inserts": //다건 등록
// break;
case "update": //수정
//유효성 확인
//2020.11.24. 주석처리
beanValidator.validate(vo, bindingResult);
// beanValidator.validate("progrmMngVO", vo, bindingResult);
if (bindingResult.hasErrors()) {
// throw new RuntimeException(xitMessageSource.getMessage("fail.common.update"));
message = xitMessageSource.getMessage("fail.common.update");
sLocationUrl = "forward:/framework/biz/mng/menu/program_edit.do";
break;
}
if (vo.getProgrmDc() == null || vo.getProgrmDc().equals("")) {
vo.setProgrmDc(" ");
}
//처리
programMngService.modifyProgram(vo);
message = xitMessageSource.getMessage("success.common.update");
break;
case "delete": //삭제
//처리
try {
programMngService.removeProgram(vo);
message = xitMessageSource.getMessage("success.common.delete");
break;
} catch (RuntimeException e) {
message = e.getMessage();
sLocationUrl = "forward:/framework/biz/mng/menu/program_edit.do";
} catch (Exception e) {
message = xitMessageSource.getMessage("fail.common.delete");
sLocationUrl = "forward:/framework/biz/mng/menu/program_edit.do";
}
break;
// case "deletes": //다건 삭제
// //처리
// try {
// programMngService.removesProgram(checkedProgrmFileNmForDel);
// message = xitMessageSource.getMessage("success.common.delete");
// } catch (RuntimeException e) {
// message = e.getMessage();
// } catch (Exception e) {
// message = xitMessageSource.getMessage("fail.common.delete");
// }
// break;
default:
new RuntimeException("유효하지 않은 요청 입니다.");
}
/**
*
*/
/* ============================
* 2020.09.10
*
* - ajax json
* [AS-IS] String, return url "forward"
* [TO-BE] void, DispatchServlet forward , ajax json forward
============================ */
//2020.09.10 주석처리
// model.addAttribute("message", message);
// return sLocationUrl;
model.addAttribute("message", message);
if (AjaxUtils.isAjaxRequest(request)) { //ajax 요청시
//반환 데이터 설정
Map<String, Object> resultMap = new HashMap<String, Object>();
resultMap.put("message", message);
XitCmmnUtil.forwardForAjaxRequest(request, response, resultMap);
} else { //submit 요청 시
XitCmmnUtil.forwardForSubmitRequest(request, response, sLocationUrl, model.asMap());
}
}
@PostMapping(value = "/updateProgram2")
public void updateProgram2(@ModelAttribute("progrmMngVO") ProgramMngVO vo
,@RequestParam(value="checkedProgrmFileNmForDel", required=false, defaultValue="") String checkedProgrmFileNmForDel
,BindingResult bindingResult
,Model model
,HttpServletRequest request
,HttpServletResponse response
) throws ServletException, IOException {
/**
*
*/
String sLocationUrl = "forward:/framework/biz/mng/menu/programList.do";
String message = null;
//유효성 확인
//2020.11.24. 주석처리
beanValidator.validate(vo, bindingResult);
// beanValidator.validate("progrmMngVO", vo, bindingResult);
if (bindingResult.hasErrors()) {
// throw new RuntimeException(xitMessageSource.getMessage("fail.common.update"));
message = xitMessageSource.getMessage("fail.common.update");
sLocationUrl = "forward:/framework/biz/mng/menu/program_edit.do";
}else {
if (vo.getProgrmDc() == null || vo.getProgrmDc().equals("")) {
vo.setProgrmDc(" ");
}
}
//처리
programMngService.modifyProgram(vo);
message = xitMessageSource.getMessage("success.common.update");
/**
*
*/
/* ============================
* 2020.09.10
*
* - ajax json
* [AS-IS] String, return url "forward"
* [TO-BE] void, DispatchServlet forward , ajax json forward
============================ */
//2020.09.10 주석처리
// model.addAttribute("message", message);
// return sLocationUrl;
model.addAttribute("message", message);
if (AjaxUtils.isAjaxRequest(request)) { //ajax 요청시
//반환 데이터 설정
Map<String, Object> resultMap = new HashMap<String, Object>();
resultMap.put("message", message);
XitCmmnUtil.forwardForAjaxRequest(request, response, resultMap);
} else { //submit 요청 시
XitCmmnUtil.forwardForSubmitRequest(request, response, sLocationUrl, model.asMap());
}
programMngService.removeProgram(progrmFileNm);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_DELETE_SUCCESS);
return mav;
} }
} }

@ -16,6 +16,7 @@ import com.fasterxml.jackson.databind.JsonMappingException;
import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper; import egovframework.rte.fdl.security.userdetails.util.EgovUserDetailsHelper;
import kr.xit.framework.core.model.XitRollingNotiVO; import kr.xit.framework.core.model.XitRollingNotiVO;
import kr.xit.framework.support.exception.JSONExceptionMessageWriter; import kr.xit.framework.support.exception.JSONExceptionMessageWriter;
import kr.xit.framework.support.util.Checks;
import kr.xit.framework.support.util.constants.Globals; import kr.xit.framework.support.util.constants.Globals;
import kr.xit.framework.support.util.constants.MessageKey; import kr.xit.framework.support.util.constants.MessageKey;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -114,7 +115,8 @@ public class XitMenuListIntercepter extends HandlerInterceptorAdapter {
for(int i=0; i < allMenuList.size(); i++) { for(int i=0; i < allMenuList.size(); i++) {
Map<String, String> mUrlInfo = allMenuList.get(i); Map<String, String> mUrlInfo = allMenuList.get(i);
// if (mUrlInfo.get("menuUrl").toString().contains(chkUrl)) { // if (mUrlInfo.get("menuUrl").toString().contains(chkUrl)) {
if (mUrlInfo.get("menuUrl").toString().contains(url)) {
if (Checks.isNotEmpty(mUrlInfo.get("menuUrl")) && mUrlInfo.get("menuUrl").toString().contains(url)) {
log.info("RequestURL Matched OK !!"); log.info("RequestURL Matched OK !!");
String[] arrPath = mUrlInfo.get("menuPath").toString().split("_"); String[] arrPath = mUrlInfo.get("menuPath").toString().split("_");
mUrlInfo.put("secondMenu", arrPath[1]); mUrlInfo.put("secondMenu", arrPath[1]);

@ -9,11 +9,12 @@ public abstract class MessageKey {
public static final String CMM_SUCCESS = "success.request.msg";//정상적으로 수행되었습니다. (재정의 필요) public static final String CMM_SUCCESS = "success.request.msg";//정상적으로 수행되었습니다. (재정의 필요)
public static final String CMM_UPDATE_SUCCESS = "success.common.update"; public static final String CMM_UPDATE_SUCCESS = "success.common.update";
public static final String CMM_INSERT_SUCCESS = "success.common.insert"; public static final String CMM_INSERT_SUCCESS = "success.common.insert";
public static final String CMM_DELETE_SUCCESS = "success.common.delete";
public static final String CMM_FAIL = "fail.request.msg";//요청처리를 실패하였습니다.. public static final String CMM_FAIL = "fail.request.msg";//요청처리를 실패하였습니다..
public static final String CMM_INSERT_FAIL = "fail.common.insert"; public static final String CMM_INSERT_FAIL = "fail.common.insert";
public static final String CMM_UPDATE_FAIL = "fail.common.update"; public static final String CMM_UPDATE_FAIL = "fail.common.update";
public static final String CMM_REMOVE_FAIL = "fail.common.delete"; public static final String CMM_DELETE_FAIL = "fail.common.delete";
public static final String WARN_SESSION_END = "warn.session.end";//세션이 종료 되었습니다.. public static final String WARN_SESSION_END = "warn.session.end";//세션이 종료 되었습니다..
} }

@ -34,11 +34,11 @@
</bean> </bean>
<!-- Default Location 설정 --> <!-- Default Location 설정 -->
<!--
<bean id="localeResolver" class="org.springframework.web.servlet.i18n.SessionLocaleResolver"> <bean id="localeResolver" class="org.springframework.web.servlet.i18n.SessionLocaleResolver">
<property name="defaultLocale" value="ko_KR"></property> <property name="defaultLocale" value="ko"></property>
</bean> </bean>
-->
<!-- 다국어 처리 Resolver 설정(미설정 시 AcceptHeaderLocaleResolver 기본 적용) --> <!-- 다국어 처리 Resolver 설정(미설정 시 AcceptHeaderLocaleResolver 기본 적용) -->
<!-- <beans:bean id="localeResolver" class="org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver"> --> <!-- <beans:bean id="localeResolver" class="org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver"> -->

@ -37,7 +37,7 @@
SELECT SELECT
D.MENU_ID AS "menuSid" D.MENU_ID AS "menuSid"
,D.MENU_NAME AS "menuName" ,D.MENU_NAME AS "menuName"
,(SELECT DECODE(SA.URL,'/','#',SA.URL) FROM XIT_PROGRM_LIST SA WHERE B.PROGRM_FILE_NM = SA.PROGRM_FILE_NM) AS "menuUrl" ,(SELECT DECODE(SA.URL,'/','#',, null, '#', '', '##', SA.URL) FROM XIT_PROGRM_LIST SA WHERE B.PROGRM_FILE_NM = SA.PROGRM_FILE_NM) AS "menuUrl"
,D.MENU_DEPTH AS "menuDepth" ,D.MENU_DEPTH AS "menuDepth"
,D.PARNT_MENU_ID AS "parentSid" ,D.PARNT_MENU_ID AS "parentSid"
,D.MENU_FULL_PATH AS "menuPath" ,D.MENU_FULL_PATH AS "menuPath"

@ -20,7 +20,7 @@
</where> </where>
</select> </select>
<select id="selectProgram" parameterType="kr.xit.framework.biz.mng.menu.model.ProgramMngVO" resultType="kr.xit.framework.biz.mng.menu.model.ProgramMngVO"> <select id="selectProgram" parameterType="string" resultType="kr.xit.framework.biz.mng.menu.model.ProgramMngVO">
/* program-mysql-mapper|selectProgram-프로그램 정보 조회|julim */ /* program-mysql-mapper|selectProgram-프로그램 정보 조회|julim */
SELECT progrm_file_nm SELECT progrm_file_nm
, progrm_stre_cours , progrm_stre_cours
@ -45,8 +45,8 @@
, progrm_dc , progrm_dc
, url , url
) VALUES ( ) VALUES (
#{progrm_file_nm} #{progrmFileNm}
, #{progrmStreCours} , #{progrmStrePath}
, #{progrmKoreanNm} , #{progrmKoreanNm}
, #{progrmDc} , #{progrmDc}
, #{URL} , #{URL}
@ -62,19 +62,11 @@
, url = #{URL} , url = #{URL}
WHERE progrm_file_nm = #{progrmFileNm} WHERE progrm_file_nm = #{progrmFileNm}
</update> </update>
<delete id="deleteProgram" parameterType="string"> <delete id="deleteProgram" parameterType="string">
/* program-mysql-mapper|deleteProgram-프로그램 정보 변경|julim */ /* program-mysql-mapper|deleteProgram-프로그램 정보 삭제|julim */
DELETE DELETE
FROM xit_progrm_list FROM xit_progrm_list
WHERE progrm_file_nm = #{progrmFileNm} WHERE progrm_file_nm = #{progrmFileNm}
</delete> </delete>
<delete id="deleteAllProgrmDtls">
/** XitMenuListMngMapper.deleteAllProgrmDtls */
/** 프로그램변경내역 정보 전체데이터 삭제 */
<!-- 2020.03.27 박민규: DDL 스크립트에 해당 테이블 존재하지 않음.. -->
DELETE FROM LETTHPROGRMCHANGEDTLS
</delete>
</mapper> </mapper>

@ -5,6 +5,7 @@
<form-validation> <form-validation>
<formset> <formset>
<form name="progrmMngVO"> <form name="progrmMngVO">
<field property="progrmFileNm" depends="required, maxlength"> <field property="progrmFileNm" depends="required, maxlength">
<arg0 key="프로그램파일명" resource="false"/> <arg0 key="프로그램파일명" resource="false"/>
<arg1 key="50" resource="false"/> <arg1 key="50" resource="false"/>
@ -13,6 +14,7 @@
<var-value>50</var-value> <var-value>50</var-value>
</var> </var>
</field> </field>
<field property="progrmStrePath" depends="required, maxlength"> <field property="progrmStrePath" depends="required, maxlength">
<arg0 key="프로그램저장경로" resource="false"/> <arg0 key="프로그램저장경로" resource="false"/>
<arg1 key="100" resource="false"/> <arg1 key="100" resource="false"/>

@ -134,6 +134,7 @@
alert(msg); alert(msg);
}else if(settings.dataType=='json'){ }else if(settings.dataType=='json'){
console.log('====XitIncludeBase::ajaxError====json text data ==>>', jqxhr.responseText); console.log('====XitIncludeBase::ajaxError====json text data ==>>', jqxhr.responseText);
if(jqxhr.responseText) {
const jsonData = JSON.parse(jqxhr.responseText); const jsonData = JSON.parse(jqxhr.responseText);
console.log('====XitIncludeBase::ajaxError====json data ==>>', jsonData); console.log('====XitIncludeBase::ajaxError====json data ==>>', jsonData);
if (jsonData) { if (jsonData) {
@ -141,7 +142,7 @@
} else { } else {
alert(jqxhr.responseText); alert(jqxhr.responseText);
} }
}
}else{ }else{
console.log('====XitIncludeBase::ajaxError====') console.log('====XitIncludeBase::ajaxError====')
alert(jqxhr.responseText); alert(jqxhr.responseText);

@ -50,7 +50,7 @@
<c:otherwise> <c:otherwise>
<div class="page_btn"> <div class="page_btn">
<span class="flr"> <span class="flr">
<a href="#" class="btn darkgray" id="btnRegist" title="등록">등록</a> <a href="#" class="btn darkgray" id="btnRegist" title="등록" onClick="mngProgramMgtForm.addProgram()">등록</a>
</span> </span>
</div> </div>
<!-- //버튼 및 페이지정보 --> <!-- //버튼 및 페이지정보 -->
@ -63,7 +63,6 @@
<script type="text/javaScript" language="javascript"> <script type="text/javaScript" language="javascript">
let GRID = null; let GRID = null;
/* ======================== /* ========================
* 데이터 조회 : popup에서 사용 * 데이터 조회 : popup에서 사용
======================== */ ======================== */
@ -165,141 +164,40 @@
GRID.reloadData(); GRID.reloadData();
//GRID.refreshLayout(); //GRID.refreshLayout();
}); });
/**
* Elements EventListener Settings
*/
/*//검색 Event 설정
$('#btnSearch').on({
click: function(){
mngProgramMgtForm_list.findData();
}
});
//등록 Event 설정
$("#btnRegist").click(function(){
mngProgramMgtForm_list.pagePopup('input', "<c:url value='/framework/biz/mng/menu/ProgramMng_input.do'/>");
});
//삭제 Event 설정
$("#btnDelete").click(function(){
mngProgramMgtForm_list.removeData();
});
*/
}, },
/* ======================== /* ========================
* 데이터 등록 * 데이터 등록
======================== */ ======================== */
addData : function(){ addProgram : function(){
}, CmmPopup.open(
/* ======================== '<c:url value="/framework/biz/mng/menu/mngProgramMgtPopup.do"/>'
* 데이터 수정 , null
======================== */ , {
modifyData : function(){ width: 720
}, , height: 655
/* ========================
* 데이터 삭제
======================== */
removeData : function(){
if(!confirm("삭제 하시겠습니까?"))
return false;
//Parameter Get
const arrKey = [];
GRID.getCheckedRows().forEach(function(row){
arrKey.push(row.progrmFileNm);
});
const checkProgrmFileNms = arrKey.join(',');
//Call
document.progrmManageForm.checkedProgrmFileNmForDel.value = checkProgrmFileNms;
var param = $(document.frmSearch).serialize();
$.ajax({
url : "/framework/biz/mng/menu/ProgramMng_deletes_proc.do",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
findPrograms();
},
error: function(){
}
});
},
/* ========================
* 페이지 이동
-외부사이트 링크가 필요 시 사용(내부코드는 각 페이지에 맞게 수정, ex>https://www.gov.kr/portal/main )
======================== */
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;
} }
, '프로그램 등록'
)
}, },
/* ========================
* 페이지 Open
-팝업페이지를 Open 한다.
======================== */
pagePopup: function(flag, url, params){
var popUrl = url;
popUrl += "?tilesDef=popup";
if(!(params == undefined || params == null)){
popUrl += "&";
popUrl += params;
}
var popTitle = '';
switch (flag) {
case "detail": //상세
popTitle = "프로그램 목록 상세";
popOption = "scrollbars = yes, top=100px, left=100px, height=655px, width=720px;";
break;
case "input": //등록
popTitle = "프로그램 목록 등록";
popOption = "scrollbars = yes, top=100px, left=100px, height=655px, width=720px;";
break;
default:
break;
}
window.open(popUrl, popTitle ,popOption);
},
/* ======================== /* ========================
* 상세 팝업 오픈 버튼 클릭 * 상세 팝업 오픈 버튼 클릭
-상세 팝업을 OPEN 한다. -상세 팝업을 OPEN 한다.
======================== */ ======================== */
fnClickProgramBtn: function(props){ fnClickProgramBtn: function(props){
const rowData = props.grid.getRow(props.rowKey); const rowData = props.grid.getRow(props.rowKey);
<%--
let params = ""; CmmPopup.open(
params += "progrmFileNm=" + rowData.progrmFileNm; '<c:url value="/framework/biz/mng/menu/mngProgramMgtPopup.do"/>'
this.pagePopup('detail', "<c:url value='/framework/biz/mng/menu/program_edit.do'/>", params); , {
--%>
CmmPopup.open('<c:url value="/framework/biz/mng/menu/program_edit.do"/>',
{
tilesDef: 'popup',
progrmFileNm: rowData.progrmFileNm progrmFileNm: rowData.progrmFileNm
}, }
{ , {
width: 720, width: 720
height: 655 , height: 655
}, }
'프로그램 상세' , '프로그램 상세'
) )
} }

@ -0,0 +1,183 @@
<%@ page language="java" 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 prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<script type="text/javascript" src="<c:url value="/framework/util/validator.do"/>"></script>
<validator:javascript formName="progrmMngVO" staticJavascript="true" xhtml="true" cdata="false"/>
<%--@elvariable id="progrmMngVO" type=""--%>
<form:form name="progrmMngVO" commandName="progrmMngVO">
<div class="popup" style="min-width: 700px;">
<div class="popup_inner" style="max-width:700px;">
<p class="pop_title"> 프로그램 상세조회 /수정</p>
<table class="tbl03">
<caption>프로그램 상세조회 /수정</caption>
<tr>
<th width="20%" height="23" class="required" scope="row"><label for="progrmFileNm">프로그램파일명</label>
<td width="80%" nowrap="nowrap">
<c:choose>
<c:when test="${!empty progrmMngVO.progrmFileNm and fn:length(progrmMngVO.progrmFileNm) > 0}">
<input type="text" id='progrmFileNm' name='progrmFileNm' disabled="disabled" value="<c:out value='${progrmMngVO.progrmFileNm}'/>">
</c:when>
<c:otherwise>
<input type="text" id='progrmFileNm' name='progrmFileNm' value="<c:out value='${progrmMngVO.progrmFileNm}'/>">
</c:otherwise>
</c:choose>
<form:input path="progrmFileNm" size="50" maxlength="50" title="프로그램파일명" cssStyle="display:none" />
<form:errors path="progrmFileNm"/>
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row"><label for="progrmStrePath">저장경로</label>
<td width="80%" nowrap="nowrap">
<form:input path="progrmStrePath" size="50" maxlength="50" title="저장경로" disabled="disabled"/>
<form:errors path="progrmStrePath"/>
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row"><label for="progrmKoreanNm">프로그램 한글명</label>
<td width="80%" nowrap="nowrap">
<form:input path="progrmKoreanNm" size="60" maxlength="50" title="프로그램 한글명"/>
<form:errors path="progrmKoreanNm" />
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row"><label for="URL">URL</label>
<td width="80%" nowrap="nowrap">
<form:input path="URL" size="100" maxlength="100" title="URL" />
<form:errors path="URL" />
</td>
</tr>
<tr>
<th height="23" class="required" scope="row"><label for="progrmDc">프로그램설명</label></th>
<td>
<form:textarea path="progrmDc" rows="14" cols="75" title="프로그램설명"/>
<form:errors path="progrmDc"/>
</td>
</tr>
</table>
<div class="popup_btn">
<span class="flr" colspan="4">
<c:choose>
<c:when test="${!empty progrmMngVO.progrmFileNm and fn:length(progrmMngVO.progrmFileNm) > 0}">
<a href="#LINK" class="btn blue" id="btnUpdate" onclick="mngProgramMgtPopup.modifyProgram()">변경</a>
<a href="#LINK" class="btn red" id="btnDelete" onclick="mngProgramMgtPopup.removeProgram()">삭제</a>
</c:when>
<c:otherwise>
<a href="#LINK" class="btn blue" id="btnUpdate" onClick="mngProgramMgtPopup.addProgram()">등록</a>
</c:otherwise>
</c:choose>
<a href="#" class="btn lightgray" id="btnClose" onclick="window.close()">닫기</a>
</span>
</div>
<!-- //등록버튼 -->
</div>
</div>
<!-- //popup -->
</form:form>
<script type="text/javaScript" language="javascript">
/* *******************************
* 프로그램 목록관리 수정화면 Functions
******************************* */
var mngProgramMgtPopup = {
init : function(){
//닫기 버튼 Event
$("#btnClose").click(function() {
window.close();
});
$(".popup").css("position","absolute");
$(".content_header").css("display","none");
$("#cur_loc").css("display","none");
},
/* ========================
* 데이터 등록
======================== */
addProgram : function(){
if(!validateProgrmMngVO(document.getElementById("progrmMngVO")))
return;
var varFrom = document.getElementById("progrmMngVO");
if(confirm("저장 하시겠습니까?")){
var param = $(varFrom).serialize();
$.ajax({
url : "<c:url value='/'/>framework/biz/mng/menu/addProgram.do",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.message);
window.opener.findPrograms();
window.close();
},
error: function(){
}
});
}
}
/* ========================
* 데이터 수정
======================== */
,modifyProgram : function(){
if(!validateProgrmMngVO(document.getElementById("progrmMngVO")))
return;
var varFrom = document.getElementById("progrmMngVO");
if(confirm("변경 하시겠습니까?")){
var param = $(varFrom).serialize();
$.ajax({
url : "<c:url value='/'/>framework/biz/mng/menu/modifyProgram.do",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.message);
window.opener.findPrograms();
window.close();
}
});
}
}
/* ========================
* 데이터 삭제
======================== */
,removeProgram : function(){
var varFrom = document.getElementById("progrmMngVO");
if(confirm("삭제 하시겠습니까?")){
var param = $(varFrom).serialize();
$.ajax({
url : "<c:url value='/'/>framework/biz/mng/menu/removeProgram.do",
data : {progrmFileNm: $('#progrmFileNm').val()},
type : "post",
dataType : "json",
success : function(data) {
alert(data.message);
console.log(data)
window.opener.findPrograms();//.mngProgramMgtForm.findData();
window.close();
},
error: function(){
}
});
}
}
}
$(document).ready(function(){
mngProgramMgtPopup.init();
});
</script>

@ -1,185 +0,0 @@
<%@ page language="java" 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 prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<script type="text/javascript" src="<c:url value="/framework/util/validator.do"/>"></script>
<validator:javascript formName="progrmMngVO" staticJavascript="true" xhtml="true" cdata="false"/>
<%--@elvariable id="progrmMngVO" type=""--%>
<form:form name="progrmMngVO" commandName="progrmMngVO">
<div class="popup" style="min-width: 700px;">
<div class="popup_inner" style="max-width:700px;">
<p class="pop_title"> 프로그램 상세조회 /수정</p>
<table class="tbl03">
<caption>프로그램 상세조회 /수정</caption>
<tr>
<th width="20%" height="23" class="required" scope="row"><label for="progrmFileNm">프로그램파일명</label>
<td width="80%" nowrap="nowrap">
<input type="text" disabled="disabled" value="<c:out value="${progrmMngVO.progrmFileNm }"/>" >
<form:input path="progrmFileNm" size="50" maxlength="50" title="프로그램파일명" cssStyle="display:none" />
<form:errors path="progrmFileNm"/>
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row"><label for="progrmStrePath">저장경로</label>
<td width="80%" nowrap="nowrap">
<form:input path="progrmStrePath" size="50" maxlength="50" title="저장경로"/>
<form:errors path="progrmStrePath"/>
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row"><label for="progrmKoreanNm">프로그램 한글명</label>
<td width="80%" nowrap="nowrap">
<form:input path="progrmKoreanNm" size="60" maxlength="50" title="프로그램 한글명"/>
<form:errors path="progrmKoreanNm" />
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row"><label for="URL">URL</label>
<td width="80%" nowrap="nowrap">
<form:input path="URL" size="100" maxlength="100" title="URL" />
<form:errors path="URL" />
</td>
</tr>
<tr>
<th height="23" class="required" scope="row"><label for="progrmDc">프로그램설명</label></th>
<td>
<form:textarea path="progrmDc" rows="14" cols="75" title="프로그램설명"/>
<form:errors path="progrmDc"/>
</td>
</tr>
</table>
<div class="popup_btn">
<span class="flr" colspan="4">
<a href="#LINK" class="btn blue" id="btnUpdate">변경</a>
<a href="#LINK" class="btn red" id="btnDelete">삭제</a>
<a href="#" class="btn lightgray" id="btnClose">닫기</a>
</span>
</div>
<!-- //등록버튼 -->
</div>
</div>
<!-- //popup -->
</form:form>
<script type="text/javaScript" language="javascript">
/* *******************************
* 프로그램 목록관리 수정화면 Functions
******************************* */
var XitProgramMng_edit = {
init : function(){
//닫기 버튼 Event
$("#btnClose").click(function() {
window.close();
});
//저장 버튼 Event 설정
$('#btnSave').on({
click: function(){
this.addData();
}
});
$('#btnUpdate').on({
click: function(){
XitProgramMng_edit.modifyData();
}
});
$('#delete_btn').on({
click: function(){
XitProgramMng_edit.removeData();
}
});
$(".popup").css("position","absolute");
$(".content_header").css("display","none");
$("#cur_loc").css("display","none");
},
/* ========================
* 데이터 등록
======================== */
addData : function(){
if(!validateProgrmManageVO(document.getElementById("progrmMngVO")))
return;
var varFrom = document.getElementById("progrmMngVO");
if(confirm("저장 하시겠습니까?")){
var param = $(varFrom).serialize();
$.ajax({
url : "<c:url value='/'/>_mng_/menu/program/ProgramMng_insert_proc.do",
data : param,
type : "post",
dataType : "json",
success : function(data) {
console.log('~~~~~~~~~~~~~~~~',data);
alert(data.message);
window.opener.findPrograms();
window.close();
},
error: function(){
}
});
}
}
/* ========================
* 데이터 수정
======================== */
,modifyData : function(){
if(!validateProgrmMngVO(document.getElementById("progrmMngVO")))
return;
var varFrom = document.getElementById("progrmMngVO");
if(confirm("변경 하시겠습니까?")){
var param = $(varFrom).serialize();
$.ajax({
<%--url : "<c:url value='/'/>framework/biz/mng/menu/program_update_proc.do",--%>
url : "<c:url value='/'/>framework/biz/mng/menu/modifyProgram.do",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.message);
window.opener.findPrograms();
window.close();
}
});
}
}
/* ========================
* 데이터 삭제
======================== */
,removeData : function(){
var varFrom = document.getElementById("progrmMngVO");
if(confirm("삭제 하시겠습니까?")){
var param = $(varFrom).serialize();
$.ajax({
url : "<c:url value='/'/>_mng_/menu/program/ProgramMng_delete_proc.do",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
console.log(data)
window.opener.findData();//.mngProgramMgtForm.findData();
window.close();
},
error: function(){
}
});
}
}
}
$(document).ready(function(){
XitProgramMng_edit.init();
});
</script>

@ -1,215 +0,0 @@
<%@ page language="java" 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 prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<c:url var="ImgUrl" value="/images"/>
<script type="text/javascript" src="<c:url value="/_cmmn_/util/validator.do"/>"></script>
<validator:javascript formName="progrmMngVO" staticJavascript="false" xhtml="true" cdata="false"/>
<form:form commandName="progrmMngVO" action="">
<div class="popup" style="min-width: 700px;">
<div class="popup_inner" style="max-width:700px;">
<p class="pop_title"> 프로그램 등록</p>
<table class="tbl03">
<caption>프로그램 등록</caption>
<tr>
<th width="20%" height="23" class="required" scope="row"><label for="F1">프로그램파일명</label>
<img src="${ImgUrl}/required.gif" width="15" height="15" alt="필수"></th>
<td width="80%" nowrap="nowrap">
<form:input path="progrmFileNm" size="50" maxlength="50" id="F1" title="프로그램파일명"/>
<form:errors path="progrmFileNm" />
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row"><label for="progrmStrePath">저장경로</label>
<img src="${ImgUrl}/required.gif" width="15" height="15" alt="필수"></th>
<td width="80%" nowrap="nowrap">
<form:input path="progrmStrePath" size="60" maxlength="60" title="저장경로"/>
<form:errors path="progrmStrePath" />
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row"><label for="progrmKoreanNm">프로그램 한글명</label>
<img src="${ImgUrl}/required.gif" width="15" height="15" alt="필수"></th>
<td width="80%" nowrap="nowrap">
<form:input path="progrmKoreanNm" size="60" maxlength="50" title="프로그램 한글명"/>
<form:errors path="progrmKoreanNm"/>
</td>
</tr>
<tr>
<th width="20%" height="23" class="required" scope="row"><label for="URL">URL</label>
<img src="${ImgUrl}/required.gif" width="15" height="15" alt="필수"></th>
<td width="80%" nowrap="nowrap">
<form:input path="URL" size="100" maxlength="100" title="URL"/>
<form:errors path="URL"/>
</td>
</tr>
<tr>
<th height="23" class="required" scope="row"><label for="progrmDc">프로그램설명</label></th>
<td>
<form:textarea path="progrmDc" rows="14" cols="75" title="프로그램설명"/>
<form:errors path="progrmDc"/>
</td>
</tr>
</table>
<div class="popup_btn">
<span class="flr" colspan="4">
<a href="#LINK" class="btn blue" id="btnSave">등록</a>
<a href="#LINK" class="btn blue" id="btnSearch">목록조회</a>
<a href="#" class="btn lightgray" id="btnClose">닫기</a>
</span>
</div>
<!-- //등록버튼 -->
</div>
</div>
<!-- //popup -->
</form:form>
<script type="text/javaScript" language="javascript">
$(document).ready(function(){
XitProgramMng_input.init();
});
/* *******************************
* 프로그램 목록관리 등록화면 Functions
******************************* */
var XitProgramMng_input = {
init : function(){
//닫기 버튼 Event
$("#btnClose").click(function() {
window.close();
});
//저장 버튼 Event 설정
$('#btnSave').on({
click: function(){
XitProgramMng_input.addData();
}
});
$('#update_btn').on({
click: function(){
XitProgramMng_input.modifyData();
}
});
$('#delete_btn').on({
click: function(){
XitProgramMng_input.removeData();
}
});
$('#btnSearch').on({
click: function(){
XitProgramMng_input.pagePopup('scrch', "<c:url value='/_mng_/menu/program/ProgramMngList.do' />");
}
});
$(".popup").css("position","absolute");
$(".content_header").css("display","none");
$("#cur_loc").css("display","none");
},
/* ========================
* 데이터 등록
======================== */
addData : function(){
if(!validateProgrmManageVO(document.getElementById("progrmMngVO")))
return;
var varFrom = document.getElementById("progrmMngVO");
if(confirm("저장 하시겠습니까?")){
var param = $(varFrom).serialize();
$.ajax({
url : "<c:url value='/'/>_mng_/menu/program/ProgramMng_insert_proc.do",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
// window.opener.XitProgramMng_list.findData();
// window.close();
},
error: function(){
}
});
}
}
/* ========================
* 데이터 수정
======================== */
,modifyData : function(){
if(!validateProgrmManageVO(document.getElementById("progrmMngVO")))
return;
var varFrom = document.getElementById("progrmMngVO");
if(confirm("수정 하시겠습니까?")){
var param = $(varFrom).serialize();
$.ajax({
url : "<c:url value='/'/>_mng_/menu/program/ProgramMng_update_proc.do",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitProgramMng_list.findData();
window.close();
},
error: function(){
}
});
}
}
/* ========================
* 데이터 삭제
======================== */
,removeData : function(){
var varFrom = document.getElementById("progrmMngVO");
if(confirm("삭제 하시겠습니까?")){
var param = $(varFrom).serialize();
$.ajax({
url : "<c:url value='/'/>_mng_/menu/program/ProgramMng_delete_proc.do",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitProgramMng_list.findData();
window.close();
},
error: function(){
}
});
}
}
,pagePopup: function(flag, url, params){
var popUrl = url;
if(!(params == undefined || params == null)){
popUrl += "?";
popUrl += params;
popUrl += "&tilesDef=popup";
}else{
popUrl += "?";
popUrl += "&tilesDef=popup";
}
var popTitle = '';
switch (flag) {
case "scrch": //프로그램목록조회
popTitle = "프로그램 목록조회";
popOption = "scrollbars = yes, top=100px, left=100px, height=595px, width=920px;";
break;
default:
break;
}
window.open(popUrl, popTitle ,popOption);
},
}
</script>
Loading…
Cancel
Save