From: znek Date: Mon, 2 Aug 2004 12:59:28 +0000 (+0000) Subject: bugfixes X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06887d6a13505fd19aa7331652453221f79b606e;p=scalable-opengroupware.org bugfixes git-svn-id: http://svn.opengroupware.org/SOGo/trunk@163 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/SOGo/UI/Common/ChangeLog b/SOGo/UI/Common/ChangeLog index ba122877..f071fefc 100644 --- a/SOGo/UI/Common/ChangeLog +++ b/SOGo/UI/Common/ChangeLog @@ -1,3 +1,8 @@ +2004-08-02 Marcus Mueller + + * UIxPageFrame.wox: removed some navigation items to avoid confusion. + Also applied some pretty printing. (v0.9.5) + 2004-07-30 Marcus Mueller * v0.9.4 diff --git a/SOGo/UI/Common/UIxPageFrame.wox b/SOGo/UI/Common/UIxPageFrame.wox index 3d424da4..263c0d50 100644 --- a/SOGo/UI/Common/UIxPageFrame.wox +++ b/SOGo/UI/Common/UIxPageFrame.wox @@ -1,5 +1,9 @@ - + <var:string value="title"/> @@ -12,15 +16,6 @@ <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"> @@ -31,7 +26,12 @@ </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> @@ -55,9 +55,12 @@ <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"/> @@ -74,17 +77,28 @@ <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"/> @@ -105,42 +119,18 @@ <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> @@ -162,15 +152,16 @@ </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"/> @@ -187,7 +178,12 @@ <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> @@ -195,7 +191,11 @@ </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"/> @@ -215,32 +215,46 @@ </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> @@ -291,9 +305,11 @@ <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"> diff --git a/SOGo/UI/Common/Version b/SOGo/UI/Common/Version index fba95194..80d6d367 100644 --- a/SOGo/UI/Common/Version +++ b/SOGo/UI/Common/Version @@ -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 diff --git a/SOGo/UI/Scheduler/ChangeLog b/SOGo/UI/Scheduler/ChangeLog index 872e4376..5502c7c1 100644 --- a/SOGo/UI/Scheduler/ChangeLog +++ b/SOGo/UI/Scheduler/ChangeLog @@ -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 diff --git a/SOGo/UI/Scheduler/UIxCalMonthOverview.m b/SOGo/UI/Scheduler/UIxCalMonthOverview.m index 68550fe7..5d343807 100644 --- a/SOGo/UI/Scheduler/UIxCalMonthOverview.m +++ b/SOGo/UI/Scheduler/UIxCalMonthOverview.m @@ -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]; } @@ -52,11 +52,11 @@ } - (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"; } diff --git a/SOGo/UI/Scheduler/UIxCalMonthOverview.wox b/SOGo/UI/Scheduler/UIxCalMonthOverview.wox index df1d41e0..b8dabadd 100644 --- a/SOGo/UI/Scheduler/UIxCalMonthOverview.wox +++ b/SOGo/UI/Scheduler/UIxCalMonthOverview.wox @@ -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%"> @@ -31,7 +36,10 @@ <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" @@ -59,14 +67,22 @@ <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" @@ -99,10 +115,16 @@ <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> @@ -156,6 +178,10 @@ </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"/> diff --git a/SOGo/UI/Scheduler/UIxCalMonthView.h b/SOGo/UI/Scheduler/UIxCalMonthView.h index de02a4c8..6fe2c99c 100644 --- a/SOGo/UI/Scheduler/UIxCalMonthView.h +++ b/SOGo/UI/Scheduler/UIxCalMonthView.h @@ -15,6 +15,8 @@ { } +- (NSCalendarDate *)startOfMonth; + - (NSDictionary *)prevMonthQueryParameters; - (NSDictionary *)nextMonthQueryParameters; diff --git a/SOGo/UI/Scheduler/UIxCalMonthView.m b/SOGo/UI/Scheduler/UIxCalMonthView.m index 352a8c23..05649862 100644 --- a/SOGo/UI/Scheduler/UIxCalMonthView.m +++ b/SOGo/UI/Scheduler/UIxCalMonthView.m @@ -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 */ @@ -27,24 +62,24 @@ - (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]; } diff --git a/SOGo/UI/Scheduler/Version b/SOGo/UI/Scheduler/Version index 33e7d461..a43cfafa 100644 --- a/SOGo/UI/Scheduler/Version +++ b/SOGo/UI/Scheduler/Version @@ -1,5 +1,5 @@ # $Id$ -SUBMINOR_VERSION:=11 +SUBMINOR_VERSION:=12 # 1.1.0 requires NGObjWeb 4.2.202