[Zope-dev] CalendarTag fix for Zope 2.2

Darrell Gallion darrell@dorb.com
Sun, 16 Jul 2000 22:34:12 -0400


Speaking of the calendar tag, which I'm very grateful for.
I noticed that changing the mode setting in one browser was seen in all
others.

calendar.py
line ~323:
    def render(self, md):
        self.mode = 'month'

Forcing the mode to month seems to work. The view will be month unless the
url contains a mode.

Also changed it to give me access to the <td> tags of each day.
<dtml-calendar>
<dtml-call "setCalendar('valign','top')">
<dtml-let d="date.timeTime()">
<td bgcolor="ffffda">
  <a href="db/view/editDayDTML?day=<dtml-var d>">
  <dtml-var "date.dd()">
  </a>
<br>
</td>
</dtml-let>
</dtml-calendar>

The <td bgcolor= .... will be replaced with DTML.
Plan to use color coding to represent how full a days events are.

Well this was Web/DB/Zope project #1, and it was fun.

--Darrell


From: "Tres Seaver" <tseaver@palladion.com>
> Here is a small patch to make the lovely calendar tag play nice with
> DT_Util.namespace() in Zope 2.2:
>