From 1a553fef174037034df178f63cfc61e2d75b1321 Mon Sep 17 00:00:00 2001 From: lilia Date: Sat, 24 Jan 2015 10:23:21 -1000 Subject: [PATCH] Hide file modal until it's needed --- js/views/file_modal_view.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/js/views/file_modal_view.js b/js/views/file_modal_view.js index 838862e9..259730d4 100644 --- a/js/views/file_modal_view.js +++ b/js/views/file_modal_view.js @@ -23,12 +23,8 @@ var Whisper = Whisper || {}; initialize: function() { this.template = $('#file-size-modal').html(); Mustache.parse(this.template); - this.render(); - }, - - render: function() { + this.$el.hide(); this.$el.html($(Mustache.render(this.template))); - return this; }, events: { @@ -37,11 +33,11 @@ var Whisper = Whisper || {}; }, open: function() { - this.$el.find('#modal').show(); + this.$el.show(); }, close: function() { - this.$el.find('#modal').hide(); + this.$el.hide(); } }); })();