From c6b7f25fa3b07273338fd84f15e41fe9d0b46135 Mon Sep 17 00:00:00 2001 From: zenggang Date: Sat, 18 Sep 2021 14:08:31 +0800 Subject: [PATCH 1/3] * Adjust code style. --- module/bug/js/browse.js | 5 +---- module/caselib/js/browse.js | 5 +---- module/execution/js/task.js | 5 +---- module/product/js/browse.js | 5 +---- module/testcase/js/browse.js | 5 +---- 5 files changed, 5 insertions(+), 20 deletions(-) diff --git a/module/bug/js/browse.js b/module/bug/js/browse.js index 20a3bab303..6d469700d9 100644 --- a/module/bug/js/browse.js +++ b/module/bug/js/browse.js @@ -7,8 +7,5 @@ $(function() { $("#sidebarHeader").toggle("fast"); }); - if($("main").is(".hide-sidebar")) - { - $("#sidebarHeader").hide(); - } + if($("main").is(".hide-sidebar")) $("#sidebarHeader").hide(); }); diff --git a/module/caselib/js/browse.js b/module/caselib/js/browse.js index 43514db04c..001e3ddc52 100644 --- a/module/caselib/js/browse.js +++ b/module/caselib/js/browse.js @@ -28,8 +28,5 @@ $(function() { $("#sidebarHeader").toggle("fast"); }); - if($("main").is(".hide-sidebar")) - { - $("#sidebarHeader").hide(); - } + if($("main").is(".hide-sidebar")) $("#sidebarHeader").hide(); }); \ No newline at end of file diff --git a/module/execution/js/task.js b/module/execution/js/task.js index fe217096b5..d96b1ac4cc 100644 --- a/module/execution/js/task.js +++ b/module/execution/js/task.js @@ -20,10 +20,7 @@ $(function() { $("#sidebarHeader").toggle("fast"); }); - if($("main").is(".hide-sidebar")) - { - $("#sidebarHeader").hide(); - } + if($("main").is(".hide-sidebar")) $("#sidebarHeader").hide(); }); $('#module' + moduleID).closest('li').addClass('active'); diff --git a/module/product/js/browse.js b/module/product/js/browse.js index ffc9eec594..db8128724a 100644 --- a/module/product/js/browse.js +++ b/module/product/js/browse.js @@ -110,10 +110,7 @@ $(function() { $("#sidebarHeader").toggle("fast"); }); - if($("main").is(".hide-sidebar")) - { - $("#sidebarHeader").hide(); - } + if($("main").is(".hide-sidebar")) $("#sidebarHeader").hide(); }); /** diff --git a/module/testcase/js/browse.js b/module/testcase/js/browse.js index c89b07f076..6ef01b7fc5 100644 --- a/module/testcase/js/browse.js +++ b/module/testcase/js/browse.js @@ -20,8 +20,5 @@ $(function() { $("#sidebarHeader").toggle("fast"); }); - if($("main").is(".hide-sidebar")) - { - $("#sidebarHeader").hide(); - } + if($("main").is(".hide-sidebar")) $("#sidebarHeader").hide(); }); From e62809eabd9738cbd8e9db7fd2a506364ced09bb Mon Sep 17 00:00:00 2001 From: zenggang Date: Sat, 18 Sep 2021 15:38:36 +0800 Subject: [PATCH 2/3] * Fix bug#14360 --- module/task/control.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/module/task/control.php b/module/task/control.php index 4a027260f4..beeaf7b58f 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -423,6 +423,18 @@ class task extends control $tasks = $this->task->getParentTaskPairs($this->view->execution->id, $this->view->task->parent); if(isset($tasks[$taskID])) unset($tasks[$taskID]); + if($this->config->systemMode == 'classic') $executionsPair = $this->execution->getPairs(); + else + { + $executionsPair = array(); + $executions = $this->execution->getByProject(0, 'all', 0); + $projects = $this->project->getPairsByProgram(0, 'noclosed'); + foreach($executions as $executionId => $execution) + { + $executionsPair[$executionId] = (isset($projects[$execution->project]) ? $projects[$execution->project] . ' / ' : '') . $execution->name; + } + } + if(!isset($this->view->members[$this->view->task->assignedTo])) $this->view->members[$this->view->task->assignedTo] = $this->view->task->assignedTo; if(isset($this->view->members['closed']) or $this->view->task->status == 'closed') $this->view->members['closed'] = 'Closed'; @@ -434,7 +446,7 @@ class task extends control $this->view->users = $this->loadModel('user')->getPairs('nodeleted', "{$this->view->task->openedBy},{$this->view->task->canceledBy},{$this->view->task->closedBy}"); $this->view->showAllModule = isset($this->config->execution->task->allModule) ? $this->config->execution->task->allModule : ''; $this->view->modules = $this->tree->getTaskOptionMenu($this->view->task->execution, 0, 0, $this->view->showAllModule ? 'allModule' : ''); - $this->view->executions = $this->config->systemMode == 'classic' ? $this->execution->getPairs() : $this->execution->getByProject(0, 'all', 0, true); + $this->view->executions = $executionsPair; $this->display(); } From 3966f808a32567085c4964242e12090c5f35dc37 Mon Sep 17 00:00:00 2001 From: liyuchun Date: Sat, 18 Sep 2021 15:40:17 +0800 Subject: [PATCH 3/3] * Fix bug #15242. --- module/file/view/buildform.html.php | 46 +++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/module/file/view/buildform.html.php b/module/file/view/buildform.html.php index ee0eebfd20..528e27f1c3 100644 --- a/module/file/view/buildform.html.php +++ b/module/file/view/buildform.html.php @@ -4,6 +4,7 @@ .file-input-list .input-group-btn{float:left} config->file->dangers . ',');?> +
@@ -32,11 +33,38 @@