1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-14 06:04:25 +00:00

Fix issue with user.fullname (#8904)

This commit is contained in:
zeripath 2019-11-10 00:22:21 +00:00 committed by GitHub
parent 0b91aaf62a
commit 46ff639a13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,11 +63,13 @@
noMatchTemplate: function () { return null },
menuItemTemplate: function (item) {
var user = item.original;
var itemStr = '<img src="' + user.avatar + '"/><span class="name">' + user.name + '</span>';
var item = $('<div/>')
item.append($('<img/>', {'src': user.avatar}))
item.append($('<span/>', {'class': 'name'}).text(user.name))
if (user.fullname && user.fullname != '') {
itemStr += '<span class="fullname">' + user.fullname + '</span>';
item.append($('<span/>', {'class': 'fullname'}).text(user.fullname))
}
return itemStr;
return item.html();
}
});
var content = document.getElementById('content');