]> err.no Git - scalable-opengroupware.org/commitdiff
proper week overview calendar
authorznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Fri, 18 Jun 2004 18:30:12 +0000 (18:30 +0000)
committerznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Fri, 18 Jun 2004 18:30:12 +0000 (18:30 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@51 d1b88da0-ebda-0310-925b-ed51d893ca5b

ZideStore/UI-X/ChangeLog
ZideStore/UI-X/Common/calendar.css
ZideStore/UI-X/Scheduler/OGoCalWeekOverview.m
ZideStore/UI-X/Scheduler/OGoCalWeekOverview.wox

index 483f30a8768d85c4c0c4abaac3f92908eef72a4f..a7606a8a053564b98e57fe7b130810b3a5ac91c5 100644 (file)
@@ -1,3 +1,8 @@
+2004-06-18  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * Implemented proper calendar in week overview. Highlighting isn't
+         enabled, yet.
+
 2004-06-18  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * Common/OGoComponent.[hm]: new component which serves as a base
index e650c67dbd178f30b58728188618417a8c2e1e1c..e2a66ed74817cf534e5c47d0ae13f6adf368bb8d 100644 (file)
@@ -1,23 +1,46 @@
 .date_label {
   color:            #06348b;
-  font-family:     Arial, Helvetica, Verdana, Geneva, Tahoma, sans-serif;
+  font-family:      Arial, Helvetica, Verdana, Geneva, Tahoma, sans-serif;
   font-size:        12pt;
   font-weight:      bold;
 }
 
 .weekoverview_title {
-  font-size:        8pt;
-  font-family:     Arial, Helvetica, Verdana, Geneva, Tahoma, sans-serif;
-  letter-spacing:  0pt;
-  color:            #ff0000;
+  font-size:        10pt;
+  font-family:      Arial, Helvetica, Verdana, Geneva, Tahoma, sans-serif;
+  letter-spacing:   0pt;
+  color:            #000000;
   background-color: #d2d2cc;
 }
 
+.weekoverview_title a {
+  color:            #0033cc;
+  text-decoration: none;
+}
+
+.weekoverview_title_hilite {
+  font-weight:      bold;
+}
+
+.weekoverview_title_daylink {
+  font-size:        12pt;
+  color:            #0033cc;
+  font-weight:      bold;
+}
+
+.weekoverview_title_newlink {
+  font-size:        8pt;
+}
+
 .weekoverview_content {
   color:            #FFFFFF;
   background-color: #e8e8e0;
 }
 
+.weekoverview_content_hilite {
+  background-color: #f5f5e9;
+}
+
 .weekoverview_content a {
   color:           #0000FF;
   font-family:     Arial, Helvetica, Verdana, Geneva, Tahoma, sans-serif;
index f254f136400c9256848dfc31d320943f4477a2f8..2f9ec5f393ff5a3d2bc9f0b315b9a2d778750cff 100644 (file)
@@ -24,6 +24,8 @@
 
 @interface OGoCalWeekOverview : OGoCalWeekView
 {
+    int dayIndex;
+    NSCalendarDate *currentDay;
 }
 
 @end
   return [self fetchCoreInfos];
 }
 
+- (void)setCurrentDay:(NSCalendarDate *)_day {
+    ASSIGN(self->currentDay, _day);
+}
+
+- (NSCalendarDate *)currentDay {
+    return self->currentDay;
+}
+
+- (NSString *)currentDayName {
+    return [self->currentDay descriptionWithCalendarFormat:@"%A"];
+}
+
+- (void)setDayIndex:(char)_idx {
+    NSCalendarDate *d;
+    
+    if ((self->dayIndex == _idx) && (self->currentDay != nil))
+        return;
+    
+    self->dayIndex = _idx;
+    
+    if (_idx > 0) {
+        d = [[self startDate]
+               dateByAddingYears:0 months:0 days:_idx
+                           hours:0 minutes:0 seconds:0];
+    }
+    else
+        d = [self startDate];
+    
+    [self setCurrentDay:d];
+}
+
+- (int)dayIndex {
+    return self->dayIndex;
+}
+
+- (NSDictionary *)currentDayQueryParameters {
+    return [self queryParametersBySettingSelectedDate:self->currentDay];
+}
+
 @end /* OGoCalWeekOverview */
index b0add1c53540b9141fdda16036df32d565080380..39b0dbede334881ab786788aa31ec4ad1adada8a 100644 (file)
           </tr>
         </table>
 
-  <var:week-overview list="appointments" item="appointment" weekStart="startDate" const:startDateKey="startDate" const:endDateKey="endDate" const:titleStyle="weekoverview_title" const:contentStyle="weekoverview_content">
+    <var:week-overview list="appointments"
+                       item="appointment"
+                       weekStart="startDate"
+                       dayIndex="dayIndex"
+                       const:startDateKey="startDate"
+                       const:endDateKey="endDate"
+                       const:titleStyle="weekoverview_title"
+                       const:contentStyle="weekoverview_content"
+    >
+        <var:week-title>
+            <table cellpadding="0" width="100%" border="0" cellspacing="0"  class="weekoverview_title">
+                <tr>
+                    <td align="left" valign="top">
+                        <a href="dayoverview"
+                           var:queryDictionary="currentDayQueryParameters"
+                           class="weekoverview_title_daylink"
+                        ><var:string value="currentDay.dayOfMonth" /></a>
+                    </td>
+                    <td align="center" valign="top" width="97%">
+                    <var:string value="currentDayName" /><br />
+                    [<a href="proposal"
+                        var:queryDictionary="currentDayQueryParameters"
+                        class="weekoverview_title_newlink"
+                     >new</a>]
+                    </td>
+                </tr>
+            </table>
+        </var:week-title>
       <var:week>
           <a var:href="appointmentViewURL"><var:string value="appointment.title"/></a>
       </var:week>