Closed Bug 405199 Opened 17 years ago Closed 17 years ago

First day of week is always Sunday in prefs window

Categories

(Calendar :: Preferences, defect)

defect
Not set
minor

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: bugzilla.mozilla.org-3, Assigned: bugzilla.mozilla.org-3)

Details

Attachments

(1 file)

I live in a country where Monday is considered the first day of the week. Even though I specify this in the preferences window (General / Start the week on : 
[ Monday ] ), the checkboxes immediately below this in the preferences window are always sorted with Sunday first (Workweek / Include these days in the workweek:
[ ] Sun  [X] Mon  [X] ... ).

This looks odd to me. I believe the checkbox order should respect the calendar.week.start setting.
So far only tested in Lightning (I need to set up a Sunbird build environment).
I have now tested in Sunbird as well.
Status: NEW → ASSIGNED
Flags: blocking-calendar0.8-
Attachment #290003 - Flags: review?(lilmatt)
Severity: normal → minor
Flags: blocking-calendar0.8-
Comment on attachment 290003 [details] [diff] [review]
Dynamic sort order based on chosen first day of week

Matt is not active at the moment. Please request reviews from the active reviewers listed on http://wiki.mozilla.org/Calendar:Module_Ownership

In addition, this is an UI change and needs UI-review.
Attachment #290003 - Flags: ui-review?(christian.jansen)
Attachment #290003 - Flags: review?(michael.buettner)
Attachment #290003 - Flags: review?(lilmatt)
Comment on attachment 290003 [details] [diff] [review]
Dynamic sort order based on chosen first day of week

Thanks for the patch. Works fine. ui+
Attachment #290003 - Flags: ui-review?(christian.jansen) → ui-review+
Comment on attachment 290003 [details] [diff] [review]
Dynamic sort order based on chosen first day of week

>+    updateViewWorkDayCheckboxes: function (weekStart) {
>+        for (var i = Number(weekStart); i < Number(weekStart) + 7; i++) {
>+            var checkbox = document.getElementById("dayoff" + (i % 7));
>+            checkbox.parentNode.appendChild(checkbox);
>+        }
>+    }
This is indeed a nice and elegant solution.

I'd follow the surrounding style and avoid anonymous functions, for example:
>     updateViewWorkDayCheckboxes: function prefUpdateViewWorkDays(weekStart) {

...and pull the conversion out of the loop, such as:
>      weekStart = Number(weekStart);
>      for (var i = weekStart; i < weekStart + 7; i++) {

I'm going to change this before checking in. Thanks for the patch. r=mickey.
Attachment #290003 - Flags: review?(michael.buettner) → review+
patch checked in on trunk and MOZILLA_1_8_BRANCH

-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
OS: Linux → All
Hardware: PC → All
Target Milestone: --- → 0.8
Version: Trunk → unspecified
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee: nobody → bugzilla.mozilla.org-1
Status: REOPENED → NEW
Status: NEW → RESOLVED
Closed: 17 years ago17 years ago
Resolution: --- → FIXED
Verified with Lt 2007120104 and Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11pre) Gecko/20071201 Calendar/0.8pre
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.