parent
fe2b152186
commit
78a2b74297
6 changed files with 72 additions and 34 deletions
|
@ -31,7 +31,7 @@
|
|||
|
||||
this.appWindow = options.appWindow;
|
||||
this.fileInput = new Whisper.FileInputView({
|
||||
el: this.$('.attachments'),
|
||||
el: this.$('form.send'),
|
||||
window: this.appWindow.contentWindow
|
||||
});
|
||||
|
||||
|
@ -225,13 +225,20 @@
|
|||
window.autosize(this.$messageField);
|
||||
|
||||
var $discussionContainer = this.$('.discussion-container'),
|
||||
$conversationHeader = this.$('.conversation-header'),
|
||||
$attachmentPreviews = this.$('.attachment-previews'),
|
||||
$bottomBar = this.$('.bottom-bar');
|
||||
|
||||
$bottomBar.outerHeight(this.$messageField.outerHeight() + 1);
|
||||
$bottomBar.outerHeight(
|
||||
this.$messageField.outerHeight() +
|
||||
$attachmentPreviews.outerHeight() + 1);
|
||||
var $bottomBarNewHeight = $bottomBar.outerHeight();
|
||||
|
||||
//TODO: revisit this logic for new layout.
|
||||
$discussionContainer.outerHeight(this.$el.outerHeight() - $bottomBarNewHeight - this.$('.conversation-header').outerHeight() - 20);
|
||||
$discussionContainer.outerHeight(
|
||||
this.$el.outerHeight() -
|
||||
$bottomBarNewHeight -
|
||||
$conversationHeader.outerHeight() - 20);
|
||||
|
||||
this.view.scrollToBottomIfNeeded();
|
||||
},
|
||||
|
|
|
@ -46,6 +46,9 @@
|
|||
this.$('.avatar').hide();
|
||||
this.thumb.src = src;
|
||||
this.$('.attachment-previews').append(this.thumb.render().el);
|
||||
this.thumb.$('img')[0].onload = function() {
|
||||
this.$el.trigger('force-resize');
|
||||
}.bind(this);
|
||||
},
|
||||
|
||||
autoScale: function(file) {
|
||||
|
@ -216,6 +219,7 @@
|
|||
}
|
||||
this.thumb.remove();
|
||||
this.$('.avatar').show();
|
||||
this.$el.trigger('force-resize');
|
||||
},
|
||||
|
||||
deleteFiles: function(e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue