* finish task #2714.
This commit is contained in:
+31
-1
@@ -886,11 +886,41 @@ class task extends control
|
||||
$this->sendmail($taskID, $actionID);
|
||||
}
|
||||
}
|
||||
if(isset($skipTasks)) echo js::alert(sprintf($this->lang->task->error->skipClose, join(',', $skipTasks)));
|
||||
if(isset($skipTasks))
|
||||
{
|
||||
$skipTasks = join(',', $skipTasks);
|
||||
$confirmURL = $this->createLink('task', 'closeSkipTasks', "skipTasks=$skipTasks");
|
||||
$cancelURL = $this->server->HTTP_REFERER;
|
||||
die(js::confirm(sprintf($this->lang->task->error->skipClose, $skipTasks), $confirmURL, $cancelURL, 'parent', 'parent'));
|
||||
}
|
||||
}
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Close skip tasks.
|
||||
*
|
||||
* @param string $skipTasks
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function closeSkipTasks($skipTasks = '')
|
||||
{
|
||||
$this->loadModel('action');
|
||||
$skipTasks = explode(',', $skipTasks);
|
||||
foreach($skipTasks as $taskID)
|
||||
{
|
||||
$changes = $this->task->close($taskID);
|
||||
if($changes)
|
||||
{
|
||||
$actionID = $this->action->create('task', $taskID, 'Closed', '');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
$this->sendmail($taskID, $actionID);
|
||||
}
|
||||
}
|
||||
die(js::locate($this->session->taskList, 'parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancel a task.
|
||||
*
|
||||
|
||||
@@ -159,7 +159,7 @@ $lang->task->error->consumedSmall = '"Consumed" must larger than before.';
|
||||
$lang->task->error->consumedThisTime = 'Please enter "Man-Hour"';
|
||||
$lang->task->error->left = 'Please enter "Left"';
|
||||
$lang->task->error->work = '"Remark" must be less than 255 characteres.';
|
||||
$lang->task->error->skipClose = 'Task: %s is not“Done”或“Cancelled”. You cannot close it!';
|
||||
$lang->task->error->skipClose = 'Task: %s is not“Done”or “Cancelled”. Confirm to close them?';
|
||||
$lang->task->error->consumed = 'Task: %s man-hour must be more than 0. Ignore changes to this Task.';
|
||||
|
||||
/* 统计报表。*/
|
||||
|
||||
@@ -159,7 +159,7 @@ $lang->task->error->consumedSmall = '"已经消耗"必须大于之前消耗';
|
||||
$lang->task->error->consumedThisTime = '请填写"工时"';
|
||||
$lang->task->error->left = '请填写"剩余"';
|
||||
$lang->task->error->work = '"备注"必须小于255个字符';
|
||||
$lang->task->error->skipClose = '任务:%s 不是“已完成”或“已取消”状态,不能关闭!';
|
||||
$lang->task->error->skipClose = '任务:%s 不是“已完成”或“已取消”状态,确定要关闭吗?';
|
||||
$lang->task->error->consumed = '任务:%s工时不能小于0,忽略该任务工时的改动';
|
||||
|
||||
/* 统计报表。*/
|
||||
|
||||
Reference in New Issue
Block a user