Skip to content
Snippets Groups Projects
Commit c740f4a4 authored by Robin Appelman's avatar Robin Appelman
Browse files

Merge pull request #13129 from owncloud/group-select-fix-autocomplete

Fix group select autocomplete
parents 7528a1a4 b2124d8d
Branches
No related tags found
No related merge requests found
......@@ -45,25 +45,21 @@ OC.Settings = _.extend(OC.Settings, {
data: queryData,
dataType: 'json',
success: function(data) {
if (data.status === "success") {
var results = [];
var results = [];
// add groups
$.each(data.data.adminGroups, function(i, group) {
results.push({id:group.id, displayname:group.name});
});
$.each(data.data.groups, function(i, group) {
results.push({id:group.id, displayname:group.name});
});
// add groups
$.each(data.data.adminGroups, function(i, group) {
results.push({id:group.id, displayname:group.name});
});
$.each(data.data.groups, function(i, group) {
results.push({id:group.id, displayname:group.name});
});
if (query.term === '') {
// cache full list
self._cachedGroups = results;
}
query.callback({results: results});
} else {
//FIXME add error handling
if (query.term === '') {
// cache full list
self._cachedGroups = results;
}
query.callback({results: results});
}
});
}, 100, true),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment