[dev] kronolith 2.1.4 and multiple all-day appointments
Chris Stromsoe
cbs at cts.ucla.edu
Mon Dec 11 03:24:07 PST 2006
Multiple all-day appointments in the week and work-week views in 2.1.4 are
confusing. If the appointments overlap, different appointments end up
appearing adjacent to each other on the same line. I'm re-doing the
all-day implementation to use a single solid bar, cover from start to
finish (including the spacer block between days).
This block is from html() in kronolith/lib/WeekView.php. What is line
#140 checking for? I changed the in 141 to include some text so I
could see when it's being used, but haven't been able to trigger that
block.
132 $row = '';
133 for ($j = $this->startDay; $j <= $this->endDay; $j++) {
134 $row .= '<td class="hour" align="right">' . ($more_timeslots ? _("All day") : ' ') . '</td>';
135 $row .= '<td colspan="' . $this->days[$j]->_totalspan . '" valign="top"><table width="100%" cellspacing="0">';
136 if ($this->days[$j]->_all_day_maxrowspan > 0) {
137 for ($k = 0; $k < $this->days[$j]->_all_day_maxrowspan; $k++) {
138 $row .= '<tr>';
139 foreach ($this->days[$j]->_currentCalendars as $cid => $cal) {
140 if (count($this->days[$j]->_all_day_events[$cid]) === $k) {
141 $row .= '<td rowspan="' . ($this->days[$j]->_all_day_maxrowspan - $k) . '" width="'. round(99 / count($this->days[$j]->_currentCalendars)) . '%"> </td>';
142 } elseif (count($this->days[$j]->_all_day_events[$cid]) > $k) {
143 $event = $this->days[$j]->_all_day_events[$cid][$k];
144 $eventCategories[$event->getCategory()] = true;
145
146 $row .= '<td class="week-eventbox category' . md5($event->getCategory()) . '" ' .
147 'width="' . round(99 / count($this->days[$j]->_currentCalendars)) . '%" ' .
148 'valign="top">' .
149 $event->getLink($this->days[$j]->getStamp()) . '</td>';
150 }
151 }
152 $row .= '</tr>';
153 }
154 } else {
155 $row .= '<tr><td colspan="' . count($this->_currentCalendars) . '"> </td></tr>';
156 }
157 $row .= '</table></td>';
158 }
-Chris
More information about the dev
mailing list