Skip to content

Commit

Permalink
chore: remove deprecated files and templates
Browse files Browse the repository at this point in the history
  • Loading branch information
cgx committed Jul 22, 2020
1 parent 0d297f2 commit 1579ebd
Show file tree
Hide file tree
Showing 67 changed files with 25 additions and 3,897 deletions.
3 changes: 0 additions & 3 deletions UI/AdministrationUI/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ AdministrationUI_OBJC_FILES = \
AdministrationUI_RESOURCE_FILES += \
product.plist

AdministrationUI_RESOURCE_FILES += \
Toolbars/UIxAdministration.toolbar

AdministrationUI_LOCALIZED_RESOURCE_FILES += \
Localizable.strings \

Expand Down
7 changes: 0 additions & 7 deletions UI/AdministrationUI/Toolbars/UIxAdministration.toolbar

This file was deleted.

3 changes: 1 addition & 2 deletions UI/AdministrationUI/product.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

publicResources = ();

factories = {
};
factories = {};

categories = {
SOGoUserFolder = {
Expand Down
5 changes: 0 additions & 5 deletions UI/Contacts/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ ContactsUI_LANGUAGES = $(SOGO_LANGUAGES)

ContactsUI_OBJC_FILES = \
UIxContactsUserFolders.m \
UIxContactsMailerSelection.m \
UIxContactsUserRightsEditor.m \
\
ContactsUIProduct.m \
UIxContactsFilterPanel.m \
UIxContactActions.m \
UIxContactView.m \
UIxContactEditor.m \
Expand All @@ -29,9 +27,6 @@ ContactsUI_OBJC_FILES = \
ContactsUI_RESOURCE_FILES += \
product.plist \

ContactsUI_RESOURCE_FILES += \
Toolbars/SOGoContactFolder.toolbar

ContactsUI_LOCALIZED_RESOURCE_FILES += \
Localizable.strings \

Expand Down
39 changes: 0 additions & 39 deletions UI/Contacts/Toolbars/SOGoContactFolder.toolbar

This file was deleted.

4 changes: 2 additions & 2 deletions UI/Contacts/UIxContactEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
#ifndef __UIxContactEditor_H__
#define __UIxContactEditor_H__

#include <SOGoUI/UIxComponent.h>
#include <SOGoUI/SOGoDirectAction.h>

@class NSString;
@class NSMutableDictionary;

@protocol SOGoContactFolder;

@interface UIxContactEditor : UIxComponent
@interface UIxContactEditor : SOGoDirectAction
{
id addressBookItem;
NGVCard *card;
Expand Down
133 changes: 1 addition & 132 deletions UI/Contacts/UIxContactEditor.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
#import <NGObjWeb/NSException+HTTP.h>
#import <NGObjWeb/SoPermissions.h>
#import <NGObjWeb/SoSecurityManager.h>
#import <NGObjWeb/WOContext+SoObjects.h>
#import <NGObjWeb/WORequest.h>
#import <NGObjWeb/WOResponse.h>
#import <NGExtensions/NSNull+misc.h>


#import <SOGo/CardElement+SOGo.h>
#import <SOGo/NSArray+Utilities.h>
#import <SOGo/NSDictionary+Utilities.h>
Expand Down Expand Up @@ -141,30 +141,6 @@ - (NSString *) item

/* helper */

- (NSString *) _completeURIForMethod: (NSString *) _method
{
// TODO: this is a DUP of UIxAppointmentEditor
NSString *uri;
NSRange r;

uri = [[[self context] request] uri];

/* first: identify query parameters */
r = [uri rangeOfString: @"?" options:NSBackwardsSearch];
if (r.length > 0)
uri = [uri substringToIndex:r.location];

/* next: append trailing slash */
if (![uri hasSuffix: @"/"])
uri = [uri stringByAppendingString: @"/"];

/* next: append method */
uri = [uri stringByAppendingString:_method];

/* next: append query parameters */
return [self completeHrefForMethod:uri];
}

- (BOOL) isNew
{
return ([[self clientObject] isNew]);
Expand Down Expand Up @@ -213,85 +189,6 @@ - (NSString *) addressBookDisplayName
return [addressBookItem displayName];
}

- (BOOL) supportCategories
{
return [[self clientObject] isKindOfClass: SOGoContactGCSEntryK];
}

- (void) setJsonContactCategories: (NSString *) jsonCategories
{
NSArray *newCategories;

newCategories = [jsonCategories objectFromJSONString];
if ([newCategories isKindOfClass: [NSArray class]])
[[self ldifRecord] setObject: newCategories
forKey: @"vcardcategories"];
else
[[self ldifRecord] removeObjectForKey: @"vcardcategories"];
}

- (NSString *) jsonContactCategories
{
NSArray *categories;

categories = [[self ldifRecord] objectForKey: @"vcardcategories"];

return [categories jsonRepresentation];
}

- (NSArray *) _languageContactsCategories
{
NSArray *categoryLabels;

categoryLabels = [[self labelForKey: @"contacts_category_labels"]
componentsSeparatedByString: @","];
if (!categoryLabels)
categoryLabels = [NSArray array];

return [categoryLabels trimmedComponents];
}

- (NSArray *) _fetchAndCombineCategoriesList
{
NSString *ownerLogin;
SOGoUserDefaults *ud;
NSArray *cats, *newCats, *contactCategories;

ownerLogin = [[self clientObject] ownerInContext: context];
ud = [[SOGoUser userWithLogin: ownerLogin] userDefaults];
cats = [ud contactsCategories];
if (!cats)
cats = [self _languageContactsCategories];

contactCategories = [[self ldifRecord] objectForKey: @"vcardcategories"];
if (contactCategories)
{
newCats = [cats mergedArrayWithArray: contactCategories];
if ([newCats count] != [cats count])
{
cats = [newCats sortedArrayUsingSelector:
@selector (localizedCaseInsensitiveCompare:)];
[ud setContactsCategories: cats];
[ud synchronize];
}
}

return cats;
}

- (NSString *) contactCategoriesList
{
NSArray *cats;
NSString *list;

cats = [self _fetchAndCombineCategoriesList];
list = [cats jsonRepresentation];
if (!list)
list = @"[]";

return list;
}

/* actions */

// - (BOOL) shouldTakeValuesFromRequest: (WORequest *) request
Expand Down Expand Up @@ -590,33 +487,5 @@ - (void) setAttributes: (NSDictionary *) attributes
return [self responseWithStatus: 200 andJSONRepresentation: data];
}

- (id) writeAction
{
NSString *email, *cn, *url;
NSMutableString *address;

[self ldifRecord];
email = [ldifRecord objectForKey: @"mail"];
if ([email length] == 0)
email = [ldifRecord objectForKey: @"mozillasecondemail"];

if (email)
{
address = [NSMutableString string];
cn = [ldifRecord objectForKey: @"cn"];
if ([cn length] > 0)
[address appendFormat: @"%@ <%@>", cn, email];
else
[address appendString: email];

url = [NSString stringWithFormat: @"%@/Mail/compose?mailto=%@",
[self userFolderPath], address];
}
else
url = [NSString stringWithFormat: @"%@/Mail/compose", [self userFolderPath]];

return [self redirectToLocation: url];
}

@end /* UIxContactEditor */

9 changes: 1 addition & 8 deletions UI/Contacts/UIxContactFoldersView.m
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,6 @@ - (NSArray *) personalContactInfos
return contactInfos;
}

- (id <WOActionResults>) mailerContactsAction
{
selectorComponentClass = @"UIxContactsMailerSelection";

return self;
}

- (NSString *) selectorComponentClass
{
return selectorComponentClass;
Expand Down Expand Up @@ -290,7 +283,7 @@ - (NSArray *) contactFolders
NSString *userLogin, *owner;
NSArray *folders, *allACLs;
NSDictionary *folderAttrs;
id currentFolder;
id <SOGoContactFolder> currentFolder;

BOOL objectCreator, objectEditor, objectEraser, synchronize;
int max, i;
Expand Down
97 changes: 0 additions & 97 deletions UI/Contacts/UIxContactsFilterPanel.m

This file was deleted.

Loading

0 comments on commit 1579ebd

Please sign in to comment.