From: wolfgang Date: Wed, 6 Jun 2007 01:35:30 +0000 (+0000) Subject: git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1078 d1b88da0-ebda-0310... X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4743ddf4a280d5d92c36ef34269b25324b06e128;p=scalable-opengroupware.org git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1078 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/ChangeLog b/ChangeLog index 415c50a4..6ded5d61 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2007-06-05 Wolfgang Sourdeau + * SoObjects/Appointments/SOGoAppointmentObject.m: the owner of the + object must be present in the list of UIDs we delete the object + from. Otherwise Calendar objects having no organizer and no + attendees will remain in their owner's Calendar. + * SoObjects/SOGo/SOGoObject.m ([SOGoObject -_urlPreferringParticle:expectedoverThisOne:possible]): remove the first 3 elements of the path array if the url returned by diff --git a/SoObjects/Appointments/SOGoAppointmentObject.m b/SoObjects/Appointments/SOGoAppointmentObject.m index 37a7301a..1b7a673e 100644 --- a/SoObjects/Appointments/SOGoAppointmentObject.m +++ b/SoObjects/Appointments/SOGoAppointmentObject.m @@ -373,8 +373,7 @@ - send iMIP mail for all folders not found */ iCalEvent *apt; - NSArray *removedUIDs; - NSMutableArray *attendees; + NSMutableArray *attendees, *removedUIDs; /* load existing content */ @@ -386,7 +385,10 @@ // // TODO // } - removedUIDs = [self attendeeUIDsFromAppointment:apt]; + removedUIDs = [NSMutableArray arrayWithArray: + [self attendeeUIDsFromAppointment: apt]]; + if (![removedUIDs containsObject: owner]) + [removedUIDs addObject: owner]; if ([self sendEMailNotifications]) { diff --git a/SoObjects/Appointments/SOGoCalendarComponent.m b/SoObjects/Appointments/SOGoCalendarComponent.m index 15242ccf..f0744483 100644 --- a/SoObjects/Appointments/SOGoCalendarComponent.m +++ b/SoObjects/Appointments/SOGoCalendarComponent.m @@ -613,8 +613,6 @@ static BOOL sendEMailNotifications = NO; else if ([roles containsObject: SOGoRole_ObjectCreator]) [roles addObject: SOGoCalendarRole_Organizer]; } - - NSLog (@"all roles: %@" , roles); // } return roles; diff --git a/SoObjects/SOGo/NSString+Utilities.m b/SoObjects/SOGo/NSString+Utilities.m index b689ef85..640c057d 100644 --- a/SoObjects/SOGo/NSString+Utilities.m +++ b/SoObjects/SOGo/NSString+Utilities.m @@ -120,7 +120,7 @@ static NSMutableCharacterSet *urlAfterEndingChars = nil; if (!urlAfterEndingChars) { urlAfterEndingChars = [NSMutableCharacterSet new]; - [urlAfterEndingChars addCharactersInString: @"&;<\t \r\n"]; + [urlAfterEndingChars addCharactersInString: @"()[]{}&;<\t \r\n"]; } start = refRange.location; diff --git a/SoObjects/SOGo/SOGoObject.m b/SoObjects/SOGo/SOGoObject.m index 33d66017..8691beff 100644 --- a/SoObjects/SOGo/SOGoObject.m +++ b/SoObjects/SOGo/SOGoObject.m @@ -830,9 +830,9 @@ static BOOL kontactGroupDAV = YES; @"/"]]; if ([baseURL hasPrefix: @"http"]) { - [path removeObjectAtIndex: 2]; [path removeObjectAtIndex: 1]; [path removeObjectAtIndex: 0]; + [path replaceObjectAtIndex: 0 withObject: @""]; } urlMethod = [path objectAtIndex: 2]; if (![urlMethod isEqualToString: expected]) diff --git a/UI/Scheduler/UIxComponentEditor.m b/UI/Scheduler/UIxComponentEditor.m index 7f7397c9..d81be971 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 42738a71..5ca05b18 100644 --- a/UI/WebServerResources/SchedulerUI.js +++ b/UI/WebServerResources/SchedulerUI.js @@ -162,7 +162,7 @@ function closeInvitationWindow() { var closeDiv = document.createElement("div"); closeDiv.addClassName("javascriptPopupBackground"); var closePseudoWin = document.createElement("div"); - closePseudoWin.addClassName("javascriptMessagePseudoWindow"); + closePseudoWin.addClassName("javascriptMessagePseudoTopWindow"); closePseudoWin.style.top = "0px;"; closePseudoWin.style.left = "0px;"; closePseudoWin.style.right = "0px;"; @@ -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(); + 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 { - window.opener.setTimeout("refreshAppointmentsAndDisplay();", 100); - window.setTimeout("window.close();", 100); + log("showing alert..."); + window.alert(labels["eventPartStatModificationError"]); } - } - else { - log("showing alert..."); - window.alert(labels["eventPartStatModificationError"]); - } - document.modifyEventAjaxRequest = null; - } + document.modifyEventAjaxRequest = null; + } } function deleteEventCallback(http) { diff --git a/UI/WebServerResources/generic.css b/UI/WebServerResources/generic.css index fc63f218..33953e89 100644 --- a/UI/WebServerResources/generic.css +++ b/UI/WebServerResources/generic.css @@ -496,24 +496,32 @@ DIV.javascriptPopupBackground bottom: 0px; text-align: center; } -DIV.javascriptMessagePseudoWindow +DIV.javascriptMessagePseudoWindow, +DIV.javascriptMessagePseudoTopWindow { position: absolute; z-index: 2; - border-top: 2px solid #fff; - border-left: 2px solid #fff; border-bottom: 2px solid #888; - border-right: 2px solid #888; - -moz-border-top-colors: #efebe7 #fff; - -moz-border-left-colors: #efebe7 #fff; -moz-border-bottom-colors: #000 #9c9a94 transparent; - -moz-border-right-colors: #000 #9c9a94 transparent; padding: 1em; margin: 0px auto; -moz-opacity: 1.0; opacity: 1.0; filter: alpha(opacity=100); color: #000; - background-color: #dedede; } + background-color: #d4d0c8; } + +DIV.javascriptMessagePseudoTopWindow +{ border-top: 0px; + border-left: 0px; + border-right: 0px; } + +DIV.javascriptMessagePseudoWindow +{ border-top: 2px solid #fff; + border-left: 2px solid #fff; + border-right: 2px solid #888; + -moz-border-top-colors: #efebe7 #fff; + -moz-border-left-colors: #efebe7 #fff; + -moz-border-right-colors: #000 #9c9a94 transparent; } DIV.noJavascriptErrorMessage { top: 10em; @@ -524,10 +532,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 +543,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 +562,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; }