From 48fe41794b89f4d82654b7480fcb88599c66c043 Mon Sep 17 00:00:00 2001 From: daekuk Date: Tue, 25 Nov 2025 11:21:22 +0900 Subject: [PATCH] =?UTF-8?q?=EC=88=98=EC=A0=95/=EC=82=AD=EC=A0=9C=20AJAX=20?= =?UTF-8?q?=EC=9A=94=EC=B2=AD=20=EC=8B=9C=20=EB=B2=84=ED=8A=BC=20=EB=B9=84?= =?UTF-8?q?=ED=99=9C=EC=84=B1=ED=99=94=20=ED=9B=84=20=EC=9D=91=EB=8B=B5=20?= =?UTF-8?q?=EC=8B=9C=20=EC=9E=AC=ED=99=9C=EC=84=B1=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../onl/admin/adapter/adapterManDetail.jsp | 30 +++++++++++++++++-- .../apim/apiInterfaceManDetail.jsp | 25 ++++++++++++++++ .../onl/transaction/apim/apiSpecManPopup.jsp | 24 +++++++++++++++ 3 files changed, 76 insertions(+), 3 deletions(-) diff --git a/WebContent/jsp/onl/admin/adapter/adapterManDetail.jsp b/WebContent/jsp/onl/admin/adapter/adapterManDetail.jsp index e082c21..6650bf6 100644 --- a/WebContent/jsp/onl/admin/adapter/adapterManDetail.jsp +++ b/WebContent/jsp/onl/admin/adapter/adapterManDetail.jsp @@ -649,6 +649,10 @@ $(document).ready(function() { type : "POST", url:url, data:postData, + beforeSend: function() { + $("[id^='btn_']").prop("disabled", true); + $("#btn_modify").text("처리중 . . . . ."); + }, success:function(args){ if(args.status=="error"){ alert("<%=localeMessage.getString("common.intizMsg")%>"+args.message); @@ -659,7 +663,11 @@ $(document).ready(function() { }, error:function(e){ alert(e.responseText); - } + }, + complete: function() { + $("[id^='btn_']").prop("disabled", false); + $("#btn_modify").text("수정"); + } }); }); $("#btn_clone,#btn_clone_new").click(function(){ @@ -696,6 +704,10 @@ $(document).ready(function() { type : "POST", url:url, data:postData, + beforeSend: function() { + $("[id^='btn_']").prop("disabled", true); + $("#btn_clone").text("처리중 . . . . ."); + }, success:function(args){ alert("<%=localeMessage.getString("common.croneMsg")%>"); //goNav(returnUrl);//LIST로 이동 @@ -715,7 +727,11 @@ $(document).ready(function() { alert(error); } } - } + }, + complete: function() { + $("[id^='btn_']").prop("disabled", false); + $("#btn_clone").text("복제"); + } }); }); $("#btn_delete").click(function(){ @@ -726,6 +742,10 @@ $(document).ready(function() { type : "POST", url:url, data:postData, + beforeSend: function() { + $("[id^='btn_']").prop("disabled", true); + $("#btn_delete").text("처리중 . . . . ."); + }, success:function(args){ if(args.status=="error"){ alert("<%=localeMessage.getString("common.intizMsg")%>"+args.message); @@ -736,7 +756,11 @@ $(document).ready(function() { }, error:function(e){ alert(e.responseText); - } + }, + complete: function() { + $("[id^='btn_']").prop("disabled", false); + $("#btn_delete").text("삭제"); + } }); }else{ return false; diff --git a/WebContent/jsp/onl/transaction/apim/apiInterfaceManDetail.jsp b/WebContent/jsp/onl/transaction/apim/apiInterfaceManDetail.jsp index 09bb0f7..9573408 100644 --- a/WebContent/jsp/onl/transaction/apim/apiInterfaceManDetail.jsp +++ b/WebContent/jsp/onl/transaction/apim/apiInterfaceManDetail.jsp @@ -867,6 +867,10 @@ type: "POST", url:url, data: postData, + beforeSend: function() { + $("[id^='btn_']").prop("disabled", true); + $("#btn_modify").text("처리중 . . . . ."); + }, success:function(message){ alert("저장 되었습니다. \n\n[실시간 반영 결과]\n"+JSON.stringify(message)); if (typeof callback === 'function') { @@ -877,6 +881,10 @@ }, error:function(xhr, status, errorMsg){ alert(JSON.parse(xhr.responseText).errorMsg); + }, + complete: function() { + $("[id^='btn_']").prop("disabled", false); + $("#btn_modify").text("수정"); } }); } @@ -936,6 +944,11 @@ type : "POST", url:url, data:postData, + beforeSend: function() { + $("[id^='btn_']").prop("disabled", true); + $("#btn_delete").text("처리중 . . . . ."); + }, + success:function(args){ alert("삭제 되었습니다."); goNav(returnUrl);//LIST로 이동 @@ -943,6 +956,10 @@ }, error:function(e){ alert(e.responseText); + }, + complete: function() { + $("[id^='btn_']").prop("disabled", false); + $("#btn_delete").text("삭제"); } }); }); @@ -1203,6 +1220,10 @@ newInboundHttpMethod, newInboundRestPath, }, + beforeSend: function() { + $("[id^='btn_']").prop("disabled", true); + $("#doCloneInterfaceButton").text("처리중 . . . . ."); + }, success: function () { alert("["+orgApiInterfaceId+"] => ["+newBizCode+"]["+newApiInterfaceId+"] 복제 완료."); $('#cloneInterfaceModal').modal('hide'); @@ -1210,6 +1231,10 @@ }, error: function (e) { alert(e.responseText); + }, + complete: function() { + $("[id^='btn_']").prop("disabled", false); + $("#doCloneInterfaceButton").text("복제"); } }); }); diff --git a/WebContent/jsp/onl/transaction/apim/apiSpecManPopup.jsp b/WebContent/jsp/onl/transaction/apim/apiSpecManPopup.jsp index d6bd2a6..c34dd06 100644 --- a/WebContent/jsp/onl/transaction/apim/apiSpecManPopup.jsp +++ b/WebContent/jsp/onl/transaction/apim/apiSpecManPopup.jsp @@ -194,11 +194,19 @@ type: "POST", url: url, data: postData, + beforeSend: function() { + $("[id^='btn_']").prop("disabled", true); + $("#btn_save").text("처리중 . . . . ."); + }, success: function () { alert("<%= localeMessage.getString("common.saveMsg") %>"); }, error: function (e) { alert(e.responseText); + }, + complate: function() { + $("[id^='btn_']").prop("disabled", false); + $("#btn_save").text("수정"); } }); } @@ -258,12 +266,20 @@ type: "POST", url: url, data: { cmd: 'DELETE', apiId: $('#apiId').val() }, + beforeSend: function() { + $("[id^='btn_']").prop("disabled", true); + $("#btn_delete").text("처리중 . . . . ."); + }, success: function() { alert("<%= localeMessage.getString("common.deleteMsg") %>"); window.close(); }, error: function(e) { alert(e.responseText); + }, + complate: function() { + $("[id^='btn_']").prop("disabled", false); + $("#btn_delete").text("삭제"); } }); } @@ -276,6 +292,10 @@ cmd: 'GENERATE_SPEC', apiId: $('#apiId').val() }, + beforeSend: function() { + $("[id^='btn_']").prop("disabled", true); + $("#btn_generate_spec").text("처리중 . . . . ."); + }, success: function(data) { // Update the editors with generated content $('#apiRequestSpec').summernote('code', data.requestSpec); @@ -288,6 +308,10 @@ }, error: function(e) { alert("API 스펙 생성 중 오류가 발생했습니다: " + e.responseText); + }, + complate: function() { + $("[id^='btn_']").prop("disabled", false); + $("#btn_generate_spec").text("SPEC 자동 생성"); } }); }