diff options
| author | pep <yes@peepee.me> | 2020-07-29 01:53:35 +0000 |
|---|---|---|
| committer | pep <yes@peepee.me> | 2020-07-29 01:53:35 +0000 |
| commit | 07cda6c39cb7845219d5ba13ae61168890ff9225 (patch) | |
| tree | 3428e81700ee2834bde02fb179a7171f8b13c108 /public/assets/js/lib/views/details/commentform.js | |
| parent | a7aea69687eb268807aa4a86d9188004fe5cb6c7 (diff) | |
okpepper
Diffstat (limited to 'public/assets/js/lib/views/details/commentform.js')
| -rw-r--r-- | public/assets/js/lib/views/details/commentform.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/public/assets/js/lib/views/details/commentform.js b/public/assets/js/lib/views/details/commentform.js index f3d79ac..2759fd6 100644 --- a/public/assets/js/lib/views/details/commentform.js +++ b/public/assets/js/lib/views/details/commentform.js @@ -49,6 +49,8 @@ var CommentForm = FormView.extend({ }, success: function(data){ + console.log("data from server") + console.log(data) $("[name=comment").val('') $("[name=files").val('') // window.location.reload() @@ -57,7 +59,11 @@ var CommentForm = FormView.extend({ console.log("this is data") console.log(data) data.comment && this.parent.comments.load([data.comment]) - data.files && this.parent.files.load(data.files) - data.files && this.parent.gallery.load(data.files) + window.joe = this + if (data.files){ + this.options.parent.data.files = this.options.parent.data.files.concat(data.files) + this.parent.files.load() + this.parent.gallery.load(data.files) + } } }) |
