rem: if( calendarEventDisplay.event.categories && calendarEventDisplay.event.categories != "" ) { eventBox.setAttribute( calendarEventDisplay.event.categories, "true" ); }  
context: DayView.prototype.createEventBox = function dayview_createEventBox( calendarEventDisplay ){   var displayDateObject = new Date( calendarEventDisplay.displayDate );   var startHour = displayDateObject.getHours();   var startMinutes = displayDateObject.getMinutes();   var eventDuration = ( ( calendarEventDisplay.displayEndDate - calendarEventDisplay.displayDate ) / (60 * 60 * 1000) );      var eventBox = document.createElement( "vbox" );      var boxHeight = document.getElementById( "day-tree-item-"+startHour ).boxObject.height;   var topHeight = document.getElementById( "day-tree-item-"+startHour ).boxObject.y - document.getElementById( "day-tree-item-"+startHour ).parentNode.boxObject.y;   var boxWidth = document.getElementById( "day-tree-item-"+startHour ).boxObject.width;      topHeight = eval( topHeight + ( ( startMinutes/60 ) * boxHeight ) );   topHeight = Math.round( topHeight ) - 2;   eventBox.setAttribute( "top", topHeight );      eventBox.setAttribute( "height", Math.round( ( eventDuration*boxHeight ) + 1 ) );      var width = Math.round( ( boxWidth-kDayViewHourLeftStart ) / calendarEventDisplay.NumberOfSameTimeEvents );   eventBox.setAttribute( "width", width );      var left = eval( ( ( calendarEventDisplay.CurrentSpot - 1 ) * width )  + kDayViewHourLeftStart );   left = left - ( calendarEventDisplay.CurrentSpot - 1 );   eventBox.setAttribute( "left", Math.round( left ) );      //if you change this class, you have to change calendarViewDNDObserver in calendarDragDrop.js      // start calendar color change by CofC   var containerName = gCalendarWindow.calendarManager.getCalendarByName(						calendarEventDisplay.event.parent.server ).subject.split(":")[2];   // set the event box to be of class week-view-event-class and the appropriate calendar-color class   eventBox.setAttribute("class", "day-view-event-class " + containerName );   // end calendar color change by CofC   eventBox.setAttribute( "flex", "1" );   eventBox.setAttribute( "eventbox", "dayview" );   eventBox.setAttribute( "onclick", "dayEventItemClick( this, event )" );   eventBox.setAttribute( "ondblclick", "dayEventItemDoubleClick( this, event )" );   // dragdrop events   eventBox.setAttribute( "ondraggesture", "nsDragAndDrop.startDrag(event,calendarViewDNDObserver);" );   eventBox.setAttribute( "ondragover", "nsDragAndDrop.dragOver(event,calendarViewDNDObserver)" );   eventBox.setAttribute( "ondragdrop", "nsDragAndDrop.drop(event,calendarViewDNDObserver)" );   eventBox.setAttribute( "onmouseover", "gCalendarWindow.changeMouseOverInfo( calendarEventDisplay, event )" );   eventBox.setAttribute( "tooltip", "eventTooltip" );   eventBox.setAttribute( "name", "day-view-event-box-"+calendarEventDisplay.event.id );   if( calendarEventDisplay.event.categories && calendarEventDisplay.event.categories != "" )   {      eventBox.setAttribute( calendarEventDisplay.event.categories, "true" );   }   var eventHTMLElement = document.createElement( "label" );   //eventHTMLElement.setAttribute( "class", "day-view-event-label-class" );   eventHTMLElement.setAttribute( "value", calendarEventDisplay.event.title );   eventHTMLElement.setAttribute( "flex", "1" );   eventHTMLElement.setAttribute( "crop", "end" );   eventBox.appendChild( eventHTMLElement );      /*   if( calendarEventDisplay.event.description != "" )   {      var eventHTMLElement2 = document.createElement( "description" );      eventHTMLElement2.setAttribute( "value", calendarEventDisplay.event.description );      eventHTMLElement2.setAttribute( "flex", "1" );      eventHTMLElement2.setAttribute( "crop", "end" );      eventBox.appendChild( eventHTMLElement2 );   }   */   // add a property to the event box that holds the calendarEvent that the   // box represents      eventBox.calendarEventDisplay = calendarEventDisplay;      this.kungFooDeathGripOnEventBoxes.push( eventBox );            return( eventBox );}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/0ef39e252c1ed1cdef1ae0a95e2147dd6db11d10/dayView.js/clean/calendar/resources/content/dayView.js