어댑터 저장시, 어댑터 현재 정보 저장 후 진행, 화면내 저장과 어댑터 신규(수정)시 개별 alert 출력.
This commit is contained in:
@@ -168,7 +168,7 @@ function validateName(){
|
|||||||
return checkError;
|
return checkError;
|
||||||
}
|
}
|
||||||
|
|
||||||
function localSave(){
|
function localSave(isSilent){
|
||||||
var key =$("input[name=ADPTRBZWKNAME]").val();
|
var key =$("input[name=ADPTRBZWKNAME]").val();
|
||||||
//객체 생성
|
//객체 생성
|
||||||
var save ={};
|
var save ={};
|
||||||
@@ -217,8 +217,12 @@ function localSave(){
|
|||||||
save["adapterPropGroup"]= adapterPropGroup;
|
save["adapterPropGroup"]= adapterPropGroup;
|
||||||
save["adapterProps"] = fullData;
|
save["adapterProps"] = fullData;
|
||||||
submitData[key]=save;
|
submitData[key]=save;
|
||||||
|
|
||||||
alert("<%=localeMessage.getString("adapterDetail.saveAlertMsg1")%>");
|
if (!isSilent) {
|
||||||
|
alert("<%=localeMessage.getString("adapterDetail.saveAlertMsg1")%>");
|
||||||
|
} else {
|
||||||
|
alert("어댑터 정보 저장 성공!");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -627,7 +631,7 @@ $(document).ready(function() {
|
|||||||
// CLIENTID 초기값에 따라 버튼 상태 설정
|
// CLIENTID 초기값에 따라 버튼 상태 설정
|
||||||
updateClientIdButtonStates();
|
updateClientIdButtonStates();
|
||||||
|
|
||||||
$("#btn_modify").click(function(){
|
$("#btn_modify").click(function(){ // 검색용
|
||||||
if (!isValid()) return;
|
if (!isValid()) return;
|
||||||
|
|
||||||
// 수정 할 때만 confirm 실행.
|
// 수정 할 때만 confirm 실행.
|
||||||
@@ -636,7 +640,15 @@ $(document).ready(function() {
|
|||||||
var r = confirm("<%=localeMessage.getString("adapterDetail.checkMsg4")%>");
|
var r = confirm("<%=localeMessage.getString("adapterDetail.checkMsg4")%>");
|
||||||
if (r == false) return;
|
if (r == false) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 25.12.16 수정시 어댑터 리스트 자동저장
|
||||||
|
alert("어댑터의 정보를 저장을 먼저 진행합니다.")
|
||||||
|
var isSubSaveSuccess = ModifyPopCheckAndSave(true);
|
||||||
|
|
||||||
|
if (!isSubSaveSuccess) {
|
||||||
|
alert("어댑터 정보 저장이 실패했습니다. 어댑터 정보를 확인해주세요.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//공통부만 form으로 구성
|
//공통부만 form으로 구성
|
||||||
var postData = $('#ajaxForm').serializeArray();
|
var postData = $('#ajaxForm').serializeArray();
|
||||||
@@ -823,24 +835,33 @@ $(document).ready(function() {
|
|||||||
localSave();
|
localSave();
|
||||||
chkAdapterCnt('add');
|
chkAdapterCnt('add');
|
||||||
|
|
||||||
});
|
});
|
||||||
$("#btn_pop_modify").click(function(){
|
$("#btn_pop_modify").click(function(){ // 검색용
|
||||||
//
|
ModifyPopCheckAndSave(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
function ModifyPopCheckAndSave(isSilent) {
|
||||||
var isDuplication = false;
|
var isDuplication = false;
|
||||||
|
|
||||||
$("select[name=ADAPTERLIST] option").each(function(){
|
$("select[name=ADAPTERLIST] option").each(function(){
|
||||||
if ($(this).val() == $("input[name=ADPTRBZWKNAME]").val()){
|
if ($(this).val() == $("input[name=ADPTRBZWKNAME]").val()){
|
||||||
isDuplication = true;
|
isDuplication = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (!isDuplication){
|
|
||||||
alert("<%=localeMessage.getString("adapterDetail.checkMsg2")%>");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
localSave();
|
|
||||||
|
|
||||||
});
|
if (!isDuplication){
|
||||||
|
// 화면 저장시 기존 alert 표시, INSERT/UPDATE 시 메시지 표시하지 않음
|
||||||
|
if (!isSilent) {
|
||||||
|
alert("<%=localeMessage.getString("adapterDetail.checkMsg2")%>");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
localSave(isSilent);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
$("#btn_pop_delete").click(function(){
|
$("#btn_pop_delete").click(function(){
|
||||||
//
|
|
||||||
var isDuplication = false;
|
var isDuplication = false;
|
||||||
$("select[name=ADAPTERLIST] option").each(function(){
|
$("select[name=ADAPTERLIST] option").each(function(){
|
||||||
if ($(this).val() == $("input[name=ADPTRBZWKNAME]").val()){
|
if ($(this).val() == $("input[name=ADPTRBZWKNAME]").val()){
|
||||||
|
|||||||
Reference in New Issue
Block a user