Added support for choosing a list from the contacts popup

Monotone-Parent: c3073560ecefd7e654284be77264558f35df1171
Monotone-Revision: befe03897e161f1796e6bb4fd47e4ff7f46528ab

Monotone-Author: crobert@inverse.ca
Monotone-Date: 2009-09-10T21:00:38
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
C Robert 2009-09-10 21:00:38 +00:00
parent fbac33e308
commit a77bd3ded2
5 changed files with 63 additions and 5 deletions

View File

@ -60,6 +60,8 @@
management, for when the url is invalid / not ical / etc.
* SoObjects/SOGo/SOGoGCSFolder.m (_fetchAclsForUser: forObjectAtPath:):
Ignore group acls if we found acls for the user.
* UI/Contacts/UIxListView.m (propertiesAction): Added to list references
from a vList.
2009-09-10 Wolfgang Sourdeau <wsourdeau@inverse.ca>

View File

@ -119,4 +119,31 @@
return rc;
}
- (WOResponse *) propertiesAction
{
NSMutableArray *data;
NGVCardReference *card;
WOResponse *rc;
int i, count;
data = [NSMutableArray array];
co = [self clientObject];
list = [co vList];
count = [[list cardReferences] count];
for (i = 0; i < count; i++)
{
card = [[list cardReferences] objectAtIndex: i];
[data addObject: [NSArray arrayWithObjects: [card reference], [card fn],
[card email], nil]];
}
rc = [context response];
[rc setHeader: @"text/plain; charset=utf-8"
forKey: @"content-type"];
[rc appendContentString: [data jsonRepresentation]];
return rc;
}
@end

View File

@ -193,6 +193,11 @@
protectedBy = "Access Contents Information";
pageName = "UIxListView";
};
properties = {
protectedBy = "Access Contents Information";
pageName = "UIxListView";
actionName = "properties";
};
edit = {
protectedBy = "Access Contents Information";
pageName = "UIxListEditor";

View File

@ -568,16 +568,40 @@ function onConfirmContactSelection(event) {
var rows = contactsList.getSelectedRows();
for (i = 0; i < rows.length; i++) {
var cid = rows[i].getAttribute("id");
var cname = '' + rows[i].getAttribute("contactname");
var email = '' + rows[i].cells[1].innerHTML;
if (cid.endsWith (".vlf")) {
addListToOpener (tag, Contact.currentAddressBook,
currentAddressBookName, cid);
}
else {
var cname = '' + rows[i].getAttribute("contactname");
var email = '' + rows[i].cells[1].innerHTML;
window.opener.addContact(tag, currentAddressBookName + '/' + cname,
cid, cname, email);
window.opener.addContact(tag, currentAddressBookName + '/' + cname,
cid, cname, email);
}
}
preventDefault(event);
}
function addListToOpener (tag, aBookId, aBookName, listId) {
var url = ApplicationBaseURL + "/" + aBookId + "/" + listId + "/properties";
triggerAjaxRequest (url, addListToOpenerCallback, {
"aBookId": aBookId,
"aBookName": aBookName,
"tag": tag
});
}
function addListToOpenerCallback (http) {
var data = http.callbackData;
var received = http.responseText.evalJSON (true);
for (var i = 0; i < received.length; i++) {
var contact = received[i];
window.opener.addContact(data.tag, data.aBookName + '/' + contact[1],
contact[0], contact[1], contact[2]);
}
}
function refreshContacts(cname) {
openContactsFolder(Contact.currentAddressBook, true, cname);
delete cachedContacts[Contact.currentAddressBook + "/" + cname];

View File

@ -11,7 +11,7 @@ function onSearchFormSubmit() {
}
else {
var url = (UserFolderURL
+ "usersSearch?search=" + encodedValue + "&excludeGroups=1");
+ "usersSearch?search=" + encodedValue);
if (document.userFoldersRequest) {
document.userFoldersRequest.aborted = true;
document.userFoldersRequest.abort();