calendarxp Site Admin
Joined: 30 Jan 2005 Posts: 409
|
Posted: Tue Mar 15, 2005 4:36 am Post subject: How to set the border style of a date? |
|
|
The border on each calendar cell is a special effect (aka. box effect) and is not implemented via CSS. To configure it, you need to follow the steps below:- Make sure the 6th argument of gAgendaMask option in the theme-name.js file is set to -1. Otherwise, the box effect will be masked.
- The thickness of the border is determined by the cellpadding part of the gsInnerTable option in the theme-name.js. In certain theme, e.g. mini theme, the default value is 0 and you need to set it to a positive one. Otherwise, no border will be shown.
- The border color is set by the boxit parameter of each agenda definition, either through fAddEvent or in fHoliday. Please refer to agenda tutorial for syntax details.
e.g. Taking mini theme as baseline, setting the following code in mini.js will make the box borders to be 1px thick:
Code: | var gsInnerTable="border=0 cellpadding=1 cellspacing=0"; |
and the following code in agenda.js will create an event surrounded by a blue border:
Code: | fAddEvent(2005,3,23, "Hello World!\nYou can't select me.",null,null,null,null,"#0000FF"); |
or
Code: | function fHoliday(y,m,d) {
if (y==2005&&m==3&&d==23)
return ["Hello World!\nYou can't select me.",null,null,null,null,"blue"];
} |
This is more complex than CSS, but was designed to achieve cross-browser effect even on older browsers like Netscape 4.x.
_________________ Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved. |
|