add:   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; }  
context: function changeContextMenuForToDo( event ){   if (event.target.id != "taskitem-context-menu")     return;   var toDoItem = getToDoFromEvent( event );   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.percent+"-menuitem" ) )      {         document.getElementById( "percent-"+toDoItem.percent+"-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/2006_temp/2006/9421/54becbe24dd69cdac8cc9d94e12a05abe7ccb500/unifinderToDo.js/clean/calendar/resources/content/unifinderToDo.js