FEATURE: add filters on email logs

This commit is contained in:
Régis Hanol
2014-02-15 00:50:08 +01:00
parent 21f757fd72
commit 3f3c9ca7cb
16 changed files with 145 additions and 67 deletions

View File

@@ -0,0 +1,20 @@
/**
This controller supports email logs functionality.
@class AdminEmailSkippedController
@extends Discourse.Controller
@namespace Discourse
@module Discourse
**/
Discourse.AdminEmailSkippedController = Discourse.Controller.extend({
filterEmailLogs: Discourse.debounce(function() {
var self = this;
this.set("loading", true);
Discourse.EmailLog.findAll(this.get("filter")).then(function(logs) {
self.set("model", false);
self.set("model", logs);
});
}, 250).observes("filter.user", "filter.address", "filter.type", "filter.reason"),
});

View File

@@ -0,0 +1,20 @@
/**
This controller supports email logs functionality.
@class AdminEmailSentController
@extends Discourse.Controller
@namespace Discourse
@module Discourse
**/
Discourse.AdminEmailSentController = Discourse.Controller.extend({
filterEmailLogs: Discourse.debounce(function() {
var self = this;
this.set("loading", true);
Discourse.EmailLog.findAll(this.get("filter")).then(function(logs) {
self.set("loading", false);
self.set("model", logs);
});
}, 250).observes("filter.user", "filter.address", "filter.type", "filter.reply_key"),
});