Merge pull request #2263 from jicho/master
No redirect when url ends with #
This commit is contained in:
1 file changed
+5
-1
@@ -283,7 +283,11 @@
|
|||||||
doc.ajaxSuccess(function (e, xhr) {
|
doc.ajaxSuccess(function (e, xhr) {
|
||||||
var redirect = xhr.getResponseHeader('web2py-redirect-location');
|
var redirect = xhr.getResponseHeader('web2py-redirect-location');
|
||||||
if (redirect !== null) {
|
if (redirect !== null) {
|
||||||
window.location = redirect;
|
if (!redirect.endsWith('#')) {
|
||||||
|
window.location.href = redirect;
|
||||||
|
} else {
|
||||||
|
window.location.reload();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* run this here only if this Ajax request is NOT for a web2py component. */
|
/* run this here only if this Ajax request is NOT for a web2py component. */
|
||||||
if (xhr.getResponseHeader('web2py-component-content') === null) {
|
if (xhr.getResponseHeader('web2py-component-content') === null) {
|
||||||
|
|||||||
Reference in new issue
Block a user