summaryrefslogtreecommitdiffstats
path: root/settings/js
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-01-06 15:40:40 +0100
committerRobin Appelman <icewind@owncloud.com>2015-01-06 15:48:15 +0100
commitb2124d8d4fca04281ff44ff53564bcc578fe65fc (patch)
tree97c739ce9faecec9b160feeaec6135fe5ffcae78 /settings/js
parent622c4cf77903470bc7ddc1df5b74d5e17a0e70c7 (diff)
downloadnextcloud-server-b2124d8d4fca04281ff44ff53564bcc578fe65fc.tar.gz
nextcloud-server-b2124d8d4fca04281ff44ff53564bcc578fe65fc.zip
Fix group select autocomplete
Diffstat (limited to 'settings/js')
-rw-r--r--settings/js/settings.js28
1 files changed, 12 insertions, 16 deletions
diff --git a/settings/js/settings.js b/settings/js/settings.js
index e98bd2cc895..fcbe328b76f 100644
--- a/settings/js/settings.js
+++ b/settings/js/settings.js
@@ -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),