mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 22:55:23 +00:00
Checked in patch for bug 258527:
MonthView, workweek only: no 5th week if month ends on day off at 6th week start
This commit is contained in:
parent
bbf0339719
commit
2a4f93fd10
@ -520,7 +520,8 @@ MonthView.prototype.refreshDisplay = function monthView_refreshDisplay( )
|
||||
}
|
||||
|
||||
{ // sixth week should not display if holds only off days and only work days displayed
|
||||
var isSixthWeekDisplayed = (firstDateCol + lastDayOfMonth > 5 * 7);
|
||||
var monthHasSixthWeek = (firstDateCol + lastDayOfMonth > 5 * 7);
|
||||
var isSixthWeekDisplayed = monthHasSixthWeek;
|
||||
if (isSixthWeekDisplayed && isOnlyWorkDays) {
|
||||
isSixthWeekDisplayed = false;
|
||||
for (var sixthWeekCol = 0; sixthWeekCol <= lastDateCol; sixthWeekCol++) {
|
||||
@ -540,7 +541,8 @@ MonthView.prototype.refreshDisplay = function monthView_refreshDisplay( )
|
||||
var isFifthWeekDisplayed = (firstDateCol + lastDayOfMonth > 4 * 7);
|
||||
if (isFifthWeekDisplayed && !isSixthWeekDisplayed && isOnlyWorkDays) {
|
||||
isFifthWeekDisplayed = false;
|
||||
for (var fifthWeekCol = 0; fifthWeekCol <= lastDateCol; fifthWeekCol++) {
|
||||
var lastFifthWeekCol = (monthHasSixthWeek? 6 : lastDateCol);
|
||||
for (var fifthWeekCol = 0; fifthWeekCol <= lastFifthWeekCol; fifthWeekCol++) {
|
||||
if (!isDayOff[(Offset + fifthWeekCol) % 7]) {
|
||||
isFifthWeekDisplayed = true;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user