From d498b40d178d3c83f8083ab0bddf3d890faeb2fb Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 11 Oct 2022 10:55:21 +0800 Subject: [PATCH 1/6] * Finish task #71890. --- module/my/js/todo.js | 18 ++++++++++++++++++ module/my/view/todo.html.php | 11 +++++++++-- module/todo/lang/de.php | 10 ++++++---- module/todo/lang/en.php | 10 ++++++---- module/todo/lang/fr.php | 10 ++++++---- module/todo/lang/zh-cn.php | 10 ++++++---- 6 files changed, 51 insertions(+), 18 deletions(-) diff --git a/module/my/js/todo.js b/module/my/js/todo.js index bf9b0b0c00..63544fc788 100644 --- a/module/my/js/todo.js +++ b/module/my/js/todo.js @@ -21,4 +21,22 @@ $(function() type: 'iframe' }).trigger('click'); } + + $('#todoForm').table( + { + replaceId: 'todoIDList', + statisticCreator: function(table) + { + var $table = table.getTable(); + var $checkedRows = $table.find('tbody>tr.checked'); + var checkedTotal = $checkedRows.length; + var checkedWait = $checkedRows.filter("[data-status=wait]").length; + var checkedDoing = $checkedRows.filter("[data-status=doing]").length; + var checkedStatistics = checkedSummary.replace('%total%', checkedTotal) + .replace('%wait%', checkedWait) + .replace('%doing%', checkedDoing); + + return checkedTotal ? checkedStatistics : pageSummary; + } + }); }); diff --git a/module/my/view/todo.html.php b/module/my/view/todo.html.php index d8d09f7f81..144b73ceaf 100644 --- a/module/my/view/todo.html.php +++ b/module/my/view/todo.html.php @@ -67,13 +67,15 @@

