Closed Bug 171657 Opened 22 years ago Closed 20 years ago

color for categories.

Categories

(Calendar :: Sunbird Only, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: steph1978, Assigned: mostafah)

References

Details

Attachments

(1 file, 2 obsolete files)

It would be very useful to add color for each event of the calendar according to
its categorie.
Confirming this bug as it is a valid request and I have found no dupes
Status: UNCONFIRMED → NEW
Ever confirmed: true
... and/or change colour of event depending on which calendar it is in (like in
iCal on Mac OSX).  This would be more useful than colouring based on category, IMHO.
Oops ... my enhancement request is a dupe of bug 179131.  Nevermind.
*** Bug 179131 has been marked as a duplicate of this bug. ***
What about bug 190756? It makes more sense to have colors for different calendars.
Wontfix?
New contact from mikep@oeone.com to mostafah@oeone.com
Filter on string OttawaMBA to get rid of these messages. 
Sorry for the spam.
Assignee: mikep → mostafah
Hacking around a little bit to try to learn calendar -- would like feedback.
I tried to write it to handle multiple categories, but it seems calendar will
only handle one internally (.. not a UI issue, it ignores the second category
when added by hand to the .ics file).  Also, I had trouble adding css to test
this addition - a fixed piece of css should be added to
skin/modern/calendar/calendar.css, no?
Comment on attachment 145767 [details] [diff] [review]
adds category markers to event class tags (weekView only)

Doesnt look too bad, though can't be used, as category entries _can_ contain
spaces in their names, though this code doesnt allow for that.

I am working on a new category UI, I hope to have that done, sooner than later,
perhaps a new patch can wait?

(Though the first version of the category UI won't change how it is stored, so
if you want to use ',' to split go ahead)
Attachment #145767 - Attachment is obsolete: true
*** Bug 244759 has been marked as a duplicate of this bug. ***
Attached patch patch v2 (obsolete) — — Splinter Review
This patch is based on the previous, but a bit more complete. By removing the
spaces (and some other chars) from the name of the category, the problem with
the previous patch should be fixed.
Should work on all views.
Sets the border of an event box in a color defined in the prefs. No UI to set
those prefs yet.
Attachment #164115 - Flags: first-review?(mostafah)
Comment on attachment 164115 [details] [diff] [review]
patch v2

setEventBoxProperties is too general for what it does. Suggest: change to
setEventBoxClass

>+// set the event box to be of class week-view-event-class and the appropriate calendar-color class
wrong comment

containerName is not being used in dayView.js should be removed

>+   // Setup css classes for catefory colors
category

>+//        eventBox.setAttribute("class", "multiweek-day-event-box-class " + containerName );
why not remove?

multiweek-day-event-box-class is being used in two more places in
multiweekview.js despite the renaming.please fix

Altogether I'm not comfortable with the use of arbitrary names in css class
styles.The replacing of special characters is also a bit ugly and is unclear
whether it will work with special characters or not.Can't we use a
predefined(but changable) set of colors labeled by numbers and assign
categories a number instead? Any other better solutions?
Attached patch patch v3 — — Splinter Review
Updated to mostafah's comments.
Attachment #164115 - Attachment is obsolete: true
Attachment #164614 - Flags: first-review?(mostafah)
Attachment #164115 - Flags: first-review?(mostafah)
Attachment #164614 - Flags: first-review?(mostafah) → first-review+
Patch checked in
Let's open new bugs for improvments. Already opened bug 268084 to create UI
To use it now, set the pref 'calendar.category.color.vacation' to '#FF0000'.
Change to taste.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
*** Bug 269737 has been marked as a duplicate of this bug. ***
*** Bug 280430 has been marked as a duplicate of this bug. ***
The bugspam monkeys have been set free and are feeding on Calendar :: Sunbird Only. Be afraid for your sanity!
QA Contact: colint → sunbird
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: