(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
|
- (id) folderPropertyValueInCategory: (NSString *) theKey
|
||||||
forUser: (SOGoUser *) theUser;
|
forUser: (SOGoUser *) theUser;
|
||||||
|
|
||||||
|
- (BOOL) synchronize;
|
||||||
|
- (void) setSynchronize: (BOOL) new;
|
||||||
|
|
||||||
/* lower level fetches */
|
/* lower level fetches */
|
||||||
- (void) deleteEntriesWithIds: (NSArray *) ids;
|
- (void) deleteEntriesWithIds: (NSArray *) ids;
|
||||||
|
|
||||||
|
|
|
@ -301,6 +301,29 @@ static NSArray *childRecordFields = nil;
|
||||||
return name;
|
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
|
/* 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
|
fallback when a subscriber has not redefined the display name yet in their
|
||||||
environment. */
|
environment. */
|
||||||
|
|
|
@ -68,6 +68,7 @@
|
||||||
* @apiParam {Number} includeInFreeBusy 1 if calendar must be include in freebusy
|
* @apiParam {Number} includeInFreeBusy 1 if calendar must be include in freebusy
|
||||||
* @apiParam {Number} showCalendarAlarms 1 if alarms must be enabled
|
* @apiParam {Number} showCalendarAlarms 1 if alarms must be enabled
|
||||||
* @apiParam {Number} showCalendarTasks 1 if tasks 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 {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 {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
|
* @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]])
|
if ([o isKindOfClass: [NSNumber class]])
|
||||||
[calendar setShowCalendarTasks: [o boolValue]];
|
[calendar setShowCalendarTasks: [o boolValue]];
|
||||||
|
|
||||||
|
o = [params objectForKey: @"synchronize"];
|
||||||
|
if ([o isKindOfClass: [NSNumber class]])
|
||||||
|
[calendar setSynchronize: [o boolValue]];
|
||||||
|
|
||||||
values = [params objectForKey: @"notifications"];
|
values = [params objectForKey: @"notifications"];
|
||||||
if ([values isKindOfClass: [NSDictionary class]])
|
if ([values isKindOfClass: [NSDictionary class]])
|
||||||
{
|
{
|
||||||
|
|
|
@ -99,7 +99,7 @@ _intValueFromHex (NSString *hexString)
|
||||||
NSNumber *isActive, *fActiveTasks;
|
NSNumber *isActive, *fActiveTasks;
|
||||||
SOGoAppointmentFolders *co;
|
SOGoAppointmentFolders *co;
|
||||||
SOGoAppointmentFolder *folder;
|
SOGoAppointmentFolder *folder;
|
||||||
BOOL reloadOnLogin;
|
BOOL reloadOnLogin, synchronize;
|
||||||
|
|
||||||
if (!calendars)
|
if (!calendars)
|
||||||
{
|
{
|
||||||
|
@ -133,6 +133,16 @@ _intValueFromHex (NSString *hexString)
|
||||||
[calendar setObject: [NSNumber numberWithBool: [folder showCalendarAlarms]] forKey: @"showCalendarAlarms"];
|
[calendar setObject: [NSNumber numberWithBool: [folder showCalendarAlarms]] forKey: @"showCalendarAlarms"];
|
||||||
[calendar setObject: [NSNumber numberWithBool: [folder showCalendarTasks]] forKey: @"showCalendarTasks"];
|
[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])
|
if ([folder isWebCalendar])
|
||||||
{
|
{
|
||||||
urls = [NSMutableDictionary dictionaryWithObject: [folder folderPropertyValueInCategory: @"WebCalendars"]
|
urls = [NSMutableDictionary dictionaryWithObject: [folder folderPropertyValueInCategory: @"WebCalendars"]
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
</div>
|
</div>
|
||||||
</md-toolbar>
|
</md-toolbar>
|
||||||
|
|
||||||
<md-dialog-content class="md-dialog-content">
|
<md-dialog-content class="md-dialog-content" layout="column">
|
||||||
<md-checkbox
|
<md-checkbox
|
||||||
ng-model="properties.calendar.includeInFreeBusy"
|
ng-model="properties.calendar.includeInFreeBusy"
|
||||||
ng-true-value="1"
|
ng-true-value="1"
|
||||||
|
@ -44,6 +44,14 @@
|
||||||
ng-false-value="0">
|
ng-false-value="0">
|
||||||
<var:string label:value="Show tasks"/>
|
<var:string label:value="Show tasks"/>
|
||||||
</md-checkbox>
|
</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
|
<md-checkbox
|
||||||
ng-model="properties.calendar.reloadOnLogin"
|
ng-model="properties.calendar.reloadOnLogin"
|
||||||
ng-show="properties.calendar.isWebCalendar"
|
ng-show="properties.calendar.isWebCalendar"
|
||||||
|
@ -51,7 +59,7 @@
|
||||||
ng-false-value="0">
|
ng-false-value="0">
|
||||||
<var:string label:value="Reload on login"/>
|
<var:string label:value="Reload on login"/>
|
||||||
</md-checkbox>
|
</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-divider><!-- divider --></md-divider>
|
||||||
<md-checkbox
|
<md-checkbox
|
||||||
ng-model="properties.calendar.notifications.notifyOnPersonalModifications"
|
ng-model="properties.calendar.notifications.notifyOnPersonalModifications"
|
||||||
|
|
Loading…
Reference in New Issue