X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fstatic%2Fwclib.js;h=ac8c4284bf51fff23afc7fe3dbfebc5887050168;hb=ede7209c71f09e45de1075bdd1ddbf668a13383e;hp=7063f6e2440c383d018195fa916ec43530d3cc9d;hpb=0b7f228495c8c07871bb355f1900ac29c42356c5;p=citadel.git diff --git a/webcit/static/wclib.js b/webcit/static/wclib.js index 7063f6e24..ac8c4284b 100644 --- a/webcit/static/wclib.js +++ b/webcit/static/wclib.js @@ -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; + } +}