aboutsummaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorJason Oster <parasytic@users.sourceforge.net>2009-07-10 17:50:21 +0000
committerJason Oster <parasytic@users.sourceforge.net>2009-07-10 17:50:21 +0000
commit5b7b80e3b163d00b3afb90dacd23c153d23cd1ea (patch)
tree0630a8f86bc8021bd2458050e0ebcf1e71418e09 /functions
parentaeee316fc07f322d1bb2777277213e0f00764329 (diff)
downloadphpicalendar-5b7b80e3b163d00b3afb90dacd23c153d23cd1ea.tar.gz
phpicalendar-5b7b80e3b163d00b3afb90dacd23c153d23cd1ea.tar.bz2
phpicalendar-5b7b80e3b163d00b3afb90dacd23c153d23cd1ea.zip
Fix multiple HTML elements with the same id. Allow all-day divs to stretch vertically in day and week views with default template.
Diffstat (limited to 'functions')
-rw-r--r--functions/template.php16
1 files changed, 9 insertions, 7 deletions
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; # <td>
- 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";

© 2014-2022 Faster IT GmbH | imprint | privacy policy