discourse/app/assets/javascripts/admin/controllers/admin-email-preview-digest.js.es6
2015-11-20 10:00:12 -05:00

19 lines
457 B
JavaScript

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