discourse/app/assets/javascripts/admin/controllers/admin-email-preview-digest.js.es6
2015-08-16 15:31:04 +05:30

19 lines
435 B
JavaScript

export default Ember.Controller.extend({
actions: {
refresh() {
const model = this.get('model');
this.set('loading', true);
Discourse.EmailPreview.findDigest(this.get('lastSeen')).then(email => {
model.setProperties(email.getProperties('html_content', 'text_content'));
this.set('loading', false);
});
},
toggleShowHtml() {
this.toggleProperty('showHtml');
}
}
});