New: Can define a transparency for past events in calendar view
This commit is contained in:
parent
c916d06638
commit
91fae20485
@ -759,32 +759,35 @@ if (empty($action) || $action == 'show_month') // View by month
|
|||||||
}
|
}
|
||||||
echo " </tr>\n";
|
echo " </tr>\n";
|
||||||
|
|
||||||
|
$todayarray=dol_getdate($now,'fast');
|
||||||
|
$todaytms=dol_mktime(0, 0, 0, $todayarray['mon'], $todayarray['mday'], $todayarray['year']);
|
||||||
|
|
||||||
// In loops, tmpday contains day nb in current month (can be zero or negative for days of previous month)
|
// In loops, tmpday contains day nb in current month (can be zero or negative for days of previous month)
|
||||||
//var_dump($eventarray);
|
//var_dump($eventarray);
|
||||||
//print $tmpday;
|
//print $tmpday;
|
||||||
for($iter_week = 0; $iter_week < 6 ; $iter_week++)
|
for ($iter_week = 0; $iter_week < 6 ; $iter_week++)
|
||||||
{
|
{
|
||||||
echo " <tr>\n";
|
echo " <tr>\n";
|
||||||
for($iter_day = 0; $iter_day < 7; $iter_day++)
|
for ($iter_day = 0; $iter_day < 7; $iter_day++)
|
||||||
{
|
{
|
||||||
/* Show days before the beginning of the current month (previous month) */
|
/* Show days before the beginning of the current month (previous month) */
|
||||||
if($tmpday <= 0)
|
if ($tmpday <= 0)
|
||||||
{
|
{
|
||||||
$style='cal_other_month';
|
$style='cal_other_month cal_past';
|
||||||
echo ' <td class="'.$style.'" width="14%" valign="top" nowrap="nowrap">';
|
echo ' <td class="'.$style.'" width="14%" valign="top" nowrap="nowrap">';
|
||||||
show_day_events($db, $max_day_in_prev_month + $tmpday, $prev_month, $prev_year, $month, $style, $eventarray, $maxprint, $maxnbofchar, $newparam);
|
show_day_events($db, $max_day_in_prev_month + $tmpday, $prev_month, $prev_year, $month, $style, $eventarray, $maxprint, $maxnbofchar, $newparam);
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
}
|
}
|
||||||
/* Show days of the current month */
|
/* Show days of the current month */
|
||||||
elseif(($tmpday <= $max_day_in_month))
|
elseif ($tmpday <= $max_day_in_month)
|
||||||
{
|
{
|
||||||
$curtime = dol_mktime(0, 0, 0, $month, $tmpday, $year);
|
$curtime = dol_mktime(0, 0, 0, $month, $tmpday, $year);
|
||||||
|
|
||||||
$style='cal_current_month';
|
$style='cal_current_month';
|
||||||
$today=0;
|
$today=0;
|
||||||
$todayarray=dol_getdate($now,'fast');
|
|
||||||
if ($todayarray['mday']==$tmpday && $todayarray['mon']==$month && $todayarray['year']==$year) $today=1;
|
if ($todayarray['mday']==$tmpday && $todayarray['mon']==$month && $todayarray['year']==$year) $today=1;
|
||||||
if ($today) $style='cal_today';
|
if ($today) $style='cal_today';
|
||||||
|
if ($curtime < $todaytms) $style.=' cal_past';
|
||||||
|
|
||||||
echo ' <td class="'.$style.'" width="14%" valign="top" nowrap="nowrap">';
|
echo ' <td class="'.$style.'" width="14%" valign="top" nowrap="nowrap">';
|
||||||
show_day_events($db, $tmpday, $month, $year, $month, $style, $eventarray, $maxprint, $maxnbofchar, $newparam);
|
show_day_events($db, $tmpday, $month, $year, $month, $style, $eventarray, $maxprint, $maxnbofchar, $newparam);
|
||||||
|
|||||||
@ -1876,10 +1876,11 @@ td.hidden {
|
|||||||
/* Module agenda */
|
/* Module agenda */
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
|
|
||||||
.cal_other_month { background: #DDDDDD; border: solid 1px #ACBCBB; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; }
|
.cal_other_month { opacity: 0.6; background: #DDDDDD; border: solid 1px #ACBCBB; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; }
|
||||||
.cal_past_month { background: #EEEEEE; border: solid 1px #ACBCBB; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; }
|
.cal_past_month { opacity: 0.6; background: #EEEEEE; border: solid 1px #ACBCBB; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; }
|
||||||
.cal_current_month { background: #FFFFFF; border: solid 1px #ACBCBB; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; }
|
.cal_current_month { background: #FFFFFF; border: solid 1px #ACBCBB; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; }
|
||||||
.cal_today { background: #FFFFFF; border: solid 2px #6C7C7B; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; }
|
.cal_today { background: #FFFFFF; border: solid 2px #6C7C7B; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; }
|
||||||
|
.cal_past { }
|
||||||
table.cal_event { border-collapse: collapse; margin-bottom: 1px; -webkit-border-radius: 6px; border-radius: 6px; }
|
table.cal_event { border-collapse: collapse; margin-bottom: 1px; -webkit-border-radius: 6px; border-radius: 6px; }
|
||||||
table.cal_event td { border: 0px; padding-<?php print $left; ?>: 0px; padding-<?php print $right; ?>: 2px; padding-top: 0px; padding-bottom: 0px; }
|
table.cal_event td { border: 0px; padding-<?php print $left; ?>: 0px; padding-<?php print $right; ?>: 2px; padding-top: 0px; padding-bottom: 0px; }
|
||||||
.cal_event a:link { color: #111111; font-size: 11px; font-weight: normal !important; }
|
.cal_event a:link { color: #111111; font-size: 11px; font-weight: normal !important; }
|
||||||
@ -1888,7 +1889,6 @@ table.cal_event td { border: 0px; padding-<?php print $left; ?>: 0px; padding-<?
|
|||||||
.cal_event a:hover { color: #111111; font-size: 11px; font-weight: normal !important; }
|
.cal_event a:hover { color: #111111; font-size: 11px; font-weight: normal !important; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
/* Afficher/cacher */
|
/* Afficher/cacher */
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user