From f4f330223100b690cf9a45b8406258765821ef77 Mon Sep 17 00:00:00 2001 From: chentao Date: Wed, 14 Jun 2023 14:00:01 +0800 Subject: [PATCH] * Update the field name of the data table settings in the program module from uppercase to lowercase. --- module/program/config/dtable.php | 196 ++++++++++++------------- module/program/ui/productview.html.php | 6 +- 2 files changed, 101 insertions(+), 101 deletions(-) diff --git a/module/program/config/dtable.php b/module/program/config/dtable.php index caead3b348..6e9340ab05 100644 --- a/module/program/config/dtable.php +++ b/module/program/config/dtable.php @@ -56,121 +56,121 @@ $config->program->dtable->fieldList['actions']['fixed'] = 'right'; $config->program->dtable->fieldList['actions']['module'] = 'program'; /* DataTable fields of Product View. */ -$config->program->productView = new stdClass(); -$config->program->productView->dtable = new stdClass(); -$config->program->productView->dtable->fieldList = array(); +$config->program->productview = new stdClass(); +$config->program->productview->dtable = new stdClass(); +$config->program->productview->dtable->fieldList = array(); -$config->program->productView->dtable->fieldList['name']['name'] = 'name'; -$config->program->productView->dtable->fieldList['name']['title'] = $lang->nameAB; -$config->program->productView->dtable->fieldList['name']['type'] = 'title'; -$config->program->productView->dtable->fieldList['name']['nestedToggle'] = true; -$config->program->productView->dtable->fieldList['name']['checkbox'] = true; -$config->program->productView->dtable->fieldList['name']['sortType'] = true; -$config->program->productView->dtable->fieldList['name']['iconRender'] = 'RAWJSRAWJS'; -$config->program->productView->dtable->fieldList['name']['group'] = 'g1'; +$config->program->productview->dtable->fieldList['name']['name'] = 'name'; +$config->program->productview->dtable->fieldList['name']['title'] = $lang->nameAB; +$config->program->productview->dtable->fieldList['name']['type'] = 'title'; +$config->program->productview->dtable->fieldList['name']['nestedToggle'] = true; +$config->program->productview->dtable->fieldList['name']['checkbox'] = true; +$config->program->productview->dtable->fieldList['name']['sortType'] = true; +$config->program->productview->dtable->fieldList['name']['iconRender'] = 'RAWJSRAWJS'; +$config->program->productview->dtable->fieldList['name']['group'] = 'g1'; -$config->program->productView->dtable->fieldList['PM']['name'] = 'PM'; -$config->program->productView->dtable->fieldList['PM']['title'] = $lang->program->PM; -$config->program->productView->dtable->fieldList['PM']['type'] = 'avatarBtn'; -$config->program->productView->dtable->fieldList['PM']['group'] = 'g2'; +$config->program->productview->dtable->fieldList['PM']['name'] = 'PM'; +$config->program->productview->dtable->fieldList['PM']['title'] = $lang->program->PM; +$config->program->productview->dtable->fieldList['PM']['type'] = 'avatarBtn'; +$config->program->productview->dtable->fieldList['PM']['group'] = 'g2'; -$config->program->productView->dtable->fieldList['createdDate']['name'] = 'createdDate'; -$config->program->productView->dtable->fieldList['createdDate']['title'] = '创建时间'; -$config->program->productView->dtable->fieldList['createdDate']['type'] = 'date'; -$config->program->productView->dtable->fieldList['createdDate']['sortType'] = true; -$config->program->productView->dtable->fieldList['createdDate']['group'] = 'g3'; +$config->program->productview->dtable->fieldList['createdDate']['name'] = 'createdDate'; +$config->program->productview->dtable->fieldList['createdDate']['title'] = '创建时间'; +$config->program->productview->dtable->fieldList['createdDate']['type'] = 'date'; +$config->program->productview->dtable->fieldList['createdDate']['sortType'] = true; +$config->program->productview->dtable->fieldList['createdDate']['group'] = 'g3'; -$config->program->productView->dtable->fieldList['createdBy']['name'] = 'createdBy'; -$config->program->productView->dtable->fieldList['createdBy']['title'] = '创建者'; -$config->program->productView->dtable->fieldList['createdBy']['type'] = 'user'; -$config->program->productView->dtable->fieldList['createdBy']['group'] = 'g3'; +$config->program->productview->dtable->fieldList['createdBy']['name'] = 'createdBy'; +$config->program->productview->dtable->fieldList['createdBy']['title'] = '创建者'; +$config->program->productview->dtable->fieldList['createdBy']['type'] = 'user'; +$config->program->productview->dtable->fieldList['createdBy']['group'] = 'g3'; -$config->program->productView->dtable->fieldList['unclosedReqCount']['name'] = 'unclosedReqCount'; -$config->program->productView->dtable->fieldList['unclosedReqCount']['title'] = $lang->program->unclosedReqCount; -$config->program->productView->dtable->fieldList['unclosedReqCount']['minWidth'] = 100; -$config->program->productView->dtable->fieldList['unclosedReqCount']['type'] = 'number'; -$config->program->productView->dtable->fieldList['unclosedReqCount']['sortType'] = true; -$config->program->productView->dtable->fieldList['unclosedReqCount']['group'] = 'g4'; +$config->program->productview->dtable->fieldList['unclosedReqCount']['name'] = 'unclosedReqCount'; +$config->program->productview->dtable->fieldList['unclosedReqCount']['title'] = $lang->program->unclosedReqCount; +$config->program->productview->dtable->fieldList['unclosedReqCount']['minWidth'] = 100; +$config->program->productview->dtable->fieldList['unclosedReqCount']['type'] = 'number'; +$config->program->productview->dtable->fieldList['unclosedReqCount']['sortType'] = true; +$config->program->productview->dtable->fieldList['unclosedReqCount']['group'] = 'g4'; -$config->program->productView->dtable->fieldList['totalReq']['name'] = 'totalReq'; -$config->program->productView->dtable->fieldList['totalReq']['title'] = '需求总数'; -$config->program->productView->dtable->fieldList['totalReq']['minWidth'] = 100; -$config->program->productView->dtable->fieldList['totalReq']['type'] = 'number'; -$config->program->productView->dtable->fieldList['totalReq']['sortType'] = true; -$config->program->productView->dtable->fieldList['totalReq']['group'] = 'g4'; +$config->program->productview->dtable->fieldList['totalReq']['name'] = 'totalReq'; +$config->program->productview->dtable->fieldList['totalReq']['title'] = '需求总数'; +$config->program->productview->dtable->fieldList['totalReq']['minWidth'] = 100; +$config->program->productview->dtable->fieldList['totalReq']['type'] = 'number'; +$config->program->productview->dtable->fieldList['totalReq']['sortType'] = true; +$config->program->productview->dtable->fieldList['totalReq']['group'] = 'g4'; -$config->program->productView->dtable->fieldList['closedReqRate']['name'] = 'closedReqRate'; -$config->program->productView->dtable->fieldList['closedReqRate']['title'] = $lang->program->closedReqRate; -$config->program->productView->dtable->fieldList['closedReqRate']['minWidth'] = 100; -$config->program->productView->dtable->fieldList['closedReqRate']['type'] = 'progress'; -$config->program->productView->dtable->fieldList['closedReqRate']['sortType'] = true; -$config->program->productView->dtable->fieldList['closedReqRate']['group'] = 'g4'; +$config->program->productview->dtable->fieldList['closedReqRate']['name'] = 'closedReqRate'; +$config->program->productview->dtable->fieldList['closedReqRate']['title'] = $lang->program->closedReqRate; +$config->program->productview->dtable->fieldList['closedReqRate']['minWidth'] = 100; +$config->program->productview->dtable->fieldList['closedReqRate']['type'] = 'progress'; +$config->program->productview->dtable->fieldList['closedReqRate']['sortType'] = true; +$config->program->productview->dtable->fieldList['closedReqRate']['group'] = 'g4'; -$config->program->productView->dtable->fieldList['planCount']['name'] = 'plans'; -$config->program->productView->dtable->fieldList['planCount']['title'] = $lang->productplan->shortCommon; -$config->program->productView->dtable->fieldList['planCount']['type'] = 'number'; -$config->program->productView->dtable->fieldList['planCount']['sortType'] = true; -$config->program->productView->dtable->fieldList['planCount']['group'] = 'g5'; +$config->program->productview->dtable->fieldList['planCount']['name'] = 'plans'; +$config->program->productview->dtable->fieldList['planCount']['title'] = $lang->productplan->shortCommon; +$config->program->productview->dtable->fieldList['planCount']['type'] = 'number'; +$config->program->productview->dtable->fieldList['planCount']['sortType'] = true; +$config->program->productview->dtable->fieldList['planCount']['group'] = 'g5'; -$config->program->productView->dtable->fieldList['projectCount']['name'] = 'projects'; -$config->program->productView->dtable->fieldList['projectCount']['title'] = '项目'; -$config->program->productView->dtable->fieldList['projectCount']['type'] = 'text'; -$config->program->productView->dtable->fieldList['projectCount']['sortType'] = true; -$config->program->productView->dtable->fieldList['projectCount']['group'] = 'g5'; +$config->program->productview->dtable->fieldList['projectCount']['name'] = 'projects'; +$config->program->productview->dtable->fieldList['projectCount']['title'] = '项目'; +$config->program->productview->dtable->fieldList['projectCount']['type'] = 'text'; +$config->program->productview->dtable->fieldList['projectCount']['sortType'] = true; +$config->program->productview->dtable->fieldList['projectCount']['group'] = 'g5'; -$config->program->productView->dtable->fieldList['executionCount']['name'] = 'executionCount'; -$config->program->productView->dtable->fieldList['executionCount']['title'] = $lang->execution->common; -$config->program->productView->dtable->fieldList['executionCount']['type'] = 'number'; -$config->program->productView->dtable->fieldList['executionCount']['sortType'] = true; -$config->program->productView->dtable->fieldList['executionCount']['group'] = 'g5'; +$config->program->productview->dtable->fieldList['executionCount']['name'] = 'executionCount'; +$config->program->productview->dtable->fieldList['executionCount']['title'] = $lang->execution->common; +$config->program->productview->dtable->fieldList['executionCount']['type'] = 'number'; +$config->program->productview->dtable->fieldList['executionCount']['sortType'] = true; +$config->program->productview->dtable->fieldList['executionCount']['group'] = 'g5'; -$config->program->productView->dtable->fieldList['testCaseCoverage']['name'] = 'testCaseCoverage'; -$config->program->productView->dtable->fieldList['testCaseCoverage']['title'] = $lang->program->testCaseCoverage; -$config->program->productView->dtable->fieldList['testCaseCoverage']['minWidth'] = 100; -$config->program->productView->dtable->fieldList['testCaseCoverage']['type'] = 'progress'; -$config->program->productView->dtable->fieldList['testCaseCoverage']['sortType'] = true; -$config->program->productView->dtable->fieldList['testCaseCoverage']['group'] = 'g6'; +$config->program->productview->dtable->fieldList['testCaseCoverage']['name'] = 'testCaseCoverage'; +$config->program->productview->dtable->fieldList['testCaseCoverage']['title'] = $lang->program->testCaseCoverage; +$config->program->productview->dtable->fieldList['testCaseCoverage']['minWidth'] = 100; +$config->program->productview->dtable->fieldList['testCaseCoverage']['type'] = 'progress'; +$config->program->productview->dtable->fieldList['testCaseCoverage']['sortType'] = true; +$config->program->productview->dtable->fieldList['testCaseCoverage']['group'] = 'g6'; -$config->program->productView->dtable->fieldList['bugActivatedCount']['name'] = 'unResolvedBugs'; -$config->program->productView->dtable->fieldList['bugActivatedCount']['title'] = $lang->program->bugActivatedCount; -$config->program->productView->dtable->fieldList['bugActivatedCount']['minWidth'] = 86; -$config->program->productView->dtable->fieldList['bugActivatedCount']['type'] = 'number'; -$config->program->productView->dtable->fieldList['bugActivatedCount']['sortType'] = true; -$config->program->productView->dtable->fieldList['bugActivatedCount']['group'] = 'g7'; +$config->program->productview->dtable->fieldList['bugActivatedCount']['name'] = 'unResolvedBugs'; +$config->program->productview->dtable->fieldList['bugActivatedCount']['title'] = $lang->program->bugActivatedCount; +$config->program->productview->dtable->fieldList['bugActivatedCount']['minWidth'] = 86; +$config->program->productview->dtable->fieldList['bugActivatedCount']['type'] = 'number'; +$config->program->productview->dtable->fieldList['bugActivatedCount']['sortType'] = true; +$config->program->productview->dtable->fieldList['bugActivatedCount']['group'] = 'g7'; -$config->program->productView->dtable->fieldList['bugTotalCount']['name'] = 'bugTotalCount'; -$config->program->productView->dtable->fieldList['bugTotalCount']['title'] = 'Bug总数'; -$config->program->productView->dtable->fieldList['bugTotalCount']['minWidth'] = 86; -$config->program->productView->dtable->fieldList['bugTotalCount']['type'] = 'number'; -$config->program->productView->dtable->fieldList['bugTotalCount']['sortType'] = true; -$config->program->productView->dtable->fieldList['bugTotalCount']['group'] = 'g7'; +$config->program->productview->dtable->fieldList['bugTotalCount']['name'] = 'bugTotalCount'; +$config->program->productview->dtable->fieldList['bugTotalCount']['title'] = 'Bug总数'; +$config->program->productview->dtable->fieldList['bugTotalCount']['minWidth'] = 86; +$config->program->productview->dtable->fieldList['bugTotalCount']['type'] = 'number'; +$config->program->productview->dtable->fieldList['bugTotalCount']['sortType'] = true; +$config->program->productview->dtable->fieldList['bugTotalCount']['group'] = 'g7'; -$config->program->productView->dtable->fieldList['fixedRate']['name'] = 'fixedRate'; -$config->program->productView->dtable->fieldList['fixedRate']['title'] = $lang->program->fixedRate; -$config->program->productView->dtable->fieldList['fixedRate']['minWidth'] = 80; -$config->program->productView->dtable->fieldList['fixedRate']['type'] = 'progress'; -$config->program->productView->dtable->fieldList['fixedRate']['sortType'] = true; -$config->program->productView->dtable->fieldList['fixedRate']['group'] = 'g7'; +$config->program->productview->dtable->fieldList['fixedRate']['name'] = 'fixedRate'; +$config->program->productview->dtable->fieldList['fixedRate']['title'] = $lang->program->fixedRate; +$config->program->productview->dtable->fieldList['fixedRate']['minWidth'] = 80; +$config->program->productview->dtable->fieldList['fixedRate']['type'] = 'progress'; +$config->program->productview->dtable->fieldList['fixedRate']['sortType'] = true; +$config->program->productview->dtable->fieldList['fixedRate']['group'] = 'g7'; -$config->program->productView->dtable->fieldList['releaseCount']['name'] = 'releaseCount'; -$config->program->productView->dtable->fieldList['releaseCount']['title'] = $lang->release->common; -$config->program->productView->dtable->fieldList['releaseCount']['type'] = 'number'; -$config->program->productView->dtable->fieldList['releaseCount']['sortType'] = true; -$config->program->productView->dtable->fieldList['releaseCount']['group'] = 'g8'; +$config->program->productview->dtable->fieldList['releaseCount']['name'] = 'releaseCount'; +$config->program->productview->dtable->fieldList['releaseCount']['title'] = $lang->release->common; +$config->program->productview->dtable->fieldList['releaseCount']['type'] = 'number'; +$config->program->productview->dtable->fieldList['releaseCount']['sortType'] = true; +$config->program->productview->dtable->fieldList['releaseCount']['group'] = 'g8'; -$config->program->productView->dtable->fieldList['latestReleaseDate']['name'] = 'latestReleaseDate'; -$config->program->productView->dtable->fieldList['latestReleaseDate']['title'] = '最新发布时间'; -$config->program->productView->dtable->fieldList['latestReleaseDate']['minWidth'] = 120; -$config->program->productView->dtable->fieldList['latestReleaseDate']['type'] = 'date'; -$config->program->productView->dtable->fieldList['latestReleaseDate']['sortType'] = true; -$config->program->productView->dtable->fieldList['latestReleaseDate']['group'] = 'g8'; +$config->program->productview->dtable->fieldList['latestReleaseDate']['name'] = 'latestReleaseDate'; +$config->program->productview->dtable->fieldList['latestReleaseDate']['title'] = '最新发布时间'; +$config->program->productview->dtable->fieldList['latestReleaseDate']['minWidth'] = 120; +$config->program->productview->dtable->fieldList['latestReleaseDate']['type'] = 'date'; +$config->program->productview->dtable->fieldList['latestReleaseDate']['sortType'] = true; +$config->program->productview->dtable->fieldList['latestReleaseDate']['group'] = 'g8'; -$config->program->productView->dtable->fieldList['latestRelease']['name'] = 'latestRelease'; -$config->program->productView->dtable->fieldList['latestRelease']['title'] = '最新发布'; -$config->program->productView->dtable->fieldList['latestRelease']['minWidth'] = 80; -$config->program->productView->dtable->fieldList['latestRelease']['type'] = 'text'; -$config->program->productView->dtable->fieldList['latestRelease']['filterType'] = true; -$config->program->productView->dtable->fieldList['latestRelease']['group'] = 'g8'; +$config->program->productview->dtable->fieldList['latestRelease']['name'] = 'latestRelease'; +$config->program->productview->dtable->fieldList['latestRelease']['title'] = '最新发布'; +$config->program->productview->dtable->fieldList['latestRelease']['minWidth'] = 80; +$config->program->productview->dtable->fieldList['latestRelease']['type'] = 'text'; +$config->program->productview->dtable->fieldList['latestRelease']['filterType'] = true; +$config->program->productview->dtable->fieldList['latestRelease']['group'] = 'g8'; /* DataTable fields of Project View. */ $config->program->projectView = new stdClass(); diff --git a/module/program/ui/productview.html.php b/module/program/ui/productview.html.php index f7fe5d0e47..54edb7355d 100644 --- a/module/program/ui/productview.html.php +++ b/module/program/ui/productview.html.php @@ -1,7 +1,7 @@ program->productView->dtable->fieldList); +$cols = array_values($config->program->productview->dtable->fieldList); $totalStories = 0; $hasProduct = false; @@ -47,7 +47,6 @@ foreach($productStructure as $programID => $program) $item->name = $program['programName']; $item->id = 'program-' . $programID; $item->type = 'program'; - $item->level = 1; $item->asParent = true; $item->feedback = rand(0, 100); $item->programName = $program['programName']; @@ -196,9 +195,10 @@ toolbar dtable ( - set::className('shadow rounded'), set::cols($cols), set::data($data), + set::customCols(true), + set::className('shadow rounded'), set::footPager(usePager()), set::nested(true), set::onRenderCell(jsRaw('function(result, data){ return window.renderReleaseCountCell(result, data); }')),