Fix: Style of current day was not visible
This commit is contained in:
parent
2dd6c745a5
commit
c7d0405b90
@ -714,10 +714,11 @@ elseif ($action == 'show_week') // View by week
|
|||||||
// Show days of the current week
|
// Show days of the current week
|
||||||
$curtime = dol_mktime (0, 0, 0, $month, $tmpday, $year);
|
$curtime = dol_mktime (0, 0, 0, $month, $tmpday, $year);
|
||||||
|
|
||||||
if($curtime == $now)
|
$style='cal_current_month';
|
||||||
$style='cal_today';
|
$today=0;
|
||||||
else
|
$todayarray=dol_getdate($now,'fast');
|
||||||
$style='cal_current_month';
|
if ($todayarray['mday']==$tmpday && $todayarray['mon']==$month && $todayarray['year']==$year) $today=1;
|
||||||
|
if ($today) $style='cal_today';
|
||||||
|
|
||||||
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, 0, $maxlength, $newparam, 1, 300);
|
show_day_events($db, $tmpday, $month, $year, $month, $style, $eventarray, 0, $maxlength, $newparam, 1, 300);
|
||||||
@ -746,6 +747,11 @@ else // View by day
|
|||||||
$newparam=preg_replace('/year=[0-9]+&?/i','',$newparam);
|
$newparam=preg_replace('/year=[0-9]+&?/i','',$newparam);
|
||||||
// Code to show just one day
|
// Code to show just one day
|
||||||
$style='cal_current_month';
|
$style='cal_current_month';
|
||||||
|
$today=0;
|
||||||
|
$todayarray=dol_getdate($now,'fast');
|
||||||
|
if ($todayarray['mday']==$day && $todayarray['mon']==$month && $todayarray['year']==$year) $today=1;
|
||||||
|
if ($today) $style='cal_today';
|
||||||
|
|
||||||
$timestamp=dol_mktime(12,0,0,$month,$day,$year);
|
$timestamp=dol_mktime(12,0,0,$month,$day,$year);
|
||||||
$arraytimestamp=adodb_getdate(dol_mktime(12,0,0,$month,$day,$year));
|
$arraytimestamp=adodb_getdate(dol_mktime(12,0,0,$month,$day,$year));
|
||||||
echo '<table width="100%" class="nocellnopadd">';
|
echo '<table width="100%" class="nocellnopadd">';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user