Show error message on ajaxError event.
This commit is contained in:
parent
6dccef5659
commit
0e1f3fc7ac
1 changed files with 9 additions and 0 deletions
|
@ -31,6 +31,15 @@ class _Singleton
|
|||
@_hide_spinner()
|
||||
)
|
||||
|
||||
# show error messages
|
||||
$('body').bind( 'ajaxError', (e,jqxhr, settings, exception) ->
|
||||
new App.ErrorModal(
|
||||
message: 'StatusCode: ' + jqxhr.status
|
||||
detail: jqxhr.responseText
|
||||
close: true
|
||||
)
|
||||
)
|
||||
|
||||
ajax: (params, defaults) ->
|
||||
data = $.extend({}, @defaults, defaults, params)
|
||||
if params['id']
|
||||
|
|
Loading…
Reference in a new issue