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

2、任务删除时,任务列表偏移问题修复;
原因:confirm和alert弹框冲突导致;
v1.4
xueli.xue 8 years ago
parent c4732c953f
commit 21d1b57a80

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

@ -83,8 +83,10 @@ var ComConfirm = {
$('#ComConfirm .ok').click(function(){ $('#ComConfirm .ok').click(function(){
$('#ComConfirm').modal('hide'); $('#ComConfirm').modal('hide');
if(typeof callback == 'function') { if(typeof callback == 'function') {
setTimeout(function(){
callback(); callback();
return; return;
}, 315);
} }
}); });

Loading…
Cancel
Save