mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-06 23:52:58 +01:00
closes #2383
This commit is contained in:
@@ -89,11 +89,9 @@ $(document).ready(function() {
|
||||
app.previousUrl = url;
|
||||
return ajaxify.go('login');
|
||||
} else if (status === 302) {
|
||||
if (data.responseJSON.path) {
|
||||
if (!ajaxify.go(data.responseJSON.path, callback, quiet)) {
|
||||
window.location.href = data.responseJSON.path;
|
||||
}
|
||||
} else if (data.responseJSON) {
|
||||
if (data.responseJSON.external && data.responseJSON.path) {
|
||||
window.location.href = data.responseJSON.path;
|
||||
} else if (typeof data.responseJSON === 'string') {
|
||||
ajaxify.go(data.responseJSON.slice(1), callback, quiet);
|
||||
}
|
||||
}
|
||||
@@ -184,6 +182,9 @@ $(document).ready(function() {
|
||||
}
|
||||
},
|
||||
error: function(data, textStatus) {
|
||||
if (data.status === 0 && textStatus === 'error') {
|
||||
data.status = 500;
|
||||
}
|
||||
callback({
|
||||
data: data,
|
||||
textStatus: textStatus
|
||||
@@ -264,5 +265,6 @@ $(document).ready(function() {
|
||||
|
||||
ajaxifyAnchors();
|
||||
app.load();
|
||||
templates.cache['500'] = $('.tpl-500').html();
|
||||
|
||||
});
|
||||
@@ -1,7 +1,7 @@
|
||||
<div class="alert alert-danger">
|
||||
<strong>[[global:500.title]]</strong>
|
||||
<p>[[global:500.message]]</p>
|
||||
<p>{path}<p>
|
||||
<p>{path}</p>
|
||||
<!-- IF error --><p>{error}</p><!-- ENDIF error -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user