mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-23 04:15:26 +00:00
Mantis 61
Monotone-Parent: 22cceb4aa0e1bdff4e6a5d3bae05737a180e6c86 Monotone-Revision: a7b68a3656aaebe8e9a421997de4d311b04b9e13 Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-07-22T19:35:37 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2009-07-22 Cyril Robert <crobert@inverse.ca>
|
||||
|
||||
* UI/Scheduler/UIxCalListingActions.m: Added "editable" field to tasks, so
|
||||
that the UI can disable the checkboxes next to them.
|
||||
|
||||
2009-07-22 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/Appointments/SOGoUserFolder+Appointments.m
|
||||
|
||||
@@ -86,7 +86,7 @@ static NSArray *tasksFields = nil;
|
||||
{
|
||||
tasksFields = [NSArray arrayWithObjects: @"c_name", @"c_folder",
|
||||
@"c_status", @"c_title", @"c_enddate",
|
||||
@"c_classification", nil];
|
||||
@"c_classification", @"editable", nil];
|
||||
[tasksFields retain];
|
||||
}
|
||||
}
|
||||
@@ -311,6 +311,7 @@ static NSArray *tasksFields = nil;
|
||||
NSMutableArray *infos;
|
||||
NSNull *marker;
|
||||
SOGoAppointmentFolders *clientObject;
|
||||
NSString *role;
|
||||
|
||||
infos = [NSMutableArray array];
|
||||
|
||||
@@ -333,12 +334,26 @@ static NSArray *tasksFields = nil;
|
||||
|
||||
while ((newInfo = [currentInfos nextObject]))
|
||||
{
|
||||
if ([fields containsObject: @"editable"])
|
||||
{
|
||||
role =
|
||||
[currentFolder roleForComponentsWithAccessClass:
|
||||
[[newInfo objectForKey: @"c_classification"] intValue]
|
||||
forUser: [[context activeUser] login]];
|
||||
if ([role isEqualToString: @"ComponentModifier"]
|
||||
|| [role length] == 0)
|
||||
[newInfo setObject: [NSNumber numberWithInt: 1]
|
||||
forKey: @"editable"];
|
||||
else
|
||||
[newInfo setObject: [NSNumber numberWithInt: 0]
|
||||
forKey: @"editable"];
|
||||
}
|
||||
[newInfo setObject: [currentFolder nameInContainer]
|
||||
forKey: @"c_folder"];
|
||||
[newInfo setObject: [currentFolder ownerInContext: context]
|
||||
forKey: @"c_owner"];
|
||||
if (![[newInfo objectForKey: @"c_title"] length])
|
||||
[self _fixComponentTitle: newInfo withType: component];
|
||||
[self _fixComponentTitle: newInfo withType: component];
|
||||
// Possible improvement: only call _fixDates if event is recurrent
|
||||
// or the view range span a daylight saving time change
|
||||
[self _fixDates: newInfo];
|
||||
|
||||
@@ -664,12 +664,14 @@ function tasksListCallback(http) {
|
||||
var cname = escape(data[i][0]);
|
||||
listItem.setAttribute("id", calendar + "-" + cname);
|
||||
//listItem.addClassName(data[i][5]); // Classification
|
||||
listItem.addClassName(data[i][6]);
|
||||
listItem.addClassName(data[i][7]);
|
||||
listItem.calendar = calendar;
|
||||
listItem.addClassName("calendarFolder" + calendar);
|
||||
listItem.cname = cname;
|
||||
var input = $(document.createElement("input"));
|
||||
input.setAttribute("type", "checkbox");
|
||||
if (parseInt(data[i][6]) == 0)
|
||||
input.setAttribute ("disabled", true);
|
||||
listItem.appendChild(input);
|
||||
input.observe("click", updateTaskStatus, true);
|
||||
input.setAttribute("value", "1");
|
||||
|
||||
Reference in New Issue
Block a user