Monotone-Parent: d5a35d507386b7213ff2f2e4f5f37c9c22f0c2ae

Monotone-Revision: a11424d99fd81b4c47bf7609d4e4e9ec4e1b0ab2

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-06-05T18:07:08
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau 2007-06-05 18:07:08 +00:00
parent b71c015193
commit 031779e4e9
3 changed files with 34 additions and 38 deletions

View file

@ -849,6 +849,7 @@
{ {
SOGoCalendarComponent *clientObject; SOGoCalendarComponent *clientObject;
NSString *toolbarFilename; NSString *toolbarFilename;
iCalPerson *participant;
iCalPersonPartStat participationStatus; iCalPersonPartStat participationStatus;
SoSecurityManager *sm; SoSecurityManager *sm;
NSString *owner; NSString *owner;
@ -856,23 +857,16 @@
sm = [SoSecurityManager sharedSecurityManager]; sm = [SoSecurityManager sharedSecurityManager];
clientObject = [self clientObject]; clientObject = [self clientObject];
if (![sm validatePermission: SOGoCalendarPerm_ModifyComponent owner = [clientObject ownerInContext: context];
onObject: clientObject participant = [clientObject findParticipantWithUID: owner];
inContext: context])
{ if (participant
if ([[clientObject componentTag] isEqualToString: @"vevent"]) && ![sm validatePermission: SOGoCalendarPerm_RespondToComponent
toolbarFilename = @"SOGoAppointmentObject.toolbar"; onObject: clientObject
else inContext: context])
toolbarFilename = @"SOGoTaskObject.toolbar";
}
else if (![sm validatePermission: SOGoCalendarPerm_RespondToComponent
onObject: clientObject
inContext: context])
{ {
participationStatus = [participant participationStatus];
/* Lightning does not manage participation status within tasks */ /* Lightning does not manage participation status within tasks */
owner = [clientObject ownerInContext: context];
participationStatus
= [[clientObject findParticipantWithUID: owner] participationStatus];
if (participationStatus == iCalPersonPartStatAccepted) if (participationStatus == iCalPersonPartStatAccepted)
toolbarFilename = @"SOGoAppointmentObjectDecline.toolbar"; toolbarFilename = @"SOGoAppointmentObjectDecline.toolbar";
else if (participationStatus == iCalPersonPartStatDeclined) else if (participationStatus == iCalPersonPartStatDeclined)
@ -880,6 +874,15 @@
else else
toolbarFilename = @"SOGoAppointmentObjectAcceptOrDecline.toolbar"; toolbarFilename = @"SOGoAppointmentObjectAcceptOrDecline.toolbar";
} }
else if (![sm validatePermission: SOGoCalendarPerm_ModifyComponent
onObject: clientObject
inContext: context])
{
if ([[clientObject componentTag] isEqualToString: @"vevent"])
toolbarFilename = @"SOGoAppointmentObject.toolbar";
else
toolbarFilename = @"SOGoTaskObject.toolbar";
}
else else
toolbarFilename = @"SOGoComponentClose.toolbar"; toolbarFilename = @"SOGoComponentClose.toolbar";

View file

@ -172,22 +172,21 @@ function closeInvitationWindow() {
} }
function modifyEventCallback(http) { function modifyEventCallback(http) {
if (http.readyState == 4) { if (http.readyState == 4) {
if (http.status == 200) { if (http.status == 200) {
log("closing window...?"); if (queryParameters["mail-invitation"].toLowerCase() == "yes")
if (queryParameters["mail-invitation"] == "yes") closeInvitationWindow();
closeInvitationWindow(); else {
else { window.opener.setTimeout("refreshAppointmentsAndDisplay();", 100);
window.opener.setTimeout("refreshAppointmentsAndDisplay();", 100); window.setTimeout("window.close();", 100);
window.setTimeout("window.close();", 100); }
} }
} else {
else { log("showing alert...");
log("showing alert..."); window.alert(labels["eventPartStatModificationError"]);
window.alert(labels["eventPartStatModificationError"]); }
} document.modifyEventAjaxRequest = null;
document.modifyEventAjaxRequest = null; }
}
} }
function deleteEventCallback(http) { function deleteEventCallback(http) {

View file

@ -485,7 +485,7 @@ INPUT#searchValue
DIV.javascriptPopupBackground DIV.javascriptPopupBackground
{ position: absolute; { position: absolute;
background-color: #999; background-color: #d4d0c8;
-moz-opacity: 0.6; -moz-opacity: 0.6;
opacity: 0.6; opacity: 0.6;
filter: alpha(opacity=60); filter: alpha(opacity=60);
@ -513,7 +513,7 @@ DIV.javascriptMessagePseudoWindow
opacity: 1.0; opacity: 1.0;
filter: alpha(opacity=100); filter: alpha(opacity=100);
color: #000; color: #000;
background-color: #dedede; } background-color: #d4d0c8; }
DIV.noJavascriptErrorMessage DIV.noJavascriptErrorMessage
{ top: 10em; { top: 10em;
@ -524,10 +524,6 @@ DIV.noJavascriptErrorMessage A
{ float: right; { float: right;
margin: 0px auto; } margin: 0px auto; }
A.button:hover
{ color: inherit;
background: #efebe7; }
INPUT.button:active, INPUT.button:active,
A.button:active A.button:active
{ color: -moz-buttonhovertext; { color: -moz-buttonhovertext;
@ -539,7 +535,6 @@ A.button:active
INPUT.button, INPUT.button,
A.button, A.button,
A[class~="_disabled"].button:hover,
A[class~="_disabled"].button:active A[class~="_disabled"].button:active
{ cursor: default; { cursor: default;
padding: 1px .5em; padding: 1px .5em;
@ -559,7 +554,6 @@ A.button IMG
{ vertical-align: middle; } { vertical-align: middle; }
A[class~="_disabled"].button, A[class~="_disabled"].button,
A[class~="_disabled"].button:hover,
A[class~="_disabled"].button:active A[class~="_disabled"].button:active
{ color: #999; { color: #999;
background: inherit; } background: inherit; }