From 7cd49f327e503222202bb5b1ff0f05b3a7b82264 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Feb 2020 21:47:48 +0100 Subject: [PATCH] Look and feel v12: CSS for qty in lists --- htdocs/core/lib/functions.lib.php | 2 +- htdocs/core/lib/project.lib.php | 5 ++++- htdocs/theme/eldy/global.inc.php | 8 ++++++++ htdocs/theme/md/style.css.php | 13 +++++++++++++ 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 9ce2d99ad1d..c3ba1dfc63a 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -4304,7 +4304,7 @@ function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '', if ($picto && $titre) print ''.img_picto('', $picto, 'class="valignmiddle pictotitle widthpictotitle"', $pictoisfullpath).''; print ''; print '
'.$titre; - if (!empty($titre) && $savtotalnboflines >= 0 && (string) $savtotalnboflines != '') print ' ('.$totalnboflines.')'; + if (!empty($titre) && $savtotalnboflines >= 0 && (string) $savtotalnboflines != '') print '('.$totalnboflines.')'; print '
'; // Center diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index ddca8ef1153..3d9cd447802 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -2454,7 +2454,7 @@ function getTaskProgressView($task, $label = true, $progressNumber = true, $hide */ function getTaskProgressBadge($task, $label = '', $tooltip = '') { - global $conf; + global $conf, $langs; $out = ''; $badgeClass = ''; @@ -2472,12 +2472,15 @@ function getTaskProgressBadge($task, $label = '', $tooltip = '') if (doubleval($progressCalculated) > doubleval($task->progress * $warningRatio)) { $badgeClass .= 'badge-danger'; + if (empty($tooltip)) $tooltip = $task->progress.'% < '.$langs->trans("Expected").' '.$progressCalculated.'%'; } elseif (doubleval($progressCalculated) > doubleval($task->progress)) { // warning if close at 10% $badgeClass .= 'badge-warning'; + if (empty($tooltip)) $tooltip = $task->progress.'% < '.$langs->trans("Expected").' '.$progressCalculated.'%'; } else { $badgeClass .= 'badge-success'; + if (empty($tooltip)) $tooltip = $task->progress.'% >= '.$langs->trans("Expected").' '.$progressCalculated.'%'; } } } diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 99e2797c2db..bd35d29f3b2 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -334,6 +334,13 @@ select.flat, form.flat select { .opacitytransp { opacity: 0; } +.colorwhite { + color: #fff; +} +.colorblack { + color: #000; +} + select:invalid { color: gray; } @@ -368,6 +375,7 @@ input#onlinepaymenturl, input#directdownloadlink { opacity: 0.7; } + div#moretabsList, div#moretabsListaction { z-index: 5; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 1305bdc6418..0c3867b4507 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -279,6 +279,12 @@ textarea.cke_source:focus box-shadow: none; } +th.wrapcolumntitle.liste_titre:not(.maxwidthsearch), td.wrapcolumntitle.liste_titre:not(.maxwidthsearch) { + overflow: hidden; + white-space: nowrap; + max-width: 120px; + text-overflow: ellipsis; +} .liste_titre input[name=month_date_when], .liste_titre input[name=monthvalid], .liste_titre input[name=search_ordermonth], .liste_titre input[name=search_deliverymonth], .liste_titre input[name=search_smonth], .liste_titre input[name=search_month], .liste_titre input[name=search_emonth], .liste_titre input[name=smonth], .liste_titre input[name=month], .liste_titre input[name=month_lim], .liste_titre input[name=month_start], .liste_titre input[name=month_end], .liste_titre input[name=month_create], @@ -465,6 +471,13 @@ select.flat, form.flat select { .opacitytransp { opacity: 0; } +.colorwhite { + color: #fff; +} +.colorblack { + color: #000; +} + select:invalid { color: gray; }