This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/components/composer-message.js.es6
2016-11-25 15:38:45 -05:00

23 lines
554 B
JavaScript

import computed from 'ember-addons/ember-computed-decorators';
import { getOwner } from 'discourse-common/lib/get-owner';
export default Ember.Component.extend({
classNameBindings: [':composer-popup', ':hidden', 'message.extraClass'],
@computed('message.templateName')
layout(templateName) {
return getOwner(this).lookup(`template:composer/${templateName}`);
},
didInsertElement() {
this._super();
this.$().show();
},
actions: {
closeMessage() {
this.sendAction('closeMessage', this.get('message'));
}
}
});