Bug 1262373 - Today pane: DST causes missing dates for events in the "Upcoming" section. r=merike
This commit is contained in:
Родитель
518ea9d073
Коммит
74a19b434f
|
@ -6,9 +6,10 @@ Components.utils.import("resource://gre/modules/Services.jsm");
|
|||
Components.utils.import("resource://gre/modules/Preferences.jsm");
|
||||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
function Synthetic(aOpen, aDuration) {
|
||||
function Synthetic(aOpen, aDuration, aMultiday) {
|
||||
this.open = aOpen;
|
||||
this.duration = aDuration;
|
||||
this.multiday = aMultiday;
|
||||
}
|
||||
|
||||
var agendaListbox = {
|
||||
|
@ -29,11 +30,11 @@ function initAgendaListbox() {
|
|||
var showTodayHeader = (document.getElementById("today-header-hidden").getAttribute("checked") == "true");
|
||||
var showTomorrowHeader = (document.getElementById("tomorrow-header-hidden").getAttribute("checked") == "true");
|
||||
var showSoonHeader = (document.getElementById("nextweek-header-hidden").getAttribute("checked") == "true");
|
||||
this.today = new Synthetic(showTodayHeader, 1);
|
||||
this.today = new Synthetic(showTodayHeader, 1, false);
|
||||
this.addPeriodListItem(this.today, "today-header");
|
||||
this.tomorrow = new Synthetic(showTomorrowHeader, 1);
|
||||
this.tomorrow = new Synthetic(showTomorrowHeader, 1, false);
|
||||
this.soonDays = getSoondaysPreference();
|
||||
this.soon = new Synthetic(showSoonHeader, this.soonDays);
|
||||
this.soon = new Synthetic(showSoonHeader, this.soonDays, true);
|
||||
this.periods = [this.today, this.tomorrow, this.soon];
|
||||
this.mPendingRefreshJobs = new Map();
|
||||
|
||||
|
|
|
@ -127,14 +127,14 @@
|
|||
.getInTimezone(calendarDefaultTimezone());
|
||||
let endPreviousDay = endDate.clone();
|
||||
endPreviousDay.day--;
|
||||
let now = cal.now();
|
||||
now.isDate = true;
|
||||
let longPeriod = periodStartDate.subtractDate(now).days > 1;
|
||||
// Show items's date for long periods but also for "Upcoming"
|
||||
// period with one day duration.
|
||||
let showDate = aPeriod.multiday || aPeriod.duration > 1;
|
||||
|
||||
let date = "";
|
||||
let iconType = "";
|
||||
let allDayDateLabel = document.getAnonymousElementByAttribute(this, "anonid", "agenda-allDayEvent-date");
|
||||
setBooleanAttribute(allDayDateLabel, "hidden", !longPeriod);
|
||||
setBooleanAttribute(allDayDateLabel, "hidden", !showDate);
|
||||
if (startDate.compare(endPreviousDay) != 0) {
|
||||
// All day event spanning multiple days.
|
||||
if (startDate.compare(periodStartDate) >= 0 &&
|
||||
|
@ -219,9 +219,9 @@
|
|||
if (endAtMidnight) {
|
||||
endDate.day--;
|
||||
}
|
||||
let now = cal.now();
|
||||
now.isDate = true;
|
||||
let longFormat = periodStartDate.subtractDate(now).days > 1;
|
||||
// Show items's date for long periods but also for "Upcoming"
|
||||
// period with one day duration.
|
||||
let longFormat = aPeriod.multiday || aPeriod.duration > 1;
|
||||
|
||||
let duration = "";
|
||||
let iconType = "";
|
||||
|
|
Загрузка…
Ссылка в новой задаче