From e1f063f50cb7a2200af66e83e74d20f37eef7359 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 11 Sep 2007 19:32:52 +0000 Subject: [PATCH] Monotone-Parent: 7c581e0875343b221a79db4c4117358d726166f1 Monotone-Revision: 41663dd56ce370b47da06520cdf3f63f55b42cb6 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-09-11T19:32:52 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 ++++ UI/SOGoUI/UIxComponent.h | 18 ++++++++++-------- UI/SOGoUI/UIxComponent.m | 12 +++++++++++- 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 816804465..cbc4bed2d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2007-09-11 Wolfgang Sourdeau + * UI/SOGoUI/UIxComponent.m ([UIxComponent -responseWith204]): new + method that returns a WOResponse initialized with the 204 status + code. + * UI/MailerUI/UIxMailListView.m ([UIxMailListView -sortedUIDs]): always use a "not deleted" search qualifier along with the user qualifier (if present). diff --git a/UI/SOGoUI/UIxComponent.h b/UI/SOGoUI/UIxComponent.h index 4435c7303..f0c019083 100644 --- a/UI/SOGoUI/UIxComponent.h +++ b/UI/SOGoUI/UIxComponent.h @@ -68,25 +68,25 @@ /* date selection */ - (NSCalendarDate *) selectedDate; -- (NSString *)dateStringForDate:(NSCalendarDate *)_date; +- (NSString *) dateStringForDate: (NSCalendarDate *)_date; - (BOOL) hideFrame; - (UIxComponent *) jsCloseWithRefreshMethod: (NSString *) methodName; /* SoUser */ -- (NSString *)shortUserNameForDisplay; +- (NSString *) shortUserNameForDisplay; /* labels */ -- (NSString *)labelForKey:(NSString *)_key; +- (NSString *) labelForKey:(NSString *)_key; -- (NSString *)localizedNameForDayOfWeek:(unsigned)_dayOfWeek; -- (NSString *)localizedAbbreviatedNameForDayOfWeek:(unsigned)_dayOfWeek; -- (NSString *)localizedNameForMonthOfYear:(unsigned)_monthOfYear; -- (NSString *)localizedAbbreviatedNameForMonthOfYear:(unsigned)_monthOfYear; +- (NSString *) localizedNameForDayOfWeek:(unsigned)_dayOfWeek; +- (NSString *) localizedAbbreviatedNameForDayOfWeek:(unsigned)_dayOfWeek; +- (NSString *) localizedNameForMonthOfYear:(unsigned)_monthOfYear; +- (NSString *) localizedAbbreviatedNameForMonthOfYear:(unsigned)_monthOfYear; /* HTTP method safety */ -- (BOOL)isInvokedBySafeMethod; +- (BOOL) isInvokedBySafeMethod; /* locale */ - (NSDictionary *)locale; @@ -95,6 +95,8 @@ - (WOResourceManager *) pageResourceManager; - (NSString *) urlForResourceFilename: (NSString *) filename; +- (WOResponse *) responseWith204; + /* Debugging */ - (BOOL)isUIxDebugEnabled; diff --git a/UI/SOGoUI/UIxComponent.m b/UI/SOGoUI/UIxComponent.m index 95e48cf94..643dca563 100644 --- a/UI/SOGoUI/UIxComponent.m +++ b/UI/SOGoUI/UIxComponent.m @@ -400,7 +400,7 @@ static BOOL uixDebugEnabled = NO; userTimeZone = [[context activeUser] timeZone]; [_date setTimeZone: userTimeZone]; - return [_date descriptionWithCalendarFormat:@"%Y%m%d"]; + return [_date descriptionWithCalendarFormat: @"%Y%m%d"]; } - (BOOL) hideFrame @@ -569,6 +569,16 @@ static BOOL uixDebugEnabled = NO; return url; } +- (WOResponse *) responseWith204 +{ + WOResponse *response; + + response = [context response]; + [response setStatus: 204]; + + return response; +} + /* debugging */ - (BOOL)isUIxDebugEnabled {