From e9723fc197c03673bf560f9499a21fd02db4e3fb Mon Sep 17 00:00:00 2001 From: znek Date: Wed, 25 Aug 2004 16:06:10 +0000 Subject: [PATCH] "Contacts" product does compile now git-svn-id: http://svn.opengroupware.org/SOGo/trunk@269 d1b88da0-ebda-0310-925b-ed51d893ca5b --- SOGo/SOGo.xcode/project.pbxproj | 258 +++++++++++++++++- SOGo/UI/Contacts/ChangeLog | 6 +- .../UI/Contacts/English.lproj/default.strings | 109 -------- SOGo/UI/Contacts/French.lproj/default.strings | 76 ------ SOGo/UI/Contacts/GNUmakefile | 13 +- SOGo/UI/Contacts/UIxContactEditor.m | 53 ++++ SOGo/UI/Contacts/UIxContactEditor.wox | 14 + SOGo/UI/Contacts/UIxContactView.m | 64 +++++ SOGo/UI/Contacts/UIxContactView.wox | 14 + SOGo/UI/Contacts/UIxContactsListView.m | 37 +++ SOGo/UI/Contacts/UIxContactsListView.wox | 14 + SOGo/UI/Contacts/common.h | 34 +++ 12 files changed, 496 insertions(+), 196 deletions(-) create mode 100644 SOGo/UI/Contacts/UIxContactEditor.m create mode 100644 SOGo/UI/Contacts/UIxContactEditor.wox create mode 100644 SOGo/UI/Contacts/UIxContactView.m create mode 100644 SOGo/UI/Contacts/UIxContactView.wox create mode 100644 SOGo/UI/Contacts/UIxContactsListView.m create mode 100644 SOGo/UI/Contacts/UIxContactsListView.wox create mode 100644 SOGo/UI/Contacts/common.h diff --git a/SOGo/SOGo.xcode/project.pbxproj b/SOGo/SOGo.xcode/project.pbxproj index 061164e5..2a96072f 100644 --- a/SOGo/SOGo.xcode/project.pbxproj +++ b/SOGo/SOGo.xcode/project.pbxproj @@ -366,6 +366,7 @@ AD071CE606CD2ACE00A9EEF4, AD071CEC06CD2ACE00A9EEF4, AD071CED06CD2ACE00A9EEF4, + E87206C30692E3D10099CBBD, AD73BE4A06CF88BF00226A2D, AD73BE4B06CF88BF00226A2D, AD071D1206CD2BCB00A9EEF4, @@ -781,6 +782,250 @@ refType = 4; sourceTree = ""; }; + ADDF4B3006DCEAC800C4E7F8 = { + children = ( + ADDF4B3C06DCEAC800C4E7F8, + ADDF4B3406DCEAC800C4E7F8, + ADDF4B3506DCEAC800C4E7F8, + ADDF4B3206DCEAC800C4E7F8, + ADDF4B3E06DCEAC800C4E7F8, + ADDF4B3106DCEAC800C4E7F8, + ADDF4B3D06DCEAC800C4E7F8, + ADDF4B3606DCEAC800C4E7F8, + ADDF4B4406DCEB1200C4E7F8, + ADDF4B4106DCEB0C00C4E7F8, + ADDF4B6D06DCEBB400C4E7F8, + ); + isa = PBXGroup; + path = Contacts; + refType = 4; + sourceTree = ""; + }; + ADDF4B3106DCEAC800C4E7F8 = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = text.plist; + path = "bundle-info.plist"; + refType = 4; + sourceTree = ""; + }; + ADDF4B3206DCEAC800C4E7F8 = { + fileEncoding = 4; + indentWidth = 8; + isa = PBXFileReference; + lastKnownFileType = text; + path = ChangeLog; + refType = 4; + sourceTree = ""; + tabWidth = 8; + usesTabs = 1; + }; + ADDF4B3306DCEAC800C4E7F8 = { + fileEncoding = 4; + indentWidth = 2; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = ContactsUIProduct.m; + refType = 4; + sourceTree = ""; + tabWidth = 2; + }; + ADDF4B3406DCEAC800C4E7F8 = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = text; + path = COPYING; + refType = 4; + sourceTree = ""; + }; + ADDF4B3506DCEAC800C4E7F8 = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = text; + path = COPYRIGHT; + refType = 4; + sourceTree = ""; + }; + ADDF4B3606DCEAC800C4E7F8 = { + children = ( + ADDF4B3706DCEAC800C4E7F8, + ADDF4B3806DCEAC800C4E7F8, + ); + isa = PBXVariantGroup; + name = default.strings; + path = ""; + refType = 4; + sourceTree = ""; + }; + ADDF4B3706DCEAC800C4E7F8 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = text.plist.strings; + name = English; + path = English.lproj/default.strings; + refType = 4; + sourceTree = ""; + }; + ADDF4B3806DCEAC800C4E7F8 = { + fileEncoding = 5; + isa = PBXFileReference; + lastKnownFileType = text.plist.strings; + name = French; + path = French.lproj/default.strings; + refType = 4; + sourceTree = ""; + }; + ADDF4B3906DCEAC800C4E7F8 = { + explicitFileType = sourcecode.make; + fileEncoding = 4; + indentWidth = 8; + isa = PBXFileReference; + path = GNUmakefile; + refType = 4; + sourceTree = ""; + tabWidth = 8; + }; + ADDF4B3A06DCEAC800C4E7F8 = { + explicitFileType = sourcecode.make; + fileEncoding = 4; + indentWidth = 8; + isa = PBXFileReference; + path = GNUmakefile.postamble; + refType = 4; + sourceTree = ""; + tabWidth = 8; + }; + ADDF4B3B06DCEAC800C4E7F8 = { + explicitFileType = sourcecode.make; + fileEncoding = 4; + indentWidth = 8; + isa = PBXFileReference; + path = GNUmakefile.preamble; + refType = 4; + sourceTree = ""; + tabWidth = 8; + }; + ADDF4B3C06DCEAC800C4E7F8 = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = text; + path = NOTES; + refType = 4; + sourceTree = ""; + }; + ADDF4B3D06DCEAC800C4E7F8 = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = text.plist; + path = product.plist; + refType = 4; + sourceTree = ""; + }; + ADDF4B3E06DCEAC800C4E7F8 = { + explicitFileType = sourcecode.make; + fileEncoding = 4; + indentWidth = 8; + isa = PBXFileReference; + path = Version; + refType = 4; + sourceTree = ""; + tabWidth = 8; + }; + ADDF4B4106DCEB0C00C4E7F8 = { + children = ( + ADDF4B6A06DCEBA100C4E7F8, + ADDF4B3306DCEAC800C4E7F8, + ); + isa = PBXGroup; + name = Classes; + refType = 4; + sourceTree = ""; + }; + ADDF4B4406DCEB1200C4E7F8 = { + children = ( + ADDF4B3906DCEAC800C4E7F8, + ADDF4B3A06DCEAC800C4E7F8, + ADDF4B3B06DCEAC800C4E7F8, + ); + isa = PBXGroup; + name = Makefiles; + refType = 4; + sourceTree = ""; + }; + ADDF4B6A06DCEBA100C4E7F8 = { + fileEncoding = 4; + indentWidth = 2; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = common.h; + refType = 4; + sourceTree = ""; + }; + ADDF4B6D06DCEBB400C4E7F8 = { + children = ( + ADDF4B7006DCEC4300C4E7F8, + ADDF4B6F06DCEC4300C4E7F8, + ADDF4B7306DCEC5200C4E7F8, + ADDF4B7206DCEC5200C4E7F8, + ADDF4B7606DCEC5F00C4E7F8, + ADDF4B7506DCEC5F00C4E7F8, + ); + isa = PBXGroup; + name = Components; + refType = 4; + sourceTree = ""; + }; + ADDF4B6F06DCEC4300C4E7F8 = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = text.xml; + path = UIxContactsListView.wox; + refType = 4; + sourceTree = ""; + }; + ADDF4B7006DCEC4300C4E7F8 = { + fileEncoding = 4; + indentWidth = 2; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = UIxContactsListView.m; + refType = 4; + sourceTree = ""; + }; + ADDF4B7206DCEC5200C4E7F8 = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = text.xml; + path = UIxContactView.wox; + refType = 4; + sourceTree = ""; + }; + ADDF4B7306DCEC5200C4E7F8 = { + fileEncoding = 4; + indentWidth = 2; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = UIxContactView.m; + refType = 4; + sourceTree = ""; + }; + ADDF4B7506DCEC5F00C4E7F8 = { + fileEncoding = 4; + isa = PBXFileReference; + lastKnownFileType = text.xml; + path = UIxContactEditor.wox; + refType = 4; + sourceTree = ""; + }; + ADDF4B7606DCEC5F00C4E7F8 = { + fileEncoding = 4; + indentWidth = 2; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.objc; + path = UIxContactEditor.m; + refType = 4; + sourceTree = ""; + }; ADE2C23C06B7BED40065D56F = { fileEncoding = 4; isa = PBXFileReference; @@ -1574,8 +1819,8 @@ E87206C20692E3D10099CBBD, E87207E80692E3D20099CBBD, AD6BCEE5069D77E9003664CD, - E87206C30692E3D10099CBBD, E87207EA0692E3D20099CBBD, + ADDF4B3006DCEAC800C4E7F8, AD07123606C904C900A9EEF4, ); isa = PBXGroup; @@ -1608,9 +1853,10 @@ E8720A570692E4DF0099CBBD, ); isa = PBXGroup; - path = Common; - refType = 4; - sourceTree = ""; + name = Common; + path = UI/Common; + refType = 2; + sourceTree = SOURCE_ROOT; }; E87207470692E3D20099CBBD = { fileEncoding = 4; @@ -2017,11 +2263,11 @@ }; E87207EA0692E3D20099CBBD = { children = ( - E872088F0692E3D30099CBBD, + E87208D30692E3D30099CBBD, E87208910692E3D30099CBBD, E87208920692E3D30099CBBD, + E872088F0692E3D30099CBBD, E872090C0692E3D30099CBBD, - E87208D30692E3D30099CBBD, E872088E0692E3D30099CBBD, E87208E20692E3D30099CBBD, ADCDE53206ADA8C800BFCE2B, diff --git a/SOGo/UI/Contacts/ChangeLog b/SOGo/UI/Contacts/ChangeLog index e69b116e..eff54605 100644 --- a/SOGo/UI/Contacts/ChangeLog +++ b/SOGo/UI/Contacts/ChangeLog @@ -1,3 +1,7 @@ 2004-08-25 Marcus Mueller - * ChangeLog: created + * common.h: new file + + * UIxContact*: added template views + + * ChangeLog: created \ No newline at end of file diff --git a/SOGo/UI/Contacts/English.lproj/default.strings b/SOGo/UI/Contacts/English.lproj/default.strings index 3f0bfe0b..6cf7ce7d 100644 --- a/SOGo/UI/Contacts/English.lproj/default.strings +++ b/SOGo/UI/Contacts/English.lproj/default.strings @@ -1,110 +1 @@ /* this file is in ISO-8859-1 format! */ - -/* Day */ - -"Sunday" = "Sunday"; -"Monday" = "Monday"; -"Tuesday" = "Tuesday"; -"Wednesday" = "Wednesday"; -"Thursday" = "Thursday"; -"Friday" = "Friday"; -"Saturday" = "Saturday"; - -"a2_Sunday" = "Su"; -"a2_Monday" = "Mo"; -"a2_Tuesday" = "Tu"; -"a2_Wednesday" = "We"; -"a2_Thursday" = "Th"; -"a2_Friday" = "Fr"; -"a2_Saturday" = "Sa"; - -"dayLabelFormat" = "%Y-%m-%d"; -"today" = "today"; - -/* Week */ - -"Week" = "Week"; -"this week" = "this week"; - - -/* Month */ - -"this month" = "this month"; - -"January" = "January"; -"February" = "February"; -"March" = "March"; -"April" = "April"; -"May" = "May"; -"June" = "June"; -"July" = "July"; -"August" = "August"; -"September" = "September"; -"October" = "October"; -"November" = "November"; -"December" = "December"; - -"a3_January" = "Jan"; -"a3_February" = "Feb"; -"a3_March" = "Mar"; -"a3_April" = "Apr"; -"a3_May" = "May"; -"a3_June" = "Jun"; -"a3_July" = "Jul"; -"a3_August" = "Aug"; -"a3_September" = "Sep"; -"a3_October" = "Oct"; -"a3_November" = "Nov"; -"a3_December" = "Dec"; - -/* Year */ - -"this year" = "this year"; - - -/* Menu */ - -"Calendar" = "Calendar"; -"Contacts" = "Contacts"; - - -/* Misc */ - -"new" = "new"; -"printview" = "printview"; -"proposal" = "proposal"; -"Save" = "Save"; -"Cancel" = "Cancel"; -"OpenGroupware.org" = "OpenGroupware.org" - -/* Appointments */ - -"Appointment editor" = "Appointment Editor"; -"Appointment proposal" = "Appointment Proposal"; -"Appointment on" = "Appointment on"; -"Start time" = "Start time"; -"End time" = "End time"; -"Start date" = "Start date"; -"End date" = "End date"; -"Earliest start time" = "Earliest start time"; -"Latest end time" = "Latest end time"; -"browse start date" = "browse start date"; -"browse end date" = "browse end date"; -"Title" = "Title"; -"Location" = "Location"; -"Duration" = "Duration"; -"Search participants" = "Search participants"; -"Participants" = "Participants"; -"Search resources" = "Search resources"; -"Resources" = "Resources"; -"Search appointments" = "Search appointments"; -"Search" = "Search"; -"Search in Anais" = "Search in Anaïs"; - - -/* calendar modes */ - -"Overview" = "Overview"; -"Chart" = "Chart"; -"List" = "List"; -"Columns" = "Columns"; diff --git a/SOGo/UI/Contacts/French.lproj/default.strings b/SOGo/UI/Contacts/French.lproj/default.strings index 18b4e1ec..6cf7ce7d 100644 --- a/SOGo/UI/Contacts/French.lproj/default.strings +++ b/SOGo/UI/Contacts/French.lproj/default.strings @@ -1,77 +1 @@ /* this file is in ISO-8859-1 format! */ - -/* Day */ - -"Sunday" = "Dimanche"; -"Monday" = "Lundi"; -"Tuesday" = "Mardi"; -"Wednesday" = "Mercredi"; -"Thursday" = "Jeudi"; -"Friday" = "Vendredi"; -"Saturday" = "Samedi"; - -"a2_Sunday" = "Di"; -"a2_Monday" = "Lu"; -"a2_Tuesday" = "Ma"; -"a2_Wednesday" = "Me"; -"a2_Thursday" = "Je"; -"a2_Friday" = "Ve"; -"a2_Saturday" = "Sa"; - -"dayLabelFormat" = "%Y-%m-%d"; - - -/* Week */ - -"Week" = "Semaine"; -"this week" = "cette semaine"; - - -/* Month */ -"this month" = "ce mois"; - -"January" = "Janvier"; -"February" = "Février"; -"March" = "Mars"; -"April" = "Avril"; -"May" = "Mai"; -"June" = "Juin"; -"July" = "Juillet"; -"August" = "Août"; -"September" = "Septembre"; -"October" = "Octobre"; -"November" = "Novembre"; -"December" = "Décembre"; - -"a3_January" = "Jan"; -"a3_February" = "Feb"; -"a3_March" = "Mar"; -"a3_April" = "Apr"; -"a3_May" = "May"; -"a3_June" = "Jun"; -"a3_July" = "Jul"; -"a3_August" = "Aug"; -"a3_September" = "Sep"; -"a3_October" = "Oct"; -"a3_November" = "Nov"; -"a3_December" = "Dec"; - - -/* Year */ - -"this year" = "this year"; - - -/* Misc */ - -"new" = "new"; -"printview" = "printview"; -"proposal" = "proposal"; - - -/* calendar modes */ - -"Overview" = "Overview"; -"Chart" = "Chart"; -"List" = "List"; -"Columns" = "Columns"; diff --git a/SOGo/UI/Contacts/GNUmakefile b/SOGo/UI/Contacts/GNUmakefile index 3b6e8edf..106cbdb5 100644 --- a/SOGo/UI/Contacts/GNUmakefile +++ b/SOGo/UI/Contacts/GNUmakefile @@ -12,14 +12,19 @@ ContactsUI_LANGUAGES = English French ContactsUI_OBJC_FILES = \ ContactsUIProduct.m \ + \ + UIxContactsListView.m \ + UIxContactView.m \ + UIxContactEditor.m \ ContactsUI_RESOURCE_FILES += \ - Version \ - product.plist - -ContactsUI_RESOURCE_FILES += \ + Version \ + product.plist \ ContactsUI_RESOURCE_FILES += \ + UIxContactsListView.wox \ + UIxContactView.wox \ + UIxContactEditor.wox \ ContactsUI_LOCALIZED_RESOURCE_FILES += \ default.strings \ diff --git a/SOGo/UI/Contacts/UIxContactEditor.m b/SOGo/UI/Contacts/UIxContactEditor.m new file mode 100644 index 00000000..9f7caf4a --- /dev/null +++ b/SOGo/UI/Contacts/UIxContactEditor.m @@ -0,0 +1,53 @@ +/* + Copyright (C) 2000-2004 SKYRIX Software AG + + This file is part of OGo + + OGo is free software; you can redistribute it and/or modify it under + 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. + + OGo is distributed in the hope that it will be useful, but WITHOUT ANY + 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. +*/ +// $Id$ + + +#include + +@interface UIxContactEditor : UIxComponent +{ + +} + +@end + +#include "common.h" + +@implementation UIxContactEditor + +- (id)saveAction { +#if 0 + NSException *ex; + + ex = [[self clientObject] saveContentString:content]; + if (ex != nil) { + [self setErrorText:[ex reason]]; + return self; + } + + return [self redirectToLocation:[self _completeURIForMethod:@".."]]; +#else + return self; +#endif +} + +@end diff --git a/SOGo/UI/Contacts/UIxContactEditor.wox b/SOGo/UI/Contacts/UIxContactEditor.wox new file mode 100644 index 00000000..7f53e297 --- /dev/null +++ b/SOGo/UI/Contacts/UIxContactEditor.wox @@ -0,0 +1,14 @@ + + + +
+ clientObject: +
+
\ No newline at end of file diff --git a/SOGo/UI/Contacts/UIxContactView.m b/SOGo/UI/Contacts/UIxContactView.m new file mode 100644 index 00000000..97bd85df --- /dev/null +++ b/SOGo/UI/Contacts/UIxContactView.m @@ -0,0 +1,64 @@ +/* + Copyright (C) 2000-2004 SKYRIX Software AG + + This file is part of OGo + + OGo is free software; you can redistribute it and/or modify it under + 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. + + OGo is distributed in the hope that it will be useful, but WITHOUT ANY + 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. +*/ +// $Id$ + + +#include + +@interface UIxContactView : UIxComponent +{ + +} + +- (BOOL)isDeletableClientObject; + +@end + +#include "common.h" + +@implementation UIxContactView + +- (BOOL)isDeletableClientObject { + return [[self clientObject] respondsToSelector:@selector(delete)]; +} + +- (id)deleteAction { + NSException *ex; + id url; + + if (![self isDeletableClientObject]) { + /* return 400 == Bad Request */ + return [NSException exceptionWithHTTPStatus:400 + reason:@"method cannot be invoked on " + @"the specified object"]; + } + + if ((ex = [[self clientObject] delete]) != nil) { + // TODO: improve error handling + [self debugWithFormat:@"failed to delete: %@", ex]; + return ex; + } + + url = [[[self clientObject] container] baseURLInContext:[self context]]; + return [self redirectToLocation:url]; +} + +@end diff --git a/SOGo/UI/Contacts/UIxContactView.wox b/SOGo/UI/Contacts/UIxContactView.wox new file mode 100644 index 00000000..7f53e297 --- /dev/null +++ b/SOGo/UI/Contacts/UIxContactView.wox @@ -0,0 +1,14 @@ + + + +
+ clientObject: +
+
\ No newline at end of file diff --git a/SOGo/UI/Contacts/UIxContactsListView.m b/SOGo/UI/Contacts/UIxContactsListView.m new file mode 100644 index 00000000..5e6610c3 --- /dev/null +++ b/SOGo/UI/Contacts/UIxContactsListView.m @@ -0,0 +1,37 @@ +/* + Copyright (C) 2000-2004 SKYRIX Software AG + + This file is part of OGo + + OGo is free software; you can redistribute it and/or modify it under + 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. + + OGo is distributed in the hope that it will be useful, but WITHOUT ANY + 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. +*/ +// $Id$ + + +#include + +@interface UIxContactsListView : UIxComponent +{ + +} + +@end + +#include "common.h" + +@implementation UIxContactsListView + +@end diff --git a/SOGo/UI/Contacts/UIxContactsListView.wox b/SOGo/UI/Contacts/UIxContactsListView.wox new file mode 100644 index 00000000..7f53e297 --- /dev/null +++ b/SOGo/UI/Contacts/UIxContactsListView.wox @@ -0,0 +1,14 @@ + + + +
+ clientObject: +
+
\ No newline at end of file diff --git a/SOGo/UI/Contacts/common.h b/SOGo/UI/Contacts/common.h new file mode 100644 index 00000000..bb109a4a --- /dev/null +++ b/SOGo/UI/Contacts/common.h @@ -0,0 +1,34 @@ +/* + Copyright (C) 2004 SKYRIX Software AG + + This file is part of OpenGroupware.org. + + OGo is free software; you can redistribute it and/or modify it under + 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. + + OGo is distributed in the hope that it will be useful, but WITHOUT ANY + 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. +*/ +// $Id$ + +#import + +#if LIB_FOUNDATION_LIBRARY +# include +#elif NeXT_Foundation_LIBRARY || COCOA_Foundation_LIBRARY +# include +# include +#endif + +#include +#include +#include -- 2.39.5