All my events are of the same node type. There's a node reference field on the event node and I want to color the events based on data in the referenced node.
So I have created my own color scheme: I have implemented hook_colors_info() and hook_colors_classes() and my events are now in the desired color. However, I cannot create a legend.
I can form_alter the legend block config form to add my color scheme to the Legend type options but I need data from the $view variable as well when fullcalendar_legend_get_type_$type is called.
While digging into the Fullcalendar Legend module I started wondering: why so specific to nodes and taxonomy? This makes it very hard to create legends for custom hook_colors_info() implementations. Once we define custom color schemes we should be able to use that for the Legend, independent of the actual structure of the color scheme.
So my question is: is there a reason not to have generic legend module that can handle any color scheme? If not, I could start working on it.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | fullcalendar_allow_custom_color_scheme-1559456-1.patch | 523 bytes | czigor |
Comments
Comment #1
czigor commentedI could do almost everything with all kinds of hooks and custom theme preprocess functions without modifying the present fullcalendar module except for one thing: I could not stop template_preprocess_fullcalendar_legend() from running. So here's my patch that checks if we need to run this function or not.
Comment #2
tim.plunkettI just saw this now. I agree it's currently too strict, but I think we should change it to be something less hacky.
Comment #3
pfrenssenChanging status as per #2.
Comment #4
pfrenssenComment #5
dcam commentedI've volunteered to help clean up the FullCalendar issue queue. As part of that effort I'm closing issues open for unsupported versions of the module as "Closed (outdated)". That includes any Drupal 7-compatible versions because no active maintainer is supporting them.
If this issue is still relevant for version 3.x of FullCalendar, then feel free to re-open it and update the issue version number.