summaryrefslogtreecommitdiffstats
path: root/apps/workflowengine/js/admin.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/workflowengine/js/admin.js')
-rw-r--r--apps/workflowengine/js/admin.js22
1 files changed, 21 insertions, 1 deletions
diff --git a/apps/workflowengine/js/admin.js b/apps/workflowengine/js/admin.js
index ab122a8cd65..6df7b144818 100644
--- a/apps/workflowengine/js/admin.js
+++ b/apps/workflowengine/js/admin.js
@@ -149,6 +149,7 @@
message: '',
errorMessage: '',
saving: false,
+ groups: [],
initialize: function() {
// this creates a new copy of the object to definitely have a new reference and being able to reset the model
this.originalModel = JSON.parse(JSON.stringify(this.model));
@@ -161,6 +162,24 @@
if (this.model.get('id') === undefined) {
this.hasChanged = true;
}
+ var self = this;
+ $.ajax({
+ url: OC.generateUrl('settings/users/groups'),
+ dataType: 'json',
+ quietMillis: 100,
+ }).done(function(response) {
+ // add admin groups
+ $.each(response.data.adminGroups, function(id, group) {
+ self.groups.push({ id: group.id, displayname: group.name+'FIXME' });
+ });
+ // add groups
+ $.each(response.data.groups, function(id, group) {
+ self.groups.push({ id: group.id, displayname: group.name+'FIXME' });
+ });
+ self.render();
+ }).fail(function(response) {
+ console.error('Failure happened', response);
+ });
},
delete: function() {
if (OC.PasswordConfirmation.requiresPasswordConfirmation()) {
@@ -304,10 +323,11 @@
id = $element.data('id'),
check = checks[id],
valueElement = $element.find('.check-value').first();
+ var self = this;
_.each(OCA.WorkflowEngine.availablePlugins, function(plugin) {
if (_.isFunction(plugin.render)) {
- plugin.render(valueElement, check);
+ plugin.render(valueElement, check, self.groups);
}
});
}, this);