]> err.no Git - scalable-opengroupware.org/commitdiff
More eye candy. First incarnation of href for UIxTabItem.
authorznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Fri, 11 Jun 2004 15:47:50 +0000 (15:47 +0000)
committerznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Fri, 11 Jun 2004 15:47:50 +0000 (15:47 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@31 d1b88da0-ebda-0310-925b-ed51d893ca5b

ZideStore/UI-X/Common/GNUmakefile
ZideStore/UI-X/Common/OGoAppNavView.m [new file with mode: 0644]
ZideStore/UI-X/Common/OGoAppNavView.wox [new file with mode: 0644]
ZideStore/UI-X/Common/OGoPageFrame.wox
ZideStore/UI-X/Common/OGoWinClose.m [new file with mode: 0644]
ZideStore/UI-X/Common/OGoWinClose.wox [new file with mode: 0644]
ZideStore/UI-X/Common/UIxTabItem.m
ZideStore/UI-X/Common/UIxTabView.h
ZideStore/UI-X/Common/UIxTabView.m
ZideStore/UI-X/Common/bundle-info.plist
ZideStore/UI-X/Scheduler/OGoCalWeekOverview.wox

index f713025bc94c9fb9c8c889f26f89fb37a560584b..167a858a3dd47f8e45313f7f3f79a724d139a2e4 100644 (file)
@@ -14,6 +14,8 @@ CommonUI_OBJC_FILES = \
        OGoAppFrame.m           \
        OGoAppHeader.m          \
        OGoAppNavigation.m      \
+       OGoWinClose.m   \
+       OGoAppNavView.m \
        \
        UIxElemBuilder.m \
        UIxTabView.m \
@@ -26,6 +28,8 @@ CommonUI_RESOURCE_FILES += \
        OGoAppFrame.wox         \
        OGoAppHeader.wox        \
        OGoAppNavigation.wox    \
+       OGoWinClose.wox \
+       OGoAppNavView.wox \
        \
        zidestoreui.css         \
        calendar.css            \
diff --git a/ZideStore/UI-X/Common/OGoAppNavView.m b/ZideStore/UI-X/Common/OGoAppNavView.m
new file mode 100644 (file)
index 0000000..7c6fe33
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+  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$
+
+
+#import <NGObjWeb/NGObjWeb.h>
+#import <NGObjWeb/SoObject+SoDAV.h>
+#import <NGObjWeb/WOContext+SoObjects.h>
+#import <Foundation/Foundation.h>
+
+
+@interface OGoAppNavView : WOComponent
+{
+    id element;
+    id lastElement;
+}
+
+@end
+
+
+@implementation OGoAppNavView
+
+- (void)dealloc {
+    [self->element release];
+    [self->lastElement release];
+    [super dealloc];
+}
+
+- (void)setElement:(id)_element {
+    ASSIGN(self->element, _element);
+}
+
+- (id)element {
+    return self->element;
+}
+
+- (void)setLastElement:(id)_element {
+    ASSIGN(self->lastElement, _element);
+}
+
+- (id)lastElement {
+    return self->lastElement;
+}
+
+- (NSArray *)navPathElements {
+    NSArray *traversalObjects;
+    NSMutableArray *navPathComponents;
+    int i, count;
+    
+    traversalObjects = [[self context] objectTraversalStack];
+    count = [traversalObjects count];
+    navPathComponents = [[NSMutableArray alloc] initWithCapacity:count];
+    for(i = 0; i < count; i++) {
+        NSMutableDictionary *c;
+        NSString *name;
+        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];
+    }
+    if(count > 0)
+        [self setLastElement:[navPathComponents objectAtIndex:count - 1]];
+    return [navPathComponents autorelease];
+}
+
+@end
diff --git a/ZideStore/UI-X/Common/OGoAppNavView.wox b/ZideStore/UI-X/Common/OGoAppNavView.wox
new file mode 100644 (file)
index 0000000..f56d966
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version='1.0' standalone='yes'?>
+
+<font 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"
+      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>
index fc244fa8e66be0a0a2d3b0ead9ec0904d8703262..1d2516b252d7b8e02fd23e75b1adf284ecf06a9a 100644 (file)
           <table cellpadding="0" cellspacing="0" border="0" width="100%">
             <tr>
               <td valign="bottom">
-                <font class="defaultfont"><!-- $Id: SkyNavigation.html,v 1.1 2003/08/04 14:53:35 thomas Exp $ --><b>You are here:</b><a href="/OpenGroupware/wo/5A715A710740C43D13/12440c4518c09603e3c.0.15.1.1.3.0.1.1.1">News</a>
-  
-              
-  
-
- / 
-
-  
-              
-  Calendar
-
-
-</font>
+              <var:component className="OGoAppNavView" />
               </td>
               <td align="right">
                 <a href="http://www.opengroupware.org:80/" target="OGo">
