Show XHR responseText on error

This commit is contained in:
John Firebaugh 2013-11-13 11:59:52 -08:00
parent 28a4185bb2
commit b8a449b4b1

View file

@ -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();
}
});
}
});
};
})();