rem: var DescriptionHtml = document.createElement( "description" ); var DescriptionText = document.createTextNode( "Description: "+toDoItem.description ); DescriptionHtml.appendChild( DescriptionText ); HolderBox.appendChild( DescriptionHtml ); 
add: 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); } 
context: function changeToolTipTextForToDo( event ){   var toDoItem = getToDoFromEvent( event );   var Html = document.getElementById( "taskTooltip" );   while( Html.hasChildNodes() )   {      Html.removeChild( Html.firstChild );    }      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 DescriptionHtml = document.createElement( "description" );         var DescriptionText = document.createTextNode( "Description: "+toDoItem.description );         DescriptionHtml.appendChild( DescriptionText );         HolderBox.appendChild( DescriptionHtml );      }            Html.appendChild( HolderBox );   }    else   {      showTooltip = false; //Don't show the tooltip   }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/44b1f7a4f0f8a2312832431191d6c08182847a06/unifinderToDo.js/buggy/calendar/resources/content/unifinderToDo.js