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:
@@ -461,7 +461,6 @@ define([
|
||||
|
||||
// Directory Operations
|
||||
events: {
|
||||
'click .path-link': 'visitDir',
|
||||
'click #add-new-dir': 'newDir',
|
||||
'click #add-new-file': 'newFile',
|
||||
'click #share-cur-dir': 'share',
|
||||
@@ -903,6 +902,7 @@ define([
|
||||
dirents.remove(selected_dirents);
|
||||
_this.$('th .checkbox').removeClass('checkbox-checked');
|
||||
_this.$('#multi-dirents-op').hide();
|
||||
_this.$('#cur-dir-ops').show();
|
||||
} else {
|
||||
$(selected_dirents).each(function() {
|
||||
if (data['deleted'].indexOf(this.get('obj_name')) != -1) {
|
||||
@@ -1044,6 +1044,7 @@ define([
|
||||
dirents.remove(files);
|
||||
_this.$('th .checkbox').removeClass('checkbox-checked');
|
||||
_this.$('#multi-dirents-op').hide();
|
||||
_this.$('#cur-dir-ops').show();
|
||||
} else {
|
||||
$(dirs).each(function() {
|
||||
if (this.get('obj_name') in data['success']) {
|
||||
|
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user