Added function to select an address and close the window in one operation.
authorpallo <pallo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 26 Apr 2000 09:21:53 +0000 (09:21 +0000)
committerpallo <pallo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 26 Apr 2000 09:21:53 +0000 (09:21 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@460 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/addrbook_search.php

index c707bd5..f07840e 100644 (file)
 ?>
 <SCRIPT LANGUAGE="Javascript"><!--
 
+function to_and_close($addr) {
+  to_address($addr);
+  parent.close();
+}
+
 function to_address($addr) {
   var prefix    = "";
   var pwintype = typeof parent.opener.document.compose;
@@ -176,11 +181,12 @@ function bcc_address($addr) {
         printf("<tr%s nowrap><td nowrap align=center width=\"5%%\">".
                "<a href=\"javascript:to_address('%s');\">To</A> | ".
                "<a href=\"javascript:cc_address('%s');\">Cc</A>".
-               "<td nowrap>&nbsp;%s&nbsp;<td nowrap>&nbsp;%s&nbsp;".
+               "<td nowrap>&nbsp;%s&nbsp;<td nowrap>&nbsp;".
+                "<a href=\"javascript:to_and_close('%s');\">%s</A>&nbsp;".
                "<td nowrap>&nbsp;%s&nbsp;<td nowrap>&nbsp;%s</tr>\n", 
                ($line % 2) ? " bgcolor=\"$color[0]\"" : "", $row["email"],
-               $row["email"], $row["name"], $row["email"], $row["label"], 
-               $row["source"]);
+               $row["email"], $row["name"], $row["email"], $row["email"],
+                $row["label"], $row["source"]);
         $line++;
       }
       print "</TABLE>";