discourse/app/assets/javascripts/admin/controllers/admin-email-preview-digest.js.es6

21 lines
484 B
Text
Raw Normal View History

export default Ember.Controller.extend({
2013-09-16 14:08:55 -04:00
actions: {
refresh: function() {
var model = this.get('model'),
self = this;
self.set('loading', true);
Discourse.EmailPreview.findDigest(this.get('lastSeen')).then(function (email) {
model.setProperties(email.getProperties('html_content', 'text_content'));
self.set('loading', false);
});
},
toggleShowHtml: function() {
this.toggleProperty('showHtml');
}
}
});