Hi,
i'm trying to use the fullcalendar view with a date field nested inside a field collection.
Apparently, the fullcalendar row style doesn't recognize the date field as it is not a pure date field.
It would be great to have such a feature, to achieve things like what i'm trying to do : i want users to be able to edit their availabilities with a calendar, so i created a simple field collection with a date field and a textfield, so they can set a date with a "available" label, or "unavailable", or "unknown".
So when they edit their account, they get a fullCalendar view with all their dates, and by simply click / dragging they can create dates and switch their availabilites by clicking on the existing dates.
Comment | File | Size | Author |
---|---|---|---|
#13 | fullcalendar-1062240-13.patch | 7.99 KB | aspilicious |
#11 | fullcalendar-1062240-11-review_only.patch | 2.13 KB | tim.plunkett |
#10 | fullcalendar-1062240-10-no_whitespace_review_only.patch | 4.22 KB | tim.plunkett |
#10 | fullcalendar-1062240-10.patch | 7.75 KB | tim.plunkett |
Comments
Comment #1
aspilicious CreditAttribution: aspilicious commentedThese kind of feauture request will need to wait untill we are done with the x.2 branches.
The 7.2 is almost feauture complete it, and will be prety stable soon.
After that we have to work on the 6.2 branch to port all the changes we made to the 7.2 branch. (if possible)
When that job is done, we can try to add this feauture to the x.2 branches. BUT if it needs a (small) rewrite of the core architecture it has to wait untill there is x.3 release.
Just to let you know why I postpone this issue for now :)
Comment #2
tim.plunkettI'm assuming you're talking about http://drupal.org/project/field_collection?
I'd also like to support http://drupal.org/project/micro and http://drupal.org/project/fieldentity and... everything!
Really, *everything* is postponed until #1024586: Field machine names don't respect the field title is in and we support the changes.
Comment #3
tim.plunkettThis is going to be a fun one.
Still blocked, now on #889286: EntityAPIController::load() produces WSoD sometimes with PHP 5.2.
Comment #4
crizWould be great if this module is supporting field collections and other entities. Subscribe.
Comment #5
tim.plunkett@criz, agreed, but entity module has fatal WSOD on php 5.2 right now, which I'm still using.
Comment #6
pgsengstock CreditAttribution: pgsengstock commentedWe could really use this feature. It seems to work, except that I get a bunch of undefined index errors for each event. Similar to http://drupal.org/node/1105348.
Here's what is repeated for each calendar entry:
Comment #7
tim.plunkettOkay, I'm going to unpostpone this and try working on it soon.
Comment #8
tim.plunkettAs I summed it up in IRC:
Comment #9
tim.plunkettThis is actually not field_collection specific.
If you have a date field attached to your user, say their birthday, you could build a view of nodes, and create a relationship to the author, and display the nodes by their birthday. (If anyone has a more plausible usecase, let me know.)
The problem is that fullcalendar will check for a node entity, not the user entity.
This is fixable, except when you display two date fields, each from separate entities. Currently the code only accounts for one entity, it obviously cannot do that.
Instead of having one entity object, we can have an entities array with keys of the base table and all relationship ids, and store the key with the field, checking as we go.
Patch to com, but it's new years this weekend so maybe not til next week.
Comment #10
tim.plunkettWow, that was actually a lot of fun to fix.
I built out a view that displays node dates, the author's dates, and fullcalendar dates, all at once, and it works fine.
Attached is the actual patch, and then just a function non-whitespace diff that includes the relevant parts to make it easer to review since it includes a bunch of indenting/outdenting.
Comment #11
tim.plunkettEr, I meant to upload this one as the easy-to-see-real-changes patch.
Comment #12
aspilicious CreditAttribution: aspilicious commentedTested this with fieldgroup and it works great.
I do found a small coloring problem with fieldgroups. They don't get colored correctly.
It's also a bit different with the field being an entity and stuff.
Fieldgroups should also be a seperate tab and not part of coloring nodes. That's confusing :).
Maybe that is part of this bug, because that would mean that
$entity->entity_type always equals 'node' else the classes don't get added...
Comment #13
aspilicious CreditAttribution: aspilicious commentedMèèèh, aparantly field groups are nodes. I still think we should special case that in the colors module and give fieldgroup a special tab. That tab can be under node or it can be a primary tab.
Anyway I fixed the color thingie, it was a bug in fullcalendar. Search for drupal_html_id() in the patch.
Thnx to chx who proposed the function after I explained the problem.
ps: problem was mixed underscores and dashes in class names and ctools colors always uses dashes.
Comment #14
tim.plunkettSure we can add another plugin to colors. I'll add in this class name fix as part of this issue, but I'll do it as a separate commit.
Otherwise this is rtbc?
Comment #15
aspilicious CreditAttribution: aspilicious commentedYes sir :)
Comment #16
tim.plunkettActually, I'm going to commit this as is from #10, I'm not 100% on board with calling drupal_html_id twice like that, we can discuss it in another issue, especially since it's unrelated to this fix.
http://drupalcode.org/project/fullcalendar.git/commit/936ad6e3294f9c124b...
http://drupalcode.org/project/fullcalendar.git/commit/d245abed6bda4ffd9a...
http://drupalcode.org/project/fullcalendar.git/commit/8393d3ec03088aa96e...
http://drupalcode.org/project/fullcalendar.git/commit/978e22e8464b176c97...