rem: else { document.getElementById("task-context-menu-modify") .setAttribute("disabled", true); tree.taskView.contextTask = null; 
add:   if (toDoItem) { document.getElementById("task-context-menu-delete") .removeAttribute("disabled"); } else { document.getElementById("task-context-menu-delete") .setAttribute("disabled", "true"); 
context: function changeContextMenuForToDo(event){   if (event.target.id != "taskitem-context-menu")     return;   var toDoItem = getToDoFromEvent(event);   // If only one task is selected, enable 'Edit Task'   var tree = document.getElementById(ToDoUnifinderTreeName);    var start = new Object();   var end = new Object();   var numRanges = tree.view.selection.getRangeCount();   tree.view.selection.getRangeAt(0, start, end);   if (numRanges == 1 && (start.value == end.value) && toDoItem) {       document.getElementById("task-context-menu-modify")               .removeAttribute("disabled");       tree.taskView.contextTask = toDoItem;   }   else {       document.getElementById("task-context-menu-modify")               .setAttribute("disabled", true);       tree.taskView.contextTask = null;   }   // make progress and priority popup menu visible   document.getElementById("is_editable").removeAttribute("hidden");   // enable/disable progress and priority popup menus   if (toDoItem)   {      document.getElementById("is_editable").removeAttribute("disabled");      var liveList = document.getElementById("taskitem-context-menu")                             .getElementsByAttribute("checked", "true");      // Delete in reverse order.  Moz1.8+ getElementsByAttribute list is      // 'live', so when attribute is deleted the indexes of later elements      // change, but Moz1.7- is not.  Reversed order works with both.      for (var i = liveList.length - 1; i >= 0; i-- )      {         liveList.item(i).removeAttribute("checked");      }      if (document.getElementById("percent-"+toDoItem.percentComplete+"-menuitem"))      {         document.getElementById("percent-"+toDoItem.percentComplete+"-menuitem")                 .setAttribute("checked", "true");      }         if (document.getElementById("priority-"+toDoItem.priority+"-menuitem"))      {         document.getElementById("priority-"+toDoItem.priority+"-menuitem")                 .setAttribute("checked", "true");      }   } else {      document.getElementById("is_editable").setAttribute("disabled", "true");   }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9421/adf8def97c78eca43decf76e12f684786f6bea7d/calendar-unifinder-todo.js/buggy/calendar/base/content/calendar-unifinder-todo.js