From bd86dca878fb9eaf12ca93b54c5c2fb8a2ecb785 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Tue, 31 Jan 2023 16:31:51 +0800 Subject: [PATCH 01/23] * Fix bug for empty password. --- module/user/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/user/model.php b/module/user/model.php index 48cc74befe..eea5c31733 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -862,7 +862,7 @@ class userModel extends model $_POST['password1'] = trim($_POST['password1']); $_POST['password2'] = trim($_POST['password2']); if(!$canNoPassword and empty($_POST['password1'])) dao::$errors['password1'][] = sprintf($this->lang->error->notempty, $this->lang->user->password) . '
'; - if(!$canNoPassword and $this->post->password1 != false) + if(!empty($_POST['password1'])) { if(isset($this->config->safe->mode) and ($this->post->passwordStrength < $this->config->safe->mode)) dao::$errors['password1'][] = zget($this->lang->user->placeholder->passwordStrengthCheck, $this->config->safe->mode, $this->lang->user->weakPassword) . '
'; From eac10fe7082660ad79d88ba21fa0efa6a408ca63 Mon Sep 17 00:00:00 2001 From: daitingting Date: Tue, 31 Jan 2023 09:19:02 +0000 Subject: [PATCH 02/23] * Finish task #83032. --- module/backup/control.php | 13 ++++++------- module/backup/js/index.js | 26 +++++++++++++++++++++++++- module/backup/lang/de.php | 1 + module/backup/lang/en.php | 1 + module/backup/lang/fr.php | 1 + module/backup/lang/zh-cn.php | 1 + module/backup/view/index.html.php | 9 ++++++++- 7 files changed, 43 insertions(+), 9 deletions(-) diff --git a/module/backup/control.php b/module/backup/control.php index 26713a2d5e..9d4576c6c2 100644 --- a/module/backup/control.php +++ b/module/backup/control.php @@ -93,12 +93,12 @@ class backup extends control $backFileName = "{$this->backupPath}{$fileName}.sql"; if(!$nosafe) $backFileName .= '.php'; $result = $this->backup->backSQL($backFileName); + if(!$result->result) { if($reload == 'yes') { - echo js::alert(sprintf($this->lang->backup->error->noWritable, $this->backupPath)); - return print(js::reload('parent')); + return print(sprintf($this->lang->backup->error->noWritable, $this->backupPath)); } else { @@ -112,12 +112,12 @@ class backup extends control $backFileName = "{$this->backupPath}{$fileName}.file"; $result = $this->backup->backFile($backFileName); + if(!$result->result) { if($reload == 'yes') { - echo js::alert(sprintf($this->lang->backup->error->backupFile, $result->error)); - return print(js::reload('parent')); + return print(sprintf($this->lang->backup->error->backupFile, $result->error)); } else { @@ -132,8 +132,7 @@ class backup extends control { if($reload == 'yes') { - echo js::alert(sprintf($this->lang->backup->error->backupCode, $result->error)); - return print(js::reload('parent')); + return print(sprintf($this->lang->backup->error->backupCode, $result->error)); } else { @@ -164,7 +163,7 @@ class backup extends control } } - if($reload == 'yes') return print(js::reload('parent')); + if($reload == 'yes') return print($this->lang->backup->success->backup); echo $this->lang->backup->success->backup . "\n"; } diff --git a/module/backup/js/index.js b/module/backup/js/index.js index 4fc094c196..6a46f3dd21 100644 --- a/module/backup/js/index.js +++ b/module/backup/js/index.js @@ -2,9 +2,32 @@ $(function() { $('.backup').click(function() { + var timeID = null; + + $.ajax({ + url: $(this).attr('data-link'), + success: function(data) + { + clearInterval(timeID); + + $('#waitting .modal-body #message').append(data); + + setTimeout(function(){return location.reload();}, 2000); + }, + error: function(request, textstatus, error) + { + clearInterval(timeID); + + if(textstatus == 'timeout') $('#waitting .modal-body #message').append("

" + backupTimeout + '

