mirror of
https://github.com/discourse/discourse.git
synced 2025-06-20 14:41:43 +08:00
Cleaned up JS, added basic documentation support for Admin Controllers
This commit is contained in:
@ -1,22 +1,30 @@
|
||||
(function() {
|
||||
|
||||
/**
|
||||
This controller supports the interface for dealing with flags in the admin section.
|
||||
|
||||
@class AdminFlagsController
|
||||
@extends Ember.Controller
|
||||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
window.Discourse.AdminFlagsController = Ember.Controller.extend({
|
||||
|
||||
clearFlags: function(item) {
|
||||
var _this = this;
|
||||
return item.clearFlags().then((function() {
|
||||
return _this.content.removeObject(item);
|
||||
item.clearFlags().then((function() {
|
||||
_this.content.removeObject(item);
|
||||
}), (function() {
|
||||
return bootbox.alert("something went wrong");
|
||||
bootbox.alert("something went wrong");
|
||||
}));
|
||||
},
|
||||
|
||||
deletePost: function(item) {
|
||||
var _this = this;
|
||||
return item.deletePost().then((function() {
|
||||
return _this.content.removeObject(item);
|
||||
item.deletePost().then((function() {
|
||||
_this.content.removeObject(item);
|
||||
}), (function() {
|
||||
return bootbox.alert("something went wrong");
|
||||
bootbox.alert("something went wrong");
|
||||
}));
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user