diff --git a/js/views/conversation_view.js b/js/views/conversation_view.js index d9d658ec2..c8a56f6f3 100644 --- a/js/views/conversation_view.js +++ b/js/views/conversation_view.js @@ -144,7 +144,8 @@ newGroupUpdate: function() { this.newGroupUpdateView = new Whisper.NewGroupUpdateView({ - model: this.model + model: this.model, + window: this.appWindow.contentWindow }); this.newGroupUpdateView.$el.insertAfter(this.el); this.$el.hide(); diff --git a/js/views/inbox_view.js b/js/views/inbox_view.js index 1bf52582f..68e9e589c 100644 --- a/js/views/inbox_view.js +++ b/js/views/inbox_view.js @@ -59,7 +59,9 @@ initialize: function (options) { this.render(); - this.newConversationView = new Whisper.NewConversationView(); + this.newConversationView = new Whisper.NewConversationView({ + appWindow: options.appWindow + }); this.newConversationView.$el.hide(); this.listenTo(this.newConversationView, 'open', this.openConversation.bind(this, null)); diff --git a/js/views/new_conversation_view.js b/js/views/new_conversation_view.js index 4a90b44dd..cf4455da3 100644 --- a/js/views/new_conversation_view.js +++ b/js/views/new_conversation_view.js @@ -20,15 +20,17 @@ Whisper.NewConversationView = Whisper.View.extend({ className: 'new-conversation', template: $('#new-conversation').html(), - initialize: function() { + initialize: function(options) { this.render(); this.$group_update = this.$('.new-group-update-form'); this.$create = this.$('.create'); this.$input = this.$('input.search'); // Group avatar file input + this.appWindow = options.appWindow; this.avatarInput = new Whisper.FileInputView({ - el: this.$('.group-avatar') + el: this.$('.group-avatar'), + window: this.appWindow.contentWindow }); this.recipients_view = new Whisper.RecipientsInputView(); diff --git a/js/views/new_group_update_view.js b/js/views/new_group_update_view.js index 1896d39ba..fc50b172e 100644 --- a/js/views/new_group_update_view.js +++ b/js/views/new_group_update_view.js @@ -24,7 +24,8 @@ initialize: function(options) { this.render(); this.avatarInput = new Whisper.FileInputView({ - el: this.$('.group-avatar') + el: this.$('.group-avatar'), + window: options.window }); this.recipients_view = new Whisper.RecipientsInputView();