Fix bug 800333 - Event context menu propose to change attendance in a readonly calendar. r=philipp

This commit is contained in:
Decathlon 2012-11-06 18:08:01 +01:00
Родитель bd41d4be75
Коммит 0c647c8128
2 изменённых файлов: 9 добавлений и 3 удалений

Просмотреть файл

@ -179,7 +179,9 @@ var calendarController = {
this.todo_items_selected &&
this.todo_items_writable;
} else {
attendSel = this.item_selected && this.selected_events_invitation;
attendSel = this.item_selected &&
this.selected_events_invitation &&
this.selected_items_writable;
}
// Small hack, we want to hide instead of disable.
@ -590,8 +592,8 @@ var calendarController = {
},
/**
* Returns a boolean indicating if the items selected in the current view
* all have writable calendars.
* Returns a boolean indicating that at least one of the items selected
* in the current view has a writable calendar.
*/
get selected_items_writable() {
return this.writable &&

Просмотреть файл

@ -532,6 +532,10 @@ function setContextPartstat(value, scope, items) {
startBatchTransaction();
try {
for each (let oldItem in items) {
// Skip this item if its calendar is read only.
if (oldItem.calendar.readOnly) {
continue;
}
if (scope == "all-occurrences") {
oldItem = oldItem.parentItem;
}