fix invite bug(shouldn't include full name to search box)

This commit is contained in:
Unknwon 2014-12-22 03:44:49 -05:00
parent 030b3d751e
commit 97b39ae2e4
4 changed files with 7 additions and 6 deletions

View file

@ -214,7 +214,7 @@ var Gogs = {};
if (json.ok && json.data.length) {
var html = '';
$.each(json.data, function (i, item) {
html += '<li><a><img src="' + item.avatar_url + '">' + item.username;
html += '<li><a><img src="' + item.avatar_url + '"><span class="username">' + item.username + '</span>';
if (notEmpty(item.full_name)) {
html += ' (' + item.full_name + ')';
}
@ -571,7 +571,7 @@ function initInvite() {
$ul.toggleShow();
}
}).next().next().find('ul').on("click", 'li', function () {
$('#org-member-invite').val($(this).text());
$('#org-member-invite').val($(this).find('.username').text());
$ul.toggleHide();
});
}