Closed Bug 416802 Opened 15 years ago Closed 15 years ago

Add additional properties to allow easy customization of days in the views


(Calendar :: Calendar Frontend, defect)

Not set


(Not tracked)



(Reporter: Fallen, Assigned: Fallen)



(Whiteboard: [userChrome])


(1 file, 1 obsolete file)

Attached patch Add day relations (obsolete) β€” β€” Splinter Review
Currently, all that is provided in the views as attributes is weekend, today, selected.

This could be extended to give a hint if the day is in the past, today, or future. The attached patch takes care, by replacing the today="true" attribute with a relation="today" attribute, and adding past and future.

This also fixes the CSS style rules in our calendar-views.css. Before, we were specifying:

background: #FFFFFF;

Which does work, but is not quite clean. I changed to the following:

background-color: #FFFFFF;

This doesn't change any UI, but provides possibilities for users as requested in
Attachment #302567 - Flags: review?(Berend.Cornelius)
Attached patch Add day relations - v2 β€” β€” Splinter Review
V2 also adds off-time markers to the time-bar.

With a rule like

.calendar-time-bar-box-odd[off-time="true"] {
   background-color: #CC7CCCC;

Or alternatively:

.calendar-time-bar-box-odd:not([off-time="true"]) {
   background-color: #CC7CCCC;

The time bar box can be modifed.
Attachment #302567 - Attachment is obsolete: true
Attachment #303124 - Flags: review?(Berend.Cornelius)
Attachment #302567 - Flags: review?(Berend.Cornelius)
I like the idea. It allows to customize the views e.g. as requested in <> (cross off past days like in a paper calendar). The following shows the result of this patch, a handmade semi-transparent image and two lines of userChrome.css rules:
I like this too, this should make advanced configuration imho. The transparant image of a cross could then be included in the default package. It should be css-placed in the centre of the dayblock then as we want to be able to resize these blocks. The configuration should be able to detect wether a filename for an image is given or a color. All imho of course :-)
The patch works fine. 

>+                  switch ( {
>+                      case -1:
>+                          dayHeaderBox.setAttribute("relation", "past");
>+                          dayEventsBox.setAttribute("relation", "past");
>+                          break;
>+                      case 0:
>+                          dayHeaderBox.setAttribute("relation", "today");
>+                          dayEventsBox.setAttribute("relation", "today");
>+                          break;
>+                      case 1:
>+                          dayHeaderBox.setAttribute("relation", "future");
>+                          dayEventsBox.setAttribute("relation", "future");
>+                          break;
>+                  }
Couldn't this be set up in a commonly used function as you are using it in a similar war at another place?
Thank you!
Attachment #303124 - Flags: review?(Berend.Cornelius) → review+
It probably could, but given the short schedule I'll leave it in until its needed more than twice.

Checked in on HEAD and MOZILLA_1_8_BRANCH

Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → 0.8
Whiteboard: [userChrome]
You need to log in before you can comment on or make changes to this bug.