rem: for( i = 0; i < EventSelectionArray.length; i++ ) { gCalendarWindow.weekView.selectBoxForEvent( EventSelectionArray[i] ); } 
add: if( EventSelectionArray.length > 0 ) {     setTimeout( "gCalendarWindow.weekView.clearSelectedDate();", 1 );  var i = 0;  for( i = 0; i < EventSelectionArray.length; i++ ) { gCalendarWindow.weekView.selectBoxForEvent( EventSelectionArray[i] ); } } else {  gCalendarWindow.weekView.hiliteSelectedDate(); } 
context: function WeekView( calendarWindow ){   // call super       this.superConstructor( calendarWindow );      //set the time on the left hand side labels   //need to do this in JavaScript to preserve formatting   for( var i = 0; i < 24; i++ )   {      /*      ** FOR SOME REASON, THIS IS NOT WORKING FOR MIDNIGHT      */       var TimeToFormat = new Date();      TimeToFormat.setHours( i );      TimeToFormat.setMinutes( "0" );      var FormattedTime = calendarWindow.dateFormater.getFormatedTime( TimeToFormat );      var Label = document.getElementById( "week-view-hour-"+i );            Label.setAttribute( "value", FormattedTime );   }      // get week view header items      gHeaderDateItemArray = new Array();      for( var dayIndex = 1; dayIndex <= 7; ++dayIndex )   {      var headerDateItem = document.getElementById( "week-header-date-" + dayIndex );            gHeaderDateItemArray[ dayIndex ] = headerDateItem;   }   var weekViewEventSelectionObserver =    {      onSelectionChanged : function( EventSelectionArray )      {         for( i = 0; i < EventSelectionArray.length; i++ )         {            gCalendarWindow.weekView.selectBoxForEvent( EventSelectionArray[i] );         }      }   }         calendarWindow.EventSelection.addObserver( weekViewEventSelectionObserver );}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/d80811ad81b012f0c2816a08064130848a4953e4/weekView.js/buggy/calendar/resources/content/weekView.js