mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 22:55:23 +00:00
Checked in patch for bug 254979
This commit is contained in:
parent
0f93920d90
commit
a27b574cbb
@ -1018,13 +1018,14 @@ function deleteToDoCommand( DoNotConfirm )
|
||||
var end = new Object();
|
||||
var numRanges = tree.view.selection.getRangeCount();
|
||||
|
||||
// delete in reverse order so indexes of remaining selected tasks stay same
|
||||
var t;
|
||||
var v;
|
||||
var toDoItem;
|
||||
if( numRanges == 1 ) {
|
||||
for (t=0; t<numRanges; t++){
|
||||
for (t=numRanges-1; t>=0; t--){
|
||||
tree.view.selection.getRangeAt(t,start,end);
|
||||
for (v=start.value; v<=end.value; v++){
|
||||
for (v=end.value; v>=start.value; v--){
|
||||
toDoItem = tree.taskView.getCalendarTaskAtRow( v );
|
||||
refreshRemoteCalendarAndRunFunction( toDoItem.id, toDoItem.parent.server, "deleteTodo" );
|
||||
}
|
||||
@ -1032,9 +1033,9 @@ function deleteToDoCommand( DoNotConfirm )
|
||||
} else {
|
||||
gICalLib.batchMode = true;
|
||||
|
||||
for (t=0; t<numRanges; t++){
|
||||
for (t=numRanges; t>=0; t--){
|
||||
tree.view.selection.getRangeAt(t,start,end);
|
||||
for (v=start.value; v<=end.value; v++){
|
||||
for (v=end.value; v>=start.value; v--){
|
||||
toDoItem = tree.taskView.getCalendarTaskAtRow( v );
|
||||
var todoId = toDoItem.id
|
||||
gICalLib.deleteTodo( todoId );
|
||||
@ -1042,6 +1043,8 @@ function deleteToDoCommand( DoNotConfirm )
|
||||
}
|
||||
gICalLib.batchMode = false;
|
||||
}
|
||||
// all selected tasks deleted, now clear selection
|
||||
tree.view.selection.clearSelection();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user