mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-27 06:23:41 -04:00
Add showNotyNetworkError to app/core/errors
This commit is contained in:
parent
bd20536046
commit
3f8652d9a9
1 changed files with 9 additions and 0 deletions
|
@ -41,6 +41,15 @@ module.exports.connectionFailure = connectionFailure = ->
|
|||
)
|
||||
showErrorModal(html)
|
||||
|
||||
module.exports.showNotyNetworkError = (jqxhr) ->
|
||||
noty({
|
||||
text: jqxhr.responseText or 'Unknown error'
|
||||
layout: 'topCenter'
|
||||
type: 'error'
|
||||
killer: false,
|
||||
dismissQueue: true
|
||||
})
|
||||
|
||||
showErrorModal = (html) ->
|
||||
# TODO: make a views/modal/error_modal view for this to use so the template can reuse templates/core/modal-base?
|
||||
$('#modal-wrapper').html(html)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue