|
|
|
@ -75,113 +75,114 @@
|
|
|
|
|
|
|
|
|
|
<script type="text/javaScript" language="javascript">
|
|
|
|
|
|
|
|
|
|
$(document).ready(function(){
|
|
|
|
|
XitProgramMng_edit.init();
|
|
|
|
|
});
|
|
|
|
|
/* *******************************
|
|
|
|
|
* 프로그램 목록관리 수정화면 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.mngProgramMgtForm.findData();
|
|
|
|
|
window.close();
|
|
|
|
|
},
|
|
|
|
|
error: function(){
|
|
|
|
|
|
|
|
|
|
/* *******************************
|
|
|
|
|
* 프로그램 목록관리 수정화면 Functions
|
|
|
|
|
******************************* */
|
|
|
|
|
var XitProgramMng_edit = {
|
|
|
|
|
init : function(){
|
|
|
|
|
//닫기 버튼 Event
|
|
|
|
|
$("#btnClose").click(function() {
|
|
|
|
|
window.close();
|
|
|
|
|
});
|
|
|
|
|
//저장 버튼 Event 설정
|
|
|
|
|
$('#btnSave').on({
|
|
|
|
|
click: function(){
|
|
|
|
|
this.addData();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/* ========================
|
|
|
|
|
* 데이터 수정
|
|
|
|
|
======================== */
|
|
|
|
|
,modifyData : function(){
|
|
|
|
|
//if(!validateProgrmManageVO(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/updateProgram.do",
|
|
|
|
|
data : param,
|
|
|
|
|
type : "post",
|
|
|
|
|
dataType : "json",
|
|
|
|
|
success : function(data) {
|
|
|
|
|
alert(data.message);
|
|
|
|
|
window.opener.mngProgramMgtForm.findData();
|
|
|
|
|
window.close();
|
|
|
|
|
$('#btnUpdate').on({
|
|
|
|
|
click: function(){
|
|
|
|
|
XitProgramMng_edit.modifyData();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/* ========================
|
|
|
|
|
* 데이터 삭제
|
|
|
|
|
======================== */
|
|
|
|
|
,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(){
|
|
|
|
|
|
|
|
|
|
$('#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(!validateProgrmManageVO(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/updateProgram.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>
|
|
|
|
|