From: helge Date: Sat, 30 Jul 2005 18:44:52 +0000 (+0000) Subject: some more work on the Kolab viewers X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39d49b0dc9a912368993c949ea161ab371a863d1;p=scalable-opengroupware.org some more work on the Kolab viewers git-svn-id: http://svn.opengroupware.org/SOGo/trunk@926 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/UI/MailPartViewers/ChangeLog b/UI/MailPartViewers/ChangeLog index 2e886cbc..cc58921f 100644 --- a/UI/MailPartViewers/ChangeLog +++ b/UI/MailPartViewers/ChangeLog @@ -1,5 +1,11 @@ 2005-07-30 Helge Hess + * v0.9.22 + + * UIxKolabPartContactViewer.m: added accessors for multi-value fields + + * UIxKolabPartViewer.m: added item + * UIxKolabPartViewer.m: cache parsed DOM document (v0.9.21) * v0.9.20 diff --git a/UI/MailPartViewers/UIxKolabPartContactViewer.m b/UI/MailPartViewers/UIxKolabPartContactViewer.m index 9c9a948a..663a9fdc 100644 --- a/UI/MailPartViewers/UIxKolabPartContactViewer.m +++ b/UI/MailPartViewers/UIxKolabPartContactViewer.m @@ -33,4 +33,25 @@ #include "common.h" @implementation UIxKolabPartContactViewer + +- (id)addressElements { + return [[[self domDocument] documentElement] + getElementsByTagName:@"address"]; +} + +- (id)phoneElements { + return [[[self domDocument] documentElement] + getElementsByTagName:@"phone"]; +} + +- (id)emailElements { + return [[[self domDocument] documentElement] + getElementsByTagName:@"email"]; +} + +- (id)customElements { + return [[[self domDocument] documentElement] + getElementsByTagName:@"x-custom"]; +} + @end /* UIxKolabPartContactViewer */ diff --git a/UI/MailPartViewers/UIxKolabPartViewer.h b/UI/MailPartViewers/UIxKolabPartViewer.h index c2d02c68..a47608b6 100644 --- a/UI/MailPartViewers/UIxKolabPartViewer.h +++ b/UI/MailPartViewers/UIxKolabPartViewer.h @@ -34,9 +34,14 @@ @interface UIxKolabPartViewer : UIxMailPartViewer { - id domDocument; + id domDocument; + id item; } +/* getting a DOM representation */ + +- (id)domDocument; + @end #endif /* __Mailer_UIxKolabPartViewer_H__ */ diff --git a/UI/MailPartViewers/UIxKolabPartViewer.m b/UI/MailPartViewers/UIxKolabPartViewer.m index aecdb03a..e5ac1cd6 100644 --- a/UI/MailPartViewers/UIxKolabPartViewer.m +++ b/UI/MailPartViewers/UIxKolabPartViewer.m @@ -38,6 +38,7 @@ static id domBuilder = nil; - (void)dealloc { [(id)self->domDocument release]; + [self->item release]; [super dealloc]; } @@ -46,6 +47,7 @@ static id domBuilder = nil; - (void)resetPathCaches { [super resetPathCaches]; [(id)self->domDocument release]; self->domDocument = nil; + [self->item release]; self->item = nil; } /* getting a DOM representation */ @@ -65,4 +67,13 @@ static id domBuilder = nil; return self->domDocument; } +/* accessors */ + +- (void)setItem:(id)_item { + ASSIGN(self->item, _item); +} +- (id)item { + return self->item; +} + @end /* UIxKolabPartViewer */ diff --git a/UI/MailPartViewers/Version b/UI/MailPartViewers/Version index d7c250fc..af29f2b2 100644 --- a/UI/MailPartViewers/Version +++ b/UI/MailPartViewers/Version @@ -1,6 +1,6 @@ # version file -SUBMINOR_VERSION:=21 +SUBMINOR_VERSION:=22 # v0.9.0 requires libNGiCal v4.5.53 # v0.9.1 requires libNGMime v4.5.213 diff --git a/UI/Templates/MailPartViewers/UIxKolabPartContactViewer.wox b/UI/Templates/MailPartViewers/UIxKolabPartContactViewer.wox index 0b5f5724..be0a0504 100644 --- a/UI/Templates/MailPartViewers/UIxKolabPartContactViewer.wox +++ b/UI/Templates/MailPartViewers/UIxKolabPartContactViewer.wox @@ -95,6 +95,28 @@ + + + : + + + + () +
+
+ + + + + : + + + + <> +
+
+ + +
+ + +
+ + : +
+
+ +
+
+
+
+
+ +
+
+
+ +
+ + + + +
+ + + + + + + +
:
+
+
+