Show XHR responseText on error
This commit is contained in:
parent
28a4185bb2
commit
b8a449b4b1
1 changed files with 8 additions and 3 deletions
|
@ -33,17 +33,22 @@
|
|||
}
|
||||
|
||||
$('#sidebar_content')
|
||||
.empty()
|
||||
.load(path, function(a, b, xhr) {
|
||||
.empty();
|
||||
|
||||
$.ajax({
|
||||
url: path,
|
||||
complete: function(xhr) {
|
||||
clearTimeout(loaderTimeout);
|
||||
$('#sidebar_loader').hide();
|
||||
$('#sidebar_content').html(xhr.responseText);
|
||||
if (xhr.getResponseHeader('X-Page-Title')) {
|
||||
document.title = xhr.getResponseHeader('X-Page-Title');
|
||||
}
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
})();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue