Closed (won't fix)
Project:
Availability Calendars
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Nov 2009 at 11:13 UTC
Updated:
28 Feb 2010 at 21:16 UTC
When trying this module, I stumbled upon a problem.
The colors as set in the availability_calendars.css file were not showing
Instead the overall drupal theme colors were used.
I noticed that the css is only using classes and no id's
I have solved this problem by adding an div around the whole calendar
function theme_availability_calendars_node($node, $year = 2008, $month = 01, $monthstodisplay = 12) {
$output .= '
';
return $output;
}
In the availability_calendars.css file I added the id name before every tag
#availability_calendars
Comments
Comment #1
nicholas.alipaz commentedI have to think this is a theming issue unless others can reproduce it, so I am marking as won't fix until then.
Comment #2
wouterlanda commentedi have the same problem. colors are not showing at all. i tried other themes also.
colours were shown when i used the regular version. but after installing the latest development version, the colours disappeared.
any idea?
Comment #3
nicholas.alipaz commentedbe sure you ran upgrade.php and flushed the caches on drupal as well as your browser. what theme are you using?
Comment #4
wouterlanda commentedi ran the upgrade. just emptied the caches... but it still doesn't show the colors.
i'm using forest-floor. but switching to another template (e.g. garland) doesn't do the trick...
i appreciate your help
Comment #5
nicholas.alipaz commentedare you overriding the theme function or possibly have something in your css that is overriding it? Also are you confident that you have the most up to date css file in the availability_calendars directory? I suggest deleting the availability_calendars folder and extracting a new one from the dev tarball you downloaded. Just to be sure all files are recent.
BTW, I just did a fresh install with the dev tarball and cannot reproduce this.
Comment #6
nicholas.alipaz commentedComment #7
wouterlanda commentedi saw i messed some things up with patching the latest updates.
right now I have the dev of 10-10-09 installed and that works fine.
can you tell me which patch i would have to install to be able to add more options (next to available, booked and option).
i also have one other question. i would like to set a background for an option which shows 2 colors (for days which are half booked). One i have the possibility to create more options, i can easily create them for half day bookings (morning, afternoon and morning&afternoon)
your help is appreciated
Comment #8
nicholas.alipaz commentedYou should be able to use the patch here: #306461-19: Custom availability states and legend
Realize that it is patched against the current CVS dev, not the tarball you downloaded. So you could get an error or two in patching, usually in the .info file since that will be the only thing that differs between cvs and the tarball.
You should be able to add your custom labels through the admin interface once patched. Then use css to make the days look at "half days."
Steps to do:
Example css:
.my-label{background:transparent url(image/my-label.png) no-repeat scroll 0 0;}If it does not work then I will be glad to have a look at your site, just give me a link here or via my contact form. Please note that the above patch is not yet officially supported and will likely undergo changes so it may not be a good idea to use on a live website. Unless you are in a bind or something.
Comment #9
wouterlanda commentedthanks for all your help, it's working
see http://www.rauscher.nl/bosweg/node/27
do you have any idea how i can create the images for half day bookings?
Comment #10
nicholas.alipaz commentedphotoshop or any image editor. gimp is free if you don't have one. I suggest an image that is divided into two either diagonally (may not look great), or horizontally. Just be sure to use the same colors you have used in your site.
Comment #11
wouterlanda commentedone more thing on this item.
i just changed the template. i added the lines for the calendar to the css file. But nothing happend.
I emptied the caches, but that doesn't work either.
The theme I use now is Energetic. But I also tried it with other themes and that didn't work either.
any idea?
Comment #12
nicholas.alipaz commentedbe sure you have emptied both your site's cache and your browser's cache.
Comment #13
wouterlanda commentedi did...
but just now i found out that i did not copy the images to the correct folder.
this partially was part of the problem. the colors which are images are now being shown correctly. but for the states which just have a color i couldn't get it right. i solved it by creating some pictures...
Comment #14
nicholas.alipaz commentedIt is my guess that you can't override the colors because your css might not be using the same syntax as the original stylesheet. But glad to hear you got it through images at least.
Actually, looking at your stylesheet I can see you have the following at line 907:
That is going to override any background color you apply before that, or even after that if the css you specify is not more specific than this statement was.
This example would attempt to change the background color to black, but would not work because of specificity:
However this example would work:
Hope this makes it a bit clearer for you.