I really like the year view of the calendar and find it incredibly useful. I have themed the date box somewhat to add features which I now think would be good standard features.
1. Stripe colours shown in the year view. I have done this by changing the date box class from 'mini-day-on' to 'mini-day-##' where the ## is the stripe id. A class is added to the div for each stripe the day should display. This can then be themed with css, in my use I never have more than two events per day and I have used a background colour and a border to distinguish different events. This is clearly only useful when there are only a few events per day, but this could easily be controlled by css alone if the classes where there.
2. Tooltips on the dates. When in the year view you can look at the legend to see whats on, but it is far easier to see by hovering over a date with your mouse, and seeing a tooltip with a list of the event titles in it.
With both these you need node info which is not passed to the theme_calendar_date_box function. So if these features are not considered important, then perhaps just including the node id's in that theme function would be a huge advantage.
Comments
Comment #1
KarenS CreditAttribution: KarenS commentedThe node ids are in the themes, so you can do what you want with them.
Showing stripe colors in the year view means loading up and processing a lot more info on a view that may have a huge number of nodes, so I'm inclined not to do anything about that in the code. You can play with it in the theme.
The idea of tooltips that have a list of items might be hard to do. I would like to add some tooltips to the calendar, but it would take some thought to figure out what is easy or hard to do.
For instance, if you want a tooltip so when you hover over a day in the view you see a list of the events on that day, it actually will require that you create the view for the day and execute it, then display the results. We obviously couldn't do that automatically for every day in the calendar, so it would probably have to be some sort of ajax thing where you hover over a day, the ajax request goes back and runs the view for the day and returns the results.
If someone with good ajax skills wants to try to figure out how that could work, I'd look at a patch. It would need to be against the 5.2 version.
Comment #2
samuelet CreditAttribution: samuelet commented[comment deleted: sorry, wrong place]
Comment #3
arlinsandbulte CreditAttribution: arlinsandbulte commentedAny interest in this request?
I am inclined to say Won't Fix due to the complexity & performance cost that might be involved.
As Karen and bones said, this can be done in the theme layer, so in the interest of simplicity I am even further inclined to say "Won't Fix"
Any other feedback?
Comment #4
paul.dambra CreditAttribution: paul.dambra commentedI'd like to see this functionality. You could restrict it to the block view and to just the first three events for any day to reduce the traffic.
If someone has pointers I could look at it but I'm a hobbyist so can't promise anything.
Comment #5
paul.dambra CreditAttribution: paul.dambra commentedHi,
If this method was available in the module:
obviously with the date parameterised
then an Ajax call to that method would return a
<br />
delimited "list" of the titles. This could be called relatively easily.I'm pretty new to Drupal so am confused by how to register the URL /events/ajax/date in the calendar module.
I've called the tool-tip against any div with class has-events within a block so that could be left as a default and then anyone could edit the js to apply the tooltip or not.
Is anyone able to give me a tip on altering calendar to register that additional url and pass it to the get_day_view_event_title method? I appreciate that's probably the difficult bit :)
The included code is probably buggy as I can't test it since I can't figure out how to call it...
Comment #6
NickDickinsonWilde6.x is entirely unmaintained.