-
+ id}&status=$status&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?> @@ -105,7 +107,9 @@ - + status == 'wait') $waitCount ++;?> + status == 'doing') $doingCount ++;?> + - - - + + + + - - - - + + + + - From 647859b82ca844110de7ac11e7679f0af859293a Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 11 Oct 2022 13:10:18 +0800 Subject: [PATCH 3/6] * Fix project list error. --- module/project/view/browsebylist.html.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/module/project/view/browsebylist.html.php b/module/project/view/browsebylist.html.php index 34d17c17e4..92b296a488 100644 --- a/module/project/view/browsebylist.html.php +++ b/module/project/view/browsebylist.html.php @@ -56,6 +56,12 @@ +
config->systemMode == 'new'):?>
+
@@ -74,8 +78,6 @@ $canBatchClose = common::hasPriv('todo', 'batchClose'); $canbatchAction = ($type != 'cycle' and ($canBatchEdit or $canBatchFinish or $canBatchClose or (common::hasPriv('todo', 'import2Today') and $importFuture))); - $waitCount = 0; - $doingCount = 0; ?>
@@ -192,10 +196,13 @@ } ?>
+
todo->summary, count($todos), $waitCount, $doingCount);?>
show('right', 'pagerjs');?> +todo->summary, count($todos), $waitCount, $doingCount));?> +todo->checkedSummary);?> diff --git a/module/todo/lang/de.php b/module/todo/lang/de.php index bdd2825548..a4b7f1d009 100644 --- a/module/todo/lang/de.php +++ b/module/todo/lang/de.php @@ -83,10 +83,12 @@ $lang->todo->beforeDays = "%searly in advance $lang->todo->dayNames = array(1 => 'Monday', 2 => 'Tuesday', 3 => 'Wednesday', 4 => 'Thursday', 5 => 'Friday', 6 => 'Saturday', 0 => 'Sunday'); $lang->todo->specifiedDay = array(1 => 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31); -$lang->todo->confirmBug = 'Dieser Todo steht in Beziehung mit Bug #%s. Möchten Sie das bearbeiten?'; -$lang->todo->confirmTask = 'Dieser Todo steht in Beziehung mit Task #%s, Möchten Sie das bearbeiten?'; -$lang->todo->confirmStory = 'Dieser Todo steht in Beziehung mit Story #%s, Möchten Sie das bearbeiten?'; -$lang->todo->noOptions = 'You have no %s todo at the moment. Please reselect the Todo type.'; +$lang->todo->confirmBug = 'Dieser Todo steht in Beziehung mit Bug #%s. Möchten Sie das bearbeiten?'; +$lang->todo->confirmTask = 'Dieser Todo steht in Beziehung mit Task #%s, Möchten Sie das bearbeiten?'; +$lang->todo->confirmStory = 'Dieser Todo steht in Beziehung mit Story #%s, Möchten Sie das bearbeiten?'; +$lang->todo->noOptions = 'You have no %s todo at the moment. Please reselect the Todo type.'; +$lang->todo->summary = 'Total todos: %s, Wait: %s, Doing: %s.'; +$lang->todo->checkedSummary = 'Seleted: %total%, Wait: %wait%, Doing: %doing%.'; $lang->todo->statusList['wait'] = 'Wartend'; $lang->todo->statusList['doing'] = 'In Arbeit'; diff --git a/module/todo/lang/en.php b/module/todo/lang/en.php index 393be9e447..cb59f94861 100644 --- a/module/todo/lang/en.php +++ b/module/todo/lang/en.php @@ -83,10 +83,12 @@ $lang->todo->beforeDays = "Auto create the tod $lang->todo->dayNames = array(1 => 'Monday', 2 => 'Tuesday', 3 => 'Wednesday', 4 => 'Thursday', 5 => 'Friday', 6 => 'Saturday', 0 => 'Sunday'); $lang->todo->specifiedDay = array(1 => 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31); -$lang->todo->confirmBug = 'This Todo is linked to Bug #%s. Do you want to edit it?'; -$lang->todo->confirmTask = 'This Todo is linked to Task #%s,Do you want to edit it?'; -$lang->todo->confirmStory = 'This Todo is linked to Story #%s,Do you want to edit it?'; -$lang->todo->noOptions = 'You have no %s todo at the moment. Please reselect the Todo type.'; +$lang->todo->confirmBug = 'This Todo is linked to Bug #%s. Do you want to edit it?'; +$lang->todo->confirmTask = 'This Todo is linked to Task #%s,Do you want to edit it?'; +$lang->todo->confirmStory = 'This Todo is linked to Story #%s,Do you want to edit it?'; +$lang->todo->noOptions = 'You have no %s todo at the moment. Please reselect the Todo type.'; +$lang->todo->summary = 'Total todos: %s, Wait: %s, Doing: %s.'; +$lang->todo->checkedSummary = 'Seleted: %total%, Wait: %wait%, Doing: %doing%.'; $lang->todo->statusList['wait'] = 'Waiting'; $lang->todo->statusList['doing'] = 'Doing'; diff --git a/module/todo/lang/fr.php b/module/todo/lang/fr.php index 0f12d6a044..375a62a895 100644 --- a/module/todo/lang/fr.php +++ b/module/todo/lang/fr.php @@ -83,10 +83,12 @@ $lang->todo->beforeDays = "Créer automatiquem $lang->todo->dayNames = array(1 => 'Lundi', 2 => 'Mardi', 3 => 'Mercredi', 4 => 'Jeudi', 5 => 'Vendredi', 6 => 'Samedi', 0 => 'Dimanche'); $lang->todo->specifiedDay = array(1 => 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31); -$lang->todo->confirmBug = "Cette action est liée au Bug #%s. Voulez-vous l'éditer ?"; -$lang->todo->confirmTask = "Cette action est liée à la Tâche #%s. Voulez-vous l'éditer ?"; -$lang->todo->confirmStory = "Cette action est liée à la Story #%s. Voulez-vous l'éditer ?"; -$lang->todo->noOptions = 'Vous n\'avez pas de %s en attente pour le moment. Veuillez sélectionner le type de Todo.'; +$lang->todo->confirmBug = "Cette action est liée au Bug #%s. Voulez-vous l'éditer ?"; +$lang->todo->confirmTask = "Cette action est liée à la Tâche #%s. Voulez-vous l'éditer ?"; +$lang->todo->confirmStory = "Cette action est liée à la Story #%s. Voulez-vous l'éditer ?"; +$lang->todo->noOptions = 'Vous n\'avez pas de %s en attente pour le moment. Veuillez sélectionner le type de Todo.'; +$lang->todo->summary = 'Total todos: %s, Wait: %s, Doing: %s.'; +$lang->todo->checkedSummary = 'Seleted: %total%, Wait: %wait%, Doing: %doing%.'; $lang->todo->statusList['wait'] = 'En Attente'; $lang->todo->statusList['doing'] = 'En cours'; diff --git a/module/todo/lang/zh-cn.php b/module/todo/lang/zh-cn.php index 2de9d58aae..ec001e5182 100644 --- a/module/todo/lang/zh-cn.php +++ b/module/todo/lang/zh-cn.php @@ -83,10 +83,12 @@ $lang->todo->beforeDays = "提前%stodo->dayNames = array(1 => '星期一', 2 => '星期二', 3 => '星期三', 4 => '星期四', 5 => '星期五', 6 => '星期六', 0 => '星期日'); $lang->todo->specifiedDay = array(1 => 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31); -$lang->todo->confirmBug = '该待办关联的是Bug #%s,需要修改它吗?'; -$lang->todo->confirmTask = '该待办关联的是Task #%s,需要修改它吗?'; -$lang->todo->confirmStory = '该待办关联的是Story #%s,需要修改它吗?'; -$lang->todo->noOptions = '您暂时没有待处理的%s,请重新选择待办类型。'; +$lang->todo->confirmBug = '该待办关联的是Bug #%s,需要修改它吗?'; +$lang->todo->confirmTask = '该待办关联的是Task #%s,需要修改它吗?'; +$lang->todo->confirmStory = '该待办关联的是Story #%s,需要修改它吗?'; +$lang->todo->noOptions = '您暂时没有待处理的%s,请重新选择待办类型。'; +$lang->todo->summary = '本页共 %s 项待办,未开始 %s,进行中 %s。'; +$lang->todo->checkedSummary = '共选择 %total% 项待办,未开始 %wait%,进行中 %doing%。'; $lang->todo->statusList['wait'] = '未开始'; $lang->todo->statusList['doing'] = '进行中'; From 1d4bab43ab1e017c6ce501dc46986f148f18a38b Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 11 Oct 2022 11:01:52 +0800 Subject: [PATCH 2/6] * Fix bug #28423. --- module/user/view/todo.html.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/module/user/view/todo.html.php b/module/user/view/todo.html.php index a5b9508486..b692c5e8fb 100644 --- a/module/user/view/todo.html.php +++ b/module/user/view/todo.html.php @@ -36,28 +36,28 @@
idAB);?> todo->date);?> todo->type);?> priAB);?> todo->name);?> priAB);?> todo->date);?>todo->status);?> todo->type);?> todo->beginAB);?> todo->endAB);?>todo->status);?>
id;?>date == '2030-01-01' ? $lang->todo->periods['future'] : $todo->date;?>todo->typeList[$todo->type];?>todo->priList, $todo->pri, $todo->pri);?>'>todo->priList, $todo->pri, $todo->pri);?> private and $this->app->user->account != $todo->account) ? $todo->name : html::a($this->createLink('todo', 'view', "id=$todo->id&from=company", '', true), $todo->name, '', "class='iframe'");?> todo->priList, $todo->pri, $todo->pri);?>'>todo->priList, $todo->pri, $todo->pri);?>date == '2030-01-01' ? $lang->todo->periods['future'] : $todo->date;?>todo->statusList[$todo->status];?>todo->typeList[$todo->type];?> begin;?> end;?>todo->statusList[$todo->status];?>
id}&status=$status&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?> From df424fcefe43a12be2c4a78f0290123ac192ef40 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 11 Oct 2022 13:19:03 +0800 Subject: [PATCH 5/6] * Fix bug #28431. --- module/my/view/task.html.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/module/my/view/task.html.php b/module/my/view/task.html.php index d5dc31bba4..15fbc5f468 100644 --- a/module/my/view/task.html.php +++ b/module/my/view/task.html.php @@ -126,11 +126,6 @@ storyStatus) and $task->storyStatus == 'active' and $task->latestStoryVersion > $task->storyVersion and !in_array($task->status, array('cancel', 'closed')));?> {$this->lang->my->storyChanged}") : print(" " . $this->processStatus('task', $task) . "");?> - - systemMode == 'new'):?> execution]->name) ? $projects[$task->execution]->name : '';?> execution]->id) ? $projects[$task->execution]->id : 0;?> From 65d21e59b684b937b7830131c3465077c882131c Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 11 Oct 2022 13:49:39 +0800 Subject: [PATCH 6/6] Delete unnecessary Spaces. --- module/my/view/todo.html.php | 4 ++-- module/project/view/browsebylist.html.php | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/module/my/view/todo.html.php b/module/my/view/todo.html.php index e7011e1e2d..d8d0dbc992 100644 --- a/module/my/view/todo.html.php +++ b/module/my/view/todo.html.php @@ -57,8 +57,8 @@
diff --git a/module/project/view/browsebylist.html.php b/module/project/view/browsebylist.html.php index 92b296a488..354022aa8b 100644 --- a/module/project/view/browsebylist.html.php +++ b/module/project/view/browsebylist.html.php @@ -57,10 +57,10 @@
config->systemMode == 'new'):?>
pri;?>' title='task->priList, $task->pri);?>'>task->priList, $task->pri);?> - storyStatus) and $task->storyStatus == 'active' and $task->latestStoryVersion > $task->storyVersion and !in_array($task->status, array('cancel', 'closed')));?> - {$this->lang->my->storyChanged}") : print(" " . $this->processStatus('task', $task) . "");?> -