fix flex last line

This commit is contained in:
John Botella 2019-08-01 17:40:14 +02:00
parent 40ac24fc26
commit 6973e29b2c
2 changed files with 33 additions and 8 deletions

View File

@ -713,10 +713,15 @@ if (! empty($valid_dashboardlines))
$openedDashBoard.= ' <span class="info-box-icon bg-infoxbox-'.$groupKeyLowerCase.'"><i class="fa fa-dol-'.$groupKeyLowerCase.'"></i></span>'."\n";
$openedDashBoard.= ' <div class="info-box-content">'."\n";
$openedDashBoard .= ' <span class="info-box-text"><strong>'.$groupName.'</strong></span>' . "\n";
$openedDashBoard .= ' <span class="info-box-title">'.$groupName.'</span>' . "\n";
foreach($boards as $board) {
$infoName = !empty($board->labelShort) ? $board->labelShort : $board->label ;
if(!empty($board->labelShort)){
$infoName = '<span title="'.$board->label.'">'.$board->labelShort.'</span>';
}
else{
$infoName = $board->label ;
}
$textLateTitle = $langs->trans("NActionsLate", $board->nbtodolate);
$textLateTitle.= ' ('.$langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($board->warning_delay) >= 0 ? '+' : '').ceil($board->warning_delay).' '.$langs->trans("days").')';
@ -729,13 +734,16 @@ if (! empty($valid_dashboardlines))
$textLate .= '</span>';
}
$nbtodClass = '';
if($board->nbtodo>0){
$nbtodClass = 'badge badge-info';
}
$openedDashBoard .= ' <span class="info-box-text">'.$infoName.' : <span class="'.$nbtodClass.'">'.$board->nbtodo.'</span>'.$textLate.'</span>' . "\n";
$openedDashBoard .= ' <a href="'.$board->url.'" class="info-box-text">'.$infoName.' : <span class="'.$nbtodClass.' classfortooltip" title="'.$board->label.'" >'.$board->nbtodo.'</span>'.$textLate.'</a>' . "\n";
if ($board->total > 0 && ! empty($conf->global->MAIN_WORKBOARD_SHOW_TOTAL_WO_TAX) || $board->total > 0){
$openedDashBoard .= '<a href="'.$board->url.'" class="info-box-text">'.$langs->trans('Total').' : '.price($board->total) .'</a>';
}
}
@ -747,6 +755,11 @@ if (! empty($valid_dashboardlines))
}
for ($i = 1; $i <= 10; $i++) {
$openedDashBoard .= '<div class="box-flex-item filler"></div>';
}
$nbworkboardcount=0;
foreach($valid_dashboardlines as $infoKey => $board)
{

View File

@ -11,7 +11,7 @@ if (! defined('ISLOADEDBYSTEELSHEET'))  die('Must be call by steelsheet'); ?>
min-height: 90px;
background: #fff;
width: 100%;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1), 0px 0px 2px rgba(0, 0, 0, 0.1);
border-radius: 2px;
margin-bottom: 15px;
}
@ -57,16 +57,23 @@ if (! defined('ISLOADEDBYSTEELSHEET'))  die('Must be call by steelsheet'); ?>
font-size: 18px;
}
.progress-description,
.info-box-text {
.info-box-text,
.info-box-title{
display: block;
font-size: 12px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.info-box-text {
.info-box-title{
text-transform: uppercase;
font-weight: bold;
}
.info-box-text:first-letter{text-transform: uppercase}
a.info-box-text{ text-decoration: none;}
.info-box-more {
display: block;
}
@ -157,10 +164,15 @@ if (! defined('ISLOADEDBYSTEELSHEET'))  die('Must be call by steelsheet'); ?>
}
.box-flex-item{
flex-grow : 2;
flex-grow : 1;
flex-shrink: 1;
flex-basis: auto;
width: 280px;
padding: 5px 10px;
}
.box-flex-item.filler{
margin: 0;
padding: 0px 10px !important;
height: 0;
}