From fb9ac84533503018fd33d2b44228658e073e2148 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 10 Nov 2009 21:39:40 +0000 Subject: [PATCH] Monotone-Parent: f9a04cc4832d7c1ca8d70b594faba3c5a0eda334 Monotone-Revision: f3dd7372c4f74c5e1e309b528107e222964ca70b Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-11-10T21:39:40 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 7 +++++++ UI/Contacts/UIxContactEditor.m | 2 +- UI/Contacts/UIxListEditor.m | 2 +- UI/MainUI/SOGoRootPage.m | 2 +- UI/SOGoUI/UIxComponent.h | 3 ++- UI/SOGoUI/UIxComponent.m | 9 +++++++++ UI/Templates/UIxPageFrame.wox | 2 +- 7 files changed, 22 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5e6134bd0..f22d51018 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-11-10 Wolfgang Sourdeau + + * UI/SOGoUI/UIxComponent.m (-applicationPath): new method that + really returns the name of the WO application. + (-modulePath): renamed the old applicationPath method to be more + accurate about its purpose. + 2009-11-07 Ludovic Marcotte * SoObjects/SOGo/SOGoCache.m - if we get a JSON diff --git a/UI/Contacts/UIxContactEditor.m b/UI/Contacts/UIxContactEditor.m index 5e6f5fb23..471332431 100644 --- a/UI/Contacts/UIxContactEditor.m +++ b/UI/Contacts/UIxContactEditor.m @@ -632,7 +632,7 @@ } if ([[[[self context] request] formValueForKey: @"nojs"] intValue]) - result = [self redirectToLocation: [self applicationPath]]; + result = [self redirectToLocation: [self modulePath]]; else { jsRefreshMethod diff --git a/UI/Contacts/UIxListEditor.m b/UI/Contacts/UIxListEditor.m index 162614c5a..d647cddb2 100644 --- a/UI/Contacts/UIxListEditor.m +++ b/UI/Contacts/UIxListEditor.m @@ -235,7 +235,7 @@ { [co save]; if ([[[[self context] request] formValueForKey: @"nojs"] intValue]) - result = [self redirectToLocation: [self applicationPath]]; + result = [self redirectToLocation: [self modulePath]]; else { jsRefreshMethod diff --git a/UI/MainUI/SOGoRootPage.m b/UI/MainUI/SOGoRootPage.m index e91c770f4..dea3ba79c 100644 --- a/UI/MainUI/SOGoRootPage.m +++ b/UI/MainUI/SOGoRootPage.m @@ -58,7 +58,7 @@ static NSArray *supportedLanguages = nil; - (NSString *) connectURL { - return [NSString stringWithFormat: @"%@connect", [self applicationPath]]; + return [NSString stringWithFormat: @"%@/connect", [self applicationPath]]; } /* actions */ diff --git a/UI/SOGoUI/UIxComponent.h b/UI/SOGoUI/UIxComponent.h index 21a778e0e..c343773f2 100644 --- a/UI/SOGoUI/UIxComponent.h +++ b/UI/SOGoUI/UIxComponent.h @@ -60,7 +60,8 @@ - (NSString *)ownMethodName; - (NSString *)userFolderPath; -- (NSString *) applicationPath; +- (NSString *)applicationPath; +- (NSString *)modulePath; - (NSString *)ownPath; - (NSString *)relativePathToUserFolderSubPath:(NSString *)_sub; diff --git a/UI/SOGoUI/UIxComponent.m b/UI/SOGoUI/UIxComponent.m index 849d73c67..a087de476 100644 --- a/UI/SOGoUI/UIxComponent.m +++ b/UI/SOGoUI/UIxComponent.m @@ -328,6 +328,15 @@ static BOOL uixDebugEnabled = NO; } - (NSString *) applicationPath +{ + NSString *appName; + + appName = [[context request] applicationName]; + + return [NSString stringWithFormat: @"/%@", appName]; +} + +- (NSString *) modulePath { SOGoObject *currentClient, *parent; BOOL found; diff --git a/UI/Templates/UIxPageFrame.wox b/UI/Templates/UIxPageFrame.wox index c538df049..70afbc1e9 100644 --- a/UI/Templates/UIxPageFrame.wox +++ b/UI/Templates/UIxPageFrame.wox @@ -113,7 +113,7 @@