mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Clearing flags wasn't making topics visible again.
This commit is contained in:
@@ -15,9 +15,9 @@ Discourse.AdminFlagsController = Ember.ArrayController.extend({
|
||||
@param {Discourse.FlaggedPost} item The post whose flags we want to clear
|
||||
**/
|
||||
clearFlags: function(item) {
|
||||
var _this = this;
|
||||
var adminFlagsController = this;
|
||||
item.clearFlags().then((function() {
|
||||
_this.removeObject(item);
|
||||
adminFlagsController.removeObject(item);
|
||||
}), function() {
|
||||
bootbox.alert(Em.String.i18n("admin.flags.error"));
|
||||
});
|
||||
@@ -30,9 +30,9 @@ Discourse.AdminFlagsController = Ember.ArrayController.extend({
|
||||
@param {Discourse.FlaggedPost} item The post to delete
|
||||
**/
|
||||
deletePost: function(item) {
|
||||
var _this = this;
|
||||
var adminFlagsController = this;
|
||||
item.deletePost().then((function() {
|
||||
_this.removeObject(item);
|
||||
adminFlagsController.removeObject(item);
|
||||
}), function() {
|
||||
bootbox.alert(Em.String.i18n("admin.flags.error"));
|
||||
});
|
||||
@@ -43,17 +43,13 @@ Discourse.AdminFlagsController = Ember.ArrayController.extend({
|
||||
|
||||
@property adminOldFlagsView
|
||||
**/
|
||||
adminOldFlagsView: (function() {
|
||||
return this.query === 'old';
|
||||
}).property('query'),
|
||||
adminOldFlagsView: Em.computed.equal('query', 'old'),
|
||||
|
||||
/**
|
||||
Are we viewing the 'active' view?
|
||||
|
||||
@property adminActiveFlagsView
|
||||
**/
|
||||
adminActiveFlagsView: (function() {
|
||||
return this.query === 'active';
|
||||
}).property('query')
|
||||
adminActiveFlagsView: Em.computed.equal('query', 'active')
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user