]> err.no Git - scalable-opengroupware.org/commitdiff
new stuff
authorznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Sun, 15 Aug 2004 21:29:03 +0000 (21:29 +0000)
committerznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Sun, 15 Aug 2004 21:29:03 +0000 (21:29 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@239 d1b88da0-ebda-0310-925b-ed51d893ca5b

SOGo/SOGo.xcode/project.pbxproj
SOGo/UI/Scheduler/ChangeLog
SOGo/UI/Scheduler/English.lproj/default.strings
SOGo/UI/Scheduler/GNUmakefile
SOGo/UI/Scheduler/UIxAppointmentEditor.wox
SOGo/UI/Scheduler/UIxAppointmentProposal.wox
SOGo/UI/Scheduler/UIxDatePicker.m
SOGo/UI/Scheduler/UIxTimeDateControl.m [new file with mode: 0644]
SOGo/UI/Scheduler/UIxTimeDateControl.wox [new file with mode: 0644]
SOGo/UI/Scheduler/UIxTimeSelector.m
SOGo/UI/Scheduler/Version

index e5ce1bda4aa253af839225304fb721c7a7e4f2e6..f3e72ded685aece28962f10e3f44d1f61900066a 100644 (file)
                };
                AD07124006C904DE00A9EEF4 = {
                        children = (
+                               AD73C03606CFDE4500226A2D,
                                AD07123806C904C900A9EEF4,
                        );
                        isa = PBXGroup;
                                AD07124B06C9052700A9EEF4,
                                AD0715CB06CA711600A9EEF4,
                                AD0715CA06CA711600A9EEF4,
+                               AD73C03406CFDE3600226A2D,
+                               AD73C03506CFDE3600226A2D,
                        );
                        isa = PBXGroup;
                        name = Components;
                        children = (
                                AD73BE9406CF969100226A2D,
                                AD73BE9306CF969100226A2D,
-                               AD73BED806CFA0FD00226A2D,
-                               AD73BED706CFA0FD00226A2D,
                                AD73BF6C06CFB4CE00226A2D,
                                AD73BF6B06CFB4CE00226A2D,
+                               AD73C08306CFFEA600226A2D,
+                               AD73C08206CFFEA600226A2D,
+                               AD73BED806CFA0FD00226A2D,
+                               AD73BED706CFA0FD00226A2D,
                        );
                        isa = PBXGroup;
                        name = "Date / Time";
                        refType = 4;
                        sourceTree = "<group>";
                };
