mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-05 20:10:33 +00:00
Monotone-Parent: 16b846dd0fb3a63bdd80cb7ed360972da407527b
Monotone-Revision: bb276eea8dc76b5c71f49df1d23424ab19015233 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-01-04T15:26:30 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -52,8 +52,16 @@
|
||||
|
||||
#import "UIxContactFoldersView.h"
|
||||
|
||||
Class SOGoContactSourceFolderK, SOGoGCSFolderK;
|
||||
|
||||
@implementation UIxContactFoldersView
|
||||
|
||||
+ (void) initialize
|
||||
{
|
||||
SOGoContactSourceFolderK = [SOGoContactSourceFolder class];
|
||||
SOGoGCSFolderK = [SOGoGCSFolder class];
|
||||
}
|
||||
|
||||
- (id) init
|
||||
{
|
||||
if ((self = [super init]))
|
||||
@@ -110,11 +118,13 @@
|
||||
|
||||
folders = [self clientObject];
|
||||
folder = [folders lookupPersonalFolder: @"personal" ignoringRights: YES];
|
||||
|
||||
contactInfos = [folder lookupContactsWithFilter: nil
|
||||
onCriteria: nil
|
||||
sortBy: @"c_cn"
|
||||
ordering: NSOrderedAscending];
|
||||
if (folder && [folder conformsToProtocol: @protocol (SOGoContactFolder)])
|
||||
contactInfos = [folder lookupContactsWithFilter: nil
|
||||
onCriteria: nil
|
||||
sortBy: @"c_cn"
|
||||
ordering: NSOrderedAscending];
|
||||
else
|
||||
contactInfos = nil;
|
||||
|
||||
return contactInfos;
|
||||
}
|
||||
@@ -183,7 +193,7 @@
|
||||
{
|
||||
folder = [folders objectAtIndex: i];
|
||||
/* We first search in LDAP folders (in case of duplicated entries in GCS folders) */
|
||||
if ([folder isKindOfClass: [SOGoContactSourceFolder class]])
|
||||
if ([folder isKindOfClass: SOGoContactSourceFolderK])
|
||||
[sortedFolders insertObject: folder atIndex: 0];
|
||||
else
|
||||
[sortedFolders addObject: folder];
|
||||
@@ -287,10 +297,23 @@
|
||||
|
||||
- (NSString *) currentContactFolderClass
|
||||
{
|
||||
return ([currentFolder isKindOfClass: [SOGoContactSourceFolder class]]
|
||||
return (([currentFolder isKindOfClass: SOGoContactSourceFolderK]
|
||||
&& ![currentFolder isPersonalSource])
|
||||
? @"remote" : @"local");
|
||||
}
|
||||
|
||||
- (NSString *) currentContactFolderAclEditing
|
||||
{
|
||||
return ([currentFolder isKindOfClass: SOGoGCSFolderK]
|
||||
? @"available": @"unavailable");
|
||||
}
|
||||
|
||||
- (NSString *) currentContactFolderListEditing
|
||||
{
|
||||
return ([currentFolder isKindOfClass: SOGoGCSFolderK]
|
||||
? @"available": @"unavailable");
|
||||
}
|
||||
|
||||
- (NSString *) verticalDragHandleStyle
|
||||
{
|
||||
NSString *vertical;
|
||||
|
||||
Reference in New Issue
Block a user