(feat) now possible to show events/task for the current year
parent
dff85ae1d7
commit
fbed929402
3
NEWS
3
NEWS
|
@ -1,6 +1,9 @@
|
|||
4.0.1 (2018-03-XX)
|
||||
------------------
|
||||
|
||||
Enhancements
|
||||
- [web] now possible to show events/task for the current year
|
||||
|
||||
Bug fixes
|
||||
- [core] properly update the last-modified attribute (#4313)
|
||||
- [web] prevent deletion of special folders using del key
|
||||
|
|
|
@ -218,6 +218,7 @@
|
|||
"view_next14" = "Next 14 days";
|
||||
"view_next31" = "Next 31 days";
|
||||
"view_thismonth" = "This Month";
|
||||
"view_thisyear" = "This Year";
|
||||
"view_future" = "All Future Events";
|
||||
"view_selectedday" = "Selected Day";
|
||||
"view_not_started" = "Not started tasks";
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
/* UIxContactsFilterPanel.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2006 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
* Copyright (C) 2006-2018 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
/* UIxContactsFilterPanel.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2006-2009 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
* Copyright (C) 2006-2018 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -37,7 +35,7 @@ static NSArray *filters = nil;
|
|||
static NSString *quals[]
|
||||
= {@"view_all",
|
||||
@"view_today", @"view_next7", @"view_next14",
|
||||
@"view_next31", @"view_thismonth", @"view_future",
|
||||
@"view_next31", @"view_thismonth", @"view_thisyear", @"view_future",
|
||||
@"view_selectedday" };
|
||||
|
||||
if (!filters)
|
||||
|
|
|
@ -171,10 +171,26 @@ static NSArray *tasksFields = nil;
|
|||
endDate = [[startDate dateByAddingYears: 0 months: 0 days: 30] endOfDay];
|
||||
}
|
||||
else if ([popupValue isEqualToString: @"view_thismonth"])
|
||||
{
|
||||
newDate = [NSCalendarDate calendarDate];
|
||||
[newDate setTimeZone: userTZ];
|
||||
startDate = [[newDate firstDayOfMonth] beginOfDay];
|
||||
endDate = [[newDate lastDayOfMonth] endOfDay];
|
||||
}
|
||||
else if ([popupValue isEqualToString: @"view_thisyear"])
|
||||
{
|
||||
newDate = [NSCalendarDate calendarDate];
|
||||
[newDate setTimeZone: userTZ];
|
||||
newDate = [NSCalendarDate dateWithYear: [[NSCalendarDate calendarDate] yearOfCommonEra]
|
||||
month: 1
|
||||
day: 1
|
||||
hour: 0 minute: 0 second: 0
|
||||
timeZone: userTZ];
|
||||
startDate = [[newDate firstDayOfMonth] beginOfDay];
|
||||
|
||||
newDate = [NSCalendarDate dateWithYear: [[NSCalendarDate calendarDate] yearOfCommonEra]
|
||||
month: 12
|
||||
day: 31
|
||||
hour: 0 minute: 0 second: 0
|
||||
timeZone: userTZ];
|
||||
endDate = [[newDate lastDayOfMonth] endOfDay];
|
||||
}
|
||||
else if ([popupValue isEqualToString: @"view_future"])
|
||||
|
@ -780,7 +796,7 @@ static inline NSString* _userStateInEvent (NSArray *event)
|
|||
* @apiParam {Boolean} [asc] Descending sort when false. Defaults to true (ascending).
|
||||
* @apiParam {String} [sort] Sort field. Either title, start, end, location, or calendarName.
|
||||
* @apiParam {Number} [day] Selected day (YYYYMMDD)
|
||||
* @apiParam {String} [filterpopup] Time period. Either view_today, view_next7, view_next14, view_next31, view_thismonth, view_future, view_selectedday, or view_all
|
||||
* @apiParam {String} [filterpopup] Time period. Either view_today, view_next7, view_next14, view_next31, view_thismonth, view_thisyear, view_future, view_selectedday, or view_all
|
||||
* @apiParam {String} [search] Search field criteria. Either title_Category_Location or entireContent.
|
||||
* @apiParam {String} [value] String to match
|
||||
*
|
||||
|
@ -1569,7 +1585,7 @@ _computeBlocksPosition (NSArray *blocks)
|
|||
* @apiParam {Boolean} [asc] Descending sort when false. Defaults to true (ascending).
|
||||
* @apiParam {Boolean} [sort] Sort field. Either title, priority, end, location, category, calendarname, or status.
|
||||
* @apiParam {Number} [day] Selected day (YYYYMMDD)
|
||||
* @apiParam {String} [filterpopup] Time period. Either view_today, view_next7, view_next14, view_next31, view_thismonth, view_overdue, view_incomplete, view_not_started, or view_all
|
||||
* @apiParam {String} [filterpopup] Time period. Either view_today, view_next7, view_next14, view_next31, view_thismonth, view_thisyear, view_overdue, view_incomplete, view_not_started, or view_all
|
||||
* @apiParam {String} [search] Search field criteria. Either title_Category_Location or entireContent.
|
||||
*
|
||||
* @apiSuccess (Success 200) {String[]} fields List of fields for each event definition
|
||||
|
@ -1642,11 +1658,12 @@ _computeBlocksPosition (NSArray *blocks)
|
|||
forAllDay: NO]];
|
||||
else
|
||||
[filteredTask addObject: [NSNull null]];
|
||||
if (([tasksView isEqualToString:@"view_today"] ||
|
||||
[tasksView isEqualToString:@"view_next7"] ||
|
||||
[tasksView isEqualToString:@"view_next14"] ||
|
||||
[tasksView isEqualToString:@"view_next31"] ||
|
||||
[tasksView isEqualToString:@"view_thismonth"]) &&
|
||||
if (([tasksView isEqualToString:@"view_today"] ||
|
||||
[tasksView isEqualToString:@"view_next7"] ||
|
||||
[tasksView isEqualToString:@"view_next14"] ||
|
||||
[tasksView isEqualToString:@"view_next31"] ||
|
||||
[tasksView isEqualToString:@"view_thismonth"] ||
|
||||
[tasksView isEqualToString:@"view_thisyear"]) &&
|
||||
(endDateStamp == 0 || endDateStamp >= startSecs))
|
||||
[filteredTasks addObject: filteredTask];
|
||||
else if ([tasksView isEqualToString:@"view_all"])
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* UIxCalMainView.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2006-2017 Inverse inc.
|
||||
* Copyright (C) 2006-2018 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -143,7 +143,7 @@
|
|||
- (NSArray *) tasksFilters
|
||||
{
|
||||
return [NSArray arrayWithObjects: @"view_all", @"view_today", @"view_next7",
|
||||
@"view_next14", @"view_next31", @"view_thismonth",
|
||||
@"view_next14", @"view_next31", @"view_thismonth", @"view_thisyear",
|
||||
@"view_not_started", @"view_overdue", @"view_incomplete", nil];
|
||||
}
|
||||
|
||||
|
|
|
@ -201,6 +201,12 @@
|
|||
<!-- selected --></md-icon><var:string label:value="view_thismonth"/>
|
||||
</md-button>
|
||||
</md-menu-item>
|
||||
<md-menu-item>
|
||||
<md-button ng-click="list.filter('view_thisyear')">
|
||||
<md-icon ng-class="{ 'icon-check': list.filteredBy('view_thisyear') }">
|
||||
<!-- selected --></md-icon><var:string label:value="view_thisyear"/>
|
||||
</md-button>
|
||||
</md-menu-item>
|
||||
<md-menu-item ng-if="list.componentType == 'events'">
|
||||
<md-button ng-click="list.filter('view_future')">
|
||||
<md-icon ng-class="{ 'icon-check': list.component.$queryEvents.filterpopup == 'view_future' }">
|
||||
|
|
Loading…
Reference in New Issue