Mantis 22
Monotone-Parent: 5105aa2c752693060f4e82dcab091d78516d579f Monotone-Revision: 002cfad9d108ff7c2b34603852b074ecd764cf96 Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-07-21T18:06:55 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
21a245668b
commit
6b70e8480d
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2009-07-21 Cyril Robert <crobert@inverse.ca>
|
||||
|
||||
* UI/Scheduler/UIxCalendarProperties.m: Prevent doing anything when not
|
||||
executing @"saveProperties".
|
||||
* SoObjects/Appointments/SOGoAppointmentFolder.m: Added
|
||||
(set/showCalendarTasks), (set/showCalendarAlarms)
|
||||
* SoObjects/SOGo/SOGoGCSFolder.m: Added dicts to cleanup on unsubscribe.
|
||||
* UI/Scheduler/UIxCalListingActions.m: Added support for
|
||||
showCalendarAlarms/Tasks.
|
||||
* UI/Scheduler/UIxCalendarProperties.m: Added wrapper methods for
|
||||
showCalendarTasks/Alarms
|
||||
|
||||
2009-07-21 Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
||||
* SoObjects/Mailer/SOGoMailBodyPart.m ([SOGoMailBodyPart
|
||||
|
|
|
@ -131,6 +131,12 @@
|
|||
- (NSString *) roleForComponentsWithAccessClass: (iCalAccessClass) accessClass
|
||||
forUser: (NSString *) uid;
|
||||
|
||||
- (BOOL) showCalendarAlarms;
|
||||
- (void) setShowCalendarAlarms: (BOOL) new;
|
||||
|
||||
- (BOOL) showCalendarTasks;
|
||||
- (void) setShowCalendarTasks: (BOOL) new;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* __Appointments_SOGoAppointmentFolder_H__ */
|
||||
|
|
|
@ -319,6 +319,92 @@ static int davCalendarStartTimeLimit = 0;
|
|||
[settings synchronize];
|
||||
}
|
||||
|
||||
- (BOOL) showCalendarAlarms
|
||||
{
|
||||
NSUserDefaults *settings;
|
||||
NSDictionary *values;
|
||||
id test;
|
||||
BOOL show = YES;
|
||||
|
||||
settings = [[context activeUser] userSettings];
|
||||
values = [[settings objectForKey: @"Calendar"]
|
||||
objectForKey: @"FolderShowAlarms"];
|
||||
test = [values objectForKey: [self folderReference]];
|
||||
if (test)
|
||||
show = [test boolValue];
|
||||
|
||||
return show;
|
||||
}
|
||||
|
||||
- (void) setShowCalendarAlarms: (BOOL) new
|
||||
{
|
||||
NSUserDefaults *settings;
|
||||
NSMutableDictionary *calendarSettings;
|
||||
NSMutableDictionary *values;
|
||||
|
||||
settings = [[context activeUser] userSettings];
|
||||
calendarSettings = [settings objectForKey: @"Calendar"];
|
||||
|
||||
if (!calendarSettings)
|
||||
{
|
||||
calendarSettings = [NSMutableDictionary dictionary];
|
||||
[settings setObject: calendarSettings
|
||||
forKey: @"Calendar"];
|
||||
}
|
||||
values = [calendarSettings objectForKey: @"FolderShowAlarms"];
|
||||
if (!values)
|
||||
{
|
||||
values = [NSMutableDictionary dictionary];
|
||||
[calendarSettings setObject: values forKey: @"FolderShowAlarms"];
|
||||
}
|
||||
[values setObject: [NSNumber numberWithBool: new] forKey: [self folderReference]];
|
||||
[settings synchronize];
|
||||
}
|
||||
|
||||
- (BOOL) showCalendarTasks
|
||||
{
|
||||
NSUserDefaults *settings;
|
||||
NSDictionary *values;
|
||||
id test;
|
||||
BOOL show = YES;
|
||||
|
||||
settings = [[context activeUser] userSettings];
|
||||
values = [[settings objectForKey: @"Calendar"]
|
||||
objectForKey: @"FolderShowTasks"];
|
||||
test = [values objectForKey: [self folderReference]];
|
||||
if (test)
|
||||
show = [test boolValue];
|
||||
|
||||
return show;
|
||||
}
|
||||
|
||||
- (void) setShowCalendarTasks: (BOOL) new
|
||||
{
|
||||
NSUserDefaults *settings;
|
||||
NSMutableDictionary *calendarSettings;
|
||||
NSMutableDictionary *values;
|
||||
|
||||
settings = [[context activeUser] userSettings];
|
||||
calendarSettings = [settings objectForKey: @"Calendar"];
|
||||
|
||||
if (!calendarSettings)
|
||||
{
|
||||
calendarSettings = [NSMutableDictionary dictionary];
|
||||
[settings setObject: calendarSettings
|
||||
forKey: @"Calendar"];
|
||||
}
|
||||
values = [calendarSettings objectForKey: @"FolderShowTasks"];
|
||||
if (!values)
|
||||
{
|
||||
values = [NSMutableDictionary dictionary];
|
||||
[calendarSettings setObject: values forKey: @"FolderShowTasks"];
|
||||
}
|
||||
[values setObject: [NSNumber numberWithBool: new] forKey: [self folderReference]];
|
||||
[settings synchronize];
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (NSString *) syncTag
|
||||
{
|
||||
NSUserDefaults *settings;
|
||||
|
|
|
@ -696,6 +696,14 @@ static NSArray *childRecordFields = nil;
|
|||
if (tmpD)
|
||||
[tmpD removeObjectForKey: subscriptionPointer];
|
||||
|
||||
tmpD = [moduleSettings objectForKey: @"FolderShowAlarms"];
|
||||
if (tmpD)
|
||||
[tmpD removeObjectForKey: subscriptionPointer];
|
||||
|
||||
tmpD = [moduleSettings objectForKey: @"FolderShowTasks"];
|
||||
if (tmpD)
|
||||
[tmpD removeObjectForKey: subscriptionPointer];
|
||||
|
||||
tmpA = [moduleSettings objectForKey: @"InactiveFolders"];
|
||||
if (tmpA)
|
||||
[tmpA removeObject: nameInContainer];
|
||||
|
|
|
@ -497,3 +497,6 @@ vtodo_class2 = "(Tarefa Confidencial)";
|
|||
"Name:" = "Nome:";
|
||||
"Color:" = "Cor:";
|
||||
"Tag:" = "Marca:";
|
||||
|
||||
"Show alarms" = "Show alarms";
|
||||
"Show tasks" = "Show tasks";
|
||||
|
|
|
@ -497,3 +497,6 @@ vtodo_class2 = "(Důvěrný úkol)";
|
|||
"Name:" = "Název:";
|
||||
"Color:" = "Barva:";
|
||||
"Tag:" = "Štítek:";
|
||||
|
||||
"Show alarms" = "Show alarms";
|
||||
"Show tasks" = "Show tasks";
|
||||
|
|
|
@ -492,3 +492,6 @@ vtodo_class2 = "(Vertrouwelijke taak)";
|
|||
"Name:" = "Naam:";
|
||||
"Color:" = "Kleur:";
|
||||
"Tag:" = "Markering:";
|
||||
|
||||
"Show alarms" = "Show alarms";
|
||||
"Show tasks" = "Show tasks";
|
||||
|
|
|
@ -497,3 +497,6 @@ vtodo_class2 = "(Confidential task)";
|
|||
"Name:" = "Name:";
|
||||
"Color:" = "Color:";
|
||||
"Tag:" = "Tag:";
|
||||
|
||||
"Show alarms" = "Show alarms";
|
||||
"Show tasks" = "Show tasks";
|
||||
|
|
|
@ -494,3 +494,6 @@ vtodo_class2 = "(Tâche confidentielle)";
|
|||
"Name:" = "Nom :";
|
||||
"Color:" = "Couleur :";
|
||||
"Tag:" = "Label :";
|
||||
|
||||
"Show alarms" = "Afficher les alarmes";
|
||||
"Show tasks" = "Afficher les tâches";
|
||||
|
|
|
@ -495,3 +495,6 @@ vtodo_class2 = "(Vertrauliche Aufgabe)";
|
|||
"Name:" = "Name:";
|
||||
"Color:" = "Farbe:";
|
||||
"Tag:" = "Tag:";
|
||||
|
||||
"Show alarms" = "Show alarms";
|
||||
"Show tasks" = "Show tasks";
|
||||
|
|
|
@ -498,3 +498,6 @@ vtodo_class2 = "(Attività confidenziale)";
|
|||
"Name:" = "Nome:";
|
||||
"Color:" = "Colore:";
|
||||
"Tag:" = "Etichetta:";
|
||||
|
||||
"Show alarms" = "Show alarms";
|
||||
"Show tasks" = "Show tasks";
|
||||
|
|
|
@ -496,3 +496,6 @@ vtodo_class2 = "(Confidential task)";
|
|||
"Name:" = "Название:";
|
||||
"Color:" = "Цвет:";
|
||||
"Tag:" = "Tag:";
|
||||
|
||||
"Show alarms" = "Show alarms";
|
||||
"Show tasks" = "Show tasks";
|
||||
|
|
|
@ -501,3 +501,6 @@ vtodo_class2 = "(Tarea confidencial)";
|
|||
"Name:" = "Nombre:";
|
||||
"Color:" = "Color:";
|
||||
"Tag:" = "Redacción:";
|
||||
|
||||
"Show alarms" = "Show alarms";
|
||||
"Show tasks" = "Show tasks";
|
||||
|
|
|
@ -321,6 +321,8 @@ static NSArray *tasksFields = nil;
|
|||
folders = [[clientObject subFolders] objectEnumerator];
|
||||
while ((currentFolder = [folders nextObject]))
|
||||
{
|
||||
if (![component isEqualToString: @"vtodo"] || [currentFolder showCalendarTasks])
|
||||
{
|
||||
if ([currentFolder isActive])
|
||||
{
|
||||
currentInfos
|
||||
|
@ -344,6 +346,7 @@ static NSArray *tasksFields = nil;
|
|||
notFoundMarker: marker]];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return infos;
|
||||
|
@ -409,7 +412,7 @@ static NSArray *tasksFields = nil;
|
|||
folders = [[clientObject subFolders] objectEnumerator];
|
||||
while ((currentFolder = [folders nextObject]))
|
||||
{
|
||||
if ([currentFolder isActive])
|
||||
if ([currentFolder isActive] && [currentFolder showCalendarAlarms])
|
||||
{
|
||||
NSDictionary *entry;
|
||||
NSArray *alarms;
|
||||
|
|
|
@ -38,5 +38,8 @@
|
|||
- (NSString *) calendarColor;
|
||||
- (void) setCalendarColor: (NSString *) newColor;
|
||||
|
||||
- (BOOL) showCalendarAlarms;
|
||||
- (void) setShowCalendarAlarms: (BOOL) new;
|
||||
|
||||
|
||||
@end
|
||||
|
|
|
@ -87,10 +87,34 @@
|
|||
[calendar setSyncTag: newTag];
|
||||
}
|
||||
|
||||
- (BOOL) showCalendarAlarms
|
||||
{
|
||||
return [calendar showCalendarAlarms];
|
||||
}
|
||||
|
||||
- (void) setShowCalendarAlarms: (BOOL) new
|
||||
{
|
||||
[calendar setShowCalendarAlarms: new];
|
||||
}
|
||||
|
||||
- (BOOL) showCalendarTasks
|
||||
{
|
||||
return [calendar showCalendarTasks];
|
||||
}
|
||||
|
||||
- (void) setShowCalendarTasks: (BOOL) new
|
||||
{
|
||||
[calendar setShowCalendarTasks: new];
|
||||
}
|
||||
|
||||
- (BOOL) shouldTakeValuesFromRequest: (WORequest *) request
|
||||
inContext: (WOContext*) context
|
||||
{
|
||||
return YES;
|
||||
NSString *method;
|
||||
|
||||
method = [[request uri] lastPathComponent];
|
||||
|
||||
return [method isEqualToString: @"saveProperties"];
|
||||
}
|
||||
|
||||
- (id <WOActionResults>) savePropertiesAction
|
||||
|
|
|
@ -486,3 +486,6 @@ vtodo_class2 = "(Tasg gyhoeddus)";
|
|||
"Name:" = "Enw:";
|
||||
"Color:" = "Lliw:";
|
||||
"Tag:" = "Tag:";
|
||||
|
||||
"Show alarms" = "Show alarms";
|
||||
"Show tasks" = "Show tasks";
|
||||
|
|
|
@ -36,7 +36,15 @@
|
|||
id="calendarSyncTag"
|
||||
class="textField"
|
||||
var:value="calendarSyncTag"
|
||||
/></span></div>
|
||||
/></span></div>
|
||||
<div><span class="label"><var:string label:value="Show alarms" /></span
|
||||
><span class="content"><input type="checkbox" const:class="checkBox"
|
||||
id="showCalendarAlarms" var:checked="showCalendarAlarms" /></span
|
||||
></div>
|
||||
<div><span class="label"><var:string label:value="Show tasks" /></span
|
||||
><span class="content"><input type="checkbox" const:class="checkBox"
|
||||
id="showCalendarTasks" var:checked="showCalendarTasks" /></span
|
||||
></div>
|
||||
<div id="buttons">
|
||||
<input type="button"
|
||||
const:class="button"
|
||||
|
|
|
@ -1803,7 +1803,7 @@ function onCalendarModify(event) {
|
|||
var url = ApplicationBaseURL + calendarID + "/properties";
|
||||
var windowID = sanitizeWindowName(calendarID + " properties");
|
||||
var properties = window.open(url, windowID,
|
||||
"width=300,height=100,resizable=0");
|
||||
"width=300,height=150,resizable=0");
|
||||
properties.focus();
|
||||
}
|
||||
|
||||
|
@ -1823,6 +1823,8 @@ function updateCalendarProperties(calendarID, calendarName, calendarColor) {
|
|||
}
|
||||
|
||||
appendStyleElement(nodeID, calendarColor);
|
||||
//This is bad
|
||||
setTimeout ("refreshTasks ()", 200);
|
||||
}
|
||||
|
||||
function onCalendarNew(event) {
|
||||
|
|
|
@ -7,7 +7,7 @@ DIV
|
|||
|
||||
SPAN.label
|
||||
{ cursor: default;
|
||||
width: 7em;
|
||||
width: 10em;
|
||||
text-align: right;
|
||||
padding-right: 1em;
|
||||
line-height: 2em;
|
||||
|
|
Loading…
Reference in New Issue