From 506eaa5fdd8d9ba8f8156b02eaeeedfac392b944 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Fri, 9 Apr 2021 10:30:21 +0800 Subject: [PATCH 1/7] * Fix bug #11867. --- module/doc/control.php | 14 ++++++++++++++ module/doc/view/edit.html.php | 1 - module/doc/view/side.html.php | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/module/doc/control.php b/module/doc/control.php index 0696dacc5e..ef8daa8ea6 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -491,8 +491,22 @@ class doc extends control else { $this->app->rawMethod = $objectType; + + /* High light menu. */ + if($objectType) + { + $menu = $this->lang->doc->menu->$objectType; + $menu['alias'] .= ',edit'; + $menu['subModule'] = 'doc'; + $this->lang->doc->menu->$objectType = $menu; + } } + $objects = $this->doc->getOrderedObjects($objectType); + $libs = $this->doc->getLibsByObject($objectType, $objectID); + $this->lang->modulePageNav = $this->doc->select($objectType, $objects, $objectID, $libs, $libID); + $this->lang->TRActions = common::hasPriv('doc', 'create') ? $this->doc->buildCreateButton4Doc($objectType, $objectID, $libID) : ''; + $this->view->title = $lib->name . $this->lang->colon . $this->lang->doc->edit; $this->view->position[] = html::a($this->createLink('doc', 'browse', "libID=$libID"), $lib->name); $this->view->position[] = $this->lang->doc->edit; diff --git a/module/doc/view/edit.html.php b/module/doc/view/edit.html.php index 8e5e663c3f..e9ce3e1968 100644 --- a/module/doc/view/edit.html.php +++ b/module/doc/view/edit.html.php @@ -10,7 +10,6 @@ * @link http://www.zentao.net */ ?> -doc->appendNavCSS();?> contentType == 'html') include '../../common/view/kindeditor.html.php';?> contentType == 'markdown') include '../../common/view/markdown.html.php';?> diff --git a/module/doc/view/side.html.php b/module/doc/view/side.html.php index f20cfdebe4..7c34571ec3 100644 --- a/module/doc/view/side.html.php +++ b/module/doc/view/side.html.php @@ -33,7 +33,7 @@ $sideWidth = common::checkNotCN() ? '270' : '238'; if($type == 'book') { common::printLink('doc', 'editLib', "rootID=$libID", $lang->doc->editBook, '', "class='btn btn-info btn-wide iframe'", '', true); - common::printLink('doc', 'manageBook', "bookID=$libID", $lang->doc->manageBook, '', "class='btn btn-info btn-wide iframe'", '', true); + common::printLink('doc', 'manageBook', "bookID=$libID", $lang->doc->manageBook, '', "class='btn btn-info btn-wide'"); } else { From 01de23b3b46262efd4028a275e587643154e99c4 Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Fri, 9 Apr 2021 10:33:42 +0800 Subject: [PATCH 2/7] * Fix bug#11832. --- module/doc/control.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/module/doc/control.php b/module/doc/control.php index ef8daa8ea6..58695a06d2 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -221,7 +221,12 @@ class doc extends control $objectType = 'project'; $objectID = $execution->project; } + if($objectType == 'project' and $this->post->project) $objectID = $this->post->project; + if($objectType == 'product' and $this->post->product) $objectID = $this->post->product; + if($objectType == 'custom' or $objectType == 'book') $objectID = 0; + $this->action->create('docLib', $libID, 'Created'); + die(js::locate($this->createLink('doc', 'objectLibs', "type=$objectType&objectID=$objectID&libID=$libID"), 'parent.parent')); } else From 4504bfef23e058d3fe3062de1d9abb7d887599a1 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Fri, 9 Apr 2021 10:53:40 +0800 Subject: [PATCH 3/7] * Fix bug #11912. --- module/task/css/create.css | 2 +- module/task/js/create.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/module/task/css/create.css b/module/task/css/create.css index 445a66d20e..b9fc9218b2 100644 --- a/module/task/css/create.css +++ b/module/task/css/create.css @@ -1,4 +1,4 @@ -#copyButton {width: 56px; background-color: #f1f1f1; opacity: 1;} /* Adjust for task #4151; */ +#copyButton {width: 80px; background-color: #f1f1f1; opacity: 1;} /* Adjust for task #4151; */ .title-group.required:after {display: none;} .title-group.required > .required:after {display: block; right: 29px; top: 5px;} diff --git a/module/task/js/create.js b/module/task/js/create.js index 505d281817..99177327f3 100644 --- a/module/task/js/create.js +++ b/module/task/js/create.js @@ -191,7 +191,8 @@ function setPreview() $('#preview a').attr('href', storyLink); $('#copyButton').removeClass('hidden'); $('.title-group.required > div').attr('id', 'copyStory-input').removeClass('.required'); - $('div.colorpicker').css('right', '57px');//Adjust for task #4151; + $('div.colorpicker').css('right', '80px');//Adjust for task #4151; + $('#copyButton').css('width', '80px'); } setAfter(); From 8e1ec6dd34b4f3168c2787a1b3e330da00ddc81d Mon Sep 17 00:00:00 2001 From: hufangzhou <746775970@qq.com> Date: Fri, 9 Apr 2021 10:59:30 +0800 Subject: [PATCH 4/7] * Fix a bug. --- module/doc/js/createlib.js | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/module/doc/js/createlib.js b/module/doc/js/createlib.js index 8e756e199d..1af8868b9f 100644 --- a/module/doc/js/createlib.js +++ b/module/doc/js/createlib.js @@ -9,34 +9,65 @@ $(function() toggleAcl($('form [name=acl]:checked').val(), 'lib'); }); +/** + * Change form by lib type. + * + * @param string libType + * @access public + * @return void + */ function changeByLibType(libType) { if(libType == 'product') { $('table tr.product').removeClass('hidden'); + $('#product').attr('disabled', false); + $('table tr.project').addClass('hidden'); + $('#project').attr('disabled', true); + $('table tr.execution').addClass('hidden'); + $('#execution').attr('disabled', true); + changeDoclibAcl(libType); } else if(libType == 'project') { - $('table tr.product').addClass('hidden'); $('table tr.project').removeClass('hidden'); + $('#project').attr('disabled', false); + + $('table tr.product').addClass('hidden'); + $('#product').attr('disabled', true); + $('table tr.execution').addClass('hidden'); + $('#execution').attr('disabled', true); + changeDoclibAcl(libType); } else if(libType == 'execution') { - $('table tr.product').addClass('hidden'); - $('table tr.project').addClass('hidden'); $('table tr.execution').removeClass('hidden'); + $('#execution').attr('disabled', false); + + $('table tr.product').addClass('hidden'); + $('#product').attr('disabled', true); + + $('table tr.project').addClass('hidden'); + $('#project').attr('disabled', true); + changeDoclibAcl(libType); } else { $('table tr.product').addClass('hidden'); + $('#product').attr('disabled', true); + $('table tr.project').addClass('hidden'); + $('#project').attr('disabled', true); + $('table tr.execution').addClass('hidden'); + $('#execution').attr('disabled', true); + changeDoclibAcl(libType); } From 14dd2012ccb7250efca1cf757ac3bcc42bee03a9 Mon Sep 17 00:00:00 2001 From: leiyong <1549684884@qq.com> Date: Fri, 9 Apr 2021 06:01:18 +0300 Subject: [PATCH 5/7] * Finish task#37299. --- module/bug/control.php | 2 +- module/product/control.php | 9 +++++---- module/projectrelease/control.php | 2 +- module/testcase/control.php | 2 +- module/testreport/control.php | 2 +- module/testsuite/control.php | 2 +- module/testtask/control.php | 2 +- 7 files changed, 11 insertions(+), 10 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index a889a5bec9..aa59553fc7 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -66,7 +66,7 @@ class bug extends control $this->view->products = $this->products = $products; $openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa'; - if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=bug&objectID=$objectID"))); + if(empty($this->products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=bug&objectID=$objectID"))); } /** diff --git a/module/product/control.php b/module/product/control.php index 7e5d6ff973..6e0820de8d 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -994,10 +994,11 @@ class product extends control $this->lang->project->menuOrder = $this->lang->{$project->model}->menuOrder; $this->app->rawModule = $activeMenu; - if($activeMenu == 'bug') $this->lang->{$project->model}->menu->qa['subMenu']->bug['subModule'] = 'product'; - if($activeMenu == 'testcase') $this->lang->{$project->model}->menu->qa['subMenu']->testcase['subModule'] = 'product'; - if($activeMenu == 'testtask') $this->lang->{$project->model}->menu->qa['subMenu']->testtask['subModule'] = 'product'; - if($activeMenu == 'testreport') $this->lang->{$project->model}->menu->qa['subMenu']->testreport['subModule'] = 'product'; + if($activeMenu == 'bug') $this->lang->{$project->model}->menu->qa['subMenu']->bug['subModule'] = 'product'; + if($activeMenu == 'testcase') $this->lang->{$project->model}->menu->qa['subMenu']->testcase['subModule'] = 'product'; + if($activeMenu == 'testtask') $this->lang->{$project->model}->menu->qa['subMenu']->testtask['subModule'] = 'product'; + if($activeMenu == 'testreport') $this->lang->{$project->model}->menu->qa['subMenu']->testreport['subModule'] = 'product'; + if($activeMenu == 'projectrelease') $this->lang->{$project->model}->menu->release['subModule'] = 'projectrelease'; } elseif($moduleName == 'qa') { diff --git a/module/projectrelease/control.php b/module/projectrelease/control.php index 8b44e19510..1484e77770 100644 --- a/module/projectrelease/control.php +++ b/module/projectrelease/control.php @@ -29,7 +29,7 @@ class projectrelease extends control $this->loadModel('release'); $this->loadModel('project'); $this->view->products = $this->products = $this->product->getProductPairsByProject($this->session->project); - if(empty($this->view->products)) $this->locate($this->createLink('product', 'create')); + if(empty($this->products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', 'moduleName=project&activeMenu=projectrelease&projectID=' . $this->session->project))); } /** diff --git a/module/testcase/control.php b/module/testcase/control.php index 836ce48fd6..33e38996d9 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -60,7 +60,7 @@ class testcase extends control $this->view->products = $this->products = $products; $openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa'; - if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testcase&objectID=$objectID"))); + if(empty($this->products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testcase&objectID=$objectID"))); } /** diff --git a/module/testreport/control.php b/module/testreport/control.php index 6adc70427a..c76ccc0e8f 100644 --- a/module/testreport/control.php +++ b/module/testreport/control.php @@ -63,7 +63,7 @@ class testreport extends control $this->view->products = $this->products = $products; $openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa'; - if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testreport&objectID=$objectID"))); + if(empty($this->products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testreport&objectID=$objectID"))); } /** diff --git a/module/testsuite/control.php b/module/testsuite/control.php index a2b287ddf2..4607ed21aa 100644 --- a/module/testsuite/control.php +++ b/module/testsuite/control.php @@ -32,7 +32,7 @@ class testsuite extends control parent::__construct($moduleName, $methodName); $this->view->products = $this->products = $this->loadModel('product')->getPairs(); - if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=qa&activeMenu=testsuite"))); + if(empty($this->products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=qa&activeMenu=testsuite"))); } /** diff --git a/module/testtask/control.php b/module/testtask/control.php index 433f11315d..69c1a8d79f 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -58,7 +58,7 @@ class testtask extends control $this->view->products = $this->products = $products; $openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa'; - if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testtask&objectID=$objectID"))); + if(empty($this->products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testtask&objectID=$objectID"))); } /** From c7c113de3f534d70479b348ae5fb6e2796586d7e Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Fri, 9 Apr 2021 11:03:49 +0800 Subject: [PATCH 6/7] * Merge code. --- module/execution/view/all.html.php | 12 ++++++------ module/story/view/view.html.php | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/module/execution/view/all.html.php b/module/execution/view/all.html.php index 4f3d659ee6..dca697c217 100644 --- a/module/execution/view/all.html.php +++ b/module/execution/view/all.html.php @@ -68,11 +68,11 @@ systemMode == 'new')) ? $lang->execution->execName : $lang->execution->name);?> execution->owner);?> - execution->end);?> - execution->execStatus : $lang->execution->status);?> - execution->totalEstimate;?> - execution->totalConsumed;?> - execution->totalLeft;?> + execution->end);?> + execution->execStatus : $lang->execution->status);?> + execution->totalEstimate;?> + execution->totalConsumed;?> + execution->totalLeft;?> execution->progress;?> execution->burn;?> @@ -101,7 +101,7 @@ PM);?> end;?> processStatus('execution', $execution);?> - + lang->execution->workHour;?>'>hours->totalEstimate . $this->lang->execution->workHourUnit;?> diff --git a/module/story/view/view.html.php b/module/story/view/view.html.php index 9ca55b1b54..86b8a59025 100644 --- a/module/story/view/view.html.php +++ b/module/story/view/view.html.php @@ -49,7 +49,7 @@
app->rawModule == 'projectstory') { @@ -57,7 +57,7 @@ $openGroup = 'project'; } ?> - product}&branch={$story->branch}&moduleID={$story->module}&$otherParam", "" . $lang->story->create, '', "class='btn btn-primary' data-app='$openApp'"); ?> + product}&branch={$story->branch}&moduleID={$story->module}&$otherParam&bugID=0&planID=0&todoID=0&extra=&type=$story->type", "" . $lang->story->create, '', "class='btn btn-primary' data-app='$openApp'"); ?>
From f06e34b0fa60fb5842d5b7d6ba2639d98e8ce5a3 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Fri, 9 Apr 2021 11:06:10 +0800 Subject: [PATCH 7/7] * Fix bug #11913. --- module/task/config.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/task/config.php b/module/task/config.php index b46d5ad4bf..5db5eb88ae 100644 --- a/module/task/config.php +++ b/module/task/config.php @@ -72,7 +72,7 @@ $config->task->datatable->fieldList['type']['required'] = 'no'; $config->task->datatable->fieldList['status']['title'] = 'statusAB'; $config->task->datatable->fieldList['status']['fixed'] = 'no'; -$config->task->datatable->fieldList['status']['width'] = '80'; +$config->task->datatable->fieldList['status']['width'] = '60'; $config->task->datatable->fieldList['status']['required'] = 'no'; $config->task->datatable->fieldList['estimate']['title'] = 'estimateAB'; @@ -99,7 +99,7 @@ $config->task->datatable->fieldList['progress']['name'] = $lang->task->progr $config->task->datatable->fieldList['deadline']['title'] = 'deadlineAB'; $config->task->datatable->fieldList['deadline']['fixed'] = 'no'; -$config->task->datatable->fieldList['deadline']['width'] = '100'; +$config->task->datatable->fieldList['deadline']['width'] = '60'; $config->task->datatable->fieldList['deadline']['required'] = 'no'; $config->task->datatable->fieldList['openedBy']['title'] = 'openedByAB';