mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-21 06:33:18 +00:00
toggle to send or not notifications
This commit is contained in:
@@ -2,9 +2,6 @@
|
||||
*
|
||||
* Copyright (C) 2007-2013 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
* Francis Lachapelle <flachapelle@inverse.ca>
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
@@ -75,6 +72,7 @@
|
||||
event = nil;
|
||||
isAllDay = NO;
|
||||
isTransparent = NO;
|
||||
sendAppointmentNotifications = YES;
|
||||
componentCalendar = nil;
|
||||
|
||||
user = [[self context] activeUser];
|
||||
@@ -139,6 +137,17 @@
|
||||
isTransparent = newIsTransparent;
|
||||
}
|
||||
|
||||
- (void) setSendAppointmentNotifications: (BOOL) theBOOL
|
||||
{
|
||||
sendAppointmentNotifications = theBOOL;
|
||||
}
|
||||
|
||||
- (BOOL) sendAppointmentNotifications
|
||||
{
|
||||
return sendAppointmentNotifications;
|
||||
}
|
||||
|
||||
|
||||
- (void) setAptStartDate: (NSCalendarDate *) newAptStartDate
|
||||
{
|
||||
ASSIGN (aptStartDate, newAptStartDate);
|
||||
@@ -279,6 +288,7 @@
|
||||
endDate
|
||||
= [startDate dateByAddingYears: 0 months: 0 days: 0
|
||||
hours: hours minutes: minutes seconds: 0];
|
||||
sendAppointmentNotifications = YES;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -296,7 +306,8 @@
|
||||
endDate = [endDate dateByAddingYears:0 months:0 days:0 hours:0 minutes:0
|
||||
seconds:-offset];
|
||||
}
|
||||
isTransparent = ![event isOpaque];
|
||||
isTransparent = ![event isOpaque];
|
||||
sendAppointmentNotifications = ([event firstChildWithTag: @"X-SOGo-Send-Appointment-Notifications"] ? NO : YES);
|
||||
}
|
||||
|
||||
[startDate setTimeZone: timeZone];
|
||||
@@ -541,6 +552,7 @@
|
||||
NSTimeZone *timeZone;
|
||||
SOGoUserDefaults *ud;
|
||||
signed int offset;
|
||||
id o;
|
||||
|
||||
[self event];
|
||||
[super takeValuesFromRequest: _rq inContext: _ctx];
|
||||
@@ -594,6 +606,14 @@
|
||||
}
|
||||
|
||||
[event setTransparency: (isTransparent? @"TRANSPARENT" : @"OPAQUE")];
|
||||
|
||||
o = [event firstChildWithTag: @"X-SOGo-Send-Appointment-Notifications"];
|
||||
|
||||
if (!sendAppointmentNotifications && !o)
|
||||
[event addChild: [CardElement simpleElementWithTag: @"X-SOGo-Send-Appointment-Notifications" value: @"NO"]];
|
||||
else if (sendAppointmentNotifications && o)
|
||||
[event removeChild: o];
|
||||
|
||||
}
|
||||
|
||||
- (id) _statusChangeAction: (NSString *) newStatus
|
||||
|
||||
Reference in New Issue
Block a user