First day of week is always Sunday in prefs window

VERIFIED FIXED in 0.8

Status

--
minor
VERIFIED FIXED
11 years ago
11 years ago

People

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

Tracking

unspecified

Details

Attachments

(1 attachment)

(Assignee)

Description

11 years ago
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.
(Assignee)

Comment 1

11 years ago
Created attachment 290003 [details] [diff] [review]
Dynamic sort order based on chosen first day of week

So far only tested in Lightning (I need to set up a Sunbird build environment).
(Assignee)

Comment 2

11 years ago
I have now tested in Sunbird as well.
Status: NEW → ASSIGNED
Flags: blocking-calendar0.8-
(Assignee)

Updated

11 years ago
Attachment #290003 - Flags: review?(lilmatt)

Updated

11 years ago
Severity: normal → minor

Updated

11 years ago
Flags: blocking-calendar0.8-

Comment 3

11 years ago
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 4

11 years ago
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
Last Resolved: 11 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
Last Resolved: 11 years ago11 years ago
Resolution: --- → FIXED

Comment 7

11 years ago
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.