- createLink('story', 'create', "product=$productID&branch=$branch&moduleID=$moduleID&storyID=0&projectID=$projectID"), " {$lang->story->create}", '', "class='btn $buttonType' data-app='$openApp'");?>
+
+ createLink('story', 'create', "product=$productID&branch=$branch&moduleID=$moduleID&storyID=0&projectID=0$extraParam"), " {$lang->story->create}", '', "class='btn $buttonType' data-app='$openApp'");?>
-
From 9b25cc961efdd0a27f24c850a88fccd71f2d1de7 Mon Sep 17 00:00:00 2001
From: Yagami <976204163@qq.com>
Date: Thu, 25 Mar 2021 14:40:38 +0800
Subject: [PATCH 08/34] * Fix detail for group.
---
module/group/lang/resource.php | 16 +++++++---------
module/product/control.php | 12 ------------
module/program/control.php | 15 ---------------
3 files changed, 7 insertions(+), 36 deletions(-)
diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php
index 0d7d809ecf..9974ed4305 100644
--- a/module/group/lang/resource.php
+++ b/module/group/lang/resource.php
@@ -144,8 +144,6 @@ if($config->systemMode == 'new')
{
/* Program. */
$lang->resource->program = new stdclass();
- $lang->resource->program->createGuide = 'createGuide';
- //$lang->resource->program->index = 'index';
$lang->resource->program->browse = 'browse';
$lang->resource->program->product = 'product';
$lang->resource->program->create = 'create';
@@ -162,8 +160,6 @@ if($config->systemMode == 'new')
$lang->resource->program->batchUnlinkStakeholders = 'batchUnlinkStakeholders';
$lang->resource->program->export = 'export';
- $lang->program->methodOrder[0] = 'createGuide';
- //$lang->program->methodOrder[5] = 'index';
$lang->program->methodOrder[10] = 'browse';
$lang->program->methodOrder[15] = 'product';
$lang->program->methodOrder[20] = 'create';
@@ -213,6 +209,7 @@ if($config->systemMode == 'new')
$lang->resource->project->bug = 'bug';
$lang->resource->project->testcase = 'testcase';
$lang->resource->project->testtask = 'testtask';
+ $lang->resource->project->execution = 'execution';
$lang->project->methodOrder[0] = 'index';
$lang->project->methodOrder[5] = 'browse';
@@ -246,6 +243,7 @@ if($config->systemMode == 'new')
$lang->project->methodOrder[145] = 'bug';
$lang->project->methodOrder[150] = 'testcase';
$lang->project->methodOrder[155] = 'testtask';
+ $lang->project->methodOrder[160] = 'execution';
/* Personnel . */
$lang->resource->personnel = new stdclass();
@@ -517,7 +515,7 @@ $lang->release->methodOrder[70] = 'changeStatus';
/* Execution. */
$lang->resource->execution = new stdclass();
-//$lang->resource->execution->index = 'index';
+$lang->resource->execution->index = 'index';
$lang->resource->execution->view = 'view';
$lang->resource->execution->browse = 'browse';
$lang->resource->execution->create = 'createExec';
@@ -561,10 +559,10 @@ $lang->resource->execution->printKanban = 'printKanbanAction';
$lang->resource->execution->tree = 'treeAction';
$lang->resource->execution->treeTask = 'treeOnlyTask';
$lang->resource->execution->treeStory = 'treeOnlyStory';
-//$lang->resource->execution->all = 'allExecutionAB';
+$lang->resource->execution->all = 'allExecutionAB';
$lang->resource->execution->kanbanHideCols = 'kanbanHideCols';
$lang->resource->execution->kanbanColsColor = 'kanbanColsColor';
-//$lang->resource->execution->export = 'exportAction';
+$lang->resource->execution->export = 'exportAction';
$lang->resource->execution->storyKanban = 'storyKanban';
$lang->resource->execution->storySort = 'storySort';
$lang->resource->execution->whitelist = 'whitelist';
@@ -618,8 +616,8 @@ $lang->execution->methodOrder[205] = 'kanbanColsColor';
$lang->execution->methodOrder[210] = 'tree';
$lang->execution->methodOrder[215] = 'treeTask';
$lang->execution->methodOrder[220] = 'treeStory';
-//$lang->execution->methodOrder[225] = 'all';
-//$lang->execution->methodOrder[230] = 'export';
+$lang->execution->methodOrder[225] = 'all';
+$lang->execution->methodOrder[230] = 'export';
$lang->execution->methodOrder[235] = 'storyKanban';
$lang->execution->methodOrder[240] = 'storySort';
$lang->execution->methodOrder[245] = 'whitelist';
diff --git a/module/product/control.php b/module/product/control.php
index a5b85ba588..1bf88f2bd9 100644
--- a/module/product/control.php
+++ b/module/product/control.php
@@ -1172,18 +1172,6 @@ class product extends control
$this->display();
}
- /**
- * Doc for compatible.
- *
- * @param int $productID
- * @access public
- * @return void
- */
- public function doc($productID)
- {
- $this->locate($this->createLink('doc', 'objectLibs', "type=product&objectID=$productID&from=product"));
- }
-
/**
* Build of product.
*
diff --git a/module/program/control.php b/module/program/control.php
index 712d2bce21..1640e0ecd6 100644
--- a/module/program/control.php
+++ b/module/program/control.php
@@ -18,21 +18,6 @@ class program extends control
$this->loadModel('execution');
}
- /**
- * Program create guide.
- *
- * @param int $programID
- * @param string $from
- * @access public
- * @return void
- */
- public function createGuide($programID = 0, $from = 'PRJ')
- {
- $this->view->from = $from;
- $this->view->programID = $programID;
- $this->display();
- }
-
/**
* Program list.
*
From 4324798d20f92b8b4a7a67ae4220c76674609f80 Mon Sep 17 00:00:00 2001
From: Catouse
Date: Thu, 25 Mar 2021 14:50:47 +0800 Subject: [PATCH 09/34] * task #36881, move menu items to submenu when no space to show them. --- module/index/css/index.css | 7 ++++ module/index/js/index.js | 57 ++++++++++++++++++++++++++++++++ module/index/view/index.html.php | 9 ++++- 3 files changed, 72 insertions(+), 1 deletion(-) diff --git a/module/index/css/index.css b/module/index/css/index.css index 0bf9ee737f..2a0ac8830a 100644 --- a/module/index/css/index.css +++ b/module/index/css/index.css @@ -23,6 +23,13 @@ body.menu-hide {padding-left: 0;} .menu-hide #menu .nav > li > a {padding: 6px 4px; text-align: center;} .menu-hide #menu .nav > li > a > .text {display: none;} .menu-hide #menu .nav > li.has-avatar > a {padding: 2px 0;} +#menuMoreNav {display: none;} +.show-more-nav #menuMoreNav {display: block;} +#menuMoreList {left: 100%; margin-left: -2px; top: -5px; background-color: #3c495c;} +#menuMoreList > li {padding: 2px 6px;} +#menuMoreList > li > a {color: #fff; padding: 4px 6px 4px 12px; border-radius: 2px; margin: 0;} +#menuMoreList > li.divider {opacity: .2; margin: 6px; padding: 0;} +#menu .dropdown-hover:hover > a, #menu .dropdown.open > a {background-color: rgba(0,0,0,.3);} #moreExecution {display: none; max-height: 520px; min-height: 520px; max-width: 360px; min-width: 150px; position: fixed; bottom: 40px; z-index: 999; background: white; padding: 20px 10px; border: 1px solid #efefef;} .more-execution-show {left: 96px;} diff --git a/module/index/js/index.js b/module/index/js/index.js index 4c887d0570..4d27677838 100644 --- a/module/index/js/index.js +++ b/module/index/js/index.js @@ -416,6 +416,52 @@ appsMap: appsMap }; + /** + * Refresh more menu in #menuNav + * @return {void} + */ + function refreshMoreMenu() + { + var $mainNav = $('#menuMainNav'); + var $list = $('#menuMoreList'); + var $menuNav = $('#menuNav'); + var $menuItems = $mainNav.children('li'); + var maxHeight = $menuNav.height(); + var showMoreMenu = false; + var currentHeight = 40; + var moreMenuHeight = 13; + + $menuItems.each(function() + { + var $item = $(this); + var isDivider = $item.hasClass('divider'); + var height = isDivider ? 17 : 40; + currentHeight += height; + if(currentHeight > maxHeight) + { + $item.addClass('hidden'); + if(!showMoreMenu) + { + showMoreMenu = true; + var $prevItem = $item.prev(); + if($prevItem.hasClass('divider')) $prevItem.addClass('hidden'); + + $list.empty(); + if(isDivider) return; + } + moreMenuHeight += isDivider ? 13 : 31; + $list.append($item.clone().removeClass('hidden')); + } + else + { + $item.removeClass('hidden'); + } + }); + console.log('moreMenuHeight', moreMenuHeight); + $list.css('top', moreMenuHeight > 111 ? 111 - moreMenuHeight : ''); + $menuNav.toggleClass('show-more-nav', showMoreMenu); + } + /* Init after current page load */ $(function() { @@ -468,6 +514,13 @@ options.y = bounding.top; } } + var $dropdown = $btn.closest('.dropdown'); + if($dropdown.length) + { + $dropdown.addClass('open'); + options.onHide = function(){$dropdown.removeClass('open');} + } + $.zui.ContextMenu.show(items, options); event.preventDefault(); }); @@ -485,6 +538,10 @@ } if(defaultOpenUrl) openApp(defaultOpenUrl); else openApp(defaultApp); + + /* Refresh more menu on window resize */ + $(window).on('resize', refreshMoreMenu); + refreshMoreMenu(); }); }()); diff --git a/module/index/view/index.html.php b/module/index/view/index.html.php index e803b801b5..a34b2ed193 100644 --- a/module/index/view/index.html.php +++ b/module/index/view/index.html.php @@ -36,6 +36,13 @@ js::set('defaultOpen', $open); @@ -79,7 +86,7 @@ js::set('defaultOpen', $open);- +index->upgradeVersion;?>
From 8dcc7bcfc21daedd7616684ce7005d3976a37223 Mon Sep 17 00:00:00 2001 From: CatouseDate: Thu, 25 Mar 2021 14:52:09 +0800 Subject: [PATCH 10/34] * task #36881, add hint to more button. --- module/index/view/index.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/index/view/index.html.php b/module/index/view/index.html.php index a34b2ed193..37a566236f 100644 --- a/module/index/view/index.html.php +++ b/module/index/view/index.html.php @@ -39,7 +39,7 @@ js::set('defaultOpen', $open); From 92098c87170c139dbeecbce5c906beddc56500c2 Mon Sep 17 00:00:00 2001 From: hufangzhou <746775970@qq.com> Date: Thu, 25 Mar 2021 14:55:50 +0800 Subject: [PATCH 11/34] * Fix a bug. --- module/testcase/view/caseheader.html.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/module/testcase/view/caseheader.html.php b/module/testcase/view/caseheader.html.php index 1d41a99879..8276493942 100644 --- a/module/testcase/view/caseheader.html.php +++ b/module/testcase/view/caseheader.html.php @@ -106,6 +106,7 @@ ?> ++ ++ From 78940a54985ffdc830172616a2a74e48b7535e42 Mon Sep 17 00:00:00 2001 From: leiyong <1549684884@qq.com> Date: Thu, 25 Mar 2021 14:58:11 +0800 Subject: [PATCH 12/34] * Fix bug. --- module/common/lang/menu.php | 4 ++-- module/common/model.php | 11 ++++++----- module/execution/control.php | 6 ++---- module/execution/view/bug.html.php | 5 +++-- module/product/control.php | 6 +++++- module/project/view/bug.html.php | 5 +++-- module/projectstory/control.php | 2 -- 7 files changed, 21 insertions(+), 18 deletions(-) diff --git a/module/common/lang/menu.php b/module/common/lang/menu.php index e6fe0ff820..df1c0b0ecb 100644 --- a/module/common/lang/menu.php +++ b/module/common/lang/menu.php @@ -343,8 +343,8 @@ $lang->qa->menu->testtask['subMenu'] = new stdclass(); $lang->qa->menu->testtask['subMenu']->testtask = array('link' => "{$lang->testtask->common}|testtask|browse|productID=%s", 'subModule' => 'testtask', 'alias' => 'linkcase,cases,start,close,batchrun,groupcase,report,importunitresult'); $lang->qa->menu->testtask['subMenu']->report = array('link' => "{$lang->testreport->common}|testreport|browse|productID=%s", 'subModule' => 'testreport'); -$lang->qa->menu->automation['subMenu'] = new stdclass(); -$lang->qa->menu->automation['subMenu']->browse = array('link' => "{$lang->intro}|automation|browse|productID=%s", 'alias' => ''); +// $lang->qa->menu->automation['subMenu'] = new stdclass(); +// $lang->qa->menu->automation['subMenu']->browse = array('link' => "{$lang->intro}|automation|browse|productID=%s", 'alias' => ''); // $lang->qa->menu->automation['subMenu']->framework = array('link' => '框架|automation|framework|productID=%s', 'alias' => ''); // $lang->qa->menu->automation['subMenu']->data = array('link' => '数据|automation|date|productID=%s', 'alias' => ''); // $lang->qa->menu->automation['subMenu']->interface = array('link' => '接口|automation|interface|productID=%s', 'alias' => ''); diff --git a/module/common/model.php b/module/common/model.php index b83bb4581b..a66c61bdf3 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -1490,7 +1490,8 @@ EOD; $id = $object->$key; $objectList[$id] = $object; } - $this->session->set($objectIdListKey, array('sql' => $sql, 'objectList' => $objectList)); + + $this->session->set($objectIdListKey, array('sql' => $sql, 'objectList' => $objectList), $this->app->openApp); $existsObjectList = $this->session->$objectIdListKey; } @@ -1549,8 +1550,8 @@ EOD; $queryCondition = trim($queryCondition); if(empty($queryCondition)) $queryCondition = "1=1"; - $this->session->set($objectType . 'QueryCondition', $queryCondition); - $this->session->set($objectType . 'OnlyCondition', $onlyCondition); + $this->session->set($objectType . 'QueryCondition', $queryCondition, $this->app->openApp); + $this->session->set($objectType . 'OnlyCondition', $onlyCondition, $this->app->openApp); /* Set the query condition session. */ $orderBy = explode(' ORDER BY ', $sql); @@ -1561,8 +1562,8 @@ EOD; $orderBy = $orderBy[0]; if($onlyCondition) $orderBy = str_replace('t1.', '', $orderBy); } - $this->session->set($objectType . 'OrderBy', $orderBy); - $this->session->set($objectType . 'BrowseList', array()); + $this->session->set($objectType . 'OrderBy', $orderBy, $this->app->openApp); + $this->session->set($objectType . 'BrowseList', array(), $this->app->openApp); } /** diff --git a/module/execution/control.php b/module/execution/control.php index 3a06f25f7c..361d04de31 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -186,9 +186,7 @@ class execution extends control /* Save to session. */ $uri = $this->app->getURI(true); - $this->app->session->set('taskList', $uri, 'execution'); - $this->app->session->set('storyList', $uri, 'product'); - $this->app->session->set('executionList', $uri, 'execution'); + $this->app->session->set('taskList', $uri, 'execution'); /* Process the order by field. */ if(!$orderBy) $orderBy = $this->cookie->executionTaskOrder ? $this->cookie->executionTaskOrder : 'status,id_desc'; @@ -720,7 +718,7 @@ class execution extends control } /* Save session. */ - $this->app->session->set('storyList', $this->app->getURI(true), 'product'); + $this->app->session->set('storyList', $this->app->getURI(true), 'execution'); /* Process the order by field. */ if(!$orderBy) $orderBy = $this->cookie->executionStoryOrder ? $this->cookie->executionStoryOrder : 'pri'; diff --git a/module/execution/view/bug.html.php b/module/execution/view/bug.html.php index e1970283e3..237622c1bb 100644 --- a/module/execution/view/bug.html.php +++ b/module/execution/view/bug.html.php @@ -77,11 +77,12 @@ id"); ?>-
@@ -142,6 +145,7 @@
?>
- id => ''), '', $arrtibute) . html::a(helper::createLink('bug', 'view', "bugID=$bug->id"), sprintf('%03d', $bug->id));?> + id => ''), '', $arrtibute) . html::a($viewLink, sprintf('%03d', $bug->id), '', "data-app={$this->app->openApp}");?> id);?> @@ -94,7 +95,7 @@ pri?>' title='bug->priList, $bug->pri, $bug->pri)?>'>bug->priList, $bug->pri, $bug->pri)?> -createLink('bug', 'view', "bugID=$bug->id"), $bug->title, null, "style='color: $bug->color'");?> +title, null, "style='color: $bug->color' data-app={$this->app->openApp}");?> openedBy, $bug->openedBy);?> bug->printAssignedHtml($bug, $users);?> resolvedBy, $bug->resolvedBy);?> diff --git a/module/product/control.php b/module/product/control.php index 1bf88f2bd9..7d4b90017a 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -122,7 +122,11 @@ class product extends control $productID = $this->app->openApp != 'project' ? $this->product->saveState($productID, $this->products) : $productID; if($this->app->openApp == 'product') $this->product->setMenu($productID, $branch); - if($this->app->openApp == 'project') $this->loadModel('project')->setMenu($projectID); + if($this->app->openApp == 'project') + { + $this->session->set('storyList', $this->app->getURI(true), 'project'); + $this->loadModel('project')->setMenu($projectID); + } /* Lower browse type. */ $browseType = strtolower($browseType); diff --git a/module/project/view/bug.html.php b/module/project/view/bug.html.php index f8ce2915f3..1402c0ba92 100644 --- a/module/project/view/bug.html.php +++ b/module/project/view/bug.html.php @@ -77,11 +77,12 @@ id"); ?>- id => ''), '', $arrtibute) . html::a(helper::createLink('bug', 'view', "bugID=$bug->id"), sprintf('%03d', $bug->id));?> + id => ''), '', $arrtibute) . html::a($viewLink, sprintf('%03d', $bug->id), '', "data-app={$this->app->openApp}");?> id);?> @@ -94,7 +95,7 @@ pri?>' title='bug->priList, $bug->pri, $bug->pri)?>'>bug->priList, $bug->pri, $bug->pri)?> -createLink('bug', 'view', "bugID=$bug->id"), $bug->title, null, "style='color: $bug->color'");?> +title, null, "style='color: $bug->color' data-app={$this->app->openApp}");?> openedBy, $bug->openedBy);?> bug->printAssignedHtml($bug, $users);?> resolvedBy, $bug->resolvedBy);?> diff --git a/module/projectstory/control.php b/module/projectstory/control.php index 802b862b41..d075e37228 100644 --- a/module/projectstory/control.php +++ b/module/projectstory/control.php @@ -45,8 +45,6 @@ class projectStory extends control */ public function story($projectID = 0, $productID = 0, $branch = 0, $browseType = '', $param = 0, $storyType = 'story', $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1) { - $this->session->set('storyList', $this->app->getURI(true), 'project'); - echo $this->fetch('product', 'browse', "productID=$productID&branch=$branch&browseType=$browseType¶m=$param&storyType=$storyType&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID&projectID=$projectID"); } From 1cc238f01029d0af575e8af450f829ee5e037ec7 Mon Sep 17 00:00:00 2001 From: CatouseDate: Thu, 25 Mar 2021 15:20:08 +0800 Subject: [PATCH 13/34] * refactor: format. --- module/index/js/index.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/module/index/js/index.js b/module/index/js/index.js index 4d27677838..406cc8401d 100644 --- a/module/index/js/index.js +++ b/module/index/js/index.js @@ -422,20 +422,20 @@ */ function refreshMoreMenu() { - var $mainNav = $('#menuMainNav'); - var $list = $('#menuMoreList'); - var $menuNav = $('#menuNav'); - var $menuItems = $mainNav.children('li'); - var maxHeight = $menuNav.height(); - var showMoreMenu = false; - var currentHeight = 40; + var $mainNav = $('#menuMainNav'); + var $list = $('#menuMoreList'); + var $menuNav = $('#menuNav'); + var $menuItems = $mainNav.children('li'); + var maxHeight = $menuNav.height(); + var showMoreMenu = false; + var currentHeight = 40; var moreMenuHeight = 13; $menuItems.each(function() { - var $item = $(this); + var $item = $(this); var isDivider = $item.hasClass('divider'); - var height = isDivider ? 17 : 40; + var height = isDivider ? 17 : 40; currentHeight += height; if(currentHeight > maxHeight) { @@ -443,10 +443,11 @@ if(!showMoreMenu) { showMoreMenu = true; + $list.empty(); + var $prevItem = $item.prev(); if($prevItem.hasClass('divider')) $prevItem.addClass('hidden'); - $list.empty(); if(isDivider) return; } moreMenuHeight += isDivider ? 13 : 31; @@ -457,7 +458,6 @@ $item.removeClass('hidden'); } }); - console.log('moreMenuHeight', moreMenuHeight); $list.css('top', moreMenuHeight > 111 ? 111 - moreMenuHeight : ''); $menuNav.toggleClass('show-more-nav', showMoreMenu); } From f7c077e364f4dcd6614e8a5df122252905c5631d Mon Sep 17 00:00:00 2001 From: Catouse Date: Thu, 25 Mar 2021 15:25:29 +0800 Subject: [PATCH 14/34] * task #36890, improve UI of nested table. --- module/program/view/browsebylist.html.php | 9 +++------ www/js/zui/min.js | 6 +++--- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/module/program/view/browsebylist.html.php b/module/program/view/browsebylist.html.php index 9f44259d88..eefcbd2f4f 100644 --- a/module/program/view/browsebylist.html.php +++ b/module/program/view/browsebylist.html.php @@ -1,5 +1,5 @@ -