See ChangeLog
Monotone-Parent: b577b5789ba850c92417e70690576edfd3a2793b Monotone-Revision: 931357c046b4c2c5bca20cfc7027809a3240f43a Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2009-06-09T21:25:41 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
be78b5890e
commit
f7f55e9315
|
@ -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
|
||||
|
|
|
@ -48,6 +48,13 @@
|
|||
// [super dealloc];
|
||||
// }
|
||||
|
||||
- (id <WOActionResults>) defaultAction
|
||||
{
|
||||
[super setCurrentView: @"dayview"];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
// - (void) setCurrentDate: (NSCalendarDate *) _date
|
||||
// {
|
||||
// ASSIGN(self->currentDate, _date);
|
||||
|
|
|
@ -53,6 +53,10 @@
|
|||
|
||||
- (WOResponse *) saveDragHandleStateAction;
|
||||
|
||||
- (unsigned int) firstDayOfWeek;
|
||||
- (unsigned int) dayStartHour;
|
||||
- (NSString *) currentView;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* UIXCALMAINVIEW_H */
|
||||
|
|
|
@ -182,4 +182,14 @@
|
|||
return [[context activeUser] dayStartHour];
|
||||
}
|
||||
|
||||
- (NSString *) currentView
|
||||
{
|
||||
NSString *view;
|
||||
|
||||
[self _setupContext];
|
||||
view = [moduleSettings objectForKey: @"View"];
|
||||
|
||||
return (view ? view : @"weekview");
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -69,6 +69,13 @@
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (id <WOActionResults>) defaultAction
|
||||
{
|
||||
[super setCurrentView: @"monthview"];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSArray *) headerDaysToDisplay
|
||||
{
|
||||
NSMutableArray *headerDaysToDisplay;
|
||||
|
|
|
@ -94,6 +94,8 @@
|
|||
- (NSCalendarDate *) thisMonth;
|
||||
- (NSCalendarDate *) nextMonth;
|
||||
|
||||
- (void) setCurrentView: (NSString *) theView;
|
||||
|
||||
/* fetching */
|
||||
|
||||
- (NSCalendarDate *) startDate;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -35,6 +35,13 @@
|
|||
|
||||
@implementation UIxCalWeekView
|
||||
|
||||
- (id <WOActionResults>) defaultAction
|
||||
{
|
||||
[super setCurrentView: @"weekview"];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSCalendarDate *) startDate
|
||||
{
|
||||
NSCalendarDate *date;
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -10,7 +10,6 @@ var selectedCalendarCell;
|
|||
var showCompletedTasks = 0;
|
||||
|
||||
var currentDay = '';
|
||||
var currentView = "weekview";
|
||||
|
||||
var cachedDateSelectors = [];
|
||||
|
||||
|
|
Loading…
Reference in New Issue