feat-proMenuList fix

main
Kurt92 2 years ago
parent 9957b1170a
commit afd9e2038c

@ -1,259 +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="/resources/"/>
<script type="text/javascript" src="<c:url value="/framework/util/validator.do"/>"></script>
<validator:javascript formName="menuManageVO" staticJavascript="false" xhtml="true" cdata="false"/>
<%--@elvariable id="menuManageVO" type=""--%>
<form:form commandName="menuManageVO" name="menuManageVO" action ="<c:url value='/framework/biz/mng/menu/MenuListMng_insert_proc.do' />" method="post">
<input type="hidden" name="tmp_SearchElementName" value=""/>
<input type="hidden" name="tmp_SearchElementVal" value=""/>
<input name="cmd" type="hidden" value="update"/>
<div class="popup" style="min-width: 700px;">
<div class="popup_inner" style="max-width:700px;">
<p class="pop_title"> 메뉴목록 생성</p>
<table class="tbl03" summary="메뉴 등록화면">
<caption>메뉴 등록화면</caption>
<colgroup>
<col style="width: 15%; height: 23px"/>
<col style="width: 35%; height: 23px"/>
<col style="width: 15%; height: 23px"/>
<col style="width: 35%; height: 23px"/>
</colgroup>
<tr>
<th class="required" scope="row">
<label for="menuNo">메뉴번호</label>
</th>
<td nowrap="nowrap">
&nbsp;
<form:input path="menuNo" size="10" maxlength="10" title="메뉴No"/>
<form:errors path="menuNo" />
</td>
<th class="required" scope="row">
<label for="menuOrdr">메뉴순서</label>
</th>
<td nowrap="nowrap">
&nbsp;
<form:input path="menuOrdr" size="10" maxlength="10" title="메뉴순서" />
<form:errors path="menuOrdr" />
</td>
</tr>
<tr>
<th class="required" scope="row">
<label for="menuNm">메뉴명</label>
</th>
<td nowrap="nowrap">
&nbsp;
<form:input path="menuNm" size="30" maxlength="30" title="메뉴명" />
<form:errors path="menuNm" />
</td>
<th class="required" scope="row">
<label for="upperMenuId">상위메뉴번호</label>
</th>
<td nowrap="nowrap">
&nbsp;
<form:input path="upperMenuId" size="10" maxlength="10" title="상위메뉴No"/>
<form:errors path="upperMenuId" />
</td>
</tr>
<tr>
<th class="required" scope="row">
<label for="progrmFileNm">프로그램파일명</label>
</th>
<td colspan="3" nowrap="nowrap">
&nbsp;
<input type="text" name="progrmFileNm_view" size="60" disabled="disabled">
<form:input path="progrmFileNm" size="60" maxlength="60" title="프로그램파일명" cssStyle="display:none"/>
<form:errors path="progrmFileNm" />
<a id="searchFile" href="#" title="새창으로" style="selector-dummy:expression(this.hideFocus=false);" >
<img src="<c:url value='/resources/images/img_search.gif' />" alt='프로그램파일명 검색' width="15" height="15" />(프로그램파일명 검색)</a>
</td>
</tr>
<tr>
<th width="15%" height="23" class="required" scope="row"><label for="relateImageNm">관련이미지명</label></th>
<td width="35%" nowrap="nowrap">
&nbsp;
<form:input path="relateImageNm" size="30" maxlength="30" title="관련이미지명"/>
<form:errors path="relateImageNm" />
</td>
<th width="15%" height="23" class="required" scope="row"><label for="relateImagePath">관련이미지경로</label></th>
<td width="35%" nowrap="nowrap">
&nbsp;
<form:input path="relateImagePath" size="30" maxlength="30" title="관련이미지경로"/>
<form:errors path="relateImagePath" />
</td>
</tr>
<tr>
<th width="15%" height="23" class="required" scope="row"><label for="menuDc">메뉴설명</label></th>
<td colspan="3" nowrap="nowrap">&nbsp;
<form:textarea path="menuDc" rows="14" cols="75" cssClass="txaClass" title="메뉴설명"/>
<form:errors path="menuDc"/>
</td>
</tr>
</table>
<div class="popup_btn">
<span class="flr" colspan="4">
<a href="#" class="btn blue" id="btnRegist">등록</a>
<a href="#" class="btn lightgray" onclick="window.close()">닫기</a>
</span>
</div>
<!-- //등록버튼 -->
</div>
</div>
<!-- //popup -->
</form:form>
<style type="text/css">
form[name="menuManageVO"] input[type="text"]{
width: 80%;
}
form[name="menuManageVO"] input[name="progrmFileNm_view"]{
width: 60%;
}
form[name="menuManageVO"] textarea{
width: 94%;
}
</style>
<script type="text/javaScript">
$(document).ready(function(){
XitMenuListMng_input.init();
});
/* *******************************
* 메뉴목록 관리 등록화면 Functions
******************************* */
var XitMenuListMng_input = {
init : function(){
//저장 버튼 Event 설정
$('#btnSave').on({
click: function(){
XitMenuListMng_input.addData();
}
});
$('#update_btn').on({
click: function(){
XitMenuListMng_input.modifyData();
}
});
$('#delete_btn').on({
click: function(){
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);
}
})
$(".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");
if(confirm("저장 하시겠습니까?")){
var param = $(varFrom).serialize();
$.ajax({
url : "<c:url value='/framework/biz/mng/menu/MenuListMng_insert_proc.do'/>",
data : param,
type : "post",
dataType : "json",
success : function(data) {
alert(data.resp.message);
window.opener.XitMenuListMng_list.findData();
// window.close();
},
error: function(){
}
});
}
}
/* ========================
* 데이터 수정
======================== */
,modifyData : function(){
if(!validateMenuManageVO(document.getElementById("menuManageVO")))
return;
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",
success : function(data) {
alert(data.resp.message);
window.opener.XitMenuListMng_list.findData();
window.close();
},
error: function(){
}
});
}
}
/* ========================
* 데이터 삭제
======================== */
,removeData : function(){
var varFrom = document.getElementById("menuManageVO");
if(confirm("삭제 하시겠습니까?")){
var param = $(varFrom).serialize();
$.ajax({
url : "<c:url value='/framework/biz/mng/menu/MenuListMng_delete_proc.do'/>",
data : param,
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 += "?";
popUrl += params;
}
var popTitle = '';
switch (flag) {
case "fileNmSearch": //상세
popTitle = "파일명 목록";
popOption = "scrollbars = yes, top=100px, left=100px, height=520px, width=805px;";
break;
default:
break;
}
window.open(popUrl, popTitle ,popOption);
},
}
</script>

@ -0,0 +1,314 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/framework/taglibs.jsp"%>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<c:set var="isUpdate" value="${!empty menuManageVO.progrmFileNm}"/>
<c:set var="bizName" value="매뉴목록관리"/>
<script type="text/javascript" src="<c:url value="/framework/util/validator.do"/>"></script>
<validator:javascript formName="menuManageVO" staticJavascript="false" xhtml="true" cdata="false"/>
<%--@elvariable id="menuManageVO" type=""--%>
<form:form commandName="menuManageVO" name="menuManageVO">
<input type="hidden" name="tmp_SearchElementName" value=""/>
<input type="hidden" name="tmp_SearchElementVal" value=""/>
<input name="cmd" type="hidden" value="update"/>
<div class="popup" style="min-width: 700px;">
<div class="popup_inner" style="max-width:700px;">
<%@include file="/WEB-INF/jsp/framework/biz-popup-title.jsp"%>
<table class="tbl03" summary="메뉴 등록화면">
<caption>메뉴 등록화면</caption>
<colgroup>
<col style="width: 15%; height: 23px"/>
<col style="width: 35%; height: 23px"/>
<col style="width: 15%; height: 23px"/>
<col style="width: 35%; height: 23px"/>
</colgroup>
<tr>
<th class="required" scope="row">
<label for="menuNo">메뉴번호</label>
</th>
<td nowrap="nowrap">
&nbsp;
<form:input path="menuNo" size="10" maxlength="10" title="메뉴No"/>
<form:errors path="menuNo" />
</td>
<th class="required" scope="row">
<label for="menuOrdr">메뉴순서</label>
</th>
<td nowrap="nowrap">
&nbsp;
<form:input path="menuOrdr" size="10" maxlength="10" title="메뉴순서" />
<form:errors path="menuOrdr" />
</td>
</tr>
<tr>
<th class="required" scope="row">
<label for="menuNm">메뉴명</label>
</th>
<td nowrap="nowrap">
&nbsp;
<form:input path="menuNm" size="30" maxlength="30" title="메뉴명" />
<form:errors path="menuNm" />
</td>
<th class="required" scope="row">
<label for="upperMenuId">상위메뉴번호</label>
</th>
<td nowrap="nowrap">
&nbsp;
<form:input path="upperMenuId" size="10" maxlength="10" title="상위메뉴No"/>
<form:errors path="upperMenuId" />
</td>
</tr>
<tr>
<th class="required" scope="row">
<label for="progrmFileNm">프로그램파일명</label>
</th>
<td colspan="3" nowrap="nowrap">
&nbsp;
<input type="text" name="progrmFileNm_view" size="60" disabled="disabled">
<form:input path="progrmFileNm" size="60" maxlength="60" title="프로그램파일명" cssStyle="display:none"/>
<form:errors path="progrmFileNm" />
<a id="searchFile" href="#" title="새창으로" style="selector-dummy:expression(this.hideFocus=false);" >
<img src="<c:url value='/resources/images/img_search.gif' />" alt='프로그램파일명 검색' width="15" height="15" />(프로그램파일명 검색)</a>
</td>
</tr>
<tr>
<th width="15%" height="23" class="required" scope="row"><label for="relateImageNm">관련이미지명</label></th>
<td width="35%" nowrap="nowrap">
&nbsp;
<form:input path="relateImageNm" size="30" maxlength="30" title="관련이미지명"/>
<form:errors path="relateImageNm" />
</td>
<th width="15%" height="23" class="required" scope="row"><label for="relateImagePath">관련이미지경로</label></th>
<td width="35%" nowrap="nowrap">
&nbsp;
<form:input path="relateImagePath" size="30" maxlength="30" title="관련이미지경로"/>
<form:errors path="relateImagePath" />
</td>
</tr>
<tr>
<th width="15%" height="23" class="required" scope="row"><label for="menuDc">메뉴설명</label></th>
<td colspan="3" nowrap="nowrap">&nbsp;
<form:textarea path="menuDc" rows="14" cols="75" cssClass="txaClass" title="메뉴설명"/>
<form:errors path="menuDc"/>
</td>
</tr>
</table>
<%@include file="/WEB-INF/jsp/framework/biz-popup-btn.jsp"%>
<%--<div class="popup_btn">
<span class="flr" colspan="4">
<a href="#" class="btn blue" id="btnRegist">등록</a>
<a href="#" class="btn lightgray" onclick="window.close()">닫기</a>
</span>
</div>--%>
<!-- //등록버튼 -->
</div>
</div>
<!-- //popup -->
</form:form>
<style type="text/css">
form[name="menuManageVO"] input[type="text"]{
width: 80%;
}
form[name="menuManageVO"] input[name="progrmFileNm_view"]{
width: 60%;
}
form[name="menuManageVO"] textarea{
width: 94%;
}
</style>
<script type="text/javaScript">
/**************************************************************************
* Global Variable
**************************************************************************/
/* *******************************
* Biz function
******************************* */
const fnBiz = {
add : () => {
if(!validatemenuManageVO(document.getElementById("menuManageVO")))
return;
cmmBizAjax('add', {
url: '<c:url value="/framework/biz/mng/menu/addProgram.do"/>'
, data: $("#menuManageVO").serialize()
})
}
,modify : () => {
if(!validatemenuManageVO(document.getElementById("menuManageVO")))
return;
cmmBizAjax('modify', {
url: '<c:url value="/framework/biz/mng/menu/modifyProgram.do"/>'
, data: $("#menuManageVO").serialize()
});
}
,remove : () => {
cmmBizAjax('remove', {
url: '<c:url value="/framework/biz/mng/menu/removeProgram.do"/>'
, data: { progrmFileNm: $('#progrmFileNm').val() }
});
}
}
/* *******************************
* 메뉴목록 관리 등록화면 Functions
******************************* */
var XitMenuListMng_input = {
init: function () {
//저장 버튼 Event 설정
$('#btnSave').on({
click: function () {
XitMenuListMng_input.addData();
}
});
$('#update_btn').on({
click: function () {
XitMenuListMng_input.modifyData();
}
});
$('#delete_btn').on({
click: function () {
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");
if (confirm("저장 하시겠습니까?")) {
var param = $(varFrom).serialize();
$.ajax({
url: "<c:url value='/framework/biz/mng/menu/MenuListMng_insert_proc.do'/>",
data: param,
type: "post",
dataType: "json",
success: function (data) {
alert(data.resp.message);
window.opener.XitMenuListMng_list.findData();
// window.close();
},
error: function () {
}
});
}
}
/* ========================
* 데이터 수정
======================== */
, modifyData: function () {
if (!validateMenuManageVO(document.getElementById("menuManageVO")))
return;
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",
success: function (data) {
alert(data.resp.message);
window.opener.XitMenuListMng_list.findData();
window.close();
},
error: function () {
}
});
}
}
/* ========================
* 데이터 삭제
======================== */
, removeData: function () {
var varFrom = document.getElementById("menuManageVO");
if (confirm("삭제 하시겠습니까?")) {
var param = $(varFrom).serialize();
$.ajax({
url: "<c:url value='/framework/biz/mng/menu/MenuListMng_delete_proc.do'/>",
data: param,
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 += "?";
popUrl += params;
}
var popTitle = '';
switch (flag) {
case "fileNmSearch": //상세
popTitle = "파일명 목록";
popOption = "scrollbars = yes, top=100px, left=100px, height=520px, width=805px;";
break;
default:
break;
}
window.open(popUrl, popTitle, popOption);
},
}
/**************************************************************************
* event
**************************************************************************/
$(() => {
$('#btnRegist').on('click', () => {
fnBiz.add();
});
$('#btnModify').on('click', () => {
fnBiz.modify();
});
$('#btnRemove').on('click', () => {
fnBiz.remove();
});
});
/**************************************************************************
* initialize
**************************************************************************/
$(document).ready(function(){
});
</script>
Loading…
Cancel
Save