From 6c04f3fee3517f6d3191ae564b1a82e8744adad7 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 13 Sep 2022 08:41:50 +0800 Subject: [PATCH] * ajax reload for effort. --- module/task/control.php | 4 ++-- module/task/js/recordestimate.js | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/module/task/control.php b/module/task/control.php index efe0fd01dc..0862950065 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -1164,7 +1164,7 @@ class task extends control return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban(\"task\", $kanbanData)")); } - return print(js::closeModal('parent.parent', 'this')); + return print(js::reload('parent')); } return print(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent')); } @@ -1202,7 +1202,7 @@ class task extends control $actionID = $this->loadModel('action')->create('task', $estimate->task, 'EditEstimate', $this->post->work); $this->action->logHistory($actionID, $changes); - $url = $this->session->estimateList ? $this->session->estimateList : inlink('record', "taskID={$estimate->task}"); + $url = $this->session->estimateList ? $this->session->estimateList : inlink('recordEstimate', "taskID={$estimate->task}"); return print(js::locate($url, 'parent')); } diff --git a/module/task/js/recordestimate.js b/module/task/js/recordestimate.js index bac93375f7..d3a3326679 100644 --- a/module/task/js/recordestimate.js +++ b/module/task/js/recordestimate.js @@ -1,5 +1,18 @@ $(function() { + var parentLink = parent.location.href; + if(parentLink.indexOf('view') > 0) + { + $.get(parentLink, function(data) + { + $data = $(data); + parent.$('#actionbox ol.histories-list').html($data.find('#actionbox ol.histories-list').html()); + parent.$('.side-col').html($data.find('.side-col').html()); + + if(parent.$('#actionbox ol.histories-list #lastComment').length > 0) $(initKindeditor); + }); + } + $('.form-date').datetimepicker('setEndDate', today); $("#recordForm #submit").click(function(e, confirmed)