I'm running a site that is meant for videogame competitions. I've created a taxonomy vocabulary for the list of games so that I can tag events with the games being played at them. My event content type allows multiple games to be selected as we run different games together.

I have set up FullCalendar to colorize events based upon the games being played at the event. Obviously, this may cause an issue when multiple games are played at the same event. I created an event that had three taxonomy tags (three games being played at it). Each has its own color already set. When the event is created, I take a look at fullcalendar and I see that it shows 3 different events going on at the same time, which is exactly what I want, one event in the calendar for each game being played.

The problem is that all three events all use the same taxonomy color, the color of the last taxonomy term (game) I added, not, as I would have hoped, three different event rectangles, each colored after one of the three games taking place at the same event.

CommentFileSizeAuthor
cal.png6.59 KBzerojay
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

aspilicious’s picture

Hmm interesting...

I don't know if we can fix that maybe you can help me think about this. Each event has 3 possible taxony terms. So I add the classnames of those taxonomy terms to the fullcalendar event.

Each event will have the following classnames (for example):
class=" .... fc-event-term-1 fc-event-term-2 fc-event-term2"

As you can see if you add colors for fc-event-term2 it always will override the previous colours.

Taxonomy coloring is per ENTITY/NODE not per date field in the node. I'm working on a patch/extension to allow coloring on any given css selector.

You could use firebug/chrome dev tools to find the selector you need (the selector of the date field) and color it. But thats a thing I'm working on.

tim.plunkett’s picture

Version: 7.x-2.0-alpha6 » 7.x-2.x-dev
Category: bug » feature

I'm calling this one a feature request. It's a very interesting use case.
Hopefully with all of the code aspilicious and I have been writing lately, we'll come up with something.

aspilicious’s picture

Status: Active » Closed (duplicate)

Like I said before the way you handle this is not OK.
But when #1165670: Add the correct date field class to the classes array, so we can color it. (with the fullcalendar classname module) gets in you can take a different approach.

Add a date field for each game, leave it empty if no game is played fill in the date when it's played.
You will have a different class for each game and you can color it afterwards.
(yes you will need to copy paste the date)

So I'm marking this as a duplicate for now.