diff --git a/app/assets/javascripts/discourse/components/private_message_map_component.js b/app/assets/javascripts/discourse/components/private_message_map_component.js index 79da67b2d40..403ee198173 100644 --- a/app/assets/javascripts/discourse/components/private_message_map_component.js +++ b/app/assets/javascripts/discourse/components/private_message_map_component.js @@ -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'); } } diff --git a/app/assets/javascripts/discourse/components/toggle_summary_component.js b/app/assets/javascripts/discourse/components/toggle_summary_component.js index b9b45f80037..2f97dd75efe 100644 --- a/app/assets/javascripts/discourse/components/toggle_summary_component.js +++ b/app/assets/javascripts/discourse/components/toggle_summary_component.js @@ -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(); diff --git a/app/assets/javascripts/discourse/components/topic_map_component.js b/app/assets/javascripts/discourse/components/topic_map_component.js index 5cc9b7e259a..75e7d2e58fb 100644 --- a/app/assets/javascripts/discourse/components/topic_map_component.js +++ b/app/assets/javascripts/discourse/components/topic_map_component.js @@ -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'))); },