mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Removed many unnecessary paths that included content.x when just x would do.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
Discourse.AdminFlagsController = Ember.Controller.extend({
|
||||
Discourse.AdminFlagsController = Ember.ArrayController.extend({
|
||||
|
||||
/**
|
||||
Clear all flags on a post
|
||||
@@ -17,10 +17,10 @@ Discourse.AdminFlagsController = Ember.Controller.extend({
|
||||
clearFlags: function(item) {
|
||||
var _this = this;
|
||||
item.clearFlags().then((function() {
|
||||
_this.content.removeObject(item);
|
||||
}), (function() {
|
||||
_this.removeObject(item);
|
||||
}), function() {
|
||||
bootbox.alert(Em.String.i18n("admin.flags.error"));
|
||||
}));
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -32,10 +32,10 @@ Discourse.AdminFlagsController = Ember.Controller.extend({
|
||||
deletePost: function(item) {
|
||||
var _this = this;
|
||||
item.deletePost().then((function() {
|
||||
_this.content.removeObject(item);
|
||||
}), (function() {
|
||||
_this.removeObject(item);
|
||||
}), function() {
|
||||
bootbox.alert(Em.String.i18n("admin.flags.error"));
|
||||
}));
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user