aspilicious pointed this out in #1062240-13: Recognize date fields from entities that are not the same as the view's base type, but the field name was still using underscores.

Taking advantage of this to just add it to fullcalendar_fullcalendar_classes.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tim.plunkett’s picture

Status: Active » Needs review
FileSize
1.36 KB

See attached.

aspilicious’s picture

Assigned: Unassigned » aspilicious
Status: Needs review » Needs work

This is not a correct fix. I maybe didn't make the problem clear.
It's not about the date field it is about the classes in general.
In fact we just need to add the date field class to the classes array and clean the array up afterwards.
So only doing the drupal_html_id once.

We provide hooks for adding classes, those classes can be colored if some adds an _ to it's classname it gets converted to - in ctools css. So it is our job to do the same when it comes to classes.

The problem with fieldgroup:
- classname: node-type-field_group
- css name: node-type-field-group

I'm going to work on a patch

tim.plunkett’s picture

Oh I see. Still, don't use drupal_html_id, use drupal_html_class. There is a big difference and we definitely don't want _id

aspilicious’s picture

Two patches. Both contain a proper fix but one uses a seperate function. I like the second version the most.
Yeah drupal_html_id is bad I didn't knew about drupal_html_class and after reading the docs and the function I noticed the id version adds extra stuff to the name if they are duplicated.

aspilicious’s picture

Status: Needs work » Needs review
FileSize
2.89 KB

Version 2 without tab problems...

aspilicious’s picture

Note: I think the intendation is wrong in the prepare function.

tim.plunkett’s picture

After discussion on IRC, a new patch!

tim.plunkett’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.