From 185f7d4628a79213d019ad90ab82cf2ec1563d07 Mon Sep 17 00:00:00 2001 From: "shiyangyangwork@yahoo.cn" Date: Sat, 17 Dec 2011 02:47:00 +0000 Subject: [PATCH] * finish the task #652. --- module/bug/control.php | 8 ++++++-- module/bug/lang/en.php | 2 +- module/bug/lang/zh-cn.php | 2 +- module/task/control.php | 8 ++++++-- module/task/lang/en.php | 2 +- module/task/lang/zh-cn.php | 2 +- 6 files changed, 16 insertions(+), 8 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 2823a38fe2..57a7b6d1b4 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -478,7 +478,9 @@ class bug extends control { if($change['field'] == 'status') { - echo js::alert($this->lang->bug->remindTask . $bug->toTask); + $confirmURL = $this->createLink('task', 'view', "taskID=$bug->toTask"); + $cancelURL = $this->server->HTTP_REFERER; + die(js::confirm(sprintf($this->lang->task->remindTask, $bug->Task), $confirmURL, $cancelURL, 'parent', 'parent')); } } } @@ -584,7 +586,9 @@ class bug extends control $bug = $this->bug->getById($bugID); if($bug->toTask != 0) { - echo js::alert($this->lang->bug->remindTask . $bug->toTask); + $confirmURL = $this->createLink('task', 'view', "taskID=$bug->toTask"); + $cancelURL = $this->createLink('bug', 'view', "bugID=$bugID"); + die(js::confirm(sprintf($this->lang->bug->remindTask, $bug->toTask), $confirmURL, $cancelURL, 'parent', 'parent')); } die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent')); } diff --git a/module/bug/lang/en.php b/module/bug/lang/en.php index a43e2882fc..a5565bc237 100644 --- a/module/bug/lang/en.php +++ b/module/bug/lang/en.php @@ -143,7 +143,7 @@ $lang->bug->buttonCreateTestcase = 'Create case'; $lang->bug->confirmChangeProduct = 'Change product will change project, task and story also, are you sure?'; $lang->bug->confirmDelete = 'Are you sure to delete this bug?'; $lang->bug->setTemplateTitle = 'Please input the template title:'; -$lang->bug->remindTask = 'This bug has been to be a task, please update the task:'; +$lang->bug->remindTask = 'This bug has been to be a task, update the task:%s or not?'; /* Templates. */ $lang->bug->tplStep = "

[Steps]

"; diff --git a/module/bug/lang/zh-cn.php b/module/bug/lang/zh-cn.php index 4cb2a4b01c..b314b54500 100644 --- a/module/bug/lang/zh-cn.php +++ b/module/bug/lang/zh-cn.php @@ -143,7 +143,7 @@ $lang->bug->buttonCreateTestcase = '创建用例'; $lang->bug->confirmChangeProduct = '修改产品会导致相应的项目、需求和任务发生变化,确定吗?'; $lang->bug->confirmDelete = '您确认要删除该Bug吗?'; $lang->bug->setTemplateTitle = '请输入bug模板标题(保存之前请先填写bug重现步骤):'; -$lang->bug->remindTask = '该Bug已经转化为任务,请及时更新任务状态。任务:'; +$lang->bug->remindTask = '该Bug已经转化为任务,是否更新任务(编号:%s)状态 ?'; /* 模板。*/ $lang->bug->tplStep = "

[步骤]

"; diff --git a/module/task/control.php b/module/task/control.php index 10404e2cab..61c695f6bf 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -190,7 +190,9 @@ class task extends control { if($change['field'] == 'status') { - echo js::alert($this->lang->task->remindBug . $task->fromBug); + $confirmURL = $this->createLink('bug', 'view', "id=$task->fromBug"); + $cancelURL = $this->server->HTTP_REFERER; + die(js::confirm(sprintf($this->lang->task->remindBug, $task->fromBug), $confirmURL, $cancelURL, 'parent', 'parent')); } } } @@ -339,7 +341,9 @@ class task extends control { if($change['field'] == 'status') { - echo js::alert($this->lang->task->remindBug . $task->fromBug); + $confirmURL = $this->createLink('bug', 'view', "id=$task->fromBug"); + $cancelURL = $this->server->HTTP_REFERER; + die(js::confirm(sprintf($this->lang->task->remindBug, $task->fromBug), $confirmURL, $cancelURL, 'parent', 'parent')); } } } diff --git a/module/task/lang/en.php b/module/task/lang/en.php index 03dab9274d..97d9774d3e 100644 --- a/module/task/lang/en.php +++ b/module/task/lang/en.php @@ -126,7 +126,7 @@ $lang->task->copyStoryTitle = "Same as story"; $lang->task->afterSubmit = "After created"; $lang->task->successSaved = "Success saved"; $lang->task->delayWarning = " Postponed %s days "; -$lang->task->remindBug = "This task from Bug, please update the Bug:"; +$lang->task->remindBug = "This task from Bug, update the Bug:%s or not?"; /* Report. */ $lang->task->report->common = 'Report'; diff --git a/module/task/lang/zh-cn.php b/module/task/lang/zh-cn.php index ddb46935fb..e605697818 100644 --- a/module/task/lang/zh-cn.php +++ b/module/task/lang/zh-cn.php @@ -126,7 +126,7 @@ $lang->task->copyStoryTitle = "同需求"; $lang->task->afterSubmit = "添加之后"; $lang->task->successSaved = "成功添加,"; $lang->task->delayWarning = " 延期%s天 "; -$lang->task->remindBug = "该任务为Bug转化得到,请及时更新相关Bug。来源Bug:"; +$lang->task->remindBug = "该任务为Bug转化得到,是否更新Bug:%s ?"; /* 统计报表。*/ $lang->task->report->common = '统计报表';