bug 352433 - 'all-day' is shown on 'print' view and printed product for an event selected 'allday' patch=mschroeder@mozilla.x-home.org, r=dbo
git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@229161 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -330,19 +330,9 @@ function makeHTMLWeek(date, sortedList, targetMonth) {
|
||||
var dateFormatter =
|
||||
Components.classes["@mozilla.org/calendar/datetime-formatter;1"]
|
||||
.getService(Components.interfaces.calIDateTimeFormatter);
|
||||
|
||||
|
||||
function getStringForDate(date) {
|
||||
var dstring;
|
||||
if (!date.isDate) {
|
||||
return dateFormatter.formatTime(sDate);
|
||||
}
|
||||
return calGetString("dateFormat", "AllDay");
|
||||
}
|
||||
|
||||
var time;
|
||||
if (sDate) {
|
||||
time = getStringForDate(sDate);
|
||||
var time = "";
|
||||
if (!sDate.isDate) {
|
||||
time = dateFormatter.formatTime(sDate);
|
||||
}
|
||||
|
||||
var calMgr = Components.classes["@mozilla.org/calendar/manager;1"]
|
||||
|
||||
@@ -112,9 +112,6 @@ function weekPrint_format(aStream, aStart, aEnd, aCount, aItems, aTitle) {
|
||||
var weekFormatter = Components.classes["@mozilla.org/calendar/weektitle-service;1"]
|
||||
.getService(Components.interfaces.calIWeekTitleService);
|
||||
|
||||
// A place to cache the string for "All Day" events later if we need it.
|
||||
var mAllDayString = null;
|
||||
|
||||
// Start at the beginning of the week that aStart is in, and loop until
|
||||
// we're at aEnd. In the loop we build the HTML table for each day, and
|
||||
// get the day's items using getDayTd().
|
||||
@@ -250,29 +247,13 @@ function weekPrint_getDayTable(aDate, aItems) {
|
||||
break;
|
||||
}
|
||||
|
||||
function getStringForDate(aDate) {
|
||||
if (!aDate.isDate) {
|
||||
return dateFormatter.formatTime(aDate);
|
||||
}
|
||||
|
||||
// We cache the string for "All Day" 'cause we're good like that.
|
||||
if (this.mAllDayString == null) {
|
||||
this.mAllDayString = calGetString("dateFormat", "AllDay");
|
||||
}
|
||||
return this.mAllDayString;
|
||||
}
|
||||
|
||||
var time;
|
||||
if (sDate && eDate) {
|
||||
if (!sDate.isDate) {
|
||||
time = getStringForDate(sDate) + '-' + getStringForDate(eDate);
|
||||
} else {
|
||||
time = getStringForDate(sDate);
|
||||
}
|
||||
} else if (sDate) {
|
||||
time = getStringForDate(sDate);
|
||||
} else if (eDate) {
|
||||
time = getStringForDate(eDate);
|
||||
var time = "";
|
||||
if (sDate && eDate && !sDate.isDate) {
|
||||
time = dateFormatter.formatTime(sDate) + '-' + dateFormatter.formatTime(eDate);
|
||||
} else if (sDate && !sDate.isDate) {
|
||||
time = dateFormatter.formatTime(sDate);
|
||||
} else if (eDate && !eDate.isDate) {
|
||||
time = dateFormatter.formatTime(eDate);
|
||||
}
|
||||
|
||||
// Get calendar and category colours and apply them to the item's
|
||||
|
||||
@@ -94,8 +94,6 @@ pm-string=PM
|
||||
noon=Noon
|
||||
midnight=Midnight
|
||||
|
||||
AllDay=All Day
|
||||
|
||||
# Added to support localization of messages within eventDialog.js
|
||||
# Day ordinals imply order within a list.
|
||||
ordinal.suffix.1=st
|
||||
|
||||
Reference in New Issue
Block a user