rem: treeView.rowCount = gEventArray.length; 
add: onOperationComplete: function (aCalendar, aStatus, aOperationType, aId, aDateTime) { setTimeout(function () { refreshEventTreeInternal(refreshListener.mEventArray); }, 0); },  onGetResult: function (aCalendar, aStatus, aItemType, aDetail, aCount, aItems) { for (var i = 0; i < aCount; i++) { refreshListener.mEventArray.push(aItems[i]); } } };  var Today = new Date();  var StartDate = new Date( Today.getFullYear(), Today.getMonth(), Today.getDate(), 0, 0, 0 ); var EndDate;  var calendar = createCalendar(); var filter = 0;  filter |= calendar.ITEM_FILTER_TYPE_EVENT;   switch( document.getElementById( "event-filter-menulist" ).selectedItem.value ) { case "all": StartDate = null; EndDate = null; break;  case "today": EndDate = new Date( StartDate.getTime() + ( 1000 * 60 * 60 * 24 ) - 1 ); break;  case "next7Days": EndDate = new Date( StartDate.getTime() + ( 1000 * 60 * 60 * 24 * 8 ) ); break;  case "next14Days": EndDate = new Date( StartDate.getTime() + ( 1000 * 60 * 60 * 24 * 15 ) ); break;  case "next31Days": EndDate = new Date( StartDate.getTime() + ( 1000 * 60 * 60 * 24 * 32 ) ); break;  case "thisCalendarMonth":  var startOfMonth = new Date( Today.getFullYear(), Today.getMonth(), 1, 0, 0, 0 );  var startOfNextMonth = new Date( Today.getFullYear(), (Today.getMonth() + 1), 1, 0, 0, 0 );  EndDate = new Date( startOfNextMonth.getTime() - 1000 ); StartDate = startOfMonth; break;  case "future":   EndDate = StartDate; break;  case "current": var SelectedDate = gCalendarWindow.getSelectedDate(); StartDate = new Date( SelectedDate.getFullYear(), SelectedDate.getMonth(), SelectedDate.getDate(), 0, 0, 0 ); EndDate = new Date( MidnightSelectedDate.getTime() + ( 1000 * 60 * 60 * 24 ) - 1000 ); break; 
context: function refreshEventTree( eventArray ){   gEventArray = eventArray;   treeView.rowCount = gEventArray.length;         var ArrayOfTreeCols = document.getElementById( UnifinderTreeName ).getElementsByTagName( "treecol" );   for( var i = 0; i < ArrayOfTreeCols.length; i++ )   {      if( ArrayOfTreeCols[i].getAttribute( "sortActive" ) == "true" )      {         treeView.selectedColumn = ArrayOfTreeCols[i].getAttribute( "id" );         treeView.sortDirection = ArrayOfTreeCols[i].getAttribute("sortDirection");         treeView.sortStartedTime = new Date().getTime(); //for null/0 dates         gEventArray.sort(compareEvents);         break;      }   }   document.getElementById( UnifinderTreeName ).view = treeView;   document.getElementById( UnifinderTreeName ).eventView = new calendarEventView( eventArray );   //select selected events in the tree.   selectSelectedEventsInTree( false );}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/20d2cc6aa6221990417f075c4cc92cb9f3fb9d62/unifinder.js/clean/calendar/resources/content/unifinder.js