+2005-02-15 Helge Hess <helge.hess@opengroupware.org>
+
+ * UIxMailContactEditor.m: added object title (v0.9.3)
+
2005-02-14 Helge Hess <helge.hess@opengroupware.org>
* work on contact editor (v0.9.2)
@implementation UIxMailContactEditor
+/* title */
+
+- (NSString *)objectTitle {
+ NSString *l, *f;
+
+ l = [self valueForKeyPath:@"snapshot.sn"];
+ f = [self valueForKeyPath:@"snapshot.givenName"];
+ if ([f length] == 0) return l;
+ if ([l length] == 0) return f;
+ return [[l stringByAppendingString:@", "] stringByAppendingString:f];
+}
- (NSString *)panelTitle {
- return [self labelForKey:@"Edit Contact"];
+ NSString *s;
+
+ s = [self labelForKey:@"Edit Contact"];
+ s = [s stringByAppendingString:@": "];
+ s = [s stringByAppendingString:[self objectTitle]];
+ return s;
}
@end /* UIxMailContactEditor */
<!-- actual table contents -->
<var:foreach list="contactInfos" item="contact">
- <tr class="tableview" var:id="contact.cName">
- <td class="mailer_listcell_regular">
-<!--
- <a var:href="contact.cName"><var:string value="contact.sn" /></a>
--->
- <a var:href="#"
- onclick="openContact(this, this.parentNode.parentNode.id); return false"
- ><var:string value="contact.sn" /></a>
- </td>
+ <tr class="tableview" var:id="contact.cName"
+ onclick="openContact(this, this.id)"
+ >
+ <td><var:string value="contact.sn" /></td>
<td><var:string value="contact.givenname" /></td>
<td><var:string value="contact.mail" /></td>
<td><var:string value="contact.telephonenumber" /></td>
# version file
-SUBMINOR_VERSION:=2
+SUBMINOR_VERSION:=3
/* JavaScript code for SOGo MailerUI contacts */
function openContact(sender, addruid) {
- window.open(addruid + "/tb.edit", 'SOGo_addr_' + addruid,
- 'width=540,height=320,resizable=1,scrollbars=1,toolbar=0,' +
- 'location=0,directories=0,status=0,menubar=0,copyhistory=0')
+ var w;
+
+ w = window.open(addruid + "/tb.edit", 'SOGo_addr_' + addruid,
+ 'width=540,height=320,resizable=1,scrollbars=1,toolbar=0,' +
+ 'location=0,directories=0,status=0,menubar=0,copyhistory=0');
+ w.focus();
return false;
}