the-events-calendar / the-events-calendar-category-colors

Plugin add-on for The Events Calendar to colorize categories
https://wordpress.org/plugins/the-events-calendar-category-colors
45 stars 19 forks source link

Events displaced when month view enters responsive mode #46

Closed barryhughes closed 10 years ago

barryhughes commented 10 years ago

Following from: http://wordpress.org/support/topic/events-now-showing-on-top-of-calendar

Ordinarily, when month view is in responsive mode, events are listed below the calendar grid. When TECCC is active and the legend is in place, they for some reason appear above the calendar.

The reason is that the responsive JS in tribe_mobile_month_setup() looks for an element matching #tribe-events-content > .tribe-events-calendar and adds the events using $.insertAfter() to the first matching element. Of course, by #tribe-events-content > .tribe-events-calendar it really means to target the calendar grid but because our legend also agrees with that selector it is appending them after it instead.

barryhughes commented 10 years ago

@afragen can you check out the above and see if there are any problems I'm missing? I think this approach will solve the problem rksystems hit on (I just applied the .teccc-legend class to our legend div instead of .tribe-events-calendar and added some extra selectors to our CSS).

Wouldn't mind a 2nd opinion though to be safe :-)

afragen commented 10 years ago

Above worked great. One minor omission - fixed. Now pushed and tagged.

I also think we need to automatically disable Legend Superpowers in the responsive view. Bad things happen. :wink: