summaryrefslogtreecommitdiff
path: root/public/assets/js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-01-21 14:57:51 +0100
committerJules Laplace <julescarbon@gmail.com>2018-01-21 14:57:51 +0100
commit3ce1a44ab308f4c483541944aa777ec8aa91af2b (patch)
treef0e7d20561909ae8d4d12768c0b0aa248b446a78 /public/assets/js
parent53de20f4997fdcbd7f50cb29dd7783ea497a631a (diff)
code maxwidth
Diffstat (limited to 'public/assets/js')
-rw-r--r--public/assets/js/lib/views/details/commentform.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/public/assets/js/lib/views/details/commentform.js b/public/assets/js/lib/views/details/commentform.js
index 9a748f9..7f04ec3 100644
--- a/public/assets/js/lib/views/details/commentform.js
+++ b/public/assets/js/lib/views/details/commentform.js
@@ -18,6 +18,7 @@ var CommentForm = FormView.extend({
load: function(thread){
this.action = "/api/thread/" + thread.id + "/comment"
+ this.$comment.addClass('empty')
if (thread.settings.noupload) {
this.$("[type=file]").hide()
}
@@ -33,6 +34,7 @@ var CommentForm = FormView.extend({
focus: function(){
this.$el.addClass('focused')
+ this.$comment.removeClass('empty')
$("[name=comment]").prop("required", false)
},
@@ -47,6 +49,8 @@ var CommentForm = FormView.extend({
},
success: function(){
+ $("[name=comment").val('')
+ $("[name=files").val('')
window.location.reload()
}
})