From 72fdd4a52bfb46a2cb2c8d5a81d864f677cba6f0 Mon Sep 17 00:00:00 2001 From: hufangzhou <746775970@qq.com> Date: Mon, 26 Apr 2021 16:41:17 +0800 Subject: [PATCH 1/8] * Fix bug #12366. --- module/product/view/browse.html.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index 9b10f31353..6627e0ddc0 100644 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -81,9 +81,7 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : ''; moduleName = $this->app->rawModule; - $this->methodName = $this->app->rawMethod; - foreach(customModel::getFeatureMenu($this->moduleName, $this->methodName) as $menuItem) + foreach(customModel::getFeatureMenu($this->app->rawModule, $this->app->rawMethod) as $menuItem) { if(isset($menuItem->hidden)) continue; if($menuItem->name == 'emptysr' && $storyType == 'story') continue; From f2fb924b0cb8cadafe912e25a74c8ebde7e65bed Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Mon, 26 Apr 2021 16:58:29 +0800 Subject: [PATCH 2/8] * Fix bug #12189. --- module/execution/control.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/module/execution/control.php b/module/execution/control.php index ff9790639d..d9b8526fc4 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2824,6 +2824,10 @@ class execution extends control $this->fetch('file', 'export2' . $this->post->fileType, $_POST); } + $this->loadModel('project'); + $project = $this->project->getByID($this->session->project); + if($project->model == 'waterfall') $this->lang->executionCommon = $this->lang->project->stage; + $this->view->fileName = (in_array($status, array('all', 'undone')) ? $this->lang->execution->$status : $this->lang->execution->statusList[$status]) . $this->lang->executionCommon; $this->display(); From 6141efa38c36cd3d0741d3c97979856aa79ef989 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Mon, 26 Apr 2021 17:12:04 +0800 Subject: [PATCH 3/8] * Fix bug #12405. --- module/execution/model.php | 8 ++++++++ module/repo/lang/de.php | 1 + module/repo/lang/en.php | 1 + module/repo/lang/fr.php | 1 + module/repo/lang/vi.php | 1 + module/repo/lang/zh-cn.php | 2 +- 6 files changed, 13 insertions(+), 1 deletion(-) diff --git a/module/execution/model.php b/module/execution/model.php index 98d21220cf..a65a6ec287 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -69,6 +69,14 @@ class executionModel extends model /* Unset story, bug, build and testtask if type is ops. */ $execution = $this->getByID($executionID); + if($execution->type == 'stage') + { + global $lang; + $this->loadModel('execution'); + $lang->executionCommon = $lang->project->stage; + include $this->app->getModulePath('execution') . 'lang/' . $this->app->getClientLang() . '.php'; + } + if($execution and $execution->lifetime == 'ops') { unset($this->lang->execution->menu->story); diff --git a/module/repo/lang/de.php b/module/repo/lang/de.php index 5a7cb805fb..bf3115dcdf 100644 --- a/module/repo/lang/de.php +++ b/module/repo/lang/de.php @@ -3,6 +3,7 @@ $lang->repo->common = 'Repo'; $lang->repo->browse = 'View'; $lang->repo->viewRevision = 'View Revision'; $lang->repo->product = 'Product'; +$lang->repo->execution = $lang->execution->common; $lang->repo->create = 'Create'; $lang->repo->createAction = 'Create Repo'; $lang->repo->maintain = 'Repo List'; diff --git a/module/repo/lang/en.php b/module/repo/lang/en.php index eee7437991..b3e3dc2c0d 100644 --- a/module/repo/lang/en.php +++ b/module/repo/lang/en.php @@ -3,6 +3,7 @@ $lang->repo->common = 'Repo'; $lang->repo->browse = 'View'; $lang->repo->viewRevision = 'View Revision'; $lang->repo->product = 'Product'; +$lang->repo->execution = $lang->execution->common; $lang->repo->create = 'Create'; $lang->repo->maintain = 'Repo List'; $lang->repo->edit = 'Edit'; diff --git a/module/repo/lang/fr.php b/module/repo/lang/fr.php index 3f011c9ee1..c721198dc5 100644 --- a/module/repo/lang/fr.php +++ b/module/repo/lang/fr.php @@ -3,6 +3,7 @@ $lang->repo->common = 'Référentiel'; $lang->repo->browse = 'Aff'; $lang->repo->viewRevision = 'Aff Modifs'; $lang->repo->product = 'Product'; +$lang->repo->execution = $lang->execution->common; $lang->repo->create = 'Créer'; $lang->repo->createAction = 'Créer Ref'; $lang->repo->maintain = 'Liste Ref'; diff --git a/module/repo/lang/vi.php b/module/repo/lang/vi.php index c10b46b417..8bb4b65b87 100644 --- a/module/repo/lang/vi.php +++ b/module/repo/lang/vi.php @@ -3,6 +3,7 @@ $lang->repo->common = 'Repo'; $lang->repo->browse = 'Xem'; $lang->repo->viewRevision = 'Xem Revision'; $lang->repo->product = 'Product'; +$lang->repo->execution = $lang->execution->common; $lang->repo->create = 'Tạo'; $lang->repo->createAction = 'Tạo Repo'; $lang->repo->maintain = 'Repo danh sách'; diff --git a/module/repo/lang/zh-cn.php b/module/repo/lang/zh-cn.php index 84cf76f53d..d073a70b36 100644 --- a/module/repo/lang/zh-cn.php +++ b/module/repo/lang/zh-cn.php @@ -3,7 +3,7 @@ $lang->repo->common = '代码'; $lang->repo->browse = '浏览'; $lang->repo->viewRevision = '查看修订'; $lang->repo->product = '所属产品'; -$lang->repo->execution = '所属' . $lang->executionCommon; +$lang->repo->execution = '所属' . $lang->execution->common; $lang->repo->create = '创建'; $lang->repo->maintain = '版本库列表'; $lang->repo->edit = '编辑'; From a20f580a5db0366e5971421494e96e4f8ec6f43e Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Mon, 26 Apr 2021 17:29:18 +0800 Subject: [PATCH 4/8] * Fix bug #12402. --- module/action/view/trash.html.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/action/view/trash.html.php b/module/action/view/trash.html.php index 918bd224d7..d29da838b8 100755 --- a/module/action/view/trash.html.php +++ b/module/action/view/trash.html.php @@ -54,8 +54,8 @@ $methodName = 'view'; if($module == 'caselib') { - $methodName = 'libview'; - $module = 'testsuite'; + $methodName = 'view'; + $module = 'caselib'; } if(isset($config->action->customFlows[$action->objectType])) { From 23800eace12f67310bbcc24af99a80cda2d27f61 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 26 Apr 2021 17:32:10 +0800 Subject: [PATCH 5/8] * adjust for gitlab. --- lib/scm/gitlab.class.php | 419 +++++++++++++++++---------------- module/repo/view/diff.html.php | 4 +- 2 files changed, 212 insertions(+), 211 deletions(-) diff --git a/lib/scm/gitlab.class.php b/lib/scm/gitlab.class.php index b4ffdb6514..ecf9871531 100644 --- a/lib/scm/gitlab.class.php +++ b/lib/scm/gitlab.class.php @@ -5,13 +5,13 @@ class gitlab public $projectID; /** - * Construct - * + * Construct + * * @param string $client gitlab api url. * @param string $root id of gitlab project. * @param string $username null * @param string $password token of gitlab api. - * @param string $encoding + * @param string $encoding * @access public * @return void */ @@ -25,9 +25,9 @@ class gitlab /** * List files. - * - * @param string $path - * @param string $revision + * + * @param string $path + * @param string $revision * @access public * @return array */ @@ -41,124 +41,124 @@ class gitlab $param->ref = $revision; $param->recursive = 0; - $list = $this->fetch($api, $param); + $list = $this->fetch($api, $param); if(empty($list)) return array(); $infos = array(); foreach($list as $file) { - $info = new stdClass(); - if($file->type == 'blob') - { + $info = new stdClass(); + if($file->type == 'blob') + { $path = $file->path; - $file = $this->files($file->path); - - $info->name = $file->file_name; - $info->kind = 'file'; - $info->account = $file->committer; - $info->date = $file->date; - $info->size = $file->size; - $info->comment = $file->comment; - $info->revision = $file->revision; - } - else - { - $commits = $this->getCommitsByPath($file->path); - if(empty($commits)) continue; - $commit = $commits[0]; + $file = $this->files($file->path); - $info->name = $file->path; - $info->kind = 'dir'; - $info->revision = $commit->id; - $info->account = $commit->committer_name; - $info->date = date('Y-m-d H:i:s', strtotime($commit->committed_date)); - $info->size = 0; - $info->comment = $commit->message; - } + $info->name = $file->file_name; + $info->kind = 'file'; + $info->account = $file->committer; + $info->date = $file->date; + $info->size = $file->size; + $info->comment = $file->comment; + $info->revision = $file->revision; + } + else + { + $commits = $this->getCommitsByPath($file->path); + if(empty($commits)) continue; + $commit = $commits[0]; - $infos[] = $info; - unset($info); - } + $info->name = $file->path; + $info->kind = 'dir'; + $info->revision = $commit->id; + $info->account = $commit->committer_name; + $info->date = date('Y-m-d H:i:s', strtotime($commit->committed_date)); + $info->size = 0; + $info->comment = $commit->message; + } - /* Sort by kind */ - foreach($infos as $key => $info) $kinds[$key] = $info->kind; - if($infos) array_multisort($kinds, SORT_ASC, $infos); - return $infos; - } + $infos[] = $info; + unset($info); + } - /** - * Get files info. - * - * @param string $path - * @param string $ref - * @access public - * @return array - */ - public function files($path, $ref = 'master') - { - $path = urlencode($path); - $api = "files/$path"; - $param = new stdclass(); - $param->ref = $ref; - $file = $this->fetch($api, $param); + /* Sort by kind */ + foreach($infos as $key => $info) $kinds[$key] = $info->kind; + if($infos) array_multisort($kinds, SORT_ASC, $infos); + return $infos; + } - $commits = $this->getCommitsByPath($path); - $file->revision = $file->commit_id; - $file->size = $this->formatBytes($file->size); + /** + * Get files info. + * + * @param string $path + * @param string $ref + * @access public + * @return array + */ + public function files($path, $ref = 'master') + { + $path = urlencode($path); + $api = "files/$path"; + $param = new stdclass(); + $param->ref = $ref; + $file = $this->fetch($api, $param); - if(!empty($commits)) - { - $commit = $commits[0]; - $file->committer = $commit->committer_name; - $file->comment = $commit->message; - $file->date = date('Y-m-d H:i:s', strtotime($commit->committed_date)); - } + $commits = $this->getCommitsByPath($path); + $file->revision = $file->commit_id; + $file->size = $this->formatBytes($file->size); - return $file; - } + if(!empty($commits)) + { + $commit = $commits[0]; + $file->committer = $commit->committer_name; + $file->comment = $commit->message; + $file->date = date('Y-m-d H:i:s', strtotime($commit->committed_date)); + } - /** - * Get tags - * - * @param string $path - * @param string $revision - * @access public - * @return array - */ - public function tags($path, $revision = 'HEAD') - { - $api = "tags"; + return $file; + } + + /** + * Get tags + * + * @param string $path + * @param string $revision + * @access public + * @return array + */ + public function tags($path, $revision = 'HEAD') + { + $api = "tags"; $list = $this->fetch($api); $tags = array(); foreach($list as $tag) $tags[] = $tag->name; - return $tags; - } + return $tags; + } - /** - * Get branch - * - * @access public - * @return array - */ - public function branch() - { - $api = "branches"; - $list = $this->fetch($api); + /** + * Get branch + * + * @access public + * @return array + */ + public function branch() + { + $api = "branches"; + $list = $this->fetch($api); - $branches = array(); - foreach($list as $branch) $branches[$branch->name] = $branch->name; - asort($branches); + $branches = array(); + foreach($list as $branch) $branches[$branch->name] = $branch->name; + asort($branches); - return $branches; - } + return $branches; + } - /** - * Get last log. - * - * @param string $path - * @param int $count + /** + * Get last log. + * + * @param string $path + * @param int $count * @access public * @return array */ @@ -169,11 +169,11 @@ class gitlab /** * Get logs. - * - * @param string $path - * @param string $fromRevision - * @param string $toRevision - * @param int $count + * + * @param string $path + * @param string $fromRevision + * @param string $toRevision + * @param int $count * @access public * @return array */ @@ -193,9 +193,9 @@ class gitlab /** * Blame file - * - * @param string $path - * @param string $revision + * + * @param string $path + * @param string $revision * @access public * @return array */ @@ -204,47 +204,47 @@ class gitlab if(!scm::checkRevision($revision)) return array(); $path = ltrim($path, DIRECTORY_SEPARATOR); - $path = urlencode($path); - $api = "files/$path/blame"; - $param = new stdclass; - $param->ref = $this->branch; + $path = urlencode($path); + $api = "files/$path/blame"; + $param = new stdclass; + $param->ref = $this->branch; $results = $this->fetch($api, $param); $blames = array(); $revLine = 0; $revision = ''; - $lineNumber = 1; - foreach($results as $blame) - { - $line = array(); - $line['revision'] = $blame->commit->id; - $line['committer'] = $blame->commit->committer_name; - $line['time'] = $blame->commit->committer_name; - $line['line'] = $lineNumber; - $line['lines'] = count($blame->lines); - $line['content'] = array_shift($blame->lines); + $lineNumber = 1; + foreach($results as $blame) + { + $line = array(); + $line['revision'] = $blame->commit->id; + $line['committer'] = $blame->commit->committer_name; + $line['time'] = $blame->commit->committer_name; + $line['line'] = $lineNumber; + $line['lines'] = count($blame->lines); + $line['content'] = array_shift($blame->lines); - $blames[] = $line; + $blames[] = $line; - $lineNumber ++; + $lineNumber ++; - foreach($blame->lines as $line) - { - $blames[] = array('line' => $lineNumber, 'content' => $line); - $lineNumber ++; - } - } + foreach($blame->lines as $line) + { + $blames[] = array('line' => $lineNumber, 'content' => $line); + $lineNumber ++; + } + } return $blames; } /** * Diff file. - * - * @param string $path - * @param string $fromRevision - * @param string $toRevision + * + * @param string $path + * @param string $fromRevision + * @param string $toRevision * @access public * @return array */ @@ -252,7 +252,7 @@ class gitlab { if(!scm::checkRevision($fromRevision)) return array(); if(!scm::checkRevision($toRevision)) return array(); - + $api = "compare"; $params = array('from' => $fromRevision, 'to' => $toRevision, 'straight' => 1); $results = $this->fetch($api, $params); @@ -277,9 +277,9 @@ class gitlab /** * Cat file. - * - * @param string $entry - * @param string $revision + * + * @param string $entry + * @param string $revision * @access public * @return string */ @@ -292,9 +292,9 @@ class gitlab /** * Get info. - * - * @param string $entry - * @param string $revision + * + * @param string $entry + * @param string $revision * @access public * @return object */ @@ -303,9 +303,10 @@ class gitlab if(!scm::checkRevision($revision)) return false; $info = new stdclass(); - $info->kind = 'dir'; - $info->path = $entry; - $info->root = ''; + $info->kind = 'dir'; + $info->path = $entry; + $info->revision = $revision; + $info->root = ''; if($entry) { @@ -327,15 +328,14 @@ class gitlab /** * Exec git cmd. - * - * @param string $cmd + * + * @param string $cmd * @access public * @todo Exec commads by gitlab api. * @return array */ public function exec($cmd) { - chdir($this->root); return execCmd(escapeCmd("$this->client $cmd"), 'array'); } @@ -436,9 +436,9 @@ class gitlab /** * Get commit count. - * - * @param int $commits - * @param string $lastVersion + * + * @param int $commits + * @param string $lastVersion * @access public * @return int */ @@ -453,7 +453,7 @@ class gitlab /** * Get first revision. - * + * * @access public * @return string */ @@ -465,8 +465,8 @@ class gitlab } /** - * Get latest revision - * + * Get latest revision + * * @access public * @return string */ @@ -480,10 +480,10 @@ class gitlab /** * Get commits. - * - * @param string $version - * @param int $count - * @param string $branch + * + * @param string $version + * @param int $count + * @param string $branch * @access public * @return array */ @@ -491,18 +491,19 @@ class gitlab { if(!scm::checkRevision($version)) return array(); $api = "commits"; - + $count = 500; $params = array(); $params['ref_name'] = $branch; $params['per_page'] = $count; $params['all'] = 1; - if($version) - { - $lastCommit = $this->getSingleCommit($version); - $params['until'] = $lastCommit->committed_date; - } + if($version) + { + $lastCommit = $this->getSingleCommit($version); + if(empty($lastCommit)) return array(); + $params['until'] = $lastCommit->committed_date; + } $list = $this->fetch($api, $params); @@ -514,42 +515,42 @@ class gitlab $log->revision = $commit->id; $log->comment = $commit->message; $log->time = date('Y-m-d H:i:s', strtotime($commit->created_at)); - + $commits[$commit->id] = $log; - $files[$commit->id] = $this->getFilesByCommit($log->revision); + $files[$commit->id] = $this->getFilesByCommit($log->revision); } return array('commits' => $commits, 'files' => $files); } - /** - * getCommit - * - * @param int $sha - * @access public - * @return void - */ - public function getSingleCommit($sha) - { + /** + * getCommit + * + * @param int $sha + * @access public + * @return void + */ + public function getSingleCommit($sha) + { if(!scm::checkRevision($sha)) return null; $api = "commits/$sha"; - return $this->fetch($api); - } + return $this->fetch($api); + } - /** - * Get commits by path. - * - * @param string $path - * @access public - * @return array - */ - public function getCommitsByPath($path, $fromRevision = '', $toRevision = '') - { + /** + * Get commits by path. + * + * @param string $path + * @access public + * @return array + */ + public function getCommitsByPath($path, $fromRevision = '', $toRevision = '') + { $path = ltrim($path, DIRECTORY_SEPARATOR); - $api = "commits"; + $api = "commits"; - $param = new stdclass(); - $param->path = urldecode($path); + $param = new stdclass(); + $param->path = urldecode($path); $param->ref_name = $this->branch; if($fromRevision) $fromRevision = $this->getSingleCommit($fromRevision); @@ -566,13 +567,13 @@ class gitlab $param->since = $since; $param->until = $until; - return $this->fetch($api, $param); - } + return $this->fetch($api, $param); + } /** * Get files by commit. - * - * @param string $commit + * + * @param string $commit * @access public * @return void */ @@ -598,7 +599,7 @@ class gitlab $file->revision = $revision; $file->path = '/' . $row->new_path; $file->type = 'file'; - + $file->action = 'M'; if($row->new_file) $file->action = 'A'; if($row->renamed_file) $file->action = 'R'; @@ -611,9 +612,9 @@ class gitlab /** * Repository/tree api. - * - * @param string $path - * @param bool $recursive + * + * @param string $path + * @param bool $recursive * @access public * @return void */ @@ -630,8 +631,8 @@ class gitlab /** * Fetch data from gitlab api. - * - * @param string $api + * + * @param string $api * @access public * @return void */ @@ -640,7 +641,7 @@ class gitlab $params = (array) $params; $params['private_token'] = $this->token; - $api = ltrim($api, '/'); + $api = ltrim($api, '/'); $api = $this->root . $api . '?' . http_build_query($params); $response = file_get_contents($api); @@ -649,24 +650,24 @@ class gitlab /** * Format bytes shown. - * - * @param int $size + * + * @param int $size * @static * @access public * @return string */ public static function formatBytes($size) - { - if($size < 1024) return $size . 'Bytes'; + { + if($size < 1024) return $size . 'Bytes'; if(round($size / (1024 * 1024), 2) > 1) return round($size / (1024 * 1024), 2) . 'G'; - if(round($size / 1024, 2) > 1) return round($size / 1024, 2) . 'M'; - return round($size, 2) . 'KB'; - } + if(round($size / 1024, 2) > 1) return round($size / 1024, 2) . 'M'; + return round($size, 2) . 'KB'; + } /** * Parse log. - * - * @param array $logs + * + * @param array $logs * @access public * @return array */ diff --git a/module/repo/view/diff.html.php b/module/repo/view/diff.html.php index 3b90e8ca66..59e039f51c 100644 --- a/module/repo/view/diff.html.php +++ b/module/repo/view/diff.html.php @@ -29,7 +29,7 @@
repo->createLink('browse', "repoID=$repoID&branchID=&objectID=$objectID"), $repo->name, '', "data-app='{$app->openApp}'"); - $paths= explode('/', $entry); + $paths = explode('/', $entry); $fileName = array_pop($paths); $postPath = ''; foreach($paths as $pathName) @@ -41,7 +41,7 @@ if(strpos($repo->SCM, 'Subversion') === false) { $oldRevision = $oldRevision == '^' ? "$newRevision" : $oldRevision; - echo " " . substr($oldRevision, 0, 10) . " : " . substr($newRevision, 0, 10) . ' (' . $historys[$oldRevision] . ' : ' . $historys[$newRevision] . ')'; + echo " " . substr($oldRevision, 0, 10) . " : " . substr($newRevision, 0, 10) . ' (' . zget($historys, $oldRevision, '') . ' : ' . zget($historys, $newRevision, '') . ')'; } else { From 532f08788483d713a14c2c3b59a389a748b03fae Mon Sep 17 00:00:00 2001 From: Catouse Date: Mon, 26 Apr 2021 17:53:42 +0800 Subject: [PATCH 6/8] * improve UI of more apps menu. --- module/index/css/index.css | 2 +- module/index/js/index.js | 26 +++++++++++++++++++++++--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/module/index/css/index.css b/module/index/css/index.css index 535005d726..aeaf97d55a 100644 --- a/module/index/css/index.css +++ b/module/index/css/index.css @@ -25,7 +25,7 @@ body.menu-hide {padding-left: 0;} .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 {left: 100%; margin-left: -2px; top: 0; 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 > a > .icon {opacity: 1; font-size: 16px;} diff --git a/module/index/js/index.js b/module/index/js/index.js index d12804dbd3..e1c90b56dd 100644 --- a/module/index/js/index.js +++ b/module/index/js/index.js @@ -429,7 +429,7 @@ var maxHeight = $menuNav.height(); var showMoreMenu = false; var currentHeight = 40; - var moreMenuHeight = 13; + var moreMenuHeight = 12; $menuItems.each(function() { @@ -450,7 +450,7 @@ if(isDivider) return; } - moreMenuHeight += isDivider ? 13 : 31; + moreMenuHeight += isDivider ? 13 : 30; $list.append($item.clone().removeClass('hidden')); } else @@ -461,7 +461,26 @@ /* The magic number "111" is the space between dropdown trigger btn and the bottom of screen */ - $list.css('top', moreMenuHeight > 111 ? 111 - moreMenuHeight : ''); + var listStyle = {maxHeight: 'initial', top: moreMenuHeight > 111 ? 111 - moreMenuHeight : ''}; + if($list[0].getBoundingClientRect) + { + var btnBounding = $list.prev('a')[0].getBoundingClientRect(); + if(btnBounding.height) + { + var winHeight = $(window).height(); + if(winHeight < moreMenuHeight) + { + listStyle.maxHeight = winHeight; + listStyle.overflow = 'auto'; + listStyle.top = 5 - btnBounding.top; + } + else if(moreMenuHeight > (winHeight - btnBounding.top)) + { + listStyle.top = winHeight - btnBounding.top - moreMenuHeight + 5; + } + } + } + $list.css(listStyle); $menuNav.toggleClass('show-more-nav', showMoreMenu); if(showMoreMenu && !$list.data('listened-click')) @@ -554,6 +573,7 @@ /* Refresh more menu on window resize */ $(window).on('resize', refreshMoreMenu); refreshMoreMenu(); + setTimeout(refreshMoreMenu, 500); }); }()); From b97ab834bf39f1a2cf3f27785a29cd6ec3b6f5d6 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Tue, 27 Apr 2021 10:23:49 +0800 Subject: [PATCH 7/8] * Fix bug #12411. --- module/block/view/bugblock.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/block/view/bugblock.html.php b/module/block/view/bugblock.html.php index fc925f1ccb..afdab88b10 100644 --- a/module/block/view/bugblock.html.php +++ b/module/block/view/bugblock.html.php @@ -53,7 +53,7 @@ ?> id);?> - createLink('bug', 'view', "bugID=$bug->id", '', '', $bug->project), $bug->title)?> + createLink('bug', 'view', "bugID=$bug->id"), $bug->title, '', "style='color: $bug->color'")?> From 65f9d1cb1cafea56dbcac1649387533ce095d735 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Tue, 27 Apr 2021 10:39:35 +0800 Subject: [PATCH 8/8] * Fix bug #12402. --- module/caselib/model.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/caselib/model.php b/module/caselib/model.php index 328bf2572a..55b27f7336 100644 --- a/module/caselib/model.php +++ b/module/caselib/model.php @@ -29,7 +29,9 @@ class caselibModel extends model if($libraries) { - $currentLibName = zget($libraries, $libID, ''); + $libName = ''; + if(!isset($libraries[$libID])) $libName = $this->dao->select('name')->from(TABLE_TESTSUITE)->where('id')->eq($libID)->fetch('name'); + $currentLibName = zget($libraries, $libID, $libName); setCookie("lastCaseLib", $libID, $this->config->cookieLife, $this->config->webRoot, '', false, true); $dropMenuLink = helper::createLink('caselib', 'ajaxGetDropMenu', "objectID=$libID&module=caselib&method=browse");