From 031779e4e9b022ed247d6964f47941e76471d44b Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 5 Jun 2007 18:07:08 +0000 Subject: [PATCH] Monotone-Parent: d5a35d507386b7213ff2f2e4f5f37c9c22f0c2ae Monotone-Revision: a11424d99fd81b4c47bf7609d4e4e9ec4e1b0ab2 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-06-05T18:07:08 Monotone-Branch: ca.inverse.sogo --- UI/Scheduler/UIxComponentEditor.m | 33 +++++++++++++++------------- UI/WebServerResources/SchedulerUI.js | 29 ++++++++++++------------ UI/WebServerResources/generic.css | 10 ++------- 3 files changed, 34 insertions(+), 38 deletions(-) diff --git a/UI/Scheduler/UIxComponentEditor.m b/UI/Scheduler/UIxComponentEditor.m index 7f7397c91..d81be9715 100644 --- a/UI/Scheduler/UIxComponentEditor.m +++ b/UI/Scheduler/UIxComponentEditor.m @@ -849,6 +849,7 @@ { SOGoCalendarComponent *clientObject; NSString *toolbarFilename; + iCalPerson *participant; iCalPersonPartStat participationStatus; SoSecurityManager *sm; NSString *owner; @@ -856,23 +857,16 @@ sm = [SoSecurityManager sharedSecurityManager]; clientObject = [self clientObject]; - if (![sm validatePermission: SOGoCalendarPerm_ModifyComponent - onObject: clientObject - inContext: context]) - { - if ([[clientObject componentTag] isEqualToString: @"vevent"]) - toolbarFilename = @"SOGoAppointmentObject.toolbar"; - else - toolbarFilename = @"SOGoTaskObject.toolbar"; - } - else if (![sm validatePermission: SOGoCalendarPerm_RespondToComponent - onObject: clientObject - inContext: context]) + owner = [clientObject ownerInContext: context]; + participant = [clientObject findParticipantWithUID: owner]; + + if (participant + && ![sm validatePermission: SOGoCalendarPerm_RespondToComponent + onObject: clientObject + inContext: context]) { + participationStatus = [participant participationStatus]; /* Lightning does not manage participation status within tasks */ - owner = [clientObject ownerInContext: context]; - participationStatus - = [[clientObject findParticipantWithUID: owner] participationStatus]; if (participationStatus == iCalPersonPartStatAccepted) toolbarFilename = @"SOGoAppointmentObjectDecline.toolbar"; else if (participationStatus == iCalPersonPartStatDeclined) @@ -880,6 +874,15 @@ else 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 toolbarFilename = @"SOGoComponentClose.toolbar"; diff --git a/UI/WebServerResources/SchedulerUI.js b/UI/WebServerResources/SchedulerUI.js index 42738a712..44e0235af 100644 --- a/UI/WebServerResources/SchedulerUI.js +++ b/UI/WebServerResources/SchedulerUI.js @@ -172,22 +172,21 @@ function closeInvitationWindow() { } function modifyEventCallback(http) { - if (http.readyState == 4) { - if (http.status == 200) { - log("closing window...?"); - if (queryParameters["mail-invitation"] == "yes") - closeInvitationWindow(); - else { - window.opener.setTimeout("refreshAppointmentsAndDisplay();", 100); - window.setTimeout("window.close();", 100); + if (http.readyState == 4) { + if (http.status == 200) { + if (queryParameters["mail-invitation"].toLowerCase() == "yes") + closeInvitationWindow(); + else { + window.opener.setTimeout("refreshAppointmentsAndDisplay();", 100); + window.setTimeout("window.close();", 100); + } } - } - else { - log("showing alert..."); - window.alert(labels["eventPartStatModificationError"]); - } - document.modifyEventAjaxRequest = null; - } + else { + log("showing alert..."); + window.alert(labels["eventPartStatModificationError"]); + } + document.modifyEventAjaxRequest = null; + } } function deleteEventCallback(http) { diff --git a/UI/WebServerResources/generic.css b/UI/WebServerResources/generic.css index fc63f218d..c7281290f 100644 --- a/UI/WebServerResources/generic.css +++ b/UI/WebServerResources/generic.css @@ -485,7 +485,7 @@ INPUT#searchValue DIV.javascriptPopupBackground { position: absolute; - background-color: #999; + background-color: #d4d0c8; -moz-opacity: 0.6; opacity: 0.6; filter: alpha(opacity=60); @@ -513,7 +513,7 @@ DIV.javascriptMessagePseudoWindow opacity: 1.0; filter: alpha(opacity=100); color: #000; - background-color: #dedede; } + background-color: #d4d0c8; } DIV.noJavascriptErrorMessage { top: 10em; @@ -524,10 +524,6 @@ DIV.noJavascriptErrorMessage A { float: right; margin: 0px auto; } -A.button:hover -{ color: inherit; - background: #efebe7; } - INPUT.button:active, A.button:active { color: -moz-buttonhovertext; @@ -539,7 +535,6 @@ A.button:active INPUT.button, A.button, -A[class~="_disabled"].button:hover, A[class~="_disabled"].button:active { cursor: default; padding: 1px .5em; @@ -559,7 +554,6 @@ A.button IMG { vertical-align: middle; } A[class~="_disabled"].button, -A[class~="_disabled"].button:hover, A[class~="_disabled"].button:active { color: #999; background: inherit; }