2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00
discourse/app/assets/javascripts/admin/controllers/admin_flags_controller.js

34 lines
823 B
JavaScript
Raw Normal View History

(function() {
window.Discourse.AdminFlagsController = Ember.Controller.extend({
2013-02-21 12:54:40 -05:00
clearFlags: function(item) {
var _this = this;
return item.clearFlags().then((function() {
return _this.content.removeObject(item);
}), (function() {
return bootbox.alert("something went wrong");
}));
},
2013-02-21 12:54:40 -05:00
deletePost: function(item) {
var _this = this;
return item.deletePost().then((function() {
return _this.content.removeObject(item);
}), (function() {
return bootbox.alert("something went wrong");
}));
},
2013-02-21 12:54:40 -05:00
adminOldFlagsView: (function() {
return this.query === 'old';
}).property('query'),
2013-02-21 12:54:40 -05:00
adminActiveFlagsView: (function() {
return this.query === 'active';
}).property('query')
2013-02-21 12:54:40 -05:00
});
}).call(this);