From f9be4ab1ba1b109feea73d23114e21c099c2ae1b Mon Sep 17 00:00:00 2001 From: mayue Date: Mon, 14 Mar 2022 15:16:06 +0800 Subject: [PATCH 01/11] * Fix bug#20646. --- module/kanban/css/view.css | 1 + 1 file changed, 1 insertion(+) diff --git a/module/kanban/css/view.css b/module/kanban/css/view.css index 8296944382..7d024d32c0 100644 --- a/module/kanban/css/view.css +++ b/module/kanban/css/view.css @@ -81,6 +81,7 @@ .kanban-item .has-color .info > .user .lable-teamSumCount, .kanban-item .has-color .info > .label-light {color: #FFFFFF;} .kanban-item .has-color .info > .label-pri {border-color: #FFFFFF;} +.kanban-item .has-color .progress-box > .progress-number {color: #FFFFFF;} .kanban-item .item-more {position: absolute; right: 6px; top: 0px;} .kanban-card {height: auto !important; padding: 8px 14px !important; min-height: 60px;} From 5c3395ee462ebee6381eaddce2f292b0c307b671 Mon Sep 17 00:00:00 2001 From: mayue Date: Mon, 14 Mar 2022 16:17:51 +0800 Subject: [PATCH 02/11] * Fix bug #20645. --- db/update16.4.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/db/update16.4.sql b/db/update16.4.sql index 4b71467972..d5dfcca3c5 100644 --- a/db/update16.4.sql +++ b/db/update16.4.sql @@ -23,6 +23,7 @@ ALTER TABLE `zt_story` ADD `activatedDate` datetime NOT NULL AFTER `closedReason ALTER TABLE `zt_task` MODIFY `activatedDate` datetime NOT NULL AFTER `lastEditedDate`; ALTER TABLE `zt_kanbancard` ADD `progress` float unsigned NOT NULL DEFAULT '0' AFTER `estimate`; +UPDATE `zt_kanbancard` SET `progress`='100' WHERE `status` = 'done' and `fromtype` = ''; ALTER TABLE `zt_user` ADD `visions` varchar(20) NOT NULL DEFAULT 'rnd,lite' AFTER `visits`; UPDATE `zt_user` SET `visions`='rnd,lite'; From 93076c966b198b24fb2a261b88178c8c403e8a4b Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 22 Mar 2022 09:03:56 +0800 Subject: [PATCH 03/11] * Fix bug #20766. --- module/kanban/view/editcard.html.php | 2 ++ module/kanban/view/viewcard.html.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/module/kanban/view/editcard.html.php b/module/kanban/view/editcard.html.php index 26f9bd2d4c..22c6b4eb4a 100644 --- a/module/kanban/view/editcard.html.php +++ b/module/kanban/view/editcard.html.php @@ -71,6 +71,7 @@ + progress):?> kanbancard->progress;?> @@ -80,6 +81,7 @@ + diff --git a/module/kanban/view/viewcard.html.php b/module/kanban/view/viewcard.html.php index 24399cc0e3..57c58922cb 100644 --- a/module/kanban/view/viewcard.html.php +++ b/module/kanban/view/viewcard.html.php @@ -114,10 +114,12 @@ kanbancard->estimate;?> estimate, 2) . ' ' . $lang->kanbancard->lblHour;?> + progress):?> kanbancard->progress;?> progress, 2) . ' %';?> + From afcca3cf39ba412f7a79b16d133a8bd64b9ec7e8 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 22 Mar 2022 09:13:24 +0800 Subject: [PATCH 04/11] * Fix bug #20828. --- www/js/my.full.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/www/js/my.full.js b/www/js/my.full.js index c3b7069b6b..630874d86e 100644 --- a/www/js/my.full.js +++ b/www/js/my.full.js @@ -900,5 +900,12 @@ $(document).ready(function() $('#globalCreate').hover(function() { $(this).prev().removeClass('open'); + $(this).addClass('dropdown-hover'); + }); + + /* Hide create button when global create menu is clicked. */ + $('#globalCreate').click(function() + { + $(this).removeClass('dropdown-hover'); }); }); From a8ec0be15c82cee5410be861b5a9bd5ed9e5f823 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 22 Mar 2022 09:27:48 +0800 Subject: [PATCH 05/11] * Fix global add kanban error report. --- module/kanban/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/kanban/model.php b/module/kanban/model.php index b6a9ce85dd..0786124d76 100644 --- a/module/kanban/model.php +++ b/module/kanban/model.php @@ -1647,14 +1647,14 @@ class kanbanModel extends model public function getSpacePairs($browseType = 'private') { $account = $this->app->user->account; - $spaceIdList = $this->getCanViewObjects('kanbanspace'); + $spaceIdList = $this->getCanViewObjects('kanbanspace', $browseType); return $this->dao->select('id,name')->from(TABLE_KANBANSPACE) ->where('deleted')->eq(0) + ->andWhere('id')->in($spaceIdList) ->beginIF(in_array($browseType, array('private', 'cooperation', 'public')))->andWhere('type')->eq($browseType)->fi() ->beginIF($browseType == 'involved')->andWhere('owner')->ne($account)->fi() ->beginIF($this->cookie->showClosed == 0 and $browseType != 'showClosed')->andWhere('status')->ne('closed')->fi() - ->beginIF(!$this->app->user->admin)->andWhere('id')->in($spaceIdList)->fi() ->orderBy('id_desc') ->fetchPairs('id'); } From 682eeae9e972f360e9df38ba1b255147e6562d75 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 22 Mar 2022 09:54:36 +0800 Subject: [PATCH 06/11] * Fix global add kanban error report. --- module/kanban/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/kanban/model.php b/module/kanban/model.php index 0786124d76..f88d8b4f7d 100644 --- a/module/kanban/model.php +++ b/module/kanban/model.php @@ -1694,7 +1694,7 @@ class kanbanModel extends model $spaceList = $objectType == 'kanban' ? $this->dao->select('id,owner,type')->from(TABLE_KANBANSPACE)->fetchAll('id') : array(); - if($this->app->user->admin and strpos('private,involved', $param) === false) return array_keys($objects); + if($param and $this->app->user->admin and strpos('private,involved', $param) === false) return array_keys($objects); $account = $this->app->user->account; foreach($objects as $objectID => $object) From d74e5c4c58a5cb03691276ec61f62167132abafc Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Tue, 22 Mar 2022 09:58:43 +0800 Subject: [PATCH 07/11] * Fix bug #15984. --- module/execution/control.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index 964df20efa..3bb6498b46 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2895,11 +2895,7 @@ class execution extends control $this->execution->unlinkStory($executionID, $storyID); /* if kanban then reload and if ajax request then send result. */ - if(isonlybody()) - { - return print(js::reload('parent')); - } - elseif(helper::isAjaxRequest()) + if(helper::isAjaxRequest()) { if(dao::isError()) { @@ -2913,7 +2909,7 @@ class execution extends control } return $this->send($response); } - return print(js::locate($this->app->session->storyList, 'parent')); + return print(js::reload('parent')); } } From 23b70dfa4e2091628ebd47a40e5baf73f186f849 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 22 Mar 2022 10:00:39 +0800 Subject: [PATCH 08/11] * Fix bug #19074. --- module/kanban/css/createspace.css | 2 +- module/kanban/css/editspace.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/kanban/css/createspace.css b/module/kanban/css/createspace.css index ac6894793f..f5ad743eb1 100644 --- a/module/kanban/css/createspace.css +++ b/module/kanban/css/createspace.css @@ -1 +1 @@ -#mainContent {padding-left: 0px;} +#mainContent {padding-left: 0px; height: 500px;} diff --git a/module/kanban/css/editspace.css b/module/kanban/css/editspace.css index ac6894793f..f5ad743eb1 100644 --- a/module/kanban/css/editspace.css +++ b/module/kanban/css/editspace.css @@ -1 +1 @@ -#mainContent {padding-left: 0px;} +#mainContent {padding-left: 0px; height: 500px;} From f4f3e18fbe607d1545b674a0dc8fbc62c58039cc Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 22 Mar 2022 10:07:56 +0800 Subject: [PATCH 09/11] * Fix bug #19004. --- module/kanban/js/view.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/module/kanban/js/view.js b/module/kanban/js/view.js index 346329d0d7..531b664c2c 100644 --- a/module/kanban/js/view.js +++ b/module/kanban/js/view.js @@ -1587,3 +1587,8 @@ function resetRegionHeight(fold) $('.region').css('height', regionHeaderHeight); } } + +$('.dropdown-menu').click(function() +{ + $.zui.ContextMenu.hide(); +}) From 25b0c39dcca3a23375de4fa13210a7a4b3acfd50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A1=E6=A0=8B?= Date: Tue, 22 Mar 2022 10:31:47 +0800 Subject: [PATCH 10/11] * fix bug #21029. --- module/task/js/batchcreate.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/module/task/js/batchcreate.js b/module/task/js/batchcreate.js index 6ab66a60cf..2f9fb899e1 100755 --- a/module/task/js/batchcreate.js +++ b/module/task/js/batchcreate.js @@ -85,6 +85,18 @@ function copyStoryTitle(num) /* Set the story module. */ function setStoryRelated(num) +{ + setPreview(num); +} + +/** + * Set preview. + * + * @param int $num + * @access public + * @return void + */ +function setPreview(num) { var storyID = $('#story' + num).val(); if(storyID != 0 && storyID != 'ditto') @@ -224,6 +236,7 @@ $(document).on('chosen:showing_dropdown', 'select[name^="story"],.chosen-with-dr $(select).trigger("change"); } }) + $(document).on('mousedown', 'select', function() { if($(this).val() == 'ditto') @@ -253,7 +266,7 @@ $(function() if($.cookie('zeroTask') == 'true') toggleZeroTaskStory(); markStoryTask(); - if(storyID != 0) setStoryRelated(0); + if(storyID != 0) setStoryRelated(1); $(document).keydown(function(event) { From ff30f9fa2f620b9e1dba74d36933d8d89aceebff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A1=E6=A0=8B?= Date: Tue, 22 Mar 2022 10:53:26 +0800 Subject: [PATCH 11/11] * adjust for init story for batch create task. --- module/task/js/batchcreate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/task/js/batchcreate.js b/module/task/js/batchcreate.js index 2f9fb899e1..89ff42b674 100755 --- a/module/task/js/batchcreate.js +++ b/module/task/js/batchcreate.js @@ -266,7 +266,7 @@ $(function() if($.cookie('zeroTask') == 'true') toggleZeroTaskStory(); markStoryTask(); - if(storyID != 0) setStoryRelated(1); + if(storyID != 0) setStoryRelated($('#batchCreateForm table tbody tr:first [id^=story]:first').attr('id').replace('story', '')); $(document).keydown(function(event) {