(feat) moved FolderSynchronize code to GCS
Conflicts: SoObjects/Appointments/SOGoAppointmentFolder.hpull/101/head^2
parent
1fab2028e2
commit
39601a9cf9
|
@ -77,6 +77,9 @@
|
|||
- (id) folderPropertyValueInCategory: (NSString *) theKey
|
||||
forUser: (SOGoUser *) theUser;
|
||||
|
||||
- (BOOL) synchronize;
|
||||
- (void) setSynchronize: (BOOL) new;
|
||||
|
||||
/* lower level fetches */
|
||||
- (void) deleteEntriesWithIds: (NSArray *) ids;
|
||||
|
||||
|
|
|
@ -301,6 +301,29 @@ static NSArray *childRecordFields = nil;
|
|||
return name;
|
||||
}
|
||||
|
||||
- (BOOL) synchronize
|
||||
{
|
||||
NSNumber *synchronize;
|
||||
|
||||
synchronize = [self folderPropertyValueInCategory: @"FolderSynchronize"];
|
||||
|
||||
return [synchronize boolValue];
|
||||
}
|
||||
|
||||
- (void) setSynchronize: (BOOL) new
|
||||
{
|
||||
NSNumber *synchronize;
|
||||
|
||||
if (new)
|
||||
synchronize = [NSNumber numberWithBool: YES];
|
||||
else
|
||||
synchronize = nil;
|
||||
|
||||
[self setFolderPropertyValue: synchronize
|
||||
inCategory: @"FolderSynchronize"];
|
||||
}
|
||||
|
||||
|
||||
/* This method fetches the display name defined by the owner, but is also the
|
||||
fallback when a subscriber has not redefined the display name yet in their
|
||||
environment. */
|
||||
|
|
|
@ -68,6 +68,7 @@
|
|||
* @apiParam {Number} includeInFreeBusy 1 if calendar must be include in freebusy
|
||||
* @apiParam {Number} showCalendarAlarms 1 if alarms must be enabled
|
||||
* @apiParam {Number} showCalendarTasks 1 if tasks must be enabled
|
||||
* @apiParam {Number} synchronize 1 if we enable EAS synchronization for this calendar
|
||||
* @apiParam {Number} reloadOnLogin 1 if calendar is a Web calendar that must be reload when user logins
|
||||
* @apiParam {Object} [notifications] Notification (if active user is the calendar's owner)
|
||||
* @apiParam {Number} notifications.notifyOnPersonalModifications 1 if a mail is sent for each modification made by the owner
|
||||
|
@ -108,6 +109,10 @@
|
|||
if ([o isKindOfClass: [NSNumber class]])
|
||||
[calendar setShowCalendarTasks: [o boolValue]];
|
||||
|
||||
o = [params objectForKey: @"synchronize"];
|
||||
if ([o isKindOfClass: [NSNumber class]])
|
||||
[calendar setSynchronize: [o boolValue]];
|
||||
|
||||
values = [params objectForKey: @"notifications"];
|
||||
if ([values isKindOfClass: [NSDictionary class]])
|
||||
{
|
||||
|
|
|
@ -99,7 +99,7 @@ _intValueFromHex (NSString *hexString)
|
|||
NSNumber *isActive, *fActiveTasks;
|
||||
SOGoAppointmentFolders *co;
|
||||
SOGoAppointmentFolder *folder;
|
||||
BOOL reloadOnLogin;
|
||||
BOOL reloadOnLogin, synchronize;
|
||||
|
||||
if (!calendars)
|
||||
{
|
||||
|
@ -133,6 +133,16 @@ _intValueFromHex (NSString *hexString)
|
|||
[calendar setObject: [NSNumber numberWithBool: [folder showCalendarAlarms]] forKey: @"showCalendarAlarms"];
|
||||
[calendar setObject: [NSNumber numberWithBool: [folder showCalendarTasks]] forKey: @"showCalendarTasks"];
|
||||
|
||||
if ([folder isKindOfClass: [SOGoWebAppointmentFolder class]])
|
||||
synchronize = NO;
|
||||
else
|
||||
synchronize = [folder synchronize];
|
||||
|
||||
if ([[folder nameInContainer] isEqualToString: @"personal"])
|
||||
synchronize = YES;
|
||||
|
||||
[calendar setObject: [NSNumber numberWithBool: synchronize] forKey: @"synchronize"];
|
||||
|
||||
if ([folder isWebCalendar])
|
||||
{
|
||||
urls = [NSMutableDictionary dictionaryWithObject: [folder folderPropertyValueInCategory: @"WebCalendars"]
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
</div>
|
||||
</md-toolbar>
|
||||
|
||||
<md-dialog-content class="md-dialog-content">
|
||||
<md-dialog-content class="md-dialog-content" layout="column">
|
||||
<md-checkbox
|
||||
ng-model="properties.calendar.includeInFreeBusy"
|
||||
ng-true-value="1"
|
||||
|
@ -44,6 +44,14 @@
|
|||
ng-false-value="0">
|
||||
<var:string label:value="Show tasks"/>
|
||||
</md-checkbox>
|
||||
<md-checkbox
|
||||
ng-model="properties.calendar.synchronize"
|
||||
ng-show="!properties.calendar.isWebCalendar"
|
||||
ng-disabled="properties.calendar.id == 'personal'"
|
||||
ng-true-value="1"
|
||||
ng-false-value="0">
|
||||
<var:string label:value="Synchronize"/>
|
||||
</md-checkbox>
|
||||
<md-checkbox
|
||||
ng-model="properties.calendar.reloadOnLogin"
|
||||
ng-show="properties.calendar.isWebCalendar"
|
||||
|
@ -51,7 +59,7 @@
|
|||
ng-false-value="0">
|
||||
<var:string label:value="Reload on login"/>
|
||||
</md-checkbox>
|
||||
<div ng-hide="properties.calendar.isWebCalendar || !properties.calendar.isOwned">
|
||||
<div ng-hide="properties.calendar.isWebCalendar || !properties.calendar.isOwned" layout="column">
|
||||
<md-divider><!-- divider --></md-divider>
|
||||
<md-checkbox
|
||||
ng-model="properties.calendar.notifications.notifyOnPersonalModifications"
|
||||
|
|
Loading…
Reference in New Issue