projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
28a4185
)
Show XHR responseText on error
author
John Firebaugh
<john.firebaugh@gmail.com>
Wed, 13 Nov 2013 19:59:52 +0000
(11:59 -0800)
committer
John Firebaugh
<john.firebaugh@gmail.com>
Wed, 13 Nov 2013 20:01:21 +0000
(12:01 -0800)
app/assets/javascripts/index.js
patch
|
blob
|
history
diff --git
a/app/assets/javascripts/index.js
b/app/assets/javascripts/index.js
index f6cb0223038c145e79852b6a0e84544d3fb9f84f..5724eaae8c2cdde831d4ca4dcd42c5cf91a0e1ab 100644
(file)
--- a/
app/assets/javascripts/index.js
+++ b/
app/assets/javascripts/index.js
@@
-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();
}
- });
+ }
+ });
};
})();