Forum OpenACS Q&A: problem with calendar css in ver. 5.3.1

Hi,
I recently installed newly released version 5.3.1. I am facing problems with the calender application. The app doesn't load calender.css (which is present in /serverroot/packages/calender/www/resources/). (I checked this with 'Firebug' plugin of firefox.) As a result only blank calender is shown in browser(no borders) which looks very uncommon. In 5.3.0 calendar worked fine; but it is having problems with the later version.

Does anyone has any idea about this?

Ratnakar

Collapse
Posted by Ben Koot on
Collapse
Posted by Emmanuelle Raffenne on
Hi,

If you use the default-master template then I think it can be fixed by editing packages/calendar/www/view.{tcl|adp} as follow:

In view.tcl, add:

 if {![template::multirow exists link]} {
     template::multirow create link rel type href title lang media
 }
 template::multirow append link \
     stylesheet \
     "text/css" \
     "/resources/calendar/calendar.css" \
     "" \
     en \
     "all"

And in view.adp, remove:

 <property name="header_stuff">
   <link href="/resources/calendar/calendar.css" rel="stylesheet" type="text/css">
 </property>

and substitute it with:

 <if @link:rowcount@ not nil><property name="&link">link</property></if>
Collapse
Posted by Ratnakar Sagare on
Thanks Emmanuelle,
It works fine for viewing the calender. But the problem still persists if I click any item on the calender i.e. viewing the calender item.
Should I replace the same code in cal-item-view.{tcl|adp}?

Thanks again,

Ratnakar

Collapse
Posted by Emmanuelle Raffenne on
Hi Ratnakar,

Yes, same for cal-item-view.{tcl|adp} and also for cal-item-delete-confirm.{tcl|adp} and cal-item-new.{tcl|adp}

Collapse
Posted by Lee Denison on
Hi,

This is a problem due to the changes I have made to the blank master template. Assuming your, possibly customised, default master refers to site master, ie.:

&lt;master src="/www/site-master">

You should be able to solve the problem by switching to the compatibility template, eg.:

&lt;master src="/www/site-compat">

This template accepts @header_stuff@ as before and should continue to work as before.

The original site-master now accepts some new variables (multirows) for link, script and meta tags. Emma's code is an example of how to use these new variables (thanks Emma!). Although I'm in the process of proposing a new api:

http://www.openacs.org/xowiki/templatehead

which will make using these variables easier. So you may want to use site-compat until then.

Collapse
Posted by Ratnakar Sagare on
Thanks all,
Now it works fine.

Ratnakar