bugFix#2823
parent
b6be4e6e2f
commit
302e40a1c3
|
@ -1764,16 +1764,16 @@ static NSString *userAgent = nil;
|
|||
|
||||
if ([ud mailAddOutgoingAddresses])
|
||||
{
|
||||
Class contactGCSEntry;
|
||||
SOGoContactFolders *contactFolders;
|
||||
NGMailAddressParser *parser;
|
||||
id parsedRecipient;
|
||||
SOGoContactFolder *folder;
|
||||
SOGoContactGCSEntry *newContact;
|
||||
NGVCard *card;
|
||||
Class contactGCSEntry;
|
||||
NGMailAddressParser *parser;
|
||||
NSArray *matchingContacts;
|
||||
NSMutableArray *recipients;
|
||||
NSString *recipient, *emailAddress, *addressBook, *uid;
|
||||
NSArray *matchingContacts;
|
||||
id parsedRecipient;
|
||||
int i;
|
||||
|
||||
// Get all the addressbooks
|
||||
|
|
|
@ -164,10 +164,12 @@ static SoSecurityManager *sm = nil;
|
|||
NSString *folderName;
|
||||
SOGoGCSFolder *folder;
|
||||
SOGoUser *folderOwner;
|
||||
SOGoUserDefaults *ud;
|
||||
|
||||
roles = [[context activeUser] rolesForObject: self inContext: context];
|
||||
folderOwner = [SOGoUser userWithLogin: [self ownerInContext: context]];
|
||||
|
||||
|
||||
// We autocreate the calendars if the user is the owner, a superuser or
|
||||
// if it's a resource as we won't necessarily want to login as a resource
|
||||
// in order to create its database tables.
|
||||
|
@ -180,18 +182,27 @@ static SoSecurityManager *sm = nil;
|
|||
folderName = @"personal";
|
||||
folder = [subFolderClass objectWithName: folderName inContainer: self];
|
||||
[folder setDisplayName: [self defaultFolderName]];
|
||||
}
|
||||
else if (folderType == SOGoCollectedFolder)
|
||||
{
|
||||
folderName = @"collected";
|
||||
folder = [subFolderClass objectWithName: folderName inContainer: self];
|
||||
[folder setDisplayName: [self collectedFolderName]];
|
||||
}
|
||||
[folder setOCSPath: [NSString stringWithFormat: @"%@/%@", OCSPath, folderName]];
|
||||
|
||||
if ([folder create])
|
||||
[subFolders setObject: folder forKey: folderName];
|
||||
}
|
||||
else if (folderType == SOGoCollectedFolder)
|
||||
{
|
||||
ud = [[context activeUser] userDefaults];
|
||||
if ([ud mailAddOutgoingAddresses]) {
|
||||
folderName = @"collected";
|
||||
folder = [subFolderClass objectWithName: folderName inContainer: self];
|
||||
[folder setDisplayName: [self collectedFolderName]];
|
||||
[folder setOCSPath: [NSString stringWithFormat: @"%@/%@", OCSPath, folderName]];
|
||||
|
||||
if ([folder create])
|
||||
[subFolders setObject: folder forKey: folderName];
|
||||
|
||||
[ud setSelectedAddressBook:folderName];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (NSException *) fetchSpecialFolders: (NSString *) sql
|
||||
|
|
|
@ -732,8 +732,10 @@ static NSArray *reminderValues = nil;
|
|||
}
|
||||
// Create the dictionary for the next function : itemAddressBookText.
|
||||
if (!addressBooksIDWithDisplayName)
|
||||
{
|
||||
addressBooksIDWithDisplayName = [[NSMutableDictionary alloc] initWithObjects:availableAddressBooksName
|
||||
forKeys:availableAddressBooksID];
|
||||
}
|
||||
if (!collectedAlreadyExist)
|
||||
{
|
||||
[availableAddressBooksID addObject: @"collected"];
|
||||
|
|
|
@ -299,7 +299,8 @@
|
|||
<dd><input type="checkbox"
|
||||
const:name="addOutgoingAddresses"
|
||||
const:id="addOutgoingAddresses"
|
||||
var:checked="addOutgoingAddresses" />
|
||||
var:checked="addOutgoingAddresses"
|
||||
onChange = "onAddOutgoingAddressesCheck(this);"/>
|
||||
<var:string label:value="When sending mail, add unknown recipients to my"/><br/>
|
||||
<var:popup list="addressBookList" item="item"
|
||||
const:id="addressBookList"
|
||||
|
|
|
@ -291,6 +291,7 @@ function initPreferences() {
|
|||
$("vacationEndDate_date").disable();
|
||||
});
|
||||
}
|
||||
onAddOutgoingAddressesCheck();
|
||||
}
|
||||
|
||||
function initSieveFilters() {
|
||||
|
@ -1173,6 +1174,13 @@ function serializeContactsCategories() {
|
|||
|
||||
/* / contact categories */
|
||||
|
||||
function onAddOutgoingAddressesCheck(checkBox) {
|
||||
if (!checkBox) {
|
||||
checkBox = $("addOutgoingAddresses");
|
||||
}
|
||||
$("addressBookList").disabled = !checkBox.checked;
|
||||
|
||||
}
|
||||
|
||||
function onReplyPlacementListChange() {
|
||||
if ($("replyPlacementList").value == 0) {
|
||||
|
|
Loading…
Reference in New Issue