mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-11-20 14:36:53 +00:00
* UI/WebServerResources/generic.js (openGenericWindow):
New method that opens a simple new window. * UI/WebServerResources/ContactsUI.js (onMenuRawContact): New callback to show the vCard content from the menu. * UI/WebServerResources/ContactsUI.js (onContactMenuPrepareVisibility): Enable the export and raw functions only on vcards contacts. * UI/Templates/ContactsUI/UIxContactFoldersView.wox: New contextual menu item: Show vCard content * UI/Contacts/UIxContactFolderActions.m (rawAction): New method that returns the raw contact data for all the contact uids provided Monotone-Parent: f03db6cb5531dddabab4e8678d856fe593d3745d Monotone-Revision: e853157abbabf35bc95273da8bc10b2d3b142627 Monotone-Author: jraby@inverse.ca Monotone-Date: 2012-07-05T21:16:02
This commit is contained in:
1 parent
5639ee6180
commit
c4d11cd916
8 files changed
+133
-1
No files matched your search
@@ -287,5 +287,51 @@
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (id <WOActionResults>) rawAction
|
||||
{
|
||||
WORequest *request;
|
||||
WOResponse *response;
|
||||
NSArray *contactsId;
|
||||
NSEnumerator *uids;
|
||||
NSString *uid;
|
||||
id currentChild;
|
||||
SOGoContactGCSFolder *sourceFolder;
|
||||
NSMutableString *content;
|
||||
|
||||
content = [NSMutableString string];
|
||||
request = [context request];
|
||||
response = [context response];
|
||||
sourceFolder = [self clientObject];
|
||||
contactsId = [request formValuesForKey: @"uid"];
|
||||
|
||||
if ((uids = [contactsId objectEnumerator]))
|
||||
{
|
||||
while ((uid = [uids nextObject]))
|
||||
{
|
||||
currentChild = [sourceFolder lookupName: uid
|
||||
inContext: [self context]
|
||||
acquire: NO];
|
||||
if([currentChild isKindOfClass: [NSException class]])
|
||||
continue;
|
||||
[content appendFormat: [currentChild contentAsString]];
|
||||
[content appendString: @"\n"];
|
||||
}
|
||||
}
|
||||
|
||||
if (![content length])
|
||||
{
|
||||
response = [self responseWithStatus: 404
|
||||
andString: @"Contact does not exist"];
|
||||
}
|
||||
else
|
||||
{
|
||||
[response setHeader: @"text/plain; charset=utf-8"
|
||||
forKey: @"content-type"];
|
||||
[response appendContentString: content];
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
@end /* UIxContactsListView */
|
||||
Reference in new issue
Block a user