FIX: Adding components to a ContainerView doesn't set the context
properly.
This commit is contained in:
parent
5feb5ee54d
commit
8c32f22ae0
|
@ -6,12 +6,18 @@
|
|||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
Discourse.PrivateMessageMapComponent = Ember.Component.extend({
|
||||
Discourse.PrivateMessageMapComponent = Ember.View.extend({
|
||||
templateName: 'components/private-message-map',
|
||||
tagName: 'section',
|
||||
classNames: ['information'],
|
||||
details: Em.computed.alias('topic.details'),
|
||||
|
||||
init: function() {
|
||||
this._super();
|
||||
this.set('context', this);
|
||||
this.set('controller', this);
|
||||
},
|
||||
|
||||
actions: {
|
||||
removeAllowedUser: function(user) {
|
||||
var self = this;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<h3><i class='fa fa-envelope'></i> {{i18n private_message_info.title}}</h3>
|
||||
<div class='participants clearfix'>
|
||||
{{#groupedEach view.details.allowed_groups}}
|
||||
{{#groupedEach details.allowed_groups}}
|
||||
<div class='user group'>
|
||||
#{{unbound name}}
|
||||
</div>
|
||||
{{/groupedEach}}
|
||||
{{#groupedEach view.details.allowed_users}}
|
||||
{{#groupedEach details.allowed_users}}
|
||||
<div class='user'>
|
||||
{{#link-to 'user' this}}
|
||||
{{avatar this imageSize="small"}}
|
||||
|
@ -13,13 +13,13 @@
|
|||
{{#link-to 'user' this}}
|
||||
{{unbound username}}
|
||||
{{/link-to}}
|
||||
{{#if view.details.can_remove_allowed_users}}
|
||||
{{#if details.can_remove_allowed_users}}
|
||||
<a class='remove-invited' {{action removeAllowedUser this}}><i class="fa fa-times"></i></a>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/groupedEach}}
|
||||
</div>
|
||||
{{#if view.details.can_invite_to}}
|
||||
{{#if details.can_invite_to}}
|
||||
<div class='controls'>
|
||||
<button class='btn' {{action showPrivateInvite}}>{{i18n private_message_info.invite}}</button>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue