A defined loader should not hide when there is a redirect taking place
This commit is contained in:
parent
8ca3483863
commit
beab3c3ded
|
|
@ -252,14 +252,19 @@ if (window.jQuery === undefined)
|
|||
$el.trigger('ajaxPromise')
|
||||
return $.ajax(requestOptions)
|
||||
.fail(function(jqXHR, textStatus, errorThrown){
|
||||
if (!isRedirect) $el.trigger('ajaxFail', [context, textStatus, jqXHR])
|
||||
if (!isRedirect) {
|
||||
$el.trigger('ajaxFail', [context, textStatus, jqXHR])
|
||||
if (loading) loading.hide()
|
||||
}
|
||||
})
|
||||
.done(function(data, textStatus, jqXHR){
|
||||
if (!isRedirect) $el.trigger('ajaxDone', [context, data, textStatus, jqXHR])
|
||||
if (!isRedirect) {
|
||||
$el.trigger('ajaxDone', [context, data, textStatus, jqXHR])
|
||||
if (loading) loading.hide()
|
||||
}
|
||||
})
|
||||
.always(function(dataOrXhr, textStatus, xhrOrError){
|
||||
$el.trigger('ajaxAlways', [context, dataOrXhr, textStatus, xhrOrError])
|
||||
if (loading) loading.hide()
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue