Update partials with server side errors to emulate the old error (404, 403) behavior of Mayan.
Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
This commit is contained in:
committed by
Roberto Rosario
parent
c8911b901e
commit
63f3f83fa3
@@ -118,15 +118,12 @@ PartialNavigation.prototype.onAnchorClick = function ($this, event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
PartialNavigation.prototype.processAjaxRequestError = function (jqXHR) {
|
PartialNavigation.prototype.processAjaxRequestError = function (jqXHR) {
|
||||||
window.history.back();
|
|
||||||
|
|
||||||
if (jqXHR.status == 0) {
|
if (jqXHR.status == 0) {
|
||||||
$('#modal-server-error .modal-body').html($('#template-error').html());
|
$('#modal-server-error .modal-body').html($('#template-error').html());
|
||||||
|
$('#modal-server-error').modal('show')
|
||||||
} else {
|
} else {
|
||||||
$('#modal-server-error .modal-body').html(jqXHR.responseText.replace(/\n/g, "<br />"));
|
$('#ajax-content').html(jqXHR.responseText.replace(/\n/g, "<br />"));
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#modal-server-error').modal('show')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PartialNavigation.prototype.setLocation = function (newLocation, pushState) {
|
PartialNavigation.prototype.setLocation = function (newLocation, pushState) {
|
||||||
|
|||||||
Reference in New Issue
Block a user