[dev] [PATCH] Little bug in imp/contacts.php javascript

Etienne Goyer etienne.goyer at linuxquebec.com
Mon Dec 15 12:05:38 PST 2003


Hi,

I am not quite sure where or what the problem is exactly, but here is a
fix anyway :)

In imp/contacts.php, when selecting a contact and clicking a localized
"To", Cc" or "Bcc" and this one contain 8 bits character, it does not
work.  I don't know Javascript enough to explain why but the following
two trivials patch fixed it for me and I can't see anything wrong with
them.  They basically change the content of a Javascript variable with
which the user does not interact.

Thank you for your feedback.

-- 
Etienne Goyer                    Linux Québec Technologies Inc.
http://www.LinuxQuebec.com       etienne.goyer at linuxquebec.com
-------------- next part --------------
--- templates/contacts/contacts.inc.orig	Mon Dec 15 14:42:47 2003
+++ templates/contacts/contacts.inc	Mon Dec 15 14:43:26 2003
@@ -36,7 +36,7 @@
     <td>
 <table border="0" width="100%" cellpadding="0">
 <tr>
-    <td width="45%"><select name="search_results" multiple="multiple" size="10" width="200" onchange="document.contacts.search_results[0].selected=false" ondblclick="addAddress('<?php echo _("To") ?>')">
+    <td width="45%"><select name="search_results" multiple="multiple" size="10" width="200" onchange="document.contacts.search_results[0].selected=false" ondblclick="addAddress('<?php echo "To" ?>')">
 	<option value=""><?php echo _("* Please select address(es) *") ?></option>
         <?php foreach ($addresses as $addr): ?>
             <?php if ($display == 'email'): ?>
@@ -48,7 +48,7 @@
         </select>
     </td>
     <td width="10%">
-        <input type="button" class="button" style="width:60px" onclick="addAddress('<?php echo _("To") ?>');" value="<?php echo _("To") . " &gt;&gt;" ?>" /><br />&nbsp;<br />
+        <input type="button" class="button" style="width:60px" onclick="addAddress('<?php echo "To" ?>');" value="<?php echo _("To") . " &gt;&gt;" ?>" /><br />&nbsp;<br />
         <input type="button" class="button" style="width:60px" onclick="addAddress('<?php echo _("Cc") ?>');" value="<?php echo _("Cc") . " &gt;&gt;" ?>" /><br />&nbsp;<br />
         <input type="button" class="button" style="width:60px" onclick="addAddress('<?php echo _("Bcc") ?>');" value="<?php echo _("Bcc") . " &gt;&gt;" ?>" /></td>
     <td width="45%" colspan="2">
-------------- next part --------------
--- templates/contacts/javascript.inc.orig	Mon Dec 15 14:43:36 2003
+++ templates/contacts/javascript.inc	Mon Dec 15 14:43:50 2003
@@ -102,7 +102,7 @@
         } else {
             address = '"' + fullname + '" <' + address.substring(pos + 2, address.length) + ">";
         }
-        if (f == "<?php echo _("To") ?>") {
+        if (f == "<?php echo "To" ?>") {
             field = parent.opener.document.compose.to;
         } else if (f == "<?php echo _("Cc") ?>") {
             field = parent.opener.document.compose.cc;


More information about the dev mailing list