Hide file modal until it's needed
This commit is contained in:
parent
a1403c8a9a
commit
1a553fef17
1 changed files with 3 additions and 7 deletions
|
@ -23,12 +23,8 @@ var Whisper = Whisper || {};
|
||||||
initialize: function() {
|
initialize: function() {
|
||||||
this.template = $('#file-size-modal').html();
|
this.template = $('#file-size-modal').html();
|
||||||
Mustache.parse(this.template);
|
Mustache.parse(this.template);
|
||||||
this.render();
|
this.$el.hide();
|
||||||
},
|
|
||||||
|
|
||||||
render: function() {
|
|
||||||
this.$el.html($(Mustache.render(this.template)));
|
this.$el.html($(Mustache.render(this.template)));
|
||||||
return this;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
events: {
|
events: {
|
||||||
|
@ -37,11 +33,11 @@ var Whisper = Whisper || {};
|
||||||
},
|
},
|
||||||
|
|
||||||
open: function() {
|
open: function() {
|
||||||
this.$el.find('#modal').show();
|
this.$el.show();
|
||||||
},
|
},
|
||||||
|
|
||||||
close: function() {
|
close: function() {
|
||||||
this.$el.find('#modal').hide();
|
this.$el.hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
|
Loading…
Reference in a new issue