]> err.no Git - scalable-opengroupware.org/commitdiff
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@224 d1b88da0-ebda-0310-925b-ed51d...
authorhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Sun, 15 Aug 2004 14:55:58 +0000 (14:55 +0000)
committerhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Sun, 15 Aug 2004 14:55:58 +0000 (14:55 +0000)
SOGo/UI/Scheduler/ChangeLog
SOGo/UI/Scheduler/UIxAppointmentEditor.m
SOGo/UI/Scheduler/UIxAppointmentProposal.m
SOGo/UI/Scheduler/UIxAppointmentProposal.wox
SOGo/UI/Scheduler/Version

index 78c3f490654f29beda1e698cf48a1c98a9df8ea5..cf61cebf95e7abec64da9e1f9ac2afa65434147c 100644 (file)
@@ -1,3 +1,11 @@
+2004-08-15  Helge Hess  <helge.hess@skyrix.com>
+
+       * v0.9.42
+
+       * UIxAppointmentEditor.m: minor cleanups
+
+       * UIxAppointmentProposal.wox: made mockup code dynamic
+
 2004-08-15  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * v0.9.41
index c5f73e5dbb17b7c382e847968b466468fd308c76..83853c860c77e45b687e8ffb267eb7cf292f48e7 100644 (file)
 - (NSString *)icalString; // TODO: this is in NGiCal
 @end
 
-@interface NSObject (AppointmentHack)
+@interface NSObject(AppointmentHack)
 - (BOOL)isAppointment;
 @end
 
