Customizing colors in HTML timetable

Started by davvidde, October 03, 2015, 10:00:49 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

davvidde

I'll do some customization to HTML timetable modifying the attached CSS and essentially, the more researched result, is to color activities and rooms to be emphasized when printing global teachers and groups timetable.
It would be useful if, in the HTML menu, be present a selector to customize color of subjects, rooms, teacher, keys, and also enable or disable the display of them.
I think this is a bit complex but... what do you think Liviu?

Davide.
Davide.

Volker Dirr

We didn't add those stuff in the fet file, since we want to store only data that is need for timetabling. Adding those stuff just complicate the fet file and the interface. If a user need that, he can modify the css file. Then he only need to copy the css file into his directory like he want.
Maybe you saw the automatic coloring of the new snapshot already. I will maybe add that automatic to the css file. That won't complicate the interface and a user only need to enable a single option. But we are currently optimising that snapshot and Liviu didn't decide if/how he add it.

Liviu Lalescu

Yes, I agree with Volker. Volker, maybe you would like to add the interface colors from the current snapshot (5.28.0-snap-1-oct-2015) to the HTML/CSS timetables.

Davide, maybe you would like also to see the changes in the new snapshot regarding colors in the interface. They are based on CRC-24 hashing of names. Each name will have thus the same color (hopefully different from other colors). If you want, you can try as well your skills on this, but Volker did already the CSS/HTML export and knows exactly his code. I hope you are not sad because of this  :-[

Volker Dirr

ok. i played a bit with the CRC colouring done by Marco.
i attach 2 sample files. please unzip, because the css file won't be loaded if it is compressed.

i coloured by teacher names in this example.

so far i can see following advantages/disadvantages:

the variant with large colour fields:
- advantage: (maybe?) look nicer
- disadvantage: ambiguous colours. problematic are activities with more then 1 teacher, because it gets the colour of only one teacher. calculating the colour in like in the FET GUI snapshot will be difficult with html/css. I need to add a lot of code for that, html files will grow much and also css file will grow and become confusing if i try to do it like in GUI
- disadvantage: pretty much colors. will be expensive if you print to much color

the variant with the small colour field has opposite pro and cons:
- disadvantage: (maybe?) doesn't look (so?) fine
- advantage: no ambiguous colour, since each teacher has got (nearly) always it's own colour. No problem if there is more then 1 teacher per activity.
- advantage: printing will be cheaper

what do you think?

Liviu Lalescu

I don't like it at all. I think we should restrict ourselves to the interface only. Anyway, the user can change the color by modifying the CSS and he can highlight the same entity by mouseover with using HTML level 5.

davvidde

#5
@Volker:
The first CSS doesn't work as well because, when pointing mouse over names, the javascript erase the colors and it doesn't restore them when mouse leave out.
The second CSS shows a similar problem and it is better to highlight the cell square in black and white when mouse left over the cell.

I like the color in FET interface, but i don't see customization in html timetable, so, for now, I prefer a colouring style as you can see here:
http://www.itmorigiaperdisa.it/public/programmazione/ORARIO-DEFINITIVO-AS-2015-16/ORARIO-DEFINITIVO-AS-2015-16_groups_days_horizontal.html

Davide.
Davide.

Volker Dirr

sadly that is true.
maybe i should deactivate highlighting as soon as this colour feature is used.
i tried to set transparent colours to avoid this bug, but it doesn't work.
i will try later again. we don't add this feature to html at the moment. maybe as soon as i am able to fix that problems.
thank you for report.