+               AD73C03406CFDE3600226A2D = {
+                       fileEncoding = 4;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.objc;
+                       path = AnaisAttendeeSelector.m;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               AD73C03506CFDE3600226A2D = {
+                       fileEncoding = 4;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text.xml;
+                       path = AnaisAttendeeSelector.wox;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               AD73C03606CFDE4500226A2D = {
+                       fileEncoding = 4;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.h;
+                       path = common.h;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               AD73C08206CFFEA600226A2D = {
+                       fileEncoding = 4;
+                       isa = PBXFileReference;
+                       lastKnownFileType = text.xml;
+                       path = UIxTimeDateControl.wox;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
+               AD73C08306CFFEA600226A2D = {
+                       fileEncoding = 4;
+                       isa = PBXFileReference;
+                       lastKnownFileType = sourcecode.c.objc;
+                       path = UIxTimeDateControl.m;
+                       refType = 4;
+                       sourceTree = "<group>";
+               };
                ADCDE53106ADA8AC00BFCE2B = {
                        fileEncoding = 5;
                        isa = PBXFileReference;
index cf042357a4fe4a0476cfd200a2ef0503103cd052..85b7f060031a80e68e52eb9676b453db295632fe 100644 (file)
@@ -1,3 +1,15 @@
+2004-08-15  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * v0.9.49
+
+       * UIxTimeDateControl.[wox,m]: new component.
+
+       * UIxAppointmentProposal.wox: added labels and stuff, work in progress.
+
+       * English.lproj/default.strings: new labels
+
+       * UIxTimeSelector.m, UIxDatePicker.m: correct date bindings.
+
 2004-08-15  Helge Hess  <helge.hess@skyrix.com>
 
        * v0.9.48
index a308c1c04fab93cf1605368925ac56ec90879484..3f0bfe0b1be6c0256c1f3656067a15af76d406eb 100644 (file)
 
 /* Misc */
 
-"new"               = "new";
-"printview"         = "printview";
-"proposal"          = "proposal";
-"Save"              = "Save";
-"Cancel"            = "Cancel";
-"OpenGroupware.org" = "OpenGroupware.org"
-
+"new"                   = "new";
+"printview"             = "printview";
+"proposal"              = "proposal";
+"Save"                  = "Save";
+"Cancel"                = "Cancel";
+"OpenGroupware.org"     = "OpenGroupware.org"
 
 /* Appointments */
 
-"Appointment Editor"    = "Appointment Editor";
+"Appointment editor"    = "Appointment Editor";
+"Appointment proposal"  = "Appointment Proposal";
 "Appointment on"        = "Appointment on";
 "Start time"            = "Start time";
 "End time"              = "End time";
+"Start date"            = "Start date";
+"End date"              = "End date";
+"Earliest start time"   = "Earliest start time";
+"Latest end time"       = "Latest end time";
+"browse start date"     = "browse start date";
+"browse end date"       = "browse end date";
 "Title"                 = "Title";
 "Location"              = "Location";
+"Duration"              = "Duration";
 "Search participants"   = "Search participants";
 "Participants"          = "Participants";
 "Search resources"      = "Search resources";
 "Resources"             = "Resources";
+"Search appointments"   = "Search appointments";
+"Search"                = "Search";
 "Search in Anais"       = "Search in Anaïs";
 
 
index b5e64b4c1af814cc01d9100002339f6a25e072c7..801c76be519029069d88a470a41e8e43cf42d05c 100644 (file)
@@ -45,6 +45,7 @@ SchedulerUI_OBJC_FILES =              \
        UIxDatePicker.m                 \
        UIxDatePickerScript.m           \
        UIxTimeSelector.m               \
+       UIxTimeDateControl.m            \
 
 SchedulerUI_RESOURCE_FILES += \
        Version         \
@@ -74,6 +75,7 @@ SchedulerUI_RESOURCE_FILES +=         \
        UIxDatePicker.wox               \
        UIxDatePickerScript.wox         \
        UIxTimeSelector.wox             \
+       UIxTimeDateControl.wox          \
 
 SchedulerUI_RESOURCE_FILES += \
        images/next_week.gif                    \
index 7167b1e02be8ee60a39945e29e9a39539b1643b3..19d5f132c319e50364a341411bbd979b6340302e 100644 (file)
@@ -15,7 +15,7 @@
             <tr>
               <td width="5"/>
               <td class="window_label">
-                <var:string label:value="Appointment Editor" /></td>
+                <var:string label:value="Appointment editor" /></td>
               <td width="36" align="right" valign="center">
                 <var:component className="UIxWinClose" />
               </td>
               <td align="left" bgcolor="#FFFFF0">
                 <span class="aptview_text">
                   <var:component className="UIxDatePickerScript" />
-                  <var:component className="UIxTimeSelector"
-                                 const:timeID="startTime"
+                  <var:component className="UIxTimeDateControl"
+                                 const:controlID="startTime"
                                  date="aptStartDate"
                   />
-                  <var:component className="UIxDatePicker"
-                                 const:dateID="startDate"
-                                 date="aptStartDate"
-                                 label:label="browse start date"
-                  />
                 </span>
               </td>
             </tr>
               </td>
               <td align="left" bgcolor="#FFFFF0">
                 <span class="aptview_text">
-                  <var:component className="UIxTimeSelector"
-                                 const:timeID="endTime"
-                                 date="aptEndDate"
-                  />
-                  <var:component className="UIxDatePicker"
-                                 const:dateID="endDate"
+                  <var:component className="UIxTimeDateControl"
+                                 const:controlID="endTime"
                                  date="aptEndDate"
-                                 label:label="browse end date"
                   />
                 </span>
               </td>
index 3e94adf23414686ec0f48e1ff836ef116da22a46..f6e65561e3c7f241a29336f4029256ef2c46e8bf 100644 (file)
@@ -1,21 +1,26 @@
 <?xml version='1.0' standalone='yes'?>
-<var:component
-  xmlns="http://www.w3.org/1999/xhtml"
-  xmlns:var="http://www.skyrix.com/od/binding"
-  xmlns:const="http://www.skyrix.com/od/constant"
-  xmlns:uix="OGo:uix"
-  xmlns:label="OGo:label"
-  className="UIxPageFrame"
-  title="name"
+<var:component xmlns="http://www.w3.org/1999/xhtml"
+               xmlns:var="http://www.skyrix.com/od/binding"
+               xmlns:const="http://www.skyrix.com/od/constant"
+               xmlns:uix="OGo:uix"
+               xmlns:label="OGo:label"
+               className="UIxPageFrame"
+               title="name"
 >
-  <table id="skywintable" class="wintable" cellspacing="0" cellpadding="5" 
-         width="100%">
+  <table id="skywintable"
+         class="wintable"
+         cellspacing="0"
+         cellpadding="5"
+         width="100%"
+  >
     <tr>
       <td class="wintitle">
         <table cellpadding="0" cellspacing="0" width="100%">
           <tr>
             <td width="5"/>
-            <td class="window_label">Search Appointments</td>
+            <td class="window_label">
+              <var:string label:value="Search appointments" />
+            </td>
             <td width="36" align="right" valign="center">
               <var:component className="UIxWinClose" />
             </td>
                      const:selectedTabStyle="tab_selected"
                      const:bodyStyle="tabview_body"
         >
-          <uix:tab const:key="proposal" const:label="proposal" href="#">
+          <uix:tab const:key="proposal"
+                   label:label="Appointment proposal"
+                   href="#"
+          >
             <form href="search">
               <table border="0" width="100%" cellspacing="0" cellpadding="4">
                 <tr bgcolor="#e8e8e0">
                   <td align="left" colspan="2">
-                    <span class="aptview_title">Search Appointments</span>
+                    <span class="aptview_title">
+                      <var:string label:value="Search appointments"/>
+                    </span>
                   </td>
                 </tr>
                 <tr><td colspan="2"> </td></tr>
 
                 <tr valign="top">
                   <td align="right" width="15%" bgcolor="#E8E8E0">
-                      <span class="aptview_text">Startdate:</span>
+                    <span class="aptview_text">
+                      <var:string label:value="Start date" />:
+                    </span>
                   </td>
                   <td align="left" bgcolor="#FFFFF0">
-                    date selector here
+                    <span class="aptview_text">
+                      <var:component className="UIxDatePickerScript" />
+                      <var:component className="UIxDatePicker"
+                                     const:dateID="startDate"
+                                     date="aptStartDate"
+                                     label:label="browse start date"
+                      />
+                    </span>
                   </td>
                 </tr>
                 <tr valign="top">
-                  <td align="right" width="15%" bgcolor="#E8E8E0">
-                      <span class="aptview_text">Enddate:</span>
+                  <td align="right" width="15%" bgcolor="#E8E8E0" class="aptview_text" >
+                    <var:string label:value="End date" />:
                   </td>
-                  <td align="left" bgcolor="#FFFFF0">
-                    date selector here
+                  <td align="left" bgcolor="#FFFFF0" class="aptview_text" >
+                    <var:component className="UIxDatePicker"
+                                   const:dateID="endDate"
+                                   date="aptEndDate"
+                                   label:label="browse end date"
+                    />
                   </td>
                 </tr>
                 <tr valign="top">
-                  <td align="right" width="15%" bgcolor="#E8E8E0">
-                      <span class="aptview_text">Earliest Starttime:</span>
-                  </td>
-                  <td align="left" bgcolor="#FFFFF0">
-                    time selector here
+                  <td align="right"
+                      width="15%"
+                      bgcolor="#E8E8E0"
+                      class="aptview_text"
+                  >
+                    <var:string label:value="Earliest start time" />:
+                  </td>
+                  <td align="left" bgcolor="#FFFFF0" class="aptview_text">
+                    <var:component className="UIxTimeSelector"
+                                   const:timeID="earliestStartTime"
+                                   date="startDate"
+                                   const:combined="YES"
+                    />
                   </td>
                 </tr>
                 <tr valign="top">
-                  <td align="right" width="15%" bgcolor="#E8E8E0">
-                      <span class="aptview_text">Latest Endtime:</span>
+                  <td align="right" width="15%" bgcolor="#E8E8E0" class="aptview_text" >
+                    <var:string label:value="Latest end time" />:
                   </td>
-                  <td align="left" bgcolor="#FFFFF0">
-                    time selector here
+                  <td align="left" bgcolor="#FFFFF0" class="aptview_text" >
+                    <var:component className="UIxTimeSelector"
+                                   const:timeID="latestEndTime"
+                                   date="endDate"
+                                   const:combined="YES"
+                    />
                   </td>
                 </tr>
                 <tr valign="top">
-                  <td align="right" width="15%" bgcolor="#E8E8E0">
-                      <span class="aptview_text">Duration:</span>
+                  <td align="right" width="15%" bgcolor="#E8E8E0" class="aptview_text" >
+                    <var:string label:value="Duration" />:
                   </td>
-                  <td align="left" bgcolor="#FFFFF0">
+                  <td align="left" bgcolor="#FFFFF0" class="aptview_text" >
                     duration popup here
                   </td>
                 </tr>
 
                 <tr bgcolor="#e8e8e0">
                   <td align="left" colspan="2">
-                    <span class="aptview_title">Search Resources</span>
+                    <span class="aptview_title">
+                      <var:string label:value="Search resources" />
+                    </span>
                   </td>
                 </tr>
                 <tr><td colspan="2"> </td></tr>
                 <tr valign="top">
                   <td align="right" width="15%" bgcolor="#E8E8E0">
-                    <span class="aptview_text">Select in Anais:</span>
+                    <span class="aptview_text">
+                      <var:string label:value="Search in Anais" />:
+                    </span>
                   </td>
                   <td align="left" bgcolor="#FFFFF0">
                     Anais resource selector
 
                 <tr bgcolor="#e8e8e0">
                   <td align="left" colspan="2">
-                    <span class="aptview_title">Search Participants</span>
+                    <span class="aptview_title">
+                      <var:string label:value="Search participants" />
+                    </span>
                   </td>
                 </tr>
                 <tr><td colspan="2"> </td></tr>
                 <tr valign="top">
                   <td align="right" width="15%" bgcolor="#E8E8E0">
-                    <span class="aptview_text">Select in Anais:</span>
+                    <span class="aptview_text">
+                      <var:string label:value="Search in Anais" />:
+                    </span>
                   </td>
                   <td align="left" bgcolor="#FFFFF0">
                     Anais person selector
                 <tr>
                   <td></td>
                   <td>
-                    <input type="submit" label:value="Search" 
-                           name="search:method" />
+                    <input type="submit"
+                           label:value="Search"
+                           name="search:method"
+                    />
                     <span class="button_auto_env"
                       ><a href=".." class="button_auto"
                       ><var:string label:value="Cancel" /></a></span>
index 66849b99cecaf3b6c97a79f788094b9316997266..24528c6be29d51adf0141f78edc82e3db944655e 100644 (file)
         [self dateFormat]];
 }
 
+/* action */
+
+- (void)takeValuesFromRequest:(WORequest *)_rq inContext:(WOContext *)_ctx {
+#if 0
+    NSString *dateString;
+    NSCalendarDate *d;
+
+    dateString = [_rq formValueForKey:[self dateID]];
+    if(!dateString)
+        return;
+
+    d = [NSCalendarDate dateWithString:dateString calendarFormat:@"%Y-%m-%d"];
+    if(!d)
+        NSLog(@"WARNING: Couldn't parse dateString '%@'", dateString);
+    NSLog(@"%s setting date:%@",
+          __PRETTY_FUNCTION__,
+          d);
+    [self setDate:d];
+#endif
+}
+
 @end
diff --git a/SOGo/UI/Scheduler/UIxTimeDateControl.m b/SOGo/UI/Scheduler/UIxTimeDateControl.m
new file mode 100644 (file)
index 0000000..9568283
--- /dev/null
@@ -0,0 +1,119 @@
+/*
+  Copyright (C) 2000-2004 SKYRIX Software AG
+
+  This file is part of OGo
+
+  OGo is free software; you can redistribute it and/or modify it under
+  the terms of the GNU Lesser General Public License as published by the
+  Free Software Foundation; either version 2, or (at your option) any
+  later version.
+
+  OGo is distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with OGo; see the file COPYING.  If not, write to the
+  Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+  02111-1307, USA.
+*/
+// $Id$
+
+
+#include <NGObjWeb/NGObjWeb.h>
+
+
+@interface UIxTimeDateControl : WOComponent
+{
+    NSString *controlID;
+    NSCalendarDate *date;
+    NSString *label;
+
+    NSCalendarDate *timeComponent;
+    NSCalendarDate *dateComponent;
+}
+
+- (NSString *)timeID;
+- (NSString *)dateID;
+
+- (void)setTimeComponent:(NSCalendarDate *)_timeComponent;
+- (void)setDateComponent:(NSCalendarDate *)_dateComponent;
+    
+@end
+
+#include "common.h"
+
+@implementation UIxTimeDateControl
+
+- (void)dealloc {
+    [self->controlID release];
+    [self->date release];
+    [self->label release];
+    [self->timeComponent release];
+    [self->dateComponent release];
+    [super dealloc];
+}
+
+- (void)setControlID:(NSString *)_controlID {
+    ASSIGNCOPY(self->controlID, _controlID);
+}
+- (NSString *)controlID {
+    return self->controlID;
+}
+- (void)setDate:(NSCalendarDate *)_date {
+    ASSIGN(self->date, _date);
+    [self setTimeComponent:_date];
+    [self setDateComponent:_date];
+}
+- (NSCalendarDate *)date {
+    return self->date;
+}
+- (void)setLabel:(NSString *)_label {
+    ASSIGNCOPY(self->label, _label);
+}
+- (NSString *)label {
+    return self->label;
+}
+
+- (void)setTimeComponent:(NSCalendarDate *)_timeComponent {
+    ASSIGN(self->timeComponent, _timeComponent);
+}
+- (NSCalendarDate *)timeComponent {
+    return self->timeComponent;
+}
+
+- (void)setDateComponent:(NSCalendarDate *)_dateComponent {
+    ASSIGN(self->dateComponent, _dateComponent);
+}
+- (NSCalendarDate *)dateComponent {
+    return self->dateComponent;
+}
+
+- (NSString *)timeID {
+    return [NSString stringWithFormat:@"%@_time",
+        [self controlID]];
+}
+
+- (NSString *)dateID {
+    return [NSString stringWithFormat:@"%@_date",
+        [self controlID]];
+}
+
+/* action */
+
+- (void)takeValuesFromRequest:(WORequest *)_rq inContext:(WOContext *)_ctx {
+    NSCalendarDate *d;
+
+    d = [[self dateComponent] hour:[[self timeComponent] hourOfDay]
+                            minute:[[self timeComponent] minuteOfHour]];
+    if(!d)
+        return;
+
+    NSLog(@"%s newDate:%@",
+          __PRETTY_FUNCTION__,
+          d);
+    [self setDate:d];
+}
+
+@end
diff --git a/SOGo/UI/Scheduler/UIxTimeDateControl.wox b/SOGo/UI/Scheduler/UIxTimeDateControl.wox
new file mode 100644 (file)
index 0000000..e3c70b9
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version='1.0' standalone='yes'?>
+
+<span xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:var="http://www.skyrix.com/od/binding"
+      xmlns:const="http://www.skyrix.com/od/constant"
+      xmlns:rsrc="OGo:url"
+>
+  <var:component className="UIxTimeSelector"
+                 timeID="timeID"
+                 date="time"
+   />
+  <var:component className="UIxDatePicker"
+                 dateID="dateID"
+                 date="date"
+                 label="label"
+  />
+</span>
\ No newline at end of file
index 84fd81f77eada552609c2f547065e9f8f725e33d..dcba8fe6c05aaf58537b911209c6a97544601d0a 100644 (file)
 {
     NSString *timeID;
     NSCalendarDate *date;
-
+    BOOL combined;
+    NSString *minuteInterval;
     id item;
     NSArray *hours, *minutes;
 }
 
 - (NSArray *)hours;
 - (NSArray *)minutes;
-    
+- (NSString *)minuteInterval;
+
 @end
 
 #include "common.h"
 - (void)dealloc {
     [self->timeID release];
     [self->date release];
+    [self->minuteInterval release];
     [self->item release];
+    [self->hours release];
+    [self->minutes release];
     [super dealloc];
 }
 
 /* accessors */
 
 - (void)setTimeID:(NSString *)_timeID {
-    ASSIGN(self->timeID, _timeID);
+    ASSIGNCOPY(self->timeID, _timeID);
 }
 - (NSString *)timeID {
     return self->timeID;
     return self->date;
 }
 
+- (void)setMinuteInterval:(NSString *)_minuteInterval {
+    ASSIGNCOPY(self->minuteInterval, _minuteInterval);
+}
+- (NSString *)minuteInterval {
+    if(self->minuteInterval == nil)
+        return @"1";
+    return self->minuteInterval;
+}
+
 - (void)setItem:(id)_item {
     ASSIGN(self->item, _item);
 }
 - (NSArray *)minutes {
     if(self->minutes == nil) {
         NSMutableArray *values;
-        unsigned i, count;
+        unsigned i, count, iv;
         
+        iv = [[self minuteInterval] intValue];
+
         count = 60;
         values = [NSMutableArray arrayWithCapacity:count];
-        for(i = 0; i < count; i++) {
+        for(i = 0; i < count; i += iv) {
             [values addObject:[NSNumber numberWithInt:i]];
         }
         self->minutes = [values retain];
     return [NSString stringWithFormat:@"%02d", [item intValue]];
 }
 
+
+/* action */
+
+- (void)takeValuesFromRequest:(WORequest *)_rq inContext:(WOContext *)_ctx {
+    NSString *h, *m;
+    NSCalendarDate *d;
+
+    h = [_rq formValueForKey:[self hoursName]];
+    if(!h)
+        return;
+
+    m = [_rq formValueForKey:[self minutesName]];
+    d = [[self date] hour:[h intValue] minute:[m intValue]];
+    NSLog(@"%s setting date:%@",
+          __PRETTY_FUNCTION__,
+          d);
+    [self setDate:d];
+}
+
 @end
index 65f7540635184ff9996ccf6032e2fb64585c52d9..e31de3a70ab522d3639ba33f204de0aadcdf8d5d 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 
-SUBMINOR_VERSION:=48
+SUBMINOR_VERSION:=49
 
 # v0.9.41 requires libNGObjWeb     v4.2.431
 # v0.9.31 requires libWEExtensions v4.2.52