From 5b7b80e3b163d00b3afb90dacd23c153d23cd1ea Mon Sep 17 00:00:00 2001 From: Jason Oster Date: Fri, 10 Jul 2009 17:50:21 +0000 Subject: Fix multiple HTML elements with the same id. Allow all-day divs to stretch vertically in day and week views with default template. --- functions/template.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'functions') diff --git a/functions/template.php b/functions/template.php index 1400873..982fd54 100644 --- a/functions/template.php +++ b/functions/template.php @@ -307,10 +307,10 @@ class Page { $colspan = 0; $replace .= $loop_begin; # - if ($weekarray[$day] == $getdate) $replace = str_replace('{TODAY}', "rowToday", $replace); - $replace = str_replace('{TODAY}', "rowOff", $replace); + if ($weekarray[$day] == $getdate) $replace = str_replace('{TODAY}', 'rowToday', $replace); + $replace = str_replace('{TODAY}', 'rowOff', $replace); - if(array_search($weekarray[$day], $allday_uids)){ + if(array_search($weekarray[$day], $allday_uids)){ $uid = array_search($weekarray[$day], $allday_uids); unset($allday_uids[$uid]); $allday = $master_array[$weekarray[$day]]['-1'][$uid]; @@ -325,15 +325,17 @@ class Page { $event = openevent($get_date, -1, $uid, $allday, $phpiCal_config->allday_week_lines, (8*$colspan), 'psf'); $loop_tmp = str_replace('{ALLDAY}', $event, $loop_ad); $loop_tmp = str_replace('{CALNO}', $event_calno, $loop_tmp); + $replace = str_replace('{NOBORDER}', ' style="border-top: none;"', $replace); $replace .= $loop_tmp; - $replace .= $loop_end; + $replace .= $loop_end; }else{ - $colspan = $nbrGridCols[$weekarray[$day]]; - $replace .= $loop_end; + $replace = str_replace('{NOBORDER}', '', $replace); + $colspan = $nbrGridCols[$weekarray[$day]]; + $replace .= $loop_end; $day++; } unset ($ev); - $replace = str_replace('{COLSPAN}', "colspan='$colspan'", $replace); + $replace = str_replace('{COLSPAN}', "colspan=\"$colspan\"", $replace); } $row .= "$replace $loop_row_end\n"; $weekreplace .= "$row\n"; -- cgit v1.2.3