This commit is contained in:
Sam
2013-06-20 17:42:15 +10:00
parent 6491bda4ab
commit 4a8a663a67
12 changed files with 172 additions and 36 deletions
@@ -63,10 +63,22 @@ Discourse.FlaggedPost = Discourse.Post.extend({
}
},
clearFlags: function() {
return Discourse.ajax("/admin/flags/clear/" + this.id, { type: 'POST', cache: false });
disagreeFlags: function() {
return Discourse.ajax("/admin/flags/disagree/" + this.id, { type: 'POST', cache: false });
},
deferFlags: function() {
return Discourse.ajax("/admin/flags/defer/" + this.id, { type: 'POST', cache: false });
},
agreeFlags: function() {
return Discourse.ajax("/admin/flags/agree/" + this.id, { type: 'POST', cache: false });
},
postHidden: function() {
return (this.get('hidden') === "t");
}.property(),
hiddenClass: function() {
if (this.get('hidden') === "t") return "hidden-post";
}.property()