diff --git a/ChangeLog b/ChangeLog index 1f3cb42ac..14a10786c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,18 @@ 2006-07-11 Wolfgang Sourdeau + * UI/Contacts/UIxContactEditorBase.m ([UIxContactEditorBase + -snapshot]): add an entry for "email" into the snapshot + dictionary if a "contactEmail" URL parameter was detected and if + the entry for "email" is empty. + + * UI/Contacts/Toolbars/SOGoContactFolder.toolbar: the "new card" + button now invokes the newContact() js function in ContactsUI.js + instead of opening "new" directly. newContact() pops up a window + stripped from its navigation bar. + + * UI/Contacts/ContactsUI.js: new module specific to the ContactsUI + bundle (AddressBook). + * UI/Templates/MailerUI/UIxMailView.wox: added a div of class "menu" and id "addressMenu" have the header email addresses display it with the new menu code in generic.js. diff --git a/UI/Contacts/ContactsUI.js b/UI/Contacts/ContactsUI.js new file mode 100644 index 000000000..525136c37 --- /dev/null +++ b/UI/Contacts/ContactsUI.js @@ -0,0 +1,12 @@ +function newContact(sender) { + var urlstr; + + urlstr = "new"; + newcwin = window.open(urlstr, "SOGo_new_contact", + "width=680,height=520,resizable=1,scrollbars=1,toolbar=0," + + "location=0,directories=0,status=0,menubar=0,copyhistory=0"); + newcwin.focus(); + + return false; /* stop following the link */ +} + diff --git a/UI/Contacts/GNUmakefile b/UI/Contacts/GNUmakefile index 7dfeee4c7..fd552c364 100644 --- a/UI/Contacts/GNUmakefile +++ b/UI/Contacts/GNUmakefile @@ -22,6 +22,7 @@ ContactsUI_OBJC_FILES = \ ContactsUI_RESOURCE_FILES += \ Version \ product.plist \ + ContactsUI.js ContactsUI_RESOURCE_FILES += \ Images/delete.png \ diff --git a/UI/Contacts/Toolbars/SOGoContactFolder.toolbar b/UI/Contacts/Toolbars/SOGoContactFolder.toolbar index fafdca034..627ebeca9 100644 --- a/UI/Contacts/Toolbars/SOGoContactFolder.toolbar +++ b/UI/Contacts/Toolbars/SOGoContactFolder.toolbar @@ -1,9 +1,10 @@ ( /* the toolbar groups -*-cperl-*- */ ( - { link = "new"; + { link = "#"; jsLink="js_card"; label="New Card"; - image="new-card.png"; }, + image="new-card.png"; + onclick = "newContact(this);return false;"; }, { link = "new_list"; label="New List"; image="new-list.png"; } diff --git a/UI/Contacts/UIxContactEditorBase.m b/UI/Contacts/UIxContactEditorBase.m index 80ff0096c..cf426904b 100644 --- a/UI/Contacts/UIxContactEditorBase.m +++ b/UI/Contacts/UIxContactEditorBase.m @@ -54,7 +54,16 @@ return @"{}"; /* empty property list */ } -- (NSMutableDictionary *)snapshot { +- (NSMutableDictionary *) snapshot +{ + NSString *email; + + email = [self queryParameterForKey:@"contactEmail"]; + + if ([email length] > 0 + && ![[self->snapshot objectForKey: @"mail"] length]) + [self->snapshot setObject: email forKey: @"mail"]; + return self->snapshot; } @@ -270,4 +279,9 @@ return [self redirectToLocation:uri]; } +- (BOOL) isPopup +{ + return YES; +} + @end /* UIxContactEditorBase */