fullcalendar vs. calendar color of 2nd event wrong

fstorch

Member
Before calendar visualization is deprecated in favor of fullcalendar, i need to address an issue which only occurs with fullcalendar:
I got a list which stores employments that span several weeks.
So there is a start and and a finish timestamp field.
As I don't want to clobber the calendar view with event bars stretching several weeks (and there are dozens active in parallel), I prefer to show only the start event and finish events as bars at the respective days.
So I have one event for the start timestamp with color green and one event for the finish timestamp with color red. In both events no end field is selected. Unfortunately the finish event is using the green color of the start event, although the legend shows the correct red color.
calendar is showing the correct color.
Looks like the background-color is stored inline, so I cannot override with a css (didn't create a custom.css so far).
What may I be missing?

(Fabrik 3.8.1 with fresh github)
 
How are you handling the coloring? Do you use two separate lists with different colors set in the options, or do you use a "status element"? I'm confused because you said "the legend shows the correct red color", and the legend will only show the multiple lists.

Event coloring works fine for me if I use the "status element", that adds the element name and value as a class ... so (for instance) I have a test list with a join to a "US States" table, and color events for Hawaii (id 15) in blue, using a custom_css.php in my fullcalendar bootstrap template ...

Code:
.state_id15 {
   background-color: blue!important;
}

So if you have an element on the form which specifies if it's a start or an end event, you can do it that way.

NOTE the !important, which is needed to override the default style being applied to the event.

-- hugh
 
No status element. I?m using two lists - actually the same list with just a different field for the start - with coloring in the options.


Gesendet von iPhone mit Tapatalk Pro
 
I am having the same problem... it seems that if you add another elements from the same list, the legend under the calendar is right with the right color, but all elements are the same color in the calendar.

So my actual visualization is fullcalendar, i check my list call liste_des_employes... i look for the date element in the Absences group and i chosse red color fot those...everything is fine in the calendar and the legend under
But if i add another date element to check from the same list liste_des_employes, so let's say Retard and i choose yellow for color , the legend is right under the calendar, it shows Absences in red and Retard in Yellow, but in calendar, everything is red.

So i think the color is related to the list you choose first, and does'nt check for others elements color you add.

rodeokid
 
OK, the reason I couldn't initially replicate the problem was that I was using copies of the list, rather than literally adding the same list twice.

So the issue was that when using the same exact list more than once, where we select the rows from our list metadata, we were only getting one row for each unique list ID. Should be fixed as of this commit:

https://github.com/Fabrik/fabrik/commit/f052d761bd14811e004a81a9e92268d2764f6019

... which adds the duplicates by hand.

There's another commit after that, which probably doesn't affect you, to do with not selecting an end date (and when "All Day" isn't selected).

-- hugh
 
I guess I need the next commit, since I don?t select an enddate and also not fullday:
77194042ff9fda8287bcaf91a11651d6.jpg



Gesendet von iPhone mit Tapatalk Pro
 
Same as fstorch here... i now see the two colors correctly, but everything in my calendar is doubled, does'nt matter if it was an Absences element or a Retard element, they are now doubled with one of each color, just like the sreenshot he posted above.
I tried with or without an End date, and with or without activating an All day element.

rodeokid
 
Not quite working yet... all my Absences are ok now (red color) and this is my first element in the visualization options... but the second one, Retard are still doubled, one time in yellow as they should be, and one time in red like the first option... but only Absences should be in red, Retard should only show once and in yellow color.
I use start date and end date, but i don't use All day element at all.

rodeokid
 
@rodeokid - could you give me an example month to look at? I'm looking at your viz, and don't see what you are describing in the months I'm looking at.

It's working for me here ... here's an example where I have to events in the month, a 3 day and a 5 day ... the first dataset in the settings is set with the "Start Date" set to the start date (and End Date empty), the second with the Start Date set to the end date (and End Date empty):

events.png

-- hugh
 
You can look in F?vrier (february) you will see Andr? Benoit twice on the 27th... i only have a Retard for him, so it should only have the yellow one...but as you can see there is a red one and if you click on it, the popup is the same as the yellow Retard.

rodeokid
 
You can look in F?vrier (february) you will see Andr? Benoit twice on the 27th... i only have a Retard for him, so it should only have the yellow one...but as you can see there is a red one and if you click on it, the popup is the same as the yellow Retard.

rodeokid
OK, I think I'm just confused about what you are trying to do.

When you say "I only have a Retard for him", what does that mean? The original post in this thread, which is the setup I'm trying to solve, is displaying the start and end of a single event as two separate events. So every event comes in pairs. Two instances if the same list one using "start date" as the start, one using "end date" as the start. So "only having a Retard" (end?) isn't possible.



Sent from my Pixel 2 XL using Tapatalk
 
OK it's a list of all our employees, and when an employee is absent, we add this absence in his profile in a repeat group called Absences... this is what i want in red in the calendar, working fine right now.
If an employee is late for work, we note it also in a repeat group called Retard (late in english), so we add the date and how many minutes late. I want this date in Yellow in the calendar... this is where it's not working.
In my visualization, the first element in red is the date for Absences, working fine... the second element in yellow is the date for Retard, but in calendar it shows the yellow Retard correctly, then the calendar somehow add another Retard in red... this is where the bug is. It should only show Retard once in yellow like i specify in the visualization option.

rodeokid
 
Last edited:
@cheesegrits : Unfortunately it's still not working for me.
I saw your screenshot and noticed that you have a leading event, so I added one myself (used id which will not show up):
upload_2018-4-5_20-42-26.png

and that unused event shows up unexpectedly:
upload_2018-4-5_20-44-30.png
 
@fstorch - I think I've managed to replicate your issue. Looking at it now.

@rodeokid - your issue looks like being a lot harder, I hadn't noticed you are using elements in different repeat groups. I'll have to set up a test for that, which will take a little time.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top