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/topic_participant_component.js
2013-11-22 17:02:12 -05:00

18 lines
491 B
JavaScript

Discourse.TopicParticipantComponent = Ember.Component.extend({
postStream: Em.computed.alias('participant.topic.postStream'),
toggled: function() {
return this.get('postStream.userFilters').contains(this.get('participant.username'));
}.property('postStream.userFilters.[]'),
actions: {
toggle: function() {
var postStream = this.get('postStream');
if (postStream) {
postStream.toggleParticipant(this.get('participant.username'));
}
}
}
});