From 7dae38a2a3564fa25c872ecaea32b22e89c7cd1f Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Wed, 7 Apr 2021 14:05:37 +0800 Subject: [PATCH] * Finish task #37295. --- module/my/view/requirement.html.php | 2 +- module/my/view/story.html.php | 2 +- module/story/control.php | 9 ++++++--- module/story/js/common.js | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/module/my/view/requirement.html.php b/module/my/view/requirement.html.php index 7383b26bd7..dfd2e3eb2d 100644 --- a/module/my/view/requirement.html.php +++ b/module/my/view/requirement.html.php @@ -156,7 +156,7 @@ createLink('story', 'batchEdit', 'productID=0&executionID=0&branch=0&storyType=requirement'); + $actionLink = $this->createLink('story', 'batchEdit', "productID=0&executionID=0&branch=0&storyType=requirement&from={$app->rawMethod}"); $misc = "data-form-action='$actionLink'"; echo html::commonButton($lang->edit, $misc); } diff --git a/module/my/view/story.html.php b/module/my/view/story.html.php index 747cd8680d..fd0be6d3c9 100644 --- a/module/my/view/story.html.php +++ b/module/my/view/story.html.php @@ -159,7 +159,7 @@ createLink('story', 'batchEdit', 'productID=0&executionID=0&branch=0&storyType=story'); + $actionLink = $this->createLink('story', 'batchEdit', "productID=0&executionID=0&branch=0&storyType=story&from={$app->rawMethod}"); $misc = "data-form-action='$actionLink'"; echo html::commonButton($lang->edit, $misc); } diff --git a/module/story/control.php b/module/story/control.php index fd040c19e1..8503465fe6 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -618,10 +618,13 @@ class story extends control * * @param int $productID * @param int $executionID + * @param int $branch + * @param string $storyType + * @param string $from * @access public * @return void */ - public function batchEdit($productID = 0, $executionID = 0, $branch = 0, $storyType = 'story') + public function batchEdit($productID = 0, $executionID = 0, $branch = 0, $storyType = 'story', $from = '') { $this->lang->product->switcherMenu = $this->product->getSwitcher($productID); $this->story->replaceURLang($storyType); @@ -645,8 +648,8 @@ class story extends control else if($this->app->openApp == 'my') { $this->loadModel('my')->setMenu(); - $this->lang->my->menu->work['subModule'] = 'story'; - $this->lang->my->menu->contribute['subModule'] = 'story'; + if($from == 'work') $this->lang->my->menu->work['subModule'] = 'story'; + if($from == 'contribute') $this->lang->my->menu->contribute['subModule'] = 'story'; } /* Load model. */ diff --git a/module/story/js/common.js b/module/story/js/common.js index d10373ef4e..8cc11344f3 100644 --- a/module/story/js/common.js +++ b/module/story/js/common.js @@ -7,7 +7,7 @@ $(function() if(typeof(execution) != 'undefined') rawModule = 'projectstory'; if(['project', 'projectstory'].indexOf(rawModule) === -1 && app != 'qa') { - $('#navbar .nav li').removeClass('active'); + if(app != 'my') $('#navbar .nav li').removeClass('active'); $("#navbar .nav li[data-id=" + storyType + ']').addClass('active'); $('#subNavbar li[data-id="' + storyType + '"]').addClass('active'); }