Workflow engine to ocs api
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
d53193fd8e
commit
8c845be11c
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue