From 3a4d086ec1d1b6a89d0b0f8ed6018d2080ca9f82 Mon Sep 17 00:00:00 2001 From: Jason Oster Date: Thu, 14 May 2009 21:45:44 +0000 Subject: Fix table column spanning and HTML errors in week view --- functions/template.php | 11 ++++------- templates/default/day.tpl | 2 +- templates/default/default.css | 1 + templates/default/week.tpl | 14 +++++++------- templates/green/day.tpl | 2 +- templates/green/default.css | 1 + templates/grey/day.tpl | 2 +- templates/grey/default.css | 1 + templates/red/day.tpl | 2 +- templates/red/default.css | 1 + templates/tan/day.tpl | 2 +- templates/tan/default.css | 1 + 12 files changed, 21 insertions(+), 19 deletions(-) diff --git a/functions/template.php b/functions/template.php index 42cf1f5..a7f183c 100644 --- a/functions/template.php +++ b/functions/template.php @@ -348,7 +348,7 @@ class Page { $weekreplace .= $replace; } */ - $this->page = preg_replace('!<\!-- loop alldaysofweek on -->.*<\!-- loop alldaysofweek off -->!Uis', $weekreplace, $this->page); + $this->page = preg_replace('!<\!-- loop allday row on -->.*<\!-- loop allday row off -->!Uis', $weekreplace, $this->page); // Replaces the daysofweek preg_match("!<\!-- loop daysofweek on -->(.*)<\!-- loop daysofweek off -->!Uis", $this->page, $match1); @@ -461,8 +461,7 @@ class Page { $dayborder = 0; } $drawWidth = 1; - $colspan_width = round((80 / $nbrGridCols[$thisday]) * $drawWidth); - $weekdisplay .= ' '."\n"; + $weekdisplay .= ' '."\n"; } else { # have events $emptyWidth = $nbrGridCols[$thisday]; @@ -490,10 +489,9 @@ class Page { if ($event_status != '') { $confirmed .= ' '; } - $colspan_width = round((80 / $nbrGridCols[$thisday]) * $drawWidth); $event_temp = $loop_event; $event = openevent($thisday, $cal_time, $uid, $this_time_arr[$uid], $phpiCal_config->week_events_lines, 25, 'ps'); - $weekdisplay .= ''."\n"; + $weekdisplay .= ''."\n"; // Start drawing the event $event_temp = str_replace('{EVENT}', $event, $event_temp); @@ -704,8 +702,7 @@ class Page { $confirmed = ''; if (is_array($event_recur)) $confirmed .= ' '; if ($event_status != '') $confirmed .= ' '; - $colspan_width = round((460 / $nbrGridCols) * $drawWidth); - $daydisplay .= ''."\n"; + $daydisplay .= ''."\n"; // Start drawing the event $event_temp = $loop_event; diff --git a/templates/default/day.tpl b/templates/default/day.tpl index a1db506..c66d40f 100644 --- a/templates/default/day.tpl +++ b/templates/default/day.tpl @@ -24,7 +24,7 @@ - +
« diff --git a/templates/default/default.css b/templates/default/default.css index 857b998..65ac720 100644 --- a/templates/default/default.css +++ b/templates/default/default.css @@ -72,6 +72,7 @@ table, td {font: 11px Verdana, Arial, sans-serif; color: #000;} .eventborder { background-image: url(images/day_title.gif); border: 1px #006699 solid; } .eventbg { background-color: #6699CC; } +.tfixed { table-layout: fixed; } .calborder { background-color: #fff; border: 1px #A1A5A9 solid; } .dateback { background-color: #eee; } .weekborder { border-top: 1px dashed #A1A5A9; border-right: 1px solid #A1A5A9; } diff --git a/templates/default/week.tpl b/templates/default/week.tpl index 375b180..e84632c 100644 --- a/templates/default/week.tpl +++ b/templates/default/week.tpl @@ -2,13 +2,13 @@
-
- +
+
- +

{DISPLAY_DATE}

{CALENDAR_NAME} {L_CALENDAR}

{DISPLAY_DATE}

{CALENDAR_NAME} {L_CALENDAR}