From 979d244b6000a011be6d8d10647b2e79b9b17ed5 Mon Sep 17 00:00:00 2001 From: znek Date: Wed, 27 Oct 2004 14:57:35 +0000 Subject: [PATCH] resolve issues #985 and #987 git-svn-id: http://svn.opengroupware.org/SOGo/trunk@429 d1b88da0-ebda-0310-925b-ed51d893ca5b --- SOGo/UI/Contacts/ChangeLog | 14 ++++ .../UI/Contacts/English.lproj/default.strings | 11 ++- SOGo/UI/Contacts/French.lproj/default.strings | 11 ++- SOGo/UI/Contacts/UIxContactEditor.m | 26 +++++-- SOGo/UI/Contacts/UIxContactEditor.wox | 77 +++++++++++++++++- SOGo/UI/Contacts/UIxContactView.wox | 78 ++++++++++++------- SOGo/UI/Contacts/Version | 2 +- 7 files changed, 177 insertions(+), 42 deletions(-) diff --git a/SOGo/UI/Contacts/ChangeLog b/SOGo/UI/Contacts/ChangeLog index 3af0a4a8..e1ad02d0 100644 --- a/SOGo/UI/Contacts/ChangeLog +++ b/SOGo/UI/Contacts/ChangeLog @@ -1,3 +1,17 @@ +2004-10-27 Marcus Mueller + + * v0.9.17 + + * UIxContactEditor.[wox|m]: new parameters "mobile", "departmentNumber" + and "l" passed to callback. Provide proper unescaping to the + callback's parameters. (#985, #987) + + * UIxContactView.wox: properly display new properties, suppress + rendering of "Organization". (#985) + + * {English.lproj|French.lproj}/default.strings: needed to change some + labels according to new requirements. + 2004-10-20 Marcus Mueller * UIxContactsSelectionView.m: several properties provided to the diff --git a/SOGo/UI/Contacts/English.lproj/default.strings b/SOGo/UI/Contacts/English.lproj/default.strings index 3ff39b6c..2f16d876 100644 --- a/SOGo/UI/Contacts/English.lproj/default.strings +++ b/SOGo/UI/Contacts/English.lproj/default.strings @@ -4,21 +4,26 @@ "Contact viewer" = "Contact Viewer"; "Contact editor" = "Contact Editor"; +"Common" = "Common"; "Name" = "Name"; "Lastname" = "Lastname"; "Firstname" = "Firstname"; -"EMail" = "Email"; -"Phone" = "Phone"; + +"Phones" = "Phone numbers"; +"OfficePhone" = "Office"; +"HomePhone" = "Home"; +"MobilePhone" = "Mobile"; "Fax" = "Fax"; "Location" = "Location"; "Organisation" = "Organisation"; "Unit" = "Unit"; -"Common" = "Common"; "Addresses" = "Addresses"; "Postal" = "Postal"; "Home" = "Home"; + "Extended" = "Extended"; +"EMail" = "Email"; "URL" = "URL"; /* button labels */ diff --git a/SOGo/UI/Contacts/French.lproj/default.strings b/SOGo/UI/Contacts/French.lproj/default.strings index 55f14395..52e577d5 100644 --- a/SOGo/UI/Contacts/French.lproj/default.strings +++ b/SOGo/UI/Contacts/French.lproj/default.strings @@ -4,12 +4,17 @@ "Contact viewer" = "Visualiser le contact"; "Contact editor" = "Editer le contact"; +"Common" = "Common"; "Name" = "Nom"; "Lastname" = "Nom"; "Firstname" = "Prénom"; -"EMail" = "Courriel"; -"Phone" = "Téléphone"; + +"Phones" = "Phone numbers"; +"OfficePhone" = "Office"; +"HomePhone" = "Home"; +"MobilePhone" = "Mobile"; "Fax" = "Fax"; + "Location" = "Lieux"; "Organisation" = "Organisation"; "Unit" = "Département"; @@ -18,8 +23,10 @@ "Addresses" = "Adresses"; "Postal" = "Professionnelle"; "Home" = "Personnelle"; + "Extended" = "Internet"; "URL" = "URL"; +"EMail" = "Courriel"; /* button labels */ diff --git a/SOGo/UI/Contacts/UIxContactEditor.m b/SOGo/UI/Contacts/UIxContactEditor.m index 9c3f724c..e2a7894f 100644 --- a/SOGo/UI/Contacts/UIxContactEditor.m +++ b/SOGo/UI/Contacts/UIxContactEditor.m @@ -143,25 +143,41 @@ - (NSString *)jsCopyContactCode { static NSString *jsCode = \ + @"function unescapeCallbackParameter(s) {\n" + @" if(!s || s.length == 0)\n" + @" return s;\n" + @" s = s.replace(/'/g, \"'\");\n" + @" s = s.replace(/"/g, '\"');\n" + @" return s;\n" + @"}\n" + @"\n" @"function copyContact(type, cn, dn, email, uid, sn, " @"givenName, telephoneNumber, facsimileTelephoneNumber, " - @"postalAddress, homePostalAddress" + @"mobile, " + @"postalAddress, homePostalAddress, " + @"departmentNumber, l" @") {\n" @" var e;\n" @" e = document.getElementById('email');\n" @" e.setAttribute('value', email);\n" @" e = document.getElementById('sn');\n" - @" e.setAttribute('value', sn);\n" + @" e.setAttribute('value', unescapeCallbackParameter(sn));\n" @" e = document.getElementById('givenName');\n" - @" e.setAttribute('value', givenName);\n" + @" e.setAttribute('value', unescapeCallbackParameter(givenName));\n" @" e = document.getElementById('telephoneNumber');\n" @" e.setAttribute('value', telephoneNumber);\n" @" e = document.getElementById('facsimileTelephoneNumber');\n" @" e.setAttribute('value', facsimileTelephoneNumber);\n" + @" e = document.getElementById('mobile');\n" + @" e.setAttribute('value', mobile);\n" @" e = document.getElementById('postalAddress');\n" - @" e.setAttribute('value', postalAddress);\n" + @" e.setAttribute('value', unescapeCallbackParameter(postalAddress));\n" @" e = document.getElementById('homePostalAddress');\n" - @" e.setAttribute('value', homePostalAddress);\n" + @" e.setAttribute('value', unescapeCallbackParameter(homePostalAddress));\n" + @" e = document.getElementById('departmentNumber');\n" + @" e.setAttribute('value', unescapeCallbackParameter(departmentNumber));\n" + @" e = document.getElementById('l');\n" + @" e.setAttribute('value', unescapeCallbackParameter(l));\n" @"}\n"; return jsCode; } diff --git a/SOGo/UI/Contacts/UIxContactEditor.wox b/SOGo/UI/Contacts/UIxContactEditor.wox index 1b0cc996..f6fca769 100644 --- a/SOGo/UI/Contacts/UIxContactEditor.wox +++ b/SOGo/UI/Contacts/UIxContactEditor.wox @@ -53,7 +53,7 @@ const:windowId="UIxContactTemplates" label:title="Copy from Anais" const:callback="copyContact" - const:extraAttributes="givenName,telephoneNumber,facsimileTelephoneNumber,postalAddress,homePostalAddress" + const:extraAttributes="givenName,telephoneNumber,facsimileTelephoneNumber,mobile,postalAddress,homePostalAddress,departmentNumber,l" /> @@ -104,14 +104,14 @@ - + - : + : @@ -125,6 +125,43 @@ + + + + : + + + + + + + + + + + + : + + + + + + + + + @@ -215,6 +252,40 @@ + + + + : + + + + + + + + + + + + : + + + + + + + + diff --git a/SOGo/UI/Contacts/UIxContactView.wox b/SOGo/UI/Contacts/UIxContactView.wox index eb85be11..1ab7b914 100644 --- a/SOGo/UI/Contacts/UIxContactView.wox +++ b/SOGo/UI/Contacts/UIxContactView.wox @@ -66,29 +66,39 @@ - - - + + + + + - + + + + + - - - - - + +
+ +
+ : + + + + +
: - + >: + - + +
+ : + + + -
- : - - - - -
@@ -117,7 +127,7 @@ : + >:
@@ -127,34 +137,46 @@ : + >: - + : + >: - + + + + + + : + + + + +