2006-06-15 21:34:10 +02:00
|
|
|
/*
|
|
|
|
Copyright (C) 2000-2005 SKYRIX Software AG
|
2016-02-02 02:54:37 +01:00
|
|
|
Copyright (C) 2007-2016 Inverse inc.
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2016-02-02 02:54:37 +01:00
|
|
|
This file is part of SOGo
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2016-02-02 02:54:37 +01:00
|
|
|
SOGo is free software; you can redistribute it and/or modify it under
|
2006-06-15 21:34:10 +02:00
|
|
|
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.
|
|
|
|
|
2016-02-02 02:54:37 +01:00
|
|
|
SOGo is distributed in the hope that it will be useful, but WITHOUT ANY
|
2006-06-15 21:34:10 +02:00
|
|
|
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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __UIxComponent_H_
|
|
|
|
#define __UIxComponent_H_
|
|
|
|
|
2006-09-08 17:26:46 +02:00
|
|
|
#import <NGObjWeb/SoComponent.h>
|
|
|
|
#import <NGObjWeb/WOContext+SoObjects.h>
|
|
|
|
|
|
|
|
#import <SOGo/SOGoObject.h>
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
UIxComponent
|
|
|
|
|
|
|
|
Common superclass for most components used in SOGo.
|
|
|
|
|
|
|
|
TODO: document facilities.
|
|
|
|
*/
|
|
|
|
|
2012-09-22 03:48:39 +02:00
|
|
|
@class NSCalendarDate, NSTimeZone, NSMutableDictionary, SoUser, SOGoUserDefaults;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
@interface UIxComponent : SoComponent
|
|
|
|
{
|
|
|
|
NSMutableDictionary *queryParameters;
|
2006-09-05 22:13:16 +02:00
|
|
|
NSCalendarDate *_selectedDate;
|
2012-09-22 03:48:39 +02:00
|
|
|
NSDictionary *locale;
|
|
|
|
SOGoUserDefaults *userDefaults;
|
2014-08-06 22:01:05 +02:00
|
|
|
NSArray *languages;
|
2006-06-15 21:34:10 +02:00
|
|
|
}
|
|
|
|
|
2016-02-02 02:54:37 +01:00
|
|
|
+ (NSArray *) amPmLabelKeys;
|
2012-09-22 03:48:39 +02:00
|
|
|
+ (NSArray *) monthLabelKeys;
|
|
|
|
+ (NSArray *) abbrMonthLabelKeys;
|
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
- (NSString *)queryParameterForKey:(NSString *)_key;
|
|
|
|
- (NSDictionary *)queryParameters;
|
|
|
|
|
|
|
|
/* use this to set 'sticky' query parameters */
|
|
|
|
- (void)setQueryParameter:(NSString *)_param forKey:(NSString *)_key;
|
|
|
|
|
|
|
|
/* date related query parameters */
|
|
|
|
- (NSDictionary *)queryParametersBySettingSelectedDate:(NSCalendarDate *)_date;
|
|
|
|
- (void)setSelectedDateQueryParameter:(NSCalendarDate *)_newDate
|
|
|
|
inDictionary:(NSMutableDictionary *)_qp;
|
|
|
|
|
|
|
|
/* appends queryParameters to _method if any are set */
|
|
|
|
- (NSString *)completeHrefForMethod:(NSString *)_method;
|
|
|
|
|
|
|
|
- (NSString *)ownMethodName;
|
|
|
|
|
|
|
|
- (NSString *)userFolderPath;
|
2009-11-10 22:39:40 +01:00
|
|
|
- (NSString *)applicationPath;
|
|
|
|
- (NSString *)modulePath;
|
2006-10-12 18:44:40 +02:00
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
- (NSString *)ownPath;
|
|
|
|
- (NSString *)relativePathToUserFolderSubPath:(NSString *)_sub;
|
|
|
|
|
|
|
|
/* date selection */
|
2006-10-05 01:13:09 +02:00
|
|
|
- (NSCalendarDate *) selectedDate;
|
|
|
|
|
2007-09-11 21:32:52 +02:00
|
|
|
- (NSString *) dateStringForDate: (NSCalendarDate *)_date;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2006-07-29 00:59:11 +02:00
|
|
|
- (BOOL) hideFrame;
|
|
|
|
|
2006-10-12 18:44:40 +02:00
|
|
|
- (UIxComponent *) jsCloseWithRefreshMethod: (NSString *) methodName;
|
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
/* SoUser */
|
2007-09-11 21:32:52 +02:00
|
|
|
- (NSString *) shortUserNameForDisplay;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2016-02-25 03:30:33 +01:00
|
|
|
/* Common defaults and settings */
|
|
|
|
- (int) minimumSearchLength;
|
|
|
|
- (NSString *) minimumSearchLengthLabel;
|
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
/* labels */
|
2007-09-11 21:32:52 +02:00
|
|
|
- (NSString *) labelForKey:(NSString *)_key;
|
2012-09-22 03:48:39 +02:00
|
|
|
- (NSString *) commonLabelForKey:(NSString *)_key;
|
|
|
|
- (NSString *) labelForKey: (NSString *) _str
|
|
|
|
withResourceManager: (WOResourceManager *) _rm;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
2007-09-11 21:32:52 +02:00
|
|
|
- (NSString *) localizedNameForDayOfWeek:(unsigned)_dayOfWeek;
|
|
|
|
- (NSString *) localizedAbbreviatedNameForDayOfWeek:(unsigned)_dayOfWeek;
|
|
|
|
- (NSString *) localizedNameForMonthOfYear:(unsigned)_monthOfYear;
|
|
|
|
- (NSString *) localizedAbbreviatedNameForMonthOfYear:(unsigned)_monthOfYear;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
/* HTTP method safety */
|
2007-09-11 21:32:52 +02:00
|
|
|
- (BOOL) isInvokedBySafeMethod;
|
2008-06-20 06:11:41 +02:00
|
|
|
|
|
|
|
/* display the "save" button */
|
|
|
|
- (BOOL) canCreateOrModify;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
/* locale */
|
|
|
|
- (NSDictionary *)locale;
|
|
|
|
|
2006-07-29 00:59:11 +02:00
|
|
|
/* cached resource filenames */
|
|
|
|
- (WOResourceManager *) pageResourceManager;
|
|
|
|
- (NSString *) urlForResourceFilename: (NSString *) filename;
|
|
|
|
|
2007-12-13 20:25:01 +01:00
|
|
|
- (WOResponse *) responseWithStatus: (unsigned int) status;
|
|
|
|
- (WOResponse *) responseWithStatus: (unsigned int) status
|
|
|
|
andString: (NSString *) contentString;
|
|
|
|
- (WOResponse *) responseWithStatus: (unsigned int) status
|
|
|
|
andJSONRepresentation: (NSObject *) contentObject;
|
2007-09-11 21:32:52 +02:00
|
|
|
- (WOResponse *) responseWith204;
|
2007-12-13 20:25:01 +01:00
|
|
|
- (WOResponse *) redirectToLocation: (NSString *) newLocation;
|
2007-09-11 21:32:52 +02:00
|
|
|
|
2006-06-15 21:34:10 +02:00
|
|
|
/* Debugging */
|
2009-07-14 19:20:49 +02:00
|
|
|
- (NSString *) buildDate;
|
2008-07-17 23:12:43 +02:00
|
|
|
- (BOOL) isUIxDebugEnabled;
|
2006-06-15 21:34:10 +02:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
#endif /* __UIxComponent_H_ */
|