diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2017-12-23 11:27:23 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2017-12-23 11:27:23 +0100 |
| commit | b6777c92daf6e2becfb0efb3316a05885ce18109 (patch) | |
| tree | 39665d675536ca545467ecde4a54b5932cb4eed7 /public/assets/js/lib | |
| parent | 566390b9716b9db84902d30b5b295d5df5a86670 (diff) | |
strip carriage returns when displaying comments (messes with pre-line)
Diffstat (limited to 'public/assets/js/lib')
| -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 +}) |
