Pass windows around to let file inputs work
This commit is contained in:
parent
3d1df790a5
commit
cdb7fcfbad
4 changed files with 11 additions and 5 deletions
|
@ -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();
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue