See ChangeLog

Monotone-Parent: b577b5789ba850c92417e70690576edfd3a2793b
Monotone-Revision: 931357c046b4c2c5bca20cfc7027809a3240f43a

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2009-06-09T21:25:41
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Francis Lachapelle 2009-06-09 21:25:41 +00:00
parent be78b5890e
commit f7f55e9315
10 changed files with 70 additions and 1 deletions

View File

@ -15,6 +15,12 @@
2009-06-09 Francis Lachapelle <flachapelle@inverse.ca>
* UI/Scheduler/UIxCalView.m ([UIxCalView -setCurrentView:]): new
method to save the user's current view in her/his settings.
* UI/Scheduler/UIxCalMainView.m ([UIxCalMainView -currentView]):
returns the active user's last calendar view.
* SoObjects/Appointments/SOGoAppointmentFolder.m
([SOGoAppointmentFolder -_sqlStringRangeFromto:]): dates are not
necessarily defined in case of vTODOs; don't apply the range

View File

@ -48,6 +48,13 @@
// [super dealloc];
// }
- (id <WOActionResults>) defaultAction
{
[super setCurrentView: @"dayview"];
return self;
}
// - (void) setCurrentDate: (NSCalendarDate *) _date
// {
// ASSIGN(self->currentDate, _date);

View File

@ -53,6 +53,10 @@
- (WOResponse *) saveDragHandleStateAction;
- (unsigned int) firstDayOfWeek;
- (unsigned int) dayStartHour;
- (NSString *) currentView;
@end
#endif /* UIXCALMAINVIEW_H */

View File

@ -182,4 +182,14 @@
return [[context activeUser] dayStartHour];
}
- (NSString *) currentView
{
NSString *view;
[self _setupContext];
view = [moduleSettings objectForKey: @"View"];
return (view ? view : @"weekview");
}
@end

View File

@ -69,6 +69,13 @@
[super dealloc];
}
- (id <WOActionResults>) defaultAction
{
[super setCurrentView: @"monthview"];
return self;
}
- (NSArray *) headerDaysToDisplay
{
NSMutableArray *headerDaysToDisplay;

View File

@ -94,6 +94,8 @@
- (NSCalendarDate *) thisMonth;
- (NSCalendarDate *) nextMonth;
- (void) setCurrentView: (NSString *) theView;
/* fetching */
- (NSCalendarDate *) startDate;

View File

@ -340,6 +340,32 @@ static BOOL shouldDisplayWeekend = NO;
return [self dateStringForDate: [self nextMonth]];
}
- (void) setCurrentView: (NSString *) theView
{
SOGoUser *activeUser;
NSString *module;
NSUserDefaults *ud;
NSMutableDictionary *moduleSettings;
SOGoAppointmentFolders *clientObject;
activeUser = [context activeUser];
clientObject = [self clientObject];
module = [clientObject nameInContainer];
ud = [activeUser userSettings];
moduleSettings = [ud objectForKey: module];
if (!moduleSettings)
{
moduleSettings = [NSMutableDictionary dictionary];
[ud setObject: moduleSettings forKey: module];
}
[moduleSettings setObject: theView
forKey: @"View"];
[ud synchronize];
}
/* current day related */
- (void) setCurrentDay:(NSCalendarDate *) _day

View File

@ -35,6 +35,13 @@
@implementation UIxCalWeekView
- (id <WOActionResults>) defaultAction
{
[super setCurrentView: @"weekview"];
return self;
}
- (NSCalendarDate *) startDate
{
NSCalendarDate *date;

View File

@ -11,6 +11,7 @@
<script type="text/javascript">
var firstDayOfWeek = <var:string value="firstDayOfWeek"/>;
var dayStartHour = <var:string value="dayStartHour"/>;
var currentView = '<var:string value="currentView"/>';
</script>
<style type="text/css">
<var:if condition="horizontalDragHandleStyle">

View File

@ -10,7 +10,6 @@ var selectedCalendarCell;
var showCompletedTasks = 0;
var currentDay = '';
var currentView = "weekview";
var cachedDateSelectors = [];