From 6aa434a9caacdf3a1e615a414192dc5b83aa6969 Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Thu, 21 Mar 2019 13:43:38 +0800 Subject: [PATCH] * Fix closeModal js. --- module/task/control.php | 2 +- module/task/js/batchcreate.js | 20 -------------------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/module/task/control.php b/module/task/control.php index 137e277a90..45087ce0b6 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -125,7 +125,7 @@ class task extends control } /* If link from no head then reload*/ - if(isonlybody()) $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true)); + if(isonlybody()) $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent')); if($todoID > 0) { diff --git a/module/task/js/batchcreate.js b/module/task/js/batchcreate.js index 89f43745aa..185a1b727e 100755 --- a/module/task/js/batchcreate.js +++ b/module/task/js/batchcreate.js @@ -3,26 +3,6 @@ $(function() { removeDitto(); if($('#batchCreateForm table thead tr th.c-name').width() < 200) $('#batchCreateForm table thead tr th.c-name').width(200); - - $('#batchCreateForm').ajaxForm( - { - finish:function(response) - { - if(response.locate) - { - if(response.locate == 'parent') - { - parent.$.cookie('selfClose', 1); - setTimeout(function(){parent.$.closeModal(null, 'this')}, 1200); - } - else - { - setTimeout(function(){window.location.href = response.locate;}, 1200); - } - } - return false; - } - }); }); /* Get select of stories.*/