]> err.no Git - scalable-opengroupware.org/commitdiff
bugfixes
authorznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Mon, 2 Aug 2004 12:59:28 +0000 (12:59 +0000)
committerznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Mon, 2 Aug 2004 12:59:28 +0000 (12:59 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@163 d1b88da0-ebda-0310-925b-ed51d893ca5b

SOGo/UI/Common/ChangeLog
SOGo/UI/Common/UIxPageFrame.wox
SOGo/UI/Common/Version
SOGo/UI/Scheduler/ChangeLog
SOGo/UI/Scheduler/UIxCalMonthOverview.m
SOGo/UI/Scheduler/UIxCalMonthOverview.wox
SOGo/UI/Scheduler/UIxCalMonthView.h
SOGo/UI/Scheduler/UIxCalMonthView.m
SOGo/UI/Scheduler/Version

index ba12287704fcc23f61e3163d6c0148003563e84c..f071fefcfd1096521b1640fa16ae7b891f795227 100644 (file)
@@ -1,3 +1,8 @@
+2004-08-02  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * UIxPageFrame.wox: removed some navigation items to avoid confusion.
+         Also applied some pretty printing. (v0.9.5)
+
 2004-07-30  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * v0.9.4
index 3d424da475242678c85d2eba3a70ca3af9bd983e..263c0d505e18f003ada7e980a37d436ebebe14f8 100644 (file)
@@ -1,5 +1,9 @@
 <?xml version="1.0" standalone="yes"?>
-<html 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">
+<html 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"
+>
   <head>
     <title>
       <var:string value="title"/>
     <link href="mailto:hh@skyrix.com" rev="made"/>
   </head>
   <body>
-<!--
-    <div id="header">
-      <img filename="OGoLogo.gif" class="headerlogo" alt="Logo" />
-      <div id="headerhistory">
-        <span id="navtitle">SOGo</span>
-      </div>
-    </div>
-    <br />
--->
     <table cellpadding="5" cellspacing="0" border="0" width="100%">
       <tr>
         <td colspan="2">
               </td>
               <td align="right">
                 <a href="http://www.opengroupware.org:80/" target="OGo">
-                  <img rsrc:src="menu_logo_top.gif" align="center" border="0" ALT="" Valign="middle"/>
+                  <img rsrc:src="menu_logo_top.gif"
+                       align="center"
+                       border="0"
+                       alt=""
+                       valign="middle"
+                  />
                 </a>
               </td>
             </tr>
         <td valign="top">
           <table cellpadding="0" cellspacing="0" border="0" width="100%">
             <tr>
-<!-- $Id: SkyDock.html,v 1.13 2004/02/13 14:08:27 helge Exp $ -->
               <td valign="top">
-                <table border="0" cellspacing="0" cellpadding="0" class="leftmenu">
+                <table border="0"
+                       cellspacing="0"
+                       cellpadding="0"
+                       class="leftmenu"
+                >
                   <tr>
                     <td>
                       <img rsrc:src="box_topleft.gif"/>
                       <img rsrc:src="box_left.gif"/>
                     </td>
                     <td width="100%">
-                      <table width="100%" border="0" cellspacing="2" cellpadding="" class="leftmenu">
+                      <table width="100%"
+                             border="0"
+                             cellspacing="2"
+                             cellpadding=""
+                             class="leftmenu"
+                      >
                         <tr>
                           <td>
                             <font class="skydockfont">
-                              <a var:href="userRootURL" class="skydockfont">SOGo (<var:string value="user.login" />)</a>
+                              <a var:href="userRootURL"
+                                 class="skydockfont"
+                              >SOGo (<var:string value="user.login" />)</a>
                             </font>
                           </td>
                         </tr>
                         <tr>
                           <td colspan="2">
-                            <table cellpadding="0" cellspacing="0" border="0" width="100%">
+                            <table cellpadding="0"
+                                   cellspacing="0"
+                                   border="0"
+                                   width="100%"
+                            >
                               <tr>
                                 <td class="linecolor">
                                   <img rsrc:src="line_left.gif"/>
                         <tr>
                           <td valign="middle">
                             <font class="skydockfont">
-                              <a var:href="userRootURL" class="skydockfont">News</a>
+                              <a var:href="userRootURL"
+                                 class="skydockfont"
+                              >Contacts</a>
                             </font>
                           </td>
                         </tr>
                         <tr>
                           <td valign="middle">
                             <font class="skydockfont">
-                              <a var:href="userRootURL" class="skydockfont">Projects</a>
-                            </font>
-                          </td>
-                        </tr>
-                        <tr>
-                          <td valign="middle">
-                            <font class="skydockfont">
-                              <a var:href="userRootURL" class="skydockfont">Contacts</a>
-                            </font>
-                          </td>
-                        </tr>
-                        <tr>
-                          <td valign="middle">
-                            <font class="skydockfont">
-                              <a var:href="userRootURL" class="skydockfont">Companies</a>
-                            </font>
-                          </td>
-                        </tr>
-                        <tr>
-                          <td valign="middle">
-                            <font class="skydockfont">
-                              <a var:href="calendarRootURL" class="skyDockFont">Calendar</a>
-                            </font>
-                          </td>
-                        </tr>
-                        <tr>
-                          <td valign="middle">
-                            <font class="skydockfont">
-                              <a var:href="userRootURL" class="skydockfont">Tasks</a>
+                              <a var:href="calendarRootURL"
+                                 class="skyDockFont"
+                              >Calendar</a>
                             </font>
                           </td>
                         </tr>
                     </td>
                   </tr>
                 </table>
-<!-- $Id: SkyDockedProjects.html,v 1.10 2004/05/07 16:05:03 helge Exp $ -->
               </td>
             </tr>
           </table>
           <br/>
-<!-- $Id: SkyFavorites.html,v 1.5 2003/10/29 18:06:00 helge Exp $ -->
-<!-- the misc box -->
           <span>
-            <table cellspacing="0" class="leftmenu" border="0" cellpadding="0">
+            <table cellspacing="0"
+                   class="leftmenu"
+                   border="0"
+                   cellpadding="0"
+            >
               <tr>
                 <td>
                   <img rsrc:src="box_topleft.gif"/>
                   <img rsrc:src="box_left.gif"/>
                 </td>
                 <td width="100%">
-                  <table width="100%" cellspacing="2" class="leftmenu" border="0" cellpadding="">
+                  <table width="100%"
+                         cellspacing="2"
+                         class="leftmenu"
+                         border="0"
+                         cellpadding=""
+                  >
                     <tr>
                       <td>
                         <font class="skydockfont">Misc</font>
                     </tr>
                     <tr>
                       <td colspan="2">
-                        <table width="100%" cellspacing="0" border="0" cellpadding="0">
+                        <table width="100%"
+                               cellspacing="0"
+                               border="0"
+                               cellpadding="0"
+                        >
                           <tr>
                             <td class="linecolor">
                               <img rsrc:src="line_left.gif"/>
                     </tr>
                     <tr>
                       <td valign="middle">
-                        <a var:href="userRootURL" class="skydockfont">New Email</a>
+                        <a var:href="userRootURL"
+                           class="skydockfont"
+                        >New Email</a>
                       </td>
                     </tr>
                     <tr>
                       <td valign="middle">
-                        <a var:href="userRootURL" class="skydockfont">Inbox</a>
+                        <a var:href="userRootURL"
+                           class="skydockfont"
+                        >Inbox</a>
                       </td>
                     </tr>
                     <tr>
                       <td valign="middle">
-                        <a var:href="userRootURL" class="skydockfont">Preferences</a>
+                        <a var:href="userRootURL"
+                           class="skydockfont"
+                        >Preferences</a>
                       </td>
                     </tr>
                     <tr>
                       <td valign="middle">
-                        <a var:href="userRootURL" target="private_desktop" class="skydockfont">Home</a>
+                        <a var:href="userRootURL"
+                           target="private_desktop"
+                           class="skydockfont"
+                        >Home</a>
                       </td>
                     </tr>
                     <tr>
                       <td valign="middle">
-                        <a var:href="userRootURL" target="public_desktop" class="skydockfont">Desktop</a>
+                        <a var:href="userRootURL"
+                           target="public_desktop"
+                           class="skydockfont"
+                        >Desktop</a>
                       </td>
                     </tr>
                     <tr>
                       <td valign="middle">
-                        <a var:href="userRootURL" class="skydockfont">Logout</a>
+                        <a var:href="userRootURL"
+                           class="skydockfont"
+                        >Logout</a>
                       </td>
                     </tr>
                   </table>
                 <font class="defaultfont"><var:entity const:name="copy"/>
                   2000-2004 <a href="http://www.skyrix.com:80/knoppix/skyrix/"
                                target="SKYRIX"
-                            >SKYRIX Software AG</a>. We welcome your <a href="http://www.opengroupware.org/en/feedback.html"
-                                                                        target="feedback"
-                                                                     >feedback</a>.
+                            >SKYRIX Software AG</a>.
+                  We welcome your
+                  <a href="http://www.opengroupware.org/en/feedback.html"
+                     target="feedback"
+                  >feedback</a>.
                 </font>
               </td>
               <td valign="top" align="right">
index fba951940e1bf466fb573629d6a4520f418f92cd..80d6d367ae02d6fe2da98dd960d66566ae7df337 100644 (file)
@@ -1,5 +1,5 @@
 # $Id: Version,v 1.1 2003/11/24 01:24:40 helge Exp $
 
-SUBMINOR_VERSION:=4
+SUBMINOR_VERSION:=5
 
 # 1.1.0 requires NGObjWeb 4.2.202
index 872e4376e1a281752380c99f4a7b598f20f7868a..5502c7c13f535da7643a944b02d03d1c8537a029 100644 (file)
@@ -1,3 +1,21 @@
+2004-08-02  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * v0.9.12
+       
+       * UIxCalMonthView.[hm]: fixed a nasty bug. Needed to add -startOfMonth to
+         overcome the problem associated with -startDate in the context of
+         month overview. -startDate is necessary for fetching the core infos and
+         almost always is member of the previous month. Also, -endDate isn't
+         necessarily in the same month we're talking about. I reworked this and
+         added some private category to NSCalendarDate which should be moved into
+         SxCore later on.
+       
+       * UIxCalMonthOverview.m: Use -startOfMonth instead of -startDate for all
+         calculations.
+
+       * UIxCalMonthOverview.wox: applied some pretty printing and added some
+         debugging info (commented out).
+
 2004-07-30  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * v0.9.11
index 68550fe75f7451f4e949afdedd6fb3a3acfc18e8..5d343807d3aa1c4832ae4a511bd3c4e9a1afe87f 100644 (file)
@@ -40,9 +40,9 @@
     
     self->weekOfYear = _week;
     if(_week == 52 || _week == 53)
-        date = [[self startDate] mondayOfWeek];
+        date = [[self startOfMonth] mondayOfWeek];
     else
-        date = [self startDate];
+        date = [self startOfMonth];
     date = [date mondayOfWeek:_week];
     [self setCurrentWeekStartDate:date];
 }
 }
 
 - (int)year {
-    return [[self startDate] yearOfCommonEra];
+    return [[self startOfMonth] yearOfCommonEra];
 }
 
 - (int)month {
-    return [[self startDate] monthOfYear];
+    return [[self startOfMonth] monthOfYear];
 }
 
 - (NSString *)localizedDayOfWeekName {
@@ -80,7 +80,7 @@
 - (NSString *)contentStyle {
     if([self->currentDay isToday])
         return @"monthoverview_content_hilite";
-    else if([self->currentDay monthOfYear] != [[self startDate] monthOfYear])
+    else if([self->currentDay monthOfYear] != [[self startOfMonth] monthOfYear])
         return @"monthoverview_content_dimmed";
     return @"monthoverview_content";
 }
index df1d41e0f830391090580d40b6fc8b5a154b1f83..b8dabadd417af02714188534fdd4fa46f83e6828 100644 (file)
@@ -7,7 +7,12 @@
                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%">
       <td id="skywinbodycell" class="wincontent">
         <table border="0" cellpadding="0" cellspacing="0" width="100%">
           <tr bgcolor="#e8e8e0">
-            <td align="left" valign="middle" width="80%">TODO: controls</td><!-- 99% -->
+            <td align="left"
+                valign="middle"
+                width="80%"
+            >TODO: controls</td><!-- 99% -->
             <td align="right">
               <var:component className="UIxCalBackForthNavView"
                              methodName="ownMethodName"
                     <td align="right" bgcolor="#e8e8e0">
                       <table border="0" cellpadding="0" cellspacing="1">
                         <tr>
-                          <td class="button_auto_env" nowrap="true" valign="middle" align="center">
+                          <td class="button_auto_env"
+                              nowrap="true"
+                              valign="middle"
+                              align="center"
+                          >
                             <a class="button_auto"
                                href="monthprintview"
                                var:queryDictionary="queryParameters"
                                target="SOGoPrintView"
                             ><var:string label:value="printview"/></a>
                           </td>
-                          <td class="button_auto_env" nowrap="true" valign="middle" align="center">
+                          <td class="button_auto_env"
+                              nowrap="true"
+                              valign="middle"
+                              align="center"
+                          >
                             <a class="button_auto"
                                href="proposal"
                                var:queryDictionary="queryParameters"
                       <br />
                     </var:foreach>
                   </var:month-info>
-                  <var:month-label const:orientation="top" dayOfWeek="dayOfWeek" const:class="monthoverview_title">
+                  <var:month-label const:orientation="top"
+                                   dayOfWeek="dayOfWeek"
+                                   const:class="monthoverview_title"
+                  >
                     <var:string value="localizedDayOfWeekName"/>
                   </var:month-label>
-                  <var:month-label const:orientation="left" weekOfYear="weekOfYear" class="weekStyle">
+                  <var:month-label const:orientation="left"
+                                   weekOfYear="weekOfYear"
+                                   class="weekStyle"
+                  >
                     <a href="weekoverview"
                        var:queryDictionary="currentWeekQueryParameters"
                     ><var:string value="weekOfYear"/></a>
   </table>
   <!--
   <hr />
+  start: <var:string value="startDate" /><br />
+  end: <var:string value="endDate" /><br />
+  -->
+  <!--
   SOGo Server - <var:string value="name"/>
   <br />
   Client: <var:string value="clientObject"/>
index de02a4c85b39b0baaf082d0758e8850d40ef9ce3..6fe2c99c82b70b42a8ebc6535f372aedad64836e 100644 (file)
@@ -15,6 +15,8 @@
 {
 }
 
+- (NSCalendarDate *)startOfMonth;
+
 - (NSDictionary *)prevMonthQueryParameters;
 - (NSDictionary *)nextMonthQueryParameters;
 
index 352a8c239119bf2829701ac53faabd58d7e3866f..056498625fe96571e9fd99177e2ad77ea120ca33 100644 (file)
@@ -5,20 +5,55 @@
 #include "common.h"
 
 
+@interface NSCalendarDate (UIxCalMonthViewExtensions)
+- (NSCalendarDate *)dayOfWeeK:(unsigned)_day
+             offsetFromSunday:(unsigned)_offset;
+- (NSCalendarDate *)sundayOfWeek;
+@end
+
+@implementation NSCalendarDate (UIxCalMonthViewExtensions)
+- (NSCalendarDate *)dayOfWeeK:(unsigned)_day
+                    offsetFromSunday:(unsigned)_offset
+{
+    unsigned dayOfWeek, distance;
+    
+    /* perform "locale" correction */
+    dayOfWeek = (7 + [self dayOfWeek] - _offset) % 7;
+
+    _day = (_day % 7);
+    if(_day == dayOfWeek)
+        return self;
+
+    distance = _day - dayOfWeek;
+    return [self dateByAddingYears:0 months:0 days:distance];
+}
+
+/* this implies that monday is the start of week! */
+- (NSCalendarDate *)sundayOfWeek {
+    return [self dayOfWeeK:6 offsetFromSunday:1];
+}
+@end
+
 @implementation UIxCalMonthView
 
+- (NSCalendarDate *)startOfMonth {
+    return [[[super startDate] firstDayOfMonth] beginOfDay];
+}
+
 - (NSCalendarDate *)startDate {
-  return [[[super startDate] firstDayOfMonth] beginOfDay];
+  return [[self startOfMonth] mondayOfWeek];
 }
 
 - (NSCalendarDate *)endDate {
-  NSCalendarDate *startDate = [[self startDate] endOfDay];
-  return [startDate dateByAddingYears:0
-                    months:0
-                    days:[startDate numberOfDaysInMonth]
-                    hours:0
-                    minutes:0
-                    seconds:0];
+  NSCalendarDate *date = [self startOfMonth];
+  date = [date dateByAddingYears:0
+               months:0
+               days:[date numberOfDaysInMonth]
+               hours:0
+               minutes:0
+               seconds:0];
+  date = [[date sundayOfWeek] endOfDay];
+  return date;
 }
 
 /* URLs */
 - (NSDictionary *)prevMonthQueryParameters {
     NSCalendarDate *date;
 
-    date = [[self startDate] dateByAddingYears:0
-                             months:-1
-                             days:0
-                             hours:0
-                             minutes:0
-                             seconds:0];
+    date = [[self startOfMonth] dateByAddingYears:0
+                                months:-1
+                                days:0
+                                hours:0
+                                minutes:0
+                                seconds:0];
     return [self queryParametersBySettingSelectedDate:date];
 }
 
 - (NSDictionary *)nextMonthQueryParameters {
     NSCalendarDate *date;
     
-    date = [[self startDate] dateByAddingYears:0
-                             months:1
-                             days:0
-                             hours:0
-                             minutes:0
-                             seconds:0];
+    date = [[self startOfMonth] dateByAddingYears:0
+                                months:1
+                                days:0
+                                hours:0
+                                minutes:0
+                                seconds:0];
     return [self queryParametersBySettingSelectedDate:date];
 }
 
index 33e7d461ceab0d78349cacbd008134563e71823f..a43cfafa717f0d818e898f8eff89194408a390fa 100644 (file)
@@ -1,5 +1,5 @@
 # $Id$
 
-SUBMINOR_VERSION:=11
+SUBMINOR_VERSION:=12
 
 # 1.1.0 requires NGObjWeb 4.2.202