rem: if (caltype.value == '') caltype.value='month'; if (caltype.value == 'month') printMonthView(gStartDate); else if (caltype.value == 'list') printEventArray( selectedEvents); else if (caltype.value == 'day') printDayView(gStartDate); else if (caltype.value == 'week') printWeekView(gStartDate); else if (caltype.value == 'multiweek') printMultiWeekView(gStartDate); else alert("That view is not implemented yet"); return true; 
add: if (caltype.value == '') caltype.value='month';  var printFunction; var  printFunctionArg = gStartDate ;  switch(caltype.value ) { case 'month' : printFunction = "printMonthView" ; break ; case 'list' : printFunction = "printEventArray" ; printFunctionArg = gSelectedEvents ; break ; case 'day' : printFunction = "printDayView" ; break ; case 'week' : printFunction = "printWeekView" ; break ; case 'multiweek' : printFunction = "printMultiWeekView" ; break ; default : alert("Error : no case in printDialog.js::printCalendar()"); return false ; } printInitWindow(printFunction,printFunctionArg) return true ; 
context: function printCalendar() {  var caltype=document.getElementById("view-field");  if (caltype.value == '')     caltype.value='month';  if (caltype.value == 'month')     printMonthView(gStartDate);  else     if (caltype.value == 'list')        printEventArray( selectedEvents);     else        if (caltype.value == 'day')           printDayView(gStartDate);        else           if (caltype.value == 'week')              printWeekView(gStartDate);           else              if (caltype.value == 'multiweek')                 printMultiWeekView(gStartDate);              else                 alert("That view is not implemented yet");  return true;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/345f8db03484ebac4fc37c59ac67da75151c5b5e/printDialog.js/clean/calendar/resources/content/printDialog.js