reply ticket

This commit is contained in:
Yudong
2014-04-26 18:37:21 +08:00
parent 8f4de96650
commit a53cc4aa58
2 changed files with 26 additions and 3 deletions

View File

@@ -0,0 +1,20 @@
$ ->
$('#reply').on 'click', (e) ->
e.preventDefault()
data = {
id: $('#ticketid').data 'id'
content: $('#reply-content').val()
}
$.ajax {
method: 'post'
url: '/ticket/reply/'
data: data
}
.done (r) ->
location.reload true
.fail (r) ->
if reply.status is 400
error = reply.responseJSON.error
ErrorHandle.flushError error