From 583fb98cce0d937dfe8e02cc3eaeb5bc8e8145fd Mon Sep 17 00:00:00 2001 From: lilia Date: Fri, 5 Jun 2015 11:22:36 -0700 Subject: [PATCH] Support late-addition of default image to file input Fixes #256 // FREEBIE --- js/views/file_input_view.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/js/views/file_input_view.js b/js/views/file_input_view.js index ab801ff00..901db54d7 100644 --- a/js/views/file_input_view.js +++ b/js/views/file_input_view.js @@ -28,7 +28,6 @@ this.$input = this.$('input[type=file]'); this.thumb = new Whisper.AttachmentPreviewView(); this.$el.addClass('file-input'); - this.$default = this.$('.default'); this.window = options.window; }, @@ -56,7 +55,7 @@ }, addThumb: function(src) { - this.$default.hide(); + this.$('.default').hide(); this.thumb.src = src; this.$('.thumbnail').append(this.thumb.render().el); }, @@ -215,7 +214,7 @@ this.oUrl = null; } this.thumb.remove(); - this.$default.show(); + this.$('.default').show(); }, deleteFiles: function(e) {