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 a524194a46 FIX: Bugged up Components vs. Views. My original error was using
`templateName` instead of `layoutName` in an `Em.Component`. This fixes
that and backs out other "fixes"
2014-01-21 13:08:47 -05:00

21 lines
481 B
JavaScript

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