This commit is contained in:
barisusakli
2015-01-12 18:16:34 -05:00
parent bbfec7d443
commit 200f74f1c7
3 changed files with 10 additions and 6 deletions

View File

@@ -38,11 +38,15 @@ $(document).ready(function() {
app.previousUrl = url;
return ajaxify.go('login');
} else if (status === 302) {
if (!ajaxify.go(data.responseJSON.path, callback, quiet)) {
window.location.href = data.responseJSON.path;
if (data.responseJSON.path) {
if (!ajaxify.go(data.responseJSON.path, callback, quiet)) {
window.location.href = data.responseJSON.path;
}
} else if (data.responseJSON) {
ajaxify.go(data.responseJSON.slice(1), callback, quiet);
}
}
} else if (textStatus !== "abort") {
} else if (textStatus !== 'abort') {
app.alertError(data.responseJSON.error);
}
}