+2004-06-16 Marcus Mueller <znek@mulle-kybernetik.com>
+
+ * Common/OGoAppNavView.m: construct URL correctly.
+
+ * Common/OGoPageFrame.m: display login correctly.
+
+ * Common/calendar.css: cosmetic changes.
+
+ * Scheduler/OGoCalSelectTab.m: always display mondayOfWeek.
+
+ * Scheduler/OGoCalBackForthNavView.m: created.
+
2004-06-16 Marcus Mueller <znek@mulle-kybernetik.com>
* Common/zidestoreui.css: new style for button_auto.
- (NSArray *)navPathElements {
NSArray *traversalObjects;
NSMutableArray *navPathComponents;
- int i, count;
-
+ NSMutableString *navURL;
+ unsigned int i, count;
+
traversalObjects = [[self context] objectTraversalStack];
- count = [traversalObjects count];
+ count = ([traversalObjects count] - 1); /* remove SoPageInvocation */
navPathComponents = [[NSMutableArray alloc] initWithCapacity:count];
+ navURL = [[NSMutableString alloc] initWithString:@"/"];
+
for(i = 0; i < count; i++) {
- NSMutableDictionary *c;
- NSString *name;
+ NSString *name, *url;
id obj;
obj = [traversalObjects objectAtIndex:i];
- c = [[NSMutableDictionary alloc] initWithCapacity:2];
name = [obj davDisplayName];
if(!name)
name = NSStringFromClass([obj class]);
- [c setObject:name forKey:@"name"];
- [c setObject:@"/foo" forKey:@"url"];
- [navPathComponents addObject:c];
- [c release];
+
+ [navURL appendString:name];
+ [navURL appendString:@"/"];
+
+ if(! [name hasPrefix:@"ZideStore"]) {
+ NSMutableDictionary *c;
+
+ c = [[NSMutableDictionary alloc] initWithCapacity:2];
+ [c setObject:name forKey:@"name"];
+ url = [navURL copy];
+ [c setObject:url forKey:@"url"];
+ [url release];
+ [navPathComponents addObject:c];
+ [c release];
+ }
}
- if(count > 0)
- [self setLastElement:[navPathComponents objectAtIndex:count - 1]];
+
+ [self setLastElement:[navPathComponents lastObject]];
return [navPathComponents autorelease];
}
xmlns:rsrc="OGo:url"
class="defaultfont"
>
-<b>You are here:</b>
-<var:foreach list="navPathElements" item="element">
-<var:if condition="element" value="lastElement" const:negate="YES">
-<a var:href="element.url"><var:string value="element.name" /></a><var:entity const:name="nbsp" />/<var:entity const:name="nbsp" />
-</var:if>
-<var:if condition="element" value="lastElement">
-<var:string value="element.name" />
-</var:if>
-</var:foreach>
-</font>
+<b>You are here:</b><var:entity const:name="nbsp" /><var:foreach list="navPathElements" item="element"><var:if condition="element" value="lastElement" const:negate="YES"><a var:href="element.url"><var:string value="element.name" /></a><var:entity const:name="nbsp" />/<var:entity const:name="nbsp" /></var:if><var:if condition="element" value="lastElement"><var:string value="element.name" /></var:if></var:foreach>
+</font>
\ No newline at end of file
// $Id: OGoPageFrame.m,v 1.2 2003/12/11 22:16:36 helge Exp $
#include <NGObjWeb/SoComponent.h>
+#include <NGObjWeb/SoHTTPAuthenticator.h>
+#include <NGObjWeb/SoUser.h>
+
@interface OGoPageFrame : SoComponent
{
- (void)setTitle:(NSString *)_value {
ASSIGN(self->title, _value);
}
+
- (NSString *)title {
return self->title;
}
+- (NSString *)login {
+ WOContext *ctx;
+ SoUser *user;
+
+ ctx = [self context];
+ user = [[[self clientObject] authenticatorInContext:ctx]
+ userInContext:ctx];
+ return [user login];
+}
+
@end /* OGoPageFrame */
<tr>
<td>
<font class="skydockfont">
- <a href="/OpenGroupware/x/dock" class="skydockfont">OGo (znek)</a>
+ <a href="/ZideStore/" class="skydockfont">SOGo (<var:string value="login" />)</a>
</font>
</td>
</tr>
.weekoverview_title {
color: #000000;
- background-color: #AAAAAA;
+ background-color: #d2d2cc;
}
.weekoverview_content {
color: #FFFFFF;
- background-color: #DDDDDD;
+ background-color: #e8e8e0;
}
.weekoverview_content a {
OGoAppointmentView.m \
OGoCalSelectTab.m \
OGoCalDateLabel.m \
+ OGoCalBackForthNavView.m \
SchedulerUI_RESOURCE_FILES += \
Version \
OGoAppointmentView.wox \
OGoCalSelectTab.wox \
OGoCalDateLabel.wox \
+ OGoCalBackForthNavView.wox \
images/next_week.gif \
images/previous_week.gif \
images/icon_apt_chart.gif \
--- /dev/null
+/*
+ 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 OGoCalBackForthNavView : WOComponent
+{
+}
+
+@end
+
+
+@implementation OGoCalBackForthNavView
+
+- (BOOL)synchronizesVariablesWithBindings {
+ return NO;
+}
+
+@end
--- /dev/null
+<?xml version='1.0' standalone='yes'?>
+
+<table 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"
+ border="0"
+ >
+ <tr>
+ <td align="right" valign="middle">
+ <a var:href="^prevURL"><img rsrc:src="previous_week.gif" alt="previous" border="0"/></a>
+ </td>
+ <td align="right" valign="middle" class="button_auto_env">
+ <a var:href="^currentURL" class="button_auto"><var:string value="^label" escapeHTML="NO" /></a>
+ </td>
+ <td align="right" valign="middle">
+ <a var:href="^nextURL"><img rsrc:src="next_week.gif" alt="next" border="0"/></a>
+ </td>
+ </tr>
+</table>
\ No newline at end of file
<tr>
<td id="skywinbodycell" class="wincontent">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tr bgcolor="#E0E0E0">
- <td align="left" valign="middle" width="80%">other stuff</td><!-- 99% -->
- <td align="right">
- <table border="0">
- <tr>
- <td align="right" valign="middle">
- <a var:href="prevMonthURL"><img src="/ZideStore/so/ControlPanel/Products/SchedulerUI/Resources/previous_week.gif" alt="previous month" border="0"/></a></td>
- <td align="right" valign="middle">
- <a var:href="thisMonthURL" class="button_auto">this<var:entity const:name="nbsp"/>month</a>
- </td>
- <td align="right" valign="middle">
- <a var:href="nextMonthURL"><img src="/ZideStore/so/ControlPanel/Products/SchedulerUI/Resources/next_week.gif" alt="next month" border="0"/></a>
- </td>
- </tr>
- </table>
- </td>
- </tr>
+ <tr bgcolor="#e8e8e0">
+ <td align="left" valign="middle" width="80%">TODO: controls</td><!-- 99% -->
+ <td align="right">
+ <var:component className="OGoCalBackForthNavView" prevURL="prevMonthURL" currentURL="thisMonthURL" nextURL="nextMonthURL" const:label="this month" />
+ </td>
+ </tr>
</table>
</td>
</tr>
NSCalendarDate *currentDate;
}
+- (BOOL)isCurrentDateInSameWeek;
- (NSString *)completedLinkForOverview:(NSString *)_overview;
@end
/* labels */
+- (BOOL)isCurrentDateInSameWeek {
+ return [self->currentDate isDateInSameWeek:[NSCalendarDate date]];
+}
+
- (NSString *)dayLabel {
NSCalendarDate *date;
- if([[self selection] isEqualToString:@"day"]) {
- date = self->currentDate;
- }
- else {
- date = [NSCalendarDate date];
- if(! [self->currentDate isDateInSameWeek:date])
- date = [self->currentDate mondayOfWeek];
+ date = self->currentDate;
+
+ if(! [[self selection] isEqualToString:@"day"]) {
+#if 0
+ if(! [self isCurrentDateInSameWeek])
+#endif
+ date = [date mondayOfWeek];
}
return [date descriptionWithCalendarFormat:@"%d"];
NSString *dateString;
dateString = [[[self context] request] formValueForKey:@"startDate"];
- return [_overview stringByAppendingFormat:@"?startDate=%@", dateString];
+ if(dateString)
+ return [_overview stringByAppendingFormat:@"?startDate=%@", dateString];
+ return _overview;
}
- (NSString *)dayoverviewLink {
<td id="skywinbodycell" class="wincontent">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr bgcolor="#e8e8e0">
- <td align="left" valign="middle" width="80%">other stuff</td><!-- 99% -->
+ <td align="left" valign="middle" width="80%">TODO: controls</td><!-- 99% -->
<td align="right">
- <table border="0">
- <tr>
- <td align="right" valign="middle">
- <a var:href="prevWeekURL"><img rsrc:src="previous_week.gif" alt="previous week" border="0"/></a></td>
- <td align="right" valign="middle" class="button_auto_env">
- <a var:href="thisWeekURL" class="button_auto">this<var:entity const:name="nbsp"/>week</a>
- </td>
- <td align="right" valign="middle">
- <a var:href="nextWeekURL"><img rsrc:src="next_week.gif" alt="next week" border="0"/></a>
- </td>
- </tr>
- </table>
+ <var:component className="OGoCalBackForthNavView" prevURL="prevWeekURL" currentURL="thisWeekURL" nextURL="nextWeekURL" const:label="this week" />
</td>
</tr>
</table>
</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>
- <a var:href="appointmentViewURL"><var:string value="appointment.title"/></a>
- </var:week>
+ <var:week>
+ <a var:href="appointmentViewURL"><var:string value="appointment.title"/></a>
+ </var:week>
</var:week-overview>
</var:component>
</td>
publicResources = (
previous_week.gif,
next_week.gif,
- next_week.gif,
- previous_week.gif,
icon_apt_chart.gif,
icon_apt_overview.gif,
icon_apt_chart_inactive.gif,