mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 20:54:00 -06:00
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"
This commit is contained in:
parent
ba74226346
commit
a524194a46
@ -6,15 +6,14 @@
|
||||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
Discourse.PrivateMessageMapComponent = Ember.View.extend({
|
||||
templateName: 'components/private-message-map',
|
||||
Discourse.PrivateMessageMapComponent = Ember.Component.extend({
|
||||
layoutName: 'components/private-message-map',
|
||||
tagName: 'section',
|
||||
classNames: ['information'],
|
||||
details: Em.computed.alias('topic.details'),
|
||||
|
||||
init: function() {
|
||||
this._super();
|
||||
this.set('context', this);
|
||||
},
|
||||
|
||||
actions: {
|
||||
@ -33,7 +32,7 @@ Discourse.PrivateMessageMapComponent = Ember.View.extend({
|
||||
},
|
||||
|
||||
showPrivateInvite: function() {
|
||||
this.get('controller').send('showPrivateInviteAction');
|
||||
this.sendAction('showPrivateInviteAction');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6,18 +6,12 @@
|
||||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
Discourse.ToggleSummaryComponent = Ember.View.extend({
|
||||
templateName: 'components/toggle-summary',
|
||||
Discourse.ToggleSummaryComponent = Ember.Component.extend({
|
||||
layoutName: '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();
|
||||
|
@ -9,18 +9,15 @@
|
||||
|
||||
var LINKS_SHOWN = 5;
|
||||
|
||||
Discourse.TopicMapComponent = Ember.View.extend({
|
||||
Discourse.TopicMapComponent = Ember.Component.extend({
|
||||
mapCollapsed: true,
|
||||
templateName: 'components/topic-map',
|
||||
layoutName: 'components/topic-map',
|
||||
details: Em.computed.alias('topic.details'),
|
||||
allLinksShown: false,
|
||||
|
||||
init: function() {
|
||||
this._super();
|
||||
|
||||
this.set('context', this);
|
||||
this.set('controller', this);
|
||||
|
||||
// If the topic has a summary, expand the map by default
|
||||
this.set('mapCollapsed', Discourse.Mobile.mobileView || (!this.get('topic.has_summary')));
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user