From f6feb274cde0f84e992009dff7050847eae9c89a Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 13 Dec 2017 04:34:20 +0100 Subject: required --- public/assets/js/lib/views/index/hootbox.js | 2 +- public/assets/js/lib/views/index/index.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/public/assets/js/lib/views/index/hootbox.js b/public/assets/js/lib/views/index/hootbox.js index 64fc756..6be9596 100644 --- a/public/assets/js/lib/views/index/hootbox.js +++ b/public/assets/js/lib/views/index/hootbox.js @@ -15,7 +15,7 @@ var HootBox = FormView.extend({ }, load: function(comments){ - if (!comments || !comments.length) { + if (!comments || !comments.length && ! this.options.required) { this.$el.hide() return } diff --git a/public/assets/js/lib/views/index/index.js b/public/assets/js/lib/views/index/index.js index 0f2a80e..4e1a801 100644 --- a/public/assets/js/lib/views/index/index.js +++ b/public/assets/js/lib/views/index/index.js @@ -21,6 +21,7 @@ var IndexView = View.extend({ $.get(this.keywordAction + keyword, this.populate.bind(this)) } else { + this.hootbox.options.required = true this.threadbox.options.latest = true this.threadbox.options.welcome = true $.get(this.action, this.populate.bind(this)) -- cgit v1.2.3-70-g09d2