mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
FIX: dual modal when selecting 'delete spammer' in flags section
This commit is contained in:
parent
8bda8a2235
commit
521cb6bd0d
2 changed files with 2 additions and 9 deletions
|
@ -22,6 +22,7 @@ Discourse.AdminFlagsRouteType = Discourse.Route.extend({
|
|||
@method deleteSpammer
|
||||
**/
|
||||
deleteSpammer: function (user) {
|
||||
this.send('closeModal');
|
||||
user.deleteAsSpammer(function() { window.location.reload(); });
|
||||
}
|
||||
}
|
||||
|
@ -50,6 +51,3 @@ Discourse.AdminFlagsActiveRoute = Discourse.AdminFlagsRouteType.extend({
|
|||
Discourse.AdminFlagsOldRoute = Discourse.AdminFlagsRouteType.extend({
|
||||
filter: 'old'
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ export default ObjectController.extend(ModalFunctionality, {
|
|||
|
||||
changePostActionType: function(action) {
|
||||
this.set('selected', action);
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
canDeleteSpammer: function() {
|
||||
|
@ -118,11 +118,6 @@ export default ObjectController.extend(ModalFunctionality, {
|
|||
}
|
||||
}.property('selected.name_key', 'userDetails.can_be_deleted', 'userDetails.can_delete_all_posts'),
|
||||
|
||||
deleteSpammer: function() {
|
||||
this.send('closeModal');
|
||||
this.get('userDetails').deleteAsSpammer(function() { window.location.reload(); });
|
||||
},
|
||||
|
||||
usernameChanged: function() {
|
||||
this.set('userDetails', null);
|
||||
this.fetchUserDetails();
|
||||
|
|
Loading…
Reference in a new issue