+2004-11-23 Helge Hess <helge.hess@opengroupware.org>
+
+ * v4.5.63
+
+ * removed WEClientCapabilities.h (lives in NGObjWeb for quite some time now)
+
+ * WETabView.m: code cleanups, added a way to disable certain tabs
+ (disabledTabKeys association)
+
2004-11-07 Marcus Mueller <znek@mulle-kybernetik.com>
* WEExtensions.xcode: bumped the framework version
libWEExtensions_HEADER_FILES_INSTALL_DIR = /WEExtensions
libWEExtensions_HEADER_FILES = \
- WEClientCapabilities.h \
- WEContextConditional.h \
+ WEContextConditional.h
libWEExtensions_OBJC_FILES = \
JSClipboard.m \
-# $Id$
-
+# postprocessing makefile
WEDropScript.jsm : WEDropScript.js
sh js2m.sh $< $@
/*
- Copyright (C) 2000-2003 SKYRIX Software AG
+ Copyright (C) 2000-2004 SKYRIX Software AG
- This file is part of OGo
+ This file is part of OpenGroupware.org.
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, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
-// $Id:
#include <NGObjWeb/NGObjWeb.h>
#include <NGObjWeb/WEClientCapabilities.h>
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
-// $Id$
#ifndef __WEExtensions_JSMenu_H__
#define __WEExtensions_JSMenu_H__
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
-// $Id$
#include "JSMenu.h"
#include "JSMenuItem.h"
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
-// $Id$
#ifndef __WEExtensions_JSMenuItem_H__
#define __WEExtensions_JSMenuItem_H__
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
-// $Id$
#import <NGObjWeb/NGObjWeb.h>
#import <Foundation/Foundation.h>
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
-// $Id$
-#include <NGObjWeb/NGObjWeb.h>
-#include "WEClientCapabilities.h"
+#include <NGObjWeb/WODynamicElement.h>
/*
}
@end
+#include "common.h"
+#include <NGObjWeb/WEClientCapabilities.h>
+
static NSString *JSShiftClick_Script =
@"<script language=\"JavaScript\">\n"
@"<!--\n"
@"//-->\n"
@"</script>";
-#include "common.h"
-
@implementation JSShiftClick
- (id)initWithName:(NSString *)_name
-# $Id$
-
WEExtensions
============
-# $Id$
-
TODO for WEExtensions
=====================
# version file
-SUBMINOR_VERSION:=62
+SUBMINOR_VERSION:=63
/*
- Copyright (C) 2000-2003 SKYRIX Software AG
+ Copyright (C) 2000-2004 SKYRIX Software AG
- This file is part of OGo
+ This file is part of OpenGroupware.org.
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, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
-// $Id$
-#include <NGObjWeb/NGObjWeb.h>
-#include "WEClientCapabilities.h"
-#include "common.h"
+#include <NGObjWeb/WODynamicElement.h>
/*
- API:
+ WEBrowser
+
+ TODO: document
+ API:
- extra attributes are attributes of the <table> tag
-
*/
-static NSString *WEBrowser_Plus = @"WEBrowser_Plus";
-static NSString *WEBrowser_Minus = @"WEBrowser_Minus";
-
@interface WEBrowser : WODynamicElement
{
@protected
}
@end
+#include <NGObjWeb/WEClientCapabilities.h>
#include "common.h"
+static NSString *WEBrowser_Plus = @"WEBrowser_Plus";
+static NSString *WEBrowser_Minus = @"WEBrowser_Minus";
+
@implementation WEBrowser
#if 0
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
-// $Id$
#ifndef __WEExtensions_WECalendarField_H__
#define __WEExtensions_WECalendarField_H__
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
-// $Id$
#include "WECalendarField.h"
-#include <NGObjWeb/NGObjWeb.h>
-#include <NGExtensions/NGExtensions.h>
-#include "WEClientCapabilities.h"
+#include <NGObjWeb/WEClientCapabilities.h>
#include "common.h"
static Class StrClass = Nil;
+++ /dev/null
-/*
- Copyright (C) 2000-2003 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/WEClientCapabilities.h>
}
@end
-#include <NGObjWeb/NGObjWeb.h>
#include "WEContextConditional.h"
-#include "WEClientCapabilities.h"
+#include <NGObjWeb/WEClientCapabilities.h>
#include "common.h"
static NSString *WECollapsible_TitleMode = @"WECollapsible_TitleMode";
inContext:(WOContext *)_ctx;
@end
-#include "WEClientCapabilities.h"
-#include <NGObjWeb/NGObjWeb.h>
-#include <NGExtensions/NGExtensions.h>
+#include <NGObjWeb/WEClientCapabilities.h>
#include "common.h"
//#define DEBUG_TAKEVALUES 1
inContext:(WOContext *)_ctx;
@end
-#include "WEClientCapabilities.h"
-#import <NGObjWeb/NGObjWeb.h>
-#import <NGExtensions/NGExtensions.h>
+#include <NGObjWeb/WEClientCapabilities.h>
#include "common.h"
@implementation WEDropContainer
}
@end
+#include <NGObjWeb/WEClientCapabilities.h>
#include "common.h"
-#include "WEClientCapabilities.h"
-#import <NGObjWeb/NGObjWeb.h>
-#import <NGExtensions/NGExtensions.h>
-#import <EOControl/EOControl.h>
// #define DEBUG_TAKEVALUES 1
<binding name="fontColor" />
<binding name="fontSize" />
<binding name="fontFace" />
+
+ <binding name="disabledTabKeys" />
</wo>
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
-// $Id$
#ifndef __WETabView_H__
#define __WETabView_H__
/*
- This is a library private header !
+ This is a library private header!
*/
#include <NGObjWeb/WODynamicElement.h>
/*
- Does not support tab-head-creation from nested components !!!
-
- hh: Why not ??? -> Because selection is manipulated in sub-elements
-
+ Note: Does not support tab-head-creation from nested components!
+ Why: => because selection is manipulated in sub-elements
+
WETabView creates element-IDs like
.h.*.$key. for the tab-items (head-mode)
.b.$key... for the tab-content (content-mode) (new, hh)
-
- !!! WETabView JavaScript can't handle duplicate tab-keys !!!
+
+ Note: the WETabView JavaScript mode cannot handle duplicate tab-keys.
*/
@interface WETabView : WODynamicElement
WOAssociation *height;
WOAssociation *activeBgColor;
WOAssociation *inactiveBgColor;
-
+
+ WOAssociation *disabledTabKeys;
+
WOAssociation *fontColor;
WOAssociation *fontSize;
WOAssociation *fontFace;
-
+
id template;
}
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
-// $Id$
#include "WETabView.h"
+#include <NGObjWeb/WEClientCapabilities.h>
#include "common.h"
-#include "WEClientCapabilities.h"
-#import <NGObjWeb/NGObjWeb.h>
-#import <NGExtensions/NGExtensions.h>
-#import <EOControl/EOControl.h>
#if DEBUG
// # define DEBUG_TAKEVALUES 1
self->selection = WOExtGetProperty(_config, @"selection");
self->bgColor = WOExtGetProperty(_config, @"bgColor");
- self->nonSelectedBgColor = WOExtGetProperty(_config, @"nonSelectedBgColor");
+ self->nonSelectedBgColor = WOExtGetProperty(_config,@"nonSelectedBgColor");
self->leftCornerIcon = WOExtGetProperty(_config, @"leftCornerIcon");
self->rightCornerIcon = WOExtGetProperty(_config, @"rightCornerIcon");
self->fontColor = WOExtGetProperty(_config, @"fontColor");
self->fontSize = WOExtGetProperty(_config, @"fontSize");
self->fontFace = WOExtGetProperty(_config, @"fontFace");
+
+ self->disabledTabKeys = WOExtGetProperty(_config, @"disabledTabKeys");
self->template = [_t retain];
}
}
- (void)dealloc {
- RELEASE(self->selection);
-
- RELEASE(self->bgColor);
- RELEASE(self->nonSelectedBgColor);
- RELEASE(self->leftCornerIcon);
- RELEASE(self->rightCornerIcon);
-
- RELEASE(self->leftTabIcon);
- RELEASE(self->selectedTabIcon);
- RELEASE(self->tabIcon);
-
- RELEASE(self->width);
- RELEASE(self->height);
-
- RELEASE(self->activeBgColor);
- RELEASE(self->inactiveBgColor);
-
- RELEASE(self->fontColor);
- RELEASE(self->fontSize);
- RELEASE(self->fontFace);
-
- RELEASE(self->template);
+ [self->disabledTabKeys release];
+ [self->selection release];
+ [self->bgColor release];
+ [self->nonSelectedBgColor release];
+ [self->leftCornerIcon release];
+ [self->rightCornerIcon release];
+ [self->leftTabIcon release];
+ [self->selectedTabIcon release];
+ [self->tabIcon release];
+ [self->width release];
+ [self->height release];
+ [self->activeBgColor release];
+ [self->inactiveBgColor release];
+ [self->fontColor release];
+ [self->fontSize release];
+ [self->fontFace release];
+ [self->template release];
[super dealloc];
}
if (_state == nil) return;
}
+- (NSArray *)filterKeys:(NSArray *)_keys inContext:(WOContext *)_ctx {
+ NSMutableArray *ma;
+ NSArray *rkeys;
+ unsigned i, count;
+
+ if (self->disabledTabKeys == nil || _keys == nil)
+ return _keys;
+
+ rkeys = [self->disabledTabKeys valueInComponent:[_ctx component]];
+ if (rkeys == nil || (count = [rkeys count]) == 0)
+ return _keys;
+
+ ma = [[_keys mutableCopy] autorelease];
+ for (i = 0; i < count; i++) {
+ unsigned j, jc;
+
+ // TODO: not particulary efficient, but should be OK ... */
+ for (j = 0, jc = [ma count]; j < jc; j++) {
+ WETabItemInfo *info;
+
+ info = [ma objectAtIndex:j];
+ if (![info->key isEqualToString:[rkeys objectAtIndex:i]])
+ continue;
+
+ [ma removeObjectAtIndex:j];
+ }
+ }
+
+ return ma;
+}
+
- (NSArray *)collectKeysInContext:(WOContext *)_ctx {
+ NSArray *keys;
+
/* collect mode, collects all keys */
[_ctx setObject:WETabView_COLLECT forKey:WETabView_HEAD];
-
[self->template appendToResponse:nil inContext:_ctx];
-
[_ctx removeObjectForKey:WETabView_HEAD];
- return [_ctx objectForKey:WETabView_KEYS];
+
+ keys = [_ctx objectForKey:WETabView_KEYS];
+
+ /* filter keys */
+ keys = [self filterKeys:keys inContext:_ctx];
+
+ return keys;
}
/* responder */
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
-// $Id$
#ifndef __WETableCalcMatrix_H__
#define __WETableCalcMatrix_H__
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
-// $Id$
#include "WETableView.h"
#include "WETableView+Grouping.h"
@end
-#include "WEClientCapabilities.h"
+#include <NGObjWeb/WEClientCapabilities.h>
@implementation WETableView
#include "WETreeContextKeys.h"
#include "WETreeMatrixElement.h"
#include "common.h"
-#include <NGObjWeb/NGObjWeb.h>
#include <NGObjWeb/WEClientCapabilities.h>
NSString *WETreeView_HEADER_MODE = @"WETreeView_HEADER_MODE";
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
-// $Id$
#include <NGObjWeb/WOxElemBuilder.h>
/*
- Copyright (C) 2000-2003 SKYRIX Software AG
+ Copyright (C) 2000-2004 SKYRIX Software AG
- This file is part of OGo
+ This file is part of OpenGroupware.org.
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, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
-// $Id$
#include <NGObjWeb/WOxElemBuilder.h>
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
-// $Id: common.h 1 2004-08-20 10:08:27Z znek $
#ifndef __WEExtensions_common_H__
#define __WEExtensions_common_H__
#import <Foundation/Foundation.h>
-#include <NGObjWeb/NGObjWeb.h>
+
#include <NGExtensions/NGExtensions.h>
+#include <NGObjWeb/NGObjWeb.h>
+
#if NeXT_Foundation_LIBRARY || APPLE_Foundation_LIBRARY
# include <NGExtensions/NGObjectMacros.h>