Fix bug 489162 - No accept/ decline button for invitations with GCal. r=mmecca
This commit is contained in:
Родитель
db013f0622
Коммит
c8c662f1ad
|
@ -147,6 +147,7 @@ cal.itip = {
|
||||||
return (cal.itip.isSchedulingCalendar(aCalendar)
|
return (cal.itip.isSchedulingCalendar(aCalendar)
|
||||||
&& cal.userCanAddItemsToCalendar(aCalendar));
|
&& cal.userCanAddItemsToCalendar(aCalendar));
|
||||||
}
|
}
|
||||||
|
|
||||||
let writableCalendars = cal.getCalendarManager().getCalendars({}).filter(isWritableCalendar);
|
let writableCalendars = cal.getCalendarManager().getCalendars({}).filter(isWritableCalendar);
|
||||||
if (writableCalendars.length > 0) {
|
if (writableCalendars.length > 0) {
|
||||||
let compCal = Components.classes["@mozilla.org/calendar/calendar;1?type=composite"]
|
let compCal = Components.classes["@mozilla.org/calendar/calendar;1?type=composite"]
|
||||||
|
@ -245,7 +246,10 @@ cal.itip = {
|
||||||
data[btn] = { label: null, actionMethod: "" };
|
data[btn] = { label: null, actionMethod: "" };
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Components.isSuccessCode(rc) && !actionFunc) {
|
if (rc == Components.interfaces.calIErrors.CAL_IS_READONLY) {
|
||||||
|
// No writable calendars, tell the user about it
|
||||||
|
data.label = _gs("imipBarNotWritable");
|
||||||
|
} else if (Components.isSuccessCode(rc) && !actionFunc) {
|
||||||
// This case, they clicked on an old message that has already been
|
// This case, they clicked on an old message that has already been
|
||||||
// added/updated, we want to tell them that.
|
// added/updated, we want to tell them that.
|
||||||
data.label = _gs("imipBarAlreadyProcessedText");
|
data.label = _gs("imipBarAlreadyProcessedText");
|
||||||
|
@ -497,7 +501,9 @@ cal.itip = {
|
||||||
// Per iTIP spec (new Draft 4), multiple items in an iTIP message MUST have
|
// Per iTIP spec (new Draft 4), multiple items in an iTIP message MUST have
|
||||||
// same ID, this simplifies our searching, we can just look for Item[0].id
|
// same ID, this simplifies our searching, we can just look for Item[0].id
|
||||||
let itemList = itipItem.getItemList({});
|
let itemList = itipItem.getItemList({});
|
||||||
if (itemList.length > 0) {
|
if (!itipItem.targetCalendar) {
|
||||||
|
optionsFunc(itipItem, Components.interfaces.calIErrors.CAL_IS_READONLY);
|
||||||
|
} else if (itemList.length > 0) {
|
||||||
ItipItemFinderFactory.findItem(itemList[0].id, itipItem, optionsFunc);
|
ItipItemFinderFactory.findItem(itemList[0].id, itipItem, optionsFunc);
|
||||||
} else if (optionsFunc) {
|
} else if (optionsFunc) {
|
||||||
optionsFunc(itipItem, Components.results.NS_OK);
|
optionsFunc(itipItem, Components.results.NS_OK);
|
||||||
|
|
|
@ -44,6 +44,7 @@ imipBarProcessedNeedsAction=This message contains an event that you have not yet
|
||||||
imipBarReplyText=This message contains a reply to an invitation.
|
imipBarReplyText=This message contains a reply to an invitation.
|
||||||
imipBarUnsupportedText=This message contains an event that this version of Lightning cannot process.
|
imipBarUnsupportedText=This message contains an event that this version of Lightning cannot process.
|
||||||
imipBarProcessingFailed=Processing message failed. Status: %1$S.
|
imipBarProcessingFailed=Processing message failed. Status: %1$S.
|
||||||
|
imipBarNotWritable=No writable calendars are configured for invitations, please check the calendar properties.
|
||||||
imipAcceptInvitation.label=Accept
|
imipAcceptInvitation.label=Accept
|
||||||
imipCancelInvitation.label=Delete
|
imipCancelInvitation.label=Delete
|
||||||
imipDeclineInvitation.label=Decline
|
imipDeclineInvitation.label=Decline
|
||||||
|
|
Загрузка…
Ссылка в новой задаче