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/toggle_summary_component.js
Robin Ward 4981525047 REFACTOR: Fixes poor class hierarchy for listing topics
- Upgrades Ember to latest
- Fixes a bunch of bugs with page titles and missing "active" states
2014-01-18 19:26:24 +01:00

27 lines
589 B
JavaScript

/**
The controls for toggling the summarized view on/off
@class ToggleSummaryComponent
@extends Ember.Component
@namespace Discourse
@module Discourse
**/
Discourse.ToggleSummaryComponent = Ember.View.extend({
templateName: 'components/toggle-summary',
tagName: 'section',
classNames: ['information'],
postStream: Em.computed.alias('topic.postStream'),
init: function() {
this._super();
this.set('context', this);
this.set('controller', this);
},
actions: {
toggleSummary: function() {
this.get('postStream').toggleSummary();
}
}
});