工单状态变更完成

加入成功信息提示
This commit is contained in:
Yudong
2014-05-16 22:29:04 +08:00
parent 13d256237b
commit 585c3fb2ec
8 changed files with 43 additions and 26 deletions

View File

@@ -1,18 +1,21 @@
$ ->
window.ErrorHandle =
addError: (error) ->
$('#page-alert').append "<p>#{error}</p>"
addInfo: (type, info) ->
$("#page-#{type}").append "<p>#{info}</p>"
clearError: ->
$('#page-alert').empty()
clearInfo: (type) ->
$("#page-#{type}").empty()
showError: ->
$('#page-alert').show()
showInfo: (type, callback) ->
$("#page-#{type}").show 400, if callback? then callback or null
hideInfo: (type) ->
$("#page-#{type}").hide()
flushInfo: (type, error, callback = null) ->
@clearInfo type
@addInfo type, error
@showInfo type, callback
hideError: ->
$('#page-alert').hide()
flushError: (error) ->
@clearError()
@addError error
@showError()