From 96a3f1ef240028bccc0718ce68725687e487836f Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 9 Feb 2007 21:24:15 +0000 Subject: [PATCH] Monotone-Parent: 10fd99221b45b565526188e4580f4cd6b647df6d Monotone-Revision: be74b6fb3582ef97515c3cb7410750aa6d1d7641 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-02-09T21:24:15 Monotone-Branch: ca.inverse.sogo --- UI/Contacts/UIxContactFoldersView.m | 16 ++++++++++++++++ UI/Contacts/product.plist | 5 +++++ 2 files changed, 21 insertions(+) diff --git a/UI/Contacts/UIxContactFoldersView.m b/UI/Contacts/UIxContactFoldersView.m index 4219446d0..6a1b106a1 100644 --- a/UI/Contacts/UIxContactFoldersView.m +++ b/UI/Contacts/UIxContactFoldersView.m @@ -25,6 +25,7 @@ #import #import #import +#import #import #import @@ -68,6 +69,21 @@ return [self _selectActionForApplication: @"new"]; } +- (id ) newAbAction +{ + id response; + NSString *name; + + name = [self queryParameterForKey: @"name"]; + if ([name length] > 0) + response = [[self clientObject] newFolderWithName: name]; + else + response = [NSException exceptionWithHTTPStatus: 400 + reason: @"The name is missing"]; + + return response; +} + - (id) selectForSchedulerAction { return [self _selectActionForApplication: @"scheduler-contacts"]; diff --git a/UI/Contacts/product.plist b/UI/Contacts/product.plist index 7dce9f599..a3424d7ba 100644 --- a/UI/Contacts/product.plist +++ b/UI/Contacts/product.plist @@ -17,6 +17,11 @@ pageName = "UIxContactFoldersView"; actionName = "new"; }; + newAb = { + protectedBy = "View"; + pageName = "UIxContactFoldersView"; + actionName = "newAb"; + }; scheduler-contacts = { protectedBy = "View"; pageName = "UIxContactFoldersView";