Bug 797271 - In month and multiday views there's an attribute "today" that is not being used. r=philipp

This commit is contained in:
Decathlon 2012-11-29 11:59:25 +01:00
Родитель 48b9c5f8f6
Коммит d9dacd78ef
2 изменённых файлов: 8 добавлений и 13 удалений

Просмотреть файл

@ -744,6 +744,13 @@
var daybox = row.childNodes[j];
var date = dateList[dateBoxes.length];
// Remove the attribute "relation" for all the column headers.
// Consider only the first row index otherwise it will be
// removed again afterwards the correct setting.
if (i == 0) {
this.labeldaybox.childNodes[j].removeAttribute("relation");
}
daybox.setAttribute("context", this.getAttribute("context"));
daybox.setAttribute("item-context", this.getAttribute("item-context") || this.getAttribute("context"));
@ -768,6 +775,7 @@
break;
case 0:
daybox.setAttribute("relation", "today");
this.labeldaybox.childNodes[j].setAttribute("relation", "today");
break;
case 1:
daybox.setAttribute("relation", "future");
@ -783,7 +791,6 @@
daybox.showMonthLabel = false;
}
daybox.calendarView = this;
daybox.date = date;
dateBoxes.push(daybox);
@ -806,17 +813,6 @@
this.mDateBoxes = dateBoxes;
this.hideDaysOff();
// Highlight box and column header corresponding to today if it's
// in the range of the view.
for (let i = 0; i < this.labeldaybox.childNodes.length; i++) {
this.labeldaybox.childNodes[i].removeAttribute("relation");
}
if (today.compare(dateList[0]) != -1 &&
today.compare(dateList[dateList.length-1]) != 1) {
this.findDayBoxForDate(today).setAttribute("today", "true");
this.labeldaybox.childNodes[(7 + today.weekday - this.weekStartOffset) % 7]
.setAttribute("relation", "today");
}
this.adjustWeekdayLength();
]]></body>
</method>

Просмотреть файл

@ -3274,7 +3274,6 @@
var dayHeaderBox;
if (counter < headerboxkids.length) {
dayHeaderBox = headerboxkids[counter];
dayHeaderBox.removeAttribute("today");
// Delete backwards to make sure we get them all
// and delete until no more elements are left.
while(dayHeaderBox.mItemBoxes.length != 0) {