]> err.no Git - scalable-opengroupware.org/commitdiff
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1009 d1b88da0-ebda-0310...
authorwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Thu, 4 Jan 2007 22:35:40 +0000 (22:35 +0000)
committerwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Thu, 4 Jan 2007 22:35:40 +0000 (22:35 +0000)
ChangeLog
SoObjects/Appointments/SOGoAptMailNotification.m
SoObjects/SOGo/SOGoObject.m
SoObjects/SOGo/SOGoUserFolder.m
UI/Scheduler/English.lproj/Localizable.strings
UI/Scheduler/French.lproj/Localizable.strings
UI/Scheduler/UIxComponentEditor.m
UI/Templates/UIxPageFrame.wox
UI/WebServerResources/SchedulerUI.js
UI/WebServerResources/generic.css

index 8763230a1090645332b14a6d88549ef5b61aff98..342b26bcc69e348bb730afb989d846d5c13ad882 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2007-01-04  Wolfgang Sourdeau  <wsourdeau@inverse.ca>
 
+       * UI/Scheduler/UIxComponentEditor.m ([UIxComponentEditor
+       -newStartDate]): fix the handling of the component start date
+       depending on the "hm" and the "day" parameters.
+
+       * SoObjects/SOGo/SOGoUserFolder.m ([SOGoUserFolder
+       -roleOfUser:uidinContext:context]): set role of current user to
+       "Assistant" if the object that is accessed is "freebusy.ifb".
+
        * SoObjects/Appointments/SOGoAppointmentFolder.m
        ([SOGoAppointmentFolder -lookupCalendarFolderForUID:uid]): method
        moved from UI/Scheduler/UIxCalView:calendarFolderForUID:.
index bba1ef46ce4be13bbf6487e153df49b97f93d11f..98a9d74b8438a2da3bcb4d6921061bc76426af94 100644 (file)
@@ -82,7 +82,7 @@ static NSTimeZone     *EST = nil;
   NSString *aptUID;
   
   aptUID = [[self newApt] uid];
-  return [NSString stringWithFormat:@"%@/Calendar/%@/view?tab=participants",
+  return [NSString stringWithFormat:@"%@/Calendar/%@/edit?mail-invitation=yes",
                                     [self homePageURL],
                                     aptUID];
 }
index ca66dff60de995d7e18f7031636e70d338aec26b..cf8f8843a75d02bad312b7673ab577a43f6c7774 100644 (file)
@@ -97,6 +97,7 @@
 
   return davPermissions;
 }
+
 - (NSArray *) DAVPermissionsForRole: (NSString *) role
 {
   return [self DAVPermissionsForRoles: [NSArray arrayWithObject: role]];
index 85b084927353fb63c4839fa114a6cc436fdd83f8..5f4cb3a377b7e6feaf6bb2cb052b12b83beddb46 100644 (file)
   return obj;
 }
 
+/* FIXME: here is a vault of hackish ways to gain access to subobjects by
+   granting ro access to the homepage depending on the subobject in question.
+   This is wrong and dangerous. */
 - (NSString *) roleOfUser: (NSString *) uid
                 inContext: (WOContext *) context
 {
               || [roles containsObject: SOGoRole_Delegate])
             role = SOGoRole_Assistant;
         }
+      else if ([objectName isEqualToString: @"freebusy.ifb"])
+        role = SOGoRole_Assistant;
     }
 
   return role;
index 73a973c3f5f4819c269405b55c53585ee359c75c..b0a25c0ff32647cd041f247ceb3affc15534ceee 100644 (file)
@@ -301,3 +301,5 @@ validate_endbeforestart    = "Enddate is before startdate!";
 "Next slot" = "Next slot";
 "Previous hour" = "Previous hour";
 "Next hour" = "Next hour";
+
+"closeThisWindowMessage" = "Thank you! You may now close this window.";
index a3da6c649ab42bd2f6f85b0cc1cc9bb5bb6d1f85..6f24256c0b3faaa237b9ac1b0f25aaf84eeae2e4 100644 (file)
@@ -317,3 +317,5 @@ validate_endbeforestart    = "La date de fin est avant la date de début !";
 "Next slot" = "Période suivante";
 "Previous hour" = "Heure précédente";
 "Next hour" = "Heure suivante";
