+2005-06-26 Helge Hess <helge.hess@opengroupware.org>
+
+ * created a library containing shared base classes (for
+ MailerContactsUI) (v0.9.23)
+
2005-03-23 Marcus Mueller <znek@mulle-kybernetik.com>
* renamed "default.strings" to "Localizable.strings" (v0.9.22)
include ../common.make
+LIBRARY_NAME = libContactsUI
BUNDLE_NAME = ContactsUI
ContactsUI_PRINCIPAL_CLASS = ContactsUIProduct
ContactsUI_LANGUAGES = English French
+libContactsUI_OBJC_FILES = \
+ UIxContactsListViewBase.m \
+ UIxContactEditorBase.m \
+
ContactsUI_OBJC_FILES = \
ContactsUIProduct.m \
- \
- UIxContactsListView.m \
UIxContactsSelectionView.m \
UIxContactView.m \
- UIxContactEditor.m \
UIxContactSelector.m \
+ UIxContactEditor.m \
+ UIxContactsListView.m \
ContactsUI_RESOURCE_FILES += \
Version \
# make
-include GNUmakefile.preamble
+include $(GNUSTEP_MAKEFILES)/library.make
include $(GNUSTEP_MAKEFILES)/bundle.make
-include GNUmakefile.postamble
include ../../fhsbundle.make
ADDITIONAL_INCLUDE_DIRS += \
-I.. -I../.. -I../../..
+
+ADDITIONAL_LIB_DIRS += \
+ -L./$(GNUSTEP_OBJ_DIR)
+
+libContactsUI_LIBRARIES_DEPEND_UPON += \
+ -lOGoContentStore \
+ -lSOGo \
+ \
+ -lGDLContentStore \
+ -lGDLAccess \
+ -lNGObjWeb \
+ -lNGLdap \
+ -lNGiCal \
+ -lNGMime \
+ -lNGStreams -lNGExtensions -lEOControl \
+ -lXmlRpc -lDOM -lSaxObjC
+
+ContactsUI_BUNDLE_LIBS += -lContactsUI
02111-1307, USA.
*/
+#ifndef __UIxContactEditorBase_H__
+#define __UIxContactEditorBase_H__
+
#include <SOGoUI/UIxComponent.h>
-@class NSMutableDictionary;
+@class NSString, NSMutableDictionary;
-@interface UIxContactEditor : UIxComponent
+@interface UIxContactEditorBase : UIxComponent
{
NSString *contentString;
NSString *errorText;
}
@end
+
+#endif /* __UIxContactEditorBase_H__ */
02111-1307, USA.
*/
-#include "UIxContactEditor.h"
+#include "UIxContactEditorBase.h"
#include <Contacts/SOGoContactObject.h>
#include <Contacts/SOGoContactFolder.h>
#include "common.h"
-@implementation UIxContactEditor
+@implementation UIxContactEditorBase
- (id)init {
if ((self = [super init])) {
respondsToSelector:@selector(saveContentString:)];
}
+- (NSString *)viewActionName {
+ /* this is overridden in the mail based contacts UI to redirect to tb.edit */
+ return @"";
+}
+- (NSString *)editActionName {
+ /* this is overridden in the mail based contacts UI to redirect to tb.edit */
+ return @"edit";
+}
+
- (id)saveAction {
NSException *ex;
- NSString *recstr;
+ NSString *recstr, *uri;
id record;
if (![self isWriteableClientObject]) {
- /* return 400 == Bad Request */
- return [NSException exceptionWithHTTPStatus:400
+ return [NSException exceptionWithHTTPStatus:400 /* Bad Request */
reason:@"method cannot be invoked on "
@"the specified object"];
}
- record = [[[[self contentString] propertyList] mutableCopy] autorelease];
+ if ((record = [self contentString]) == nil) {
+ [self setErrorText:@"Missing object content!"]; // localize
+ return self;
+ }
+ record = [[[record propertyList] mutableCopy] autorelease];
if (record == nil) {
[self setErrorText:@"Invalid property list data ..."]; // localize
return self;
return self;
}
- return [self redirectToLocation:[self _completeURIForMethod:@".."]];
+ uri = ([(uri = [self viewActionName]) length] > 0)
+ ? [self viewActionName] : @"..";
+ uri = [self _completeURIForMethod:uri];
+ return [self redirectToLocation:uri];
}
- (id)testAction {
reason:@"could not create a unique ID"];
}
- nextMethod = [NSString stringWithFormat:@"../%@/edit", objectId];
+ nextMethod = [NSString stringWithFormat:@"../%@/%@",
+ objectId, [self editActionName]];
uri = [self _completeURIForMethod:nextMethod];
return [self redirectToLocation:uri];
}
-@end /* UIxContactEditor */
+@end /* UIxContactEditorBase */
/*
- Copyright (C) 2004 SKYRIX Software AG
+ Copyright (C) 2004-2005 SKYRIX Software AG
This file is part of OpenGroupware.org.
02111-1307, USA.
*/
-#ifndef __UIxContactsListView_H__
-#define __UIxContactsListView_H__
+#ifndef __UIxContactsListViewBase_H__
+#define __UIxContactsListViewBase_H__
#include <SOGoUI/UIxComponent.h>
@class NSString, NSArray;
-@interface UIxContactsListView : UIxComponent
+@interface UIxContactsListViewBase : UIxComponent
{
NSArray *allRecords;
NSArray *filteredRecords;
@end
-#endif /* __UIxContactsListView_H__ */
+#endif /* __UIxContactsListViewBase_H__ */
02111-1307, USA.
*/
-#include "UIxContactsListView.h"
+#include "UIxContactsListViewBase.h"
#include <Contacts/SOGoContactFolder.h>
#include "common.h"
-@implementation UIxContactsListView
+@implementation UIxContactsListViewBase
- (void)dealloc {
[self->allRecords release];
return YES;
}
-@end /* UIxContactsListView */
+@end /* UIxContactsListViewBase */
/*
- 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 "UIxContactsListView.h"
+ Copyright (C) 2004-2005 SKYRIX Software AG
+
+ 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; 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.
+*/
+
+#include "UIxContactsListViewBase.h"
#include <SOGoUI/SOGoJSStringFormatter.h>
-@interface UIxContactsSelectionView : UIxContactsListView
+@interface UIxContactsSelectionView : UIxContactsListViewBase
{
NSString *callback;
}
# GNUstep makefile
-SUBMINOR_VERSION:=22
+SUBMINOR_VERSION:=23
# v0.9.18 requires NGExtensions v4.5.136
# v0.9.16 requires libSOGoUI v0.9.16
{
- "__cvs__" = "$Id$";
-
requires = {
bundleManagerVersion = 1;
classes = (
provides = {
classes = (
+ { name = UIxContactEditor; }
);
WOComponents = (
+ { name = UIxContactEditor; }
);
};
}
+2005-06-26 Helge Hess <helge.hess@opengroupware.org>
+
+ * use new ContactsUI library from Contacts (v0.9.9)
+
+2005-06-24 Helge Hess <helge.hess@opengroupware.org>
+
+ * UIxMailContactEditor.m: fixed an exception with Cocoa due to empty
+ fields on contact creation (v0.9.8)
+
2005-02-22 Helge Hess <helge.hess@opengroupware.org>
* UIxMailContactList.m: hide frame if "noframe" query parameter is set
--- /dev/null
+# compile flags
+
+ADDITIONAL_INCLUDE_DIRS += \
+ -I.. -I../.. -I../../..
+
+ADDITIONAL_LIB_DIRS += \
+ -L../Contacts/$(GNUSTEP_OBJ_DIR)
+
+MailerContactsUI_BUNDLE_LIBS += -lContactsUI
02111-1307, USA.
*/
-#include <UI/Contacts/UIxContactEditor.h>
+#include <UI/Contacts/UIxContactEditorBase.h>
-@interface UIxMailContactEditor : UIxContactEditor
+@interface UIxMailContactEditor : UIxContactEditorBase
{
}
return [[l stringByAppendingString:@", "] stringByAppendingString:f];
}
- (NSString *)panelTitle {
- NSString *s;
+ NSString *s, *t;
+ t = [self objectTitle];
s = [self labelForKey:@"Edit Contact"];
- s = [s stringByAppendingString:@": "];
- s = [s stringByAppendingString:[self objectTitle]];
+ if ([t isNotNull]) {
+ s = [s stringByAppendingString:@": "];
+ s = [s stringByAppendingString:t];
+ }
return s;
}
+/* actions */
+
+- (NSString *)editActionName {
+ /* this is called by the parent class new action */
+ return @"tb.edit";
+}
+- (NSString *)viewxActionName {
+ /* this is called by the parent class save action */
+ return @"tb.edit";
+}
+
@end /* UIxMailContactEditor */
02111-1307, USA.
*/
-#include <UI/Contacts/UIxContactsListView.h>
+#include <UI/Contacts/UIxContactsListViewBase.h>
-@interface UIxMailContactList : UIxContactsListView
+@interface UIxMailContactList : UIxContactsListViewBase
{
}
# version file
-SUBMINOR_VERSION:=7
+SUBMINOR_VERSION:=9
# v0.9.5 requires MailerUI v0.9.116
--- /dev/null
+{
+ requires = {
+ bundleManagerVersion = 1;
+ classes = (
+ { name = NSObject; }
+ );
+ };
+
+ provides = {
+ classes = (
+ );
+ WOComponents = (
+ { name = UIxMailContactEditor; }
+ );
+ };
+}
cssClass = "tbicon_getmail"; label = "Get Mail";
},
{
- link = "new";
- // onclick = "clickedCompose(this);return false;";
+ link = "tb.new";
+ // onclick = "clickedNewContact(this);return false;";
cssClass = "tbicon_compose"; label = "New Contact";
+ target = "_blank";
},
/* enable if we actually can do that
{ link = "tb.compose"; target = "_blank";
actionClass = "UIxMailEditorAction";
actionName = "compose";
};
+
+ "tb.new" = {
+ protectedBy = "View";
+ pageName = "UIxMailContactEditor";
+ actionName = "new";
+ };
};
};
+2005-06-26 Helge Hess <helge.hess@opengroupware.org>
+
+ * UIxMailContactEditor.wox: added a hidden field containing the contact
+ content
+
2005-03-23 Marcus Mueller <znek@mulle-kybernetik.com>
* UIxCalWeekOverview.wox: changed the right corner URL yet again
</table>
</div>
</div>
+
+ <input type="hidden" name="content" var:value="contentString" />
</var:component>
RELBUILD_DIR_libSOGoUI = \
$(GNUSTEP_BUILD_DIR)/../SOGoUI/$(GNUSTEP_OBJ_DIR_NAME)
RELBUILD_DIR_libOGoContentStore = \
- $(GNUSTEP_BUILD_DIR)/../../../OGoContentStore/$(GNUSTEP_OBJ_DIR_NAME)
+ $(GNUSTEP_BUILD_DIR)/../../OGoContentStore/$(GNUSTEP_OBJ_DIR_NAME)
ADDITIONAL_LIB_DIRS += \
-L$(RELBUILD_DIR_libSOGo) \