Bug 511476 - calendar-event-dialog-freebusy.xml: Remove obsolete range check. r=philipp

This commit is contained in:
Martin Schroeder 2009-08-25 16:18:08 +02:00
Родитель f2bce9caed
Коммит 898206a435
1 изменённых файлов: 73 добавлений и 78 удалений

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

@ -22,6 +22,7 @@
- Michael Buettner <michael.buettner@sun.com> - Michael Buettner <michael.buettner@sun.com>
- Philipp Kewisch <mozilla@kewis.ch> - Philipp Kewisch <mozilla@kewis.ch>
- Simon Vaillancourt <simon.at.orcl@gmail.com> - Simon Vaillancourt <simon.at.orcl@gmail.com>
- Martin Schroeder <mschroeder@mozilla.x-home.org>
- -
- Alternatively, the contents of this file may be used under the terms of - Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or - either the GNU General Public License Version 2 or later (the "GPL"), or
@ -818,8 +819,6 @@
rangeEnd = end.clone(); rangeEnd = end.clone();
} }
if (rangeStart.compare(start) >= 0 &&
rangeEnd.compare(end) <= 0) {
let rangeDuration = rangeEnd.subtractDate(rangeStart); let rangeDuration = rangeEnd.subtractDate(rangeStart);
let rangeStartHour = rangeStart.hour; let rangeStartHour = rangeStart.hour;
let rangeEndHour = rangeStartHour + (rangeDuration.inSeconds / 3600); let rangeEndHour = rangeStartHour + (rangeDuration.inSeconds / 3600);
@ -861,11 +860,8 @@
// we need to map this offset into our array which // we need to map this offset into our array which
// holds elements for 'range' days with [start, end] hours each. // holds elements for 'range' days with [start, end] hours each.
let minutes_per_day = 24 * 60; let minutes_per_day = 24 * 60;
let day = (value - (value % minutes_per_day)) / let day = (value - (value % minutes_per_day)) / minutes_per_day;
minutes_per_day; let minute = Math.floor(value % minutes_per_day) - (start_hour * 60);
let minute = Math.floor(
value % minutes_per_day) -
(start_hour * 60);
minute = Math.max(0, minute); minute = Math.max(0, minute);
@ -904,7 +900,6 @@
} }
} }
} }
}
} else { } else {
// First of all set all state slots to 'unknown' // First of all set all state slots to 'unknown'
for (let i = 0; i < this.mState.length; i++) { for (let i = 0; i < this.mState.length; i++) {