Monotone-Parent: 27ade59da309caaf33ffd176d44a95672955e9c4

Monotone-Revision: d3b9346b7ff729aa3e123d710cf798285311dc5c

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2008-02-04T22:22:14
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2008-02-04 22:22:14 +00:00
parent b0f02b25da
commit 200225403a
13 changed files with 261 additions and 49 deletions

View File

@@ -165,12 +165,20 @@
- (WOResponse *) getDragHandlesStateAction
{
NSString *dragHandles;
NSArray *dragHandles;
NSString *vertical, *horizontal;
[self _setupContext];
dragHandles = [moduleSettings objectForKey: @"DragHandles"];
return [self responseWithStatus: 200 andString: dragHandles];
vertical = [moduleSettings objectForKey: @"DragHandleVertical"];
horizontal = [moduleSettings objectForKey: @"DragHandleHorizontal"];
dragHandles = [[NSArray alloc] initWithObjects:
vertical ? vertical : @"",
horizontal ? horizontal : @"",
nil];
return [self responseWithStatus: 200
andString: [dragHandles jsonRepresentation]];
}
- (WOResponse *) getFoldersStateAction
@@ -183,20 +191,25 @@
return [self responseWithStatus: 200 andString: expandedFolders];
}
- (WOResponse *) saveDragHandlesStateAction
- (WOResponse *) saveDragHandleStateAction
{
WORequest *request;
NSString *dragHandles;
NSString *dragHandle;
[self _setupContext];
request = [context request];
dragHandles = [request formValueForKey: @"dragHandles"];
if ((dragHandle = [request formValueForKey: @"vertical"]) != nil)
[moduleSettings setObject: dragHandle
forKey: @"DragHandleVertical"];
else if ((dragHandle = [request formValueForKey: @"horizontal"]) != nil)
[moduleSettings setObject: dragHandle
forKey: @"DragHandleHorizontal"];
else
return [self responseWithStatus: 400];
[moduleSettings setObject: dragHandles
forKey: @"DragHandles"];
[ud synchronize];
return [self responseWithStatus: 204];
}