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.
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).
I have now tested in Sunbird as well.
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.
Comment on attachment 290003 [details] [diff] [review] Dynamic sort order based on chosen first day of week Thanks for the patch. Works fine. ui+
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.
patch checked in on trunk and MOZILLA_1_8_BRANCH -> 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