From cb3fd5728bc154b029ea50fea8efc2e09f7cbbd2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 8 Nov 2019 13:04:49 +0100 Subject: [PATCH] Fix color for not busy events --- htdocs/comm/action/index.php | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 9b35f21a0b2..d12ee125eee 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -97,7 +97,7 @@ if (GETPOST('search_actioncode', 'array')) } else { - $actioncode=GETPOST("search_actioncode", "alpha", 3)?GETPOST("search_actioncode", "alpha", 3):(GETPOST("search_actioncode")=='0'?'0':(empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE)?'':$conf->global->AGENDA_DEFAULT_FILTER_TYPE)); + $actioncode=GETPOST("search_actioncode", "alpha", 3)?GETPOST("search_actioncode", "alpha", 3):(GETPOST("search_actioncode")=='0'?'0':(empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE)?'':$conf->global->AGENDA_DEFAULT_FILTER_TYPE)); } if ($actioncode == '' && empty($actioncodearray)) $actioncode=(empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE)?'':$conf->global->AGENDA_DEFAULT_FILTER_TYPE); @@ -1476,16 +1476,15 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa //var_dump($event->userassigned); //var_dump($event->transparency); - print 'transparency)?' cal_event_notbusy':' cal_event_busy'); + if (empty($event->transparency) && empty($conf->global->AGENDA_NO_TRANSPARENT_ON_NOT_BUSY)) print ' opacitymedium'; // Not busy + print '" style="'.$h; + $colortouse = $color; + // If colortouse is similar than background, we force to change it. + + print 'background: #'.$colortouse.';'; + print 'background: -webkit-gradient(linear, left top, left bottom, from(#'.dol_color_minus($color, -3).'), to(#'.dol_color_minus($color, -1).'));'; //if (! empty($event->transparency)) print 'background: #'.$color.'; background: -webkit-gradient(linear, left top, left bottom, from(#'.$color.'), to(#'.dol_color_minus($color,1).'));'; //else print 'background-color: transparent !important; background: none; border: 1px solid #bbb;'; //print ' -moz-border-radius:4px;"'; @@ -1653,9 +1652,9 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa { print ''.img_picto("all", "1downarrow_selected.png").' ...'; print ' +'.(count($eventarray[$daykey])-$maxprint); print '';