diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-05-14 16:38:21 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-05-14 16:38:21 +0200 |
| commit | 0c8658b2a68a8e12f5e87bc82952e40ae3324a00 (patch) | |
| tree | a59bf8878f7670ecb8fc89a83ea33b9123c83d0e /public/assets/js/lib/views/details/commentform.js | |
| parent | 5edc86e0f21eeccdaebc4d79964a391936049e86 (diff) | |
inline comment and delete
Diffstat (limited to 'public/assets/js/lib/views/details/commentform.js')
| -rw-r--r-- | public/assets/js/lib/views/details/commentform.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/public/assets/js/lib/views/details/commentform.js b/public/assets/js/lib/views/details/commentform.js index 7f04ec3..d4a9149 100644 --- a/public/assets/js/lib/views/details/commentform.js +++ b/public/assets/js/lib/views/details/commentform.js @@ -10,8 +10,8 @@ var CommentForm = FormView.extend({ action: "", - initialize: function(){ - this.__super__.initialize.call(this) + initialize: function(opt){ + this.__super__.initialize.call(this, opt) this.template = this.$(".template").html() this.$comment = this.$("[name=comment]") }, @@ -48,9 +48,12 @@ var CommentForm = FormView.extend({ return errors.length ? errors : null }, - success: function(){ + success: function(data){ $("[name=comment").val('') $("[name=files").val('') - window.location.reload() + // window.location.reload() + console.log(this) + console.log(this.parent) + this.parent.comments.load([data.comment]) } }) |
