diff --git a/module/todo/control.php b/module/todo/control.php
index 0f94b6f35b..b88b96ef1a 100644
--- a/module/todo/control.php
+++ b/module/todo/control.php
@@ -48,10 +48,12 @@ class todo extends control
{
$date = 'future';
}
- else if($date == date('Ymd'))
+ elseif($date == date('Ymd'))
{
$date = 'today';
}
+
+ if(!empty($_POST['idvalue'])) $this->send(array('result' => 'success'));
die(js::locate($this->createLink('my', 'todo', "type=$date"), 'parent'));
}
diff --git a/module/todo/lang/en.php b/module/todo/lang/en.php
index 23b29d927e..71ed7066cf 100644
--- a/module/todo/lang/en.php
+++ b/module/todo/lang/en.php
@@ -43,9 +43,9 @@ $lang->todo->private = 'Private';
$lang->todo->confirmBug = 'This To-Do is related to Bug #%s. Do you want to edit it?';
$lang->todo->confirmTask = 'This To-Do is related to Task #%s,Do you want to edit it?';
-$lang->todo->statusList['wait'] = 'Wait';
-$lang->todo->statusList['doing'] = 'Doing';
-$lang->todo->statusList['done'] = 'Done';
+$lang->todo->statusList['wait'] = 'Wait';
+$lang->todo->statusList['doing'] = 'Doing';
+$lang->todo->statusList['done'] = 'Done';
//$lang->todo->statusList['cancel'] = 'Cancelled';
//$lang->todo->statusList['postpone'] = 'Delayed';
@@ -57,6 +57,7 @@ $lang->todo->priList[4] = '4';
$lang->todo->typeList['custom'] = 'Custom';
$lang->todo->typeList['bug'] = 'Bug';
$lang->todo->typeList['task'] = $lang->projectCommon . 'Task';
+$lang->todo->typeList['story'] = $lang->projectCommon . 'Story';
global $config;
if($config->global->flow == 'onlyTest' or $config->global->flow == 'onlyStory') unset($lang->todo->typeList['task']);
@@ -80,5 +81,5 @@ $lang->todo->periods['before'] = 'Undone';
$lang->todo->periods['all'] = 'All';
$lang->todo->action = new stdclass();
-$lang->todo->action->finished = array('main' => '$date, is finished by $actor.');
-$lang->todo->action->marked = array('main' => '$date, is marked by $actor as $extra.', 'extra' => 'statusList');
+$lang->todo->action->finished = array('main' => '$date, is finished by $actor.');
+$lang->todo->action->marked = array('main' => '$date, is marked by $actor as $extra.', 'extra' => 'statusList');
diff --git a/module/todo/lang/zh-cn.php b/module/todo/lang/zh-cn.php
index 3c49f4ca73..df262de462 100644
--- a/module/todo/lang/zh-cn.php
+++ b/module/todo/lang/zh-cn.php
@@ -43,9 +43,9 @@ $lang->todo->private = '私人事务';
$lang->todo->confirmBug = '该Todo关联的是Bug #%s,需要修改它吗?';
$lang->todo->confirmTask = '该Todo关联的是Task #%s,需要修改它吗?';
-$lang->todo->statusList['wait'] = '未开始';
-$lang->todo->statusList['doing'] = '进行中';
-$lang->todo->statusList['done'] = '已完成';
+$lang->todo->statusList['wait'] = '未开始';
+$lang->todo->statusList['doing'] = '进行中';
+$lang->todo->statusList['done'] = '已完成';
//$lang->todo->statusList['cancel'] = '已取消';
//$lang->todo->statusList['postpone'] = '已延期';
@@ -57,6 +57,7 @@ $lang->todo->priList[4] = '最低';
$lang->todo->typeList['custom'] = '自定义';
$lang->todo->typeList['bug'] = 'Bug';
$lang->todo->typeList['task'] = $lang->projectCommon . '任务';
+$lang->todo->typeList['story'] = $lang->projectCommon . '需求';
global $config;
if($config->global->flow == 'onlyTest' or $config->global->flow == 'onlyStory') unset($lang->todo->typeList['task']);
@@ -80,5 +81,5 @@ $lang->todo->periods['before'] = '未完';
$lang->todo->periods['all'] = '所有';
$lang->todo->action = new stdclass();
-$lang->todo->action->finished = array('main' => '$date, 由 $actor完成');
-$lang->todo->action->marked = array('main' => '$date, 由 $actor 标记为$extra。', 'extra' => 'statusList');
+$lang->todo->action->finished = array('main' => '$date, 由 $actor完成');
+$lang->todo->action->marked = array('main' => '$date, 由 $actor 标记为$extra。', 'extra' => 'statusList');
diff --git a/module/todo/model.php b/module/todo/model.php
index 3464fbb608..1f1e85456d 100644
--- a/module/todo/model.php
+++ b/module/todo/model.php
@@ -236,8 +236,9 @@ class todoModel extends model
if(!$todo) return false;
$todo = $this->loadModel('file')->replaceImgURL($todo, 'desc');
if($setImgSize) $todo->desc = $this->file->setImgSize($todo->desc);
- if($todo->type == 'task') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_TASK)->fetch('name');
- if($todo->type == 'bug') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_BUG)->fetch('title');
+ if($todo->type == 'story') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_STORY)->fetch('title');
+ if($todo->type == 'task') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_TASK)->fetch('name');
+ if($todo->type == 'bug') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_BUG)->fetch('title');
$todo->date = str_replace('-', '', $todo->date);
return $todo;
}
@@ -336,8 +337,9 @@ class todoModel extends model
if($this->config->global->flow == 'onlyTask' and $todo->type == 'bug') continue;
if($this->config->global->flow == 'onlyStory' and $todo->type != 'custom') continue;
- if($todo->type == 'task') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_TASK)->fetch('name');
- if($todo->type == 'bug') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_BUG)->fetch('title');
+ if($todo->type == 'story') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_STORY)->fetch('title');
+ if($todo->type == 'task') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_TASK)->fetch('name');
+ if($todo->type == 'bug') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_BUG)->fetch('title');
$todo->begin = date::formatTime($todo->begin);
$todo->end = date::formatTime($todo->end);