From 4a82fa28cd014d002e830662e85c862c26f01b01 Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Sat, 2 Apr 2022 09:18:24 +0800 Subject: [PATCH 01/10] * Fix bug #13789. --- module/block/view/todoblock.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/block/view/todoblock.html.php b/module/block/view/todoblock.html.php index 18562676dd..0a4db67169 100644 --- a/module/block/view/todoblock.html.php +++ b/module/block/view/todoblock.html.php @@ -22,7 +22,7 @@ if(!$selfCall) die(include('./todolist.html.php')); .block-todoes .todoes > li {position: relative; padding: 5px 10px 5px 35px; list-style: none; white-space:nowrap; overflow: auto; overflow-x:hidden;} .block-todoes .todoes > li:hover {background-color: #e9f2fb;} .block-todoes .todo-title {padding: 5px 15px 5px 5px;} -.titleBox {width: 700px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block;} +.titleBox {max-width: 700px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block;} .block-todoes .todo-pri {margin: 0 5px;} .block-todoes .todo-time {display: inline-block; padding: 0 5px; font-size: 12px; color: #8e939a; width: 95px;} .block-todoes .todo-check {position: absolute; top: 5px; left: 10px; display: block; width: 20px; height: 20px; font-size: 20px; color: transparent; cursor: pointer; background: #fff; border: 2px solid #eee; border-radius: 50%;} From 8b2c7f1288ee197f3aa84d7d368482490b9f05f2 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Sat, 2 Apr 2022 13:41:52 +0800 Subject: [PATCH 02/10] * Fix bug #21158. --- module/execution/js/kanban.js | 36 +++++++++++++++++-------------- module/execution/js/taskkanban.js | 5 +++++ module/kanban/js/view.js | 4 ++-- 3 files changed, 27 insertions(+), 18 deletions(-) diff --git a/module/execution/js/kanban.js b/module/execution/js/kanban.js index 9bb93112e6..b0200dd674 100644 --- a/module/execution/js/kanban.js +++ b/module/execution/js/kanban.js @@ -993,23 +993,27 @@ function changeCardColType(cardID, fromColID, toColID, fromLaneID, toLaneID, car */ function deleteCard(objectType, objectID, regionID) { - var objectLang = objectType + 'Lang'; - var result = confirm(window[objectLang].confirmDelete) ? true : false; - - if(!result) return false; - if(!objectID) return false; - - var url = createLink('kanban', 'deleteObjectCard', 'objectType=' + objectType + '&objectID=' + objectID + '®ionID=' + regionID); - return $.ajax( + $.zui.ContextMenu.hide(); + setTimeout(function() { - method: 'post', - dataType: 'json', - url: url, - success: function(data) - { - updateRegion(regionID, data[regionID]); - } - }); + var objectLang = objectType + 'Lang'; + var result = confirm(window[objectLang].confirmDelete) ? true : false; + + if(!result) return false; + if(!objectID) return false; + + var url = createLink('kanban', 'deleteObjectCard', 'objectType=' + objectType + '&objectID=' + objectID + '®ionID=' + regionID); + return $.ajax( + { + method: 'post', + dataType: 'json', + url: url, + success: function(data) + { + updateRegion(regionID, data[regionID]); + } + }); + }, 200) } /** diff --git a/module/execution/js/taskkanban.js b/module/execution/js/taskkanban.js index 2627d3dd92..f80a52ea64 100644 --- a/module/execution/js/taskkanban.js +++ b/module/execution/js/taskkanban.js @@ -1238,3 +1238,8 @@ function resetKanbanHeight() $('.kanban-lane').css('height', height -2); } + +$(document).on('click', '.dropdown-menu', function() +{ + $.zui.ContextMenu.hide(); +}); diff --git a/module/kanban/js/view.js b/module/kanban/js/view.js index 89800ac5d2..435eb6e5af 100644 --- a/module/kanban/js/view.js +++ b/module/kanban/js/view.js @@ -1592,7 +1592,7 @@ function resetRegionHeight(fold) } } -$('.dropdown-menu').click(function() +$(document).on('click', '.dropdown-menu', function() { $.zui.ContextMenu.hide(); -}) +}); From 9d03df55de36e532fe755b94d8ed0b36aa071c7f Mon Sep 17 00:00:00 2001 From: tianshujie Date: Sat, 2 Apr 2022 13:46:49 +0800 Subject: [PATCH 03/10] * Fix bug #19950. --- module/execution/js/kanban.js | 2 ++ module/execution/js/taskkanban.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/module/execution/js/kanban.js b/module/execution/js/kanban.js index b0200dd674..193cb364d5 100644 --- a/module/execution/js/kanban.js +++ b/module/execution/js/kanban.js @@ -363,6 +363,8 @@ function findDropColumns($element, $root) var laneType = $element.closest('.kanban-lane').data().lane.type; var kanbanRules = window.kanbanDropRules ? window.kanbanDropRules[laneType] : null; + hideKanbanAction(); + if(!kanbanRules) return $root.find('.kanban-lane-col:not([data-type="' + col.type + '"])'); var colRules = kanbanRules[col.type]; diff --git a/module/execution/js/taskkanban.js b/module/execution/js/taskkanban.js index f80a52ea64..31001c0e6a 100644 --- a/module/execution/js/taskkanban.js +++ b/module/execution/js/taskkanban.js @@ -515,6 +515,8 @@ function findDropColumns($element, $root) var kanbanID = $root.data('id'); var kanbanRules = window.kanbanDropRules ? window.kanbanDropRules[kanbanID] : null; + $.zui.ContextMenu.hide(); + if(!kanbanRules) return $root.find('.kanban-lane-col:not([data-type="' + col.type + '"])'); var colRules = kanbanRules[col.type]; From 1703c7f5bd1dadd243efd38db16f27bd6363c8ea Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Sat, 2 Apr 2022 13:55:33 +0800 Subject: [PATCH 04/10] * Fix bug of project session. --- module/project/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/project/model.php b/module/project/model.php index 3231360439..28a30645ca 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -120,7 +120,7 @@ class projectModel extends model if(defined('TUTORIAL')) return $projectID; if($projectID == 0 and $this->cookie->lastProject) $projectID = $this->cookie->lastProject; - if($projectID == 0 and $this->session->project == '') $projectID = key($projects); + if(($projectID == 0 and $this->session->project == '') or !isset($projects[$projectID])) $projectID = key($projects); $this->session->set('project', (int)$projectID, $this->app->tab); if(!isset($projects[$this->session->project])) From 1d168b046855fb0e6596ab73122ddf02bd620468 Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Sat, 2 Apr 2022 14:06:41 +0800 Subject: [PATCH 05/10] * Fix bug #21408,21406,20199. --- extension/lite/project/ext/view/edit.lite.html.hook.php | 3 --- module/doc/model.php | 2 +- module/execution/css/task.css | 1 + module/project/model.php | 3 ++- 4 files changed, 4 insertions(+), 5 deletions(-) delete mode 100644 extension/lite/project/ext/view/edit.lite.html.hook.php diff --git a/extension/lite/project/ext/view/edit.lite.html.hook.php b/extension/lite/project/ext/view/edit.lite.html.hook.php deleted file mode 100644 index 294fb97412..0000000000 --- a/extension/lite/project/ext/view/edit.lite.html.hook.php +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/module/doc/model.php b/module/doc/model.php index bc7774264c..3962d4ae98 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -1530,9 +1530,9 @@ class docModel extends model { $issueIdList = $this->dao->select('id')->from(TABLE_ISSUE)->where('project')->eq($objectID)->andWhere('deleted')->eq('0')->andWhere('project')->in($this->app->user->view->projects)->get(); $meetingIdList = $this->dao->select('id')->from(TABLE_MEETING)->where('project')->eq($objectID)->andWhere('deleted')->eq('0')->andWhere('project')->in($this->app->user->view->projects)->get(); - $designIdList = $this->dao->select('id')->from(TABLE_DESIGN)->where('project')->eq($objectID)->andWhere('deleted')->eq('0')->andWhere('project')->in($this->app->user->view->projects)->get(); } + $designIdList = $this->dao->select('id')->from(TABLE_DESIGN)->where('project')->eq($objectID)->andWhere('deleted')->eq('0')->andWhere('project')->in($this->app->user->view->projects)->get(); $executionIdList = $this->loadModel('execution')->getIdList($objectID); $taskPairs = $this->dao->select('id')->from(TABLE_TASK)->where('execution')->in($executionIdList)->andWhere('deleted')->eq('0')->andWhere('execution')->in($this->app->user->view->sprints)->fetchPairs('id'); if(!empty($taskPairs)) $taskIdList = implode(',', $taskPairs); diff --git a/module/execution/css/task.css b/module/execution/css/task.css index c821cffd61..203c981c71 100644 --- a/module/execution/css/task.css +++ b/module/execution/css/task.css @@ -6,3 +6,4 @@ th.c-deadline {text-align: center;} .c-estimate {text-align: right;} .c-consumed {text-align: right;} .c-left {text-align: right;} +.table-footer {z-index: 1;} diff --git a/module/project/model.php b/module/project/model.php index 3231360439..b273f9c124 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -120,7 +120,8 @@ class projectModel extends model if(defined('TUTORIAL')) return $projectID; if($projectID == 0 and $this->cookie->lastProject) $projectID = $this->cookie->lastProject; - if($projectID == 0 and $this->session->project == '') $projectID = key($projects); + if($projectID == 0 or $this->session->project == '') $projectID = key($projects); + $this->session->set('project', (int)$projectID, $this->app->tab); if(!isset($projects[$this->session->project])) From 8c81661d3757cb171cfdcfc163195d0f3eb37cd1 Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Sat, 2 Apr 2022 14:30:25 +0800 Subject: [PATCH 06/10] * Fix bug #21431. --- module/task/control.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/task/control.php b/module/task/control.php index 4b9de25297..0d55cde668 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -368,11 +368,11 @@ class task extends control if($story) { $moduleID = $story->module; - $stories = $this->story->getExecutionStoryPairs($executionID, 0, 'all', $moduleID, 'short'); + $stories = $this->story->getExecutionStoryPairs($executionID, 0, 'all', $moduleID, 'short', 'unclosed'); } else { - $stories = $this->story->getExecutionStoryPairs($executionID, 0, 'all', 0, 'short'); + $stories = $this->story->getExecutionStoryPairs($executionID, 0, 'all', 0, 'short', 'unclosed'); } $members = $this->loadModel('user')->getTeamMemberPairs($executionID, 'execution', 'nodeleted'); From 479c647cf58c3223fe6b1f3f987acd0e49cfc4aa Mon Sep 17 00:00:00 2001 From: tianshujie Date: Sat, 2 Apr 2022 15:01:16 +0800 Subject: [PATCH 07/10] * Fix code style issues. --- module/execution/js/kanban.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/module/execution/js/kanban.js b/module/execution/js/kanban.js index 193cb364d5..0526035b56 100644 --- a/module/execution/js/kanban.js +++ b/module/execution/js/kanban.js @@ -999,22 +999,22 @@ function deleteCard(objectType, objectID, regionID) setTimeout(function() { var objectLang = objectType + 'Lang'; - var result = confirm(window[objectLang].confirmDelete) ? true : false; + var result = confirm(window[objectLang].confirmDelete) ? true : false; if(!result) return false; if(!objectID) return false; var url = createLink('kanban', 'deleteObjectCard', 'objectType=' + objectType + '&objectID=' + objectID + '®ionID=' + regionID); return $.ajax( - { - method: 'post', - dataType: 'json', - url: url, - success: function(data) - { - updateRegion(regionID, data[regionID]); - } - }); + { + method: 'post', + dataType: 'json', + url: url, + success: function(data) + { + updateRegion(regionID, data[regionID]); + } + }); }, 200) } From ab074962ccdfb0f042c5c06f169e67b3b25e2d7c Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Sat, 2 Apr 2022 15:06:17 +0800 Subject: [PATCH 08/10] * Fix bug of project session. --- extension/lite/todo/ext/lang/zh-cn/lite.php | 1 + module/project/model.php | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/extension/lite/todo/ext/lang/zh-cn/lite.php b/extension/lite/todo/ext/lang/zh-cn/lite.php index c3f4110cde..636eb24d3c 100644 --- a/extension/lite/todo/ext/lang/zh-cn/lite.php +++ b/extension/lite/todo/ext/lang/zh-cn/lite.php @@ -1,6 +1,7 @@ todo->typeList['task'] = '任务'; +if($this->config->visions == ',lite,') unset($lang->todo->typeList['feedback']); unset($lang->todo->typeList['bug']); unset($lang->todo->typeList['testtask']); unset($lang->todo->typeList['review']); diff --git a/module/project/model.php b/module/project/model.php index b273f9c124..d3b3dc77f0 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -120,8 +120,9 @@ class projectModel extends model if(defined('TUTORIAL')) return $projectID; if($projectID == 0 and $this->cookie->lastProject) $projectID = $this->cookie->lastProject; - if($projectID == 0 or $this->session->project == '') $projectID = key($projects); - + if($projectID == 0 and $this->session->project == '') or !isset($projects[$projectID])) $projectID = key($projects); + if($projectID == 0) $projectID = key($projects); + $this->session->set('project', (int)$projectID, $this->app->tab); if(!isset($projects[$this->session->project])) From 5b2f81b688647f4edade98404bc143582b7083fd Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Sat, 2 Apr 2022 15:11:20 +0800 Subject: [PATCH 09/10] * Fix bug . --- module/project/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/project/model.php b/module/project/model.php index d3b3dc77f0..95eec580dd 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -118,9 +118,9 @@ class projectModel extends model public function saveState($projectID = 0, $projects = array()) { if(defined('TUTORIAL')) return $projectID; - + if($projectID == 0 and $this->cookie->lastProject) $projectID = $this->cookie->lastProject; - if($projectID == 0 and $this->session->project == '') or !isset($projects[$projectID])) $projectID = key($projects); + if(($projectID == 0 and (int)$this->session->project == 0) or !isset($projects[$projectID])) $projectID = key($projects); if($projectID == 0) $projectID = key($projects); $this->session->set('project', (int)$projectID, $this->app->tab); From b352dc9a867664fb1a02932523ea96987edc319a Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Sat, 2 Apr 2022 15:17:17 +0800 Subject: [PATCH 10/10] * Fix bug. --- db/zentao.sql | 2 -- 1 file changed, 2 deletions(-) diff --git a/db/zentao.sql b/db/zentao.sql index eff40072fb..711fa9e07a 100644 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -6002,8 +6002,6 @@ INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES (' INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'project', '', 'unitList', 'CNY,USD'); INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'project', '', 'defaultCurrency', 'CNY'); INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'story', '', 'reviewRules', 'allpass'); -INSERT INTO `zt_config` (`vision`,`owner`, `module`, `section`, `key`, `value`) VALUES ('lite','system', 'project', '', 'unitList', 'CNY,USD'); -INSERT INTO `zt_config` (`vision`,`owner`, `module`, `section`, `key`, `value`) VALUES ('lite','system', 'project', '', 'defaultCurrency', 'CNY'); -- DROP TABLE IF EXISTS `zt_im_chat`; CREATE TABLE IF NOT EXISTS `zt_im_chat` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,