Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8043 Posts in 1856 Topics- by 2099 Members - Latest Member: roi
Calendar Script CommunityCustomizationCustomizing CalendarScript (Moderators: scott, DanO, Marty)Bacground color of All Day Events
Pages: [1]   Go Down
Print
Author Topic: Bacground color of All Day Events  (Read 385 times)
0 Members and 1 Guest are viewing this topic.
lavo
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« on: October 12, 2003, 05:49:00 AM »

When i select a day in a Month I get a list which shows All Day Events.  An event which starts at 1000 and ends at 1200 is shown as a single line in the cell 10:00.  I wish that the spesific events cells shows in another color from the start time (1000) to end time (1200). In that way it is easy to see which time is busy, and avoid doublebooking.

And an another thing:  Is it possible to change the interval of hour time, eg. every half an hour 0800, 0830, 0900 ....

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #1 on: October 12, 2003, 01:35:00 PM »

** I wish that the spesific events cells shows in another color from the start time (1000) to end time (1200). **

Only events between those times?? Or the cell of any events which have a time specified for them?

** Is it possible to change the interval of hour time, eg. every half an hour **

If it is possible it would not be easy. That is handled by the default.html template tag <%FOREACH HOUR OF DAY%> and the code in the calendar.pl file which starts:
&ASPCustomTag('\s*FOREACH\s*HOUR\s*OF\s*DAY\s*','foreach $HOUR ( 99 ...

Maybe you can figure out a way to program it?

Dan O.

------------------

Logged
lavo
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #2 on: October 12, 2003, 02:25:00 PM »

Oh no, not only between those times, but of any events which have a time spesified for them.

------------------

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #3 on: October 12, 2003, 03:55:00 PM »

If you look in the default.html template file after <%-- DAY VIEW --%> tag, find the line
<TD CLASS="thinborder" BGCOLOR="<%=$_GRID_CELL_BGCOLOR%>" VALIGN=TOP>
a little ways below it.

Try inserting the following code in place of it:

<%IF EVENTS EXIST%>
<% $cellcolor = "#FF0000" %>
<% ELSE %>
<% $cellcolor = $_GRID_CELL_BGCOLOR %>
<%/IF%>
<TD CLASS="thinborder" BGCOLOR="<%=$cellcolor%>" VALIGN=TOP>

Hopefully that should color the background of cells with events in them in Day View and Grid View. If you wanted them colored in 'List View' as well, you'd have to modify the code in that section in a similar (but maybe not exact) fashion.

     This code is un-tested so use at your own risk!

Dan O.

[This message has been edited by DanO (edited October 12, 2003).]

Logged
lavo
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #4 on: October 12, 2003, 04:09:00 PM »

I'm impressed that I get a response so fast. Thank you for help.

------------------

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #5 on: October 12, 2003, 08:07:00 PM »

Be sure to post whether it works or not so when others happen by the message they'll know.

Dan O.

------------------

Logged
Pages: [1]   Go Up
Print
Jump to: