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