diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2017-12-13 04:34:20 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2017-12-13 04:34:20 +0100 |
| commit | f6feb274cde0f84e992009dff7050847eae9c89a (patch) | |
| tree | 56b399fd4e012a6179a3facf4ac737b16eaecdaa /public/assets/js/lib/views | |
| parent | 55067d74fb2a472aa5de9c0c917d1219821b81fe (diff) | |
required
Diffstat (limited to 'public/assets/js/lib/views')
| -rw-r--r-- | public/assets/js/lib/views/index/hootbox.js | 2 | ||||
| -rw-r--r-- | public/assets/js/lib/views/index/index.js | 1 |
2 files changed, 2 insertions, 1 deletions
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)) |