-@implementation NSObject (AppointmentHack)
+@implementation NSObject(AppointmentHack)
 - (BOOL)isAppointment {
   return [self isKindOfClass:NSClassFromString(@"SOGoAppointmentObject")];
 }
 - (id)saveAction {
   SOGoAppointment *apt;
   NSString       *iCalString;
-  NSString       *summary, *location, *uri;
+  NSString       *uri;
   NSCalendarDate *sd, *ed;
   NSArray        *attendees;
   WORequest      *req;
   [apt setStartDate:sd];
   [apt setEndDate:ed];
   
-  summary = [req formValueForKey:@"summary"];
-  [apt setSummary:summary];
-  location = [req formValueForKey:@"location"];
-  [apt setLocation:location];
-
-  [apt removeAllAttendees]; /* clean up */
+  [apt setSummary:[req formValueForKey:@"summary"]];
+  [apt setLocation:[req formValueForKey:@"location"]];
+  
   attendees = [self getICalPersonsFromFormValues:
                      [req formValuesForKey:@"participants"]
                    treatAsResource:NO];
-  [apt appendAttendees:attendees];
+  [apt setAttendees:attendees];
   attendees = [self getICalPersonsFromFormValues:
                      [req formValuesForKey:@"resources"]
                    treatAsResource:YES];
index a1ea38c08b2866d2a6bb34efc8a39a239ae97154..9e7c86acfa7d705efc248a0fabfdaacadf09a115 100644 (file)
@@ -24,6 +24,8 @@
 
 @interface UIxAppointmentProposal : UIxComponent
 {
+  id item;
+  id currentDay;
 }
 
 @end
 #include "common.h"
 
 @implementation UIxAppointmentProposal
+
+/* notifications */
+
+- (void)sleep {
+  [self->currentDay release]; self->currentDay = nil;
+  [self->item       release]; self->item       = nil;
+  [super sleep];
+}
+
+/* accessors */
+
+- (void)setItem:(id)_item {
+  ASSIGN(self->item, _item);
+}
+- (id)item {
+  return self->item;
+}
+
+- (void)setCurrentDay:(id)_day {
+  ASSIGN(self->currentDay, _day);
+}
+- (id)currentDay {
+  return self->currentDay;
+}
+
+- (NSArray *)hours {
+  // TODO: from 'earliest start' to 'latest endtime'
+  unsigned lStartHour = 9, lEndHour = 17, i;
+  NSMutableArray *ma;
+  
+  ma = [NSMutableArray arrayWithCapacity:lEndHour - lStartHour + 2];
+  for (i = lStartHour; i <= lEndHour; i++)
+    [ma addObject:[NSNumber numberWithInt:i]];
+  return ma;
+}
+
+- (NSArray *)days {
+  // TODO: from startdate to enddate
+  return [NSArray arrayWithObjects:@"2004-08-15", nil];
+}
+
 @end /* UIxAppointmentProposal */
index f2ff902c5e3f9516d1037888a9c387428a349a19..3e94adf23414686ec0f48e1ff836ef116da22a46 100644 (file)
               <tr>
                 <td align="middle" bgcolor="#FFDAAA" 
                     colspan="1" rowspan="2"> </td>
-<!-- TODO: need a CSS style over here -->
-                <td colspan="2" align="middle" bgcolor="#FFDAAA">
-                  <font color="black" size="2" 
-                         face="Arial,Helvetica,Verdana,Geneva,Tahoma">9</font>
-                </td>
-                <td colspan="2" align="middle" bgcolor="#FFDAAA">
-                  <font color="black" size="2" 
-                        face="Arial,Helvetica,Verdana,Geneva,Tahoma">10</font>
-                </td>
-                <td colspan="2" align="middle" bgcolor="#FFDAAA">
-                  <font color="black" size="2" 
-                        face="Arial,Helvetica,Verdana,Geneva,Tahoma">11</font>
-                </td>
-                <td colspan="2" align="middle" bgcolor="#FFDAAA">
-                  <font color="black" size="2" 
-                        face="Arial,Helvetica,Verdana,Geneva,Tahoma">12</font>
-                </td>
-                <td colspan="2" align="middle" bgcolor="#FFDAAA">
-                  <font color="black" size="2" 
-                        face="Arial,Helvetica,Verdana,Geneva,Tahoma">13</font>
-                </td>
-                <td colspan="2" align="middle" bgcolor="#FFDAAA">
-                  <font color="black" size="2" 
-                        face="Arial,Helvetica,Verdana,Geneva,Tahoma">14</font>
-                </td>
-                <td colspan="2" align="middle" bgcolor="#FFDAAA">
-                  <font color="black" size="2" 
-                        face="Arial,Helvetica,Verdana,Geneva,Tahoma">15</font>
-                </td>
-                <td colspan="2" align="middle" bgcolor="#FFDAAA">
-                  <font color="black" size="2" 
-                        face="Arial,Helvetica,Verdana,Geneva,Tahoma">16</font>
-                </td>
-                <td colspan="2" align="middle" bgcolor="#FFDAAA">
-                  <font color="black" size="2" 
-                        face="Arial,Helvetica,Verdana,Geneva,Tahoma">17</font>
-                </td>
+                <var:foreach list="hours" item="item">
+                  <td colspan="2" align="middle" bgcolor="#FFDAAA">
+                    <font color="black" size="2" 
+                          face="Arial,Helvetica,Verdana,Geneva,Tahoma"
+                    ><var:string value="item"/></font>
+                  </td>
+                </var:foreach>
               </tr>
               <tr>
-                <td colspan="1" align="middle" bgcolor="#FFDAAA">
-                  <font color="black" size="2" 
-                        face="Arial,Helvetica,Verdana,Geneva,Tahoma">00</font>
-                </td>
-                <td colspan="1" align="middle" bgcolor="#FFDAAA">
-                  <font color="black" size="2" 
-                        face="Arial,Helvetica,Verdana,Geneva,Tahoma">30</font>
-                </td>
-                <td colspan="1" align="middle" bgcolor="#FFDAAA">
-                  <font color="black" size="2" 
-                        face="Arial,Helvetica,Verdana,Geneva,Tahoma">00</font>
-                </td>
-                <td colspan="1" align="middle" bgcolor="#FFDAAA">
-                  <font color="black" size="2" 
-                        face="Arial,Helvetica,Verdana,Geneva,Tahoma">30</font>
-                </td>
-                <td colspan="1" align="middle" bgcolor="#FFDAAA">
-                  <font color="black" size="2" 
-                        face="Arial,Helvetica,Verdana,Geneva,Tahoma">00</font>
-                </td>
-                <td colspan="1" align="middle" bgcolor="#FFDAAA">
-                  <font color="black" size="2" 
-                        face="Arial,Helvetica,Verdana,Geneva,Tahoma">30</font>
-                </td>
-                <td colspan="1" align="middle" bgcolor="#FFDAAA">
-                  <font color="black" size="2" 
-                        face="Arial,Helvetica,Verdana,Geneva,Tahoma">00</font>
-                </td>
-                <td colspan="1" align="middle" bgcolor="#FFDAAA">
-                  <font color="black" size="2" 
-                        face="Arial,Helvetica,Verdana,Geneva,Tahoma">30</font>
-                </td>
-                <td colspan="1" align="middle" bgcolor="#FFDAAA">
-                  <font color="black" size="2" 
-                        face="Arial,Helvetica,Verdana,Geneva,Tahoma">00</font>
-                </td>
-                <td colspan="1" align="middle" bgcolor="#FFDAAA">
-                  <font color="black" size="2" 
-                        face="Arial,Helvetica,Verdana,Geneva,Tahoma">30</font>
-                </td>
-                <td colspan="1" align="middle" bgcolor="#FFDAAA">
-                  <font color="black" size="2" 
-                        face="Arial,Helvetica,Verdana,Geneva,Tahoma">00</font>
-                </td>
-                <td colspan="1" align="middle" bgcolor="#FFDAAA">
-                  <font color="black" size="2" 
-                        face="Arial,Helvetica,Verdana,Geneva,Tahoma">30</font>
-                </td>
-                <td colspan="1" align="middle" bgcolor="#FFDAAA">
-                  <font color="black" size="2" 
-                        face="Arial,Helvetica,Verdana,Geneva,Tahoma">00</font>
-                </td>
-                <td colspan="1" align="middle" bgcolor="#FFDAAA">
-                  <font color="black" size="2" 
-                        face="Arial,Helvetica,Verdana,Geneva,Tahoma">30</font>
-                </td>
-                <td colspan="1" align="middle" bgcolor="#FFDAAA">
-                  <font color="black" size="2" 
-                        face="Arial,Helvetica,Verdana,Geneva,Tahoma">00</font>
-                </td>
-                <td colspan="1" align="middle" bgcolor="#FFDAAA">
-                  <font color="black" size="2" 
-                        face="Arial,Helvetica,Verdana,Geneva,Tahoma">30</font>
-                </td>
-                <td colspan="1" align="middle" bgcolor="#FFDAAA">
-                  <font color="black" size="2" 
-                        face="Arial,Helvetica,Verdana,Geneva,Tahoma">00</font>
-                </td>
-                <td colspan="1" align="middle" bgcolor="#FFDAAA">
-                  <font color="black" size="2" 
+                <var:foreach list="hours" item="item">
+                  <td colspan="1" align="middle" bgcolor="#FFDAAA">
+                    <font color="black" size="2" 
+                       face="Arial,Helvetica,Verdana,Geneva,Tahoma">00</font>
+                  </td>
+                  <td colspan="1" align="middle" bgcolor="#FFDAAA">
+                    <font color="black" size="2" 
                         face="Arial,Helvetica,Verdana,Geneva,Tahoma">30</font>
-                </td>
-              </tr>
-              <tr>
-                <td width="15%" align="middle" bgcolor="#FFDAAA" colspan="1">
-                  <font color="black" size="2" 
-                        face="Arial,Helvetica,Verdana,Geneva,Tahoma"
-                        >2004-08-15</font>
-                </td>
-                <td align="left" bgcolor="#FAE8B8" colspan="1" valign="top">
-                  <a href="#"><img src="/OpenGroupware.woa/WebServerResources/English.lproj/green_corner.gif" alt="new" border="0" /></a>
-                </td>
-                <td align="left" bgcolor="#FAE8B8" colspan="1" valign="top">
-                  <a href="#"><img src="/OpenGroupware.woa/WebServerResources/English.lproj/green_corner.gif" alt="new" border="0" /></a>
-                </td>
-                <td align="left" bgcolor="#FAE8B8" colspan="1" valign="top">
-                  <a href="#"><img src="/OpenGroupware.woa/WebServerResources/English.lproj/green_corner.gif" alt="new" border="0" /></a>
-                </td>
-                <td align="left" bgcolor="#FAE8B8" colspan="1" valign="top">
-                  <a href="#"><img src="/OpenGroupware.woa/WebServerResources/English.lproj/green_corner.gif" alt="new" border="0" /></a>
-                </td>
-                <td align="left" bgcolor="#FAE8B8" colspan="1" valign="top">
-                  <a href="#"><img src="/OpenGroupware.woa/WebServerResources/English.lproj/green_corner.gif" alt="new" border="0" /></a>
-                </td>
-                <td align="left" bgcolor="#FAE8B8" colspan="1" valign="top">
-                  <a href="#"><img src="/OpenGroupware.woa/WebServerResources/English.lproj/green_corner.gif" alt="new" border="0" /></a>
-                </td>
-                <td align="left" bgcolor="#FAE8B8" colspan="1" valign="top">
-                  <a href="#"><img src="/OpenGroupware.woa/WebServerResources/English.lproj/green_corner.gif" alt="new" border="0" /></a>
-                </td>
-                <td align="left" bgcolor="#FAE8B8" colspan="1" valign="top">
-                  <a href="#"><img src="/OpenGroupware.woa/WebServerResources/English.lproj/green_corner.gif" alt="new" border="0" /></a>
-                </td>
-                <td align="left" bgcolor="#FAE8B8" colspan="1" valign="top">
-                  <a href="#"><img src="/OpenGroupware.woa/WebServerResources/English.lproj/green_corner.gif" alt="new" border="0" /></a>
-                </td>
-                <td align="left" bgcolor="#FAE8B8" colspan="1" valign="top">
-                  <a href="#"><img src="/OpenGroupware.woa/WebServerResources/English.lproj/green_corner.gif" alt="new" border="0" /></a>
-                </td>
-                <td align="left" bgcolor="#FAE8B8" colspan="1" valign="top">
-                  <a href="#"><img src="/OpenGroupware.woa/WebServerResources/English.lproj/green_corner.gif" alt="new" border="0" /></a>
-                </td>
-                <td align="left" bgcolor="#FAE8B8" colspan="1" valign="top">
-                  <a href="#"><img src="/OpenGroupware.woa/WebServerResources/English.lproj/green_corner.gif" alt="new" border="0" /></a>
-                </td>
-                <td align="left" bgcolor="#FAE8B8" colspan="1" valign="top">
-                  <a href="#"><img src="/OpenGroupware.woa/WebServerResources/English.lproj/green_corner.gif" alt="new" border="0" /></a>
-                </td>
-                <td align="left" bgcolor="#FAE8B8" colspan="1" valign="top">
-                  <a href="#"><img src="/OpenGroupware.woa/WebServerResources/English.lproj/green_corner.gif" alt="new" border="0" /></a>
-                </td>
-                <td align="left" bgcolor="#FAE8B8" colspan="1" valign="top">
-                  <a href="#"><img src="/OpenGroupware.woa/WebServerResources/English.lproj/green_corner.gif" alt="new" border="0" /></a>
-                </td>
-                <td align="left" bgcolor="#FAE8B8" colspan="1" valign="top">
-                  <a href="#"><img src="/OpenGroupware.woa/WebServerResources/English.lproj/green_corner.gif" alt="new" border="0" /></a>
-                </td>
-                <td align="left" bgcolor="#FAE8B8" colspan="1" valign="top">
-                  <a href="#"><img src="/OpenGroupware.woa/WebServerResources/English.lproj/green_corner.gif" alt="new" border="0" /></a>
-                </td>
-                <td align="middle" bgcolor="#FFAAAA" 
-                    colspan="1" valign="middle"> </td>
+                  </td>
+                </var:foreach>
               </tr>
+              <var:foreach list="days" item="currentDay">
+                <tr>
+                  <td width="15%" align="middle" bgcolor="#FFDAAA" colspan="1">
+                    <font color="black" size="2" 
+                          face="Arial,Helvetica,Verdana,Geneva,Tahoma"
+                          ><var:string value="currentDay" /></font>
+                  </td>
+                  <var:foreach list="hours" item="item">
+                    <td align="left" bgcolor="#FAE8B8" valign="top">
+                      <a href="#"><img src="/OpenGroupware.woa/WebServerResources/English.lproj/green_corner.gif" alt="new" border="0" /></a>
+                    </td>
+                    <td align="middle" bgcolor="#FFAAAA" valign="middle"> </td>
+                  </var:foreach>
+                </tr>
+              </var:foreach>
             </table>
           </uix:tab>
         </uix:tabview>
index ca2e726900144cefd1f28e49ab734b2858817412..26001ebee4b5c4114cc6bfed17d6c89e45fdb896 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 
-SUBMINOR_VERSION:=41
+SUBMINOR_VERSION:=42
 
 # v0.9.41 requires libNGObjWeb     v4.2.431
 # v0.9.31 requires libWEExtensions v4.2.52