Page 1 of 1

Re-implementing Provisional State

PostPosted: Mon May 09, 2011 12:22 am
by nootkan
I've looked through this forum but cannot find a solution to my problem. A while back I installed the calendar for a friend and deleted the provisional states because he wasn't interested. Now it seems he wants them back only using the name Tentative instead of Provisional. I have added the following states: Tentative/tentative, Tentative am/tentative_am and Tentative pm/tentative_pm in admin. However the keys show up as the availabile state color instead of the color I changed in the css.
.cal_month ul li.booked_pr_am,
.cal_month ul li.booked_pr_pm { background-image:url("");}
.cal_month ul li.booked_pr { background-color: #39b9f9; } /* complete day provisionally booked */

Also is it possible to have the tenative am and pm states a different color then the booked am and pm states? I see the background sprite only has four colors.

What am I missing?

Re: Re-implementing Provisional State

PostPosted: Mon May 09, 2011 1:10 am
by nootkan
I figured this out and was going to delete the post but figured I'd post my solution in case someone else forgets how to make the changes. I changed the sprite to the colors I wanted and then made changes to the css file like so:
/* position background image for each state - adjust to your image */
.cal_month ul li.booked_am { background-position: 200px top; }
.cal_month ul li.booked_pm { background-position: 230px top; }
.cal_month ul li.booked_pr_am { background-position: 140px top; }
.cal_month ul li.booked_pr_pm { background-position: 170px top; }

The key is to change the background position to reflect the color you want. As for changing the name, I just changed the first option in the booking state variable to Tentative instead of Provisional and the css variable to it's original state: booked_pr, booked_pr_am, booked_pr_pm etc. Everything is as I want it now.