Allow multiple addresses to be selected.
[citadel.git] / webcit / static / wclib.js
index 7063f6e2440c383d018195fa916ec43530d3cc9d..ac8c4284bf51fff23afc7fe3dbfebc5887050168 100644 (file)
@@ -694,3 +694,16 @@ function PopulateAddressBookInnerDiv(which_addr_book, target_input) {
                }
        );
 }
+
+// What happens when a contact is selected from the address book popup
+// (populate the specified target)
+
+function AddContactsToTarget(target, whichaddr) {
+       while (whichaddr.selectedIndex != -1) {
+               if (target.value.length > 0) {
+                       target.value = target.value + ', ';
+               }
+               target.value = target.value + whichaddr.value;
+               whichaddr.options[whichaddr.selectedIndex].selected = false;
+       }
+}