'); + + setTimeout(function(){return location.reload();}, 2000); + } + }); + $('#waitting .modal-body #backupType').html(backup); $('#waitting').modal('show'); - setInterval(function() + + timeID = setInterval(function() { $.get(createLink('backup', 'ajaxGetProgress'), function(data) { @@ -12,6 +35,7 @@ $(function() }); }, 1000); }) + $('.rmPHPHeader').click(function() { $('#waitting .modal-body #backupType').html(rmPHPHeader); diff --git a/module/backup/lang/de.php b/module/backup/lang/de.php index d4078fad1c..4b57e619bb 100644 --- a/module/backup/lang/de.php +++ b/module/backup/lang/de.php @@ -48,3 +48,4 @@ $lang->backup->error->restoreSQL = "Datenbankwiederherstellung fehlgeschlagen. $lang->backup->error->restoreFile = "Dateiwiederherstellung fehlgeschlagen. Error: %s."; $lang->backup->error->backupFile = "Dateibackup fehlgeschlagen. Error: %s."; $lang->backup->error->backupCode = "Codebackup fehlgeschlagen. Error: %s."; +$lang->backup->error->timeout = "Backup timeout."; diff --git a/module/backup/lang/en.php b/module/backup/lang/en.php index 2b5109c58b..5a07230909 100644 --- a/module/backup/lang/en.php +++ b/module/backup/lang/en.php @@ -48,3 +48,4 @@ $lang->backup->error->restoreSQL = "Failed to restore the database library. Err $lang->backup->error->restoreFile = "Failed to restore the file. Error %s."; $lang->backup->error->backupFile = "Failed to back up the file. Error %s."; $lang->backup->error->backupCode = "Failed to back up the code. Error %s."; +$lang->backup->error->timeout = "Backup timeout."; diff --git a/module/backup/lang/fr.php b/module/backup/lang/fr.php index 2bcc5e5581..9c46497f40 100644 --- a/module/backup/lang/fr.php +++ b/module/backup/lang/fr.php @@ -48,3 +48,4 @@ $lang->backup->error->restoreSQL = "Echec pour restaurer la database library. E $lang->backup->error->restoreFile = "Echec pour restaurer le fichier. Erreur %s."; $lang->backup->error->backupFile = "Echec pour sauvegarder le fichier. Erreur %s."; $lang->backup->error->backupCode = "Echec pour sauvegarder le code. Erreur %s."; +$lang->backup->error->timeout = "Backup timeout."; diff --git a/module/backup/lang/zh-cn.php b/module/backup/lang/zh-cn.php index f47c2a1137..d75db5bfca 100644 --- a/module/backup/lang/zh-cn.php +++ b/module/backup/lang/zh-cn.php @@ -48,3 +48,4 @@ $lang->backup->error->restoreSQL = "数据库还原失败,错误:%s"; $lang->backup->error->restoreFile = "附件还原失败,错误:%s"; $lang->backup->error->backupFile = "附件备份失败,错误:%s"; $lang->backup->error->backupCode = "代码备份失败,错误:%s"; +$lang->backup->error->timeout = "备份超时"; diff --git a/module/backup/view/index.html.php b/module/backup/view/index.html.php index 4a642163ff..43bc042b3a 100644 --- a/module/backup/view/index.html.php +++ b/module/backup/view/index.html.php @@ -27,7 +27,13 @@
" . $lang->backup->setting, '', "data-width='500' class='iframe btn btn-primary'");?> - " . $lang->backup->backup, 'hiddenwin', "class='btn btn-primary backup'");?> + " . $lang->backup->backup, "data-link='{$backupLink}'", 'btn btn-primary backup'); + } + ?>
@@ -114,4 +120,5 @@ backup->rmPHPHeader);?> backup->confirmRestore);?> backup->restore);?> +backup->error->timeout);?> From 809ba4b43e9172560e65b39c0180c5f04b41550b Mon Sep 17 00:00:00 2001 From: wangyuting2 <851424971@qq.com> Date: Wed, 1 Feb 2023 08:26:08 +0800 Subject: [PATCH 03/23] * Adjust modal width. --- module/programplan/view/gantt.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/programplan/view/gantt.html.php b/module/programplan/view/gantt.html.php index e583097b6c..93526300db 100755 --- a/module/programplan/view/gantt.html.php +++ b/module/programplan/view/gantt.html.php @@ -734,7 +734,7 @@ $(function() gantt.showDate(new Date()); // Show task in modal on click task - var taskModalTrigger = new $.zui.ModalTrigger({type: 'iframe', width: '80%'}); + var taskModalTrigger = new $.zui.ModalTrigger({type: 'iframe', width: '95%'}); gantt.attachEvent('onTaskClick', function(id, e) { if($(e.srcElement).hasClass('gantt_close') || $(e.srcElement).hasClass('gantt_open')) return false; From c5570bf5604ebace63ede7f238bdec190d48ba69 Mon Sep 17 00:00:00 2001 From: zhouxin Date: Wed, 1 Feb 2023 09:18:27 +0800 Subject: [PATCH 04/23] * Fix bug for feedback #2015. --- module/task/model.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/module/task/model.php b/module/task/model.php index 4fc055fdb8..99562a7d2f 100755 --- a/module/task/model.php +++ b/module/task/model.php @@ -1479,9 +1479,6 @@ class taskModel extends model return false; } - $project = $this->loadModel('project')->getByID($oldTask->project); - if($project->model == 'waterfall') $this->config->task->edit->requiredFields .= ',estStarted,deadline'; - foreach(explode(',', $this->config->task->edit->requiredFields) as $field) { $field = trim($field); From d1d82a03fc816d1c269de431abe8b828434aa62d Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Wed, 1 Feb 2023 09:43:57 +0800 Subject: [PATCH 05/23] * Fix bug#31366. --- module/search/model.php | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/module/search/model.php b/module/search/model.php index 1021d77782..d3d4f9321a 100644 --- a/module/search/model.php +++ b/module/search/model.php @@ -675,13 +675,10 @@ class searchModel extends model $typeCount = $this->dao->select("objectType, count(*) as objectCount") ->from(TABLE_SEARCHINDEX) ->where('((vision')->eq($this->config->vision) - ->beginIF(!empty($allowedObject))->andWhere('objectType')->in($allowedObject)->fi() + ->andWhere('objectType')->in($allowedObject) ->markRight(1) - ->beginIF(!empty($filterObject)) ->orWhere('(objectType')->in($filterObject) - ->markRight(1) - ->fi() - ->markRight(1) + ->markRight(2) ->andWhere('addedDate')->le(helper::now()) ->groupBy('objectType') ->fetchPairs('objectType', 'objectCount'); @@ -717,13 +714,10 @@ class searchModel extends model ->from(TABLE_SEARCHINDEX) ->where("(MATCH(title,content) AGAINST('{$againstCond}' IN BOOLEAN MODE) >= 1 {$likeCondition})") ->andWhere('((vision')->eq($this->config->vision) - ->beginIF(!empty($allowedObject))->andWhere('objectType')->in($allowedObject)->fi() + ->andWhere('objectType')->in($allowedObject) ->markRight(1) - ->beginIF(!empty($filterObject)) ->orWhere('(objectType')->in($filterObject) - ->markRight(1) - ->fi() - ->markRight(1) + ->markRight(2) ->andWhere('addedDate')->le(helper::now()) ->orderBy('score_desc, editedDate_desc') ->query(); From eb176697b1c5580b510a1b8ba211cd7a0a13b8db Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Wed, 1 Feb 2023 10:48:48 +0800 Subject: [PATCH 06/23] * Fix bug#30859. --- module/tree/view/edit.html.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/module/tree/view/edit.html.php b/module/tree/view/edit.html.php index 7b014e9ed7..058c091e55 100644 --- a/module/tree/view/edit.html.php +++ b/module/tree/view/edit.html.php @@ -58,7 +58,11 @@ if(isset($pageCSS)) css::internal($pageCSS); type != 'line'):?> > - + > @@ -184,13 +188,12 @@ function loadModules(branch) var productID = $('#root').val(); var branchID = $(branch).val(); var moduleID = $('#parent').val(); - var moduleBox = $('#parent').closest('tr').children('td'); if(typeof(branchID) == 'undefined') branchID = 0; if(typeof(moduleID) == 'undefined') moduleID = 0; - link = createLink('tree', 'ajaxGetOptionMenu', 'productID=' + productID + '&viewtype=' + type + '&branch=' + branchID + '&rootModuleID=0&returnType=html&fieldID=&needManage=true&extra=excludeModuleID=' + id;?> + ',noMainBranch,nodeleted¤tModuleID=' + moduleID); - $(moduleBox).load(link, function() + link = createLink('tree', 'ajaxGetOptionMenu', 'productID=' + productID + '&viewtype=' + type + '&branch=' + branchID + '&rootModuleID=0&returnType=html&fieldID=&needManage=false&extra=excludeModuleID=' + id;?> + ',noMainBranch,nodeleted¤tModuleID=' + moduleID); + $('#moduleIdBox').load(link, function() { $(this).children('select').attr('id', 'parent').attr('name', 'parent'); $(this).find('select').chosen() From aeb0d8054d56a012dec52c523f0afd94f4fb4edd Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Wed, 1 Feb 2023 11:13:11 +0800 Subject: [PATCH 07/23] * Fix bug#30834. --- module/doc/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/doc/control.php b/module/doc/control.php index 9316978bdd..48de070f6a 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -541,7 +541,7 @@ class doc extends control $this->view->doc = $doc; $this->view->moduleOptionMenu = $this->tree->getOptionMenu($libID, 'doc', $startModuleID = 0); $this->view->type = $type; - $this->view->libs = $this->doc->getLibs('all', $extra = 'withObject|noBook', $libID, $objectID); + $this->view->libs = $this->doc->getLibs('all', 'withObject', $libID, $objectID, 'book'); $this->view->lib = $lib; $this->view->groups = $this->loadModel('group')->getPairs(); $this->view->users = $this->user->getPairs('noletter|noclosed|nodeleted', $doc->users); From 43978561ebe874ac384b6ffdf47d25f4a1df0d04 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Wed, 1 Feb 2023 13:15:24 +0800 Subject: [PATCH 08/23] * Fix bug #30004. --- module/project/model.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/module/project/model.php b/module/project/model.php index 2d5fedce17..be500760cc 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -2274,13 +2274,15 @@ class projectModel extends model } break; case 'name': - $prefix = ''; - $suffix = ''; + $prefix = ''; + $suffix = ''; + $projectIcon = ''; if(isset($project->delay)) $suffix = "{$this->lang->project->statusList['delay']}"; $projectType = $project->model == 'scrum' ? 'sprint' : $project->model; if(!empty($suffix) or !empty($prefix)) echo '
'; if(!empty($prefix)) echo $prefix; - echo html::a($projectLink, " " . $project->name, '', "class='text-ellipsis text-primary'"); + if($this->config->vision == 'rnd') $projectIcon = " "; + echo html::a($projectLink, $projectIcon . $project->name, '', "class='text-ellipsis text-primary'"); if(!empty($suffix)) echo $suffix; if(!empty($suffix) or !empty($prefix)) echo '
'; break; From 36c76ee62f12aee58453d2b097c8e2a5c8a2392a Mon Sep 17 00:00:00 2001 From: tianshujie Date: Wed, 1 Feb 2023 14:05:28 +0800 Subject: [PATCH 09/23] * Fix bug #28308. --- module/testcase/control.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/module/testcase/control.php b/module/testcase/control.php index 0dc9edb3bd..8f44396214 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -998,7 +998,14 @@ class testcase extends control if($case->module) $moduleIdList = $this->tree->getAllChildID($case->module); $moduleIdList = (!in_array($this->app->tab, array('execution', 'project')) and empty($stories)) ? 0 : $moduleIdList; - $stories = $this->story->getProductStoryPairs($productID, $case->branch, $moduleIdList, 'all','id_desc', 0, 'full', 'story', false); + if($this->app->tab == 'execution') + { + $stories = $this->story->getExecutionStoryPairs($case->execution, $productID, $case->branch, $moduleIdList); + } + else + { + $stories = $this->story->getProductStoryPairs($productID, $case->branch, $moduleIdList, 'all','id_desc', 0, 'full', 'story', false); + } $this->view->productID = $productID; $this->view->product = $product; From f8eba3cc9bb97e1302d9b149c673e945ea672967 Mon Sep 17 00:00:00 2001 From: songpeiyan Date: Wed, 1 Feb 2023 14:30:43 +0800 Subject: [PATCH 10/23] * Fix bug #31558. --- module/story/view/processstorychange.html.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/module/story/view/processstorychange.html.php b/module/story/view/processstorychange.html.php index b23c873843..7fd5223473 100644 --- a/module/story/view/processstorychange.html.php +++ b/module/story/view/processstorychange.html.php @@ -24,15 +24,15 @@
- - - - - - - - - + + + + + + + + +
tree->parentCate : $lang->tree->parent;?>parent, "class='form-control chosen'");?> +
+ parent, "class='form-control chosen'");?> +
+
id;?>title;?>story->changed;?>version;?>openedBy);?>
id;?>title;?>story->changed;?>version;?>openedBy);?>
From 859dbbc471b7deee79a666b268efe82784c8162c Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Wed, 1 Feb 2023 14:32:18 +0800 Subject: [PATCH 11/23] * Fix bug#30280. --- module/projectrelease/view/create.html.php | 2 +- module/release/view/create.html.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/projectrelease/view/create.html.php b/module/projectrelease/view/create.html.php index a06d0bb92d..b10d61636e 100644 --- a/module/projectrelease/view/create.html.php +++ b/module/projectrelease/view/create.html.php @@ -45,7 +45,7 @@ release->includedBuild;?> - build->placeholder->multipleSelect}'");?> + build->placeholder->multipleSelect}'");?>
diff --git a/module/release/view/create.html.php b/module/release/view/create.html.php index 5bc476e931..16570cafe0 100644 --- a/module/release/view/create.html.php +++ b/module/release/view/create.html.php @@ -33,7 +33,7 @@ release->includedBuild;?> - build->placeholder->multipleSelect}'");?> + build->placeholder->multipleSelect}'");?>
From bbf3f25c279501541156b022c2c50158af40232a Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Wed, 1 Feb 2023 15:28:05 +0800 Subject: [PATCH 12/23] * Fix bug#31864. --- module/testtask/control.php | 2 +- module/testtask/model.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/testtask/control.php b/module/testtask/control.php index 6a6b20f42a..963563ae4b 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -538,7 +538,7 @@ class testtask extends control $this->config->testcase->search['module'] = 'testtask'; $this->config->testcase->search['params']['product']['values'] = array($productID => $this->products[$productID], 'all' => $this->lang->testcase->allProduct); $this->config->testcase->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($productID, $viewType = 'case'); - $this->config->testcase->search['params']['status']['values'] = array('' => '') + $this->lang->testtask->statusList; + $this->config->testcase->search['params']['status']['values'] = array('' => '') + $this->lang->testcase->statusList; $this->config->testcase->search['params']['lib']['values'] = $this->loadModel('caselib')->getLibraries(); $this->config->testcase->search['queryID'] = $queryID; diff --git a/module/testtask/model.php b/module/testtask/model.php index 5058062f25..a1324c153a 100755 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -1082,7 +1082,7 @@ class testtaskModel extends model } $caseQuery = preg_replace('/`(\w+)`/', 't2.`$1`', $caseQuery); - $caseQuery = str_replace(array('t2.`assignedTo`', 't2.`lastRunner`', 't2.`lastRunDate`', 't2.`lastRunResult`', 't2.`status`'), array('t1.`assignedTo`', 't1.`lastRunner`', 't1.`lastRunDate`', 't1.`lastRunResult`', 't1.`status`'), $caseQuery); + $caseQuery = str_replace(array('t2.`assignedTo`', 't2.`lastRunner`', 't2.`lastRunDate`', 't2.`lastRunResult`'), array('t1.`assignedTo`', 't1.`lastRunner`', 't1.`lastRunDate`', 't1.`lastRunResult`'), $caseQuery); /* Select the table for these special fields. */ $specialFields = ',assignedTo,status,lastRunResult,lastRunner,lastRunDate,'; From b1d3eb75f8d48ee01ffcf380778cd359b026601d Mon Sep 17 00:00:00 2001 From: songpeiyan Date: Wed, 1 Feb 2023 15:41:00 +0800 Subject: [PATCH 13/23] *Fix bug #30079 --- module/story/control.php | 2 ++ module/story/view/create.html.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/module/story/control.php b/module/story/control.php index fdc90208ab..6669e276c6 100755 --- a/module/story/control.php +++ b/module/story/control.php @@ -341,6 +341,7 @@ class story extends control $verify = htmlSpecialString($story->verify); $keywords = $story->keywords; $mailto = $story->mailto; + $category = $story->category; } if($bugID > 0) @@ -475,6 +476,7 @@ class story extends control $this->view->URS = $storyType == 'story' ? $this->story->getProductStoryPairs($productID, $branch, $moduleIdList, 'changing,active,reviewing', 'id_desc', 0, '', 'requirement') : ''; $this->view->needReview = ($this->app->user->account == $product->PO or $objectID > 0 or $this->config->story->needReview == 0 or !$this->story->checkForceReview()) ? "checked='checked'" : ""; $this->view->type = $storyType; + $this->view->category = $category?:'feature'; $this->display(); } diff --git a/module/story/view/create.html.php b/module/story/view/create.html.php index fc17f87f1d..f0b00295fa 100644 --- a/module/story/view/create.html.php +++ b/module/story/view/create.html.php @@ -265,7 +265,7 @@ foreach(explode(',', $config->story->create->requiredFields) as $field)
story->category;?> - story->categoryList, 'feature', "class='form-control chosen'");?> + story->categoryList, $category, "class='form-control chosen'");?>
From bfa6c4bd2996026f9a4957b5ad94d43701e62e4d Mon Sep 17 00:00:00 2001 From: songpeiyan Date: Wed, 1 Feb 2023 15:48:45 +0800 Subject: [PATCH 14/23] Fix bug #30079 --- module/story/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/story/control.php b/module/story/control.php index 6669e276c6..dfea927b66 100755 --- a/module/story/control.php +++ b/module/story/control.php @@ -476,7 +476,7 @@ class story extends control $this->view->URS = $storyType == 'story' ? $this->story->getProductStoryPairs($productID, $branch, $moduleIdList, 'changing,active,reviewing', 'id_desc', 0, '', 'requirement') : ''; $this->view->needReview = ($this->app->user->account == $product->PO or $objectID > 0 or $this->config->story->needReview == 0 or !$this->story->checkForceReview()) ? "checked='checked'" : ""; $this->view->type = $storyType; - $this->view->category = $category?:'feature'; + $this->view->category = $category ? $category : 'feature'; $this->display(); } From 770750c9dbdb00fe47a980fc295e02a562784302 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Wed, 1 Feb 2023 16:23:59 +0800 Subject: [PATCH 15/23] * Fix bug#30144. --- module/story/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/story/control.php b/module/story/control.php index dfea927b66..db9c8bbf22 100755 --- a/module/story/control.php +++ b/module/story/control.php @@ -2284,7 +2284,7 @@ class story extends control } else { - return print(js::closeModal('parent.parent', 'this', 'function(){parent.parent.$(\'[data-ride="searchList"]\').searchList();}')); + return print(js::reload('parent.parent')); } } return print(js::locate($this->createLink('story', 'view', "storyID=$storyID&version=0¶m=0&storyType=$storyType"), 'parent')); From 438fb830e5ec45c5a38576c80a2470db8aedb5b6 Mon Sep 17 00:00:00 2001 From: liuyongkai Date: Wed, 1 Feb 2023 16:32:48 +0800 Subject: [PATCH 16/23] * Resolve ticket #2072. --- module/doc/view/view.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/doc/view/view.html.php b/module/doc/view/view.html.php index 9b7090080f..5f3c5be6a7 100644 --- a/module/doc/view/view.html.php +++ b/module/doc/view/view.html.php @@ -249,7 +249,7 @@ js::set('docID', $doc->id); $(function() { var simplemde = new SimpleMDE({element: $("#markdownContent")[0],toolbar:false, status: false}); - //simplemde.value(String(markdownText)); + simplemde.value(String(markdownText)); simplemde.togglePreview(); $('#content .CodeMirror .editor-preview a').attr('target', '_blank'); From 3dfb278fc441f4a72c1620de85a08c2aa17435fd Mon Sep 17 00:00:00 2001 From: liuyongkai Date: Wed, 1 Feb 2023 16:37:24 +0800 Subject: [PATCH 17/23] * Resolve ticket #2072. --- module/doc/view/content.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/doc/view/content.html.php b/module/doc/view/content.html.php index 959518bd0f..477a72a53b 100644 --- a/module/doc/view/content.html.php +++ b/module/doc/view/content.html.php @@ -296,7 +296,7 @@ $(function() { var simplemde = new SimpleMDE({element: $("#markdownContent")[0],toolbar:false, status: false}); - //simplemde.value(String(markdownText)); + simplemde.value(String(markdownText)); simplemde.togglePreview(); $('#content .CodeMirror .editor-preview a').attr('target', '_blank'); From b1927d4cd2bd64b7b644dccc2f05c3812013e6e5 Mon Sep 17 00:00:00 2001 From: songpeiyan Date: Wed, 1 Feb 2023 16:46:42 +0800 Subject: [PATCH 18/23] *Fix bug #30856 --- module/group/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/group/control.php b/module/group/control.php index f44fccacb6..9faf0dae9a 100644 --- a/module/group/control.php +++ b/module/group/control.php @@ -213,7 +213,7 @@ class group extends control if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); if($type == 'byGroup') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload')); - if($type == 'byModule') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'window.parent.location.reload()')); + if($type == 'byModule') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'javascript:window.parent.location.reload()')); } if($type == 'byGroup') From 0e00ce3a8fafaaef08dee9014395671a0f31ac33 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Wed, 1 Feb 2023 08:50:39 +0000 Subject: [PATCH 19/23] * Fix bug #30770. --- module/programplan/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/programplan/model.php b/module/programplan/model.php index cc18f4a942..acbaa07ace 100755 --- a/module/programplan/model.php +++ b/module/programplan/model.php @@ -324,7 +324,7 @@ class programplanModel extends model if($stage['planID'] == $task->execution) { $stageIndex[$index]['progress']['totalEstimate'] += $task->estimate; - $stageIndex[$index]['progress']['totalConsumed'] += $task->consumed; + $stageIndex[$index]['progress']['totalConsumed'] += $task->parent == '-1' ? 0 : $task->consumed; $stageIndex[$index]['progress']['totalReal'] += ($task->left + $task->consumed); $parent = $stage['parent']; From bdd962fe94e109c3eb443d9060c2ba50f5ed63b0 Mon Sep 17 00:00:00 2001 From: songpeiyan Date: Thu, 2 Feb 2023 08:43:27 +0800 Subject: [PATCH 20/23] * Fix bug #30856 --- module/group/control.php | 2 +- module/group/view/privbymodule.html.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/group/control.php b/module/group/control.php index 9faf0dae9a..462bd14904 100644 --- a/module/group/control.php +++ b/module/group/control.php @@ -213,7 +213,7 @@ class group extends control if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); if($type == 'byGroup') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload')); - if($type == 'byModule') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'javascript:window.parent.location.reload()')); + if($type == 'byModule') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent')); } if($type == 'byGroup') diff --git a/module/group/view/privbymodule.html.php b/module/group/view/privbymodule.html.php index d5ce653d8e..0bac3f2b30 100644 --- a/module/group/view/privbymodule.html.php +++ b/module/group/view/privbymodule.html.php @@ -18,7 +18,7 @@
-
+ From 3d4ae057f386385b20456683438eeac5d28c95f0 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Thu, 2 Feb 2023 01:08:42 +0000 Subject: [PATCH 21/23] * Fix bug for bug #30770. --- module/programplan/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/programplan/model.php b/module/programplan/model.php index acbaa07ace..a09996d7a6 100755 --- a/module/programplan/model.php +++ b/module/programplan/model.php @@ -331,7 +331,7 @@ class programplanModel extends model if(isset($stageIndex[$parent])) { $stageIndex[$parent]['progress']['totalEstimate'] += $task->estimate; - $stageIndex[$parent]['progress']['totalConsumed'] += $task->consumed; + $stageIndex[$parent]['progress']['totalConsumed'] += $task->parent == '-1' ? 0 : $task->consumed; $stageIndex[$parent]['progress']['totalReal'] += ($task->left + $task->consumed); } } From 0395e9266da199239b2f5f0e609673fa7bc263e8 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Thu, 2 Feb 2023 09:10:15 +0800 Subject: [PATCH 22/23] * Modify lite vision system style. --- module/admin/config.php | 1 + module/admin/css/index.css | 1 + module/admin/view/index.html.php | 5 +++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/module/admin/config.php b/module/admin/config.php index f86f03b0f5..eaec7e702a 100755 --- a/module/admin/config.php +++ b/module/admin/config.php @@ -57,6 +57,7 @@ $config->admin->plugIns[30]->viewLink = 'https://www.zentao.net/extension-viewEx $config->admin->apiRoot = 'https://www.zentao.net/'; $config->admin->classURL = 'https://www.zentao.net/publicclass.html'; $config->admin->extensionURL = 'https://www.zentao.net/extension-browse.html'; +$config->admin->liteMenuList = array('system', 'user', 'feature', 'message', 'extension', 'dev'); $config->admin->helpURL['system'] = 'https://www.zentao.net/book/zentaopms/538.html'; $config->admin->helpURL['user'] = 'https://www.zentao.net/book/zentaopms/538.html'; diff --git a/module/admin/css/index.css b/module/admin/css/index.css index e5518ba5da..66f4538a3c 100755 --- a/module/admin/css/index.css +++ b/module/admin/css/index.css @@ -14,6 +14,7 @@ .settings-list > .setting-box {flex: 1 1 18%; padding: 8px; border: 1px solid rgba(227, 228, 233, 0.6); margin-right: 10px; margin-top: 16px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer;} .settings-list > .setting-box > h4 > img {padding-right: 16px;} .settings-list > .setting-box > .setting-desc {padding-bottom: 16px;} +.settings-list.lite-setting > .setting-box {flex: 1 1 30%;} .plugin-list {display: flex; flex-wrap: wrap; padding: 12px 4px 4px 4px;} .plugin-list > .plugin-item {flex: 1 1 26%; padding: 16px 10px; border: 1px solid #EDEEF2; border-radius: 4px; margin-right: 10px; margin-bottom: 16px; width: 0px;} diff --git a/module/admin/view/index.html.php b/module/admin/view/index.html.php index b51dccd305..c5f7ea2076 100755 --- a/module/admin/view/index.html.php +++ b/module/admin/view/index.html.php @@ -16,8 +16,9 @@
admin->setting?>
-
+
admin->menuList as $menuKey => $menu):?> + vision == 'lite' and !in_array($menuKey, $config->admin->liteMenuList)) continue;?>
'>

