diff --git a/calendar/resources/content/calPrintEngine.css b/calendar/resources/content/calPrintEngine.css new file mode 100644 index 000000000000..0ffce76f75ab --- /dev/null +++ b/calendar/resources/content/calPrintEngine.css @@ -0,0 +1,68 @@ +body { font-size: 11px; } + +table.head { + border: 0; + width: 100%; + font-size: 26px; + font-weight: bold; +} + +table.small { + height: 100px; + width: 100; + font-size:10px; +} + +table.weekdisplay { + border: 1px solid black; + width: 100%; +} + +tr.height { height: 20px; } + +td.weekdisplay { + text-align: center; + border: 1px solid black; + background-color: #e0e0e0; + font-size: 12px; + font-weight: bold; +} + +td.topcenter { + vertical-align: top; + text-align: center; +} + +td.bottomcenter { + vertical-align: bottom; + text-align: center; +} + +td.bottomborder { border-bottom:1px solid black; } + +td.bordertop { + border: 1px solid black; + vertical-align: top; +} + +td.normaltop { + font-size: 11px; + vertical-align: top; +} + +td.big { + text-align: center; + font-size: 26px; + font-weight: bold; + border-bottom: 1px solid black; +} + +.top { vertical-align: top; } + +.left {text-align: left; } + +.right {text-align: right; } + +.center {text-align: center; } + +.noborder { border: 0; } \ No newline at end of file diff --git a/calendar/resources/content/calPrintEngine.js b/calendar/resources/content/calPrintEngine.js index 125ada7a186f..e4b1d3a7c99f 100644 --- a/calendar/resources/content/calPrintEngine.js +++ b/calendar/resources/content/calPrintEngine.js @@ -266,15 +266,11 @@ function getBrowser() function initHTMLView() { - gHtmlString += ""+windowTitle+""; + gHtmlString += ""; + gHtmlString += ""+windowTitle+""; if (gMyTitle.length > 0) { -// gHtmlString += ">"; -// gHtmlString += ""; -// gHtmlString += mytitle; -// gHtmlString += ""; - - gHtmlString += "
"; + gHtmlString += "
"; gHtmlString += gMyTitle; gHtmlString += "
"; } @@ -294,16 +290,16 @@ function printMultiWeekView(currentDate) var weekNumber = DateUtils.getWeekNumber(currentDate) ; - gHtmlString += "
Week "+weekNumber+"
"; - gHtmlString += ""; + gHtmlString += "
Week "+weekNumber+"
"; + gHtmlString += ""; gHtmlString += ""; - gHtmlString += ""; - gHtmlString += ""; - gHtmlString += ""; - gHtmlString += ""; - gHtmlString += ""; - gHtmlString += ""; - gHtmlString += ""; + gHtmlString += ""; + gHtmlString += ""; + gHtmlString += ""; + gHtmlString += ""; + gHtmlString += ""; + gHtmlString += ""; + gHtmlString += ""; gHtmlString += ""; // content here @@ -317,12 +313,12 @@ function printMultiWeekView(currentDate) for (var i=0; i<7; i++) { var thisDaysDate=new Date(yearToStart, monthToStart, dayToStart+i+(w*7)); - gHtmlString += ""; } gHtmlString += ""; } // end of all weeks @@ -370,16 +366,16 @@ function printWeekView(currentDate) var weekStart=new Date(currentDate.getFullYear(), currentDate.getMonth(), dayStart - dowStart); var weekNumber = DateUtils.getWeekNumber(currentDate) ; - gHtmlString += "
"+ArrayOfDayNames[weekStart.getDay()]+""+ArrayOfDayNames[(weekStart.getDay()+1 >6) ? weekStart.getDay()+1-7:weekStart.getDay()+1]+""+ArrayOfDayNames[(weekStart.getDay()+2 >6) ? weekStart.getDay()+2-7:weekStart.getDay()+2]+""+ArrayOfDayNames[(weekStart.getDay()+3 >6) ? weekStart.getDay()+3-7:weekStart.getDay()+3]+""+ArrayOfDayNames[(weekStart.getDay()+4 >6) ? weekStart.getDay()+4-7:weekStart.getDay()+4]+""+ArrayOfDayNames[(weekStart.getDay()+5 >6) ? weekStart.getDay()+5-7:weekStart.getDay()+5]+""+ArrayOfDayNames[(weekStart.getDay()+6 >6) ? weekStart.getDay()+6-7:weekStart.getDay()+6]+""+ArrayOfDayNames[weekStart.getDay()]+""+ArrayOfDayNames[(weekStart.getDay()+1 >6) ? weekStart.getDay()+1-7:weekStart.getDay()+1]+""+ArrayOfDayNames[(weekStart.getDay()+2 >6) ? weekStart.getDay()+2-7:weekStart.getDay()+2]+""+ArrayOfDayNames[(weekStart.getDay()+3 >6) ? weekStart.getDay()+3-7:weekStart.getDay()+3]+""+ArrayOfDayNames[(weekStart.getDay()+4 >6) ? weekStart.getDay()+4-7:weekStart.getDay()+4]+""+ArrayOfDayNames[(weekStart.getDay()+5 >6) ? weekStart.getDay()+5-7:weekStart.getDay()+5]+""+ArrayOfDayNames[(weekStart.getDay()+6 >6) ? weekStart.getDay()+6-7:weekStart.getDay()+6]+"
"; - gHtmlString += ""; - gHtmlString += "
"; + gHtmlString += ""; + gHtmlString += ""; + gHtmlString += ""; - gHtmlString += ""; + gHtmlString += ""; var calendarEventDisplay // add each calendarEvent dayEventList = eventSource.getEventsForDay( thisDaysDate ); @@ -345,18 +341,18 @@ function printMultiWeekView(currentDate) if (calendarEventDisplay.event.allDay) formattedTime=''; // all day event if (calendarEventDisplay.event.allDay) - gHtmlString += ""; } } - gHtmlString += "
"; gHtmlString += monthNames[thisDaysDate.getMonth()].substring(0,3)+" "+thisDaysDate.getDate(); gHtmlString += "
"; + gHtmlString += "
"; else - gHtmlString += "
"+formattedTime+"
"; + gHtmlString += "
"+formattedTime+"
"; gHtmlString += eventTitle; if (calendarEventDisplay.event.location) - gHtmlString += "
"+locationTag+": "+calendarEventDisplay.event.location; + gHtmlString += "
"+locationTag+": "+calendarEventDisplay.event.location; if (calendarEventDisplay.event.url) - gHtmlString += "
"+uriTag+": "+calendarEventDisplay.event.url; + gHtmlString += "
"+uriTag+": "+calendarEventDisplay.event.url; gHtmlString += "
"; + gHtmlString += "
Week "+weekNumber+"
"; - gHtmlString += ""; + gHtmlString += "
Week "+weekNumber+"
"; + gHtmlString += ""; gHtmlString += ""; - gHtmlString += ""; - gHtmlString += ""; - gHtmlString += ""; - gHtmlString += ""; - gHtmlString += ""; - gHtmlString += ""; - gHtmlString += ""; + gHtmlString += ""; + gHtmlString += ""; + gHtmlString += ""; + gHtmlString += ""; + gHtmlString += ""; + gHtmlString += ""; + gHtmlString += ""; gHtmlString += ""; // content here dayToStart=weekStart.getDate(); @@ -390,9 +386,9 @@ function printWeekView(currentDate) for (var i=0; i<7; i++) { var thisDaysDate=new Date(yearToStart, monthToStart, dayToStart+i); - gHtmlString += ""; } gHtmlString += ""; @@ -439,12 +435,12 @@ function printDayView(currentDate) { var dayStart = currentDate.getDate(); var mydateshow= gCalendarWindow.dateFormater.getLongFormatedDate(currentDate); - gHtmlString += "
"+ArrayOfDayNames[weekStart.getDay()]+""+ArrayOfDayNames[(weekStart.getDay()+1 >6) ? weekStart.getDay()+1-7:weekStart.getDay()+1]+""+ArrayOfDayNames[(weekStart.getDay()+2 >6) ? weekStart.getDay()+2-7:weekStart.getDay()+2]+""+ArrayOfDayNames[(weekStart.getDay()+3 >6) ? weekStart.getDay()+3-7:weekStart.getDay()+3]+""+ArrayOfDayNames[(weekStart.getDay()+4 >6) ? weekStart.getDay()+4-7:weekStart.getDay()+4]+""+ArrayOfDayNames[(weekStart.getDay()+5 >6) ? weekStart.getDay()+5-7:weekStart.getDay()+5]+""+ArrayOfDayNames[(weekStart.getDay()+6 >6) ? weekStart.getDay()+6-7:weekStart.getDay()+6]+""+ArrayOfDayNames[weekStart.getDay()]+""+ArrayOfDayNames[(weekStart.getDay()+1 >6) ? weekStart.getDay()+1-7:weekStart.getDay()+1]+""+ArrayOfDayNames[(weekStart.getDay()+2 >6) ? weekStart.getDay()+2-7:weekStart.getDay()+2]+""+ArrayOfDayNames[(weekStart.getDay()+3 >6) ? weekStart.getDay()+3-7:weekStart.getDay()+3]+""+ArrayOfDayNames[(weekStart.getDay()+4 >6) ? weekStart.getDay()+4-7:weekStart.getDay()+4]+""+ArrayOfDayNames[(weekStart.getDay()+5 >6) ? weekStart.getDay()+5-7:weekStart.getDay()+5]+""+ArrayOfDayNames[(weekStart.getDay()+6 >6) ? weekStart.getDay()+6-7:weekStart.getDay()+6]+"
"; - gHtmlString += ""; // to force uniform width - gHtmlString += "
"; + gHtmlString += ""; + gHtmlString += ""; // to force uniform width + gHtmlString += ""; gHtmlString += ""; @@ -416,18 +412,18 @@ function printWeekView(currentDate) var formattedEndTime=returnTime(eventEndTime); var formattedTime=formattedStartTime+"-"+formattedEndTime; if (calendarEventDisplay.event.allDay) - gHtmlString += ""; } } - gHtmlString += "
"; gHtmlString += monthNames[thisDaysDate.getMonth()].substring(0,3)+" "+thisDaysDate.getDate(); gHtmlString += "
"; + gHtmlString += "
"; else - gHtmlString += "
"+formattedTime+"
"; + gHtmlString += "
"+formattedTime+"
"; gHtmlString += eventTitle; if (calendarEventDisplay.event.location) - gHtmlString += "
"+locationTag+": "+calendarEventDisplay.event.location; + gHtmlString += "
"+locationTag+": "+calendarEventDisplay.event.location; if (calendarEventDisplay.event.url) - gHtmlString += "
"+uriTag+": "+calendarEventDisplay.event.url; + gHtmlString += "
"+uriTag+": "+calendarEventDisplay.event.url; gHtmlString += "
"; + gHtmlString += "
"; - gHtmlString += "
"; + gHtmlString += ""; + gHtmlString += ""; - gHtmlString += ""; - gHtmlString += ""; // for entering a new appt + gHtmlString += ""; + gHtmlString += ""; // for entering a new appt var calendarEventDisplay // add each calendarEvent dayEventList = eventSource.getEventsForDay( currentDate ); @@ -459,7 +455,7 @@ function printDayView(currentDate) { listpriv=false; if (listpriv) { - gHtmlString += ""; - gHtmlString += ""; // for entering a new appt + gHtmlString += ""; // for entering a new appt } } @@ -503,17 +499,17 @@ function printEventArray( calendarEventArray) useit=false; if (useit) { - gHtmlString += "
"; gHtmlString += mydateshow; gHtmlString += "
TimeEvent
TimeEvent
"; + gHtmlString += "
"; var eventStartTime = new Date( calendarEventDisplay.event.start.getTime() ) ; var formattedStartTime=returnTime(eventStartTime); var eventEndTime = new Date( calendarEventDisplay.event.end.getTime() ) ; @@ -468,9 +464,9 @@ function printDayView(currentDate) { if (calendarEventDisplay.event.allDay) formattedTime='All Day'; // all day event gHtmlString += formattedTime; - gHtmlString += ""+calendarEventDisplay.event.title; + gHtmlString += ""+calendarEventDisplay.event.title; if (calendarEventDisplay.event.description) - gHtmlString += "
"+descriptionTag+": "+calendarEventDisplay.event.description; + gHtmlString += "
"+descriptionTag+": "+calendarEventDisplay.event.description; if (calendarEventDisplay.event.location) gHtmlString += "
"+locationTag+": "+calendarEventDisplay.event.location; if (calendarEventDisplay.event.url) @@ -482,7 +478,7 @@ function printDayView(currentDate) { mystat='Confirmed'; gHtmlString += "
Status: "+mystat; gHtmlString += "
"; + gHtmlString += "
"; if (calEvent.allDay) { gHtmlString += "All Day"; gHtmlString += ""; } else { gHtmlString += calEvent.start; - gHtmlString += ""; + gHtmlString += ""; gHtmlString += calEvent.end; } - gHtmlString += ""; + gHtmlString += ""; gHtmlString += calEvent.title; if (calEvent.description) gHtmlString += "
"+descriptionTag+": "+calEvent.description; @@ -544,16 +540,16 @@ function printMonthView(currentDate) { var endOfMonthDate = new Date(currentDate.getFullYear(), currentDate.getMonth()+1, 0); var daysInMonth = endOfMonthDate.getDate(); - gHtmlString += "
"+monthNames[currentDate.getMonth()]+" "+currentDate.getFullYear()+"
"; - gHtmlString += ""; + gHtmlString += "
"+monthNames[currentDate.getMonth()]+" "+currentDate.getFullYear()+"
"; + gHtmlString += ""; gHtmlString += ""; - gHtmlString += ""; - gHtmlString += ""; - gHtmlString += ""; - gHtmlString += ""; - gHtmlString += ""; - gHtmlString += ""; - gHtmlString += ""; + gHtmlString += ""; + gHtmlString += ""; + gHtmlString += ""; + gHtmlString += ""; + gHtmlString += ""; + gHtmlString += ""; + gHtmlString += ""; gHtmlString += ""; dayToStart=weekStart.getDate(); monthToStart=weekStart.getMonth(); @@ -568,11 +564,11 @@ function printMonthView(currentDate) { gHtmlString += ""; for (var i=0; i<7; i++) { - gHtmlString += "
"+ArrayOfDayNames[weekStart.getDay()]+""+ArrayOfDayNames[(weekStart.getDay()+1 >6) ? weekStart.getDay()+1-7:weekStart.getDay()+1]+""+ArrayOfDayNames[(weekStart.getDay()+2 >6) ? weekStart.getDay()+2-7:weekStart.getDay()+2]+""+ArrayOfDayNames[(weekStart.getDay()+3 >6) ? weekStart.getDay()+3-7:weekStart.getDay()+3]+""+ArrayOfDayNames[(weekStart.getDay()+4 >6) ? weekStart.getDay()+4-7:weekStart.getDay()+4]+""+ArrayOfDayNames[(weekStart.getDay()+5 >6) ? weekStart.getDay()+5-7:weekStart.getDay()+5]+""+ArrayOfDayNames[(weekStart.getDay()+6 >6) ? weekStart.getDay()+6-7:weekStart.getDay()+6]+""+ArrayOfDayNames[weekStart.getDay()]+""+ArrayOfDayNames[(weekStart.getDay()+1 >6) ? weekStart.getDay()+1-7:weekStart.getDay()+1]+""+ArrayOfDayNames[(weekStart.getDay()+2 >6) ? weekStart.getDay()+2-7:weekStart.getDay()+2]+""+ArrayOfDayNames[(weekStart.getDay()+3 >6) ? weekStart.getDay()+3-7:weekStart.getDay()+3]+""+ArrayOfDayNames[(weekStart.getDay()+4 >6) ? weekStart.getDay()+4-7:weekStart.getDay()+4]+""+ArrayOfDayNames[(weekStart.getDay()+5 >6) ? weekStart.getDay()+5-7:weekStart.getDay()+5]+""+ArrayOfDayNames[(weekStart.getDay()+6 >6) ? weekStart.getDay()+6-7:weekStart.getDay()+6]+"
"; - gHtmlString += "
"; + gHtmlString += ""; + gHtmlString += ""; + gHtmlString += ""; if (thisDaysDate.getMonth()==currentDate.getMonth()) { dayEventList = eventSource.getEventsForDay( thisDaysDate ); @@ -591,9 +587,9 @@ function printMonthView(currentDate) { var eventStartTime = new Date( calendarEventDisplay.event.start.getTime() ) ; var formattedStartTime=returnTime(eventStartTime); if (calendarEventDisplay.event.allDay) - gHtmlString += ""; } diff --git a/calendar/resources/jar.mn b/calendar/resources/jar.mn index 5a70340d6e80..247abfffdab2 100644 --- a/calendar/resources/jar.mn +++ b/calendar/resources/jar.mn @@ -19,6 +19,7 @@ calendar.jar: content/calendar/calendarWindow.js (content/calendarWindow.js) content/calendar/calPrintEngine.js (content/calPrintEngine.js) content/calendar/calPrintEngine.xul (content/calPrintEngine.xul) + content/calendar/calPrintEngine.css (content/calPrintEngine.css) content/calendar/clipboard.js (content/clipboard.js) * content/calendar/contents.rdf (content/contents.rdf) content/calendar/dateUtils.js (content/dateUtils.js)
"; if (thisDaysDate.getMonth()==currentDate.getMonth()) gHtmlString += thisDaysDate.getDate(); - gHtmlString += "
"; + gHtmlString += "
"; else - gHtmlString += "
"+formattedStartTime+""; + gHtmlString += "
"+formattedStartTime+""; gHtmlString += eventTitle; gHtmlString += "