From: znek Date: Wed, 16 Jun 2004 17:22:38 +0000 (+0000) Subject: new element OGoCalBackForthNavView, bugfixes, added functionality. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=987b534adc1d9ee73e1bc855685da22976c4c6a4;p=scalable-opengroupware.org new element OGoCalBackForthNavView, bugfixes, added functionality. git-svn-id: http://svn.opengroupware.org/SOGo/trunk@44 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/ZideStore/UI-X/ChangeLog b/ZideStore/UI-X/ChangeLog index 09655897..d3a8eec8 100644 --- a/ZideStore/UI-X/ChangeLog +++ b/ZideStore/UI-X/ChangeLog @@ -1,3 +1,15 @@ +2004-06-16 Marcus Mueller + + * 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 * Common/zidestoreui.css: new style for button_auto. diff --git a/ZideStore/UI-X/Common/OGoAppNavView.m b/ZideStore/UI-X/Common/OGoAppNavView.m index 7c6fe338..fa6c23c8 100644 --- a/ZideStore/UI-X/Common/OGoAppNavView.m +++ b/ZideStore/UI-X/Common/OGoAppNavView.m @@ -63,29 +63,41 @@ - (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]; } diff --git a/ZideStore/UI-X/Common/OGoAppNavView.wox b/ZideStore/UI-X/Common/OGoAppNavView.wox index f56d9667..6e924d43 100644 --- a/ZideStore/UI-X/Common/OGoAppNavView.wox +++ b/ZideStore/UI-X/Common/OGoAppNavView.wox @@ -6,13 +6,5 @@ xmlns:rsrc="OGo:url" class="defaultfont" > -You are here: - - -/ - - - - - - +You are here:/ + \ No newline at end of file diff --git a/ZideStore/UI-X/Common/OGoPageFrame.m b/ZideStore/UI-X/Common/OGoPageFrame.m index 2470ed45..13a8da99 100644 --- a/ZideStore/UI-X/Common/OGoPageFrame.m +++ b/ZideStore/UI-X/Common/OGoPageFrame.m @@ -1,6 +1,9 @@ // $Id: OGoPageFrame.m,v 1.2 2003/12/11 22:16:36 helge Exp $ #include +#include +#include + @interface OGoPageFrame : SoComponent { @@ -23,8 +26,19 @@ - (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 */ diff --git a/ZideStore/UI-X/Common/OGoPageFrame.wox b/ZideStore/UI-X/Common/OGoPageFrame.wox index 1d2516b2..7714442b 100644 --- a/ZideStore/UI-X/Common/OGoPageFrame.wox +++ b/ZideStore/UI-X/Common/OGoPageFrame.wox @@ -78,7 +78,7 @@ - OGo (znek) + SOGo () diff --git a/ZideStore/UI-X/Common/calendar.css b/ZideStore/UI-X/Common/calendar.css index 20bc8697..851e89d8 100644 --- a/ZideStore/UI-X/Common/calendar.css +++ b/ZideStore/UI-X/Common/calendar.css @@ -7,12 +7,12 @@ .weekoverview_title { color: #000000; - background-color: #AAAAAA; + background-color: #d2d2cc; } .weekoverview_content { color: #FFFFFF; - background-color: #DDDDDD; + background-color: #e8e8e0; } .weekoverview_content a { diff --git a/ZideStore/UI-X/Scheduler/GNUmakefile b/ZideStore/UI-X/Scheduler/GNUmakefile index 3dc43ea2..0579092b 100644 --- a/ZideStore/UI-X/Scheduler/GNUmakefile +++ b/ZideStore/UI-X/Scheduler/GNUmakefile @@ -20,6 +20,7 @@ SchedulerUI_OBJC_FILES = \ OGoAppointmentView.m \ OGoCalSelectTab.m \ OGoCalDateLabel.m \ + OGoCalBackForthNavView.m \ SchedulerUI_RESOURCE_FILES += \ Version \ @@ -31,6 +32,7 @@ SchedulerUI_RESOURCE_FILES += \ OGoAppointmentView.wox \ OGoCalSelectTab.wox \ OGoCalDateLabel.wox \ + OGoCalBackForthNavView.wox \ images/next_week.gif \ images/previous_week.gif \ images/icon_apt_chart.gif \ diff --git a/ZideStore/UI-X/Scheduler/OGoCalBackForthNavView.m b/ZideStore/UI-X/Scheduler/OGoCalBackForthNavView.m new file mode 100644 index 00000000..1b95fe14 --- /dev/null +++ b/ZideStore/UI-X/Scheduler/OGoCalBackForthNavView.m @@ -0,0 +1,40 @@ +/* + 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 + + +@interface OGoCalBackForthNavView : WOComponent +{ +} + +@end + + +@implementation OGoCalBackForthNavView + +- (BOOL)synchronizesVariablesWithBindings { + return NO; +} + +@end diff --git a/ZideStore/UI-X/Scheduler/OGoCalBackForthNavView.wox b/ZideStore/UI-X/Scheduler/OGoCalBackForthNavView.wox new file mode 100644 index 00000000..01d672e8 --- /dev/null +++ b/ZideStore/UI-X/Scheduler/OGoCalBackForthNavView.wox @@ -0,0 +1,20 @@ + + + + + + + + +
+ previous + + + + next +
\ No newline at end of file diff --git a/ZideStore/UI-X/Scheduler/OGoCalMonthOverview.wox b/ZideStore/UI-X/Scheduler/OGoCalMonthOverview.wox index 70e08a8e..ef612d31 100644 --- a/ZideStore/UI-X/Scheduler/OGoCalMonthOverview.wox +++ b/ZideStore/UI-X/Scheduler/OGoCalMonthOverview.wox @@ -24,23 +24,12 @@ - - - - + + + +
other stuff - - - - - - -
- previous month - thismonth - - next month -
-
TODO: controls + +
diff --git a/ZideStore/UI-X/Scheduler/OGoCalSelectTab.m b/ZideStore/UI-X/Scheduler/OGoCalSelectTab.m index 223a3129..f06d3f3a 100644 --- a/ZideStore/UI-X/Scheduler/OGoCalSelectTab.m +++ b/ZideStore/UI-X/Scheduler/OGoCalSelectTab.m @@ -31,6 +31,7 @@ NSCalendarDate *currentDate; } +- (BOOL)isCurrentDateInSameWeek; - (NSString *)completedLinkForOverview:(NSString *)_overview; @end @@ -64,16 +65,20 @@ /* 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"]; @@ -99,7 +104,9 @@ NSString *dateString; dateString = [[[self context] request] formValueForKey:@"startDate"]; - return [_overview stringByAppendingFormat:@"?startDate=%@", dateString]; + if(dateString) + return [_overview stringByAppendingFormat:@"?startDate=%@", dateString]; + return _overview; } - (NSString *)dayoverviewLink { diff --git a/ZideStore/UI-X/Scheduler/OGoCalWeekOverview.wox b/ZideStore/UI-X/Scheduler/OGoCalWeekOverview.wox index da13fc59..83a26a01 100644 --- a/ZideStore/UI-X/Scheduler/OGoCalWeekOverview.wox +++ b/ZideStore/UI-X/Scheduler/OGoCalWeekOverview.wox @@ -27,20 +27,9 @@ - +
other stuffTODO: controls - - - - - - -
- previous week - thisweek - - next week -
+
@@ -85,9 +74,9 @@ - - - + + + diff --git a/ZideStore/UI-X/Scheduler/product.plist b/ZideStore/UI-X/Scheduler/product.plist index 8051cd3e..7984ec7b 100644 --- a/ZideStore/UI-X/Scheduler/product.plist +++ b/ZideStore/UI-X/Scheduler/product.plist @@ -4,8 +4,6 @@ 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,