]> err.no Git - scalable-opengroupware.org/commitdiff
finished printviews
authorznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Mon, 2 Aug 2004 16:27:35 +0000 (16:27 +0000)
committerznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Mon, 2 Aug 2004 16:27:35 +0000 (16:27 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@164 d1b88da0-ebda-0310-925b-ed51d893ca5b

13 files changed:
SOGo/UI/Common/ChangeLog
SOGo/UI/Common/UIxPrintPageFrame.wox
SOGo/UI/Common/Version
SOGo/UI/Common/calendar.css
SOGo/UI/Scheduler/ChangeLog
SOGo/UI/Scheduler/UIxCalDayPrintview.m
SOGo/UI/Scheduler/UIxCalDayPrintview.wox
SOGo/UI/Scheduler/UIxCalMonthPrintview.m
SOGo/UI/Scheduler/UIxCalMonthPrintview.wox
SOGo/UI/Scheduler/UIxCalWeekOverview.wox
SOGo/UI/Scheduler/UIxCalWeekPrintview.m
SOGo/UI/Scheduler/UIxCalWeekPrintview.wox
SOGo/UI/Scheduler/Version

index f071fefcfd1096521b1640fa16ae7b891f795227..b3ed0163f0c395f0285bfae148dca2a7677adc8f 100644 (file)
@@ -1,3 +1,11 @@
+2004-08-02  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * v0.9.6
+
+       * UIxPageFrame.wox: added javascript for onload action, some cosmetics
+
+       * calendar.css: added remaining CSS for printviews
+
 2004-08-02  Marcus Mueller  <znek@mulle-kybernetik.com>
 
        * UIxPageFrame.wox: removed some navigation items to avoid confusion.
index 75049cba1005f34c4fda07c061e4824ddd2ca857..36bd9bede420e217864f1b16d52d203318de3c83 100644 (file)
@@ -17,7 +17,7 @@
     <link href="mailto:hh@skyrix.com" rev="made"/>
   </head>
 
-  <body>
+  <body margin="10" onload="javascript:window.print()">
     <var:component-content/>
   </body>
 </html>
\ No newline at end of file
index 80d6d367ae02d6fe2da98dd960d66566ae7df337..0eb47da345be1d4c8ac5a363234ca3f2c77473cb 100644 (file)
@@ -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
index 04c3ac3d8944934a0b41722ffaf9f0eaccd32905..b71267fcaf9f49176604ca1868bf38c0fb792178 100644 (file)
@@ -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;
   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;
index 5502c7c13f535da7643a944b02d03d1c8537a029..4c9b43ddb7331669ab72de1dbb6029d49e4bca74 100644 (file)
@@ -1,3 +1,12 @@
+2004-08-02  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * 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  <znek@mulle-kybernetik.com>
 
        * v0.9.12
index 0386f9c17baa168f7c6d383c5afe62f1ef642c84..e564a5e12855f7dbb529d4fbea0e8408a05eb52d 100644 (file)
@@ -40,4 +40,9 @@
     return [[self startDate] descriptionWithCalendarFormat:fmt];
 }
 
+- (NSString *)owner {
+#warning ** TODO: owner
+    return @"TODO: owner";
+}
+
 @end
index 6e33ef6b5d2330e635f0c6fe5bda09614b08a028..63434e381ed4a9c4ddd7ea63d5ee79039a299379 100644 (file)
@@ -11,7 +11,7 @@
     <tr>
       <td colspan="2" align="center">
         <h1 class="dayprintview"><var:string value="title" /></h1>
-        <h2 class="dayprintview">TODO: owner</h2>
+        <h2 class="dayprintview"><var:string value="owner" /></h2>
       </td>
     </tr>
     <tr valign="top">
index 5689d8d67e1820b57e343dd19a9c2c3f1f556553..87eeca31b3a65f5eb60b27d56dccced0b4ae8fe5 100644 (file)
 
 #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:@"<span class=\"monthprintview_apt_time\">%02i:%02i",
