This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/components/private_message_map_component.js
2013-11-18 12:08:21 -05:00

31 lines
871 B
JavaScript

Discourse.DiscoursePrivateMessageMapComponent = Ember.Component.extend({
templateName: 'components/discourse-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"),
'class': 'btn-danger rightg'},
{label: I18n.t("yes_value"),
'class': 'btn-primary',
callback: function() {
self.get('details').removeAllowedUser(user);
}
}
]);
},
showPrivateInvite: function() {
this.sendAction('showPrivateInviteAction');
}
}
});