mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-22 11:55:24 +00:00
merge of '438a063520e89ce01a9e4e9104a4f5899bad3202'
and '62137d02651888053a8bd415f6e6f5aa79e44cf4' Monotone-Parent: 438a063520e89ce01a9e4e9104a4f5899bad3202 Monotone-Parent: 62137d02651888053a8bd415f6e6f5aa79e44cf4 Monotone-Revision: 505a627078dae3b66b4dd1a147d36c51fdcb0f02 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2009-10-28T17:47:12 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,3 +1,29 @@
|
||||
2009-10-28 Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
||||
* UI/WebServerResources/UIxMailToSelection.js: removed duplicated
|
||||
functionality in addressFieldLostFocus. Removed the ability to set
|
||||
an auto-completion text field to read-only.
|
||||
|
||||
* UI/WebServerResources/UIxListEditor.js: refactoring.
|
||||
|
||||
* UI/WebServerResources/ContactsUI.js: Improved text of import
|
||||
cards dialog.
|
||||
|
||||
* UI/WebServerResources/SchedulerUI.js: Improved text of import
|
||||
events dialog.
|
||||
|
||||
* UI/Contacts/UIxListEditor.m (-setReferencesValue:): rewrote
|
||||
method since only the contacts IDs are received from the web
|
||||
interface. The names and emails are retrieve from the addressbook.
|
||||
|
||||
* SoObjects/Contacts/SOGoContactGCSFolder.m
|
||||
(-lookupContactWithName): new method that returns a dictionary
|
||||
with the attributes of a contact.
|
||||
|
||||
* SoObjects/Appointments/SOGoAppointmentObject.m
|
||||
(-changeParticipationStatus:withDelegate:forRecurrenceId:): added
|
||||
exception when delegated user is the organizer.
|
||||
|
||||
2009-10-28 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
||||
* UI/MailPartViewers/UIxMailPartICalActions.m
|
||||
@@ -21,7 +47,6 @@
|
||||
* We now correctly lowercase the SOGoLDAPContactInfoAttribute
|
||||
attribute everywhere.
|
||||
|
||||
|
||||
2009-10-26 Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
||||
* UI/WebServerResources/ContactsUI.js
|
||||
|
||||
@@ -820,7 +820,7 @@
|
||||
{
|
||||
[delegates addObject: otherDelegate];
|
||||
|
||||
delegatedUID = [otherDelegate uid];
|
||||
delegatedUID = [otherDelegate uid];
|
||||
if (delegatedUID)
|
||||
// Delegated attendee is a local user; remove event from his calendar
|
||||
[self _removeEventFromUID: delegatedUID
|
||||
@@ -1336,11 +1336,12 @@
|
||||
iCalEvent *event;
|
||||
iCalPerson *attendee;
|
||||
NSException *ex;
|
||||
SOGoUser *ownerUser;
|
||||
NSString *recurrenceTime;
|
||||
SOGoUser *ownerUser, *delegatedUser;
|
||||
NSString *recurrenceTime, *delegatedUid;
|
||||
|
||||
event = nil;
|
||||
ex = nil;
|
||||
delegatedUser = nil;
|
||||
|
||||
calendar = [self calendar: NO secure: NO];
|
||||
if (calendar)
|
||||
@@ -1374,6 +1375,12 @@
|
||||
if (delegate
|
||||
&& ![[delegate email] isEqualToString: [attendee delegatedTo]])
|
||||
{
|
||||
delegatedUid = [delegate uid];
|
||||
if (delegatedUid)
|
||||
delegatedUser = [SOGoUser userWithLogin: delegatedUid];
|
||||
if (delegatedUser != nil && [event userIsOrganizer: delegatedUser])
|
||||
ex = [NSException exceptionWithHTTPStatus: 403
|
||||
reason: @"delegate is organizer"];
|
||||
if ([event isParticipant: [[delegate email] rfc822Email]])
|
||||
ex = [NSException exceptionWithHTTPStatus: 403
|
||||
reason: @"delegate is a participant"];
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
@interface SOGoContactGCSFolder : SOGoGCSFolder <SOGoContactFolder>
|
||||
|
||||
- (void) fixupContactRecord: (NSMutableDictionary *) contactRecord;
|
||||
- (NSDictionary *) lookupContactWithName: (NSString *) aName;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -224,6 +224,36 @@
|
||||
return newRecords;
|
||||
}
|
||||
|
||||
- (NSDictionary *) lookupContactWithName: (NSString *) aName
|
||||
{
|
||||
NSArray *fields, *dbRecords, *records;
|
||||
NSDictionary *record;
|
||||
EOQualifier *qualifier;
|
||||
NSString *qs;
|
||||
|
||||
fields = folderListingFields;
|
||||
record = nil;
|
||||
|
||||
if (aName && [aName length] > 0)
|
||||
{
|
||||
aName = [[aName stringByReplacingString: @"\\" withString: @"\\\\"]
|
||||
stringByReplacingString: @"'" withString: @"\\'\\'"];
|
||||
qs = [NSString stringWithFormat: @"(c_name isCaseInsensitiveLike: '%@')", aName];
|
||||
qualifier = [EOQualifier qualifierWithQualifierFormat: qs];
|
||||
|
||||
dbRecords = [[self ocsFolder] fetchFields: fields
|
||||
matchingQualifier: qualifier];
|
||||
|
||||
if ([dbRecords count] > 0)
|
||||
{
|
||||
records = [self _flattenedRecords: dbRecords];
|
||||
record = [records lastObject];
|
||||
}
|
||||
}
|
||||
|
||||
return record;
|
||||
}
|
||||
|
||||
- (NSArray *) lookupContactsWithFilter: (NSString *) filter
|
||||
sortBy: (NSString *) sortKey
|
||||
ordering: (NSComparisonResult) sortOrdering
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
= "Você não tem os privilégios requeridos para realizar esta operação.";
|
||||
|
||||
"noEmailForDelegation" = "You must specify the address to which you want to delegate your invitation.";
|
||||
"delegate is organizer" = "The delegate is the organizer. Please specify a different delegate.";
|
||||
"delegate is a participant" = "The delegate is already a participant.";
|
||||
"delegate is a group" = "The specified address corresponds to a group. You can only delegate to a unique person.";
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
= "Nemáte dostatečná práva k provedení této operace.";
|
||||
|
||||
"noEmailForDelegation" = "You must specify the address to which you want to delegate your invitation.";
|
||||
"delegate is organizer" = "The delegate is the organizer. Please specify a different delegate.";
|
||||
"delegate is a participant" = "The delegate is already a participant.";
|
||||
"delegate is a group" = "The specified address corresponds to a group. You can only delegate to a unique person.";
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
= "Voor deze actie heeft u niet de benodigde rechten.";
|
||||
|
||||
"noEmailForDelegation" = "You must specify the address to which you want to delegate your invitation.";
|
||||
"delegate is organizer" = "The delegate is the organizer. Please specify a different delegate.";
|
||||
"delegate is a participant" = "The delegate is already a participant.";
|
||||
"delegate is a group" = "The specified address corresponds to a group. You can only delegate to a unique person.";
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
= "You don't have the required privileges to perform the operation.";
|
||||
|
||||
"noEmailForDelegation" = "You must specify the address to which you want to delegate your invitation.";
|
||||
"delegate is organizer" = "The delegate is the organizer. Please specify a different delegate.";
|
||||
"delegate is a participant" = "The delegate is already a participant.";
|
||||
"delegate is a group" = "The specified address corresponds to a group. You can only delegate to a unique person.";
|
||||
|
||||
|
||||
@@ -52,9 +52,10 @@
|
||||
"You don't have the required privileges to perform the operation."
|
||||
= "Vous n'avez pas les privilèges requis pour compléter l'opération.";
|
||||
|
||||
"noEmailForDelegation" = "You must specify the address to which you want to delegate your invitation.";
|
||||
"delegate is a participant" = "The delegate is already a participant.";
|
||||
"delegate is a group" = "The specified address corresponds to a group. You can only delegate to a unique person.";
|
||||
"noEmailForDelegation" = "Vous devez spécifier l'adresse de la personne à qui vous voulez déléguez votre invitation.";
|
||||
"delegate is organizer" = "L'adresse spécifiée correspond à l'organisateur. Veuillez entrer un autre délégué.";
|
||||
"delegate is a participant" = "Le délégué est déjà un participant.";
|
||||
"delegate is a group" = "L'adresse spécifiée correspond à un groupe. Vous ne pouvez déléguer qu'à une personne.";
|
||||
|
||||
/* alarms */
|
||||
"Reminder:" = "Rappel :";
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
= "Sie haben nicht die benötigte Berechtigung für diesen Befehl.";
|
||||
|
||||
"noEmailForDelegation" = "You must specify the address to which you want to delegate your invitation.";
|
||||
"delegate is organizer" = "The delegate is the organizer. Please specify a different delegate.";
|
||||
"delegate is a participant" = "The delegate is already a participant.";
|
||||
"delegate is a group" = "The specified address corresponds to a group. You can only delegate to a unique person.";
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
= "Önnek nincs jogosultsága ehhez a művelethez.";
|
||||
|
||||
"noEmailForDelegation" = "You must specify the address to which you want to delegate your invitation.";
|
||||
"delegate is organizer" = "The delegate is the organizer. Please specify a different delegate.";
|
||||
"delegate is a participant" = "The delegate is already a participant.";
|
||||
"delegate is a group" = "The specified address corresponds to a group. You can only delegate to a unique person.";
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
= "Non disponi dei privilegi richiesti per eseguire questa operazione.";
|
||||
|
||||
"noEmailForDelegation" = "You must specify the address to which you want to delegate your invitation.";
|
||||
"delegate is organizer" = "The delegate is the organizer. Please specify a different delegate.";
|
||||
"delegate is a participant" = "The delegate is already a participant.";
|
||||
"delegate is a group" = "The specified address corresponds to a group. You can only delegate to a unique person.";
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
= "У Вас нет права производить эту операцию.";
|
||||
|
||||
"noEmailForDelegation" = "You must specify the address to which you want to delegate your invitation.";
|
||||
"delegate is organizer" = "The delegate is the organizer. Please specify a different delegate.";
|
||||
"delegate is a participant" = "The delegate is already a participant.";
|
||||
"delegate is a group" = "The specified address corresponds to a group. You can only delegate to a unique person.";
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
= "You don't have the required privileges to perform the operation.";
|
||||
|
||||
"noEmailForDelegation" = "You must specify the address to which you want to delegate your invitation.";
|
||||
"delegate is organizer" = "The delegate is the organizer. Please specify a different delegate.";
|
||||
"delegate is a participant" = "The delegate is already a participant.";
|
||||
"delegate is a group" = "The specified address corresponds to a group. You can only delegate to a unique person.";
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
= "Nid oes gennych y breintiau gofynnol i berfformio'r gweithrediad.";
|
||||
|
||||
"noEmailForDelegation" = "You must specify the address to which you want to delegate your invitation.";
|
||||
"delegate is organizer" = "The delegate is the organizer. Please specify a different delegate.";
|
||||
"delegate is a participant" = "The delegate is already a participant.";
|
||||
"delegate is a group" = "The specified address corresponds to a group. You can only delegate to a unique person.";
|
||||
|
||||
|
||||
@@ -178,12 +178,11 @@
|
||||
"Contacts" = "Contacts";
|
||||
"Add" = "Add";
|
||||
"Lists can't be moved or copied." = "Lists can't be moved or copied.";
|
||||
|
||||
"Export" = "Export";
|
||||
"Import Cards" = "Import Cards";
|
||||
"Select LDIF or vCard file..." = "Select LDIF or vCard file...";
|
||||
"Select a vCard or LDIF file." = "Select a vCard or LDIF file.";
|
||||
"Upload" = "Upload";
|
||||
"Import" = "Import";
|
||||
"OK" = "OK";
|
||||
"Done" = "Done";
|
||||
"An error occured while importing contacts." = "An error occured while importing contacts.";
|
||||
"Imported contacts:" = "Imported contacts:";
|
||||
"No card was imported." = "No card was imported.";
|
||||
"A total of %{0} cards were imported in the addressbook." = "A total of %{0} cards were imported in the addressbook.";
|
||||
|
||||
@@ -178,13 +178,11 @@
|
||||
"Contacts" = "Contacts";
|
||||
"Add" = "Add";
|
||||
"Lists can't be moved or copied." = "Lists can't be moved or copied.";
|
||||
|
||||
"Export" = "Exportovat";
|
||||
"Import Cards" = "Importovat kontakty";
|
||||
"Select LDIF or vCard file..." = "Zvolte LDIF nebo vCard soubor...";
|
||||
"Select a vCard or LDIF file." = "Zvolte LDIF nebo vCard soubor.";
|
||||
"Upload" = "Upload";
|
||||
"Import" = "Import";
|
||||
"OK" = "OK";
|
||||
"Done" = "Done";
|
||||
"An error occured while importing contacts." = "Při importu došlo k chybě.";
|
||||
|
||||
"Imported contacts:" = "Importováno kontaktů:";
|
||||
"No card was imported." = "No card was imported.";
|
||||
"A total of %{0} cards were imported in the addressbook." = "A total of %{0} cards were imported in the addressbook.";
|
||||
|
||||
@@ -178,12 +178,11 @@
|
||||
"Contacts" = "Contacts";
|
||||
"Add" = "Add";
|
||||
"Lists can't be moved or copied." = "Lists can't be moved or copied.";
|
||||
|
||||
"Export" = "Export";
|
||||
"Import Cards" = "Import Cards";
|
||||
"Select LDIF or vCard file..." = "Select LDIF or vCard file...";
|
||||
"Select a vCard or LDIF file." = "Select LDIF or vCard file.";
|
||||
"Upload" = "Upload";
|
||||
"Import" = "Import";
|
||||
"OK" = "OK";
|
||||
"Done" = "Done";
|
||||
"An error occured while importing contacts." = "An error occured while importing contacts.";
|
||||
"Imported contacts:" = "Imported contacts:";
|
||||
"No card was imported." = "No card was imported.";
|
||||
"A total of %{0} cards were imported in the addressbook." = "A total of %{0} cards were imported in the addressbook.";
|
||||
|
||||
@@ -178,12 +178,11 @@
|
||||
"Contacts" = "Contacts";
|
||||
"Add" = "Add";
|
||||
"Lists can't be moved or copied." = "Lists can't be moved or copied.";
|
||||
|
||||
"Export" = "Export";
|
||||
"Import Cards" = "Import Cards";
|
||||
"Select LDIF or vCard file..." = "Select LDIF or vCard file...";
|
||||
"Select a vCard or LDIF file." = "Select a vCard or LDIF file.";
|
||||
"Upload" = "Upload";
|
||||
"Import" = "Import";
|
||||
"OK" = "OK";
|
||||
"Done" = "Done";
|
||||
"An error occured while importing contacts." = "An error occured while importing contacts.";
|
||||
"Imported contacts:" = "Imported contacts:";
|
||||
"No card was imported." = "No card was imported.";
|
||||
"A total of %{0} cards were imported in the addressbook." = "A total of %{0} cards were imported in the addressbook.";
|
||||
|
||||
@@ -178,12 +178,11 @@
|
||||
"Contacts" = "Contacts";
|
||||
"Add" = "Ajouter";
|
||||
"Lists can't be moved or copied." = "Les listes ne peuvent pas être déplacées ou copiées.";
|
||||
|
||||
"Export" = "Exporter";
|
||||
"Import Cards" = "Importer des contacts";
|
||||
"Select LDIF or vCard file..." = "Sélectionner un fichier. LDIF ou vCard..";
|
||||
"Select a vCard or LDIF file." = "Sélectionner un fichier. LDIF ou vCard.";
|
||||
"Upload" = "Ajouter";
|
||||
"Import" = "Import";
|
||||
"OK" = "OK";
|
||||
"Done" = "Terminer";
|
||||
"An error occured while importing contacts." = "Une erreur s'est produite lors de l'importation.";
|
||||
"Imported contacts:" = "Contacts importés:";
|
||||
"No card was imported." = "Aucun contact n'a été importé.";
|
||||
"A total of %{0} cards were imported in the addressbook." = "Un total de %{0} contacts ont été importés dans le carnet.";
|
||||
|
||||
@@ -178,12 +178,11 @@
|
||||
"Contacts" = "Contacts";
|
||||
"Add" = "Add";
|
||||
"Lists can't be moved or copied." = "Lists can't be moved or copied.";
|
||||
|
||||
"Export" = "Export";
|
||||
"Import Cards" = "Import Cards";
|
||||
"Select LDIF or vCard file..." = "Select LDIF or vCard file...";
|
||||
"Select a vCard or LDIF file." = "Select a vCard or LDIF file.";
|
||||
"Upload" = "Upload";
|
||||
"Import" = "Import";
|
||||
"OK" = "OK";
|
||||
"Done" = "Done";
|
||||
"An error occured while importing contacts." = "An error occured while importing contacts.";
|
||||
"Imported contacts:" = "Imported contacts:";
|
||||
"No card was imported." = "No card was imported.";
|
||||
"A total of %{0} cards were imported in the addressbook." = "A total of %{0} cards were imported in the addressbook.";
|
||||
|
||||
@@ -181,9 +181,9 @@
|
||||
|
||||
"Export" = "Export";
|
||||
"Import Cards" = "Import Cards";
|
||||
"Select LDIF or vCard file..." = "Select LDIF or vCard file...";
|
||||
"Select a vCard or LDIF file."" = "Select LDIF or vCard file.";
|
||||
"Upload" = "Upload";
|
||||
"Import" = "Import";
|
||||
"OK" = "OK";
|
||||
"Done" = "Done";
|
||||
"An error occured while importing contacts." = "An error occured while importing contacts.";
|
||||
"Imported contacts:" = "Imported contacts:";
|
||||
"No card was imported." = "No card was imported.";
|
||||
"A total of %{0} cards were imported in the addressbook." = "A total of %{0} cards were imported in the addressbook.";
|
||||
|
||||
@@ -178,12 +178,11 @@
|
||||
"Contacts" = "Contacts";
|
||||
"Add" = "Add";
|
||||
"Lists can't be moved or copied." = "Lists can't be moved or copied.";
|
||||
|
||||
"Export" = "Export";
|
||||
"Import Cards" = "Import Cards";
|
||||
"Select LDIF or vCard file..." = "Select LDIF or vCard file...";
|
||||
"Select a vCard or LDIF file." = "Select a vCard or LDIF file.";
|
||||
"Upload" = "Upload";
|
||||
"Import" = "Import";
|
||||
"OK" = "OK";
|
||||
"Done" = "Done";
|
||||
"An error occured while importing contacts." = "An error occured while importing contacts.";
|
||||
"Imported contacts:" = "Imported contacts:";
|
||||
"No card was imported." = "No card was imported.";
|
||||
"A total of %{0} cards were imported in the addressbook." = "A total of %{0} cards were imported in the addressbook.";
|
||||
|
||||
@@ -166,9 +166,9 @@
|
||||
|
||||
"Export" = "Export";
|
||||
"Import Cards" = "Import Cards";
|
||||
"Select LDIF or vCard file..." = "Select LDIF or vCard file...";
|
||||
"Select a vCard or LDIF file." = "Select a vCard or LDIF file.";
|
||||
"Upload" = "Upload";
|
||||
"Import" = "Import";
|
||||
"OK" = "OK";
|
||||
"Done" = "Done";
|
||||
"An error occured while importing contacts." = "An error occured while importing contacts.";
|
||||
"Imported contacts:" = "Imported contacts:";
|
||||
"No card was imported." = "No card was imported.";
|
||||
"A total of %{0} cards were imported in the addressbook." = "A total of %{0} cards were imported in the addressbook.";
|
||||
|
||||
@@ -178,12 +178,11 @@
|
||||
"Contacts" = "Contacts";
|
||||
"Add" = "Add";
|
||||
"Lists can't be moved or copied." = "Lists can't be moved or copied.";
|
||||
|
||||
"Export" = "Export";
|
||||
"Import Cards" = "Import Cards";
|
||||
"Select LDIF or vCard file..." = "Select LDIF or vCard file...";
|
||||
"Select a vCard or LDIF file." = "Select a vCard or LDIF file.";
|
||||
"Upload" = "Upload";
|
||||
"Import" = "Import";
|
||||
"OK" = "OK";
|
||||
"Done" = "Done";
|
||||
"An error occured while importing contacts." = "An error occured while importing contacts.";
|
||||
"Imported contacts:" = "Imported contacts:";
|
||||
"No card was imported." = "No card was imported.";
|
||||
"A total of %{0} cards were imported in the addressbook." = "A total of %{0} cards were imported in the addressbook.";
|
||||
|
||||
+32
-36
@@ -90,57 +90,53 @@
|
||||
|
||||
- (void) setReferencesValue: (NSString *) value
|
||||
{
|
||||
NSData *data;
|
||||
NSDictionary *references;
|
||||
NSArray *values, *initialReferences;
|
||||
NSString *error, *currentReference;
|
||||
NSPropertyListFormat format;
|
||||
NSDictionary *values;
|
||||
NSArray *references, *initialReferences;
|
||||
NSString *currentReference;
|
||||
int i, count;
|
||||
NGVCardReference *cardReference;
|
||||
SOGoContactGCSFolder *folder;
|
||||
|
||||
references = [value componentsSeparatedByString: @","];
|
||||
if ([references count])
|
||||
{
|
||||
folder = [[self clientObject] container];
|
||||
|
||||
data = [value dataUsingEncoding: NSUTF8StringEncoding];
|
||||
references = [NSPropertyListSerialization propertyListFromData: data
|
||||
mutabilityOption: NSPropertyListImmutable
|
||||
format: &format
|
||||
errorDescription: &error];
|
||||
if(!references)
|
||||
{
|
||||
NSLog(error);
|
||||
[error release];
|
||||
}
|
||||
else
|
||||
{
|
||||
// Remove from list
|
||||
// Remove from the list the cards that were deleted
|
||||
initialReferences = [list cardReferences];
|
||||
count = [initialReferences count];
|
||||
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
cardReference = [initialReferences objectAtIndex: i];
|
||||
if (![[references allKeys] containsObject: [cardReference reference]])
|
||||
if (![references containsObject: [cardReference reference]])
|
||||
[list deleteCardReference: cardReference];
|
||||
}
|
||||
|
||||
// Add new objects
|
||||
initialReferences = [list cardReferences];
|
||||
count = [[references allKeys] count];
|
||||
|
||||
|
||||
// Add new cards
|
||||
count = [references count];
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
currentReference = [[references allKeys] objectAtIndex: i];
|
||||
currentReference = [references objectAtIndex: i];
|
||||
if (![self cardReferences: initialReferences
|
||||
contain: currentReference])
|
||||
{
|
||||
NSLog (@"Adding a new cardRef");
|
||||
values = [references objectForKey: currentReference];
|
||||
cardReference = [NGVCardReference elementWithTag: @"card"];
|
||||
[cardReference setFn: [values objectAtIndex: 0]];
|
||||
[cardReference setEmail: [values objectAtIndex: 1]];
|
||||
[cardReference setReference: currentReference];
|
||||
[list addCardReference: cardReference];
|
||||
}
|
||||
}
|
||||
}
|
||||
// Search contact
|
||||
values = [folder lookupContactWithName: currentReference];
|
||||
if (values)
|
||||
{
|
||||
|
||||
cardReference = [NGVCardReference elementWithTag: @"card"];
|
||||
[cardReference setFn: [values objectForKey: @"c_cn"]];
|
||||
[cardReference setEmail: [values objectForKey: @"c_mail"]];
|
||||
[cardReference setReference: currentReference];
|
||||
|
||||
[list addCardReference: cardReference];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
- (BOOL) cardReferences: (NSArray *) references
|
||||
contain: (NSString *) ref
|
||||
|
||||
@@ -165,9 +165,9 @@
|
||||
|
||||
"Export" = "Export";
|
||||
"Import Cards" = "Import Cards";
|
||||
"Select LDIF or vCard file..." = "Select LDIF or vCard file...";
|
||||
"Select a vCard or LDIF file." = "Select a vCard or LDIF file.";
|
||||
"Upload" = "Upload";
|
||||
"Import" = "Import";
|
||||
"OK" = "OK";
|
||||
"Done" = "Done";
|
||||
"An error occured while importing contacts." = "An error occured while importing contacts.";
|
||||
"Imported contacts:" = "Imported contacts:";
|
||||
"No card was imported." = "No card was imported.";
|
||||
"A total of %{0} cards were imported in the addressbook." = "A total of %{0} cards were imported in the addressbook.";
|
||||
@@ -106,15 +106,16 @@
|
||||
"Sharing..." = "Compartilhamento...";
|
||||
"Export Calendar..." = "Exportar Calendário...";
|
||||
"Import Events..." = "Import Events...";
|
||||
"Select iCalendar file (*.ics)..." = "Select iCalendar file (*.ics)...";
|
||||
"Import Events" = "Import Events";
|
||||
"Select an iCalendar file (.ics)." = "Select an iCalendar file (.ics).";
|
||||
"Upload" = "Upload";
|
||||
"Publish Calendar..." = "Publicar Calendário...";
|
||||
"Reload Remote Calendars" = "Recarregar Calendários Remotos";
|
||||
"Properties" = "Propriedades";
|
||||
"Import" = "Import";
|
||||
"OK" = "OK";
|
||||
"Done" = "Done";
|
||||
"An error occured while importing calendar." = "An error occured while importing calendar.";
|
||||
"Imported events:" = "Imported events:";
|
||||
"No event was imported." = "No event was imported.";
|
||||
"A total of %{0} events were imported in the calendar." = "A total of %{0} events were imported in the calendar.";
|
||||
|
||||
"Compose E-Mail to All Attendees" = "Compor E-Mail para Todos os Participantes";
|
||||
"Compose E-Mail to Undecided Attendees" = "Compor E-Mail para os Participantes não confirmados";
|
||||
|
||||
@@ -106,15 +106,16 @@
|
||||
"Sharing..." = "Sdílení...";
|
||||
"Export Calendar..." = "Exportovat kalendář...";
|
||||
"Import Events..." = "Importovat události...";
|
||||
"Select iCalendar file (*.ics)..." = "Zvolte iCalendar soubor (*.ics)...";
|
||||
"Import Events" = "Importovat události";
|
||||
"Select an iCalendar file (.ics)." = "Zvolte iCalendar soubor (*.ics).";
|
||||
"Upload" = "Upload";
|
||||
"Publish Calendar..." = "Publikovat kalendář...";
|
||||
"Reload Remote Calendars" = "Nahrát vzdálené kalendáře";
|
||||
"Properties" = "Vlastnosti";
|
||||
"Import" = "Import";
|
||||
"OK" = "OK";
|
||||
"Done" = "Done";
|
||||
"An error occured while importing calendar." = "Při importu událostí došlo k chybě.";
|
||||
"Imported events:" = "Importováno událostí:";
|
||||
"No event was imported." = "No event was imported.";
|
||||
"A total of %{0} events were imported in the calendar." = "A total of %{0} events were imported in the calendar.";
|
||||
|
||||
"Compose E-Mail to All Attendees" = "Vytvořit e-mail pro všechny účastníky";
|
||||
"Compose E-Mail to Undecided Attendees" = "Vytvořit e-mail pro nerozhodnuté účastníky";
|
||||
|
||||
@@ -106,15 +106,16 @@
|
||||
"Sharing..." = "Delen...";
|
||||
"Export Calendar..." = "Agenda exporteren...";
|
||||
"Import Events..." = "Import Events...";
|
||||
"Select iCalendar file (*.ics)..." = "Select iCalendar file (*.ics)...";
|
||||
"Import Events" = "Import Events";
|
||||
"Select an iCalendar file (.ics)." = "Select an iCalendar file (.ics).";
|
||||
"Upload" = "Upload";
|
||||
"Publish Calendar..." = "Agenda publiceren...";
|
||||
"Reload Remote Calendars" = "Externe agenda vernieuwen";
|
||||
"Properties" = "Instellingen";
|
||||
"Import" = "Import";
|
||||
"OK" = "OK";
|
||||
"Done" = "Done";
|
||||
"An error occured while importing calendar." = "An error occured while importing calendar.";
|
||||
"Imported events:" = "Imported events:";
|
||||
"No event was imported." = "No event was imported.";
|
||||
"A total of %{0} events were imported in the calendar." = "A total of %{0} events were imported in the calendar.";
|
||||
|
||||
"Compose E-Mail to All Attendees" = "E-mail aan alle deelnemers opstellen";
|
||||
"Compose E-Mail to Undecided Attendees" = "E-mail aan deelnemers opstellen die nog niet hebben gereageerd";
|
||||
|
||||
@@ -106,15 +106,16 @@
|
||||
"Sharing..." = "Sharing...";
|
||||
"Export Calendar..." = "Export Calendar...";
|
||||
"Import Events..." = "Import Events...";
|
||||
"Select iCalendar file (*.ics)..." = "Select iCalendar file (*.ics)...";
|
||||
"Import Events" = "Import Events";
|
||||
"Select an iCalendar file (.ics)." = "Select an iCalendar file (.ics).";
|
||||
"Upload" = "Upload";
|
||||
"Publish Calendar..." = "Publish Calendar...";
|
||||
"Reload Remote Calendars" = "Reload Remote Calendars";
|
||||
"Properties" = "Properties";
|
||||
"Import" = "Import";
|
||||
"OK" = "OK";
|
||||
"Done" = "Done";
|
||||
"An error occured while importing calendar." = "An error occured while importing calendar.";
|
||||
"Imported events:" = "Imported events:";
|
||||
"No event was imported." = "No event was imported.";
|
||||
"A total of %{0} events were imported in the calendar." = "A total of %{0} events were imported in the calendar.";
|
||||
|
||||
"Compose E-Mail to All Attendees" = "Compose E-Mail to All Attendees";
|
||||
"Compose E-Mail to Undecided Attendees" = "Compose E-Mail to Undecided Attendees";
|
||||
|
||||
@@ -106,15 +106,16 @@
|
||||
"Sharing..." = "Partage...";
|
||||
"Export Calendar..." = "Exporter l'agenda...";
|
||||
"Import Events..." = "Importer des événements...";
|
||||
"Select iCalendar file (*.ics)..." = "Sélectionner un fichier. iCalendar (*.ics)...";
|
||||
"Import Events" = "Importer des événements";
|
||||
"Select an iCalendar file (.ics)." = "Sélectionner un fichier. iCalendar (*.ics).";
|
||||
"Upload" = "Ajouter";
|
||||
"Publish Calendar..." = "Publier l'agenda...";
|
||||
"Reload Remote Calendars" = "Recharger les agendas distants";
|
||||
"Properties" = "Propriétés";
|
||||
"Import" = "Import";
|
||||
"OK" = "OK";
|
||||
"Done" = "Terminer";
|
||||
"An error occured while importing calendar." = "Une erreur s'est produite lors de l'importation.";
|
||||
"Imported events:" = "Événements importés:";
|
||||
"No event was imported." = "Aucun événement n'a été importé.";
|
||||
"A total of %{0} events were imported in the calendar." = "Un total de %{0} événements ont été importés dans le calendrier.";
|
||||
|
||||
"Compose E-Mail to All Attendees" = "Rédiger un courriel pour tous les participants";
|
||||
"Compose E-Mail to Undecided Attendees" = "Rédiger un courriel pour les participants indécis";
|
||||
|
||||
@@ -106,15 +106,16 @@
|
||||
"Sharing..." = "Benutzerrechte...";
|
||||
"Export Calendar..." = "Kalender exportieren...";
|
||||
"Import Events..." = "Import Events...";
|
||||
"Select iCalendar file (*.ics)..." = "Select iCalendar file (*.ics)...";
|
||||
"Import Events" = "Import Events";
|
||||
"Select an iCalendar file (.ics)." = "Select an iCalendar file (.ics).";
|
||||
"Upload" = "Upload";
|
||||
"Publish Calendar..." = "Kalender publizieren...";
|
||||
"Reload Remote Calendars" = "Externe Kalender neu laden";
|
||||
"Properties" = "Einstellungen";
|
||||
"Import" = "Import";
|
||||
"OK" = "OK";
|
||||
"Done" = "Done";
|
||||
"An error occured while importing calendar." = "An error occured while importing calendar.";
|
||||
"Imported events:" = "Imported events:";
|
||||
"No event was imported." = "No event was imported.";
|
||||
"A total of %{0} events were imported in the calendar." = "A total of %{0} events were imported in the calendar.";
|
||||
|
||||
"Compose E-Mail to All Attendees" = "E-Mail an alle Teilnehmer erstellen";
|
||||
"Compose E-Mail to Undecided Attendees" = "E-Mail an unentschlossene Teilnehmer erstellen";
|
||||
|
||||
@@ -106,15 +106,16 @@
|
||||
"Sharing..." = "Megosztás...";
|
||||
"Export Calendar..." = "Naptár exportálása...";
|
||||
"Import Events..." = "Import Events...";
|
||||
"Select iCalendar file (*.ics)..." = "Select iCalendar file (*.ics)...";
|
||||
"Import Events" = "Import Events";
|
||||
"Select an iCalendar file (.ics)." = "Select an iCalendar file (.ics).";
|
||||
"Upload" = "Upload";
|
||||
"Publish Calendar..." = "Naptár közzététele...";
|
||||
"Reload Remote Calendars" = "Távoli naptárak frissítése";
|
||||
"Properties" = "Tulajdonságok";
|
||||
"Import" = "Import";
|
||||
"OK" = "OK";
|
||||
"Done" = "Done";
|
||||
"An error occured while importing calendar." = "An error occured while importing calendar.";
|
||||
"Imported events:" = "Imported events:";
|
||||
"No event was imported." = "No event was imported.";
|
||||
"A total of %{0} events were imported in the calendar." = "A total of %{0} events were imported in the calendar.";
|
||||
|
||||
"Compose E-Mail to All Attendees" = "Üzenet küldése az összes résztvevőnek";
|
||||
"Compose E-Mail to Undecided Attendees" = "Üzenet küldése az bizonytalan résztvevőnek";
|
||||
|
||||
@@ -106,15 +106,16 @@
|
||||
"Sharing..." = "Condivisione";
|
||||
"Export Calendar..." = "Esporta calendario...";
|
||||
"Import Events..." = "Import Events...";
|
||||
"Select iCalendar file (*.ics)..." = "Select iCalendar file (*.ics)...";
|
||||
"Import Events" = "Import Events";
|
||||
"Select an iCalendar file (.ics)." = "Select an iCalendar file (.ics).";
|
||||
"Upload" = "Upload";
|
||||
"Publish Calendar..." = "Pubblica calendario...";
|
||||
"Reload Remote Calendars" = "Aggiorna calendari remoti";
|
||||
"Properties" = "Proprietà";
|
||||
"Import" = "Import";
|
||||
"OK" = "OK";
|
||||
"Done" = "Done";
|
||||
"An error occured while importing calendar." = "An error occured while importing calendar.";
|
||||
"Imported events:" = "Imported events:";
|
||||
"No event was imported." = "No event was imported.";
|
||||
"A total of %{0} events were imported in the calendar." = "A total of %{0} events were imported in the calendar.";
|
||||
|
||||
"Compose E-Mail to All Attendees" = "Invia Email a tutti gli invitati";
|
||||
"Compose E-Mail to Undecided Attendees" = "Invia Email agli invitati indecisi";
|
||||
|
||||
@@ -106,15 +106,17 @@
|
||||
"Sharing..." = "Sharing...";
|
||||
"Export Calendar..." = "Экспортировать календарь...";
|
||||
"Import Events..." = "Import Events...";
|
||||
"Select iCalendar file (*.ics)..." = "Select iCalendar file (*.ics)...";
|
||||
"Import Events" = "Import Events";
|
||||
"Select an iCalendar file (.ics)." = "Select an iCalendar file (.ics).";
|
||||
"Upload" = "Upload";
|
||||
"Publish Calendar..." = "Опубликовать календарь...";
|
||||
"Reload Remote Calendars" = "Обновить удаленные календари";
|
||||
"Properties" = "Свойства";
|
||||
"Import" = "Import";
|
||||
"OK" = "OK";
|
||||
"Done" = "Done";
|
||||
"An error occured while importing calendar." = "An error occured while importing calendar.";
|
||||
"Imported events:" = "Imported events:";
|
||||
"No event was imported." = "No event was imported.";
|
||||
"A total of %{0} events were imported in the calendar." = "A total of %{0} events were imported in the calendar.";
|
||||
|
||||
|
||||
"Compose E-Mail to All Attendees" = "Составить сообщение ко всем приглашенным";
|
||||
"Compose E-Mail to Undecided Attendees" = "Составить сообщение ко всем не решившим приглашенным";
|
||||
|
||||
@@ -106,15 +106,16 @@
|
||||
"Sharing..." = "Compartir...";
|
||||
"Export Calendar..." = "Exportar calendario...";
|
||||
"Import Events..." = "Import Events...";
|
||||
"Select iCalendar file (*.ics)..." = "Select iCalendar file (*.ics)...";
|
||||
"Import Events" = "Import Events";
|
||||
"Select an iCalendar file (.ics)." = "Select an iCalendar file (.ics).";
|
||||
"Upload" = "Upload";
|
||||
"Publish Calendar..." = "Publicar calendario...";
|
||||
"Reload Remote Calendars" = "Recargar calendarios remotos";
|
||||
"Properties" = "Propiedades";
|
||||
"Import" = "Import";
|
||||
"OK" = "OK";
|
||||
"Done" = "Done";
|
||||
"An error occured while importing calendar." = "An error occured while importing calendar.";
|
||||
"Imported events:" = "Imported events:";
|
||||
"No event was imported." = "No event was imported.";
|
||||
"A total of %{0} events were imported in the calendar." = "A total of %{0} events were imported in the calendar.";
|
||||
|
||||
"Compose E-Mail to All Attendees" = "Crear correo para todos los asistentes";
|
||||
"Compose E-Mail to Undecided Attendees" = "Crear correo para todos los asistentes indecisos (sin confirmación)";
|
||||
|
||||
@@ -106,15 +106,16 @@
|
||||
"Sharing..." = "Rhannu...";
|
||||
"Export Calendar..." = "Allfudo Calendr...";
|
||||
"Import Events..." = "Import Events...";
|
||||
"Select iCalendar file (*.ics)..." = "Select iCalendar file (*.ics)...";
|
||||
"Import Events" = "Import Events";
|
||||
"Select an iCalendar file (.ics)." = "Select an iCalendar file (.ics).";
|
||||
"Upload" = "Upload";
|
||||
"Publish Calendar..." = "Cyhoeddi Calendr...";
|
||||
"Reload Remote Calendars" = "Ail-lwytho Calendrau Anghysbell";
|
||||
"Properties" = "Dewisiadau";
|
||||
"Import" = "Import";
|
||||
"OK" = "OK";
|
||||
"Done" = "Done";
|
||||
"An error occured while importing calendar." = "An error occured while importing calendar.";
|
||||
"Imported events:" = "Imported events:";
|
||||
"No event was imported." = "No event was imported.";
|
||||
"A total of %{0} events were imported in the calendar." = "A total of %{0} events were imported in the calendar.";
|
||||
|
||||
"Compose E-Mail to All Attendees" = "Cyfansoddi Ebost i bawb sy'n mynychu";
|
||||
"Compose E-Mail to Undecided Attendees" = "Cyfansoddi Ebost i bawb sydd heb benderfynu";
|
||||
|
||||
@@ -27,13 +27,14 @@
|
||||
|
||||
<div id="uploadDialog" style="display: none" class="dialog left">
|
||||
<div>
|
||||
<h3><var:string label:value="Select LDIF or vCard file..."/></h3>
|
||||
<h3><var:string label:value="Import Cards"/></h3>
|
||||
<p><var:string label:value="Select a vCard or LDIF file."/></p>
|
||||
<form name="uploadForm" id="uploadForm" method="post"
|
||||
enctype="multipart/form-data"
|
||||
onsubmit="return AIM.submit(this, {'onStart' : validateUploadForm,
|
||||
'onComplete' : uploadCompleted})">
|
||||
<p><input type="file" name="contactsFile" id="contactsFile" /></p>
|
||||
<p><input class="button" type="submit" const:id="uploadSubmit" label:value="Upload"/>
|
||||
<p class="buttons"><input class="button" type="submit" const:id="uploadSubmit" label:value="Upload"/>
|
||||
<input class="button" type="button" const:id="uploadCancel" label:value="Cancel"/></p>
|
||||
</form>
|
||||
</div>
|
||||
@@ -41,10 +42,10 @@
|
||||
|
||||
<div id="uploadResults" style="display: none" class="dialog left">
|
||||
<div>
|
||||
<h3><var:string label:value="Import"/></h3>
|
||||
<h3><var:string label:value="Import Cards"/></h3>
|
||||
<p id="uploadResultsContent"><!-- empty --></p>
|
||||
<p><input class="button" type="button" const:id="uploadOK"
|
||||
label:value="OK"/></p>
|
||||
<p class="buttons"><input class="button" type="button" const:id="uploadOK"
|
||||
label:value="Done"/></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
const:popup="YES"
|
||||
const:jsFiles="UIxMailEditor.js,SOGoAutoCompletion.js"
|
||||
>
|
||||
<script type="text/javascript">
|
||||
var activeAddressBook = '<var:string value="clientObject.container.nameInContainer"/>';
|
||||
</script>
|
||||
<div class="popupMenu" id="contactsMenu">
|
||||
<ul></ul>
|
||||
</div>
|
||||
@@ -42,8 +45,11 @@
|
||||
<tbody>
|
||||
<var:foreach list="references" item="reference">
|
||||
<tr const:class="referenceListRow">
|
||||
<td const:class="referenceListCell" var:card="reference.id">
|
||||
<var:string var:value="reference.name"/>
|
||||
<td const:class="referenceListCell">
|
||||
<input var:uid="reference.id"
|
||||
var:value="reference.name"
|
||||
const:style="display: none"/>
|
||||
<span><var:string var:value="reference.name"/></span>
|
||||
</td></tr>
|
||||
</var:foreach>
|
||||
</tbody>
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
<table id="addressList" cellpadding="0" cellspacing="0"
|
||||
><tbody
|
||||
><var:foreach list="addressLists" item="addressList"
|
||||
><var:foreach list="addressList" item="address">
|
||||
><var:foreach list
|
||||
="addressList" item="address">
|
||||
<tr class="addressListElement" var:id="currentRowId">
|
||||
<td class="headerField">
|
||||
<var:popup name="currentPopUpId"
|
||||
@@ -37,7 +38,7 @@
|
||||
</var:foreach>
|
||||
</var:foreach>
|
||||
<tr class="addressListElement" id="lastRow">
|
||||
<td class="headerField" onclick="fancyAddRow(true,'');">
|
||||
<td class="headerField" onclick="fancyAddRow('');">
|
||||
<var:popup name="currentPopUpId"
|
||||
list="headers"
|
||||
item="item"
|
||||
@@ -45,7 +46,7 @@
|
||||
/>
|
||||
</td>
|
||||
<td class="headerInput">
|
||||
<span class="headerInput"><input onfocus="fancyAddRow(true,'');"
|
||||
<span class="headerInput"><input onfocus="fancyAddRow('');"
|
||||
readonly="1"
|
||||
type="text"
|
||||
class="textField" /></span>
|
||||
|
||||
@@ -100,13 +100,14 @@
|
||||
|
||||
<div id="uploadDialog" style="display: none" class="dialog left">
|
||||
<div>
|
||||
<h3><var:string label:value="Select iCalendar file (*.ics)..."/></h3>
|
||||
<h3><var:string label:value="Import Events"/></h3>
|
||||
<p><var:string label:value="Select an iCalendar file (.ics)."/></p>
|
||||
<form name="uploadForm" id="uploadForm" method="post"
|
||||
enctype="multipart/form-data"
|
||||
onsubmit="return AIM.submit(this, {'onStart' : validateUploadForm,
|
||||
'onComplete' : uploadCompleted})">
|
||||
<p><input type="file" name="calendarFile" id="calendarFile" /></p>
|
||||
<p><input class="button" type="submit" const:id="uploadSubmit" label:value="Upload"/>
|
||||
<p class="buttons"><input class="button" type="submit" const:id="uploadSubmit" label:value="Upload"/>
|
||||
<input class="button" type="button" const:id="uploadCancel" label:value="Cancel"/></p>
|
||||
</form>
|
||||
</div>
|
||||
@@ -114,10 +115,10 @@
|
||||
|
||||
<div id="uploadResults" style="display: none" class="dialog left">
|
||||
<div>
|
||||
<h3><var:string label:value="Import"/></h3>
|
||||
<h3><var:string label:value="Import Events"/></h3>
|
||||
<p id="uploadResultsContent"><!-- empty --></p>
|
||||
<p><input class="button" type="button" const:id="uploadOK"
|
||||
label:value="OK"/></p>
|
||||
<p class="buttons"><input class="button" type="button" const:id="uploadOK"
|
||||
label:value="Done"/></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -717,15 +717,17 @@ function validateUploadForm () {
|
||||
rc = true;
|
||||
return rc;
|
||||
}
|
||||
function uploadCompleted (response) {
|
||||
data = response.evalJSON (true);
|
||||
function uploadCompleted(response) {
|
||||
data = response.evalJSON(true);
|
||||
|
||||
var div = $("uploadResults");
|
||||
$("uploadOK").onclick = hideImportResults;
|
||||
if (data.imported <= 0)
|
||||
$("uploadResultsContent").update (getLabel("An error occured while importing contacts."));
|
||||
$("uploadResultsContent").update(getLabel("An error occured while importing contacts."));
|
||||
else if (data.imported == 0)
|
||||
$("uploadResultsContent").update(getLabel("No card was imported."));
|
||||
else {
|
||||
$("uploadResultsContent").update (getLabel("Imported contacts:") + " " + data.imported);
|
||||
$("uploadResultsContent").update(getLabel("A total of %{0} cards were imported in the addressbook.").formatted(data.imported));
|
||||
refreshCurrentFolder ();
|
||||
}
|
||||
|
||||
|
||||
@@ -1082,6 +1082,7 @@ function configureiCalLinksInMessage() {
|
||||
delegatedTo.addInterface(SOGoAutoCompletionInterface);
|
||||
delegatedTo.uidField = "c_mail";
|
||||
delegatedTo.excludeGroups = true;
|
||||
delegatedTo.excludeLists = true;
|
||||
|
||||
var editDelegate = $("editDelegate");
|
||||
if (editDelegate)
|
||||
@@ -1159,7 +1160,7 @@ function ICalendarButtonCallback(http) {
|
||||
else if (http.status == 403) {
|
||||
var data = http.responseText;
|
||||
var msg = data.replace(/^(.*\n)*.*<p>((.*\n)*.*)<\/p>(.*\n)*.*$/, "$2");
|
||||
window.alert(clabels[msg]?clabels[msg]:msg);
|
||||
window.alert(getLabel(msg));
|
||||
}
|
||||
else
|
||||
window.alert("received code: " + http.status + "\nerror: " + http.responseText);
|
||||
|
||||
@@ -1,18 +1,27 @@
|
||||
/* -*- Mode: java; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
|
||||
// The popup menu with id "contactsMenu" must exist before
|
||||
// using this interface.
|
||||
// NOTE: The popup menu with id "contactsMenu" must exist before
|
||||
// using this interface.
|
||||
//
|
||||
// This interface fires two events:
|
||||
// - autocompletion:changed : fired when a new contact is selected
|
||||
// - autocompletion:changedlist : fired when a new list is selected
|
||||
//
|
||||
var SOGoAutoCompletionInterface = {
|
||||
|
||||
// Attributes that could be changed from the object
|
||||
// inheriting the inteface
|
||||
uidField: "c_name",
|
||||
addressBook: null,
|
||||
excludeGroups: false,
|
||||
excludeLists: false,
|
||||
|
||||
// Internal attributes
|
||||
animationParent: null,
|
||||
selectedIndex: -1,
|
||||
delay: 0.750,
|
||||
delayedSearch: false,
|
||||
menu: null,
|
||||
baseUrl: null,
|
||||
onListAdded: null,
|
||||
endEditable: null,
|
||||
|
||||
bind: function () {
|
||||
this.menu = $('contactsMenu');
|
||||
@@ -30,13 +39,15 @@ var SOGoAutoCompletionInterface = {
|
||||
if (this.confirmedValue)
|
||||
this.value = this.confirmedValue;
|
||||
else
|
||||
this.uid = null;
|
||||
if (document.currentPopupMenu)
|
||||
this.writeAttribute("uid", null);
|
||||
if (document.currentPopupMenu)
|
||||
hideMenu(document.currentPopupMenu);
|
||||
if (this.endEditable)
|
||||
this.endEditable ();
|
||||
if (this.onListAdded)
|
||||
this.onListAdded ();
|
||||
if (this.readAttribute("container")) {
|
||||
this.confirmedValue = null;
|
||||
this.fire("autocompletion:changedlist", this.readAttribute("container"));
|
||||
}
|
||||
else
|
||||
this.fire("autocompletion:changed");
|
||||
}
|
||||
else if (event.keyCode == 0
|
||||
|| event.keyCode == Event.KEY_BACKSPACE
|
||||
@@ -52,14 +63,18 @@ var SOGoAutoCompletionInterface = {
|
||||
preventDefault(event);
|
||||
if (this.confirmedValue)
|
||||
this.value = this.confirmedValue;
|
||||
else
|
||||
this.writeAttribute("uid", null);
|
||||
$(this).select();
|
||||
if (document.currentPopupMenu)
|
||||
hideMenu(document.currentPopupMenu);
|
||||
this.selectedIndex = -1;
|
||||
if (this.endEditable)
|
||||
this.endEditable ();
|
||||
if (this.onListAdded)
|
||||
this.onListAdded ();
|
||||
if (this.readAttribute("container")) {
|
||||
this.confirmedValue = null;
|
||||
this.fire("autocompletion:changedlist", this.readAttribute("container"));
|
||||
}
|
||||
else
|
||||
this.fire("autocompletion:changed");
|
||||
}
|
||||
else if (this.menu.getStyle('visibility') == 'visible') {
|
||||
if (event.keyCode == Event.KEY_UP) { // Up arrow
|
||||
@@ -67,13 +82,12 @@ var SOGoAutoCompletionInterface = {
|
||||
var contacts = this.menu.select("li");
|
||||
contacts[this.selectedIndex--].removeClassName("selected");
|
||||
this.value = contacts[this.selectedIndex].readAttribute("address");
|
||||
this.uid = contacts[this.selectedIndex].uid;
|
||||
this.confirmedValue = this.value;
|
||||
this.writeAttribute("uid", contacts[this.selectedIndex].readAttribute("uid"));
|
||||
contacts[this.selectedIndex].addClassName("selected");
|
||||
var e = contacts[this.selectedIndex];
|
||||
this.writeAttribute("card", e.readAttribute("card"));
|
||||
this.writeAttribute("mail", e.readAttribute("mail"));
|
||||
this.writeAttribute("uname", e.readAttribute("uname"));
|
||||
this.writeAttribute("container", e.readAttribute("container"));
|
||||
var container = contacts[this.selectedIndex].readAttribute("container");
|
||||
if (container)
|
||||
this.writeAttribute("container", container);
|
||||
}
|
||||
}
|
||||
else if (event.keyCode == Event.KEY_DOWN) { // Down arrow
|
||||
@@ -83,13 +97,12 @@ var SOGoAutoCompletionInterface = {
|
||||
contacts[this.selectedIndex].removeClassName("selected");
|
||||
this.selectedIndex++;
|
||||
this.value = contacts[this.selectedIndex].readAttribute("address");
|
||||
this.uid = contacts[this.selectedIndex].uid;
|
||||
this.confirmedValue = this.value;
|
||||
this.writeAttribute("uid", contacts[this.selectedIndex].readAttribute("uid"));
|
||||
contacts[this.selectedIndex].addClassName("selected");
|
||||
var e = contacts[this.selectedIndex];
|
||||
this.writeAttribute("card", e.readAttribute("card"));
|
||||
this.writeAttribute("mail", e.readAttribute("mail"));
|
||||
this.writeAttribute("uname", e.readAttribute("uname"));
|
||||
this.writeAttribute("container", e.readAttribute("container"));
|
||||
var container = contacts[this.selectedIndex].readAttribute("container");
|
||||
if (container)
|
||||
this.writeAttribute("container", container);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -98,10 +111,13 @@ var SOGoAutoCompletionInterface = {
|
||||
onBlur: function (event) {
|
||||
if (this.delayedSearch)
|
||||
window.clearTimeout(this.delayedSearch);
|
||||
if (this.confirmedValue)
|
||||
if (this.confirmedValue) {
|
||||
this.value = this.confirmedValue;
|
||||
if (this.readAttribute("container"))
|
||||
this.fire("autocompletion:changedlist", this.readAttribute("container"));
|
||||
}
|
||||
else
|
||||
this.uid = null;
|
||||
this.writeAttribute("uid", null);
|
||||
},
|
||||
|
||||
performSearch: function (input) {
|
||||
@@ -112,10 +128,12 @@ var SOGoAutoCompletionInterface = {
|
||||
document.contactLookupAjaxRequest.abort();
|
||||
}
|
||||
if (input.value.trim().length > 2) {
|
||||
var urlstr = (UserFolderURL + "Contacts/allContactSearch?search="
|
||||
+ encodeURIComponent(input.value));
|
||||
if (input.baseUrl)
|
||||
urlstr = input.baseUrl + encodeURIComponent(input.value);
|
||||
var urlstr = UserFolderURL + "Contacts/";
|
||||
if (input.addressBook)
|
||||
urlstr += input.addressBook + "/contact";
|
||||
else
|
||||
urlstr += "allContact";
|
||||
urlstr += "Search?search=" + encodeURIComponent(input.value);
|
||||
if (input.excludeGroups)
|
||||
urlstr += "&excludeGroups=1";
|
||||
if (input.excludeLists)
|
||||
@@ -153,20 +171,15 @@ var SOGoAutoCompletionInterface = {
|
||||
var completeEmail = contact["c_cn"];
|
||||
if (contact["c_mail"])
|
||||
completeEmail += " <" + contact["c_mail"] + ">";
|
||||
var node = new Element('li', { 'address': completeEmail });
|
||||
var node = new Element('li', { 'address': completeEmail,
|
||||
'uid': contact[this.uidField] });
|
||||
var matchPosition = completeEmail.toLowerCase().indexOf(data.searchText.toLowerCase());
|
||||
var matchBefore = completeEmail.substring(0, matchPosition);
|
||||
var matchText = completeEmail.substring(matchPosition, matchPosition + data.searchText.length);
|
||||
var matchAfter = completeEmail.substring(matchPosition + data.searchText.length);
|
||||
list.appendChild(node);
|
||||
node.writeAttribute ("card", contact['c_name']);
|
||||
node.writeAttribute ("uid", contact['c_mail']);
|
||||
if (contact['c_name'].endsWith (".vlf")) {
|
||||
node.writeAttribute("container", contact['container']);
|
||||
}
|
||||
else {
|
||||
node.writeAttribute("mail", contact['c_mail']);
|
||||
node.writeAttribute("uname", contact['c_cn']);
|
||||
// Keep track of list containers
|
||||
node.writeAttribute("container", contact['container']);
|
||||
}
|
||||
node.appendChild(document.createTextNode(matchBefore));
|
||||
@@ -179,7 +192,9 @@ var SOGoAutoCompletionInterface = {
|
||||
|
||||
// Show popup menu
|
||||
var offsetScroll = Element.cumulativeScrollOffset(input);
|
||||
var offset = Element.cumulativeOffset(input);
|
||||
var offset = Element.positionedOffset(input);
|
||||
if (offset.top == 0)
|
||||
offset = Element.cumulativeOffset(input);
|
||||
var top = offset[1] - offsetScroll[1] + node.offsetHeight + 3;
|
||||
var height = 'auto';
|
||||
var heightDiff = window.height() - offset[1];
|
||||
@@ -199,37 +214,32 @@ var SOGoAutoCompletionInterface = {
|
||||
$(document.body).stopObserving("click");
|
||||
$(document.body).observe("click", onBodyClickMenuHandler);
|
||||
}
|
||||
else { // Only one result
|
||||
else {
|
||||
if (document.currentPopupMenu)
|
||||
hideMenu(document.currentPopupMenu);
|
||||
|
||||
if (data.contacts.length == 1) {
|
||||
// Single result
|
||||
var contact = data.contacts[0];
|
||||
input.uid = contact[this.uidField];
|
||||
if (contact['c_name'].endsWith (".vlf") && this.onListAdded) {
|
||||
input.writeAttribute("uid", contact[this.uidField]);
|
||||
if (contact['c_name'].endsWith(".vlf")) {
|
||||
this.writeAttribute("container", contact['container']);
|
||||
this.writeAttribute("card", contact['c_name']);
|
||||
this.onListAdded ();
|
||||
}
|
||||
else {
|
||||
input.writeAttribute("card", contact['c_name']);
|
||||
input.writeAttribute("mail", contact['c_mail']);
|
||||
input.writeAttribute("uname", contact['c_cn']);
|
||||
var completeEmail = contact["c_cn"] + " <" + contact["c_mail"] + ">";
|
||||
if (contact["c_cn"].substring(0, input.value.length).toUpperCase()
|
||||
== input.value.toUpperCase())
|
||||
input.value = completeEmail;
|
||||
else
|
||||
// The result matches email address, not user name
|
||||
input.value += ' >> ' + completeEmail;
|
||||
input.confirmedValue = completeEmail;
|
||||
|
||||
var end = input.value.length;
|
||||
$(input).selectText(start, end);
|
||||
|
||||
this.selectedIndex = -1;
|
||||
}
|
||||
var completeEmail = contact["c_cn"];
|
||||
if (contact["c_mail"])
|
||||
completeEmail += " <" + contact["c_mail"] + ">";
|
||||
if (contact["c_cn"].substring(0, input.value.length).toUpperCase()
|
||||
== input.value.toUpperCase())
|
||||
input.value = completeEmail;
|
||||
else
|
||||
// The result matches email address, not user name
|
||||
input.value += ' >> ' + completeEmail;
|
||||
input.confirmedValue = completeEmail;
|
||||
|
||||
var end = input.value.length;
|
||||
$(input).selectText(start, end);
|
||||
|
||||
this.selectedIndex = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -245,21 +255,14 @@ var SOGoAutoCompletionInterface = {
|
||||
if (e.tagName != 'LI')
|
||||
e = e.up('LI');
|
||||
if (e) {
|
||||
var card = e.readAttribute("card");
|
||||
this.writeAttribute("card", card);
|
||||
if (card.endsWith (".vlf") && this.onListAdded) {
|
||||
this.writeAttribute("container", e.readAttribute("container"));
|
||||
this.onListAdded ();
|
||||
}
|
||||
else {
|
||||
this.writeAttribute("mail", e.readAttribute("mail"));
|
||||
this.writeAttribute("uname", e.readAttribute("uname"));
|
||||
}
|
||||
this.writeAttribute("uid", e.readAttribute("uid"));
|
||||
this.value = e.readAttribute("address");
|
||||
this.confirmedValue = this.value;
|
||||
if (this.endEditable)
|
||||
this.endEditable ();
|
||||
this.writeAttribute("uid", e.readAttribute("uid"));
|
||||
if (e.readAttribute("container"))
|
||||
this.fire("autocompletion:changedlist", e.readAttribute("container"));
|
||||
else {
|
||||
this.confirmedValue = this.value;
|
||||
this.fire("autocompletion:changed");
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -230,10 +230,9 @@ function modifyEventCallback(http) {
|
||||
else if (http.status == 403) {
|
||||
var data = http.responseText;
|
||||
var msg = data.replace(/^(.*\n)*.*<p>((.*\n)*.*)<\/p>(.*\n)*.*$/, "$2");
|
||||
window.alert(clabels[msg]?clabels[msg]:msg);
|
||||
window.alert(getLabel(msg));
|
||||
}
|
||||
else {
|
||||
// log("showing alert...");
|
||||
window.alert(getLabel("eventPartStatModificationError"));
|
||||
}
|
||||
document.modifyEventAjaxRequest = null;
|
||||
@@ -1991,18 +1990,20 @@ function validateUploadForm () {
|
||||
rc = true;
|
||||
return rc;
|
||||
}
|
||||
function uploadCompleted (response) {
|
||||
data = response.evalJSON (true);
|
||||
function uploadCompleted(response) {
|
||||
data = response.evalJSON(true);
|
||||
|
||||
var div = $("uploadResults");
|
||||
$("uploadOK").onclick = hideImportResults;
|
||||
if (data.imported < 0)
|
||||
$("uploadResultsContent").update (getLabel("An error occured while importing calendar."));
|
||||
$("uploadResultsContent").update(getLabel("An error occured while importing calendar."));
|
||||
else if (data.imported == 0)
|
||||
$("uploadResultsContent").update(getLabel("No event was imported."));
|
||||
else {
|
||||
$("uploadResultsContent").update (getLabel("Imported events:") + " " + data.imported);
|
||||
refreshEventsAndDisplay ();
|
||||
$("uploadResultsContent").update(getLabel("A total of %{0} events were imported in the calendar.").formatted(data.imported));
|
||||
refreshEventsAndDisplay();
|
||||
}
|
||||
|
||||
|
||||
hideCalendarImport ();
|
||||
$("uploadResults").style.display = "block";
|
||||
}
|
||||
|
||||
@@ -27,6 +27,9 @@ TD.referenceListCell
|
||||
{ background: white;
|
||||
text-align: left; }
|
||||
|
||||
TABLE#referenceList TD INPUT
|
||||
{ width: 98%; }
|
||||
|
||||
DIV#referenceListWrapper
|
||||
{ background: white;
|
||||
overflow: auto;
|
||||
@@ -37,9 +40,10 @@ DIV#referenceListWrapper
|
||||
height: 33em;
|
||||
margin: 2px; }
|
||||
|
||||
DIV#referenceListWrapper TR,
|
||||
TR.referenceListRow
|
||||
{ background: #FFFFFF;
|
||||
height: 2.5em; }
|
||||
line-height: 2em; }
|
||||
TR._selected
|
||||
{ background: #333333; }
|
||||
|
||||
@@ -57,7 +61,7 @@ DIV#buttons
|
||||
vertical-align: middle;
|
||||
text-align: right; }
|
||||
|
||||
h3 {
|
||||
H3 {
|
||||
clear: both;
|
||||
margin-bottom: 2px !important;
|
||||
margin-left: 5px !important;
|
||||
|
||||
@@ -1,150 +1,144 @@
|
||||
/* -*- Mode: java; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
function validateListEditor () {
|
||||
serializeReferences ();
|
||||
return true;
|
||||
return serializeReferences();
|
||||
}
|
||||
|
||||
function makeEditable (element) {
|
||||
element.addClassName ("editing");
|
||||
element.removeClassName ("referenceListCell");
|
||||
var tmp = element.innerHTML;
|
||||
element.innerHTML = "";
|
||||
var textField = new Element ("input", {"type": "text" });
|
||||
textField.setStyle({ "width": "98%" });
|
||||
textField.value = tmp.trim ();
|
||||
textField.value = textField.value.replace (/</, "<");
|
||||
textField.value = textField.value.replace (/>/, ">");
|
||||
element.appendChild (textField);
|
||||
textField.addInterface (SOGoAutoCompletionInterface);
|
||||
textField.focus ();
|
||||
textField.select ();
|
||||
textField.excludeLists = 1;
|
||||
textField.menu = $("contactsMenu");
|
||||
textField.endEditable = endEditable;
|
||||
textField.addAnother = onReferenceAdd;
|
||||
textField.baseUrl = window.location.href + "/../../contactSearch?search=";
|
||||
element.addClassName("editing");
|
||||
element.removeClassName("referenceListCell");
|
||||
|
||||
var span = element.down("SPAN");
|
||||
span.update();
|
||||
|
||||
var textField = element.down("INPUT");
|
||||
textField.show();
|
||||
textField.focus();
|
||||
textField.select();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function endEditable (event, element) {
|
||||
var card;
|
||||
var name;
|
||||
var mail;
|
||||
function endEditable(event, textField) {
|
||||
if (!textField)
|
||||
textField = this;
|
||||
|
||||
var uid = textField.readAttribute("uid");
|
||||
var cell = textField.up("TD");
|
||||
var textSpan = cell.down("SPAN");
|
||||
|
||||
if (element) {
|
||||
card = element.readAttribute("card");
|
||||
mail = element.readAttribute("mail");
|
||||
name = element.readAttribute("uname");
|
||||
}
|
||||
else {
|
||||
if ($(this).tagName == "INPUT") {
|
||||
element = this.ancestors ().first ();
|
||||
card = this.readAttribute ("card");
|
||||
name = this.readAttribute ("uname");
|
||||
mail = this.readAttribute ("mail");
|
||||
}
|
||||
else {
|
||||
element = this;
|
||||
card = element.childElements ().first ().readAttribute ("card");
|
||||
mail = element.childElements ().first ().readAttribute ("mail");
|
||||
name = element.childElements ().first ().readAttribute ("uname");
|
||||
}
|
||||
}
|
||||
cell.removeClassName("editing");
|
||||
cell.addClassName("referenceListCell");
|
||||
textField.hide();
|
||||
|
||||
element.writeAttribute ("card", card);
|
||||
element.writeAttribute ("name", name);
|
||||
element.writeAttribute ("mail", mail);
|
||||
|
||||
var tmp = "";
|
||||
if (card) {
|
||||
var tmp = element.childElements ().first ().value;
|
||||
if (uid) {
|
||||
var tmp = textField.value;
|
||||
tmp = tmp.replace (/</, "<");
|
||||
tmp = tmp.replace (/>/, ">");
|
||||
element.innerHTML = tmp;
|
||||
element.removeClassName ("editing");
|
||||
element.addClassName ("referenceListCell");
|
||||
textSpan.update(tmp);
|
||||
}
|
||||
else {
|
||||
element.ancestors ().first ().remove ();
|
||||
cell.up("TR").remove();
|
||||
}
|
||||
|
||||
if (event)
|
||||
Event.stop(event);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function endAllEditables (e) {
|
||||
var r = $$("TABLE#referenceList tbody tr td");
|
||||
for (var i=0; i<r.length; i++) {
|
||||
if (r[i] != this && r[i].hasClassName ("editing"))
|
||||
endEditable (null, $(r[i]));
|
||||
var r = $$("TABLE#referenceList TBODY TR TD");
|
||||
for (var i = 0; i < r.length; i++) {
|
||||
var element = $(r[i]);
|
||||
if (r[i] != this && element.hasClassName("editing"))
|
||||
endEditable(null, element.down("INPUT"));
|
||||
}
|
||||
}
|
||||
|
||||
function onNameEdit (e) {
|
||||
endAllEditables ();
|
||||
if (!this.hasClassName ("editing")) {
|
||||
endAllEditables();
|
||||
if (!this.hasClassName("editing")) {
|
||||
makeEditable (this);
|
||||
}
|
||||
}
|
||||
|
||||
function onReferenceAdd (e) {
|
||||
var row = new Element ("tr");
|
||||
var nametd = new Element ("td").update ("");
|
||||
var tablebody = $("referenceList").tBodies[0];
|
||||
var row = new Element("tr");
|
||||
var td = new Element("td");
|
||||
var textField = new Element("input");
|
||||
var span = new Element("span");
|
||||
|
||||
row.addClassName ("referenceListRow");
|
||||
nametd.addClassName ("referenceListCell");
|
||||
row.observe("mousedown", onRowClick);
|
||||
td.addClassName ("referenceListCell");
|
||||
td.observe("mousedown", endAllEditables);
|
||||
td.observe("dblclick", onNameEdit);
|
||||
textField.addInterface(SOGoAutoCompletionInterface);
|
||||
textField.addressBook = activeAddressBook;
|
||||
textField.excludeLists = true;
|
||||
textField.observe("autocompletion:changed", endEditable);
|
||||
|
||||
row.appendChild (nametd);
|
||||
$("referenceList").tBodies[0].appendChild (row);
|
||||
makeEditable (nametd);
|
||||
td.appendChild(textField);
|
||||
td.appendChild(span);
|
||||
row.appendChild (td);
|
||||
tablebody.appendChild(row);
|
||||
tablebody.deselectAll();
|
||||
row.selectElement();
|
||||
|
||||
resetTableActions ();
|
||||
makeEditable(td);
|
||||
}
|
||||
|
||||
function onReferenceDelete (e) {
|
||||
function onReferenceDelete(e) {
|
||||
var list = $('referenceList').down("TBODY");;
|
||||
var rows = list.getSelectedNodes();
|
||||
var count = rows.length;
|
||||
|
||||
for (var i=0; i < count; i++) {
|
||||
rows[i].remove ();
|
||||
for (var i = 0; i < count; i++) {
|
||||
rows[i].remove();
|
||||
}
|
||||
}
|
||||
|
||||
function serializeReferences (e) {
|
||||
var r = $$("TABLE#referenceList tbody tr");
|
||||
var cards = "{";
|
||||
|
||||
function serializeReferences(e) {
|
||||
var r = $$("TABLE#referenceList TBODY TR INPUT");
|
||||
var cards = new Array();
|
||||
for (var i = 0; i < r.length; i++) {
|
||||
var td = r[i].childElements ().first ();
|
||||
var card = td.readAttribute ("card");
|
||||
var name = td.readAttribute ("name");
|
||||
var mail = td.readAttribute ("mail");
|
||||
cards += "\"" + card + "\" = (\""+name+"\", \""+mail+"\");";
|
||||
var uid = $(r[i]).readAttribute("uid");
|
||||
if (uid)
|
||||
cards.push(uid);
|
||||
}
|
||||
cards = cards + "}";
|
||||
|
||||
$("referencesValue").value = cards;
|
||||
$("referencesValue").value = cards.join(",");
|
||||
return true;
|
||||
}
|
||||
|
||||
function resetTableActions () {
|
||||
var r = $$("TABLE#referenceList tbody tr");
|
||||
function resetTableActions() {
|
||||
var r = $$("TABLE#referenceList TBODY TR");
|
||||
for (var i = 0; i < r.length; i++) {
|
||||
var row = $(r[i]);
|
||||
row.observe("mousedown", onRowClick);
|
||||
var td = row.childElements().first ();
|
||||
var td = row.down("TD");
|
||||
td.observe("mousedown", endAllEditables);
|
||||
td.observe("dblclick", onNameEdit);
|
||||
var textField = td.down("INPUT");
|
||||
textField.addInterface(SOGoAutoCompletionInterface);
|
||||
textField.addressBook = activeAddressBook;
|
||||
textField.excludeLists = true;
|
||||
textField.confirmedValue = textField.value;
|
||||
textField.observe("autocompletion:changed", endEditable);
|
||||
}
|
||||
}
|
||||
|
||||
function onEditorCancelClick(event) {
|
||||
preventDefault(event);
|
||||
window.close();
|
||||
preventDefault(event);
|
||||
window.close();
|
||||
}
|
||||
|
||||
function initListEditor () {
|
||||
function initListEditor() {
|
||||
var table = $("referenceList");
|
||||
table.multiselect = true;
|
||||
resetTableActions ();
|
||||
$("referenceAdd").observe ("click", onReferenceAdd);
|
||||
$("referenceDelete").observe ("click", onReferenceDelete);
|
||||
resetTableActions();
|
||||
$("referenceAdd").observe("click", onReferenceAdd);
|
||||
$("referenceDelete").observe("click", onReferenceDelete);
|
||||
$("cancelButton").observe("click", onEditorCancelClick);
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ function addContact(tag, fullContactName, contactId, contactName, contactEmail)
|
||||
}
|
||||
|
||||
if (!stop) {
|
||||
fancyAddRow(false, "");
|
||||
fancyAddRow("");
|
||||
var row = $("row_" + currentIndex);
|
||||
var td = $(row.childNodesWithTag("td")[0]);
|
||||
var select = $(td.childNodesWithTag("select")[0]);
|
||||
@@ -306,7 +306,8 @@ function initTabIndex(addressList, subjectField, msgArea) {
|
||||
input.writeAttribute("tabindex", i++);
|
||||
input.addInterface(SOGoAutoCompletionInterface);
|
||||
input.uidField = "c_name";
|
||||
input.onListAdded = expandContactList;
|
||||
input.observe("autocompletion:changedlist", expandContactList);
|
||||
//input.onListAdded = expandContactList;
|
||||
}
|
||||
});
|
||||
subjectField.writeAttribute("tabindex", i++);
|
||||
@@ -328,7 +329,7 @@ function initMailEditor() {
|
||||
if (listContent.length > 0)
|
||||
$("attachmentsArea").setStyle({ display: "block" });
|
||||
|
||||
var textarea = $("text");
|
||||
var textarea = $("text");
|
||||
|
||||
var textContent = textarea.getValue();
|
||||
if (hasSignature()) {
|
||||
|
||||
@@ -50,7 +50,7 @@ function checkAddresses() {
|
||||
alert("addressCount: " + this.getAddressCount() + " currentIndex: " + currentIndex + " lastIndex: " + lastIndex);
|
||||
}
|
||||
|
||||
function fancyAddRow(shouldEdit, text, type) {
|
||||
function fancyAddRow(text, type) {
|
||||
var addr = $('addr_' + lastIndex);
|
||||
if (addr && addr.value == '') {
|
||||
var sub = $('subjectField');
|
||||
@@ -80,17 +80,16 @@ function fancyAddRow(shouldEdit, text, type) {
|
||||
|
||||
addressList.insertBefore(row, lastChild);
|
||||
|
||||
if (shouldEdit) {
|
||||
input.addInterface(SOGoAutoCompletionInterface);
|
||||
input.focus();
|
||||
input.select();
|
||||
input.onListAdded = expandContactList;
|
||||
}
|
||||
input.addInterface(SOGoAutoCompletionInterface);
|
||||
input.focus();
|
||||
input.select();
|
||||
input.observe("autocompletion:changedlist", expandContactList);
|
||||
}
|
||||
|
||||
function expandContactList (e) {
|
||||
var url = UserFolderURL + "Contacts/" + this.readAttribute("container") + "/"
|
||||
+ this.readAttribute("card") + "/properties";
|
||||
var container = $(e).memo;
|
||||
var url = UserFolderURL + "Contacts/" + container + "/"
|
||||
+ this.readAttribute("uid") + "/properties";
|
||||
triggerAjaxRequest (url, expandContactListCallback, this);
|
||||
}
|
||||
|
||||
@@ -99,6 +98,7 @@ function expandContactListCallback (http) {
|
||||
var input = http.callbackData;
|
||||
if (http.status == 200) {
|
||||
var data = http.responseText.evalJSON(true);
|
||||
// TODO: Should check for duplicated entries
|
||||
if (data.length >= 1) {
|
||||
var text = data[0][2];
|
||||
if (data[0][1].length)
|
||||
@@ -110,11 +110,9 @@ function expandContactListCallback (http) {
|
||||
var text = data[i][2];
|
||||
if (data[i][1].length)
|
||||
text = data[i][1] + " <" + data[i][2] + ">";
|
||||
fancyAddRow(false, text, $(input).up("tr").down("select").value);
|
||||
fancyAddRow(text, $(input).up("tr").down("select").value);
|
||||
}
|
||||
}
|
||||
//subsequent attempts must be ignored
|
||||
input.onListAdded = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -132,19 +130,14 @@ function addressFieldGotFocus(sender) {
|
||||
|
||||
function addressFieldLostFocus(sender) {
|
||||
lastIndex = this.getIndexFromIdentifier(sender.id);
|
||||
|
||||
if (sender.confirmedValue) {
|
||||
sender.value = sender.confirmedValue;
|
||||
sender.confirmedValue = false;
|
||||
}
|
||||
|
||||
|
||||
var addresses = sender.value.split(',');
|
||||
if (addresses.length > 0) {
|
||||
sender.value = addresses[0].strip();
|
||||
for (var i = 1; i < addresses.length; i++) {
|
||||
var addr = addresses[i].strip();
|
||||
if (addr.length > 0)
|
||||
fancyAddRow(false, addr, $(sender).up("tr").down("select").value);
|
||||
fancyAddRow(addr, $(sender).up("tr").down("select").value);
|
||||
}
|
||||
}
|
||||
onWindowResize(null);
|
||||
|
||||
@@ -778,18 +778,22 @@ DIV.resize-handle
|
||||
}
|
||||
|
||||
.genericHoverClass
|
||||
{
|
||||
background-color: #0033cc !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
{ background-color: #0033cc !important;
|
||||
color: #fff !important; }
|
||||
|
||||
DIV#uploadDialog,DIV#uploadResults
|
||||
DIV#uploadDialog, DIV#uploadResults
|
||||
{ border-width: 1px;
|
||||
width: 260px;
|
||||
height: 127px; }
|
||||
DIV#uploadDialog DIV,DIV#uploadResults DIV
|
||||
{ width: 260px;
|
||||
height: 115px; }
|
||||
width: 260px; }
|
||||
|
||||
DIV#uploadDialog DIV, DIV#uploadResults DIV
|
||||
{ width: 260px; }
|
||||
|
||||
DIV.dialog H3
|
||||
{ margin-top: 0; }
|
||||
|
||||
DIV.dialog P.buttons
|
||||
{ margin-bottom: 0;
|
||||
text-align: right;}
|
||||
|
||||
DIV.dialog
|
||||
{ position: absolute;
|
||||
@@ -799,7 +803,6 @@ DIV.dialog
|
||||
|
||||
DIV.dialog DIV
|
||||
{ border: 1px solid #444;
|
||||
/*height: 100px;*/
|
||||
background-color: #fff;
|
||||
padding: 5px; }
|
||||
|
||||
|
||||
@@ -165,9 +165,8 @@ function openUserFolderSelector(callback, type) {
|
||||
function openContactWindow(url, wId) {
|
||||
if (!wId)
|
||||
wId = "_blank";
|
||||
else {
|
||||
else
|
||||
wId = sanitizeWindowName(wId);
|
||||
}
|
||||
|
||||
var w = window.open(url, wId,
|
||||
"width=450,height=600,resizable=0,location=0");
|
||||
@@ -181,9 +180,8 @@ function openMailComposeWindow(url, wId) {
|
||||
|
||||
if (!wId)
|
||||
wId = "_blank";
|
||||
else {
|
||||
else
|
||||
wId = sanitizeWindowName(wId);
|
||||
}
|
||||
|
||||
if (document.body.hasClassName("popup"))
|
||||
parentWindow = window.opener;
|
||||
@@ -1608,8 +1606,8 @@ function createFolderCallback(http) {
|
||||
function delegateInvitation(componentUrl, callbackFunction, callbackData) {
|
||||
var input = $("delegatedTo");
|
||||
var delegatedTo = null;
|
||||
if (input.uid != null)
|
||||
delegatedTo = input.uid;
|
||||
if (input.readAttribute("uid") != null)
|
||||
delegatedTo = input.readAttribute("uid");
|
||||
else if (input.value.blank())
|
||||
alert(getLabel("noEmailForDelegation"));
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user