Monotone-Parent: af42c1c664398cffa5afdc484683fb326e291b6e

Monotone-Revision: 38a512204cb4c49fbc144379e8587aaea3394a3a

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2008-08-22T12:08:18
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2008-08-22 12:08:18 +00:00
parent 559f29f702
commit 0b492ef0ad
3 changed files with 20 additions and 7 deletions
+15 -3
View File
@@ -664,7 +664,7 @@
[address appendFormat: @"%@ <%@>", cn, email];
else
[address appendString: email];
url = [NSString stringWithFormat: @"%@/Mail/compose?mailto=%@",
[self userFolderPath], address];
}
@@ -680,13 +680,25 @@
NSString *objectId, *method, *uri;
id <WOActionResults> result;
SOGoContactGCSFolder *co;
SoSecurityManager *sm;
co = [self clientObject];
objectId = [co globallyUniqueObjectId];
if ([objectId length] > 0)
{
method = [NSString stringWithFormat:@"%@/%@.vcf/editAsContact",
[co soURL], objectId];
sm = [SoSecurityManager sharedSecurityManager];
if (![sm validatePermission: SoPerm_AddDocumentsImagesAndFiles
onObject: co
inContext: context])
{
method = [NSString stringWithFormat: @"%@/%@.vcf/editAsContact",
[co soURL], objectId];
}
else
{
method = [NSString stringWithFormat: @"%@/Contacts/personal/%@.vcf/editAsContact",
[self userFolderPath], objectId];
}
uri = [self completeHrefForMethod: method];
result = [self redirectToLocation: uri];
}
+2 -2
View File
@@ -73,7 +73,7 @@
pageName = "UIxContactsListView";
};
newcontact = {
protectedBy = "Add Documents, Images, and Files";
protectedBy = "<public>";
pageName = "UIxContactEditor";
actionName = "new";
};
@@ -111,7 +111,7 @@
protectedBy = "<public>";
pageName = "UIxContactsListView";
};
new = {
newcontact = {
protectedBy = "<public>";
pageName = "UIxContactEditor";
actionName = "new";
+3 -2
View File
@@ -34,7 +34,8 @@ function newEvent(sender, type) {
var roles = folder.readAttribute("roles");
if (roles) {
roles = roles.split(",")
if ($(roles).indexOf("PublicModifier") < 0)
if ($(roles).indexOf("Owner") < 0 &&
$(roles).indexOf("PublicModifier") < 0)
folderID = "/personal";
}
var urlstr = ApplicationBaseURL + folderID + "/new" + type;
@@ -44,7 +45,7 @@ function newEvent(sender, type) {
if (hour)
params.push("hm=" + hour);
if (params.length > 0)
urlstr += "?" + params.join("&");
urlstr += "?" + params.join("&"); log("newEvent: " + urlstr);
window.open(urlstr, "", "width=490,height=470,resizable=0");
return false; /* stop following the link */