diff --git a/xxl-job-admin/src/main/webapp/static/js/jobinfo.index.1.js b/xxl-job-admin/src/main/webapp/static/js/jobinfo.index.1.js index 83bf69d2..cd4a6ae3 100644 --- a/xxl-job-admin/src/main/webapp/static/js/jobinfo.index.1.js +++ b/xxl-job-admin/src/main/webapp/static/js/jobinfo.index.1.js @@ -286,11 +286,13 @@ $(function() { submitHandler : function(form) { $.post(base_url + "/jobinfo/add", $("#addModal .form").serialize(), function(data, status) { if (data.code == "200") { - ComAlert.show(1, "新增任务成功", function(){ - //window.location.reload(); - $('#addModal').modal('hide'); - jobTable.fnDraw(); - }); + $('#addModal').modal('hide'); + setTimeout(function () { + ComAlert.show(1, "新增任务成功", function(){ + jobTable.fnDraw(); + //window.location.reload(); + }); + }, 315); } else { if (data.msg) { ComAlert.show(2, data.msg); diff --git a/xxl-job-admin/src/main/webapp/static/js/xxl.alert.1.js b/xxl-job-admin/src/main/webapp/static/js/xxl.alert.1.js index 5c12e2b2..0c1e95e8 100644 --- a/xxl-job-admin/src/main/webapp/static/js/xxl.alert.1.js +++ b/xxl-job-admin/src/main/webapp/static/js/xxl.alert.1.js @@ -83,8 +83,10 @@ var ComConfirm = { $('#ComConfirm .ok').click(function(){ $('#ComConfirm').modal('hide'); if(typeof callback == 'function') { - callback(); - return; + setTimeout(function(){ + callback(); + return; + }, 315); } });