discourse/app/assets/javascripts/admin/controllers/admin_groups_controller.js

23 lines
579 B
JavaScript
Raw Normal View History

Discourse.AdminGroupsController = Ember.ArrayController.extend({
itemController: 'adminGroup',
2013-05-08 01:20:38 -04:00
edit: function(group){
this.get('model').select(group);
group.loadUsers();
},
refreshAutoGroups: function(){
var controller = this;
this.set('refreshingAutoGroups', true);
Discourse.ajax('/admin/groups/refresh_automatic_groups', {type: 'POST'}).then(function(){
controller.set('model', Discourse.Group.findAll());
controller.set('refreshingAutoGroups',false);
});
}
});
2013-05-08 01:20:38 -04:00
Discourse.AdminGroupController = Ember.Controller.extend({
});