]> err.no Git - scalable-opengroupware.org/commitdiff
completed UIxCalWeekview and some refactoring
authorznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Wed, 28 Jul 2004 14:35:15 +0000 (14:35 +0000)
committerznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Wed, 28 Jul 2004 14:35:15 +0000 (14:35 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@160 d1b88da0-ebda-0310-925b-ed51d893ca5b

19 files changed:
SOGo/UI/Common/ChangeLog
SOGo/UI/Common/calendar.css
SOGo/UI/Scheduler/ChangeLog
SOGo/UI/Scheduler/UIxCalDayChartview.m
SOGo/UI/Scheduler/UIxCalDayChartview.wox
SOGo/UI/Scheduler/UIxCalDayListview.m
SOGo/UI/Scheduler/UIxCalDayListview.wox
SOGo/UI/Scheduler/UIxCalDayOverview.m
SOGo/UI/Scheduler/UIxCalDayOverview.wox
SOGo/UI/Scheduler/UIxCalDayView.h
SOGo/UI/Scheduler/UIxCalDayView.m
SOGo/UI/Scheduler/UIxCalView.h
SOGo/UI/Scheduler/UIxCalView.m
SOGo/UI/Scheduler/UIxCalWeekChartview.m
SOGo/UI/Scheduler/UIxCalWeekColumnsview.m
SOGo/UI/Scheduler/UIxCalWeekColumnsview.wox
SOGo/UI/Scheduler/UIxCalWeekListview.m
SOGo/UI/Scheduler/UIxCalWeekOverview.wox
SOGo/UI/Scheduler/Version

index 39381c5ccc4d822eb9033e1023aa094c46220361..c0225016624f2d0eff965bdb2ac211e84f1ba7b3 100644 (file)
@@ -1,3 +1,7 @@
+2004-07-28  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * calendar.css: added CSS for weekcolumnsview (v0.9.3)
+
 2004-07-27  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * v0.9.2
index 501f05c622e05988c1d0546cf930cf0b5b3544f0..7b4f3460d42255e67fcf5df57226f84e4375b567 100644 (file)
   text-decoration: none;
 }
 
+
+.weekcolumnsview {
+}
+
+.weekcolumnsview_title {
+  font-size:        10pt;
+  font-family:      Arial, Helvetica, Verdana, Geneva, Tahoma, sans-serif;
+  letter-spacing:   0pt;
+  color:            #000000;
+  background-color: #d2d2cc;
+  padding:          4px;
+}
+
+.weekcolumnsview_title a {
+  color:            #0033cc;
+  text-decoration: none;
+}
+
+.weekcolumnsview_title_hilite {
+  font-size:        10pt;
+  font-family:      Arial, Helvetica, Verdana, Geneva, Tahoma, sans-serif;
+  letter-spacing:   0pt;
+  color:            #000000;
+  background-color: #d2d2cc;
+  font-weight:      bold;
+  padding:          4px;
+}
+
+.weekcolumnsview_title_hilite a {
+  color:            #0033cc;
+  text-decoration: none;
+}
+
+.weekcolumnsview_title_daylink {
+  font-size:        12pt;
+  color:            #0033cc;
+  font-weight:      bold;
+}
+
+.weekcolumnsview_title_newlink {
+  font-size:        8pt;
+}
+
+.weekcolumnsview_holidayinfo {
+  font-size:        8pt;
+  font-weight:      bold;
+}
+
+.weekcolumnsview_content {
+  color:            #FFFFFF;
+  background-color: #e8e8e0;
+}
+
+.weekcolumnsview_content a {
+  color:           #0000FF;
+  font-family:     Arial, Helvetica, Verdana, Geneva, Tahoma, sans-serif;
+  letter-spacing:  0pt;
+  text-decoration: none;
+}
+
+.weekcolumnsview_content_hilite {
+  background-color: #fffff0;
+}
+
+.weekcolumnsview_content_hilite a {
+  color:           #0000FF;
+  font-family:     Arial, Helvetica, Verdana, Geneva, Tahoma, sans-serif;
+  letter-spacing:  0pt;
+  text-decoration: none;
+}
+
+.weekcolumnsview_cal {
+  color:            #000000;
+  font-family:      Arial, Helvetica, Verdana, Geneva, Tahoma, sans-serif;
+  font-size:        10pt;
+  letter-spacing:   0pt;
+  padding:          0px 0px 0px 0px;
+  margin:           0px 0px 0px 0px;
+}
+
+.weekcolumnsview_cal table {
+  padding:          0px 0px 0px 0px;
+  margin:           0px 0px 0px 0px;
+}
+
+.weekcolumnsview_cal td {
+  padding:          0px 0px 0px 0px;
+  margin:           0px 0px 0px 0px;
+}
+
+.weekcolumnsview_cal a {
+  color:            #000000;
+  font-family:      Arial, Helvetica, Verdana, Geneva, Tahoma, sans-serif;
+  font-size:        10pt;
+  letter-spacing:   0pt;
+  padding:          0px;
+  text-decoration:  none;
+}
+.weekcolumnsview_cal a:hover {
+  text-decoration:  underline;
+}
+
+.weekcolumnsview_cal_title {
+  background-color: #d2d2cc;
+  text-align:       center;
+  font-size:        10pt;
+  font-weight:      bold;
+  letter-spacing:   0pt;
+}
+
+.weekcolumnsview_cal_day_header {
+  background-color: #d2d2cc;
+  text-align:       center;
+  vertical-align:   middle;
+  font-size:        11pt;
+  width:            20px;
+  padding:          2px 2px 2px 2px;
+  margin:           2px 2px 2px 2px;
+}
+
+.weekcolumnsview_cal_content {
+  color:            #000000;
+  background-color: #e8e8e0;
+  text-align:       center;
+  vertical-align:   middle;
+  font-size:        10pt;
+  letter-spacing:   0pt;
+}
+
+.weekcolumnsview_cal_content_hilite {
+  color:            #000000;
+  background-color: #fffff0;
+  text-align:       center;
+  vertical-align:   middle;
+  font-size:        10pt;
+  letter-spacing:   0pt;
+}
+
+.weekcolumnsview_cal_content_dimmed {
+  color:            #5a5a5a;
+  background-color: #d2d2cc;
+  text-align:       center;
+  vertical-align:   middle;
+  font-size:        10pt;
+  letter-spacing:   0pt;
+}
+
+.weekcolumnsview_cal_week {
+  background-color: #d2d2cc;
+  width:            16pt;
+  text-align:       center;
+  vertical-align:   middle;
+}
+
+
 .monthoverview {
   color:            #000000;
   font-family:      Arial, Helvetica, Verdana, Geneva, Tahoma, sans-serif;
index 67352e27609b16db0c517cbabd6c5fb26c653903..7a5247c270d2f332dae1ce5a20cbad0eea6a380e 100644 (file)
@@ -1,3 +1,16 @@
+2004-07-28  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * v0.9.9
+
+       * UIxCalWeekColumnsview.[m|wox]: implemented.
+
+       * UIxCalWeekCharview.*, UIxCalWeekListview.*, UIxCalDayChartView.*,
+         UIxCalDayListview.*: enhanced templates.
+
+       * UIxCalDayView.[hm]: removed -thisMonth and -nextMonth.
+
+       * UIxCalView.[hm]: added -thisMonth and -nextMonth
+
 2004-07-28  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * v0.9.8
index 8d62f7b80de2b8088bd0477ac54e806a705eaea5..b7a01d7ee6088b6d930b58995a37fded89a08d03 100644 (file)
 // $Id$
 
 
-#include <NGObjWeb/NGObjWeb.h>
+#include "UIxCalDayView.h"
+#include "common.h"
 
-
-@interface UIxCalDayChartview : WOComponent
+@interface UIxCalDayChartview : UIxCalDayView
 {
 
 }
index 0f892b31bb66ac84199c823fda45333127968362..3418bb4f66ad54ebeed48f986a3a2cb854e40ea6 100644 (file)
@@ -17,7 +17,7 @@
               <var:component className="UIxCalDateLabel"
                              startDate="startDate"
                              endDate="endDate"
-                             const:selection="year"
+                             const:selection="day"
               />
             </td>
             <td width="36" align="right" valign="center">
index 567514e3ddf09e8ec9dfec5846d6c22fe1b12df9..146a0fd1420e2fef348fe2c81169924833f4302e 100644 (file)
 // $Id$
 
 
-#include <NGObjWeb/NGObjWeb.h>
+#include "UIxCalDayView.h"
+#include "common.h"
 
-
-@interface UIxCalDayListview : WOComponent
+@interface UIxCalDayListview : UIxCalDayView
 {
 
 }
index 03350d79866ff851e4ef6e5192eeba33a855829f..577a74d79e4d3734b9c338fd1127dd22332cdc9c 100644 (file)
@@ -17,7 +17,7 @@
               <var:component className="UIxCalDateLabel"
                              startDate="startDate"
                              endDate="endDate"
-                             const:selection="year"
+                             const:selection="day"
               />
             </td>
             <td width="36" align="right" valign="center">
index b5647dd97391bf4c39f14e5dc16eebf36c2de480..fae83bef3aa06896fcd6cd9ce76b91d82dce06f6 100644 (file)
@@ -22,9 +22,7 @@
 
 
 #include "UIxCalDayView.h"
-#include <Foundation/Foundation.h>
-#include <NGExtensions/NGExtensions.h>
-
+#include "common.h"
 
 @interface UIxCalDayOverview : UIxCalDayView
 {
index abe7b1df9975243a3aea11fbb317a23893c8b077..1724763f9b1af1d38c00c434930d612c16ea16e0 100644 (file)
@@ -17,7 +17,7 @@
               <var:component className="UIxCalDateLabel"
                              startDate="startDate"
                              endDate="endDate"
-                             const:selection="year"
+                             const:selection="day"
               />
             </td>
             <td width="36" align="right" valign="center">
                     </td>
                   </tr>
                 </table>
-                <table>
+                <table width="100%">
                   <tr valign="top">
                     <td>
                       <table>
                         </tr>
                       </table>
                     </td>
-                    <td>
+                    <td width="100%">
                       <table class="dayoverview_content" width="100%">
                         <var:foreach list="dateRange" item="currentDate">
                           <tr>
                                  ><var:string label:value="new" /></a>]
                               </span>
                             </td>
-                            <td class="dayoverview_content_apts">
+                            <td class="dayoverview_content_apts" width="90%">
                               <var:foreach list="aptsForCurrentDate" item="appointment">
                                 <a var:href="appointmentViewURL"
                                    var:queryDictionary="currentDateQueryParameters"
index 0729035c5a1b82807fc7269742be0ddb5223eb7f..ac7d700a389f0bf37efb6741257509188f879e1f 100644 (file)
@@ -32,9 +32,6 @@
 
 }
 
-- (NSCalendarDate *)thisMonth;
-- (NSCalendarDate *)nextMonth;
-
 @end
 
 #endif /* __UIxCalDayView_H_ */
index a873ae2c898a4cb706a14130c43924673a77bfef..8bf4101d9b5edccea5466fc7018eb7f982bff0ee 100644 (file)
 
 @implementation UIxCalDayView
 
-- (NSCalendarDate *)thisMonth {
-    return [self selectedDate];
-}
-
-- (NSCalendarDate *)nextMonth {
-    NSCalendarDate *date = [self thisMonth];
-    return [date dateByAddingYears:0 months:0 days:[date numberOfDaysInMonth]
-                             hours:0 minutes:0 seconds:0];
-}
-
-
 /* URLs */
 
 - (NSDictionary *)prevDayQueryParameters {
index 25e32bbd8e55c10989a3004d162254da2bd74b2e..e861a07402f1d49df8e5fe98aaa343f5432a7b5b 100644 (file)
 - (BOOL)shouldDisplayWeekend;
     
 - (NSCalendarDate *)referenceDateForFormatter;
-    
+- (NSCalendarDate *)thisMonth;
+- (NSCalendarDate *)nextMonth;
+
 /* URLs */
 
 - (NSString *)appointmentViewURL;
index 4404e32448962778803e357b74a401e20ea9ba9e..6be1a80f8431d599e5a9aa966819a2810ace3d51 100644 (file)
   return [self selectedDate];
 }
 