+        [startDate hourOfDay],
+        [startDate minuteOfHour]];
+    if(spansRange) {
+        [aptDescr appendFormat:@" - %02i:%02i",
+            [endDate hourOfDay],
+            [endDate minuteOfHour]];
+    }
+    [aptDescr appendFormat:@"</span>,"];
+    s = [apt valueForKey:@"title"];
+    if(s) {
+        [aptDescr appendFormat:@"<br />%@", s];
+    }
+    s = [apt valueForKey:@"location"];
+    if(s) {
+        [aptDescr appendFormat:@"<br />%@", 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
index e868c7b58e8108fc62cfa857499735d2a03c2935..e4f470335b71aee16d747620b42ae177023ac28c 100644 (file)
                       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%"
   >
+    <var:month-label const:orientation="header"
+                     const:class="monthprintview_header"
+    >
+      <h1 class="monthprintview_header"><var:string value="title" /></h1>
+      <h2 class="monthprintview_header"><var:string value="owner" /></h2>
+    </var:month-label>
     <var:month-info>
       <var:if condition="hasHolidayInfo">
-        <var:string value="holidayInfo" const:class="monthoverview_holidayinfo"/>
+        <var:string value="holidayInfo"
+                    const:class="monthprintview_holidayinfo"
+        />
       </var:if>
       <var:foreach list="allDayApts" item="appointment">
-        <var:string value="shortTextForApt"/>
+        <var:string value="shortTextForApt"
+                    const:escapeHTML="NO"
+        />
         <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="monthprintview_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"
+                     const:class="monthprintview_week"
+    >
       <var:string value="weekOfYear"/>
     </var:month-label>
     <var:month-title class="contentStyle">
-      <span class="monthoverview_day">
-        <var:string value="currentDay.dayOfMonth"/>
-      </span>
+      <var:string value="currentDay.dayOfMonth"/>
     </var:month-title>
     <var:month>
-      <var:string value="shortTitleForApt"/>
-      <br />
+      <span const:class="monthprintview_apt">
+        <var:string value="shortTextForApt"
+                    const:escapeHTML="NO"
+        />
+        <br />
+      </span>
     </var:month>
   </var:month-overview>
 </var:component>
index 2db49a0a63d917a7b948c4d1d8d26561b3872be4..6be563d0414fcf70b633d670a11a240e0e5814cb 100644 (file)
               <a href="dayoverview"
                  var:queryDictionary="currentDayQueryParameters"
                  class="weekoverview_title_daylink"
-                 ><var:string value="currentDay.dayOfMonth" /></a>
+                 ><var:string value="currentDay.dayOfMonth"
+                              const:numberformat="02"
+                  /></a>
             </td>
             <td align="center" valign="top" width="97%">
               <var:string value="currentDayName" /><br />
index a7a7c084ed5d14c413284494d2662dbce5a26452..10685e13a588704b7bbc79bbf7a837b512592a44 100644 (file)
 
 @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:@"<span class=\"weekprintview_apt_time\">%02i:%02i",
+        [startDate hourOfDay],
+        [startDate minuteOfHour]];
+    if(spansRange) {
+        [aptDescr appendFormat:@" - %02i:%02i",
+            [endDate hourOfDay],
+            [endDate minuteOfHour]];
+    }
+    [aptDescr appendFormat:@"</span>,"];
+    s = [apt valueForKey:@"title"];
+    if(s) {
+        [aptDescr appendFormat:@"<br />%@", s];
+    }
+    s = [apt valueForKey:@"location"];
+    if(s) {
+        [aptDescr appendFormat:@"<br />%@", 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
index 2d4f1b72edda5f0040a2ecee5b3824d630762d59..a5137a902d785ad02dfad686bc6e7d560cee3a7d 100644 (file)
@@ -8,41 +8,68 @@
                className="UIxPrintPageFrame"
                title="title">
 
- <var:week-overview list="appointments"
-                     item="appointment"
-                     weekStart="startDate"
-                     dayIndex="dayIndex"
-                     const:startDateKey="startDate"
-                     const:endDateKey="endDate"
-                     const:titleStyle="weekoverview_title"
-                     contentStyle="contentStyle"
-  >
-    <var:week-title>
-      <table cellpadding="0" width="100%" border="0" cellspacing="0"
-             var:class="titleStyle">
-        <tr>
-          <td align="left" valign="top">
-            <var:string value="currentDay.dayOfMonth" />
-          </td>
-          <td align="center" valign="top" width="97%">
-            <var:string value="currentDayName" />
-          </td>
-        </tr>
-      </table>
-    </var:week-title>
-    <var:if condition="hasDayInfo">
-      <var:week-info>
-        <var:if condition="hasHolidayInfo">
-          <var:string value="holidayInfo" 
-        const:class="weekoverview_holidayinfo" />
+  <table border="0" cellpadding="0" cellspacing="0" width="100%">
+  <tr>
+    <td class="weekprintview">
+      <h1 class="weekprintview"><var:string value="title" /></h1>
+      <h2 class="weekprintview"><var:string value="owner" /></h2>
+    </td>
+  </tr>
+  <tr>
+    <td>
+      <var:week-overview list="appointments"
+                         item="appointment"
+                         weekStart="startDate"
+                         dayIndex="dayIndex"
+                         const:startDateKey="startDate"
+                         const:endDateKey="endDate"
+                         const:titleStyle="weekprintview_title"
+                         const:contentStyle="weekprintview_content"
+                         const:cellpadding="5"
+                         const:cellspacing="0"
+                         const:border="1"
+                         const:width="100%"
+      >
+        <var:week-title>
+          <table cellpadding="5"
+                 width="100%"
+                 border="0"
+                 cellspacing="0"
+                 class="weekprintview_title"
+          >
+            <tr>
+              <td align="left" valign="top">
+                <var:string value="currentDay.dayOfMonth"
+                            const:numberformat="02"
+                />
+              </td>
+              <td align="center" valign="top" width="97%">
+                <var:string value="currentDayName" />
+              </td>
+            </tr>
+          </table>
+        </var:week-title>
+        <var:if condition="hasDayInfo">
+          <var:week-info>
+            <var:if condition="hasHolidayInfo">
+              <var:string value="holidayInfo"
+                          const:class="weekprintview_holidayinfo"
+              />
+            </var:if>
+            <var:foreach list="allDayApts" item="appointment">
+              <var:string value="shortTextForApt"
+                          const:escapeHTML="NO"
+              />
+            </var:foreach>
+          </var:week-info>
         </var:if>
-        <var:foreach list="allDayApts" item="appointment">
-          <var:string value="shortTextForApt" />
-        </var:foreach>
-      </var:week-info>
-    </var:if>
-    <var:week>
-      <var:string value="shortTextForApt" /><br />
-    </var:week>
-  </var:week-overview>
+        <var:week>
+          <var:string value="shortTextForApt"
+                      const:escapeHTML="NO"
+          /> <br />
+        </var:week>
+      </var:week-overview>
+      </td>
+    </tr>
+  </table>
 </var:component>
index a43cfafa717f0d818e898f8eff89194408a390fa..92c8fa08c38f073a34665a077f87e34ece0ab9e3 100644 (file)
@@ -1,5 +1,3 @@
 # $Id$
 
-SUBMINOR_VERSION:=12
-
-# 1.1.0 requires NGObjWeb 4.2.202
+SUBMINOR_VERSION:=13