More documentation to Admin Controllers

This commit is contained in:
Robin Ward
2013-02-21 14:42:48 -05:00
parent c1b5803486
commit dd6d98f48f
6 changed files with 123 additions and 2 deletions

View File

@ -10,6 +10,12 @@
**/
window.Discourse.AdminFlagsController = Ember.Controller.extend({
/**
Clear all flags on a post
@method clearFlags
@param {Discourse.FlaggedPost} item The post whose flags we want to clear
**/
clearFlags: function(item) {
var _this = this;
item.clearFlags().then((function() {
@ -19,6 +25,12 @@
}));
},
/**
Deletes a post
@method deletePost
@param {Discourse.FlaggedPost} item The post to delete
**/
deletePost: function(item) {
var _this = this;
item.deletePost().then((function() {
@ -28,10 +40,20 @@
}));
},
/**
Are we viewing the 'old' view?
@property adminOldFlagsView
**/
adminOldFlagsView: (function() {
return this.query === 'old';
}).property('query'),
/**
Are we viewing the 'active' view?
@property adminActiveFlagsView
**/
adminActiveFlagsView: (function() {
return this.query === 'active';
}).property('query')