mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
BUGFIX: computed.alias (and even property) seems bust in components
This commit is contained in:
parent
b85e5dc191
commit
12b72762da
2 changed files with 5 additions and 9 deletions
|
@ -10,13 +10,9 @@ Discourse.PrivateMessageMapComponent = Ember.Component.extend({
|
|||
templateName: 'components/private-message-map',
|
||||
tagName: 'section',
|
||||
classNames: ['information'],
|
||||
postStream: Em.computed.alias('topic.postStream'),
|
||||
|
||||
details: Em.computed.alias('topic.details'),
|
||||
|
||||
actions: {
|
||||
removeAllowedUser: function(user) {
|
||||
console.log(user);
|
||||
var self = this;
|
||||
bootbox.dialog(I18n.t("private_message_info.remove_allowed_user", {name: user.get('username')}), [
|
||||
{label: I18n.t("no_value"),
|
||||
|
@ -24,7 +20,7 @@ Discourse.PrivateMessageMapComponent = Ember.Component.extend({
|
|||
{label: I18n.t("yes_value"),
|
||||
'class': 'btn-primary',
|
||||
callback: function() {
|
||||
self.get('details').removeAllowedUser(user);
|
||||
self.get('topic.details').removeAllowedUser(user);
|
||||
}
|
||||
}
|
||||
]);
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<h3><i class='fa fa-envelope'></i> {{i18n private_message_info.title}}</h3>
|
||||
<div class='participants clearfix'>
|
||||
{{#groupedEach details.allowed_groups}}
|
||||
{{#groupedEach topic.details.allowed_groups}}
|
||||
<div class='user group'>
|
||||
#{{unbound name}}
|
||||
</div>
|
||||
{{/groupedEach}}
|
||||
{{#groupedEach details.allowed_users}}
|
||||
{{#groupedEach topic.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 topic.details.can_remove_allowed_users}}
|
||||
<a class='remove-invited' {{action removeAllowedUser this}}><i class="fa fa-times"></i></a>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/groupedEach}}
|
||||
</div>
|
||||
{{#if details.can_invite_to}}
|
||||
{{#if topic.details.can_invite_to}}
|
||||
<div class='controls'>
|
||||
<button class='btn' {{action showPrivateInvite}}>{{i18n private_message_info.invite}}</button>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue