From 16956749f83d5ea3c3ef2d30c6f8f8538980c97f Mon Sep 17 00:00:00 2001 From: znek Date: Mon, 2 Aug 2004 16:27:35 +0000 Subject: [PATCH] finished printviews git-svn-id: http://svn.opengroupware.org/SOGo/trunk@164 d1b88da0-ebda-0310-925b-ed51d893ca5b --- SOGo/UI/Common/ChangeLog | 8 ++ SOGo/UI/Common/UIxPrintPageFrame.wox | 2 +- SOGo/UI/Common/Version | 6 +- SOGo/UI/Common/calendar.css | 123 ++++++++++++++++++++- SOGo/UI/Scheduler/ChangeLog | 9 ++ SOGo/UI/Scheduler/UIxCalDayPrintview.m | 5 + SOGo/UI/Scheduler/UIxCalDayPrintview.wox | 2 +- SOGo/UI/Scheduler/UIxCalMonthPrintview.m | 62 ++++++++++- SOGo/UI/Scheduler/UIxCalMonthPrintview.wox | 41 +++++-- SOGo/UI/Scheduler/UIxCalWeekOverview.wox | 4 +- SOGo/UI/Scheduler/UIxCalWeekPrintview.m | 79 +++++++++++++ SOGo/UI/Scheduler/UIxCalWeekPrintview.wox | 99 +++++++++++------ SOGo/UI/Scheduler/Version | 4 +- 13 files changed, 386 insertions(+), 58 deletions(-) diff --git a/SOGo/UI/Common/ChangeLog b/SOGo/UI/Common/ChangeLog index f071fefc..b3ed0163 100644 --- a/SOGo/UI/Common/ChangeLog +++ b/SOGo/UI/Common/ChangeLog @@ -1,3 +1,11 @@ +2004-08-02 Marcus Mueller + + * v0.9.6 + + * UIxPageFrame.wox: added javascript for onload action, some cosmetics + + * calendar.css: added remaining CSS for printviews + 2004-08-02 Marcus Mueller * UIxPageFrame.wox: removed some navigation items to avoid confusion. diff --git a/SOGo/UI/Common/UIxPrintPageFrame.wox b/SOGo/UI/Common/UIxPrintPageFrame.wox index 75049cba..36bd9bed 100644 --- a/SOGo/UI/Common/UIxPrintPageFrame.wox +++ b/SOGo/UI/Common/UIxPrintPageFrame.wox @@ -17,7 +17,7 @@ - + \ No newline at end of file diff --git a/SOGo/UI/Common/Version b/SOGo/UI/Common/Version index 80d6d367..0eb47da3 100644 --- a/SOGo/UI/Common/Version +++ b/SOGo/UI/Common/Version @@ -1,5 +1,3 @@ -# $Id: Version,v 1.1 2003/11/24 01:24:40 helge Exp $ +# $Id$ -SUBMINOR_VERSION:=5 - -# 1.1.0 requires NGObjWeb 4.2.202 +SUBMINOR_VERSION:=6 diff --git a/SOGo/UI/Common/calendar.css b/SOGo/UI/Common/calendar.css index 04c3ac3d..b71267fc 100644 --- a/SOGo/UI/Common/calendar.css +++ b/SOGo/UI/Common/calendar.css @@ -12,6 +12,9 @@ } +/* day overview */ + + .dayoverview_content { padding: 1px; margin: 0px 0px 0px 0px; @@ -45,7 +48,6 @@ vertical-align: top; } - .dayoverview_cal { color: #000000; font-family: Arial, Helvetica, Verdana, Geneva, Tahoma, sans-serif; @@ -132,6 +134,10 @@ color: #5a5a5a; } + +/* day printview */ + + .dayprintview { font-family: Arial, Helvetica, Verdana, Geneva, Tahoma, sans-serif; letter-spacing: 0pt; @@ -161,6 +167,10 @@ h1.dayprintview { font-style: italic; } + +/* week overview */ + + .weekoverview_title { font-size: 10pt; font-family: Arial, Helvetica, Verdana, Geneva, Tahoma, sans-serif; @@ -227,6 +237,9 @@ h1.dayprintview { } +/* week columnsview */ + + .weekcolumnsview { } @@ -381,6 +394,55 @@ h1.dayprintview { } +/* week printview */ + +td.weekprintview { + border: 1px solid; +} + +h1.weekprintview, h2.weekprintview { + font-size: 10pt; + font-weight: bold; + margin: 0px; + padding: 0px; + text-align: center; +} + +h1.weekprintview { + font-size: 12pt; + font-style: italic; +} + + +.weekprintview_title { + font-size: 11pt; + font-family: Arial, Helvetica, Verdana, Geneva, Tahoma, sans-serif; + letter-spacing: 0pt; +} + +.weekprintview_title_hilite a { + color: #0033cc; + text-decoration: none; +} + +.weekprintview_holidayinfo { + font-size: 10pt; + font-weight: bold; +} + +.weekprintview_content, .weekprintview_apt_time { + font-size: 10pt; +} + +.weekprintview_apt_time { + font-weight: bold; + font-style: italic; +} + + +/* month overview */ + + .monthoverview { color: #000000; font-family: Arial, Helvetica, Verdana, Geneva, Tahoma, sans-serif; @@ -496,6 +558,65 @@ h1.dayprintview { font-weight: normal; } +/* month printview */ + +.monthprintview { + font-family: Arial, Helvetica, Verdana, Geneva, Tahoma, sans-serif; + letter-spacing: 0pt; + font-size: 9pt; +} + +h1.monthprintview_header, h2.monthprintview_header { + font-size: 10pt; + font-weight: bold; + margin: 0px; + padding: 0px; + text-align: center; +} + +h1.monthprintview_header { + font-size: 12pt; + font-style: italic; +} + +.monthprintview_title { + text-align: center; +} + +.monthprintview_week { + width: 16pt; + text-align: center; + vertical-align: middle; +} + +.monthprintview_apt, .monthprintview_apt_time { + font-size: 7pt; +} + +.monthprintview_apt_time { + font-weight: bold; + font-style: italic; +} + +td.monthprintview_content { + text-align: left; + vertical-align: top; + font-style: italic; + font-weight: bold; + font-size: 12pt; + height: 60; +} + +td.monthprintview_content_dimmed { + text-align: left; + vertical-align: top; + font-size: 12pt; + height: 60; +} + + +/* year overview */ + .yearoverview { color: #000000; diff --git a/SOGo/UI/Scheduler/ChangeLog b/SOGo/UI/Scheduler/ChangeLog index 5502c7c1..4c9b43dd 100644 --- a/SOGo/UI/Scheduler/ChangeLog +++ b/SOGo/UI/Scheduler/ChangeLog @@ -1,3 +1,12 @@ +2004-08-02 Marcus Mueller + + * v0.9.13 + + * UIxCalDayPrintview.[m|wox], UIxCalWeekPrintview.[m|wox], + UIxCalMonthPrintview.[m|wox]: finished print views. + + * UIxCalWeekOverview.wox: added numberformat for days. + 2004-08-02 Marcus Mueller * v0.9.12 diff --git a/SOGo/UI/Scheduler/UIxCalDayPrintview.m b/SOGo/UI/Scheduler/UIxCalDayPrintview.m index 0386f9c1..e564a5e1 100644 --- a/SOGo/UI/Scheduler/UIxCalDayPrintview.m +++ b/SOGo/UI/Scheduler/UIxCalDayPrintview.m @@ -40,4 +40,9 @@ return [[self startDate] descriptionWithCalendarFormat:fmt]; } +- (NSString *)owner { +#warning ** TODO: owner + return @"TODO: owner"; +} + @end diff --git a/SOGo/UI/Scheduler/UIxCalDayPrintview.wox b/SOGo/UI/Scheduler/UIxCalDayPrintview.wox index 6e33ef6b..63434e38 100644 --- a/SOGo/UI/Scheduler/UIxCalDayPrintview.wox +++ b/SOGo/UI/Scheduler/UIxCalDayPrintview.wox @@ -11,7 +11,7 @@

-

TODO: owner

+

diff --git a/SOGo/UI/Scheduler/UIxCalMonthPrintview.m b/SOGo/UI/Scheduler/UIxCalMonthPrintview.m index 5689d8d6..87eeca31 100644 --- a/SOGo/UI/Scheduler/UIxCalMonthPrintview.m +++ b/SOGo/UI/Scheduler/UIxCalMonthPrintview.m @@ -23,14 +23,74 @@ #include "UIxCalMonthOverview.h" - @interface UIxCalMonthPrintview : UIxCalMonthOverview { } @end +#include "common.h" @implementation UIxCalMonthPrintview +- (NSString *)shortTextForApt { + NSCalendarDate *startDate, *endDate; + NSMutableString *aptDescr; + NSString *s; + BOOL spansRange; + id apt; + + apt = [self appointment]; + spansRange = NO; + startDate = [apt valueForKey:@"startDate"]; + [startDate setTimeZone:[self viewTimeZone]]; + endDate = [apt valueForKey:@"endDate"]; + if(endDate != nil) { + [endDate setTimeZone:[self viewTimeZone]]; + spansRange = ![endDate isEqualToDate:startDate]; + } + aptDescr = [[NSMutableString alloc] init]; + [aptDescr appendFormat:@"%02i:%02i", + [startDate hourOfDay], + [startDate minuteOfHour]]; + if(spansRange) { + [aptDescr appendFormat:@" - %02i:%02i", + [endDate hourOfDay], + [endDate minuteOfHour]]; + } + [aptDescr appendFormat:@","]; + s = [apt valueForKey:@"title"]; + if(s) { + [aptDescr appendFormat:@"
%@", s]; + } + s = [apt valueForKey:@"location"]; + if(s) { + [aptDescr appendFormat:@"
%@", s]; + } + return [aptDescr autorelease]; +} + +- (NSString *)title { + NSCalendarDate *date; + + date = [self startOfMonth]; + return [NSString stringWithFormat:@"%@ %d", + [self localizedNameForMonthOfYear:[date monthOfYear]], + [date yearOfCommonEra]]; +} + +- (NSString *)owner { +#warning ** TODO: owner + return @"TODO: owner"; +} + +/* style sheet */ + + +- (NSString *)contentStyle { + if([self->currentDay monthOfYear] != [[self startOfMonth] monthOfYear]) + return @"monthprintview_content_dimmed"; + return @"monthprintview_content"; +} + @end diff --git a/SOGo/UI/Scheduler/UIxCalMonthPrintview.wox b/SOGo/UI/Scheduler/UIxCalMonthPrintview.wox index e868c7b5..e4f47033 100644 --- a/SOGo/UI/Scheduler/UIxCalMonthPrintview.wox +++ b/SOGo/UI/Scheduler/UIxCalMonthPrintview.wox @@ -15,33 +15,54 @@ month="month" const:startDateKey="startDate" const:endDateKey="endDate" - const:class="monthoverview" + const:class="monthprintview" contentStyle="contentStyle" + const:cellpadding="5" + const:cellspacing="0" + const:border="1" const:width="100%" > + +

