]> err.no Git - scalable-opengroupware.org/commitdiff
resolve issues #985 and #987
authorznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Wed, 27 Oct 2004 14:57:35 +0000 (14:57 +0000)
committerznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Wed, 27 Oct 2004 14:57:35 +0000 (14:57 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@429 d1b88da0-ebda-0310-925b-ed51d893ca5b

SOGo/UI/Contacts/ChangeLog
SOGo/UI/Contacts/English.lproj/default.strings
SOGo/UI/Contacts/French.lproj/default.strings
SOGo/UI/Contacts/UIxContactEditor.m
SOGo/UI/Contacts/UIxContactEditor.wox
SOGo/UI/Contacts/UIxContactView.wox
SOGo/UI/Contacts/Version

index 3af0a4a84dc47e69f012116e238ab9366db7654c..e1ad02d0c2a87922e86be32a28d55e6a24eac780 100644 (file)
@@ -1,3 +1,17 @@
+2004-10-27  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * 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  <znek@mulle-kybernetik.com>
 
        * UIxContactsSelectionView.m: several properties provided to the
index 3ff39b6c93e0778396fb784962ae76c739feef3c..2f16d8766167e967c00cc1aaed580193d6ff0cc5 100644 (file)
@@ -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 */
index 55f143953cde7bbe4c85185874679a45464281ac..52e577d5b0c3434571050e37f44d5737a1964a97 100644 (file)
@@ -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";
 "Addresses"         = "Adresses";
 "Postal"            = "Professionnelle";
 "Home"              = "Personnelle";
+
 "Extended"          = "Internet";
 "URL"               = "URL";
+"EMail"             = "Courriel";
 
 /* button labels */
 
index 9c3f724cd9088b876e837f7e0df1386d2c44f211..e2a7894f44de6a1a629cc79b1cd95f04ac5b160e 100644 (file)
 
 - (NSString *)jsCopyContactCode {
   static NSString *jsCode = \
+    @"function unescapeCallbackParameter(s) {\n"
+    @"  if(!s || s.length == 0)\n"
+    @"    return s;\n"
+    @"  s = s.replace(/&apos;/g, \"'\");\n"
+    @"  s = s.replace(/&quot;/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;
 }
index 1b0cc996aa1a46b1fd50a12ba3260e6b5a1dec5b..f6fca7699dfc26cb7ea029037baa0a8dcc41b28b 100644 (file)
@@ -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"
                 />
               </td>
             </tr><tr>
             <tr>
               <td align="left" colspan="2">
                 <span class="aptview_title">
-                  <var:string label:value="Telephones" />
+                  <var:string label:value="Phones" />
                 </span>
               </td>
             </tr>
             <tr valign="top">
               <td align="right" width="15%">
                 <span class="aptview_text">
-                  <var:string label:value="Phone" />:
+                  <var:string label:value="OfficePhone" />:
                 </span>
               </td>
               <td align="left" bgcolor="#FFFFF0">
                 </span>
               </td>
             </tr>
+            <tr valign="top">
+              <td align="right" width="15%">
+                <span class="aptview_text">
+                  <var:string label:value="HomePhone" />:
+                </span>
+              </td>
+              <td align="left" bgcolor="#FFFFF0">
+                <span class="aptview_text">
+                  <input type="text"
+                         name="homeTelephoneNumber"
+                         id="homeTelephoneNumber"
+                         var:value="snapshot.homeTelephoneNumber"
+                         size="60"
+                  />
+                </span>
+              </td>
+            </tr>
+            <tr valign="top">
+              <td align="right" width="15%">
+                <span class="aptview_text">
+                  <var:string label:value="MobilePhone" />:
+                </span>
+              </td>
+              <td align="left" bgcolor="#FFFFF0">
+                <span class="aptview_text">
+                  <!-- pamela.schema defines this as 'mobile',
+                       NOT 'mobileTelephoneNumber'
+                  -->
+                  <input type="text"
+                         name="mobile"
+                         id="mobile"
+                         var:value="snapshot.mobile"
+                         size="60"
+                  />
+                </span>
+              </td>
+            </tr>
             <tr valign="top">
               <td align="right" width="15%">
                 <span class="aptview_text">
                 </span>
               </td>
             </tr>
+            <tr valign="top">
+              <td align="right" width="15%">
+                <span class="aptview_text">
+                  <var:string label:value="Unit" />:
+                </span>
+              </td>
+              <td align="left" bgcolor="#FFFFF0">
+                <span class="aptview_text">
+                  <input type="text"
+                         name="departmentNumber"
+                         id="departmentNumber"
+                         var:value="snapshot.departmentNumber"
+                         size="60"
+                  />
+                </span>
+              </td>
+            </tr>
+            <tr valign="top">
+              <td align="right" width="15%">
+                <span class="aptview_text">
+                  <var:string label:value="Location" />:
+                </span>
+              </td>
+              <td align="left" bgcolor="#FFFFF0">
+                <span class="aptview_text">
+                  <input type="text"
+                         name="l"
+                         id="l"
+                         var:value="snapshot.l"
+                         size="60"
+                  />
+                </span>
+              </td>
+            </tr>
             <tr valign="top">
               <td align="right" width="15%">
                 <span class="aptview_text">
index eb85be1133ab5d3aec892d5f0313c8b3e2677fa3..1ab7b9145edd07c4da7a3ae77cb7857f77075a9f 100644 (file)
   <tr>
     <td valign="top" width="100%">
       <table width="100%" border="0" cellpadding="4" cellspacing="0">
-      <!-- general contact info -->
-      <tr valign="top">
-        <td align="right" width="15%" bgcolor="#E8E8E0">
+        <!-- general contact info -->
+        <tr valign="top">
+          <td align="right" width="15%" bgcolor="#E8E8E0">
+              <span class="aptview_text"
+              ><var:string label:value="Name" />:</span>
+          </td>
+          <td align="left" bgcolor="#FFFFF0">
+              <span class="aptview_text">
+                <var:string value="clientObject.cn" />
+              </span>
+          </td>
+        </tr>
+        <tr valign="top">
+          <td align="right" width="15%" bgcolor="#E8E8E0">
             <span class="aptview_text"
-            ><var:string label:value="Name" />:</span>
-        </td>
-        <td align="left" bgcolor="#FFFFF0">
+            ><var:string label:value="Unit" />:</span>
+          </td>
+          <td align="left" bgcolor="#FFFFF0">
             <span class="aptview_text">
-              <var:string value="clientObject.cn" />
+              <var:string value="clientObject.departmentNumber"/></span>
+          </td>
+        </tr>
+        <tr valign="top">
+          <td align="right" width="15%" bgcolor="#E8E8E0">
+            <span class="aptview_text"
+            ><var:string label:value="Location" />:</span>
+          </td>
+          <td align="left" bgcolor="#FFFFF0">
+            <span class="aptview_text">
+              <var:string value="clientObject.l" />
             </span>
-        </td>
-      </tr>
-      <tr valign="top">
-        <td align="right" width="15%" bgcolor="#E8E8E0">
-          <span class="aptview_text"
-          ><var:string label:value="Location" />:</span>
-        </td>
-        <td align="left" bgcolor="#FFFFF0">
-          <span class="aptview_text">
-            <var:string value="clientObject.l" />
-          </span>
-        </td>
-      </tr>
+          </td>
+        </tr>
       </table>
    </td>
   </tr>
               <tr valign="top">
                 <td align="right" width="15%" bgcolor="#E8E8E0">
                   <span class="aptview_text"
-                  ><var:string label:value="Phone" />:</span>
+                  ><var:string label:value="OfficePhone" />:</span>
                 </td>
                 <td align="left" bgcolor="#FFFFF0">
                   <span class="aptview_text">
               <tr valign="top">
                 <td align="right" width="15%" bgcolor="#E8E8E0">
                   <span class="aptview_text"
-                  ><var:string label:value="Fax" />:</span>
+                  ><var:string label:value="HomePhone" />:</span>
                 </td>
                 <td align="left" bgcolor="#FFFFF0">
                   <span class="aptview_text">
-                    <var:string value="clientObject.facsimileTelephoneNumber"
-                    /></span>
+                    <var:string value="clientObject.homeTelephoneNumber"/></span>
                 </td>
               </tr>
               <tr valign="top">
                 <td align="right" width="15%" bgcolor="#E8E8E0">
                   <span class="aptview_text"
-                  ><var:string label:value="Organisation" />:</span>
+                  ><var:string label:value="MobilePhone" />:</span>
                 </td>
                 <td align="left" bgcolor="#FFFFF0">
                   <span class="aptview_text">
-                    <var:string value="clientObject.o"/></span>
+                    <var:string value="clientObject.mobile"/></span>
+                </td>
+              </tr>
+              <tr valign="top">
+                <td align="right" width="15%" bgcolor="#E8E8E0">
+                  <span class="aptview_text"
+                  ><var:string label:value="Fax" />:</span>
+                </td>
+                <td align="left" bgcolor="#FFFFF0">
+                  <span class="aptview_text">
+                    <var:string value="clientObject.facsimileTelephoneNumber"
+                    /></span>
                 </td>
               </tr>
+              <!--
               <tr valign="top">
                 <td align="right" width="15%" bgcolor="#E8E8E0">
                   <span class="aptview_text"
-                  ><var:string label:value="Unit" />:</span>
+                  ><var:string label:value="Organisation" />:</span>
                 </td>
                 <td align="left" bgcolor="#FFFFF0">
                   <span class="aptview_text">
-                    <var:string value="clientObject.ou"/></span>
+                    <var:string value="clientObject.o"/></span>
                 </td>
               </tr>
+              -->
               <tr valign="top">
                 <td align="right" width="15%" bgcolor="#E8E8E0">
                   <span class="aptview_text"
index dee27ead1e663fb7d92a035e999a839f60b6a4c9..e8534dd85ccd7dc8289c7448dd04db369abb0324 100644 (file)
@@ -1,5 +1,5 @@
 # $Id$
 
-SUBMINOR_VERSION:=16
+SUBMINOR_VERSION:=17
 
 # v0.9.16 requires libSOGoUI v0.9.16