+
+"closeThisWindowMessage" = "Merci! Vous pouvez maintenant fermer cette fenêtre.";
index 689053f6bd62d7a394614a87c7953538faa4a704..2b958f1aa428e68ee93faf1237ea157077ea19c7 100644 (file)
     {
       now = [NSCalendarDate calendarDate];
       [now setTimeZone: [[self clientObject] userTimeZone]];
-      if (!([[now hour: 8 minute: 0] earlierDate: newStartDate] == newStartDate))
+      if ([now isDateOnSameDay: newStartDate])
         {
           hour = [now hourOfDay];
           if (hour < 8)
           else
             newStartDate = now;
         }
+      else
+        newStartDate = [newStartDate hour: 8 minute: 0];
     }
 
   return newStartDate;
index ed9460fe57d6ec6f74a1c4a4633968fcbe1e6c38..ecb5331345ceaef199d221a8593669d69df97b7c 100644 (file)
@@ -84,9 +84,9 @@
             ><var:component-content
               /></div>
           <noscript>
-            <div id="noJavascriptError">
+            <div class="javascriptPopupBackground">
             </div>
-            <div class="noJavascriptErrorMessage">
+            <div class="javascriptMessagePseudoWindow noJavascriptErrorMessage">
               <var:string label:value="noJavascriptError"
                 /><br /><br
                 /><a class="button" var:href="page.context.uri"
index 7b0da8922a10745a03f5582d2fc51ce1998d03fd..f7ca749e1c687de2604c8d38c7654653a1e61d4b 100644 (file)
@@ -126,11 +126,27 @@ function modifyEvent(sender, modification) {
   return false;
 }
 
+function closeInvitationWindow() {
+  var closeDiv = document.createElement("div");
+  closeDiv.addClassName("javascriptPopupBackground");
+  var closePseudoWin = document.createElement("div");
+  closePseudoWin.addClassName("javascriptMessagePseudoWindow");
+  closePseudoWin.style.top = "0px;";
+  closePseudoWin.style.left = "0px;";
+  closePseudoWin.style.right = "0px;";
+  closePseudoWin.appendChild(document.createTextNode(labels["closeThisWindowMessage"].decodeEntities()));
+  document.body.appendChild(closeDiv);
+  document.body.appendChild(closePseudoWin);
+}
+
 function modifyEventCallback(http) {
   if (http.readyState == 4) {
     if (http.status == 200) {
       log("closing window...?");
-      window.close();
+      if (queryParameters["mail-invitation"] == "yes")
+        closeInvitationWindow();
+      else
+        window.close();
     }
     else {
       log("showing alert...");
index 1e8bb44107b84c6f79ddffb57466c3c45a5a821c..81961292033dc4faeed85c46a0a8f45cd8992b95 100644 (file)
@@ -646,7 +646,7 @@ INPUT#searchValue
   background-position: 2px 2px;
   color: #aaa; }
 
-DIV#noJavascriptError
+DIV.javascriptPopupBackground
 { position: absolute;
   background: #999;
   -moz-opacity: 0.6; 
@@ -657,7 +657,7 @@ DIV#noJavascriptError
   bottom: 0px;
   text-align: center; }
 
-DIV.noJavascriptErrorMessage
+DIV.javascriptMessagePseudoWindow
 { position: absolute;
   z-index: 2;
   border-top: 2px solid #fffffb;
@@ -669,15 +669,16 @@ DIV.noJavascriptErrorMessage
   -moz-border-bottom-colors: ThreeDDarkShadow ThreeDShadow transparent;
   -moz-border-right-colors: ThreeDDarkShadow ThreeDShadow transparent;
   padding: 1em;
-  top: 10em;
-  left: 17em;
-  width: 24em;
   margin: 0px auto;
-  background: #fff;
   -moz-opacity: 1.0;
   color: #000;
   background: #dedede; }
 
+DIV.noJavascriptErrorMessage
+{ top: 10em;
+  left: 17em;
+  width: 24em; }
+
 DIV.noJavascriptErrorMessage A
 { float: right;
   margin: 0px auto; }