Closed Bug 1073982 Opened 5 years ago Closed 5 years ago

Add context menu options to show a single calendar and show all calendars

Categories

(Calendar :: Calendar Views, enhancement)

enhancement
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mmecca, Assigned: mmecca)

References

Details

Attachments

(1 file, 2 obsolete files)

No description provided.
Attached patch show-only-cal.diff (obsolete) β€” β€” Splinter Review
Adds the Show/Hide, Show Only, and Show All calendar options to the calendar list context menu.

Requires the patch in Bug 610152 to prevent view issues when showing multiple calendars at once.
Attachment #8496589 - Flags: review?(philipp)
Comment on attachment 8496589 [details] [diff] [review]
show-only-cal.diff

Review of attachment 8496589 [details] [diff] [review]:
-----------------------------------------------------------------

r=philipp with these minor nits:

::: calendar/base/content/calendar-management.js
@@ +211,5 @@
>      // We use the main window's calendar list to ensure that the calendar is visible
>      document.getElementById("calendar-list-tree-widget").ensureCalendarVisible(aCalendar);
>  }
>  
> +function toggleCalendarVisible(aCalendar) {

These functions could use a header with documentation.

@@ +222,5 @@
> +}
> +
> +function showAllCalendars() {
> +    let composite = getCompositeCalendar();
> +    let cals = getCalendarManager().getCalendars({});

cal.getCalendarManager
Attachment #8496589 - Flags: review?(philipp) → review+
Attached patch Fix v2 (obsolete) β€” β€” Splinter Review
It turns out the Today Pane needed a fix for it's refresh queue similar to the one in Bug 610152. We could probably de-duplicate some code between the Today Pane and the Views, but if it's OK by you I'll leave that for another bug.
Attachment #8496589 - Attachment is obsolete: true
Attachment #8519496 - Flags: review?(philipp)
Comment on attachment 8519496 [details] [diff] [review]
Fix v2

Review of attachment 8519496 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, sorry for the delay. r=philipp with these minor nits:

::: calendar/locales/en-US/chrome/calendar/calendar.dtd
@@ +242,5 @@
>  <!ENTITY calendar.context.export.accesskey             "E">
>  <!ENTITY calendar.context.properties.label             "Properties">
>  <!ENTITY calendar.context.properties.accesskey         "P">
> +<!ENTITY calendar.context.togglevisible.accesskey      "H">
> +<!ENTITY calendar.context.showonly.accesskey           "O">

You might want to add a localization note here and in the properties file mentioning that this is the access key for the other string.

::: calendar/locales/en-US/chrome/calendar/calendar.properties
@@ +590,5 @@
>  unitHours=#1 hour;#1 hours
>  unitDays=#1 day;#1 days
> +
> +# LOCALIZATION NOTE (showCalendar)
> +# Used in calendar list

Used in the calendar list context menu
Attachment #8519496 - Flags: review?(philipp) → review+
Attached patch Fix v3 β€” β€” Splinter Review
Patch for check-in
Attachment #8519496 - Attachment is obsolete: true
Attachment #8527393 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/comm-central/rev/d6dc036e0bf9
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 3.8
Duplicate of this bug: 417217
You need to log in before you can comment on or make changes to this bug.