+ add changes of edit and delete estimate.

This commit is contained in:
zhujinyong
2013-03-03 00:36:25 +00:00
parent ac39ce3dca
commit 7581d12cb7
2 changed files with 31 additions and 6 deletions

View File

@@ -462,9 +462,12 @@ class task extends control
$estimate = $this->task->getEstimateById($estimateID);
if(!empty($_POST))
{
$this->task->updateEstimate($estimateID);
$changes = $this->task->updateEstimate($estimateID);
if(dao::isError()) die(js::error(dao::getError()));
$actionID = $this->loadModel('action')->create('task', $estimate->task, 'EditEstimate');
$this->action->logHistory($actionID, $changes);
$url = $this->session->estimateList ? $this->session->estimateList : inlink('record', "taskID={$estimate->task}");
die(js::locate($url, 'parent'));
}
@@ -493,7 +496,12 @@ class task extends control
}
else
{
$this->task->deleteEstimate($estimateID);
$estimate = $this->task->getEstimateById($estimateID);
$changes = $this->task->deleteEstimate($estimateID);
if(dao::isError()) die(js::error(dao::getError()));
$actionID = $this->loadModel('action')->create('task', $estimate->task, 'DeleteEstimate');
$this->action->logHistory($actionID, $changes);
die(js::reload('parent'));
}
}