+

+
- + - +
- + - + - - - + - -
+ + +
+
diff --git a/SOGo/UI/Scheduler/UIxCalWeekOverview.wox b/SOGo/UI/Scheduler/UIxCalWeekOverview.wox index 2db49a0a..6be563d0 100644 --- a/SOGo/UI/Scheduler/UIxCalWeekOverview.wox +++ b/SOGo/UI/Scheduler/UIxCalWeekOverview.wox @@ -132,7 +132,9 @@ + >
diff --git a/SOGo/UI/Scheduler/UIxCalWeekPrintview.m b/SOGo/UI/Scheduler/UIxCalWeekPrintview.m index a7a7c084..10685e13 100644 --- a/SOGo/UI/Scheduler/UIxCalWeekPrintview.m +++ b/SOGo/UI/Scheduler/UIxCalWeekPrintview.m @@ -30,7 +30,86 @@ @end +#include "common.h" @implementation UIxCalWeekPrintview +- (NSString *)shortTextForApt { + NSCalendarDate *startDate, *endDate; + NSMutableString *aptDescr; + NSString *s; + BOOL spansRange; + id apt; + + apt = [self appointment]; + spansRange = NO; + startDate = [apt valueForKey:@"startDate"]; + [startDate setTimeZone:[self viewTimeZone]]; + endDate = [apt valueForKey:@"endDate"]; + if(endDate != nil) { + [endDate setTimeZone:[self viewTimeZone]]; + spansRange = ![endDate isEqualToDate:startDate]; + } + aptDescr = [[NSMutableString alloc] init]; + [aptDescr appendFormat:@"%02i:%02i", + [startDate hourOfDay], + [startDate minuteOfHour]]; + if(spansRange) { + [aptDescr appendFormat:@" - %02i:%02i", + [endDate hourOfDay], + [endDate minuteOfHour]]; + } + [aptDescr appendFormat:@","]; + s = [apt valueForKey:@"title"]; + if(s) { + [aptDescr appendFormat:@"
%@", s]; + } + s = [apt valueForKey:@"location"]; + if(s) { + [aptDescr appendFormat:@"
%@", s]; + } + return [aptDescr autorelease]; +} + +- (NSString *)title { + NSMutableString *title; + NSCalendarDate *date; + + date = [self startDate]; + title = [[NSMutableString alloc] init]; + [title appendFormat:@"%@ %d", + [self localizedNameForMonthOfYear:[date monthOfYear]], + [date yearOfCommonEra]]; + if([date monthOfYear] != [[self endDate] monthOfYear]) { + [title appendFormat:@" / %@ %d", + [self localizedNameForMonthOfYear:[[self endDate] monthOfYear]], + [[self endDate] yearOfCommonEra]]; + } + [title appendFormat:@", %@ %d", + [self labelForKey:@"Week"], + [date weekOfYear]]; + + return [title autorelease]; + +} + +- (NSString *)owner { +#warning ** TODO: owner + return @"TODO: owner"; +} + +/* style sheet */ + +- (NSString *)titleStyle { + if([self->currentDay isToday]) + return @"weekoverview_title_hilite"; + return @"weekoverview_title"; +} + +- (NSString *)contentStyle { + if([self->currentDay isToday]) + return @"weekoverview_content_hilite"; + return @"weekoverview_content"; +} + @end diff --git a/SOGo/UI/Scheduler/UIxCalWeekPrintview.wox b/SOGo/UI/Scheduler/UIxCalWeekPrintview.wox index 2d4f1b72..a5137a90 100644 --- a/SOGo/UI/Scheduler/UIxCalWeekPrintview.wox +++ b/SOGo/UI/Scheduler/UIxCalWeekPrintview.wox @@ -8,41 +8,68 @@ className="UIxPrintPageFrame" title="title"> - - - - - - - -
- - - -
-
- - - - + + + + + + + +
+

+

+
+ + + + + + + +
+ + + +
+
+ + + + + + + + + - - - - - - -
-
-
+ +
+
+ +
diff --git a/SOGo/UI/Scheduler/Version b/SOGo/UI/Scheduler/Version index a43cfafa..92c8fa08 100644 --- a/SOGo/UI/Scheduler/Version +++ b/SOGo/UI/Scheduler/Version @@ -1,5 +1,3 @@ # $Id$ -SUBMINOR_VERSION:=12 - -# 1.1.0 requires NGObjWeb 4.2.202 +SUBMINOR_VERSION:=13 -- 2.39.5