rem: gHtmlDocument.write("<table border=0 width=100% style='font-size:26px;font-weight:bold;'><tr ><td align=center valign=bottom>"+monthNames[currentDate.getMonth()]+" "+currentDate.getFullYear()+"</td></tr></table>"); gHtmlDocument.write("<table style='border:1px solid black;' width=100%>") gHtmlDocument.write("<tr>"); gHtmlDocument.write("<td align=center style='border:1px solid black;background-color:#e0e0e0;FONT-SIZE:12px;FONT-WEIGHT: bold'>"+ArrayOfDayNames[weekStart.getDay()]+"</td>"); gHtmlDocument.write("<td align=center style='border:1px solid black;background-color:#e0e0e0;FONT-SIZE:12px;FONT-WEIGHT: bold'>"+ArrayOfDayNames[(weekStart.getDay()+1 >6) ? weekStart.getDay()+1-7:weekStart.getDay()+1]+"</td>"); gHtmlDocument.write("<td align=center style='border:1px solid black;background-color:#e0e0e0;FONT-SIZE:12px;FONT-WEIGHT: bold'>"+ArrayOfDayNames[(weekStart.getDay()+2 >6) ? weekStart.getDay()+2-7:weekStart.getDay()+2]+"</td>"); gHtmlDocument.write("<td align=center style='border:1px solid black;background-color:#e0e0e0;FONT-SIZE:12px;FONT-WEIGHT: bold'>"+ArrayOfDayNames[(weekStart.getDay()+3 >6) ? weekStart.getDay()+3-7:weekStart.getDay()+3]+"</td>"); gHtmlDocument.write("<td align=center style='border:1px solid black;background-color:#e0e0e0;FONT-SIZE:12px;FONT-WEIGHT: bold'>"+ArrayOfDayNames[(weekStart.getDay()+4 >6) ? weekStart.getDay()+4-7:weekStart.getDay()+4]+"</td>"); gHtmlDocument.write("<td align=center style='border:1px solid black;background-color:#e0e0e0;FONT-SIZE:12px;FONT-WEIGHT: bold'>"+ArrayOfDayNames[(weekStart.getDay()+5 >6) ? weekStart.getDay()+5-7:weekStart.getDay()+5]+"</td>"); gHtmlDocument.write("<td align=center style='border:1px solid black;background-color:#e0e0e0;FONT-SIZE:12px;FONT-WEIGHT: bold'>"+ArrayOfDayNames[(weekStart.getDay()+6 >6) ? weekStart.getDay()+6-7:weekStart.getDay()+6]+"</td>"); gHtmlDocument.write("</tr>"); 
add: gHtmlDocument.write("<table border=0 width=100% style='font-size:26px;font-weight:bold;'><tr ><td align=center valign=bottom>"+monthNames[currentDate.getMonth()]+" "+currentDate.getFullYear()+"</td></tr></table>"); gHtmlDocument.write("<table style='border:1px solid black;' width=100%>") gHtmlDocument.write("<tr>"); gHtmlDocument.write("<td align=center style='border:1px solid black;background-color:#e0e0e0;FONT-SIZE:12px;FONT-WEIGHT: bold'>"+ArrayOfDayNames[weekStart.getDay()]+"</td>"); gHtmlDocument.write("<td align=center style='border:1px solid black;background-color:#e0e0e0;FONT-SIZE:12px;FONT-WEIGHT: bold'>"+ArrayOfDayNames[(weekStart.getDay()+1 >6) ? weekStart.getDay()+1-7:weekStart.getDay()+1]+"</td>"); gHtmlDocument.write("<td align=center style='border:1px solid black;background-color:#e0e0e0;FONT-SIZE:12px;FONT-WEIGHT: bold'>"+ArrayOfDayNames[(weekStart.getDay()+2 >6) ? weekStart.getDay()+2-7:weekStart.getDay()+2]+"</td>"); gHtmlDocument.write("<td align=center style='border:1px solid black;background-color:#e0e0e0;FONT-SIZE:12px;FONT-WEIGHT: bold'>"+ArrayOfDayNames[(weekStart.getDay()+3 >6) ? weekStart.getDay()+3-7:weekStart.getDay()+3]+"</td>"); gHtmlDocument.write("<td align=center style='border:1px solid black;background-color:#e0e0e0;FONT-SIZE:12px;FONT-WEIGHT: bold'>"+ArrayOfDayNames[(weekStart.getDay()+4 >6) ? weekStart.getDay()+4-7:weekStart.getDay()+4]+"</td>"); gHtmlDocument.write("<td align=center style='border:1px solid black;background-color:#e0e0e0;FONT-SIZE:12px;FONT-WEIGHT: bold'>"+ArrayOfDayNames[(weekStart.getDay()+5 >6) ? weekStart.getDay()+5-7:weekStart.getDay()+5]+"</td>"); gHtmlDocument.write("<td align=center style='border:1px solid black;background-color:#e0e0e0;FONT-SIZE:12px;FONT-WEIGHT: bold'>"+ArrayOfDayNames[(weekStart.getDay()+6 >6) ? weekStart.getDay()+6-7:weekStart.getDay()+6]+"</td>"); gHtmlDocument.write("</tr>"); 
context: function printMonthView(currentDate) {// ok first let's get the array of events for this month.var calDate = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1);var dayFirst = calDate.getDay();var dowStart = (startOfWeek <= dayFirst) ?  dayFirst-startOfWeek : 7-startOfWeek;var weekStart=new Date(calDate.getFullYear(),calDate.getMonth(),1-dowStart);var startOfMonthDate = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1);var endOfMonthDate = new Date(currentDate.getFullYear(), currentDate.getMonth()+1, 0);var daysInMonth =  endOfMonthDate.getDate();gHtmlDocument.write("<table border=0 width=100% style='font-size:26px;font-weight:bold;'><tr ><td align=center valign=bottom>"+monthNames[currentDate.getMonth()]+" "+currentDate.getFullYear()+"</td></tr></table>");gHtmlDocument.write("<table style='border:1px solid black;' width=100%>")gHtmlDocument.write("<tr>");gHtmlDocument.write("<td align=center style='border:1px solid black;background-color:#e0e0e0;FONT-SIZE:12px;FONT-WEIGHT: bold'>"+ArrayOfDayNames[weekStart.getDay()]+"</td>");gHtmlDocument.write("<td align=center style='border:1px solid black;background-color:#e0e0e0;FONT-SIZE:12px;FONT-WEIGHT: bold'>"+ArrayOfDayNames[(weekStart.getDay()+1 >6) ? weekStart.getDay()+1-7:weekStart.getDay()+1]+"</td>");gHtmlDocument.write("<td align=center style='border:1px solid black;background-color:#e0e0e0;FONT-SIZE:12px;FONT-WEIGHT: bold'>"+ArrayOfDayNames[(weekStart.getDay()+2 >6) ? weekStart.getDay()+2-7:weekStart.getDay()+2]+"</td>");gHtmlDocument.write("<td align=center style='border:1px solid black;background-color:#e0e0e0;FONT-SIZE:12px;FONT-WEIGHT: bold'>"+ArrayOfDayNames[(weekStart.getDay()+3 >6) ? weekStart.getDay()+3-7:weekStart.getDay()+3]+"</td>");gHtmlDocument.write("<td align=center style='border:1px solid black;background-color:#e0e0e0;FONT-SIZE:12px;FONT-WEIGHT: bold'>"+ArrayOfDayNames[(weekStart.getDay()+4 >6) ? weekStart.getDay()+4-7:weekStart.getDay()+4]+"</td>");gHtmlDocument.write("<td align=center style='border:1px solid black;background-color:#e0e0e0;FONT-SIZE:12px;FONT-WEIGHT: bold'>"+ArrayOfDayNames[(weekStart.getDay()+5 >6) ? weekStart.getDay()+5-7:weekStart.getDay()+5]+"</td>");gHtmlDocument.write("<td align=center style='border:1px solid black;background-color:#e0e0e0;FONT-SIZE:12px;FONT-WEIGHT: bold'>"+ArrayOfDayNames[(weekStart.getDay()+6 >6) ? weekStart.getDay()+6-7:weekStart.getDay()+6]+"</td>");gHtmlDocument.write("</tr>");dayToStart=weekStart.getDate();monthToStart=weekStart.getMonth();yearToStart=weekStart.getFullYear();var inMonth=true;var thisDaysDate=new Date(yearToStart, monthToStart, dayToStart);for (var w=0; w<6; w++){  if (inMonth)  {     gHtmlDocument.write("<tr>");     for (var i=0; i<7; i++)     {      gHtmlDocument.write("<td align=left valign=top style='border:1px solid black;vertical-alignment:top;' >");      gHtmlDocument.write("<table valign=top height=100 width=100 style='font-size:10px;'><tr valign=top><td valign=top width=20%>");      if (thisDaysDate.getMonth()==currentDate.getMonth())         gHtmlDocument.write(thisDaysDate.getDate());      gHtmlDocument.write("</td><td width=80% valign=top></td></tr>");      if (thisDaysDate.getMonth()==currentDate.getMonth())       {         dayEventList = eventSource.getEventsForDay( thisDaysDate );         var calendarEventDisplay         // add each calendarEvent         for( var eventIndex = 0; eventIndex < dayEventList.length; eventIndex++ )           {              calendarEventDisplay = dayEventList[ eventIndex ];              var listpriv=true;              if (calendarEventDisplay.event.privateEvent)                if (! gShowprivate.checked)                  listpriv=false;              if (listpriv)                  {                     eventTitle=calendarEventDisplay.event.title;                     var eventStartTime = new Date( calendarEventDisplay.event.start.getTime() ) ;                     var formattedStartTime=returnTime(eventStartTime);                     if (calendarEventDisplay.event.allDay)                        gHtmlDocument.write("<tr><td valign=top colspan=2 style='font-size:11px;'>");                     else                        gHtmlDocument.write("<tr><td valign=top align=right style='font-size:11px;'>"+formattedStartTime+"</td><td valign=top style='font-size:11px;'>");                     gHtmlDocument.write(eventTitle);                     gHtmlDocument.write("</td></tr>");                   }           } //end of events         } // if it was in the month        gHtmlDocument.write("</table>");        gHtmlDocument.write("</td>")	  //advance to the next day	thisDaysDate.setDate(thisDaysDate.getDate()+1);      } //end of each day      gHtmlDocument.write("</tr>");  } // ok it was in the month  if((thisDaysDate.getMonth() > currentDate.getMonth())||     (thisDaysDate.getFullYear() > currentDate.getFullYear()) )    inMonth=false;} // end of each weekgHtmlDocument.write("</table>")}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/1a2014804004dfe6c5e31b8e7b537a706f0072c8/calPrintEngine.js/clean/calendar/resources/content/calPrintEngine.js