mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-23 05:49:31 +00:00
Set the events/tasks list collapsable
This commit is contained in:
@@ -214,8 +214,6 @@
|
||||
|
||||
- (BOOL) showCompletedTasks
|
||||
{
|
||||
BOOL show;
|
||||
|
||||
[self _setupContext];
|
||||
|
||||
return [[us objectForKey: @"ShowCompletedTasks"] boolValue];
|
||||
@@ -237,6 +235,32 @@
|
||||
return [self responseWithStatus: 204];
|
||||
}
|
||||
|
||||
- (WOResponse *) saveListStateAction
|
||||
{
|
||||
WORequest *request;
|
||||
NSString *state;
|
||||
|
||||
[self _setupContext];
|
||||
request = [context request];
|
||||
|
||||
state = [request formValueForKey: @"state"];
|
||||
[moduleSettings setObject: state
|
||||
forKey: @"ListState"];
|
||||
[us synchronize];
|
||||
|
||||
return [self responseWithStatus: 204];
|
||||
}
|
||||
|
||||
- (NSString *) listStateStyle
|
||||
{
|
||||
NSString *state;
|
||||
|
||||
[self _setupContext];
|
||||
state = [moduleSettings objectForKey: @"ListState"];
|
||||
|
||||
return (state && [state compare: @"collapse"] == NSOrderedSame)? @"display: none;" : @"";
|
||||
}
|
||||
|
||||
- (unsigned int) firstDayOfWeek
|
||||
{
|
||||
SOGoUserDefaults *ud;
|
||||
|
||||
@@ -343,6 +343,26 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (NSString *) collapseBtnClass
|
||||
{
|
||||
NSString *module, *state;
|
||||
NSMutableDictionary *moduleSettings;
|
||||
SOGoUser *activeUser;
|
||||
SOGoAppointmentFolders *clientObject;
|
||||
SOGoUserSettings *us;
|
||||
|
||||
activeUser = [context activeUser];
|
||||
clientObject = [self clientObject];
|
||||
|
||||
module = [clientObject nameInContainer];
|
||||
|
||||
us = [activeUser userSettings];
|
||||
moduleSettings = [us objectForKey: module];
|
||||
state = [moduleSettings objectForKey: @"ListState"];
|
||||
|
||||
return (state && [state compare: @"collapse"] == NSOrderedSame)? @"rise" : @"collapse";
|
||||
}
|
||||
|
||||
/* current day related */
|
||||
|
||||
- (void) setCurrentDay:(NSCalendarDate *) _day
|
||||
|
||||
@@ -55,6 +55,11 @@
|
||||
pageName = "UIxCalMainView";
|
||||
actionName = "saveSelectedList";
|
||||
};
|
||||
saveListState = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxCalMainView";
|
||||
actionName = "saveListState";
|
||||
};
|
||||
dateselector = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxCalDateSelector";
|
||||
|
||||
Reference in New Issue
Block a user