(feat) print event/task description in list view (#2881)

pull/85/head
Ludovic Marcotte 2015-05-13 13:12:15 -04:00
parent 0ea0a77666
commit dc48e05dd3
6 changed files with 27 additions and 5 deletions

1
NEWS
View File

@ -17,6 +17,7 @@ Enhancements
- synchronize events, contacts and tasks in reverse chronological order (Zentyal)
- during login, we now extract the domain from the user to accelerate authentication requests on sources
- make sure sure email invitations can always be read by EAS clients
- now able to print event/task's description (new components only) in the list view (#2881)
Bug fixes
- now keep the BodyPreference for future EAS use and default to MIME if none set (#3146)

View File

@ -2814,7 +2814,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
@"c_category", @"c_classification", @"c_isallday",
@"c_isopaque", @"c_participants", @"c_partmails",
@"c_partstates", @"c_sequence", @"c_priority",
@"c_cycleinfo", @"c_iscycle", @"c_nextalarm", nil];
@"c_cycleinfo", @"c_iscycle", @"c_nextalarm", @"c_description", nil];
return [self fetchFields: infos from: _startDate to: _endDate title: title
component: _component

View File

@ -248,6 +248,12 @@
else
[row setObject: [NSNull null] forKey: @"c_category"];
/* handle description */
if ([self comment])
[row setObject: [self comment] forKey: @"c_description"];
else
[row setObject: [NSNull null] forKey: @"c_description"];
return row;
}

View File

@ -177,6 +177,12 @@
[row setObject: [categories componentsJoinedByString: @","]
forKey: @"c_category"];
/* handle description */
if ([self comment])
[row setObject: [self comment] forKey: @"c_description"];
else
[row setObject: [NSNull null] forKey: @"c_description"];
return row;
}

View File

@ -89,7 +89,7 @@ static NSArray *tasksFields = nil;
@"c_partmails", @"c_partstates", @"c_owner",
@"c_iscycle", @"c_nextalarm",
@"c_recurrence_id", @"isException", @"editable",
@"erasable", @"ownerIsOrganizer", nil];
@"erasable", @"ownerIsOrganizer", @"c_description", nil];
[eventsFields retain];
}
if (!tasksFields)
@ -99,7 +99,7 @@ static NSArray *tasksFields = nil;
@"c_status", @"c_title", @"c_enddate",
@"c_classification", @"c_location", @"c_category",
@"editable", @"erasable",
@"c_priority", @"c_owner", @"c_recurrence_id", @"isException", nil];
@"c_priority", @"c_owner", @"c_recurrence_id", @"isException", @"c_description", nil];
[tasksFields retain];
}
}

View File

@ -538,7 +538,7 @@ function _parseEvent(event) {
var end = _("End:");
var location = _("Location:");
var calendar = _("Calendar:");
var description = _("Description:");
var newEvent = document.createElement("div");
var table = document.createElement("table");
Element.addClassName(newEvent, "divEventsPreview");
@ -562,7 +562,11 @@ function _parseEvent(event) {
var calendarCell = row.insertCell(0);
Element.addClassName(calendarCell, "cellFormat");
var calendarCellValue = row.insertCell(1);
row = table.insertRow(5);
var descriptionCell = row.insertCell(0);
Element.addClassName(descriptionCell, "cellFormat");
var descriptionCellValue = row.insertCell(1);
title.innerHTML = event[4];
startCell.innerHTML = start;
var startDate = new Date(event[5] *1000);
@ -575,6 +579,11 @@ function _parseEvent(event) {
calendarCell.innerHTML = calendar;
calendarCellValue.innerHTML = event[2];
if (event[21] && event[21].length) {
descriptionCell.innerHTML = description;
descriptionCellValue.innerHTML = event[21];
}
if (printColors.checked) {
var allColors = window.parentvar("UserSettings")['Calendar']['FolderColors'];
var owner = event[13];