@@ -80,7 +81,7 @@
-
+ From 3dacf0c9388add74d19b10b7728461cfb6c2f5f3 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 2 Feb 2023 09:18:33 +0800 Subject: [PATCH 23/23] * code for admin menu. --- module/admin/lang/menu.php | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/module/admin/lang/menu.php b/module/admin/lang/menu.php index e4a13779bc..1ddd50ad48 100644 --- a/module/admin/lang/menu.php +++ b/module/admin/lang/menu.php @@ -120,16 +120,6 @@ $lang->admin->menuList->dev['menuOrder']['10'] = 'db'; $lang->admin->menuList->dev['menuOrder']['15'] = 'editor'; $lang->admin->menuList->dev['menuOrder']['20'] = 'entry'; -if($config->vision == 'lite') -{ - unset($lang->admin->menuList->system['subMenu']['mode']); - unset($lang->admin->menuList->system['subMenu']['buildindex']); - unset($lang->admin->menuList->system['subMenu']['tableengine']); - unset($lang->admin->menuList->system['menuOrder']['5']); - unset($lang->admin->menuList->system['menuOrder']['45']); - unset($lang->admin->menuList->system['menuOrder']['50']); -} - if($config->edition != 'max') unset($lang->admin->menuList->model['subMenu']['scrum']); if(!helper::hasFeature('waterfall')) { @@ -147,3 +137,23 @@ if($config->edition == 'max' and !helper::hasFeature('scrum_auditplan')) unset($lang->admin->menuList->model['subMenu']['scrum']); } } + +if($config->vision == 'lite') +{ + unset($lang->admin->menuList->system['subMenu']['mode']); + unset($lang->admin->menuList->system['subMenu']['buildindex']); + unset($lang->admin->menuList->system['subMenu']['tableengine']); + unset($lang->admin->menuList->system['menuOrder']['5']); + unset($lang->admin->menuList->system['menuOrder']['45']); + unset($lang->admin->menuList->system['menuOrder']['50']); + + unset($lang->admin->menuList->model['subMenu']['scrum']); + unset($lang->admin->menuList->model['subMenu']['waterfall']); + unset($lang->admin->menuList->model['menuOrder']['10']); + unset($lang->admin->menuList->model['menuOrder']['15']); + + unset($lang->admin->menuList->feature['subMenu']['execution']); + unset($lang->admin->menuList->feature['subMenu']['qa']); + unset($lang->admin->menuList->feature['menuOrder']['15']); + unset($lang->admin->menuList->feature['menuOrder']['20']); +}
group->module;?>