Workflow engine to ocs api

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2018-04-25 07:47:16 +02:00
parent d53193fd8e
commit 8c845be11c
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF
1 changed files with 341 additions and 337 deletions

View File

@ -164,19 +164,21 @@
}
var self = this;
$.ajax({
url: OC.generateUrl('settings/users/groups'),
url: OC.linkToOCS('cloud/groups', 2) + 'details',
dataType: 'json',
quietMillis: 100,
}).success(function(response) {
// add admin groups
$.each(response.data.adminGroups, function(id, group) {
self.groups.push({ id: group.id, displayname: group.name });
});
// add groups
$.each(response.data.groups, function(id, group) {
self.groups.push({ id: group.id, displayname: group.name });
});
if (data.ocs.data.groups && data.ocs.data.groups.length > 0) {
data.ocs.data.groups.forEach(function(group) {
self.groups.push({ id: group.id, displayname: group.displayname });
})
self.render();
} else {
OC.Notification.error(t('workflowengine', 'Group list is empty'), { type: 'error' });
console.log(data);
}
}).error(function(data) {
OC.Notification.error(t('workflowengine', 'Unable to retrieve the group list'), { type: 'error' });
console.log(data);
@ -368,9 +370,11 @@
});
}
this.collection.fetch({data: {
this.collection.fetch({
data: {
'class': classname
}});
}
});
this.collection.once('sync', this.render, this);
},
add: function() {