зеркало из https://github.com/mozilla/pjs.git
Bug 445488 ��� Mind default alarm setting if replying via invitations or event summary dialog; r=philipp
This commit is contained in:
Родитель
a6cd871547
Коммит
1a5049887e
|
@ -39,7 +39,7 @@
|
|||
function onLoad() {
|
||||
var args = window.arguments[0];
|
||||
var item = args.calendarEvent;
|
||||
item = (item.isMutable) ? item : item.clone();
|
||||
item = item.clone(); // use an own copy of the passed item
|
||||
var calendar = item.calendar;
|
||||
window.item = item;
|
||||
|
||||
|
@ -73,6 +73,11 @@ function onLoad() {
|
|||
if (!window.readOnly && calendar instanceof Components.interfaces.calISchedulingSupport) {
|
||||
var attendee = calendar.getInvitedAttendee(item);
|
||||
if (attendee) {
|
||||
// if this is an unresponded invitation, preset our default alarm values:
|
||||
if (attendee.participationStatus == "NEEDS-ACTION") {
|
||||
setDefaultAlarmValues(item);
|
||||
}
|
||||
|
||||
window.attendee = attendee.clone();
|
||||
// Since we don't have API to update an attendee in place, remove
|
||||
// and add again. Also, this is needed if the attendee doesn't exist
|
||||
|
|
|
@ -73,6 +73,8 @@
|
|||
src="chrome://calendar/content/calUtils.js"/>
|
||||
<script type="application/x-javascript"
|
||||
src="chrome://calendar/content/calendar-ui-utils.js"/>
|
||||
<script type="application/x-javascript"
|
||||
src="chrome://calendar/content/calendar-item-editing.js"/>
|
||||
<script type="application/x-javascript"
|
||||
src="chrome://calendar/content/calApplicationUtils.js"/>
|
||||
|
||||
|
|
|
@ -112,6 +112,12 @@ function fillJobQueue(queue) {
|
|||
var actionString = "modify";
|
||||
var oldCalendarItem = richListItem.calendarItem;
|
||||
var newCalendarItem = oldCalendarItem.clone();
|
||||
|
||||
// set default alarm on unresponded items that have not been declined:
|
||||
if (oldStatus == "NEEDS-ACTION" && newStatus != "DECLINED") {
|
||||
setDefaultAlarmValues(newCalendarItem);
|
||||
}
|
||||
|
||||
richListItem.setCalendarItemParticipationStatus(newCalendarItem,
|
||||
newStatus);
|
||||
var job = {
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
<script type="application/x-javascript" src="chrome://calendar/content/calendar-invitations-dialog.js"/>
|
||||
<script type="application/x-javascript" src="chrome://calendar/content/calUtils.js"/>
|
||||
<script type="application/x-javascript" src="chrome://calendar/content/calendar-ui-utils.js"/>
|
||||
<script type="application/x-javascript" src="chrome://calendar/content/calendar-item-editing.js"/>
|
||||
|
||||
<script type="application/x-javascript" >
|
||||
var invitationsText = "&calendar.invitations.dialog.invitations.text;";
|
||||
|
|
Загрузка…
Ссылка в новой задаче