[OGo-Users] Default value for Comment field
Adam Tauno Williams
users@opengroupware.org
Wed, 14 Feb 2007 11:33:00 -0500
--=-yAy7WVpP9yJ5jmgzhWQ9
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
On Wed, 2007-02-14 at 09:48 -0600, Gregory Malsack wrote:
> HUGE shout out for Adam!!! Thanks mucho!!
>=20
> This is a much better way then what I did, however the additional fields
> do not show up printview of the calendar event. Can you show me how that
> might be done?
My guess would be editing
SkyAppointmentPrintViewer.html/SkyAppointmentPrintViewer.wod in
WebUI/Templates/LSWScheduler.
Somehow you have to get LSWObjectViewer into the page *like* is in
LSWAppointmentViewer.wox:
<var:if condition=3D"showProperties">
<var:component className=3D"LSWObjectViewer"
object=3D"extendedAttributes"
attributes=3D"extendedAttributeSpec"
const:namespace=3D
"http://www.opengroupware.org/properties/ext-attr"
/>
</var:if>
(Note that LSWAppointmentViewer is a WOX while SkyAppointmentPrintViewer
is an HTML/WOD).
But my gut tells me you'd have to edit
WebUI/Scheduler/LSWScheduler/SkyAppointmentPrintViewer.m as well to
marshal the values of the properties; I don't see any reference to the
propertyManager in that file so I doubt it currently does. See
WebUI/Scheduler/LSWScheduler/LSWAppointmentViewer.m for an example of
how to marshal the values (it is really very easy):
-----<start>-------
static NSArray *extAttrSpec =3D nil;
....
extAttrSpec =3D [[ud arrayForKey:@"OGoExtendedAptAttributes"] copy];
if ([extAttrSpec isNotEmpty])
NSLog(@"Note(LSWAppointmentViewer): extended apt attrs are
configured.");
else
extAttrSpec =3D nil;
.....
/* extended apt attributes (properties) */
- (BOOL)showProperties {
return [extAttrSpec isNotEmpty];
}
- (NSArray *)extendedAttributeSpec {
return extAttrSpec;
}
- (NSDictionary *)extendedAttributes {
SkyObjectPropertyManager *pm;
pm =3D [[[self session] commandContext] propertyManager];
return [pm propertiesForGlobalID:[[self object]
valueForKey:@"globalID"]
namespace:XMLNS_OGoExtAttrPropNamespace];
}
-----<end>------- + plus some other little bits in the initialization of
the object.
This certainly merits opening an enhancement request in Bugzilla.
Seems like an important fix to me; I haven't noticed since I don't ever
print anything. :) But now that you've disturbed the karma some user is
going to bug me about it any minute now.... :(
I don't have much spare time in the next couple of days, but I might
take a crack at this over the weekend if you can't figure it out.
--=-yAy7WVpP9yJ5jmgzhWQ9
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
iD8DBQBF0zm8LRePpNle04MRAhAKAJwIpytovfzgFR/Kqa3Xk0bpTIcDbQCfS2XR
xMShraBGYMSbGCBg2Jh+bHY=
=aXIn
-----END PGP SIGNATURE-----
--=-yAy7WVpP9yJ5jmgzhWQ9--