diff options
Diffstat (limited to 'public/assets/js/lib/views/details/commentform.js')
| -rw-r--r-- | public/assets/js/lib/views/details/commentform.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/public/assets/js/lib/views/details/commentform.js b/public/assets/js/lib/views/details/commentform.js index a14caa3..db08ef1 100644 --- a/public/assets/js/lib/views/details/commentform.js +++ b/public/assets/js/lib/views/details/commentform.js @@ -1,32 +1,32 @@ var CommentForm = FormView.extend({ - + el: "#comment_form", - + events: { "focus textarea": 'focus', "mouseup input[type=file]": 'focus', }, - + action: "", - + initialize: function(){ this.__super__.initialize.call(this) this.template = this.$(".template").html() this.$comment = this.$("[name=comment]") }, - + load: function(thread){ this.action = "/api/thread/" + thread.id + "/comment" if (thread.settings.noupload) { this.$("[type=file]").hide() } }, - + focus: function(){ this.$el.addClass('focused') $("[name=comment]").prop("required", false) }, - + validate: function(){ var errors = [] var comment = $("[name=comment]").val() @@ -40,4 +40,4 @@ var CommentForm = FormView.extend({ success: function(){ window.location.reload() } -})
\ No newline at end of file +}) |
