]> err.no Git - scalable-opengroupware.org/commitdiff
new element OGoCalBackForthNavView, bugfixes, added functionality.
authorznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Wed, 16 Jun 2004 17:22:38 +0000 (17:22 +0000)
committerznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Wed, 16 Jun 2004 17:22:38 +0000 (17:22 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@44 d1b88da0-ebda-0310-925b-ed51d893ca5b

13 files changed:
ZideStore/UI-X/ChangeLog
ZideStore/UI-X/Common/OGoAppNavView.m
ZideStore/UI-X/Common/OGoAppNavView.wox
ZideStore/UI-X/Common/OGoPageFrame.m
ZideStore/UI-X/Common/OGoPageFrame.wox
ZideStore/UI-X/Common/calendar.css
ZideStore/UI-X/Scheduler/GNUmakefile
ZideStore/UI-X/Scheduler/OGoCalBackForthNavView.m [new file with mode: 0644]
ZideStore/UI-X/Scheduler/OGoCalBackForthNavView.wox [new file with mode: 0644]
ZideStore/UI-X/Scheduler/OGoCalMonthOverview.wox
ZideStore/UI-X/Scheduler/OGoCalSelectTab.m
ZideStore/UI-X/Scheduler/OGoCalWeekOverview.wox
ZideStore/UI-X/Scheduler/product.plist

index 096558972b970e003e04dede9048f7e6748ebcad..d3a8eec8cb7c23b3510de651c6401df7d16f1ccd 100644 (file)
@@ -1,3 +1,15 @@
+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.
index 7c6fe3384095a70c9391714cd5281929991ed353..fa6c23c847d4fa49251480870f244a0d5405b143 100644 (file)
 - (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];
 }
 
index f56d9667236b022ad5fe0070de50d16fbec7f205..6e924d43ca803319f8b20efcced193ae59ac2947 100644 (file)
@@ -6,13 +6,5 @@
       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
index 2470ed45d861f8b64e47ef868749ba0511dac637..13a8da995d95d25bf4a73f66d76a88f54b50dfe9 100644 (file)
@@ -1,6 +1,9 @@
 // $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 */
index 1d2516b252d7b8e02fd23e75b1adf284ecf06a9a..7714442b8944f341df70ef56e31451de81da6002 100644 (file)
@@ -78,7 +78,7 @@
                         <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>
index 20bc8697ebc9ea99d2fd852b7511802e64590018..851e89d8662baff8ae3819ae786d1956ce08ef57 100644 (file)
@@ -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 {
index 3dc43ea204a89c1fbc25575c5ad21f23a81382b1..0579092b3414e949b581dc867d91aa72e5f5a8d7 100644 (file)
@@ -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 (file)
index 0000000..1b95fe1
--- /dev/null
@@ -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 <NGObjWeb/NGObjWeb.h>
+
+
+@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 (file)
index 0000000..01d672e
--- /dev/null
@@ -0,0 +1,20 @@
+<?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
index 70e08a8e445f0e745ef7ebf7fbca73698f04568e..ef612d319d2849a954c0839b7d0f58aa6b8615b1 100644 (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>
index 223a3129ca7eab01140371ac9c86ef9db92cf3a6..f06d3f3a1e162a129afecefe3e1c9ade13142d07 100644 (file)
@@ -31,6 +31,7 @@
     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 {
index da13fc596a9e8716c89db880c1806548ab320750..83a26a012b857fdd152816869c890742a014de50 100644 (file)
   <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>
@@ -85,9 +74,9 @@
         </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>
index 8051cd3eb6bebe769cc326669deb21f296af3221..7984ec7b1de78601cbd671fce3203d916c01abc7 100644 (file)
@@ -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,