Просмотр исходного кода

1、任务新增时,任务列表偏移问题修复;

xueli.xue 8 лет назад
Родитель
Сommit
21d1b57a80

+ 7 - 5
xxl-job-admin/src/main/webapp/static/js/jobinfo.index.1.js Просмотреть файл

@@ -286,11 +286,13 @@ $(function() {
286 286
         submitHandler : function(form) {
287 287
         	$.post(base_url + "/jobinfo/add",  $("#addModal .form").serialize(), function(data, status) {
288 288
     			if (data.code == "200") {
289
-    				ComAlert.show(1, "新增任务成功", function(){
290
-    					//window.location.reload();
291
-						$('#addModal').modal('hide');
292
-						jobTable.fnDraw();
293
-    				});
289
+					$('#addModal').modal('hide');
290
+					setTimeout(function () {
291
+						ComAlert.show(1, "新增任务成功", function(){
292
+							jobTable.fnDraw();
293
+							//window.location.reload();
294
+						});
295
+					}, 315);
294 296
     			} else {
295 297
     				if (data.msg) {
296 298
     					ComAlert.show(2, data.msg);

+ 4 - 2
xxl-job-admin/src/main/webapp/static/js/xxl.alert.1.js Просмотреть файл

@@ -83,8 +83,10 @@ var ComConfirm = {
83 83
         $('#ComConfirm .ok').click(function(){
84 84
             $('#ComConfirm').modal('hide');
85 85
             if(typeof callback == 'function') {
86
-                callback();
87
-                return;
86
+                setTimeout(function(){
87
+                    callback();
88
+                    return;
89
+                }, 315);
88 90
             }
89 91
         });
90 92