mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-04-23 03:10:30 +08:00
fix
This commit is contained in:
@@ -14,4 +14,4 @@ $ ->
|
||||
.fail (reply) ->
|
||||
if reply.status is 400
|
||||
error = reply.responseJSON.error
|
||||
ErrorHandle.flushInfo 'error', error
|
||||
ErrorHandle.flushInfo 'alert', error
|
||||
|
||||
@@ -2,7 +2,7 @@ $ ->
|
||||
$('.signup-btn').on 'click', (e) ->
|
||||
e.preventDefault()
|
||||
if $('#passwd').val() isnt $('#passwd2').val()
|
||||
ErrorHandle.flushInfo 'error', '两次密码不一致'
|
||||
ErrorHandle.flushInfo 'alert', '两次密码不一致'
|
||||
else
|
||||
data =
|
||||
username: $('#username').val()
|
||||
@@ -17,4 +17,4 @@ $ ->
|
||||
.fail (reply) ->
|
||||
if reply.status is 400
|
||||
error = reply.responseJSON.error
|
||||
ErrorHandle.flushInfo 'error', error
|
||||
ErrorHandle.flushInfo 'alert', error
|
||||
|
||||
@@ -14,4 +14,4 @@ $ ->
|
||||
.fail (reply) ->
|
||||
if reply.status is 400
|
||||
error = reply.responseJSON.error
|
||||
ErrorHandle.flushInfo 'error', error
|
||||
ErrorHandle.flushInfo 'alert', error
|
||||
|
||||
@@ -17,4 +17,4 @@ $ ->
|
||||
.fail (reply) ->
|
||||
if reply.status is 400
|
||||
error = reply.responseJSON.error
|
||||
ErrorHandle.flushInfo 'error', error
|
||||
ErrorHandle.flushInfo 'alert', error
|
||||
|
||||
@@ -1,7 +1,20 @@
|
||||
$ ->
|
||||
id = $('#ticketid').data 'id'
|
||||
#return a promise
|
||||
changeStatus = (status) ->
|
||||
$.post '/ticket/update/', {
|
||||
id: id
|
||||
status: status
|
||||
}
|
||||
checkContent = ->
|
||||
if $('#reply-content').val() is ''
|
||||
console.log 's'
|
||||
ErrorHandle.flushInfo 'alert', '回复不能为空'
|
||||
return false
|
||||
true
|
||||
$('#reply-btn').on 'click', (e) ->
|
||||
e.preventDefault()
|
||||
return unless checkContent()
|
||||
data = {
|
||||
id: id
|
||||
content: $('#reply-content').val()
|
||||
@@ -18,13 +31,8 @@ $ ->
|
||||
.fail (r) ->
|
||||
if reply.status is 400
|
||||
error = reply.responseJSON.error
|
||||
ErrorHandle.flushInfo 'error', error
|
||||
#return a promise
|
||||
changeStatus = (status) ->
|
||||
$.post '/ticket/update/', {
|
||||
id: id
|
||||
status: status
|
||||
}
|
||||
ErrorHandle.flushInfo 'alert', error
|
||||
|
||||
|
||||
$('#close-btn').on 'click', (e) ->
|
||||
e.preventDefault()
|
||||
|
||||
Reference in New Issue
Block a user