From d08c42a205b5b20e2c0823b14fef62390331e8da Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 2 Aug 2020 00:15:21 +0200 Subject: [PATCH] CSS Better visibility for buttons and status --- htdocs/core/lib/functions.lib.php | 13 ++++++------- htdocs/theme/eldy/badges.inc.php | 12 ++++++++++++ htdocs/theme/eldy/btn.inc.php | 9 ++++++--- htdocs/theme/eldy/global.inc.php | 14 ++++++++------ htdocs/theme/eldy/theme_vars.inc.php | 6 +++--- 5 files changed, 35 insertions(+), 19 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 1cf166c4d19..1d7f327af29 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -8215,14 +8215,13 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st } // TODO : add a hook - if ($displayMode == 0) { - $return = !empty($html) ? $html : $statusLabel; + $return = !empty($html) ? $html : (empty($conf->dol_optimize_smallscreen) ? $statusLabel : (empty($statusLabelShort) ? $statusLabel : $statusLabelShort)); } elseif ($displayMode == 1) { - $return = !empty($html) ? $html : (!empty($statusLabelShort) ? $statusLabelShort : $statusLabel); + $return = !empty($html) ? $html : (empty($statusLabelShort) ? $statusLabel : $statusLabelShort); } // Use status with images (for backward compatibility) elseif (!empty($conf->global->MAIN_STATUS_USES_IMAGES)) { - $return = ''; + $return = ''; $htmlLabel = (in_array($displayMode, array(1, 2, 5)) ? '' : '').(!empty($html) ? $html : $statusLabel).(in_array($displayMode, array(1, 2, 5)) ? '' : ''); $htmlLabelShort = (in_array($displayMode, array(1, 2, 5)) ? '' : '').(!empty($html) ? $html : (!empty($statusLabelShort) ? $statusLabelShort : $statusLabel)).(in_array($displayMode, array(1, 2, 5)) ? '' : ''); @@ -8267,17 +8266,17 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st } } // Use new badge elseif (empty($conf->global->MAIN_STATUS_USES_IMAGES) && !empty($displayMode)) { - $statusLabelShort = !empty($statusLabelShort) ? $statusLabelShort : $statusLabel; + $statusLabelShort = (empty($statusLabelShort) ? $statusLabel : $statusLabelShort); $dolGetBadgeParams['attr']['class'] = 'badge-status'; $dolGetBadgeParams['attr']['title'] = $statusLabel; if ($displayMode == 3) { - $return = dolGetBadge($statusLabel, '', $statusType, 'dot', $url, $dolGetBadgeParams); + $return = dolGetBadge((empty($conf->dol_optimize_smallscreen) ? $statusLabel : (empty($statusLabelShort) ? $statusLabel : $statusLabelShort)), '', $statusType, 'dot', $url, $dolGetBadgeParams); } elseif ($displayMode === 5) { $return = dolGetBadge($statusLabelShort, $html, $statusType, '', $url, $dolGetBadgeParams); } else { - $return = dolGetBadge($statusLabel, $html, $statusType, '', $url, $dolGetBadgeParams); + $return = dolGetBadge((empty($conf->dol_optimize_smallscreen) ? $statusLabel : (empty($statusLabelShort) ? $statusLabel : $statusLabelShort)), $html, $statusType, '', $url, $dolGetBadgeParams); } } diff --git a/htdocs/theme/eldy/badges.inc.php b/htdocs/theme/eldy/badges.inc.php index d2a59447bb9..381f75fe2d0 100644 --- a/htdocs/theme/eldy/badges.inc.php +++ b/htdocs/theme/eldy/badges.inc.php @@ -24,6 +24,18 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); font-size: 0.95em; padding: .19em .35em; /* more than 0.19 generate a change into heigth of lines */ } +.tabBar .arearef .statusref .badge-status { + font-size: 1.1em; + padding: .4em .4em; +} +/* Force values for small screen 767 */ +@media only screen and (max-width: 767px) +{ + .tabBar .arearef .statusref .badge-status { + font-size: 0.95em; + padding: .3em .2em; + } +} .badge-pill, .tabs .badge { padding-right: .5em; diff --git a/htdocs/theme/eldy/btn.inc.php b/htdocs/theme/eldy/btn.inc.php index e78d82592bb..e1315ed62ee 100644 --- a/htdocs/theme/eldy/btn.inc.php +++ b/htdocs/theme/eldy/btn.inc.php @@ -9,8 +9,9 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> --btncolorborder: #FFF; --butactiondeletebg: rgb(234,228,225); /* tertiary color */ - --butactionbg:rgb(218, 235, 225); + /* --butactionbg:rgb(218, 235, 225); */ /* --butactionbg:rgb(228, 218, 235); */ + --butactionbg:rgb(118, 145, 225); } ; --colorboxiconbg: #eee; --refidnocolor:#444; @@ -186,6 +186,12 @@ input, select { } #mainbody input.button:not(.buttongen):not(.bordertransp) { background: var(--butactionbg); + color: #FFF !important; + + /* -webkit-box-shadow: 0px 0px 1px 1px rgba(0, 0, 0, 0.2), 0px 0px 0px rgba(60,60,60,0.1); + box-shadow: 0px 0px 1px 1px rgba(0, 0, 0, 0.2), 0px 0px 0px rgba(60,60,60,0.1); */ + + border-radius: 3px; border-collapse: collapse; border: none; } @@ -3245,11 +3251,7 @@ div.pagination li:first-child span { /*border-top-left-radius: 4px; border-bottom-left-radius: 4px;*/ } -div.pagination li:last-child a, -div.pagination li:last-child span { - /*border-top-right-radius: 4px; - border-bottom-right-radius: 4px;*/ -} + div.pagination li a:hover, div.pagination li:not(.paginationafterarrows,.title-button) span:hover, div.pagination li a:focus, diff --git a/htdocs/theme/eldy/theme_vars.inc.php b/htdocs/theme/eldy/theme_vars.inc.php index 3ce29206c0d..cd88654e309 100644 --- a/htdocs/theme/eldy/theme_vars.inc.php +++ b/htdocs/theme/eldy/theme_vars.inc.php @@ -65,7 +65,7 @@ $colorbacklinepairhover = '230,237,244'; // line hover $colorbacklinepairchecked = '230,237,244'; // line checked $colorbacklinebreak = '248,247,244'; // line break $colorbackbody = '255,255,255'; -$colortexttitlenotab = '0,123,140'; // 150,90,121 140,80,10 or 10,140,80 #875a7b green=0,123,140, violet: 0,50,120 +$colortexttitlenotab = '10,120,140'; // 150,90,121 140,80,10 or 10,140,80 #875a7b green=0,123,140, violet: 0,50,120 $colortexttitlenotab2 = '100,0,100'; // 150,90,121 140,80,10 or 10,140,80 #875a7b green=0,123,140, violet: 0,50,120 $colortexttitle = '0,0,0'; $colortexttitlelink = '10, 20, 100'; @@ -87,11 +87,11 @@ $colorblind_deuteranopes_textWarning = $textWarning; // currently not tested wit // Badges colors $badgePrimary = '#007bff'; -$badgeSecondary = '#cccccc'; +$badgeSecondary = '#aaaabb'; +$badgeInfo = '#aaaabb'; $badgeSuccess = '#55a580'; $badgeWarning = '#bc9526'; // See $textWarning bc9526 $badgeDanger = '#9f4705'; // See $textDanger -$badgeInfo = '#aaaabb'; $badgeDark = '#343a40'; $badgeLight = '#f8f9fa';