mirror of
https://github.com/discourse/discourse.git
synced 2026-08-26 21:27:16 -05:00
Merge pull request #1260 from sir-pinecone/reactivate-admin-refresh-btn
Fix auto-group refresh response so that ajax callback runs
This commit is contained in:
@@ -10,9 +10,10 @@ Discourse.AdminGroupsController = Ember.Controller.extend({
|
||||
var controller = this;
|
||||
|
||||
this.set('refreshingAutoGroups', true);
|
||||
Discourse.ajax('/admin/groups/refresh_automatic_groups', {type: 'POST'}).then(function(){
|
||||
Discourse.ajax('/admin/groups/refresh_automatic_groups', {type: 'POST'})
|
||||
.then(function() {
|
||||
controller.set('model', Discourse.Group.findAll());
|
||||
controller.set('refreshingAutoGroups',false);
|
||||
controller.set('refreshingAutoGroups', false);
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ Discourse.Group = Discourse.Model.extend({
|
||||
return Discourse.ajax("/admin/groups/" + group.get('id'), {type: "DELETE"})
|
||||
.then(function(){
|
||||
return true;
|
||||
}, function(jqXHR, status, error) {
|
||||
}, function(error) {
|
||||
group.set('disableSave', false);
|
||||
bootbox.alert(I18n.t("admin.groups.delete_failed"));
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user