1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-02 15:38:15 +00:00

Merge branch '5.1'

Conflicts:
	seahub/base/accounts.py
	seahub/share/views.py
	seahub/views/sysadmin.py
	tests/seahub/base/test_accounts.py
	tests/seahub/share/views/test_ajax_get_download_link.py
	tests/seahub/share/views/test_ajax_get_upload_link.py
This commit is contained in:
zhengxie
2016-07-21 10:55:50 +08:00
27 changed files with 659 additions and 722 deletions

View File

@@ -582,12 +582,12 @@ define([
dataType: 'json',
delay: 250,
cache: true,
data: function (params) {
data: function(params) {
return {
q: params
};
},
results: function (data) {
results: function(data) {
var user_list = [], users = data['users'];
for (var i = 0, len = users.length; i < len; i++) {
@@ -595,8 +595,9 @@ define([
"id": users[i].email,
// for search. both name & email can be searched.
// use ' '(space) to separate name & email
"text": users[i].name + ' ' + users[i].email,
"text": users[i].name + ' ' + users[i].contact_email,
"avatar_url": users[i].avatar_url,
"contact_email": users[i].contact_email,
"name": users[i].name
});
}
@@ -610,7 +611,7 @@ define([
// format items shown in the drop-down menu
formatResult: function(item) {
if (item.avatar_url) {
return '<img src="' + item.avatar_url + '" width="32" height="32" class="avatar"><span class="text ellipsis">' + _this.HTMLescape(item.name) + '<br />' + _this.HTMLescape(item.id) + '</span>';
return '<img src="' + item.avatar_url + '" width="32" height="32" class="avatar"><span class="text ellipsis">' + _this.HTMLescape(item.name) + '<br />' + _this.HTMLescape(item.contact_email) + '</span>';
} else {
return; // if no match, show nothing
}