Closed Bug 416802 Opened 16 years ago Closed 16 years ago

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

Categories

(Calendar :: Calendar Frontend, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: Fallen, Assigned: Fallen)

References

Details

(Whiteboard: [userChrome])

Attachments

(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 
http://groups.google.com/group/mozilla.support.calendar/browse_thread/thread/053b9c50b9a771a9
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"],
.calendar-time-bar-box-odd[off-time="true"] {
   background-color: #CC7CCCC;
}

Or alternatively:

.calendar-time-bar-box-odd:not([off-time="true"]),
.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 <http://forums.mozillazine.org/viewtopic.php?t=628526> (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: http://img207.imageshack.us/img207/430/bug416802vv4.png
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 (d.compare(today)) {
>+                      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

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

Attachment

General

Created:
Updated:
Size: