From d84c8fbb93e17b02a9d712362570c65d035eae4f Mon Sep 17 00:00:00 2001 From: sunhao Date: Tue, 18 Jul 2023 13:06:20 +0800 Subject: [PATCH] * refactor. --- module/block/css/common.ui.css | 2 -- module/block/ui/annualworkloadblock.html.php | 6 +++--- module/block/ui/projectstatisticblock.html.php | 4 ++-- module/block/ui/scrumoverviewblock.html.php | 4 ++-- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/module/block/css/common.ui.css b/module/block/css/common.ui.css index 18dd0e92b2..4da588f145 100644 --- a/module/block/css/common.ui.css +++ b/module/block/css/common.ui.css @@ -10,8 +10,6 @@ .nav-tabs.nav-stacked .nav-item.nav-prev {display: none} .nav-tabs.nav-stacked .nav-item.nav-next {display: none} -.hidden-nowrap {overflow: hidden; white-space: nowrap;} - .nav > li > .btn {padding: 0 5px; line-height: 24px; margin: 3px; color: #3C4353;} .nav > li > .btn.btn-primary {color: #fff;} .nav .icon-more {font-size: 14px;} diff --git a/module/block/ui/annualworkloadblock.html.php b/module/block/ui/annualworkloadblock.html.php index 7d632c3770..fd0b756c1d 100644 --- a/module/block/ui/annualworkloadblock.html.php +++ b/module/block/ui/annualworkloadblock.html.php @@ -20,7 +20,7 @@ foreach($doneStoryEstimate as $projectID => $storyEstimate) setClass('flex py-1.5 pr-4 text-sm'), cell ( - setClass('hidden-nowrap mr-1 text-right'), + setClass('overflow-hidden whitespace-nowrap mr-1 text-right'), set::width('50%'), span ( @@ -57,7 +57,7 @@ foreach($doneStoryCount as $projectID => $storyCount) setClass('flex py-1.5 pr-4 text-sm'), cell ( - setClass('hidden-nowrap mr-1 text-right'), + setClass('overflow-hidden whitespace-nowrap mr-1 text-right'), set::width('50%'), span ( @@ -93,7 +93,7 @@ foreach($resolvedBugCount as $projectID => $bugCount) setClass('flex py-1.5 pr-4 text-sm'), cell ( - setClass('hidden-nowrap mr-1 text-right'), + setClass('overflow-hidden whitespace-nowrap mr-1 text-right'), set::width('50%'), span ( diff --git a/module/block/ui/projectstatisticblock.html.php b/module/block/ui/projectstatisticblock.html.php index 75146474fb..3a8c2cd41c 100644 --- a/module/block/ui/projectstatisticblock.html.php +++ b/module/block/ui/projectstatisticblock.html.php @@ -71,7 +71,7 @@ foreach($projects as $project) $lastestExecution = (!empty($project->executions) && $project->multiple) ? cell ( - setClass('flex-1 hidden-nowrap' . (!$longBlock ? ' text-left w-full' : ' text-right')), + setClass('flex-1 overflow-hidden whitespace-nowrap' . (!$longBlock ? ' text-left w-full' : ' text-right')), $longBlock ? set::width($width) : '', span ( @@ -118,7 +118,7 @@ foreach($projects as $project) } $cells[] = cell ( - setClass('flex-1 hidden-nowrap project-statistic-table scrum' . (($module != 'cost' && $longBlock) || ($module != 'task' && $module != 'cost' && !$longBlock) ? ' border-l pl-4 ' : ' ml-4') . (!$longBlock && $module != 'cost' && $module != 'story'? ' border-t' : '')), + setClass('flex-1 overflow-hidden whitespace-nowrap project-statistic-table scrum' . (($module != 'cost' && $longBlock) || ($module != 'task' && $module != 'cost' && !$longBlock) ? ' border-l pl-4 ' : ' ml-4') . (!$longBlock && $module != 'cost' && $module != 'story'? ' border-t' : '')), set::width($longBlock ? ($module == 'cost' ? 'calc(25% - 1rem)' : '25%') : 'calc(50% - 1rem)'), div ( diff --git a/module/block/ui/scrumoverviewblock.html.php b/module/block/ui/scrumoverviewblock.html.php index f38e352713..ef8daf68fb 100644 --- a/module/block/ui/scrumoverviewblock.html.php +++ b/module/block/ui/scrumoverviewblock.html.php @@ -36,7 +36,7 @@ foreach($config->block->projectstatistic->items as $module => $items) } $cells[] = cell ( - setClass('flex-1 hidden-nowrap project-statistic-table scrum' . (($module != 'cost' && $longBlock) || ($module != 'task' && $module != 'cost' && !$longBlock) ? ' border-l pl-4 ' : ' ml-4') . (!$longBlock && $module != 'cost' && $module != 'story'? ' border-t' : '')), + setClass('flex-1 overflow-hidden whitespace-nowrap project-statistic-table scrum' . (($module != 'cost' && $longBlock) || ($module != 'task' && $module != 'cost' && !$longBlock) ? ' border-l pl-4 ' : ' ml-4') . (!$longBlock && $module != 'cost' && $module != 'story'? ' border-t' : '')), set::width($longBlock ? ($module == 'cost' ? 'calc(25% - 1rem)' : '25%') : 'calc(50% - 1rem)'), div ( @@ -115,7 +115,7 @@ panel ) : '', (!empty($project->executions) && $project->multiple) ? cell ( - setClass('flex-1 hidden-nowrap' . (!$longBlock ? ' text-left w-full' : ' text-right')), + setClass('flex-1 overflow-hidden whitespace-nowrap' . (!$longBlock ? ' text-left w-full' : ' text-right')), $longBlock ? set::width($width) : '', span (