mirror of
https://github.com/discourse/discourse.git
synced 2026-08-09 04:28:29 -05:00
Add loading route support to admin flags
This commit is contained in:
@@ -2,10 +2,10 @@ import ModalFunctionality from 'discourse/mixins/modal-functionality';
|
||||
import ObjectController from 'discourse/controllers/object';
|
||||
|
||||
export default ObjectController.extend(ModalFunctionality, {
|
||||
needs: ["adminFlags"],
|
||||
needs: ["admin-flags-list"],
|
||||
|
||||
_agreeFlag: function (actionOnPost) {
|
||||
var adminFlagController = this.get("controllers.adminFlags");
|
||||
var adminFlagController = this.get("controllers.admin-flags-list");
|
||||
var post = this.get("content");
|
||||
var self = this;
|
||||
|
||||
|
||||
@@ -3,13 +3,12 @@ import ModalFunctionality from 'discourse/mixins/modal-functionality';
|
||||
import ObjectController from 'discourse/controllers/object';
|
||||
|
||||
export default ObjectController.extend(ModalFunctionality, {
|
||||
|
||||
needs: ["adminFlags"],
|
||||
needs: ["admin-flags-list"],
|
||||
|
||||
actions: {
|
||||
|
||||
deletePostDeferFlag: function () {
|
||||
var adminFlagController = this.get("controllers.adminFlags");
|
||||
var adminFlagController = this.get("controllers.admin-flags-list");
|
||||
var post = this.get("content");
|
||||
var self = this;
|
||||
|
||||
@@ -22,7 +21,7 @@ export default ObjectController.extend(ModalFunctionality, {
|
||||
},
|
||||
|
||||
deletePostAgreeFlag: function () {
|
||||
var adminFlagController = this.get("controllers.adminFlags");
|
||||
var adminFlagController = this.get("controllers.admin-flags-list");
|
||||
var post = this.get("content");
|
||||
var self = this;
|
||||
|
||||
|
||||
+1
-9
@@ -1,18 +1,10 @@
|
||||
/**
|
||||
This controller supports the interface for dealing with flags in the admin section.
|
||||
|
||||
@class AdminFlagsController
|
||||
@extends Ember.Controller
|
||||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
export default Ember.ArrayController.extend({
|
||||
query: null,
|
||||
|
||||
adminOldFlagsView: Em.computed.equal("query", "old"),
|
||||
adminActiveFlagsView: Em.computed.equal("query", "active"),
|
||||
|
||||
actions: {
|
||||
|
||||
disagreeFlags: function (flaggedPost) {
|
||||
var self = this;
|
||||
flaggedPost.disagreeFlags().then(function () {
|
||||
Reference in New Issue
Block a user