mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-03 04:18:51 +00:00
Display all-day events in day & week views
All-day events are now displayed and the day/week views are now built using flexbox.
This commit is contained in:
@@ -37,6 +37,9 @@
|
||||
#import <SOGo/SOGoUserDefaults.h>
|
||||
#import <SOGo/WOResourceManager+SOGo.h>
|
||||
|
||||
#import <SoObjects/Appointments/SOGoAppointmentFolder.h>
|
||||
#import <SoObjects/Appointments/SOGoAppointmentFolders.h>
|
||||
|
||||
#import "UIxCalDayTable.h"
|
||||
|
||||
@class SOGoAppointment;
|
||||
@@ -292,6 +295,28 @@
|
||||
return [weekDays objectAtIndex: [currentTableDay dayOfWeek]];
|
||||
}
|
||||
|
||||
- (NSString *) labelForMonth
|
||||
{
|
||||
NSCalendarDate *nextDay;
|
||||
BOOL isLastOrFirstDay;
|
||||
|
||||
isLastOrFirstDay = NO;
|
||||
if ([currentTableDay dayOfMonth] == 1)
|
||||
{
|
||||
isLastOrFirstDay = YES;
|
||||
}
|
||||
else if ([currentTableDay dayOfMonth] > 27)
|
||||
{
|
||||
nextDay = [currentTableDay dateByAddingYears: 0
|
||||
months: 0
|
||||
days: 1];
|
||||
if ([nextDay dayOfMonth] == 1)
|
||||
isLastOrFirstDay = YES;
|
||||
}
|
||||
|
||||
return isLastOrFirstDay? [currentTableDay descriptionWithCalendarFormat: @"%b" locale: locale] : nil;
|
||||
}
|
||||
|
||||
- (NSString *) labelForDate
|
||||
{
|
||||
return [dateFormatter shortFormattedDate: currentTableDay];
|
||||
@@ -410,6 +435,11 @@
|
||||
return daysView;
|
||||
}
|
||||
|
||||
- (NSString *) daysViewHeaderClasses
|
||||
{
|
||||
return [NSString stringWithFormat: @"%@ daysHeader", [self daysViewClasses]];
|
||||
}
|
||||
|
||||
- (NSString *) dayClasses
|
||||
{
|
||||
NSMutableString *classes;
|
||||
@@ -468,4 +498,9 @@
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL) isWeekView
|
||||
{
|
||||
return [currentView isEqualToString:@"weekview"];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user