+2004-10-12 Marcus Mueller <znek@mulle-kybernetik.com>
+
+ * UIxContactSelector.m: moved helpers to UIxComponent (v0.9.14)
+
2004-10-08 Marcus Mueller <znek@mulle-kybernetik.com>
* v0.9.13
- (void)setCallback:(NSString *)_callback;
- (NSString *)callback;
-- (NSString *)userRootURL;
-- (NSString *)selfURL;
-- (NSString *)relativeContactsURL;
+- (NSString *)relativeContactsPath;
- (NSString *)jsFunctionName;
- (NSString *)jsFunctionHref;
/* Helper */
-- (NSString *)userRootURL {
- WOContext *ctx;
- NSArray *traversalObjects;
- NSString *url;
-
- ctx = [self context];
- traversalObjects = [ctx objectTraversalStack];
- url = [[[traversalObjects objectAtIndex:1]
- baseURLInContext:ctx]
- stringByAppendingString:@"/"];
- return [[NSURL URLWithString:url] path];
-}
-
-- (NSString *)selfURL {
- NSString *url;
-
- url = [[self clientObject] baseURLInContext:[self context]];
- return [[NSURL URLWithString:url] path];
-}
-
-- (NSString *)relativeContactsURL {
- NSString *contactsURL, *selfURL, *relativeURL;
-
- contactsURL = [[self userRootURL]
- stringByAppendingPathComponent:@"Contacts/select"];
- selfURL = [self selfURL];
- relativeURL = [contactsURL urlPathRelativeToPath:selfURL];
- return relativeURL;
+- (NSString *)relativeContactsPath {
+ return [self relativePathToUserFolderSubPath:@"Contacts/select"];
}
/* JavaScript */
# $Id$
-SUBMINOR_VERSION:=13
+SUBMINOR_VERSION:=14
+2004-10-12 Marcus Mueller <znek@mulle-kybernetik.com>
+
+ * UIxComponent.m: added some helper methods for computing relative
+ paths within the application (v0.9.14)
+
2004-09-26 Helge Hess <helge.hess@opengroupware.org>
* UIxComponent.m: minor code cleanups (v0.9.13)
- (NSString *)ownMethodName;
+- (NSString *)userFolderPath;
+- (NSString *)ownPath;
+- (NSString *)relativePathToUserFolderSubPath:(NSString *)_sub;
+
/* date selection */
- (NSTimeZone *)viewTimeZone;
- (NSTimeZone *)backendTimeZone;
return [uri substringFromIndex:(r.location + 1)];
}
+- (NSString *)userFolderPath {
+ WOContext *ctx;
+ NSArray *traversalObjects;
+ NSString *url;
+
+ ctx = [self context];
+ traversalObjects = [ctx objectTraversalStack];
+ url = [[[traversalObjects objectAtIndex:1]
+ baseURLInContext:ctx]
+ stringByAppendingString:@"/"];
+ return [[NSURL URLWithString:url] path];
+}
+
+- (NSString *)ownPath {
+ NSString *url;
+
+ url = [[self clientObject] baseURLInContext:[self context]];
+ return [[NSURL URLWithString:url] path];
+}
+
+- (NSString *)relativePathToUserFolderSubPath:(NSString *)_sub {
+ NSString *dst, *rel;
+
+ dst = [[self userFolderPath] stringByAppendingPathComponent:_sub];
+ rel = [dst urlPathRelativeToPath:[self ownPath]];
+ return rel;
+}
+
/* date */
- (NSTimeZone *)viewTimeZone {
# $Id$
-SUBMINOR_VERSION:=13
+SUBMINOR_VERSION:=14