rem: function getPreviewTextForTask( calendarEventDisplay ) 
add: function getPreviewTextForTask( toDoItem ) 
context: function getPreviewTextForTask( calendarEventDisplay ){  var toDoItem = calendarEventDisplay ;   var HolderBox = document.createElement( "vbox" );   if( toDoItem )   {      showTooltip = true; //needed to show the tooltip.               if (toDoItem.title)      {         var TitleHtml = document.createElement( "description" );         var TitleText = document.createTextNode( "Title: "+toDoItem.title );         TitleHtml.appendChild( TitleText );         HolderBox.appendChild( TitleHtml );      }         var DateHtml = document.createElement( "description" );      var startDate = new Date( toDoItem.start.getTime() );      var DateText = document.createTextNode( "Start Date: "+gCalendarWindow.dateFormater.getFormatedDate( startDate ) );      DateHtml.appendChild( DateText );      HolderBox.appendChild( DateHtml );         DateHtml = document.createElement( "description" );      var dueDate = new Date( toDoItem.due.getTime() );      DateText = document.createTextNode( "Due Date: "+gCalendarWindow.dateFormater.getFormatedDate( dueDate ) );      DateHtml.appendChild( DateText );      HolderBox.appendChild( DateHtml );         if (toDoItem.description)      {	var text = "Description: "+toDoItem.description ;	var lines = text.split("\n");	var nbmaxlines = 5 ;	var nblines = lines.length ;	if( nblines > nbmaxlines ) {	  var nblines = nbmaxlines ;	  lines[ nblines - 1 ] = "..." ;	}		for (var i = 0; i < nblines; i++) {	  var DescriptionHtml = document.createElement("description");	  var DescriptionText = document.createTextNode(lines[i]);	  DescriptionHtml.appendChild(DescriptionText);	  HolderBox.appendChild(DescriptionHtml);	}//          var DescriptionHtml = document.createElement( "description" );//          var DescriptionText = document.createTextNode( "Description: "+toDoItem.description );//          DescriptionHtml.appendChild( DescriptionText );//          HolderBox.appendChild( DescriptionHtml );      }            return ( HolderBox );   }    else   {      showTooltip = false; //Don't show the tooltip   }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/fd6cbdd83f28ebcb811a684385dd5c52936bfe16/calendar.js/clean/calendar/resources/content/calendar.js