From fabc81d71e5f45757b0c221e588503c5d5446252 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Wed, 14 Jul 2021 13:37:07 +0800 Subject: [PATCH 1/4] * Adjust the tab active when I am not admin and current project is closed. --- module/execution/view/ajaxgetdropmenu.html.php | 9 +++++++-- module/product/view/ajaxgetdropmenu.html.php | 4 +++- module/project/view/ajaxgetdropmenu.html.php | 9 +++++++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/module/execution/view/ajaxgetdropmenu.html.php b/module/execution/view/ajaxgetdropmenu.html.php index 759fb6a7a6..9a8f6f0999 100644 --- a/module/execution/view/ajaxgetdropmenu.html.php +++ b/module/execution/view/ajaxgetdropmenu.html.php @@ -73,7 +73,12 @@ foreach($executions as $projectID => $projectExecutions) $others++; } - else if($execution->status == 'done' or $execution->status == 'closed') $closedExecutionsHtml .= html::a(sprintf($link, $execution->id), $execution->name, '', "class='$selected' title='{$execution->name}' data-key='" . zget($executionsPinYin, $execution->name, '') . "' data-app='{$this->app->openApp}'"); + else if($execution->status == 'done' or $execution->status == 'closed') + { + $closedExecutionsHtml .= html::a(sprintf($link, $execution->id), $execution->name, '', "class='$selected' title='{$execution->name}' data-key='" . zget($executionsPinYin, $execution->name, '') . "' data-app='{$this->app->openApp}'"); + + if($selected == 'selected') $tabActive = 'closed'; + } /* If the execution is the last one in the project, print the closed label. */ if(!isset($projectExecutions[$index + 1])) @@ -90,8 +95,8 @@ foreach($executions as $projectID => $projectExecutions)
+ -