rem: function toDoUnifinderRefresh() { var hideCompleted = document.getElementById("hide-completed-checkbox").checked; 
add: function toDoUnifinderRefresh() { var hideCompleted = document.getElementById("hide-completed-checkbox").checked; var ccalendar = getCompositeCalendar(); var filter = hideCompleted ? ccalendar.ITEM_FILTER_COMPLETED_NO : ccalendar.ITEM_FILTER_COMPLETED_ALL; filter |= ccalendar.ITEM_FILTER_TYPE_TODO; var tree = document.getElementById("unifinder-todo-tree"); tree.refresh(filter); 
context: function toDoUnifinderRefresh(){   var hideCompleted = document.getElementById("hide-completed-checkbox").checked;   var savedThis = this;   var refreshListener = {       mTaskArray: new Array(),       onOperationComplete: function (aCalendar, aStatus, aOperationType, aId, aDateTime) {           setTimeout(function () { refreshToDoTree (refreshListener.mTaskArray); }, 0);       },       onGetResult: function (aCalendar, aStatus, aItemType, aDetail, aCount, aItems) {           for (var i = 0; i < aCount; i++) {               refreshListener.mTaskArray.push(aItems[i]);           }       }   };   var ccalendar = getCompositeCalendar();   var filter = 0;   if (hideCompleted)       filter |= ccalendar.ITEM_FILTER_COMPLETED_NO;   else       filter |= ccalendar.ITEM_FILTER_COMPLETED_ALL;   filter |= ccalendar.ITEM_FILTER_TYPE_TODO;   ccalendar.getItems(filter, 0, null, null, refreshListener);   var deck = document.getElementById("view-deck");   var selectedShowCompleted =  deck.selectedPanel.showCompleted;   for each (view in deck.childNodes) {       view.showCompleted = !hideCompleted;   }   var selectedDay = deck.selectedPanel.selectedDay;   // only update view if hide completed has actually changed:   if ((deck.selectedPanel.showCompleted != selectedShowCompleted) && selectedDay) {      deck.selectedPanel.goToDay(selectedDay);   }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9421/4f4c0eb29c387abfad079877e7c95e6882509c89/calendar-unifinder-todo.js/clean/calendar/base/content/calendar-unifinder-todo.js