Mini month view needs to observe week start pref

RESOLVED FIXED

Status

Calendar
Sunbird Only
RESOLVED FIXED
15 years ago
12 years ago

People

(Reporter: Mike Potter, Assigned: Mostafa Hosseini)

Tracking

Details

(Reporter)

Description

15 years ago
If you change the start of the week, the mini month view needs to redraw itself
to show the change.

Comment 1

15 years ago
I wasn't sure how best todo this, the current prefs observer fires the refresh
method from calendarWindow, should this refresh method hit the mini month
refresh? Or fire it from the pref method directly? Which ever, nethier of the
components currently know anything about the mini month.
(Reporter)

Comment 2

15 years ago
It should probably fire it from the pref method directly.
(Reporter)

Comment 3

15 years ago
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

Comment 4

14 years ago
Here's a possible fix:

1. Enable mini calendar to be reinitialized:

Mozilla/chrome/calendar/content/datepicker/calendar.xml:105
        <method name="refreshDisplay">
+          <parameter name="aReinitialize" />
           <body>
           <![CDATA[
-           if (!this.mInitialized) {
+           if (!this.mInitialized || aReinitialize) {


2. Add this.miniMonth to calendar:

Mozilla/chrome/calendar/content/calendarWindow.js:81
   //setup the preferences
   this.calendarPreferences = new calendarPreferences( this );
+
+  // miniMonth used by preferences
+   this.miniMonth = document.getElementById( "lefthandcalendar" );

   //setup the calendars
   this.calendarManager = new calendarManager( this );


3. Reinitialize mini-month calendar after week start preference
   changed (move week.start to a separate case):

Mozilla/chrome/calendar/content/pref/rootCalendarPref.js:57
            case "calendar.event.defaultstarthour":
            case "calendar.event.defaultendhour":
            case "calendar.weeks.inview":
            case "calendar.previousweeks.inview":
-           case "calendar.week.start":
                this.CalendarPreferences.calendarWindow.currentView.refresh();
                break;
+
+           case "calendar.week.start":
+               this.CalendarPreferences.calendarWindow.currentView.refresh();
+	        this.CalendarPreferences.calendarWindow.miniMonth.refreshDisplay(true);
+	        break;

            case "calendar.date.format" :
                this.CalendarPreferences.calendarWindow.currentView.refresh();
                refreshEventTree( getAndSetEventTable() );
                toDoUnifinderRefresh();
+	        break;

(Assignee)

Comment 5

14 years ago
Fixed in CVS.
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
The bugspam monkeys have been set free and are feeding on Calendar :: Sunbird Only. Be afraid for your sanity!
QA Contact: gurganbl → sunbird
You need to log in before you can comment on or make changes to this bug.