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/replies_view.js

24 lines
624 B
JavaScript

(function() {
window.Discourse.RepliesView = Ember.CollectionView.extend({
templateName: 'replies',
tagName: 'section',
classNames: ['replies-list', 'embedded-posts', 'bottom'],
itemViewClass: Discourse.EmbeddedPostView,
repliesShown: (function() {
var $this;
$this = this.$();
if (this.get('parentView.repliesShown')) {
return Em.run.next(function() {
return $this.slideDown();
});
} else {
return Em.run.next(function() {
return $this.slideUp();
});
}
}).observes('parentView.repliesShown')
});
}).call(this);