Comments

tim.plunkett’s picture

aspilicious’s picture

Well I don't agree completly on this. The problem is that we don't call the color code when switching months. We (or I) have to figure out first WHY we the classnames are added but the color code isn't called... They live in the same function thats why it confuses me.

tim.plunkett’s picture

Status: Active » Needs review
StatusFileSize
new4.52 KB

Wow is the ctools css stuff easy.

Okay, so pretend that fullcalendar_colors_create_css_file() is a colors.module function. I just put it in fullcalendar_colors so it could be patched against fullcalendar.

The changes to fullcalendar_colors_set_color() are not ideal. I need to think about that more. It needs to be something closer to the changes in fullcalendar_colors_admin_settings_submit().

There is likely a lot more in fullcalendar_colors.module that can be ripped out, but this is a start.

aspilicious’s picture

Works after clearing caches in some cases.
If there are no events on the landing page, the calendar doesn't load.

I'm not sur this is caused by this patch or those other changes you pulled in yesterday.

tim.plunkett’s picture

Yeah I messed that up last night. Fixed now.

I also realized the empty handler is completely unused now....

tim.plunkett’s picture

Assigned: Unassigned » tim.plunkett
Status: Needs review » Needs work

Okay so a couple issues:

  • Rearranging is broken
  • The pattern to trigger a rebuild is bad
  • Not every module needs to implement hook_colors_build_selector() so we need a new way of doing that

aspilicious suggested we just rebuild the css on every submit, but that's not exactly ideal either.

tim.plunkett’s picture

Title: Fullcalendar coloring fails with ajax and some content types not on the first page » Rewrite the FullCalendar Colors API to be the Colors API using the CTools CSS system
Category: bug » task
tim.plunkett’s picture

StatusFileSize
new0 bytes
new20.89 KB

Here's a first stab. Still haven't addressed the first two points of #6, and I might refactor more.

tim.plunkett’s picture

StatusFileSize
new22.49 KB

Ugh 0 bytes fail

tim.plunkett’s picture

At the end of this, fullcalendar_colors should be about four functions:
fullcalendar_colors_colors_build_selector() to dictate the selector
fullcalendar_colors_preprocess_fullcalendar() to add the file
fullcalendar_colors_create_css_file() or something to generate the file
fullcalendar_colors_fullcalendar_classes() to add the classes

tim.plunkett’s picture

Status: Needs work » Needs review
StatusFileSize
new35.54 KB
new22.47 KB

The default color stuff is still not done, but the rest looks pretty good to me.
Upgrade path is still untouched.

aspilicious’s picture

Status: Needs review » Needs work
+++ b/fullcalendar_colors/fullcalendar_colors.moduleundefined
@@ -161,123 +33,9 @@ function fullcalendar_colors_colors_build_selector($class) {
+function fullcalendar_colors_fullcalendar_classes($entity) {
+  colors_include_api();
+  return module_invoke_all('colors_classes', $entity);
 }

I'm not sure this broke my use case again. Can you do the following:

1) Add custom colors css
2) But don't add it to the classes array

tim.plunkett’s picture

We could add a flag per plugin to exclude when adding classes not colors. Would that work? Your code NEVER gets added as classes, right?

aspilicious’s picture

In this case yes.

tim.plunkett’s picture

Assigned: tim.plunkett » aspilicious
Status: Needs work » Needs review
StatusFileSize
new35.54 KB
new23.44 KB

Okay, now those implementing hook_colors_classes can choose to exclude themselves from classes, and only be in the CSS file.

See the bit in colors.api.php for hook_colors_classes().

tim.plunkett’s picture

Assigned: aspilicious » tim.plunkett
Status: Needs review » Needs work

I didn't get anything more accomplished, but I did push up branches. Updated the issue summary.

tim.plunkett’s picture

I pushed up the alpha7/beta1 version of the upgrade path.

I can adapt the old fullcalendar_colors_update_7200 pretty easily, I just have to add some module_exists calls and use the new API functions. Also, I need to whip up an alpha6 site. That's for tomorrow.

tim.plunkett’s picture

Assigned: tim.plunkett » aspilicious
Status: Needs work » Needs review

Alright, tested it from both alpha6 and beta1, everything works great.

The only thing I haven't checked is exactly what happens if you don't get the new colors version before updating fullcalendar.

tim.plunkett’s picture

Okay, added checks to make sure the updates don't run if Colors is out of date.

Ready for review!

tim.plunkett’s picture

StatusFileSize
new40.09 KB
new24.11 KB

Here are patches for the less git inclined.

pjcdawkins’s picture

n00b confusion here:

$ git apply -v colors-1348538-20.patch 
Checking patch colors.api.php...
Checking patch colors.info...
error: while searching for:
name = Colors
description = API for coloring selectors.
core = 7.x

error: patch failed: colors.info:1
error: colors.info: patch does not apply

The fullcalendar patch applies fine. What exactly do you mean by 'latest version' of Colors? I've tried with -dev and -alpha2.

aspilicious’s picture

Status: Needs review » Reviewed & tested by the community

Tested all the upgrade paths. Works great.

Had lots of troubles with the upgrades:
- Date module changes to much lol
- I had a date contextual filter and that destroyed everything
- Ow yeah and the "broken empty view option" is confusing we should document you don't need to add it anymore

tim.plunkett’s picture

Assigned: aspilicious » tim.plunkett

@pjcdawkins, the Colors module is separate: http://drupal.org/project/colors

@aspilicious, awesome! I'll be sure to document the empty handler part.

pjcdawkins’s picture

@#23

fullcalendar_update_7201() was insisting I didn't have the latest version of Colors, because I couldn't get colors-1348538-20.patch to run. But it's working beautifully now with your beta2 release. Thanks!

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

Anonymous’s picture

Issue summary: View changes

Updated issue summary.