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/views/composer-messages.js.es6
2015-04-17 12:41:31 -04:00

26 lines
815 B
JavaScript

export default Ember.CollectionView.extend({
classNameBindings: [':composer-popup-container', 'hidden'],
content: Em.computed.alias('controller.content'),
hidden: Em.computed.not('controller.controllers.composer.model.viewOpen'),
itemViewClass: Discourse.View.extend({
classNames: ['composer-popup', 'hidden'],
templateName: Em.computed.alias('content.templateName'),
_setup: function() {
this._super();
this.set('context', this.get('content'));
if (this.get('content.extraClass')) {
this.get('classNames').pushObject(this.get('content.extraClass'));
}
}.on('init'),
_initCss: function() {
var composerHeight = $('#reply-control').height() || 0;
this.$().css('bottom', composerHeight + "px").show();
}.on('didInsertElement')
})
});