Bug 1111011-loop panel should close on 'Start a Conversation' click, r=MattN

This commit is contained in:
Dan Mosedale
2014-12-12 13:30:20 -08:00
parent 17bed67637
commit 7dfa85905f
3 changed files with 17 additions and 8 deletions

View File

@@ -696,7 +696,7 @@ loop.panel = (function(_, mozL10n) {
* Room list.
*/
var RoomList = React.createClass({displayName: 'RoomList',
mixins: [Backbone.Events],
mixins: [Backbone.Events, sharedMixins.WindowCloseMixin],
propTypes: {
store: React.PropTypes.instanceOf(loop.store.RoomStore).isRequired,
@@ -738,6 +738,8 @@ loop.panel = (function(_, mozL10n) {
},
handleCreateButtonClick: function() {
this.closeWindow();
this.props.dispatcher.dispatch(new sharedActions.CreateRoom({
nameTemplate: mozL10n.get("rooms_default_room_name_template"),
roomOwner: this.props.userDisplayName