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)
|
showErrorModal(html)
|
||||||
|
|
||||||
|
module.exports.showNotyNetworkError = (jqxhr) ->
|
||||||
|
noty({
|
||||||
|
text: jqxhr.responseText or 'Unknown error'
|
||||||
|
layout: 'topCenter'
|
||||||
|
type: 'error'
|
||||||
|
killer: false,
|
||||||
|
dismissQueue: true
|
||||||
|
})
|
||||||
|
|
||||||
showErrorModal = (html) ->
|
showErrorModal = (html) ->
|
||||||
# TODO: make a views/modal/error_modal view for this to use so the template can reuse templates/core/modal-base?
|
# 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)
|
$('#modal-wrapper').html(html)
|
||||||
|
|
Reference in a new issue