수정/삭제 AJAX 요청 시 버튼 비활성화 후 응답 시 재활성화
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user