diff --git a/WebContent/jsp/onl/admin/adapter/adapterManDetail.jsp b/WebContent/jsp/onl/admin/adapter/adapterManDetail.jsp index 6650bf6..f6415f3 100644 --- a/WebContent/jsp/onl/admin/adapter/adapterManDetail.jsp +++ b/WebContent/jsp/onl/admin/adapter/adapterManDetail.jsp @@ -168,7 +168,7 @@ function validateName(){ return checkError; } -function localSave(){ +function localSave(isSilent){ var key =$("input[name=ADPTRBZWKNAME]").val(); //객체 생성 var save ={}; @@ -217,8 +217,12 @@ function localSave(){ save["adapterPropGroup"]= adapterPropGroup; save["adapterProps"] = fullData; submitData[key]=save; - - alert("<%=localeMessage.getString("adapterDetail.saveAlertMsg1")%>"); + + if (!isSilent) { + alert("<%=localeMessage.getString("adapterDetail.saveAlertMsg1")%>"); + } else { + alert("어댑터 정보 저장 성공!"); + } } @@ -280,6 +284,7 @@ function init(key,callback){ callback(key); } + }, error:function(e){ alert(e.responseText); @@ -328,6 +333,7 @@ function detail(key){ } }); + //adapter @@ -632,7 +638,15 @@ $(document).ready(function() { var r = confirm("<%=localeMessage.getString("adapterDetail.checkMsg4")%>"); if (r == false) return; } - + + // 25.12.16 수정시 어댑터 리스트 자동저장 + alert("어댑터의 정보를 저장을 먼저 진행합니다.") + var isSubSaveSuccess = ModifyPopCheckAndSave(true); + + if (!isSubSaveSuccess) { + alert("어댑터 정보 저장이 실패했습니다. 어댑터 정보를 확인해주세요."); + return; + } //공통부만 form으로 구성 var postData = $('#ajaxForm').serializeArray(); @@ -819,24 +833,33 @@ $(document).ready(function() { localSave(); chkAdapterCnt('add'); - }); - $("#btn_pop_modify").click(function(){ - // + }); + $("#btn_pop_modify").click(function(){ // 검색용 + ModifyPopCheckAndSave(false); + }); + + function ModifyPopCheckAndSave(isSilent) { var isDuplication = false; + $("select[name=ADAPTERLIST] option").each(function(){ if ($(this).val() == $("input[name=ADPTRBZWKNAME]").val()){ 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(){ - // var isDuplication = false; $("select[name=ADAPTERLIST] option").each(function(){ if ($(this).val() == $("input[name=ADPTRBZWKNAME]").val()){ diff --git a/WebContent/jsp/onl/admin/authserver/clientManDetail.jsp b/WebContent/jsp/onl/admin/authserver/clientManDetail.jsp index 2eddc9a..18e652f 100644 --- a/WebContent/jsp/onl/admin/authserver/clientManDetail.jsp +++ b/WebContent/jsp/onl/admin/authserver/clientManDetail.jsp @@ -479,17 +479,17 @@