From b1325bae3ec199070479e2788509ee0c01b61d7b Mon Sep 17 00:00:00 2001 From: daitingting Date: Thu, 11 May 2017 16:12:17 +0800 Subject: [PATCH 1/5] * Add branch in batch edit. --- module/story/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/story/config.php b/module/story/config.php index 9c20ecbe3f..54ddb6f137 100644 --- a/module/story/config.php +++ b/module/story/config.php @@ -39,7 +39,7 @@ $config->story->list->exportFields = ' $config->story->list->customCreateFields = 'source,verify,pri,estimate,mailto,keywords'; $config->story->list->customBatchCreateFields = 'module,plan,spec,source,verify,pri,estimate,review,keywords'; -$config->story->list->customBatchEditFields = 'module,plan,estimate,pri,assignedTo,source,stage,closedBy,closedReason,keywords'; +$config->story->list->customBatchEditFields = 'branch,module,plan,estimate,pri,assignedTo,source,stage,closedBy,closedReason,keywords'; $config->story->custom = new stdclass(); $config->story->custom->createFields = $config->story->list->customCreateFields; From 75dc4abe0f5fb208f9646eac79bec445a695d730 Mon Sep 17 00:00:00 2001 From: daitingting Date: Thu, 11 May 2017 16:14:27 +0800 Subject: [PATCH 2/5] * Add module in setMenu function. --- module/product/model.php | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/module/product/model.php b/module/product/model.php index ccb722d645..01885baab1 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -22,7 +22,7 @@ class productModel extends model * @access public * @return void */ - public function setMenu($products, $productID, $branch = 0, $extra = '') + public function setMenu($products, $productID, $branch = 0, $module = 0, $moduleType = '', $extra = '') { /* Has access privilege?. */ if($products and !isset($products[$productID]) and !$this->checkPriv($this->getById($productID))) @@ -44,7 +44,7 @@ class productModel extends model } if($currentMethod == 'report') $currentMethod = 'browse'; - $selectHtml = $this->select($products, $productID, $currentModule, $currentMethod, $extra, $branch); + $selectHtml = $this->select($products, $productID, $currentModule, $currentMethod, $extra, $branch, $module, $moduleType); foreach($this->lang->product->menu as $key => $menu) { $replace = $key == 'list' ? $selectHtml : $productID; @@ -63,7 +63,7 @@ class productModel extends model * @access public * @return string */ - public function select($products, $productID, $currentModule, $currentMethod, $extra = '', $branch = 0) + public function select($products, $productID, $currentModule, $currentMethod, $extra = '', $branch = 0, $module = 0, $moduleType = '') { if(!$productID) { @@ -94,6 +94,22 @@ class productModel extends model $output .= "{$branchName} "; } } + + if($this->config->global->flow == 'onlyTest' and $moduleType) + { + $modules = $this->loadModel('tree')->getModulePairs($productID, $moduleType); + $moduleName = ($module && isset($modules[$module])) ? $modules[$module] : $this->lang->tree->all; + if(!$isMobile) + { + $output .= '
  • '; + $output .= "{$moduleName}
    "; + } + else + { + $output .= "{$moduleName} "; + } + } + return $output; } From 0d819537d0b454574c05dcf5ec666f54c3507cae Mon Sep 17 00:00:00 2001 From: daitingting Date: Thu, 11 May 2017 16:19:20 +0800 Subject: [PATCH 3/5] * Adjust codes. --- module/common/lang/zh-cn.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index 821048faaa..2701eb0a46 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -574,6 +574,7 @@ if(isset($config->global->flow) and $config->global->flow == 'onlyStory') /* Adjust sub menu of product module. */ unset($lang->product->menu->project); + unset($lang->product->menu->doc); /* Rename product module. */ $lang->menu->product = '产品|product|index'; @@ -609,6 +610,7 @@ if(isset($config->global->flow) and $config->global->flow == 'onlyTask') unset($lang->project->menu->bug); unset($lang->project->menu->testtask); unset($lang->project->menu->product); + unset($lang->project->menu->doc); /* Remove sub menu of product module. */ unset($lang->product->menu); From c5e692714a3f954b1993fc8a38aff58d6173aa0f Mon Sep 17 00:00:00 2001 From: daitingting Date: Thu, 11 May 2017 16:27:16 +0800 Subject: [PATCH 4/5] * Expand the selection range for sort. --- module/doc/js/common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/doc/js/common.js b/module/doc/js/common.js index a6b8a1f680..059ad40033 100644 --- a/module/doc/js/common.js +++ b/module/doc/js/common.js @@ -228,7 +228,7 @@ $(document).ready(function() $('.libs-group').sortable( { - trigger: '.icon-move', + trigger: '.lib', selector: '.lib', finish: function() { From ff5b0639ede8120d5bf7159da94995575d4c0beb Mon Sep 17 00:00:00 2001 From: daitingting Date: Thu, 11 May 2017 16:32:35 +0800 Subject: [PATCH 5/5] * Adjust copywriter. --- module/product/lang/en.php | 2 +- module/product/lang/zh-cn.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/product/lang/en.php b/module/product/lang/en.php index fb2d2633c9..83f77ffa9a 100644 --- a/module/product/lang/en.php +++ b/module/product/lang/en.php @@ -83,7 +83,7 @@ $lang->product->typeList['platform'] = 'Multi Platform'; $lang->product->typeTips = array(); $lang->product->typeTips['branch'] = '(Generally used to divide the custom content of different users)'; -$lang->product->typeTips['platform'] = '(Generally used to divide ios, Andrews, pc side, server and so on)'; +$lang->product->typeTips['platform'] = '(Generally used to divide ios, Andrews, pc and so on)'; $lang->product->branchName['normal'] = ''; $lang->product->branchName['branch'] = 'Branch'; diff --git a/module/product/lang/zh-cn.php b/module/product/lang/zh-cn.php index c2192ea832..d0be9f125e 100644 --- a/module/product/lang/zh-cn.php +++ b/module/product/lang/zh-cn.php @@ -82,8 +82,8 @@ $lang->product->typeList['branch'] = '多分支'; $lang->product->typeList['platform'] = '多平台'; $lang->product->typeTips = array(); -$lang->product->typeTips['branch'] = '(一般用于划分不同用户的定制内容)'; -$lang->product->typeTips['platform'] = '(一般用于划分ios、安卓、pc端、服务器端等)'; +$lang->product->typeTips['branch'] = '(适用于客户定制场景)'; +$lang->product->typeTips['platform'] = '(适用于跨平台应用开发,比如ios、安卓、pc端等)'; $lang->product->branchName['normal'] = ''; $lang->product->branchName['branch'] = '分支';