|
|
|
@ -155,16 +155,12 @@ ajaxify = window.ajaxify || {};
|
|
|
|
|
app.alertError('[[global:please_log_in]]');
|
|
|
|
|
app.previousUrl = url;
|
|
|
|
|
window.location.href = config.relative_path + '/login';
|
|
|
|
|
} else if (status === 302 || status === 308) {
|
|
|
|
|
if (data.responseJSON && data.responseJSON.external) {
|
|
|
|
|
window.location.href = data.responseJSON.external;
|
|
|
|
|
} else if (typeof data.responseJSON === 'string') {
|
|
|
|
|
ajaxifyTimer = undefined;
|
|
|
|
|
if (data.responseJSON.startsWith('http://') || data.responseJSON.startsWith('https://')) {
|
|
|
|
|
window.location.href = data.responseJSON;
|
|
|
|
|
} else {
|
|
|
|
|
ajaxify.go(data.responseJSON.slice(1), callback, quiet);
|
|
|
|
|
}
|
|
|
|
|
} else if ((status === 302 || status === 308) && typeof data.responseJSON === 'string') {
|
|
|
|
|
ajaxifyTimer = undefined;
|
|
|
|
|
if (data.responseJSON.startsWith('http://') || data.responseJSON.startsWith('https://')) {
|
|
|
|
|
window.location.href = data.responseJSON;
|
|
|
|
|
} else {
|
|
|
|
|
ajaxify.go(data.responseJSON.slice(1), callback, quiet);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else if (textStatus !== 'abort') {
|
|
|
|
|