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:
Eric Riggs
2018-03-07 16:56:24 -04:00
committed by Roberto Rosario
parent c8911b901e
commit 63f3f83fa3

View File

@@ -118,15 +118,12 @@ PartialNavigation.prototype.onAnchorClick = function ($this, event) {
}
PartialNavigation.prototype.processAjaxRequestError = function (jqXHR) {
window.history.back();
if (jqXHR.status == 0) {
$('#modal-server-error .modal-body').html($('#template-error').html());
$('#modal-server-error').modal('show')
} 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) {