mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-19 21:53:19 +00:00
Merge branch 'master' into feature/addMissingStrings2
Conflicts: UI/AdministrationUI/English.lproj/Localizable.strings UI/PreferencesUI/English.lproj/Localizable.strings UI/Templates/PreferencesUI/UIxFilterEditor.wox
This commit is contained in:
@@ -44,6 +44,27 @@
|
||||
"Copy To" = "Copy To";
|
||||
"Add to:" = "Add to:";
|
||||
|
||||
/* Subheader of empty addressbook */
|
||||
"No contact" = "No contact";
|
||||
|
||||
/* Subheader of system addressbook */
|
||||
"Start a search to browse this address book" = "Start a search to browse this address book";
|
||||
|
||||
/* Number of contacts in addressbook; string is prefixed by number */
|
||||
"contacts" = "contacts";
|
||||
|
||||
/* No contact matching search criteria */
|
||||
"No matching contact" = "No matching contact";
|
||||
|
||||
/* Number of contacts matching search criteria; string is prefixed by number */
|
||||
"matching contacts" = "matching contacts";
|
||||
|
||||
/* Number of selected contacts in list */
|
||||
"selected" = "selected";
|
||||
|
||||
/* Empty right pane */
|
||||
"No contact selected" = "No contact selected";
|
||||
|
||||
/* Tooltips */
|
||||
|
||||
"Create a new address book card" = "Create a new address book card";
|
||||
|
||||
@@ -23,7 +23,8 @@ ContactsUI_OBJC_FILES = \
|
||||
UIxContactsListActions.m \
|
||||
UIxContactFoldersView.m \
|
||||
UIxContactFolderActions.m \
|
||||
UIxContactFolderLinksTemplate.m
|
||||
UIxContactFolderLinksTemplate.m \
|
||||
UIxContactFolderProperties.m
|
||||
|
||||
ContactsUI_RESOURCE_FILES += \
|
||||
product.plist \
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
content = [NSMutableString string];
|
||||
response = [context response];
|
||||
|
||||
[content appendFormat: [[self clientObject] contentAsString]];
|
||||
[content appendFormat: @"%@", [[self clientObject] contentAsString]];
|
||||
[response setHeader: @"text/plain; charset=utf-8"
|
||||
forKey: @"content-type"];
|
||||
[response appendContentString: content];
|
||||
|
||||
@@ -349,7 +349,7 @@ static Class SOGoContactGCSEntryK = Nil;
|
||||
NSMutableArray *units, *categories;
|
||||
NSCalendarDate *date;
|
||||
id o;
|
||||
unsigned int i, year, month, day;
|
||||
unsigned int i, year, month, day, seconds;
|
||||
|
||||
[card setNWithFamily: [attributes objectForKey: @"c_sn"]
|
||||
given: [attributes objectForKey: @"c_givenname"]
|
||||
@@ -357,8 +357,14 @@ static Class SOGoContactGCSEntryK = Nil;
|
||||
[card setNickname: [attributes objectForKey: @"nickname"]];
|
||||
[card setFn: [attributes objectForKey: @"c_cn"]];
|
||||
[card setTitle: [attributes objectForKey: @"title"]];
|
||||
[card setRole: [attributes objectForKey: @"role"]];
|
||||
|
||||
unsigned int seconds = [[NSString stringWithFormat: @"%@", [attributes objectForKey: @"birthday"]] intValue];
|
||||
if ([attributes objectForKey: @"c_screenname"])
|
||||
[[card uniqueChildWithTag: @"x-aim"]
|
||||
setSingleValue: [attributes objectForKey: @"c_screenname"]
|
||||
forKey: @""];
|
||||
|
||||
seconds = [[NSString stringWithFormat: @"%@", [attributes objectForKey: @"birthday"]] intValue];
|
||||
if (seconds > 0)
|
||||
{
|
||||
date = [NSCalendarDate dateWithTimeIntervalSince1970: seconds];
|
||||
@@ -519,6 +525,7 @@ static Class SOGoContactGCSEntryK = Nil;
|
||||
* @apiParam {String} nickname Nickname
|
||||
* @apiParam {String} c_sn Lastname
|
||||
* @apiParam {String} c_cn Fullname
|
||||
* @apiParam {String} c_screenname Screen Name (X-AIM for now)
|
||||
* @apiParam {String} tz Timezone
|
||||
* @apiParam {String} note Note
|
||||
* @apiParam {String[]} allCategories All available categories
|
||||
|
||||
@@ -28,10 +28,14 @@
|
||||
#import <NGObjWeb/NSException+HTTP.h>
|
||||
#import <NGObjWeb/WOContext.h>
|
||||
#import <NGObjWeb/WOResponse.h>
|
||||
#define COMPILING_NGOBJWEB 1 /* we want httpRequest for parsing multi-part
|
||||
form data */
|
||||
#import <NGObjWeb/WORequest.h>
|
||||
#undef COMPILING_NGOBJWEB
|
||||
#import <NGExtensions/NSString+misc.h>
|
||||
#import <NGExtensions/NSNull+misc.h>
|
||||
#import <NGExtensions/NGBase64Coding.h>
|
||||
#import <NGMime/NGMimeMultipartBody.h>
|
||||
|
||||
#import <Contacts/SOGoContactObject.h>
|
||||
#import <Contacts/SOGoContactFolder.h>
|
||||
@@ -81,9 +85,9 @@
|
||||
inContext: [self context]
|
||||
acquire: NO];
|
||||
if ([currentChild respondsToSelector: @selector (vCard)])
|
||||
[content appendFormat: [[currentChild ldifRecord] ldifRecordAsString]];
|
||||
[content appendFormat: @"%@", [[currentChild ldifRecord] ldifRecordAsString]];
|
||||
else if ([currentChild respondsToSelector: @selector (vList)])
|
||||
[content appendFormat: [[currentChild vList] ldifString]];
|
||||
[content appendFormat: @"%@", [[currentChild vList] ldifString]];
|
||||
[content appendString: @"\n"];
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/* UIxContactFolderProperties.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2015 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <SOGoUI/UIxComponent.h>
|
||||
|
||||
@class NSString;
|
||||
|
||||
@class SOGoContactGCSFolder;
|
||||
|
||||
@interface UIxContactFolderProperties : UIxComponent
|
||||
{
|
||||
SOGoContactGCSFolder *addressbook;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,84 @@
|
||||
/* UIxContactFolderProperties.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2015 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSEnumerator.h>
|
||||
#import <Foundation/NSURL.h>
|
||||
#import <Foundation/NSValue.h>
|
||||
|
||||
#import <NGObjWeb/WORequest.h>
|
||||
|
||||
#import <SOGo/NSString+Utilities.h>
|
||||
#import <SOGo/SOGoUser.h>
|
||||
#import <SOGo/SOGoUserSettings.h>
|
||||
#import <SOGo/SOGoSystemDefaults.h>
|
||||
|
||||
#import <Contacts/SOGoContactGCSFolder.h>
|
||||
|
||||
#import "UIxContactFolderProperties.h"
|
||||
|
||||
@implementation UIxContactFolderProperties
|
||||
|
||||
- (id) init
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
addressbook = [self clientObject];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {post} /so/:username/Contacts/:addressbookId/save Save addressbook
|
||||
* @apiDescription Save an addressbook's properties.
|
||||
* @apiVersion 1.0.0
|
||||
* @apiName PostSaveProperties
|
||||
* @apiGroup AddressBook
|
||||
*
|
||||
* @apiParam {String} name Human readable name
|
||||
* @apiParam {Number} synchronize 1 if we enable EAS synchronization for this addressbook
|
||||
*/
|
||||
- (WOResponse *) savePropertiesAction
|
||||
{
|
||||
WORequest *request;
|
||||
NSDictionary *params;
|
||||
id o, values;
|
||||
|
||||
request = [context request];
|
||||
params = [[request contentAsString] objectFromJSONString];
|
||||
|
||||
o = [params objectForKey: @"name"];
|
||||
if ([o isKindOfClass: [NSString class]])
|
||||
[addressbook renameTo: o];
|
||||
|
||||
o = [params objectForKey: @"synchronize"];
|
||||
if ([o isKindOfClass: [NSNumber class]])
|
||||
[addressbook setSynchronize: [o boolValue]];
|
||||
|
||||
return [self responseWith204];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -71,6 +71,11 @@ Class SOGoContactSourceFolderK, SOGoGCSFolderK;
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSString *) modulePath
|
||||
{
|
||||
return @"Contacts";
|
||||
}
|
||||
|
||||
- (void) _setupContext
|
||||
{
|
||||
SOGoUser *activeUser;
|
||||
@@ -291,7 +296,7 @@ Class SOGoContactSourceFolderK, SOGoGCSFolderK;
|
||||
NSDictionary *folderAttrs;
|
||||
id currentFolder;
|
||||
|
||||
BOOL objectCreator, objectEditor, objectEraser;
|
||||
BOOL objectCreator, objectEditor, objectEraser, synchronize;
|
||||
int max, i;
|
||||
|
||||
userLogin = [[context activeUser] login];
|
||||
@@ -328,11 +333,20 @@ Class SOGoContactSourceFolderK, SOGoGCSFolderK;
|
||||
[NSNumber numberWithBool: objectEditor], @"objectEditor",
|
||||
[NSNumber numberWithBool: objectEraser], @"objectEraser", nil];
|
||||
|
||||
if ([currentFolder isKindOfClass: SOGoGCSFolderK])
|
||||
synchronize = [currentFolder synchronize];
|
||||
else
|
||||
synchronize = NO;
|
||||
|
||||
if ([[currentFolder nameInContainer] isEqualToString: @"personal"])
|
||||
synchronize = YES;
|
||||
|
||||
// NOTE: keep urls as the last key/value here, to avoid chopping the dictionary
|
||||
// if it is not a GCS folder
|
||||
folderAttrs = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSString stringWithFormat: @"%@", [currentFolder nameInContainer]], @"id",
|
||||
[currentFolder displayName], @"name",
|
||||
[NSNumber numberWithBool: synchronize], @"synchronize",
|
||||
owner, @"owner",
|
||||
[NSNumber numberWithBool: [currentFolder isKindOfClass: SOGoGCSFolderK]], @"isEditable",
|
||||
[NSNumber numberWithBool: [currentFolder isKindOfClass: SOGoContactSourceFolderK]
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/*
|
||||
Copyright (C) 2004 SKYRIX Software AG
|
||||
Copyright (C) 2005-2015 Inverse inc.
|
||||
|
||||
This file is part of OpenGroupware.org.
|
||||
|
||||
OGo is free software; you can redistribute it and/or modify it under
|
||||
This file is part of SOGo.
|
||||
|
||||
SOGo is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU Lesser General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
OGo is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
|
||||
SOGo is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with OGo; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
@@ -35,7 +35,7 @@
|
||||
NSMutableArray *photosURL;
|
||||
}
|
||||
|
||||
- (NSString *) fullName;
|
||||
//- (NSString *) fullName;
|
||||
- (NSArray *) orgUnits;
|
||||
- (NSString *) photoURL;
|
||||
|
||||
|
||||
+414
-410
@@ -1,5 +1,4 @@
|
||||
/*
|
||||
Copyright (C) 2004 SKYRIX Software AG
|
||||
Copyright (C) 2005-2015 Inverse inc.
|
||||
|
||||
This file is part of SOGo.
|
||||
@@ -69,70 +68,70 @@
|
||||
|
||||
/* accessors */
|
||||
|
||||
- (NSString *) _cardStringWithLabel: (NSString *) label
|
||||
value: (NSString *) value
|
||||
byEscapingHTMLString: (BOOL) escapeHTML
|
||||
asLinkScheme: (NSString *) scheme
|
||||
withLinkAttributes: (NSString *) attrs
|
||||
{
|
||||
NSMutableString *cardString;
|
||||
// - (NSString *) _cardStringWithLabel: (NSString *) label
|
||||
// value: (NSString *) value
|
||||
// byEscapingHTMLString: (BOOL) escapeHTML
|
||||
// asLinkScheme: (NSString *) scheme
|
||||
// withLinkAttributes: (NSString *) attrs
|
||||
// {
|
||||
// NSMutableString *cardString;
|
||||
|
||||
cardString = [NSMutableString stringWithCapacity: 80];
|
||||
value = [value stringByReplacingString: @"\r" withString: @""];
|
||||
if ([value length] > 0)
|
||||
{
|
||||
if (escapeHTML)
|
||||
value = [value stringByEscapingHTMLString];
|
||||
if ([scheme length] > 0)
|
||||
value = [NSString stringWithFormat: @"<a href=\"%@%@\" %@>%@</a>", scheme, value, attrs, value];
|
||||
// cardString = [NSMutableString stringWithCapacity: 80];
|
||||
// value = [value stringByReplacingString: @"\r" withString: @""];
|
||||
// if ([value length] > 0)
|
||||
// {
|
||||
// if (escapeHTML)
|
||||
// value = [value stringByEscapingHTMLString];
|
||||
// if ([scheme length] > 0)
|
||||
// value = [NSString stringWithFormat: @"<a href=\"%@%@\" %@>%@</a>", scheme, value, attrs, value];
|
||||
|
||||
if (label)
|
||||
[cardString appendFormat: @"<dt>%@</dt><dd>%@</dd>\n",
|
||||
[self labelForKey: label], value];
|
||||
else
|
||||
[cardString appendFormat: @"<dt></dt><dd>%@</dd>\n", value];
|
||||
}
|
||||
// if (label)
|
||||
// [cardString appendFormat: @"<dt>%@</dt><dd>%@</dd>\n",
|
||||
// [self labelForKey: label], value];
|
||||
// else
|
||||
// [cardString appendFormat: @"<dt></dt><dd>%@</dd>\n", value];
|
||||
// }
|
||||
|
||||
return cardString;
|
||||
}
|
||||
// return cardString;
|
||||
// }
|
||||
|
||||
- (NSString *) _cardStringWithLabel: (NSString *) label
|
||||
value: (NSString *) value
|
||||
{
|
||||
return [self _cardStringWithLabel: label
|
||||
value: value
|
||||
byEscapingHTMLString: YES
|
||||
asLinkScheme: nil
|
||||
withLinkAttributes: nil];
|
||||
}
|
||||
// - (NSString *) _cardStringWithLabel: (NSString *) label
|
||||
// value: (NSString *) value
|
||||
// {
|
||||
// return [self _cardStringWithLabel: label
|
||||
// value: value
|
||||
// byEscapingHTMLString: YES
|
||||
// asLinkScheme: nil
|
||||
// withLinkAttributes: nil];
|
||||
// }
|
||||
|
||||
- (NSString *) _cardStringWithLabel: (NSString *) label
|
||||
value: (NSString *) value
|
||||
asLinkScheme: (NSString *) scheme
|
||||
{
|
||||
return [self _cardStringWithLabel: label
|
||||
value: value
|
||||
byEscapingHTMLString: YES
|
||||
asLinkScheme: scheme
|
||||
withLinkAttributes: nil];
|
||||
}
|
||||
// - (NSString *) _cardStringWithLabel: (NSString *) label
|
||||
// value: (NSString *) value
|
||||
// asLinkScheme: (NSString *) scheme
|
||||
// {
|
||||
// return [self _cardStringWithLabel: label
|
||||
// value: value
|
||||
// byEscapingHTMLString: YES
|
||||
// asLinkScheme: scheme
|
||||
// withLinkAttributes: nil];
|
||||
// }
|
||||
|
||||
- (NSString *) displayName
|
||||
{
|
||||
return [self _cardStringWithLabel: @"Display Name:"
|
||||
value: [card fn]];
|
||||
}
|
||||
// - (NSString *) displayName
|
||||
// {
|
||||
// return [self _cardStringWithLabel: @"Display Name:"
|
||||
// value: [card fn]];
|
||||
// }
|
||||
|
||||
- (NSString *) nickName
|
||||
{
|
||||
return [self _cardStringWithLabel: @"Nickname:"
|
||||
value: [card nickname]];
|
||||
}
|
||||
// - (NSString *) nickName
|
||||
// {
|
||||
// return [self _cardStringWithLabel: @"Nickname:"
|
||||
// value: [card nickname]];
|
||||
// }
|
||||
|
||||
- (NSString *) fullName
|
||||
{
|
||||
return [card fullName];
|
||||
}
|
||||
// - (NSString *) fullName
|
||||
// {
|
||||
// return [card fullName];
|
||||
// }
|
||||
|
||||
- (NSArray *) _languageContactsCategories
|
||||
{
|
||||
@@ -173,345 +172,345 @@
|
||||
return cats;
|
||||
}
|
||||
|
||||
- (NSString *) primaryEmail
|
||||
{
|
||||
NSString *email, *fn, *attrs;
|
||||
// - (NSString *) primaryEmail
|
||||
// {
|
||||
// NSString *email, *fn, *attrs;
|
||||
|
||||
email = [card preferredEMail];
|
||||
if ([email length] > 0)
|
||||
{
|
||||
fn = [card fn];
|
||||
if ([fn length] > 0)
|
||||
attrs = [NSString stringWithFormat: @"%@ <%@>", fn, email];
|
||||
else
|
||||
attrs = email;
|
||||
attrs = [attrs stringByReplacingString: @"'" withString: @"\\'"];
|
||||
attrs = [attrs stringByReplacingString: @"\"" withString: @"\\\""];
|
||||
attrs = [NSString stringWithFormat: @"onclick=\"return openMailTo('%@');\"", attrs];
|
||||
}
|
||||
else
|
||||
{
|
||||
attrs = nil;
|
||||
}
|
||||
// email = [card preferredEMail];
|
||||
// if ([email length] > 0)
|
||||
// {
|
||||
// fn = [card fn];
|
||||
// if ([fn length] > 0)
|
||||
// attrs = [NSString stringWithFormat: @"%@ <%@>", fn, email];
|
||||
// else
|
||||
// attrs = email;
|
||||
// attrs = [attrs stringByReplacingString: @"'" withString: @"\\'"];
|
||||
// attrs = [attrs stringByReplacingString: @"\"" withString: @"\\\""];
|
||||
// attrs = [NSString stringWithFormat: @"onclick=\"return openMailTo('%@');\"", attrs];
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// attrs = nil;
|
||||
// }
|
||||
|
||||
return [self _cardStringWithLabel: @"Email:"
|
||||
value: email
|
||||
byEscapingHTMLString: YES
|
||||
asLinkScheme: @"mailto:"
|
||||
withLinkAttributes: attrs];
|
||||
}
|
||||
// return [self _cardStringWithLabel: @"Email:"
|
||||
// value: email
|
||||
// byEscapingHTMLString: YES
|
||||
// asLinkScheme: @"mailto:"
|
||||
// withLinkAttributes: attrs];
|
||||
// }
|
||||
|
||||
- (NSArray *) secondaryEmails
|
||||
{
|
||||
NSMutableArray *secondaryEmails;
|
||||
NSString *email, *fn, *attrs;
|
||||
NSArray *emails;
|
||||
// - (NSArray *) secondaryEmails
|
||||
// {
|
||||
// NSMutableArray *secondaryEmails;
|
||||
// NSString *email, *fn, *attrs;
|
||||
// NSArray *emails;
|
||||
|
||||
emails = [card secondaryEmails];
|
||||
secondaryEmails = [NSMutableArray array];
|
||||
attrs = nil;
|
||||
// emails = [card secondaryEmails];
|
||||
// secondaryEmails = [NSMutableArray array];
|
||||
// attrs = nil;
|
||||
|
||||
// We might not have a preferred item but rather something like this:
|
||||
// EMAIL;TYPE=work:dd@ee.com
|
||||
// EMAIL;TYPE=home:ff@gg.com
|
||||
//
|
||||
// or:
|
||||
//
|
||||
// EMAIL;TYPE=INTERNET:a@a.com
|
||||
// EMAIL;TYPE=INTERNET,HOME:b@b.com
|
||||
//
|
||||
// In this case, we always return the entry NOT matching the primaryEmail
|
||||
if ([emails count] > 0)
|
||||
{
|
||||
int i;
|
||||
// // We might not have a preferred item but rather something like this:
|
||||
// // EMAIL;TYPE=work:dd@ee.com
|
||||
// // EMAIL;TYPE=home:ff@gg.com
|
||||
// //
|
||||
// // or:
|
||||
// //
|
||||
// // EMAIL;TYPE=INTERNET:a@a.com
|
||||
// // EMAIL;TYPE=INTERNET,HOME:b@b.com
|
||||
// //
|
||||
// // In this case, we always return the entry NOT matching the primaryEmail
|
||||
// if ([emails count] > 0)
|
||||
// {
|
||||
// int i;
|
||||
|
||||
for (i = 0; i < [emails count]; i++)
|
||||
{
|
||||
email = [[emails objectAtIndex: i] flattenedValuesForKey: @""];
|
||||
if ([email length])
|
||||
{
|
||||
fn = [card fn];
|
||||
if ([fn length])
|
||||
attrs = [NSString stringWithFormat: @"%@ <%@>", fn, email];
|
||||
else
|
||||
attrs = email;
|
||||
attrs = [attrs stringByReplacingString: @"'" withString: @"\\'"];
|
||||
attrs = [attrs stringByReplacingString: @"\"" withString: @"\\\""];
|
||||
attrs = [NSString stringWithFormat: @"onclick=\"return openMailTo('%@');\"", attrs];
|
||||
// for (i = 0; i < [emails count]; i++)
|
||||
// {
|
||||
// email = [[emails objectAtIndex: i] flattenedValuesForKey: @""];
|
||||
// if ([email length])
|
||||
// {
|
||||
// fn = [card fn];
|
||||
// if ([fn length])
|
||||
// attrs = [NSString stringWithFormat: @"%@ <%@>", fn, email];
|
||||
// else
|
||||
// attrs = email;
|
||||
// attrs = [attrs stringByReplacingString: @"'" withString: @"\\'"];
|
||||
// attrs = [attrs stringByReplacingString: @"\"" withString: @"\\\""];
|
||||
// attrs = [NSString stringWithFormat: @"onclick=\"return openMailTo('%@');\"", attrs];
|
||||
|
||||
[secondaryEmails addObject: [self _cardStringWithLabel: nil
|
||||
value: email
|
||||
byEscapingHTMLString: YES
|
||||
asLinkScheme: @"mailto:"
|
||||
withLinkAttributes: attrs]];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
[secondaryEmails addObject: [self _cardStringWithLabel: nil
|
||||
value: nil]];
|
||||
}
|
||||
// [secondaryEmails addObject: [self _cardStringWithLabel: nil
|
||||
// value: email
|
||||
// byEscapingHTMLString: YES
|
||||
// asLinkScheme: @"mailto:"
|
||||
// withLinkAttributes: attrs]];
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// [secondaryEmails addObject: [self _cardStringWithLabel: nil
|
||||
// value: nil]];
|
||||
// }
|
||||
|
||||
|
||||
return secondaryEmails;
|
||||
}
|
||||
// return secondaryEmails;
|
||||
// }
|
||||
|
||||
- (NSString *) screenName
|
||||
{
|
||||
NSString *screenName;
|
||||
// - (NSString *) screenName
|
||||
// {
|
||||
// NSString *screenName;
|
||||
|
||||
screenName = [[card uniqueChildWithTag: @"x-aim"] flattenedValuesForKey: @""];
|
||||
// screenName = [[card uniqueChildWithTag: @"x-aim"] flattenedValuesForKey: @""];
|
||||
|
||||
return [self _cardStringWithLabel: @"Screen Name:"
|
||||
value: screenName
|
||||
asLinkScheme: @"aim:goim?screenname="];
|
||||
}
|
||||
// return [self _cardStringWithLabel: @"Screen Name:"
|
||||
// value: screenName
|
||||
// asLinkScheme: @"aim:goim?screenname="];
|
||||
// }
|
||||
|
||||
- (NSString *) preferredTel
|
||||
{
|
||||
return [self _cardStringWithLabel: @"Phone Number:"
|
||||
value: [card preferredTel] asLinkScheme: @"tel:"];
|
||||
}
|
||||
// - (NSString *) preferredTel
|
||||
// {
|
||||
// return [self _cardStringWithLabel: @"Phone Number:"
|
||||
// value: [card preferredTel] asLinkScheme: @"tel:"];
|
||||
// }
|
||||
|
||||
- (NSString *) preferredAddress
|
||||
{
|
||||
return @"";
|
||||
}
|
||||
// - (NSString *) preferredAddress
|
||||
// {
|
||||
// return @"";
|
||||
// }
|
||||
|
||||
- (BOOL) hasTelephones
|
||||
{
|
||||
if (!phones)
|
||||
phones = [card childrenWithTag: @"tel"];
|
||||
// - (BOOL) hasTelephones
|
||||
// {
|
||||
// if (!phones)
|
||||
// phones = [card childrenWithTag: @"tel"];
|
||||
|
||||
return ([phones count] > 0);
|
||||
}
|
||||
// return ([phones count] > 0);
|
||||
// }
|
||||
|
||||
- (NSString *) workPhone
|
||||
{
|
||||
// We do this (exclude FAX) in order to avoid setting the WORK number as the FAX
|
||||
// one if we do see the FAX field BEFORE the WORK number.
|
||||
return [self _cardStringWithLabel: @"Work:" value: [card workPhone] asLinkScheme: @"tel:"];
|
||||
}
|
||||
// - (NSString *) workPhone
|
||||
// {
|
||||
// // We do this (exclude FAX) in order to avoid setting the WORK number as the FAX
|
||||
// // one if we do see the FAX field BEFORE the WORK number.
|
||||
// return [self _cardStringWithLabel: @"Work:" value: [card workPhone] asLinkScheme: @"tel:"];
|
||||
// }
|
||||
|
||||
- (NSString *) homePhone
|
||||
{
|
||||
return [self _cardStringWithLabel: @"Home:" value: [card homePhone] asLinkScheme: @"tel:"];
|
||||
}
|
||||
// - (NSString *) homePhone
|
||||
// {
|
||||
// return [self _cardStringWithLabel: @"Home:" value: [card homePhone] asLinkScheme: @"tel:"];
|
||||
// }
|
||||
|
||||
- (NSString *) fax
|
||||
{
|
||||
return [self _cardStringWithLabel: @"Fax:" value: [card fax] asLinkScheme: @"tel:"];
|
||||
}
|
||||
// - (NSString *) fax
|
||||
// {
|
||||
// return [self _cardStringWithLabel: @"Fax:" value: [card fax] asLinkScheme: @"tel:"];
|
||||
// }
|
||||
|
||||
- (NSString *) mobile
|
||||
{
|
||||
return [self _cardStringWithLabel: @"Mobile:" value: [card mobile] asLinkScheme: @"tel:"];
|
||||
}
|
||||
// - (NSString *) mobile
|
||||
// {
|
||||
// return [self _cardStringWithLabel: @"Mobile:" value: [card mobile] asLinkScheme: @"tel:"];
|
||||
// }
|
||||
|
||||
- (NSString *) pager
|
||||
{
|
||||
return [self _cardStringWithLabel: @"Pager:" value: [card pager] asLinkScheme: @"tel:"];
|
||||
}
|
||||
// - (NSString *) pager
|
||||
// {
|
||||
// return [self _cardStringWithLabel: @"Pager:" value: [card pager] asLinkScheme: @"tel:"];
|
||||
// }
|
||||
|
||||
- (BOOL) hasHomeInfos
|
||||
{
|
||||
BOOL result;
|
||||
NSArray *elements;
|
||||
// - (BOOL) hasHomeInfos
|
||||
// {
|
||||
// BOOL result;
|
||||
// NSArray *elements;
|
||||
|
||||
elements = [card childrenWithTag: @"adr"
|
||||
andAttribute: @"type"
|
||||
havingValue: @"home"];
|
||||
if ([elements count] > 0)
|
||||
{
|
||||
result = YES;
|
||||
homeAdr = [elements objectAtIndex: 0];
|
||||
}
|
||||
else
|
||||
result = ([[card childrenWithTag: @"url"
|
||||
andAttribute: @"type"
|
||||
havingValue: @"home"] count] > 0);
|
||||
// elements = [card childrenWithTag: @"adr"
|
||||
// andAttribute: @"type"
|
||||
// havingValue: @"home"];
|
||||
// if ([elements count] > 0)
|
||||
// {
|
||||
// result = YES;
|
||||
// homeAdr = [elements objectAtIndex: 0];
|
||||
// }
|
||||
// else
|
||||
// result = ([[card childrenWithTag: @"url"
|
||||
// andAttribute: @"type"
|
||||
// havingValue: @"home"] count] > 0);
|
||||
|
||||
return result;
|
||||
}
|
||||
// return result;
|
||||
// }
|
||||
|
||||
- (NSString *) homePobox
|
||||
{
|
||||
return [self _cardStringWithLabel: nil
|
||||
value: [homeAdr flattenedValueAtIndex: 0
|
||||
forKey: @""]];
|
||||
}
|
||||
// - (NSString *) homePobox
|
||||
// {
|
||||
// return [self _cardStringWithLabel: nil
|
||||
// value: [homeAdr flattenedValueAtIndex: 0
|
||||
// forKey: @""]];
|
||||
// }
|
||||
|
||||
- (NSString *) homeExtendedAddress
|
||||
{
|
||||
return [self _cardStringWithLabel: nil
|
||||
value: [homeAdr flattenedValueAtIndex: 1
|
||||
forKey: @""]];
|
||||
}
|
||||
// - (NSString *) homeExtendedAddress
|
||||
// {
|
||||
// return [self _cardStringWithLabel: nil
|
||||
// value: [homeAdr flattenedValueAtIndex: 1
|
||||
// forKey: @""]];
|
||||
// }
|
||||
|
||||
- (NSString *) homeStreetAddress
|
||||
{
|
||||
return [self _cardStringWithLabel: nil
|
||||
value: [homeAdr flattenedValueAtIndex: 2
|
||||
forKey: @""]];
|
||||
}
|
||||
// - (NSString *) homeStreetAddress
|
||||
// {
|
||||
// return [self _cardStringWithLabel: nil
|
||||
// value: [homeAdr flattenedValueAtIndex: 2
|
||||
// forKey: @""]];
|
||||
// }
|
||||
|
||||
- (NSString *) homeCityAndProv
|
||||
{
|
||||
NSString *city, *prov;
|
||||
NSMutableString *data;
|
||||
// - (NSString *) homeCityAndProv
|
||||
// {
|
||||
// NSString *city, *prov;
|
||||
// NSMutableString *data;
|
||||
|
||||
city = [homeAdr flattenedValueAtIndex: 3 forKey: @""];
|
||||
prov = [homeAdr flattenedValueAtIndex: 4 forKey: @""];
|
||||
// city = [homeAdr flattenedValueAtIndex: 3 forKey: @""];
|
||||
// prov = [homeAdr flattenedValueAtIndex: 4 forKey: @""];
|
||||
|
||||
data = [NSMutableString string];
|
||||
[data appendString: city];
|
||||
if ([city length] > 0 && [prov length] > 0)
|
||||
[data appendString: @", "];
|
||||
[data appendString: prov];
|
||||
// data = [NSMutableString string];
|
||||
// [data appendString: city];
|
||||
// if ([city length] > 0 && [prov length] > 0)
|
||||
// [data appendString: @", "];
|
||||
// [data appendString: prov];
|
||||
|
||||
return [self _cardStringWithLabel: nil value: data];
|
||||
}
|
||||
// return [self _cardStringWithLabel: nil value: data];
|
||||
// }
|
||||
|
||||
- (NSString *) homePostalCodeAndCountry
|
||||
{
|
||||
NSString *postalCode, *country;
|
||||
NSMutableString *data;
|
||||
// - (NSString *) homePostalCodeAndCountry
|
||||
// {
|
||||
// NSString *postalCode, *country;
|
||||
// NSMutableString *data;
|
||||
|
||||
postalCode = [homeAdr flattenedValueAtIndex: 5 forKey: @""];
|
||||
country = [homeAdr flattenedValueAtIndex: 6 forKey: @""];
|
||||
// postalCode = [homeAdr flattenedValueAtIndex: 5 forKey: @""];
|
||||
// country = [homeAdr flattenedValueAtIndex: 6 forKey: @""];
|
||||
|
||||
data = [NSMutableString string];
|
||||
[data appendString: postalCode];
|
||||
if ([postalCode length] > 0 && [country length] > 0)
|
||||
[data appendFormat: @", ", country];
|
||||
[data appendString: country];
|
||||
// data = [NSMutableString string];
|
||||
// [data appendString: postalCode];
|
||||
// if ([postalCode length] > 0 && [country length] > 0)
|
||||
// [data appendFormat: @", "];
|
||||
// [data appendString: country];
|
||||
|
||||
return [self _cardStringWithLabel: nil value: data];
|
||||
}
|
||||
// return [self _cardStringWithLabel: nil value: data];
|
||||
// }
|
||||
|
||||
- (NSString *) _formattedURL: (NSString *) url
|
||||
{
|
||||
NSRange schemaR;
|
||||
NSString *schema, *data;
|
||||
// - (NSString *) _formattedURL: (NSString *) url
|
||||
// {
|
||||
// NSRange schemaR;
|
||||
// NSString *schema, *data;
|
||||
|
||||
if ([url length] > 0)
|
||||
{
|
||||
schemaR = [url rangeOfString: @"://"];
|
||||
if (schemaR.length > 0)
|
||||
{
|
||||
schema = [url substringToIndex: schemaR.location + schemaR.length];
|
||||
data = [url substringFromIndex: schemaR.location + schemaR.length];
|
||||
}
|
||||
else
|
||||
{
|
||||
schema = @"http://";
|
||||
data = url;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
schema = nil;
|
||||
data = nil;
|
||||
}
|
||||
// if ([url length] > 0)
|
||||
// {
|
||||
// schemaR = [url rangeOfString: @"://"];
|
||||
// if (schemaR.length > 0)
|
||||
// {
|
||||
// schema = [url substringToIndex: schemaR.location + schemaR.length];
|
||||
// data = [url substringFromIndex: schemaR.location + schemaR.length];
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// schema = @"http://";
|
||||
// data = url;
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// schema = nil;
|
||||
// data = nil;
|
||||
// }
|
||||
|
||||
return [self _cardStringWithLabel: nil
|
||||
value: data
|
||||
byEscapingHTMLString: YES
|
||||
asLinkScheme: schema
|
||||
withLinkAttributes: @"target=\"_blank\""];
|
||||
}
|
||||
// return [self _cardStringWithLabel: nil
|
||||
// value: data
|
||||
// byEscapingHTMLString: YES
|
||||
// asLinkScheme: schema
|
||||
// withLinkAttributes: @"target=\"_blank\""];
|
||||
// }
|
||||
|
||||
|
||||
- (NSString *) _urlOfType: (NSString *) aType
|
||||
{
|
||||
NSArray *elements;
|
||||
NSString *url;
|
||||
// - (NSString *) _urlOfType: (NSString *) aType
|
||||
// {
|
||||
// NSArray *elements;
|
||||
// NSString *url;
|
||||
|
||||
elements = [card childrenWithTag: @"url"
|
||||
andAttribute: @"type"
|
||||
havingValue: aType];
|
||||
if ([elements count] > 0)
|
||||
url = [[elements objectAtIndex: 0] flattenedValuesForKey: @""];
|
||||
else
|
||||
url = nil;
|
||||
// elements = [card childrenWithTag: @"url"
|
||||
// andAttribute: @"type"
|
||||
// havingValue: aType];
|
||||
// if ([elements count] > 0)
|
||||
// url = [[elements objectAtIndex: 0] flattenedValuesForKey: @""];
|
||||
// else
|
||||
// url = nil;
|
||||
|
||||
return [self _formattedURL: url];
|
||||
}
|
||||
// return [self _formattedURL: url];
|
||||
// }
|
||||
|
||||
- (NSString *) homeUrl
|
||||
{
|
||||
NSString *s;
|
||||
// - (NSString *) homeUrl
|
||||
// {
|
||||
// NSString *s;
|
||||
|
||||
s = [self _urlOfType: @"home"];
|
||||
// s = [self _urlOfType: @"home"];
|
||||
|
||||
if (!s || [s length] == 0)
|
||||
{
|
||||
NSArray *elements;
|
||||
NSString *workURL;
|
||||
int i;
|
||||
// if (!s || [s length] == 0)
|
||||
// {
|
||||
// NSArray *elements;
|
||||
// NSString *workURL;
|
||||
// int i;
|
||||
|
||||
elements = [card childrenWithTag: @"url"
|
||||
andAttribute: @"type"
|
||||
havingValue: @"work"];
|
||||
workURL = nil;
|
||||
// elements = [card childrenWithTag: @"url"
|
||||
// andAttribute: @"type"
|
||||
// havingValue: @"work"];
|
||||
// workURL = nil;
|
||||
|
||||
if ([elements count] > 0)
|
||||
workURL = [[elements objectAtIndex: 0] flattenedValuesForKey: @""];
|
||||
// if ([elements count] > 0)
|
||||
// workURL = [[elements objectAtIndex: 0] flattenedValuesForKey: @""];
|
||||
|
||||
elements = [card childrenWithTag: @"url"];
|
||||
// elements = [card childrenWithTag: @"url"];
|
||||
|
||||
if (workURL && [elements count] > 1)
|
||||
{
|
||||
for (i = 0; i < [elements count]; i++)
|
||||
{
|
||||
if ([[[elements objectAtIndex: i] flattenedValuesForKey: @""]
|
||||
caseInsensitiveCompare: workURL] != NSOrderedSame)
|
||||
{
|
||||
s = [[elements objectAtIndex: i] flattenedValuesForKey: @""];
|
||||
break;
|
||||
}
|
||||
}
|
||||
// if (workURL && [elements count] > 1)
|
||||
// {
|
||||
// for (i = 0; i < [elements count]; i++)
|
||||
// {
|
||||
// if ([[[elements objectAtIndex: i] flattenedValuesForKey: @""]
|
||||
// caseInsensitiveCompare: workURL] != NSOrderedSame)
|
||||
// {
|
||||
// s = [[elements objectAtIndex: i] flattenedValuesForKey: @""];
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
else if (!workURL && [elements count] > 0)
|
||||
{
|
||||
s = [[elements objectAtIndex: 0] flattenedValuesForKey: @""];
|
||||
}
|
||||
// }
|
||||
// else if (!workURL && [elements count] > 0)
|
||||
// {
|
||||
// s = [[elements objectAtIndex: 0] flattenedValuesForKey: @""];
|
||||
// }
|
||||
|
||||
if (s && [s length] > 0)
|
||||
s = [self _formattedURL: s];
|
||||
}
|
||||
// if (s && [s length] > 0)
|
||||
// s = [self _formattedURL: s];
|
||||
// }
|
||||
|
||||
return s;
|
||||
}
|
||||
// return s;
|
||||
// }
|
||||
|
||||
- (BOOL) hasWorkInfos
|
||||
{
|
||||
BOOL result;
|
||||
NSArray *elements;
|
||||
// - (BOOL) hasWorkInfos
|
||||
// {
|
||||
// BOOL result;
|
||||
// NSArray *elements;
|
||||
|
||||
elements = [card childrenWithTag: @"adr"
|
||||
andAttribute: @"type"
|
||||
havingValue: @"work"];
|
||||
if ([elements count] > 0)
|
||||
{
|
||||
result = YES;
|
||||
workAdr = [elements objectAtIndex: 0];
|
||||
}
|
||||
else
|
||||
result = (([[card childrenWithTag: @"url"
|
||||
andAttribute: @"type"
|
||||
havingValue: @"work"] count] > 0)
|
||||
|| [[card childrenWithTag: @"org"] count] > 0);
|
||||
// elements = [card childrenWithTag: @"adr"
|
||||
// andAttribute: @"type"
|
||||
// havingValue: @"work"];
|
||||
// if ([elements count] > 0)
|
||||
// {
|
||||
// result = YES;
|
||||
// workAdr = [elements objectAtIndex: 0];
|
||||
// }
|
||||
// else
|
||||
// result = (([[card childrenWithTag: @"url"
|
||||
// andAttribute: @"type"
|
||||
// havingValue: @"work"] count] > 0)
|
||||
// || [[card childrenWithTag: @"org"] count] > 0);
|
||||
|
||||
return result;
|
||||
}
|
||||
// return result;
|
||||
// }
|
||||
|
||||
- (NSString *) workTitle
|
||||
{
|
||||
return [self _cardStringWithLabel: nil value: [card title]];
|
||||
}
|
||||
// - (NSString *) workTitle
|
||||
// {
|
||||
// return [self _cardStringWithLabel: nil value: [card title]];
|
||||
// }
|
||||
|
||||
- (NSArray *) orgUnits
|
||||
{
|
||||
@@ -608,65 +607,65 @@
|
||||
return addresses;
|
||||
}
|
||||
|
||||
- (NSString *) workService
|
||||
{
|
||||
NSMutableArray *orgServices;
|
||||
NSArray *values;
|
||||
CardElement *org;
|
||||
NSString *service, *services;
|
||||
NSUInteger count, max;
|
||||
// - (NSString *) workService
|
||||
// {
|
||||
// NSMutableArray *orgServices;
|
||||
// NSArray *values;
|
||||
// CardElement *org;
|
||||
// NSString *service, *services;
|
||||
// NSUInteger count, max;
|
||||
|
||||
org = [card org];
|
||||
values = [org valuesForKey: @""];
|
||||
max = [values count];
|
||||
if (max > 1)
|
||||
{
|
||||
orgServices = [NSMutableArray arrayWithCapacity: max];
|
||||
for (count = 1; count < max; count++)
|
||||
{
|
||||
service = [org flattenedValueAtIndex: count forKey: @""];
|
||||
if ([service length] > 0)
|
||||
[orgServices addObject: service];
|
||||
}
|
||||
// org = [card org];
|
||||
// values = [org valuesForKey: @""];
|
||||
// max = [values count];
|
||||
// if (max > 1)
|
||||
// {
|
||||
// orgServices = [NSMutableArray arrayWithCapacity: max];
|
||||
// for (count = 1; count < max; count++)
|
||||
// {
|
||||
// service = [org flattenedValueAtIndex: count forKey: @""];
|
||||
// if ([service length] > 0)
|
||||
// [orgServices addObject: service];
|
||||
// }
|
||||
|
||||
services = [orgServices componentsJoinedByString: @", "];
|
||||
}
|
||||
else
|
||||
services = nil;
|
||||
// services = [orgServices componentsJoinedByString: @", "];
|
||||
// }
|
||||
// else
|
||||
// services = nil;
|
||||
|
||||
return [self _cardStringWithLabel: nil value: services];
|
||||
}
|
||||
// return [self _cardStringWithLabel: nil value: services];
|
||||
// }
|
||||
|
||||
- (NSString *) workUrl
|
||||
{
|
||||
return [self _urlOfType: @"work"];
|
||||
}
|
||||
// - (NSString *) workUrl
|
||||
// {
|
||||
// return [self _urlOfType: @"work"];
|
||||
// }
|
||||
|
||||
- (BOOL) hasOtherInfos
|
||||
{
|
||||
return ([[card note] length] > 0
|
||||
|| [[card bday] length] > 0
|
||||
|| [[card tz] length] > 0);
|
||||
}
|
||||
// - (BOOL) hasOtherInfos
|
||||
// {
|
||||
// return ([[card note] length] > 0
|
||||
// || [[card bday] length] > 0
|
||||
// || [[card tz] length] > 0);
|
||||
// }
|
||||
|
||||
- (NSString *) bday
|
||||
{
|
||||
SOGoDateFormatter *dateFormatter;
|
||||
NSCalendarDate *date;
|
||||
NSString *bday;
|
||||
// - (NSString *) bday
|
||||
// {
|
||||
// SOGoDateFormatter *dateFormatter;
|
||||
// NSCalendarDate *date;
|
||||
// NSString *bday;
|
||||
|
||||
date = [card birthday];
|
||||
bday = nil;
|
||||
// date = [card birthday];
|
||||
// bday = nil;
|
||||
|
||||
if (date)
|
||||
{
|
||||
dateFormatter = [[[self context] activeUser] dateFormatterInContext: context];
|
||||
bday = [dateFormatter formattedDate: date];
|
||||
}
|
||||
// if (date)
|
||||
// {
|
||||
// dateFormatter = [[[self context] activeUser] dateFormatterInContext: context];
|
||||
// bday = [dateFormatter formattedDate: date];
|
||||
// }
|
||||
|
||||
return bday;
|
||||
//return [self _cardStringWithLabel: @"Birthday:" value: bday];
|
||||
}
|
||||
// return bday;
|
||||
// //return [self _cardStringWithLabel: @"Birthday:" value: bday];
|
||||
// }
|
||||
|
||||
// - (NSString *) tz
|
||||
// {
|
||||
@@ -693,29 +692,29 @@
|
||||
|
||||
/* hrefs */
|
||||
|
||||
- (NSString *) completeHrefForMethod: (NSString *) _method
|
||||
withParameter: (NSString *) _param
|
||||
forKey: (NSString *) _key
|
||||
{
|
||||
NSString *href;
|
||||
// - (NSString *) completeHrefForMethod: (NSString *) _method
|
||||
// withParameter: (NSString *) _param
|
||||
// forKey: (NSString *) _key
|
||||
// {
|
||||
// NSString *href;
|
||||
|
||||
[self setQueryParameter:_param forKey:_key];
|
||||
href = [self completeHrefForMethod:[self ownMethodName]];
|
||||
[self setQueryParameter:nil forKey:_key];
|
||||
// [self setQueryParameter:_param forKey:_key];
|
||||
// href = [self completeHrefForMethod:[self ownMethodName]];
|
||||
// [self setQueryParameter:nil forKey:_key];
|
||||
|
||||
return href;
|
||||
}
|
||||
// return href;
|
||||
// }
|
||||
|
||||
- (NSString *)attributesTabLink {
|
||||
return [self completeHrefForMethod:[self ownMethodName]
|
||||
withParameter:@"attributes"
|
||||
forKey:@"tab"];
|
||||
}
|
||||
- (NSString *)debugTabLink {
|
||||
return [self completeHrefForMethod:[self ownMethodName]
|
||||
withParameter:@"debug"
|
||||
forKey:@"tab"];
|
||||
}
|
||||
// - (NSString *)attributesTabLink {
|
||||
// return [self completeHrefForMethod:[self ownMethodName]
|
||||
// withParameter:@"attributes"
|
||||
// forKey:@"tab"];
|
||||
// }
|
||||
// - (NSString *)debugTabLink {
|
||||
// return [self completeHrefForMethod:[self ownMethodName]
|
||||
// withParameter:@"debug"
|
||||
// forKey:@"tab"];
|
||||
// }
|
||||
|
||||
/* action */
|
||||
|
||||
@@ -751,6 +750,7 @@
|
||||
* @apiSuccess (Success 200) {String} [nickname] Nickname
|
||||
* @apiSuccess (Success 200) {String} [c_sn] Lastname
|
||||
* @apiSuccess (Success 200) {String} [c_fn] Fullname
|
||||
* @apiSuccess (Success 200) {String} [c_screenname] Screen Name (X-AIM for now)
|
||||
* @apiSuccess (Success 200) {String} [tz] Timezone
|
||||
* @apiSuccess (Success 200) {String} [note] Note
|
||||
* @apiSuccess (Success 200) {String[]} allCategories All available categories
|
||||
@@ -812,6 +812,10 @@
|
||||
if ([firstName length] > 0)
|
||||
[data setObject: firstName forKey: @"c_givenname"];
|
||||
}
|
||||
|
||||
o = [[card uniqueChildWithTag: @"x-aim"] flattenedValuesForKey: @""];
|
||||
if ([o length]) [data setObject: o forKey: @"c_screenname"];
|
||||
|
||||
o = [card nickname];
|
||||
if (o) [data setObject: o forKey: @"nickname"];
|
||||
o = [card title];
|
||||
|
||||
@@ -136,6 +136,15 @@
|
||||
protectedBy = "View";
|
||||
pageName = "UIxContactFolderLinksTemplate";
|
||||
};
|
||||
properties = {
|
||||
protectedBy = "Access Contents Information";
|
||||
pageName = "UIxContactFolderProperties";
|
||||
};
|
||||
save = {
|
||||
protectedBy = "Access Contents Information";
|
||||
pageName = "UIxContactFolderProperties";
|
||||
actionName = "saveProperties";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -157,11 +166,6 @@
|
||||
pageName = "UIxContactEditor";
|
||||
actionName = "new";
|
||||
};
|
||||
save = {
|
||||
protectedBy = "Change Permissions";
|
||||
actionClass = "UIxFolderActions";
|
||||
actionName = "renameFolder";
|
||||
};
|
||||
mailer-contacts = {
|
||||
protectedBy = "<public>";
|
||||
pageName = "UIxContactFoldersView";
|
||||
|
||||
Reference in New Issue
Block a user