+- (NSCalendarDate *)thisMonth {
+    return [self selectedDate];
+}
+
+- (NSCalendarDate *)nextMonth {
+    NSCalendarDate *date = [self thisMonth];
+    return [date dateByAddingYears:0 months:0 days:[date numberOfDaysInMonth]
+                             hours:0 minutes:0 seconds:0];
+}
+
+
 /* current day related */
 
 - (void)setCurrentDay:(NSCalendarDate *)_day {
index ceb1bfb0addb8669c0b4d69bcb3acd6ac6599044..7e5ce4bc413c9a322960cd897b281944130c6a39 100644 (file)
 // $Id$
 
 
-#include <NGObjWeb/NGObjWeb.h>
+#include "UIxCalWeekView.h"
+#include "common.h"
 
-
-@interface UIxCalWeekChartview : WOComponent
+@interface UIxCalWeekChartview : UIxCalWeekView
 {
 
 }
index 35cc41b4bed15068b649967e6db4e5d56749a4e3..e6f315ecb343714b4dd2c63bfc76b9513be13daf 100644 (file)
 // $Id$
 
 
-#include <NGObjWeb/NGObjWeb.h>
+#include "UIxCalWeekView.h"
+#include "common.h"
 
-
-@interface UIxCalWeekColumnsview : WOComponent
+@interface UIxCalWeekColumnsview : UIxCalWeekView
 {
-
+    int dayIndex;
 }
 
 @end
 
 @implementation UIxCalWeekColumnsview
 
+- (NSArray *)appointments {
+    return [self fetchCoreInfos];
+}
+
+- (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;
+}
+
+
+/* style sheet */
+
+- (NSString *)titleStyle {
+    if([self->currentDay isToday])
+        return @"weekcolumnsview_title_hilite";
+    return @"weekcolumnsview_title";
+}
+
+- (NSString *)contentStyle {
+    if([self->currentDay isToday])
+        return @"weekcolumnsview_content_hilite";
+    return @"weekcolumnsview_content";
+}
+
 @end
index 944b1c57787ccc8c2fe957d4b04f1c79f08a0b87..23bbb2350e7fed1f5b669d444d5cae774e98f3f6 100644 (file)
   <table cellpadding="0" cellspacing="0" width="100%">
   <tr>
   <td width="5"/>
-  <td class="wintitle"><var:component className="UIxCalDateLabel" startDate="startDate" endDate="endDate" const:selection="week" /></td>
+  <td class="wintitle"><var:component className="UIxCalDateLabel"
+                                      startDate="startDate"
+                                      endDate="endDate"
+                                      const:selection="week"
+                       /></td>
   <td width="36" align="right" valign="center">
   <var:component className="UIxWinClose" />
   </td>
             </td>
           </tr>
         </table>
-
-    <var:week-overview list="appointments"
-                       item="appointment"
-                       weekStart="startDate"
-                       dayIndex="dayIndex"
-                       const:startDateKey="startDate"
-                       const:endDateKey="endDate"
-                       const:titleStyle="weekoverview_title"
-                       contentStyle="contentStyle"
-    >
-      <var:week-title>
-        <table cellpadding="0" width="100%" border="0" cellspacing="0"
-               var:class="titleStyle">
-          <tr>
-            <td align="left" valign="top">
-              <a href="dayoverview"
-                 var:queryDictionary="currentDayQueryParameters"
-                 class="weekoverview_title_daylink"
-                 ><var:string value="currentDay.dayOfMonth" /></a>
+        <table width="100%">
+          <tr valign="top">
+            <td>
+              <table>
+                <tr>
+                  <td>
+                     <var:component className="UIxCalInlineMonthOverview"
+                                    selectedDate="thisMonth"
+                                    const:showYear="YES"
+                                    const:showWeekColumn="YES"
+                                    const:weekSelectionHref="weekcolumnsview"
+                                    const:style="weekcolumnsview_cal"
+                                    const:headerStyle="weekcolumnsview_cal_title"
+                                    const:weekStyle="weekcolumnsview_cal_week"
+                                    const:dayHeaderStyle="weekcolumnsview_cal_day_header"
+                                    const:dayBodyStyle="weekcolumnsview_cal_content"
+                                    const:todayBodyStyle="weekcolumnsview_cal_content_hilite"
+                                    const:inactiveDayBodyStyle="weekcolumnsview_cal_content_dimmed"
+                     />
+                  </td>
+                </tr>
+                <tr>
+                  <td>
+                     <var:component className="UIxCalInlineMonthOverview"
+                                    selectedDate="nextMonth"
+                                    const:showYear="YES"
+                                    const:showWeekColumn="YES"
+                                    const:weekSelectionHref="weekcolumnsview"
+                                    const:style="weekcolumnsview_cal"
+                                    const:headerStyle="weekcolumnsview_cal_title"
+                                    const:weekStyle="weekcolumnsview_cal_week"
+                                    const:dayHeaderStyle="weekcolumnsview_cal_day_header"
+                                    const:dayBodyStyle="weekcolumnsview_cal_content"
+                                    const:todayBodyStyle="weekcolumnsview_cal_content_hilite"
+                                    const:inactiveDayBodyStyle="weekcolumnsview_cal_content_dimmed"
+                     />
+                  </td>
+                </tr>
+              </table>
             </td>
-            <td align="center" valign="top" width="97%">
-              <var:string value="currentDayName" /><br />
-                [<a href="new"
-                    var:queryDictionary="currentDayQueryParameters"
-                    class="weekoverview_title_newlink"
-                 ><var:string label:value="new" /></a>]
+            <td width="100%">
+              <var:weekcol-view list="appointments"
+                                item="appointment"
+                                weekStart="startDate"
+                                dayIndex="dayIndex"
+                                const:startDateKey="startDate"
+                                const:endDateKey="endDate"
+                                const:titleStyle="weekcolumnsview_title"
+                                contentStyle="contentStyle"
+                                const:class="weekcolumnsview"
+                                const:width="100%"
+                                const:contentColor="#e8e8e0"
+                                const:cellpadding="0"
+                                const:cellspacing="2"
+              >
+                <var:weekcol-title>
+                  <table cellpadding="0" width="100%" border="0" cellspacing="0"
+                         var:class="titleStyle">
+                    <tr>
+                      <td align="left" valign="top">
+                        <a href="dayoverview"
+                           var:queryDictionary="currentDayQueryParameters"
+                           class="weekcolumnsview_title_daylink"
+                           ><var:string value="currentDay.dayOfMonth" /></a>
+                      </td>
+                      <td align="center" valign="top" width="97%">
+                        <var:string value="currentDayName" /><br />
+                          [<a href="new"
+                              var:queryDictionary="currentDayQueryParameters"
+                              class="weekcolumnsview_title_newlink"
+                           ><var:string label:value="new" /></a>]
+                      </td>
+                    </tr>
+                  </table>
+                </var:weekcol-title>
+                <var:if condition="hasDayInfo">
+                  <var:weekcol-info>
+                    <var:if condition="hasHolidayInfo">
+                      <var:string value="holidayInfo" 
+                               const:class="weekcolumnsview_holidayinfo" />
+                    </var:if>
+                    <var:foreach list="allDayApts" item="appointment">
+                      <a var:href="appointmentViewURL"
+                         var:queryDictionary="currentDayQueryParameters"
+                        ><var:string value="shortTextForApt" /></a>
+                    </var:foreach>
+                  </var:weekcol-info>
+                </var:if>
+                <var:weekcol>
+                  <a var:href="appointmentViewURL" 
+                    ><small><var:string value="shortTextForApt" /></small></a><br />
+                </var:weekcol>
+              </var:weekcol-view>
             </td>
           </tr>
         </table>
-      </var:week-title>
-      <var:if condition="hasDayInfo">
-        <var:week-info>
-          <var:if condition="hasHolidayInfo">
-            <var:string value="holidayInfo" 
-                       const:class="weekoverview_holidayinfo" />
-          </var:if>
-          <var:foreach list="allDayApts" item="appointment">
-            <a var:href="appointmentViewURL"
-               var:queryDictionary="currentDayQueryParameters"
-              ><var:string value="shortTextForApt" /></a>
-          </var:foreach>
-        </var:week-info>
-      </var:if>
-      <var:week>
-        <a var:href="appointmentViewURL" 
-          ><small><var:string value="shortTextForApt" /></small></a><br />
-      </var:week>
-    </var:week-overview>
+   
   </var:component>
   </td>
   </tr>
index 2c56f31cdb70e6ead43b93c6c340b4cd5c82ac5e..8cc0a78ff4beb9abdebb523a59804ec33631a643 100644 (file)
 // $Id$
 
 
-#include <NGObjWeb/NGObjWeb.h>
+#include "UIxCalWeekView.h"
+#include "common.h"
 
-
-@interface UIxCalWeekListview : WOComponent
+@interface UIxCalWeekListview : UIxCalWeekView
 {
 
 }
index c30d1571fd305d35f8b1bb95f9b93d75be904f61..2db49a0a63d917a7b948c4d1d8d26561b3872be4 100644 (file)
   <table cellpadding="0" cellspacing="0" width="100%">
   <tr>
   <td width="5"/>
-  <td class="wintitle"><var:component className="UIxCalDateLabel" startDate="startDate" endDate="endDate" const:selection="week" /></td>
+  <td class="wintitle"><var:component className="UIxCalDateLabel"
+                                      startDate="startDate"
+                                      endDate="endDate"
+                                      const:selection="week"
+                       /></td>
   <td width="36" align="right" valign="center">
   <var:component className="UIxWinClose" />
   </td>
index 97fd14829b63e507ecb9f4b6587f3afea16633b7..f979db5f4ff190a67d2eb770db72b594358e5b76 100644 (file)
@@ -1,5 +1,5 @@
 # $Id$
 
-SUBMINOR_VERSION:=8
+SUBMINOR_VERSION:=9
 
 # 1.1.0 requires NGObjWeb 4.2.202