* code for task#1030.

This commit is contained in:
zhujinyong
2013-01-09 06:35:02 +00:00
parent 0951df0cbd
commit ae9da000b1
6 changed files with 27 additions and 2 deletions
+1 -1
View File
@@ -437,7 +437,7 @@ class task extends control
if(!empty($_POST))
{
$changes = $this->task->record($taskID);
$actionID = $this->action->create('task', $taskID, 'Record', '');
$actionID = $this->action->create('task', $taskID, 'Recorded', $this->post->comment, (float)$this->post->consumed);
$this->action->logHistory($actionID, $changes);
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
}
+16
View File
@@ -0,0 +1,16 @@
/* If left = 0, warning. */
function checkLeft()
{
value = $("#left").val();
if(isNaN(parseInt(value)))
{
if(confirm(confirmFinish))
{
return true;
}
else
{
return false;
}
}
}
+1
View File
@@ -136,6 +136,7 @@ $lang->task->successSaved = "Successfully saved";
$lang->task->delayWarning = " <strong class='delayed f-14px'> Postponed %s days </strong>";
$lang->task->remindBug = "This task from Bug, update the Bug:%s or not?";
$lang->task->confirmChangeProject = 'Change project will change module, story and assignedTo also, are you sure?';
$lang->task->confirmFinish = '"Left" is 0, this task will be done. Are you sure?';
$lang->task->error = new stdclass();
$lang->task->error->consumed = '"Consumed" must be number';
+1
View File
@@ -136,6 +136,7 @@ $lang->task->successSaved = "成功添加,";
$lang->task->delayWarning = " <strong class='delayed f-14px'> 延期%s天 </strong>";
$lang->task->remindBug = "该任务为Bug转化得到,是否更新Bug:%s ?";
$lang->task->confirmChangeProject = '修改项目会导致相应的所属模块、相关需求和指派人发生变化,确定吗?';
$lang->task->confirmFinish = '"预计剩余"为0,确认将任务状态改为"已完成"吗?';
$lang->task->error = new stdclass();
$lang->task->error->consumed = '"已经消耗"必须为数字';
+2
View File
@@ -417,6 +417,8 @@ class taskModel extends model
->setDefault('account', $this->app->user->account)
->setDefault('task', $taskID)
->setDefault('date', helper::now())
->cleanFloat('consumed, left')
->remove('comment')
->get();
$this->dao->insert(TABLE_TASKESTIMATE)->data($estimate)
->autoCheck()
+6 -1
View File
@@ -11,7 +11,8 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<form method='post' target='hiddenwin'>
<?php js::set('confirmFinish', $lang->task->confirmFinish);?>
<form method='post' target='hiddenwin' onsubmit='return checkLeft();'>
<table class='table-1'>
<caption><?php echo $task->name;?></caption>
<tr>
@@ -26,6 +27,10 @@
<th class='rowhead'><?php echo $lang->task->left;?></th>
<td><?php echo html::input('left', '', "class='text-2'") . $lang->task->hour;?></td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->comment;?></td>
<td><?php echo html::textarea('comment', '', "rows='6' class='area-1'");?></td>
</tr>
<tr>
<td colspan='2' class='a-center'><?php echo html::submitButton() . html::linkButton($lang->goback, $this->session->taskList); ?></td>
</tr>