From: znek Date: Fri, 11 Jun 2004 15:47:50 +0000 (+0000) Subject: More eye candy. First incarnation of href for UIxTabItem. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9fa65d381eddf1798295026a16a1293bcac4cf19;p=scalable-opengroupware.org More eye candy. First incarnation of href for UIxTabItem. git-svn-id: http://svn.opengroupware.org/SOGo/trunk@31 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/ZideStore/UI-X/Common/GNUmakefile b/ZideStore/UI-X/Common/GNUmakefile index f713025b..167a858a 100644 --- a/ZideStore/UI-X/Common/GNUmakefile +++ b/ZideStore/UI-X/Common/GNUmakefile @@ -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 index 00000000..7c6fe338 --- /dev/null +++ b/ZideStore/UI-X/Common/OGoAppNavView.m @@ -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 +#import +#import +#import + + +@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 index 00000000..f56d9667 --- /dev/null +++ b/ZideStore/UI-X/Common/OGoAppNavView.wox @@ -0,0 +1,18 @@ + + + +You are here: + + +/ + + + + + + diff --git a/ZideStore/UI-X/Common/OGoPageFrame.wox b/ZideStore/UI-X/Common/OGoPageFrame.wox index fc244fa8..1d2516b2 100644 --- a/ZideStore/UI-X/Common/OGoPageFrame.wox +++ b/ZideStore/UI-X/Common/OGoPageFrame.wox @@ -27,19 +27,7 @@
- You are here:News - - - - - / - - - - Calendar - - - + diff --git a/ZideStore/UI-X/Common/OGoWinClose.m b/ZideStore/UI-X/Common/OGoWinClose.m new file mode 100644 index 00000000..eabfc9ef --- /dev/null +++ b/ZideStore/UI-X/Common/OGoWinClose.m @@ -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 + + +@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 index 00000000..a787dd47 --- /dev/null +++ b/ZideStore/UI-X/Common/OGoWinClose.wox @@ -0,0 +1,6 @@ + +X diff --git a/ZideStore/UI-X/Common/UIxTabItem.m b/ZideStore/UI-X/Common/UIxTabItem.m index 5a70748f..21046f9d 100644 --- a/ZideStore/UI-X/Common/UIxTabItem.m +++ b/ZideStore/UI-X/Common/UIxTabItem.m @@ -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 { diff --git a/ZideStore/UI-X/Common/UIxTabView.h b/ZideStore/UI-X/Common/UIxTabView.h index 6863eb99..699a5e45 100644 --- a/ZideStore/UI-X/Common/UIxTabView.h +++ b/ZideStore/UI-X/Common/UIxTabView.h @@ -79,12 +79,19 @@ @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; diff --git a/ZideStore/UI-X/Common/UIxTabView.m b/ZideStore/UI-X/Common/UIxTabView.m index e8b7ea59..e43c51ac 100644 --- a/ZideStore/UI-X/Common/UIxTabView.m +++ b/ZideStore/UI-X/Common/UIxTabView.m @@ -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; diff --git a/ZideStore/UI-X/Common/bundle-info.plist b/ZideStore/UI-X/Common/bundle-info.plist index 037b651e..13cf8e52 100644 --- a/ZideStore/UI-X/Common/bundle-info.plist +++ b/ZideStore/UI-X/Common/bundle-info.plist @@ -14,13 +14,17 @@ 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 = ( diff --git a/ZideStore/UI-X/Scheduler/OGoCalWeekOverview.wox b/ZideStore/UI-X/Scheduler/OGoCalWeekOverview.wox index 14c0bdbd..f14b92cb 100644 --- a/ZideStore/UI-X/Scheduler/OGoCalWeekOverview.wox +++ b/ZideStore/UI-X/Scheduler/OGoCalWeekOverview.wox @@ -41,9 +41,7 @@ TODO:Date - - X - +