Work Week table fix

Jeff Graves jeff@image-src.com
Mon, 21 Jan 2002 11:31:43 -0500


I kinda have a display fix (except I don't know how to write patches so
here's what did):

The Work week display was lop-sided. The first 4 days had a consistent
width and then Friday was always about half as wide (on all displays I
tried). So I went into kronolith/templates/week/head.inc and made this
change (about line 15):

<?php foreach ($this->days as $day): ?>
<td width="1%">&nbsp;</td><td<? if ($day->Day->isToday())
echo ' class="selected"' ?> width="<?= round(90 / count($this->days))
?>%" colspan="<?= $day->span ?>" align="center" nowrap="nowrap">

I changed it from:

echo ' class="selected"' ?> width="<?= round(100 / count($this->days))

to:

echo ' class="selected"' ?> width="<?= round(90 / count($this->days))

because the 100 is 100% of the page which doesn't account for the
display of the hours column or the 1% width of the borders (I guessed
the total was 10% and subtracted it from 100).

However, you also need to make the changes to
kronolith/lib/WeekView.php. Look for the $started=false variable in the
html function and about 20 lines down there's the same kinda change to
make and then about another 20 lines down you need to make that change
again. If someone who knows how to write patches wants to write this
one, go nuts.

Thanks,

Jeff Graves
Customer Support Engineer
Image Source, Inc.
10 Mill Street
Bellingham, MA 02019

508.966.5200 X31 - Phone
508.966.5170 - Fax
jeff@image-src.com - Email