]> err.no Git - scalable-opengroupware.org/commitdiff
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1078 d1b88da0-ebda-0310...
authorwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Wed, 6 Jun 2007 01:35:30 +0000 (01:35 +0000)
committerwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Wed, 6 Jun 2007 01:35:30 +0000 (01:35 +0000)
ChangeLog
SoObjects/Appointments/SOGoAppointmentObject.m
SoObjects/Appointments/SOGoCalendarComponent.m
SoObjects/SOGo/NSString+Utilities.m
SoObjects/SOGo/SOGoObject.m
UI/Scheduler/UIxComponentEditor.m
UI/WebServerResources/SchedulerUI.js
UI/WebServerResources/generic.css

index 415c50a45c9bae0e70825115142c23ad62853247..6ded5d6109aac256592e0b4cc9cd0016168f567c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2007-06-05  Wolfgang Sourdeau  <wsourdeau@inverse.ca>
 
+       * 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
index 37a7301afcb9e6f9c58eb6f603f7f55d9ce505cc..1b7a673ea5f35e2d9d6879fb8bd27b7f2fbe5547 100644 (file)
      - send iMIP mail for all folders not found
   */
   iCalEvent *apt;
-  NSArray *removedUIDs;
-  NSMutableArray *attendees;
+  NSMutableArray *attendees, *removedUIDs;
 
   /* load existing content */
 
 //     // TODO
 //   }
   
-  removedUIDs = [self attendeeUIDsFromAppointment:apt];
+  removedUIDs = [NSMutableArray arrayWithArray:
+                                 [self attendeeUIDsFromAppointment: apt]];
+  if (![removedUIDs containsObject: owner])
+    [removedUIDs addObject: owner];
 
   if ([self sendEMailNotifications])
     {
index 15242ccf9771446fbad40c24af9c976d30e461e0..f07444838f240165950a7a5eada7c64668b5fa0e 100644 (file)
@@ -613,8 +613,6 @@ static BOOL sendEMailNotifications = NO;
       else if ([roles containsObject: SOGoRole_ObjectCreator])
        [roles addObject: SOGoCalendarRole_Organizer];
     }
-
-  NSLog (@"all roles: %@" , roles);
 //     }
 
   return roles;
index b689ef8509dcbd28df77cae1982bcfd2fa9079fa..640c057d6d39cdc9f2f97c2c51eac6cbd7232e6b 100644 (file)
@@ -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;
index 33d660174584446769bbd4ff5faf338c7221eb08..8691beff0c08a5dee51f85190cd82831657ed28c 100644 (file)
@@ -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])
index 7f7397c91d44efc0c40a9554f881b61b21b5e520..d81be97153a3106e39ee79ee9b5d0c11e91c23ff 100644 (file)
 {
   SOGoCalendarComponent *clientObject;
   NSString *toolbarFilename;
+  iCalPerson *participant;
   iCalPersonPartStat participationStatus;
   SoSecurityManager *sm;
   NSString *owner;
   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)
       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";
 
index 42738a712df5ccf8ab76c8ca4dc03f6316ab109f..5ca05b1820d19e9562698821705b0f5903c4e5b4 100644 (file)
@@ -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) {
index fc63f218da6057752b6664af233c4a5ce1145112..33953e89b2024368f55d606b6d9db8521a4d43ed 100644 (file)
@@ -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; }