diff --git a/ZideStore/UI-X/Common/OGoWinClose.m b/ZideStore/UI-X/Common/OGoWinClose.m
new file mode 100644 (file)
index 0000000..eabfc9e
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+  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 OGoWinClose : WOComponent
+{
+
+}
+
+@end
+
+
+@implementation OGoWinClose
+
+@end
diff --git a/ZideStore/UI-X/Common/OGoWinClose.wox b/ZideStore/UI-X/Common/OGoWinClose.wox
new file mode 100644 (file)
index 0000000..a787dd4
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version='1.0' standalone='yes'?>
+<a 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"
+   href="javascript:history.back()"><img border="0" alt="X" rsrc:src="closewindow.gif"/></a>
index 5a70748f1a6ce99a1a5fd876d435833c6a9afd3c..21046f9d929145c244f7d4611a433722ac79b3c8 100644 (file)
@@ -71,10 +71,16 @@ static NSString *retStrForInt(int i) {
 {
   if ((self = [super initWithName:_name associations:_config template:_subs])) {
     self->key      = WOExtGetProperty(_config, @"key");
-    self->icon     = WOExtGetProperty(_config, @"icon");
     self->label    = WOExtGetProperty(_config, @"label");
-    self->action   = WOExtGetProperty(_config, @"action");
+
     self->isScript = WOExtGetProperty(_config, @"isScript");
+    self->href     = WOExtGetProperty(_config, @"href");
+
+    self->icon     = WOExtGetProperty(_config, @"icon");
+    self->action   = WOExtGetProperty(_config, @"action");
+
+    self->tabStyle         = WOExtGetProperty(_config, @"tabStyle");
+    self->selectedTabStyle = WOExtGetProperty(_config, @"selectedTabStyle");
 
     self->tabIcon         = WOExtGetProperty(_config, @"tabIcon");
     self->leftTabIcon     = WOExtGetProperty(_config, @"leftTabIcon");
@@ -92,13 +98,20 @@ static NSString *retStrForInt(int i) {
 }
 
 - (void)dealloc {
-  [self->action   release];
-  [self->label    release];
-  [self->icon     release];
   [self->key      release];
+  [self->label    release];
+
+  [self->href   release];
+
+  [self->action   release];
+
   [self->isScript release];
   [self->template release];
 
+  [self->tabStyle release];
+  [self->selectedTabStyle release];
+
+  [self->icon     release];
   [self->leftTabIcon     release];
   [self->selectedTabIcon release];
   [self->tabIcon         release];
@@ -178,7 +191,9 @@ static NSString *retStrForInt(int i) {
     if ([tmp isValueSettable])
       [tmp setValue:tabkey inComponent:[_ctx component]];
     
+#if 0
     result = [self->action valueInComponent:[_ctx component]];
+#endif
 
     [_ctx deleteLastElementIDComponent];
   }
@@ -222,12 +237,20 @@ static NSString *retStrForInt(int i) {
   info->key      = [k copy];
   info->label    = [[self->label stringValueInComponent:cmp] copy];
   info->icon     = [[self->icon  stringValueInComponent:cmp] copy];
+#if 0
   info->uri      = [[_ctx componentActionURL] copy];
+#else
+  info->uri      = [[self->href stringValueInComponent:cmp] copy];
+#endif
   info->isScript = [self->isScript boolValueInComponent:cmp];
   info->tabIcon  = [[self->tabIcon stringValueInComponent:cmp] copy];
   info->leftIcon = [[self->leftTabIcon stringValueInComponent:cmp] copy];
   info->selIcon  = [[self->selectedTabIcon stringValueInComponent:cmp]
                                            copy];
+  info->tabStyle         = [[self->tabStyle stringValueInComponent:cmp] copy];
+  info->selectedTabStyle = [[self->selectedTabStyle stringValueInComponent:cmp]
+                                                    copy];
+
   if (self->asBackground == nil)
     info->asBackground = 0;
   else {
index 6863eb99e9abc31f881a0ec00e0a4d3995f40ec3..699a5e45e467b5838e52cd957bb9234f72f12245 100644 (file)
 @interface UIxTabItem : WODynamicElement
 {
   WOAssociation *key;
-  WOAssociation *icon;
   WOAssociation *label;
-  WOAssociation *action;
+
+  WOAssociation *href;
   WOAssociation *isScript;
 
+  WOAssociation *action;
+  WOAssociation *icon;
+
   /* config: */
+  WOAssociation *tabStyle;
+  WOAssociation *selectedTabStyle;
+
+  /* old config */
   WOAssociation *tabIcon;
   WOAssociation *leftTabIcon;
   WOAssociation *selectedTabIcon;
index e8b7ea59ce7cff7d0c9a674c6dff02cdf4359134..e43c51acb8553fe627574fd1bc12cca78eb2c9a2 100644 (file)
@@ -83,7 +83,6 @@ static NSNumber *YesNumber;
     self->fontSize           = WOExtGetProperty(_config, @"fontSize");
     self->fontFace           = WOExtGetProperty(_config, @"fontFace");
 
-    NSLog(@"%s foobar", __PRETTY_FUNCTION__);
     self->template = RETAIN(_subs);
   }
   return self;
index 037b651ee52589dc32dd9c6f41bac0fba82a2eed..13cf8e52d74611b1133c1d0042d2aadfeac89592 100644 (file)
     classes = (
       { name = CommonUIProduct;       },
       { name = OGoPageFrame;          },
+      { name = OGoWinClose;           },
+      { name = OGoAppNavView;         },
       { name = "UIxElemBuilder"; },
       { name = "UIxTabView";          },
       { name = "UIxTabItem";          },
     );
 
     WOComponents = (
-      { name = OGoPageFrame; },
+      { name = OGoPageFrame;  },
+      { name = OGoWinClose;   },
+      { name = OGoAppNavView; },
     );
     
     WOxElemBuilder = (
index 14c0bdbd0de725a2894d4da08b7a638e448800bd..f14b92cb6f15d356f3a66ee472cbb2b11a9cbc73 100644 (file)
@@ -41,9 +41,7 @@
   <td width="5"/>
   <td class="wintitle">TODO:Date</td>
   <td width="36" align="right" valign="center">
-  <a href="winclose">
-  <img border="0" alt="X" rsrc:src="closewindow.gif"/>
-  </a>
+  <var:component className="OGoWinClose" />
   </td>
   </tr>
   </table>