diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js index fc6c418b2e..7b88520f93 100644 --- a/phpBB/styles/prosilver/template/forum_fn.js +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -361,6 +361,52 @@ function im_contact(address) msn_action('im', address); } +/** +* Functions for user search popup +*/ +function insert_user(formId, value) +{ + var form = jQuery(formId), + formName = form.attr('data-form-name'), + fieldName = form.attr('data-field-name'), + item = opener.document.forms[formName][fieldName]; + + if (item.value.length && item.type == 'textarea') { + value = item.value + "\n" + value; + } + + item.value = value; +} + +function insert_marked_users(formId, users) +{ + if (typeof(users.length) == "undefined") + { + if (users.checked) + { + insert_user(formId, users.value); + } + } + else if (users.length > 0) + { + for (i = 0; i < users.length; i++) + { + if (users[i].checked) + { + insert_user(formId, users[i].value); + } + } + } + + self.close(); +} + +function insert_single_user(formId, user) +{ + insert_user(formId, user); + self.close(); +} + /** * Run onload functions */ diff --git a/phpBB/styles/prosilver/template/memberlist_body.html b/phpBB/styles/prosilver/template/memberlist_body.html index 459c3f6bc6..46b35eae2c 100644 --- a/phpBB/styles/prosilver/template/memberlist_body.html +++ b/phpBB/styles/prosilver/template/memberlist_body.html @@ -1,7 +1,7 @@ -