@@ -80,7 +81,8 @@ - createLink('story', 'view', "storyID=$storyID", '', true), $lang->preview, '', "class='btn' id='preview'");?> + + createLink('story', 'view', "storyID=$storyID", '', true), $lang->preview, '', "class='btn $class' id='preview'");?>
From 4ca1a13e34d898309f7c28c7023102d4a4cd5750 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Wed, 13 Oct 2021 17:46:10 +0800 Subject: [PATCH 22/44] * Fix bug #15504. --- module/testcase/js/create.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/testcase/js/create.js b/module/testcase/js/create.js index 137462b9bc..3eec6d7082 100644 --- a/module/testcase/js/create.js +++ b/module/testcase/js/create.js @@ -136,6 +136,8 @@ $(function() else if(e.keyCode == 13) selectItem($selected); }); + if(!isonlybody) $("#preview").modalTrigger({width:960, type:'iframe'}); + $('[data-toggle=tooltip]').tooltip(); initSteps(); From 756576f2e4b8cc7affd48bd1cb627004b6b71ed0 Mon Sep 17 00:00:00 2001 From: liyuchun Date: Thu, 14 Oct 2021 09:00:36 +0800 Subject: [PATCH 23/44] * Finish task #43205. --- module/personnel/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/personnel/model.php b/module/personnel/model.php index 1959bcb97b..b653bc762f 100644 --- a/module/personnel/model.php +++ b/module/personnel/model.php @@ -677,10 +677,10 @@ class personnelModel extends model */ public function deleteProductWhitelist($productID, $account = '') { - $product = $this->dao->select('id,whitelist')->from(TABLE_PRODUCT)->where('id')->eq($productID)->fetch('whitelist'); + $whitelist = $this->dao->select('id,whitelist')->from(TABLE_PRODUCT)->where('id')->eq($productID)->fetch('whitelist'); if(empty($product)) return false; - $newWhitelist = str_replace(',' . $account, '', $product->whitelist); + $newWhitelist = str_replace(',' . $account, '', $whitelist); $this->dao->update(TABLE_PRODUCT)->set('whitelist')->eq($newWhitelist)->where('id')->eq($productID)->exec(); $this->dao->delete()->from(TABLE_ACL) ->where('objectID')->eq($productID) From 02717dbe648e9bc839ab02720658e422e4ef5df1 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Thu, 14 Oct 2021 09:19:56 +0800 Subject: [PATCH 24/44] * Fix bug#15512. --- module/install/js/step4.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/module/install/js/step4.js b/module/install/js/step4.js index 864d84cd63..8ce4d661c9 100644 --- a/module/install/js/step4.js +++ b/module/install/js/step4.js @@ -8,3 +8,16 @@ function showVideo() { $('video').removeClass('hidden'); } + +$(function() +{ + $('#modeclassic').click(function() + { + $('#selectedModeTips').show(); + }); + + $('#modenew').click(function() + { + $('#selectedModeTips').hide(); + }); +}) From 04fce5278bf5b116af9232a6d52dc433d2408d08 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 14 Oct 2021 09:37:41 +0800 Subject: [PATCH 25/44] * Fix bug #15500. --- module/action/lang/de.php | 2 +- module/action/lang/en.php | 2 +- module/action/lang/fr.php | 4 ++-- module/action/lang/vi.php | 2 +- module/action/lang/zh-cn.php | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/module/action/lang/de.php b/module/action/lang/de.php index d5f35b9bdb..7d8d8eaca2 100644 --- a/module/action/lang/de.php +++ b/module/action/lang/de.php @@ -12,7 +12,7 @@ $lang->action->common = 'Log'; $lang->action->product = $lang->productCommon; $lang->action->project = 'Project'; -$lang->action->execution = $lang->executionCommon; +$lang->action->execution = $lang->execution->common; $lang->action->objectType = 'Object Type'; $lang->action->objectID = 'ID'; $lang->action->objectName = 'Objekt Name'; diff --git a/module/action/lang/en.php b/module/action/lang/en.php index a1a1e823dc..a74203313e 100755 --- a/module/action/lang/en.php +++ b/module/action/lang/en.php @@ -15,7 +15,7 @@ $lang->action->common = 'Log'; $lang->action->id = 'ID'; $lang->action->product = $lang->productCommon; $lang->action->project = 'Project'; -$lang->action->execution = $lang->executionCommon; +$lang->action->execution = $lang->execution->common; $lang->action->objectType = 'Object Type'; $lang->action->objectID = 'ID'; $lang->action->objectName = 'Object Name'; diff --git a/module/action/lang/fr.php b/module/action/lang/fr.php index 8cfb507284..0754fd1130 100644 --- a/module/action/lang/fr.php +++ b/module/action/lang/fr.php @@ -11,8 +11,8 @@ */ $lang->action->common = 'Log'; $lang->action->product = $lang->productCommon; -$lang->action->project = $lang->executionCommon; -$lang->action->execution = $lang->executionCommon; +$lang->action->project = 'Project'; +$lang->action->execution = $lang->execution->common; $lang->action->objectType = "Type d'objet"; $lang->action->objectID = 'ID'; $lang->action->objectName = "Nom de l'object"; diff --git a/module/action/lang/vi.php b/module/action/lang/vi.php index 4f3a7ffef2..67a7ae7567 100644 --- a/module/action/lang/vi.php +++ b/module/action/lang/vi.php @@ -12,7 +12,7 @@ $lang->action->common = 'Nhật ký'; $lang->action->product = $lang->productCommon; $lang->action->project = 'Project'; -$lang->action->execution = $lang->executionCommon; +$lang->action->execution = $lang->execution->common; $lang->action->objectType = 'Loại đối tượng'; $lang->action->objectID = 'ID'; $lang->action->objectName = 'Tên đối tượng'; diff --git a/module/action/lang/zh-cn.php b/module/action/lang/zh-cn.php index eada01b40c..2f1e82893b 100755 --- a/module/action/lang/zh-cn.php +++ b/module/action/lang/zh-cn.php @@ -15,7 +15,7 @@ $lang->action->common = '系统日志'; $lang->action->id = '编号'; $lang->action->product = $lang->productCommon; $lang->action->project = '项目'; -$lang->action->execution = $lang->executionCommon; +$lang->action->execution = $lang->execution->common; $lang->action->objectType = '对象类型'; $lang->action->objectID = '对象ID'; $lang->action->objectName = '对象名称'; From 01e57a1c570e5263852a074e7262fa89a26d0312 Mon Sep 17 00:00:00 2001 From: liyuchun Date: Thu, 14 Oct 2021 10:05:53 +0800 Subject: [PATCH 26/44] * Fix bug #15514. --- module/personnel/model.php | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/module/personnel/model.php b/module/personnel/model.php index b653bc762f..ae4372e890 100644 --- a/module/personnel/model.php +++ b/module/personnel/model.php @@ -677,17 +677,26 @@ class personnelModel extends model */ public function deleteProductWhitelist($productID, $account = '') { - $whitelist = $this->dao->select('id,whitelist')->from(TABLE_PRODUCT)->where('id')->eq($productID)->fetch('whitelist'); + $product = $this->dao->select('id,whitelist')->from(TABLE_PRODUCT)->where('id')->eq($productID)->fetch(); if(empty($product)) return false; - $newWhitelist = str_replace(',' . $account, '', $whitelist); + $newWhitelist = str_replace(',' . $account, '', $product->whitelist); $this->dao->update(TABLE_PRODUCT)->set('whitelist')->eq($newWhitelist)->where('id')->eq($productID)->exec(); - $this->dao->delete()->from(TABLE_ACL) + $result = $this->dao->delete()->from(TABLE_ACL) ->where('objectID')->eq($productID) ->andWhere('account')->eq($account) ->andWhere('objectType')->eq('product') ->andWhere('source')->eq('sync') ->exec(); + + /* Update user view when delete success. */ + if($result) + { + $viewProducts = $this->dao->select('products')->from(TABLE_USERVIEW)->where('account')->eq($account)->fetch('products'); + $newViewProducts = trim(str_replace(",$productID,", '', ",$viewProducts,"), ','); + $this->dao->update(TABLE_USERVIEW)->set('products')->eq($newViewProducts)->where('account')->eq($account)->exec(); + } + } /** @@ -711,12 +720,20 @@ class personnelModel extends model { $newWhitelist = str_replace(',' . $account, '', $program->whitelist); $this->dao->update(TABLE_PROGRAM)->set('whitelist')->eq($newWhitelist)->where('id')->eq($programID)->exec(); - $this->dao->delete()->from(TABLE_ACL) + $result = $this->dao->delete()->from(TABLE_ACL) ->where('objectID')->eq($programID) ->andWhere('account')->eq($account) ->andWhere('objectType')->eq('program') ->andWhere('source')->eq('sync') ->exec(); + + /* Update user view when delete success. */ + if($result) + { + $viewPrograms = $this->dao->select('programs')->from(TABLE_USERVIEW)->where('account')->eq($account)->fetch('programs'); + $newViewPrograms = trim(str_replace(",$programID,", '', ",$viewPrograms,"), ','); + $this->dao->update(TABLE_USERVIEW)->set('programs')->eq($newViewPrograms)->where('account')->eq($account)->exec(); + } } $this->loadModel('user')->updateUserView($programID, 'program', array($account)); } @@ -734,7 +751,7 @@ class personnelModel extends model $project = $this->dao->select('id,project,whitelist')->from(TABLE_PROJECT)->where('id')->eq($objectID)->fetch(); if(empty($project)) return false; - $projectID = $project->project; + $projectID = $project->project ? $project->project : $objectID; $sprints = $this->dao->select('id')->from(TABLE_PROJECT)->where('project')->eq($projectID)->andWhere('deleted')->eq('0')->fetchPairs('id'); $whitelist = $this->dao->select('*')->from(TABLE_ACL)->where('objectID')->in($sprints)->andWhere('account')->eq($account)->andWhere('objectType')->eq('sprint')->fetch(); @@ -743,12 +760,20 @@ class personnelModel extends model { $newWhitelist = str_replace(',' . $account, '', $project->whitelist); $this->dao->update(TABLE_PROJECT)->set('whitelist')->eq($newWhitelist)->where('id')->eq($projectID)->exec(); - $this->dao->delete()->from(TABLE_ACL) + $result = $this->dao->delete()->from(TABLE_ACL) ->where('objectID')->eq($projectID) ->andWhere('account')->eq($account) ->andWhere('objectType')->eq('project') ->andWhere('source')->eq('sync') ->exec(); + + /* Update user view when delete success. */ + if($result) + { + $viewProjects = $this->dao->select('projects')->from(TABLE_USERVIEW)->where('account')->eq($account)->fetch('projects'); + $newViewProjects = trim(str_replace(",$projectID,", '', ",$viewProjects,"), ','); + $this->dao->update(TABLE_USERVIEW)->set('projects')->eq($newViewProjects)->where('account')->eq($account)->exec(); + } } $this->loadModel('user')->updateUserView($projectID, 'project', array($account)); } From b811e3c80d5916ef4fc5a7ce24bdd5263b0ea7c0 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Thu, 14 Oct 2021 10:05:42 +0800 Subject: [PATCH 27/44] * Fix bug#15513. --- module/product/view/create.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/product/view/create.html.php b/module/product/view/create.html.php index f728b63cc5..179d5646a2 100644 --- a/module/product/view/create.html.php +++ b/module/product/view/create.html.php @@ -29,7 +29,7 @@