From 166b7e86d9b0c1c9efd108aeb721f4b3fc84ede7 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Fri, 10 Nov 2023 14:40:23 +0800 Subject: [PATCH] * Fix bug of active menu in story-batchtotask. --- module/common/lang/menu.php | 6 +++--- module/story/js/common.ui.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/module/common/lang/menu.php b/module/common/lang/menu.php index 183981b798..bab34b959c 100644 --- a/module/common/lang/menu.php +++ b/module/common/lang/menu.php @@ -176,7 +176,7 @@ $lang->product->homeMenu->kanban = array('link' => "{$lang->product->kanban}|pro $lang->product->menu = new stdclass(); $lang->product->menu->dashboard = array('link' => "{$lang->dashboard}|product|dashboard|productID=%s"); -$lang->product->menu->story = array('link' => "$lang->SRCommon|product|browse|productID=%s", 'alias' => 'batchedit', 'subModule' => 'story', 'exclude' => (isset($_GET['storyType']) ? ($_GET['storyType'] == 'requirement' ? 'browse,story-report,story-create,story-batchcreate' : '') : '')); +$lang->product->menu->story = array('link' => "$lang->SRCommon|product|browse|productID=%s", 'alias' => 'batchedit', 'subModule' => 'story', 'exclude' => (isset($_GET['storyType']) ? ($_GET['storyType'] == 'requirement' ? 'browse,story-report,story-create,story-batchcreate' : '') : '') . ',batchtotask'); $lang->product->menu->plan = array('link' => "{$lang->productplan->shortCommon}|productplan|browse|productID=%s", 'subModule' => 'productplan,bug'); $lang->product->menu->project = array('link' => "{$lang->projectCommon}|product|project|status=all&productID=%s"); $lang->product->menu->release = array('link' => "{$lang->release->common}|release|browse|productID=%s", 'subModule' => 'release'); @@ -349,8 +349,8 @@ $lang->execution->menu->view = array('link' => "$lang->view|execution|grouptas if($config->edition != 'open') $lang->execution->menu->view = array('link' => "$lang->view|execution|gantt|executionID=%s", 'alias' => 'grouptask,tree,taskeffort,gantt,calendar,relation,maintainrelation'); -$lang->execution->menu->storyGroup = array('link' => "{$lang->common->story}|execution|story|executionID=%s",'class' => 'dropdown dropdown-hover', 'subModule' => 'story', 'alias' => 'batchcreate,storykanban'); -$lang->execution->menu->story = array('link' => "$lang->SRCommon|execution|story|executionID=%s", 'subModule' => 'story', 'alias' => 'storykanban,linkstory'); +$lang->execution->menu->storyGroup = array('link' => "{$lang->common->story}|execution|story|executionID=%s",'class' => 'dropdown dropdown-hover', 'subModule' => 'story', 'alias' => 'batchcreate,storykanban,batchtotask'); +$lang->execution->menu->story = array('link' => "$lang->SRCommon|execution|story|executionID=%s", 'subModule' => 'story', 'alias' => 'storykanban,linkstory,batchtotask'); $lang->execution->menu->qa = array('link' => "{$lang->qa->common}|execution|bug|executionID=%s", 'subModule' => 'bug,testcase,testtask,testreport', 'alias' => 'qa,bug,testcase,testtask,testreport'); $lang->execution->menu->devops = array('link' => "{$lang->devops->common}|repo|browse|repoID=0&branchID=&objectID=%s", 'subModule' => 'repo,mr'); $lang->execution->menu->doc = array('link' => "{$lang->doc->common}|execution|doc|objectID=%s", 'subModule' => 'doc'); diff --git a/module/story/js/common.ui.js b/module/story/js/common.ui.js index b1028ddb77..8b96b73e64 100644 --- a/module/story/js/common.ui.js +++ b/module/story/js/common.ui.js @@ -4,7 +4,7 @@ $(function() if(typeof(rawModule) == 'undefined') rawModule = 'product'; if(typeof(app) == 'undefined') app = ''; if(typeof(execution) != 'undefined') rawModule = 'projectstory'; - if(['project', 'projectstory'].indexOf(rawModule) === -1 && app != 'qa') + if(['project', 'projectstory'].indexOf(rawModule) === -1 && app != 'qa' && rawMethod != 'batchtotask') { if(app != 'my') $('#navbar .nav li a').removeClass('active'); $("#navbar .nav li a[data-id=" + storyType + ']').addClass('active');