2013-02-22 15:41:12 -05:00
|
|
|
/**
|
|
|
|
This controller supports the interface for reviewing email logs.
|
2013-02-20 13:15:50 -05:00
|
|
|
|
2013-02-22 15:41:12 -05:00
|
|
|
@class AdminEmailLogsController
|
|
|
|
@extends Ember.ArrayController
|
|
|
|
@namespace Discourse
|
|
|
|
@module Discourse
|
|
|
|
**/
|
|
|
|
Discourse.AdminEmailLogsController = Ember.ArrayController.extend(Discourse.Presence, {
|
|
|
|
|
2013-02-21 12:58:21 -05:00
|
|
|
/**
|
2013-02-22 15:41:12 -05:00
|
|
|
Is the "send test email" button disabled?
|
2013-02-21 12:58:21 -05:00
|
|
|
|
2013-02-22 15:41:12 -05:00
|
|
|
@property sendTestEmailDisabled
|
|
|
|
**/
|
|
|
|
sendTestEmailDisabled: (function() {
|
|
|
|
return this.blank('testEmailAddress');
|
|
|
|
}).property('testEmailAddress'),
|
2013-02-21 14:42:48 -05:00
|
|
|
|
2013-02-22 15:41:12 -05:00
|
|
|
/**
|
|
|
|
Sends a test email to the currently entered email address
|
2013-02-20 13:15:50 -05:00
|
|
|
|
2013-02-22 15:41:12 -05:00
|
|
|
@method sendTestEmail
|
|
|
|
**/
|
|
|
|
sendTestEmail: function() {
|
|
|
|
var _this = this;
|
|
|
|
_this.set('sentTestEmail', false);
|
|
|
|
jQuery.ajax({
|
|
|
|
url: '/admin/email_logs/test',
|
|
|
|
type: 'POST',
|
|
|
|
data: { email_address: this.get('testEmailAddress') },
|
|
|
|
success: function() {
|
|
|
|
return _this.set('sentTestEmail', true);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|